submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s270176284
p00449
C++
#include<bits/stdc++.h> #define r(i,n) for(int i=0;i<n;i++) using namespace std; int main(){ int n,m,a[101][101]; while(cin>>n>>m,n){ r(i,n)r(j,n)a[i][j]=(i==j)?0:1e9; while(m--){ int t,q,w,e; cin>>t; if(t){ cin>>q>>w>>e; if(a[--q][--w]>e){ a[q][w]=a[w][q]=e; ...
a.cc: In function 'int main()': a.cc:25:4: error: expected '}' at end of input 25 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s019688072
p00449
C++
#include <iostream> #include <vector> #include <cstring> #include <queue> #include <utility> #include <algorithm> #define INF 700000000 using namespace std; vector<pair<int, int>> adj[110]; int solve (int x, int d) { int dst[110]; bool done[110]; priority_queue<pair<int, int>> que; for (int i=0; i<11...
a.cc: In function 'int main()': a.cc:46:13: error: request for member 'clear' in 'adj', which is of non-class type 'std::vector<std::pair<int, int> > [110]' 46 | adj.clear(); | ^~~~~
s410820769
p00449
C++
#include <iostream> //#include <vector> using namespace std; #define INF 1000001 int main(){ int n , k , x , y; cin >> n >> k; int judge; if (n == 0 && k == 0) break; int shima[n][n]; for (int i=0 ; i < n ; i++){ for (int j=0 ; j < n ; j++){ shima[i][j] = INF; if (i == j)shima[i][j] = 0; } } ...
a.cc: In function 'int main()': a.cc:14:31: error: break statement not within loop or switch 14 | if (n == 0 && k == 0) break; | ^~~~~ a.cc:30:42: error: 'cost' was not declared in this scope; did you mean 'const'? 30 | cin >> x >> y >> cost; ...
s529996211
p00449
C++
#include <iostream> //#include <vector> using namespace std; #define INF 1000001 int main(){ int n , k , x , y; cin >> n >> k; int judge; if (n == 0 && k == 0) break; int shima[n][n]; for (int i=0 ; i < n ; i++){ for (int j=0 ; j < n ; j++){ shima[i][j] = INF; if (i == j)shima[i][j] = 0; } }...
a.cc: In function 'int main()': a.cc:15:31: error: break statement not within loop or switch 15 | if (n == 0 && k == 0) break; | ^~~~~ a.cc:31:42: error: 'cost' was not declared in this scope; did you mean 'const'? 31 | cin >> x >> y >> cost; ...
s181255291
p00449
C++
#include <iostream> //#include <vector> using namespace std; #define INF 1000001 int main(){ int n , k , x , y; cin >> n >> k; int judge; int shima[n][n]; for (int i=0 ; i < n ; i++){ for (int j=0 ; j < n ; j++){ shima[i][j] = INF; if (i == j)shima[i][j] = 0; } } for (int i=0 ; i < k ; i++){ ...
a.cc: In function 'int main()': a.cc:28:42: error: 'cost' was not declared in this scope; did you mean 'const'? 28 | cin >> x >> y >> cost; | ^~~~ | const a.cc:38:94: error: expected ';' before ')' t...
s280294652
p00449
C++
#include <iostream> //#include <vector> using namespace std; #define INF 1000001 int main(){ int n , k , x , y; cin >> n >> k; int judge; int shima[n][n]; for (int i=0 ; i < n ; i++){ for (int j=0 ; j < n ; j++){ shima[i][j] = INF; if (i == j)shima[i][j] = 0; } } for (int i=0 ; i < k ; i++){ ...
a.cc: In function 'int main()': a.cc:27:42: error: 'cost' was not declared in this scope; did you mean 'const'? 27 | cin >> x >> y >> cost; | ^~~~ | const a.cc:37:94: error: expected ';' before ')' t...
s177117997
p00449
C++
#include <iostream> //#include <vector> using namespace std; #define INF 1000001 int main(){ int n , k , x , y; cin >> n >> k; int judge; int shima[n][n]; for (int i=0 ; i < n ; i++){ for (int j=0 ; j < n ; j++){ shima[i][j] = INF; if (i == j)shima[i][j] = 0; } } for (int i=0 ; i < k ; i++){ ...
a.cc: In function 'int main()': a.cc:27:42: error: 'cost' was not declared in this scope; did you mean 'const'? 27 | cin >> x >> y >> cost; | ^~~~ | const a.cc:37:94: error: expected ';' before ')' t...
s925499564
p00449
C++
#include <iostream> //#include <vector> using namespace std; #define INF 1000001 int main(){ int n , k , x , y; cin >> n >> k; int judge; int shima[n][n]; for (int i=0 ; i < n ; i++){ for (int j=0 ; j < n ; j++){ shima[i][j] = INF; if (i == j)shima[i][j] = 0; } } for (int i=0 ; i < k ; i++){ ...
a.cc: In function 'int main()': a.cc:27:42: error: 'cost' was not declared in this scope; did you mean 'const'? 27 | cin >> x >> y >> cost; | ^~~~ | const a.cc:37:102: error: expected ';' before ')' ...
s713251012
p00449
C++
#include <iostream> //#include <vector> using namespace std; #define INF 1000001 int main(){ int n , k , x , y; cin >> n >> k; int judge; int shima[n][n]; for (int i=0 ; i < n ; i++){ for (int j=0 ; j < n ; j++){ shima[i][j] = INF; if (i == j)shima[i][j] = 0; } } for (int i=0 ; i < k ; i++){ ...
a.cc: In function 'int main()': a.cc:27:42: error: 'cost' was not declared in this scope; did you mean 'const'? 27 | cin >> x >> y >> cost; | ^~~~ | const a.cc:37:102: error: expected ';' before ')' ...
s595440542
p00449
C++
#include <iostream> //#include <vector> using namespace std; #define INF 1000001 int main(){ int n , k , x , y; cin >> n >> k; int judge; int shima[n][n]; for (int i=0 ; i < n ; i++){ for (int j=0 ; j < n ; j++){ shima[i][j] = INF; if (i == j)shima[i][j] = 0; } } for (int i=0 ; i < k ; i++){ ...
a.cc: In function 'int main()': a.cc:27:42: error: 'cost' was not declared in this scope; did you mean 'const'? 27 | cin >> x >> y >> cost; | ^~~~ | const a.cc:37:102: error: expected ';' before ')' ...
s859502980
p00449
C++
#include<stdio.h> int graph[101][101],n,c,d; void warshall_floyd(){ int i,j; for(i=1;i<=n;i++) for(j=1;j<=n;j++) graph[i][j]=graph[j][i]=min(graph[i][j],graph[i][c]+graph[c][d]+graph[d][j]); } int min(int x,int y){ return x<y?x:y; } int main(){ int k,i,j,x,e,a,b; while(scanf("%d %d",&n,&k),n,k){...
a.cc: In function 'void warshall_floyd()': a.cc:8:31: error: 'min' was not declared in this scope 8 | graph[i][j]=graph[j][i]=min(graph[i][j],graph[i][c]+graph[c][d]+graph[d][j]); | ^~~
s510144179
p00449
C++
#include<stdio.h> #define INF 1000000 int graph[101][101],n,c,d; void warshall_floyd(){ int i,j; for(i=1;i<=n;i++) for(j=1;j<=n;j++) graph[i][j]=graph[j][i]=min(graph[i][j],graph[i][c]+graph[c][d]+graph[d][j]); } int min(int x,int y){ return x<y?x:y; } int main(){ int k,i,j,x,e,a,b; while(scanf(...
a.cc: In function 'void warshall_floyd()': a.cc:9:31: error: 'min' was not declared in this scope 9 | graph[i][j]=graph[j][i]=min(graph[i][j],graph[i][c]+graph[c][d]+graph[d][j]); | ^~~
s101732611
p00449
C++
#include <iostream> #define zmin(a,b) a=(a<b&&a>0?a:b) using namespace std; int boat[1001][1001]; int main(){ int i,j,n,k,s,d,c,f; while(cin>>n>>k,n){ memset(boat,0,sizeof(boat)); while(k--){ cin>>f>>s>>d; if(f){ cin>>c; zmin(boat[s][d],c); zmin(boat[d][s],c); }else{ int D[1001]={0},v[100...
a.cc: In function 'int main()': a.cc:8:17: error: 'memset' was not declared in this scope 8 | memset(boat,0,sizeof(boat)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +...
s337118120
p00449
C++
3 8 1 3 1 10 0 2 3 1 2 3 20 1 1 2 5 0 3 2 1 1 3 7 1 2 1 9 0 2 3 5 16 1 1 2 343750 1 1 3 3343 1 1 4 347392 1 1 5 5497 1 2 3 123394 1 2 4 545492 1 2 5 458 1 3 4 343983 1 3 5 843468 1 4 5 15934 0 2 1 0 4 1 0 3 2 0 4 2 0 4 3 0 5 3 0 0
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 3 8 | ^
s668100025
p00449
C++
#include <cstdlib> #include <iostream> #include <queue> #include <utility> #include <vector> using namespace std; struct edge { int to, cost; edge(int t, int c):to(t), cost(c){} }; typedef pair<int, int> P; vector<vector<edge> > es; int dijkstra(int s, int t) { priority_queue<P, vector<P>, greater<P> > que; vect...
a.cc: In function 'int dijkstra(int, int)': a.cc:18:37: error: 'INT_MAX' was not declared in this scope 18 | vector<int> dist(es.size(), INT_MAX); | ^~~~~~~ a.cc:5:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <clim...
s676816879
p00449
C++
#include <cstdio> #include <iostream> #include <algorithm> #include <cstdlib> #include <vector> #include <queue> #include <map> #include <functional> #include <cstring> using namespace std; #define INF 1000000000 int main(){ int n,k; while(scanf("%d%d",&n,&k),(n|k)){ int a; int d[128][128]; for(int i = 0; i < 1...
a.cc: In function 'int main()': a.cc:28:38: error: 'cost' was not declared in this scope; did you mean 'const'? 28 | if(d[f][t] > cost){ | ^~~~ | const
s288138258
p00449
C++
//AOJ 0526 //菴ソ縺?婿繧ゅo縺九i縺ェ縺?¥縺帙↓include縺励∪縺上k莠コ髢薙?繧ッ繧コ #include<cstdio> #include<cstdlib> #include<cstring> #include<algorithm> #include<cmath> #include<stack> #include<queue> #include<vector> #include<list> #include<deque> using namespace std; #define INF 1 << 20 #define MAX_B 101 int a, b, i, j, k, money[MAX_B][MAX_...
a.cc: In function 'int main()': a.cc:46:31: error: expected ')' before '{' token 46 | for(k = 1; k <= n; k++{ | ~ ^ | )
s915658778
p00449
C++
//AOJ 0526 //菴ソ縺?婿繧ゅo縺九i縺ェ縺?¥縺帙↓include縺励∪縺上k莠コ髢薙?繧ッ繧コ #include<cstdio> #include<cstdlib> #include<cstring> #include<algorithm> #include<cmath> #include<stack> #include<queue> #include<vector> #include<list> #include<deque> using namespace std; #define INF 1 << 20 #define MAX_B 101 int a, b, i, j, k, money[MAX_B][MAX_...
a.cc: In function 'int main()': a.cc:46:31: error: expected ')' before '{' token 46 | for(k = 1; k <= n; k++{ | ~ ^ | ) a.cc:53:2: error: expected '}' at end of input 53 | } | ^ a.cc:22:11: note: to match this '{' 22 | int mai...
s157405926
p00449
C++
//AOJ 0526 //菴ソ縺?婿繧ゅo縺九i縺ェ縺?¥縺帙↓include縺励∪縺上k莠コ髢薙?繧ッ繧コ #include<cstdio> #include<cstdlib> #include<cstring> #include<algorithm> #include<cmath> #include<stack> #include<queue> #include<vector> #include<list> #include<deque> using namespace std; #define INF 1 << 20 #define MAX_B 101 int a, b, i, j, k, money[MAX_B][MAX_...
a.cc: In function 'int main()': a.cc:53:2: error: expected '}' at end of input 53 | } | ^ a.cc:22:11: note: to match this '{' 22 | int main(){ | ^
s819621522
p00449
C++
//AOJ 0526 //菴ソ縺?婿繧ゅo縺九i縺ェ縺?¥縺帙↓include縺励∪縺上k莠コ髢薙?繧ッ繧コ #include<cstdio> #include<cstdlib> #include<cstring> #include<algorithm> #include<cmath> #include<stack> #include<queue> #include<vector> #include<list> #include<deque> using namespace std; #define INF 1 << 30 #define MAX_B 101 int a, b, i, j, k, money[MAX_B][MAX_...
a.cc: In function 'int main()': a.cc:50:2: error: expected '}' at end of input 50 | } | ^ a.cc:33:25: note: to match this '{' 33 | for(i = 0; i < m; i++){ | ^ a.cc:50:2: error: expected '}' at end of input 50 | } | ^ a.cc:22:11: note: to match this '{' 22 | int ...
s669344036
p00449
C++
//AOJ 0526 //菴ソ縺?婿繧ゅo縺九i縺ェ縺?¥縺帙↓include縺励∪縺上k莠コ髢薙?繧ッ繧コ #include<cstdio> #include<cstdlib> #include<cstring> #include<algorithm> #include<cmath> #include<stack> #include<queue> #include<vector> #include<list> #include<deque> using namespace std; #define INF 1 << 20 #define MAX_B 101 int a, b, i, j, k, money[MAX_B][MAX_...
a.cc: In function 'int main()': a.cc:42:5: error: 'else' without a previous 'if' 42 | else{ | ^~~~
s423534220
p00449
C++
#include "stdio.h" #include <iostream> #include <vector> #include <algorithm> #include <functional> int main() { while(1) { vector<pair<int,int> > ten[100]; int n,k; scanf("%d %d",&n,&k); if(n == 0 && k == 0) { break; } for(int i = 0; i < k; i...
a.cc: In function 'int main()': a.cc:11:9: error: 'vector' was not declared in this scope 11 | vector<pair<int,int> > ten[100]; | ^~~~~~ a.cc:11:9: note: suggested alternatives: In file included from /usr/include/c++/14/vector:66, from a.cc:3: /usr/include/c++/14/bits/stl_vecto...
s320377985
p00449
C++
#include "stdio.h" #include <iostream> #include <vector> #include <algorithm> #include <functional> using namespace std; int main() { while(1) { vector<pair<int,int> > ten[100]; int n,k; scanf("%d %d",&n,&k); if(n == 0 && k == 0) { break; } f...
a.cc: In function 'int main()': a.cc:35:17: error: 'priority_queue' was not declared in this scope 35 | priority_queue<pair<int,int>,vector<pair<int,int> >,greater<pair<int,int> > > q; | ^~~~~~~~~~~~~~ a.cc:6:1: note: 'std::priority_queue' is defined in header '<queue>'; this is...
s743701306
p00449
C++
#include <iostream> #include <cstdio> #include <cstring> #include <cstdlib> #include <cmath> #include <vector> #include <string> #include <map> #include <queue> #include <stack> #include <algorithm> #define rep(i,j) REP((i), 0, (j)) #define REP(i,j,k) for(int i=(j);(i)<(k);++i) #define between(a,x,b) ((a)<=(x)&&(x)<=(...
a.cc: In function 'int main()': a.cc:50:3: error: 're' was not declared in this scope; did you mean 'rep'? 50 | re | ^~ | rep a.cc:50:5: error: expected '}' at end of input 50 | re | ^ a.cc:19:11: note: to match this '{' 19 | int main(){ | ^
s600869509
p00450
C
#include<cstdio> int s[100000], x[100000], n, S; int main() { while (true) { scanf("%d",&n); if (!n) { break; } S = 0; for (int i = 0; i < n; i++) { scanf("%d",&s[i]); } for (int i = 0; i < n; i++) { x[i] = s[i]; if (i % 2 == 1) { for (int j = i - 1; j >= 0; j--) { if (x[j] == s[i]) { br...
main.c:1:9: fatal error: cstdio: No such file or directory 1 | #include<cstdio> | ^~~~~~~~ compilation terminated.
s382728122
p00450
C
int s[100000], x[100000], n, S; int main() { while (true) { scanf("%d",&n); if (!n) { break; } S = 0; for (int i = 0; i < n; i++) { scanf("%d",&s[i]); } for (int i = 0; i < n; i++) { x[i] = s[i]; if (i % 2 == 1) { for (int j = i - 1; j >= 0; j--) { if (x[j] == s[i]) { break; } ...
main.c: In function 'main': main.c:3:16: error: 'true' undeclared (first use in this function) 3 | while (true) { | ^~~~ main.c:1:1: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>' +++ |+#include <stdbool.h> 1 | int s[1000...
s362188218
p00450
C++
#include<stdio.h> #include<iostream> using namespace std; int main(){ int n[100001]={},N,x,cou=0; while(1){ scanf("%d",&N); if(N==0)break; for(int i=0;i<N;i++) { cin>>x; if(i==0)n[i]=x; else if(i%2==1)n[i]=x; else if(i%2==0){ n[i]=x; for(int j=i;j>=0;j--) if(n[j]!=n[j-1])n[j-1]=n[j]; else if(n[j]==n[j-1])break; } fo...
a.cc: In function 'int main()': a.cc:29:2: error: expected '}' at end of input 29 | } | ^ a.cc:5:11: note: to match this '{' 5 | int main(){ | ^
s232519577
p00450
C++
#include<cstdio> int x[100000], n, S; int main() { while (true) { scanf("%d",&n); if (!n) { break; } S = 0; for (int i = 0; i < n; i++) { scanf("%d",&x[i]) if (i % 2 == 1) { for (int j = i - 1; j >= 0; j--) { if (x[j] == x[i]) { break; } else { x[j] = 1 - x[j]; } }...
a.cc: In function 'int main()': a.cc:9:42: error: expected ';' before 'if' 9 | scanf("%d",&x[i]) | ^ | ; 10 | if (i % 2 == 1) { | ~~ ...
s016365227
p00450
C++
#include <bits/stdc++.h> #define FOR(i,n) for(int i=0;i<(int)(n);i++) #define FORR(i,m,n) for(int i=(int)(m);i<(int)(n);i++) #define pb(a) push_back(a) #define mp(x,y) make_pair(x,y) #define ZERO(a) memset(a,0,sizeof(a)) #define len(a) sizeof(a) #define ll long long #define pii pair<int,int> #define INF 1<<29 #define M...
a.cc:29:15: error: macro "FOR" passed 3 arguments, but takes just 2 29 | FOR(j,t+1,i) g[j]^=1; | ^ a.cc:2:9: note: macro "FOR" defined here 2 | #define FOR(i,n) for(int i=0;i<(int)(n);i++) | ^~~ a.cc: In function 'void solve()': a.cc:29:4: error: 'FOR' was not declared in thi...
s252323645
p00450
C++
#include <bits/stdc++.h> #define FOR(i,n) for(int i=0;i<(int)(n);i++) #define FORR(i,m,n) for(int i=(int)(m);i<(int)(n);i++) #define pb(a) push_back(a) #define mp(x,y) make_pair(x,y) #define ZERO(a) memset(a,0,sizeof(a)) #define len(a) sizeof(a) #define ll long long #define pii pair<int,int> #define INF 1<<29 #define M...
a.cc: In function 'void solve()': a.cc:23:13: error: expected ';' before 'if' 23 | g[i]=a[i] | ^ | ; 24 | if(i&1) continue; | ~~
s916148280
p00450
C++
#include <bits/stdc++.h> #define FOR(i,n) for(int i=0;i<(int)(n);i++) #define FORR(i,m,n) for(int i=(int)(m);i<(int)(n);i++) #define pb(a) push_back(a) #define mp(x,y) make_pair(x,y) #define ZERO(a) memset(a,0,sizeof(a)) #define len(a) sizeof(a) #define ll long long #define pii pair<int,int> #define INF 1<<29 #define M...
a.cc: In function 'void solve()': a.cc:32:4: error: 'ans' was not declared in this scope; did you mean 'abs'? 32 | ans+=(p[i]^1)<<1; | ^~~ | abs a.cc:34:22: error: 'ans' was not declared in this scope; did you mean 'abs'? 34 | if(n&1&&a[n-1]==0) ans++; | ^~~ ...
s140095653
p00450
C++
#include <bits/stdc++.h> #define rep(i,a,n) for(int i=a;i<n;i++) using namespace std; int main(){ int n; while (1){ cin >> n; if (n == 0) break; vector<int> d(n), f(n, 0); rep(i, 0, n) cin >> d[i]; f[0] = d[0]; rep(i, 1, n){ if (i % 2 == 0||d[i]==f[i-1]){ f[i] = d[i]; } else{ int ind; ...
a.cc: In function 'int main()': a.cc:25:29: error: 'ind' was not declared in this scope; did you mean 'int'? 25 | if (ind < 0) ind = 0; | ^~~ | int a.cc:26:40: error: 'ind' was not declared in this scope; did you mean 'int'? ...
s431101471
p00450
C++
#include<iostream> #include<algorithm> #define F 114514 using namespace std;int s[F],e[F],q;bool c[F];void a(bool t,bool r){if(t){if(c[q-1]!=r){if(q==1)e[0]++,c[0]=r;else{e[q-2]=e[q-1]+1;q--;}}else e[q-1]++;return;}if(c[q-1]!=r)s[q]=e[q-1],e[q]=s[q]+1,c[q]=r,q++;else e[q-1]++;return;}int main(){int n,t;while(true){cin>...
a.cc: In function 'int main()': a.cc:4:396: error: invalid types 'int[int]' for array subscript 4 | using namespace std;int s[F],e[F],q;bool c[F];void a(bool t,bool r){if(t){if(c[q-1]!=r){if(q==1)e[0]++,c[0]=r;else{e[q-2]=e[q-1]+1;q--;}}else e[q-1]++;return;}if(c[q-1]!=r)s[q]=e[q-1],e[q]=s[q]+1,c[q]=r,q++;else e[q-...
s121562644
p00450
C++
#include <vector> #include <algorithm> #include <set> #include <map> #include <queue> #include <stack> #include <iostream> #include <cstdio> #include <cmath> #include <cstring> using namespace std; typedef long long ll; typedef pair<ll,ll> P; typedef double db; ll n; vector<P> v;//first ???????????? second: 0or1 ll x; ...
a.cc:42:2: error: expected declaration before '}' token 42 | }} | ^
s603805593
p00450
C++
8 1 0 1 1 0 0 0 0 8 1 0 1 1 0 0 0 1 0
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 8 | ^
s834203323
p00450
C++
#include <iostream> #include <list> using namespace std; #define W (0) #define B (1) int main(void) { while (1){ list<pair<int, int> > st; pair<int, int> add; int n; cin >> n; if (n == 0)break; cin >> add.first; add.second = 1; st.push_back(add); for (int i = 2; i <= n; i++){ int s; cin >...
a.cc: In function 'int main()': a.cc:45:49: error: expected ',' or ';' before 'cout' 45 | cout << c << endl; | ^~~~
s981484465
p00450
C++
include <iostream> #include <algorithm> using namespace std; main() { while(1) { int n; cin >> n; if(n == 0) break; int cnt[2]; fill_n(cnt, 2, 0); int last[2][100000]; fill_n(last[0], 2*100000, 0); int p[2]; fill_n(p, 2, 0); for(int t = 1; t <= n; t++) { int a; cin...
a.cc:1:1: error: 'include' does not name a type 1 | include <iostream> | ^~~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/algorithm:60, from a.cc:2: /usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __...
s314393295
p00450
C++
include <iostream> #include <algorithm> using namespace std; main() { while(1) { int n; cin >> n; if(n == 0) break; int cnt[2]; fill_n(cnt, 2, 0); int last[2][100000]; fill_n(last[0], 2*100000, 0); int p[2]; fill_n(p, 2, 0); for(int t = 1; t <= n; t++) { int a; cin...
a.cc:1:1: error: 'include' does not name a type 1 | include <iostream> | ^~~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/algorithm:60, from a.cc:2: /usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __...
s026737407
p00450
C++
g#include <iostream> #include <vector> using namespace std; int main() { for (;;) { int n; cin >> n; if (!n) return 0; int r = 0; vector<int> sequences; sequences.push_back(1); cin >> r; for (int i = 2; i <= n; i++) { int c; cin >> c; if (r == c) ++sequences...
a.cc:1:2: error: stray '#' in program 1 | g#include <iostream> | ^ a.cc:1:1: error: 'g' does not name a type 1 | g#include <iostream> | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/vector:62, from a.cc:2: /usr/include...
s280155511
p00450
C++
#include<cstdio> #include<vector> using namespace std; int main(void){ int n; while(scanf("%d", &n) && n != 0){ int array[100005]={0}; int count = 1; int temp; for(int i = 1; i <= n; i++){ scanf("%d", &temp); //”’‚È‚ç‚O //•‚È‚ç‚P‚ª“ü—Í‚³‚ê‚éB //”’‚Ȃ琳‚̐” //•‚Ȃ畉‚̐”‚ð”z—ñ‚É‚¢‚ê...
a.cc: In function 'int main()': a.cc:37:67: error: 'abs' was not declared in this scope 37 | array[count-2] += abs( array[count-1] )+1; | ^~~ a.cc:45:67: error: 'abs' was not declared in this scope...
s398053582
p00450
C++
#include <cstdio> #include <cstring> #include <cstdlib> #include <cmath> #include <string> #include <algorithm> #include <vector> #include <queue> #include <stack> #include <functional> #include <iostream> using namespace std; typedef pair<int,int> p; typedef pair<int,p> P; typedef pair<p,p> p2; #define pu push #define...
a.cc: In function 'int main()': a.cc:66:13: error: redeclaration of 'int st' 66 | int st=0; | ^~ a.cc:58:13: note: 'int st' previously declared here 58 | int st=0; | ^~
s007852390
p00450
C++
#include <vector> #include <cstdio> using namespace std; typedef pair<int,int>pii; main(){ int n,x,i; for(;scanf("%d%d",&n,&x),n;printf("%d\n",x)){ vector<pii>v; v.push_back(make_pair(x,1)); for(i=1;i<n;i++){ pii p=v.back();v.pop_back(); scanf("%d",&x); if(i&1){ if(x==p.first) v.push_back(make...
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:17:57: error: expected initializer before '.' token 17 | pii q=v.back(),v.pop_back(); | ...
s135279004
p00450
C++
#include <vector> #include <cstdio> typedef std::pair<int,int>pii; main(){ int n,x,i,q; pii p; for(;scanf("%d%d",&n,&x),n;printf("%d\n",x)){ std::vector<pii>v; v.push_back(make_pair(x,1)); for(i=1;i<n;i++) if(p=v.back(),scanf("%d",&x),x==p.first)v.back().second++; else if(i&1){ if(v.pop_back(),q=0,v....
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 4 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:9:29: error: 'make_pair' was not declared in this scope; did you mean 'std::make_pair'? 9 | v.push_back(make_pair(x,1)); | ...
s876326918
p00450
C++
#include <cstdio> #include <cstring> bool stone[100000]; int main() { int n; while(scanf("%d",&n),n) { memset(stone,0,sizeof(stone)); for(int i=0;i<n;i++) { scanf("%d",&stone[i]); if((i&1)&&(stone[i]^stone[i-1])) { for(int j=i-1;j>=0;j--) { if(stone[i]^stone[j]) stone[j^=1; else break; } ...
a.cc: In function 'int main()': a.cc:12:73: error: expected ']' before ';' token 12 | if(stone[i]^stone[j]) stone[j^=1; | ^ | ...
s176305849
p00450
C++
<iostream> #include<stack> using namespace std; int main() { int n; for(;cin>>n,n;) { stack<pair<int,int> >data; data.push(make_pair(0,0)); for(int i=0;i<n;i++) { int tmp; cin>>tmp; pair<int,int >tt; tt = data.top(); data.pop(); if(i%2!=0) { data.push(make_pair(...
a.cc:1:1: error: expected unqualified-id before '<' token 1 | <iostream> | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/deque:62, from /usr/include/c++/14/stack:62, from a.cc:2: /usr/include/c++/14/ext/type_trai...
s719931063
p00451
Java
import java.util.*; import java.lang.*; import java.math.*; import java.io.*; import static java.lang.Math.*; import static java.util.Arrays.*; class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); for(;sc.hasNext();){ String s=sc.next(); String t=sc.next(); System.out.println(lcs(s,t...
Main.java:15: error: non-static method lcs(String,String) cannot be referenced from a static context System.out.println(lcs(s,t)); ^ 1 error
s591980755
p00451
Java
import java.util.Scanner; public class A0528 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while (sc.hasNext()) { String s1 = sc.next(); String s2 = sc.next(); int dp[][] = new int[s1.length()][s2.length()]; int max = 0; for (int i = 0; i < s1.length(); i++) { ...
Main.java:3: error: class A0528 is public, should be declared in a file named A0528.java public class A0528 { ^ 1 error
s668957221
p00451
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; import java.util.Comparator; public class Main2 { /** * @param args * @throws IOException */ public static void main(String[] args) throws IOException { BufferedReader br = new BufferedRe...
Main.java:8: error: class Main2 is public, should be declared in a file named Main2.java public class Main2 { ^ 1 error
s779284565
p00451
C
#include <stdio.h> b=5e3,m,i,j,c; char s[10000],t[10000]; main() { gets(s+b); gets(t+b); m=0; for(i=-b;i<b;i++) { c=0; for(j=b;s[j];j++) { if(s[j]!=t[i+j]) c=0; else if(m<++c)m=c; } } printf("%d\n",m); return 0; }
main.c:2:1: warning: data definition has no type or storage class 2 | b=5e3,m,i,j,c; | ^ main.c:2:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int] main.c:2:7: error: type defaults to 'int' in declaration of 'm' [-Wimplicit-int] 2 | b=5e3,m,i,j,c; | ^ main.c:2:9: error: t...
s412444284
p00451
C
main(){ short_coding_muzui_owata(); }
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main(){ | ^~~~ main.c: In function 'main': main.c:2:1: error: implicit declaration of function 'short_coding_muzui_owata' [-Wimplicit-function-declaration] 2 | short_coding_muzui_owata(); | ^~~~~~~~~~~~~~~~~~~~~~~~
s971546983
p00451
C
#include <stdio.h> #include <string.h> #include <stdlib.h> int main(void) { static int dp[4001][4001]; char str1[4001], str2[4001]; int len1, len2; int i, j, ans; while (scanf("%s", str1) != EOF){ getchar(); scanf("%s", str2); getchar(); len1 = strlen(s...
main.c: In function 'main': main.c:28:40: error: implicit declaration of function 'min'; did you mean 'main'? [-Wimplicit-function-declaration] 28 | dp[i + 1][j + 1] = min(dp[i + 1][j], dp[i][j + 1]); | ^~~ | ...
s117208461
p00451
C
a=4005;char s[a],t[a];u[a],m,i,j,c;main(n){for(;~scanf("%s%s",s,t+1);i=m=!printf("%d\n",m)){for(n=strlen(s);!i|t[i];i++)for(j=n;j--;m<c?m=c:0)u[j+1]=c=s[j]-t[i]?0:u[j]+1;}}
main.c:1:1: warning: data definition has no type or storage class 1 | a=4005;char s[a],t[a];u[a],m,i,j,c;main(n){for(;~scanf("%s%s",s,t+1);i=m=!printf("%d\n",m)){for(n=strlen(s);!i|t[i];i++)for(j=n;j--;m<c?m=c:0)u[j+1]=c=s[j]-t[i]?0:u[j]+1;}} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'a'...
s091919350
p00451
C
char s[4005];u[4005],m,j,c,d;main(n){for(;d=~scanf("%s ",s,t);m=!printf("%d\n",m))for(n=strlen(s);d-10;d=getchar())for(j=n;j--;m<c?m=c:0)u[j+1]=c=s[j]-d?0:u[j]+1;}
main.c:1:14: warning: data definition has no type or storage class 1 | char s[4005];u[4005],m,j,c,d;main(n){for(;d=~scanf("%s ",s,t);m=!printf("%d\n",m))for(n=strlen(s);d-10;d=getchar())for(j=n;j--;m<c?m=c:0)u[j+1]=c=s[j]-d?0:u[j]+1;} | ^ main.c:1:14: error: type defaults to 'int' in declaration ...
s018020910
p00451
C
#include <iostream> #include <string> #include <algorithm> using namespace std; string a,b; int n,m; int solve(int x, int y){ int ret=0,cnt=0; while(x < n && y < m){ if(a[x] == b[y]){ cnt++; }else{ ret = max(ret,cnt); cnt = 0; } x++; y...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s560879297
p00451
C
#include<stdio.h> #include<string.h> int max(int,int); int main(void){ char str1[4001],str2[4001]; int i,j,dp[4001][4001],count; while(~scanf("%[^\n]%*c",str1)){ scanf("%[^\n]%*c",str2); for(i=0;i<=strlen(str1);i++) for(j=0;j<=strlen(str2);j++) dp[i][j]=0; count=0; for(i=0;i<strlen(str...
/usr/bin/ld: /tmp/cccIMsQy.o: in function `main': main.c:(.text+0x146): undefined reference to `max' collect2: error: ld returned 1 exit status
s011624866
p00451
C
#include<stdio.h> #include<stdlib.h> #define max(x, y) ((x) > (y) ? (x) : (y)) int main(){ int dp[4001][4001]; int i, j, k; while(scanf("%s %s", str1, str2) != EOF){ int res = 0; for(i = 0;i < strlen(str1);i++){ for(j = 0;j < strlen(str2);j++){ int x = 0; for(k = 0;i + k < strlen(str...
main.c: In function 'main': main.c:7:24: error: 'str1' undeclared (first use in this function) 7 | while(scanf("%s %s", str1, str2) != EOF){ | ^~~~ main.c:7:24: note: each undeclared identifier is reported only once for each function it appears in main.c:7:30: error: 'str2' undeclared...
s720918792
p00451
C
#include<stdio.h>#include <string.h>short dp[4001][4001]={},ans=0;char str1[2][4005];int main(){while(scanf("%s",str1[0])!=-1){scanf("%s",str1[1]);int a=strlen(str1[0]),b=strlen(str1[1]); for(int i=0;i<a;i++){for(int j=0;j<b;j++){if(str1[0][i]==str1[1][j]){if(!i || !j){dp[i][j]=1;if(!ans){ans++;}}else{dp[i][j]=1+dp[i-1...
main.c:1:18: warning: extra tokens at end of #include directive 1 | #include<stdio.h>#include <string.h>short dp[4001][4001]={},ans=0;char str1[2][4005];int main(){while(scanf("%s",str1[0])!=-1){scanf("%s",str1[1]);int a=strlen(str1[0]),b=strlen(str1[1]); for(int i=0;i<a;i++){for(int j=0;j<b;j++){if(str1[0][i]==str...
s591343330
p00451
C
#include<stdio.h> #include <string.h>short dp[4001][4001]={},ans=0;char str1[2][4005];int main(){while(scanf("%s",str1[0])!=EOF){scanf("%s",str1[1]);int a=strlen(str1[0]),b=strlen(str1[1]); for(int i=0;i<a;i++){for(int j=0;j<b;j++){if(str1[0][i]==str1[1][j]){if(!i || !j){dp[i][j]=1;if(!ans){ans++;}}else{dp[i][j]=1+dp[i...
main.c:1:19: warning: extra tokens at end of #include directive 1 | #include<stdio.h> #include <string.h>short dp[4001][4001]={},ans=0;char str1[2][4005];int main(){while(scanf("%s",str1[0])!=EOF){scanf("%s",str1[1]);int a=strlen(str1[0]),b=strlen(str1[1]); for(int i=0;i<a;i++){for(int j=0;j<b;j++){if(str1[0][i]==s...
s511744232
p00451
C
#include<stdio.h>#include <string.h> short dp[4001][4001]={},ans=0;char str1[2][4005];int main(){while(scanf("%s",str1[0])!=-1){scanf("%s",str1[1]);int a=strlen(str1[0]),b=strlen(str1[1]); for(int i=0;i<a;i++){for(int j=0;j<b;j++){if(str1[0][i]==str1[1][j]){if(!i || !j){dp[i][j]=1;if(!ans){ans++;}}else{dp[i][j]=1+dp[i-...
main.c:1:18: warning: extra tokens at end of #include directive 1 | #include<stdio.h>#include <string.h> | ^ main.c: In function 'main': main.c:2:118: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration] 2 | short dp[4001][4001]={},ans=0;char str1[2][4005];in...
s426027808
p00451
C
#include<stdio.h>#include <string.h> short dp[4001][4001]={},ans=0;char str1[2][4005];int main(){while(scanf("%s",str1[0])!=-1){scanf("%s",str1[1]);int a=strlen(str1[0]),b=strlen(str1[1]); for(int i=0;i<a;i++){for(int j=0;j<b;j++){if(str1[0][i]==str1[1][j]){if(!i || !j){dp[i][j]=1;if(!ans){ans++;}}else{dp[i][j]=1+dp[i-...
main.c:1:18: warning: extra tokens at end of #include directive 1 | #include<stdio.h>#include <string.h> | ^ main.c: In function 'main': main.c:2:118: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration] 2 | short dp[4001][4001]={},ans=0;char str1[2][4005];in...
s538452308
p00451
C
#include<stdio.h>#include <string.h> short dp[4001][4001]={},ans=0; char str1[2][4005]; int main(){while(scanf("%s",str1[0])!=EOF){scanf("%s",str1[1]);int a=strlen(str1[0]),b=strlen(str1[1]); for(int i=0;i<a;i++){for(int j=0;j<b;j++){if(str1[0][i]==str1[1][j]){ if(!i || !j){dp[i][j]=1;if(!ans){ans++;}}else{dp[i][j]=1+d...
main.c:1:18: warning: extra tokens at end of #include directive 1 | #include<stdio.h>#include <string.h> | ^ main.c: In function 'main': main.c:4:70: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration] 4 | int main(){while(scanf("%s",str1[0])!=EOF){scanf("%s...
s792710792
p00451
C++
#include<iostream> #include<cstdio> #include<string> using namespace std; int main() { char a[4000],b[4000]; while(scanf("%s",a)!=EOF){ scanf("%s",b); int t[4002][4002]; for(int i=0;i<=strlen(a);i++){ t[0][i]=0; } for(int j=0;j<=strlen(b);j++){ t[j][0]=0; } for(int i=1;i<=strlen(a);i++){ for(int j=1;j<=...
a.cc: In function 'int main()': a.cc:11:24: error: 'strlen' was not declared in this scope 11 | for(int i=0;i<=strlen(a);i++){ | ^~~~~~ a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<cstdio> ++...
s796775037
p00451
C++
#include<iostream> #include<cstdio> using namespace std; int dp[4001][4001]; int main(){ char str1[4001],str2[4001]; while(cin>>str1>>str2){ int ans=0; memset(dp,0,sizeof(dp)); for(int i=0;str1[i]!='\0';i++){ for(int j=0;str2[j]!='\0';j++){ if(str1[i]==str2[j]){ dp[i+1][j+1]=dp[i][j]+1; } ...
a.cc: In function 'int main()': a.cc:11:17: error: 'memset' was not declared in this scope 11 | 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> +++ |+#...
s075500794
p00451
C++
#include <iostream> #include <iomanip> #include <vector> #include <set> #include <map> #include <list> #include <iterator> #include <queue> #include <stack> #include <deque> #include <sstream> #include <algorithm> #include <numeric> #include <string> #include <cmath> #include <complex> #include <functional> #include <c...
a.cc: In function 'int main()': a.cc:64:28: error: could not convert '(((void)std::operator>><char, char_traits<char>, allocator<char> >((* & std::operator>><char, char_traits<char>, allocator<char> >(std::cin, L)), R)), L)' from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'bool' 64 | while(cin...
s474677690
p00451
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; int dp[4001][4001]; int main(){ string s, t; while(cin >> s >> t){ memset(dp, -1, sizeof(dp)); dp[0][0] = (s[0] == t[0]); for(int i = 1; i < s.size(); i++){ for(int j = 1; j < t.size(); j+...
a.cc: In function 'int main()': a.cc:13:9: error: 'memset' was not declared in this scope 13 | memset(dp, -1, sizeof(dp)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <algorithm> +++ |+#include <c...
s665369828
p00451
C++
#include<cstdio> #include<math.h> #include<algorithm> using namespace std; #define rep(i,n) for(int i=0;i<n;i++) const int INF=1001001001; char A[4002],B[4002]; int DP[4002][4002]; int main(){ while(1){ scanf("%s",A); scanf("%s",B); memset(DP,0,sizeof(DP)); int ans=0; rep(i,strlen(A)){ rep(j,strlen(B)...
a.cc: In function 'int main()': a.cc:17:17: error: 'memset' was not declared in this scope 17 | memset(DP,0,sizeof(DP)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include<algorithm> +++ ...
s134258808
p00451
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; int main() { string s, t; int roop1, roop2 = 0, save[10000], ans = 0; while(1){ cin >> s >> t; if(s=='') break; for (int i = 0; i<s.size(); i++){ for (int j = 0; j<t.size(); j++){ if (s[i] == t[j]){ roop1 = 0; save[roop2]...
a.cc:9:15: error: empty character constant 9 | if(s=='') | ^~ a.cc: In function 'int main()': a.cc:9:13: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 9 | if(s=='') | ~^~~~ | ...
s075212997
p00451
C++
//JOI 0528 Common Sub-String #include <iostream> #include <string> #include <algorithm> using namespace std; int main() { string s, t; int roop1, roop2 = 0, save[10000], ans = 0; while(1){ cin>>s>>t for (int i = 0; i<s.size(); i++){ for (int j = 0; j<t.size(); j++){ if (s[i] == t[j]){ roop1 = 0; ...
a.cc: In function 'int main()': a.cc:9:18: error: expected ';' before 'for' 9 | cin>>s>>t | ^ | ; 10 | for (int i = 0; i<s.size(); i++){ | ~~~ a.cc:10:25: error: 'i' was not declared in this scope 10 | for (int i = 0; i...
s977354575
p00451
C++
//JOI 0528 Common Sub-String #include <iostream> #include <string> #include <algorithm> using namespace std; int main() { string s, t; int roop1, roop2 = 0, save[10000], ans = 0; while(cin>>s>>t&&){ for (int i = 0; i<s.size(); i++){ for (int j = 0; j<t.size(); j++){ if (s[i] == t[j]){ roop1 = 0; save[ro...
a.cc: In function 'int main()': a.cc:8:26: error: expected primary-expression before ')' token 8 | while(cin>>s>>t&&){ | ^
s329782442
p00451
C++
//JOI 0528 Common Sub-String #include <iostream> #include <string> #include <algorithm> using namespace std; int main() { string s, t; int roop1, roop2 = 0, save[10000], ans = 0; while(cin){ cin>>s>>t: if(cin.eof()) break; for (int i = 0; i<s.size(); i++){ for (int j = 0; j<t...
a.cc: In function 'int main()': a.cc:9:23: error: expected ';' before ':' token 9 | cin>>s>>t: | ^ | ;
s867764083
p00451
C++
//JOI 0528 Common Sub-String #include <iostream> #include <string> #include <algorithm> using namespace std; int main() { while(cin){ string s, t; int roop1=0, save=0, ans = 0; cin>>s; cin>>t; if(s==/0){ break; } for (int i = 0; i<s.size(); i++){ for (int j = 0; j<t.size(); j++){ if (s[i] == t[j]){ ...
a.cc: In function 'int main()': a.cc:11:23: error: expected primary-expression before '/' token 11 | if(s==/0){ | ^
s016553155
p00451
C++
//JOI 0528 Common Sub-String #include <iostream> #include <string> #include <algorithm> using namespace std; int main() { while(1){ string s, t; int roop1=0, save=0, ans = 0; cin>>s; cin>>t; if(s==\0){ break; } for (int i = 0; i<s.size(); i++){ for (int j = 0; j<t.size(); j++){ if (s[i] == t[j]){ ...
a.cc:11:23: error: stray '\' in program 11 | if(s==\0){ | ^ a.cc: In function 'int main()': a.cc:11:21: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int') 11 | if(s==\0){ | ...
s065822778
p00451
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; int main() { while(true){ string s,t; cin>>s>>t; if(s){ break; } int ans=0; for(int i=0;i<s.size();i++){ for(int j=0;j<t.size();j++){ if(s[i]==t[j]){ int sum=0; sum++; for(int k=1;k<min(s.size(),t.si...
a.cc: In function 'int main()': a.cc:10:20: error: could not convert 's' from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'bool' 10 | if(s){ | ^ | | | std::string {aka std::__cxx11::basic_string<char>}
s262358668
p00451
C++
#include<bits/stdc++.h> using namespace std; short cnt[4100][4100]; int main(){ string str1,str2; while(cin >> str1){ cin >> str2; int len1 = str1.size(); int len2 = str2.size(); str1 = ' ' + str1; str2 = ' ' + str2; for(int i=1;i<=len1;i++){ cnt[i][0] = 0; } for(int i=1;i<=le...
a.cc: In function 'int main()': a.cc:27:18: error: no matching function for call to 'max(int&, short int&)' 27 | ret = max(ret,cnt[i][j]); | ~~~^~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:...
s972571957
p00451
C++
#include <algorithm> #include <bitset> #include <cstdio> #include <cstring> #include <cassert> #include <cmath> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <tuple> #include <utility> #include <vector> using namespace std; typedef long long LL; typedef pair<int, int...
a.cc: In function 'int main()': a.cc:45:26: error: no matching function for call to 'max(int&, short int&)' 45 | ret = max(ret, dp[j][k]); | ~~~^~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from a.cc:1: /usr/include/c++/14/bits/st...
s149860841
p00451
C++
#include <iostream> using namespace std; #define FOR(i,a,b) for (int i=(a);i<(b);i++) #define REP(i,n) for (int i=0;i<(n);i++) #define PB push_back #define MP make_pair #define LL long long const int INF = 1145141919; int dp[4002][4002]; int main(){ string s1, s2; while (cin >> s1){ cin >> s2; int ans = 0; m...
a.cc: In function 'int main()': a.cc:17:17: error: 'memset' was not declared in this scope 17 | memset (dp, 0, sizeof(dp)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +...
s953970087
p00451
C++
#include <iostream> #include <cstdio> using namespace std; #define FOR(i,a,b) for (int i=(a);i<(b);i++) #define REP(i,n) for (int i=0;i<(n);i++) #define PB push_back #define MP make_pair #define LL long long const int INF = 1145141919; int dp[4002][4002]; int main(){ string s1, s2; while (cin >> s1){ cin >> s2; ...
a.cc: In function 'int main()': a.cc:18:17: 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> +++...
s051137703
p00451
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; int dp[4001][4001]; void solve() { string a, b; while (cin >> a) { cin >> b; memset(dp, 0, sizeof(dp)); int ans = 0; for (int i = 0; i < a.size(); ++i) { for (int j = 0; j < b.size(); ++j) { if (a[i] == b[j]) {...
a.cc: In function 'void solve()': a.cc:15:17: error: 'memset' was not declared in this scope 15 | memset(dp, 0, sizeof(dp)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <algorithm> ...
s344860057
p00451
C++
#include <string> #include <vector> #include <iostream> #include <algorithm> using namespace std; class SuffixArray { void CEB(vector<int> &v, vector<int> &b) { int vs = v.size(), bs = b.size(); fill(b.begin(), b.end(), 0); for (int i = 0; i < vs; i++) b[v[i]]++; for (int i = 1; i < bs; i++) b[i] += b[i - 1]; ...
a.cc: In function 'int main()': a.cc:117:39: error: cannot bind non-const lvalue reference of type 'std::string&' {aka 'std::__cxx11::basic_string<char>&'} to an rvalue of type 'std::__cxx11::basic_string<char>' 117 | SuffixArray v(s + "$" + t); | ~~~~~~~~^~~ a.cc:1...
s753371712
p00451
C++
#include <string> #include <vector> #include <iostream> #include <algorithm> using namespace std; class SuffixArray { void CEB(vector<int> &v, vector<int> &b) { int vs = v.size(), bs = b.size(); fill(b.begin(), b.end(), 0); for (int i = 0; i < vs; i++) b[v[i]]++; for (int i = 1; i < bs; i++) b[i] += b[i - 1]; ...
a.cc: In function 'int main()': a.cc:117:47: error: cannot bind non-const lvalue reference of type 'std::string&' {aka 'std::__cxx11::basic_string<char>&'} to an rvalue of type 'std::__cxx11::basic_string<char>' 117 | SuffixArray v(s + string("$") + t); | ~~~~~~~~~~...
s066491368
p00451
C++
#include <iostream> #include <string> using namespace std; #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define REP(i,n) FOR(i,0,n) int ans, dp[4001][4001]; int main() { while (true) { ans = 0; memset(dp, 0, sizeof(dp)); string str[2]; cin >> str[0]; if (str[0].empty()) break; cin >> str[1]; REP(i, (i...
a.cc: In function 'int main()': a.cc:14:17: error: 'memset' was not declared in this scope 14 | memset(dp, 0, sizeof(dp)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> ++...
s973304284
p00451
C++
#include <iostream> #include <algorithm> #include <climits> #include <string> #include <vector> #include <cmath> using namespace std; #define rep(i, n) for (int i=0; i<int(n); i++) #define rep3(i, s, n) for (int i=int(s); i<int(n); i++) #define rev_rep(i, n) for (int i=int(n)-1; i>=0; i-=1) char s[4010]; char...
a.cc: In function 'int main()': a.cc:19:15: error: 'strlen' was not declared in this scope 19 | int s_len = strlen(s), t_len = strlen(t); | ^~~~~~ a.cc:7:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 6 | #include <cmath> +++ |+...
s737341936
p00451
C++
#include <iostream> #include <algorithm> #include <climits> #include <string> #include <vector> #include <cmath> #include <cstdlib> using namespace std; #define rep(i, n) for (int i=0; i<int(n); i++) #define rep3(i, s, n) for (int i=int(s); i<int(n); i++) #define rev_rep(i, n) for (int i=int(n)-1; i>=0; i-=1) ...
a.cc: In function 'int main()': a.cc:20:15: error: 'strlen' was not declared in this scope 20 | int s_len = strlen(s), t_len = strlen(t); | ^~~~~~ a.cc:8:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 7 | #include <cstdlib> +++ ...
s229384990
p00451
C++
#include "bits/stdc++.h" #include<unordered_map> #include<unordered_set> #pragma warning(disable:4996) using namespace std; using ld = long double; template<class T> using Table = vector<vector<T>>; const ld eps=1e-9; //// < "D:\D_Download\Visual Studio 2015\Projects\programing_contest_c++\Debug\a.txt" > "D:\D_Downloa...
a.cc: In function 'int main()': a.cc:14:29: error: expected ')' before ';' token 14 | while (cin >> a >> b;) { | ~ ^ | ) a.cc:14:30: error: expected primary-expression before ')' token 14 | while (cin >> a >> b;) { | ...
s908384663
p00451
C++
#include <bits/stdc++.h> using namespace std; #define Rep(i,N) for(int i = 0; i < N; i++) int main() { string S, W; while(cin >> S >> W) { int dp[4005] = {0}; int maxv = 0; Rep(i,W.size()) { for(int j = S.size(); j > 0; j--) { if(S[j - 1] == W[i]) { dp[j] = dp[j - 1] + 1; maxv = max(maxv, ...
a.cc: In function 'int main()': a.cc:20:11: error: 'maxv' was not declared in this scope 20 | cout << maxv << endl; | ^~~~
s756109451
p00451
C++
#include<cstdio> #include <iostream> #include<algorithm> #include<string> #include<queue> #include<vector> #include<functional> #include<cmath> #include<map> #include<stack> #include<cstdlib> #include<list> #include<set> #include<numeric> #define MOD 1000000007 using namespace std; typedef long long ll; typedef pair<...
a.cc: In function 'int main()': a.cc:29:29: error: 'strlen' was not declared in this scope 29 | int len_a = strlen(a); | ^~~~~~ a.cc:15:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 14 | #include<numeri...
s931817692
p00451
C++
include<bits/stdc++.h> using namespace std; #define FOR(i,a,b) for(int i=(a);i<(b);i++) #define REP(i,n) for(int i=0;i<(n);i++) #define VS vector<string> int main(void) { string s,t; int max=0; while(cin >> s >> t) { int ...
a.cc:1:1: error: 'include' does not name a type 1 | include<bits/stdc++.h> | ^~~~~~~ a.cc: In function 'int main()': a.cc:8:5: error: 'string' was not declared in this scope 8 | string s,t; | ^~~~~~ a.cc:10:11: error: 'cin' was not declared in this scope 10 | while(cin >> s >> t) { ...
s255393162
p00451
C++
#include <bits/stdc++.h> #define ll long long #define rep(i,n) for(int i=0;i<n;i++) #define INF 100000005 #define MAX 5001 using namespace std; //__gcd(a,b), __builtin_popcount(a); int dp[4005][4005]; int main(){ string s1, s2; while(cin >> s1 >> s2, s1){ s1 = " " + s1;s2 = " " + s2; fill((int*)dp, (int*)(dp+4005)...
a.cc: In function 'int main()': a.cc:12:30: error: could not convert '(((void)std::operator>><char, char_traits<char>, allocator<char> >((* & std::operator>><char, char_traits<char>, allocator<char> >(std::cin, s1)), s2)), s1)' from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'bool' 12 | while(...
s144552872
p00451
C++
#include "bits/stdc++.h" using namespace std; typedef long long ll; #define INF (1<<30) #define INFLL (1ll<<60) typedef pair<int, int> P; typedef pair<ll, P> E; #define MOD (1000000007ll) #define l_ength size #define PI 3.14159265358979 void mul_mod(ll& a, ll b){ a *= b; a %= MOD; } void add_mod(ll& a, ll b...
a.cc: In function 'int main()': a.cc:53:26: error: no matching function for call to 'max(ll&, int)' 53 | ans = max(ans,dp(i,j)); | ~~~^~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc+...
s328884905
p00451
C++
#include "bits/stdc++.h" using namespace std; typedef long long ll; #define INF (1<<30) #define INFLL (1ll<<60) typedef pair<int, int> P; typedef pair<ll, P> E; #define MOD (1000000007ll) #define l_ength size #define PI 3.14159265358979 void mul_mod(ll& a, ll b){ a *= b; a %= MOD; } void add_mod(ll& a, ll b...
a.cc: In function 'int main()': a.cc:53:26: error: no matching function for call to 'max(ll&, int)' 53 | ans = max(ans,dp(i,j)); | ~~~^~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc+...
s916889540
p00451
C++
#include<cstdio> #include<iostream> #include<vector> #include<algorithm> #include<map> #include<set> #include<queue> #include<string> 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 sint(i) scanf("%d",&i); #define sintt(i,j) scanf("%d%d",&i,&j); #de...
a.cc: In function 'int main()': a.cc:42:41: error: no matching function for call to 'max(int&, short int&)' 42 | maxi=max(maxi,dp[i][j]); | ~~~^~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/inc...
s764103475
p00451
C++
class Main{ }
a.cc:3:2: error: expected ';' after class definition 3 | } | ^ | ;
s793154852
p00451
C++
class Main{ }
a.cc:3:2: error: expected ';' after class definition 3 | } | ^ | ;
s501030076
p00451
C++
class Main{ public static void main(){ Scanner sc=new Scanner(System.in); for(;sc.hasNext();){ String s=sc.next(); String t=sc.next(); System.out.println(lcs(s,t).length()); } } static String lcs(String s, String t){ int m=s.length(), n=t.length(); int[][] d=new int[n+1][m+1]; int[][] v=new int[n+1][m+1]; for...
a.cc:2:7: error: expected ':' before 'static' 2 | public static void main(){ | ^~~~~~~ | : a.cc:11:16: error: 'String' does not name a type 11 | static String lcs(String s, String t){ | ^~~~~~ a.cc:45:2: error: expected ';' after class definition 45 | } ...
s805559808
p00451
C++
class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); for(;sc.hasNext();){ String s=sc.next(); String t=sc.next(); System.out.println(lcs(s,t).length()); } } static String lcs(String s, String t){ int m=s.length(), n=t.length(); int[][] d=new int[n+1][m+1]; int[][] v=new int[n+1...
a.cc:2:7: error: expected ':' before 'static' 2 | public static void main(String[] args){ | ^~~~~~~ | : a.cc:2:25: error: 'String' has not been declared 2 | public static void main(String[] args){ | ^~~~~~ a.cc:2:34: error: expected ',' or '...' before 'args...
s813086080
p00451
C++
import java.util.*; import java.lang.*; import java.math.*; import java.io.*; import static java.lang.Math.*; import static java.util.Arrays.*; public class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); for(;sc.hasNext();){ String s=sc.next(); String t=sc.next(); System.out.println(...
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:2:1: error: 'import' does not name a type 2 | import java.lang.*; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1...
s248737793
p00451
C++
import java.util.*; import java.lang.*; import java.math.*; import java.io.*; import static java.lang.Math.*; import static java.util.Arrays.*; public class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); for(;sc.hasNext();){ String s=sc.next(); String t=sc.next(); System.out.println(...
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:2:1: error: 'import' does not name a type 2 | import java.lang.*; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1...
s559999166
p00451
C++
import java.util.*; import java.lang.*; import java.math.*; import java.io.*; import static java.lang.Math.*; import static java.util.Arrays.*; class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); for(;sc.hasNext();){ String s=sc.next(); String t=sc.next(); System.out.println(lcs(s,t...
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:2:1: error: 'import' does not name a type 2 | import java.lang.*; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1...
s560733195
p00451
C++
#include <iostream> #include <algorithm> #include <string> #include <fstream> using namespace std; int check(string, string); int main() { //ifstream ifs("data.txt"); string str1, str2; while( cin >> str1 >> str2 ){ int res = 0; for(int i = 0; i < max(str1.size(), str2.size()); i++){ if(str1.si...
a.cc: In function 'int main()': a.cc:29:3: error: 'ifs' was not declared in this scope 29 | ifs.close(); | ^~~ a.cc: In function 'int check(std::string, std::string)': a.cc:39:5: error: 'else' without a previous 'if' 39 | else{ | ^~~~
s545552902
p00451
C++
char s[4005],t[4005];u[4005],m,i,j,c,d;main(n){for(;d=~scanf("%s%s",s,t);i=m=!printf("%d\n",m))for(n=strlen(s);d;d=t[i++])for(j=n;j--;m<c?m=c:0)u[j+1]=c=s[j]-d?0:u[j]+1;}
a.cc:1:22: error: 'u' does not name a type 1 | char s[4005],t[4005];u[4005],m,i,j,c,d;main(n){for(;d=~scanf("%s%s",s,t);i=m=!printf("%d\n",m))for(n=strlen(s);d;d=t[i++])for(j=n;j--;m<c?m=c:0)u[j+1]=c=s[j]-d?0:u[j]+1;} | ^ a.cc:1:44: error: expected constructor, destructor, or type convers...