submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s303264446
p00027
C++
#include <bits/stdc++.h> using namespace std; #define REP(i, n) for (int i = 0; i < (n); i++) const int month[] = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30}; int main() { int m, d, cntdays = 0; while (cin >> m >> d, m + d){ cntdays = month[m - 1] + d; switch (cntdats % 7){ case 1: co...
a.cc: In function 'int main()': a.cc:13:13: error: 'cntdats' was not declared in this scope; did you mean 'cntdays'? 13 | switch (cntdats % 7){ | ^~~~~~~ | cntdays a.cc:15:17: error: 'Monday' was not declared in this scope 15 | cout << Monday; | ...
s884366367
p00027
C++
#include <bits/stdc++.h> using namespace std; #define REP(i, n) for (int i = 0; i < (n); i++) const int month[] = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30}; int main() { int m, d, cntdays = 0; while (cin >> m >> d, m + d){ cntdays = month[m - 1] + d; switch (cntdats % 7){ case 1: co...
a.cc: In function 'int main()': a.cc:13:13: error: 'cntdats' was not declared in this scope; did you mean 'cntdays'? 13 | switch (cntdats % 7){ | ^~~~~~~ | cntdays
s906830781
p00027
C++
#include <iostream> #include <string> using namespace std; int min(){ string y[7] = {"Wednesday", "Thrsday", "Frinday", "Saturday", "Sunday", "Monday", "Tuesday"}; int mon[13] = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; while(1){ int m, d; cin >> m >> d; if(m == 0) break; while(m != 0){ d =...
a.cc: In function 'int min()': a.cc:20:1: warning: no return statement in function returning non-void [-Wreturn-type] 20 | } | ^ /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit...
s949920940
p00027
C++
#include <iostream> #include <string> using namespace std; int min(){ string y[7] = {"Wednesday", "Thrsday", "Frinday", "Saturday", "Sunday", "Monday", "Tuesday"}; int mon[13] = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; while(1){ int m, d; cin >> m >> d; if(m == 0) break; while(m != 0){ d =...
a.cc: In function 'int min()': a.cc:20:1: warning: no return statement in function returning non-void [-Wreturn-type] 20 | } | ^ /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit...
s873282887
p00027
C++
#include <iostream> #include <string> using namespace std; int min(){ string y[7] = {"Wednesday", "Thrsday", "Frinday", "Saturday", "Sunday", "Monday", "Tuesday"}; int mon[13] = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; while(1){ int m, d; cin >> m >> d; if(m == 0) break; while(m != 0){ d =...
a.cc: In function 'int min()': a.cc:21:1: warning: no return statement in function returning non-void [-Wreturn-type] 21 | } | ^ /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit...
s357910324
p00027
C++
import java.util.*; public class Main { static String[] Day=new String[10]; public static void setDay(){ Day[0]="Wednesday"; Day[1]="Thursday"; Day[2]="Friday"; Day[3]="Saturday"; Day[4]="Sunday"; Day[5]="Monday"; Day[6]="Tuesday"; } static int[] Month=new int[20]; public static void setMonth(){ Mo...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: expected unqualified-id before 'public' 2 | public class Main { | ^~~~~~
s967635616
p00027
C++
#include<iostream> using namespace std; int main(){ int mon,day,week; while(1){ cin>>mon>>day; if(mon==0)break; switch(mon){ case 1: mon=0; break; case 2: mon=31; break; case 3: mon=60; break; case 4: mon=91; break; case 5: mon=121; break; case 6: mon=152; b...
a.cc: In function 'int main()': a.cc:49:31: warning: unknown escape sequence: '\040' 49 | cout<<"??<U+00A8>?????\ Thursday"<<endl; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:52:31: warning: unknown escape sequence: '\040' 52 | cout<<"????...
s695743283
p00027
C++
# include <stdio.h> #include <iostream> using namespace std; int main() { int m,d; string week[7] = {"Thursday", "Friday", "Saturday", "Sunday","Mondy", "Tuesday", Wednesday"}; int month[12] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; while ( scanf("%d %d", &m, &d), m != 0 ) { int day = 0; fo...
a.cc:9:93: warning: missing terminating " character 9 | string week[7] = {"Thursday", "Friday", "Saturday", "Sunday","Mondy", "Tuesday", Wednesday"}; | ^ a.cc:9:93: error: missing terminating " character 9 | st...
s479401953
p00027
C++
from datetime import date import calendar while True: m, d = map(int, input().split()) if not m: break print(calendar.day_name[date(2004, m, d).weekday()])
a.cc:1:1: error: 'from' does not name a type 1 | from datetime import date | ^~~~
s554256829
p00027
C++
#include<iostream> using namespace std; int main() { int day,month,day while(cin>>month>>day&&month!=0) { switch(m) { cace 1 switch(date%7) { case 1; day=4; break; case 2; day=5; break; case 3; day=6; break; case 4; day=7; break; case 5; day=1; break; case 6; day=2; break; case 0; day=3; break; } break; case 2 switch(...
a.cc: In function 'int main()': a.cc:6:1: error: expected initializer before 'while' 6 | while(cin>>month>>day&&month!=0) | ^~~~~
s268986094
p00027
C++
#include<iostream> #include<string> int monthes[]={0,31,29,31,30,31,30,31,31,30,31,30,31}; std::string day[]={"Wednesday","Thursday","Friday","Saturday","Sunday","Monday","Tuesday"}; int main(void){ int m,d,n; while(std::cin>>m>>d){ if(m==0&&d==0) break; n=0; int i; for(i=1;i<...
a.cc: In function 'int main()': a.cc:15:13: error: expected ';' before 'std' 15 | n+=d | ^ | ; 16 | std::cout<<day[n%7]<<std::endl; | ~~~
s768738613
p00027
C++
#include<stdio.h> #include<windows.h> void y(int x ){ if(x == 0) puts("Thursday"); else if(x == 1) puts("Friday"); else if(x == 2) puts("Saturday"); else if(x == 3) puts("Sunday"); else if(x == 4) puts("Monday"); else if(x == 5) puts("Tuesday"); else if(x == 6) puts("Wednesday"); } int main(void)...
a.cc:2:9: fatal error: windows.h: No such file or directory 2 | #include<windows.h> | ^~~~~~~~~~~ compilation terminated.
s942320610
p00027
C++
#include <stdio.h> int total[] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30}; int Sum(int x) { int i, sum = 0; for(i = 0; i < x; i ++) { sum += total[i]; } return sum; } int main() { int month, day; while(scanf("%d %d", &month, &day)) { if(month == 0) break; switch((Sum(month - 1) + day)%7...
a.cc: In function 'int main()': a.cc:34:15: error: expected '}' at end of input 34 | break; | ^ a.cc:19:38: note: to match this '{' 19 | switch((Sum(month - 1) + day)%7) { | ^ a.cc:34:15: error: expected '}' at end of input 34 | ...
s051386015
p00027
C++
#include <stdio.h> int total[] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30}; int Sum(int x) { int i, sum = 0; for(i = 0; i < x; i ++) { sum += total[i]; } return sum; } int main() { int month, day; while(scanf("%d %d", &month, &day)) { if(month == 0) break; switch((Sum(month - 1) + day)%7...
a.cc: In function 'int main()': a.cc:34:15: error: expected '}' at end of input 34 | break; | ^ a.cc:19:38: note: to match this '{' 19 | switch((Sum(month - 1) + day)%7) { | ^ a.cc:34:15: error: expected '}' at end of input 34 | ...
s950127326
p00027
C++
case 6: printf("Tuesday\n"); break; } } return 0; }
a.cc:2:7: error: expected unqualified-id before 'case' 2 | case 6: | ^~~~ a.cc:4:9: error: expected unqualified-id before 'break' 4 | break; | ^~~~~ a.cc:5:5: error: expected declaration before '}' token 5 | } | ^ a.cc:6:3: error: expected declaration be...
s447907240
p00027
C++
#include<iostream> #include<string> using namespace std; int main(){ int a,b,day; string Day; int days[]={31,29,31,30,31,30,31,31,30,31,30,31}; string Days[]={Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday} while(cin>>a>>b){ day=4; for(int i=0;i<11;i++){ if(a>i+1)b+=days[i];} day+=b; day%=7; for(int i=0;i<7...
a.cc: In function 'int main()': a.cc:9:16: error: 'Sunday' was not declared in this scope 9 | string Days[]={Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday} | ^~~~~~ a.cc:9:23: error: 'Monday' was not declared in this scope 9 | string Days[]={Sunday,Monday,Tuesday,Wednesday,Thursd...
s157182402
p00027
C++
#include <iostream> #include <string> using namespace std; int main(){ int n; int m; while(cin >>n>>m){ if(n==0){break;} if(n==2){n=m+31;} if(n==3){n=m+60;} if(n==4){n=m+91;} if(n==5){n=m+121;} if(n==6){n=m+152;} if(n==7){n=m+182;} if(n==8){n=m+213;} if(n==9){n=m+244;} if(n==10){n=m+274;} if(n==11){n=m+305;} if(n==12){...
a.cc: In function 'int main()': a.cc:21:27: error: expected ';' before '}' token 21 | if(n==1){cout <<"Thursday"} | ^ | ; a.cc:22:25: error: expected ';' before '}' token 22 | if(n==2){cout <<"Friday"} | ^ | ...
s313140540
p00027
C++
include<iostream> using namespace std; int main(){ int a[12] = {31,29,31,30,31,30,31,31,30,31,30,31}; int n,m,d; while(cin >> n >> m, n, m){ d = 0; for(int i=0;i<n-1;i++) d = a[i] + d; d = d + m; while(d > 6) d -= 7; if(d == 5) cout << "Monday" << endl; else if(d == 5) cout << ...
a.cc:1:1: error: 'include' does not name a type 1 | include<iostream> | ^~~~~~~ a.cc: In function 'int main()': a.cc:9:9: error: 'cin' was not declared in this scope 9 | while(cin >> n >> m, n, m){ | ^~~ a.cc:19:16: error: 'cout' was not declared in this scope 19 | if(d == 5) cout <...
s480664622
p00027
C++
#include<stdio.h> int main(void) { int a=0,b=0,day=0; while(day != 10) { scnaf("%d %d",&a,&b); if(a==0 || b ==0)break; else if(a==1 || a==4 || a==7) day = 3 + b % 7; else if(a==2 || a==8) day = 6 + b % 7; else if(a==3 || a==11) day = b % 7; else if(a==5) day = 5 + b % 7; else if(a == 6) ...
a.cc: In function 'int main()': a.cc:9:17: error: 'scnaf' was not declared in this scope; did you mean 'scanf'? 9 | scnaf("%d %d",&a,&b); | ^~~~~ | scanf
s975293944
p00027
C++
#include <vector> #include <utility> using namespace std; typedef pair<int,int> MonthDay; int main(){ int monthnum[]={ 31,29,31,30,31,30,31,31,30,31,30,31 }; const string weekname[]={ "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday" }; vector<MonthDa...
a.cc: In function 'int main()': a.cc:9:9: error: 'string' does not name a type 9 | const string weekname[]={ | ^~~~~~ a.cc:20:9: error: 'cin' was not declared in this scope 20 | while(cin>>month>>day){ | ^~~ a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is pro...
s975066008
p00028
Java
import java.util.Scanner; public class AOJ_Volume0028 { public static void main(String[] args){ @SuppressWarnings("resource") Scanner sc = new Scanner(System.in); int[] count = new int[101]; int max,value; while(sc.hasNext()){ value = sc.nextInt(); count[value]++; } max = count[0]; for(int i=0;...
Main.java:4: error: class AOJ_Volume0028 is public, should be declared in a file named AOJ_Volume0028.java public class AOJ_Volume0028 { ^ 1 error
s214628988
p00028
Java
import java.util.Scanner; public class AOJ0028 { public static void main(String[] args){ Scanner input = new Scanner(System.in); int cnt[] = new int[100]; while (input.hasNext()){ int n = input.nextInt(); cnt[--n]++; } int max = 0; for (int n : cnt){ if (max < n){ max = n; } } ...
Main.java:3: error: class AOJ0028 is public, should be declared in a file named AOJ0028.java public class AOJ0028 { ^ 1 error
s582298309
p00028
Java
import java.util.Scanner; public class AOJ0028 { public static void Main(String[] args){ Scanner input = new Scanner(System.in); int cnt[] = new int[100]; while (input.hasNext()){ int n = input.nextInt(); cnt[--n]++; } int max = 0; for (int n : cnt){ if (max < n){ max = n; } } ...
Main.java:3: error: class AOJ0028 is public, should be declared in a file named AOJ0028.java public class AOJ0028 { ^ 1 error
s335271701
p00028
Java
import java.util.*; public class Scanstr { /** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here int max = 0; int[] num; num = new int[101]; Scanner input = new Scanner(System.in); ...
Main.java:2: error: class Scanstr is public, should be declared in a file named Scanstr.java public class Scanstr { ^ 1 error
s858656377
p00028
Java
import java.util.*; public class Scanstr { public static void main(String[] args) { // TODO code application logic here int max = 0; int[] num; num = new int[101]; Scanner input = new Scanner(System.in); while (input.hasNext()){ int n = input.nex...
Main.java:2: error: class Scanstr is public, should be declared in a file named Scanstr.java public class Scanstr { ^ 1 error
s407719839
p00028
Java
import java.util.*; public class Scanstr { public static void main(String[] args) { int max = 0; int[] num; num = new int[101]; Scanner input = new Scanner(System.in); while (input.hasNext()){ int n = input.nextInt(); num[n]++; if ...
Main.java:2: error: class Scanstr is public, should be declared in a file named Scanstr.java public class Scanstr { ^ 1 error
s169484628
p00028
Java
import java.io.*; class Main{ public static void main(String[] args){ BufferedReader br=new BuferedReader(new InputStreamReader(System.in)); String line; int count[]=new int[101]; int max=0; while((line=br.nextLine())!=null){ count[Integer.parseInt(line)]++; } for(int i=1;i<=100;i++){ max=Math.max(max,count[i]); } for...
Main.java:5: error: cannot find symbol BufferedReader br=new BuferedReader(new InputStreamReader(System.in)); ^ symbol: class BuferedReader location: class Main Main.java:9: error: cannot find symbol while((line=br.nextLine())!=null){ ^ symbol: method nextLine() location:...
s145980068
p00028
Java
import java.io.*; class Main{ public static void main(String[] args){ BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); String line; int count[]=new int[101]; int max=0; while((line=br.nextLine())!=null){ count[Integer.parseInt(line)]++; } for(int i=1;i<=100;i++){ max=Math.max(max,count[i]); } fo...
Main.java:9: error: cannot find symbol while((line=br.nextLine())!=null){ ^ symbol: method nextLine() location: variable br of type BufferedReader 1 error
s361220121
p00028
Java
import java.io.*; class Main{ public static void main(String[] args){ BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); String line; int count[]=new int[101]; int max=0; while((line=br.readLine())!=null){ count[Integer.parseInt(line)]++; } for(int i=1;i<=100;i++){ max=Math.max(max,count[i]); } fo...
Main.java:9: error: unreported exception IOException; must be caught or declared to be thrown while((line=br.readLine())!=null){ ^ 1 error
s655052567
p00028
Java
import java.util.*; import java.io.*; public class Mode { public static void main(String[] args) throws Exception{ BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String line = in.readLine(); int[] arr = new int[100]; for (int i = 0; i < 100; i++) { arr[i] = 0; } while(line != ...
Main.java:3: error: class Mode is public, should be declared in a file named Mode.java public class Mode { ^ 1 error
s580700905
p00028
Java
class Main { public static void main(String[] args) { Scanner sc = null; Map<Integer, Integer> nums = new HashMap<Integer, Integer>(); try { sc = new Scanner(System.in); int maxValue = 0; while (sc.hasNextInt()) { int num = sc.nextInt(); nums.put(num, nums.containsKey(num) ? nums.get(num) + 1 ...
Main.java:5: error: cannot find symbol Scanner sc = null; ^ symbol: class Scanner location: class Main Main.java:6: error: cannot find symbol Map<Integer, Integer> nums = new HashMap<Integer, Integer>(); ^ symbol: class Map location: class Main Main.java:6: error: cannot find symbol Map<Integer, I...
s055217221
p00028
Java
import java.io.InputStreamReader; import java.io.BufferedReader; import java.io.IOException; import java.io.File; import java.io.FileReader; import java.io.FileNotFoundException; public class Main { public static void main(String args[] ) throws IOException { BufferedReader br; //input.txt??????????????? ...
Main.java:13: error: cannot find symbol br = InputFile.load(); ^ symbol: variable InputFile location: class Main 1 error
s583236428
p00028
Java
public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int[] array = new int[100]; while (sc.hasNext()) { int number = Integer.parseInt(sc.nextLine()); array[number-1] += number; } for(int i = 0 ; i < array.length ; i++){ if(array[i] > 0 ){ array[i]...
Main.java:4: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:4: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s457050037
p00028
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Map; import java.util.HashMap; public class Main{ static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); public static void main(String[] args) throws IOException{ int num[...
Main.java:15: error: ',', ')', or '[' expected while((String price = br.readLine()) != null){ ^ Main.java:15: error: illegal start of expression while((String price = br.readLine()) != null){ ^ Main.java:15: error: illegal start of expression while((String price = br.rea...
s180448166
p00028
Java
import java.util.*; public class Main{ private static final Scanner scan = new Scanner(System.in); public static void main(String[] args){ int[] count = new int[100]; int max = 0; while(scan.hasNext()){ int a = scan.nextInt(); count[a-1]++; if(count[a-1] > max){ max = count[a-1]: } } for(...
Main.java:13: error: ';' expected max = count[a-1]: ^ 1 error
s392432046
p00028
Java
import java.io.BufferedReader; import java.io.InputStreamReader; //1???100?????´??°???????????????????????????????????????????????????????????? public class Q0028_ModeValue { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); System....
Main.java:8: error: illegal escape character System.out.println("???????????????????????\???"); ^ 1 error
s844037070
p00028
Java
import java.util.*; import java.io.*; public class Main { public static void main(String[] args) throws Exception { Scanner input = new Scanner(System.in); ArrayList<Integer> result = new ArrayList<Integer>(); HashMap<Integer,Integer> count = new HashMap<Integer,Integer>(); int ...
Main.java:22: error: cannot find symbol if(entry.getValue == maxCount) { ^ symbol: variable getValue location: variable entry of type Entry<Integer,Integer> 1 error
s815652640
p00028
Java
import java.util.List; import java.util.ArrayList; import java.util.Scanner; public class Test { public static void main(String args[]){ Scanner stdIn = new Scanner(System.in); int[] intArray = new int[100]; while(stdIn.hasNext()){ intArray[stdIn.nextInt()-1]++; } int[] indexArray = indexOfMaxArrayNumbe...
Main.java:5: error: class Test is public, should be declared in a file named Test.java public class Test { ^ 1 error
s058456461
p00028
Java
import java.io.*; import java.util.Scanner; class Main{ public static void main(String[] args)throws IOException{ Scanner scan = new Scanner(System.in); int[] list = new int[100]; while(scan.hasNextInt()){ list[scan.nextInt()-1]++; } int max =0; for(int i=0;i<list.length;i++){ max ...
Main.java:12: error: cannot find symbol max =Math.Max(max , list[i]); ^ symbol: method Max(int,int) location: class Math 1 error
s766370070
p00028
C
#include<stdio.h> int main(void) { int impo,in[101]={0},i,j,f=0,s=1,t=2; for(i=0;scanf("%d",&impo)!=EOF;i++) { in[impo]++; } if(in[0]<in[1]) { f=1; s=0; } else if(in[0]>=in[1]) { f=0; s=1; } for(i=2;i<101;i++) { if(in[s]<in[...
main.c: In function 'main': main.c:36:8: error: 'a' undeclared (first use in this function) 36 | if(a[f]==a[s]) | ^ main.c:36:8: note: each undeclared identifier is reported only once for each function it appears in
s505422842
p00028
C
include <stdio.h> int main() { int data[128] = {0}; int max = 0; int i; while(scanf("%d", &i) != EOF) { data[i]++; if(data[i] > max) max = data[i]; } for(i = 0; i < 101; i++) { if(data[i] == max) printf("%d\n", i); } return 0; ...
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include <stdio.h> | ^
s058994148
p00028
C
#include<stdio.h> int main(void) { int max=0,a,i; int count[101]={0}; while(scanf("%d",&a)!=EOF){ count[a]++; if(max<count[a]) max=count[a]; } for(i=0;i<100;i++){ if(max==count[i]){ printf("%d\n",i); } return 0; }
main.c: In function 'main': main.c:16:1: error: expected declaration or statement at end of input 16 | } | ^
s970452555
p00028
C
#include <bits/stdc++.h> using namespace std; int main(){ int t[102]={},tmp,k = 0,i; while(cin>>tmp){ t[tmp+1]++; if(t[tmp+1]>k){ k = t[tmp+1]; } } for(i = 1;i <= 102;i++){ if(t[i] == k){ cout<<i-1<<endl; } } return 0; }
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory 1 | #include <bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s867739721
p00028
C
#include <bits/stdc++.h> using namespace std; int main(){ int t[102]={},tmp,k = 0,i; while(cin>>tmp){ t[tmp+1]++; if(t[tmp+1]>k){ k = t[tmp+1]; } } for(i = 1;i <= 102;i++){ if(t[i] == k){ cout<<i-1<<endl; } } return 0; }
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory 1 | #include <bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s692641027
p00028
C
#include<stdio.h> #include<iostream> using namespace std; int main(){ int j,k; int v[200]={0}; int a; int max=0; while((scanf("%d",&a)!=EOF)){ v[a-1]++; } for(k=0;k<100;k++){ if(max < v[k]) max = v[k]; } for(k=0;k<100;k++){ if(v[k]==max) printf("%d\n",k+1); } return 0; }...
main.c:2:9: fatal error: iostream: No such file or directory 2 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s581136858
p00028
C
#include <iostream> using namespace std; int main(){ int num, max; int list[100] = {0}; max = 0; while (cin >> num){ list[num - 1]++; } for (int i = 0; i < 100; i++){ if (max < list[i]){ max = list[i]; } } for (int j = 0; j < 100; j++){ if (max == list[j]){ cout << j + 1 << endl; } } retu...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s849512654
p00028
C
int main(void){ int i, sum[1000],ma, a, key, MAX; for(i = 0; i < 100; i++){ sum[i] = 0; } while(scanf("%d", &a) != EOF){ sum[a - 1]++; } MAX = sum[0]; key = 1; for(i = 0; i < 100; i++){ if(sum[i] > MAX){ MAX = sum[i]; key = i + 1; } } printf("%d",...
main.c: In function 'main': main.c:6:10: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 6 | while(scanf("%d", &a) != EOF){ | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | int main(void){ main.c:...
s196440672
p00028
C
int main(void){ int i, sum[1000],???a, key, MAX; for(i = 0; i < 100; i++){ sum[i] = 0; } while(scanf("%d", &a) != EOF){ sum[a - 1]++; } MAX = sum[0]; key = 1; for(i = 0; i < 100; i++){ if(sum[i] > MAX){ MAX = sum[i]; key = i + 1; } } printf("%d", k...
main.c: In function 'main': main.c:2:21: error: expected identifier or '(' before '?' token 2 | int i, sum[1000],???a, key, MAX; | ^ main.c:6:10: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 6 | while(scanf("%d", &a) != EOF){ | ...
s274448237
p00028
C
int main(void){ int i, sum[1000], a, key, MAX; for(i = 0; i < 100; i++){ sum[i] = 0; } while(scanf("%d", &a) != EOF){ sum[a - 1]++; } MAX = sum[0]; key = 1; for(i = 0; i < 100; i++){ if(sum[i] > MAX){ MAX = sum[i]; } } for(i = 0; i < 100; i++){ if(sum...
main.c: In function 'main': main.c:6:10: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 6 | while(scanf("%d", &a) != EOF){ | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | int main(void){ main.c:...
s934284939
p00028
C
#include<iostream> using namespace std; int main() { int a[100+1]={0}; int t; while(~scanf("%d",&t)) a[t]++; int max=0; for(int i=0;i<101;i++) if(a[i]>max) max=a[i]; for(int i=0;i<101;i++) if(a[i]==max) cout<<i<<endl; }
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s737043375
p00028
C
#include <iostream> using namespace std; int main() { int cnt[100] = {0}; int num; int max_v = 0; while(cin >> num) { cnt[num-1]++; max_v = max(max_v, cnt[num-1]); } for (int i=0; i<100; i++) { if (cnt[i] == max_v) cout << i+1 << endl; } re...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s075120114
p00028
C
#include "stdafx.h" int main() { int a[100] = { 0 }, i, max=0; while (scanf("%d", &i) != EOF) a[i - 1]++; for (i = 0; i < 100; i++) if (max < a[i]) max = a[i]; for (i = 0; i < 100; i++) if (max == a[i]) prinf("%d\n", i + 1); return 0; }
main.c:1:10: fatal error: stdafx.h: No such file or directory 1 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s400129702
p00028
C
#include<stdio.h> int main() { int a[100] = { 0 }, i, max=0; while (scanf("%d", &i) != EOF) a[i - 1]++; for (i = 0; i < 100; i++) if (max < a[i]) max = a[i]; for (i = 0; i < 100; i++) if (max == a[i]) prinf("%d\n", i + 1); return 0; }
main.c: In function 'main': main.c:11:34: error: implicit declaration of function 'prinf'; did you mean 'printf'? [-Wimplicit-function-declaration] 11 | if (max == a[i]) prinf("%d\n", i + 1); | ^~~~~ | printf
s040558808
p00028
C
a[],i;main(m){for(;~scanf("%d",a)?m=fmax(++a[*a]):i++>99?!i:m-a[i]||printf("%d\n",i););}
main.c:1:1: warning: data definition has no type or storage class 1 | a[],i;main(m){for(;~scanf("%d",a)?m=fmax(++a[*a]):i++>99?!i:m-a[i]||printf("%d\n",i););} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int] main.c:1:5: error: type defaults to 'int' in declaration of 'i' [-...
s551128111
p00028
C
a[],i;main(m){for(;~scanf("%d",a)?m=max(m,++a[*a]):i++>99?!i:m-a[i]||printf("%d\n",i););}
main.c:1:1: warning: data definition has no type or storage class 1 | a[],i;main(m){for(;~scanf("%d",a)?m=max(m,++a[*a]):i++>99?!i:m-a[i]||printf("%d\n",i););} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int] main.c:1:5: error: type defaults to 'int' in declaration of 'i' [...
s505314721
p00028
C
#include <stdio.h> int main(){ int x[101]={}; int y[101]={}; int n,i,j; while(scanf("%d",&n) != EOF){ x[n]++; } for(i=0;i<101;i++){ for(j=0;j<101 && j != i;j++){ if(x[i]<x[j]){ y[i]++; } } for(i=0;i<101;i++){ if(y[i]==0) printf("%d\n",i); } return 0; }
main.c: In function 'main': main.c:20:1: error: expected declaration or statement at end of input 20 | } | ^
s390885529
p00028
C
#include <stdio.h> int main(){ int x[101]={}; int y[101]={}; int n,i,j; while(scanf("%d",&n) != EOF){ x[n]++; } for(i=0;i<101;i++){ for(j=0;j<101;j++){ if(x[i]<x[j]){ y[i]++; } } for(i=0;i<101;i++){ if(y[i]==0) printf("%d\n",i); } return 0; }
main.c: In function 'main': main.c:20:1: error: expected declaration or statement at end of input 20 | } | ^
s671689371
p00028
C
include<stdio.h> int main() { int a[101]={0},b[101]={-1}; int i,j=0,inp,max=0; while(scanf("%d",&inp) != EOF) { if(inp<0 || inp>100) continue; a[inp]++; } for(i=0;i<101;i++) { if(max<a[i]) { max=a[i]; } } for(i=0;i<101;i++) { if(max==a[i]) { printf("%d\n",i); } } return 0; }
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include<stdio.h> | ^
s955844721
p00028
C
#include<stdio.h> int main(){ int a[100],g,y,i=0; a[100]={0}; g=0; while(scanf("%d",&i)!=EOF){ a[i]++; } for(i=0;i<100;i++){ if(a[i]>g){ g=a[i]; y=i; } } printf("%d\n",y); return (0); }
main.c: In function 'main': main.c:4:8: error: expected expression before '{' token 4 | a[100]={0}; | ^ main.c:16:7: error: stray '\343' in program 16 | return<U+3000>(0); | ^~~~~~~~
s789710196
p00028
C
#include<stdio.h> int main(void) { int x[101]={0},int y[101]={0}; int i=0,max; while(scanf("%d",&x[i])!=EOF) { y[x[i]] ++; i ++; } max = y[0]; for(i=1; i<101; i++){ if(max < y[i]) max = y[i]; } //maxは、数字のカウントの最大。つまり、何回カウントしたか。 for(i=0; i<101; i++){ if(max == y[i]) //カウント数が等しかったら、 { pr...
main.c: In function 'main': main.c:4:17: error: expected identifier or '(' before 'int' 4 | int x[101]={0},int y[101]={0}; | ^~~ main.c:8:4: error: 'y' undeclared (first use in this function) 8 | y[x[i]] ++; | ^ main.c:8:4: note: each undeclared identifier is reported only onc...
s528498666
p00028
C++
#include<bits/stdc++.h> using namespace std; int main() { int n; while(scanf("%d",&n)!=EOF) { int num[1000]={0}; for(int i=1;i<=n;i++) { int a; cin>>a; num[a]++; } int ans=0,now=0; for(int i=1;i<=105;i++) { if(num[i]>ans) { ans=num[i]; now=i; } } cout<<now<<endl; } }
a.cc: In function 'int main()': a.cc:21:5: error: 'i\U0000ff1b' was not declared in this scope 21 | now=i; | ^~~
s528644343
p00028
C++
#include<iostream> #include<vector> using namespace std; int main(){ vector<int>Times(101,0); int x; while(cin >> x){ cin>>x; Times[x]+=1; } int ma =-1 for(int x=1; x<=100; x++){ if(ma<Times[x]) ma=Times[x] } for(int x=1; x<=100; x++){ if(Times[x]...
a.cc: In function 'int main()': a.cc:15:5: error: expected ',' or ';' before 'for' 15 | for(int x=1; x<=100; x++){ | ^~~ a.cc:15:29: error: expected ';' before ')' token 15 | for(int x=1; x<=100; x++){ | ^ | ;
s426698308
p00028
C++
#include<iostream> #include<cstdio> #include<vector> using namespace std; int main() { int a[100]; for(int i=0;i<100;i++)a[i]=0; int n; while(cin >> n){ a[n-1]++; } int ans=0; for(int i=1;i<100;i++){ if(a[ans]<a[i])ans=i; } cout << i+1 << "\n"; return 0; }
a.cc: In function 'int main()': a.cc:17:9: error: 'i' was not declared in this scope 17 | cout << i+1 << "\n"; | ^
s566223990
p00028
C++
#include <algorithm> #include <functional> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <string> #include <sstream> #include <iostream> #include <iomanip> #include <vector> #include <list> #include <stack> #include <queue> #include <map> #include <set> #include <bitset> #include <cl...
a.cc: In function 'int main()': a.cc:40:27: error: invalid conversion from 'int*' to 'int' [-fpermissive] 40 | int maxi = max_element(ary,ary+105); | ~~~~~~~~~~~^~~~~~~~~~~~~ | | | int*
s858643183
p00028
C++
#include <stdio.h> int main() { int n; int a[100+1]; int max = 0; for(int i = 0; i < 101; i++){ a[i] = 0; } while(scanf("%d",&n) != EOF){ a[n]++; } for(int i = 0; i < 101; i++){ if(max < a[i]){ max = a[i]; } } for(int i = 0; i < 101; i++){ if(max == a[i]){ printf("%d\n",i); } } Sleep(2000...
a.cc: In function 'int main()': a.cc:24:9: error: 'Sleep' was not declared in this scope 24 | Sleep(2000); | ^~~~~
s675620841
p00028
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { vector<int> Vec(100); int n; while(cin>>n){ Vec[n]++; } int max_r = 0, ans; for(int i=0;i<100;i++){ max_r = max( max_r, Vec[i]); } for(int i=0;i<100;i++){ if(max_r == Vec[i]){ ans = i; } } cout<<i<<endl; ...
a.cc: In function 'int main()': a.cc:22:15: error: 'i' was not declared in this scope 22 | cout<<i<<endl; | ^
s140080394
p00028
C++
#include <string> #include <vector> #include <algorithm> #include <iostream> #include <cstdio> #include <cstdlib> #include <cmath> #include <queue> #include <map> #define INF 100000000 #define rep(i,a) for(int i=0;i<(a);i++) using namespace std; typedef long long ll; int main(){ queue<int> ans; int ma=-1; ...
a.cc: In function 'int main()': a.cc:29:5: error: expected primary-expression before '}' token 29 | } | ^
s476364670
p00028
C++
#include <iostream> using namespace std; int main(){ int hist[100]; for(int i=0; i<100;i++) hist[i] = 0; int n; while(cin >> n) hist[n]++; int maxv = 0; for(int i=0;i<100;i++){ if(ans[i] > maxv) maxv = ans[i]; } for(int i=0;i<100;i++){ if(maxv == hist[i]) cout << i << endl; } retur...
a.cc: In function 'int main()': a.cc:13:8: error: 'ans' was not declared in this scope; did you mean 'abs'? 13 | if(ans[i] > maxv) maxv = ans[i]; | ^~~ | abs
s840466638
p00028
C++
#include <iostream> using namespace std; int main(){ int hist[100]; for(int i=0; i<100;i++) hist[i] = 0; int n; while(cin >> n) hist[n]++; int maxv = 0; for(int i=0;i<100;i++){ if(ans[i] > maxv) maxv = hist[i]; } for(int i=0;i<100;i++){ if(maxv == hist[i]) cout << i << endl; } retu...
a.cc: In function 'int main()': a.cc:13:8: error: 'ans' was not declared in this scope; did you mean 'abs'? 13 | if(ans[i] > maxv) maxv = hist[i]; | ^~~ | abs
s400687665
p00028
C++
#include<iostream> #include<cstdio> #include<algorithm> using namespace std; int sum[101],n,mx,cou; int main(){ while(cin>>n){ sum[n]++; } for(int i=0;i<100;i++)mx=max(mx,sum[i]); for(int i=0;i<100;i++){ if(mx==sum[i]){ cout<<i<<endl; } cout<<endl; return 0; }
a.cc: In function 'int main()': a.cc:17:2: error: expected '}' at end of input 17 | } | ^ a.cc:6:11: note: to match this '{' 6 | int main(){ | ^
s824679974
p00028
C++
#include<iostream> #include<cstdio> #include<algorithm> using namespace std; int sum[101],n,mx,cou; int main(){ while(cin>>n){ sum[n]++; } for(int i=0;i<100;i++)mx=max(mx,sum[i]); for(int i=0;i<100;i++){ if(mx==sum[i]){ cout<<i<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:16:2: error: expected '}' at end of input 16 | } | ^ a.cc:6:11: note: to match this '{' 6 | int main(){ | ^
s292310414
p00028
C++
import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner input = new Scanner(System.in); int cnt[] = new int[100]; while (input.hasNext()){ int n = input.nextInt(); cnt[--n]++; } int max = 0; for (int n : cnt){ if (max < n){ max = n; } } fo...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Scanner; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: expected unqualified-id before 'public' 3 | public class Main { | ^~~~~~
s681423622
p00028
C++
#include <iostream> //using namespace std; #define N 100 #define MYSCAN scanf_s int main(void){ int i; int input, max = 0; int bucket[N + 1]; // テゥツ?催・ツ按療」ツ?ョテ・ツ按敕ヲツ慊淌・ツ個? for (int i = 0; i < N + 1; i++){ bucket[i] = 0; } // テ・ツ?・テ・ツ環崚」ツ?ォテ」ツ?療」ツ?淌」ツ?古」ツ?」テ」ツ?ヲテゥツ??ヲツャツ。テゥツ?催・ツ按療」ツつ津」ツつォテ」ツつヲテ」ツδウテ」ツδ暗」ツつ...
a.cc: In function 'int main()': a.cc:5:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 5 | #define MYSCAN scanf_s | ^~~~~~~ a.cc:19:16: note: in expansion of macro 'MYSCAN' 19 | while (MYSCAN("%d", &input) != EOF){ | ^~~~~~
s980869672
p00028
C++
#include<iostream> #include<string.h> #include<vector> using namespace std; int main() { int a[101]; memset(a,0,sizeof(a)); vector<int>vec; int in; while(cin>>in){ a[in]++; } int m=0; for(int i=0;i<101;i++){ if(a[i]>m){ vec.clear(); vec.push_back(i...
a.cc: In function 'int main()': a.cc:24:5: error: 'sort' was not declared in this scope; did you mean 'short'? 24 | sort(vec.begin(),vec.end()); | ^~~~ | short
s194054892
p00028
C++
#include<iostream> using namespace std; int main(){ int numbers[100] , x ,y; y = max(numbers[x]); while ( cin >> x ){ numbers[x - 1]++; } while ( y != 1 ){ cout << numbers[x] << endl; } return 0; }
a.cc: In function 'int main()': a.cc:7:8: error: no matching function for call to 'max(int&)' 7 | y = max(numbers[x]); | ~~~^~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/i...
s985942329
p00028
C++
#include<iostream> using namespace std; int main(){ int numbers[100] , x ,y, i; while ( cin >> x ){ numbers[x - 1]++; } y = 0; for( i = 0 ; i < 100 ; i++ ){ ??????if (numbers[i] > y){ y = numbers[i]; } } for ( i = 0 ; i < 100 ; i++ ) { if ( y == numbers[i] ){ cout << i + 1 << endl; } }...
a.cc: In function 'int main()': a.cc:14:1: error: expected primary-expression before '?' token 14 | ??????if (numbers[i] > y){ | ^ a.cc:14:2: error: expected primary-expression before '?' token 14 | ??????if (numbers[i] > y){ | ^ a.cc:14:3: error: expected primary-expression before '?' token 14 | ...
s161310141
p00028
C++
#include <iostream> #include<cmath> using namespace std; void Solution() { int n; int a[101] = {0}; // the array which saves the mode value, at the beginning is all "0" while(cin>>n) { a[n]++; //after input some value, array's value can be added by 1 (0 -> 1), repeat this part. }...
a.cc:10:22: error: extended character   is not valid in an identifier 10 | int a[101] = {0}; // the array which saves the mode value, at the beginning is all "0" | ^ a.cc: In function 'void Solution()': a.cc:10:22: error: '\U00003000' was not declared in this scope 10 | int a[10...
s508301653
p00028
C++
#include <iostream> #include<cmath> using namespace std; void Solution() { int n; int times = 0; // save the data in here about most frequently times int a[101] = {0}; // the array which saves the mode value, at the beginning is all "0" while(cin>>n) { a[n]++; //after input ...
a.cc:12:22: error: extended character   is not valid in an identifier 12 | int a[101] = {0}; // the array which saves the mode value, at the beginning is all "0" | ^ a.cc: In function 'void Solution()': a.cc:12:22: error: '\U00003000' was not declared in this scope 12 | int a[10...
s597590261
p00028
C++
#include <iostream> #include<cmath> using namespace std; void Solution() { int n; int times = 0; // save the data in here about most frequently times int a[101] = {0}; // the array which saves the mode value, at the beginning is all "0" while(cin>>n) { a[n]++; //after input ...
a.cc:12:22: error: extended character   is not valid in an identifier 12 | int a[101] = {0}; // the array which saves the mode value, at the beginning is all "0" | ^ a.cc: In function 'void Solution()': a.cc:12:22: error: '\U00003000' was not declared in this scope 12 | int a[10...
s065054073
p00028
C++
#include <iostream> using namespace std; int main() { int d[101]={0}, ????????????a,m=0; while(cin>>a){ d[a]++; m=max(m,d[a]); } for(int i=1;i<=100;i++){ if(m==d[i]) ????????????cout<<i<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:7:1: error: expected unqualified-id before '?' token 7 | ????????????a,m=0; | ^ a.cc:8:16: error: 'a' was not declared in this scope 8 | while(cin>>a){ | ^ a.cc:10:9: error: 'm' was not declared in this scope 10 | m=max(m,d[a]); ...
s273872977
p00028
C++
#include <cstdio> #include <vector> using namespace std; int main(){ vector<int> data(101,0); int v; while(scanf("%d",&v)!=-1)data[v]++; int mxvl=0; vector<int> res; for(int i=0;i<=100;++i;){ if(mxvl < data[i]){ mxvl = data[i]; res.clear(); } if(mxvl == data[i])res.push_back(i); } for(int i=0;i<res.size();++i)printf(...
a.cc: In function 'int main()': a.cc:12:23: error: expected ')' before ';' token 12 | for(int i=0;i<=100;++i;){ | ~ ^ | ) a.cc:12:24: error: expected primary-expression before ')' token 12 | for(int i=0;i<=100;++i;){ | ^
s084873938
p00028
C++
#include <string> #include <vector> #include <iostream> #include <complex> #include <map> using namespace std; typedef vector<int> VI; #define REP(i,s,t) for(int i=(s);i<(t);i++) int main() { int i; map<int, int> count; while (cin >> i){ map<int, int>::iterator it = count.find(i); if (it!=...
a.cc: In function 'int main()': a.cc:34:10: error: 'sort' is not a member of 'std'; did you mean 'sqrt'? 34 | std::sort(m.begin(), m.end()); | ^~~~ | sqrt
s605533727
p00028
C++
#include <iostream> #include <cmath> #include <vector> using namespace std; #define LENGTH 100 int main(){ vector<int> Digit(LENGTH, 0); int tmp; int cnt=0; while(cin >> tmp){ cnt++; Digit[tmp]++; } int max = 0; vector<int> maxDigits; for(int i=0;i<cnt;i++){ if(Digit[i]>max){ ...
a.cc: In function 'int main()': a.cc:37:3: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 37 | sort(maxDigits.begin(), maxDigits.end()); | ^~~~ | sqrt
s070309791
p00028
C++
#include <iostream> #include <math.h> using namespace std; int main(){ int a[101] = {0}; int b; int MAX = 0; while(cin >> b){ a[b]++; } for(int j=1; j<101; i++){ MAX = max(MAX, a[j]); } for(int m=1; m<101; m++){ if(MAX == a[m]){ cout << m << endl; } } }
a.cc: In function 'int main()': a.cc:14:29: error: 'i' was not declared in this scope 14 | for(int j=1; j<101; i++){ | ^
s331668330
p00028
C++
#define scanf_s scanf //#define gets_s gets #include <stdio.h> #include <string> #include <iostream> #include <math.h> using namespace std; #define MAX 50//00 #define MIN -100001 #define _MAX 100 #define g 9.8 #define d 4.9 int main(void) { int a[_MAX] = { 0 }, x, max = 0; while (scanf_s("%d", &x) != EOF) { ++a[x -...
a.cc: In function 'int main()': a.cc:24:10: error: 's' was not declared in this scope 24 | }s | ^
s445077891
p00028
C++
#define scanf_s scanf //#define gets_s gets #include <stdio.h> #include <string> #include <iostream> #include <math.h> using namespace std; #define MAX 50//00 #define MIN -100001 #define _MAX 100 #define g 9.8 #define d 4.9 int main(void) { int a[_MAX] = { 0 }, x, max = 0; while (scanf_s("%d", &x) != EOF) { ++a[x -...
a.cc: In function 'int main()': a.cc:24:10: error: 's' was not declared in this scope 24 | }s | ^
s125329705
p00028
C++
#include<iostream> using namespace std; int main(){ int i,a[100]; while(cin >> i) a[i-1]++; int m = max(a[100]); while(int j = 0; j <100; j++){ if(a[j] == m) cout << j + 1 << "\n"; } }
a.cc: In function 'int main()': a.cc:7:14: error: no matching function for call to 'max(int&)' 7 | int m = max(a[100]); | ~~~^~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/b...
s234091533
p00028
C++
#include<iostream> #include<algorithm> #define N 101 using namespace std; int main(){ int i, m, a[N] = {}; while(cin >> i) a[i]++; for(int j = 1; j < N; j++) m = max(m,a[j]); for(int k = 1; k < N; k++) if(a[k] == max) cout << k << "\n"; }
a.cc: In function 'int main()': a.cc:16:13: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator==' 16 | if(a[k] == max) | ~~~~~^~~~~~
s504856490
p00028
C++
5 6 3 5 8 7 5 3 9 7 3 4
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 5 | ^
s114515380
p00028
C++
#include <cstdio> #include <iostream> #include <algorithm> using namespace std; int main() { int a, max1=0,b[101] = {}; while (CI a) { b[a]++; max1 = max(b[a], max1); } for (int i = 0; i < 101; i++) { if (b[i] == max1)CO i EN; } return 0; }
a.cc: In function 'int main()': a.cc:11:16: error: 'CI' was not declared in this scope 11 | while (CI a) { | ^~ a.cc:11:18: error: expected ')' before 'a' 11 | while (CI a) { | ~ ^~ | ) a.cc:11:20: error: expected ';' before ')' toke...
s694776169
p00028
C++
int main() { int i; int seed,max = 0; int data[100] = { 0 }; int maxnum[100]; while ((scanf("%d", &seed)) != EOF) { data[seed] += 1; } for (i = 0; i < 100; i++) { if (data[i] > max) max = data[i]; } for (i = 0; i < 100; i++) { if (data[i] == max) printf("%d\n", i + 1); } return 0; }
a.cc: In function 'int main()': a.cc:7:17: error: 'scanf' was not declared in this scope 7 | while ((scanf("%d", &seed)) != EOF) | ^~~~~ a.cc:7:40: error: 'EOF' was not declared in this scope 7 | while ((scanf("%d", &seed)) != EOF) | ...
s906536638
p00028
C++
#include <stdio.h> int main() { int i; int seed,max = 0; int data[100] = { 0 }; int maxnum[100]; while ((scanf_s("%d", &seed)) != EOF) { data[seed-1] += 1; } for (i = 0; i < 100; i++) { if (data[i] > max) max = data[i]; } for (i = 0; i < 100; i++) { if (data[i] == max) printf("%d\n", i + 1); } retu...
a.cc: In function 'int main()': a.cc:9:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 9 | while ((scanf_s("%d", &seed)) != EOF) | ^~~~~~~ | scanf
s888733268
p00028
C++
#include <vector> #include <list> #include <map> #include <set> #include <queue> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <cstdlib> #include <string> #define REP(i, n) for(int i = 0;i < n;i++) #define ll l...
a.cc: In function 'int main()': a.cc:35:25: error: 'v' was not declared in this scope 35 | v[f] = i; | ^
s165980216
p00028
C++
#include<iostream> #include<algorithm> using namespace std; int main(){ int a[10000]={0}; int s,sai,ans=0,c=0; while(cin>>s){ a[s]++; c++; } for(i=0;i<c;i++){ if(a[i]>ans){ ans=a[i]; sai=i; } cout<<sai<<endl<<ans<<endl; return 0; }
a.cc: In function 'int main()': a.cc:11:5: error: 'i' was not declared in this scope 11 | for(i=0;i<c;i++){ | ^ a.cc:18:2: error: expected '}' at end of input 18 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s966946349
p00028
C++
#include<iostream> #include<algorithm> using namespace std; int main(){ int a[10000]={0}; int s,sai,ans=0,c=0,i; while(cin>>s){ a[s]++; c++; } for(i=0;i<c;i++){ if(a[i]>ans){ ans=a[i]; sai=i; } cout<<sai<<endl<<ans<<endl; return 0; }
a.cc: In function 'int main()': a.cc:19:2: error: expected '}' at end of input 19 | } | ^ a.cc:5:11: note: to match this '{' 5 | int main(){ | ^
s700877941
p00028
C++
#include <iostream> int main(){ int a,c=0,t=0; int b[100],f[100],z[100]; z[0]=0; for(int ds=0;ds<12;ds++){ std::cin>>a; c++; b[c]=a; } for(int g=1;g<=100;g++){ f[g]=0; z[g]=0; } for(int d=1;d<=c;d++){ f[b[d]]++; } for(int g=1;g<=100;g++){ if(f[g]>z[0]){ z[0]=g; t=0; ...
a.cc: In function 'int main()': a.cc:25:47: error: expected ';' before 't' 25 | }else if(f[g]==z[0]){a | ^ | ; 26 | t++; | ...
s627303112
p00028
C++
#include<iostream> using namespace std; int main(){ int a,n; int my_array[101]={}; while(cin>>a){ my_array[a]++; } int b=0; for(n=1;n<=100;n++){ if(b>my_array[n]) b=my_array[n]; } for(int c=0;c<=100;c++){ if(b==my_array[c]) cout<<c<<endl; }
a.cc: In function 'int main()': a.cc:20:4: error: expected '}' at end of input 20 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s256382501
p00028
C++
#include<iostream> #include<vector> #include <iostream> using namespace std; struct DATA{ int number; int count; }; void PushWordCount(int, vector<DATA>&); bool Compare(const int&, const int&); int main(){ int i, n, max = 0; vector<int> Max; vector<DATA> data; while(cin >> n) PushWordCount(n, data)...
a.cc: In function 'int main()': a.cc:32:3: error: 'sort' was not declared in this scope; did you mean 'short'? 32 | sort(Max.begin(), Max.end()); | ^~~~ | short
s955167366
p00028
C++
#include<iostream> using namespace std; int main(){ int n; int nn[100]; int max = 0; for(int i=0;i<100;i++){ nn[i] = 0; } while(cin >> n){ nn[n-1] += 1 if(nn[n-1] > max){ max = nn[n-1]; } } for(int i=0;i<100;i++){ if(nn[i] == max){ ...
a.cc: In function 'int main()': a.cc:12:21: error: expected ';' before 'if' 12 | nn[n-1] += 1 | ^ | ; 13 | if(nn[n-1] > max){ | ~~
s108379335
p00028
C++
#include <stdio.h> #include<math.h> #include <string.h> #include <ctype.h> int main(){ int i,n; int max,a[100]={0}; while(scanf("%d",&n)!=EOF){ a[n]++; } max=0; for(i=0;i<100;i++){ if(max<a[i]){ max=a[i]; } for(i=0;i<100;i++){ if(a[i]==max){ printf("%d\n",i); } return 0; }
a.cc: In function 'int main()': a.cc:22:2: error: expected '}' at end of input 22 | } | ^ a.cc:13:19: note: to match this '{' 13 | for(i=0;i<100;i++){ | ^ a.cc:22:2: error: expected '}' at end of input 22 | } | ^ a.cc:6:11: note: to match this '{' 6 | int main(){ ...