submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s504160932
p00354
C++
#include <iostream> using namespace std;char w[]="thufrisatsunmontuewed";int main(){cin >> i;cout << w[(i%7)*3] << w[(i%7)*3+1] << w[(i%7)*3+2] << endl;}
a.cc: In function 'int main()': a.cc:2:72: error: 'i' was not declared in this scope 2 | using namespace std;char w[]="thufrisatsunmontuewed";int main(){cin >> i;cout << w[(i%7)*3] << w[(i%7)*3+1] << w[(i%7)*3+2] << endl;} | ^
s462406378
p00355
C
#include <iostream> using namespace std; int main(){ int a,b,n,s,f,i=0; cin >> a >> b >> n; do{ cin >> s >> f; i++; }while((a != s && b != f) && (s <= a && s >= b) && (f <= a && s >= b)); if(n == i-1){ cout << '0' << endl; } else { cout << '1' << endl; } }
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s004631270
p00355
C
#include <iostream> using namespace std; int main(){ int a,b,n,s,f,i=0; cin >> a >> b >> n; do{ cin >> s >> f; i++; }while((a != s && b != f) && (s <= a || s >= b) && (f <= a || f >= b) && i<n); if(n == i-1){ cout << '0' << endl; } else { cout << '1' << endl; } }
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s194731342
p00355
C
#include <iostream> using namespace std; int main(){ int a,b,n,s,f,i=0; cin >> a >> b >> n; do{ cin >> s >> f; i++; }while((a != s && b != f) && (s <= a || s >= b) && (f <= a || f >= b) && i<n); if(n == i){ cout << '0' << endl; } else { cout << '1' << endl; } }
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s741306706
p00355
C++
c#include<iostream> using namespace std; int main(){ int a,b; cin>>a,b; int N; cin>>N; int s,f; for(int i=0;i<N;i++){ cin>>s>>f; if(a<f && b>s){ cout<<1<<endl; return 0; } else if(a==s&&b==f){ cout<<1<<endl; return 0; } } cout<<0<<endl; return 0; }
a.cc:1:2: error: stray '#' in program 1 | c#include<iostream> | ^ a.cc:1:1: error: 'c' does not name a type 1 | c#include<iostream> | ^ a.cc: In function 'int main()': a.cc:6:3: error: 'cin' was not declared in this scope 6 | cin>>a,b; | ^~~ a.cc:13:7: error: 'cout' was not declared i...
s037226041
p00355
C++
#include<iostream> #include<cassert> using namespace std; bool overlap(int a, int b, int c, int d){ assert( a < b ); assert( c < d ); int a = 0; for ( int i = 0; i < 10000; i++ ) a += i; if ( d <= a ) return false; if ( b <= c ) return false; return true; } bool notOverlap(int a, int b, int c, int d){ r...
a.cc: In function 'bool overlap(int, int, int, int)': a.cc:7:7: error: declaration of 'int a' shadows a parameter 7 | int a = 0; | ^ a.cc:5:18: note: 'int a' previously declared here 5 | bool overlap(int a, int b, int c, int d){ | ~~~~^ a.cc: At global scope: a.cc:18:1: warning:...
s653177924
p00355
C++
#include <iostream> #include <string> #include <algorithm> #include <vector> #include <set> #include <map> #include <cmath> #include <iomanip> #include <queue> #include <stack> #include <deque> #include <bitset> #include <utility> #include <functional> #define rep(i,n) for(int i=0;i<n;++i) using namespace std; ll n, m...
a.cc:18:1: error: 'll' does not name a type 18 | ll n, m, o, ans = 0, a, b; | ^~ a.cc: In function 'int main()': a.cc:20:16: error: 'n' was not declared in this scope; did you mean 'yn'? 20 | cin >> n >> m >> o; | ^ | yn a.cc:20:21: error: 'm' was not declar...
s844641792
p00355
C++
#include<iostream> using namespace std; int main(){ int a, b, N, s, f; int ans = 0; cin >> a >> b; cin >> N; for(int i = 0; i < N; i++){ cin >> s >> f; //同じ時間を使用しているとき if(a == s && b == f) ans =1; //時間をすでに使用(被っている)させているとき for(int j = s+1; j < f; j++){ if(a == j || b == j) ans = 1; } //時間...
a.cc: In function 'int main()': a.cc:27:2: error: expected '}' at end of input 27 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s516871524
p00355
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
s377729900
p00355
C++
#include <iostream> using namespace std; vector<pair<int, int> > v; int main() { int a, b, N; cin >> a >> b >> N; for(int i=0; i<N; i++){ int s, f; cin >> s >> f; v.push_back(make_pair(s, f)); } int ans=0; for(int i=0; i<N; i++){ if(v[i].begin() < b && a < v[i].end()) ans=1; } cout << a...
a.cc:4:1: error: 'vector' does not name a type 4 | vector<pair<int, int> > v; | ^~~~~~ a.cc: In function 'int main()': a.cc:11:5: error: 'v' was not declared in this scope 11 | v.push_back(make_pair(s, f)); | ^ a.cc:15:8: error: 'v' was not declared in this scope 15 | if(v[i].begin() <...
s827291964
p00355
C++
#include <iostream> #include <vector> using namespace std; vector<pair<int, int> > v; int main() { int a, b, N; cin >> a >> b >> N; for(int i=0; i<N; i++){ int s, f; cin >> s >> f; v.push_back(make_pair(s, f)); } int ans=0; for(int i=0; i<N; i++){ if(v[i].begin() < b && a < v[i].end()) ans=...
a.cc: In function 'int main()': a.cc:16:13: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 'begin' 16 | if(v[i].begin() < b && a < v[i].end()) ans=1; | ^~~~~ a.cc:16:37: error: '__...
s403243138
p00355
C++
#include <iostream> using namespace std; bool filled[1005]; int main() { int a, b, N; cin >> a >> b >> N; for(int i=0; i<1005; i++) filled[j]=false for(int i=0; i<N; i++){ int s, f; cin >> s >> f; for(int j=s; j<f; j++) filled[j]=true; } int ans=0; for(int i=a; i<b; i++){ if(filled[i]) an...
a.cc: In function 'int main()': a.cc:8:36: error: 'j' was not declared in this scope 8 | for(int i=0; i<1005; i++) filled[j]=false | ^ a.cc:9:16: error: 'i' was not declared in this scope 9 | for(int i=0; i<N; i++){ | ^
s496160550
p00355
C++
#include<iostream> using namespace std; int main() { int a, b; cin >> a >> b; int n; cin >> n; bool b = false; for (int i = 0; i < n; i++) { int c, d; cin >> c >> d; if ((a < c&&c < b) || (a < d&&d < b)) { b = true; } } cout << b << endl; }
a.cc: In function 'int main()': a.cc:6:14: error: conflicting declaration 'bool b' 6 | bool b = false; | ^ a.cc:4:16: note: previous declaration as 'int b' 4 | int a, b; cin >> a >> b; | ^
s792416432
p00355
C++
Hello
a.cc:1:1: error: 'Hello' does not name a type 1 | Hello | ^~~~~
s843302613
p00355
C++
#include <iostream> using namespace std; int main() { int a, b, N; cin >> a; cin >> b; cin >> N; int s[N], f[N]; for (int i=0; i<N; ++i) { cin >> s[i]; cin >> f[i]; } sort(s, s+N); sort(f, f+N); int si = 0; int fi = 0; int counter = 0; for (...
a.cc: In function 'int main()': a.cc:20:5: error: 'sort' was not declared in this scope; did you mean 'short'? 20 | sort(s, s+N); | ^~~~ | short
s843864830
p00355
C++
#include <iostream> using namespace std; int main() { int a, b, N; cin >> a; cin >> b; cin >> N; int s[N], f[N]; for (int i=0; i<N; ++i) { cin >> s[i]; cin >> f[i]; } sort(s, s+N); sort(f, f+N); int si = 0; int fi = 0; int counter = 0; for (...
a.cc: In function 'int main()': a.cc:20:5: error: 'sort' was not declared in this scope; did you mean 'short'? 20 | sort(s, s+N); | ^~~~ | short
s409976841
p00355
C++
#include <iostream> using namespace std; int main() { int a, b, N; cin >> a; cin >> b; cin >> N; int s[N], f[N]; for (int i=0; i<N; ++i) { cin >> s[i]; cin >> f[i]; } sort(s, s+N); sort(f, f+N); int si = 0; int fi = 0; int counter = 0; for (...
a.cc: In function 'int main()': a.cc:20:5: error: 'sort' was not declared in this scope; did you mean 'short'? 20 | sort(s, s+N); | ^~~~ | short
s670740743
p00355
C++
#include <iostream> using namespace std; int main() { int a, b, N; cin >> a; cin >> b; cin >> N; int s[N], f[N]; for (int i=0; i<N; ++i) { cin >> s[i]; cin >> f[i]; } sort(s, s+N); sort(f, f+N); int si = 0; int fi = 0; int counter = 0; for (...
a.cc: In function 'int main()': a.cc:20:5: error: 'sort' was not declared in this scope; did you mean 'short'? 20 | sort(s, s+N); | ^~~~ | short
s904430940
p00355
C++
#include <iostream> using namespace std; int main () { long a,b,n,aa[100],bb[100]; cin >> a >> b >> n; if (n == 0) { cout << '0' << endl; break; } for (int i = 0; i < n; i++) { cin >> aa[i] >> bb[i]; } for (int i = 0; i < n; i++) { if (aa[i] <= a && bb[i] > a) { cout << '1' << endl; break;...
a.cc: In function 'int main()': a.cc:12:17: error: break statement not within loop or switch 12 | break; | ^~~~~
s042311926
p00355
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b,N; cin >> a >> b >> N; int a[1000] = {0}; int count1 = 0,count2 = 0; for(int i = a; i < b; i++){ a[i] = 1; count1++; } int x,y; for(int i = 0; i < N; i++){ cin >> x >> y; for(int i = x; i < y; i++){ a[i] = 0; ...
a.cc: In function 'int main()': a.cc:8:7: error: conflicting declaration 'int a [1000]' 8 | int a[1000] = {0}; | ^ a.cc:5:7: note: previous declaration as 'int a' 5 | int a,b,N; | ^ a.cc:11:6: error: invalid types 'int[int]' for array subscript 11 | a[i] = 1; | ^ a....
s875226640
p00355
C++
#include<iostream> using namespace std; int main(){ int a,b,N,s[105],f[105]; cin >> a>>b>>N; for (int i = 0; i < N; i++){ cin >> s[i] >> f[i]; if (f[i]>a&&s[i]<b){ int g = 1; } else{ int g = 0; } } if (g == 1){ cout << "1" << endl; } else{ cout << "0" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:15:13: error: 'g' was not declared in this scope 15 | if (g == 1){ | ^
s563309006
p00355
C++
#include<iostream> using namespace std; int main(){ short a,b,n; cin>>a>>b>>n; bool R[10001]; for(int i=0;i<=10001;i++){ R[i]=false; } for(int i=1;i<=n;i++){ short s,f; cin>>s>>f; for(int j=s+1;j<=f-1;j++){ R[j]=true; } } for(int i=a;i...
a.cc:30:5: error: redefinition of 'int main()' 30 | int main(){ | ^~~~ a.cc:4:5: note: 'int main()' previously defined here 4 | int main(){ | ^~~~
s514859816
p00355
C++
#include<iostream> using namespace std; int main(){ int a,b,n,k[101],l[101],x=0; cin>>a>>b>>n; for(int i=0;i<=n;i++){ cin>>k[i]>>l[i]; else if(k[i]>a&&l[i]<b){ x=1; break; } } cout<<x<<endl; return 0; }
a.cc: In function 'int main()': a.cc:9:8: error: 'else' without a previous 'if' 9 | else if(k[i]>a&&l[i]<b){ | ^~~~
s510821064
p00355
C++
#include <iostream> using namespace std; int main(){ int a,b,n; cin >> a >> b >> n; bool flg~0; for(int i=0; i<n; i++){ int s,f; cin >> s >> f; if(f<=a || b<=s){ continue; }else{ flg=1; } } cout << flg << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:11: error: expected initializer before '~' token 8 | bool flg~0; | ^ a.cc:16:7: error: 'flg' was not declared in this scope 16 | flg=1; | ^~~ a.cc:20:11: error: 'flg' was not declared in this scope 20 | cout << flg << endl; | ...
s666287021
p00355
C++
#include <iostream> using namespace std; int main(){   int a,b,n,s,f,i=0;   cin >> a >> b >> n;   while(1){     cin >> s >> f;     if((a >= s && b <= f) || (s > a && s < b) || (f > a && f < b)){       cout << '1' << endl;       break;     }     if(++i >= n){       cout << '0' << endl;       break;     }   } }
a.cc:4:1: error: extended character   is not valid in an identifier 4 |   int a,b,n,s,f,i=0; | ^ a.cc:4:1: error: extended character   is not valid in an identifier a.cc:5:1: error: extended character   is not valid in an identifier 5 |   cin >> a >> b >> n; | ^ a.cc:5:1: error: extended character  ...
s725807843
p00355
C++
#include <iostream> using namespace std; int main(){   int a,b,n,s,f,i=0;   cin >> a >> b >> n;   while(1){     cin >> s >> f;     if((a >= s && b <= f) || (s > a && s < b) || (f > a && f < b)){       cout << '1' << endl;       break;     }     if(++i >= n){       cout << '0' << endl;       break;     }   } }
a.cc:4:1: error: extended character   is not valid in an identifier 4 |   int a,b,n,s,f,i=0; | ^ a.cc:4:1: error: extended character   is not valid in an identifier a.cc:5:1: error: extended character   is not valid in an identifier 5 |   cin >> a >> b >> n; | ^ a.cc:5:1: error: extended character  ...
s812197477
p00356
C++
#include<iostream> #include<algorithm> int x, y; int main(){ std::cin >> x >> y; int ans = x + y; ans -= __gcd(a, b) - 1; std::cout << ans << std::endl; return 0; }
a.cc: In function 'int main()': a.cc:7:22: error: 'a' was not declared in this scope 7 | ans -= __gcd(a, b) - 1; | ^ a.cc:7:25: error: 'b' was not declared in this scope 7 | ans -= __gcd(a, b) - 1; | ^ a.cc:7:16: error: '__gcd' was not dec...
s982813023
p00356
C++
#include<iostream> using namespace std; main(){ int x,y,i1,ans=0,b; cin >> x >> y >> endl; if (x<y) b=x; else b=y; for (i1=1;i1<=b;i1++){ if (y/i1==x/i1 && y%i1==0 && y/i1==0) ans++; } cout << x+y-ans << endl; }
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:6:19: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and '<unresolved overloaded functi...
s651644994
p00356
C++
#include<iostream> using namespace std; int main(){ int x, y, ans; int Line_x, Line_y; cin >> x >> y; /* xとyの大きさが同じとき */ if(x == y){ Line_x = 2 * x - (x-1); Line_y = 2 * y - (y-1); ans = Line_x; } /* xとyの大きさが違うとき */ if(x < y){ swap(x, y); Line_x = 2 * x - (x-1); Line_y = 2 * y - (y-1); ans ...
a.cc:26:9: error: extended character   is not valid in an identifier 26 |   | ^ a.cc: In function 'int main()': a.cc:26:9: error: '\U00003000' was not declared in this scope 26 |   | ^~
s261505058
p00356
C++
#include<set> #include<iostream> #include<ctime> #include<string> #include<cstdlib> #include<algorithm> #include<random> #include<map> #include<unordered_map> #include<unordered_set> #include<vector> #include<list> #include<queue> #include<stack> #include<functional> #include<string.h> #include<limits.h> using namespac...
a.cc: In function 'int main()': a.cc:26:49: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 26 | cout << a + b + 2 - a*b / gcd(a, b) - 1 < endl; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ In file included from /usr...
s429848307
p00356
C++
#include <iostream> using namespace std; int main() { int x,y,count=0,a[1000]={}; double hiritu; cin>>x>>y; for(int i=0;i<x+x+1;i++){ hiritu=0; if(i%2==0){ hiritu=i*y/x; } if(hiritu%1!=0){ a[i-1]=1; a[i+1]=1; } } for(int i=0;i<x+x+1;i++){ count=count+a[i]; } cout<<count+x+1<<endl; return ...
a.cc: In function 'int main()': a.cc:13:26: error: invalid operands of types 'double' and 'int' to binary 'operator%' 13 | if(hiritu%1!=0){ | ~~~~~~^~ | | | | double int
s322447892
p00356
C++
#include<iostream> using namespace std; int main(){ int x,y; cin>>x>>y; cout>>x+y+1-gcd(x,y)>>endl; return 0; }
a.cc: In function 'int main()': a.cc:6:13: error: 'gcd' was not declared in this scope 6 | cout>>x+y+1-gcd(x,y)>>endl; | ^~~
s117088249
p00356
C++
#include<iostream> using namespace std; int main(){ int x,y; cin>>x>>y; cout<<x+y+1-gcd(x,y)>>endl; return 0; }
a.cc: In function 'int main()': a.cc:6:13: error: 'gcd' was not declared in this scope 6 | cout<<x+y+1-gcd(x,y)>>endl; | ^~~
s628894092
p00356
C++
#include<iostream> using namespace std; int main(){ int x,y; cin>>x>>y; cout<<x+y+1-gcd(x,y)>>endl; return 0; }
a.cc: In function 'int main()': a.cc:6:13: error: 'gcd' was not declared in this scope 6 | cout<<x+y+1-gcd(x,y)>>endl; | ^~~
s143431935
p00356
C++
#include<iostream> using namespace std; int main(){ int x,y; cin>>x>>y; cout<<x+y+1-gcd(x,y)<<endl; return 0; }
a.cc: In function 'int main()': a.cc:6:13: error: 'gcd' was not declared in this scope 6 | cout<<x+y+1-gcd(x,y)<<endl; | ^~~
s306753878
p00356
C++
#include<iostream> using namespace std; int main(){ int x,y; cin>>x>>y; cout<<x+y+1-__gcd(x,y)<<endl; return 0; }
a.cc: In function 'int main()': a.cc:6:13: error: '__gcd' was not declared in this scope 6 | cout<<x+y+1-__gcd(x,y)<<endl; | ^~~~~
s160110000
p00356
C++
#include<iostream> using namespace std; int main(){ int x,y; cin>>x>>y; cout<<x+y+1-__gcd(x,y)<<endl; return 0; }
a.cc: In function 'int main()': a.cc:6:13: error: '__gcd' was not declared in this scope 6 | cout<<x+y+1-__gcd(x,y)<<endl; | ^~~~~
s331451367
p00356
C++
#include <iostream> using namespace std; int main(){ int a,b; double x,y,k; cin >> a >> b; x = a * 2.0; y = b; k = a+1 + b+ 1 -2; for(int i=1;i<a;i++){ for(double j=1.0;j<y;j++){ //cout << i+2.0*(y/x) << endl; if(i*2.0*(y/x) == j){ k--; break; } } } cout << ...
a.cc:24:1: error: expected declaration before '}' token 24 | } | ^
s864870422
p00357
C++
#include <iostream> #include <algorithm> using namespace std; int main(){ int n; cin>>n; int d[300000]; for(int i=0;i<n-1;i++){ D=max(D,d[i]); if(D<10){ cout<<"no"<<endl; return 0; } D-=10; } for(int i=n-1;i<0;i++){ D=max(D,d[i]...
a.cc: In function 'int main()': a.cc:11:9: error: 'D' was not declared in this scope 11 | D=max(D,d[i]); | ^ a.cc:21:9: error: 'D' was not declared in this scope 21 | D=max(D,d[i]); | ^
s238186015
p00357
C++
#include <iostream> #include <algorithm> using namespace std; int main(){ int n; cin>>n; int D; for(int i=0;i<n;i++){ cin>>d[i]; } int d[300000]; for(int i=0;i<n-1;i++){ D=max(D,d[i]); if(D<10){ cout<<"no"<<endl; return 0; } ...
a.cc: In function 'int main()': a.cc:10:14: error: 'd' was not declared in this scope 10 | cin>>d[i]; | ^
s768433370
p00357
C++
#include<iostream> using namespace std; int main() { int n,a[300000]={0},length=0; bool hantei1=true,hantei2=true; cin>>n; for(int i=0; i<n; i++) cin>>a[i]; for(int i=n-1; i>0; i--){ if(a[i]<10){ hantei1=false; length=10; for(int j=i-1; j>0; j--){ length+=10; if(length>1...
a.cc: In function 'int main()': a.cc:42:26: error: expected '}' at end of input 42 | } | ^ a.cc:5:9: note: to match this '{' 5 | { | ^
s879330085
p00357
C++
#include <bits/stdc++.h> using namespace std; int *d; int n; long int max(long int a,int b){ if(a<b)return b; else return a; } long int min(long int a,int b){ if(a<b)return a; else return b; } string check2(){ long int canhop=n-1; long int nowpos=n-1; while (true){ nowpos=canhop; long int oldh=ca...
a.cc: In function 'std::string check2()': a.cc:21:29: error: expected ';' before 'for' 21 | if(canhop<0)return "yes" | ^ | ; 22 | for(int i=nowpos;i>canhop;i--){ | ~~~
s460154055
p00357
C++
#include <bits/stdc++.h> using namespace std; int *d; int n; long int max(long int a,int b){ if(a<b)return b; else return a; } long int min(long int a,int b){ if(a<b)return a; else return b; } string check2(){ long int canhop=n-1; long int nowpos=n-1; while (true){ nowpos=canhop; long int oldh=ca...
a.cc:60:3: error: expected unqualified-id before 'else' 60 | else return b; | ^~~~ a.cc:61:1: error: expected declaration before '}' token 61 | } | ^ a.cc:62:8: error: redefinition of 'std::string check2()' 62 | string check2(){ | ^~~~~~ a.cc:13:8: note: 'std::string check2()' prev...
s401124676
p00357
C++
#include <bits/stdc++.h> using namespace std; int *d; int n; long int max(long int a,int b){ if(a<b)return b; else return a; } long int min(long int a,int b){ if(a<b)return a; else return b; } string check2(){ long int canhop=n-1; long int nowpos=n-1; while (true){ nowpos=canhop; long int oldh=ca...
a.cc:60:3: error: expected unqualified-id before 'else' 60 | else return b; | ^~~~ a.cc:61:1: error: expected declaration before '}' token 61 | } | ^ a.cc:62:8: error: redefinition of 'std::string check2()' 62 | string check2(){ | ^~~~~~ a.cc:13:8: note: 'std::string check2()' prev...
s396996550
p00357
C++
#include <bits/stdc++.h> using namespace std; int *d; int n; long int max(long int a,int b){ if(a<b)return b; else return a; } long int min(long int a,int b){ if(a<b)return a; else return b; } string check2(){ long int canhop=n-1; long int nowpos=n-1; while (true){ nowpos=canhop; long int oldh=ca...
a.cc:60:3: error: expected unqualified-id before 'else' 60 | else return b; | ^~~~ a.cc:61:1: error: expected declaration before '}' token 61 | } | ^ a.cc:62:8: error: redefinition of 'std::string check2()' 62 | string check2(){ | ^~~~~~ a.cc:13:8: note: 'std::string check2()' prev...
s962513431
p00357
C++
#include <bits/stdc++.h> using namespace std; int n; int d[1000000]; string check2(){ int nowpos=n-1; int canhop=n-1; int minhop=n-1; for(int j=0;j<300001){ canhop=nowpos-d[nowpos]/10; if(minhop<=0)return "yes"; for(int i=nowpos;i>=canhop;i--){ if(i-d[i]/10<canhop)nowpos=i; minhop=min...
a.cc: In function 'std::string check2()': a.cc:11:23: error: expected ';' before ')' token 11 | for(int j=0;j<300001){ | ^ | ;
s228941520
p00357
C++
#include <bits/stdc++.h> using namespace std; int n; int d[1000000]; string check2(){ int nowpos=n-1; int canhop=n-1; int minhop=n-1; for(int j=0;j<300001){ canhop=nowpos-d[nowpos]/10; if(minhop<=0)return "yes"; for(int i=nowpos;i>=canhop;i--){ if(i-d[i]/10<canhop)nowpos=i; minhop=min...
a.cc: In function 'std::string check2()': a.cc:11:23: error: expected ';' before ')' token 11 | for(int j=0;j<300001){ | ^ | ;
s434009531
p00357
C++
#include <bits/stdc++.h> using namespace std; int n; int d[1000000]; int main(){ cin >>n; for(int i=0;i<n;i++){ cin>>d[i]; } int nowpos=0; int canhop=0; int maxhop=0; while(true){ canhop=d[nowpos]/10+nowpos; maxhop=canhop; if(canhop>=n-1){ nowpos=n-1; canhop=n-1; minhop=n-...
a.cc: In function 'int main()': a.cc:24:4: error: 'minhop' was not declared in this scope; did you mean 'maxhop'? 24 | minhop=n-1; | ^~~~~~ | maxhop
s439977629
p00357
C++
#include <bits/stdc++.h> using namespace std; int n; int d[1000000]; string check2(){ int nowpos=n-1; int canhop=n-1; int minhop=n-1; for(int j=0;j<300000;j++){ canhop=nowpos-d[nowpos]/10; minhop=canhop; if(canhop<=0)return "yes"; for(int i=nowpos;i>=canhop;i--){ if(i-d[i]/10<canhop){ ...
a.cc: In function 'std::string check2()': a.cc:24:14: error: expected ';' before '}' token 24 | return "no" | ^ | ; 25 | } | ~ a.cc: In function 'std::string check1()': a.cc:44:14: error: expected ';' before '}' token 44 | return "no" | ...
s534550290
p00357
C++
#include <iostream> using namespace std; int d[300005]; int main() { int N cin >> N; for(int i=0; i<N; i++) cin >> d[i]; for(int i=0; i<2; i++) { int a=0; for(int j=0; j<N; j++) { if(a<j*10){ cout << "no" << endl; return 0; } a=max(a, j*10+d[j]); } reverse(d, d...
a.cc: In function 'int main()': a.cc:7:3: error: expected initializer before 'cin' 7 | cin >> N; | ^~~ a.cc:8:18: error: 'N' was not declared in this scope 8 | for(int i=0; i<N; i++) cin >> d[i]; | ^ a.cc:11:20: error: 'N' was not declared in this scope 11 | for(int j=0...
s307221022
p00357
C++
#include <iostream> using namespace std; int d[300005]; int main() { int N cin >> N; for(int i=0; i<N; i++) cin >> d[i]; for(int i=0; i<2; i++) { int a=0; for(int j=0; j<N; j++) { if(a<j*10){ cout << "no" << endl; return 0; } a=max(a, j*10+d[j]); } reverse(d, d...
a.cc: In function 'int main()': a.cc:7:3: error: expected initializer before 'cin' 7 | cin >> N; | ^~~ a.cc:8:18: error: 'N' was not declared in this scope 8 | for(int i=0; i<N; i++) cin >> d[i]; | ^ a.cc:11:20: error: 'N' was not declared in this scope 11 | for(int j=0...
s926328054
p00357
C++
#include <iostream> using namespace std; int d[300005]; int main() { int N; cin >> N; for(int i=0; i<N; i++) cin >> d[i]; for(int i=0; i<2; i++) { int a=0; for(int j=0; j<N; j++) { if(a<j*10){ cout << "no" << endl; return 0; } a=max(a, j*10+d[j]); } reverse(d, ...
a.cc: In function 'int main()': a.cc:18:5: error: 'reverse' was not declared in this scope 18 | reverse(d, d+N); | ^~~~~~~
s641779150
p00357
C++
#include<iostream> #include<algorithm> #include<vector> #define STARTPOINT 1 using namespace std; bool func(vector<int> &line){ int power = line.front(); int place = STARTPOINT; while(place!=line.size()){ if(power<10)return false; power = max(power,line[place++]); } return true; int main(){ int N; cin>>N; v...
a.cc: In function 'bool func(std::vector<int>&)': a.cc:14:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 14 | int main(){ | ^~ a.cc:14:9: note: remove parentheses to default-initialize a variable 14 | int main(){ | ^~ | -- a.cc...
s547371305
p00357
C++
#include <iostream> using namespace std; int main(){ int a,m=0,n=0,h=20,j=0; cin>>a; int map[a]={0}; for (int A=0;A<a;A++){ cin>>map[A]; if (n==0){ if (map[A]<10){ m=1; cout<<"no"<<endl; return 0; } n=1; } if (map[A]<10){ for (int B=A-1;B>=0;B--){ if (map[B]>=h){ j=0; ...
a.cc: In function 'int main()': a.cc:64:2: error: expected '}' at end of input 64 | } | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s311944739
p00357
C++
#include<bits/stdc++.h> using namespace std; int main{ int n,h=0,j,c=0; cin >> n; int d[n]; for(int i = 0; i < n; i++) { cin >> d[i]; } if (d[0]<10 || d[n-1]<10){ cout << "no" << endl; } else { h=h+d[h]/10; j=h; while(1){ ...
a.cc:4:5: error: cannot declare '::main' to be a global variable 4 | int main{ | ^~~~ a.cc:6:5: error: expected primary-expression before 'int' 6 | int n,h=0,j,c=0; | ^~~ a.cc:6:5: error: expected '}' before 'int' a.cc:4:9: note: to match this '{' 4 | int main{ | ^ a.cc...
s802147218
p00357
C++
#include<bits/stdc++.h> using namespace std; int main{ int n,h=0,j,c=0; cin >> n; int d[n]; for(int i = 0; i < n; i++) { cin >> d[i]; } if (d[0]<10 || d[n-1]<10){ cout << "no" << endl; } else { h=h+d[h]/10; j=h; while(1){ ...
a.cc:4:5: error: cannot declare '::main' to be a global variable 4 | int main{ | ^~~~ a.cc:6:5: error: expected primary-expression before 'int' 6 | int n,h=0,j,c=0; | ^~~ a.cc:6:5: error: expected '}' before 'int' a.cc:4:9: note: to match this '{' 4 | int main{ | ^ a.cc...
s636049659
p00357
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n,h=0,j,c=0; cin >> n; int d[n]; for(int i = 0; i < n; i++){ cin >> d[i]; } if (d[0]<10 || d[n-1]<10){ cout << "no" << endl; } else{ C=0; h=0; h=h+d[h]/10; j=h; whi...
a.cc: In function 'int main()': a.cc:17:9: error: 'C' was not declared in this scope 17 | C=0; | ^
s238021848
p00357
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n,h=0,j,c=0; cin >> n; int d[n]; for(int i = 0; i < n; i++){ 0cin >> d[i]; } if (d[0]<10 || d[n-1]<10){ cout << "no" << endl; } else{ c=0; h=0; h=h+d[h]/10; j=h; ...
a.cc: In function 'int main()': a.cc:11:9: error: unable to find numeric literal operator 'operator""cin' 11 | 0cin >> d[i]; | ^~~~
s896053372
p00357
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n,h=0,j,c=0; cin >> n; int d[n]; for(int i = 0; i < n; i++){ 0cin >> d[i]; } if (d[0]<10 || d[n-1]<10){ cout << "no" << endl; } else{ c=0; h=0; h=h+d[h]/10; j=h; ...
a.cc: In function 'int main()': a.cc:11:9: error: unable to find numeric literal operator 'operator""cin' 11 | 0cin >> d[i]; | ^~~~
s800895024
p00357
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n,,count,c,ans; int d[300100]={}; cin >> n; for(int i=0; i<n; i++) cin >> d[i]; /*for(int i=0; i<n; i++){ cout << d[i] << " "; }*/ for(int j=0; j<2; j++){ if(ans==1) break; if(j==1) { reverse(d,d+n); /*for(int i=0; i<n; i...
a.cc: In function 'int main()': a.cc:4:9: error: expected unqualified-id before ',' token 4 | int n,,count,c,ans; | ^
s154199224
p00357
C++
import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.StringTokenizer; public class Main { public static void main(String[] args) throws Exception { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(in.readLine()); int[] trump = new i...
a.cc:1:1: error: 'import' does not name a type 1 | import java.io.BufferedReader; | ^~~~~~ 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.io.InputStreamReader; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available wit...
s538752553
p00357
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> P; #define pb push_back #define rep(i, n) for(int i = 0; i < (n); i++) #define FOR(i, a, n) for(int i = a; i < (n); i++) #define mod (ll)(1e9+7) #define int ll #define INF 100000000 __attribute__((constructor)) void initial() { ...
a.cc: In function 'bool check()': a.cc:21:10: error: 'd' was not declared in this scope 21 | ll a = d[0]; | ^ a.cc:22:13: error: 'n' was not declared in this scope 22 | FOR(i, 1, n) { | ^ a.cc:9:42: note: in definition of macro 'FOR' 9 | #define FOR(i, a, n) for(int i = a;...
s409288537
p00357
C++
#include <bits/stdc++.h> using namespace std; int *d; int n; string check2(){ int canhop=n-1; int nowpos=n-1; while (true){ if(nowpos<=0)return "Yes"; nowpos=canhop; long int oldh=canhop; canhop=nowpos-d[nowpos]/10; if(canhop<0)return "yes"; for(int i=nowpos;i>canhop;i--){ nowpos=mi...
a.cc: In function 'std::string check1()': a.cc:35:17: error: no matching function for call to 'max(long int&, int)' 35 | nowpos=max(nowpos,d[i]/10+i); | ~~~^~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bi...
s115628151
p00357
C++
#include<iostream> using namespace std; int main(){ int n,d[300000]x=0; cin>>n; for(int i=1;i<=n;i++){ cin>>d[i]; if(d[i]<10)x=1,break; else if(d[i]>=20)i=i+d[i]/10-1; } for(int i=n;i>=1;i--){ if(d[i]<10)x=1,break; else if(d[i]>=20)i=i-d[i]/10+1; } if(x==1)cout<<"no"<<endl; else cout<<"yes"<<endl; re...
a.cc: In function 'int main()': a.cc:4:24: error: expected initializer before 'x' 4 | int n,d[300000]x=0; | ^ a.cc:7:22: error: 'd' was not declared in this scope 7 | cin>>d[i]; | ^ a.cc:8:28: error: 'x' was not declared in this sco...
s870879513
p00357
C++
#include<iostream> using namespace std; int main(){ int n,d[300000],x=0; cin>>n; for(int i=1;i<=n;i++){ cin>>d[i]; if(d[i]<10)x=1,break; else if(d[i]>=20)i=i+d[i]/10-1; } for(int i=n;i>=1;i--){ if(d[i]<10)x=1,break; else if(d[i]>=20)i=i-d[i]/10+1; } if...
a.cc: In function 'int main()': a.cc:8:24: error: expected primary-expression before 'break' 8 | if(d[i]<10)x=1,break; | ^~~~~ a.cc:12:24: error: expected primary-expression before 'break' 12 | if(d[i]<10)x=1,break; | ^~~~~
s808884942
p00357
C++
#include<iostream> #include<algolithm> using namespace std; int main(){ int N; cin >> N; int d[300000]; for(int i=0; i<N; i++){ cin >> d[i]; } int D = 0; for(int i=0; i<N-1; i++){ D = max(D, d[i]); if(D<10){ cout << "no" << endl; return 0; } D -= 10; } D = 0; fo...
a.cc:2:9: fatal error: algolithm: No such file or directory 2 | #include<algolithm> | ^~~~~~~~~~~ compilation terminated.
s701091138
p00357
C++
#include <iostream> using namespace std; int d[300000]; int main(){ int n,m=1; cin>>n; for(int i=1;i<=n;i++)cin>>d[i]; for(int i=1;i<=n;i++){ if(m < i){ cout << "no" << endl; return 0; } if(d[i]>=10){ m=max(i+d[i]/10,m); } } if(m>=i){ for(int i=n;i>0;i--){ if(m > i){ cout << "no" << endl...
a.cc: In function 'int main()': a.cc:19:15: error: 'i' was not declared in this scope 19 | if(m>=i){ | ^
s467629886
p00357
C++
#include <iostream> using namespace std; int d[300000]; int main(){ int n,m=1; cin>>n; for(int i=1;i<=n;i++)cin>>d[i]; for(int i=1;i<=n;i++){ if(m < i){ cout << "no" << endl; return 0; } if(d[i]>=10){ m=max(i+d[i]/10,m); } } //d[i]を反転させる処理 for(int i=1;i<=n/2;i++)swap(d[i],d[n+1-i]; m = 1; fo...
a.cc: In function 'int main()': a.cc:20:50: error: expected ')' before ';' token 20 | for(int i=1;i<=n/2;i++)swap(d[i],d[n+1-i]; | ~ ^ | )
s803096381
p00357
C++
#include <iostream> #include <bits/stdc++.h> using namespace std; int main(void){ int N,S,d[20005]; cin>>N; for (int i=0;i<N;i++){ cin>>d[i]; } int a; for(int i=0;i<N;i++){ for(a=1;a<i;a++){ } } if(d[i]>=10){ S=1; }else if...
a.cc: In function 'int main()': a.cc:17:13: error: 'i' was not declared in this scope 17 | if(d[i]>=10){ | ^
s622881768
p00358
Java
import java.util.Scanner; import java.util.stream.IntStream; public class Solution{ static IntStream REPS(int v){return IntStream.range(0,v);} static IntStream REPS(int l,int r){return IntStream.rangeClosed(l,r);} static IntStream INS(int n) {return REPS(n).map(i->getInt());} static Scanner s=new Scanner(System.in...
Main.java:4: error: class Solution is public, should be declared in a file named Solution.java public class Solution{ ^ 1 error
s705422365
p00358
C++
#include<bits/stdc++.h> using namespace std; using ll = long long; // #undef DEBUG // #define DEBUG /// {{{ DEBUG --- /// #ifdef DEBUG template <typename T> ostream &operator<<(ostream &o, const vector<T> &v) { o << "{"; for(size_t i = 0; i < v.size(); i++) o << v[i] << (i + 1 != v.size() ? ", " : ""); o << "}"; retur...
a.cc: In function 'int main()': a.cc:71:28: error: 'j' was not declared in this scope 71 | ans = max(ans, dp[y][j]); | ^
s765925861
p00358
C++
##include<algorithm> #include <bits/stdc++.h> #include <math.h> #include <queue> using namespace std; int ma[100000][4]; int main(void){ int h,n,x,y,ans=0; cin>>h>>n; for(int i=0;i<n;i++){ cin>>y>>x; ma[x][y]=1; } for(int i=0;i<h-1;i++){ for(int j=0;j<3;j+=2){ if(ma[i][j]!=1&&ma[i+1][j]!=1&&ma[i][j+1]!=...
a.cc:1:1: error: stray '##' in program 1 | ##include<algorithm> | ^~ a.cc:1:3: error: 'include' does not name a type 1 | ##include<algorithm> | ^~~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/algorithm:60, from /u...
s498885446
p00358
C++
1000 800 0 2 0 3 0 12 0 15 0 17 0 23 0 27 0 44 0 45 0 47 0 57 0 67 0 71 0 86 0 88 0 89 0 90 0 94 0 97 0 110 0 117 0 122 0 127 0 131 0 139 0 147 0 154 0 156 0 159 0 166 0 171 0 194 0 195 0 196 0 204 0 209 0 220 0 224 0 225 0 238 0 257 0 269 0 278 0 295 0 297 0 298 0 304 0 308 0 320 0 325 0 329 0 330 0 333 0 337 0 339 0 ...
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 1000 800 | ^~~~
s343317552
p00358
C++
#include <stdio.h> #define MAX_H 100000 int blocked[MAX_H]; int dp[2][1<<4]; main() { int h, n; scanf("%d %d", &h, &n); int x, y; for ( int i=0; i<n; ++i ) { scanf(“%d %d”, &x, &y); blocked[y] |= 1<<x; } int locate[5] = { 0x0, 0x3, 0x6, 0xc, 0xf };//置き方パターン int add[5] = { 0, 1, 1, 1, 2 };//各置き方パターンで置ける個数 int* c...
a.cc:9:7: error: extended character “ is not valid in an identifier 9 | scanf(“%d %d”, &x, &y); blocked[y] |= 1<<x; | ^ a.cc:9:12: error: extended character ” is not valid in an identifier 9 | scanf(“%d %d”, &x, &y); blocked[y] |= 1<<x; | ^ a.cc:5:1: warning: ISO C++ forbids declara...
s527811709
p00358
C++
#include <stdio.h> #define MAX_H 100000 int blocked[MAX_H]; int dp[2][1<<4]; main() { int h, n; scanf("%d %d", &h, &n); int x, y; for ( int i=0; i<n; ++i ) { scanf(“%d %d”, &x, &y); blocked[y] |= 1<<x; } int locate[5] = { 0x0, 0x3, 0x6, 0xc, 0xf };//置き方パターン int add[5] = { 0, 1, 1, 1, 2 };//各置き方パターンで置ける個数 int* c...
a.cc:9:7: error: extended character “ is not valid in an identifier 9 | scanf(“%d %d”, &x, &y); blocked[y] |= 1<<x; | ^ a.cc:9:12: error: extended character ” is not valid in an identifier 9 | scanf(“%d %d”, &x, &y); blocked[y] |= 1<<x; | ^ a.cc:5:1: warning: ISO C++ forbids declara...
s843736359
p00358
C++
#include <stdio.h> #define MAX_H 100000 int blocked[MAX_H]; int dp[2][1<<4]; main() { int h, n; scanf("%d %d", &h, &n); int x, y; for ( int i=0; i<n; ++i ) { scanf("%d %d", &x, &y); blocked[y] |= 1<<x; } int locate[5] = { 0x0, 0x3, 0x6, 0xc, 0xf };//置き方パターン int add[5] = { 0, 1, 1, 1, 2 };//各置き方パターンで置ける個数 int* c...
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:23:6: error: 'fill' is not a member of 'std' 23 | std::fill( next, next+(1<<4), -1 ); | ^~~~ a.cc:31:20: error: 'max' is not a member of 'std' 31 | n...
s689071349
p00358
C++
#include <stdio.h> #define MAX_H 100000 int blocked[MAX_H]; int dp[2][1<<4]; main() { int h, n; scanf("%d %d", &h, &n); int x, y; for ( int i=0; i<n; ++i ) { scanf("%d %d", &x, &y); blocked[y] |= 1<<x; } int locate[5] = { 0x0, 0x3, 0x6, 0xc, 0xf };//置き方パターン int add[5] = { 0, 1, 1, 1, 2 };//各置き方パターンで置ける個数 int...
a.cc:6:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 6 | main() { | ^~~~ a.cc: In function 'int main()': a.cc:24:8: error: 'fill' is not a member of 'std' 24 | std::fill( next, next+(1<<4), -1 ); | ^~~~ a.cc:32:25: error: 'max' is not a member of 'std' 32 ...
s937986488
p00359
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
s646482089
p00359
C++
#include <bits/stdc++.h> using namespace std; int main() { int W, H, N; int ymax[100005] = {}; cin >> W >> H >> N; for(int i = 0; i < N; i++) { int x, y; cin >> x >> y; ymax[x] = max(ymax[x], y); } int minv = 1 << 28; int mm = 0; for(int i = W - 1; i >= 0; i...
a.cc: In function 'int main()': a.cc:19:17: error: no matching function for call to 'max(int&)' 19 | mm = max(ymax[i]); | ~~~^~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from ...
s755275611
p00359
C++
#include <iostream> using namespace std; int xmax[100005]; int main(){ int w, h, n; cin >> w >> h >> n; fill(xmax, xmax+h+1, 0); for(int i=0; i<n; i++) { int x, y; cin >> x >> y; xmax[y]=max(xmax[y], x); } for(int i=h-2; i>=0; i--){ xmax[i]=max(xmax[i], xmax[i+1]); } int ans=INT_MAX; ...
a.cc: In function 'int main()': a.cc:16:11: error: 'INT_MAX' was not declared in this scope 16 | int ans=INT_MAX; | ^~~~~~~ a.cc:2:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 1 | #include <iostream> +++ |+#include <climits> ...
s623332735
p00359
C++
#include <iostream> #include <algorithm> #include <cmath> #define rep(i, a, n) for(int i = a;i < n;i++) using namespace std; int w, h, n; int seg[131072*2 - 1]; int N; int p(int i){ return (int)((i-1) / 2); } void update(int i){ if(i == 0) return; if(seg[p(i)] >= seg[i]) return; seg[p(i)] = seg[i]; update(p(...
a.cc: In function 'int solve()': a.cc:42:17: error: 'INT_MAX' was not declared in this scope 42 | int c = INT_MAX; | ^~~~~~~ a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 3 | #include <cmath> +++ |+#include <cli...
s008504089
p00359
C++
#include <iostream> #include <algorithm> #include <cstdio> using namespace std; int wh[100001] = {}; int main(void) { int w, h, n; cin >> w >> h >> n; int at_most_w=0,at_most_h=0; for (int i = 0; i<n; i++) { int x, y; scanf("%d%d",&x,&y); wh[y] = max(wh[y], x); at_most_w=max(x,at_most_w);at_most_h=max(y,...
a.cc:37:17: error: stray '#' in program 37 | cout << #include <iostream> | ^ a.cc: In function 'int main()': a.cc:37:18: error: 'include' was not declared in this scope 37 | cout << #include <iostream> | ^~~~~~~ a.cc:37:35: error: expected primary-expre...
s103136997
p00360
C++
#include <iostream> using namespace std; int bit[200005]; void add(int i, int x){ i++; while(i<200005){ bit[i]+=x; i+=i&-i; } } int sum(int i){ i++; int ret=0; while(i){ ret+=bit[i]; i-=i&-i; } return ret; } char str[200005]; int nxt[26]; int main(){ int k; cin >> str >> k; fill(...
a.cc: In function 'int main()': a.cc:28:18: error: 'n' was not declared in this scope 28 | for(int i=0; i<n; i++) add(i, 1); | ^ a.cc:31:18: error: 'n' was not declared in this scope 31 | while(nxt[i]<n && str[nxt[i]]!='a'+i) nxt[i]++; | ^ a.cc:33:9: error: 'str...
s606594065
p00360
C++
#include <iostream> using namespace std; int bit[200005]; inline void add(int i, int x){ i++; while(i<200005){ bit[i]+=x; i+=i&-i; } } inline int sum(int i){ i++; int ret=0; while(i){ ret+=bit[i]; i-=i&-i; } return ret; } string str; int nxt[26]; void gonext(int i){ while(nxt[i]<n &&...
a.cc: In function 'void gonext(int)': a.cc:25:16: error: 'n' was not declared in this scope 25 | while(nxt[i]<n && str[nxt[i]]!='a'+i) nxt[i]++; | ^
s476479023
p00360
C++
#include <iostream> #include <vector> using namespace std; int n, k; string str; int nxt[26]; vector<int> v[26]; int bit[200005]; inline void add(int i, int x){ i++; while(i<200005){ bit[i]+=x; i+=i&-i; } } inline int sum(int i){ i++; int ret=0; while(i){ ret+=bit[i]; i-=i&-i; } return ...
a.cc: In function 'int main()': a.cc:42:28: error: no match for 'operator-' (operand types are 'std::vector<int>' and 'int') 42 | int cnt=sum(v[nxt[j]]-1); | ~~~~~~~~~^~ | | | | | int | std::...
s719628288
p00360
C++
#include <iostream> #include <vector> using namespace std; int n, k; string str; int nxt[26]; vector<int> v[26]; int bit[200005]; inline void add(int i, int x){ i++; while(i<200005){ bit[i]+=x; i+=i&-i; } } inline int sum(int i){ i++; int ret=0; while(i){ ret+=bit[i]; i-=i&-i; } return ...
a.cc: In function 'int main()': a.cc:45:21: error: cannot convert 'std::vector<int>' to 'int' 45 | add(v[nxt[j]], -1); | ~~~~~~~~^ | | | std::vector<int> a.cc:10:21: note: initializing argument 1 of 'void add(int, int)' 10 | inline vo...
s236018619
p00360
C++
#include <bits/stdc++.h> using namespace std; struct BinaryIndexedTree { BinaryIndexedTree(int n) : n(n + 1), v(n + 2, 0), r(1 << (31 - __builtin_clz(n + 1))) {} vector<int> v; int n, r; int sum(int i) { int ret = 0; for (++i; i; i -= i & -i) res += v[i]; return ret; } void add(int i, int ...
a.cc: In member function 'int BinaryIndexedTree::sum(int)': a.cc:12:31: error: 'res' was not declared in this scope; did you mean 'ret'? 12 | for (++i; i; i -= i & -i) res += v[i]; | ^~~ | ret
s133121596
p00361
C++
#include <iostream> using namespace std; int n, m; int s[10005], t[10005]; vector<int> edge[10005], redge[10005]; bool used[10005]; vector<int> ord; int comp[10005]; int noin[10005], noout[10005]; void dfs1(int a){ used[a]=true; for(int i=0; i<edge.size(); i++){ int b=edge[a][i]; if(!used[b]) dfs1(b); }...
a.cc:6:1: error: 'vector' does not name a type 6 | vector<int> edge[10005], redge[10005]; | ^~~~~~ a.cc:8:1: error: 'vector' does not name a type 8 | vector<int> ord; | ^~~~~~ a.cc: In function 'void dfs1(int)': a.cc:14:18: error: 'edge' was not declared in this scope 14 | for(int i=0; i<edge.s...
s145792707
p00361
C++
#include <iostream> #include <vector> using namespace std; int n, m; int s[10005], t[10005]; vector<int> edge[10005], redge[10005]; bool used[10005]; vector<int> ord; int comp[10005]; int noin[10005], noout[10005]; void dfs1(int a){ used[a]=true; for(int i=0; i<edge.size(); i++){ int b=edge[a][i]; if(!use...
a.cc: In function 'void dfs1(int)': a.cc:15:23: error: request for member 'size' in 'edge', which is of non-class type 'std::vector<int> [10005]' 15 | for(int i=0; i<edge.size(); i++){ | ^~~~ a.cc: In function 'void dfs2(int, int)': a.cc:25:24: error: request for member 'size' in 'redge...
s817951388
p00362
C++
#include<bits/stdc++.h> using namespace std; struct Mo_3D { vector< int > left, right, index, order; vector< bool > v; int width; int nl, nr, time, ptr; Mo_3D(int n) : width((int) pow(n, 2.0 / 3.0)), nl(0), nr(0), ptr(0), time(0), v(n) {} void insert(int idx, int l, int r) /* [l, r) */ { left.push...
a.cc:83:13: error: no declaration matches 'void Mo_3D::distribute(long long int)' 83 | inline void Mo_3D::distribute(int idx) | ^~~~~ a.cc:47:15: note: candidate is: 'void Mo_3D::distribute(int)' 47 | inline void distribute(int idx); | ^~~~~~~~~~ a.cc:5:8: note: 'struct Mo_...
s807158321
p00362
C++
// GEKI TSU RA I // see https://gist.github.com/LumaKernel/ff55d49ee1af69b7388f15b707e75c15 #include <iostream> #include <vector> #include <map> #include <set> #include <queue> #include <deque> #include <stack> #include <algorithm> #include <cmath> #include <cstring> #include <complex> #include <random> #include <ioma...
a.cc:120:13: error: 'int index [100000]' redeclared as different kind of entity 120 | int index[_N], id; | ^ In file included from /usr/include/string.h:462, from /usr/include/c++/14/cstring:43, from a.cc:13: /usr/include/strings.h:50:20: note: previous declaration ...
s349275842
p00362
C++
// GEKI TSU RA I // see https://gist.github.com/LumaKernel/ff55d49ee1af69b7388f15b707e75c15 #include <iostream> #include <vector> #include <map> #include <set> #include <queue> #include <deque> #include <stack> #include <algorithm> #include <cmath> #include <cstring> #include <complex> #include <random> #include <ioma...
a.cc:120:13: error: 'int index [100000]' redeclared as different kind of entity 120 | int index[_N], id; | ^ In file included from /usr/include/string.h:462, from /usr/include/c++/14/cstring:43, from a.cc:13: /usr/include/strings.h:50:20: note: previous declaration ...
s472817610
p00362
C++
// GEKI TSU RA I // see https://gist.github.com/LumaKernel/ff55d49ee1af69b7388f15b707e75c15 #include <iostream> #include <vector> #include <map> #include <set> #include <queue> #include <deque> #include <stack> #include <algorithm> #include <cmath> #include <cstring> #include <complex> #include <random> #include <ioma...
a.cc: In function 'int dfs1(int, int)': a.cc:131:17: error: reference to 'size' is ambiguous 131 | return size[t] = sz; | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/...
s430842919
p00362
C++
#include <iostream> #include <vector> using namespace std; typedef long long ll; vector<pair<int, ll> > path[100005]; int par[100005]; int dep[100005]; int siz[100005]; ll cst[100005]; int hev[100005]; void dfs(int a){ siz[a]=1; for(int i=0; i<path[a].size(); i++){ int d=path[a][i].first; if(d==par[a]) continue;...
a.cc: In function 'void set(int, ll)': a.cc:39:12: error: 'sum' was not declared in this scope 39 | x-=sum(i+1)-sum(i); | ^~~ a.cc: In function 'int lca(int, int)': a.cc:56:27: error: expected initializer before '==' token 56 | int p=hl_par[a], q==hl_par[b]; | ...
s944919823
p00362
C++
#include <bits/stdc++.h> typedef long long L; using namespace std; #define N 100005 map<L,L> path[N]; L par[N], dep[N], siz[N], hev[N]; L cst[N]; void dfs(L a){ siz[a]=1; for(map<L,L>::iterator I=path[a].begin();I!=path[a].end();I++){ L d=I->first; if(d==par[a]) continue; par[d]=a; ...
/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
s841552171
p00362
C++
pos[a]=c++; hl_par[a]=i;
a.cc:2:13: error: 'pos' does not name a type 2 | pos[a]=c++; | ^~~ a.cc:3:13: error: 'hl_par' does not name a type 3 | hl_par[a]=i; | ^~~~~~
s133275644
p00362
C++
#include <Bs/stdc++.h> typedef long long L; using namespace std; #define U [100005]={} map<L,L> path U; L P U,E U,Z U,H U,C U,A U,O U,L U,B U, k,n,a,b,c,p,r; char s U; L D(L a){ Z[a]=1; for(map<L,L>::iterator I=path[a].begin();I!=path[a].end();I++){ L d=I->first; if(d-P[a]){ P[d]...
a.cc:1:10: fatal error: Bs/stdc++.h: No such file or directory 1 | #include <Bs/stdc++.h> | ^~~~~~~~~~~~~ compilation terminated.
s204998764
p00362
C++
#include <bits/stdc++.h> typedef long long L; using namespace std; #define U [100005]={} map<L,L> path U; L P U,E U,Z U,H U,C U,A U,O U,L U,B U, k,n,a,b,c,p,r; char s U; L D(L a){ Z[a]=1; for(map<L,L>::iterator I=path[a].begin();I!=path[a].end();I++){ L d=I->first; if(d-P[a]){ P[...
a.cc:5:18: error: 'L L [100005]' redeclared as different kind of entity 5 | #define U [100005]={} | ^ a.cc:7:33: note: in expansion of macro 'U' 7 | L P U,E U,Z U,H U,C U,A U,O U,L U,B U, | ^ a.cc:2:19: note: previous declaration 'typedef long long in...
s078580149
p00362
C++
#include <Bs/stdc++.h> typedef long long L; using namespace std; #define U [100005]={} map<L,L> path U; L P U,E U,Z U,H U,C U,A U,O U,X U,B U, k,n,a,b,c,p,r; char s U; L D(L a){ Z[a]=1; for(map<L,L>::iterator I=path[a].begin();I!=path[a].end();I++){ L d=I->first; if(d-P[a]){ P[d]...
a.cc:1:10: fatal error: Bs/stdc++.h: No such file or directory 1 | #include <Bs/stdc++.h> | ^~~~~~~~~~~~~ compilation terminated.
s430180471
p00362
C++
#include <bits/stdc++.h> #define U [100005]={} typedef long long L;using namespace std;map<L,L> path U;L P U,E U,Z U,H U,C U,A U,O U,X U,B U,k,n,a,b,c,p,r;char s U;L D(L a){Z[a]=1;for(map<L,L>::iterator I=path[a].begin();I!=path[a].end();I++){L d=I->first;if(d-P[a]){P[d]=a;E[d]=E[a]+1;C[d]=I->second;D(d);Z[a]+=Z[d];if(...
a.cc: In function 'L D(L)': a.cc:3:302: warning: no return statement in function returning non-void [-Wreturn-type] 3 | typedef long long L;using namespace std;map<L,L> path U;L P U,E U,Z U,H U,C U,A U,O U,X U,B U,k,n,a,b,c,p,r;char s U;L D(L a){Z[a]=1;for(map<L,L>::iterator I=path[a].begin();I!=path[a].end();I++){...