submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s712202922
p00293
C++
#include <iostream> using namespace std; int main(){ int n[101],m[101],a,b,c,nn,mn,i; cin >> nn; if(cin.eof()) return 0; for(i=0;i<nn;i++){ cin >> b; n[i] = b * 100; cin >> b; n[i] += b; } n[i] = 0; cin >> mn; for(i=0;i<mn;i++){ cin >> b; m[i] = b * 100; cin >> b; m[...
a.cc: In function 'int main()': a.cc:25:19: error: invalid operands of types 'int [101]' and 'int [101]' to binary 'operator+' 25 | while(a + c < m + n){ | ~ ^ ~ | | | | | int [101] | int [101]
s291329220
p00293
C++
#include <iostream> using namespace std; int main(){ int N; cin >> N; int bus1[N]; for(int i=0;i<N;i++){ int h,m; cin >> h >> m; bus1[i]=h*60+m; } int M; cin >> M; int bus2[M]; for(int i=0;i<M;i++){ int h,m; cin >> h >> m; bus2[i]=h*60+m; } int n=0,m=0; for(int i=0;i<N...
a.cc: In function 'int main()': a.cc:52:2: error: expected '}' at end of input 52 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s062667698
p00293
C++
#include<iostream> #include<stdio.h> #include<algorithm> using namespace std; int time[210][2]; int main(){ int i,j,n,k; cin>>n; for(i=0;i<n;i++){ cin>>time[i][0]>>time[i][1]; } cin>>k; for(i=n;i<n+k;i++){ cin>>time[i][0]>>time[i][1]; } for(i=0;i<n+k-1;i++){ for(j=n+k-1;j>i;j--){ if(time[i][0]>time[j][...
a.cc:5:16: error: 'int time [210][2]' redeclared as different kind of entity 5 | int time[210][2]; | ^ In file included from /usr/include/pthread.h:23, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35, from /usr/include/x86_64-linux-gnu/c++/14/b...
s730823256
p00293
C++
#include<iostream> #include<stdio.h> #include<algorithm> using namespace std; int time[210][2]; int a[101][2]; int main(){ int i,j,n,k,c=0,s=0; cin>>n; for(i=0;i<n;i++){ cin>>time[i][0]>>time[i][1]; } cin>>k; for(i=0;i<k;i++){ cin>>a[i][0]>>a[i][1]; } c=n; for(i=0;i<k;i++){ for(j=0;j<n;j++){ if(time[j...
a.cc:5:16: error: 'int time [210][2]' redeclared as different kind of entity 5 | int time[210][2]; | ^ In file included from /usr/include/pthread.h:23, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35, from /usr/include/x86_64-linux-gnu/c++/14/b...
s135647563
p00293
C++
#include"bits/stdc++.h" using namespace std; #define Max 24*60+60+1 int main() { int n, m, n2[101], m2[101]; cin >> n; for (int i = 0; i < 100; i++)n2[i] = Max; for (int i = 0; i < n; i++) { int h, m; cin >> h >> m; n2[i] = h * 60 + m; } cin >> m; for (int i = 0; i < m; i++) { int k, g; cin >> k >> g; ...
a.cc: In function 'int main()': a.cc:17:18: error: invalid types 'int[int]' for array subscript 17 | n[i+n] = k * 60 + g; | ^
s319559147
p00293
C++
#include<iostream> using namespace std; int main(void){ int n,m,swap; int hour[200],min[200]; cin>>n; for(int i=0;i<n;i++){ cin>>hour[i]>>min[i]; } cin>>m; for(i=0;i<m;i++){ cin>>hour[n+i]>>min[n+i]; } for(i=0;i<n+m-1;i++){ for(int j=i;j<n+m;j++){ if(hour[i]>hour[j]){ swap=hour[i]; hour[i]=hou...
a.cc: In function 'int main()': a.cc:11:6: error: 'i' was not declared in this scope 11 | for(i=0;i<m;i++){ | ^ a.cc:14:6: error: 'i' was not declared in this scope 14 | for(i=0;i<n+m-1;i++){ | ^ a.cc:33:6: error: 'i' was not declared in this scope 33 | for(i=0;i<n+m-1;i++){ | ...
s010260808
p00293
C++
#include<iostream> using namespace std; int main(void){ int i,n,m,swap; int hour[200],min[200]; cin>>n; for(int i=0;i<n;i++){ cin>>hour[i]>>min[i]; } cin>>m; for(i=0;i<m;i++){ cin>>hour[n+i]>>min[n+i]; } for(i=0;i<n+m-1;i++){ for(int j=i;j<n+m;j++){ if(hour[i]>hour[j]){ swap=hour[i]; hour[i]=h...
a.cc: In function 'int main()': a.cc:43:2: error: expected '}' at end of input 43 | } | ^ a.cc:3:15: note: to match this '{' 3 | int main(void){ | ^
s144148889
p00293
C++
#include <bits/stdc++.h> using namespace std; int main() { vector<pair<int, int>> po; int n; cin >> n; for (int i = 0; i < n; ++i) { int h, m; cin >> h >> m; po.push_back(make_pair(h, m)); } cin >> n; for (int i = 0; i < n; ++i) { int h, m; cin >> h >> m; po.push_back(make_pair(h,...
a.cc:23:74: error: empty character constant 23 | printf("%d:%02d%c", po[i].first, po[i].second, (i + 1 == po.size() ? '' : ' ')); | ^~
s810701472
p00293
C++
#include<C:\bits\stdc++.h> using namespace std; int main(){ int n,l=0,temp,t[200],h,m; for(int i=0;i<2;i++){ cin >> n; for(int j=0;j<n;j++){ cin >> h >> m; t[l]=h*60+m; l++; } } for(int i=0;i<l-1;i++){ for(int j=i+1;j<l;j++){ if(t[i]>t[j]){ temp=t[i]; t[i]=t[j]; t[j]=temp; } } ...
a.cc:1:9: fatal error: C:\bits\stdc++.h: No such file or directory 1 | #include<C:\bits\stdc++.h> | ^~~~~~~~~~~~~~~~~~ compilation terminated.
s300685488
p00293
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n,l=0,temp,t[20000],h,m; for(int i=0;i<2;i++){ cin >> n; for(int j=0;j<n;j++){ cin >> h >> m; t[l]=h*60+m; l++; } } for(int i=0;i<l-1;i++){ for(int j=i+1;j<l;j++){ if(t[i]>t[j]){ swap(t[i],y[j]); } } } int cou...
a.cc: In function 'int main()': a.cc:16:27: error: 'y' was not declared in this scope 16 | swap(t[i],y[j]); | ^
s640388717
p00293
C++
#include<C:\bits\stdc++.h> using namespace std; int main(){ int n,l=0,temp,t[20000],h,m; for(int i=0;i<2;i++){ cin >> n; for(int j=0;j<n;j++){ cin >> h >> m; t[l]=h*60+m; l++; } } for(int i=0;i<l-1;i++){ for(int j=i+1;j<l;j++){ if(t[i]>t[j]){ swap(t[i],t[j]); } } } int ...
a.cc:1:9: fatal error: C:\bits\stdc++.h: No such file or directory 1 | #include<C:\bits\stdc++.h> | ^~~~~~~~~~~~~~~~~~ compilation terminated.
s909062892
p00293
C++
#include<C:\bits\stdc++.h> using namespace std; int main(){ int n,l=0,temp,t[20000],h,m; for(int i=0;i<2;i++){ cin >> n; for(int j=0;j<n;j++){ cin >> h >> m; t[l]=h*60+m; l++; } } for(int i=0;i<l-1;i++){ for(int j=i+1;j<l;j++){ if(t[i]>t[j]){ swap(t[i],t[j]); } } } int ...
a.cc:1:9: fatal error: C:\bits\stdc++.h: No such file or directory 1 | #include<C:\bits\stdc++.h> | ^~~~~~~~~~~~~~~~~~ compilation terminated.
s097920076
p00293
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
s688073155
p00293
C++
#include <stdio.h> #include <algorithm> #include <vector> using namespace std; #define PB push_back struct t{ int hr; int mi; void in(){ scanf("%d%d",&hr,&mi); return ; } void out(){ if(hr<10)printf("0"); printf("%d:",hr); if(mi<10)printf("0"); printf(...
a.cc:19:2: error: expected ';' after struct definition 19 | } | ^ | ;
s054081316
p00293
C++
#include<iostream> using namespace std; int main(){ int n,m; int h[100]={},k[100]={},g[100]; for(int i=0;i<100;i++){ g[i]=100000; } cin>>n; for(int i=0;i<n;i++){ cin>>h[i]>>k[i]; } cin>>m; for(int i=n;i<n+m;i++){ cin>>h[i]>>k[i]; } for(int i=0;i<n+m;i+...
a.cc: In function 'int main()': a.cc:19:9: error: 'sort' was not declared in this scope; did you mean 'short'? 19 | sort(g,g+n+m); | ^~~~ | short
s525623578
p00293
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n,m; vector<pair<int,int> > a; cin>>n; while(n--){ int k,g; cin>>k>>g; a.push_back(make_pair(k,g)); } cinn>>m; while(m--){ int k,g; cin>>k>>g; a.push_back(make_pair(k,g));...
a.cc: In function 'int main()': a.cc:16:5: error: 'cinn' was not declared in this scope 16 | cinn>>m; | ^~~~ a.cc:24:30: error: 'std::vector<std::pair<int, int> >::iterator' has no member named 'a' 24 | a.erase(unique(a.begin().a.end()),a.end()); | ^ a.cc:26:25...
s946060519
p00293
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n,m; vector< pair<int,int> > a; cin>>n; while(n--){ int k,g; cin>>k>>g; a.push_back(make_pair(k,g)); } cin>>m; while(m--){ int k,g; cin>>k>>g; a.push_back(make_pair(k,g));...
a.cc: In function 'int main()': a.cc:24:30: error: 'std::vector<std::pair<int, int> >::iterator' has no member named 'a' 24 | a.erase(unique(a.begin().a.end()),a.end()); | ^ a.cc:26:25: error: 'class std::vector<std::pair<int, int> >' has no member named 'aize'; did you mean 's...
s895064982
p00293
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n,m; vector< pair<int,int> > a; cin>>n; while(n--){ int k,g; cin>>k>>g; a.push_back(make_pair(k,g)); } cin>>m; while(m--){ int k,g; cin>>k>>g; a.push_back(make_pair(k,g));...
a.cc: In function 'int main()': a.cc:24:30: error: 'std::vector<std::pair<int, int> >::iterator' has no member named 'a' 24 | a.erase(unique(a.begin().a.end()),a.end()); | ^ a.cc:26:25: error: 'class std::vector<std::pair<int, int> >' has no member named 'aize'; did you mean 's...
s753127391
p00293
C++
int main() { int n,m; vector<pair<int,int>> v;  //1つ目の時刻表 cin>>n; rep(i,0,n){ int h,m; cin>>h>>m; v.pb(make_pair(h,m)); } //2つ目の時刻表 cin>>m; rep(i,0,m){ int h,m; cin>>h>>m; v.pb(make_pair(h,m)); } Sort(v); //重複を消す v.erase(uni...
a.cc:4:1: error: extended character   is not valid in an identifier 4 |  //1つ目の時刻表 | ^ a.cc: In function 'int main()': a.cc:3:5: error: 'vector' was not declared in this scope 3 | vector<pair<int,int>> v; | ^~~~~~ a.cc:3:12: error: 'pair' was not declared in this scope 3 | vector<pai...
s969777899
p00293
C++
#include <vector> int main() { int n,m; vector<pair<int,int>> v;  //1つ目の時刻表 cin>>n; rep(i,0,n){ int h,m; cin>>h>>m; v.pb(make_pair(h,m)); } //2つ目の時刻表 cin>>m; rep(i,0,m){ int h,m; cin>>h>>m; v.pb(make_pair(h,m)); } Sort(v); //重複...
a.cc:6:1: error: extended character   is not valid in an identifier 6 |  //1つ目の時刻表 | ^ a.cc: In function 'int main()': a.cc:5:5: error: 'vector' was not declared in this scope 5 | vector<pair<int,int>> v; | ^~~~~~ a.cc:5:5: note: suggested alternatives: In file included from /usr/include/c++...
s730378070
p00293
C++
include <vector> #include <map> #include <set> #include <queue> #include <deque> #include <stack> #include <algorithm> #include <cmath> #include <cstring> #include <complex> using namespace std; //typedef typedef vector<int> VI; typedef vector<VI> VVI; typedef vector<string> VS; typedef pair<int, int> PII; typedef ...
a.cc:1:1: error: 'include' does not name a type 1 | include <vector> | ^~~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/bits/stl_tree.h:63, from /usr/include/c++/14/map:62, from a.cc:2: /usr/include/c++/14/ext...
s136253350
p00293
C++
#include<iostream> #include<algorithm> using namespace std; int main(){ int n,m,c,d,a[10000],b[1440],cnt; cin>>n; for(int i=0;i<n;i++){ cin>>c>>d; b[c*60+d]=1; } cin>>m; for(int i =0;i<m;i++){ cin>>c>>d; b[c*60+d]=1; } for(int i=0;i<1440;i++){ if(...
a.cc: In function 'int main()': a.cc:29:2: error: expected '}' at end of input 29 | } | ^ a.cc:5:11: note: to match this '{' 5 | int main(){ | ^
s801821235
p00293
C++
#include<iostream> #include<algorithm> using namespace std; int n,m,c,d,a[10000],b[1440],cnt; int main(){ cin>>n; for(int i=0;i<n;i++){ cin>>c>>d; b[c*60+d]=1; } cin>>m; for(int i =0;i<m;i++){ cin>>c>>d; b[c*60+d]=1; } for(int i=0;i<1440;i++){ i...
a.cc: In function 'int main()': a.cc:31:2: error: expected '}' at end of input 31 | } | ^ a.cc:7:11: note: to match this '{' 7 | int main(){ | ^
s101324959
p00293
C++
#include<iostream> #include<algorithm> using namespace std; int n,m,c,d,a[10000],b[1440],cnt; int main(){ cin>>n; for(int i=0;i<n;i++){ cin>>c>>d; b[c*60+d]=1; } cin>>m; for(int i =0;i<m;i++){ cin>>c>>d; b[c*60+d]=1; } for(int i=0;i<1440;i++){ i...
a.cc: In function 'int main()': a.cc:31:2: error: expected '}' at end of input 31 | } | ^ a.cc:7:11: note: to match this '{' 7 | int main(){ | ^
s828764401
p00294
Java
import java.util.Arrays; import java.util.Scanner; public class main { public static void main(String[] args) { Scanner stdIn = new Scanner(System.in); int N = stdIn.nextInt(); int M = stdIn.nextInt(); int p = stdIn.nextInt(); int d[] = new int[M]; for (int i = 0; i < M; i++) { int a = stdIn.nextInt()...
Main.java:4: error: class main is public, should be declared in a file named main.java public class main { ^ 1 error
s557478532
p00294
C
#include<stdio.h> void sort(void); int right(int); int left(int); int min(int,int); int N,M,p,cost=0; int *d; int right(int i) { return d[i] - cost; } int left(int i) { return N - d[i] + p; } int min(int x,int y) { if(x < y) return x; else return y; } void sort(void) { int i,j,T; for(i=0;i<M-1;i++){ for...
main.c: In function 'main': main.c:45:13: error: 'new' undeclared (first use in this function) 45 | d = new int[M]; | ^~~ main.c:45:13: note: each undeclared identifier is reported only once for each function it appears in main.c:45:16: error: expected ';' before 'int' 45 | d = n...
s577912602
p00294
C
#include<cstdio> #include<algorithm> using namespace std; int n,m,p; int d[10001]; int dist(int i,int j){ if(i==j) return 0; else if(i<j) return j-i; else return j+n-i; } void solve(){ int ans=100000; for(int i=0;i<m;i++){ ans=min(ans,dist(p,d[i])+dist(d[i+1%m],d[i])); ans=min(ans,dist(d[i],p)+d...
main.c:1:9: fatal error: cstdio: No such file or directory 1 | #include<cstdio> | ^~~~~~~~ compilation terminated.
s048948613
p00294
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
s421993196
p00294
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,j) for(int i=0;i<j;++i) int N,M,p,d[10010]; int main(){ cin>>N>>M>>p; rep(i,M){ scanf("%d",d+i); d[i]=(d[i]-p+N)%N; } sort(d,d+M); p=N; rep(i,M){ p=min(p,d[i]+min(d[M-1]-d[i],i==M-1?d[i]-d[0]:N+d[i]-d[i+1])); ...
a.cc: In function 'int main()': a.cc:17:16: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and 'const char [2]') 17 | cout<<p*100<"\n"; | ~~~~~~~~~~~^~~~~ | | | | | const char [2] | std::basic_ostream<char> In file inc...
s985329206
p00294
C++
import java.sql.Array; import java.util.Arrays; import java.util.Scanner; public class Main { MyScanner sc = new MyScanner(); Scanner sc2 = new Scanner(System.in); long start = System.currentTimeMillis(); long fin = System.currentTimeMillis(); final int MOD = 1000000007; int[] dx = { 1, 0, 0, -1 }; int[] dy = {...
a.cc:1:1: error: 'import' does not name a type 1 | import java.sql.Array; | ^~~~~~ 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.util.Arrays; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' ...
s580236332
p00294
C++
#include <bits/stdc++.h> using namespace std; int main(){ int n,m,p; cin>>n>>m>>p; vector<int> d(m); for(int i=0;i<m;i++){ cin>>d[i]; d[i]=(d[i]+n-p)%n; } sort(d.begin(),d.end()); for(int i=0;i<m;i++) d.push_back(d[i]); int ans=min(n-d[0],d[m-1]); for(int i=1;i+1<2*m;i++){ int tmp1=2*d[i]+n-d[i+1]; int ...
a.cc: In function 'int main()': a.cc:18:22: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 18 | cout<<ans*100<endl; | ~~~~~~~~~~~~~^~~~~ In file included from /usr/include/c++/14/regex:68, from /usr/inc...
s961440616
p00294
C++
#include<stdio.h> int d[100000] = { 0 }; int main() { int n, m, p, i, v, j, c = 0, z = 0, k = 0, l; scanf_s("%d %d %d", &n, &m, &p); for (i = 0; i < m; i++) { scanf_s("%d", &v); d[v] = 1; } for (;;) { l = 0; z = 0; i = p; j = p; while(1){ if (i > n-1) { i = 0; } if (j < 0) { j = n-1...
a.cc: In function 'int main()': a.cc:6:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 6 | scanf_s("%d %d %d", &n, &m, &p); | ^~~~~~~ | scanf
s065713216
p00294
C++
#include<bits/stdc++.h> using namespace std; int n,m,p,a[1<<17],i,r,V,W,X; main(){ cin>>n>>m>>p; for(i=0;i<m;i++){cin>>a[i];a[i]+=n-p;a[i]%=n;} sort(a,a+m); r=min(a[m-1],n-a[0]); for(int i=0;i<m-1;i++){ V=a[i],W=n-a[i+1];if(V>W)swap(V,W); X=2*V+W;r=min(ret,X); } cout<<r*100<<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:11:15: error: 'ret' was not declared in this scope 11 | X=2*V+W;r=min(ret,X); | ^~~
s177327577
p00294
C++
#include <iostream> using namespace std; int main(){ int N,M,p; cin>>N>>M>>p; int d[10001]; d[0]=p; for(int i=0;i<M;i++) cin>>d[i]; sort(d,d+M+1); int c_min=N-1; for(int i=0;i<M+1;i++){ int q=d[i]; int r1=d[(i-1+M+1)%(M+1)]; int r2=d[(i+1)%(M+1)]; int c1=((p-q+N)%N)*2+(p-r1+N)%N; int c1=((q-p+N)%N...
a.cc: In function 'int main()': a.cc:10:9: error: 'sort' was not declared in this scope; did you mean 'short'? 10 | sort(d,d+M+1); | ^~~~ | short a.cc:18:21: error: redeclaration of 'int c1' 18 | int c1=((q-p+N)%N)*2+(r2-p+N)%N; | ^~ a....
s934131485
p00294
C++
#include<iostream> #include<algorithm> #include<deque> #include<queue> using namespace std; int main(){ int a; int n=0; int m=0; int p=0; int i=0; int g=0; int j=0; int w[2]; priority_queue<int,vector<int>,greater<int> > pq; deque<int> de; cin>>n>>m>>p; for(i=0;i<m;i++){ cin>>a; if(a<p)a+=n; a-=p; p...
a.cc: In function 'int main()': a.cc:33:2: error: expected '}' at end of input 33 | } | ^ a.cc:28:25: note: to match this '{' 28 | for(i=0;i<m;i++){ | ^ a.cc:33:2: error: expected '}' at end of input 33 | } | ^ a.cc:6:11: note: to match this '{' 6 | int m...
s557243834
p00294
C++
//============================================================================ // Name : AOJ.cpp // Author : // Version : // Copyright : Your copyright notice // Description : Hello World in C++, Ansi-style //============================================================================ #include <iostr...
a.cc: In function 'int main()': a.cc:23:18: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 23 | int solve(){ | ^~ a.cc:23:18: note: remove parentheses to default-initialize a variable 23 | int solve(){ | ^~ ...
s608445720
p00294
C++
//============================================================================ // Name : AOJ.cpp // Author : // Version : // Copyright : Your copyright notice // Description : Hello World in C++, Ansi-style //============================================================================ #include <iostr...
a.cc: In function 'int solve()': a.cc:31:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 31 | int main() { | ^~ a.cc:31:9: note: remove parentheses to default-initialize a variable 31 | int main() { | ^~ | -- a.cc:31:9: note: or...
s912747511
p00294
C++
//============================================================================ // Name : AOJ.cpp // Author : // Version : // Copyright : Your copyright notice // Description : Hello World in C++, Ansi-style //============================================================================ #include <iostr...
a.cc: In function 'int main()': a.cc:35:15: error: 'inti' was not declared in this scope; did you mean 'int'? 35 | for ( inti= 0; i< M; i++ ){ | ^~~~ | int a.cc:35:24: error: 'i' was not declared in this scope 35 | for ( inti= 0; i< M; i++ ){ | ...
s218971215
p00294
C++
#include<iostream> using namespace std; int N, M, p
a.cc:3:12: error: expected initializer at end of input 3 | int N, M, p | ^
s507492283
p00294
C++
#include<iostream> using namespace std; int main(){ int N; cin>>N; int h[101],m[101]; for(int i=0;i<N;i++) cin>>h[i]>>m[i]; h[N]=24; m[N]=0; int M; cin>>M; int k[101],g[101]; for(int i=0;i<N;i++) cin>>k[i]>>g[i]; k[N]=24; g[N]=0; for(int i=0,j=0;i<N||j<M){ if(h[i]==k[j]&&m[i]==g[j]){ cout<<h...
a.cc: In function 'int main()': a.cc:21:33: error: expected ';' before ')' token 21 | for(int i=0,j=0;i<N||j<M){ | ^ | ; a.cc:36:29: error: no match for 'operator<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} a...
s097397283
p00294
C++
#include<iostream> #include<stack> #include<algorithm> using namespace std; int Route(int* D,int m,int start,int n) { int route; int min=n; int max=0; for(int i=0;i<m;i++){ if(D[i]<=n/2&&max<D[i]) max=D[i]; if(D[i]>n/2&&min>D[i]||start>D[i]&&D[i]!=n/2) min=D[i]; ...
a.cc: In function 'int main()': a.cc:101:14: error: expected '}' at end of input 101 | return 0; | ^ a.cc:86:11: note: to match this '{' 86 | int main(){ | ^
s331682660
p00294
C++
#include<iostream> using namespace std; int main(){ int N,M,p; cin>>N>>M>>p; int d[10001]; d[0]=p; for(int i=1;i<=M;i++){ cin>>d[i]; } sort(d,d+M+1); int c_min=N-1; for(int i=0;i<M+1;i++){ int q=d[i]; int r1=d[(i-1+M+1)%(M+1)]; int r2=d[(i+1)%(M+1)]; int c1=((p-q+N)*2+(r1-p+N)%N; int c2=((q-p+N)*2...
a.cc: In function 'int main()': a.cc:12:9: error: 'sort' was not declared in this scope; did you mean 'short'? 12 | sort(d,d+M+1); | ^~~~ | short a.cc:18:45: error: expected ')' before ';' token 18 | int c1=((p-q+N)*2+(r1-p+N)%N; | ~...
s350645365
p00294
C++
#include <iostream> #include <algorithm> using namespace std; int int main() { int N,M,p; cin>>N>>M>>p; int d[10001]; d[0]=p; for (int i = 1; i < M; i++) { cin>>d[i]; } sort(d,d+M+1); int c_min =N-1; for (int i = 0; i < M+1; i++) { int q =d[i]; int r1 =d[(i-1+M+1)%(M+1)]; int r2 =d[(i+1)%(M+1)]; int c1 =((...
a.cc:5:1: error: two or more data types in declaration of 'main' 5 | int int main() { | ^~~
s712985070
p00294
C++
#include<iostream> #include<algorithm> using namespace std; int main(){ int N,M,p = 0; cin >> N >> M >> p; int d[M+1]; d[0] = p; for(int i=1; i<=M; i++){ cin >> d[i]; } sort(d, d+M+1); int money = N-1; for(int i=0; i<M+1; i++){ int q = d[i]; int r1 = d[(i-1+M+1)%(M+1)]; int r2 = d[(i+1)%(M+1)]; ...
a.cc:30:2: error: expected class-name at end of input 30 | ~ | ^
s242917154
p00294
C++
#include <iostream> #include <algorithm> using namespace std; int main() { int N, M, p; cin >> M >> N >> p; int d[1001]; d[0] = p; for (int i = 1; i < M + 1; i++) cin > d[i]; sort(d, d + M + 1); int c_min = N - 1; for (int i = 0; i < M + 1; i++) { int q = d[i]; int r1 = d[(i - 1 + M + 1) % (M + 1)];...
a.cc: In function 'int main()': a.cc:14:21: error: no match for 'operator>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 14 | cin > d[i]; | ~~~ ^ ~~~~ | | | | | int | ...
s768667070
p00294
C++
#include<bits/stdc++.h> #define INF 10e8 using namespace std; int i,j,k,n,m,d[10000],s,left[10000],right[10000],x,flg[100000]={0},ans,rr,ll; int main(void) { cin>>n>>m>>s; for(i=0;i<m;i++) cin>>d[i],flg[d[i]]=1; ans=x=0; for(i=s;i<n;i++) { if(flg[i]==1) { ll=i; break; } if(i+1==n) i=-1; } for(i=s;i>...
a.cc: In function 'int main()': a.cc:37:28: error: reference to 'right' is ambiguous 37 | for(i=0;i<m-1;i++) right[d[i]]=d[i+1]; | ^~~~~ In file included from /usr/include/c++/14/streambuf:43, from /usr/include/c++/14/bits/streambuf_iterator.h:35, ...
s912895975
p00294
C++
#include<iostream> using namespace std; int main(void){ int i,j,n,m,p,a,b,e,f,g; cin>>n>>m>>p; e=p-0; int c[m],d[m]; int station[n],visit[m]; for(i=0;i<n;i++){ station[i]=i; } for(i=0;i<m;i++){ cin>>visit[i]; visit[i]-=e; } for(i=0;i<m;i++){ for(j=...
a.cc: In function 'int main()': a.cc:34:25: error: overloaded function with no contextual type information 34 | swap=c[i]; | ^ a.cc:36:22: error: cannot resolve overloaded function 'swap' based on conversion to type 'int' 36 | c[j]=swap; | ...
s253436430
p00294
C++
#include<iostream> #include<algorithm> using namespace std; int n, m, p ; int d[10010]; int main(){ cin >> n >> m >> p; for (int i = 0; i < m; i++) { cin >> d[i]; d[i] -= p; if (d[i] < 0)d[i] += n; } sort(&d[0], &d[m]); int ans = 0; ans=d[m - 1] * 100; ans = min(ans, (n - d[0]) * 100); ...
a.cc: In function 'int main()': a.cc:19:294: error: expected primary-expression before ')' token 19 | ans = min(ans, (n - d[0]) * 100); ...
s953497501
p00294
C++
#include<iostream> #include<algorithm> using namespace std; int n, m, p ; int d[10010]; int main(){ cin >> n >> m >> p; for (int i = 0; i < m; i++) { cin >> d[i]; d[i] -= p; if (d[i] < 0)d[i] += n; } sort(&d[0], &d[m]); int ans = 0; ans=d[m - 1] * 100; ans = min(ans, (n - d[0]) * 100); for (int i = 0; ...
a.cc: In function 'int main()': a.cc:20:29: error: 'M' was not declared in this scope 20 | for (int i = 0; i < M - 1; i++){ | ^ a.cc:22:27: error: 'N' was not declared in this scope 22 | int c2 = (N - d[i + 1]) * 100; | ^ a....
s525382912
p00294
C++
#include<bits/stdc++.h> using namespace std; int main(void){ int i,j,k,d[100005],n,m,s; cin>>n>>m>>s; for(i=0;i<m;i++)cin>>d[i]; d[m]=s; int ans,left,right; ans = 21000000; sort(d,d+m+1)=d[0]; for(i=0;i<=m;i++){ left = d[i]-s; if(left<0)left +=n; right = s-d[i+1]...
a.cc: In function 'int main()': a.cc:11:9: error: invalid use of 'void' 11 | sort(d,d+m+1)=d[0]; | ~~~~^~~~~~~~~
s422079552
p00294
C++
#include<bits/stdc++.h> using namespace std; int main(void){ int i,j,k,d[100005],n,m,s; cin>>n>>m>>s; for(i=0;i<m;i++)cin>>d[i]; d[m]=s; int ans,left,right; ans = 21000000; sort(d,d+m+1)=d[0]; for(i=0;i<=m;i++){ left = d[i]-s; if(left<0)left +=n; right = s-d[i+1]...
a.cc: In function 'int main()': a.cc:11:9: error: invalid use of 'void' 11 | sort(d,d+m+1)=d[0]; | ~~~~^~~~~~~~~
s531515134
p00295
C++
#include<cstdio> #include<vector> using namespace std; const int b[7] = {0,9,12,15,18,21,30}; inline bool check(const vector<int> &c){ for(int x=0;x<6;x++){ for(int i=b[x];i<b[x+1]-1;i++)if(c[i]!=c[i+1])return false; } return true; } inline void rot(vector<int> &c, int d){ if(d == 0){ swap(c[0],c[23])...
a.cc: In function 'int main()': a.cc:52:5: error: 'cout' was not declared in this scope 52 | cout << rec(0,p) << endl; | ^~~~ a.cc:3:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 2 | #include<vector> +++ |+#include <iostream> ...
s438331869
p00295
C++
#include <iostream> bool is_complete(int*); int solve(int *, int); void rot(int*, int); int min(int, int, int, int); void swap(int&, int&); int main(){ int N; int **p; std::cin >> N; p = new int*[N]; for(int i=0; i<N; i++){ p[i] = new int[30]; for(int j=0; j<30; j++) std::cin >> p[i][j]; } for(int i=0...
a.cc: In function 'int main()': a.cc:22:37: error: too many arguments to function 'void rot(int*, int)' 22 | std::cout << min(rot(p[i], 1, 0), rot(p[i], 2, 0), rot(p[i], 3, 0), rot(p[i], 4, 0)) << std::endl; | ~~~^~~~~~~~~~~~ a.cc:6:6: note: declared here 6 ...
s389504224
p00295
C++
#include <iostream> bool is_complete(int*); int solve(int *, int); void rot(int*, int); int min(int, int, int, int); void swap(int&, int&); int main(){ int N; int **p; std::cin >> N; p = new int*[N]; for(int i=0; i<N; i++){ p[i] = new int[30]; for(int j=0; j<30; j++) std::cin >> p[i][j]; } for(int i=0...
a.cc: In function 'int main()': a.cc:22:35: error: too few arguments to function 'int solve(int*, int)' 22 | std::cout << solve(p[i]) << std::endl; | ~~~~~^~~~~~ a.cc:5:5: note: declared here 5 | int solve(int *, int); | ^~~~~ a.cc: In function 'int so...
s787989827
p00295
C++
#include<cmath> #include<algorithm> #include<string> #include<vector> #include<map> using namespace std; //aからbに向かう,true=右回りfalse=左回り int get(int a,int b,int n,bool f){ if(f){ if(a>b)return b+n-a; else return b-a; } else{ if(a>b)return a-b; else return a+n-b; } } int mai...
a.cc: In function 'int main()': a.cc:21:9: error: 'cin' was not declared in this scope 21 | cin>>n>>m>>p; | ^~~ a.cc:6:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 5 | #include<map> +++ |+#include <iostream> 6 | using ...
s086844476
p00295
C++
??£??£??£???
a.cc:1:3: error: extended character £ is not valid in an identifier 1 | ??£??£??£??? | ^ a.cc:1:6: error: extended character £ is not valid in an identifier 1 | ??£??£??£??? | ^ a.cc:1:9: error: extended character £ is not valid in an identifier 1 | ??£??£??£??? | ^ a.cc:1:1...
s828318818
p00295
C++
#include <iostream> using namespace std; static int p_index[4][5] = { {15, 0, 3, 6, 9}, {18, 2, 1, 0, 15}, {12, 8, 5, 2, 18}, {9, 6, 7, 8, 12} }; static int n_index[4][5] = { {17, 23, 26, 29, 20}, {20, 29, 28, 27, 14}, {14, 27, 24, 21, 11}, {11, 21, 22, 23, 17} }; bool complete(int fl...
a.cc: In function 'int dfs(int*, int)': a.cc:66:16: error: 'INT_MAX' was not declared in this scope 66 | return 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> +++ |+#incl...
s502143246
p00295
C++
#define INF 1000000000; #include <iostream> using namespace std; static int p_index[4][5] = { {15, 0, 3, 6, 9}, {18, 2, 1, 0, 15}, {12, 8, 5, 2, 18}, {9, 6, 7, 8, 12} }; static int n_index[4][5] = { {17, 23, 26, 29, 20}, {20, 29, 28, 27, 14}, {14, 27, 24, 21, 11}, {11, 21, 22, 23, 17}...
a.cc: In function 'int dfs(int*, int)': a.cc:77:5: error: 'memcpy' was not declared in this scope 77 | memcpy(clone, floppy_cube, sizeof(int) * 30); | ^~~~~~ a.cc:4:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <iostream> ...
s506739982
p00295
C++
#include <iostream> #include <algorithm> using namespace std; void solve(); bool hantei(int *m,int s,int e) int main(){ int n; while(n--) solve(); return 0; } void solve(){ int i,j,tmp; int men[30],m[30]; int ans=8; for(i=0;i<30;i++) cin>>men[30]; for(i=0;i<65536;i++){ for(j=0;j<30;j++) m[j]=men[j]; ...
a.cc:8:1: error: expected initializer before 'int' 8 | int main(){ | ^~~ a.cc: In function 'void solve()': a.cc:46:28: error: 'hantei' was not declared in this scope 46 | if(hantei(m,0,8) && hantei(m,9,11) && hantei(m,12,14) && hantei(m,15,17) && hantei(m,18,20) && hantei(m,21,29)) ...
s339206933
p00295
C++
#include<iostream> #include<queue> #include<vector> using namespace std; //queue?????\??£???????????????????????????pop?????????,??´??¢????????¢????????? queue<std::vector<int> > cubes; vector<int> puzzle; vector<int> tmppuzzle; namespace my{ int top,left,right,up,down,back; } void clear(){ for(int i=0;i<32;i++){ ...
a.cc: In function 'int BFS()': a.cc:151:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 151 | int main(){ | ^~ a.cc:151:9: note: remove parentheses to default-initialize a variable 151 | int main(){ | ^~ | -- a.cc:151:9: note: or ...
s253417863
p00295
C++
#include <iostream> #include <utility> #include <cmath> using namespace std; bool check(int* cube){ for(int i = 1; i < 9; i++){ if(cube[i] != cube[0]){ return false; } } for(int i = 10; i < 12; i++){ if(cube[i] != cube[9] || cube[i + 3] != cube[12]){ return fa...
a.cc: In function 'int main()': a.cc:86:9: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 86 | cin << n; | ~~~ ^~ ~ | | | | | int | std::istream {aka std::basic_istream<char>} a.cc:86:9: note: candid...
s680115571
p00295
C++
#include <iostream> #include <utility> #include <cmath> using namespace std; bool check(int* cube){ for(int i = 1; i < 9; i++){ if(cube[i] != cube[0]){ return false; } } for(int i = 10; i < 12; i++){ if(cube[i] != cube[9] || cube[i + 3] != cube[12]){ return fa...
a.cc: In function 'int main()': a.cc:86:9: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 86 | cin << n; | ~~~ ^~ ~ | | | | | int | std::istream {aka std::basic_istream<char>} a.cc:86:9: note: candid...
s422480196
p00295
C++
#include <iostream> #include <queue> #include <algorithm> class FC{ public: int p[31]; int n; bool is_over() { return p[1]==p[2] && p[2]==p[3] && p[3]==p[4] && p[4]==p[5] && p[5]==p[6] && p[6]==p[7] && p[7]==p[8] && p[8]==p[9] && p[9]==p[10] && p[10]==p[11] && p[11] == p[12] && p[12]==p[3] && p[13]==p[14] && p...
a.cc: In member function 'void FC::rot1()': a.cc:16:17: error: 'swap' was not declared in this scope 16 | swap(p[7],p[22]); swap(p[8],p[23]); swap(p[9],p[24]); swap(p[13] , p[18]); swap(p[10],p[12]); | ^~~~ a.cc:16:17: note: suggested alternatives: In file included from /usr/inc...
s087229709
p00295
C++
#include<iostream> #include<queue> #include<algorithm> using namespace std; class FC{ public: int p[31]; int n; bool is_over(){ return p[1]==p[2]&&p[2]==p[3]&&p[3]==p[4]&&p[4]==p[5] &&p[5]==p[6]&&p[6]==p[7]&&p[7]==p[8]&&p[8]==p[9] &&p[10]==p[11]&&p[11]==p[12] &&p[13]==p[14]&&p[14]==p[15] &&p[16]==p[1...
a.cc: In member function 'bool FC::is_over()': a.cc:20:9: error: expected ';' before '}' token 20 | } | ^ a.cc: In member function 'void FC::rot1()': a.cc:23:46: error: request for member 'p' in '((FC*)this)->FC::p[10]', which is of non-class type 'int' 23 | swap(p[13],p[18])...
s555244558
p00295
C++
#include <iostream> #include <queue> #include <algorithm> using namespace std; class FC{ public: int p[31]; int n; bool is_over(){ return p[1]==p[2]&&p[2]==p[3}&&p[3]==p[4]&&p[4]==p[5]&& p[5]==p[6]&&p[6]==p[7}&&p[7]==p[8]&&p[8]==p[9]&& p[10]==p[11}&&p[11]==...
a.cc:12:48: error: ISO C++ forbids declaration of 'p' with no type [-fpermissive] 12 | return p[1]==p[2]&&p[2]==p[3}&&p[3]==p[4]&&p[4]==p[5]&& | ^ a.cc:12:48: error: declaration of 'p' as array of references a.cc:12:51: error: expected ';' at end o...
s198670921
p00295
C++
#include <iostream> #include <queue> #include <algorithm> using namespace std; class FC{ public: int p[31]; int n; bool is_over(){ return p[1]==p[2]&&p[2]==p[3}&&p[3]==p[4]&&p[4]==p[5]&& p[5]==p[6]&&p[6]==p[7}&&p[7]==p[8]&&p[8]==p[9]&& p[10]==p[11}&&p[11]==p[12]&& ...
a.cc:12:40: error: ISO C++ forbids declaration of 'p' with no type [-fpermissive] 12 | return p[1]==p[2]&&p[2]==p[3}&&p[3]==p[4]&&p[4]==p[5]&& | ^ a.cc:12:40: error: declaration of 'p' as array of references a.cc:12:43: error: expected ';' at end of member declara...
s015351945
p00295
C++
#include <iostream> #include <queue> #include <algorithm> using namespace std; class FC{ public: int p[31]; int n; bool is_over(){ return p[1]==p[2] && p[2]==p[3} && p[3]==p[4] && p[4]==p[5] && p[5]==p[6] && p[6]==p[7} && p[7]==p[8] && p[8]==p[9] && p[10]==p[11} && p[11]==p...
a.cc:12:44: error: ISO C++ forbids declaration of 'p' with no type [-fpermissive] 12 | return p[1]==p[2] && p[2]==p[3} && p[3]==p[4] && p[4]==p[5] && | ^ a.cc:12:44: error: declaration of 'p' as array of references a.cc:12:47: error: expected ';' at end of mem...
s986490006
p00295
C++
#include <iostream> #include <queue> #include <algorithm> using namespace std; class FC{ public: int p[31]; int n; bool is_over(){ return p[1]==p[2] && p[2]==p[3] && p[3]==p[4] && p[4]==p[5] && p[5]==p[6] && p[6]==p[7] && p[7]==p[8] && p[8]==p[9] && p[10]==p[11] && p[11]==p...
a.cc: In member function 'void FC::rot4()': a.cc:40:54: error: 'p9' was not declared in this scope; did you mean 'p'? 40 | swap(p[3], p[22]); swap(p[6], p[25]); swap(p9], p[28]); | ^~ | p a...
s970201443
p00295
C++
#include <iostream> #include <queue> #include <algorithm> using namespace std; class FC{ public: int p[31]; int n; bool is_over(){ return p[1]==p[2] && p[2]==p[3] && p[3]==p[4] && p[4]==p[5] && p[5]==p[6] && p[6]==p[7] && p[7]==p[8] && p[8]==p[9] && p[10]==p[11] && p[11]==p...
a.cc: In member function 'void FC::rot4()': a.cc:40:54: error: 'p9' was not declared in this scope; did you mean 'p'? 40 | swap(p[3], p[22]); swap(p[6], p[25]); swap(p9], p[28]); | ^~ | p a...
s779356725
p00295
C++
#include <iostream> #include <queue> #include <algorithm> using namespace std; class FC{ public: int p[31]; int n; bool is_over(){ return p[1]==p[2] && p[2]==p[3] && p[3]==p[4] && p[4]==p[5] && p[5]==p[6] && p[6]==p[7] && p[7]==p[8] && p[8]==p[9] && p[10]==p[11] && p[11]==p...
a.cc: In function 'int main()': a.cc:51:9: error: 'State' was not declared in this scope 51 | State now; | ^~~~~ a.cc:53:20: error: 'now' was not declared in this scope 53 | cin >> now.p[j]; | ^~~ a.cc:55:9: error: 'now' was not declared in this scope ...
s437937520
p00295
C++
FCFC#include <iostream> #include <queue> #include <algorithm> using namespace std; class FC{ public: int p[31]; int n; bool is_over(){ return p[1]==p[2] && p[2]==p[3] && p[3]==p[4] && p[4]==p[5] && p[5]==p[6] && p[6]==p[7] && p[7]==p[8] && p[8]==p[9] && p[10]==p[11] && p[11...
a.cc:1:5: error: stray '#' in program 1 | FCFC#include <iostream> | ^ a.cc:1:1: error: 'FCFC' does not name a type 1 | FCFC#include <iostream> | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/deque:62, from /usr/i...
s153504118
p00295
C++
#include <iostream> #include <queue> #include <algorithm> using namespace std; class FC{ public: int p[31]; int n; bool is_over(){ return p[1]==p[2] && p[2]==p[3] && p[3]==p[4] && p[4]==p[5] && p[5]==p[6] && p[6]==p[7] && p[7]==p[8] && p[8]==p[9] && p[10]==p[11] && p[11]==p...
a.cc: In function 'int main()': a.cc:57:15: error: 'State' was not declared in this scope 57 | queue<State> que; | ^~~~~ a.cc:57:20: error: template argument 1 is invalid 57 | queue<State> que; | ^ a.cc:57:20: error: template argument 2 is invalid a.cc:...
s927946890
p00295
C++
#include <iostream> #include <queue> #include <algorithm> using namespace std; class FC{ public: int p[31]; int n; bool is_over(){ return p[1]==p[2] && p[2]==p[3] && p[3]==p[4] && p[4]==p[5] && p[5]==p[6] && p[6]==p[7] && p[7]==p[8] && p[8]==p[9] && p[10]==p[11] && p[11]==p...
a.cc: In function 'int main()': a.cc:57:15: error: 'State' was not declared in this scope 57 | queue<State> que; | ^~~~~ a.cc:57:20: error: template argument 1 is invalid 57 | queue<State> que; | ^ a.cc:57:20: error: template argument 2 is invalid a.cc:...
s440250234
p00295
C++
int main() { int N; cin >> N; for(int i=0; i<N; i++){ FC now; for(int j=1; j<=30; j++){ cin >> now.p[j]; } now.n = 0; queue<FC> que; que.push(now); while(!que.empty()){ now = que.front(); que.pop(); ...
a.cc: In function 'int main()': a.cc:4:5: error: 'cin' was not declared in this scope 4 | cin >> N; | ^~~ a.cc:7:9: error: 'FC' was not declared in this scope 7 | FC now; | ^~ a.cc:9:20: error: 'now' was not declared in this scope 9 | cin >> now.p[j]; | ...
s402443530
p00295
C++
#include <iostream> #include <vector> #include <algorithm> #include <cstdio> using namespace std; int n; int dfs(int x[30],d){ if(x[0]==x[1]&&x[1]==x[2]&&x[3]==x[4]&&x[4]==x[5]&&x[5]==x[6]&&x[6]==x[7]&&x[7]==x[8])return d; if(d==8)return 8; int res=8; swap(x[6],x[21]); swap(x[7],x[22]); swap(x[8...
a.cc:7:19: error: 'd' has not been declared 7 | int dfs(int x[30],d){ | ^ a.cc: In function 'int dfs(int*, int)': a.cc:8:98: error: 'd' was not declared in this scope 8 | if(x[0]==x[1]&&x[1]==x[2]&&x[3]==x[4]&&x[4]==x[5]&&x[5]==x[6]&&x[6]==x[7]&&x[7]==x[8])return d; | ...
s367864612
p00296
C
#define rep(i,n) for(i=0;i<n;++i) a[1<<18],v[1<<18][3],n,m,q,c,i,j;main(){scanf("%d%d%d",&n,&m,&q);rep(i,n)rep(j,2)v[i][j]=(i+n+1-2*j)%n;rep(i,m){scanf("%d",a+i);rep(j,a[i])c=v[c][a[i]&1];v[c][2]=1;rep(j,2)v[v[c][j^1]][j]=v[c][j];c=v[c][0];}rep(i,q)scanf("%d",&c),printf("%d\n",1-v[c][2]);exit(0);}
/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
s889421633
p00296
C++
#include <set> #include <stdio.h> #include <iterator> using namespace std; int main(){ int n,m,q,temp; set<int>s; set<int>::iterator now; scanf("%d%d%d",&n,&m,&q); for(int i=0;i<n;i++)s.insert(i); now=s.find(0); for(int i=0;i<m;i++){ scanf("%d",&temp); if(temp&1){ ...
a.cc: In function 'int main()': a.cc:31:19: error: could not convert '(now = s.std::set<int>::end())' from 'std::set<int>::iterator' {aka 'std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::const_iterator'} to 'bool' 31 | if(now=s.end()); | ~~~^~~~~~~...
s734295030
p00296
C++
g#include <algorithm> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <cassert> #include <functional> #include <iostream> #include <iomanip> #include <iterator> #include <map> #include <queue> #include <set> #include <sstream> #include <utility> #include <vector> usi...
a.cc:1:2: error: stray '#' in program 1 | g#include <algorithm> | ^ a.cc:1:1: error: 'g' does not name a type 1 | g#include <algorithm> | ^ In file included from /usr/include/c++/14/cmath:45, from a.cc:3: /usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __...
s423058022
p00296
C++
#include <cstdio> #include <iostream> #include <stdlib.h> #include <iomanip> #include <string> #include <sstream> #include <vector> using namespace std; int main(){ int N,M,Q; cin >> N >> M >> Q; int player[N + 1],anser = 0; for(int i = 0;N > i;i++){player[i] = 1;} for(int i = 0;M > i;i++){ ...
a.cc: In function 'int main()': a.cc:25:71: error: 'h' was not declared in this scope 25 | if(player[anser] == 1){daturakusya = anser;break;}h | ^
s213779173
p00296
C++
#define rep(i,n) for(int i=0;i<n;++i) int a[1<<18],v[1<<18][2],l[1<<18],n,m,q,c; main(){ scanf("%d %d %d",&n,&m,&q); rep(i,n)rep(j,2)v[i][j]=(i+n+1-2*j)%n; rep(i,m){ scanf("%d",a+i); rep(j,a[i])c=v[c][a[i]&1]; l[c]=1; rep(j,2)v[v[c][j^1]][j]=v[c][j]; c=v[c][0]; } rep(i,q) scanf("%d",&c),printf("%d\n",1-l...
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 3 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:4:9: error: 'scanf' was not declared in this scope 4 | scanf("%d %d %d",&n,&m,&q); | ^~~~~ a.cc:13:33: error: 'printf' was not declared in thi...
s389587491
p00296
C++
#include <bits/stdc++.h> using namespace std; int N, M, Q; int erased[100001]; int next[100001]; int main() { cin >> N >> M >> Q; for (int i = 0; i < N; i++) next[i] = (i + 1) % N; for (int i = 0; i < N; i++) erased[i] = 1; int c = 0; for (int i = 0; i < M; i++) { int a; cin >> a; ...
a.cc: In function 'int main()': a.cc:10:33: error: reference to 'next' is ambiguous 10 | for (int i = 0; i < N; i++) next[i] = (i + 1) % N; | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:66, from /usr/include/c++/14/algorithm:60, ...
s569760087
p00296
C++
#include<iostream> #include<vector> using namespace std; int main(){ int n,m,q; cin >> n >> m >> q; int callNomber[m]; for(int i = 0; i < m; i++){ cin >> callNomber[i]; } vector<int> students = vector<int>[n]; for(int i = 0; i < n; i++){ students[i] = i; } int nowBatton = 0; for(int i = 0; i < m; i++){ ...
a.cc: In function 'int main()': a.cc:12:43: error: expected primary-expression before '[' token 12 | vector<int> students = vector<int>[n]; | ^
s121167907
p00296
C++
#include <iostream> #include <vector> using namespace std; #define MAX_N 200010 #define MAX_Q 1010 int N, M, Q; int a[MAX_N]; vector<int> alive; int main() { cin >> N >> M >> Q; for (int i=0; i<N; i++) alive.push_back(i); // O(M) int t = 0; for (int i=0; i<M; i++) { cin >> a[i]; if (a[i] % 2 == 1) ...
a.cc: In function 'int main()': a.cc:28:13: error: 'binary_search' was not declared in this scope 28 | cout << binary_search(alive.begin(), alive.end(), q) << "\n"; | ^~~~~~~~~~~~~
s293601125
p00296
C++
//PCK2014pre 7 ??????????????¬???///// #include<iostream> #include<string.h> using namespace std; int prev[200000],next[200000]; int main() { int N,M,Q,a,q,o; int ba = 0; cin >> N >> M >> Q; /*for(int i=0;i<N;i++){ if(i==0){ prev[i] = N - 1; next[i] = 1; } else if(i == N-1){ prev[i] = N - 2; nex...
a.cc: In function 'int main()': a.cc:28:9: error: reference to 'prev' is ambiguous 28 | prev[i] = (i-1+N)%N; | ^~~~ In file included from /usr/include/c++/14/string:47, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:...
s756233250
p00296
C++
#include <iostream> #include <algorithm> #include <string> #include <math.h> #include <vector> #include <cstdio> using namespace std; int N, M, Q, now = 0; int a, q; vector<int> vec; int main(){ scanf("%d%d%d", &N, &M, &Q); cout << N << endl; for(int i = 0; i < N; i++){ vec.push_back(i); } for(int i = 0; i < M;...
a.cc: In function 'int main()': a.cc:39:49: error: expected primary-expression before ')' token 39 | while(now + a > ){ | ^
s606936525
p00296
C++
#include<bits/stdc++.h> using namespace std; list<int>L; signed main() { cout<<(*x)<<endl; int a, b, c; cin >> a >> b >> c; for (int d = 0; d < a; d++) { L.push_back(d); } auto f = L.begin(); for (int d = 0; d < b; d++) { int e; scanf("%d", &e); for (int g = 0; g < e; g...
a.cc: In function 'int main()': a.cc:6:13: error: 'x' was not declared in this scope 6 | cout<<(*x)<<endl; | ^
s394272137
p00296
C++
#include<iostream> #include<list> using namespace std; int main(){ int n,m,q; cin >> n >> m >> q; int size = n; list<int> l; for(int i=0;i<n;i++){ table[i] = true; vec.push_back(i); l.push_back(i); } list<int>::iterator index=l.begin(); for(int i=0;i<m;i++){ int tmp=0,j=0; ci...
a.cc: In function 'int main()': a.cc:16:5: error: 'table' was not declared in this scope; did you mean 'mutable'? 16 | table[i] = true; | ^~~~~ | mutable a.cc:17:5: error: 'vec' was not declared in this scope 17 | vec.push_back(i); | ^~~ a.cc:35:7: error: 'table' was not decl...
s651867966
p00296
C++
#include<iostream> #include<list> using namespace std; int main(){ int n,m,q; cin >> n >> m >> q; int size = n; list<int> l; for(int i=0;i<n;i++){ table[i] = true; vec.push_back(i); l.push_back(i); } list<int>::iterator index=l.begin(); for(int i=0;i<m;i++){ int tmp=0,j=0; ci...
a.cc: In function 'int main()': a.cc:16:5: error: 'table' was not declared in this scope; did you mean 'mutable'? 16 | table[i] = true; | ^~~~~ | mutable a.cc:17:5: error: 'vec' was not declared in this scope 17 | vec.push_back(i); | ^~~ a.cc:35:7: error: 'table' was not decl...
s185996384
p00296
C++
#include<iostream> #include<list> using namespace std; int main(){ int n,m,q; cin >> n >> m >> q; int size = n; bool table[n]; list<int> l; for(int i=0;i<n;i++){ table[i] = true; vec.push_back(i); l.push_back(i); } list<int>::iterator index=l.begin(); for(int i=0;i<m;i++){ int...
a.cc: In function 'int main()': a.cc:19:5: error: 'vec' was not declared in this scope 19 | vec.push_back(i); | ^~~
s317002923
p00296
C++
import static java.util.Arrays.*; import java.io.*; import java.until.*; public class Main { static void tr(Object... os) { System.err.println(deepToString(os)); } void solve() { int n = sc.nextInt(); int m = sc.nextInt(); int q = sc.nextInt(); Node[] nodes = n...
a.cc:1:1: error: 'import' does not name a type 1 | import static java.util.Arrays.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: 'import' does not name a type 3 | import java.io.*; | ^~~~~~ a.cc:3:1: note: C++20 'import' only available with '-fmodules-...
s681345285
p00296
C++
kabv
a.cc:1:1: error: 'kabv' does not name a type 1 | kabv | ^~~~
s368022140
p00297
C++
#include<iostream> #include<string> #include<algorithm> #include<functional> #include<vector> #include<stack> #include<queue> #include<set> #include<map> #include<stdio.h> #include<string.h> #include<math.h> #include<stdlib.h> #define int long long using namespace std; int n, d; //1 <= n <= 2*10^5, 0 <= d <= 10^9 stru...
a.cc: In function 'int main()': a.cc:32:41: error: invalid conversion from 'long long int (*)(const void*, const void*)' to '__compar_fn_t' {aka 'int (*)(const void*, const void*)'} [-fpermissive] 32 | qsort(star, n, sizeof(star[0]), compare); | ^~~~~~~ | ...
s172450950
p00297
C++
#include<cstdio> #include<algorithm> #define INF 1e9 using namespace std; typedef long long ll; int n,d; struct data{ ll x,y,c; }; bool comp(const data& d1,const data& d2){ return d1.c<d2.c; }; data s[200001]; struct segtree{ int val,b,s,v2; }; segtree seg[2][1<<22]; void init(){ for(int i=0;i<(1<<22);i++)seg[0...
a.cc: In function 'int main()': a.cc:58:24: error: no matching function for call to 'max(ll&, int)' 58 | res=max(res,(seg[0][0].b-seg[0][0].s)*(seg[1][0].b-seg[1][0].s)); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14...
s172697708
p00297
C++
#include <iostream> #include <vector> #include <map> #include <cstring> #include <string> #include <stack> #include <queue> #include <cmath> #include <cstdlib> #include <cstdio> #include <algorithm> #include <sstream> #include <set> using namespace std; #define rep(i,n) for(int i=0;i<(int)n;i++) #define repp(i,k,n) fo...
a.cc: In function 'int main()': a.cc:101:37: error: no matching function for call to 'min(int&, __gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type&)' 101 | ss[0].update(jj, min(a[i].second.first, ss[0].Seg[jj + ss[0].N - 1])); | ~...
s253696417
p00297
C++
#include<iostream> #include<math.h> #include<algorithm> #include<string> using namespace std; int N; long int d; int maxx,maxy,maxs,kma,kmi,ks,x[200000],y[200000],cnt; struct DATA{ int x,y,b; }; DATA data[200000]; int main(){ cin>>N>>b; for(int i=0;i<N;i++){ cin>>data[i].x>>data[i].y>>data[i].b; } for(int i=0;...
a.cc: In function 'int main()': a.cc:16:17: error: 'b' was not declared in this scope 16 | cin>>N>>b; | ^ a.cc:18:22: error: reference to 'data' is ambiguous 18 | cin>>data[i].x>>data[i].y>>data[i].b; | ^~~~ In file included from /usr/includ...
s749708586
p00297
C++
#include<iostream> #include<math.h> #include<algorithm> #include<string> using namespace std; int N=0; long int b=0; int maxx=0,maxy=0,maxs=0,x[200000],y[200000],cnt=1; struct DATA{ int x,y,b; }; DATA data[200000]; int main(){ cin>>N>>b; for(int i=0;i<N;i++){ cin>>data[i].x>>data[i].y>>data[i].b; } for(int i=0...
a.cc: In function 'int main()': a.cc:18:22: error: reference to 'data' is ambiguous 18 | cin>>data[i].x>>data[i].y>>data[i].b; | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bits/locale_classes.h:40, fr...
s218732522
p00297
C++
#include<iostream> #include<math.h> #include<algorithm> #include<string> using namespace std; int N=0; long int b=0; int maxx=0,maxy=0,maxs=0,x[200000],y[200000],cnt=1; struct DATA{ int x,y,b; }; DATA data[200000]; int main(){ cin>>N>>b; for(int i=0;i<N;i++){ cin>>data[i].x>>data[i].y>>data[i].b; } for(int i=0...
a.cc: In function 'int main()': a.cc:18:22: error: reference to 'data' is ambiguous 18 | cin>>data[i].x>>data[i].y>>data[i].b; | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bits/locale_classes.h:40, fr...
s540570130
p00297
C++
#include <bits/stdc++.h> using namespace std; inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;} template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();} template<class T> inline T sqr(T x) {return x*x;} typedef vector<int> vi; typedef vector<vi> vvi; typed...
a.cc:36:15: error: 'int index [200010]' redeclared as different kind of entity 36 | int index[nmax]; | ^ 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, ...
s140959958
p00297
C++
#include<iostream> #include<cmath> #include<string> #include<cctype> #include<vector> #include<numeric> #include<algorithm> #include<bits/std++.h> using namespace std; /** vector<int>ar(3); for(auto&e:ar){ scanf("%d",&e); } sort(ar.begin(),ar.end()) int sum=accumulate(ar.begin(),ar.end(),0); **/ //memo kyur...
a.cc:8:9: fatal error: bits/std++.h: No such file or directory 8 | #include<bits/std++.h> | ^~~~~~~~~~~~~~ compilation terminated.
s861754895
p00297
C++
#include<bits/std++.h> using namespace std; /** vector<int>ar(3); for(auto&e:ar){ scanf("%d",&e); } sort(ar.begin(),ar.end()) int sum=accumulate(ar.begin(),ar.end(),0); **/ //memo kyuridenamida 1237852 int main(){ double pai=3.141592653589; int N,d; cin >> N >> d; vector< array<int,3> > star...
a.cc:1:9: fatal error: bits/std++.h: No such file or directory 1 | #include<bits/std++.h> | ^~~~~~~~~~~~~~ compilation terminated.