submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s483926354 | p00776 | C++ | #include<iostream>
#include<string>
#include<queue>
#include<vector>
using namespace std;
string S;
queue<pair<string, int>>Q;
vector<string>X;
char T[27] = "abcdefghijklmnopqrstuvwxyz";
int main() {
while (true) {
X.clear();
cin >> S;
if (S == "#") { break; }
Q.push(make_pair(S, 25));
while (!Q.empty())
... | a.cc: In function 'int main()':
a.cc:48:17: error: 'sort' was not declared in this scope; did you mean 'short'?
48 | sort(X.begin(), X.end());
| ^~~~
| short
|
s170063479 | p00776 | C++ | #include<iostream>
#include<string>
#include<queue>
#include<vector>
using namespace std;
string S;
queue<pair<string, int>>Q;
vector<string>X;
char T[27] = "abcdefghijklmnopqrstuvwxyz";
int main() {
while (true) {
X.clear();
cin >> S;
if (S == "#") { break; }
Q.push(make_pair(S, 25));
while (!Q.empty())
... | a.cc: In function 'int main()':
a.cc:48:17: error: 'sort' was not declared in this scope; did you mean 'short'?
48 | sort(X.begin(), X.end());
| ^~~~
| short
|
s087147721 | p00776 | C++ | #include <string>
#include <vector>
#include <iostream>
using namespace std;
#define REP(i,s,n) for(int i =(int)s;i<(int)n;++i)
#define rep(i,n) REP(i, 0, n)
int N;
vector<string> ans;
string S;
void dfs(string k, int it) {
if(it == N) {
ans.push_back(k);
return;
}
rep(i, 2) {
if(i == 1 && S[it] == 'z... | a.cc: In function 'int main()':
a.cc:36:5: error: 'sort' was not declared in this scope; did you mean 'short'?
36 | sort(ans.begin(), ans.end());
| ^~~~
| short
|
s073120611 | p00776 | C++ | #include <string>
#include <vector>
#include <iostream>
using namespace std;
#define REP(i,s,n) for(int i =(int)s;i<(int)n;++i)
#define rep(i,n) REP(i, 0, n)
int N;
vector<string> ans;
string S;
void dfs(string k, int it) {
if(it == N) {
ans.push_back(k);
return;
}
rep(i, 2) {
if(i == 1 && S[it] == 'z... | a.cc: In function 'int main()':
a.cc:36:5: error: 'sort' was not declared in this scope; did you mean 'short'?
36 | sort(ans.begin(), ans.end());
| ^~~~
| short
|
s871516317 | p00776 | C++ | #include <bits/stdc++.h>
#define REP(i,n,N) for(int i=n;i<(int)N;i++)
#define p(S) cout<<(S)<<endl
using namespace std;
vector<string> ans;
string str;
bool used[26];
void dfs(string s){
unsigned int num=s.size();
if(num == str.size()){
ans.push_back(s);
return;
}
if(str[num]=='a'|| used[str[num]-'a']){
dfs... | a.cc: In function 'int main()':
a.cc:31:17: error: 'esdfs' was not declared in this scope; did you mean 'dfs'?
31 | esdfs("");
| ^~~~~
| dfs
|
s686617456 | p00776 | C++ | #include<iostream>
#include<string>
#include<vector>
using namespace std;
#define REP(i, n) for(int i=0; i<n; i++)
typedef pair<string, bool> psb;
int n;
char al[25];
string s;
vector<psb> can[26];
int main(){
REP(i, 25){
al[i] = 'a'+i;
}
while(1){
cin >> s;
if(s=="#") break;
... | a.cc: In function 'int main()':
a.cc:68:9: error: 'sort' was not declared in this scope; did you mean 'short'?
68 | sort(output.begin(), output.end());
| ^~~~
| short
|
s303694754 | p00776 | C++ | #include<iostream>
#include<vector>
#include<string>
#include<map>
#include<set>
#include<cstring>
#include<queue>
#include<stack>
#include<cstdio>
#include<iomanip>
#define pb push_back
#define all(in) in.begin(),in.end()
#define shosu(x) fixed<<setprecision(x)
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,n)... | a.cc: In function 'int main()':
a.cc:51:17: error: 'sort' was not declared in this scope; did you mean 'short'?
51 | sort(all(in));
| ^~~~
| short
|
s363212874 | p00776 | C++ | #include <iostream>
#include <vector>
using namespace std;
bool memo[20][1050000];
template<typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val) {
std::fill((T *) array, (T *) (array + N), val);
}
void search(int keta, long henkan, long ans, const int n, string str) {
if (keta > n) retur... | a.cc: In function 'int main()':
a.cc:55:9: error: 'sort' was not declared in this scope; did you mean 'short'?
55 | sort(ans.begin(), ans.end());
| ^~~~
| short
|
s143246216 | p00777 | C++ | #include<bits\stdc++.h>
using namespace std;
int main(void){
list<pair<int,int> > vp,p[800];
queue<int> v;
int i,j,k;
int size[800];
int n,to[800],cost[800];
while(true){
cin >> n;
if(n == 0) break;
memset(size,0,sizeof(size));
for(i = 0;i < n;i++) p[i].clear();... | a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory
1 | #include<bits\stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s982110240 | p00777 | C++ | #include <queue>
#include <vector>
#include <iostream>
#include <algorithm>
#include <functional>
#pragma warning(disable : 4996)
#define INF (1 << 29)
using namespace std;
int main()
{
int n, sum;
while (true)
{
scanf("%d", &n); sum = 0;
if (n == 0) break;
vector<i... | a.cc: In function 'int main()':
a.cc:79:29: error: 'G' was not declared in this scope
79 | sum2 += G[i][j].second;
| ^
|
s258727545 | p00777 | C++ | #include <iostream>
#include <vector>
#include <string>
#include <set>
#include <algorithm>
using namespace std;
typedef pair<int, int> pi;
int prevv[1024];
vector<pi> G[1024];
int N;
int p[1024], d[1024];
pi dfs(int x, int pr){
// cout << x << endl;
if(G[x].size() == 1 && pr != -1){
// prevv[x] = pr;
... | a.cc: In function 'int main()':
a.cc:47:5: error: 'memset' was not declared in this scope
47 | memset(prevv, -1, sizeof(prevv));
| ^~~~~~
a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
5 | #include <algorithm>
+++ |+#include <cst... |
s629717789 | p00777 | C++ | #include<bits/stdc++.h>
using namespace std;
#define int long long
#define r(i,n) for(int i=0;i<n;i++)
int c[900][900],x,y,z,pp,n,co[901],t[901];
vector<int>v[900];
bool used[901];
void dfs(int p,int d){
if(pp<d)pp=d,z=c[v[p][0]][p];
else if(pp==d)z=max(z,c[v[p][0]][p]);
int f=0;
x=max(x,d);
used[p]=1;
r(i,... | a.cc:22:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
22 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:24:5: error: 'msemset' was not declared in this scope; did you mean 'memset'?
24 | msemset(c,0,sizeof(c));
| ^~~~~~~
| memset
|
s259416548 | p00778 | C++ | #include <array>
#include <cstdlib>
#include <functional>
#include <iostream>
#include <numeric>
using namespace std;
#define REP(i, a, b) for(int i = (a); i < int(b); ++i)
#define rep(i, n) REP(i, 0, n)
#define ALL(x) begin(x), end(x)
enum FACE { TOP, BOTTOM, NORTH, SOUTH, WEST, EAST };
struct dice {
array<int, 6>... | a.cc: In function 'int main()':
a.cc:92:20: error: 'none_of' was not declared in this scope
92 | if(none_of(ALL(t), [](int x) { return x; })) break;
| ^~~~~~~
a.cc:94:17: error: 'sort' was not declared in this scope; did you mean 'short'?
94 | sort(ALL(t));... |
s217467147 | p00778 | C++ | //ICPC2014-pre Problem F
#include <iostream>
#include <cstdio>
#define rep(i,n) for(int i =0 ;i<n;i++)
using namespace std;
/*
0
1
2 3 5
4
*/
void acpy(int to[],int from[]){//???????????????
rep(i,6){
to[i]=from[i];
}
}
void moveS(int arg[]){//??????
int temp[6];
rep(i,6){
... | a.cc:93:64: warning: trigraph ??/ ignored, use -trigraphs to enable [-Wtrigraphs]
93 | if(now<=ne1+ne2&&ne1-1 <=now+ne2&&ne2-1 <=now+ne1)???//???????????????
a.cc: In function 'bool check(int*, int*)':
a.cc:93:63: error: expected primary-expression before '?' token
93 | if(now<=ne1+ne2&&ne... |
s198784853 | p00778 | C++ | //ICPC2014-pre Problem F
#include <algorithm>
#include <iostream>
#include <cstdio>
#define rep(i,n) for(int i =0 ;i<n;i++)
using namespace std;
/*
0
1
2 3 5
4
*/
void acpy(int to[],int from[]){//???????????????
rep(i,6){
to[i]=from[i];
}
}
void moveS(int arg[]){//??????
int te... | a.cc:94:64: warning: trigraph ??/ ignored, use -trigraphs to enable [-Wtrigraphs]
94 | if(now<=ne1+ne2&&ne1-1 <=now+ne2&&ne2-1 <=now+ne1)???//???????????????
a.cc: In function 'bool check(int*, int*)':
a.cc:94:63: error: expected primary-expression before '?' token
94 | if(now<=ne1+ne2&&ne... |
s324619748 | p00778 | C++ |
#include <iostream>
#include <cstdio>
#define rep(i,n) for(int i =0 ;i<n;i++)
using namespace std;
/*
0
1
2 3 5
4
*/
void acpy(int to[],int from[]){//???????????????
rep(i,6){
to[i]=from[i];
}
}
void moveS(int arg[]){//??????
int temp[6];
rep(i,6){
temp[i]=arg[i];
}
... | a.cc: In function 'bool check(int*, int*)':
a.cc:97:9: error: 'next_permutation' was not declared in this scope
97 | next_permutation(per,per+6);
| ^~~~~~~~~~~~~~~~
|
s622669562 | p00778 | C++ | #include<iostream>
#include<cstdio>
#include<vector>
#include<queue>
#include<string>
#include<cstring>
#include<map>
#include<tuple>
#include<algorithm>
using namespace std;
#define REP(i, n) for(int i=0;i<(int)n;i++)
#define REPS(i, n) for(int i=1;i<=(int)n;i++)
#define RREP(i, n) for(int i=n-1;i>=0;i--)
#define RR... | a.cc: In function 'int main()':
a.cc:73:25: error: 'accumulate' was not declared in this scope
73 | int n = accumulate(ALL(t), 0);
| ^~~~~~~~~~
|
s347848958 | p00778 | C++ | #include<iostream>
#include<cstdio>
#include<vector>
#include<queue>
#include<string>
#include<cstring>
#include<map>
#include<tuple>
#include<algorithm>
using namespace std;
#define REP(i, n) for(int i=0;i<(int)n;i++)
#define REPS(i, n) for(int i=1;i<=(int)n;i++)
#define RREP(i, n) for(int i=n-1;i>=0;i--)
#define RR... | a.cc: In function 'int main()':
a.cc:73:25: error: 'accumulate' was not declared in this scope
73 | int n = accumulate(ALL(t), 0);
| ^~~~~~~~~~
|
s535289086 | p00778 | C++ | #include<bits/stdc++.h>
using namespace std;
enum DIE {TOP, FRONT, RIGHT, LEFT, BACK, BOTTOM};
enum DIR {E, N, S, W, CLOCKWISE};
const string INF = "X";
void rotate(vector<int>& die, DIR dir) {
if(dir == E) {
swap(die[TOP], die[RIGHT]);
swap(die[TOP], die[BOTTOM]);
swap(die[TOP], die[LEFT]);
}
if(di... | a.cc:43:45: error: expected ',' or '...' before '&' token
43 | string greedy(vector<int> die, string string& upper_bound) {
| ^
a.cc: In function 'std::string greedy(std::vector<int>, std::string)':
a.cc:44:9: error: expected ';' before 'res'
44 | string res;
... |
s654613481 | p00778 | C++ |
def find(target, front, east, north, west, south, rear)
current = [front, east, north, west, south, rear].sort!
return nil if target[0] < current[0] || target[1] < current[1] ||
target[2] < current[2] || target[3] < current[3] ||
target[4] < current[4] || target[5] < current[5] ||
target[0]+ta... | a.cc:10:10: error: empty character constant
10 | return '' if target == current
| ^~
a.cc:30:12: error: empty character constant
30 | return ''
| ^~
a.cc:36:12: warning: multi-character character constant [-Wmultichar]
36 | return 'EE' + result
| ^~~~
... |
s168860965 | p00778 | C++ | #include <algorithm>
#include <iostream>
bool valid(int a, int b, int c) {
return a <= b + c && b <= c + a + 1 && c <= a + b + 1;
}
void calc(int rear, int front, int west, int east, int north, int south, int limit, char* buffer) {
bool same = true;
for (int i = 0; i < limit; i++) {
int a = rear +... | a.cc: In function 'char* find(int*, int)':
a.cc:58:10: error: 'memset' is not a member of 'std'; did you mean 'wmemset'?
58 | std::memset(buffer, 'Z', limit);
| ^~~~~~
| wmemset
|
s159036025 | p00778 | C++ | #include <algorithm>
#include <iostream>
bool valid(int a, int b, int c) {
return a <= b + c && b <= c + a + 1 && c <= a + b + 1;
}
void calc(int rear, int front, int west, int east, int north, int south, int limit, char* buffer) {
bool same = true;
for (int i = 0; i < limit; i++) {
int a = rear +... | a.cc: In function 'char* find(int*, int)':
a.cc:58:5: error: 'memset' was not declared in this scope
58 | memset(buffer, 'Z', limit);
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <iostream>
+++ |+#include ... |
s105499073 | p00779 | C++ | #include <iostream>
#include <algorithm>
#include <map>
#include <vector>
#include <cmath>
using namespace std;
int n,m;
int x[10000],y[10000],r[10000]; //???????????????
int G[100][100]; //??°???????????£??\??????
vector<vector<int> > C; //??°????????????????????¨???
int norm(int vx,int vy){ //???????????????
retu... | a.cc: In function 'int main()':
a.cc:108:5: error: 'memset' was not declared in this scope
108 | memset(visited,0,sizeof(visited));
| ^~~~~~
a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
5 | #include <cmath>
+++ |+#include <cstri... |
s561228805 | p00779 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
typedef pair<int,P> P1;
typedef pair<P,P> P2;
#define pu push
#define pb push_back
#define mp make_pair
//#define eps 1e-7
#define INF 1000000000
#define fi first
#define sc second
#define rep(i,x) for(int i=0;i<x;i++)
#define ... | a.cc: In function 'void dfs(int, int, int, int)':
a.cc:39:27: error: return-statement with a value, in function returning 'void' [-fpermissive]
39 | if(cur == gen) return 1;
| ^
a.cc:41:5: error: 'f' was not declared in this scope
41 | f = (ran[cur][pre]+1)%edge[cur].size()... |
s078550533 | p00780 | Java | import java.util.*;
public class Asia1998A{
public static void main(String[] args){
int max = (int)(Math.pow(2,15));
int count=0;
List<Integer> list = new ArrayList<Integer>();
boolean[] a = new boolean[max];
for(int i=0;i<max;i++){
a[i] = true;
}
a[0]=false;
a[1]=false;
for(int i=2;i<max;i++){
... | Main.java:3: error: class Asia1998A is public, should be declared in a file named Asia1998A.java
public class Asia1998A{
^
1 error
|
s480012929 | p00780 | Java | import java.util.*;
public class Asia1998A{
public static void main(String[] args){
int max = (int)(Math.pow(2,15));
int count=0;
List<Integer> list = new ArrayList<Integer>();
boolean[] a = new boolean[max];
for(int i=0;i<max;i++){
a[i] = true;
}
a[0]=false;
a[1]=false;
for(int i=2;i<max;i++){
... | Main.java:3: error: class Asia1998A is public, should be declared in a file named Asia1998A.java
public class Asia1998A{
^
1 error
|
s889271219 | p00780 | Java | import java.util.*;
public class Asia1998A{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
int max = (int)(Math.pow(2,15));
int count=0;
List<Integer> list = new ArrayList<Integer>();
boolean[] a = new boolean[max];
for(int i=0;i<max;i++){
a[i] = true;
}
a[0]=false;... | Main.java:3: error: class Asia1998A is public, should be declared in a file named Asia1998A.java
public class Asia1998A{
^
1 error
|
s654274837 | p00780 | Java | class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
int max = (int)(Math.pow(2,15));
int count=0;
List<Integer> list = new ArrayList<Integer>();
boolean[] a = new boolean[max];
for(int i=0;i<max;i++){
a[i] = true;
}
a[0]=false;
a[1]=false;
for(int i=2;i<ma... | Main.java:3: error: cannot find symbol
Scanner scan = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:3: error: cannot find symbol
Scanner scan = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:6: error: cannot find sym... |
s896668377 | p00780 | C | #include <stdio.h>
#include <math.h>
#define VD void
#define U1 unsigned char
#define U4 unsigned int
#define APL_FALSE (0)
#define APL_TRUE (1)
#define MAX_INPUT_N (32768) /* 2^15??????????????????10???????????§??????????????¨?´???°?????????????¶????????????????*/
#define NUM_PRIME_NUMBER_ARR (9592) /* 10????... | main.c: In function 'main':
main.c:29:32: error: passing argument 1 of 'vd_s_createPrimeNumArr' from incompatible pointer type [-Wincompatible-pointer-types]
29 | vd_s_createPrimeNumArr(&u4_tp_PrimeNumArr[0]);
| ^~~~~~~~~~~~~~~~~~~~~
| ... |
s571574047 | p00780 | C | #include <stdio.h>
#include <math.h>
#define VD void
#define U1 unsigned char
#define U4 unsigned int
#define APL_FALSE (0)
#define APL_TRUE (1)
#define MAX_INPUT_N (32768) /* 2^15??????????????????10???????????§??????????????¨?´???°?????????????¶????????????????*/
#define NUM_PRIME_NUMBER_ARR (9592) /* 10????... | main.c: In function 'main':
main.c:29:32: error: passing argument 1 of 'vd_s_createPrimeNumArr' from incompatible pointer type [-Wincompatible-pointer-types]
29 | vd_s_createPrimeNumArr(&u4_tp_PrimeNumArr[0]);
| ^~~~~~~~~~~~~~~~~~~~~
| ... |
s857691406 | p00780 | C | //50000 for aizu0056
//1000000 for aizu0185
#define M 32769
p[M+1];main(n,i,j){
p[1]=1;
for(;i<=M;i++)
if(!p[i])
for(j=i*2;j<=M;j+=i)
p[j]=1;
for(;scanf("%d",&n),n;printf("%d\n",s))
for(i=2,j=0;i<=n/2;i++)
if(!p[i]&&!p[n-i])j++;
return 0;
} | main.c:4:1: warning: data definition has no type or storage class
4 | p[M+1];main(n,i,j){
| ^
main.c:4:1: error: type defaults to 'int' in declaration of 'p' [-Wimplicit-int]
main.c:4:8: error: return type defaults to 'int' [-Wimplicit-int]
4 | p[M+1];main(n,i,j){
| ^~~~
main.c: In function '... |
s825860125 | p00780 | C | //50000 for aizu0056
//1000000 for aizu0185
#define M 32769
p[M+1];
int main(){
int n,i=2,j;
p[1]=1;
for(;i<=IN_MAX;i++)
if(!p[i])
for(j=i*2;j<=IN_MAX;j+=i)
p[j]=1;
for(;scanf("%d",&n),n;){
int i=2,s=0;
for(;i<=n/2;i++){
if(p[i])continue;
if(!p[n-i]){
s++;
}... | main.c:4:1: warning: data definition has no type or storage class
4 | p[M+1];
| ^
main.c:4:1: error: type defaults to 'int' in declaration of 'p' [-Wimplicit-int]
main.c: In function 'main':
main.c:10:11: error: 'IN_MAX' undeclared (first use in this function)
10 | for(;i<=IN_MAX;i++)
| ^... |
s170651476 | p00780 | C | #include<stdio.h>
int prime[20000];
int n;
int main()
{
int i,j,count;
for(i=2;i<10002;i++)
{
if(prime[i]==1)
continue;
for(j=i+i;j<20000;j+=i)
prime[j]=1;
}
for(;scanf("%d",&n),n;)
{
count=0;
for(i=2;i<n;i++)
{
for(j=2;i+j<=n;j++)
{
if(i+j==n && prime[i]==1 &&prime[... | main.c: In function 'main':
main.c:26:4: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
26 | print("%d\n",conut);
| ^~~~~
| printf
main.c:26:17: error: 'conut' undeclared (first use in this function); did you mean 'count'?
26 | pri... |
s113395508 | p00780 | C++ | import math
primes=[2]
top=2
nlist=[2*x-1 for x in range(2,2**13)]
while top<math.sqrt(2**14):
top=nlist[0]
primes.append(top)
newnlist=[]
for i in nlist:
if i%top!=0:
newnlist.append(i)
nlist=newnlist
primes=primes+nlist
print primes
while(1):
n=int(raw_input())
if n==0:... | a.cc:1:1: error: 'import' does not name a type
1 | import math
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
|
s975504216 | p00780 | C++ | import java.util.*;
class Asia1998A{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
int max = (int)(Math.pow(2,15));
int count=0;
List<Integer> list = new ArrayList<Integer>();
boolean[] a = new boolean[max];
for(int i=0;i<max;i++){
a[i] = true;
}
a[0]=false;
a[1]... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:15: error: expected ':' before 'static'
4 | public static void main(String[] args){
| ^~~~~~~
| :
a.cc:4:... |
s630737537 | p00780 | C++ | #include<iostream>
#include<vector>
#include<string>
#include<cmath>
#include<algorithm>
#include<map>
using namespace std;
int main() {
bool b[300];
int n;
fill(b, b + 300, true);
b[0] = false;
b[1] = false;
for (int i = 2; i < 300; i++) {
if (b[i]) {
int j = 2;
while (i*j < 300) {
b[i*j] = false;
... | a.cc: In function 'int main()':
a.cc:22:13: error: redeclaration of 'int n'
22 | int n;
| ^
a.cc:10:13: note: 'int n' previously declared here
10 | int n;
| ^
a.cc:30:22: error: invalid use of non-static member function 'std::map<_Key, _Tp, _Compare, _Alloc>::si... |
s607770327 | p00780 | C++ | #include<iostream>
#include<vector>
#include<string>
#include<cmath>
#include<algorithm>
#include<map>
using namespace std;
int main() {
bool b[300];
int n;
fill(b, b + 300, true);
b[0] = false;
b[1] = false;
for (int i = 2; i < 300; i++) {
if (b[i]) {
int j = 2;
while (i*j < 300) {
b[i*j] = false;
... | a.cc: In function 'int main()':
a.cc:22:13: error: redeclaration of 'int n'
22 | int n;
| ^
a.cc:10:13: note: 'int n' previously declared here
10 | int n;
| ^
a.cc:30:22: error: invalid use of non-static member function 'std::map<_Key, _Tp, _Compare, _Alloc>::si... |
s150346912 | p00780 | C++ | #include<iostream>
#include<algorithm>
#include<map>
using namespace std;
bool b[33000];
int main() {
int n;
fill(b, b + 33000, true);
b[0] = false;
b[1] = false;
for (int i = 2; i < 33000; i++) {
if (b[i]) {
int j = 2;
while (i*j < 33000) {
b[i*j] = false;
}
}
}
int n;
while (cin >> n&&n != 0... | a.cc: In function 'int main()':
a.cc:19:13: error: redeclaration of 'int n'
19 | int n;
| ^
a.cc:7:13: note: 'int n' previously declared here
7 | int n;
| ^
a.cc:27:22: error: invalid use of non-static member function 'std::map<_Key, _Tp, _Compare, _Alloc>::siz... |
s825157643 | p00780 | C++ | o[1<<20],n,r;
main(i){
for(;++i<999;)
if(!o[i])
for(r=i+i;r<1<<20;r+=i)
o[r]=1;
for(;scanf("%d",&n),n;printf("%d\n",r))
for(i=1,r=0;++i<=n/2;)
o[i]+o[n-i]||r++;
exit(0);
} | a.cc:1:1: error: 'o' does not name a type
1 | o[1<<20],n,r;
| ^
a.cc:2:5: error: expected constructor, destructor, or type conversion before '(' token
2 | main(i){
| ^
|
s753870203 | p00780 | C++ | include <iostream>
#define MAX 1000000
using namespace std;
bool prime[MAX];
void isPrime(void){
fill(prime, prime + MAX, true);
prime[0] = prime[1] = false;
for(int i = 0 ; i*i < MAX ; i++){
if(prime[i]){
for(int j = i*i ; j < MAX ; j += i){
prime[j] = false;
}
}
}
}
int main(void){
... | a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
a.cc: In function 'void isPrime()':
a.cc:10:3: error: 'fill' was not declared in this scope
10 | fill(prime, prime + MAX, true);
| ^~~~
a.cc: In function 'int main()':
a.cc:26:9: error: 'cin' was not declared in this... |
s660395661 | p00781 | Java | import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
//Lattice Practices
public class Main{
String[] s;
String[] rev;
char[][] m;
boolean[] u;
Set<String> set;
int c = 0;
char[][] rotate(char[][] t){
char[][] r = new char[5][5];
for(int i=0;i<5;i++)for(int j=0;j<5;j++)r[i][j] = t[4-j]... | Main.java:117: error: cannot find symbol
new M().run();
^
symbol: class M
location: class Main
1 error
|
s906837426 | p00781 | C++ | #include <vector>
#include <list>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
#include <utility>
#include <functional>
#include <sstream>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstr... | a.cc: In function 'int main()':
a.cc:102:31: error: cannot bind non-const lvalue reference of type 'vi&' {aka 'std::vector<int>&'} to an rvalue of type 'vi' {aka 'std::vector<int>'}
102 | int ans=dfs(0,vi(10,0),vi(5),vi(5));
| ^~~~~~~~
a.cc:41:19: note: initializi... |
s345022298 | p00781 | C++ | #include <vector>
#include <list>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
#include <utility>
#include <functional>
#include <sstream>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstr... | a.cc: In function 'int main()':
a.cc:102:31: error: cannot bind non-const lvalue reference of type 'vi&' {aka 'std::vector<int>&'} to an rvalue of type 'vi' {aka 'std::vector<int>'}
102 | int ans=dfs(0,vi(10,0),vi(5),vi(5));
| ^~~~~~~~
a.cc:41:19: note: initializi... |
s579385227 | p00782 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<ll, ll> P;
#define EACH(i,a) for (auto& i : a)
#define FOR(i,a,b) for (ll i=(a);i<(b);i++)
#define RFOR(i,a,b) for (ll i=(b)-1;i>=(a);i--)
#define REP(i,n) for (ll i=0;i<(n);i++)
#... | a.cc: In function 'int main()':
a.cc:63:56: error: no matching function for call to 'std::vector<std::vector<short int> >::vector(const int&, std::vector<char>)'
63 | vector< vector<short> > m(H, vector<char>(W, 0));
| ^
In file included from /usr/... |
s302944591 | p00783 | C++ | if(itr_tmp != mp.end()){
cout << " ";
}
}
}
cout << "\n";
/*
REPI(itr, s){
cout << *itr;
}
cout << endl;
*/
}
return 0;
}
| a.cc:1:9: error: expected unqualified-id before 'if'
1 | if(itr_tmp != mp.end()){
| ^~
a.cc:4:7: error: expected declaration before '}' token
4 | }
| ^
a.cc:6:5: error: expected declaration before '}' token
6 | }
| ^
a.cc:7:5: error: 'cout' does not name... |
s457178286 | p00783 | C++ | if(itr_tmp != mp.end()){
cout << " ";
}
}
}
cout << "\n";
/*
REPI(itr, s){
cout << *itr;
}
cout << endl;
*/
}
return 0;
}
| a.cc:1:9: error: expected unqualified-id before 'if'
1 | if(itr_tmp != mp.end()){
| ^~
a.cc:4:7: error: expected declaration before '}' token
4 | }
| ^
a.cc:6:5: error: expected declaration before '}' token
6 | }
| ^
a.cc:7:5: error: 'cout' does not name... |
s329867618 | p00783 | C++ | #include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<cmath>
#include<cstring>
#include<queue>
#include<cstdio>
#include<sstream>
#include<iomanip>
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loop(i,0,a)
#define pb push_back
#defi... | a.cc: In function 'int main()':
a.cc:37:32: error: expected unqualified-id before 'not' token
37 | set<string>out,not;
| ^~~
a.cc:44:36: error: expected primary-expression before '.' token
44 | not.insert(t.substr(i+1,j-2));
... |
s933106075 | p00783 | C++ | import java.util.Scanner;
public class Main{
Main(){
Scanner sc = new Scanner(System.in);
int c = 0;
while(sc.hasNext()){
String str = (sc.nextLine()).replace(',',' ');
str = str.replace('.',' ').replace('"', ' ').replace('\'', ' ');
str = str.replace(':', ' ');
String[] st = str.split(" ")... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.Scanner;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
3 | public class Main{
| ^~~~~~
|
s822565582 | p00783 | C++ | import java.util.Scanner;
public class p1203{
p1203(){
Scanner sc = new Scanner(System.in);
int c = 0;
while(sc.hasNext()){
String str = (sc.nextLine()).replace(',',' ');
str = str.replace('.',' ').replace('"', ' ').replace('\'', ' ');
str = str.replace(':', ' ');
String[] st = str.split(" ... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.Scanner;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
3 | public class p1203{
| ^~~~~~
|
s662064053 | p00783 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <set>
using namespace std;
bool used[2000];
bool check(string s){
for(int i = 0; i < s.size()/2; i++){
if(s[i]==s[s.size()-1-i])
continue;
else
return false;
}
return true;
}
int ... | a.cc: In function 'int main()':
a.cc:25:9: error: 'memset' was not declared in this scope
25 | memset(used,0,sizeof(used));
| ^~~~~~
a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
5 | #include <set>
+++ |+#include <cstrin... |
s325286245 | p00784 | C++ | #include <iostream>
#include <algorithm>
#include <numeric>
#include <vector>
#include <string>
#include <memory.h>
#include <queue>
#include <cstdio>
#include <cstdlib>
#include <set>
#include <map>
#include <cctype>
#include <iomanip>
#include <sstream>
#include <cctype>
#include <fstream>
#include <cmath>
using name... | a.cc:78:1: error: expected unqualified-id before ']' token
78 | ]
| ^
|
s421291577 | p00786 | C++ | #include<iostream>
#include<vector>
#include<string>
using namespace std;
#define REP(i,b,n) for(int i=b;i<n;i++)
#define rep(i,n) REP(i,0,n)
#define pb push_back
class Tree{
public:
Tree *l,*r;
Tree *rsib,*lsib;
char c;
int x,y;
bool isright;
bool vis;
Tree():l(NULL),r(NULL),rsib(NULL),lsib(NU... | a.cc: In function 'void find_rl_sib()':
a.cc:46:10: error: reference to 'data' is ambiguous
46 | if(data[i][j] != NULL){
| ^~~~
In file included from /usr/include/c++/14/string:53,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/... |
s140965138 | p00787 | C++ | #include <iostream>
int main()
{
cout<<"NO"<<endl;
for(long long int i=0; i<1000*1000*1000; i++){
//
}
return 0;
} | a.cc: In function 'int main()':
a.cc:5:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
5 | cout<<"NO"<<endl;
| ^~~~
| std::cout
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< ... |
s690928780 | p00788 | C++ | #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <string>
#include <vector>
#include <deque>
#include <list>
#include <algorithm>
#include <numeric>
#include <functional>
#include <cmath>
#include <cstring>
#include <cctype>
#include <sstream>
#include <set>
#include <map>
#include <stack>
#include <qu... | a.cc: In function 'int main()':
a.cc:52:31: error: invalid operands of types 'double' and 'int' to binary 'operator|'
52 | while(cin >> p >> n, p|n) {
| ~^~
| | |
| | int
| ... |
s721563842 | p00788 | C++ | #include<iostream>
#include<cmath>
#include<vector>
using namespace std;
int L;
vector<pair<int, int> > R;
double sp;
void sternBrocot(int x=0, int y=1, int z=1, int w=0){
if ( w > 0 && y > 0&& !(1.0*x/y < sp && sp < 1.0*z/w) ) return;
int num = x+z;
int den = y+w;
if ( num > L || den > L) return;
... | a.cc:22:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
22 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:27:9: error: 'f' was not declared in this scope
27 | f = false;
| ^
|
s425848234 | p00788 | C++ | #include <iostream>
#include <cmath>
using namespace std;
#define EPS (1e-6)
int p, n;
double sp;
int main(){
while(cin >> p >> n, p || n){
sp = sqrt(p);
double maxVal = 0;
double minVal = 999999999;
int x = -1, y = -1, u = -1, v = -1;
// j / i = sp
for(int i = 1; i <= n; i++){
int ... | a.cc: In function 'int main()':
a.cc:43:13: error: '__gcd' was not declared in this scope
43 | int g = __gcd(x, y);
| ^~~~~
|
s901475018 | p00788 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<sstream>
#include<cmath>
using namespace std;
#define REP(i, j) for(double i = 0; i < j; i++)
#define FOR(i, j, k) for(double i = j; i < k; i++)
#define P pair<int, int>
#define PP pair<double, P>
int p, n;
vector<PP> v();
int gcd(int... | a.cc: In function 'int main()':
a.cc:31:7: error: assignment of function 'std::vector<std::pair<double, std::pair<int, int> > > v()'
31 | v = vector<PP>();
| ~~^~~~~~~~~~~~~~
a.cc:34:11: error: request for member 'push_back' in 'v', which is of non-class type 'std::vector<std::pair<double, std::pair<in... |
s232778600 | p00789 | Java | #include<stdio.h>
#define rep(i,n,m) for((i)=(int)(n);(i)<=(int)(m);(i)++)
int memo[301];
int main(void){
int i,j,n,coin[18];
rep(i,0,16)coin[i]=(i+1)*(i+1);
memo[0]=1;
rep(i,0,16)rep(j,1,300)
if(j>=coin[i])memo[j]+=memo[j-coin[i]];
while(scanf("%d",&n),n)
printf("%d\n",memo[n]);
return 0;... | Main.java:1: error: illegal character: '#'
#include<stdio.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include<stdio.h>
^
Main.java:2: error: illegal character: '#'
#define rep(i,n,m) for((i)=(int)(n);(i)<=(int)(m);(i)++)
^
Main.java:2: error: class, interface, enum, or record expected
#... |
s621095255 | p00789 | C++ | #include <iostream>
#include <cstdio>
using namespace std;
const int N = 18;
const int MAX_N = 301;
int value[N];
int dp[N][MAX_N];
void make_Table() {
for(int i = 1 ; i < N ; i++) {
value[i] = i * i;
}
}
void solve() {
memset(dp, 0, sizeof(dp));
dp[0][0] = 1;
for(int i = 1 ; i < N ; i++) {
for... | a.cc: In function 'void solve()':
a.cc:18:3: error: 'memset' was not declared in this scope
18 | memset(dp, 0, sizeof(dp));
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <cstdio>
+++ |+#include <cstring>
3 ... |
s556882504 | p00789 | C++ | #include <iostream>
#include <cstdio>
using namespace std;
const int N = 18;
const int MAX_N = 301;
int value[N];
int dp[N][MAX_N];
void make_Table() {
for(int i = 1 ; i < N ; i++) {
value[i] = i * i;
}
}
void solve() {
memset(dp, 0, sizeof(dp));
dp[0][0] = 1;
for(int i = 1 ; i < N ; i++) {
for... | a.cc: In function 'void solve()':
a.cc:18:3: error: 'memset' was not declared in this scope
18 | memset(dp, 0, sizeof(dp));
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <cstdio>
+++ |+#include <cstring>
3 ... |
s252122027 | p00790 | Java | import java.util.Scanner;
class Main {
private int[] dice = new int[6];
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
Dice dice = new Dice();
int n;
String dir;
dice.left();
dice.left();
while (true) {
... | Main.java:36: error: invalid method declaration; return type required
Dice() {
^
Main.java:40: error: invalid method declaration; return type required
Dice(int[] val) {
^
2 errors
|
s397762371 | p00790 | Java | import java.util.Scanner;
class Main {
private int[] dice = new int[6];
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
Dice dice = new Dice();
int n;
String dir;
while (true) {
for (int i = 0; i < 6; i++) {
di... | Main.java:36: error: invalid method declaration; return type required
Dice() {
^
Main.java:40: error: invalid method declaration; return type required
Dice(int[] val) {
^
2 errors
|
s724625427 | p00790 | Java | import java.util.Scanner;
class Main {
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
Dice dice = new Dice();
int n;
String dir;
while (true) {
for (int i = 0; i < 6; i++) {
dice.setDice(i, i + 1);
}
... | Main.java:35: error: class Dice is public, should be declared in a file named Dice.java
public class Dice {
^
1 error
|
s861766553 | p00791 | C++ | #include <bits/stdc++.h>
using namespace std;
#define MAX 1000
#define INF 1e9
typedef pair<int,int> pii;
int H,W[MAX];
string s[MAX];
bool visited[MAX][80];
vector<pii> vec[10000];
const int dx[8] = {-1,0,0,1,-1,-1,1,1};
const int dy[8] = {0,-1,1,0,-1,1,-1,1};
bool inField(int x,int y){
if(0 > y || y >= H)... | a.cc: In function 'int getArea(std::vector<std::pair<int, int> >&)':
a.cc:6:13: error: narrowing conversion of '1.0e+9' from 'double' to 'int' [-Wnarrowing]
6 | #define INF 1e9
| ^~~
a.cc:40:18: note: in expansion of macro 'INF'
40 | int px[4] = {INF,0,INF,0};
| ^~~
a... |
s714590017 | p00791 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
#include <cstring>
using namespace std;
int xdir[8] = {1, 1, 0, -1, -1, -1, 0, 1};
int ydir[8] = {0, 1, 1, 1, 0, -1, -1, -1};
struct Pa{
int area;
int num;
};
bool comp(const Pa& p1, const Pa& p2)
{
return p1.area < p2.area;
}
int p;
void func(char a... | a.cc: In function 'int main()':
a.cc:49:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
49 | gets(a[0]);
| ^~~~
| getw
|
s073479081 | p00793 | C++ | #include<iostream>
#include<complex>
#include"geom.hpp"
using namespace geom;
using namespace std;
int main(){
for(int t=1;;t++){
P p[3];
bool f=false;
for(int i=0;i<3;i++){
int x,y;
cin>>x>>y;
if(x==0)return 0;
p[i]=P(x,y);
}
Polygon pg{P(0,0),P(0,10000),P(10000,10000),P... | a.cc:3:9: fatal error: geom.hpp: No such file or directory
3 | #include"geom.hpp"
| ^~~~~~~~~~
compilation terminated.
|
s618780120 | p00793 | C++ | #include <iostream>
#include <complex>
#include <vector>
using namespace std;
const double EPS = 1e-7;
typedef complex<double> P;
typedef vector<P> G;
double cross(P a, P b) { return imag(conj(a)*b); }
// 多角形gの面積を求める
double polygonArea(G g){
double res = 0.0;
for(int i=0;i<g.size();i++)
res += cross(g[i],g[(i+1... | a.cc: In function 'int main()':
a.cc:53:27: error: 't' was not declared in this scope
53 | printf("%d %.10lf\n", t, polygonArea(g));
| ^
|
s491553990 | p00793 | C++ | #include <iostream>
#include <algorithm>
#include <complex>
#include <vector>
#include <cstdio>
using namespace std;
typedef complex<double> Point;
typedef vector<Point> Polygon;
struct Segment{
Point p1, p2;
};
typedef Segment Line;
const double EPS = 1e-10;
bool equals(double a, double b){
return abs(a-b) <... | a.cc: In function 'Point getCrossPoint(Segment, Segment)':
a.cc:92:3: error: 'assert' was not declared in this scope
92 | assert(isIntersect(s1, s2));
| ^~~~~~
a.cc:6:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>'
5 | #include <cstdio>
+++ ... |
s231568615 | p00794 | C++ |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#include <iostream>
#include <queue>
#define INF (1e9)
#define N 8
using namespace std;
void bfs();
int w,h,d[N][N],data[N][N],sy,sx,gy,gx,ans;
int dy[4]={-1,0,1,0};
int... | a.cc:2:1: error: expected unqualified-id before numeric constant
2 | 1
| ^
In file included from /usr/include/c++/14/iosfwd:42,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a... |
s156738068 | p00795 | C++ | #include <cstdlib>
#include <iostream>
#include <vector>
using namespace std;
#define REP(i, a, b) for(int i = (a); i < int(b); ++i)
#define rep(i, n) REP(i, 0, n)
#define ALL(x) begin(x), end(x)
int main() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
constexpr int NUM = 128;
constexpr int WIDTH = 72;
bool... | a.cc: In function 'int main()':
a.cc:48:52: error: 'min_element' was not declared in this scope
48 | const int start = *min_element(ALL(last));
| ^~~~~~~~~~~
a.cc:67:51: error: no matching function for call to 'min(<brace-enclos... |
s599185747 | p00795 | C++ | #include<iostream>
#include<string>
#include<vector>
using namespace std;
#define rep(i, n) for ( int i = 0; i < (int)n; i++)
bool T[255];
int P[255];
vector<string> compute(string text, string key){
vector<string> ans;
int k = key.size();
rep(i, 255) P[i] = -1;
int l = text.size();
int r = -1;
... | a.cc: In function 'std::vector<std::__cxx11::basic_string<char> > compute(std::string, std::string)':
a.cc:34:37: error: 'ch' was not declared in this scope
34 | if ( P[text[i]] < i ) P[ch] = i;
| ^~
a.cc: At global scope:
a.cc:63:1: warning: ISO C++ forbids decl... |
s082238550 | p00795 | C++ | #include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;
int main()
{... | a.cc: In function 'int main()':
a.cc:76:20: error: no matching function for call to 'getline(std::istream&, std::string)'
76 | if(!getline(cin, string()))
| ~~~~~~~^~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bits/locale_clas... |
s704179644 | p00795 | C++ | 7
a
1
firstexampleistriv
7
nWWW.Alb
0
1
Wagner,Bach,Beethoven,Chopin,Brahms,Hindemith,Ives,Suk,Mozart,Stravinsky
1
CIIcharacterssuchas+,*,[,#,<,},_arenotexcludedinagivenstringasthisexampl
eillustratesbyitself.Youshouldnotforgetthem.Onemorefactyoushouldnoticeis
thatuppercaselettersandlowercaselettersaredisting... | a.cc:21:26: error: stray '#' in program
21 | CIIcharacterssuchas+,*,[,#,<,},_arenotexcludedinagivenstringasthisexampl
| ^
a.cc:24:1: warning: missing terminating ' character
24 | 'tidentify"g"and"G",forexmaple.However,weareafraidthatthisexamplegivesyo
| ^
a.cc:24:1: error: mis... |
s626290189 | p00795 | C++ | #include<iostream>
#include<string>
using namespace std;
int main()
{
string text,key,temp;
for(;;)
{
text=key="";
while(getline(cin,text)&&text.empty())
;
if(cin.eof())return 0;
while(getline(cin,temp)&&!temp.empty())
text+=temp;
if(cin.eof())return 0;
while(getline(cin,key)&&key.empty())
;
i... | a.cc: In function 'int main()':
a.cc:27:37: error: use of an operand of type 'bool' in 'operator++' is forbidden in C++17
27 | if(!f[key[i]]++)
| ~~~~~~~~^
a.cc:73:50: error: expression cannot be used as a function
73 | if(i... |
s091460776 | p00795 | C++ | #include<iostream>
#include<string>
#include<vector>
using namespace std;
bool check(int begin, int end, vector<vector<int> > &ind){
for(int i = 0; i < (int)ind.size(); ++i){
vector<int>::iterator it_b = lower_bound(ind[i].begin(),ind[i].end(),begin);
vector<int>::iterator it_e = lower_bound(ind[i].begin(),i... | a.cc: In function 'int main()':
a.cc:53:5: error: 'sort' was not declared in this scope; did you mean 'short'?
53 | sort(key.begin(),key.end());
| ^~~~
| short
|
s987646980 | p00795 | C++ | //47
#include<iostream>
#include<sstream>
#include<string>
#include<map>
#include<algorithm>
#include<set>
using namespace std;
int main(){
for(string si;getline(cin,si),si!="";){
string s;
do{
s+=si;
getline(cin,si);
}while(si!="");
string k;
getline(cin,k);
cin.ignore();
ma... | a.cc: In function 'int main()':
a.cc:26:12: error: request for member 'find' in 'f', which is of non-class type 'int'
26 | if(f.find(s[i])){
| ^~~~
|
s540993492 | p00795 | C++ | #include<set>
#include<iostream>
#include<cmath>
#include<cstdio>
#define REP(i,s,n) for(int i=s;i<n;i++)
#define rep(i,n) REP(i,0,n)
#define inf (1<<29)
using namespace std;
void compute(string text,string S)
{
int nt = text.size(),nS = S.size();
int mlen = inf;
string ans;
bool found[nS];
int CNT = 0;... | a.cc: In function 'void compute(std::string, std::string)':
a.cc:56:6: error: 'all' was not declared in this scope
56 | if(all.empty())return;
| ^~~
|
s003452560 | p00797 | C++ | #include <iostream>
#include <sstream>
#include <vector>
#include <map>
using namespace std;
struct S {
string name;
int parent;
vector<int> child;
S(string s, int p, vector<int> c) : name(s), parent(p), child(c){}
};
vector<S> G;
int main()
{
int N, M;
while (cin>>N>>M, N||M) {
cin.ignore();
map<str... | a.cc: In function 'int main()':
a.cc:52:86: error: expected ')' before ';' token
52 | G.push_back(S(n, list[parent], vector<int>());
| ~ ^
| ... |
s698960885 | p00797 | C++ | equire 'set'
class Graph
def initialize
@nodes = Set.new
@edges = Set.new
end
def add_node(label = nil)
Node.new(label)
end
def add_edge(u, v)
e = Edge.new(u, v)
u.outgoings << e
v.incomings << e
e
end
def del_edge(e)
u, v = e.from, e.to
u.outgoings.delete(e)
v.incomings.delete(e)
e
e... | a.cc:1:8: warning: multi-character character constant [-Wmultichar]
1 | equire 'set'
| ^~~~~
a.cc:5:17: error: stray '@' in program
5 | @nodes = Set.new
| ^
a.cc:6:17: error: stray '@' in program
6 | @edges = Set.new
| ... |
s419680342 | p00797 | C++ | 6 5
John
Robert
Frank
Andrew
Nancy
David
Robert is a child of John.
Robert is an ancestor of Andrew.
Robert is a sibling of Nancy.
Nancy is the parent of Frank.
John is a descendant of Andrew.
2 1
abc
xyz
xyz is a child of abc.
0 0 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 6 5
| ^
|
s595986808 | p00797 | C++ | 6 5
John
Robert
Frank
Andrew
Nancy
David
Robert is a child of John.
Robert is an ancestor of Andrew.
Robert is a sibling of Nancy.
Nancy is the parent of Frank.
John is a descendant of Andrew.
2 1
abc
xyz
xyz is a child of abc.
0 0 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 6 5
| ^
|
s968892101 | p00797 | C++ | #include <vector>
#include <list>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
#include <utility>
#include <functional>
#include <sstream>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstr... | a.cc: In function 'int main()':
a.cc:153:30: error: cannot bind non-const lvalue reference of type 'person&' to an rvalue of type 'person'
153 | person &root=person(name);
| ^~~~~~~~~~~~
|
s113799325 | p00798 | C++ | #include <iostream>
#include <queue>
using namespace std;
class Status{
public:
int wx, wy, cx, cy;
int cost;
};
int w, h;
int tx, ty;
int gx, gy;
char data[7][7];
bool vis[7][7];
int dx[]={0, 1, 0, -1};
int dy[]={-1, 0, 1, 0};
int rdx[]={0, -1, 0, 1};
int rdy[]={1, 0, -1, 0};
int bfs(Status);
bool dfs(int, int)... | a.cc:23:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
23 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:31:16: error: reference to 'data' is ambiguous
31 | cin >> data[i][j];
| ^~~~
In file included from /usr/include/c++/14/string:53,
... |
s096242548 | p00798 | C++ | #include<stdio.h>
#include<stdlib.h>
#include<queue>
#include<functional>
struct S{int x1,y1,x2,y2,c;}s,t;
struct C:std::binary_function<S,S,int>{int operator()(S a,S b){return a.c>b.c;}};
int main()
{
int h,w,m[9][9],d[8][8][8][8],i,j,V=63,a[]={0,1,0,-1,0};
while(scanf("%d%d",&w,&h),w)
{
for(i=0;i<h+2;++i)m[i][0]... | a.cc:6:15: warning: 'template<class _Arg1, class _Arg2, class _Result> struct std::binary_function' is deprecated [-Wdeprecated-declarations]
6 | struct C:std::binary_function<S,S,int>{int operator()(S a,S b){return a.c>b.c;}};
| ^~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/ref... |
s323152882 | p00801 | C++ |
#include<iostream>
#include<vector>
#include<tuple>
#include<algorithm>
using namespace std;
class Numoeba {
public:
Numoeba(const int n) :max_cell_(1), root_(0) {create_cell(n);}
tuple<int, int> die() {
for(int step = 1; step <= 500; ++step) {
max_cell_ = max(max_cell_, (int) dead_.size()... | a.cc: In member function 'std::tuple<int, int> Numoeba::die()':
a.cc:13:28: error: no matching function for call to 'max(int&, std::__iterator_traits<std::_Bit_iterator, void>::difference_type)'
13 | max_cell_ = max(max_cell_, (int) dead_.size() - count(dead_.begin(), dead_.end(), true));
| ... |
s398283586 | p00802 | Java | #include<iostream>
#include<vector>
#include<cmath>
#include<algorithm>
#include<cassert>
#include<iomanip>
#define REP(i,s,n) for(int i=s;i<n;i++)
#define rep(i,n) REP(i,0,n)
#define inf (1<<28)
#define PI 3.14159265358979
#define MAX 45
#define EPS (1e-10)
#define equals(a,b) (fabs((a)-(b)) < EPS)
using namespace std... | Main.java:1: error: illegal character: '#'
#include<iostream>
^
Main.java:2: error: illegal character: '#'
#include<vector>
^
Main.java:3: error: illegal character: '#'
#include<cmath>
^
Main.java:4: error: illegal character: '#'
#include<algorithm>
^
Main.java:5: error: illegal character: '#'
#include<cassert>
^
Main.... |
s131674220 | p00802 | C++ | //Submitテ」ツδ?」ツつケテ」ツδ?
//ncastarテヲツーツ湘」ツ?ォテ」ツつ?」ツつ古」ツ?ィティツィツ?」ツつ湘」ツつ古」ツ?ヲテ」ツ?づ「ツ??
テ」ツ??」ツ??」ツ??」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?? | a.cc:3:1: error: extended character 」 is not valid in an identifier
3 | テ」ツ??」ツ??」ツ??」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ??
| ^
a.cc:3:9: error: extended character 」 is not valid in an identifier
3 | テ」ツ??」ツ??」ツ??」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ??
| ^
a.cc:3:15: error: extended character 」 i... |
s092826745 | p00802 | C++ | //Submitテ」ツδ?」ツつケテ」ツδ?
//ncastarテヲツーツ湘」ツ?ォテ」ツつ?」ツつ古」ツ?ィティツィツ?」ツつ湘」ツつ古」ツ?ヲテ」ツ?づ「ツ??
テ」ツ??」ツ??」ツ??」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?? | a.cc:3:1: error: extended character 」 is not valid in an identifier
3 | テ」ツ??」ツ??」ツ??」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ??
| ^
a.cc:3:9: error: extended character 」 is not valid in an identifier
3 | テ」ツ??」ツ??」ツ??」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ??
| ^
a.cc:3:15: error: extended character 」 i... |
s802390824 | p00802 | C++ | //Submitテ」ツδ?」ツつケテ」ツδ?
//ncastarテヲツーツ湘」ツ?ォテ」ツつ?」ツつ古」ツ?ィティツィツ?」ツつ湘」ツつ古」ツ?ヲテ」ツ?づ「ツ??
テ」ツ??」ツ??」ツ??」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?? | a.cc:3:1: error: extended character 」 is not valid in an identifier
3 | テ」ツ??」ツ??」ツ??」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ??
| ^
a.cc:3:9: error: extended character 」 is not valid in an identifier
3 | テ」ツ??」ツ??」ツ??」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ??
| ^
a.cc:3:15: error: extended character 」 i... |
s423787388 | p00802 | C++ | //Submitテ」ツδ?」ツつケテ」ツδ?
//ncastarテヲツーツ湘」ツ?ォテ」ツつ?」ツつ古」ツ?ィティツィツ?」ツつ湘」ツつ古」ツ?ヲテ」ツ?づ「ツ??
テ」ツ??」ツ??」ツ??」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?? | a.cc:3:1: error: extended character 」 is not valid in an identifier
3 | テ」ツ??」ツ??」ツ??」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ??
| ^
a.cc:3:9: error: extended character 」 is not valid in an identifier
3 | テ」ツ??」ツ??」ツ??」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ??
| ^
a.cc:3:15: error: extended character 」 i... |
s691297940 | p00802 | C++ | //Submitテ」ツδ?」ツつケテ」ツδ?
//ncastarテヲツーツ湘」ツ?ォテ」ツつ?」ツつ古」ツ?ィティツィツ?」ツつ湘」ツつ古」ツ?ヲテ」ツ?づ「ツ??
テ」ツ??」ツ??」ツ??」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?? | a.cc:3:1: error: extended character 」 is not valid in an identifier
3 | テ」ツ??」ツ??」ツ??」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ??
| ^
a.cc:3:9: error: extended character 」 is not valid in an identifier
3 | テ」ツ??」ツ??」ツ??」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ??
| ^
a.cc:3:15: error: extended character 」 i... |
s639927561 | p00802 | C++ | //Submitテ」ツδ?」ツつケテ」ツδ?
//ncastarテヲツーツ湘」ツ?ォテ」ツつ?」ツつ古」ツ?ィティツィツ?」ツつ湘」ツつ古」ツ?ヲテ」ツ?づ「ツ??
テ」ツ??」ツ??」ツ??」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?? | a.cc:3:1: error: extended character 」 is not valid in an identifier
3 | テ」ツ??」ツ??」ツ??」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ??
| ^
a.cc:3:9: error: extended character 」 is not valid in an identifier
3 | テ」ツ??」ツ??」ツ??」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ??
| ^
a.cc:3:15: error: extended character 」 i... |
s263327877 | p00802 | C++ | //Submitテ」ツδ?」ツつケテ」ツδ?
//ncastarテヲツーツ湘」ツ?ォテ」ツつ?」ツつ古」ツ?ィティツィツ?」ツつ湘」ツつ古」ツ?ヲテ」ツ?づ「ツ??
テ」ツ??」ツ??」ツ??」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?? | a.cc:3:1: error: extended character 」 is not valid in an identifier
3 | テ」ツ??」ツ??」ツ??」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ??
| ^
a.cc:3:9: error: extended character 」 is not valid in an identifier
3 | テ」ツ??」ツ??」ツ??」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ??
| ^
a.cc:3:15: error: extended character 」 i... |
s289742583 | p00802 | C++ | //Submitテ」ツδ?」ツつケテ」ツδ?
//ncastarテヲツーツ湘」ツ?ォテ」ツつ?」ツつ古」ツ?ィティツィツ?」ツつ湘」ツつ古」ツ?ヲテ」ツ?づ「ツ??
テ」ツ??」ツ??」ツ??」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?? | a.cc:3:1: error: extended character 」 is not valid in an identifier
3 | テ」ツ??」ツ??」ツ??」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ??
| ^
a.cc:3:9: error: extended character 」 is not valid in an identifier
3 | テ」ツ??」ツ??」ツ??」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ?暗」ツ??
| ^
a.cc:3:15: error: extended character 」 i... |
s656354447 | p00802 | C++ | #include <stdio.h>
#include <cmath>
#include <algorithm>
#include <cfloat>
#include <stack>
#include <queue>
#include <vector>
#include <string>
#include <iostream>
#include <set>
#include <map>
#include <time.h>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define MOD 100000... | a.cc: In function 'void func()':
a.cc:56:33: error: 'memo' was not declared in this scope
56 | memo[a][b][c] = 0.0;
| ^~~~
|
s144218264 | p00803 | Java | import java.util.Scanner;
public class AOJ1224 {
void run(){
int[] f1 = new int[54];
for(int i=0;i<54;i++)f1[i]=i*i*i;
int[] f2 = new int[96];
for(int i=0;i<96;i++)f2[i]=i*(i+1)*(i+2)/6;
Scanner sc = new Scanner(System.in);
for(;;){
int n = sc.nextInt();
if(n==0)break;
int max = 0;
for(int i=0;... | Main.java:2: error: class AOJ1224 is public, should be declared in a file named AOJ1224.java
public class AOJ1224 {
^
1 error
|
s014616570 | p00803 | Java | public class AOJ1224{
void run(String num){
Integer[] f1=new Integer[54];
for(int i=0;i<54;i++) f1[i] = i*i*i;
Integer[] f2=new Integer[96];
for(int i=0;i<54;i++) f2[i] = i*(i+1)*(i+2)/6;
for(Integer i=0;i<54;i++){
for(Intgeter j=0;j<96;j++){
if(f1[i]+f2[j]<=num) max=Math.max(max,f1[i]+f2[j]);
}
... | Main.java:1: error: class AOJ1224 is public, should be declared in a file named AOJ1224.java
public class AOJ1224{
^
Main.java:8: error: cannot find symbol
for(Intgeter j=0;j<96;j++){
^
symbol: class Intgeter
location: class AOJ1224
Main.java:9: error: bad operand types for binary operator '<='
... |
s225057259 | p00803 | Java | public class AOJ1224{
void run(String num){
int max=0;
Integer[] f1=new Integer[54];
for(int i=0;i<54;i++) f1[i] = i*i*i;
Integer[] f2=new Integer[96];
for(int i=0;i<54;i++) f2[i] = i*(i+1)*(i+2)/6;
for(Integer i=0;i<54;i++){
for(Intgeter j=0;j<96;j++){
if(f1[i]+f2[j]<=num) max=Math.max(max,f1[i]+f2... | Main.java:1: error: class AOJ1224 is public, should be declared in a file named AOJ1224.java
public class AOJ1224{
^
Main.java:9: error: cannot find symbol
for(Intgeter j=0;j<96;j++){
^
symbol: class Intgeter
location: class AOJ1224
Main.java:10: error: bad operand types for binary operator '<='
... |
s288881478 | p00803 | Java | public class AOJ1224{
void run(String num){
int max=0;
Integer[] f1=new Integer[54];
for(int i=0;i<54;i++) f1[i] = i*i*i;
Integer[] f2=new Integer[96];
for(int i=0;i<54;i++) f2[i] = i*(i+1)*(i+2)/6;
for(Integer i=0;i<54;i++){
for(Intgeter j=0;j<96;j++){
if(f1[i]+f2[j]<=num) max=Math.max(max,f1[i]+f2... | Main.java:1: error: class AOJ1224 is public, should be declared in a file named AOJ1224.java
public class AOJ1224{
^
Main.java:9: error: cannot find symbol
for(Intgeter j=0;j<96;j++){
^
symbol: class Intgeter
location: class AOJ1224
Main.java:10: error: bad operand types for binary operator '<='
... |
s678600250 | p00803 | Java | public class AOJ1224{
void run(String num){
int max=0;
Integer[] f1=new Integer[54];
for(int i=0;i<54;i++) f1[i] = i*i*i;
Integer[] f2=new Integer[96];
for(int i=0;i<54;i++) f2[i] = i*(i+1)*(i+2)/6;
for(Integer i=0;i<54;i++){
for(Integer j=0;j<96;j++){
if(f1[i]+f2[j]<=num) max=Math.max(max,f1[i]+f2[... | Main.java:1: error: class AOJ1224 is public, should be declared in a file named AOJ1224.java
public class AOJ1224{
^
Main.java:10: error: bad operand types for binary operator '<='
if(f1[i]+f2[j]<=num) max=Math.max(max,f1[i]+f2[j]);
^
first type: int
second type: String
2 errors
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.