submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s681150137
p01752
C++
#include<iostream> #include<algorithm> using namespace std; int main(){ int N,M; cin>>N>>M; char g[52][53]; fill(g[0],g[52],'#'); int y,x,d; for(int i=1;i<=N;i++){ for(int j=1;j<=M;j++){ cin>>g[i][j]; if(g[i][j]=='^'){ d=0; y=i; x=j; }else if(g[i][j]=='>'){ d=1; y=i; x=j; ...
a.cc: In function 'int main()': a.cc:36:17: error: use of an operand of type 'bool' in 'operator++' is forbidden in C++17 36 | if(u[y][x][d]++)break; | ~~~~~~~~~^ a.cc:53:9: error: invalid conversion from 'const int*' to 'int' [-fpermissive] 53 | y=dy; | ^~ | | ...
s643457719
p01752
C++
//#include<bits/stdc++.h> #include<iostream> #include<vector> #include<queue> #include<set> using namespace std; typedef pair<int,int> XY; struct P{ int x,y,d; set<XY> s; P(){} P(int x,int y,int d,set<XY> s):x(x),y(y),d(d),s(s){} }; string st[52]; int n,m; bool ch(int x,int y,int d){ if(d==0){ if(st[y...
a.cc: In function 'int main()': a.cc:125:3: error: 'memset' was not declared in this scope 125 | memset(used,false,sizeof(used)); | ^~~~~~ a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 5 | #include<set> +++ |+#include <cstring> 6...
s522520616
p01752
C++
//#include<bits/stdc++.h> #include<iostream> #include<vector> #include<queue> #include<set> using namespace std; typedef pair<int,int> XY; struct P{ int x,y,d; set<XY> s; P(){} P(int x,int y,int d,set<XY> s):x(x),y(y),d(d),s(s){} }; string st[52]; int n,m; int main(){ cin >> n >> m; int i,j,k; for(j=0...
a.cc: In function 'int main()': a.cc:58:3: error: 'memset' was not declared in this scope 58 | memset(used,false,sizeof(used)); | ^~~~~~ a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 5 | #include<set> +++ |+#include <cstring> 6 ...
s553659007
p01752
C++
#include <bits/stdc++.h> using namespace std; using vi=vector<int>; using vvi=vector<vi>; using vs=vector<string>; using msi=map<string,int>; using mii=map<int,int>; using pii=pair<int,int>; using vlai=valarray<int>; using ll=long long; #define rep(i,n) for(int i=0;i<n;i++) #define range(i,s,n) for(int i=s;i<n;i++) #de...
a.cc: In function 'int main()': a.cc:61:13: error: break statement not within loop or switch 61 | break; | ^~~~~ a.cc: At global scope: a.cc:64:5: error: expected unqualified-id before 'if' 64 | if(y==gy&&x==gx){ | ^~ a.cc:68:6: error: expected unqualified-id before 'el...
s719464069
p01752
C++
#include <bits/stdc++.h> using namespace std; using vi=vector<int>; using vvi=vector<vi>; using vs=vector<string>; using msi=map<string,int>; using mii=map<int,int>; using pii=pair<int,int>; using vlai=valarray<int>; using ll=long long; #define rep(i,n) for(int i=0;i<n;i++) #define range(i,s,n) for(int i=s;i<n;i++) #de...
a.cc: In function 'int main()': a.cc:61:13: error: break statement not within loop or switch 61 | break; | ^~~~~ a.cc: At global scope: a.cc:64:5: error: expected unqualified-id before 'if' 64 | if(y==gy&&x==gx){ | ^~ a.cc:68:6: error: expected unqualified-id before 'el...
s959453496
p01753
C++
using namespace std; typedef long long int ll; struct Point{ ll x,y,z; Point(){}; Point(ll x,ll y,ll z):x(x),y(y),z(z){} Point operator+(Point p){ return Point(x+p.x,y+p.y,z+p.z); } Point operator-(Point p){ return Point(x-p.x,y-p.y,z-p.z); } }; ll dot(Point a,Point b){ return (a.x*b.x+a.y*b.y+a...
a.cc: In function 'int main()': a.cc:38:3: error: 'cin' was not declared in this scope 38 | cin >> n >> q; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | using namespace std; a.cc:57:5: error: ...
s219295064
p01753
C++
#include <iostream> using namespace std; int n,qc,x[51],y[51],z[51],rl[51]; double dx,dy,dz,sx,sy,sz,a,b,c,p,q,r; long long int l[51],sum; double t,lt; int main(){ cin >>n >>qc; for(int i=0;i<n;i++){ cin >>x[i] >>y[i] >>z[i] >>rl[i] >>l[i]; } for(int i=0;i<qc;i++){ sum=0; cin >>sx >>sy >>sz >>dx >>dy >>dz; ...
a.cc: In function 'int main()': a.cc:26:36: error: expected ';' before '}' token 26 | t=0 | ^ | ; 27 | } | ~
s383104793
p01753
C++
#include "bits/stdc++.h" #define REP(i,n) for(ll i=0;i<n;++i) #define RREP(i,n) for(ll i=n-1;i>=0;--i) #define FOR(i,m,n) for(ll i=m;i<n;++i) #define RFOR(i,m,n) for(ll i=n-1;i>=m;--i) #define ALL(v) (v).begin(),(v).end() #define PB(a) push_back(a) #define UNIQUE(v) v.erase(unique(ALL(v)),v.end()); #define DUMP(v) REP...
a.cc: In function 'int main()': a.cc:50:122: error: expected primary-expression before ')' token 50 | if (D >=0 && (-in(a,b,c, vx, vy, vz) > EPS + sqrt(D)|| -in(a, b, c, vx, vy, vz) > EPS - sqrt(D))))ans += l[j]; | ...
s635084867
p01754
Java
import java.util.*; public class Dinner { public static void main(String[] args) { new Dinner().solver(); } void solver() { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int P = sc.nextInt(); int Q = sc.nextInt(); int[] C = new int[N]; for (int i = 0; i < N; i++) { C[i] = sc.nextInt()...
Main.java:3: error: class Dinner is public, should be declared in a file named Dinner.java public class Dinner { ^ 1 error
s616260725
p01754
Java
import java.util.Arrays; import java.util.Comparator; import java.util.Scanner; public class Main{ public static void main(String[] args) { new Dinner().Main(); } void solver() { Scanner sc = new Scanner(System.in); long N = sc.nextLong(); long P = sc.nextLong(); long Q = sc.nextLong(); long[] C = new ...
Main.java:7: error: cannot find symbol new Dinner().Main(); ^ symbol: class Dinner location: class Main 1 error
s383650396
p01754
Java
import java.util.Arrays; import java.util.Comparator; import java.util.Scanner; public class Main{ public static void main(String[] args) { new Dinner().Main(); } void solver() { Scanner sc = new Scanner(System.in); long N = sc.nextLong(); long P = sc.nextLong(); long Q = sc.nextLong(); long[] C = new ...
Main.java:7: error: cannot find symbol new Dinner().Main(); ^ symbol: class Dinner location: class Main 1 error
s739273254
p01754
C
const int MAXN = 500500; int C[MAXN]; int main() { int N; ll P, Q; cin >> N >> P >> Q; ll sum = 0; vector<pair<ll, int> > ps; for (int i = 0; i < N; i++) { cin >> C[i]; sum += C[i]; ps.emplace_back(C[i]+P*i, i); } sort(ps.begin(), ps.end()); ll ans = -1ll<<55...
main.c:2:5: error: variably modified 'C' at file scope 2 | int C[MAXN]; | ^ main.c: In function 'main': main.c:6:5: error: unknown type name 'll' 6 | ll P, Q; | ^~ main.c:7:5: error: 'cin' undeclared (first use in this function) 7 | cin >> N >> P >> Q; | ^~~ main.c:7:5:...
s818678787
p01754
C++
#include <iostream> #include <functional> #include <vector> using namespace std; int ans = -500000, N, P, Q; int C[500000]; vector < pair < int, int > > pairs; int cook_k_times(int k, int Q, int P){ //k回自炊する場合 int H = 0; //幸福度 int Q_buff = Q; bool label[500000]={}; //ラベル for(int i = 0; i < k; ++i) la...
a.cc: In function 'int main()': a.cc:37:5: error: 'sort' was not declared in this scope; did you mean 'short'? 37 | sort(pairs.begin(), pairs.end()); | ^~~~ | short
s668548811
p01754
C++
const int MAXN = 500500; int C[MAXN]; int main() { int N; ll P, Q; cin >> N >> P >> Q; ll sum = 0; vector<pair<ll, int> > ps; for (int i = 0; i < N; i++) { cin >> C[i]; sum += C[i]; ps.emplace_back(C[i]+P*i, i); } sort(ps.begin(), ps.end()); ll ans = -1ll<<55...
a.cc: In function 'int main()': a.cc:6:5: error: 'll' was not declared in this scope 6 | ll P, Q; | ^~ a.cc:7:5: error: 'cin' was not declared in this scope 7 | cin >> N >> P >> Q; | ^~~ a.cc:7:17: error: 'P' was not declared in this scope 7 | cin >> N >> P >> Q; | ...
s642454076
p01754
C++
#include<bits/stdc++.h> using namespace std; long long a[900000],c[900000],x[900000],n,p,q,sum,maxn; int main() { cin>>n>>p>>q;c[0]=p*q; for(int i=0;i<n;i++){cin>>a[i];a[i]-=(q-i)*p;sum+=b[i];} sort(a,a+n);maxn=sum; for(int i=0;i<n;i++){ sum-=a[i]; sum+=2*i*p; maxn=max(sum,maxn);...
a.cc: In function 'int main()': a.cc:6:55: error: 'b' was not declared in this scope 6 | for(int i=0;i<n;i++){cin>>a[i];a[i]-=(q-i)*p;sum+=b[i];} | ^
s897464171
p01754
C++
#include <iostream> #include <vector> #include <set> #include <map> #include <string> #include <stack> #include <functional> #include <queue> #include <tuple> #include <cstring> #include <iomanip> using namespace std; #define rep(i,n) for(int i = 0;i < n;i++) #define each(i,n) for(auto i : n) #define all(n) n.begin()...
a.cc: In function 'int main()': a.cc:32:9: error: 'sort' was not declared in this scope; did you mean 'short'? 32 | sort(all(c)); | ^~~~ | short
s156167791
p01754
C++
#include <iostream> using namespace std; int main(){ int N, P, Q; int C[500000]; cin >> N >> P >> Q; for(int i=0;i<N;i++) cin >> C[i]; int x[500001]={}, y[500001]={}; y[0]=P*Q; y[1]=C[0]; for(int i=1;i<N;i++){ for(int k=0;k<500001;k++) x[k]=y[k]; y[0]=x[0]+P*(Q+i); for(int j=1;j<=i;j++){...
a.cc: In function 'int main()': a.cc:25:3: error: 'sort' was not declared in this scope; did you mean 'short'? 25 | sort(y,y+(N+1)); | ^~~~ | short
s034835594
p01754
C++
#include <iostream> using namespace std; int main(){ int N, P, Q; int C[500000]; cin >> N >> P >> Q; for(int i=0;i<N;i++) cin >> C[i]; int x[500001], y[500001]; y[0]=P*Q; y[1]=C[0]; for(int i=1;i<N;i++){ for(int k=0;k<500001;k++) x[k]=y[k]; y[0]=x[0]+P*(Q+i); for(int j=1;j<=i;j++){ ...
a.cc: In function 'int main()': a.cc:25:3: error: 'sort' was not declared in this scope; did you mean 'short'? 25 | sort(y,y+(N+1)); | ^~~~ | short
s547629829
p01754
C++
#include <iostream> using namespace std; int main(){ int N, P, Q; int C[500000]; cin >> N >> P >> Q; for(int i=0;i<N;i++) cin >> C[i]; int x[500001]={}; int y[500001]={}; y[0]=P*Q; y[1]=C[0]; for(int i=1;i<N;i++){ for(int k=0;k<500001;k++) x[k]=y[k]; y[0]=x[0]+P*(Q+i); for(int j=1;j<=i...
a.cc: In function 'int main()': a.cc:26:3: error: 'sort' was not declared in this scope; did you mean 'short'? 26 | sort(y,y+(N+1)); | ^~~~ | short
s000781150
p01754
C++
#include <iostream> using namespace std; int main(){ int N, P, Q; int C[500000]; cin >> N >> P >> Q; for(int i=0;i<N;i++) cin >> C[i]; int x[500001]={}; int y[500001]={}; y[0]=P*Q; y[1]=C[0]; for(int i=1;i<N;i++){ for(int k=0;k<500001;k++) x[k]=y[k]; y[0]=x[0]+P*(Q+i); for(int j=1;j<=i...
a.cc: In function 'int main()': a.cc:26:3: error: 'sort' was not declared in this scope; did you mean 'short'? 26 | sort(y,y+(N+1)); | ^~~~ | short
s074833566
p01754
C++
#include <iostream> using namespace std; int main(){ int N, P, Q; int C[500000]; cin >> N >> P >> Q; for(int i=0;i<N;i++) cin >> C[i]; int x[500001]; int y[500001]; y[0]=P*Q; y[1]=C[0]; for(int i=1;i<N;i++){ for(int k=0;k<500001;k++) x[k]=y[k]; y[0]=x[0]+P*(Q+i); for(int j=1;j<=i;j++){...
a.cc: In function 'int main()': a.cc:26:3: error: 'sort' was not declared in this scope; did you mean 'short'? 26 | sort(y,y+(N+1)); | ^~~~ | short
s051644103
p01754
C++
#include<cstdio> #include<cstring> #include<vector> #include<queue> #include<algorithm> #include<cmath> #include<climits> #include<string> #include<set> #include<numeric> #include<map> #include<iostream> using namespace std; #define rep(i,n) for(int i = 0;i<((int)(n));i++) #define reg(i,a,b) for(int i = ((int)(a));i<=(...
a.cc: In function 'int main()': a.cc:35:37: error: 'max' cannot be used as a function 35 | DP[i][j]=max(DP[i-1][j]+C[i],DP[i-1][j-1]+(Q+(i-1)-2*j)*P); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
s619949137
p01754
C++
#include <iostream> #include <iomanip> #include <cstdio> #include <string> #include <cstring> #include <deque> #include <list> #include <queue> #include <stack> #include <vector> #include <utility> #include <algorithm> #include <map> #include <set> #include <complex> #include <cmath> #include <limits> #include <cfloat>...
a.cc: In function 'int main()': a.cc:54:26: error: 'D' was not declared in this scope 54 | if(i < N) sum -= D[i]; | ^
s561408205
p01754
C++
#include <iostream> #include <algorithm> #include <vector> #define max(a,b) ((a)>(b)?(a):(b)) typedef long long LL; int main(){ int n,p,q; cin >> n >> p >> q; vector<int> c(n); for(int i=0;i<n;i++){ cin >> c[i]; c[i]+=i*p; } sort(c.begin(),c.end(),greater<int>()); LL ans=(q*n+n*(n-1)/2)*p; LL...
a.cc: In function 'int main()': a.cc:11:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 11 | cin >> n >> p >> q; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Li...
s115899314
p01754
C++
#include <bits/stdc++.h> #define max(a,b) ((a)>(b)?(a):(b)) typedef long long LL; int main(){ int n,p,q; cin >> n >> p >> q; vector<int> c(n); for(int i=0;i<n;i++){ cin >> c[i]; c[i]+=i*p; } sort(c.begin(),c.end(),greater<int>()); LL ans=(q*n+n*(n-1)/2)*p; LL ruiseki=0; for(int i=0;i<n;i++)...
a.cc: In function 'int main()': a.cc:9:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 9 | cin >> n >> p >> q; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, from a.cc:1: /usr/include/c++/14/iostream:62:18: n...
s887369738
p01754
C++
#include <bits/stdc++.h> #define max(a,b) ((a)>(b)?(a):(b)) typedef long long LL; void main(){ int n,p,q; cin >> n >> p >> q; vector<int> c(n); for(int i=0;i<n;i++){ cin >> c[i]; c[i]+=i*p; } sort(c.begin(),c.end(),greater<int>()); LL ans=(q*n+n*(n-1)/2)*p; LL ruiseki=0; for(int i=0;i<n;i++...
a.cc:7:1: error: '::main' must return 'int' 7 | void main(){ | ^~~~ a.cc: In function 'int main()': a.cc:9:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 9 | cin >> n >> p >> q; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/std...
s339625644
p01754
C++
#include <bits/stdc++.h> #define max(a,b) ((a)>(b)?(a):(b)) typedef long long LL; int main(){ int n,p,q; cin >> n >> p >> q; vector<int> c(n); for(int i=0;i<n;i++){ cin >> c[i]; c[i]+=i*p; } sort(c.begin(),c.end(),greater<int>()); LL ans=(q*n+n*(n-1)/2)*p; LL ruiseki=0; for(int i=0;i<n;i++)...
a.cc: In function 'int main()': a.cc:9:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 9 | cin >> n >> p >> q; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, from a.cc:1: /usr/include/c++/14/iostream:62:18: n...
s539258105
p01754
C++
#include <bits/stdc++.h> #define max(a,b) ((a)>(b)?(a):(b)) typedef long long LL; int main(){ int n,p,q; cin >> n >> p >> q; vector<int> c(n); for(int i=0;i<n;i++){ cin >> c[i]; c[i]+=i*p; } sort(c.begin(),c.end(),greater<int>()); LL ans=(q*n+n*(n-1)/2)*p; LL ruiseki=0; for(int i=0;i<n;i++)...
a.cc: In function 'int main()': a.cc:9:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 9 | cin >> n >> p >> q; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, from a.cc:1: /usr/include/c++/14/iostream:62:18: n...
s326169227
p01754
C++
#include <bits/stdc++.h> using namespace std; #define max(a,b) ((a)>(b)?(a):(b)) typedef long long LL int main(){ int n,p,q; cin >> n >> p >> q; vector<int> c(n); for(int i=0;i<n;i++){ cin >> c[i]; c[i]+=i*p; } sort(c.begin(),c.end(),greater<int>()); LL ans=(q*n+n*(n-1)/2)*p; LL ruiseki=0; ...
a.cc:8:1: error: expected initializer before 'int' 8 | int main(){ | ^~~
s437397668
p01754
C++
#include <bits/stdc++.h> using namespace std; #define max(a,b) ((a)>(b)?(a):(b)) typedef long long LL; int main(){ int n,p,q; cin >> n >> p >> q; vector<int> c(n); for(int i=0;i<n;i++){ cin >> c[i]; c[i]+=i*p; } sort(c.begin(),c.end(),greater<int>()); LL ans=(q*n+n*(n-1)/2)*p; LL ruiseki=0; ...
a.cc: In function 'int main()': a.cc:20:5: error: 'ruseki' was not declared in this scope; did you mean 'ruiseki'? 20 | ruseki+=c[i]; | ^~~~~~ | ruiseki
s151603318
p01755
C++
#include<stdio.h> #include<stdlib.h> #include<iostream> #include<math.h> #include<algorithm> #include<vector> #include<queue> #include<map> #include<string> #include<cmath> #include<set> #include<stack> using namespace std; char a[60][60]; bool visited[60][60]; int h,w; int rx,ry,gx,gy; int ans; int dir=0; int dx[4]=...
a.cc: In function 'int main()': a.cc:199:5: error: 'memset' was not declared in this scope 199 | memset(visited,0,sizeof(visited)); | ^~~~~~ a.cc:13:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 12 | #include<stack> +++ |+#include <cstri...
s327374257
p01755
C++
#include<bits/stdc++.h> using namespace std; #define MAX 55 #define INF 1000000 #define inf 10000000 int dy[]={-1,0,1,0}; int dx[]={0,1,0,-1}; int H,W; char a[MAX][MAX]; string s; int p,ans,len,C; int py,px,ty,tx; int dir,flg; char vd[4][MAX][MAX][1005]; char ny[4][MAX][MAX][1005]; char nx[4][MAX][MAX][1005]; char nd...
a.cc: In function 'void calc()': a.cc:74:36: error: cannot bind non-const lvalue reference of type 'int&' to a value of type 'char' 74 | int& dir2=ndir[dir][py][px][p-1]; | ~~~~~~~~~~~~~~~~~~~~~^ a.cc:75:33: error: cannot bind non-const lvalue reference of type 'int&' to a value of type 'char...
s814276254
p01755
C++
#include <bits/stdc++.h> #define N 51 using namespace std; int h,w,p=0; string A,mp[N]; int dx[]={0,1,0,-1}; int dy[]={-1,0,1,0}; int x,y,dir; void start(); void Forward(){ int nx = x+dx[dir],ny = y+dy[dir]; if(nx>=0&&ny>=0&&nx<w&&ny<h&&mp[ny][nx]!='#') x=nx,y=ny; } void Back(){ int nx = x+dx[(dir+2)%4],ny = y...
a.cc: In function 'void While()': a.cc:53:28: error: expected ',' or ';' before ')' token 53 | bool con = getCheck()+f);p++; | ^ a.cc: In function 'int getCheck()': a.cc:46:1: warning: control reaches end of non-void function [-Wreturn-type] 46 | } | ^
s598539287
p01755
C++
#include <bits/stdc++.h> #define N 51 using namespace std; int h,w,p=0; string A,mp[N]; int dx[]={0,1,0,-1}; int dy[]={-1,0,1,0}; int x,y,dir; void start(); void Forward(){ int nx = x+dx[dir],ny = y+dy[dir]; if(nx>=0&&ny>=0&&nx<w&&ny<h&&mp[ny][nx]!='#') x=nx,y=ny; } void Back(){ int nx = x+dx[(dir+2)%4],ny = y...
a.cc: In function 'void While()': a.cc:53:28: error: expected ',' or ';' before ')' token 53 | bool con = getCheck()+f);p++; | ^ a.cc: In function 'int getCheck()': a.cc:46:1: warning: control reaches end of non-void function [-Wreturn-type] 46 | } | ^
s704587028
p01755
C++
#include<bits/stdc++.h> using namespace std; int h,w; vector<string> field; string s; int p,cnt; int y,x; int dir; int dy[]={-1,0,1,0}; int dx[]={0,1,0,-1}; vector<vector<vector<vector<int>>>> used; void program(); void statement(); void _if(); void _while(); void act(); bool expr(); void skip(){ int icnt=0; ...
a.cc:193:5: error: expected unqualified-id before 'return' 193 | return; | ^~~~~~ a.cc:194:1: error: expected declaration before '}' token 194 | } | ^ a.cc:196:6: error: redefinition of 'void _while()' 196 | void _while(){ | ^~~~~~ a.cc:76:6: note: 'void _while()' previously defined...
s484485997
p01756
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>>; //struct PMA { // PMA *next[128]; // next[0] is for fail // vector<int> accept; // PMA() { fill(next, next + 128, (PMA*)N...
a.cc: In function 'int main()': a.cc:326:43: error: expected ';' before 'cout' 326 | printf("%d\n",ans) | ^ | ; 327 | cout << ans << endl; | ...
s866922798
p01756
C++
#include<iostream> #include<string> using namespace std; #define MAX 200005 #define INF (1<<26) int segN=30000; struct SegTreeNode{ int value; data* ch[2]; void init(){ value=INF; ch[0]=new data; ch[1]=new data; ch[0]->ch[0]=NULL; ch[1]->ch[0]=NULL; } void set(int i, int x, int l, int r){ int m=(l...
a.cc:12:9: error: 'data' does not name a type 12 | data* ch[2]; | ^~~~ a.cc: In member function 'void SegTreeNode::init()': a.cc:16:17: error: 'ch' was not declared in this scope 16 | ch[0]=new data; | ^~ a.cc:16:27: error: 'data' does not name a type ...
s887472014
p01756
C++
#include<iostream> #include<string> using namespace std; #define MAX 200005 #define INF (1<<26) int segN=30000; struct SegTreeNode{ int value; SegTreeNode* ch[2]; void init(){ value=INF; ch[0]=new SegTreeNode; ch[1]=new SegTreeNode; ch[0]->ch[0]=NULL; ch[1]->c...
a.cc: In function 'void construct_sa(std::string, int*)': a.cc:72:9: error: 'sort' was not declared in this scope; did you mean 'short'? 72 | sort(sa,sa+n+1,compare_sa); | ^~~~ | short a.cc: In function 'int main()': a.cc:120:5: error: 'reverse' was not declared in this scope 12...
s611071645
p01756
C++
#include<iostream> #include<string> #include<algorithm> using namespace std; #define MAX 200005 #define INF (1<<26) int segN=1000000; struct data{ int value; SegTreeNode* ch[2]; void init(){ value=INF; ch[0]=new data; ch[1]=new data; ch[0]->ch[0]=NULL; ch[1]->...
a.cc:13:5: error: 'SegTreeNode' does not name a type 13 | SegTreeNode* ch[2]; | ^~~~~~~~~~~ a.cc: In member function 'void data::init()': a.cc:17:9: error: 'ch' was not declared in this scope 17 | ch[0]=new data; | ^~ a.cc: In member function 'void data::set(int, int, int, int)...
s442969464
p01756
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,x,y) for(int i=(x);i<(y);++i) #define debug(x) #x << "=" << (x) #ifdef DEBUG #define _GLIBCXX_DEBUG #define print(x) std::cerr << debug(x) << " (L:" << __LINE__ << ")" << std::endl #else #define print(x) #endif const int inf=1e9; const int64_t inf64=1e18; c...
a.cc: In lambda function: a.cc:108:49: error: expected ';' before ')' token 108 | return s.compare(sa[index],x.size(),x)>0); | ^ | ; a.cc:108:49: error: expected primary-expression before ')' token
s139296942
p01756
C++
#include<bits/stdc++.h> #include<unordered_map> using namespace std; typedef __int128 Hash; const Hash A=1e9+7; const Hash MOD=1e18+9; void reg(Hash &x){x=(x%MOD+MOD)%MOD;} void debug(Hash val){ cout<<static_cast<long long int>(val)<<endl; } int main(){ cin.tie(0); ios::sync_with_stdio(false); string s; ...
a.cc: In function 'int main()': a.cc:77:5: error: 'unorederd_map' was not declared in this scope 77 | unorederd_map<Hash,int> max_index; | ^~~~~~~~~~~~~ a.cc:77:23: error: expected primary-expression before ',' token 77 | unorederd_map<Hash,int> max_index; | ^ a.cc:77...
s403525656
p01757
C++
#include "bits/stdc++.h" using namespace std; int N,K; int memo[1 << 17]; int memo2[1 << 17]; int getans(bitset<17>&bs, const vector<vector<int>>&love) { if (memo[bs.to_ulong()] != -1)return memo[bs.to_ulong()]; if (bs.count() == 0) { return memo[bs.to_ulong()] =0; } else { vector<int>unused; for (int i = 0...
a.cc: In function 'int getans(std::bitset<17>&, const std::vector<std::vector<int> >&)': a.cc:61:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 61 | int main() { | ^~ a.cc:61:9: note: remove parentheses to default-initialize a variable 61 | int main() { ...
s102072942
p01757
C++
#include<bits/stdc++.h> using namespace std; #define int long long; signed main(){ int n,m; cin>>n>>m; vector<int> a(m+1); for(auto &v:a) cin>>v; vector<int> b(m); for(auto &v:b) cin>>v; int res=0; vector<pair<pair<int,int>,int>> state; for(int i=0;i<m;i++){ state.push_back({{a[i],a[i+1]},(1<<b[...
a.cc: In function 'int main()': a.cc:4:18: error: declaration does not declare anything [-fpermissive] 4 | #define int long long; | ^~~~ a.cc:7:3: note: in expansion of macro 'int' 7 | int n,m; | ^~~ a.cc:7:7: error: 'n' was not declared in this scope; did you mean 'yn'? 7 |...
s910802177
p01760
C++
feawfwa
a.cc:1:1: error: 'feawfwa' does not name a type 1 | feawfwa | ^~~~~~~
s345115500
p01760
C++
#include <iostream> #include <algorithm> using namespace std; double solve(T, D, TA, TB, DA, DB) { double res = 999999999999999.99; for(int i = 0; i <= D; i += DA) { for(int j = 0; i + j <= D; j += DB) { int Acal = TA * i; int Bcal = TB * j; ...
a.cc:6:14: error: 'T' was not declared in this scope 6 | double solve(T, D, TA, TB, DA, DB) | ^ a.cc:6:17: error: 'D' was not declared in this scope 6 | double solve(T, D, TA, TB, DA, DB) | ^ a.cc:6:20: error: 'TA' was not declared in this scope 6 | double solve(T, D...
s407744415
p01760
C++
#include <iostream> #include <algorithm> using namespace std; double solve(int T, int D, int TA, int TB, int DA, int DB) { double res = 999999999999999.99; for(int i = 0; i <= D; i += DA) { for(int j = 0; i + j <= D; j += DB) { int Acal = TA * i; int Bcal = TB ...
a.cc: In function 'int main()': a.cc:32:50: error: expected ')' before ';' token 32 | printf("%.999999f\n", solve(a, b, c, d, e, f); | ~ ^ | )
s235268731
p01761
C++
return; } int main() { for(int N;cin>>N;){ for(int i=0;i<N;++i){ string name,author,date; cin>>name>>author>>date; books.push_back(make_pair(name,make_pair(author,date))); } int Q; cin>>Q; for(int i=0;i<Q;++i){ string qname...
a.cc:1:5: error: expected unqualified-id before 'return' 1 | return; | ^~~~~~ a.cc:2:1: error: expected declaration before '}' token 2 | } | ^ a.cc: In function 'int main()': a.cc:5:15: error: 'cin' was not declared in this scope 5 | for(int N;cin>>N;){ | ^~~ a.cc...
s790550836
p01761
C++
#include <bits/stdc++.h> using namespace std; vector<pair<string, pair<string,string>>> books; void search_books(string qname, string qauthor, string qfrom, string qto){ for(int i=0;i<books.size();++i){ if(books[i].first.find(qname)==string::npos&&qname.at(0)!='*') continue; if(books[i].second.fir...
a.cc: In function 'void search_books(std::string, std::string, std::string, std::string)': a.cc:10:60: error: expected ';' before 'continue' 10 | if((books[i].second.second<qfrom&&qfrom.at(0)!='*') continue; | ^~~~~~~~~ | ...
s604672365
p01761
C++
#define _USE_MATH_DEFINES #define INF 0x3f3f3f3f #include <iostream> #include <cstdio> #include <sstream> #include <cmath> #include <cstdlib> #include <algorithm> #include <queue> #include <stack> #include <limits> #include <map> #include <string> #include <cstring> #include <set> #include <deque> #include <bitset> #...
a.cc: In member function 'bool Book::match_date(std::string, std::string)': a.cc:82:18: error: 'date2sec' was not declared in this scope 82 | int my_sec = date2sec(date); | ^~~~~~~~
s558505732
p01761
C++
#include<bits/stdc++.h> using namespace std; struct book{ string n,a,d; bool match(string a, string b, string c, string d){ if(a!="*" && n.find(a)==string::npos)return false; if(b!="*" && a.find(b)==string::npos)return false; if(c!="*" && d<c)return false; if(d!="*" && d<date)return false; ret...
a.cc: In member function 'bool book::match(std::string, std::string, std::string, std::string)': a.cc:11:20: error: 'date' was not declared in this scope 11 | if(d!="*" && d<date)return false; | ^~~~ a.cc: In function 'int main()': a.cc:30:43: error: 'struct book' has no member named 'na...
s533459480
p01761
C++
#include <string> #include <iostream> using namespace std; int N, Q, y, m, d, date[100]; string a, b, c, d, book[100], auth[100]; int main() { cin >> N; for(int i = 0; i < N; i++) { cin >> book[i] >> auth[i] >> a; sscanf(a.c_str(), "%d/%02d/%02d", y, m, d); date[i] = y * 10000 + m * 100 + d; } cin >> Q; for(...
a.cc:4:47: error: conflicting declaration 'std::string d' 4 | int N, Q, y, m, d, date[100]; string a, b, c, d, book[100], auth[100]; | ^ a.cc:4:17: note: previous declaration as 'int d' 4 | int N, Q, y, m, d, date[100]; string a, b, c, d, book[100], auth[100];...
s996916927
p01763
C++
#include <bits/stdc++.h> using namespace std; int extgcd(int a, int b, int& x, int& y){ int d=a; if(b!=0){ d = extgcd(b,a%b,y,x); y-=(a/b)*x; }else{ x=1;y=0; } return d; } int mod_inverse(int a, int m){ int x, y; extgcd(a,m,x,y); return (m+x%m)%m; } pair<int, i...
a.cc: In function 'int main()': a.cc:61:14: error: expected '}' at end of input 61 | return 0; | ^ a.cc:35:12: note: to match this '{' 35 | int main() { | ^
s387308525
p01763
C++
#include <cstdlib> #include <iostream> #include <vector> using namespace std; int extgcd(int a, int b, int &x, int &y) { int d = a; if(b != 0) { d = extgcd(b, a % b, y, x); y -= (a / b) * x; } else { x = 1; y = 0; } return d; } int mod_inverse(int a, int m) { int x, y; extgcd(a, m, x, y); return (x % ...
a.cc: In function 'std::pair<int, int> linear_congruence(const std::vector<int>&, const std::vector<int>&, const std::vector<int>&)': a.cc:30:60: error: '__gcd' was not declared in this scope 30 | int a = A[i] * m, b = B[i] - A[i] * x, d = __gcd(M[i], a); | ...
s026207694
p01764
C++
4 8 63 56 9
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 4 | ^
s554458071
p01764
C++
#include <iostream> using namespace std; const int MAX_SIZE = 300; int cost(int x, int y) { int sum = 0, c = 0; while (x || y) { sum += (x % 10) * (y % 10) + c; c = x % 10 + y % 10 + c < 10 ? 0 : 1; x /= 10; y /= 10; } return sum + c; } int calc(int a[], int b[][MAX_SIZE], int s[][MAX_SIZE], ...
a.cc: In function 'int calc(int*, int (*)[300], int (*)[300], int)': a.cc:24:21: error: 'numeric_limits' was not declared in this scope 24 | b[j][j + i] = numeric_limits<int>::max(); | ^~~~~~~~~~~~~~ a.cc:24:36: error: expected primary-expression before 'int' 24 | b[j][j + i]...
s077241188
p01764
C++
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s343404143
p01765
C++
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <sstream> #include <cstring> #include <cstdio> #include <cstdlib> #include <cmath> #include <queue> #include <stack> #include <map> #include <set> #include <numeric> #include <cctype> #include <tuple> #include <array> #include <climit...
a.cc: In function 'std::ostream& operator<<(std::ostream&, const std::vector<_Tp>&)': a.cc:52:34: error: 'ostream_iterator' was not declared in this scope 52 | copy(v.begin(), v.end(), ostream_iterator<T>(os, " ")); | ^~~~~~~~~~~~~~~~ a.cc:21:1: note: 'std::ostream_iter...
s675475761
p01765
C++
#include<bits/stdc++.h> #define EQ(a,b) (abs((a)-(b)) < EPS) #define rep(i,n) for(int i=0;i<(int)(n);i++) #define fs first #define sc second #define pb push_back #define sz size() #define all(a) (a).begin(),(a).end() using namespace std; typedef long double D; typedef complex<D> P; typedef pair<P,P> L; typedef vector...
a.cc: In function 'int main()': a.cc:101:16: error: no matching function for call to 'min(double&, D)' 101 | ans = min(ans, seg_seg_dis(l[0][i], l[1][j])); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_6...
s652353633
p01765
C++
#include <cmath> #include <cstdlib> #include <iostream> #include <vector> using namespace std; constexpr double EPS = 1e-9; struct point { double x, y; explicit point(double x_ = 0.0, double y_ = 0.0):x(x_), y(y_) {} point(const point &p):x(p.x), y(p.y) {} point operator+ (const point &p) const { retur...
a.cc: In function 'double dist(const segment&, const segment&)': a.cc:97:20: error: no matching function for call to 'min(<brace-enclosed initializer list>)' 97 | return min({dist(s, t.a), dist(s, t.b), dist(t, s.a), dist(t, s.b)}); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...
s258775998
p01765
C++
#include <bits/stdc++.h> using namespace std; namespace { typedef double real; typedef long long ll; const real EPS = 1e-7; template<class T> ostream& operator<<(ostream& os, const vector<T>& vs) { if (vs.empty()) return os << "[]"; os << "[" << vs[0]; for (int i = 1; i < vs...
a.cc: In function 'int {anonymous}::ccw(Point, Point, Point)': a.cc:48:57: error: a function-definition is not allowed here before '{' token 48 | bool intersects(const Segment& s, const Segment& t) { | ^ a.cc:51:56: error: a function-definition is not...
s085496034
p01765
C++
#include <bits/stdc++.h> using namespace std; namespace { typedef double real; typedef long long ll; const real EPS = 1e-7; template<class T> ostream& operator<<(ostream& os, const vector<T>& vs) { if (vs.empty()) return os << "[]"; os << "[" << vs[0]; for (int i = 1; i < vs...
a.cc: In function 'int {anonymous}::ccw(Point, Point, Point)': a.cc:48:57: error: a function-definition is not allowed here before '{' token 48 | bool intersects(const Segment& s, const Segment& t) { | ^ a.cc:51:56: error: a function-definition is not...
s588220472
p01766
Java
import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.Collections; import java.util.Scanner; public class A { Scanner in = new Scanner(System.in); public static void main(String[] args) { new A(); } public A() { new RitProA().doIt(); } class RitProA{ void doIt(){ int n = in.nex...
Main.java:7: error: class A is public, should be declared in a file named A.java public class A { ^ 1 error
s885596842
p01766
Java
import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.Collections; import java.util.Scanner; public class Main { Scanner in = new Scanner(System.in); public static void main(String[] args) { new A(); } public A() { new RitProA().doIt(); } class RitProA{ void doIt(){ int n = in....
Main.java:13: error: invalid method declaration; return type required public A() { ^ 1 error
s431215568
p01766
Java
import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.Collections; import java.util.Scanner; public class Main { Scanner in = new Scanner(System.in); public static void main(String[] args) { new Main(); } public Main() { new RitProA().doIt(); } class RitProA{ void doIt(){ int n...
Main.java:20: error: package A does not exist ArrayList<Frame> list = new ArrayList<A.Frame>(); ^ 1 error
s057186937
p01766
C++
//include //------------------------------------------ #include <vector> #include <list> #include <map> #include <set> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <...
a.cc: In function 'int main()': a.cc:64:18: error: narrowing conversion of '1.0e+9' from 'double' to 'int' [-Wnarrowing] 64 | int time[2] = {1e9, 1e9}; | ^~~ a.cc:64:23: error: narrowing conversion of '1.0e+9' from 'double' to 'int' [-Wnarrowing] 64 | int time[2] = {1e9, 1e9}; | ...
s237010763
p01766
C++
#include<iostream> #include<cmath> using namespace std; typedef struct data{ int f, p, a, t, x, y; }data; double Dist(int x, int y){ return sqrt(x*x + y*y); } double flame(int current, int prev){ return (double)(current - prev)/60; } int main(int argc, char *argv[]){ int n; double T[2] = {0}, dist[2] = {0...
a.cc: In function 'int main(int, char**)': a.cc:21:3: error: reference to 'data' is ambiguous 21 | data d[n]; | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, ...
s355142353
p01766
C++
#include<iostream> #include<cmath> using namespace std; int main(){ /*f=テ」ツδ陛」ツδャテ」ツδシテ」ツδ?a=ティツδ古ァツ閉ェテ・ツ渉キ t=テ」ツδ?」ツδシテ」ツδ?x=y=テ・ツコツァテヲツィツ?/ int N,f,a,t,x,y; int tmp_f,tmp_a,tmp_t,tmp_x,tmp_y; //テ・ツ可催」ツ?ョテゥツ?クテヲツ可凝」ツ?ョテヲツδ?・ツ?ア int i,j; int flg_a=0,flg_b=0; double distance_a,time_a,distance_b,time_b; ...
a.cc:7:3: error: unterminated comment 7 | /*f=テ」ツδ陛」ツδャテ」ツδシテ」ツδ?a=ティツδ古ァツ閉ェテ・ツ渉キ t=テ」ツδ?」ツδシテ」ツδ?x=y=テ・ツコツァテヲツィツ?/ | ^ a.cc: In function 'int main()': a.cc:5:12: error: expected '}' at end of input 5 | int main(){ | ~^
s098168662
p01767
C
#include <cstdio> #include <cstdlib> int main(void){ int n, m; int *A, *B, *C; scanf("%d", &n); A = (int*)malloc(sizeof(int)*n); int i=0; for(i=0; i<n; i++){ scanf("%d", &A[i]); } scanf("%d", &m); B = (int*)malloc(sizeof(int)*m); for(i=0; i<m; i++){ scanf("%d", &B[i]); } C = (int*)mall...
main.c:1:10: fatal error: cstdio: No such file or directory 1 | #include <cstdio> | ^~~~~~~~ compilation terminated.
s679362142
p01767
C++
#include <functional> #include <algorithm> #include <iostream> #include <numeric> #include <iomanip> #include <utility> #include <cstdlib> #include <sstream> #include <bitset> #include <vector> #include <cstdio> #include <ctime> #include <queue> #include <deque> #include <cmath> #include <stack> #include <list> #includ...
a.cc: In function 'int main()': a.cc:38:5: error: 'memset' was not declared in this scope 38 | memset(p, 0, sizeof(p)); | ^~~~~~ a.cc:20:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 19 | #include <set> +++ |+#include <cstring> 20 | ...
s234947801
p01767
C++
#include<iostream> #include<cstdio> #include<cstring> #include<cmath> using namespace std; int n; int a[300000]; int m; int b[300000],c[300000]; int total[30000]; int main(){ cin>>n; for(int i=0;i<n;i++) cin>>a[i]; cin>>m; for(int i=0;i<m;i++) cin>>b[i]; for(int i=0;i<m;i++) cin>>c[i]; sort(...
a.cc: In function 'int main()': a.cc:24:3: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 24 | sort(a,a+n); | ^~~~ | sqrt
s543626327
p01767
C++
#include <iostream> #include <algorithm> #include <vector> #include <set> #include <map> #include <stack> #include <queue> #include <utility> #include <string> #include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #define REP(i, a, b) for (int i = (int)(a); i < (int)(b); ++i) #define rep(i, n) REP (...
a.cc: In function 'int main()': a.cc:19:16: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 19 | int n; cin >> n; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern ...
s170393341
p01767
C++
#include <stdio.h> #include <iostream> #include <queue> #include <map> #include <string> #include <vector> #define PB push_back #define FOR(i,a,b) for (int i=(a);i<(b);i++) #define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--) #define REP(i,n) for (int i=0;i<(n);i++) #define RREP(i,n) for (int i=(n)-1;i>=0;i--) using namesp...
a.cc: In function 'void solve()': a.cc:32:9: error: 'sort' was not declared in this scope; did you mean 'short'? 32 | sort(a.begin(),a.end()); | ^~~~ | short
s658346152
p01767
C++
#include <iostream> #include <vector> #include <cmath> #include <iomanip> #include <queue> #include <algorithm> #define shosu(x) fixed<<setprecision(x) using namespace std; typedef long long ll; typedef pair<int,int> P; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<P> vp; typedef vector<vp> vvp; typede...
a.cc:17:22: warning: integer overflow in expression of type 'int' results in '2147483647' [-Woverflow] 17 | const int inf=(1<<31)-1; | ~~~~~~~^~ a.cc: In function 'int main()': a.cc:35:20: error: no match for 'operator=' (operand types are 'std::vector<long long int>' and 'vi' {aka 'std::vector<i...
s210707145
p01767
C++
#include <iostream> #include <vector> #include <cmath> #include <iomanip> #include <queue> #include <algorithm> #define shosu(x) fixed<<setprecision(x) using namespace std; typedef long long ll; typedef pair<int,int> P; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<P> vp; typedef vector<vp> vvp; typede...
a.cc:17:22: warning: integer overflow in expression of type 'int' results in '2147483647' [-Woverflow] 17 | const int inf=(1<<31)-1; | ~~~~~~~^~ a.cc:21:25: error: conversion from 'int' to non-scalar type 'std::vector<long long int>' requested 21 | vector<ll> a,b,c,dp,tmp=0; | ...
s519947836
p01767
C++
#include <iostream> #include <vector> #include <cmath> #include <iomanip> #include <queue> #include <algorithm> #define shosu(x) fixed<<setprecision(x) using namespace std; typedef long long ll; typedef pair<int,int> P; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<P> vp; typedef vector<vp> vvp; typede...
a.cc:17:22: warning: integer overflow in expression of type 'int' results in '2147483647' [-Woverflow] 17 | const int inf=(1<<31)-1; | ~~~~~~~^~ a.cc:21:25: error: conversion from 'int' to non-scalar type 'std::vector<long long int>' requested 21 | vector<ll> a,b,c,dp,tmp=0; | ...
s290359498
p01768
C++
#define _USE_MATH_DEFINES #include<iostream> #include<cstdio> #include<algorithm> #include<climits> #include<string> #include<vector> #include<list> #include<map> #include<set> #include<cmath> #include<queue> #include<cstring> #include<stack> #include<functional> using namespace std; typedef long long ll; #define int l...
a.cc:19:9: warning: "INT_MAX" redefined 19 | #define INT_MAX LLONG_MAX | ^~~~~~~ In file included from /usr/include/c++/14/climits:42, from a.cc:5: /usr/lib/gcc/x86_64-linux-gnu/14/include/limits.h:120:9: note: this is the location of the previous definition 120 | #define INT_MAX __I...
s850422448
p01768
C++
#define _USE_MATH_DEFINES #include<iostream> #include<cstdio> #include<algorithm> #include<climits> #include<string> #include<vector> #include<list> #include<map> #include<set> #include<cmath> #include<queue> #include<cstring> #include<stack> #include<functional> using namespace std; typedef long long ll; #define int l...
cc1plus: error: '::main' must return 'int'
s556178754
p01768
C++
#define _USE_MATH_DEFINES #include<iostream> #include<cstdio> #include<algorithm> #include<climits> #include<string> #include<vector> #include<list> #include<map> #include<set> #include<cmath> #include<queue> #include<cstring> #include<stack> #include<functional> using namespace std; #define int long long map<string,i...
cc1plus: error: '::main' must return 'int'
s512553936
p01768
C++
#define _USE_MATH_DEFINES #include<iostream> #include<cstdio> #include<algorithm> #include<climits> #include<string> #include<vector> #include<list> #include<map> #include<set> #include<cmath> #include<queue> #include<cstring> #include<stack> #include<functional> using namespace std; map<string,long long> num; long lo...
a.cc: In function 'int main()': a.cc:69:9: error: 'prlong' was not declared in this scope; did you mean 'ulong'? 69 | prlong longf("%d\n",ans); | ^~~~~~ | ulong
s559632693
p01768
C++
map<string, int> cost; map<string, bool> done; int N, M; int search(string s) { int ans = cost[s]; done[s] = true; for(int i = 0; i < tb[s].size(); i++) if(done.find(tb[s][i]) == done.end()) ans = min(ans, search(tb[s][i])); return ans; } int main() { cin >> N; for(int i = 0; i < N; i++) { ...
a.cc:1:1: error: 'map' does not name a type 1 | map<string, int> cost; | ^~~ a.cc:2:1: error: 'map' does not name a type 2 | map<string, bool> done; | ^~~ a.cc:5:12: error: 'string' was not declared in this scope 5 | int search(string s) | ^~~~~~ a.cc: In function 'int main()': ...
s409487924
p01768
C++
map<string, int> cost; map<string, bool> done; int N, M; int search(string s) { int ans = cost[s]; done[s] = true; for(int i = 0; i < tb[s].size(); i++) if(done.find(tb[s][i]) == done.end()) ans = min(ans, search(tb[s][i])); return ans; } int main() { cin >> N; for(int i = 0; i < N; i++) { ...
a.cc:1:1: error: 'map' does not name a type 1 | map<string, int> cost; | ^~~ a.cc:2:1: error: 'map' does not name a type 2 | map<string, bool> done; | ^~~ a.cc:5:12: error: 'string' was not declared in this scope 5 | int search(string s) | ^~~~~~ a.cc: In function 'int main()': ...
s840616349
p01768
C++
#include <iostream> #include <algorithm> #include <string> #include <map> #include <set> using namespace std; map <string,int> cost; multimap <string,string> rule; set <string> his; void update(string a){ multimap<string,string>::iterator it=rule.find(a); while(it != rule.end() && it->first == a) { if(cost[it-...
a.cc: In function 'int mk_rule(std::string)': a.cc:22:12: error: 'ls' was not declared in this scope 22 | update(ls[i]); | ^~ a.cc:22:15: error: 'i' was not declared in this scope; did you mean 'it'? 22 | update(ls[i]); | ^ | it
s178954413
p01768
C++
#include<iostream> #include<algorithm> #include<map> using namespace std; int n,m,price[5050]; map<string,int> id; int par[200010]; // ??? int rnk[200010]; // ??±??? /* Union Find ????????? */ void init(int n){ for(int i=0;i<=n;i++){ par[i] = i; rnk[i] = 1; } } /* x???????????¨y?????????????????? */ voi...
a.cc: In function 'void unite(int, int)': a.cc:22:13: error: no matching function for call to 'find(int&)' 22 | x = find(x); y = find(y); | ~~~~^~~ In file included from /usr/include/c++/14/bits/locale_facets.h:48, from /usr/include/c++/14/bits/basic_ios.h:37, from...
s505183658
p01768
C++
#include "bits/stdc++.h" using namespace std; #define int long long #define DBG 0 #define dump(o) if(DBG){cerr<<#o<<" "<<o<<endl;} #define dumpc(o) if(DBG){cerr<<#o; for(auto &e:(o))cerr<<" "<<e;cerr<<endl;} #define rep(i,a,b) for(int i=(a);i<(b);i++) #define rrep(i,a,b) for(int i=(b)-1;i>=(a);i--) #define each(it,c) ...
a.cc: In member function 'bool UnionFind::unite(long long int, long long int)': a.cc:28:31: error: 'c' was not declared in this scope 28 | dump(x); dump(c); | ^ a.cc:6:40: note: in definition of macro 'dump' 6 | #define dump(o) if(DBG){cerr<<#o<<" "<<o<<endl;} ...
s921150890
p01769
C++
#include <bits/stdc++.h> #define FOR(i,a,b) for(int i=(a);i<(b);i++) #define REP(i,b) FOR(i,0,b) #define F first #define S second #define PB push_back #define BE(c) c.begin(),c.end() using namespace std; typedef long long LL; typedef int ut; typedef vector<ut> VI; typedef pair<ut,ut> pr; typedef vector<pr> Vpr; typede...
a.cc: In function 'LL search(int, int)': a.cc:28:16: error: lvalue required as left operand of assignment 28 | return (LL)DP[now][s]=(int)(ans%p); | ^~~~~~~~~~~~~~
s931413351
p01769
C++
#include <iostream> #include <vector> #include <cstdio> #include <sstream> #include <map> #include <string> #include <algorithm> #include <queue> #include <cmath> #include <set> #include <functional> using namespace std; #define MOD 1000000007 int main(){ int N, L; cin >> N >> L; vector<int> x(N), a(N); for(int ...
a.cc: In function 'int main()': a.cc:24:65: error: no matching function for call to 'std::vector<std::vector<long long int> >::vector(int, std::vector<int>)' 24 | vector<vector<long long>> memo(L+1, vector<int>(N+1, -1)); | ^ In file inclu...
s898585078
p01769
C++
#include <stdio.h> #pragma warning(disable : 4996) #define mod 1000000007 int N, L, x[5000], a[5000], dp[5001][5001]; void rec(int r, int pos) { if (dp[r][pos]) return; dp[r][pos] = 1; for (int i = x[r]; i < pos; i += a[r]) { if (r == 0) dp[r][pos]++; else rec(r - 1, i), dp[r][pos] = (dp[r][pos] + dp[r - 1][i]) %...
a.cc: In function 'int main()': a.cc:16:27: error: invalid use of void expression 16 | printf("%d\n", rec(N - 1, L)); | ~~~^~~~~~~~~~
s776867602
p01770
C++
#include <string> #include <vector> #include<iostream> #include<cstdio> #include<cstdlib> #include<stack> #include<queue> #include<cmath> #include<algorithm> #include<functional> #include<list> #include<deque> #include<bitset> #include<set> #include<map> #include<unordered_map> #include<cstring> #include<sstream> #incl...
a.cc:41:9: error: 'vv' does not name a type 41 | typedef vv<int> Graph; | ^~ a.cc:45:6: error: variable or field 'add_edge' declared void 45 | void add_edge(Graph &h,int a,int b,int st,int R,vector<int> &eve){ | ^~~~~~~~ a.cc:45:15: error: 'Graph' was not declared in this scope; did you m...
s586520356
p01770
C++
#include <bits/stdc++.h> using namespace std; int main(){ string str,res; bool flg = false; cin >> str; for(auto x : str){ if(flg){ if(x == 'Z'){ flg = false; res += "AZ"; } }else{ if(x == 'A'){ flg = true; } } } if(res.empty()){ cout << -1 << endl; }else{ ...
a.cc:28:6: error: extended character ° is not valid in an identifier 28 | ~ ??° CompetitiveProgramming ??± AOJ ??° % ??° cat ~/CPro/AOJ/Volume26/2666.cpp | ^ a.cc:28:33: error: extended character ± is not valid in an identifier 28 | ~ ??° CompetitiveProgramming ??± AOJ ??° % ??° cat ~/CPro/AOJ/Volume...
s494649832
p01771
C++
#include<bits/stdc++.h> typedef long long int ll; typedef unsigned long long int ull; #define BIG_NUM 2000000000 #define HUGE_NUM 99999999999999999 #define MOD 1000000007 #define EPS 0.000000001 using namespace std; #define NUM 150005 struct Data{ int parent,head,depth,tail,size; ll sum_add_weight; }; int N = 1;...
a.cc:20:5: error: 'int index' redeclared as different kind of entity 20 | int index = 0,root,global_index;; | ^~~~~ In file included from /usr/include/string.h:462, from /usr/include/c++/14/cstring:43, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121, ...
s262650162
p01771
C++
#include<bits/stdc++.h> typedef long long int ll; typedef unsigned long long int ull; #define BIG_NUM 2000000000 #define HUGE_NUM 99999999999999999 #define MOD 1000000007 #define EPS 0.000000001 using namespace std; #define NUM 150005 struct Data{ int parent,head,depth,tail,size; ll sum_add_weight; }; int N = 1;...
a.cc:20:5: error: 'int index' redeclared as different kind of entity 20 | int index = 0,root,global_index;; | ^~~~~ In file included from /usr/include/string.h:462, from /usr/include/c++/14/cstring:43, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121, ...
s167453476
p01771
C++
#include <cstdio> #include <iostream> #include <sstream> #include <fstream> #include <iomanip> #include <algorithm> #include <cmath> #include <string> #include <vector> #include <list> #include <queue> #include <stack> #include <set> #include <map> #include <bitset> #include <numeric> #include <limits> #include <climit...
/usr/bin/ld: /tmp/ccoSSuIZ.o: warning: relocation against `_ZN11SegmentTree9INIT_DATAE' in read-only section `.text._ZN11SegmentTreeC2Ei[_ZN11SegmentTreeC5Ei]' /usr/bin/ld: /tmp/ccoSSuIZ.o: in function `SegmentTree::SegmentTree(int)': a.cc:(.text._ZN11SegmentTreeC2Ei[_ZN11SegmentTreeC5Ei]+0x7e): undefined reference to ...
s957871658
p01771
C++
#include <cstdio> #include <iostream> #include <sstream> #include <fstream> #include <iomanip> #include <algorithm> #include <cmath> #include <string> #include <vector> #include <list> #include <queue> #include <stack> #include <set> #include <map> #include <bitset> #include <numeric> #include <limits> #include <climit...
/usr/bin/ld: /tmp/cc5bNdd1.o: warning: relocation against `_ZN11SegmentTree9INIT_DATAE' in read-only section `.text._ZN11SegmentTreeC2ERKSt6vectorIiSaIiEE[_ZN11SegmentTreeC5ERKSt6vectorIiSaIiEE]' /usr/bin/ld: /tmp/cc5bNdd1.o: in function `SegmentTree::SegmentTree(std::vector<int, std::allocator<int> > const&)': a.cc:(....
s208529064
p01771
C++
#include<iostream> #include<algorithm> #include<vector> #include<cstdio> #include<stack> #include<queue> using namespace std; #define MAX_N 300005 #define MAX_M (1<<22) #define INF (1<<28) typedef long long ll; typedef pair<int,int> P; struct seg{ ll t[MAX_M]; ll u[MAX_M]; void init(){ for(int i=0;i<MAX_M;i...
a.cc: In function 'void lca_init()': a.cc:81:20: error: return-statement with a value, in function returning 'void' [-fpermissive] 81 | if(N>100000)return 0; | ^
s867823938
p01771
C++
#include <bits/stdc++.h> using namespace std; #define for_(i,a,b) for(int i=(a);i<(b);++i) #define for_rev(i,a,b) for(int i=(a);i>=(b);--i) typedef long long lint; typedef pair< int, int > pii; // Segment Tree with Lazy Evaluate template< typename DATA > class SegmentTreeLazy { private: int size__; vector< DATA > ...
a.cc:105:58: error: 'int index [150010][2][2]' redeclared as different kind of entity 105 | int depth[150010], parent[150010][30], index[150010][2][2]; | ^ In file included from /usr/include/string.h:462, from /usr/include/c++/14/cstring:...
s684456111
p01771
C++
#include <bits/stdc++.h> using namespace std; #define for_(i,a,b) for(int i=(a);i<(b);++i) #define for_rev(i,a,b) for(int i=(a);i>=(b);--i) typedef long long lint; typedef pair< int, int > pii; // Segment Tree with Lazy Evaluate template< typename DATA > class SegmentTreeLazy { private: int size__; vector< DATA > ...
a.cc:105:35: error: 'int close [150010]' redeclared as different kind of entity 105 | open[150010], close[150010], | ^ In file included from /usr/include/x86_64-linux-gnu/bits/sigstksz.h:24, from /usr/include/signal.h:328, from /usr/inc...
s954333049
p01771
C++
13 7 0 1 1 2 2 3 1 4 3 5 1 6 2 7 0 8 7 9 5 10 8 11 1 12 1 2 143 0 8 7 0 10 6 1 1 42 1 6 37 0 3 6 1 6 38
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 13 7 | ^~
s516750427
p01771
C++
#include<bits/stdc++.h> using namespace std; #define MAX 150005 typedef long long ll; int n,q,a,b,c; vector<int> G[MAX]; int cd[MAX],mv[MAX],pr[MAX],de[MAX]; vector<int> H; int hl[MAX],hr[MAX]; // calc hl[] hr[] mv[] void dfsB(int pos,int prev){ hl[pos]=H.size(); H.push_back(pos); if(cd[pos]!=-1){ mv[cd[p...
a.cc:127:5: error: redefinition of 'int n' 127 | int n,q,a,b,c; | ^ a.cc:6:5: note: 'int n' previously declared here 6 | int n,q,a,b,c; | ^ a.cc:127:7: error: redefinition of 'int q' 127 | int n,q,a,b,c; | ^ a.cc:6:7: note: 'int q' previously declared here 6 | int n,q,a,b,c; ...
s580184190
p01771
C++
#include<bits/stdc++.h> using namespace std; #define MAX 150005 typedef long long ll; int n,q,a,b,c; vector<int> G[MAX]; int sz[MAX],cd[MAX],mv[MAX],pr[MAX],de[MAX]; vector<int> H; int hl[MAX],hr[MAX]; // calc hl[] hr[] mv[] void dfsB(int pos){ hl[pos]=H.size(); H.push_back(pos); if(cd[pos]!=-1){ mv[cd[po...
a.cc: In function 'void dfsA(int)': a.cc:34:30: error: expected ';' before '}' token 34 | while(de[pos]>0)de[pos]++ | ^ | ; 35 | } | ~
s018343280
p01771
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,x,y) for(int i=(x);i<(y);++i) #define debug(x) #x << "=" << (x) #ifdef DEBUG #define _GLIBCXX_DEBUG #define print(x) std::cerr << debug(x) << " (L:" << __LINE__ << ")" << std::endl #else #define print(x) #endif const int inf=1e9; const int64_t inf64=1e18; c...
a.cc: In lambda function: a.cc:156:20: error: 'v' was not declared in this scope; did you mean 'vs'? 156 | if(v==ls.parent[u]) continue; | ^ | vs a.cc:156:37: error: continue statement not within a loop 156 | if(v==ls.parent[u]) conti...