submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s326122236
p00200
C++
#include<iostream> #include<cstring> #include<vector> using namespace std; #define rep(i,n) for(int i=0;i<n;++i) #define INF 300000 struct E { int a,b,c,t; E(){}; E(int a,int b,int c,int t):a(a),b(b),c(c),t(t){}; }; //E cs[700]; unsigned int d[150]; int main() { int n,m,k,p,q,r; while(cin >> n >> ...
a.cc: In function 'int main()': a.cc:28:16: error: invalid use of member function 'std::vector<E>::push_back' (did you forget the '()' ?) 28 | cs.push_back =( E(ta,tb,tc,tt)); | ~~~^~~~~~~~~
s937679448
p00200
C++
#include <iostream> #include <algorithm> using namespace std; const int INF = 1000000; int cost[301][301],time[301][301]; void time_WF(int m){ for(int k = 0;k <= m;++k){ for(int i = 0;i <= m;++i){ for(int j = 0;j <= m;++j){ time[i][j] = min(time[i][j],time[i][k] + time[k][j]); } } } return; } void cost...
a.cc:5:33: error: 'int time [301][301]' redeclared as different kind of entity 5 | int cost[301][301],time[301][301]; | ^ In file included from /usr/include/pthread.h:23, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35, from /u...
s894190535
p00200
C++
#include <iostream> #include <algorithm> using namespace std; const int INF = 1000000; int cost[301][301],time[301][301]; int main(){ int n,m; while(cin >> n >> m,n || m){ int a,b,icost,itime,c,r; for(int i = 0;i <= m;++i){ for(int j = 0;j <= m;++j){ if(i == j) { cost[i][i] = 0; time[i][i] = 0; ...
a.cc:5:33: error: 'int time [301][301]' redeclared as different kind of entity 5 | int cost[301][301],time[301][301]; | ^ In file included from /usr/include/pthread.h:23, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35, from /u...
s508195455
p00200
C++
#include <iostream> #include <algorithm> using namespace std; const int INF = 1000000; int cost[301][301],time[301][301]; int main(){ int n,m; while(cin >> n >> m && (n != 0 || m != 0)){ int a,b,icost,itime,c,r; for(int i = 0;i <= m;++i){ for(int j = 0;j <= m;++j){ if(i == j) { cost[i][i] = 0; ti...
a.cc:5:33: error: 'int time [301][301]' redeclared as different kind of entity 5 | int cost[301][301],time[301][301]; | ^ In file included from /usr/include/pthread.h:23, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35, from /u...
s731175965
p00200
C++
#include <iostream> #include <algorithm> using namespace std; const int INF = 1000000; int cost[301][301],time[301][301]; int main(){ int n,m; while(cin >> n >> m,n || m){ int a,b,icost,itime,c,r; for(int i = 0;i <= m;++i){ for(int j = 0;j <= m;++j){ if(i == j) { cost[i][i] = 0; time[i][i] = 0; ...
a.cc:5:33: error: 'int time [301][301]' redeclared as different kind of entity 5 | int cost[301][301],time[301][301]; | ^ In file included from /usr/include/pthread.h:23, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35, from /u...
s175429160
p00200
C++
#include<iostream> #include<algorithm> #include<queue> using namespace std; int cost[101][101]; int gtime[101][101]; struct tSta{ int val, sta; tSta( int s ){ val = 0; sta = s; } }; bool operator<( const tSta& l, const tSta& r ){ return l.val > r.val; } int main(){ priority_queue<tSta> que; int n, m, k; ...
a.cc: In function 'int main()': a.cc:25:17: error: 'memset' was not declared in this scope 25 | memset( cost, 0, sizeof(cost) ); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include<queue> ...
s820299892
p00200
C++
#include <iostream> #include <cstring> using namespace std; const int INF=100000; int cost[101][101]; int time[101][101]; int main(void){ int n,m,a,b,c; while(1){ for(a=0;a<=100;a++){ for(b=0;b<=100;b++){ cost[a][b]=INF; time[a][b]=INF; if(a==b)cost[a][b]=0,time[a][b]=0; } } cin >> n >> m; ...
a.cc:8:18: error: 'int time [101][101]' redeclared as different kind of entity 8 | int time[101][101]; | ^ In file included from /usr/include/pthread.h:23, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35, from /usr/include/x86_64-linux-gnu/c+...
s897289440
p00200
C++
#include<iostream> #include<string> #include<algorithm> #include<vector> #include<cstring> using namespace std; #define rep(i,n) for(int i=0;i<n;i++) #define REP(n) rep(i,n) const int INF = 1<<28, MAXM = 101, COST = 0, TIME = 1; int cost[2][MAXM][MAXM]; int main() { int n, m, a, b, c, t; while(cin >> n >> m...
a.cc: In function 'int main()': a.cc:37:20: error: 'd' was not declared in this scope 37 | memset(d, INF , sizeof(d)); | ^
s159917246
p00200
C++
#include<stdio.h> int dijkstra(short int,short int,short int,short int,short int**); int main(void) { short int f1, f2, n, m, a, b, ic, ti, k, p, q, r, out, **cost, **time; while(scanf("%d %d",&n,&m) && n > 0) { cost = new int *[m]; time = new int *[n]; //線路設計 for(f1 = 0; f1 < n; f1++) { cost[f1] = ...
a.cc: In function 'int main()': a.cc:12:24: error: cannot convert 'int**' to 'short int**' in assignment 12 | cost = new int *[m]; | ^~~~~~~~~~~~ | | | int** a.cc:13:24: error: cannot convert 'int**' to 'short int*...
s885472399
p00200
C++
#include<stdio.h> int dijkstra(short int,short int,short int,short int,short int**); int main(void) { short int f1, f2, n, m, a, b, ic, ti, k, p, q, r, out, **cost, **time; while(scanf("%d %d",&n,&m) && n > 0) { cost = new int *[m]; time = new int *[n]; //線路設計 for(f1 = 0; f1 < n; f1++) { cost[f1] = ...
a.cc: In function 'int main()': a.cc:12:24: error: cannot convert 'int**' to 'short int**' in assignment 12 | cost = new int *[m]; | ^~~~~~~~~~~~ | | | int** a.cc:13:24: error: cannot convert 'int**' to 'short int*...
s085336671
p00200
C++
#include<stdio.h> short int dijkstra(short int,short int,short int,short int,short int**); int main(void) { short int f1, f2, n, m, a, b, ic, ti, k, p, q, r, out, **cost, **time; while(scanf("%d %d",&n,&m) && n > 0) { cost = new short int *[m]; time = new short int *[n]; //線路設計 for(f1 = 0; f1 < n; f1++) ...
a.cc: In function 'short int dijkstra(short int, short int, short int, short int, short int**)': a.cc:58:13: error: cannot convert 'int*' to 'short int*' in assignment 58 | C = new int [m]; | ^~~~~~~~~~~ | | | int* a.cc:59:15: error: cannot convert 'int*'...
s515862889
p00200
C++
#include<cstdio> #include<algorithm> using namespace std; int main() { while(true) { int timedate[2][105][105]; int n,m; memset(timedate,0,sizeof(timedate)); scanf("%d%d",&n,&m); if(n==0&&m==0)break; int a, b, cost,time; for(int i=0;i<n;i++) { scanf("%d%d%d%d",&a,&b,&cost,&time); timedate[0][a][b]=c...
a.cc: In function 'int main()': a.cc:15:5: error: 'memset' was not declared in this scope 15 | memset(timedate,0,sizeof(timedate)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<algorithm> +++ |+#include <c...
s147567848
p00200
C++
#include <stdio.h> #include <queue> #include <vector> using namespace std; typedef pair<int,int> P;//P.first:最小コスト P.second:頂点番号 //cost[x][i][j]:iからjへの種類xのコスト //xが1なら時間,0なら金額をあらわす int cost[2][301][301]; //smore[x][i][j]:iからjへの最短距離 int smore[2][301][301]; //somerode[x][i]:iから移動できる頂点の番号を保持 queue <int> somerode[2][301]...
a.cc: In function 'int main()': a.cc:39:50: error: 'INT_MAX' was not declared in this scope 39 | smore[0][i][j] = INT_MAX; | ^~~~~~~ a.cc:3:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#...
s567193886
p00200
C++
#include <stdio.h> #include <queue> #include <vector> #include <iostream> using namespace std; typedef pair<int,int> P;//P.first:最小コスト P.second:頂点番号 //cost[x][i][j]:iからjへの種類xのコスト //xが1なら時間,0なら金額をあらわす int cost[2][301][301]; //smore[x][i][j]:iからjへの最短距離 int smore[2][301][301]; //somerode[x][i]:iから移動できる頂点の番号を保持 queue <i...
a.cc: In function 'int main()': a.cc:40:50: error: 'INT_MAX' was not declared in this scope 40 | smore[0][i][j] = INT_MAX; | ^~~~~~~ a.cc:5:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#...
s984536834
p00200
C++
#include<math.h> #include<iostream> #include<string> #include<vector> #include<algorithm> #define REP(i,a,b) for(i=a;i<b;i++) #define rep(i,n) REP(i,0,n) using namespace std; const int INF = (1<<30); int cost[200][200], time[200][200],dist[200]; int x[200][200]; bool vis[200]; int M,N; void dij(int p, int q, int r){ ...
a.cc:11:34: error: 'int time [200][200]' redeclared as different kind of entity 11 | int cost[200][200], time[200][200],dist[200]; | ^ In file included from /usr/include/pthread.h:23, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35, ...
s701219479
p00200
C++
#include<math.h> #include<iostream> #include<string> #include<vector> #include<algorithm> #define REP(i,a,b) for(i=a;i<b;i++) #define rep(i,n) REP(i,0,n) using namespace std; #define INF (1<<30) int cost[200][200], time[200][200],dist[200]; int x[200][200]; bool vis[200]; int M,N; void dij(int p, int q, int r){ int ...
a.cc:11:34: error: 'int time [200][200]' redeclared as different kind of entity 11 | int cost[200][200], time[200][200],dist[200]; | ^ In file included from /usr/include/pthread.h:23, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35, ...
s500660957
p00200
C++
#include<math.h> #include<iostream> #define REP(i,a,b) for(i=a;i<b;i++) #define rep(i,n) REP(i,0,n) #define INF (1<<30) using namespace std; int cost[200][200], time[200][200],dist[200]; int x[200][200]; bool vis[200]; int M,N; void dij(int p, int q, int r){ int i,j,k,l,m,n,mn; rep(i,M)rep(j,M)x[i][j]= ((r==0)?(co...
a.cc:9:34: error: 'int time [200][200]' redeclared as different kind of entity 9 | int cost[200][200], time[200][200],dist[200]; | ^ In file included from /usr/include/pthread.h:23, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35, ...
s844593955
p00200
C++
#include<iostream> #include<algorithm> using namespace std; int time[100][100]; int cost[100][100]; const int INF = 10000; int main(void){ while(1){ //init int rosen,eki,a,b,incost,intime; for(int i=0; i<100; i++){ for(int j=0; j<100; j++) time[i][j] = cost[i][j] = INF; } for(int i=0; i<100; i++) ...
a.cc:5:18: error: 'int time [100][100]' redeclared as different kind of entity 5 | int time[100][100]; | ^ In file included from /usr/include/pthread.h:23, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35, from /usr/include/x86_64-linux-gnu/c+...
s926882419
p00200
C++
#include<iostream> #include<algorithm> using namespace std; const int LEN = 100; const int INF = 10000; int time[LEN][LEN]; int cost[LEN][LEN]; int main(void){ while(1){ //init int rosen,eki,a,b,incost,intime; for(int i=0; i<LEN; i++){ for(int j=0; j<LEN; j++) time[i][j] = cost[i][j] = INF; } for(...
a.cc:7:18: error: 'int time [100][100]' redeclared as different kind of entity 7 | int time[LEN][LEN]; | ^ In file included from /usr/include/pthread.h:23, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35, from /usr/include/x86_64-linux-gnu/c+...
s936933248
p00200
C++
#include<iostream> #include<algorithm> using namespace std; const int LEN = 100; const int INF = 10000; int time[LEN][LEN]; int cost[LEN][LEN]; int main(void){ while(1){ //init int rosen,eki,a,b,incost,intime; for(int i=0; i<LEN; i++){ for(int j=0; j<LEN; j++) time[i][j] = cost[i][j] = INF; } for(...
a.cc:7:18: error: 'int time [100][100]' redeclared as different kind of entity 7 | int time[LEN][LEN]; | ^ In file included from /usr/include/pthread.h:23, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35, from /usr/include/x86_64-linux-gnu/c+...
s731249967
p00200
C++
#include<iostream> #include<algorithm> using namespace std; const int LEN = 100; const int INF = 10000; int time[LEN][LEN]; int cost[LEN][LEN]; int main(void){ while(1){ //init int rosen,eki,a,b,incost,intime; for(int i=0; i<LEN; i++){ for(int j=0; j<LEN; j++) time[i][j] = cost[i][j] = INF; } for(...
a.cc:7:18: error: 'int time [100][100]' redeclared as different kind of entity 7 | int time[LEN][LEN]; | ^ In file included from /usr/include/pthread.h:23, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35, from /usr/include/x86_64-linux-gnu/c+...
s332328955
p00200
C++
#include<iostream> #include<queue> #include<vector> #include<functional> using namespace std; struct Edge{ int to,cost; Edge(){} Edge(int to,int cost):to(to),cost(cost){} }; int dijkstra(const vector< vector<Edge> > vve,int s,int t){ priority_queue<pair<int,int>, vector< pair<int,int> >, greater< pair<int,int> >...
a.cc: In function 'int dijkstra(std::vector<std::vector<Edge> >, int, int)': a.cc:21:38: error: 'INT_MAX' was not declared in this scope 21 | vector<int> dist(vve.size(), INT_MAX); | ^~~~~~~ a.cc:5:1: note: 'INT_MAX' is defined in header '<climits>'; this is probabl...
s312319888
p00200
C++
#include <algorithm> #include <map> #include <vector> #include <iostream> #include <sstream> #include <cstdio> #include <cstring> #include <cctype> #include <cstdlib> #include <cmath> #include <string> #include <queue> #include <stack> #include <set> using namespace std; #define REP(i,n) for(int i=0; i<n; ++i) #define...
a.cc: In function 'int main()': a.cc:66:38: error: no matching function for call to 'std::vector<std::vector<int> >::vector(int, int)' 66 | vector< vector<int> > data(m+1, 0); | ^ In file included from /usr/include/c++/14/vector:66, from a.cc:3: /usr/in...
s543928458
p00200
C++
#include<iostream> #include<queue> #include<algorithm> #include<utility> #include<vector> using namespace std; #define MAX_M 110 struct edge{int to,cost;}; typedef pair<int,int> P; vector<edge> c[2][MAX_M]; int dijkstra(int s,int e,bool r){ int d[MAX_M]; for(int i=0;i<MAX_M;i++){ d[i]=INT_MAX; } priority_queu...
a.cc: In function 'int dijkstra(int, int, bool)': a.cc:18:22: error: 'INT_MAX' was not declared in this scope 18 | d[i]=INT_MAX; | ^~~~~~~ a.cc:5:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 4 | #include<ut...
s678381088
p00200
C++
#include<iostream> #include<queue> #include<algorithm> #include<utility> #include<vector> #include<climits> using namespace std; #define MAX_M 110 struct edge{int to,cost;}; typedef pair<int,int> P; vector<edge> c[2][MAX_M]; int dijkstra(int s,int e,bool r){ int d[MAX_M]; for(int i=0;i<MAX_M;i++){ d[i]=INT_MAX;...
a.cc: In function 'int main()': a.cc:48:41: error: invalid use of non-static member function 'void std::vector<_Tp, _Alloc>::clear() [with _Tp = edge; _Alloc = std::allocator<edge>]' 48 | c[r][i].clear; | ~~~~~~~~^~~~~ In file included from /usr/i...
s943109407
p00200
C++
#include <iostream> #define N 101 #define INF 1e+9 using namespace std; int cost[N][N],time[N][N]; int main(void){ int n,m; while(cin>>n>>m,n||m){ for(int i=0;i<n;++i)for(int j=0;j<n;++j){cost[i][j]=time[i][j]=INF;} for(int i=0,a,b,c,t;i<n;++i){ cin>>a>>b>>c>>t; cost[a][b]=cost[b][a]=c; time[a][b]=ti...
a.cc:8:25: error: 'int time [101][101]' redeclared as different kind of entity 8 | int cost[N][N],time[N][N]; | ^ In file included from /usr/include/pthread.h:23, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35, from /usr/include/x86_6...
s417189218
p00200
C++
#include <iostream> #include <vector> #include <queue> #include <map> using namespace std; typedef pair<int,int> P; const int MAX_V = 101; const int INF = 1000000009; struct edge { int to, cost, time; }; vector<edge> G[MAX_V]; int dist[MAX_V]; int dijkstra(int s, int t, int type) { fill(dist, dist+MAX_V, INF); dis...
a.cc:44:14: error: 'int time' redeclared as different kind of entity 44 | int a, b, c, time; | ^~~~ In file included from /usr/include/pthread.h:23, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35, from /usr/include/x86_64-linux-gnu/c++/14/bits/gt...
s101403528
p00200
C++
#include <iostream> using namespace std; #define INF 1000000 int time[110][110]; int cost[110][110]; int main() { int n,m; while(cin>>n>>m,n){ for(int i=0;i<m;++i){ for(int j=0;j<m;++j){ int a; i==j?a=0:a=INF; time[i][j]=a; cost...
a.cc:4:18: error: 'int time [110][110]' redeclared as different kind of entity 4 | int time[110][110]; | ^ In file included from /usr/include/pthread.h:23, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35, from /usr/include/x86_64-linux-gnu/c+...
s135149283
p00200
C++
#include <iostream> using namespace std; #define INF 1000000 int time[110][110]; int cost[110][110]; int main() { int n,m; while(cin>>n>>m,n){ for(int i=0;i<m;++i){ for(int j=0;j<m;++j){ if(i==j){ time[i][j]=0; cost[i][j]=0; ...
a.cc:4:18: error: 'int time [110][110]' redeclared as different kind of entity 4 | int time[110][110]; | ^ In file included from /usr/include/pthread.h:23, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35, from /usr/include/x86_64-linux-gnu/c+...
s336457588
p00200
C++
#include <iostream> using namespace std; int time[110][110]; int cost[110][110]; int main() { int n,m; while(cin>>n>>m){ if(!n)return 0; for(int i=0;i<m;++i){ for(int j=0;j<m;++j){ if(i==j){ time[i][j]=0; cost[i][j]=0; ...
a.cc:3:18: error: 'int time [110][110]' redeclared as different kind of entity 3 | int time[110][110]; | ^ In file included from /usr/include/pthread.h:23, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35, from /usr/include/x86_64-linux-gnu/c+...
s587469175
p00200
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { int a, b, time, cost, querys; int i, j, k, p, q, r, n, m; int times[100][100], costs[100][100]; while (true) { cin >> n >> m; if (!n && !m) break; for (i = 0; i < m; i++) { for (j = 0; j < m; j++) { time...
a.cc: In function 'int main()': a.cc:42:79: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<' 42 | cout << r ? times[p - 1][q - 1] : costs[p - 1][q - 1] << endl; | ~~~~~~~~~...
s173708770
p00200
C++
#include<iostream> using namespace std; int line[3001][3001],c[3001][3001],t[3001][3001]; int stop[3001]={0}; int ls[3001]={0}; int route_cost(int p,int q){ int top = -1; for(int i=0;i<ls[p];i++){ cout << line[p][i] << endl; if(stop[line[p][i]]!=0) continue; stop[p]++; if(q==line[p][i]){ stop[p] =...
a.cc: In function 'int route_cost(int, int)': a.cc:17:5: error: 'else' without a previous 'if' 17 | else if(top<0||top>h){ | ^~~~ a.cc: In function 'int route_time(int, int)': a.cc:35:1: error: 'h' was not declared in this scope 35 | h = route_time(line[p][i],q)+t[p][line[p][i]]; | ^ a.cc:36:7...
s332709636
p00200
C++
#include<iostream> using namespace std; int line[3001][3001],c[3001][3001],t[3001][3001]; int stop[3001]={0}; int ls[3001]={0}; int route_cost(int p,int q){ int top = -1; for(int i=0;i<ls[p];i++){ //cout << line[p][i] << endl; if(stop[line[p][i]]!=0) continue; stop[p]++; if(q==line[p][i]){ stop[p]...
a.cc: In function 'int route_cost(int, int)': a.cc:17:5: error: 'else' without a previous 'if' 17 | else if(top<0||top>h){ | ^~~~ a.cc: In function 'int route_time(int, int)': a.cc:35:1: error: 'h' was not declared in this scope 35 | h = route_time(line[p][i],q)+t[p][line[p][i]]; | ^ a.cc:36:7...
s854499323
p00200
C++
#include <iostream> #include <cstring> using namespace std; const int INF = 1000000; const int MAX_V = 101; int cost[MAX_V][MAX_V]; int time[MAX_V][MAX_V]; int d[MAX_V]; bool used[MAX_V]; int V; int n,m; void dijkstra(int s,bool r){ fill(d,d+m,INF); memset(used,false,sizeof(used)); d[s]=0; while(1){...
a.cc:9:22: error: 'int time [101][101]' redeclared as different kind of entity 9 | int time[MAX_V][MAX_V]; | ^ In file included from /usr/include/pthread.h:23, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35, from /usr/include/x86_64-linu...
s535782451
p00200
C++
#include <iostream> #include <cstring> using namespace std; const int INF = 1000000; const int MAX_V = 101; const int MAX_E = 20000; int cost[MAX_V][MAX_V]; int time[MAX_V][MAX_V]; int d[MAX_V]; bool used[MAX_V]; int V; int n,m; void dijkstra(int s,bool r){ fill(d,d+m,INF); memset(used,false,sizeof(used)); ...
a.cc:10:22: error: 'int time [101][101]' redeclared as different kind of entity 10 | int time[MAX_V][MAX_V]; | ^ In file included from /usr/include/pthread.h:23, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35, from /usr/include/x86_64-lin...
s600040887
p00200
C++
#include <iostream> #include <cstdio> #include <iomanip> #include <vector> #include <map> #include <set> #include <queue> #include <bitset> #include <stack> #include <utility> #include <numeric> #include <algorithm> #include <functional> #include <cctype> #include <complex> #include <string> #include <sstream> #include...
a.cc:50:2: error: #else without #if 50 | #else | ^~~~ a.cc:51:9: warning: "DUMP" redefined 51 | #define DUMP(x) | ^~~~ a.cc:46:10: note: this is the location of the previous definition 46 | #define DUMP(x) cerr << #x << " = " << (x) <<endl | ^~~~ a.cc:52:9: warning: "DEBUG...
s916768618
p00200
C++
#include<iostream> #include<algorithm> #include<vector> #include<map> #include<queue> #define INF (1<<30) #define COST 0 #define TIME 1 using namespace std; typedef pair<int, int> p; vector<p> costs[105], times[105]; int dist[105]; void dijkstra(vector<p> *edge, int s){ fill(dist, dist + 105, INF); dist[s] = 0; p...
a.cc: In function 'int main()': a.cc:40:23: error: request for member 'clear' in 'costs', which is of non-class type 'std::vector<std::pair<int, int> > [105]' 40 | costs.clear(); | ^~~~~ a.cc:41:23: error: request for member 'clear' in 'times', which is of non-class type '...
s848307776
p00200
C++
#include <vector> #include <map> #include <stack> #include <queue> #include <cstring> #include <string> #include <sstream> #include <algorithm> #include <iomanip> #include <iostream> #define VARIABLE(x) cerr << #x << "=" << x << endl #define rep(i,n) for(int i=0;i<(int)(n);i++) #define REP(i,m,n) for (int i=m;i<(int)(...
a.cc: In function 'int main()': a.cc:67:9: error: 're' was not declared in this scope; did you mean 'rep'? 67 | re | ^~ | rep a.cc:67:11: error: expected '}' at end of input 67 | re | ^ a.cc:26:1: note: to match this '{' 26 | { | ^
s279658461
p00200
C++
//2013-5 #include <iostream> #include <fstream> #include <cstdio> #include <vector> #include <queue> #include <stack> #include <map> #include <algorithm> #include <time.h> #define mp make_pair #define INF 1e8 #define fs first #define sc second #define rep(x,n) for(int x = 0;x < n;x ++) #define Rep(x,n) for(int x = 1;x...
a.cc: In function 'int main()': a.cc:24:45: error: expected ')' before '{' token 24 | while(scanf("%d %d",&n,&m)&&(n!=0||m!=0){ | ~ ^ | )
s490026003
p00201
Java
class Main{ public static void main(String args[]) { Scanner sc = new Scanner(System.in); while (true) { HashMap<String, Integer> data = new HashMap<String, Integer>(); int items = sc.nextInt(); if (items == 0) { break; } for (int i = 0; i < items; i++) { data.put(sc.next(), sc.nextInt()); ...
Main.java:3: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:3: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:5: error: cannot find symbol ...
s291445153
p00201
Java
8 wood 3000 string 800 rice 36 water 0 racket 5000 microphone 9800 onigiri 140 guitar 98000 3 racket 2 wood string onigiri 2 rice water guitar 3 racket microphone onigiri guitar 1 computer 300000 0 computer 0
Main.java:1: error: class, interface, enum, or record expected 8 ^ 1 error
s331042571
p00201
Java
import java.util.HashMap; import java.util.Scanner; public class Vol2_201 { void run() { Scanner in = new Scanner(System.in); HashMap<String, Integer> item = new HashMap<String, Integer>(); while(true) { int N = Integer.parseInt(in.next()); if (N == 0) break; for(int i = 0; i < N; i++) { ite...
Main.java:4: error: class Vol2_201 is public, should be declared in a file named Vol2_201.java public class Vol2_201 { ^ 1 error
s085613176
p00201
Java
import java.util.*; class P0200 { Scanner sc; HashMap<Integer, Integer> itemList; HashMap<String, Integer> key; LinkedList<Integer>[] itemComb; long solve(int item) { long sum = 0; if (itemComb[item].isEmpty()) { return itemList.get(item); } for (int s...
Note: Main.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.
s869927393
p00201
Java
import java.util.*; class Main { Scanner sc; HashMap<String, Integer> itemList; HashMap<String, LinkedList<String>> itemComb; long solve(String item, long min) { long sum = 0; if ( !itemList.contains(item) )return min; if (itemComb.get(item).isEmpty()) { return it...
Main.java:12: error: cannot find symbol if ( !itemList.contains(item) )return min; ^ symbol: method contains(String) location: variable itemList of type HashMap<String,Integer> 1 error
s643579830
p00201
Java
import java.util.Scanner; import java.util.ArrayList; public class AOJ0201 { public static void main(String[] args) { Scanner scan = new Scanner(System.in); ArrayList<String> item = new ArrayList<String>(); ArrayList<Integer> itemMoney = new ArrayList<Integer>(); ArrayList<St...
Main.java:5: error: class AOJ0201 is public, should be declared in a file named AOJ0201.java public class AOJ0201 ^ 1 error
s519791179
p00201
Java
import java.util.Scanner; import java.util.ArrayList; public class AOJ0201 { public static void main(String[] args) { Scanner scan = new Scanner(System.in); ArrayList<String> item = new ArrayList<String>(); ArrayList<Integer> itemMoney = new ArrayList<Integer>(); ArrayList<St...
Main.java:5: error: class AOJ0201 is public, should be declared in a file named AOJ0201.java public class AOJ0201 ^ 1 error
s337949993
p00201
C
#include<iostream> #include<string> #include<map> using namespace std; int main(){ int n, price, m, sum; string item, ingre, wantMake; while(cin >> n, n){ sum = 0; map <string,int> itemPrice; while(n--){ cin >> item >> price; itemPrice.insert(map<string,int>::value_type(item,price)); ...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s910496159
p00201
C
#include<iostream> #include<string> #include<map> using namespace std; int main(){ int n, price, m, sum; string item, ingre, wantMake; while(cin >> n, n){ sum = 0; map <string,int> itemPrice; while(n--){ cin >> item >> price; itemPrice.insert(map<string,int>::value_type(item,price)); ...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s559643733
p00201
C
#include<stdio.h> #include<string.h> #include<stdlib.h> typedef struct{ char name[128]; unsigned int minprice; short fr_oth; } item; typedef struct{ char to[128]; unsigned int num; char from[100][128]; } gosei; item list[100]; gosei makelist[100]; unsigned int m,n; unsigned int makeans(int var); int ma...
main.c: In function 'makeans': main.c:73:11: error: invalid type argument of '->' (have 'int') 73 | if(var->minprice>tmp) list[var].minprice=tmp; | ^~
s868023763
p00201
C++
#include <cstdlib> #include <iostream> #include <unordered_map> #include <vector> using namespace std; template<class T> inline void chmin(T &a, const T &b) { if(a > b) a = b; } typedef vector<vector<int>> graph; void dfs(int v, const graph &G, vector<bool> &visited, vector<int> &order) { visited[v] = true; for(co...
a.cc: In function 'int main()': a.cc:56:36: error: 'INT_MAX' was not declared in this scope 56 | vector<int> sum(n, INT_MAX); | ^~~~~~~ a.cc:5:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 4 | ...
s502044986
p00201
C++
#include<iostream> #include<algorithm> #include<map> #include<vector> #include<string> using namespace std; typedef struct{ vector<string> sozai; long long money; }BUTU; pair<string,logn long> P[1002]; BUTU butu[1024]; long long n,p,m,a,b; string s,ss,mokuhyou; long long tansaku(string now){ for(int i=0;i<n;i++){...
a.cc:11:13: error: 'logn' was not declared in this scope; did you mean 'long'? 11 | pair<string,logn long> P[1002]; | ^~~~ | long a.cc:11:22: error: template argument 2 is invalid 11 | pair<string,logn long> P[1002]; | ^ a.cc: In function 'long long i...
s410733807
p00201
C++
#include<iostream> #include <stdio.h> #include <vector> #include<string> using namespace std; int ha(string); void saga(void); struct L{ string name; int cost; }; struct R{ string name; string zairyo[101]; int size; }; int q,m,n; L list[101]; R resipi[101]; int main() { int i,j,k,b=0,s,a; string S; while((c...
a.cc: In function 'int main()': a.cc:26:24: error: no match for 'operator!=' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'const char [4]') 26 | while((cin>> n)!="EOF"){ | ~~~~~~~~~^~~~~~~ | | | | ...
s194458067
p00201
C++
#include<iostream> #include <stdio.h> #include <vector> #include<string> using namespace std; int ha(string); void saga(void); struct L{ string name; int cost; }; struct R{ string name; string zairyo[101]; int size; }; int q,m,n; L list[101]; R resipi[101]; int main() { int i,j,k,b=0,s,a; string S; while((c...
a.cc: In function 'int main()': a.cc:26:24: error: no match for 'operator!=' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int') 26 | while((cin>> n)!=EOF){ | ~~~~~~~~~^~ | | | std::basic...
s386041494
p00201
C++
#include<iostream> #include <stdio.h> #include <vector> #include<string> using namespace std; int ha(string); void saga(void); struct L{ string name; int cost; }; struct R{ string name; string zairyo[101]; int size; }; int q,m,n; L list[101]; R resipi[101]; int main() { int i,j,k,b=0,s,a; string S; while((c...
a.cc: In function 'int main()': a.cc:26:24: error: no match for 'operator!=' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int') 26 | while((cin>> n)!=EOF){ | ~~~~~~~~~^~ | | | std::basic...
s869526480
p00201
C++
#include<iostream> #include<string> #include<algorithm> #include<utility> #include<vector> using namespace std; typedef pair<string, int>P; int main() { int n; while (cin >> n, n) { vector<P>v; for (int i = 0;i < n;i++) { string sa, int a; cin >> sa >> a; v.push_back(P(sa, a)); } int m; cin >> m;...
a.cc: In function 'int main()': a.cc:14:36: error: expected unqualified-id before 'int' 14 | string sa, int a; | ^~~ a.cc:15:38: error: 'a' was not declared in this scope; did you mean 'sa'? 15 | cin >> sa >> a; | ...
s740158474
p00201
C++
#include <iostream> #include <vector> #include <map> #include <string> #define REP(i,n) for(int i = (int)(n) - 1; i >= 0; --i) using namespace std; int costs[101]; vector<int> recipe[101]; bool flags[101]; int getCost(int goal){ if(recipe[goal].empty()) return costs[goal]; flags[goal] = true; int sum = 0; REP(i...
a.cc: In function 'int main()': a.cc:39:17: error: 'memset' was not declared in this scope 39 | memset(flags, 0, sizeof(flags)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <map> +...
s590292472
p00201
C++
#include <stdio.h> #include <queue> #include <string.h> using namespace std; typedef pair<int,int> P; //howmuch[i]:i番のアイテムの最小の値段 int howmuch[100]; //itemname[i]:i番目のアイテムの名前 char itemname[100][101]; //n:アイテムの種類 m:レシピの数 int n,m; //resipeuseditem[i][k]:iをつくるためにkを用いたかどうかの判定 bool resipeuseditem[100][100]; //resipeN[i]:...
a.cc: In function 'int nameTOnonber(char*)': a.cc:89:16: error: 'INT_MAX' was not declared in this scope 89 | return INT_MAX; | ^~~~~~~ a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 3 | #include <string.h> +++ |+...
s776360357
p00201
C++
#include <iostream> #include <string> #include <map> #include <vector> using namespace std; int n, m; map<string, int> items; map<string, vector<string> > alc; map<string, int> memo; int minPrice(const string& t) { vector<string>& mats = alc[t]; if (!mats.size()) return items[t]; map<string, int>::iterator it = mem...
a.cc: In function 'int minPrice(const std::string&)': a.cc:16:9: error: 'i' was not declared in this scope; did you mean 'it'? 16 | i nt ap = 0; | ^ | it a.cc:18:17: error: 'ap' was not declared in this scope 18 | ap += minPrice(mats[i]); | ...
s940909959
p00201
C++
#include <cstdio> #include <cstring> #include <cstdlib> #include <string> #include <sstream> #include <algorithm> #include <vector> #include <queue> #include <stack> #include <functional> #include <iostream> #include <map> #include <set> using namespace std; typedef pair<int,int> P; #define pu push #define pb push_back...
a.cc: In function 'int getcost(int)': a.cc:52:25: error: 'list' was not declared in this scope 52 | list[v].cost=memo[v]; | ^~~~ a.cc:14:1: note: 'std::list' is defined in header '<list>'; this is probably fixable by adding '#include <list>' 13 | #include <set...
s696654358
p00201
C++
#include <stdio.h> #include <string.h> #include <string> #include <vector> #include <algorithm> int n; struct item{ string name[256]; int cost; vector<string> used; int size; } ; item list[100]; int memo[100]; int getCost(int v) { if(memo[v]!=-1)return memo[v]; int i, j; int ans; ...
a.cc:9:5: error: 'string' does not name a type; did you mean 'stdin'? 9 | string name[256]; | ^~~~~~ | stdin a.cc:11:5: error: 'vector' does not name a type 11 | vector<string> used; | ^~~~~~ a.cc: In function 'int getCost(int)': a.cc:31:29: error: 'struct item' has no membe...
s183267143
p00201
C++
#include <cstdio> #include <algorithm> #include <string> #include <vector> #include <algorithm> int n; struct item{ string name[256]; int cost; vector<string> used; int size; } ; item list[100]; int memo[100]; int getCost(int v) { if(memo[v]!=-1)return memo[v]; int i, j; int ans; ...
a.cc:9:5: error: 'string' does not name a type; did you mean 'stdin'? 9 | string name[256]; | ^~~~~~ | stdin a.cc:11:5: error: 'vector' does not name a type 11 | vector<string> used; | ^~~~~~ a.cc: In function 'int getCost(int)': a.cc:31:29: error: 'struct item' has no membe...
s489385454
p00201
C++
#include <cstdio> #include <algorithm> #include <string> #include <vector> #include <algorithm> int n; struct item{ string name; int cost; vector<string> used; int size; } ; item list[100]; int memo[100]; int getCost(int v) { if(memo[v]!=-1)return memo[v]; int i, j; int ans; if (...
a.cc:9:5: error: 'string' does not name a type; did you mean 'stdin'? 9 | string name; | ^~~~~~ | stdin a.cc:11:5: error: 'vector' does not name a type 11 | vector<string> used; | ^~~~~~ a.cc: In function 'int getCost(int)': a.cc:31:29: error: 'struct item' has no member nam...
s743332618
p00201
C++
#include <cstdio> #include <algorithm> #include <string> #include <vector> #include <algorithm> int n; struct item{ string name; int cost; vector<string> used; int size; } ; item list[100]; int memo[100]; int getCost(int v) { if(memo[v]!=-1)return memo[v]; int i, j; int ans; if (...
a.cc:9:5: error: 'string' does not name a type; did you mean 'stdin'? 9 | string name; | ^~~~~~ | stdin a.cc:11:5: error: 'vector' does not name a type 11 | vector<string> used; | ^~~~~~ a.cc: In function 'int getCost(int)': a.cc:31:29: error: 'struct item' has no member nam...
s681204851
p00201
C++
#include <cstdio> #include <algorithm> #include <string> #include <vector> #include <algorithm> int n; struct item{ string name; int cost; vector<string> used; int size; } ; item list[100]; int memo[100]; int getCost(int v) { if(memo[v]!=-1)return memo[v]; int i, j; int ans; if (...
a.cc:9:5: error: 'string' does not name a type; did you mean 'stdin'? 9 | string name; | ^~~~~~ | stdin a.cc:11:5: error: 'vector' does not name a type 11 | vector<string> used; | ^~~~~~ a.cc: In function 'int getCost(int)': a.cc:31:29: error: 'struct item' has no member nam...
s954798374
p00201
C++
#include <cstdio> #include <algorithm> #include <string> #include <vector> #include <algorithm> using nameapace::std; int n; struct item{ string name; int cost; vector<string> used; int size; } ; item list[100]; int memo[100]; int getCost(int v) { if(memo[v]!=-1)return memo[v]; int i, j; ...
a.cc:6:7: error: 'nameapace' has not been declared 6 | using nameapace::std; | ^~~~~~~~~ a.cc:10:5: error: 'string' does not name a type; did you mean 'stdin'? 10 | string name; | ^~~~~~ | stdin a.cc:12:5: error: 'vector' does not name a type 12 | vector<string> used; ...
s081751877
p00201
C++
#include <cstdio> #include <algorithm> #include <string> #include <vector> #include <algorithm> using namespace::std; int n; struct item{ string name; int cost; vector<string> used; int size; } ; item list[100]; int memo[100]; int getCost(int v) { if(memo[v]!=-1)return memo[v]; int i, j; ...
a.cc: In function 'int main()': a.cc:57:13: error: 'cin' was not declared in this scope 57 | cin >> list[i].name >> list[i].cost; | ^~~ a.cc:5:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 4 | #include <vector> +++ ...
s983273773
p00202
Java
public class Main { public static void main(String[] args) throws IOException { new Main().run(); } private void run() throws IOException { Scanner scanner = new Scanner(System.in); int MAX = 1000000; boolean[] prime = new boolean[MAX + 1]; for (int i = 2; i <= MAX; i++) { if (!prime[i]) { for (i...
Main.java:4: error: cannot find symbol public static void main(String[] args) throws IOException { ^ symbol: class IOException location: class Main Main.java:8: error: cannot find symbol private void run() throws IOException { ^ symbol:...
s149735625
p00202
Java
import java.util.Arrays; import java.util.Scanner; public class A0202 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int prime[] = new int[1000010]; Arrays.fill(prime, 1); prime[0] = 0; prime[1] = 0; for (int i = 2; i < 1000010; i++) { for (int j = i * 2; j < 1000010; ...
Main.java:4: error: class A0202 is public, should be declared in a file named A0202.java public class A0202 { ^ 1 error
s899131232
p00202
Java
import java.util.Scanner; public class AtBossExpense { public static void main(String[] args) { Scanner sc = new Scanner(System.in); //素数のメモ作成 int size = 1000001; boolean[] prime = new boolean[size]; for(int i=2; i<size; i++){ prime[i] = true; } for(int i=2; i*i<size; i++){ if(prime[i]){ ...
Main.java:3: error: class AtBossExpense is public, should be declared in a file named AtBossExpense.java public class AtBossExpense { ^ 1 error
s743112185
p00202
Java
import java.util.Scanner; public static void main(String[] args) { Scanner sc = new Scanner(System.in); //素数のメモ作成 int size = 1000001; boolean[] prime = new boolean[size]; for(int i=2; i<size; i++){ prime[i] = true; } for(int i=2; i*i<size; i++){ if(prime[i]){ for(int j=i*i; j<size; j+=i){ ...
Main.java:3: error: unnamed classes are a preview feature and are disabled by default. public static void main(String[] args) { ^ (use --enable-preview to enable unnamed classes) 1 error
s796972915
p00202
C
#include <stdio.h> #include <math.h> #include <string.h> ?? int is_prime(int a) { ????????int last = sqrt(a) + 1; ????????int i; ?? ????????for (i = 2; i <= last; i++){ ????????????????if (a % i == 0){ ????????????????????????if (a == i) return (1); ????????????????????????return (0); ????????????????} ????????} ??????...
main.c:4:1: error: expected identifier or '(' before '?' token 4 | ?? | ^ main.c:18:1: error: expected identifier or '(' before '?' token 18 | ?? | ^
s752298189
p00202
C
p[' '];t[' '];n,x,j;main(i){for(;i++<1e6;)for(x=i;x<1e6;p[x+=i]=1);for(;scanf("%d%d",&n,&x),n;memset(t,!printf(x<2?"NA\n":"%d\n",x),4e6)){for(;n--;)for(i=-scanf("%d",t);++i<x;)t[i+*k]|=t[i];for(;p[x]|!t[x];x--);}}
main.c:1:3: warning: multi-character character constant [-Wmultichar] 1 | p[' '];t[' '];n,x,j;main(i){for(;i++<1e6;)for(x=i;x<1e6;p[x+=i]=1);for(;scanf("%d%d",&n,&x),n;memset(t,!printf(x<2?"NA\n":"%d\n",x),4e6)){for(;n--;)for(i=-scanf("%d",t);++i<x;)t[i+*k]|=t[i];for(;p[x]|!t[x];x--);}} | ^~~~~ main.c:1...
s895775622
p00202
C++
#include<iostream> #include<cstring> #include<algorithm> const int Max = 1000001; int dishes[31]; bool dish[Max]; bool isPrime[Max]; int main(){ for (int i = 2; i < Max; i++)isPrime[i] = true; for (int i = 2; i < std::sqrt(Max); i++){ if (isPrime[i]){ for (int j = i * 2; j < Max; j += i)isPrime[j] = false; ...
a.cc: In function 'int main()': a.cc:14:34: error: 'sqrt' is not a member of 'std'; did you mean 'sort'? 14 | for (int i = 2; i < std::sqrt(Max); i++){ | ^~~~ | sort
s337322906
p00202
C++
using System; using System.Collections.Generic; using System.Linq; namespace AOJ { class Program { public static void Main(string[] args) { var pmax = 1000000; var primes = new bool[pmax+1]; var maxsq = (int)Math.Sqrt(pmax); for(var i=2;i<=pmax;i++) primes[i]=true; for(var i=2;i<=maxsq;i++) ...
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:2:7: error: expected nested-name-specifier before 'System' 2 | using System.Collections.Generic; | ^~~~~~ a.cc:3:7: error: expected nested-name-specifier before 'System' 3 | using System.L...
s700155356
p00202
C++
#include <cstdio> #include <iostream> #include <vector> using namespace std; int main() { int n, m; while(cin >> n >> m && (n || m)) { int cnt=0;vector<int> primes; bool num[m]; memset(num, false, sizeof(num)); num[0] = true; for(int i=0;i < n;++i) {int hoge; cin>>hoge; if(!(ho...
a.cc: In function 'int main()': a.cc:11:9: error: 'memset' was not declared in this scope 11 | memset(num, false, sizeof(num)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <vector> +++ |+#include ...
s511079655
p00202
C++
#include <bits/stdc++.h> using namespace std; #define FOR(i, s, n) for(int i = s; i < (int)n; i++) #define per(i, n) for(int i = n; i >= 0; i--) #define ROF(i, s, n) for(int i = s; i >= (int)n; i--) #define FORIT(i, A) for (auto i : A) #define PRINT(x) cout << (x) << "\n" #define ALL(a) (a).begin(),(a).end() #define RA...
a.cc:44:20: error: storage class specified for parameter 'now' 44 | static void solve( static const char now, static const int how_much ) { | ^~~~~~ a.cc:44:41: error: expected ')' before ',' token 44 | static void solve( static const char now, static const int how_much ) { | ...
s839959659
p00202
C++
#include <iostream> #include <algorithm> #include <cstring> using namespace std; const int XMAX = 1000000; constexpr int SQRTXMAX = sqrt(XMAX); bool is_prime[XMAX + 1]; bool dp[XMAX + 1]; int cost[30]; int main() { // prime memset(is_prime, true, sizeof(is_prime)); is_prime[0] = is_prime[1] = false for (int i...
a.cc:6:26: error: 'sqrt' was not declared in this scope 6 | constexpr int SQRTXMAX = sqrt(XMAX); | ^~~~ a.cc: In function 'int main()': a.cc:15:36: error: expected ';' before 'for' 15 | is_prime[0] = is_prime[1] = false | ^ | ...
s989591149
p00202
C++
#include <iostream> #include <algorithm> #include <cstring> using namespace std; const int XMAX = 1000000; constexpr int SQRTXMAX = (int)sqrt(XMAX); bool is_prime[XMAX + 1]; bool dp[XMAX + 1]; int cost[30]; int main() { // prime memset(is_prime, true, sizeof(is_prime)); is_prime[0] = is_prime[1] = false for (...
a.cc:6:31: error: 'sqrt' was not declared in this scope 6 | constexpr int SQRTXMAX = (int)sqrt(XMAX); | ^~~~ a.cc: In function 'int main()': a.cc:15:36: error: expected ';' before 'for' 15 | is_prime[0] = is_prime[1] = false | ^ ...
s248997031
p00202
C++
#include <iostream> #include <algorithm> #include <cstring> using namespace std; const int XMAX = 1000000; const int SQRTXMAX = sqrt(XMAX); bool is_prime[XMAX + 1]; bool dp[XMAX + 1]; int cost[30]; int main() { // prime memset(is_prime, true, sizeof(is_prime)); is_prime[0] = is_prime[1] = false for (int i = 2...
a.cc:6:22: error: 'sqrt' was not declared in this scope 6 | const int SQRTXMAX = sqrt(XMAX); | ^~~~ a.cc: In function 'int main()': a.cc:15:36: error: expected ';' before 'for' 15 | is_prime[0] = is_prime[1] = false | ^ | ...
s707531168
p00202
C++
#include <iostream> #include <algorithm> #include <cstring> using namespace std; const int XMAX = 1000000; constexpr int SQRTXMAX = sqrt(XMAX); bool is_prime[XMAX + 1]; bool dp[XMAX + 1]; int cost[30]; int main() { // prime memset(is_prime, true, sizeof(is_prime)); is_prime[0] = is_prime[1] = false; for (int ...
a.cc:6:26: error: 'sqrt' was not declared in this scope 6 | constexpr int SQRTXMAX = sqrt(XMAX); | ^~~~
s220384923
p00202
C++
#include <bits/stdc++.h> #ifndef INCLUDE_BOOL_ARRAY_HPP #define INCLUDE_BOOL_ARRAY_HPP #include <cstring> #include <limits> #include <cassert> namespace orliv { template<unsigned int CAP> struct BoolArray { typename int memory_t; memory_t K; memory_t data[CAP]; BoolArray() { clear_deep(); } void clear_deep...
a.cc:13:12: error: expected nested-name-specifier before 'int' 13 | typename int memory_t; | ^~~ a.cc:13:3: error: two or more data types in declaration of 'memory_t' 13 | typename int memory_t; | ^~~~~~~~ a.cc:14:3: error: 'memory_t' does not name a type 14 | memory_t K; |...
s187877333
p00202
C++
#include <vector> #include <iostream> std::vector<bool> cul_prime(const int &n) { std::vector<bool> prime(n + 1, true); prime.at(0) = false; prime.at(1) = false; double root = sqrt(n) + 1; for (auto i = 2; i <= n >> 1; ++i) { prime.at(i << 1) = false; } for (auto i = 3; i < root; i += 2) { if (prime.at(i)) ...
a.cc: In function 'std::vector<bool> cul_prime(const int&)': a.cc:8:23: error: 'sqrt' was not declared in this scope 8 | double root = sqrt(n) + 1; | ^~~~
s363884150
p00202
C++
#include <cstdio> #include <vector> #include <algorithm> using namespace std; int n, x, a[30]; bool dp[1000001], prime[1000001]; vector<int> p; int main() { for(int i = 2; i <= 1000000; i++) prime[i] = true; for(int i = 2; i <= 1000; i++) { if(!prime[i]) continue; for(int j = i * i; j <= 1000000; j += i) prime[j]...
a.cc: In function 'int main()': a.cc:26:38: error: cannot convert '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' to 'int' in initialization 26 | int pos = upper_bound(p.begin(), p.end(), x); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ | ...
s097828922
p00202
C++
#include<iostream> #include<iomanip> #include<algorithm> #include<bitset> #include<cctype> #include<climits> #include<cmath> #include<cstdio> #include<deque> #include<list> #include<map> #include<queue> #include<set> #include<stack> #include<string> #include<sstream> #include<vector> using namespace std; #define M 100...
a.cc: In function 'int main()': a.cc:34:17: error: 'memset' was not declared in this scope 34 | memset(dp, 0, sizeof(dp)); | ^~~~~~ a.cc:15:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 14 | #include<stack> +++ |...
s947146702
p00202
C++
import java.util.*; class Main { static Scanner scan = new Scanner(System.in); public static void main(String[] args) { while (scan.hasNext()) { int n = scan.nextInt(); int money = scan.nextInt(); boolean[] dp = new boolean[money+1]; if (n == 0) { ...
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:5:12: error: 'Scanner' does not name a type 5 | static Scanner scan = new Scanner(System.in); | ^~~~~~~ a.cc:7:11: error: expected ':'...
s303025260
p00202
C++
#include <iostream> #include <algorithm> #include <cstring> constexpr int MAX_N = 31, MAX_C = 1000001; int n, max; int cost[MAX_N]; bool dp[MAX_C]; bool prime_num[MAX_C]; int main() { while (1) { std::cin >> n >> max; if (n + max == 0) break; std::memset(prime_num, false, sizeof(prime_num)); std::memset(d...
a.cc: In function 'int main()': a.cc:34:42: error: 'd' was not declared in this scope 34 | else if(!d[i]) | ^
s624186915
p00202
C++
#include<iostream> #include <cstdio> #include<string> using namespace std; int ha(string); int saga(int); int q,m,n=1000000,List[1000]; bool slist[1000001]; bool klist[1000001]; int main() { int i,j,k,b=0,s,a=2,f=0,c=0; for( i = 0; i <n;i++ ){ slist[i]=true; klist[i]=false; } i=0; while(i<sqrt((double)n))...
a.cc: In function 'int main()': a.cc:20:17: error: 'sqrt' was not declared in this scope 20 | while(i<sqrt((double)n)){ | ^~~~
s626405945
p00202
C++
#include<iostream> #include <cstdio> #include<string> using namespace std; int ha(string); int saga(int); int q,m,n=1000000,List[1000]; bool slist[1000001]; bool klist[1000001]; int main() { int i,j,k,b=0,s,a=2,f=0,c=0; for( i = 0; i <n;i++ ){ slist[i]=true; klist[i]=false; } i=0; while(i<sqrt((double)n))...
a.cc: In function 'int main()': a.cc:20:17: error: 'sqrt' was not declared in this scope 20 | while(i<sqrt((double)n)){ | ^~~~
s719207740
p00202
C++
#include <iostream> #include <algorithm> #include <string> #include <vector> #include <queue> #include <bitset> #include <set> #include <map> #include <stack> #include <list> #define rep(i,n) for(int i=0;i<n;i++) #define REP(i,b,n) for(int i=b;i<n;i++) #define SORT(c) sort((c).begin(),(c).end()) #define DESCSORT(c) so...
/tmp/ccFLgUB9.o: in function `solve(long long)': a.cc:(.text+0xa0): relocation truncated to fit: R_X86_64_PC32 against symbol `maxn' defined in .bss section in /tmp/ccFLgUB9.o a.cc:(.text+0xc1): relocation truncated to fit: R_X86_64_PC32 against symbol `maxn' defined in .bss section in /tmp/ccFLgUB9.o /tmp/ccFLgUB9.o: ...
s593711058
p00202
C++
#include <iostream> #include <algorithm> #include <string> #include <vector> #include <queue> #include <bitset> #include <set> #include <map> #include <stack> #include <list> #define rep(i,n) for(int i=0;i<n;i++) #define REP(i,b,n) for(int i=b;i<n;i++) #define SORT(c) sort((c).begin(),(c).end()) #define DESCSORT(c) so...
/tmp/cc4zClI3.o: in function `solve(long long)': a.cc:(.text+0xa0): relocation truncated to fit: R_X86_64_PC32 against symbol `maxn' defined in .bss section in /tmp/cc4zClI3.o a.cc:(.text+0xc1): relocation truncated to fit: R_X86_64_PC32 against symbol `maxn' defined in .bss section in /tmp/cc4zClI3.o /tmp/cc4zClI3.o: ...
s789120981
p00202
C++
#include <iostream> #include <algorithm> #include <string> #include <vector> #include <queue> #include <bitset> #include <set> #include <map> #include <stack> #include <list> #define rep(i,n) for(int i=0;i<n;i++) #define REP(i,b,n) for(int i=b;i<n;i++) #define SORT(c) sort((c).begin(),(c).end()) #define DESCSORT(c) so...
/tmp/ccraDUYE.o: in function `solve(long long)': a.cc:(.text+0xa0): relocation truncated to fit: R_X86_64_PC32 against symbol `maxn' defined in .bss section in /tmp/ccraDUYE.o a.cc:(.text+0xc1): relocation truncated to fit: R_X86_64_PC32 against symbol `maxn' defined in .bss section in /tmp/ccraDUYE.o /tmp/ccraDUYE.o: ...
s560778675
p00202
C++
#include<iostream> using namespace std ; void ans( int cnt ,int dp[] ) { int a = cnt + 1 ; LOOK : a-- ; while( dp[ a ] != 1 ) { a-- ; if( a < 2 ) { END : cout << "NA" << endl ; return ; } } if( a < 2 ) { goto END ; } if( a % 2 == 0 ) { goto LOOK ; } if( a == 2 ) { cout << a << endl ...
a.cc: In function 'int main()': a.cc:70:27: error: cannot convert 'long long int*' to 'int*' 70 | ans( cnt ,dp ) ; | ^~ | | | long long int* a.cc:3:24: note: initializing argument 2 of 'void ans(int, int...
s696753071
p00202
C++
#include<stdio.h> int isPrime(int x){ int i; if(x<2) return 0; else if(x==2) return 1; if(x%2==0) return 0; for(i=3;i*i<=x;i+=2){ if(x%i==0) return 0; } return 1; } int main() { long x,cnt,cnt2,food; int n,d=0,g,kakaku[31],youso[1000001]={0}; scanf("%d %d",&n,&x); while(n!=0&&x!=0){ for(cnt=1;cnt<=n;cnt+...
a.cc: In function 'int main()': a.cc:39:41: error: 'flag' was not declared in this scope 39 | flag=1; | ^~~~ a.cc:45:20: error: 'flag' was not declared in this scope 45 | if(flag==0){ | ^...
s097217710
p00202
C++
#include<stdio.h> int isPrime(int x){ int i; if(x<2) return 0; else if(x==2) return 1; if(x%2==0) return 0; for(i=3;i*i<=x;i+=2){ if(x%i==0) return 0; } return 1; } int main() { long x,cnt,cnt2,food; int n,d=0,g,kakaku[31],youso[1000001]={0}; scanf("%d %d",&n,&lx); while(n!=0&&x!=0){ for(cnt=1;cnt<=n;cnt...
a.cc: In function 'int main()': a.cc:16:27: error: 'lx' was not declared in this scope; did you mean 'x'? 16 | scanf("%d %d",&n,&lx); | ^~ | x a.cc:39:41: error: 'flag' was not declared in this scope 39 | ...
s880195396
p00202
C++
#include<stdio.h> int isPrime(int x){ int i; if(x<2) return 0; else if(x==2) return 1; if(x%2==0) return 0; for(i=3;i*i<=x;i+=2){ if(x%i==0) return 0; } return 1; } int main() { long x,cnt,cnt2,food; int n,d=0,g,kakaku[31],youso[1000001]={0}; scanf("%d %ld",&n,&x); while(n!=0&&x!=0){ for(cnt=1;cnt<=n;cnt...
a.cc: In function 'int main()': a.cc:39:41: error: 'flag' was not declared in this scope 39 | flag=1; | ^~~~ a.cc:45:20: error: 'flag' was not declared in this scope 45 | if(flag==0){ | ^...
s934896251
p00202
C++
#include<iostream> #include<cstring> using namespace std; ?? bool dp[1000010]; int n,x; int cook[33]; int solve(); bool prime(int now); ?? int main(){ ????????while(1){ ????????????????cin >> n >> x; ????????????????if(n == 0 && x == 0) break; ????????????????memset(dp,false,x+2); ????????????????dp[0] = true; ????????...
a.cc:4:1: error: expected unqualified-id before '?' token 4 | ?? | ^ a.cc:10:1: error: expected unqualified-id before '?' token 10 | ?? | ^ a.cc:30:1: error: expected unqualified-id before '?' token 30 | ?? | ^ a.cc:38:1: error: expected unqualified-id before '?' token 38 | ?? | ^
s561008673
p00202
C++
#include<bits/stdc++.h> using namespace std; bool sosu[1000005]={0}; bool check[1000005]; main(){ ????int n,k; ????int shop; ????sosu[1]=1; ????for(int i=2;i<(int)sqrt(1000005);i++){ ????????if(sosu[i]==0){ ????????????for(int j=i;j<1000005;j+=i){ ????????sosu[j]=true; ????????????} ????????} ????} ????while(1){ ??????...
a.cc:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 5 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:6:1: error: expected primary-expression before '?' token 6 | ????int n,k; | ^ a.cc:6:2: error: expected primary-expression before '?' token 6 | ????int n,...
s441496287
p00202
C++
#include <stdio.h> #include <math.h> #include <string.h> ?? int is_prime(int a) { ????????int last = sqrt(a) + 1; ????????int i; ?? ????????for (i = 2; i <= last; i++){ ????????????????if (a % i == 0){ ????????????????????????if (a == i) return (1); ????????????????????????return (0); ????????????????} ????????} ??????...
a.cc:4:1: error: expected unqualified-id before '?' token 4 | ?? | ^ a.cc:18:1: error: expected unqualified-id before '?' token 18 | ?? | ^
s421620668
p00202
C++
#include <cstdio> #include <iostream> #include <cstring> #include <algorithm> #include <vector> using namespace std; bool prime[1000001],dp[1000001]; void make_prime(){ for(int i=0;i<1000001;i++) prime[i]=true; prime[0]=prime[1]=false; for(int i=2;i<=1000000;i++){ if(prime[i]){ for(int j=i*2;j<100000...
a.cc: In function 'int main()': a.cc:32:30: error: 'class std::vector<int>' has no member named 'pop' 32 | while(price.size())price.pop(); | ^~~
s408108197
p00202
C++
#include<cstdio> #include<iostream> #include<algorithm> #include<string> #include<queue> #include<vector> #include<functional> #include<cmath> #include<map> #include<stack> #include<set> #include<numeric> #include<limits> #include<iterator> #define all(x) (x).begin(),(x).end() #define rall(x) (x).rbegin(),(x).rend() ...
a.cc: In function 'int main()': a.cc:56:9: error: 'memset' was not declared in this scope 56 | memset(dp,-1,sizeof(dp)); | ^~~~~~ a.cc:16:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 15 | #include<iterator> +++ |+#include <cstr...