submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s491840221
p00292
C++
#include<iostream> using namespace std; int main(){ int N,K,P,A; for(int i=0;i<N;i++){ cin>>K>>P; A=K/P; if(A==0){ A=P; cout<<A<<endl; }else{ cout<<A<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:16:2: error: expected '}' at end of input 16 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s347147743
p00292
C++
#include <iostream> using namespace std; int main(){ int n; cin >> n; int k,p; cin >> k >> p >. endl; while((k-p)>0){ k=k-p; } cout << k << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:18: error: expected primary-expression before '.' token 8 | cin >> k >> p >. endl; | ^
s668791796
p00292
C++
#include <iostream> using namespace std; int main(){ int n; cin >> n; for(int i=0;i<n;i++){ int k,p; cin >> k >> p >. endl; while((k-p)>0){ k=k-p; } cout << k << endl; } return 0; }
a.cc: In function 'int main()': a.cc:10:20: error: expected primary-expression before '.' token 10 | cin >> k >> p >. endl; | ^
s140694196
p00292
C++
#include <iostream> using namespace std; int main(){ int n; cin >> n; for(int i=0;i<n;i++){ int k,p; cin >> k >> p >> endl; while((k-p)>0){ k=k-p; } cout << k << endl; } return 0; }
a.cc: In function 'int main()': a.cc:10:19: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and '<unresolved overloaded function type>') 10 | cin >> k >> p >> endl; | ~~~~~~~~~~~~~~^~~~~~~ In file included from /usr/include...
s454942705
p00292
C++
#include <iostream> using namespace std; int main(){ int n; cin >> n; int k,p; for(int i=0;i<n;i++){ cin >> k >> p >> endl; while((k-p)>0){ k=k-p; } cout << k << endl; } return 0; }
a.cc: In function 'int main()': a.cc:10:19: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and '<unresolved overloaded function type>') 10 | cin >> k >> p >> endl; | ~~~~~~~~~~~~~~^~~~~~~ In file included from /usr/include...
s565740721
p00292
C++
#include < cstdio > int main() { int n, k, p; scanf ("%d", &n); for ( int i =0; i <n; ++ i ) { scanf ("%d %d", &k, &p ); int j = 1; while ( -- k) { //simulation ++j; if (j == p+1) j = 1; } printf ("%d \ n", j ); } return 0; }
a.cc:1:11: error: missing terminating > character 1 | #include < | ^ a.cc:1:10: error: empty filename in #include 1 | #include < | ^ a.cc:31:2: warning: missing terminating " character 31 | ("%d | ^ a.cc:31:2: error: missing terminating " character 31 | ("%d | ...
s638991195
p00292
C++
#include <iostream> using namespace std; int main(){ int N; cin>>N; for(int n=0;n<N;n++){ int K,P; cin>>K>>P; if(K>P){ if(K%P==0){ cout<<P<<endl; } else { cout<<K%P<<endl; } } if(K<P){ cout<<K<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:21:10: error: expected '}' at end of input 21 | } | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s740497527
p00292
C++
#include <iostream> using namespace std; int main(){ int N,K,P; cin>>N; for(int n=0;n<N;n++){ cin>>K>>P; if(K>P){ if(K%P==0){ cout<<P<<endl; } else { cout<<K%P<<endl; } } if(K<P){ cout<<K<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:21:10: error: expected '}' at end of input 21 | } | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s122259003
p00292
C++
#include <iostream> #include <instream> using namespace std; int main(){ int a,N; cin>>N; int*K=new int[N]; int*P=new int[N]; int*X=new int[N]; for(a=0;a<N;a++){ cin>>K>>P; X[a]=K[a]%P[a]; if(X[a]==0){ X[a]=P[a]; } } for(a=0;a<N;a++){ cin>>X[a]>>endl; } return 0; }
a.cc:2:10: fatal error: instream: No such file or directory 2 | #include <instream> | ^~~~~~~~~~ compilation terminated.
s297589956
p00292
C++
#include <iostream> using namespace std; int main(){ int a,N; cin>>N; int*K=new int[N]; int*P=new int[N]; int*X=new int[N]; for(a=0;a<N;a++){ cin>>K>>P; X[a]=K[a]%P[a]; if(X[a]==0){ X[a]=P[a]; } } for(a=0;a<N;a++){ cin>>X[a]>>endl; } return 0; }
a.cc: In function 'int main()': a.cc:11:20: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int*') 11 | cin>>K>>P; | ~~~^~~ | | | | | int* | std::istr...
s452897876
p00292
C++
#include<stdio.h> int main(void) { int P, K, i, N,a[100]; scanf_s("%d", &N); for (i = 0; i < N; i++) { scanf_s("%d%d", &K, &P); if (K < P) { a[i] = P; } else { if (K%P == 0) { a[i]=P; } else { a[i]=K%P; } } } for (i = 0; i < N; i++) { printf("%d\n", a[i]); } return 0; }
a.cc: In function 'int main()': a.cc:5:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 5 | scanf_s("%d", &N); | ^~~~~~~ | scanf
s051085101
p00292
C++
#include<stdio.h> int main(void) { int P, K, i, N,a[100]; scanf_s("%d", &N); for (i = 0; i < N; i++) { scanf_s("%d%d", &K, &P); if (K < P) { a[i] = P; } else { if (K%P == 0) { a[i]=P; } else { a[i]=K%P; } } } for (i = 0; i < N; i++) { printf("%d\n", a[i]); } return 0; }
a.cc: In function 'int main()': a.cc:5:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 5 | scanf_s("%d", &N); | ^~~~~~~ | scanf
s966210900
p00292
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:22:18: error: 'k' was not declared in this scope 22 | while (--k) { | ^ a.cc:24:18: error: 'p' was not declared in this scope 24 | if (j == p+1) j = 1; | ^
s836671452
p00292
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:22:18: error: 'k' was not declared in this scope 22 | while (--k) { | ^ a.cc:24:26: error: 'p' was not declared in this scope 24 | if (j == p+1) j = 1; | ^
s771180510
p00292
C++
#include <stdio.h> int main() { int n, k, p, j; sf("%d", &n); for (int i=0; i<n; ++i) { scanf("%d %d", &k, &p); j = k%p; printf("%d?\n", j == 0 ? p : j); } return 0; }
a.cc: In function 'int main()': a.cc:4:1: error: 'sf' was not declared in this scope 4 | sf("%d", &n); | ^~
s312459417
p00292
C++
#include <bits/stdc++.h> #include<algorithm> using namespace std; int main(){ int N; cin >>N; int k[N],p[N]; cin k[N],p[N]; for(int i =0;i<N;++i){ cout << k[i]%p[i] <<endl; } return 0; }
a.cc: In function 'int main()': a.cc:9:8: error: expected ';' before 'k' 9 | cin k[N],p[N]; | ^~ | ;
s920215298
p00292
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; int k1[n],k2[n]; for(int i=0;i<n;i++){ cin>>k1[i]>>k2[i]; int ans=k1[i]%k2[i]; if(ans==0){ cout<<k2[i]<<endl; } else{ cout<<ans<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:17:2: error: expected '}' at end of input 17 | } | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s148160006
p00292
C++
// nokorimono_h27i20.cpp : ??????????????? ??¢????????±????????§????????¨????????? ????????????????????????????????? // #include "stdafx.h" using namespace std; int winner(int A, int B) { while (1) { if (A > B) { A = A - B; } else { return A; } } } int main() { int N = 0;//??\????????° int K[1000];/...
a.cc:4:10: fatal error: stdafx.h: No such file or directory 4 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s666167507
p00292
C++
// nokorimono_h27i20.cpp : ??????????????? ??¢????????±????????§????????¨????????? ????????????????????????????????? // using namespace std; int winner(int A, int B) { while (1) { if (A > B) { A = A - B; } else { return A; } } } int main() { int N = 0;//??\????????° int K[1000];//???????????° int P[...
a.cc: In function 'int main()': a.cc:20:9: error: 'cin' was not declared in this scope 20 | cin >> N; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | // nokorimono_h27i20.cpp : ?????...
s823173880
p00292
C++
#include<iostream> using namespace std; int main(){ int n = 0; cin >> n; for(int i = 0; i < n; i++){ int k, p; cin >> k >> p; if(k % p == 0){ cout << p; }else{ cout << k % p; } cout << endl; } retrun 0; }
a.cc: In function 'int main()': a.cc:17:9: error: 'retrun' was not declared in this scope 17 | retrun 0; | ^~~~~~
s687485746
p00292
C++
#include <iostream> using namespace std; int main() { int n; cin>>N; int i,j; for(int i=0; i<N; i++){ cin>>i>>j; if(i>j) cout<<i<<endl; else cout<<j<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:7:14: error: 'N' was not declared in this scope 7 | cin>>N; | ^
s622116641
p00292
C++
#include <iostream> using namespace std; int main() { int n; cin>>n; int i,j; for(int i=0; i<N; i++){ cin>>i>>j; if(i>j) cout<<i<<endl; else cout<<j<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:9:24: error: 'N' was not declared in this scope 9 | for(int i=0; i<N; i++){ | ^
s401000678
p00292
C++
#include "stdafx.h" #include <iostream> using namespace std; int main() { int N = 0; int K[10000], P[10000]; cin >> N; for (int i = 0;i<N;i++) { cin >> K[i]; P[i ]; } for (int i = 0;i<N;i++) { int ans = K[i]%P[i]; if (ans == 0) { cout >> P[i]>> endl; } else { cout >> ans>> endl; } } ...
a.cc:2:10: fatal error: stdafx.h: No such file or directory 2 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s856971626
p00292
C++
#include <iostream> using namespace std; int main() { int N = 0; int K[10000], P[10000]; cin >> N; for (int i = 0;i<N;i++) { cin >> K[i]; P[i ]; } for (int i = 0;i<N;i++) { int ans = K[i]%P[i]; if (ans == 0) { cout >> P[i]>> endl; } else { cout >> ans>> endl; } } return 0; }
a.cc: In function 'int main()': a.cc:18:30: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int') 18 | cout >> P[i]>> endl; | ~~~~ ^~ ~~~~ | | | | ...
s576646808
p00292
C++
#include<iostream> using namespace std; int main(){ int N; cin<<N; int K=0; int P=0;] int a[100]; for(int i=0;i<N;i++){ cin>>K>>P; if(K%P==0) a[i]=P; else a[i]=K%P; } for(int i=0;i<N;i++){ cout<<a[i]<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:6:12: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 6 | cin<<N; | ~~~^~~ | | | | | int | std::istream {aka std::basic_istream<char>} a.cc:6:12: ...
s642750724
p00292
C++
#include<iostream> using namespace std; int main(){ int N,K,P; cin>>N; for(int i=0;i<N;i++){ int w; cin>>K>>P; w=K%P; if(K%P==0;) w=K; cout<<w<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:12:27: error: expected primary-expression before ')' token 12 | if(K%P==0;) | ^
s093269844
p00292
C++
#include <iostream> using namespace std; int main(){ int a,k,p,i; cin >> a; for(i=0;i<a;i++){ cin >> k >> p; if(k % p = 0) cout << p << endl; else cout << k % p << endl; } return 0; }
a.cc: In function 'int main()': a.cc:9:10: error: lvalue required as left operand of assignment 9 | if(k % p = 0) | ~~^~~
s134436990
p00292
C++
#include <stdio.h> 2 3 int main(void) 4 { 5 int times; // N 6 int value[times]; // K 7 int headCount[times]; // P 8 int i; 9 10 // printf("???????????????????????°?????\????????????????????????"); 11 scanf("%d", &times); 12 13 for (i = 0; i < times; i...
a.cc:2:3: error: expected unqualified-id before numeric constant 2 | 2 | ^
s307590523
p00292
C++
#include <iostream> #include <algorithm> using namespace std; int main(){ int N,K,P; cin>>N; for (int A=0;A<N;A++){ cin>>K>>P; if (K<P) cout>>K>>endl; else{ if (K%P==0) cout<<P<<endl; else cout<<K%P<<endl; } } return 0; }
a.cc: In function 'int main()': a.cc:9:30: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int') 9 | if (K<P) cout>>K>>endl; | ~~~~^~~ | | | | | ...
s225084661
p00292
C++
#include<iostream> using namespace std; int main(){ int n; cin>>n; for(int i=0;i<n;i++){ int k,p; cin>>k>>p; if(k%p!=0){ cout<<k%p<<endl; } else{ cout<<p<<endl; } }
a.cc: In function 'int main()': a.cc:15:8: error: expected '}' at end of input 15 | } | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s581295198
p00292
C++
Last One
a.cc:1:1: error: 'Last' does not name a type 1 | Last One | ^~~~
s685453836
p00293
C
#include <stdio.h> int main(void) { int N, M; int i, j; int h[100]; int m[100]; int k[100]; int g[100]; int witch; scanf("%d", &N); for (i = 0; i < N; i++) scanf("%d%d", &h[i], &m[i]); scanf("%d", &M); for (i = 0; i < M; i++) scanf("%d%d", &k[i], &g[i]); i = j = 0; while (!(i == N |&& j == M)) { ...
main.c: In function 'main': main.c:20:31: warning: comparison between pointer and integer 20 | while (!(i == N |&& j == M)) { | ^~ main.c:20:9: error: label 'j' used but not defined 20 | while (!(i == N |&& j == M)) { | ^~~~~
s824189992
p00293
C
#include <stdio.h> int main(void) { int N, M; int i, j; int h[100]; int m[100]; int k[100]; int g[100]; int witch; scanf("%d", &N); for (i = 0; i < N; i++) scanf("%d%d", &h[i], &m[i]); scanf("%d", &M); for (i = 0; i < M; i++) scanf("%d%d", &k[i], &g[i]); i = j = 0; while (i != N || j != M)) { i...
main.c: In function 'main': main.c:20:33: error: expected statement before ')' token 20 | while (i != N || j != M)) { | ^
s008190661
p00293
C
#include<stdio.h> int main(void) { int i,j,N,M,temp,m[200],h[200]; scanf("%d",&N); for(i=0;i<N;i++){ scanf("%d %d",&h[i],&m[i]); } scanf("%d",&M); for(j=i;j<M+i;j++){ scanf("%d %d",&h[j],&m[j]); } for(i=M+N-1;i>0;i--){ for(j=M+N-1;j>0;j--){ if(h[j-1] > h[j]){ temp = h[j-1]; h[j-1] = h[j]; h...
main.c: In function 'main': main.c:37:9: error: expected expression before '?' token 37 | ??? | ^ main.c:39:1: error: expected declaration or statement at end of input 39 | } | ^
s346961929
p00293
C
#include<stdio.h> int main() { ????????int M,N,d[201],i,j,h,m,a,k=0; ????????scanf("%d",&N); ????????for(i=0;i<N;i++){ ????????????????scanf("%d %d",&h,&m); ????????????????????????d[k]=h*60+m; ????????????????????????k++; ????????} ????????scanf("%d",&M); ????????for(j=i+1;j<N+M+1;j++){ ????????????????scanf("%d %d",&...
main.c: In function 'main': main.c:4:1: error: expected expression before '?' token 4 | ????????int M,N,d[201],i,j,h,m,a,k=0; | ^ main.c:5:1: error: expected expression before '?' token 5 | ????????scanf("%d",&N); | ^ main.c:5:21: error: 'N' undeclared (first use in this function) 5 | ????????sc...
s055936241
p00293
C
#include<cstdio> #include<algorithm> int main(){ int nBus=0; int aBus[2*23*59]; int n,h,m; for(int k=0;k<2;++k){ scanf("%d",&n); for(int i=0;i<n;++i){ scanf("%d %d", &h, &m); aBus[nBus+i]=h*100+m; } nBus+= n; } std::sort(aBus,aBus+nBus); nBus=std::unique(aBus,aBus+nBus)-aBus; for(int i=0;i<nBu...
main.c:2:9: fatal error: cstdio: No such file or directory 2 | #include<cstdio> | ^~~~~~~~ compilation terminated.
s564363438
p00293
C
#include<stdio.h> int main() { int N,M,sum, h[24], m[60],a,b; scanf_s("%d", &N); for (int i = 0; i < N; i++) { scanf_s("%d %d", &h[i], &m[i]); } scanf_s("%d", &M); sum = N + M; for (int i = N; i < sum; i++) { scanf_s("%d %d", &h[i], &m[i]); } for (int i = 0; i < sum; i++) { for (int j = i; j < sum; j++) ...
main.c: In function 'main': main.c:5:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 5 | scanf_s("%d", &N); | ^~~~~~~ | scanf
s113447638
p00293
C
#include<stdio.h> int main(){ int time,time2,a,b,e,f,i,N,M,h[500],m[500]; scanf("%d",&N); for(a=0;a<N;a++){ scanf("%d %d",&h[a],&m[a]); } scanf("%d",&M); for(b=0;b<M;b++){ scanf("%d %d",&h[b+a],&m[b+a]); } for(e=0;e<N+M;e++){ for(f=e+1;f<N+M;f++){ if(h[e]>h[f]){ i=h[e]; h[e]=h[f]; h...
main.c: In function 'main': main.c:26:41: error: 'g' undeclared (first use in this function) 26 | if(m[e]>g[f]){ | ^ main.c:26:41: note: each undeclared identifier is reported only once for each function it appears in
s659621382
p00293
C
#include<iostream> using namespace std; int main(void){ int N,h[101]={0},m[101]={0}; int M,k[101]={0},g[101]={0}; int a=0,b=0,c=0,d=0,temp=0,s[202]={0}; cin>>N; for(int i=0;i<N;i++){ cin>>h[i]>>m[i]; s[i]+=h[i]*3600+m[i]*60; } cin>>M; for(int i=0;i<M;i++){ cin>>k[i]>>g[i]; s[i+N]+=k[i]*3600+g[i]*60; } ...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s704804363
p00293
C
#include <stdio.h> int main(void) { int M,h[101]m[101],N,k[101],g[101],L,i,j,a=0,b=0,c=0,zi[202]={0},pun[202]={0}; for(i=0;i<100;i++){ h[i]=999; m[i]=999; k[i]=999; g[i]=999; } scanf("%d",&M); for(i=0;i<M;i++){ scanf("%d %d",&h[i],&m[i]); } scanf("%d",&N); for(j=0;j<N;j++){ scanf("%d %d",&k[j],&g[j]...
main.c: In function 'main': main.c:4:21: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'm' 4 | int M,h[101]m[101],N,k[101],g[101],L,i,j,a=0,b=0,c=0,zi[202]={0},pun[202]={0}; | ^ main.c:4:73: error: expected expression before ',' token 4 | int M,h[101]m[...
s949674213
p00293
C
#include <stdio.h> int main(void) { int M,h[101]m[101],N,k[101],g[101],L,i,j,a=0,b=0,c=0,zi[202]={0},pun[202]={0}; for(i=0;i<100;i++){ h[i]=999; m[i]=999; k[i]=999; g[i]=999; } scanf("%d",&M); for(i=0;i<M;i++){ scanf("%d %d",&h[i],&m[i]); } scanf("%d",&N); for(j=0;j<N;j++){ scanf("%d %d",&k[j],&g[j]...
main.c: In function 'main': main.c:4:21: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'm' 4 | int M,h[101]m[101],N,k[101],g[101],L,i,j,a=0,b=0,c=0,zi[202]={0},pun[202]={0}; | ^ main.c:4:73: error: expected expression before ',' token 4 | int M,h[101]m[...
s920890529
p00293
C
#include<stdio.h> int time[24][60]; int main() { int i,j,h,m,f; for(i=0;i<2;i++){ scanf("%d",&j); for(;j<0;j--){ scanf("%d %d",&h,&m); time[h][m]=1; } } f=1;[ for(j=0;j<60;j++){ if(!f)printf(" "); else f=0; printf("%d:%02d",i,j); } printf("\n"); return 0; }
main.c: In function 'main': main.c:13:21: error: expected expression before '[' token 13 | f=1;[ | ^ main.c:20:18: error: expected ';' before '}' token 20 | return 0; | ^ | ; 21 | } | ~
s735013680
p00293
C
int i, j; for(i = 0; i < n - 1; i++) { for(j = n - 1; j > i; j--) { if (a[j - 1] > a[j]) { int temp = a[j]; a[j] = a[j - 1]; a[j - 1] = temp; } } } } int main(void) { int n, m, h, p, k, g, a[100], i, c, j; sc...
main.c:3:5: error: expected identifier or '(' before 'for' 3 | for(i = 0; i < n - 1; i++) { | ^~~ main.c:3:18: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 3 | for(i = 0; i < n - 1; i++) { | ^ main.c:3:28: error: expected '=', ',', ';', 'asm' ...
s858260390
p00293
C
temp = a[j]; a[j] = a[j - 1]; a[j - 1] = temp; } } } } int main(void) { int n, m, h, p, k, g, a[200], i, c, j; scanf("%d", &n); for(i = 0; i < n; i++) { scanf("%d %d", &h, &p); a[i] = h * 60 + p; } scanf("%d...
main.c:1:17: warning: data definition has no type or storage class 1 | temp = a[j]; | ^~~~ main.c:1:17: error: type defaults to 'int' in declaration of 'temp' [-Wimplicit-int] main.c:1:24: error: 'a' undeclared here (not in a function) 1 | temp = a[j]; ...
s988519405
p00293
C
int n, m, h, p, k, g, a[201], i, c, j; scanf("%d", &n); for(i = 0; i < n; i++) { scanf("%d %d", &h, &p); a[i] = h * 60 + p; } scanf("%d", &m); for(i = 0; i < m; i++) { scanf("%d %d", &k, &g); a[n + i] = k * 60 + g; } c = n + m; bsort(a, c); ...
main.c:4:11: error: expected declaration specifiers or '...' before string constant 4 | scanf("%d", &n); | ^~~~ main.c:4:17: error: expected declaration specifiers or '...' before '&' token 4 | scanf("%d", &n); | ^ main.c:6:5: error: expected identifier or '(' befor...
s409439081
p00293
C++
#include<iostream> #include<set> using namespace std; int main(){ set<int> times; int n, h, m; cin >> n; while(n-- > 0){ cin >> h >> m; times.inserts(60*h + m); } cin >> n; while(n-- > 0){ cin >> h >> m; times.insert(60*h + m); } bool first = tru...
a.cc: In function 'int main()': a.cc:11:15: error: 'class std::set<int>' has no member named 'inserts'; did you mean 'insert'? 11 | times.inserts(60*h + m); | ^~~~~~~ | insert
s382085682
p00293
C++
#include "bits/stdc++.h" using namespace std; using ll = long long; using ull = unsigned long long; typedef pair<int, int>pi; typedef pair<ll, ll> P; typedef pair<ll, P> PP; typedef pair<P, P> PPP; const ll MOD = 1e9 + 7; const ll INF = 9e18; const double DINF = 5e14; const double eps = 1e-10; const int di[4] = { 1,...
In file included from /usr/include/c++/14/bits/stl_algobase.h:71, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::_...
s837171363
p00293
C++
#include "bits/stdc++.h" using namespace std; using ll = long long; using ull = unsigned long long; typedef pair<int, int>pi; typedef pair<ll, ll> P; typedef pair<ll, P> PP; typedef pair<P, P> PPP; const ll MOD = 1e9 + 7; const ll INF = 9e18; const double DINF = 5e14; const double eps = 1e-10; const int di[4] = { 1,...
a.cc: In function 'int main()': a.cc:42:21: error: 'i' was not declared in this scope 42 | if (i != a + b - 1)cout << u.sc.fr << ':' << p << ' '; | ^
s764112286
p00293
C++
#include<stdio.h> void bubbleSort(int dt[],int n) { int i,j,temp; for(i=0;i<n-1;i++){ for(j=n-1;j>i;j--){ if(dt[j-1]>dt[j]){ temp=dt[j]; dt[j]=dt[j-1]; dt[j-1]=temp; } } } } int ...
a.cc: In function 'int main()': a.cc:69:10: error: expected '}' at end of input 69 | return 0; | ^ a.cc:23:11: note: to match this '{' 23 | int main(){ | ^
s387404542
p00293
C++
#include <iostream> #include <map> #include <vector> using namespace std; int main(){ std::vector< pair<int,int> > a; int N,h,m,M; pair<int,int> time; cin >> N; for(int i = 0; i < N ;i++){ cin >> h >> m; time.first = h; time.second = m; a.push_back(time); } cin >> M; for(int i = 0; i...
a.cc: In function 'int main()': a.cc:26:8: error: 'sort' is not a member of 'std'; did you mean 'qsort'? 26 | std::sort(a.begin(),a.end());//昇順ソート | ^~~~ | qsort
s488769496
p00293
C++
#include <iostream> #include <map> #include <vector> using namespace std; int main(){ std::vector< pair<int,int> > a; int N,h,m,M; pair<int,int> time; cin >> N; for(int i = 0; i < N ;i++){ cin >> h >> m; time.first = h; time.second = m; a.push_back(time); } cin >> M; for(int i = 0; i...
a.cc: In function 'int main()': a.cc:26:8: error: 'sort' is not a member of 'std'; did you mean 'qsort'? 26 | std::sort(a.begin(),a.end());//昇順ソート | ^~~~ | qsort
s490826760
p00293
C++
#include <iostream> #include <vector> #include <cstdio> using namespace std; typedef pair<int,int> P; int main() { while (true) { vector<P> v; for (int i = 0; i < 2; i++) { int n; if (!(cin >> n)) return 0; while (n--) { int h, m; cin >> h >> m; v.push_back(P(h, ...
a.cc: In function 'int main()': a.cc:24:5: error: 'sort' was not declared in this scope; did you mean 'short'? 24 | sort(v.begin(), v.end()); | ^~~~ | short a.cc:25:13: error: 'unique' was not declared in this scope 25 | v.erase(unique(v.begin(), v.end()), v.end()); | ...
s936740395
p00293
C++
#include <iostream> #include <stdlib.h> int main() { sprintf("aaa"); }
a.cc: In function 'int main()': a.cc:5:11: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 5 | sprintf("aaa"); | ^~~~~ a.cc:5:10: error: too few arguments to function 'int sprintf(char*, const char*, ...)' 5 | sprintf("aaa"); | ~~~~~~~^~~~~~~ In fil...
s517901752
p00293
C++
#include <cstdio> #include <iostream> #include <iomanip> #include <string> using namespace std; int main(){ int a[2],i = 1,keta; cin >> a[0]; int n[a[0]],m[a[0]]; while (a[0] >= i){ cin >> n[i] >> m[i]; i++; } i = 1; cin >> a[1]; int o[a[1]],p[a[1]]; while (a[1] >= i){ cin >> o[i] >> p[i]; i++; } i = 1; int ii...
a.cc: In function 'int main()': a.cc:167:1: error: expected primary-expression before '?' token 167 | ??? | ^ a.cc:167:2: error: expected primary-expression before '?' token 167 | ??? | ^ a.cc:167:3: error: expected primary-expression before '?' token 167 | ??? | ^ a.cc:167:4: error: expected...
s389529483
p00293
C++
#include <iostream> using namespace std; int main(){ int N=0; int h[200]; int m[200]; int M=0; int k[200]; int g[200]; int L=0; cin>>N; int tem=0; int i=0; for(int i=0;i<N;i++){ cin>>h[i]>>m[i]; } cin>>M; for(int i=0;i<M;i++){ cin>>k[i]>>g[i]; } int A=N+M; for(int i=0;i<M;i++){ h[N+i]=k[i]; m...
a.cc: In function 'int main()': a.cc:41:33: error: 'p' was not declared in this scope 41 | p--; | ^
s590014492
p00293
C++
#include <iostream> using namespace std; int main(){ int N=0; int h[200]; int m[200]; int M=0; int k[200]; int g[200]; int L=0; cin>>N; int tem=0; int i=0; for(int i=0;i<N;i++){ cin>>h[i]>>m[i]; } cin>>M; for(int i=0;i<M;i++){ cin>>k[i]>>g[i]; } int A=N+M; for(int i=0;i<M;i++){ h[N+i]=k[i]; m...
a.cc: In function 'int main()': a.cc:45:50: error: expected primary-expression before '>' token 45 | if((h[i]==h[q+1])&&(m[i]=>m[q+1])){ | ^
s505906534
p00293
C++
#include<iostream> using namespace std; struct time{ int h,m; }; int main(){ /////////////??£?¨?/////////////// int n,m; time tmp1[100],tmp2[100]; /////////////??£?¨?/////////////// /////////////????????¨1??\???/////////////// cin >> n; for(int i=0;i<n;i++) cin >> tmp1[i].h >> tmp1[i].m; /////////////????????...
a.cc: In function 'int main()': a.cc:11:13: error: expected ';' before 'tmp1' 11 | time tmp1[100],tmp2[100]; | ^~~~~ | ; a.cc:17:24: error: 'tmp1' was not declared in this scope; did you mean 'tm'? 17 | cin >> tmp1[i].h >> tmp1[i].m; | ...
s557344440
p00293
C++
#include<iostream> using namespace std; struct time{ int h,m; }; int main(){ /////////////??£?¨?/////////////// int n,m; time tmp1[100],tmp2[100]; /////////////??£?¨?/////////////// /////////////????????¨1??\???/////////////// cin >> n; for(int i=0;i<n;i++) cin >> tmp1[i].h >> tmp1[i].m; /////////////????????...
a.cc: In function 'int main()': a.cc:11:13: error: expected ';' before 'tmp1' 11 | time tmp1[100],tmp2[100]; | ^~~~~ | ; a.cc:17:24: error: 'tmp1' was not declared in this scope; did you mean 'tm'? 17 | cin >> tmp1[i].h >> tmp1[i].m; | ...
s647018155
p00293
C++
#include<iostream> using namespace std; struct time{ int h,m; }; int main(){ int n,m; time tmp1[100],tmp2[100]; cin >> n; for(int i=0;i<n;i++) cin >> tmp1[i].h >> tmp1[i].m; tmp1[n].h=25; cin >> m; for(int i=0;i<m;i++) cin >> tmp2[i].h >> tmp2[i].m; tmp2[m].h=25; time ans[200]; int cnt1=0,cnt2...
a.cc: In function 'int main()': a.cc:10:13: error: expected ';' before 'tmp1' 10 | time tmp1[100],tmp2[100]; | ^~~~~ | ; a.cc:14:24: error: 'tmp1' was not declared in this scope; did you mean 'tm'? 14 | cin >> tmp1[i].h >> tmp1[i].m; | ...
s336173803
p00293
C++
#include<iostream> using namespace std; struct time{ int h; int m; }; int main(){ /////////////??£?¨?/////////////// int n; int m; time tmp1[100]; time tmp2[100]; /////////////??£?¨?/////////////// /////////////????????¨1??\???/////////////// cin >> n; for(int i=0;i<n;i++) cin >> tmp1[i].h >> tmp1[i].m; //...
a.cc: In function 'int main()': a.cc:13:13: error: expected ';' before 'tmp1' 13 | time tmp1[100]; | ^~~~~ | ; a.cc:14:13: error: expected ';' before 'tmp2' 14 | time tmp2[100]; | ^~~~~ | ; a.cc:20:24: error: 'tmp1' was not de...
s671248425
p00293
C++
#include<iostream> using namespace std; struct time{ int h; int m; }; int main(){ /////////////??£?¨?/////////////// int n; int m; time tmp1[100]; time tmp2[100]; /////////////??£?¨?/////////////// /////////////????????¨1??\???/////////////// cin >> n; for(int i=0;i<n;i++) cin >> tmp1[i].h >> tmp1[i].m; //...
a.cc: In function 'int main()': a.cc:13:13: error: expected ';' before 'tmp1' 13 | time tmp1[100]; | ^~~~~ | ; a.cc:14:13: error: expected ';' before 'tmp2' 14 | time tmp2[100]; | ^~~~~ | ; a.cc:20:24: error: 'tmp1' was not de...
s280385889
p00293
C++
#include<iostream> using namespace std; struct time{ int h; int m; }; int main(){ /////////////??£?¨?/////////////// int n; int m; time tmp1[100]; time tmp2[100]; /////////////??£?¨?/////////////// /////////////????????¨1??\???/////////////// cin >> n; for(int i=0;i<n;i++) cin >> tmp1[i].h >> tmp1[i].m; //...
a.cc: In function 'int main()': a.cc:13:13: error: expected ';' before 'tmp1' 13 | time tmp1[100]; | ^~~~~ | ; a.cc:14:13: error: expected ';' before 'tmp2' 14 | time tmp2[100]; | ^~~~~ | ; a.cc:20:24: error: 'tmp1' was not de...
s085460190
p00293
C++
#include<iostream> using namespace std; struct time{ int h,m; }; int main(){ int n,m; time tmp1[100],tmp2[100]; cin >> n; for(int i=0;i<n;i++) cin >> tmp1[i].h >> tmp1[i].m; tmp1[n].h=25; cin >> m; for(int i=0;i<m;i++) cin >> tmp2[i].h >> tmp2[i].m; tmp2[m].h=25; time ans[200]; int cnt1=0,cnt2...
a.cc: In function 'int main()': a.cc:10:13: error: expected ';' before 'tmp1' 10 | time tmp1[100],tmp2[100]; | ^~~~~ | ; a.cc:14:24: error: 'tmp1' was not declared in this scope; did you mean 'tm'? 14 | cin >> tmp1[i].h >> tmp1[i].m; | ...
s204367444
p00293
C++
#include <set> #include <algorithm> #include <iostream> using namespace std; int main() { set<pair<int, int>> t; for(int i=0; i<2; i++){ int N; cin >> N; while(N--){ int h,m; cin >> h >> m; table.insert((h,m)); } } for(auto&& i : t) ...
a.cc: In function 'int main()': a.cc:13:13: error: 'table' was not declared in this scope; did you mean 'mutable'? 13 | table.insert((h,m)); | ^~~~~ | mutable a.cc:18:12: error: 'i' was not declared in this scope 18 | if(i != *(t.end()-1)) | ...
s820805452
p00293
C++
#include<set> #include<iostream> int main(){ int i=2,N,h,m;set<pair<int, int>> t; while(i--&&std::cin>>N)while(N--&&std::cin>>h>>m)t.insert(make_pair(h,m)); for(auto i=t.begin();i!=t.end();)printf("%d:%02d",i->first,i->second),std::cout<<(++i!=t.end()?" ":""); cout<<endl; }
a.cc: In function 'int main()': a.cc:4:15: error: 'set' was not declared in this scope 4 | int i=2,N,h,m;set<pair<int, int>> t; | ^~~ a.cc:4:15: note: suggested alternatives: In file included from /usr/include/c++/14/set:63, from a.cc:1: /usr/include/c++/14/bits/stl_set.h:96:11:...
s628455198
p00293
C++
#include <iostream> int main() { int a,b[24],c[60],d,f[24],g[60]; std::cin>>a; for(int i=0;i<a;i++){ std::cin>>b[i]>>c[i]; } std::cin>>f; for(int i=0;i<f;i++){ std::cin>>g[i]>>h[i]; } while(true){ int i=0; int j=0; if(b[i]==g[j]&&c[i]==h[j]){ ...
a.cc: In function 'int main()': a.cc:10:13: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int [24]') 10 | std::cin>>f; | ~~~~~~~~^~~ | | | | | int [24] | std::istream {aka std::basic_istream<ch...
s691892931
p00293
C++
#include<iostream> using namespace std; int main(){ int n,m,a[100],b[100],c[100],d[100]; cin>>n; for(int i=0;i<n;i++){ cin>>a[i]>>b[i]; cin>>m; for(int p=0;p<m;p++){ cin>>c[i]>>d[i]; if(a[i]*60+b[i]==c[p]*60+d[p]) cout<<a[i]<<":"<<b[i]<<" "; ...
a.cc: In function 'int main()': a.cc:15:59: error: expected ']' before '}' token 15 | cout<<a[i]<<":"<<b[i]<<" "<<c[p]<<":"<<d[p}<<" "; | ^ | ] a.cc:15:59: error: expected '...
s708234517
p00293
C++
#include<iostream> using namespace std; int main(){ int n,m,a[100],b[100],c[100],d[100]; cin>>n; for(int i=0;i<n;i++){ cin>>a[i]>>b[i]; cin>>m; for(int p=0;p<m;p++){ cin>>c[p]>>d[p]; if(a[i]*60+b[i]==c[p]*60+d[p]){ cout<<a[i]<<":"<<b[i]<<" "; ...
a.cc: In function 'int main()': a.cc:16:59: error: expected ']' before '}' token 16 | cout<<a[i]<<":"<<b[i]<<" "<<c[p]<<":"<<d[p}<<" "; | ^ | ] a.cc:16:59: error: expected '...
s437853196
p00293
C++
#include<bits/stdc++.h> #include<algorithm> #include<vecotr> int main(){ int N,h[100],m[100]; int M,k[100],g[100]; scanf("%d",&N); for(int i=0;i<N;i++)scanf("%d %d",&h[i],&m[i]); scanf("%d",&M); for(int i=0;i<N;i++)scanf("%d %d",&k[i],&g[i]); vector<int> t; for(int i=0;i<N;i++){ t.push_back(h[i]*60+m[i]); ...
a.cc:3:9: fatal error: vecotr: No such file or directory 3 | #include<vecotr> | ^~~~~~~~ compilation terminated.
s929711989
p00293
C++
#include<bits/stdc++.h> #include<algorithm> #include<vector> using namespace std; int main(){ int N,h[100],m[100]; int M,k[100],g[100]; scanf("%d",&N); for(int i=0;i<N;i++)scanf("%d %d",&h[i],&m[i]); scanf("%d",&M); for(int i=0;i<M;i++)scanf("%d %d",&k[i],&g[i]); vector<int> t; for(int i=0;i<N;i++) t.push_back...
a.cc: In function 'int main()': a.cc:19:9: error: 'print' was not declared in this scope; did you mean 'rint'? 19 | print("\n"); | ^~~~~ | rint
s139291003
p00293
C++
#include<iostream> #include<algorithm> using namespace std; int main() { int n,m,iimo1[101],iimo2[101],turu1[101],turu2[101],co1=0,co2=0; cin>>n; for(int i=0;i<n;i++)cin>>iimo1[i]>>iimo2[i]; cin>>m; for(int i=0;i<m;i++)cin>>turu1[i]>>turu2[i]; for(int i=0;n==co1&&m==co2;i++){ if(i!=0)cou...
a.cc: In function 'int main()': a.cc:37:9: error: expected '}' before 'else' 37 | else{ | ^~~~ a.cc:31:39: note: to match this '{' 31 | else if(iimo2[co1]>turu2[co2]){{ | ^
s002286664
p00293
C++
2 0 0 21 0 3 7 30 21 0 23 7
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 2 0 0 21 0 | ^
s223297234
p00293
C++
#include <vector> #include <iostream> #include <algorithm> using namespace std; int main() { int n, m, p, q; vector<int> t; cin >> n; for(int i = 0; i < n; i++) { cin >> p >> q; t.push_back(p * 60 + q); } cin >> m; for(int i = 0; i < m; i++) { cin >> p >> q; t.push_back(p * 60 + q); } sort(t...
a.cc: In function 'int main()': a.cc:26:18: error: no post-increment operator for type 26 | count++; | ^~
s328221770
p00293
C++
// 0298 #include <iostream> #include <vector> using namespace std; struct time{ int h; int m; }; void merge(vector<time> bus1, vector<time> bus2, vector<time> &bus){ int i=0, j=0, check; while(i+j < bus1.size()+bus2.size()){ if(i == bus1.size()){ check = 2; }else if(j == bus2.size()){ check = 1; }else...
a.cc:11:23: error: type/value mismatch at argument 1 in template parameter list for 'template<class _Tp, class _Alloc> class std::vector' 11 | void merge(vector<time> bus1, vector<time> bus2, vector<time> &bus){ | ^ a.cc:11:23: note: expected a type, got 'time' a.cc:11:23: error: templa...
s132880617
p00293
C++
// 0298 #include <iostream> #include <vector> using namespace std; struct time{ int h; int m; }; void merge(vector<time> bus1, vector<time> bus2, vector<time> &bus){ int i=0, j=0, check; while(i+j < bus1.size()+bus2.size()){ if(i == bus1.size()){ check = 2; }else if(j == bus2.size()){ check = 1; }else...
a.cc:11:23: error: type/value mismatch at argument 1 in template parameter list for 'template<class _Tp, class _Alloc> class std::vector' 11 | void merge(vector<time> bus1, vector<time> bus2, vector<time> &bus){ | ^ a.cc:11:23: note: expected a type, got 'time' a.cc:11:23: error: templa...
s240053530
p00293
C++
#include<iostream> #include<queue> #include<cstdio> using namespace std; int main(){ int n=0; int i=0; priority_queue<int,vector<int>,greater<int> > q1; int a=0; int b=0; int j=0; int m=-1; for(i=0;i<2;i++){ cin>>n; for(j=0;j<n;j++){ cin>>a>>b; a=a*60+b; q1.push(a); } } while(q1.empty()==false)...
a.cc: In function 'int main()': a.cc:28:37: error: expected ';' before 'if' 28 | printf("%d:%2d",a,b) | ^ | ; 29 | if(!q1.empty())cout<<" "; | ~~
s920901977
p00293
C++
#include <iostream> using namespace std; int main(){ int N,M; cin >> N; int h[N],m[N]; for(int i=0; i<N; i++) cin >>h[i]>>m[i]; cin >> M; int k[M],g[M]; for(int i=0; i<M; i++) cin >>k[i]>>g[i]; int Nc=0,Mc=0,same=0; for(int i=0; i<N+M; i++){ if((h[Nc]<k[Mc]||(h[Nc]==k[Mc]&&m[Nc]<g[Nc]))||Mc==M){//飯盛のが...
a.cc: In function 'int main()': a.cc:25:30: error: lvalue required as left operand of assignment 25 | if(Nc+Mc=N+M) | ~~^~~ a.cc:39:30: error: lvalue required as left operand of assignment 39 | if(Nc+Mc=N+M) | ...
s294967762
p00293
C++
#include<iostream> using namespace std; int main(){ int N,M; int h[],m[],k[],g[],a[],b[]; cin>>N; for(int i=0;i<N;i++){ cin>>h[i]<<m[i]; a[i]=(h[i]*60)+m[i]; } cin>>M; for(int j=0;j<M;j++){ cin>>k[j]>>g[j]; ...
a.cc: In function 'int main()': a.cc:6:13: error: storage size of 'h' isn't known 6 | int h[],m[],k[],g[],a[],b[]; | ^ a.cc:6:17: error: storage size of 'm' isn't known 6 | int h[],m[],k[],g[],a[],b[]; | ^ a.cc:6:21: error: storage size of 'k' isn't known ...
s253056661
p00293
C++
#include<iostream> using namespace std; int main (){ int N,M,L; int tmp1,tmp2; int h[200]; int m[200]; int k[200]; int g[200]; int c=100,d=100; for(int i=0;i<c;i++){ cin>>N>>h[i]>>m[i]; if(c!=N) c=N; } for(int j=0;j<d;j++){ cin>>M>>k[j]>>g[j]; if(d!=M) d=M; } int T[M+N]; int t[M+N]; for(int x=0;...
a.cc: In function 'int main()': a.cc:42:21: error: 'i' was not declared in this scope 42 | for(int y=0;i<M+N;y++){ | ^ a.cc:46:18: error: expected '}' before 'else' 46 | else{ | ^~~~ a.cc:44:27: note: to match this '{' 44 | ...
s334041038
p00293
C++
#include<iostream> using namespace std; int main (){ int N,M,L; int tmp1,tmp2; int h[200]; int m[200]; int k[200]; int g[200]; int c=100,d=100; for(int i=0;i<c;i++){ cin>>N>>h[i]>>m[i]; if(c!==N) c=N; } for(int j=0;j<d;j++){ cin>>M>>k[j]>>g[j]; if(d!==M) d=M; } for(int x=0;x<M;x++){ h[N+x+1]=k[...
a.cc: In function 'int main()': a.cc:14:23: error: expected primary-expression before '=' token 14 | if(c!==N) c=N; | ^ a.cc:18:23: error: expected primary-expression before '=' token 18 | if(d!==M) d=M; | ^
s089651285
p00293
C++
#include <iostream> using namespace std; void BubbleSort(int S[], int N) { bool flg; do{ flg = false; for(int i=0; i<N-1; i++){ if(S[i]>S[i+1]){ int tmp = S[i]; S[i] = S[i+1]; S[i+1] = tmp; flg = true; } } }while(flg); } int main(){ int N,h[N],m[N],min[N]; cin >> N; for(int ...
a.cc: In function 'int main()': a.cc:35:19: error: conflicting declaration 'int min [M]' 35 | int M,k[M],g[M],min[M]; | ^~~ a.cc:26:19: note: previous declaration as 'int min [N]' 26 | int N,h[N],m[N],min[N]; | ^~~ a.cc:44:20: error: expected ';' before 'int' ...
s735726615
p00293
C++
#include <iostream> using namespace std; int main(){ int N=0,M=0; cin>>N; int h[N],m[N]; for(int i=0; i<N; i++) cin>>h[i]>>m[i]; cin>>M; int k[M],g[M],all[M+N]; for(int i=0; i<M; i++) cin>>k[i]>>g[i]; for(int i=0; i<M+N; i++){ if(i<N) all[i]=h[i]*60+m[i]; else all[i]=k[i-N]*60+g[i-N]; } for(int i=0; i<M+N-1; i++...
a.cc: In function 'int main()': a.cc:35:9: error: 'i' was not declared in this scope 35 | if(all[i]%60<10) cout<<all[i]/60<<':'<<0<<all[i]%60; | ^
s600850284
p00293
C++
#include < cstdio > #include <algorithm> main () { int nBus = 0; int aBus [2*23*59]; int n, h, m ; for ( int k=0; k<2; ++k ) { scanf ("%d", &n); for ( int i =0; i <n; ++ i ) { scanf ("%d %d", &h, &m); aBus [ nBus+i ] = h*100 + m; } nBus += n; } std ::sort( aBus , aBus+nBus ); nBus = std ::unique( aBus , aBus+nBu...
a.cc:1:11: error: missing terminating > character 1 | #include < | ^ a.cc:1:10: error: empty filename in #include 1 | #include < | ^ a.cc:78:3: warning: missing terminating ' character 78 | ? ' | ^ a.cc:78:3: error: missing terminating ' character a.cc:80:2: warning: mu...
s671113812
p00293
C++
#include <iostream> using namespace std; struct bus{ unsigned h; unsigned m; }; int main(){ unsigned N=0; cin >> N; bus bus[N+100]; for(unsigned i=0;i<N;i++){ cin >> bus[i].h >> bus[i].m; } unsigned M=0; cin >> M; for(unsigned j=0;j<M;j++){ cin >> bus[N+j].h >> bus[N+j].m; } for...
a.cc: In function 'int main()': a.cc:37:47: error: 'BUS' was not declared in this scope 37 | if((bus[l-1].m>bus[l].m)&&(bus[l-1].h==BUS[l].h)){ | ^~~ a.cc:39:12: error: 'b' was not declared in this scope 39 | b=bus[l].m; | ^
s588899905
p00293
C++
#include<stdio.h> int main() { int N,M,sum, h[24], m[60],a,b; scanf_s("%d", &N); for (int i = 0; i < N; i++) { scanf_s("%d %d", &h[i], &m[i]); } scanf_s("%d", &M); sum = N + M; for (int i = N; i < sum; i++) { scanf_s("%d %d", &h[i], &m[i]); } for (int i = 0; i < sum; i++) { for (int j = i; j < sum; j++) ...
a.cc: In function 'int main()': a.cc:5:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 5 | scanf_s("%d", &N); | ^~~~~~~ | scanf
s006826171
p00293
C++
#include <iostream> #include <vector> #include <iomanip> using namespace std; int N, M; int main() { vector<int> out; cin >> N; for (int i=0; i<N; i++) { int h, m; cin >> h >> m; out.push_back(h*60 + m); } cin >> M; for (int i=0; i<M; i++) { int h, m; cin >> h >> m; out.push_back(...
a.cc: In function 'int main()': a.cc:23:3: error: 'sort' was not declared in this scope; did you mean 'short'? 23 | sort(out.begin(), out.end()); | ^~~~ | short a.cc:24:14: error: 'unique' was not declared in this scope 24 | out.erase( unique( out.begin(), out.end() ), out.end() ); | ...
s979510370
p00293
C++
#include<iostream> using namespace std; int main() { int N, M, a, b, c, d, f, x, y, Z, w; w = 0; cin >> N; int*h = new int[N]; int*m = new int[N]; for (a = 0; a < N; a++) { cin >> h[a] >> m[a]; } cin >> M; int*k = new int[M]; int*g = new int[M]; for (b = 0; b < M; b++) { cin >> k[b] >> g[b]; } for (a ...
a.cc: In function 'int main()': a.cc:77:18: error: expected '}' at end of input 77 | return 0; | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s145792592
p00293
C++
struct Time { int hour; int minute; }; vector<Time> get_input() { int n; cin >> n; vector<Time> ninput(n); for (int i = 0; i < n; i++) { cin >> ninput[i].hour; cin >> ninput[i].minute; } return ninput; } bool operator<(Time a, Time b) { if (a.hour < b.hour) { return true; } else if (a.hour > b.hour) ...
a.cc:7:1: error: 'vector' does not name a type 7 | vector<Time> get_input() { | ^~~~~~ a.cc: In function 'void print_time(Time)': a.cc:33:9: error: 'printf' was not declared in this scope 33 | printf("%d:%02d", t.hour, t.minute); | ^~~~~~ a.cc:1:1: note: 'printf' is defined in header ...
s392384711
p00293
C++
#include<stdio.h> int main(void) { int n,m,h[200],temp,k,cnt,g,i,j; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d %d",&k,&g); h[i]=k*60+g; } scanf("%d",&m); for(i<n+m;i++){ scanf("%d %d",&k,&g); h[i]=k*60+g; } cnt=m+n; for(i=0;i<n+m-1;i++){ for(j=0;j<n+m;j++){ if(h[i]>h[j]){ temp=h[i]; h[i]=...
a.cc: In function 'int main()': a.cc:11:22: error: expected ';' before ')' token 11 | for(i<n+m;i++){ | ^ | ;
s089628472
p00293
C++
#include <iostream> using namespace std; int main(){ int N1; int h[101]; int m[101]; cin>>N1; for(int i=0;i<N1;i++) cin>>h[i]>>m[i]; h[N1]=24; m[N1]=0; int N2; int k[101]; int g[101]; cin>>N2; for(int i=0;i<N2;i++) cin>>k[i]>>g[i]; k[N2]=24; g[N2]=0; for(int i=0,j=0;i<N1 || j<N2;){ if(h[i]==k[j]&& m...
a.cc: In function 'int main()': a.cc:33:17: error: 'else' without a previous 'if' 33 | else | ^~~~
s644489492
p00293
C++
#include <iostream> using namespace std; int main(){ int N1; int h[101]; int m[101]; cin>>N1; for(int i=0;i<N1;i++) cin>>h[i]>>m[i]; h[N1]=24; m[N1]=0; int N2; int k[101]; int g[101]; cin>>N2; for(int i=0;i<N2;i++) cin>>k[i]>>g[i]; k[N2]=24; g[N2]=0; for(int i=0,j=0;i<N1 || j<N2;){ if(h[i]==k[j]&& m...
a.cc: In function 'int main()': a.cc:32:17: error: 'else' without a previous 'if' 32 | else | ^~~~
s568607951
p00293
C++
#include<iostream> #include<cstdio> using namespace std; int main(){ int z[24][60],n,a,b,k=0; for(int i=0;i<24;i++)for(int j=0;j<60;j++)z[i][j]=0; for(int w=0;w<2;w++){ cin>>n; for(int i=0;i<n;i++){ cin>>a>>b; z[a][b]=1; } } for(int i=0;i<24;i++){ ...
a.cc:26:1: error: 'v' does not name a type 26 | v | ^
s096606355
p00293
C++
#include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <climits> #include <iostream> #include <vector> #include <string> #include <sstream> #include <algorithm> #include <utility> #include <set> #include <map> #include <stack> #include <queue> #include <deque> #include <functional> using nam...
a.cc:71:13: error: 's' was not declared in this scope 71 | map<string, s> A; | ^ a.cc:71:14: error: template argument 2 is invalid 71 | map<string, s> A; | ^ a.cc:71:14: error: template argument 4 is invalid a.cc: In function 'int main()': a.cc:77:16: error: template argument ...
s566599045
p00293
C++
#include <iostream> #include <stdio.h> using namespace std; int main(){ int n; cin >> n; int hm[100][2]; for(int i = 0; i < n; i++){ cin >> hm[i][0]; cin >> hm[i][1]; } int m; cin >> m; int kg[100][2]; for(int i = 0; i < m; i++){ cin >> kg[i][0]; cin >> kg[i][1]; } int result[200][2]; for(int k = ...
a.cc: In function 'int main()': a.cc:31:28: error: expected ';' before '}' token 31 | i++ | ^ | ; 32 | }else if(hm [i][0] > kg[j][0]){ | ~ a.cc:34:48: error: expected ';' befo...
s973327124
p00293
C++
//============================================================================ // Name : AOJ.cpp // Author : // Version : // Copyright : Your copyright notice // Description : Hello World in C++, Ansi-style //============================================================================ #include <iostr...
a.cc:11:10: fatal error: cstdio.h: No such file or directory 11 | #include <cstdio.h> | ^~~~~~~~~~ compilation terminated.
s122269052
p00293
C++
//============================================================================ // Name : AOJ.cpp // Author : // Version : // Copyright : Your copyright notice // Description : Hello World in C++, Ansi-style //============================================================================ #include <iostr...
a.cc:11:10: fatal error: cstdio.h: No such file or directory 11 | #include <cstdio.h> | ^~~~~~~~~~ compilation terminated.
s642451847
p00293
C++
#include<iostream> using namespace std; int main(){ int N,M,A; cin>>N; int Ih[N]; int Im[N]; for(int i=0;i<N;i++){ cin>>Ih[i]; cin>>Im[i]; } cin>>M; int Th[M]; int Tm[M]; for(int i=0;i<M;i++){ cin>>Th[i]; cin>>Tm[i]; } A=N+M; int Ah[A]; int Am[A]; for(int i=0;i<N;i++){ Ah[i]=Ih[i]; Am[i]=im[...
a.cc: In function 'int main()': a.cc:25:23: error: 'im' was not declared in this scope; did you mean 'Im'? 25 | Am[i]=im[i]; | ^~ | Im
s586896484
p00293
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 j=0;j<M;j++){ cint>>k[j]>>g[j]; } k[M]=24;g[M]=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:18:9: error: 'cint' was not declared in this scope; did you mean 'uint'? 18 | cint>>k[j]>>g[j]; | ^~~~ | uint a.cc:27:51: error: expected ')' before '{' token 27 | else if(h[i]<k[i]||(h[i]==k[j]&&m[i]<g[j]){ | ~ ...
s171851412
p00293
C++
#include <iostream> using namespace std; int main(){ int n[100],m[100],a,b,c,nn,mn,i; cin >> nn; for(i=0;i<nn;i++){ cin >> b; n[i] = b * 100; cin >> b; n[i] += b; } cin >> mn; for(i=0;i<mn;i++){ cin >> b; m[i] = b * 100; cin >> b; m[i] += b; } a = 0; b = 0; while(a > n...
a.cc: In function 'int main()': a.cc:32:4: error: expected '}' at end of input 32 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s355648812
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] a.cc:25:22: error: expected ...