submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s914873015
p00102
C++
#include <iostream> #include<iomanip> using namespace std; int main() { int n; cin >> n; if(n == 0) break; int A[51][51] = {}; for(int i=0;i<n;i++) { for(int j=0;j<n;j++) { cin >> A[i][j]; A[i][n] += A[i][j]; A[n][j] += A[i][j]; } A[n][n] +...
a.cc: In function 'int main()': a.cc:12:5: error: break statement not within loop or switch 12 | break; | ^~~~~
s192963061
p00102
C++
#include <cstdio> int main(){ int i,j,n,a[10][10],b[10],c[10],sum; while(1){ scanf("%d",&n); if(n == 0) break; sum = 0; for(i=0;i<n;i++){ b[i] = 0; for(j=0;j<n;j++){ scanf("%d",&a[i][j]); b[i] += a[i][j]; sum += a[i][j]; } } for(i=0;i<n;i++){ c[i] = 0; for...
a.cc:42:5: error: redefinition of 'int main()' 42 | int main(){ | ^~~~ a.cc:3:5: note: 'int main()' previously defined here 3 | int main(){ | ^~~~
s450307939
p00102
C++
#include <stdio.h> #include <string.h> int main(void) { int size; int matrix[10][10]; int sum_row,sum_column,sum; char line[200]; char* p; int i,j; char c; while(1) { scanf("%d",&size); c=getchar(); if(size==0) break; for(i=0;i<size;i++) { fgets(line,sizeof(line),stdin)...
a.cc: In function 'int main()': a.cc:30:20: error: 'atoi' was not declared in this scope 30 | matrix[i][0]=atoi(p); | ^~~~
s576465008
p00102
C++
#include <stdio.h> #include <string.h> int main(void) { int size; int matrix[10][10]; int sum_row,sum_column,sum; char line[200]; char* p; int i,j; char c; while(1) { scanf("%d",&size); c=getchar(); if(size==0) break; for(i=0;i<size;i++) { fgets(line,sizeof(line),stdin)...
a.cc: In function 'int main()': a.cc:30:20: error: 'atoi' was not declared in this scope 30 | matrix[i][0]=atoi(p); | ^~~~
s193614484
p00102
C++
#include <iostream> #include <Iomanip> using namespace std; int main() { int n; while(1) { cin>>n; if(n==0)break; int m[n][n]; for(int i=0;i<n;i++) { for(int j=0;j<n;j++) { cin>>m[i][j]; } } int gyousum=0,retusum=0,allsum=0; for(int i=0;i<...
a.cc:2:10: fatal error: Iomanip: No such file or directory 2 | #include <Iomanip> | ^~~~~~~~~ compilation terminated.
s294066760
p00102
C++
#include <iostream> using namespace std; int main() { int n, num[11][11]; while (1) { if (cin >> n, !n) break; for (int i=0; i<11; i++) for (int j=0; j<11; j++) num[i][j] = 0; for (int i=0; i<n; i++) for (int j=0; j<n; j++) cin >> num[i][j]; for (int i=0; i<10; i++) for (int j=0; j<10; j++) num[10][i] += num...
a.cc: In function 'int main()': a.cc:18:10: error: expected '}' at end of input 18 | } | ^ a.cc:4:1: note: to match this '{' 4 | { | ^
s389116405
p00102
C++
#include <iostream> #include <cstdio> using namespace std; int main() { int n; while(cin>>n) { int table[11][11]={0}; if(n==0) break; for(int i=0,in;i<n;++i) { for(int j=0;j<n;++j) { cin>>in; table[i][j]=in; table[n][j]...
a.cc: In function 'int main()': a.cc:29:14: error: expected '}' at end of input 29 | return 0; | ^ a.cc:5:1: note: to match this '{' 5 | { | ^
s363472125
p00102
C++
#include <iostream> #include <cstdio> using namespace std; int main() { int n; while(cin>>n) { int table[11][11]={0}; if(n==0) break; for(int i=0,in;i<n;++i) { for(int j=0;j<n;++j) { cin>>in; table[i][j]=in; table[n][j]...
a.cc: In function 'int main()': a.cc:30:2: error: expected '}' at end of input 30 | } | ^ a.cc:5:1: note: to match this '{' 5 | { | ^
s521545003
p00102
C++
#include<iostream> #include<iomanip> int n; int tbl[11][11]; int main() { while( std::cin >> n, n ) { memset( tbl, 0, sizeof( tbl ) ); for( int i = 0; i != n; ++i ) { for( int j = 0; j != n; ++j ) { std::cin >> tbl[i][j]; tbl[i][n] += tbl[i][j]; tbl[n][j] += tbl[i][j]; tbl[n][n] += tb...
a.cc: In function 'int main()': a.cc:11:17: error: 'memset' was not declared in this scope 11 | memset( tbl, 0, sizeof( tbl ) ); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<iomanip> ...
s419636024
p00102
C++
#include<iostream> int main(){ int n; while(std::cin>>n,n){ int data[5][5]; memset(data,0,sizeof(data)); for(int i=0;i<4;i++){ for(int j=0;j<4;j++){ std::cin>>data[i][j]; data[i][4]+=data[i][j]; data[4][j]+=data[i][j]; data[4][4]+=data[i][j]; } } for(int i=0;i<5;i++){ for(int j=0;j...
a.cc: In function 'int main()': a.cc:7:17: error: 'memset' was not declared in this scope 7 | memset(data,0,sizeof(data)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> ++...
s307160464
p00102
C++
4 52 96 15 20 86 22 35 45 45 78 54 36 16 86 74 55 4 52 96 15 20 86 22 35 45 45 78 54 36 16 86 74 55 0
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 4 | ^
s432872388
p00102
C++
4 52 96 15 20 86 22 35 45 45 78 54 36 16 86 74 55 4 52 96 15 20 86 22 35 45 45 78 54 36 16 86 74 55 0
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 4 | ^
s528961374
p00103
Java
#include<iostream> #include<string> using namespace std; int main() {    int e;    cin >> e;    for(int i=0;i<e;i++){       int o=0,r=0,c=0;       while(1){          string str;          if(o==3) break;          cin >> str;          if(str=="HIT"){             if(r==3) c++,r--;             r++;          }          els...
Main.java:1: error: illegal character: '#' #include<iostream> ^ Main.java:2: error: illegal character: '#' #include<string> ^ Main.java:6: error: illegal character: '\u3000' ???int e; ^ Main.java:6: error: illegal character: '\u3000' ???int e; ^ Main.java:6: error: illegal character: '\u3000' ???int e; ^ Main.java:7...
s553207167
p00103
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int p,r,a; int n = sc.nextInt(); for(int i=0; i<n; i++){ a=0;r=0;p=0; while(a<3){ String t = sc.next(); if(t.equal("HIT")){ r++; if(r>3) {r--;p++;} } else...
Main.java:18: error: ';' expected r=0: ^ 1 error
s946927652
p00103
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int p,r,a; int n = sc.nextInt(); for(int i=0; i<n; i++){ a=0;r=0;p=0; while(a<3){ String t = sc.next(); if(t.equal("HIT")){ r++; if(r>3) {r--;p++;} } else...
Main.java:11: error: cannot find symbol if(t.equal("HIT")){ ^ symbol: method equal(String) location: variable t of type String Main.java:14: error: cannot find symbol } else if(t.equal("OUT")){ ^ symbol: method equal(String) location: variable t of type String 2 errors
s550114383
p00103
Java
#include <iostream> int main(int argc, const char * argv[]) { int k; int out = 0; int hit = 0; int numrun = 0; int pointa = 0; int pointb = 0; int ining = 0; std::cin >> ining; int i = 1; while(i < ining + 1){ std::string judge; std::cin >> judge; ...
Main.java:1: error: illegal character: '#' #include <iostream> ^ Main.java:1: error: unnamed classes are a preview feature and are disabled by default. #include <iostream> ^ (use --enable-preview to enable unnamed classes) Main.java:3: error: illegal start of type int main(int argc, const char * argv[]) { ...
s897020244
p00103
Java
import java.util.Scanner; public class Main { private byte[] runner; private static final int OUT_COUNT_FOR_CHANGE = 3; enum EVENT {HIT, HOMERUN, OUT}; private byte out; private int scoreOfInning; public Main { this.runner = new byte[3]; this.out = 0; this.scoreOfInning = 0; } public boolean action...
Main.java:11: error: <identifier> expected public Main { ^ 1 error
s518996814
p00103
Java
import java.io.*; public class Main{ public static void main(String[] args){ Scanner s = new Scanner(System.in); int count_out = 0, inning; int baseflag = 0; String str = ""; String binary = ""; inning = s.nextInt(); int[] score = new int[inning]; while(count_out < inning * 3){ ...
Main.java:5: error: cannot find symbol Scanner s = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:5: error: cannot find symbol Scanner s = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s270827167
p00103
Java
import java.io.*; public class BaseballSimulation{ public static void main(String[] args){ Scanner s = new Scanner(System.in); int count_out = 0, inning; int baseflag = 0; String str = ""; String binary = ""; inning = s.nextInt(); int[] score = new int[inning]; while(count_out < in...
Main.java:3: error: class BaseballSimulation is public, should be declared in a file named BaseballSimulation.java public class BaseballSimulation{ ^ Main.java:5: error: cannot find symbol Scanner s = new Scanner(System.in); ^ symbol: class Scanner location: class BaseballSimulation Main.java:5: er...
s731049004
p00103
Java
import java.util.Scanner; public class BaseballSimulation{ public static void main(String[] args){ Scanner s = new Scanner(System.in); int count_out = 0, inning; int baseflag = 0; String str = ""; String binary = ""; inning = s.nextInt(); int[] score = new int[inning]; while(count_...
Main.java:3: error: class BaseballSimulation is public, should be declared in a file named BaseballSimulation.java public class BaseballSimulation{ ^ Main.java:18: error: cannot find symbol BufferedReader bf = new BufferedReader(new InputStreamReader(System.in)); ^ symbol: class BufferedReade...
s375665995
p00103
Java
import java.util.Scanner; public class KmcProcon1 { private static int[] base = {0, 0, 0}; private static int out = 0; private static int score = 0; /** * @param args the command line arguments */ public static void main(String[] args) { Scanner scan = new Scanner(System.in); ...
Main.java:2: error: class KmcProcon1 is public, should be declared in a file named KmcProcon1.java public class KmcProcon1 { ^ 1 error
s757140439
p00103
Java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package kmcprocon1; import java.util.Scanner; public class KmcProcon1 { private static int[] base = {0, 0, 0}; private static...
Main.java:9: error: class KmcProcon1 is public, should be declared in a file named KmcProcon1.java public class KmcProcon1 { ^ 1 error
s117543683
p00103
Java
package kmcprocon1; import java.util.Scanner; public class KmcProcon1 { public static void main(String[] args) { int out = 0; int score; int[] base = {0, 0, 0}; Scanner scan = new Scanner(System.in); String input = scan.next(); int i = 0; String[] arr = in...
Main.java:6: error: class KmcProcon1 is public, should be declared in a file named KmcProcon1.java public class KmcProcon1 { ^ 1 error
s020994745
p00103
Java
package kmcprocon1; import java.util.Scanner; public class KmcProcon1 { public static void main(String[] args) { int out = 0; int score; int[] base = {0, 0, 0}; Scanner scan = new Scanner(System.in); int i = 0; int dataset = Integer.parseInt(scan.nextLine()); ...
Main.java:5: error: class KmcProcon1 is public, should be declared in a file named KmcProcon1.java public class KmcProcon1 { ^ 1 error
s843218701
p00103
Java
package kmcprocon1; import java.util.Scanner; public class KmcProcon1 { public static void main(String[] args) { int out = 0; int score; int[] base = {0, 0, 0}; Scanner scan = new Scanner(System.in); int i = 0; int dataset = Integer.parseInt(scan.nextLine()); ...
Main.java:5: error: class KmcProcon1 is public, should be declared in a file named KmcProcon1.java public class KmcProcon1 { ^ 1 error
s212623161
p00103
Java
package kmcprocon1; import java.util.Scanner; public class KmcProcon1 { public static void main(String[] args) { int out = 0; int score; int[] base = {0, 0, 0}; Scanner scan = new Scanner(System.in); int i = 0; int dataset = Integer.parseInt(scan.nextLine()); ...
Main.java:5: error: class KmcProcon1 is public, should be declared in a file named KmcProcon1.java public class KmcProcon1 { ^ 1 error
s839156663
p00103
Java
package kmcprocon1; import java.util.Scanner; public class KmcProcon1 { public static void main(String[] args) { int out; int score; int[] base = {0, 0, 0}; Scanner scan = new Scanner(System.in); int i = 0; int dataset = Integer.parseInt(scan.nextLine()); ...
Main.java:5: error: class KmcProcon1 is public, should be declared in a file named KmcProcon1.java public class KmcProcon1 { ^ 1 error
s146357613
p00103
Java
import java.io.BufferedReader; import java.io.InputStreamReader; public class Baseball_Simulation { public static void main(String[] args) throws Exception { // TODO ????????????????????????????????????????????? boolean[] arg = null; int length=0,out=0; int i=0; boolean first=true; int[...
Main.java:4: error: class Baseball_Simulation is public, should be declared in a file named Baseball_Simulation.java public class Baseball_Simulation { ^ 1 error
s053388365
p00103
Java
import java.io.BufferedReader; import java.io.InputStreamReader; public class Baseball_Simulation { public static void main(String[] args) throws Exception { // TODO ????????????????????????????????????????????? boolean[] arg = null; int length=0,out=0; int i=0; boolean first=true; int[...
Main.java:4: error: class Baseball_Simulation is public, should be declared in a file named Baseball_Simulation.java public class Baseball_Simulation { ^ 1 error
s761784722
p00103
Java
import java.io.*; import java.util.ArrayList; import java.util.List; public class Main { private static List<String> base = new ArrayList<String>(); private static int score = 0; public static void main(String[] args) { try { BufferedReader br = new BufferedReader(ne...
Main.java:80: error: reached end of file while parsing } ^ 1 error
s278497944
p00103
Java
import java.io.*; public class Main { public static void main(String[] args) { try { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String str; int out = 0; int runner = 0; int score = 0; ...
Main.java:54: error: reached end of file while parsing } ^ 1 error
s892915335
p00103
Java
import java.io.*; import java.util.*; public class Main { // private static List<String> base = new ArrayList<String>(); // private static int score = 0; public static void main(String[] args) { try { BufferedReader br = new BufferedReader(new In...
Main.java:65: error: reached end of file while parsing } ^ 1 error
s794286570
p00103
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; import java.util.List; public class BaseballSimulation103k { public static void main(String[] args) { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); List<Integer> field ...
Main.java:7: error: class BaseballSimulation103k is public, should be declared in a file named BaseballSimulation103k.java public class BaseballSimulation103k { ^ 1 error
s150078985
p00103
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; ?? public class Main { ????????public static void main(String[] args) { ????????????????BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); ????????????????int field = 0; ????????????????long scoreCount = ...
Main.java:4: error: class, interface, enum, or record expected ?? ^ Main.java:6: error: illegal start of type ????????public static void main(String[] args) { ^ Main.java:7: error: illegal start of expression ????????????????BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); ^ Main.java:7: error:...
s580209468
p00103
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Arrays; import java.util.List; public class Main { public static void main(String[] args) { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); List<Integ...
Main.java:15: error: ')' or ',' expected int gameNumber = Integer.parseInt(Objects.requireNonNull(br.readLine()); ^ 1 error
s069270891
p00103
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Arrays; import java.util.List; public class Main { public static void main(String[] args) { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); List<Integ...
Main.java:15: error: ')' or ',' expected int gameNumber = Integer.parseInt(Objects.requireNonNull(br.readLine()); ^ 1 error
s361640939
p00103
Java
import java.util.*; public class Main { public static void main(String[] a){ Scanner s = new Scanner(System.in);int n=Integer.valueOf(s.next());for(;n-->0;){for(int h=0,o=0;o<3;){switch(s.next().charAt(1)) {case'I':h++;if((h&3)==0)h|=3;break;case'O':h+=(((h&3)+1)<<2);h&=~3;break;default:o++;}System.out.println(h>>2)}}}...
Main.java:4: error: ';' expected Scanner s = new Scanner(System.in);int n=Integer.valueOf(s.next());for(;n-->0;){for(int h=0,o=0;o<3;){switch(s.next().charAt(1)) {case'I':h++;if((h&3)==0)h|=3;break;case'O':h+=(((h&3)+1)<<2);h&=~3;break;default:o++;}System.out.println(h>>2)}}}} ...
s369408785
p00103
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; public class BaseballSimulation { /** * @param args * @throws IOException * @throws NumberFormatException */ public static void main(String[] args) throws NumberFo...
Main.java:7: error: class BaseballSimulation is public, should be declared in a file named BaseballSimulation.java public class BaseballSimulation { ^ 1 error
s427096674
p00103
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int t = sc.nextInt(); while(t--=0){ int runner = 0; int point = 0; int out = 0; while(out < 3){ String c = sc.next(); if(c.equals("HIT")){ if(runner<3)runner++; ...
Main.java:9: error: unexpected type while(t--=0){ ^ required: variable found: value 1 error
s162122559
p00103
C
#include <stdio.h> int a[3]; int b[3]; int out; int asum, bsum; int main(void) { int i, j; int set; int flag = 0; char buf[10]; scanf("%d", &set); for (i = 0; i < set; i++){ scanf("%s", buf); if (flag == 0){ if (buf[0] == 'H' && buf[1] == 'I'){ asum += a[2]; a[2] = a[1]; a[1] = a[0]; a[...
main.c: In function 'main': main.c:56:1: error: expected declaration or statement at end of input 56 | } | ^
s920607061
p00103
C
#include <stdio.h> int a[3]; int b[3]; int out; int asum, bsum; int main(void){ int i; int set; int flag = 0; char buf[10]; scanf("%d", &set); for (i = 0; i < set; i++){ scanf("%s", buf); if (flag == 0){ if (buf[0] == 'H' && buf[1] == 'I'){ asum += a[2]; a[2] = a[1]; a[1] = a[0]; a[0] =...
main.c: In function 'main': main.c:55:1: error: expected declaration or statement at end of input 55 | } | ^
s417486734
p00103
C
#include <stdio.h> int a[3]; int out; int asum; int main(void){ int i; int set; char buf[10]; scanf("%d", &set); for (i = 0; i < set; i++){ scanf("%s", buf); if (buf[0] == 'H' && buf[1] == 'I'){ asum += a[2]; a[2] = a[1]; a[1] = a[0]; a[0] = 1; } else if (buf[0] == 'H' && buf[1] == '...
main.c:33:9: error: expected identifier or '(' before 'return' 33 | return 0; | ^~~~~~ main.c:34:1: error: expected identifier or '(' before '}' token 34 | } | ^
s588646999
p00103
C
#include <stdio.h> int a[3]; int out; int sum[1000]; int main(void){ int i; int set; char buf[10]; scanf("%d", &set); for (i = 0; i < set; i++){ scanf("%s", buf); if (buf[0] == 'H' && buf[1] == 'I'){ sum[i] += a[2]; a[2] = a[1]; a[1] = a[0]; a[0] = 1; } else if (buf[0] == 'H' && buf[1] == ...
main.c: In function 'main': main.c:31:29: error: assignment to expression with array type 31 | buf = "aiueoaiueo" | ^ main.c:31:43: error: expected ';' before '}' token 31 | buf = "aiueoaiueo" | ...
s849856152
p00103
C
#include <stdio.h> int a[3]; int out; int sum[1000]; int main(void){ int i; int set; char buf[10]; scanf("%d", &set); for (i = 0; i < set; i++){ scanf("%s", buf); if (buf[0] == 'H' && buf[1] == 'I'){ sum[i] += a[2]; a[2] = a[1]; a[1] = a[0]; a[0] = 1; } else if (buf[0] == 'H' && buf[1] == ...
main.c: In function 'main': main.c:31:29: error: assignment to expression with array type 31 | buf = "aiueoaiueo"; | ^ main.c:36:1: error: expected declaration or statement at end of input 36 | } | ^
s633472650
p00103
C
#include <stdio.h> int a[3]; int out; int sum[1000]; int main(void){ int i; int set; char buf[10]; scanf("%d", &set); for (i = 0; i < set; i++){ scanf("%s", buf); if (buf[0] == 'H' && buf[1] == 'I'){ sum[i] += a[2]; a[2] = a[1]; a[1] = a[0]; a[0] = 1; } else if (buf[0] == 'H' && buf[1] == ...
main.c: In function 'main': main.c:35:1: error: expected declaration or statement at end of input 35 | } | ^
s445879603
p00103
C
#include <stdio.h> int a[3]; int out; int sum[1000]; int main(void){ int i; int set; char buf[10]; scanf("%d", &set); for (i = 0; i < set; i++){ scanf("%s", buf); sum[i] += a[2]; a[2] = a[1]; a[1] = a[0]; a[0] = 1; } else if (buf[0] == 'H' && buf[1] == 'O'){ sum[i] += a[2] + a[1] + a[0] +...
main.c: In function 'main': main.c:20:17: error: 'else' without a previous 'if' 20 | else if (buf[0] == 'H' && buf[1] == 'O'){ | ^~~~ main.c: At top level: main.c:32:9: error: expected identifier or '(' before 'for' 32 | for (i = 0; i < set; i++){printf("%d\n", sum[i]...
s914167531
p00103
C
#include <stdio.h> int a[3]; int out; int sum[1000]; int main(void){ int i; int set; char buf[10]; scanf("%d", &set); for (i = 0; i < set; i++){ scanf("%s", buf); if (buf[0] == 'H' && buf[1] == 'I'){ sum[i] += a[2]; a[2] = a[1]; a[1] = a[0]; a[0] = 1; } else if (buf[0] == 'H' && buf[1] == '...
main.c: In function 'main': main.c:33:57: error: expected ';' before '}' token 33 | for (i = 0; i < set; i++){printf("%d\n", sum[i])}; | ^ | ; main.c: At top level: main.c:37:17: error:...
s354620412
p00103
C
#include <stdio.h> #include <string.h> int a[3]; int out; int sum; int main(void){ int i; int set; char buf[8]; char hit[4] = "HIT", out[4]="OUT", homerun[8]="HOMERUN"; scanf("%d", &set); for (i = 0; i < set; i++){ scanf("%s", buf); if (strcmp(buf, hit) > 0){ sum += a[2]; a[2] = a[1]; a[1] = a[0]...
main.c: In function 'main': main.c:27:28: error: lvalue required as increment operand 27 | out++; | ^~ main.c:30:25: warning: comparison between pointer and integer 30 | if (out == 3){ | ^~ main.c:32:29: error: ...
s463389764
p00103
C
#include<stdio.h> #include<iostream> using namespace std; int main(void) { int n,i=0,out=0,g=0; int cange=0,score[2]={0,0}; char evn[100][7]; int base[4]={0,0,0,0}; cin >> n; while(n!=g){ cin >> evn[i]; if(evn[i][1]=='I'){ base[3]+=base[2]; base[2]=base[1]; base[1]=base[0]; base[0]=1; } if(evn...
main.c:2:9: fatal error: iostream: No such file or directory 2 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s958107437
p00103
C
#include<stdio.h> #include<stdlib.h> #include<string.h> int main() { int *A; const char *H[4] = "HIT"; const char *R[8] = "HOMERUN"; const char *O[4] = "OUT"; while(1){ int score = 0; int runner = 0; int out = 0; scanf("%s",*char s[10]); if(strcmp(s,H) == 0) { runner++; if(runnner == 4) { ...
main.c: In function 'main': main.c:7:28: error: invalid initializer 7 | const char *H[4] = "HIT"; | ^~~~~ main.c:8:28: error: invalid initializer 8 | const char *R[8] = "HOMERUN"; | ^~~~~~~~~ main.c:9:28: error: invalid initialize...
s142824803
p00103
C
#include<stdio.h> #include<stdlib.h> #include<string.h> int main() { int *A; const char *H[4] = "HIT"; const char *R[8] = "HOMERUN"; const char *O[4] = "OUT"; while(1){ int score = 0; int runner = 0; int out = 0; *char s[10]; scanf("%s",s); if(strcmp(s,H) == 0) { runner++; if(runnner == 4) {...
main.c: In function 'main': main.c:7:28: error: invalid initializer 7 | const char *H[4] = "HIT"; | ^~~~~ main.c:8:28: error: invalid initializer 8 | const char *R[8] = "HOMERUN"; | ^~~~~~~~~ main.c:9:28: error: invalid initialize...
s711718687
p00103
C
#include<stdio.h> #include<stdlib.h> #include<string.h> int main() { int *A; const char H[4] = "HIT"; const char R[8] = "HOMERUN"; const char O[4] = "OUT"; while(1){ int score = 0; int runner = 0; int out = 0; *char s[10]; scanf("%s",s); if(strcmp(s,H) == 0) { runner++; if(runnner == 4) { ...
main.c: In function 'main': main.c:14:18: error: expected expression before 'char' 14 | *char s[10]; | ^~~~ main.c:15:28: error: 's' undeclared (first use in this function) 15 | scanf("%s",s); | ^ main.c:15:28: note: each unde...
s123914069
p00103
C
#include<stdio.h> #include<stdlib.h> #include<string.h> int main() { int *A; const char H[4] = "HIT"; const char R[8] = "HOMERUN"; const char O[4] = "OUT"; while(1){ int score = 0; int runner = 0; int out = 0; char s[10]; scanf("%s",s); if(strcmp(s,H) == 0) { runner++; if(runnner == 4) { ...
main.c: In function 'main': main.c:19:28: error: 'runnner' undeclared (first use in this function); did you mean 'runner'? 19 | if(runnner == 4) | ^~~~~~~ | runner main.c:19:28: note: each undeclared identifier is reported only...
s875703871
p00103
C
#include<stdio.h> #include<stdlib.h> #include<string.h> int main() { int *A; const char H[4] = "HIT"; const char R[8] = "HOMERUN"; const char O[4] = "OUT"; int score = 0; int runner = 0; int out = 0; int event = 0; int n; scanf("%d",&n); while(event < n+1){ char s[10]; scanf("%s",s); event++; if(strc...
main.c: In function 'main': main.c:42:9: error: expected declaration or statement at end of input 42 | return 0; | ^~~~~~
s087756879
p00103
C
#include<stdio.h> int main(void) { char str[16]={}; int n; int score=0; int base=0; int out=0; scanf("%d", &n); for(i=0;i<n;i++) { scanf("%s", str); if(str[1]='I') if(base==3) score++,base=0; else base++; else if(str[1]='U') if(out==2) ...
main.c: In function 'main': main.c:13:7: error: 'i' undeclared (first use in this function) 13 | for(i=0;i<n;i++) | ^ main.c:13:7: note: each undeclared identifier is reported only once for each function it appears in
s804735072
p00103
C
#include<cstdio> int main() { bool a = false, b = false, c = false; int score = 0; char event[10]; int d; scanf_s("%d", &d, 10); for (int i = 0; i<d; i++) { score = 0; a = b = c = false; int out = 0; while (1) { scanf_s("%s", &event, 10); if (event[1] == 'I') { if (c)score++; c = b; b =...
main.c:1:9: fatal error: cstdio: No such file or directory 1 | #include<cstdio> | ^~~~~~~~ compilation terminated.
s298799631
p00103
C
#include<stdio.h> #include<string.h> int main(){ int base; int n; int out; int score; char com[10]; scanf("%d",&n); for(i=0;i<n;i++){ out=0; score=0; base=0; while(out<3){ scanf("%s",com); if(com[1]=='U'){ out++; if(out==3)printf("%d\n",sco...
main.c: In function 'main': main.c:12:6: error: 'i' undeclared (first use in this function) 12 | for(i=0;i<n;i++){ | ^ main.c:12:6: note: each undeclared identifier is reported only once for each function it appears in
s493352158
p00103
C
#include<stdio.h> #include<strcmp.h> int main(){ int out,n,k,g[3],x; char t[5],e1[4]="OUT",e2[4]="HIT",e3[8]="HOMERUN"; scanf("%d",&n); while(n-->0){ out=0; k=0; g[0]=0; g[1]=0; g[2]=0; while(out!=3){ scanf("%s",t); if(strcmp(e1,t)==0) out++; else if(strcmp(e2,t)==0){ if(g[2]==1) k++; g[2]=g[1]; g[1]=g[0]; g[0]=1; } el...
main.c:2:9: fatal error: strcmp.h: No such file or directory 2 | #include<strcmp.h> | ^~~~~~~~~~ compilation terminated.
s162742486
p00103
C
int main(){ int c,y,t,o,p; char a[9]; scanf("%d",&c); for(y=0;;y++){ t=o=p=0; while(~scanf("%s",&a)||exit(1)){ if(a[0]=='H')t++; else o++; if(a[1]=='O'){p+=t;t=0;} if(t>3){p++;t--;} if(o>2)break; } printf("%d\n",p); } }
main.c: In function 'main': main.c:4:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 4 | scanf("%d",&c); | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | int main(){ main.c:4:9: warning: in...
s632152666
p00103
C
a,q,o,x,b; main(){ for(scanf("%d",&p);~scanf("%s",&a);o=o==3?b=x=!printf("%d\n",x):o){ //printf("%d\n",a%9); ///* //printf("bef x:%d b:%d o:%d\n",x,b,o); if(a%9==7)b=b*2+1,x+=b>>3&1; if(a%9==8)o++; if(a%9==6)for(x++,b&=7;b;b/=2)x+=b&1; //printf("x:%d b:%d o:%d\n",x,b,o); //*/ } }
main.c:1:1: warning: data definition has no type or storage class 1 | a,q,o,x,b; | ^ 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 'q' [-Wimplicit-int] 1 | a,q,o,x,b; | ^ main.c:1:5: error: type defaults...
s203352452
p00103
C
#include<stdio.h> int main(){ int c,y,t,o,p; char a[9]; read(0,b,4); for(y=0;;y++){ for(t=o=p=0;;){ if(!~scanf("%s",a))return 0; if(a[0]=='H')t++; else o++; if(a[1]=='O'){p+=t;t=0;} if(t>3){p++;t--;} if(o>2)break; } printf("%d\n",p); } }
main.c: In function 'main': main.c:6:9: error: implicit declaration of function 'read'; did you mean 'fread'? [-Wimplicit-function-declaration] 6 | read(0,b,4); | ^~~~ | fread main.c:6:16: error: 'b' undeclared (first use in this function) 6 | read(0,b,4); | ...
s711235874
p00103
C
b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);b=a%3?(a%3-2)?b+1:o?b:(s=!printf("%d\n",s+=b>3?b-3:0)):!s+=++b)o=(o+!(a%3-2))%3;}
main.c:1:1: warning: data definition has no type or storage class 1 | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);b=a%3?(a%3-2)?b+1:o?b:(s=!printf("%d\n",s+=b>3?b-3:0)):!s+=++b)o=(o+!(a%3-2))%3;} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int] main.c:1:3: error: type de...
s243686895
p00103
C
b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);b=a%3?(a%3-2)?b+1:o?b:(s=!printf("%d\n",s+=b>3?b-3:0)):!s+=++b:o=(o+!(a%3-2))%3;}
main.c:1:1: warning: data definition has no type or storage class 1 | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);b=a%3?(a%3-2)?b+1:o?b:(s=!printf("%d\n",s+=b>3?b-3:0)):!s+=++b:o=(o+!(a%3-2))%3;} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int] main.c:1:3: error: type de...
s925851258
p00103
C
b,s,o;main(a){for(scanf("%d");~scanf("%s",&a);b=a%3?(a&1)?o?b:(s=!printf("%d\n",b>3?s+b-3:s)):b+1:s+=++b,0)o=a&1?-~o%3:o;}
main.c:1:1: warning: data definition has no type or storage class 1 | b,s,o;main(a){for(scanf("%d");~scanf("%s",&a);b=a%3?(a&1)?o?b:(s=!printf("%d\n",b>3?s+b-3:s)):b+1:s+=++b,0)o=a&1?-~o%3:o;} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int] main.c:1:3: error: type defaults...
s864807680
p00103
C
b,s,o;main(a){for(scanf("%d");~scanf("%s",&a);a%3?a&1?o?b:b=!s=!printf("%d\n",b>3?s+b-3:s):b++:(s+=1+b,b=0))o=a&1?-~o%3:o;}
main.c:1:1: warning: data definition has no type or storage class 1 | b,s,o;main(a){for(scanf("%d");~scanf("%s",&a);a%3?a&1?o?b:b=!s=!printf("%d\n",b>3?s+b-3:s):b++:(s+=1+b,b=0))o=a&1?-~o%3:o;} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int] main.c:1:3: error: type default...
s961653682
p00103
C
b,o,s;main(a){for(scanf("%*d");~scanf("%s",&a);) { /*if(a%3){ if(a&1){ if(!(++o%3)){ printf("%d\n",b>3?s+b-3:s),b=s=0; } } ...
main.c:1:1: warning: data definition has no type or storage class 1 | b,o,s;main(a){for(scanf("%*d");~scanf("%s",&a);) | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int] main.c:1:3: error: type defaults to 'int' in declaration of 'o' [-Wimplicit-int] 1 | b,o,s;main(a){for...
s553547013
p00103
C
b,o,s;main(a){for(scanf("%*d");~scanf("%s",&a);) { /*if(a%3){ if(a&1){ if(!(++o%3)){ printf("%d\n",b>3?s+b-3:s),b=s=0; } } ...
main.c:1:1: warning: data definition has no type or storage class 1 | b,o,s;main(a){for(scanf("%*d");~scanf("%s",&a);) | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int] main.c:1:3: error: type defaults to 'int' in declaration of 'o' [-Wimplicit-int] 1 | b,o,s;main(a){for...
s728887744
p00103
C
b,o,s;main(a){for(scanf("%*d");~scanf("%s",&a);)a%3?a&1?++o%3?:(s=!printf("%d\n",b>3?s+b-3:s),b=0):b++:(s+=b+1,b=0);}}
main.c:1:1: warning: data definition has no type or storage class 1 | b,o,s;main(a){for(scanf("%*d");~scanf("%s",&a);)a%3?a&1?++o%3?:(s=!printf("%d\n",b>3?s+b-3:s),b=0):b++:(s+=b+1,b=0);}} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int] main.c:1:3: error: type defaults to ...
s783169113
p00103
C
b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?:b=s=!printf("%d\n",b>3?s+b-3:s):b++:(s+=b+1,b=0);}
main.c:1:1: warning: data definition has no type or storage class 1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?:b=s=!printf("%d\n",b>3?s+b-3:s):b++:(s+=b+1,b=0);} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int] main.c:1:3: error: type defaults to 'int' ...
s727985644
p00103
C
b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?:s=!printf("%d\n",b>3?s+b-3:s),b=0:b++:(s+=b+1,b=0);}
main.c:1:1: warning: data definition has no type or storage class 1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?:s=!printf("%d\n",b>3?s+b-3:s),b=0:b++:(s+=b+1,b=0);} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int] main.c:1:3: error: type defaults to 'int...
s914065451
p00103
C
b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b+1);}
main.c:1:1: warning: data definition has no type or storage class 1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b+1);} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int] main.c:1:3: error: type defaults to 'int' in ...
s925176782
p00103
C
b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b++);}
main.c:1:1: warning: data definition has no type or storage class 1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b++);} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int] main.c:1:3: error: type defaults to 'int' in ...
s835689788
p00103
C
b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=(a%3?a&1?++o%3?:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b++));}
main.c:1:1: warning: data definition has no type or storage class 1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=(a%3?a&1?++o%3?:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b++));} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int] main.c:1:3: error: type defaults to 'int' i...
s847081736
p00103
C
b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=(a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b++));}
main.c:1:1: warning: data definition has no type or storage class 1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=(a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b++));} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int] main.c:1:3: error: type defaults to 'int' ...
s514630484
p00103
C
b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=(a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:s+=b++);}
main.c:1:1: warning: data definition has no type or storage class 1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=(a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:s+=b++);} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int] main.c:1:3: error: type defaults to 'int' in ...
s588298408
p00103
C
b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b++);}
main.c:1:1: warning: data definition has no type or storage class 1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b++);} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int] main.c:1:3: error: type defaults to 'int' in d...
s655328050
p00103
C
b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b);}
main.c:1:1: warning: data definition has no type or storage class 1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:!(s+=b);} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int] main.c:1:3: error: type defaults to 'int' in dec...
s830798000
p00103
C
b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?:(s=!printf("%d\n",b>3?s+b-3:s),b=0):b++:s+=b+1;}
main.c:1:1: warning: data definition has no type or storage class 1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?:(s=!printf("%d\n",b>3?s+b-3:s),b=0):b++:s+=b+1;} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int] main.c:1:3: error: type defaults to 'int' in...
s363254557
p00103
C
b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:(s+=b+1);}
main.c:1:1: warning: data definition has no type or storage class 1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:s=!printf("%d\n",b>3?s+b-3:s):b+1:(s+=b+1);} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int] main.c:1:3: error: type defaults to 'int' in ...
s299401356
p00103
C
b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);) b= a%3? a&1? ++o%3? b :(s=!puts(48+(b>3?s+b-3:s)) :b+1 :!(s+=b+1);}
main.c:1:1: warning: data definition has no type or storage class 1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);) | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int] main.c:1:3: error: type defaults to 'int' in declaration of 'o' [-Wimplicit-int] 1 | b,o,s;main(a){for(...
s394090658
p00103
C
b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);) b= a%3? a&1? ++o%3? b :(s=!puts(itoa(b>3?s+b-3:s,&a,10))) :b+1 :!(s+=b+1);}
main.c:1:1: warning: data definition has no type or storage class 1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);) | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int] main.c:1:3: error: type defaults to 'int' in declaration of 'o' [-Wimplicit-int] 1 | b,o,s;main(a){for(...
s827311648
p00103
C
b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);) b= a%3? a&1? ++o%3? b :(s=!puts(itoa(b>3?s+b-3:s,&a,10))) :b+1 :!(s+=b+1);}
main.c:1:1: warning: data definition has no type or storage class 1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);) | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int] main.c:1:3: error: type defaults to 'int' in declaration of 'o' [-Wimplicit-int] 1 | b,o,s;main(a){for(...
s769034780
p00103
C
b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);) b=( a%3? a&1? ++o%3? b :s=!printf("%d\n",b>3?s+b-3:s) :b+1 :!s-=~b);}
main.c:1:1: warning: data definition has no type or storage class 1 | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);) | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int] main.c:1:3: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int] 1 | b,s,o;main(a){for...
s485094780
p00103
C
b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);) b=( a%3? a&1? ++o%3? b :s=!printf("%d\n",b>3?s+b-3:s) :b+1 :!(s-=~b));}
main.c:1:1: warning: data definition has no type or storage class 1 | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);) | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int] main.c:1:3: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int] 1 | b,s,o;main(a){for...
s330539266
p00103
C
b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:(c=!printf("%d\n",b>3?s+b-3:s)):b+1:!(c-=~b);}
main.c:1:1: warning: data definition has no type or storage class 1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:(c=!printf("%d\n",b>3?s+b-3:s)):b+1:!(c-=~b);} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int] main.c:1:3: error: type defaults to 'int' i...
s622902420
p00103
C
b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:(c=!printf("%d\n",b>3?s+b-3:s)):b+1:!(s-=~b);}
main.c:1:1: warning: data definition has no type or storage class 1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:(c=!printf("%d\n",b>3?s+b-3:s)):b+1:!(s-=~b);} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int] main.c:1:3: error: type defaults to 'int' i...
s678051924
p00103
C
b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:(s=!printf("%d\n",b>3?s+b-3:s)):b+1:(!s-=~b);}
main.c:1:1: warning: data definition has no type or storage class 1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:(s=!printf("%d\n",b>3?s+b-3:s)):b+1:(!s-=~b);} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int] main.c:1:3: error: type defaults to 'int' i...
s094033076
p00103
C
b,o,s;main(a){for(scanf("%s");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:(c=!printf("%d\n",b>3?s+b-3:s)):b+1:!(s-=~b);}
main.c:1:1: warning: data definition has no type or storage class 1 | b,o,s;main(a){for(scanf("%s");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:(c=!printf("%d\n",b>3?s+b-3:s)):b+1:!(s-=~b);} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int] main.c:1:3: error: type defaults to 'int' i...
s500045025
p00103
C
b,o,s;main(a){for(;~scanf("%d",&a);)a>4e6?b=a%3?a&1?++o%3?b:(c=!printf("%d\n",b>3?b+s-3:s)):b+1:!(s-=~b):a;}
main.c:1:1: warning: data definition has no type or storage class 1 | b,o,s;main(a){for(;~scanf("%d",&a);)a>4e6?b=a%3?a&1?++o%3?b:(c=!printf("%d\n",b>3?b+s-3:s)):b+1:!(s-=~b):a;} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int] main.c:1:3: error: type defaults to 'int' in d...
s521521375
p00103
C
#include<stdio.h> int main(void){ int i,j,k,q,p,inning,point,kazu[20]; char eve[10]; point=0; j=0; k=0; q=0; p=0; scanf("%d",&inning); for(k=0;k<inning;k++){ point=0; j=0; q=0; p=0; while(q<3){ for(j=0;j<10;j++){ eve[j]=0; } gets(eve); if(eve[0]=...
main.c: In function 'main': main.c:29:25: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 29 | gets(eve); | ^~~~ | fgets
s400330367
p00103
C
b,o,s;main(a){for(;~scanf("%s",&a);)a>4e6?a%3?a&3?++o%3?b:(b=s=!printf("%d\n",b>3?b+s-3:s)):b++:b=!(s-=~b):a;}
main.c:1:1: warning: data definition has no type or storage class 1 | b,o,s;main(a){for(;~scanf("%s",&a);)a>4e6?a%3?a&3?++o%3?b:(b=s=!printf("%d\n",b>3?b+s-3:s)):b++:b=!(s-=~b):a;} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int] main.c:1:3: error: type defaults to 'int' in...
s231502045
p00103
C
#include <iostream> using namespace std; int main() { int n; cin >> n; while(n--){ string str; int o = 0, p = 0, r=0; while(o < 3){ cin >> str; if(str == "HIT"){ if(r<3) r++; else p++; }else if(str == "HOMERUN"){ p += r+1; r = 0; }else if(str == "OUT"){ o++; } } ...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s897759251
p00103
C
#include<stdio.h> #include<string.h> int main() { int n; scanf("%d",&n); while(n-->0) { char a[8]; int score=0,base=0,out=0; while(out<3) { scanf("%s",&a); if(!strcmp(a,"HIT")) { if(base!=0) { if(((base<<=1)&8)==8) { score+=1; base&=7; } } base+=1; ...
main.c: In function 'main': main.c:33:51: error: lvalue required as left operand of assignment 33 | (base>>=1)&=7; | ^~
s585145804
p00103
C
#include<stdio.h> #include<string.h> int main(void) { int HIT=0,OUT=0,POINT=0,a,b,c=0; char EVENT[100][8]; for(;;) { scanf("%d\n",&a); for(b=0;;b++) { gets(EVENT[b]); if(strcmp(EVENT[b],"OUT")==0) OUT++; if(strcmp(EVENT[b],"HIT")==0) if(HIT==4) POINT++; else HIT++; if(strcmp...
main.c: In function 'main': main.c:12:25: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 12 | gets(EVENT[b]); | ^~~~ | fgets main.c:34:9: error: expected declaration or stateme...
s795819359
p00103
C
#include <stdio.h> #include <string.h> int main(){ int ining,i,j,tokuten[100],mozisuu,hit,out; char mozi[8]; scanf("%d",ining); for(j=0; j<100; j++){ tokuten[j]=0; } i=0; hit=0; out=0; while(ining>i){ scanf("%s", mozi); mozisuu=strlen(mozi); if(mozisuu==7){ tokuten[i]=hit+1; } else { if(g...
main.c: In function 'main': main.c:23:28: error: too many arguments to function 'getchar' 23 | if(getchar(mozi)=='h'){ | ^~~~~~~ In file included from main.c:1: /usr/include/stdio.h:582:12: note: declared here 582 | extern int getchar (void); | ...
s440829704
p00103
C
#include <stdio.h> #include <algorithm> using namespace std; int main() { int n,q; int S[100000], T[50000]; int ans; int i,j; scanf("%d",&n); for(i=0; i<n; i++){ scanf("%d",&S[i]); } ans = 0; scanf("%d",&q); for(i=0; i<q; i++){ int found; scanf("%d",&T[i]); found = binary_search(...
main.c:2:10: fatal error: algorithm: No such file or directory 2 | #include <algorithm> | ^~~~~~~~~~~ compilation terminated.
s126098186
p00103
C
#include<stdio.h> int main(void){ int i,j,n,c=0,b=0,s=0; char in[100]; int ten[100]={0}; scanf("%d",&n); while(c!=n){ scanf("%s",in); switch(in[1]-'A'){ case 8:b++;break; //i hit case 20:s++;break; //u out case 14:ten[c]+=b+1;b=0;break;//o homerun } if(b==4){ten[c]++;b=3;} ...
main.c:25:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input 25 | h | ^
s293738349
p00103
C++
#include <iostream> #include <string> using namespace std; int main() { int n; cin >> n; while(n--) { int count = 0,out = 0; int home[4]; memset(home,0,sizeof(home)); while(out != 3) { string s; cin >> s; if(s == "OUT") { out++; } else if(s == "HIT") { if(home[2] == 1) {...
a.cc: In function 'int main()': a.cc:13:17: error: 'memset' was not declared in this scope 13 | memset(home,0,sizeof(home)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> ...
s312623531
p00103
C++
#include<iostream> #include<string> using namespace std; int main() {    int e;    cin >> e;    for(int i=0;i<e;i++){       int o=0,r=0,c=0;       while(1){          string str;          if(o==3) break;          cin >> str;          if(str=="HIT"){             if(r==3) c++,r--;             r++;          }          els...
a.cc:6:1: error: extended character   is not valid in an identifier 6 |    int e; | ^ a.cc:6:1: error: extended character   is not valid in an identifier a.cc:6:1: error: extended character   is not valid in an identifier a.cc:7:1: error: extended character   is not valid in an identifier 7 |    cin >> e;...
s661781259
p00103
C++
#include<iostream> #include<string> using namespace std; int main() {    int e;    cin >> e;    for(int i=0;i<e;i++){       int o=0,r=0,c=0;       while(1){          string str;          if(o==3) break;          cin >> str;          if(str=="HIT"){             if(r==3) c++,r--;             r++;          }          els...
a.cc:6:1: error: extended character   is not valid in an identifier 6 |    int e; | ^ a.cc:6:1: error: extended character   is not valid in an identifier a.cc:6:1: error: extended character   is not valid in an identifier a.cc:7:1: error: extended character   is not valid in an identifier 7 |    cin >> e;...