submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s848548928
p00033
C++
#include <iostream> #include <vector> int ball[10]; int left = 0,right = 0; bool dfs(int de,int left, int right){//??????????????§??????????????? if(de == 9)return true; if(left < ball[de]){ left = ball[de]; return dfs(de + 1); } if(right < ball[de]){ right = ball[de]; return dfs(de + 1); } return false; ...
a.cc: In function 'bool dfs(int, int, int)': a.cc:9:27: error: too few arguments to function 'bool dfs(int, int, int)' 9 | return dfs(de + 1); | ~~~^~~~~~~~ a.cc:5:6: note: declared here 5 | bool dfs(int de,int left, int right){//??????????????§??????????????? ...
s228472609
p00033
C++
#include <iostream> #include <vector> int ball[10]; int left = 0,right = 0; bool dfs(int de,int left, int right){//??????????????§??????????????? if(de == 9)return true; if(left < ball[de]){ left = ball[de]; return dfs(de + 1.left,right); } if(right < ball[de]){ right = ball[de]; return dfs(de + 1,left,righ...
a.cc: In function 'bool dfs(int, int, int)': a.cc:9:33: error: unable to find numeric literal operator 'operator""left' 9 | return dfs(de + 1.left,right); | ^~~~~~
s714554843
p00033
C++
#include <iostream> #include <algorithm> using namespace std; int a[10]; int b[10]; int ball[20]; bool ans; void dfs(int k,int ca,int cb) { if(k==10) { ans = 1; return; } if(ball[k] > a[ca-1]) { a[ca] = ball[k]; dfs(k+1,ca+1,cb); a[ca] = 0; } if(ball[k] > b[cb-1]) { b[cb] = ball[k]; dfs(k+1,ca,cb+...
a.cc: In function 'int main()': a.cc:36:17: error: 'memset' was not declared in this scope 36 | memset(a,0,sizeof(a)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <algorithm> +++ |...
s210354339
p00033
C++
#include <bits/stdc++.h> using namespace std; int main() { int n,a; int b = 11,c = 11; cin >> n; while(n--){ for(int i = 0;i < 10;i++){ cin >> a; if(b > a)b = a; else if(c > a)c = a; else { cout << "NO" << endl; return; } } cout << "YES" << endl; } }
a.cc: In function 'int main()': a.cc:15:9: error: return-statement with no value, in function returning 'int' [-fpermissive] 15 | return; | ^~~~~~
s511006153
p00033
C++
#include <bits/stdc++.h> using namespace std; int main() { int n,a; int b = 11,c = 11; cin >> n; while(n--){ for(int i = 0;i < 10;i++){ cin >> a; if(b > a)b = a; else if(c > a)c = a; else { cout << "NO" << endl; return; } } cout << "YES" << endl; } return; }
a.cc: In function 'int main()': a.cc:15:9: error: return-statement with no value, in function returning 'int' [-fpermissive] 15 | return; | ^~~~~~ a.cc:20:3: error: return-statement with no value, in function returning 'int' [-fpermissive] 20 | return; | ^~~~~~
s119714287
p00033
C++
??£?????? #include<iostream> #include<memory.h> using namespace std; int arr[10],used[10]; void DFS(int pre,int cur) { if(cur<10&&arr[pre]<arr[cur]) { used[cur]=1; DFS(cur,cur+1); } else if(cur<10&&arr[pre]>=arr[cur]) DFS(pre,cur+1); } int main() { int T,pre; bool judge; cin>>T...
a.cc:1:3: error: extended character £ is not valid in an identifier 1 | ??£?????? | ^ a.cc:1:1: error: expected unqualified-id before '?' token 1 | ??£?????? | ^ In file included from /usr/include/c++/14/iosfwd:42, from /usr/include/c++/14/ios:40, from /usr/includ...
s547441065
p00033
C++
main(){ int topB,topC; int n,tmp; int valid; for (scanf("%d", &n); n--;){ topB=topC=0; valid=1; for (int i=0; i<10; i++){ scanf("%d", &tmp); if (tmp > topB) topB=tmp; else if (tmp > topC)topC=tmp; else { valid=0; break; } } printf("%s\n",valid?"YES":"NO"); } return 0; }
a.cc:1:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 1 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:6:14: error: 'scanf' was not declared in this scope 6 | for (scanf("%d", &n); n--;){ | ^~~~~ a.cc:17:17: error: 'printf' was not declared...
s362913324
p00033
C++
#include <stdio.h> #include <stdbool.h> ?? #define NUM_BALL 10 ?? int main(void) { ????int???????????? n; ????int???????????? num; ????int???????????? left, right; ????bool?? flag = true; ????int???? i, j; ?? ????scanf("%d", &n); ????for (i = 0; i < n; i++) { ????????????????left = right = -1; ????????????????for (j = ...
a.cc:3:1: error: expected unqualified-id before '?' token 3 | ?? | ^
s678654843
p00033
C++
#include <stdio.h> ?? #define NUM_BALL 10 ?? int main(void) { ????int???????????? n; ????int???????????? num; ????int???????????? left, right; ????int?? flag = 1; ????int???? i, j; ?? ????scanf("%d", &n); ????for (i = 0; i < n; i++) { ????????????????left = right = -1; ????????????????for (j = 0; j < NUM_BALL; j++) { ?...
a.cc:2:1: error: expected unqualified-id before '?' token 2 | ?? | ^
s965626135
p00033
C++
#include <stdio.h> #include <vector> #include <iostream> using namespace std; int main() { vector<int> left; vector<int> right; vector<int> all; bool flag = true; int n; cin >> n; for (int i = 0; i < n; i++) { for (int j = 0; j < 10; j++) { int temp; cin >> temp; all.push_back(temp); } } for ...
a.cc: In function 'int main()': a.cc:26:42: warning: NULL used in arithmetic [-Wpointer-arith] 26 | if (left.data != NULL) { | ^~~~ a.cc:26:39: error: invalid operands of types '<unresolved overloaded function type>' and 'long int' to binary 'ope...
s750862561
p00033
C++
#include<cstdio> #include<iostream> #include<stack> using namespace std; stack<int> B; stack<int> C; int A[10]; int solve(){ for(int i = 0;i<10;i++){ if(!B.empty()){ if(B.top()<A[i]){ B.push(A[i]); }else if(C.top()<A[i] || C.empty()){ C.push(A[i]...
a.cc:1:18: warning: extra tokens at end of #include directive 1 | #include<cstdio> #include<iostream> #include<stack> using namespace std; stack<int> B; stack<int> C; int A[10]; int solve(){ for(int i = 0;i<10;i++){ if(!B.empty()){ if(B.top()<A[i]){ B.push(A[i]); ...
s107816504
p00033
C++
#include <iostream> #include <vector> using namespace std; void solve(vector<int> left, vector<int> right, vector<int> all, int n) { bool flag = true; for (int i = 0; i < n; i++) { for (int j = 0; j < 10; j++) { if (left.size() > 0) { if (all[10 * i + j] > left[left.size() - 1]) { left.push_back(a...
a.cc: In function 'int main()': a.cc:47:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 47 | scanf_s("%d", &n); | ^~~~~~~ | scanf
s234477744
p00033
C++
#include <iostream> #include <stack> #include <tuple> using namespace std; int main() { int n, balls[10]; cin >> n; while(n--){ for(int i = 0; i < 10; i++){ cin >> balls[i]; } bool sortable = false; stack<tuple<int, int, int> > states; states.p...
a.cc: In function 'int main()': a.cc:19:17: error: 'closed' was not declared in this scope; did you mean 'pclose'? 19 | closed.insert(now); | ^~~~~~ | pclose
s121116054
p00033
C++
// AojTemplete.cpp : ??????????????? ??¢????????±????????§????????¨????????? ????????????????????????????????? // #include "stdafx.h" #include<iostream> #include<vector> using namespace std; int main() { int n; cin >> n; for (int i = 0; i < n; i++) { bool flag = false; int prev; int in[10]; int used[10];...
a.cc:4:10: fatal error: stdafx.h: No such file or directory 4 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s302142013
p00033
C++
#include <bits/stdc++.h> using namespace std; int a[10]; bool dfs(int i, int l, int r) { if (i == 10) return true; if (l < a[i] && dfs(i + 1, a[i], r)) return true; if (r < a[i] && dfs(i + 1, r, a[i])) return true; return false; } int main() { int n; cin >> n; while (n--) { l = r ...
a.cc: In function 'int main()': a.cc:22:9: error: 'l' was not declared in this scope 22 | l = r = 0; | ^ a.cc:22:13: error: 'r' was not declared in this scope 22 | l = r = 0; | ^
s065993172
p00033
C++
#include <bits/stdc++.h> using namespace std; int n, ball[10]; bool solve(int idx, int l, int r) { if(idx == 10) return true; bool ret = false; if(ball[idx] > l) ret = ret || solve(idx + 1, ball[idx], r); if(ball[idx] > r) ret = ret || solve(idx + 1, l, ball[idx]); return ret; } int main() { ...
a.cc: In function 'int main()': a.cc:26:47: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<' 26 | cout << solve(0, 0, 0) ? "YES" : "NO" << endl; | ~~~~~^~~~~~~
s720373785
p00033
C++
#include <bits/stdc++.h> using namespace std; int n, ball[10]; bool solve(int idx, int l, int r) { if(idx >= 10) return true; bool ret = false; if(ball[idx] > l) ret = ret || solve(idx + 1, ball[idx], r); if(ball[idx] > r) ret = ret || solve(idx + 1, l, ball[idx]); return ret; } int ma...
a.cc: In function 'int main()': a.cc:26:47: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<' 26 | cout << solve(0, 0, 0) ? "YES" : "NO" << endl; | ~~~~~^~~~~~~
s109537752
p00033
C++
import java.util.Scanner; public class Main{ public static void main(String[] args)throws Exception{ new Main().solve(); } void solve(){ Scanner sc=new Scanner(System.in); int n=sc.nextInt();//the number of test case for(int i=0;i<n;i++){ int[] d=new int[10]; for(int j=0;j<10;j++){ d[j]=sc.nextInt(...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Scanner; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: expected unqualified-id before 'public' 2 | public class Main{ | ^~~~~~
s401965162
p00033
C++
C++ #include <iostream> // C++?????\?????? #include <stdio.h> // C ?????\?????? #include <algorithm> // sort ???????????¢?????´????????? #include <string.h> // C ??????????????¨ #include <ctype.h> // C ??????????¨???¨ #include <string> // C++???????????? #include <math.h> #include <sstream> using namespace std; int ba...
a.cc:1:1: error: 'C' does not name a type 1 | C++ | ^ In file included from /usr/include/c++/14/iosfwd:42, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:3: /usr/include/c...
s418887826
p00033
C++
iint main(){ return 0; }
a.cc:1:1: error: 'iint' does not name a type; did you mean 'int'? 1 | iint main(){ | ^~~~ | int
s362996708
p00033
C++
#include<iostream> using namespace std; int d[10]={}; bool f; void dfs(int l,int r int s){ if(s==10) f=true; //cout << d << endl; if(l<d[s]){ dfs(d[s],r,s+1); } if(r<d[s]){ dfs(l,d[s],s+1); } } int main(){ int n;cin >> n; while(n--){ int r=0,l=0,d; f=false; for(int i=0;i<10;i++){ ...
a.cc:5:22: error: expected ',' or '...' before 'int' 5 | void dfs(int l,int r int s){ | ^~~ a.cc: In function 'void dfs(int, int)': a.cc:6:6: error: 's' was not declared in this scope 6 | if(s==10) f=true; | ^ a.cc:8:10: error: 's' was not declared in this scope 8 | ...
s234158319
p00033
C++
#include <iostream> #include <cstdio> using namespace std; typedef long long ll; #define rep(i,n) for(int i=0;i<(n);i++) int a[10]; //B:=B?????????????????° C*=C?????????????????° cnt:=??????????????°?????? bool dfs(int B, int C, int cnt){ if(cnt == 10){ return true; } if(B < a[cnt]){ return dfs(a[cnt], C, cnt...
a.cc: In function 'int main()': a.cc:28:17: error: 'flag' was not declared in this scope 28 | flag = false; | ^~~~ a.cc: In function 'bool dfs(int, int, int)': a.cc:23:1: warning: control reaches end of non-void function [-Wreturn-type] 23 | } | ^
s466055042
p00033
C++
#include <iostream> #include <stack> #include <vector> #include <algorithm> using namespace std; static const int MAX_N = 10; int a[MAX_N] = {0}; bool dfs(int a[],vector<int> r,vector<int> l,i){ if(i==MAX_N)return true; if(r.size()==0 || r[r.size()-1]<a[i]){ r.push_back(a[i]); return solve(a,r,l,i+1); } if(l.s...
a.cc:9:46: error: 'i' has not been declared 9 | bool dfs(int a[],vector<int> r,vector<int> l,i){ | ^ a.cc: In function 'bool dfs(int*, std::vector<int>, std::vector<int>, int)': a.cc:10:12: error: 'i' was not declared in this scope 10 | if(i==MAX_N)retur...
s824494565
p00033
C++
#include <iostream> #include <stack> #include <vector> #include <algorithm> using namespace std; static const int MAX_N = 10; int a[MAX_N] = {0}; bool dfs(int a[],vector<int> r,vector<int> l,int i){ if(i==MAX_N)return true; if(r.size()==0 || r[r.size()-1]<a[i]){ r.push_back(a[i]); return solve(a,r,l,i+1); } if...
a.cc: In function 'bool dfs(int*, std::vector<int>, std::vector<int>, int)': a.cc:13:24: error: 'solve' was not declared in this scope 13 | return solve(a,r,l,i+1); | ^~~~~ a.cc:17:24: error: 'solve' was not declared in this scope 17 | return solve(a,r,...
s363829809
p00033
C++
#include <iostream> #include <stack> #include <vector> #include <algorithm> using namespace std; static const int MAX_N = 10; int a[MAX_N] = {0}; bool dfs(int a[],vector<int> r,vector<int> l,int i){ if(i==MAX_N)return true; if(r.size()==0 || r[r.size()-1]<a[i]){ r.push_back(a[i]); return dfs(a,r,l,i+1); } if(l...
a.cc: In function 'int main()': a.cc:33:20: error: expected '(' before 'dfs' 33 | if dfs(a,r,l,0){ | ^~~ | ( a.cc:35:18: error: 'else' without a previous 'if' 35 | }else{ | ^~~~
s662649744
p00033
C++
bool tansaku(vector<int> list,int index,int b,int c) { if (index<10) { if (b < list[index]) { if (tansaku(list, index + 1, list[index], c)) return true; } if (c < list[index]) { if (tansaku(list, index + 1, b, list[index])) return true; } } else { return true; } return false; } int ma...
a.cc:1:14: error: 'vector' was not declared in this scope 1 | bool tansaku(vector<int> list,int index,int b,int c) | ^~~~~~ a.cc:1:21: error: expected primary-expression before 'int' 1 | bool tansaku(vector<int> list,int index,int b,int c) | ^~~ a.cc:1:31: error: exp...
s466077465
p00033
C++
#include<algorithm> #include<vector> #include<queue> using namespace std; int A[13] = { 0 }; bool solve(int a, int b,int c) { if (++c == 10) return true; else { bool r = false; if (a < A[c]) r = solve(A[c], b, c); if (b < A[c] && r == false) r = solve(a,A[c], c); return r; } } int main(void) {...
a.cc: In function 'int main()': a.cc:26:9: error: 'scanf' was not declared in this scope 26 | scanf("%d", &n); | ^~~~~ a.cc:31:25: error: 'printf' was not declared in this scope 31 | printf("YES\n"); | ^~~~~~ a.cc:4:1: note: 'printf' is d...
s516850701
p00033
C++
#include<algorithm> #include<vector> #include<queue> using namespace std; int A[13] = { 0 }; bool solve(int a, int b,int c) { if (++c == 10) return true; else { bool r = false; if (a < A[c]) r = solve(A[c], b, c); if (b < A[c] && r == false) r = solve(a,A[c], c); return r; } } int main(void) {...
a.cc: In function 'int main()': a.cc:26:9: error: 'scanf' was not declared in this scope 26 | scanf("%d", &n); | ^~~~~ a.cc:31:25: error: 'printf' was not declared in this scope 31 | printf("YES\n"); | ^~~~~~ a.cc:4:1: note: 'printf' is d...
s239147028
p00033
C++
#include<iostream> #include<stdio.h> #include<string> #include<math.h> #include<iomanip> #include<algorithm> #include<string.h> #include<cctype> #include<map> #include<set> #include<vector> #include<sstream> #include<stack> #include<queue> using namespace std; int main() { int N; cin>>N ...
a.cc: In function 'int main()': a.cc:22:10: error: expected ';' before 'while' 22 | cin>>N | ^ | ; 23 | while(N--) | ~~~~~
s620641145
p00033
C++
#include <stdio.h> int ball[10]; bool can(int n,int left,int right){ bool flag; if(n==10) return true; if(ball[n]>right && can(n+1,left ,ball[n]))return true; if(ball[n]>left && can(n+1,ball[n]),right)return true; return false; } int main(){ int N; scanf("%d",&N); for(i=0;i<N;i++){ for(j=0;j<10...
a.cc: In function 'bool can(int, int, int)': a.cc:10:32: error: too few arguments to function 'bool can(int, int, int)' 10 | if(ball[n]>left && can(n+1,ball[n]),right)return true; | ~~~^~~~~~~~~~~~~ a.cc:5:6: note: declared here 5 | bool can(int n,int left,int right){ ...
s907600337
p00033
C++
#include <stdio.h> int ball[10]; bool can(int n,int left,int right){ bool flag; if(n==10) return true; if(ball[n]>right && can(n+1,left ,ball[n])return true; if(ball[n]>left && can(n+1,ball[n],right)return true; return false; } int main(){ int N; scanf("%d",&N); for(int i=0;i<N;i++){ for(int j=...
a.cc: In function 'bool can(int, int, int)': a.cc:9:51: error: expected ';' before 'return' 9 | if(ball[n]>right && can(n+1,left ,ball[n])return true; | ^~~~~~ | ; a.cc:10:9: error: expected prima...
s981464930
p00033
C++
#include <stdio.h> int ball[10]; bool can(int n,int left,int right){ bool flag; if(n==10) return true; if(ball[n]>right && can(n+1,left ,ball[n])return true; if(ball[n]>left && can(n+1,ball[n],right)return true; return false; } int main(){ int N; scanf("%d",&N); for(int i=0;i<N;i++){ for(int j=...
a.cc: In function 'bool can(int, int, int)': a.cc:9:51: error: expected ';' before 'return' 9 | if(ball[n]>right && can(n+1,left ,ball[n])return true; | ^~~~~~ | ; a.cc:10:9: error: expected prima...
s893932746
p00033
C++
#include <iostream> using namespace std; int Balls[10]; bool fork(int balls[], int i, int b, int c) { if (i == 10) return true; if (b > balls[i] && c > balls[i]) return false; if (b < balls[i]) fork(balls, i + 1, balls[i], c); if (c < balls[i]) fork(balls, i + 1, b, balls[i]); } int main() { int...
a.cc: In function 'int main()': a.cc:20:14: error: expected primary-expression before ')' token 20 | else(){cout << "NO" << endl;} | ^ a.cc: In function 'bool fork(int*, int, int, int)': a.cc:11:1: warning: control reaches end of non-void function [-Wreturn-type] 11 | } | ^
s074367522
p00033
C++
#include <iostream> using namespace std; int Balls[10]; bool fork(int balls[], int i, int b, int c) { if (i == 10) return true; if (b > balls[i] && c > balls[i]) return false; if (b < balls[i]) fork(balls, i + 1, balls[i], c); if (c < balls[i]) fork(balls, i + 1, b, balls[i]); } int main() { int...
a.cc: In function 'int main()': a.cc:20:14: error: expected primary-expression before ')' token 20 | else(){cout << "NO" << endl;} | ^ a.cc: In function 'bool fork(int*, int, int, int)': a.cc:11:1: warning: control reaches end of non-void function [-Wreturn-type] 11 | } | ^
s997830152
p00033
C++
#include "stdafx.h" #include <iostream> using namespace std; int main() { int n; int b = 0; int c = 0; int d = 0; int A[10] = {}; int B[10] = {}; int C[10] = {}; cin >> n; for (int i = 0;i < n;i++) { for (int j = 0;j < 10;j++) { ...
a.cc:1:10: fatal error: stdafx.h: No such file or directory 1 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s388001926
p00033
C++
#include<iostream> using namespace std; int B[11]={0}; int C[11]={0}; bool DFS(int *a,int i=0,int b=1,int c=1) { bool judge=true; if(i==10) return judge; judge=false; if(B[b-1]<a[i]){ B[b]=a[i]; judge=DFS(a,i+1,b+1,c); } if(C[c-1]<a[i]){ C[c]=a[i]; judge=DFS(a,i+1,b,c+1); } return judge; }...
a.cc: In function 'int main()': a.cc:47:1: error: expected primary-expression before '?' token 47 | ??????????????????i++; | ^ a.cc:47:2: error: expected primary-expression before '?' token 47 | ??????????????????i++; | ^ a.cc:47:3: error: expected primary-expression before '?' token 47 | ????????...
s265827552
p00033
C++
#include<iostream> using namespace std; int B[11]={0}; int C[11]={0}; bool DFS(int *a,int i=0,int b=1,int c=1) { bool judge=true; if(i==10) return judge; judge=false; if(B[b-1]<a[i]){ B[b]=a[i]; judge=DFS(a,i+1,b+1,c); } if(C[c-1]<a[i]){ C[c]=a[i]; judge=DFS(a,i+1,b,c+1); } return judge; }...
a.cc: In function 'int main()': a.cc:41:13: error: expected primary-expression before '?' token 41 | ??????????????????if(DFS(A)==true) | ^ a.cc:41:14: error: expected primary-expression before '?' token 41 | ??????????????????if(DFS(A)==true) | ^ a.cc:...
s760124316
p00033
C++
#include<iostream> using namespace std; int B[11]={0}; int C[11]={0}; bool DFS(int *a,int i=0,int b=1,int c=1) { bool judge=true; if(i==10) return judge; judge=false; if(B[b-1]<a[i]){ B[b]=a[i]; judge=DFS(a,i+1,b+1,c); } if(C[c-1]<a[i]){ C[c]=a[i]; judge=DFS(a,i+1,b,c+1); } return judge; }...
a.cc: In function 'int main()': a.cc:41:13: error: expected primary-expression before '?' token 41 | ??????????????????if(DFS(A)==true) | ^ a.cc:41:14: error: expected primary-expression before '?' token 41 | ??????????????????if(DFS(A)==true) | ^ a.cc:...
s540327411
p00033
C++
#include<iostream> using namespace std; int B[11]={0}; int C[11]={0}; bool DFS(int *a,int i=0,int b=1,int c=1) { bool judge=true; if(i==10) return judge; judge=false; if(B[b-1]<a[i]){ B[b]=a[i]; judge=DFS(a,i+1,b+1,c); } if(C[c-1]<a[i]){ C[c]=a[i]; judge=DFS(a,i+1,b,c+1); } return judge; }...
a.cc: In function 'int main()': a.cc:37:9: error: expected primary-expression before '?' token 37 | ???int A[10]={0}; | ^ a.cc:37:10: error: expected primary-expression before '?' token 37 | ???int A[10]={0}; | ^ a.cc:37:11: error: expected primary-expression before '?...
s532368302
p00033
C++
#include<iostream> using namespace std; int B[11]={0}; int C[11]={0}; bool DFS(int *a,int i=0,int b=1,int c=1) { bool judge=true; if(i==10) return judge; judge=false; if(B[b-1]<a[i]){ B[b]=a[i]; judge=DFS(a,i+1,b+1,c); } if(C[c-1]<a[i]){ C[c]=a[i]; judge=DFS(a,i+1,b,c+1); } return judge; }...
a.cc: In function 'int main()': a.cc:37:9: error: expected primary-expression before '?' token 37 | ???int A[10]; | ^ a.cc:37:10: error: expected primary-expression before '?' token 37 | ???int A[10]; | ^ a.cc:37:11: error: expected primary-expression before '?' token ...
s438595426
p00033
C++
#include <iostream> int a[10]; int main() { int T; cin >> T; while (T--) { bool ans = true; for (int i = 0; i < 10; ++i) { cin >> a[i]; } int l, r; l = r = 0; for (int i = 0; i < 10; ++i) { if (a[i] > l) { l = a[i]; } else if (a[i] > r) { r = a[i]; } else { and = false; brea...
a.cc: In function 'int main()': a.cc:7:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 7 | cin >> T; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ...
s680698659
p00033
C++
#include <iostream> using namespace std; int a[10]; int main() { int T; cin >> T; while (T--) { bool ans = true; for (int i = 0; i < 10; ++i) { cin >> a[i]; } int l, r; l = r = 0; for (int i = 0; i < 10; ++i) { if (a[i] > l) { l = a[i]; } else if (a[i] > r) { r = a[i]; } else { ...
a.cc: In function 'int main()': a.cc:22:37: error: expected identifier before '=' token 22 | and = false; | ^
s780308330
p00033
C++
#include <stdio.h> int main(void) { int a,b,c[10]={0},d,e,f,g,h,i; int e=1; scanf("%d",&a); for (b=0;b<a;b++) { e=1; for (i=0;i<10;i++) { scanf("%d",&f); c[i]=f; } if (e==1) { for (g=1;g<8;g++) { if (c[g-1]<c[g]||c[g-1]<c[g+1]) { e=0; } else { e=1; } } ...
a.cc: In function 'int main()': a.cc:5:13: error: redeclaration of 'int e' 5 | int e=1; | ^ a.cc:4:29: note: 'int e' previously declared here 4 | int a,b,c[10]={0},d,e,f,g,h,i; | ^
s096628800
p00033
C++
2 3 1 4 2 5 6 7 8 9 10 10 9 8 7 6 5 4 3 2 1
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 2 | ^
s928341269
p00033
C++
#include <bits/stdc++.h> using namespace std; int inp[10]; int n; bool dfs(int b, int c, int depth) { if (depth >= 10) return true; if (inp[depth] < b && inp[depth] < c) return false; if (inp[depth] > b) dfs(inp[depth], c, depth+1); if (inp[depth] > c) dfs(inp[depth], c, depth+1); } int main() { cin >> n; ...
a.cc: In function 'int main()': a.cc:17:5: error: 'canbe' was not declared in this scope 17 | canbe = false; | ^~~~~ a.cc: In function 'bool dfs(int, int, int)': a.cc:12:1: warning: control reaches end of non-void function [-Wreturn-type] 12 | } | ^
s069048074
p00033
C++
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { BufferedReader input = new BufferedReader(new InputStreamReader(System.in)); input.readLine(); while (input.ready()) { ...
a.cc:1:1: error: 'import' does not name a type 1 | import java.io.BufferedReader; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.io.IOException; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fm...
s871263752
p00033
C++
#include <iostream> #include <vector> #include <string> using namespace std; int q; int Ball[10]; bool flag; vector<string> log; bool is_satisfies(vector<int> a) { vector<int> copy = a; sort(a.begin(), a.end()); return a == copy; } void bfs(int i, vector<int> B, vector<int> C) { if (i == 9) { ...
a.cc:11:16: warning: built-in function 'log' declared as non-function [-Wbuiltin-declaration-mismatch] 11 | vector<string> log; | ^~~ a.cc: In function 'bool is_satisfies(std::vector<int>)': a.cc:15:5: error: 'sort' was not declared in this scope; did you mean 'short'? 15 | sort(a.begin()...
s003723824
p00033
C++
#include <iostream> using namespace std; int main() { int n; cin >> n; // ???????????????????????° while(n--){ int balls[10] = {0}; for(int i = 0; i < 10; i++) cin >> balls[I]; // ??????????????????????????\??? bool isYES = true; // ???10?????????????????????????????????...
a.cc: In function 'int main()': a.cc:9:50: error: 'I' was not declared in this scope 9 | for(int i = 0; i < 10; i++) cin >> balls[I]; // ??????????????????????????\??? | ^
s940914823
p00033
C++
// // 0033.cpp // // // Created by Yoshida Satoshi on 2017/11/16. // // #include <iostream> using namespace std; void tsumu(int l,int r,int* in,int j,bool *ans){ if(j==9){ *ans=true; return; } if(in[j]>l) tsumu(in[j],r,in,j+1,ans); if(in[j]>r) tsumu(l,in[j],in,j+1,ans); re...
a.cc: In function 'int main()': a.cc:36:17: error: could not convert 'tsumu(l, r, ((int*)(& in)), 0, (& ans))' from 'void' to 'bool' 36 | if(tsumu(l,r,in,0,&ans)) cout<<"YES"<<endl; | ~~~~~^~~~~~~~~~~~~~~ | | | void
s709165193
p00033
C++
#include<cstdio> int n,l1,l2,a[15]; int main() { scanf("%d",&n); for(int i=1;i<=n;i++) { bool f=0;l1=-1;l2=0; for(int j=1;j<=10;j++) scanf("%d",&a[j]); for(int j=1;j<=10;j++) if(!f) { if(a[j]<l1&&a[j]<l2){f=1;printf("No\n");break;} if(l1>l2){if(a[j]>l1)l1=a[j];else l2=a[j];} else{if(a[j]>...
a.cc: In function 'int main()': a.cc:18:40: error: expected ';' before '}' token 18 | if(!f)printf("YES\n");a | ^ | ; 19 | } | ~
s972952084
p00033
C++
public class Main { void run() { scanner scan = new Scanner(System.in); int n = scan.nextInt(); int[] boll = new int[10]; for(int k = 0; k < n; k++) { for(int i = 0; i < 10; i++) { boll[i] = scan.nextInt(); } int judg = 0; for(int i = 0; i < n; i++) { int right,left; right = boll[0]; ...
a.cc:1:1: error: expected unqualified-id before 'public' 1 | public class Main { | ^~~~~~
s725939588
p00033
C++
Public class Main { void run() { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int[] boll = new int[10]; for(int k = 0; k < n; k++) { for(int i = 0; i < 10; i++) { boll[i] = scan.nextInt(); } int judg = 0; for(int i = 0; i < n; i++) { int right,left; right = boll[0]; ...
a.cc:1:1: error: 'Public' does not name a type 1 | Public class Main { | ^~~~~~
s532130316
p00033
C++
public class Main { void run() { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int[] boll = new int[10]; for(int k = 0; k < n; k++) { for(int i = 0; i < 10; i++) { boll[i] = scan.nextInt(); } int judg = 0; for(int i = 0; i < n; i++) { int right,left; right = boll[0]; ...
a.cc:1:1: error: expected unqualified-id before 'public' 1 | public class Main { | ^~~~~~
s050914537
p00033
C++
# include <iostream> # include <cstdio> using namespace std; int n,len,ball[20],used[20]; int f() { int t = -1; for (int i=1;i<=10;++i) if (!used[i]) { if (ball[i] < t) return 0; t = ball[i]; } t = -1; for (int i=1;i<=10;++i) if (used[i]) { if (ball[i] < t) return 0; t = ball[i]; } retur...
a.cc: In function 'int main()': a.cc:49:25: error: 'memset' was not declared in this scope 49 | memset(used,0,sizeof(used)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | # incl...
s777604084
p00033
C++
int main() { int n; cin >> n; while (n--) { int a, b = 0, c = 0; bool f = true; for (int i = 0; i < 10; ++i) { cin >> a; if (b < a) b = a; else if (c < a) c = a; else f = false; } if (f) cout << "YES" << endl; else cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:3:3: error: 'cin' was not declared in this scope 3 | cin >> n; | ^~~ a.cc:13:12: error: 'cout' was not declared in this scope 13 | if (f) cout << "YES" << endl; | ^~~~ a.cc:13:29: error: 'endl' was not declared in this scope 13 | if (f) c...
s126690500
p00033
C++
import java.util.*; import java.lang.*; import java.math.*; import java.io.*; import static java.lang.Math.*; import static java.util.Arrays.*; public class Main{ Scanner sc; static final int INF=1<<28; static final double EPS=1e-9; void run(){ sc=new Scanner(System.in); int n=sc.nextInt(); sc.nextLine()...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.lang.*; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1...
s877752311
p00033
C++
#include <iostream> #include <cstdio> #include <vector> using namespace std; bool search(int l, int r, int n) { if (n == 10) { return true; } if (l < ball[n]) { if (search(ball[n], r, n + 1)) {return true;} } if (r < ball[n]) { if (search(l, ball[n], n + 1)) {return true;} } return false; ...
a.cc: In function 'bool search(int, int, int)': a.cc:13:11: error: 'ball' was not declared in this scope 13 | if (l < ball[n]) { | ^~~~ a.cc:16:11: error: 'ball' was not declared in this scope 16 | if (r < ball[n]) { | ^~~~
s555988492
p00033
C++
#include <cstdio> #include <stack> using namespace std; int main(void) { int n; scanf("%d", &n); for (int i = 0; i < n; i++){ stack < int > b, c; int j; b.push(0); c.push(0); int ball[10]; for (int i = 0; i < 10; i++){ scanf...
a.cc: In function 'int main()': a.cc:54:2: error: expected '}' at end of input 54 | } | ^ a.cc:6:1: note: to match this '{' 6 | { | ^
s688964434
p00033
C++
a[10];int dfs(int l,int r,int i){if(i>9)return 1;if(a[i]>l&&dfs(a[i],r,i+1))return 1;if(a[i]>r&&dfs(l,a[i],i+1))return 1;return 0; }main(n){scanf("%d",&n);for(;n;n--)scanf("%d%d%d%d%d%d%d%d%d%d",a+0,a+1,a+2,a+3,a+4,a+5,a+6,a+7,a+8,a+9),dfs(0,0,0)?puts("YES"):puts("NO");return 0;}
a.cc:1:1: error: 'a' does not name a type 1 | a[10];int dfs(int l,int r,int i){if(i>9)return 1;if(a[i]>l&&dfs(a[i],r,i+1))return 1;if(a[i]>r&&dfs(l,a[i],i+1))return 1;return 0; | ^ a.cc: In function 'int dfs(int, int, int)': a.cc:1:53: error: 'a' was not declared in this scope 1 | a[10];int dfs(int l,int ...
s147421060
p00033
C++
a[10]; int dfs(int l,int r,int i){ if(i>9)return 1;if(a[i]>l&&dfs(a[i],r,i+1))return 1; if(a[i]>r&&dfs(l,a[i],i+1))return 1; return 0; } main(n){ scanf("%d",&n); for(;n;n--) scanf("%d%d%d%d%d%d%d%d%d%d",a+0,a+1,a+2,a+3,a+4,a+5,a+6,a+7,a+8,a+9),dfs(0,0,0)?puts("YES"):puts("NO"); return 0; }
a.cc:1:1: error: 'a' does not name a type 1 | a[10]; | ^ a.cc: In function 'int dfs(int, int, int)': a.cc:3:20: error: 'a' was not declared in this scope 3 | if(i>9)return 1;if(a[i]>l&&dfs(a[i],r,i+1))return 1; | ^ a.cc:4:4: error: 'a' was not declared in this scope 4 | if(a[i...
s102666548
p00033
C++
a[10]; int dfs(int l,int r,int i){ if(i>9)return 1; if(a[i]>l&&dfs(a[i],r,i+1))return 1; if(a[i]>r&&dfs(l,a[i],i+1))return 1; return 0; } main(n){ scanf("%d",&n); for(;n;n--) scanf("%d%d%d%d%d%d%d%d%d%d",a+0,a+1,a+2,a+3,a+4,a+5,a+6,a+7,a+8,a+9),dfs(0,0,0)?puts("YES"):puts("NO"); return 0; }
a.cc:1:1: error: 'a' does not name a type 1 | a[10]; | ^ a.cc: In function 'int dfs(int, int, int)': a.cc:4:6: error: 'a' was not declared in this scope 4 | if(a[i]>l&&dfs(a[i],r,i+1))return 1; | ^ a.cc:5:6: error: 'a' was not declared in this scope 5 | if(a[i]>r&&dfs(l,a[i],i+1))return...
s474271697
p00033
C++
#include <iostream> using namespace std; int main(){ int n,ball,tp[2],con,bad; cin >> n; for(; n > 0; n--){ tp[0] = tp[1] = 0; for(int i = 0; i < 10; i++){ cin >> ball; if(tp[0] > tp[1]){ con = 0; }else{ con = 1; } if(ball > tp[con]){ tp[con] = ball; }else if(ball...
a.cc: In function 'int main()': a.cc:28:48: error: invalid conversion from 'const char*' to 'std::basic_istream<char>::int_type' {aka 'int'} [-fpermissive] 28 | cin.ignore(64, "\n"); | ^~~~ | ...
s533871227
p00033
C++
#define _USE_MATH_DEFINES #include <iostream> #include <sstream> #include <cmath> #include <algorithm> #include <queue> #include <stack> #include <limits> #include <map> typedef long long ll; using namespace std; typedef pair<int,int> P; void seek_lcs(int a,int b,int dp[10+1][10+1],int* num,int* base,vector<int>& id...
a.cc: In function 'int main()': a.cc:46:17: error: 'memset' was not declared in this scope 46 | memset(dp,0,sizeof(dp)); | ^~~~~~ a.cc:10:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 9 | #include <map> +++ |+#i...
s913096658
p00033
C++
#define _USE_MATH_DEFINES #include <iostream> #include <sstream> #include <cmath> #include <algorithm> #include <queue> #include <stack> #include <limits> #include <map> #include <string> typedef long long ll; using namespace std; typedef pair<int,int> P; void seek_lcs(int a,int b,int dp[10+1][10+1],int* num,int* ba...
a.cc: In function 'int main()': a.cc:47:17: error: 'memset' was not declared in this scope 47 | memset(dp,0,sizeof(dp)); | ^~~~~~ a.cc:10:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 9 | #include <map> +++ |+#i...
s829580582
p00033
C++
#include<iostream> #include<cstdio> #include<string> #include<vector> using namespace std; bool saiki(int ball[],int ttB,int ttC,int res){ if(res==10)return true; if(ball[res]>ttB){ return saiki(ball,ball[res],ttC,res+1); } if(ball[res]>ttC){ return saiki(ball,ttB,ball[res],res+1); } return false; } int ma...
a.cc: In function 'int main()': a.cc:27:17: error: 'memset' was not declared in this scope 27 | memset(ball,0,sizeof(ball)); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include<vector> +++...
s253873713
p00033
C++
#include <iostream> using namespace std; #define MAX_N 10 int N; int ball[MAX_N]; int used[MAX_N]; bool dfs(int max_l, int max_r, int next) { if (next == MAX_N) return true; if(ball[next] > max_l) return dfs(ball[next],max_r,next+1); if(ball[next] > max_r) return dfs(max_l,ball[next],nex...
a.cc: In function 'std::string solve()': a.cc:20:4: error: 'memset' was not declared in this scope 20 | memset(used,0,sizeof(used)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ |+#include <cs...
s554677710
p00033
C++
#include <iostream> using namespace std; int Balls[10]; bool dfs(int i, int R, int L) { if(i == 10) return true; if(dfs(i+1, Balls[i], L) && Balls[i] > R) return true; if(dfs(i+1, R, Balls[i]) && Balls[i] > L) return true; return false; } void main() { int n; cin >> n; for(int i=0; i<n; i++){ for(int j=...
a.cc:17:1: error: '::main' must return 'int' 17 | void main() | ^~~~
s489211136
p00033
C++
#include <iostream> using namespace std; int Balls[10]; bool dfs(int i, int R, int L) { if(i == 10) return true; if(dfs(i+1, Balls[i], L) && Balls[i] > R) return true; if(dfs(i+1, R, Balls[i]) && Balls[i] > L) return true; return false; } void main() { int n; cin >> n; for(int i=0; i<n; i++){ for(int j=...
a.cc:17:1: error: '::main' must return 'int' 17 | void main() | ^~~~
s330567875
p00033
C++
#include <iostream> using namespace std; int main(){ int a; int b; int n; int c; int d; int e; int f; c=0; while(c<n){ f=0; a=0; b=0; d=0; while(d<10){ cin >>e; if(e>a&&a>b){a=e;} else if(e>b&&b>a){b=e;} else if(e>a){a=e;} else if(e>b){b=e;} else{f=1; break;} d=d+1;} if(f==0){cout <<"YES"<<endl;} if(f==1){cout <<"NO"<<...
a.cc: In function 'int main()': a.cc:27:8: error: expected '}' at end of input 27 | c=c+1;} | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s799668234
p00033
C++
using System; using System.Collections.Generic; class _0033 { public static void Main() { int n = int.Parse(Console.ReadLine()); for (int i = 0; i < n; i++) { string[] data = Console.ReadLine().Split(); Console.WriteLine(Judge(data) ? "YES" : "NO"); } ...
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:2:7: error: expected nested-name-specifier before 'System' 2 | using System.Collections.Generic; | ^~~~~~ a.cc:5:11: error: expected ':' before 'static' 5 | public static void Main() ...
s450452069
p00033
C++
using System; class _0033 { public static void Main() { int n = int.Parse(Console.ReadLine()); for (int i = 0; i < n; i++) { string[] data = Console.ReadLine().Split(); Console.WriteLine(Judge(data) ? "YES" : "NO"); } } public static bool Judge(str...
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:4:11: error: expected ':' before 'static' 4 | public static void Main() | ^~~~~~~ | : a.cc:13:11: error: expected ':' before 'static' 13 | public static bool Jud...
s844364279
p00033
C++
#include<iostream> #include<vector> int main(){ int x; std::cin>>x; for(int i=0;i<x;++i){ std::vector<int> vec(10); for(int l=0;l<10;++l){ std::cin>>vec[l]; } std::vector<std::vector<int> > vec2(2); vec2[0].push_back(vec[0]); for(int l=1;l<vec.siz...
a.cc: In function 'int main()': a.cc:25:42: error: expected ';' before '}' token 25 | vec2[0].push_back | ^ | ; 26 | } | ~ a.cc:2...
s560560334
p00033
C++
#include <iostream> #include <cstdio> using namespace std; int nums[10]; bool check_recursion(int i; int left; int right){ if(i == 10) return true if(nums[i] > left) check_recursion(i+1; nums[i], right); if(nums[i] > right) check_recursion(i+1; left, nums[i]); return false; } int main(){ int n; bool ans; c...
a.cc:8:27: error: expected ')' before ';' token 8 | bool check_recursion(int i; int left; int right){ | ~ ^ | ) a.cc:8:48: error: expected initializer before ')' token 8 | bool check_recursion(int i; int left; int right){ | ...
s922441887
p00033
C++
#include <stdio.h> int main(){ int n,i,j; int a,b,c; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d",&a); b=0; f=0; for(j=1;j<10;j++){ scanf("%d",&c); if(a>c&&b>c)f=1; else if(a<c&&b<c){ if(a>b)a=c; else b=c; } else{ if(a>b)b=c; else a=c; } } if(f==0){ printf("YES\n"); } else if(f==1){ printf("NO\n"); } } return 0; }
a.cc: In function 'int main()': a.cc:11:1: error: 'f' was not declared in this scope 11 | f=0; | ^
s961549861
p00033
C++
#include<iostream> using namespace std; int arr[10],used[10]; void DFS(int pre,int cur) { if(cur<10&&arr[pre]<arr[cur]) { used[cur]=1; DFS(cur,cur+1); } else if(cur<10&&arr[pre]>=arr[cur]) DFS(pre,cur+1); } int main() { int T,pre; bool judge; cin>>T; while(T--) { for(int i=0;...
a.cc: In function 'int main()': a.cc:25:18: error: 'memset' was not declared in this scope 25 | memset(used,0,sizeof(used)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> ...
s989262021
p00033
C++
#include<iostream> using namespace std; int arr[10],used[10]; void DFS(int pre,int cur) { if(cur<10&&arr[pre]<arr[cur]) { used[cur]=1; DFS(cur,cur+1); } else if(cur<10&&arr[pre]>=arr[cur]) DFS(pre,cur+1); } int main() { int T,pre; bool judge; cin>>T; while(T--) { for(int i=0;...
a.cc: In function 'int main()': a.cc:25:18: error: 'memset' was not declared in this scope 25 | memset(used,0,sizeof(used)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> ...
s229223632
p00033
C++
#include <iostream> using namespace std; int ball_list[10]; int right_list[10]; int left_list[10]; bool flag; void dfs(int right, int left){ int count = right + left; if(count == 10){ flag = true; }else{ if(right == 0 || right_list[right-1] < ball_list[count]){ if(right == 0){ right_lis...
a.cc: In function 'int main()': a.cc:43:5: error: 'memset' was not declared in this scope 43 | memset(right_list, 0, sizeof(right_list)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ |+#incl...
s160791329
p00033
C++
#include<iostream> using namespace std; int main(){ int t; cin >> t; int n[10]; for(int i=0;i<t;i++){ int h = 0,b = 0,c = 0; for(int j=0;j<10;j++) cin >> n[i]; for(int j=0;j<10;j++){ cin >> n[i]; if(b==0) b = n[i]; else if(b>c&&b<n) b = n[i]; else if(c>b&&c<n) c = n[i]; ...
a.cc: In function 'int main()': a.cc:13:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 13 | else if(b>c&&b<n) b = n[i]; | ~^~ a.cc:14:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 14 | else if(c>b&&c<n) c = n...
s049279747
p00033
C++
#include<iostream> using namespace std; int main(){ int t; cin >> t; int n[10]; for(int i=0;i<t;i++){ int h = 0,b = 0,c = 0; for(int j=0;j<10;j++) cin >> n[i]; for(int j=0;j<10;j++){ cin >> n[i]; if(b==0) b = n[i]; else if(b>c&&b<n) b = n[i]; else if(c>b&&c<n) c = n[i]; ...
a.cc: In function 'int main()': a.cc:13:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 13 | else if(b>c&&b<n) b = n[i]; | ~^~ a.cc:14:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 14 | else if(c>b&&c<n) c = n...
s905452313
p00033
C++
#include<iostream> using namespace std; int main(){ int t; cin >> t; int n[10]; for(int i=0;i<t;i++){ int h = 0,b = 0,c = 0; for(int j=0;j<10;j++) cin >> n[i]; for(int j=0;j<10;j++){ if(b==0) b = n[i]; else if(b>c&&b<n) b = n[i]; else if(c>b&&c<n) c = n[i]; else if(b>c&&b>n&...
a.cc: In function 'int main()': a.cc:12:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 12 | else if(b>c&&b<n) b = n[i]; | ~^~ a.cc:13:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 13 | else if(c>b&&c<n) c = n...
s290924062
p00033
C++
//0033 //include------------------------------------- #include<iostream> #include<string> #include<algorithm> #include<vector> #include<cmath> #include<map> #include<stack> using namespace std; //typedef-------------------------------------- typedef vector<int> VI; typedef vector<string> VS; typedef pair<int, int> PI...
a.cc: In function 'int main()': a.cc:60:10: error: expected '}' at end of input 60 | } | ^ a.cc:33:11: note: to match this '{' 33 | int main(){ | ^
s870834859
p00033
C++
int main (){ int N,a[20]={0},b[20]={0},t; int ac=0,bc=0; cin>>N; for(int j=0;j<N;j++){ for(int i=0;i<10;i++){ cin>>t; if(a[ac]<t){ a[ac+1]=t; ac++; } else if(b[bc]<t){ b[bc+1]...
a.cc: In function 'int main()': a.cc:4:8: error: 'cin' was not declared in this scope 4 | cin>>N; | ^~~ a.cc:19:18: error: 'cout' was not declared in this scope 19 | cout<<"YES"<<endl; | ^~~~ a.cc:19:31: error: 'endl' was not declared in this scope 1...
s870507097
p00033
C++
#include <iostream> #define CAPACITY 9 using namespace std; int b, c; bool dfs(int pos, int ary[], bool flag) { cout << "B = " << b << "C = " << c << endl; if(pos < 0) { return(false); } flag = dfs(pos - 1, ary, flag); if(ary[pos] > b) { b = ary[pos]; } else if(ary[pos] > ...
a.cc: In function 'int main()': a.cc:40:13: error: 'INT_MIN' was not declared in this scope 40 | c = INT_MIN; | ^~~~~~~ a.cc:2:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 1 | #include <iostream> +++ |+#include <climits> ...
s691915705
p00033
C++
#include <iostream> #define CAPACITY 9 using namespace std; int b, c; bool dfs(int pos, int ary[], bool flag) { if(pos < 0) { return(false); } flag = dfs(pos - 1, ary, flag); if(pos == CAPACITY) { flag = true; } if(ary[pos] > b) { b = ary[pos]; } else if(ar...
a.cc: In function 'int main()': a.cc:39:13: error: 'INT_MIN' was not declared in this scope 39 | c = INT_MIN; | ^~~~~~~ a.cc:2:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 1 | #include <iostream> +++ |+#include <climits> ...
s843741580
p00033
C++
#include <iostream> bool judge(int num){ int i, n, q[2]={0,0}; for (i=0; i<num; i++) { cin >> n; if (q[0]<n) q[0] = n; else if (q[1]<n) q[1] = n; else break; } if (i==num) return true; else return false; } int main(){ int lines; cin >> lines; for (i=0; i<lines; i++) { if (judge(10)) ...
a.cc: In function 'bool judge(int)': a.cc:7:17: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 7 | cin >> n; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | ...
s904166226
p00033
C++
#include <iostream> using namespace std; bool judge(int num){ int i, n, q[2]={0,0}; for (i=0; i<num; i++) { cin >> n; if (q[0]<n) q[0] = n; else if (q[1]<n) q[1] = n; else break; } if (i==num) return true; else return false; } int main(){ int lines; cin >> lines; for (i=0; i<lines; i+...
a.cc: In function 'int main()': a.cc:28:14: error: 'i' was not declared in this scope 28 | for (i=0; i<lines; i++) { | ^
s185388862
p00033
C++
#include <iostream> using namespace std; bool judge(int num){ int i, n, q[2]={0,0}; for (i=0; i<num; i++) { cin >> n; if (q[0]<n) q[0] = n; else if (q[1]<n) q[1] = n; else break; } return ((i==num)? true: false); } int main(){ int i, n; cin >> n; for (i=0; i<n; i++) cout << (jedge(10)? "...
a.cc: In function 'int main()': a.cc:26:26: error: 'jedge' was not declared in this scope; did you mean 'judge'? 26 | cout << (jedge(10)? "YES": "NO") << endl; | ^~~~~ | judge
s569393122
p00033
C++
#include <iostream> using namespace std; int main(void) { int N, a, b, c; cin >> N; for (; N--; ) { b = c = 0; bool ok = true; for (int i = 0; i < 10; i++) { cin >> a; if (a > b) { b = a; } else if (a > c) { c = a;...
a.cc: In function 'int main()': a.cc:23:26: error: expected ';' before 'endl' 23 | else cout << "NO" endl; | ^~~~~ | ;
s555616244
p00034
Java
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Programminng { class AOJ_Volume0034 { public static void Main(string[] args) { while (true) { string s = Console.ReadLine(); if (string.IsNullO...
Main.java:1: error: unnamed classes are a preview feature and are disabled by default. using System; ^ (use --enable-preview to enable unnamed classes) Main.java:2: error: class, interface, enum, or record expected using System.Collections.Generic; ^ Main.java:3: error: class, interface, enum, or record expected usin...
s443491669
p00034
Java
import java.io.*; class Main{ public static void main(String[] args) throws IOException{ BufferedReader br=new BufferedReader(new InpurtStreamReader(System.in)); String line; int[] l=new int[11]; l[0]=0; while((line=br.readLine())!=null){ String[] value=line.split(","); for(int i=0;i<10;i++){ l[i+1]=l[i]+Integer.parse...
Main.java:5: error: cannot find symbol BufferedReader br=new BufferedReader(new InpurtStreamReader(System.in)); ^ symbol: class InpurtStreamReader location: class Main Main.java:14: error: cannot find symbol v1=Ineger.parseInt(value[10]); ^ symbol: variable v1 locati...
s768002122
p00034
Java
import java.io.*; class Main{ public static void main(String[] args) throws IOException{ BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); String line; int[] l=new int[11]; l[0]=0; while((line=br.readLine())!=null){ String[] value=line.split(","); for(int i=0;i<10;i++){ l[i+1]=l[i]+Integer.parseI...
Main.java:14: error: cannot find symbol int v1=Ineger.parseInt(value[10]); ^ symbol: variable Ineger location: class Main 1 error
s755325665
p00034
Java
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); double v1, v2; int d; double t; String[] s; int[] a; int sum; while(scan.hasNext()){ s = scan.next().split(","); a = new int[11]; sum = 0; for(int i = 0; i < 10...
Main.java:38: error: reached end of file while parsing } ^ 1 error
s648054543
p00034
Java
import java.util.*; public class Main{ private static final Scanner scan = new Scanner(System.in) .useDelimiter("[,\\s]+"); public static void main(String[] args){ int[] l = new int[10]; int sum1 = 0, sum2 = 0; double time = 0, tX = 0; while(scan.hasNext()){ for(int i = 0; i < 10; i++){ l[i] =...
Main.java:21: error: cannot find symbol tx =(double) v1 * time; ^ symbol: variable tx location: class Main Main.java:24: error: cannot find symbol if(tx <= sum2){ ^ symbol: variable tx location: class Main 2 errors
s551980272
p00034
Java
import java.util.*; public class Main{ private static final Scanner scan = new Scanner(System.in) .useDelimiter("[,\\s]+"); public static void main(String[] args){ int[] l = new int[10]; int sum1 = 0, sum2 = 0; double time = 0, tX = 0; while(scan.hasNext()){ for(int i = 0; i < 10; i++){ l[i] =...
Main.java:20: error: ';' expected time =(double) sum1 / (double)(v2 + v1)); ^ 1 error
s822430446
p00034
C
#include<iostream> #define loop(i,a,b) for(int i = a; i < b; i++) #define rep(i,a) loop(i,0,a) using namespace std; int main(void){ int l[10]; int v[2]; char tmp; double x; while(cin>>l[0]){ cin>>tmp; loop(i,1,10)cin>>l[i]>>tmp; cin>>v[0]>>tmp>>v[1]; int sum = 0; rep(i,10)sum+=l[i]; x = sum * v...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s500740021
p00034
C
#include<stdio.h> int main(void) { int kukan[10], a1, a2, sum, i, sure, surea; while(1){ scanf( "%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,", &kukan[0], &kukan[1], &kukan[2], &kukan[3], &kukan[4], &kukan[5], &kukan[6], &kukan[7], &kukan[8], &kukan[9], &a1, &a2 ); sum = 0...
main.c: In function 'main': main.c:25:9: error: expected declaration or statement at end of input 25 | } | ^
s390437074
p00034
C
#include<stdio.h> int main(void) { int kukan[10], a1, a2, sum, i, sure, surea, kai; for( kai = 0; kai < 3; kai++){ scanf( "%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,", &kukan[0], &kukan[1], &kukan[2], &kukan[3], &kukan[4], &kukan[5], &kukan[6], &kukan[7], &kukan[8], &kukan...
main.c: In function 'main': main.c:25:9: error: expected declaration or statement at end of input 25 | } | ^
s058856497
p00034
C
#include<stdio.h> int main(void) { int kukan[10], a1, a2, sum, i, sure, surea, kai; while(1){ scanf( "%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,", &kukan[0], &kukan[1], &kukan[2], &kukan[3], &kukan[4], &kukan[5], &kukan[6], &kukan[7], &kukan[8], &kukan[9], &a1, &a2 ); su...
main.c: In function 'main': main.c:27:9: error: expected declaration or statement at end of input 27 | return 0; | ^~~~~~
s814361946
p00034
C
#include <stdio.h> int main() { double L[10]; double V1, V2; double meet_pos; double railway_lenth; double cnt1, cnt2; int output[50]; cnt2 = 0; while(1) { if(scanf("%lf,", &L[0]) == EOF) { break; } for(cnt1 = 1; cnt1 < 10; cnt1++) { scanf("%lf,", &L[cn...
main.c: In function 'main': main.c:21:41: error: array subscript is not an integer 21 | scanf("%lf,", &L[cnt1]); | ^ main.c:28:43: error: array subscript is not an integer 28 | railway_lenth += L[cnt1]; | ...
s412177459
p00034
C
#include <stdio.h> int main() { double L[10]; double V1, V2; double meet_pos; double railway_lenth; int cnt1, cnt2; int output[50]; cnt2 = 0; while(1) { if(scanf("%lf,", &L[0]) == EOF) { break; } for(cnt1 = 1; cnt1 < 10; cnt1++) { scanf("%lf,", &L[cnt1]...
main.c: In function 'main': main.c:30:50: error: expected ';' before 'cnt1' 30 | meet_pos = railway_lenth * V1 / (V1 + V2) | ^ | ; 31 | 32 | cnt1 = 0; | ~~~~ ...