submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s775209194
p00121
C++
#include <iostream> #include <vector> #include <string> #include <queue> #define INF 10000000 using namespace std; typedef pair<int,int> P; void swap(char *a,char *b){ char temp = *a; *a = *b; *b = temp; } int main(){ string input = ""; char temp; for(int i=0;i<8;i++){ cin >> temp; input.push_back...
a.cc: In function 'int main()': a.cc:38:14: error: no matching function for call to 'find(std::vector<std::__cxx11::basic_string<char> >::iterator, std::vector<std::__cxx11::basic_string<char> >::iterator, std::string&)' 38 | if(find(que.begin(),que.end(),next)==que.end()){ | ~~~~^~~~~~~~~~~~~~~...
s885764310
p00121
C++
#include <iostream> #include <vector> #include <string> #include <queue> #include <map> #define INF 10000000 using namespace std; typedef pair<int,int> P; void swap(char *a,char *b){ char temp = *a; *a = *b; *b = temp; } int main(){ int dx[] = {+1,-1,+4,-4}; string start = "01234567"; queue<string> que...
a.cc:56:1: error: expected declaration before '}' token 56 | } | ^
s773738479
p00122
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> #define REP(i,k,n) for(int i=k;i<n;i++) #define rep(i,n) for(int i=0;i<n;i++) #define pb push_back #define mp make_pair using namespace std; int dx[12] = {-1, 0, 1, 2, 2, 2, 1, 0,-1,-2,-2,-2}; int dy[12] = { 2, 2, 2, 1, 0,-1,-2,-2,-2,-1, 0,...
a.cc: In function 'void dfs(int, int, int, int)': a.cc:29:17: error: 'memset' was not declared in this scope 29 | memset(f,0,sizeof(f)); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include <...
s028877653
p00122
C++
import std.stdio; import std.algorithm; import std.string; import std.range; import std.array; import std.conv; import std.complex; import std.math; import std.ascii; import std.bigint; import std.container; bool next(bool[][] m, int x, int y){ auto s = new bool[][](10+4, 10+4); foreach(i; -1..2){ foreach(j; -1..2...
a.cc:15:21: error: too many decimal points in number 15 | foreach(i; -1..2){ | ^~~~ a.cc:16:29: error: too many decimal points in number 16 | foreach(j; -1..2){ | ^~~~ a.cc:20:20: error: too many decimal points in number 20 | ...
s547913386
p00122
C++
#include<bits/stdc++.h> #define mk make_pair using namespace std; int dx[]={2,2,2,1,1,0,0,-1,-1,-2,-2,-2}; int dy[]={1,0,-1,2,-2,2,-2,2,-2,1,0,-1}; int n,px,py,x,y; int main(){ while(cin>>px>>py,px+py){ cin>>n; vector<pair<int,int> >v; v.push_back(mk(px,py)); if(n==0)cout<<"NA"<<endl; else{ fo...
a.cc: In function 'int main()': a.cc:30:8: error: 'dfs' was not declared in this scope; did you mean 'ffs'? 30 | if(dfs(px,py,0))cout<<"OK"<<endl; | ^~~ | ffs
s098645361
p00122
C++
#include <iostream> #include <vector> #include <algorithm> #include <cstdio> #include <queue> using namespace std; typedef pair<int, int> P; typedef pair<int, P> S; const int dx[] = {-2, -2, -2, -1, 0, 1, 2, 2, 2, 1, 0, -1}; const int dy[] = {-1, 0, 1, 2, 2, 2, 1, 0, -1, -2 , -2, -2 }; bool check(int x, int y) { ...
a.cc: In function 'int main()': a.cc:26:9: error: 'memset' was not declared in this scope 26 | memset(field, 0, 10 * 10); | ^~~~~~ a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 5 | #include <queue> +++ |+#include <cstri...
s972014749
p00122
C++
NA: mlst.clear(); nxt.clear(); for(i=0;i<10;i++){ for(j=0;j<10;j++){ mp[i][j].clear(); } } }while(1); return 0; }
a.cc:1:4: error: found ':' in nested-name-specifier, expected '::' 1 | NA: | ^ | :: a.cc:1:2: error: 'NA' does not name a type 1 | NA: | ^~ a.cc:3:5: error: 'nxt' does not name a type 3 | nxt.clear(); | ^~~ a.cc:4:5: error: expected unqualified-id before 'for' 4 ...
s569877037
p00122
C++
return 1; } } return 0;//‚Ç‚¤‚ ‚ª‚¢‚Ä‚àâ–] } int main(){ int posX, posY; while(std::cin >> posX >> posY, posX && posY){ std::cin >> n; for(int i=0;i<n;i++){ int wposX, wposY; std::cin >> wposX >> wposY; wpos[i] = P(wposX, wposY); } if(dfs(posX, posY, 0))puts("OK"); else puts("NA"); }...
a.cc:1:33: error: expected unqualified-id before 'return' 1 | return 1; | ^~~~~~ a.cc:2:17: error: expected declaration before '}' token 2 | } | ^ a.cc:3:9: error: expected declaration before '}' token ...
s732530322
p00122
C++
g#include <iostream> #include <cmath> #include <cstring> #include <deque> using namespace std; #define MAX_YX 10 int park[MAX_YX][MAX_YX]; int n; int sy, sx; int dy[] = {-2, -2, -2, -1, -1, 0, 0, 1, 1, 2, 2, 2}; int dx[] = {-1, 0, 1, -2, 2, -2, 2, -2, 2, -1, 0, 1}; bool dfs(int y, int x, int t) { if (t == n) { ...
a.cc:1:2: error: stray '#' in program 1 | g#include <iostream> | ^ a.cc:1:1: error: 'g' does not name a type 1 | g#include <iostream> | ^ In file included from /usr/include/c++/14/cmath:45, from a.cc:2: /usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gn...
s731853977
p00123
Java
ublic class Main { double[] grade_500 = {35.5, 37.5, 40.0, 43.0, 50.0, 55.0, 70.0}; double[] grade_1000 = {71.0, 77.0, 83.0, 89.0, 105.0, 116.0, 148.0}; String[] grade = {"AAA", "AA", "A", "B", "C", "D", "E"}; public void solve() throws IOException{ while( stdIn.hasNext() ){ double x = stdIn.nextDouble(); d...
Main.java:1: error: class, interface, enum, or record expected ublic class Main { ^ 1 error
s964511372
p00123
C
int main(void) { float a, b; while (scanf("%f %f", &a, &b) != EOF){ if ( a < 35.5 && b < 71){ printf("AAA\n"); } else if ( a < 37.5 && b < 77){ printf("AA\n"); } else if ( a < 40 && b < 83){ printf("A\n"); } else if ( a < 43 && b < 89){ printf("B\n"); } else if ( a < 50 && b < 105){ ...
main.c: In function 'main': main.c:5:16: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 5 | while (scanf("%f %f", &a, &b) != EOF){ | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | int ...
s400345094
p00123
C
#include<stdioh> int main(void) { double a, b; scanf("%f %f",&a,&b); if(a <= 35.5) if(b <= 71.0) printf("AAA\n"); else if(b <= 77.0) printf("AA\n"); else if(b <= 83.0) printf("A\n"); else if(b <= 89.0) printf("B\n"); else if(b <= 105.0); printf("C\n"); ...
main.c:1:9: fatal error: stdioh: No such file or directory 1 | #include<stdioh> | ^~~~~~~~ compilation terminated.
s329474231
p00123
C
#include<stdio.h> int main(void) { double a, b; scanf("%f %f",&a,&b); if(a <= 35.5) if(b <= 71.0) printf("AAA\n"); else if(b <= 77.0) printf("AA\n"); else if(b <= 83.0) printf("A\n"); else if(b <= 89.0) printf("B\n"); else if(b <= 105.0); printf("C\n"); ...
main.c: In function 'main': main.c:20:49: error: 'else' without a previous 'if' 20 | else | ^~~~ main.c:22:78: error: expected ';' before 'else' 22 | ...
s887606041
p00123
C
#include <stdio.h> int main() { double t1, t2; double t[7][2] = {{35.5, 71.0}, {37.5, 77.0}, {40.0, 83.0}, {43.0, 89.0}, {50.0, 105.0}, {55.0, 116.0}, {70.0, 148.0}}; int i1, k = -1; char kyu[8][5] = {"AAA", "AA", "A", "B", "C", "D", "E", "NA"}; // ??\?????\?????\??¨???????£??????? scan...
main.c:17:9: error: expected identifier or '(' before 'if' 17 | if (k < 0) | ^~ main.c:20:16: error: expected declaration specifiers or '...' before string constant 20 | printf("%s\n", kyu[k]); | ^~~~~~ main.c:20:24: error: unknown type name 'kyu' 20 | ...
s816754877
p00123
C
/*************************************/ /* ??\?????\?????\?????\??¬???????????±???006???????????????1?????? */ /* coded by Y.Suganuma */ /*************************************/ #include <stdio.h> int main() { double t1, t2; double t[7][2] = {{35.5, 71.0}, {37.5, 77.0}, {40.0, 83.0}, {43.0, 89.0}, ...
main.c:21:9: error: expected identifier or '(' before 'if' 21 | if (k < 0) | ^~ main.c:24:16: error: expected declaration specifiers or '...' before string constant 24 | printf("%s\n", kyu[k]); | ^~~~~~ main.c:24:24: error: unknown type name 'kyu' 24 | ...
s194095506
p00123
C
#include<stdio.h> int main(void) { float a,b; int c; while(0<c=scanf("%f %f",&a,&b)){ if(a>=70.00||b>=148.00) { printf("NA\n"); } else if(a<35.50&&b<71.00) { printf("AAA\n"); } else if(a<37.00&&b<77.00) { printf("AA\n"); } else if(a<40.00&&b<83.00) { printf("A\n"); } else if(a<43.00&&b<89.00) { ...
main.c: In function 'main': main.c:6:18: error: lvalue required as left operand of assignment 6 | while(0<c=scanf("%f %f",&a,&b)){ | ^
s125984913
p00123
C
#include<stdio.h> int main(void) { float a,b; int c; while(0<c=scanf("%f %f",&a,&b)) { if(a<35.50&&b<71.00) { printf("AAA\n"); } else if(a<37.00&&b<77.00) { printf("AA\n"); } else if(a<40.00&&b<83.00) { printf("A\n"); } else if(a<43.00&&b<89.00) { printf("B\n"); } else if(a<50.00&&b<105.00) { ...
main.c: In function 'main': main.c:6:18: error: lvalue required as left operand of assignment 6 | while(0<c=scanf("%f %f",&a,&b)) | ^
s609624540
p00123
C
include<stdio.h> int main(){ double a,b; int c,d,e; while(scanf("%lf %lf",&a,&b)!=EOF){ if(a<35.50)c=1; else if(a<37.50)c=2; else if(a<40.00)c=3; else if(a<43.00)c=4; else if(a<50.00)c=5; else if(a<55.00)c=6; else if(a<70.00)c=7; else c=0; if(b<71.00)d=1; else if(b<77....
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include<stdio.h> | ^
s883089846
p00123
C
include <stdio.h> int main(){ double five=0, ten = 0; for(;;){ scanf("%lf %lf",&five, &ten); if(five < 35.5 && ten < 71.0){ printf("AAA/n"); } else if (five < 37.5 && ten < 77.0){ printf("AA/n"); } else if (five < 40.0 && ten < 83.0){ ...
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include <stdio.h> | ^
s295407629
p00123
C++
#include<stdio.h> #include<iostream> using namespace std; void TR(double x,double y,int K,int H) { int t; double X; X=x*100;t=(int)X; if(t<3550)K=0; else if(t<3550)K=0; else if(t<3750)K=1; else if(t<4000)K=2; else if(t<4300)K=3; else if(t<5000)K=4; else if(t<5500)K=5; else if(t<7000)K=6; else if(t>=7000)K=7; X=y*100;t...
a.cc:32:1: error: expected declaration before '}' token 32 | } | ^
s008521249
p00123
C++
#include<stdio.h> int main(main) { int a,b; scanf("%d %d",&a,&b); if(a<=35.5 && b<=71){ printf("AAA\n"); } else if(a<37.5 && b<77){ printf("AA\n"); } else if(a<40 && b<83){ printf("A\n"); } else if(a<43 && b<89){ printf("B\n"); } else if(a<50 && b<105){ printf("c\n"); } else if(a<55 && b<116){ ...
a.cc:2:5: error: cannot declare '::main' to be a global variable 2 | int main(main) | ^~~~ a.cc:3:1: error: expected ',' or ';' before '{' token 3 | { | ^
s399904833
p00123
C++
#include<stdio.h> int main(main) { int a,b; while(scanf("%d %d",&a,&b)!=EOF){ if(a<=35.5 && b<=71){ printf("AAA\n"); } else if(a<37.5 && b<77){ printf("AA\n"); } else if(a<40 && b<83){ printf("A\n"); } else if(a<43 && b<89){ printf("B\n"); } else if(a<50 && b<105){ printf("c\n"); } ...
a.cc:2:5: error: cannot declare '::main' to be a global variable 2 | int main(main) | ^~~~ a.cc:3:1: error: expected ',' or ';' before '{' token 3 | { | ^
s413325928
p00123
C++
#include<stdio.h> int main(main) { int a,b; while(scanf("%d %d",&a,&b)!=EOF){ if(a<=35.5 && b<=71){ printf("AAA\n"); } else if(a<37.5 && b<77){ printf("AA\n"); } else if(a<40 && b<83){ printf("A\n"); } else if(a<43 && b<89){ printf("B\n"); } else if(a<50 && b<105){ printf("c\n"); } ...
a.cc:2:5: error: cannot declare '::main' to be a global variable 2 | int main(main) | ^~~~ a.cc:3:1: error: expected ',' or ';' before '{' token 3 | { | ^
s968141586
p00123
C++
#include<stdio.h> int main(main) { double a,b; while(scanf("%lf %lf",&a,&b)!=EOF){ if(a<=35.5 && b<=71){ printf("AAA\n"); } else if(a<37.5 && b<77){ printf("AA\n"); } else if(a<40 && b<83){ printf("A\n"); } else if(a<43 && b<89){ printf("B\n"); } else if(a<50 && b<105){ printf("c\n");...
a.cc:2:5: error: cannot declare '::main' to be a global variable 2 | int main(main) | ^~~~ a.cc:3:1: error: expected ',' or ';' before '{' token 3 | { | ^
s717322915
p00123
C++
#include<stdio.h> int main(main) { double a,b; while(scanf("%lf %lf",&a,&b)!=EOF){ if(a<35.5 && b<71){ printf("AAA\n"); } else if(a<37.5 && b<77){ printf("AA\n"); } else if(a<40 && b<83){ printf("A\n"); } else if(a<43 && b<89){ printf("B\n"); } else if(a<50 && b<105){ printf("c\n"); ...
a.cc:2:5: error: cannot declare '::main' to be a global variable 2 | int main(main) | ^~~~ a.cc:3:1: error: expected ',' or ';' before '{' token 3 | { | ^
s908081187
p00123
C++
#include<stdio.h> int main(main) { double a,b; while(scanf("%lf %lf",&a,&b)!=EOF){ if(a<35.5 && b<71){ printf("AAA\n"); } else if(a<37.5 && b<77){ printf("AA\n"); } else if(a<40 && b<83){ printf("A\n"); } else if(a<43 && b<89){ printf("B\n"); } else if(a<50 && b<105){ printf("C\n"); ...
a.cc:2:5: error: cannot declare '::main' to be a global variable 2 | int main(main) | ^~~~ a.cc:3:1: error: expected ',' or ';' before '{' token 3 | { | ^
s630762020
p00123
C++
/*************************************/ /* ??\?????\?????\?????\??¬???????????±???006???????????????1?????? */ /* coded by Y.Suganuma */ /*************************************/ #include <stdio.h> int main() { double t1, t2; double t[7][2] = {{35.5, 71.0}, {37.5, 77.0}, {40.0, 83.0}, {43.0, 89.0}, ...
a.cc:21:9: error: expected unqualified-id before 'if' 21 | if (k < 0) | ^~ a.cc:24:15: error: expected constructor, destructor, or type conversion before '(' token 24 | printf("%s\n", kyu[k]); | ^ a.cc:26:9: error: expected unqualified-id before 'return' 26 | ...
s923286944
p00123
C++
#include <stdio.h> int main() { double t1, t2; double t[7][2] = {{35.5, 71.0}, {37.5, 77.0}, {40.0, 83.0}, {43.0, 89.0}, {50.0, 105.0}, {55.0, 116.0}, {70.0, 148.0}}; int i1, k = -1; char kyu[8][5] = {"AAA", "AA", "A", "B", "C", "D", "E", "NA"}; // ??\?????\?????\??¨???????£??????? scan...
a.cc:17:9: error: expected unqualified-id before 'if' 17 | if (k < 0) | ^~ a.cc:20:15: error: expected constructor, destructor, or type conversion before '(' token 20 | printf("%s\n", kyu[k]); | ^ a.cc:22:9: error: expected unqualified-id before 'return' 22 | ...
s359628875
p00123
C++
#include <stdio.h> int main() { double t1, t2; double t[7][2] = {{35.5, 71.0}, {37.5, 77.0}, {40.0, 83.0}, {43.0, 89.0}, {50.0, 105.0}, {55.0, 116.0}, {70.0, 148.0}}; int i1, k = -1; char kyu[8][5] = {"AAA", "AA", "A", "B", "C", "D", "E", "NA"}; // ??\?????\?????\??¨???????£??????? scan...
a.cc:17:9: error: expected unqualified-id before 'if' 17 | if (k < 0) | ^~ a.cc:20:15: error: expected constructor, destructor, or type conversion before '(' token 20 | printf("%s\n", kyu[k]); | ^ a.cc:22:9: error: expected unqualified-id before 'return' 22 | ...
s462353520
p00123
C++
#include <iostream> using namespace std; char c[8][8]; int main(){ while(cin>>a>>b){ for(int i=0;i<64;i++)cin>>c[i/8][i%8]; cout<<90<<endl; for(int i=0;i<8;i++){ for(int j=0;j<8;j++){ cout<<c[7-j][i]; } cout<<endl; } cout<<180<<endl; for(int i=0;i<8;i++){ for(int j=0;j<8;j++){ cout<<c[7-i][7-j]; } cout<<endl; } cout<<2...
a.cc: In function 'int main()': a.cc:5:12: error: 'a' was not declared in this scope 5 | while(cin>>a>>b){ | ^ a.cc:5:15: error: 'b' was not declared in this scope 5 | while(cin>>a>>b){ | ^ a.cc:28:2: error: expected '}' at end of input 28 | } | ^ a.cc:4:11: note: ...
s784697375
p00123
C++
#include<stdio.h> int main(void) { float t,t1; while(!(scanf("%f %f",&t,&t1)); if(t<35.50 && t1<71.00){ printf("AAA\n"); } else if(t<37.50 && t1<77.00){ printf("AA\n"); } else if(t<40.00 && t1<83.00){ printf("A\n"); } else if(t<43.00 && t1<89.00){ printf("B\n"); } else if(t<50.00 && t1<95.00){ prin...
a.cc: In function 'int main()': a.cc:5:39: error: expected ')' before ';' token 5 | while(!(scanf("%f %f",&t,&t1)); | ~ ^ | )
s082101485
p00123
C++
#include<stdio.h> int main(void) { float t,t1; while(!(scanf("%f %f",&t,&t1)){ if(t<35.50 && t1<71.00){ printf("AAA\n"); } else if(t<37.50 && t1<77.00){ printf("AA\n"); } else if(t<40.00 && t1<83.00){ printf("A\n"); } else if(t<43.00 && t1<89.00){ printf("B\n"); } else if(t<50.00 && t1<9...
a.cc: In function 'int main()': a.cc:5:39: error: expected ')' before '{' token 5 | while(!(scanf("%f %f",&t,&t1)){ | ~ ^ | )
s422725647
p00123
C++
#include<stdio.h> int main(void) { float a,b; scanf("%f %f",&a,&b); if(a<35.5 && b<71.0){ printf("AAA\n"); } else if(a<37.5 && b<77.0){ printf("AA\n"); } else if(a<40.0 && b<83.0){ printf("A\n"); } else if(a<43.0 && b<89.0){ printf("B\n"); } else if(a<50.0 && b<105.0){ printf("C\n"); } else if(...
a.cc:34:5: error: redefinition of 'int main()' 34 | int main(void) | ^~~~ a.cc:2:5: note: 'int main()' previously defined here 2 | int main(void) | ^~~~
s551274125
p00123
C++
#include<stdio.h> int main(void) { float a,b; while(scanf("%d %b",&a,&b)!=EOF{ if(a<35.5 && b<71.0){ printf("AAA\n"); } else if(a<37.5 && b<77.0){ printf("AA\n"); } else if(a<40.0 && b<83.0){ printf("A\n"); } else if(a<43.0 && b<89.0){ printf("B\n"); } else if(a<50.0 && b<105.0){ print...
a.cc: In function 'int main()': a.cc:5:40: error: expected ')' before '{' token 5 | while(scanf("%d %b",&a,&b)!=EOF{ | ~ ^
s369784299
p00123
C++
int main(void) { float a,b; while(scanf("%f %f",&a,&b)!=EOF){ if(a<35.5 && b<71.0){ printf("AAA\n"); } else if(a<37.5 && b<77.0){ printf("AA\n"); } else if(a<40.0 && b<83.0){ printf("A\n"); } else if(a<43.0 && b<89.0){ printf("B\n"); } else if(a<50.0 && b<105.0){ printf("c\n"); } e...
a.cc: In function 'int main()': a.cc:4:15: error: 'scanf' was not declared in this scope 4 | while(scanf("%f %f",&a,&b)!=EOF){ | ^~~~~ a.cc:4:37: error: 'EOF' was not declared in this scope 4 | while(scanf("%f %f",&a,&b)!=EOF){ | ^~~ ...
s499357328
p00123
C++
#include<iostream> #include<string> #include<algorithm> #include<map> #include<vector> #include<cmath> #include<cstdio> #define loop(i,a,b) for(i=a;i<b;i++) #define rep(i,a) loop(i,0,a) #define pb(in,tmp) in.push_back(tmp) #define all(in) in.begin(),in.end() const double PI=acos(-1); using namespace std; int main(){ ...
a.cc: In function 'int main()': a.cc:20:21: error: conversion from 'char' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested 20 | string s[8]={"NA",'E','D','C','B','A',"AA","AAA"}; | ^~~ a.cc:20:25: error: conversion from 'char' to non-scalar type 'std::st...
s975556590
p00124
Java
import java.util.*;class Main{public static void main(String[]args){Scanner sc = new Scanner(System.in);int c=0;for(;;){ int???s=sc.nextInt();if(s==0)break;if(c!=0)System.out.println();String tn[] =new String[s];int tp[]=new int[s]; int tpc[]=new int[s];for(int i=0;i<s;i++){ tn[i]=sc.next();tp[i]=(sc.nextInt()*3+sc.n...
Main.java:1: error: not a statement import java.util.*;class Main{public static void main(String[]args){Scanner sc = new Scanner(System.in);int c=0;for(;;){ int???s=sc.nextInt();if(s==0)break;if(c!=0)System.out.println();String tn[] =new String[s];int tp[]=new int[s]; int tpc[]=new int[s];for(int i=0;i<s;i++){ tn[i]=...
s593966967
p00124
Java
#include<stdio.h> #include<stdlib.h> typedef struct team{ int p; char n[23]; }TEAM; int comp(const void *p,const void *q){ TEAM *a=(TEAM *)p,*b=(TEAM *)q; return b->p - a->p; } TEAM x[12]; int main(){ int n,p,q,r,i,f=1; while(scanf("%d",&n)!=EOF){ if(n==0)break; if(f==1)f==0; else printf("\n"); for(i=0;i<...
Main.java:1: error: illegal character: '#' #include<stdio.h> ^ Main.java:1: error: class, interface, enum, or record expected #include<stdio.h> ^ Main.java:2: error: illegal character: '#' #include<stdlib.h> ^ Main.java:5: error: class, interface, enum, or record expected char n[23]; ^ Main.java:6: error: cla...
s982249630
p00124
C
#include<stdio.h> struct TeamScore { char team_name[21]; int win_n; int lose_n; int draw_n; int points; }; int main(void) { int n; int i,j,k=0; while (1) { struct TeamScore data[10], *p, temp; p = data; scanf("%d",&n); if (n == 0)break; if (k++)putchar('\n'); for (i = 0; i < n; i++) { scanf("%s ...
main.c: In function 'main': main.c:20:65: error: expected expression before '?' token 20 | scanf("%s %d %d %d", &data[i].team_name??? &data[i].win_n, | ^
s650350224
p00124
C
#include<stdio.h> struct TeamScore { char team_name[21]; int win_n; int lose_n; int draw_n; int points; }; int main(void) { int n; int i,j,k=0; while (1) { struct TeamScore data[10], *p, temp; p = data; scanf_s("%d",&n); if (n == 0)break; if (k>0)putchar('\n'); for (i = 0; i < n; i++) { scanf("%...
main.c: In function 'main': main.c:16:17: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 16 | scanf_s("%d",&n); | ^~~~~~~ | scanf
s677363147
p00124
C++
=#include <iostream> #include <string> using namespace std; struct Team { string name; int score; }; int main() { int n; bool test = true; while (cin >> n && n != 0) { if (!test) cout << "\n"; Team *team = new Team[n]; int w, l, d; for (int i = 0; i < n; i++) { cin >> team[i].name >> w >> l ...
a.cc:1:2: error: stray '#' in program 1 | =#include <iostream> | ^ a.cc:1:1: error: expected unqualified-id before '=' token 1 | =#include <iostream> | ^ In file included from /usr/include/c++/14/bits/char_traits.h:42, from /usr/include/c++/14/string:42, from a.cc:...
s908729328
p00124
C++
#include<iostream> #include<string> #include<algorithm> using namespace std; int main(void){ int n; bool o = 0 ; while(cin>>n,n){ if(cnt ++ > 0)cout<<endl; string name[n]; int sum[n],point; int rank[n]; for(int i = 0 ; i < n ; i ++){ cin>>name[i]; cin>>point; //win sum[i]=point*3; cin>>point;...
a.cc: In function 'int main()': a.cc:11:20: error: 'cnt' was not declared in this scope; did you mean 'int'? 11 | if(cnt ++ > 0)cout<<endl; | ^~~ | int
s923696021
p00124
C++
#include <algorithm> #include <vector> #include <functional> #include <utility> #include <string> using namespace std; int main() { vector<pair<int, pair<int, string> > > team; int n, pt[10][3]; string str[10]; while(1){ cin >> n; if(n == 0) break; for(int i = 0; i < n; i++) cin >> str[i] >> pt[i][...
a.cc: In function 'int main()': a.cc:16:17: error: 'cin' was not declared in this scope 16 | cin >> n; | ^~~ a.cc:6:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 5 | #include <string> +++ |+#include <iostrea...
s357734136
p00124
C++
#include <iostream> #include <map> #include <vector> using namespace std; struct Country{string name; int wp;}; vector<Country> Allteam; bool comp(const Country& c1, const Country& c2){ return (c1.wp > c2.wp); } int main(void){ int n; while(cin >> n, n){ for(int i = 0; i < n; i++){ string tname; ...
a.cc: In function 'int main()': a.cc:23:5: error: 'sort' was not declared in this scope; did you mean 'short'? 23 | sort(Allteam.begin(), Allteam.end(), comp); | ^~~~ | short
s949459426
p00124
C++
#include<stdio.h> #include<string> #include<iostream> using namespace std; struct TA{ string name; int po; int rr; }; int main(){ int n; struct TA N[11]; bool ty=true; while(1){ scanf("%d",&n); if(n==0)break; for(int i=0;i<n;i++) if(ty==false)cout<<endl; ty=false; {cin>>N[i].name;int a,b,c; ...
a.cc: In function 'int main()': a.cc:17:17: error: 'i' was not declared in this scope 17 | {cin>>N[i].name;int a,b,c; cin>>a>>b>>c; | ^
s860948458
p00124
C++
#include <iostream> using namespace std; class data{ public: char name; int win; int lose; int draw; int score; }; int main(){ int teamamo; while(true){ cin>>teamamo; if(teamamo==0) break; data teamdata[10]; data comp; for(int i=0; i<teamamo; i++) cin>>teamdata[i].name>>teamdata[i].win>>teamdata[i].lose>>tea...
a.cc: In function 'int main()': a.cc:27:1: error: reference to 'data' is ambiguous 27 | data teamdata[10]; | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, ...
s170119609
p00124
C++
#include <iostream> using namespace std; struct data{ char name; int win; int lose; int draw; int score; }; int main(){ int teamamo; while(true){ cin>>teamamo; if(teamamo==0) break; data teamdata[10]; data comp; for(int i=0; i<teamamo; i++) cin>>teamdata[i].name>>teamdata[i].win>>teamdata[i].lose>>t...
a.cc: In function 'int main()': a.cc:25:1: error: reference to 'data' is ambiguous 25 | data teamdata[10]; | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, ...
s051539748
p00124
C++
#include <iostream> #include <string.h> using namespace std; struct data{ char name[20]; int win; int lose; int draw; int score; }; int main(){ int teamamo; while (true){ cin >> teamamo; if (teamamo == 0) break; data teamdata[10]; for (int i = 0; i<teamamo; i++) cin >> teamdata[i].name...
a.cc: In function 'int main()': a.cc:26:17: error: reference to 'data' is ambiguous 26 | data teamdata[10]; | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/b...
s486786252
p00124
C++
#include <iostream> #include <string.h> using namespace std; struct data{ char name[20]; int win; int lose; int draw; int score; }; int main(){ int teamamo; while (true){ cin >> teamamo; if (teamamo == 0) break; data teamdata[10]; for (int i = 0; i<teamamo; i++) cin >> teamdata[i].name...
a.cc:54:1: error: extended character   is not valid in an identifier 54 |       | ^ a.cc:54:1: error: extended character   is not valid in an identifier a.cc:54:1: error: extended character   is not valid in an identifier a.cc:54:1: error: extended character   is not valid in an identifier a.cc:54:1: error: ex...
s406738371
p00124
C++
#include <iostream> #include <string.h> using namespace std; struct data{ char name[20]; int win; int lose; int draw; int score; }; int main(){ int teamamo; while (true){ cin >> teamamo; if (teamamo == 0) break; data teamdata[10]; ...
a.cc:54:1: error: extended character   is not valid in an identifier 54 |       | ^ a.cc:54:1: error: extended character   is not valid in an identifier a.cc:54:1: error: extended character   is not valid in an identifier a.cc:54:1: error: extended character   is not valid in an identifier a.cc:54:1: error: ex...
s821320072
p00124
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b[9],c[9],d[9],f[9]; string n[9]; while(1){ cin >> a >> endl; for(int i = 0; i < a i++){ cin >> b[i] >> c[i] >> d[i]; } if(a == 0)break; for(int i = 0 ; i < a ; i++){ cin >> n[i] >> b[i] >> c[i] >> d[i]; f[i] = b[i]*3 + c[i]*0 + d[i]...
a.cc: In function 'int main()': a.cc:8:26: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and '<unresolved overloaded function type>') 8 | cin >> a >> endl; | ~~~~~~~~~^~~~~~~ In file included from...
s511188690
p00124
C++
#include<stdio.h> #include<string.h> int main() { char coun[11][21]; int score[11],win,lose,draw,max[11]; int i,j,n; for(;;){ max=0; scanf("%d",&n); if(n==0)break; for(i=0;i<n;i++){ scanf("%s",coun[i]); scanf("%d%d%d", &win, &lose, &draw); score[i]=win*3+draw; max[i]=score; } for(i=0;i<n;...
a.cc: In function 'int main()': a.cc:11:20: error: incompatible types in assignment of 'int' to 'int [11]' 11 | max=0; | ~~~^~ a.cc:18:32: error: invalid conversion from 'int*' to 'int' [-fpermissive] 18 | max[i]=score; | ...
s782099906
p00124
C++
#include<stdio.h> #include<string.h> int main() { char coun[11][21]; int score[11],win,lose,draw,max[11]; int i,j,n; for(;;){ scanf("%d",&n); if(n==0)break; for(i=0;i<n;i++){ scanf("%s",coun[i]); scanf("%d%d%d", &win, &lose, &draw); score[i]=win*3+draw; max[i]=score; } for(i=0;i<n;i++){ ...
a.cc: In function 'int main()': a.cc:17:32: error: invalid conversion from 'int*' to 'int' [-fpermissive] 17 | max[i]=score; | ^~~~~ | | | int*
s959071768
p00124
C++
ok
a.cc:1:1: error: 'ok' does not name a type 1 | ok | ^~
s107730920
p00124
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; struct nx { string name; int cost; }; int main() { int n, f=0; while (cin>>n) { if (!n) break; if (f) cout<<endl; nx m[n]; for (int i=0; i<n; i++) { cin>>m[i].name; int a,b,c;...
In file included from /usr/include/c++/14/bits/stl_algobase.h:71, from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from...
s685498701
p00124
C++
#include <iostream> #include <string> #include <algorithm> #include <map> #include <vector> #include <functional> using namespace std; bool cmp(pair<int,string> a , pair<int,string> b){ return a.first > b.first; } int main(void){ while(1){ int a,n; string s; vector< pair<int,string> > P; int w,d,l; i...
a.cc: In function 'int main()': a.cc:20:20: error: 'c' was not declared in this scope 20 | if(c++)cout << endl; | ^
s243353236
p00124
C++
using namespace std; #define rep(i,n) for(int i=0;i<n;i++) #define REP(n) rep(i,n) #define all(n) n.begin(),n.end() const int MAXP = 31; int main() { string s; int n, w, l, e; bool sec = false; while(cin >> n && n) { if(sec) cout << endl; vector<string> teams[MAXP]; ...
a.cc: In function 'int main()': a.cc:11:5: error: 'string' was not declared in this scope 11 | string s; | ^~~~~~ a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>' +++ |+#include <string> 1 | using namespace std; a.cc:14:11: erro...
s515959950
p00124
C++
#include <iostream> #include <algorithm> #include <vector> #include <functional> #include <utility> #include <string> using namespace std; int main() { vector<pair<int, pair<int, string> > > team; int n, pt[10][3]; string str[10]; while(1){ cin >> n; if(n == 0) break; for(int i = 0; i < n; i++) cin...
a.cc: In function 'int main()': a.cc:34:29: error: expected ';' before 'team' 34 | cout << endl | ^ | ; 35 | 36 | team.clear(); | ~~~~
s111559077
p00125
Java
import java.util.Scanner; public class Tes { static final int[] md = new int[12]; static { int[] days = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; int day = 0; for (int i = 1; i < 12; i++) { md[i] = day; day += days[i]; } } public static void main(String[] args) { Scanner in = new Scanner...
Main.java:3: error: class Tes is public, should be declared in a file named Tes.java public class Tes { ^ 1 error
s520428062
p00125
C
#include<stdio.h> int main(void) { int a[11]={31,28,31,30,31,30,31,31,30,31,30}; int y1,m1,d1,y1,y2,m2,d2; int i,j,n,u,w; while(1){ scanf("%d%d%d%d%d%d",&y1,&m1,&d1,&y2,&m2,&d2); if(y1<0||y2<0||m1<0||m2<0||d1<0||d2<0) break; n=0; for(j=y1;j<=y2;j++){ u=0; if(j%4==0){ u=1; if(j%400==0){ ...
main.c: In function 'main': main.c:5:22: error: redeclaration of 'y1' with no linkage 5 | int y1,m1,d1,y1,y2,m2,d2; | ^~ main.c:5:13: note: previous declaration of 'y1' with type 'int' 5 | int y1,m1,d1,y1,y2,m2,d2; | ^~
s255567555
p00125
C
#include<stdio.h> int main(void) { int a[11]={31,28,31,30,31,30,31,31,30,31,30}; int y1,m1,d1,y1,y2,m2,d2; int i,j,n,u,w; while(1){ scanf("%d%d%d%d%d%d",&y1,&m1,&d1,&y2,&m2,&d2); if(y1<0||y2<0||m1<0||m2<0||d1<0||d2<0) break; n=0; for(j=y1;j<=y2;j++){ u=0; if(j%4==0){ u=1; if(j%400==0){ ...
main.c: In function 'main': main.c:5:22: error: redeclaration of 'y1' with no linkage 5 | int y1,m1,d1,y1,y2,m2,d2; | ^~ main.c:5:13: note: previous declaration of 'y1' with type 'int' 5 | int y1,m1,d1,y1,y2,m2,d2; | ^~
s870556480
p00125
C
#include<stdio.h> #include<string.h> int main(void) { int y1,y2,m1,m2,d1,d2,y=0,i,all=0,b=0,c=0,u; int a[12]={0}; while(1){ scanf("%d %d %d %d %d %d",&y1,&m1,&d1,&y2,&m2,&d2); if(y2-y1!=0){ for(i=y1;i<y2;i++){ u=0; if((i%4)==0){ u=1; if((i%100)==0){ u=0; if((i%400)==0){ u=1; } ...
main.c: In function 'main': main.c:56:52: error: lvalue required as left operand of assignment 56 | if(y1==-1 && y2==-1 && m1==-1 && m2=-1 && d1==-1 && d2==-1){ | ^
s742801980
p00125
C
#include<stdio.h> #include<string.h> int main(void) { int y1,y2,m1,m2,d1,d2,y=0,i,all=0,b=0,c=0,u; int a[12]={0}; while(1){ scanf("%d %d %d %d %d %d",&y1,&m1,&d1,&y2,&m2,&d2); if(y2-y1!=0){ for(i=y1;i<y2;i++){ u=0; if((i%4)==0){ u=1; if((i%100)==0){ u=0; if((i%400)==0){ u=1; } ...
main.c: In function 'main': main.c:55:68: error: lvalue required as left operand of assignment 55 | if(y1==-1 && y2==-1 && m1==-1 && m2=-1 && d1==-1 && d2==-1){ | ^
s700439237
p00125
C
#include<stdio.h> int main(void) { int a[11]={31,28,31,30,31,30,31,31,30,31,30}; int y1,m1,d1,y1,y2,m2,d2; int i,j,n,u,w; while(1){ scanf("%d%d%d%d%d%d",&y1,&m1,&d1,&y2,&m2,&d2);// if(y1<0||y2<0||m1<0||m2<0||d1<0||d2<0) break; n=0; for(j=y1;j<=y2;j++){ u=0; if(j%4==0){ u=1; if(j%400==0){ ...
main.c: In function 'main': main.c:5:22: error: redeclaration of 'y1' with no linkage 5 | int y1,m1,d1,y1,y2,m2,d2; | ^~ main.c:5:13: note: previous declaration of 'y1' with type 'int' 5 | int y1,m1,d1,y1,y2,m2,d2; | ^~
s269442567
p00125
C
#include<stdio.h> int main(void) { int a[11]={31,28,31,30,31,30,31,31,30,31,30}; int y1,m1,d1,y1,y2,m2,d2; int i,j,n,u,w; while(1){ scanf("%d%d%d%d%d%d",&y1,&m1,&d1,&y2,&m2,&d2);// if(y1<0||y2<0||m1<0||m2<0||d1<0||d2<0) break; n=0; for(j=y1;j<=y2;j++){ u=0; if(j%4==0){ u=1; if(j%400==0){ ...
main.c: In function 'main': main.c:5:22: error: redeclaration of 'y1' with no linkage 5 | int y1,m1,d1,y1,y2,m2,d2; | ^~ main.c:5:13: note: previous declaration of 'y1' with type 'int' 5 | int y1,m1,d1,y1,y2,m2,d2; | ^~
s933494816
p00125
C
#include<stdio.h> int main(void) { int a[11]={31,28,31,30,31,30,31,31,30,31,30}; int y1,m1,d1,y1,y2,m2,d2; int i,j,n,u,w; while(1){ scanf("%d%d%d%d%d%d",&y1,&m1,&d1,&y2,&m2,&d2);// if(y1<0||y2<0||m1<0||m2<0||d1<0||d2<0) break; n=0; for(j=y1;j<=y2;j++){ u=0; if(j%4==0){ u=1; if(j%400==0){ ...
main.c: In function 'main': main.c:5:22: error: redeclaration of 'y1' with no linkage 5 | int y1,m1,d1,y1,y2,m2,d2; | ^~ main.c:5:13: note: previous declaration of 'y1' with type 'int' 5 | int y1,m1,d1,y1,y2,m2,d2; | ^~
s675241753
p00125
C
#include<stdio.h> int main(void) { int a[11]={31,28,31,30,31,30,31,31,30,31,30}; int y1,m1,d1,y1,y2,m2,d2; int i,j,n,u,w; while(1){ scanf("%d%d%d%d%d%d",&y1,&m1,&d1,&y2,&m2,&d2);//??\??? if(y1<0||y2<0||m1<0||m2<0||d1<0||d2<0) break; n=0; for(j=y1;j<=y2;j++){ u=0; if(j%4==0){ u=1; if(j%400==...
main.c: In function 'main': main.c:5:22: error: redeclaration of 'y1' with no linkage 5 | int y1,m1,d1,y1,y2,m2,d2; | ^~ main.c:5:13: note: previous declaration of 'y1' with type 'int' 5 | int y1,m1,d1,y1,y2,m2,d2; | ^~
s288667815
p00125
C
#define _CRT_SECURE_NO_WARNINGS ////#define _USE_MATH_DEFINES #include<stdio.h> #include<stdlib.h> ////#include<math.h> //#include<string.h> #include<time.h> #define P(type,x) fprintf(stdout,"%"#type"\n",x) void countDays(); int main() { countDays(); return 0; } void countDays() { int y, m, d, days, yy, mm, dd; ti...
main.c: In function 'countDays': main.c:21:23: error: expected expression before '{' token 21 | tms = { 0,0,0,d,m - 1,y - 1900 }; | ^ main.c:22:23: error: expected expression before '{' token 22 | tme = { 0,0,0,dd,mm - 1,yy - 1900 }; | ...
s048177450
p00125
C
#define _CRT_SECURE_NO_WARNINGS //#define _USE_MATH_DEFINES #include<stdio.h> #include<stdlib.h> //#include<math.h> //#include<string.h> //#include<time.h> #define P(type,x) fprintf(stdout,"%"#type"\n",x) int mon[12]{ 0,31,59,90,120,151,181,212,243,273,304,334 },yea[7000]; void countDays(); int serial(int, int, int); i...
main.c:9:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token 9 | int mon[12]{ 0,31,59,90,120,151,181,212,243,273,304,334 },yea[7000]; | ^ main.c:9:58: error: expected identifier or '(' before ',' token 9 | int mon[12]{ 0,31,59,90,120,151,181,212,243,273,304,334 },yea[70...
s657589029
p00125
C
#define _CRT_SECURE_NO_WARNINGS ////#define _USE_MATH_DEFINES #include<stdio.h> //#include<stdlib.h> //#include<math.h> //#include<string.h> #include<time.h> #define P(type,x) fprintf(stdout,"%"#type"\n",x) void countDays(); int main() { countDays(); return 0; } void countDays() { int y, m, d, days, yy, mm, dd; ti...
main.c: In function 'countDays': main.c:21:23: error: expected expression before '{' token 21 | tms = { 0,0,0,d,m - 1,y - 1900,0,0,0}; | ^ main.c:22:23: error: expected expression before '{' token 22 | tme = { 0,0,0,dd,mm - 1,yy - 1900,0,0,0}; | ...
s854609290
p00125
C
#include <stdio.h> int mdays(int y, int m); int uruu(int year); int main(void) { int y1,m1,d1,y2,m2,d2; int i,j,days; while(scanf("%d%d%d%d%d%d",&y1,&m1,&d1,&y2,&m2,&d2)){ if(y1<0 || m1<0 || d1<0 || y2<0 || m2<0 || d2<0) break; for(i=y1,days=0; i<=y2; i++) for(i!=y1? j=1: j=m1 ; i!=y2? j<=12: j<=m2 ; j+...
main.c: In function 'main': main.c:15:42: error: lvalue required as left operand of assignment 15 | for(i!=y1? j=1: j=m1 ; i!=y2? j<=12: j<=m2 ; j++) | ^
s218295334
p00125
C
#include <stdio.h> #define leap(x, y, z) ((x)% 400 == 0 || ((x) % 100 && (x) % 4 == 0) ? (y) : (z)) int x[13] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},a,b,c,d,e,f,i,dc; int main(){ for(;scanf("%d%d%d%d%d%d", &a, &b, &c, &d, &e, &f), a != -1;){ dc = -c; i = a % 4; x[2] = leap(a, 29, 28); ...
main.c: In function 'main': main.c:11:27: error: exponent has no digits 11 | for(i = b; i <=(a==d?-1e:12); i++) dc += x[i]; | ^~
s557265206
p00125
C
#include <stdio.h> #define leap(x, y, z) ((x)% 400 == 0 || ((x) % 100 && (x) % 4 == 0) ? (y) : (z)) int d[13] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},a,b,c,d,e,f,i,r; int main(){ for(;scanf("%d%d%d%d%d%d", &a, &b, &c, &d, &e, &f), a != -1;){ r = -c; i = a % 4; d[2] = leap(a, 29, 28); ...
main.c:4:71: error: conflicting types for 'd'; have 'int' 4 | int d[13] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},a,b,c,d,e,f,i,r; | ^ main.c:4:5: note: previous definition of 'd' with type 'int[13]' 4 | int d[13] = {0, 31, ...
s609871933
p00125
C++
import java.util.Scanner; class Main{ public static void main(String[] args){ int[] dayday = new int[6]; int di; boolean flag = false; Scanner input = new Scanner(System.in); while(true){ di = 0; for(int i = 0; i < 6; i++){ dayday[i] = input.nextInt(); if (dayday[i] < 0){ flag = true;...
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:4:15: error: expected ':' before 'static' 4 | public static void main(String[] args){ | ^~~~~~~ | : a...
s289690013
p00125
C++
J:0093 Leap Year??§?????£????????´???????????¢??°????????¨????????¨?\???§?????? #define _USE_MATH_DEFINES #include <iostream> #include <sstream> #include <cmath> #include <algorithm> #include <queue> #include <stack> #include <limits> #include <map> #include <string> #include <cstring> #include <set> #include <deque> ...
a.cc:1:3: error: invalid digit "9" in octal constant 1 | J:0093 Leap Year??§?????£????????´???????????¢??°????????¨????????¨?\???§?????? | ^~~~ a.cc:1:19: error: extended character § is not valid in an identifier 1 | J:0093 Leap Year??§?????£????????´???????????¢??°????????¨????????¨?\???§?????? |...
s645604719
p00125
C++
#include<iostream> #include<string> #include<vector> using namespace std; int main() { while (1) { int L, R; L = R = 0; int a, b, c, d, e, f; cin >> a >> b >> c >> d >> e >> f; if (a<0||b<0 || a<0||a<0||a<0||a<)break; for (int g = 1; g < a; g++) { if (g % 400 == 0) L += 366; else if (g % 100 == 0) ...
a.cc: In function 'int main()': a.cc:13:50: error: expected primary-expression before ')' token 13 | if (a<0||b<0 || a<0||a<0||a<0||a<)break; | ^
s145534554
p00125
C++
#include<stdio.h> int main(void){ int y1, m1, d1, y2, m2, d2, Y1, Y2; while { scanf("%d %d %d %d %d %d", &y1, &m1, &d1, &y2, &m2, &d2); /*???????????´????±????????????????*/ if ( m1 >= 3) Y1 = y1 + 1; else Y1 = y1; if ( m2 >= 3 ) Y2 = y2; else Y2 = y2 - 1; /*??????...
a.cc: In function 'int main()': a.cc:4:10: error: expected '(' before '{' token 4 | while { | ^ | ( a.cc:4:10: error: expected primary-expression before '{' token a.cc:4:9: error: expected ')' before '{' token 4 | while { | ^~ | ) a.cc:12:14: error...
s158453673
p00125
C++
#include <iostream> #include <fstream> #include <string> #include <cstring> #include <cmath> #include <cstdlib> #include <ctime> #include <vector> #include <algorithm> #include <numeric> #include <map> #include <set> #include <stack> #include <queue> #include <deque> #include <functional> #include <cctype> #include ...
a.cc: In function 'int main()': a.cc:155:45: error: expected ')' before 'ans' 155 | ans -= (mimos[lm[i]-1] + (ld[i] - 1) | ~ ^ | ) 156 | ans += (mimos[rm[i]-1] + (rd[i] - 1)); | ~~~ ...
s305885098
p00125
C++
#include<iostream> #include<cstdlib> #include<ctime> using namespace std; int main(void){ while( true ){ int y1, m1, d1; int y2, m2, d2; struct tm t1, t2; double diff; time_t second1, second2; cin >> y1 >> m1 >> d1 >> y2 >> m2 >> d2; if( y1 == -1 && y2 == -1 && m1 == -1 && m2 == -1 && d1 == -1 && d2 == ...
a.cc: In function 'int main()': a.cc:17:17: error: 'memset' was not declared in this scope 17 | memset(&t1,0,sizeof(t1)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include<ctime> +++ |+#...
s169048841
p00125
C++
#include<iostream> using namespace std; #define REP(i,b,n) for(int i=b;i<n;i++) #define rep(i,n) REP(i,0,n) int month[]={ 0, 31,//1 28,//2 31,//3 30,//4 31,//5 30,//6 31,//7 31,//8 30,//9 31,//10 30,//11 31//12 }; int day(int y,int m,int d){ int base = d; REP(i,1,m)base+=month[i]; in...
a.cc: In function 'int day(int, int, int)': a.cc:28:14: error: expected ';' before 'if' 28 | base+=365 | ^ | ; 29 | if ( i %400 == 0 || | ~~ a.cc: At global scope: a.cc:46:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]...
s439156200
p00125
C++
#include <iostream> using namespace std;int main(){int a,b,c,d,e,f,g;int h[13]={0,0,31,59,90,120,151,181,212,243,273,304,334};while(1){cin>>a>>b>>c>>d>>e>>f;if(y==-1)break;g=f-c+h[mm]-h[m]+(d-a)*365;if(e<3)d--;if(b<3)a--;g+=d/4-a/4-d/100+a/100+d/400-a/400;cout<<g<<endl;}return 0;}
a.cc: In function 'int main()': a.cc:2:141: error: 'y' was not declared in this scope 2 | using namespace std;int main(){int a,b,c,d,e,f,g;int h[13]={0,0,31,59,90,120,151,181,212,243,273,304,334};while(1){cin>>a>>b>>c>>d>>e>>f;if(y==-1)break;g=f-c+h[mm]-h[m]+(d-a)*365;if(e<3)d--;if(b<3)a--;g+=d/4-a/4-d/100+a/100+d/...
s235572906
p00125
C++
#include <iostream> using namespace std;int main(){int a,b,c,d,e,f,g,h[13]={0,0,31,59,90,120,151,181,212,243,273,304,334};while(1){cin>>a>>b>>c>>d>>e>>f;if(y==-1)break;g=f-c+h[mm]-h[m]+(d-a)*365;if(e<3)d--;if(b<3)a--;g+=d/4-a/4-d/100+a/100+d/400-a/400;cout<<g<<endl;}return 0;}
a.cc: In function 'int main()': a.cc:2:137: error: 'y' was not declared in this scope 2 | using namespace std;int main(){int a,b,c,d,e,f,g,h[13]={0,0,31,59,90,120,151,181,212,243,273,304,334};while(1){cin>>a>>b>>c>>d>>e>>f;if(y==-1)break;g=f-c+h[mm]-h[m]+(d-a)*365;if(e<3)d--;if(b<3)a--;g+=d/4-a/4-d/100+a/100+d/400-...
s295304903
p00125
C++
#include <iostream> using namespace std;main(){int a,b,c,d,e,f,g,h[]={,,31,59,90,120,151,181,212,243,273,304,334};while(1){cin>>a>>b>>c>>d>>e>>f;if(a==-1)break;g=f-c+h[e]-h[b]+(d-a)*365;if(e<3)d--;if(b<3)a--;g+=d/4-a/4-d/100+a/100+d/400-a/400;cout<<g<<endl;}}
a.cc:2:21: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | using namespace std;main(){int a,b,c,d,e,f,g,h[]={,,31,59,90,120,151,181,212,243,273,304,334};while(1){cin>>a>>b>>c>>d>>e>>f;if(a==-1)break;g=f-c+h[e]-h[b]+(d-a)*365;if(e<3)d--;if(b<3)a--;g+=d/4-a/4-d/100+a/100+d/400-a/400;co...
s082985481
p00125
C++
import java.util.*; public class Main { static final int[] days = {0,31,28,31,30,31,30,31,31,30,31,30,31}; public static boolean isUruu(int y) { return (y%4 == 0 && y%100 != 0) || y%400 == 0; } public static int getDays(int y,int m,int d) { int res = 0; for(int i = 1; i <= y-1; ++i) { if(isUr...
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:3:1: error: expected unqualified-id before 'public' 3 | public class Main { | ^~~~~~
s975452599
p00125
C++
#include <cstdio> int y1, m1, d1, y2, m2, d2; int day[2][12]={ {31,28,31,30,31,30,31,31,30,31,30,31,31}, {31,29,31,30,31,30,31,31,30,31,30,31,31} }; bool uruu(int year) { if (year%400==0) return true; else if (year%100==0) return false; else if (year%4==0) return true; else return false; } int main() { ...
a.cc:2:5: warning: built-in function 'y1' declared as non-function [-Wbuiltin-declaration-mismatch] 2 | int y1, m1, d1, y2, m2, d2; | ^~ a.cc:6:1: error: too many initializers for 'int [12]' 6 | }; | ^
s942345555
p00125
C++
for(int i = 1 ; i < y ; i++) { day += 365; if(i % 4 == 0 && i % 100 != 0 || i % 400 == 0) day += 1; } for(int i = 1 ; i < m ; i++) { day += 30; if(i == 1 || i == 3 || i == 5 || i == 7 || i == 8 || i == 10 || i == 12) day++; if(i == 2) day -= 2; //if(u) day++; } } for(int i = 0 ; i <...
a.cc:2:3: error: expected unqualified-id before 'for' 2 | for(int i = 1 ; i < y ; i++) { | ^~~ a.cc:2:19: error: 'i' does not name a type 2 | for(int i = 1 ; i < y ; i++) { | ^ a.cc:2:27: error: 'i' does not name a type 2 | for(int i = 1 ; i < y ; i++) { | ...
s056400934
p00126
C
int main() { //field : ????????°??¬?????¶??? //used : ???????????????????????????????????????????????°????????????????????? int field[10][10], used[10]; //judge : ??°??¬???????????£???????????¨?????????true??? bool judge[10][10]; int num; cin >> num; while(num--) { memset(judge, false, ...
main.c: In function 'main': main.c:7:9: error: unknown type name 'bool' 7 | bool judge[10][10]; | ^~~~ main.c:1:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>' +++ |+#include <stdbool.h> 1 | int main() main.c:10:9: error: 'cin...
s150815821
p00126
C
#include<stdio.h> int main() { //field : ????????°??¬?????¶??? //used : ???????????????????????????????????????????????°????????????????????? int field[10][10], used[10]; //judge : ??°??¬???????????£???????????¨?????????true??? bool judge[10][10]; int num; cin >> num; while(num--) { mem...
main.c: In function 'main': main.c:8:9: error: unknown type name 'bool' 8 | bool judge[10][10]; | ^~~~ main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>' 1 | #include<stdio.h> +++ |+#include <stdbool.h> 2 | int main(...
s470210741
p00126
C++
2 2 1 3 4 5 6 7 8 9 4 5 6 7 8 9 1 2 3 7 8 9 1 2 3 4 5 6 2 3 4 5 6 7 8 9 1 5 6 7 8 9 1 2 3 4 8 9 1 2 3 4 5 6 7 3 4 5 6 7 8 9 1 2 6 7 8 9 1 2 3 4 5 9 1 2 3 4 5 6 7 8 2 1 3 4 5 6 7 8 9 4 5 6 7 8 9 1 2 3 7 8 9 1 2 3 4 5 6 2 3 4 5 6 7 8 9 1 5 6 7 8 9 1 2 3 4 8 9 1 2 3 4 5 6 7 3 4 5 6 7 8 9 1 2 6 7 8 9 1 2 3 4 5 9 1 2 3 4 5 ...
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 2 | ^
s797230455
p00126
C++
#include <bits/std++.h> using namespace std; int puzzle[9][9]; void field(int x, int &to, int &from) { if (0 <= x && x < 3) { to = 0; from = 3; } else if (3 <= x && x < 6) { to = 3; from = 6; } else { to = 6; from = 9; } } bool check1(int x, int y) { for (int i = x-1; i >= 0; i--) { if...
a.cc:1:10: fatal error: bits/std++.h: No such file or directory 1 | #include <bits/std++.h> | ^~~~~~~~~~~~~~ compilation terminated.
s013242463
p00126
C++
int main() { //field : ????????°??¬?????¶??? //used : ???????????????????????????????????????????????°????????????????????? int field[10][10], used[10]; //judge : ??°??¬???????????£???????????¨?????????true??? bool judge[10][10]; int num; cin >> num; while(num--) { memset(judge, false, ...
a.cc: In function 'int main()': a.cc:10:9: error: 'cin' was not declared in this scope 10 | cin >> num; | ^~~ a.cc:13:17: error: 'memset' was not declared in this scope 13 | memset(judge, false, sizeof(judge)); | ^~~~~~ a.cc:1:1: note: 'memset' is define...
s371978252
p00126
C++
#include<iostream> int main() { //field : ????????°??¬?????¶??? //used : ???????????????????????????????????????????????°????????????????????? int field[10][10], used[10]; //judge : ??°??¬???????????£???????????¨?????????true??? bool judge[10][10]; int num; cin >> num; while(num--) { me...
a.cc: In function 'int main()': a.cc:11:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 11 | cin >> num; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ...
s847067834
p00126
C++
#include <iostream> #include <algorithm> using namespace std; int math[9][9], jud[10] = {}; bool mmath[9][9]; void jj(int x, int y){ int jud2[10][2]; for(int i = 0; i < 10; i++){ fill(jud2[i], jud2[i] + 2, -1); } for(int i = x; i < x + 3; i++){ for(int j = y; j < y + 3; j++){ if(jud2[math[i][j]][0] >= 0){ ...
a.cc: In function 'int main()': a.cc:61:52: error: expected ';' before 'cout' 61 | cout << "*" | ^ | ; 62 | cout << math[i][j]; ...
s915312229
p00126
C++
#include <iostream> using namespace std; const int COL_SIZE = 9; const int ROW_SIZE = 9; void inputBoard( int board[][ COL_SIZE ] ) { for( int i = 0; i < ROW_SIZE; ++i ){ for( int j = 0; j < COL_SIZE; ++j ){ cin >> board[ i ][ j ]; } } } void outputBoard( int board[][ COL_SIZE ], bool check[][ COL_SIZE ] ) ...
a.cc: In function 'bool investigate(int (*)[9], bool (*)[9])': a.cc:36:17: error: 'memset' was not declared in this scope 36 | memset( usedNumber, 0, sizeof(usedNumber) ); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#in...
s455873486
p00126
C++
#include<iostream> #include<set> #include<utility> typedef std::pair<int, int> P; bool ver[9][9], hor[9][9], sq[9][9]; int n; char puzzle[9][9]; std::set<int> s[3][9]; // k: 0 -> ver, 1 -> hor, 2 -> sq int f( int k, int i, int j ) { switch( k ) { case 0: return j; case 1: return i; case 2: return i ...
a.cc: In function 'int main()': a.cc:33:17: error: 'memset' was not declared in this scope 33 | memset( ver, false, sizeof( ver ) ); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include<utili...
s576831394
p00126
C++
#include <iostream> using namespace std; int main() { int n; cin >> n; for (int i = 0; i < n; i++) { if (i != 0) { cout << endl << flush; } int hyou[9][9][2] = {0}; for (int j = 0; j < 9; j++) { for (int k = 0; k < 9; k++) { cin >> hyou[j][k][0]; } } int hantei3[9][9] = {0}; for (int j =...
a.cc: In function 'int main()': a.cc:51:42: error: invalid types 'int[int]' for array subscript 51 | hantei[p][hyou[j][k][0]-1]++; | ^
s298827173
p00126
C++
#include <iostream> using namespace std; int main() { int n; cin >> n; bool flag = false; for(int i = 0; i < n; i++) { int board[16][16]; char mark[16][16]; memset(mark, ' ', sizeof(mark)); for(int j = 0; j < 9; j++) for(int k = 0; k < 9; k++) cin >> board[j][k]; // row & comlumn for(int j = 0...
a.cc: In function 'int main()': a.cc:12:17: error: 'memset' was not declared in this scope 12 | memset(mark, ' ', sizeof(mark)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream...
s626151047
p00127
Java
import java.util.*; public class aoj0127 { static final Scanner stdin = new Scanner(System.in); static char[][] map = { {'a', 'b', 'c', 'd', 'e'}, {'f', 'g', 'h', 'i', 'j'}, {'k', 'l', 'm', 'n', 'o'}, {'p', 'q', 'r', 's', 't'}, {'u', 'v', 'w', 'x', 'y'}, {'z', '.', '?', '!', ' '}}; public static void main(String[] a...
Main.java:2: error: class aoj0127 is public, should be declared in a file named aoj0127.java public class aoj0127 { ^ 1 error
s049380911
p00127
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class P127 { public static void main(String[] args) throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String input; while((input = br.readLine()) != null){ System.ou...
Main.java:5: error: class P127 is public, should be declared in a file named P127.java public class P127 { ^ 1 error
s331244014
p00127
C
#include <cstdio> #include <string.h> using namespace std; int main() { char change[6][6] = { "abcde", "fghij", "klmno", "pqrst", "uvwxy", "z.?! " }; char str[256]; while (scanf("%s", str) != EOF){ char str2[256]; strcpy(str2, ""); int i = 0; while (str[i] != '\0'){ if ( (str[i] < '1' || str...
main.c:1:10: fatal error: cstdio: No such file or directory 1 | #include <cstdio> | ^~~~~~~~ compilation terminated.