submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s704347588
p00032
C++
#include<cstdio> using namespace std; int main(){ int a,b,c,x=0,y=0; While(scanf("%d,%d,%d",&a,&b,&c)!=EOF){ If(a==b)x++; if(a*a+b*b==c*c)y++; } printf("%d?\n%d?\n",y,x); return 0; }
a.cc: In function 'int main()': a.cc:6:1: error: 'While' was not declared in this scope 6 | While(scanf("%d,%d,%d",&a,&b,&c)!=EOF){ | ^~~~~
s536664595
p00032
C++
#include<cstdio> using namespace std; int main(){ int a,b,c,x=0,y=0; While(scanf("%d,%d,%d",&a,&b,&c)!=EOF){ if(a==b)x++; if(a*a+b*b==c*c)y++; } printf("%d?\n%d?\n",y,x); return 0; }
a.cc: In function 'int main()': a.cc:6:1: error: 'While' was not declared in this scope 6 | While(scanf("%d,%d,%d",&a,&b,&c)!=EOF){ | ^~~~~
s515261853
p00032
C++
#include <cstdio> using namespace std; #define scanf scanf_s #define printf printf_s int a, b, c, r = 0, d = 0; int main(){ while (scanf("%d,%d,%d", &a, &b, &c) != EOF) { if (a*a + b*b == c*c) { r++; } if (a == b) { d++; } } printf("%d\n%d\n", r, d); return 0; }
a.cc: In function 'int main()': a.cc:4:15: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 4 | #define scanf scanf_s | ^~~~~~~ a.cc:10:16: note: in expansion of macro 'scanf' 10 | while (scanf("%d,%d,%d", &a, &b, &c) != EOF) { | ^~~~~ a.cc:5...
s189630604
p00032
C++
#include<iostream> #include<stdio.h> using namespace std; int main() { int sides[3]; int square=0,para=0; while (scanf("%d,%d,%d", &sides[0], &sides[1], &sides[2]) != EOF) { //??£?????¢???check if (sides[0] * sides[0] + sides[1] * sides[1] == sides[2] * sides[2]) { square++; para++; } //??????????????¢???...
a.cc: In function 'int main()': a.cc:17:10: error: expected '}' at end of input 17 | } | ^ a.cc:5:12: note: to match this '{' 5 | int main() { | ^
s927820418
p00032
C++
import sys x,y=0,0 for line in sys.stdin: a,b,c = map(int,line[:-1].split(',')) if a*a + b*b == c*c: x += 1 if a == b: y += 1 print("{}\n{}".format(x,y))
a.cc:1:1: error: 'import' does not name a type 1 | import sys | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
s784243840
p00032
C++
#include<iostream> int main() { int cnt[2] = { 0,0 }; while (true) { int a, b, c; char foo; std::cin >> a >> foo >> b >> foo >> c; if (std::cin.eof()) { break; } if (c == hypot(a, b)) { cnt[0]++; } else if (a == b) { cnt[1]++; } } std::cout << cnt[0] << std::endl; std::cout << cnt...
a.cc: In function 'int main()': a.cc:14:26: error: 'hypot' was not declared in this scope 14 | if (c == hypot(a, b)) | ^~~~~
s795691267
p00032
C++
#include <cstdio> using namespace std; int main() { int x, y, r, hisi = 0, tyou = 0; while (scanf("%d %d %d ", &x, &y, &r) == 3) { if (x == y) {hisi++;} if (x * x + y * y = r * r) {tyou++;} } printf("%d\n%d\n", hisi, tyou); }
a.cc: In function 'int main()': a.cc:10:15: error: lvalue required as left operand of assignment 10 | if (x * x + y * y = r * r) {tyou++;} | ~~~~~~^~~~~~~
s964630500
p00032
C++
#include <cstdio> using namespace std; int main() { int x, y, r, hisi = 0, tyou = 0; while (scanf("%d,%d,%d ", &x, &y, &r) == 3) { if (x == y) {hisi++;} if (x * x + y * y = r * r) {tyou++;} } printf("%d\n%d\n", hisi, tyou); }
a.cc: In function 'int main()': a.cc:10:15: error: lvalue required as left operand of assignment 10 | if (x * x + y * y = r * r) {tyou++;} | ~~~~~~^~~~~~~
s573238066
p00032
C++
#include <iostream> #include <cstdio> #include <vector> #include <algorithm> #include <string> #include <set> using namespace std; int main() { int t=0, h=0; set<vector<int> > T, H; int a, b, c; string buf; while(cin>>buf){ if(buf=="0") break; sscanf(buf.c_str(),"%d,%d,%d", &a, &b, &c); vector<int> all; a...
a.cc: In function 'int main()': a.cc:23:68: error: expected ';' before 'if' 23 | if(all[0]==all[1] || all[1]==all[2]); H.insert(all) | ^ | ; 24 | ...
s794654017
p00032
C++
#include <iostream> #include <cstdio> using namespace std; int main(void) { int a,b; int t; int countt; int counth; char input[100]; while(1) { gets(input); a = input[0] - '0'; b = input[2] - '0'; t = input[4] - '0'; if(a*a+b*b == t*t)//直角を持つ { if(a == b) ++countt; else ++counth; ...
a.cc: In function 'int main()': a.cc:17:17: error: 'gets' was not declared in this scope; did you mean 'getw'? 17 | gets(input); | ^~~~ | getw
s101365285
p00032
C++
#include <cstdio> using namespace std; int main() { int a,b,c,tc,rc; tc = rc = 0; while(scanf("%d,%d,%d",&a,&b,&c) == 3) { if(a == b) ++ rc; else if(a * a + b * b == c * c) ++tc; } cout << tc << endl << rc << endl; }
a.cc: In function 'int main()': a.cc:13:9: error: 'cout' was not declared in this scope 13 | cout << tc << endl << rc << endl; | ^~~~ a.cc:2:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 1 | #include <cstdio> +++ |+#includ...
s660076783
p00032
C++
#include <iostream> using namespace std; int main() { int a = 0, b = 0; int x,y,z; char a, b; while(cin >> x >> a >> y >> b >> t) { if(((x * x) + (y * y)) == z* z) a++; if(x == y) h++; }j cout << a << endl; cout << b << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:10: error: conflicting declaration 'char a' 8 | char a, b; | ^ a.cc:6:9: note: previous declaration as 'int a' 6 | int a = 0, b = 0; | ^ a.cc:8:13: error: conflicting declaration 'char b' 8 | char a, b; | ^ a.c...
s027316022
p00032
C++
#include <iostream> using namespace std; int main() { int a = 0, b = 0; int x,y,z; char a, b; while(cin >> x >> a >> y >> b >> z) { if(((x * x) + (y * y)) == z* z) a++; if(x == y) b++; }j cout << a << endl; cout << b << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:10: error: conflicting declaration 'char a' 8 | char a, b; | ^ a.cc:6:9: note: previous declaration as 'int a' 6 | int a = 0, b = 0; | ^ a.cc:8:13: error: conflicting declaration 'char b' 8 | char a, b; | ^ a.c...
s848514545
p00032
C++
3,4,5 5,5,8 4,4,4 5,4,3
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 3,4,5 | ^
s169119199
p00033
Java
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int n=sc.nextInt(); int k=new int[n][10]; for(int i=0;i<n;i++){ for(int j=0;j<10;j++){ k[i][j]=sc.nextInt(); } } for(int g=0;g<n;g++){ if(dfs(g,0,0,0,k)==true){System.out.println("YES");} else{System.out.println(...
Main.java:7: error: incompatible types: int[][] cannot be converted to int int k=new int[n][10]; ^ Main.java:10: error: array required, but int found k[i][j]=sc.nextInt(); ^ Main.java:14: error: incompatible types: int cannot be converted to int[][] if(dfs(g,0,0,0,k)==true){System.out.println("YES");} ...
s223445433
p00033
Java
import java.util.*; ?? public class Main { ?? ????????public static void main(String[] args) { ????????????????Scanner sc = new Scanner(System.in); ????????????????int n = sc.nextInt(); ????????????????for(int i=0; i<n; i++){ ????????????????????????int b = 0; ????????????????????????int c = 0; ????????????????????????...
Main.java:2: error: class, interface, enum, or record expected ?? ^ Main.java:4: error: illegal start of type ?? ^ Main.java:6: error: illegal start of expression ????????????????Scanner sc = new Scanner(System.in); ^ Main.java:6: error: illegal start of expression ????????????????Scanner sc = new Scanner(System.in); ...
s328017398
p00033
Java
import java.util.Scanner; /** * Created by sotetsuk on 2015/07/31. */ public class AOMain { static final int K = 10; static int N; static int[] balls = new int[10]; static Scanner sc = new Scanner(System.in); static int l, r; public static void read() { for(int i = 0; i < K; i++) { ...
Main.java:6: error: class AOMain is public, should be declared in a file named AOMain.java public class AOMain { ^ 1 error
s444085672
p00033
Java
import java.util.*; class Main{ int N; int[] m=new int [10]; int l=0; int r=0; String ans="YES"; Main(){ Scanner sc=new Scanner(System.in); N=sc.nextInt(); for(int i=0; i<N; i++){ for(int j=0; j<10; j++){ m[j] =sc.nextInt(); if(l m[j] public static void main(String[]...
Main.java:14: error: ')' expected if(l m[j] ^ Main.java:14: error: not a statement if(l m[j] ^ Main.java:14: error: ';' expected if(l m[j] ^ Main.java:22: error: illegal start of expression public static void main(String[] args){ ^ 4 errors
s753256082
p00033
Java
import java.util.*; class main{ Scanner sc=new Scanner(System.in); void aa(){ int n=sc.nextInt(); for(int i=0;i<n;i++){ String YN="YES"; int r=sc.nextInt(); int l=0; for(int j=0;j<9;j++){ int ball=sc.nextInt(); if(ball>r)r=ball; else if(ball>l)l=ball; else YN="NO"; } System.out.p...
Main.java:2: error: duplicate class: main class main{ ^ Main.java:20: error: cannot access Main new Main().aa(); ^ bad source file: ./Main.java file does not contain class Main Please remove or make sure it appears in the correct subdirectory of the sourcepath. 2 errors
s983260236
p00033
Java
import java.util.*; import java.io.*; public class Ball{ static int a = 0; //??????????????¢??° static int b = 0; static int n; static int[][] input; public static void main(String[] args)throws IOException{ Scanner sc = new Scanner(System.in); BufferedReader in = new BufferedReader(new InputStreamReader(System...
Main.java:4: error: class Ball is public, should be declared in a file named Ball.java public class Ball{ ^ 1 error
s786389746
p00033
Java
import java.util.Scanner; public class aoj0033 { public static int[] b; public static int[] f; public static int[] s; public static boolean ok; public static void main(String[] args) { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); while(n--!=0){ b = new int[10]; for(int i=0;i<10...
Main.java:3: error: class aoj0033 is public, should be declared in a file named aoj0033.java public class aoj0033 { ^ 1 error
s803829158
p00033
Java
package aoj0033; import java.util.Scanner; public class Main { void run() { return; // ??\??? int n, x; Scanner scan = new Scanner(System.in); n = scan.nextInt(); int[] ans = new int[n]; for( int i = 0; i < n; i++ ) { // ??± int box1 = 0, box2 = 0; // ?????? for( int j = 0; j < 10; j++ ) { ...
Main.java:9: error: unreachable statement int n, x; ^ 1 error
s547819891
p00033
Java
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]; ...
Main.java:3: error: cannot find symbol Scanner scan = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:3: error: cannot find symbol Scanner scan = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s648727175
p00033
Java
import java.util.Scanner; /** * Created by The Illsionist on 2018/1/6. */ public class AOJ0033 { public static void main(String args[]){ Scanner input = new Scanner(System.in); int N = input.nextInt(); int[] array = new int[10]; int preB = -1,preC = -1; while(N-- > 0){ ...
Main.java:6: error: class AOJ0033 is public, should be declared in a file named AOJ0033.java public class AOJ0033 { ^ 1 error
s082383825
p00033
Java
import java.util.*;class Main{public static void main(String[]_){Integer i,n,f=0,a[]=new Integer[10];Scanner S=new Scanner(System.in);for(n=S.nextInt();n-->0;System.out.println(f>0?"NO":"YES")){for(i=0;i<10;)a[i++]=S.nextInt();for(f=i=0;i<8;)f+=a[i]<a[i+++2]?0:1;}}}
Main.java:1: error: as of release 9, '_' is a keyword, and may not be used as an identifier import java.util.*;class Main{public static void main(String[]_){Integer i,n,f=0,a[]=new Integer[10];Scanner S=new Scanner(System.in);for(n=S.nextInt();n-->0;System.out.println(f>0?"NO":"YES")){for(i=0;i<10;)a[i++]=S.nextInt();f...
s288732189
p00033
Java
import java.util.Scanner; public class Main2 { int[][] arr = new int[10][10]; void run() { Scanner scan = new Scanner(System.in); int n; n = scan.nextInt(); for(int i = 0; i < n; i++) { for(int j = 0; j < 9; j++) { arr[i][j] = scan.nextInt(); } } for(int i = 0; i < n; i++) { int c...
Main.java:3: error: class Main2 is public, should be declared in a file named Main2.java public class Main2 { ^ 1 error
s975211093
p00033
Java
import java.util.Scanner; public class Main2 { int[][] arr = new int[10][10]; void run() { Scanner scan = new Scanner(System.in); int n; n = scan.nextInt(); for(int i = 0; i < n; i++) { for(int j = 0; j < 9; j++) { arr[i][j] = scan.nextInt(); } } for(int i = 0; i < n; i++) { int c...
Main.java:3: error: class Main2 is public, should be declared in a file named Main2.java public class Main2 { ^ 1 error
s643550993
p00033
Java
import java.util.*; public class Main { /** * @param args */ static Scanner sc = new Scanner(System.in); static int[] balls; public static void main(String[] args) { // TODO Auto-generated method stub int n = sc.nextInt(); while(n-- > 0) { // read input Queue<Integer> que = new LinkedList<Integ...
Main.java:35: error: reached end of file while parsing } ^ 1 error
s938468536
p00033
Java
import java.util.ArrayList; import java.util.Scanner; public class Main { private static final int LEFT = 0; private static final int RIGHT = 1; private static final int EndOfDirection = 2; private static ArrayList<Integer> a = new ArrayList<Integer>(10); private static ArrayList<Integer> left = new ArrayList<...
Main.java:35: error: cannot find symbol Ball.a = a; ^ symbol: variable Ball location: class Main 1 error
s696793952
p00033
Java
import java.io.*; import java.util.*; import java.math.*; public class Main { public static void main(String[] args) throws java.io.IOException{ Scanner scan = new Scanner(System.in); int [] ball =new int [10]; int n=scan.nextInt(); while(n--){ for(int i=0;i<...
Main.java:10: error: incompatible types: int cannot be converted to boolean while(n--){ ^ 1 error
s867649025
p00033
Java
import java.io.*; import java.util.*; import java.math.*; public class Main { public static void main(String[] args) throws java.io.IOException{ Scanner scan = new Scanner(System.in); int [] ball =new int [10]; int n=scan.nextInt(); while(n!=0){ for(int i=0;i...
Main.java:40: error: reached end of file while parsing } ^ 1 error
s594082584
p00033
Java
import java.util.Stack; import java.io.IOException; import java.io.InputStreamReader; import java.io.BufferedReader; public class Ball { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()...
Main.java:6: error: class Ball is public, should be declared in a file named Ball.java public class Ball { ^ 1 error
s833270563
p00033
Java
import java.util.*; public class AOJ0033{ static int ball[]; public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); ball=new int[10]; for(int i=0;i<n;i++){ for(int j=0;j<10;j++)ball[j]=sc.nextInt(); result = false; dfs(0,0,cnt); if(result)System.out.p...
Main.java:2: error: class AOJ0033 is public, should be declared in a file named AOJ0033.java public class AOJ0033{ ^ 1 error
s604287234
p00033
Java
import java.util.Scanner; public class Main1 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); for(int i=0; i<N; i++){ int l=0; int r=0; for(int j=0; j<10; j++){ int num = sc.nextInt(); if(l<num){ l=num; }else if(r<num){ r=num; ...
Main.java:4: error: class Main1 is public, should be declared in a file named Main1.java public class Main1 { ^ 1 error
s039024656
p00033
C
#include<iostream> #include<cstdio> #include<algorithm> #include<cmath> #include<string.h> using namespace std; int main() { int t;scanf("%d",&t); while(t--) { int a[10]; for(int i=0;i<10;i++) scanf("%d",&a[i]); int p=0,q=0,flag=0; for(int i=0;i<10;i++) { ...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s894346109
p00033
C
#include<stdio.h> #include<string.h> int a[100][11]; int b[100][11],c[100][11]; int flag[100][11]; int by = 0,cy = 0; int lb = 0; int lc = 0; void dfs(int y){ // flag[x][y]=1; if(b[by]<a[y]){ b[++by]=a[y]; ++lb; } else if(c[cy]<a[y]){ c[++cy] = a[y]; ++lc; } ++y...
main.c: In function 'dfs': main.c:14:16: error: assignment to expression with array type 14 | b[++by]=a[y]; | ^ main.c:18:17: error: assignment to expression with array type 18 | c[++cy] = a[y]; | ^ main.c:23:9: error: 'x' undeclared (first use in this fu...
s762212215
p00033
C
#include<iostream> #include<queue> using namespace std; int main (){ int n; cin>>n; queue <int > p,q; int a[10]; while(n--){ for (int i=0;i<10;i++){ cin>>a[i]; if(!i) p.push(a[i]); if(a[i]<p.back()) q.push(a[i]); else p.push(a[i]); } int t=q.front(),k=0; q.pop(); while(!q.empty()){ if(t>q....
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s580939674
p00033
C
#include<stdio.h> #include<stack> using namespace std; stack<int> ss; stack<int> s; int main() { int f,t,a,b,i; scanf("%d",&t); while (t--) { f=0; for (i=0;i<10;i++) { scanf("%d",&a); if (i==0) { ss.push(a); } else { b=ss.top(); if (b<a) { ss.push(a); } else ...
main.c:2:9: fatal error: stack: No such file or directory 2 | #include<stack> | ^~~~~~~ compilation terminated.
s532459849
p00033
C
#include<iostream> #include<stdio.h> #include<stack> using namespace std; stack<int> ss; stack<int> s; int main() { int f,t,a,b,i; scanf("%d",&t); while (t--) { f=0; for (i=0;i<10;i++) { scanf("%d",&a); if (i==0) { ss.push(a); } else { b=ss.top(); if (b<a) { ss.push(a); ...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s454182106
p00033
C
#include<cstdio> #include<string.h> int x[15],l[15],r[15]; int kase; void dfs(int i,int j,int k) { if(i>10) { kase=1; return; } if(kase) return; if(x[i]>l[j-1]) { l[j]=x[i]; dfs(i+1,j+1,k); } if(x[i]>r[k-1]) { r[k]=x[i]; dfs(i+1,j,k+1); } } int main() { int t; scanf("%d",&t); while(t--) { ...
main.c:1:9: fatal error: cstdio: No such file or directory 1 | #include<cstdio> | ^~~~~~~~ compilation terminated.
s906175945
p00033
C
#include<stdio.h> #include<stack> using namespace std; stack<int>ss; stack<int>ss2; int main() { int t,n,a; scanf("%d",&t); while (t--) { n=10; int f=0; while(n--) { scanf("%d",&a); if (ss.empty()) { ss.push(a); } else if (ss.top()<a) { ss.push(a); } else if (ss2.empty()) ...
main.c:2:9: fatal error: stack: No such file or directory 2 | #include<stack> | ^~~~~~~ compilation terminated.
s536576454
p00033
C
#include<stdio.h> int ball[10]; int func(int i,int a,int b); int main(){ int n; scanf("%d",&n); for(i=0;i<n;i++){ for(j=0;j<10;j++){ scanf("%d",&ball[j]); } if(func(0,0,0)){ printf("YES\n"); } else{ printf("NO\n"); } } return 0; } int func(int i,int a,int ...
main.c: In function 'main': main.c:8:7: error: 'i' undeclared (first use in this function) 8 | for(i=0;i<n;i++){ | ^ main.c:8:7: note: each undeclared identifier is reported only once for each function it appears in main.c:10:9: error: 'j' undeclared (first use in this function) 10 | for(j=0;j<...
s901845710
p00033
C
import java.util.Scanner; public class Main { private static final int N = 12; int[] a = new int[N]; int small = 0; int big = 0; private int s; //数?的个数 public static void main(String[] args) { Main m = new Main(); m.Sort(); } private void Sort(){ Scanner sc = new Scanner(System.in); s =...
main.c:2:1: error: unknown type name 'import' 2 | import java.util.Scanner; | ^~~~~~ main.c:2:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token 2 | import java.util.Scanner; | ^ main.c:4:1: error: unknown type name 'public' 4 | public class Main { | ^~...
s287249220
p00033
C
int n, i , j, k; int d[10]; int s; scanf( "%d", &n ); for(i = 0; i < n; i++){ for(j = 0; j < 10; j++){ scanf( "%d", &d[j]); s = 0; for(k = 0; k < j; k++){ if(d[k] > d[j]) s++; } if (s >= 2){ p...
main.c:4:12: error: expected declaration specifiers or '...' before string constant 4 | scanf( "%d", &n ); | ^~~~ main.c:4:18: error: expected declaration specifiers or '...' before '&' token 4 | scanf( "%d", &n ); | ^ main.c:5:5: error: expected identifier or '('...
s848150100
p00033
C
#include <stdio.h> int main() { int n; int i, j; int Ball[10]; int left[10], right[10]; int left_num, right_num; int flag; scanf("%d", &n); for (i = 0; i < n; i++) { for (j = 0; j < 10; j++) scanf("%d", &Ball[j]); for (j = 0; j < 10; j++) { left[j] = 0; right[j] = 0; }...
main.c: In function 'main': main.c:40:15: error: expected '(' before '{' token 40 | else if { | ^ | (
s458222821
p00033
C
#include <stdio.h> int l[12],r[12],q[12]; bool yon; void dfs(int i,int j,int k){ if(i == 10){ yon = true; return ; } if(q[i] > l[j-1]){ l[j] = q[i]; dfs(i+1,j+1,k); } if(q[i] > r[k-1]){ r[k] = q[i]; dfs(i+1,j,k+1); } } int main() { int t; scanf("%d",&t); while(t--){ for(int i=1;i<=10;i++){ sca...
main.c:3:1: error: unknown type name 'bool' 3 | bool yon; | ^~~~ main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>' 1 | #include <stdio.h> +++ |+#include <stdbool.h> 2 | int l[12],r[12],q[12]; main.c: In function 'dfs': main.c:6:23:...
s548224185
p00033
C
#include <iostream> #include <cstdio> #include <cstring> #include <algorithm> using namespace std; int a[20]; int b[20],c[20]; int n; bool flag; void dfs(int i,int j,int k) { if(i == 10) { flag = true; return ; } if(flag == true) return ; if(a[i] > c[j - 1]){ /* printf...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s957142347
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; } } ...
main.c: In function 'main': main.c:5:13: error: redeclaration of 'e' with no linkage 5 | int e=1; | ^ main.c:4:29: note: previous declaration of 'e' with type 'int' 4 | int a,b,c[10]={0},d,e,f,g,h,i; | ^
s471337058
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<9;g++) { if (c[g-1]<c[g]||c[g-1]<c[g+1]) { e=0; } else { e=1; } } ...
main.c: In function 'main': main.c:5:13: error: redeclaration of 'e' with no linkage 5 | int e=1; | ^ main.c:4:29: note: previous declaration of 'e' with type 'int' 4 | int a,b,c[10]={0},d,e,f,g,h,i; | ^
s240146649
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; } } ...
main.c: In function 'main': main.c:5:13: error: redeclaration of 'e' with no linkage 5 | int e=1; | ^ main.c:4:29: note: previous declaration of 'e' with type 'int' 4 | int a,b,c[10]={0},d,e,f,g,h,i; | ^
s724003486
p00033
C
#include<stdio.h> int main(void) { int n,ball[10],b[10]={0},c[10]={0},i; scanf("%d",&n); for(n0=0;n0<n;n0++){ int p=0,o=0,j=0; for(i=0;i<10;i++){ scanf("%d",&ball[i]); } b[0]=ball[0]; c[0]=0; for(i=1;i<10;i++){ if(b[p]<ball[i]){ p++; b[p]=ball[i]; } else if(c[o-1]<ball[i]&&o>=1||c[o]<...
main.c: In function 'main': main.c:6:13: error: 'n0' undeclared (first use in this function); did you mean 'n'? 6 | for(n0=0;n0<n;n0++){ | ^~ | n main.c:6:13: note: each undeclared identifier is reported only once for each function it appears in
s648046768
p00033
C
#include <iostream> #include <cstdio> #include <cstring> using namespace std; int main() { int T; while(T--) { int a,b=-1,c=-1; bool X=true; for(int i=0;i<10;i++) { cin>>a; if(X) { i...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s673210500
p00033
C
#include<cstdio> int main() { int k; scanf("%d",&k); while(k>0) { int last1=-100,last2=-100,flag=0; for(int i=1;i<=10;i++) { int x; scanf("%d",&x); if(x>last1) last1=x; else if(x>last2) last2=x; else { printf("NO\n"); flag=1; break; } } if(flag==0) printf("YES\n...
main.c:1:9: fatal error: cstdio: No such file or directory 1 | #include<cstdio> | ^~~~~~~~ compilation terminated.
s504252466
p00033
C
#include<iostream> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; int num[12]; int a[12]; int b[12]; int main() { int n; cin>>n; while(n--) { memset(a,0,sizeof(a)); memset(b,0,sizeof(b)); for(int i=0;i<10;i++) { cin>>num[i]; ...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s806316712
p00033
C
//Radio Station #include <bits/stdc++.h> using namespace std; int n,m; map<string,string> dic; int main(){ #ifdef LOCAL_DEFINE freopen("rush_in.txt", "r", stdin); #endif ios::sync_with_stdio(0),cin.tie(0); cin >> n >> m; for (int i = 1;i <= n;i++){ string name,ip; cin >> n...
main.c:2:10: fatal error: bits/stdc++.h: No such file or directory 2 | #include <bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s519317765
p00033
C
#include <stdio.h> main(){ int a[10],i,n; scanf("%d",&n); for(i=0,i<n,i++){ 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]); if(a[0]<a[2]<a[4]<a[6]<a[8]&&a[1]<a[3]<a[5]<a[7]<a[9]) printf("YES"); else printf("NO"); return 0; }
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int] 2 | main(){ | ^~~~ main.c: In function 'main': main.c:5:18: error: expected ';' before ')' token 5 | for(i=0,i<n,i++){ | ^ | ; main.c:5:18: error: expected expression before ')' token main.c:1...
s291646645
p00033
C
#include <stdio.h> main(){ int a[10],i,n; scanf("%d",&n); for(i=0,i<n,i++){ 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]); if(a[0]<a[2]<a[4]<a[6]<a[8]&&a[1]<a[3]<a[5]<a[7]<a[9]) printf("YES"); else printf("NO"); } return 0; }
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int] 2 | main(){ | ^~~~ main.c: In function 'main': main.c:5:18: error: expected ';' before ')' token 5 | for(i=0,i<n,i++){ | ^ | ; main.c:5:18: error: expected expression before ')' token
s714317934
p00033
C
#include <stdio.h> main(){ int a[10],i,n; scanf("%d",&n); for(i=0,i<n,i++){ 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]); if(a[0]<a[2]<a[4]<a[6]<a[8]&&a[1]<a[3]<a[5]<a[7]<a[9]) printf("YES"); else printf("NO"); } return 0; }
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int] 2 | main(){ | ^~~~ main.c: In function 'main': main.c:5:18: error: expected ';' before ')' token 5 | for(i=0,i<n,i++){ | ^ | ; main.c:5:18: error: expected expression before ')' token
s147499584
p00033
C
main(n,i,t,m,c){scanf("%d",&n);while(n--)for(m=99,i=c=0;i++<10;c+=t<m,m=m>t?t:m)scanf("%d",&t);puts(c<3?"YES":"NO"); }exit(0);}
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main(n,i,t,m,c){scanf("%d",&n);while(n--)for(m=99,i=c=0;i++<10;c+=t<m,m=m>t?t:m)scanf("%d",&t);puts(c<3?"YES":"NO"); | ^~~~ main.c: In function 'main': main.c:1:1: error: type of 'n' defaults to 'int' [-Wimplicit-int] main.c:1:1: error: typ...
s496558612
p00033
C
i,f;main(b){for(gets(&b);~scanf("%d",&b);i-10||(f=i/=puts(f?"NO":"YES")))f|=b-++i>2;}
main.c:1:1: warning: data definition has no type or storage class 1 | i,f;main(b){for(gets(&b);~scanf("%d",&b);i-10||(f=i/=puts(f?"NO":"YES")))f|=b-++i>2;} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'i' [-Wimplicit-int] main.c:1:3: error: type defaults to 'int' in declaration of 'f' [-Wim...
s078241032
p00033
C
#include<stdio.h> int main() { int ball[10]; int i,j,n,larger,flg; scanf("%d",&n); for(i=0;i<n;i++) { scanf("%d %d %d %d %d %d %d %d %d % d",ball,ball+1,ball+2,ball+3,ball+4,ball+5,ball+6,ball+7,ball+8,ball+9); flg=1; larger=0; for(j=0;j<10;j++) { while(ball[j]<larger) { if(ball[j+1]<ball[j]...
main.c: In function 'main': main.c:11:23: warning: missing terminating " character 11 | scanf("%d %d %d %d %d %d %d %d %d % | ^ main.c:11:23: error: missing terminating " character 11 | scanf("%d %d %d %d %d %d %d %d %d % | ^~...
s703719299
p00033
C
#include<stdio.h> int main() { int ball[10]; int i,j,n,larger,flg; scanf("%d",&n); for(i=0;i<n;i++) { scanf("%d %d %d %d %d %d %d %d %d % d",ball,ball+1,ball+2,ball+3,ball+4,ball+5,ball+6,ball+7,ball+8,ball+9); flg=1; larger=0; for(j=0;j<10;j++) { while(ball[j]<larger&&j<8) { if(ball[j+1]!=b...
main.c: In function 'main': main.c:11:23: warning: missing terminating " character 11 | scanf("%d %d %d %d %d %d %d %d %d % | ^ main.c:11:23: error: missing terminating " character 11 | scanf("%d %d %d %d %d %d %d %d %d % | ^~...
s468006719
p00033
C
#include<stdio.h> int main() { int ball[10]; int i,j,n,larger,flg; scanf("%d",&n); for(i=0;i<n;i++) { scanf("%d %d %d %d %d %d %d %d %d % d",ball,ball+1,ball+2,ball+3,ball+4,ball+5,ball+6,ball+7,ball+8,ball+9); flg=1; larger=0; for(j=0;j<10;j++) { while(ball[j]<larger&&j<8) { if(ball[j+1]!=ba...
main.c: In function 'main': main.c:11:23: warning: missing terminating " character 11 | scanf("%d %d %d %d %d %d %d %d %d % | ^ main.c:11:23: error: missing terminating " character 11 | scanf("%d %d %d %d %d %d %d %d %d % | ^~...
s925718450
p00033
C
a,b,c,t;main(i){for(;~scanf("%d",&c);--i?c>a?a:c>b?b:t=c,i%10||(a=b=t=!puts(t?"NO":"YES")):0);}
main.c:1:1: warning: data definition has no type or storage class 1 | a,b,c,t;main(i){for(;~scanf("%d",&c);--i?c>a?a:c>b?b:t=c,i%10||(a=b=t=!puts(t?"NO":"YES")):0);} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int] main.c:1:3: error: type defaults to 'int' in declaration of...
s546972748
p00033
C
a,b,c,t;main(i){for(;~scanf("%d",&c);*(c>a?&a:c>b?&b:&t)=c,!i|i%10||(a=b=t=!puts(t?"NO":"YES")):0);}
main.c:1:1: warning: data definition has no type or storage class 1 | a,b,c,t;main(i){for(;~scanf("%d",&c);*(c>a?&a:c>b?&b:&t)=c,!i|i%10||(a=b=t=!puts(t?"NO":"YES")):0);} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int] main.c:1:3: error: type defaults to 'int' in declarati...
s231692178
p00033
C
#include <stdio.h> #define BALLS 10 /* d=0(ツ債カ) =1(ツ右) */ int bin[2][BALLS], p[2]; void push(int d, int n){ bin[d][p[d]++]=n; show(); } int peek(int d){ if(p[d]==0) return 0; else return bin[d][p[d]-1]; } int main(void){ int n, ball, t, i; scanf("%d",&n); for(; n>0; n--){ for(i=0; i<BALLS; i++){ scanf("...
main.c: In function 'push': main.c:8:44: error: implicit declaration of function 'show' [-Wimplicit-function-declaration] 8 | void push(int d, int n){ bin[d][p[d]++]=n; show(); } | ^~~~
s193183445
p00033
C
#include <stdio.h> #define BALLS 10 /* d=0(ツ債カ) =1(ツ右) */ int bin[2][BALLS], p[2]; void push(int d, int n){ bin[d][p[d]++]=n; show(); } int peek(int d){ if(p[d]==0) return 0; else return bin[d][p[d]-1]; } int main(void){ int n, ball, t, i; scanf("%d",&n); for(; n>0; n--){ for(i=0; i<BALLS; i++){ scanf("...
main.c: In function 'push': main.c:8:44: error: implicit declaration of function 'show' [-Wimplicit-function-declaration] 8 | void push(int d, int n){ bin[d][p[d]++]=n; show(); } | ^~~~
s884917118
p00033
C
#include <stdio.h> #define BALLS 10 /* d=0(ツ債カ) =1(ツ右) */ int main(void){ int n, ball, top[2]={0,0}, i; scanf("%d",&n); for(; n>0; n--){ for(i=0; i<BALLS; i++){ scanf("%d",&ball); if(top[0]>ball && top[1]>ball) break; t=(top[0]>top[1])?0:1; if(top[t]<ball) top[t]=ball; else top[!t]=ball; ...
main.c: In function 'main': main.c:17:25: error: 't' undeclared (first use in this function) 17 | t=(top[0]>top[1])?0:1; | ^ main.c:17:25: note: each undeclared identifier is reported only once for each function it appears in
s502037466
p00033
C
#include <stdio.h> int main(void){ int n, b[10], top[2]={0,0}, i, t, ok; scanf("%d",&n); for(; n>0; n--){ scanf("%d %d %d %d %d %d %d %d %d %d",&b[0],&b[1],&b[2],&b[3],&b[4],&b[5],&b[6],&b[7],&b[8],&b[9]); for(i=0; i<10; i++){ if(top[0]>ball[i] && top[1]>ball[i]) break; t=(top[0]>top[1])?0:1; if...
main.c: In function 'main': main.c:11:35: error: 'ball' undeclared (first use in this function) 11 | if(top[0]>ball[i] && top[1]>ball[i]) break; | ^~~~ main.c:11:35: note: each undeclared identifier is reported only once for each function it appears in
s015803307
p00033
C
#include<stdio.h> int main(void) { int ball[10]; int i,j; int B,C; int n,flag; scanf("%d",&n); for(i=0;i<n;i++) { flag=1; for(j=0;j<10;j++) { scanf("%d",&ball[j]); } B=C=0; for(j=0;j<10;j++) { if(B<ball[j]) B=ball[j]; else if(C<ball[j]) C=ball[j]; else { flag=0; break; } } if(flag==1) printf("YES\n"); else printf("NO\...
main.c:1:19: warning: extra tokens at end of #include directive 1 | #include<stdio.h> int main(void) { int ball[10]; int i,j; int B,C; int n,flag; | ^~~ main.c:3:7: error: expected declaration specifiers or '...' before string constant 3 | scanf("%d",&n); for(i=0;i<n;i++) { flag=1; for(j...
s022609999
p00033
C
#include<stdio.h> int main() { int x[10]; int b,c,d,e,i,n=0; scanf("%d",&d); while(n<d) { scanf("%d %d %d %d %d %d %d %d %d %d",x,x+1,x+2,x+3,x+4,x+5,x+6,x+7,x+8,x+9); n++; b=0; c=0; e=1; for(i=0;i<10;i++) { if(x[i]>((b<=c)?b:c)) ((b<=c)?b:c)=x[i]; else { e=0; break; } ...
main.c: In function 'main': main.c:22:45: error: lvalue required as left operand of assignment 22 | ((b<=c)?b:c)=x[i]; | ^
s222588397
p00033
C
#include<stdio.h> int main() { int x[10],y[10]; int b,c,d,e,i,n=0,br; scanf("%d",&d); while(n<d) { scanf("%d %d %d %d %d %d %d %d %d %d",x,x+1,x+2,x+3,x+4,x+5,x+6,x+7,x+8,x+9); br=0; for(i=0;i<10;i++) y[i]=0; for(i=0;i<10;i++) { if(x[i]<1||x[i]>10) { br=1; break; } y[x[i]-1]++; ...
main.c: In function 'main': main.c:41:45: error: lvalue required as left operand of assignment 41 | ((b>=c)?b:c)=x[i]; | ^ main.c:43:44: error: lvalue required as left operand of assignment 43 | ((b>c...
s776900718
p00033
C
#include<stdio.h> int main(){ int i,j,n,x[10][10]={},A,B,a,b,c,d,e,f,g,h,k,l; A=0; B=0; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d %d %d %d %d %d %d %d %d %d",&a,&b,&c,&d,&e,&f,&g,&h,&k,&l); x[i][1]=a; x[i][2]=b; x[i][3]=c; x[i][4]=d; x[i][5]=e; x[i][6]=f; x[i][7]=g; x[i][8]=h; x[i][9]=k; x[i][10]=l;...
main.c:41:9: warning: data definition has no type or storage class 41 | x[7]=g; | ^ main.c:41:9: error: type defaults to 'int' in declaration of 'x' [-Wimplicit-int] main.c:41:14: error: 'g' undeclared here (not in a function) 41 | x[7]=g; | ^ main.c:42:9: warning:...
s514217102
p00033
C
#include <stdio.h> int main( void ) { int i, n, a[ 10 ], bTop, cTop; for ( scanf( "%d", &n ); n--; puts( i != -2 ? "YES" : "NO" ) ) { for ( i = 10; i--; scanf( "%d", a + i ) ); bTop = cTop = 0; for ( i = 10; i-- > 0; a[ i ] > bTop ? bTop = a[ i ] : a[ i ] > cTop ? cTop = a[ i ] : i = -1 ) ; } return 0; }
main.c: In function 'main': main.c:10:106: error: lvalue required as left operand of assignment 10 | for ( i = 10; i-- > 0; a[ i ] > bTop ? bTop = a[ i ] : a[ i ] > cTop ? cTop = a[ i ] : i = -1 ) ; | ...
s046389862
p00033
C
#include<stdio.h> #include<iostream> int main(){ int i,j,a,b,c,d,n,p; scanf("%d",&n); for(i=1;i<=n;i++){ a=-1; b=-1; d=0; for(j=1;j<=10;j++){ scanf("%d",&c); if(a<b){ p=a; a=b; b=p; } if(c>a) a=c; else { if(c>b) b=c; else { printf("NO\n"); d=1; break...
main.c:2:9: fatal error: iostream: No such file or directory 2 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s011640408
p00033
C
#include<stdio.h> #include<iostream> int main(){ int i,j,a,b,c,d,n,p; scanf("%d",&n); for(i=1;i<=n;i++){ a=-1; b=-1; d=0; for(j=1;j<=10;j++){ scanf("%d",&c); if(a<b){ p=a; a=b; b=p; } if(c>a) a=c; else { if(c>b) b=c; else { printf("NO\n"); d=1; break...
main.c:2:9: fatal error: iostream: No such file or directory 2 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s505245783
p00033
C
#include <iostream> #include <algorithm> using namespace std; int balls[20]; int R, L; bool dfs(int n) { if (n == 10) { return true; } if (R < balls[n]) { R = balls[n]; if (dfs(n+1)) { return true; } } if (L < balls[n]) { L = balls[n]; if (dfs(n+1)) { return true; } ...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s530078774
p00033
C++
#include <cstdio> #include <algorithm> #include <stack> using namespace std; stack<int> B, C; int A[10]; bool dfs(int index) { bool ret = false; char s[11]; if (index >= 10) { return true; } for (int i = 0; i < 11; i++) { if (i < index) s[i] = '>'; else s[i] = 0; } if (B.empty() || B.top(...
a.cc: In function 'int main()': a.cc:56:9: error: expected primary-expression before 'int' 56 | scor (int j = 0; j < 10; j++) { | ^~~ a.cc:56:20: error: 'j' was not declared in this scope 56 | scor (int j = 0; j < 10; j++) { | ^ a.cc: At global scope: a.cc:68:3: error: e...
s981302626
p00033
C++
#include <cstdio> #include <algorithm> #include <stack> using namespace std; stack<int> B, C; int A[10]; bool dfs(int index) { bool ret = false; char s[11]; if (index >= 10) { return true; } for (int i = 0; i < 11; i++) { if (i < index) s[i] = '>'; else s[i] = 0; } if (B.empty() || B.top(...
a.cc: In function 'int main()': a.cc:56:9: error: expected primary-expression before 'int' 56 | scor (int j = 0; j < 10; j++) { | ^~~ a.cc:56:20: error: 'j' was not declared in this scope 56 | scor (int j = 0; j < 10; j++) { | ^ a.cc: At global scope: a.cc:68:3: error: e...
s887628726
p00033
C++
#include <cstdio> #include <algorithm> #include <stack> using namespace std; stack<int> B, C; int A[10]; bool dfs(int index) { bool ret = false; char s[11]; if (index >= 10) { return true; } for (int i = 0; i < 11; i++) { if (i < index) s[i] = '>'; else s[i] = 0; } if (B.empty() || B.top(...
a.cc: In function 'int main()': a.cc:56:9: error: expected primary-expression before 'int' 56 | scor (int j = 0; j < 10; j++) { | ^~~ a.cc:56:20: error: 'j' was not declared in this scope 56 | scor (int j = 0; j < 10; j++) { | ^ a.cc: At global scope: a.cc:68:3: error: e...
s083253140
p00033
C++
include<cstdio> include<iostream> sing namespace std; nt main() int T; scanf("%d",&T); while(T--) { int n1=0,n2=0,x,jd; for(int i=1;i<=10;++i) { scanf("%d",&x); if(x>n1){n1=x;continue;} if(x>n2){n2=x;continue;} jd=1; } if(jd) pu...
a.cc:1:1: error: 'include' does not name a type 1 | include<cstdio> | ^~~~~~~ a.cc:4:1: error: 'nt' does not name a type; did you mean 'int'? 4 | nt main() | ^~ | int a.cc:7:9: error: expected constructor, destructor, or type conversion before '(' token 7 | scanf("%d",&T); | ...
s986629134
p00033
C++
#include<iostream> using namespace std; int l,r,x,ball[11],le[11],ri[11],ans,n; int dfs(int i,int l,int r){ if(i > 9){ return ans=1; } if(le[l]<ball[i]){ le[++l]=ball[i++]; dfs(i,l,r); } else if(ri[r]<ball[i]){ ri[++r]=ball[i++]; dfs(i,l,r); } else ...
a.cc: In function 'void solve()': a.cc:25:23: error: 'i' was not declared in this scope 25 | cin>>ball[i]; | ^ a.cc:29:17: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [4]') 29 | cout>>"YES">...
s287067228
p00033
C++
#include<stdio.h> #include<algorithm> using namespace std; int a[10],left[10],right[10]; void dfs(int i,int l,int r) { if(i>9) { printf("YES\n"); return; } else if(a[i]>left[l-1]) { left[l++]=a[i++]; dfs(i,l,r); } else if(a[i]>right[r-1]) { right[r++]=a[i++]; dfs(i,l,r); } else { printf("NO\n")...
a.cc: In function 'int main()': a.cc:34:17: error: 'memset' was not declared in this scope 34 | 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> +++ |+...
s923223617
p00033
C++
#include<iostream> using namespace std; int main(void){ int a[11],fir,n; int i; cin>>n; while(c--){ int sec = 0; for(i=0;i<10;i++){ cin>>a[i]; } fir=a[0]; for(i=1;i<10;i++){ if(fire<a[i])fir=a[i]; else if(sec<a[i])sec=a[i]; else break; } if(i==10)cout<<"YES"<<endl; else cout<<"NO"<<end...
a.cc: In function 'int main()': a.cc:9:15: error: 'c' was not declared in this scope 9 | while(c--){ | ^ a.cc:16:28: error: 'fire' was not declared in this scope; did you mean 'fir'? 16 | if(fire<a[i])fir=a[i]; | ^~~~ | ...
s686049810
p00033
C++
int a[10]; bool dfs(int k, int B, int C){ if(k == 10) return true; if(a[k] > B){ if(dfs(k + 1, a[k], C)) return true; } if(a[k] > C){ if(dfs(k + 1, B, a[k])) return true; } return false; } void solve(){ if(dfs(0, 0, 0)) printf("YES\n"); e...
a.cc: In function 'void solve()': a.cc:18:9: error: 'printf' was not declared in this scope 18 | printf("YES\n"); | ^~~~~~ a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>' +++ |+#include <cstdio> 1 | int a[10]; a.cc:20:9: err...
s117966013
p00033
C++
a
a.cc:1:1: error: 'a' does not name a type 1 | a | ^
s823998276
p00033
C++
def s(a,i,b,c): return b==sorted(b) and c==sorted(c) if i==10 else s(a,i+1,b+[a[i]],c) or s(a,i+1,b,c+[a[i]]) for roop in range(int(raw_input())): print "YES" if s(map(int,raw_input().split()),0,[],[]) else "NO"
a.cc:1:1: error: 'def' does not name a type 1 | def s(a,i,b,c): | ^~~
s869433135
p00033
C++
#include <iostream> using namespace std; int balls[10]; bool dfs(int i=0,int b_top=0,int c_top=0){ //10個のボールを落とせたらtrue if(i == 10) return true; //Bのほうに入れる if(balls[i] > b_top && dfs(i+1,balls[i],c_top)) return true; //Cの方に入れる if(balls[i] > c_top && dfs(i+1,b_top,balls[i])) return true; retu...
a.cc: In function 'bool dfs(int, int, int)': a.cc:18:15: error: expected ';' before '}' token 18 | return false | ^ | ; 19 | } | ~
s593845465
p00033
C++
#include <bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; while(n--){ vector<int> v(10); rep(i,10) cin >> v[i]; int a=0, b=0; bool is = true; for(int i=0; i< 10; i++){ if(v[i] < a && v[i] < b){is = false; break;} if(a < b) (b<v[i...
a.cc: In function 'int main()': a.cc:9:13: error: 'i' was not declared in this scope 9 | rep(i,10) cin >> v[i]; | ^ a.cc:9:9: error: 'rep' was not declared in this scope 9 | rep(i,10) cin >> v[i]; | ^~~
s979772584
p00033
C++
#include<iostream> #include<string.h> using namespace std; int N; int balls[10]; void dfs(int n, int a, int b){ if(n==10)return true; if(balls[n]>a) return dfs(n+1,balls[n],b); if(balls[n]>b) return dfs(n+1,a,balls[n]); return false; } int main(){ cin>>N; for(int i=0;i<N;i++){ for(int j=0;j<10;j++){ cin>>balls[j]; } ...
a.cc: In function 'void dfs(int, int, int)': a.cc:9:17: error: return-statement with a value, in function returning 'void' [-fpermissive] 9 | if(n==10)return true; | ^~~~ a.cc:12:8: error: return-statement with a value, in function returning 'void' [-fpermissive] 12 | return false; | ...
s118775190
p00033
C++
#include<iostream> using namespace std; int main() { int balls[10]; int out[2][10]; int outCount[2]={0}; int num; cin>>num; while(num!=0){ bool flag=false; int a[10]={0}; for(int i=0;i<10;i++){ cin>>balls[i]; } for(a[0]=0;a[0]<2;a[0]++){ ...
a.cc: In function 'int main()': a.cc:33:57: error: 'count' was not declared in this scope; did you mean 'out'? 33 | count++; | ^~~~~ | ou...
s590560022
p00033
C++
#include <iostream> #include <cstdio> using namespace std; int main(){ int n,s; cin >> n; for (int i=-; i < n; i++){ int a=0, b=0, flg=0; for (int j = 0; j < 10; j++)}{ cin >> s; if (s > a) a=s; else (s > b) b=s; else flg = 1; } ...
a.cc: In function 'int main()': a.cc:8:17: error: expected primary-expression before ';' token 8 | for (int i=-; i < n; i++){ | ^ a.cc:10:37: error: expected primary-expression before '}' token 10 | for (int j = 0; j < 10; j++)}{ | ^ a.c...
s661891387
p00033
C++
#include<stdio.h> int main(){ int n[11]={}; int m[11]={},p[11]={}; int N; bool f=true; while(1){ scanf("%d",&N);if(N==0)break; for(int i=0;i<10;i++) scanf("%d",&n[i]); for(int i=0;i<10;i++) if(m[M]<n[i]){M++;m[M]=n[i];} else if(p[P]<n[i]){P++;p[P]=n[i];} else f=false; } if(f=true)printf("YES\n"); else printf("NO\...
a.cc: In function 'int main()': a.cc:17:6: error: 'M' was not declared in this scope 17 | if(m[M]<n[i]){M++;m[M]=n[i];} | ^ a.cc:18:11: error: 'P' was not declared in this scope 18 | else if(p[P]<n[i]){P++;p[P]=n[i];} | ^ a.cc:28:6: error: redeclaration of 'bool f' 28 | bool f=true; ...
s283853032
p00033
C++
#include<stdio.h> int main(){ int n[11]={}; int m[11]={},p[11]={}; int N; int P=0,M=0; bool f=true; while(1){ scanf("%d",&N);if(N==0)break; for(int i=0;i<10;i++) scanf("%d",&n[i]); for(int i=0;i<10;i++) if(m[M]<n[i]){M++;m[M]=n[i];} else if(p[P]<n[i]){P++;p[P]=n[i];} else f=false; } if(f=true)printf("YES\n"); els...
a.cc: In function 'int main()': a.cc:29:6: error: redeclaration of 'bool f' 29 | bool f=true; | ^ a.cc:9:6: note: 'bool f' previously declared here 9 | bool f=true; | ^ a.cc: At global scope: a.cc:34:1: error: expected unqualified-id before 'return' 34 | return 0; | ^~~~~~ a.cc:35:...
s654421749
p00033
C++
a.cc:1:1: error: '\U0000ff56' does not name a type 1 | v | ^~
s861334626
p00033
C++
#include <iostream> const size = 10; int num[size]; bool dfs(int beforeB, int beforeC, int depth) { if(depth == 10) return true; if(num[depth] > beforeB) return dfs(num[depth], beforeC, depth + 1); else if(num[depth] > beforeC) return dfs(beforeB, num[depth], depth + 1); else return false; } int main(...
a.cc:3:7: error: 'size' does not name a type; did you mean 'size_t'? 3 | const size = 10; | ^~~~ | size_t a.cc:5:9: error: 'size' was not declared in this scope; did you mean 'std::size'? 5 | int num[size]; | ^~~~ | std::size In file included from /usr/include...
s130001794
p00033
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { int n; cin >> n; for(int q=0; q<n;q++) { vector <int> ball; ball.resize(10); for(int i=0;i<10;i++) cin >> ball[i]; reverse(ball.begin(),ball.end()); int a[10] = {0},b[11] = {0}; ...
a.cc:57:1: error: 'l' does not name a type 57 | l.clear(); | ^ a.cc:59:3: error: expected declaration before '}' token 59 | } | ^ a.cc:61:3: error: expected unqualified-id before 'return' 61 | return 0; | ^~~~~~ a.cc:63:1: error: expected declaration before '}' token 63 | } |...
s275305829
p00033
C++
#include <iostream> #include <stack> using namespace std; bool Solution() { int n; int left = 0; int right = 0; int a[10]; cin>>n; where(n--) { for (int i = 0; i < 10; i++) { cin>>a[i]; } for (int i = 0; i < 10; i++) ...
a.cc: In function 'bool Solution()': a.cc:17:5: error: 'where' was not declared in this scope 17 | where(n--) | ^~~~~ a.cc:40:1: warning: no return statement in function returning non-void [-Wreturn-type] 40 | } | ^
s503399116
p00033
C++
#include <iostream> #include <stack> using namespace std; bool Solution() { int n; int left = 0; int right = 0; int a[10]; cin>>n; where(n--) { for (int i = 0; i < 10; i++) { cin>>a[i]; } for (int i = 0; i < 10; i++) ...
a.cc: In function 'bool Solution()': a.cc:17:5: error: 'where' was not declared in this scope 17 | where(n--) | ^~~~~ a.cc:42:1: warning: no return statement in function returning non-void [-Wreturn-type] 42 | } | ^
s981433326
p00033
C++
#include <iostream> #include <stack> using namespace std; bool Solution() { int n; int left = 0; int right = 0; int a[10]; cin>>n; where(n--) { for (int i = 0; i < 10; i++) { cin>>a[i]; } for (int i = 0; i < 10; i++) ...
a.cc: In function 'bool Solution()': a.cc:17:5: error: 'where' was not declared in this scope 17 | where(n--) | ^~~~~