submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s572269615
p00026
C
int main() { int x,y,size,nasi=0,max=0,map[10][10]={0}; while(scanf("%d,%d,%d",&x,&y,&size)!=EOF) { if(size==1) { map[y][x]++; if(y-1>=0) map[y-1][x]++; if(x-1>=0) map[y][x-1]++; if(x+1>=0) map[y][x+1]++; if(y+1>=0) map[y+1][x]++; } if(size==2) { map[y][x]++; if(y-1>=0 ...
main.c: In function 'main': main.c:4:15: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 4 | while(scanf("%d,%d,%d",&x,&y,&size)!=EOF) | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | in...
s587653956
p00026
C
////#include <stdio.h> ////#include <math.h> ////int main(){ ////double v; ////while(scanf("%lf",&v) != EOF){ ////double y=v*v/19.6; ////int z=y; ////if(y==z){ ////if(z%5==0){ //// z=y/5+1; ////printf("%d\n",z); ////continue; ////} ////} ////int q=y/5; ////q += 2; ////printf("%d\n",q); ////} ////return 0; // //#include...
main.c: In function 'main': main.c:83:19: error: 'xy' undeclared (first use in this function); did you mean 'y'? 83 | int max=xy[0][0]; | ^~ | y main.c:83:19: note: each undeclared identifier is reported only once for each function it appears in main.c:84:15:...
s605606768
p00026
C
#include<stdio.h> int main(){ int i,j,x,y,size; int data[N][N]; int ptnx1[]={0,0,0,1,-1},ptny1[]={0,-1,1,0,0}; int ptnx2[]={0,0,0,-1,-1,-1,1,1,1},ptny2[]={0,-1,1,-1,0,1,-1,0,1}; int ptnx3[]={0,0,0,-1,-1,-1,1,1,1,0,0,-2,2},ptny3[]={0,-1,1,-1,0,1,-1,0,1,2,-\ 2,0,0}; for (i=0;i<N;i++) for (j=0;j<N;j++) ...
main.c: In function 'main': main.c:5:12: error: 'N' undeclared (first use in this function) 5 | int data[N][N]; | ^ main.c:5:12: note: each undeclared identifier is reported only once for each function it appears in
s125029611
p00026
C
#include <stdio.h> #define WIDTH 10 #define HEIGHT 10 int field[ WIDTH + 4 ][ HEIGHT + 4 ] = {}; const int dx[ 3 ][ 4 ] = { { -1, 0, 1, 0 }, { -1, 1, -1, 1 }, { -2, 0, 2, 0 } }; const int dy[ 3 ][ 4 ] = { { 0, -1, 0, 1 }, { -1, -1, 1, 1 }, { 0, -2, 0, 2 } }; int main( void ) { int i, x, y, size, white, max; while...
main.c: In function 'main': main.c:32:1: error: expected declaration or statement at end of input 32 | } | ^
s423301195
p00026
C
2,5,3 3,6,1 3,4,2 4,5,2 3,6,3 2,4,1
main.c:1:1: error: expected identifier or '(' before numeric constant 1 | 2,5,3 | ^
s462733333
p00026
C
#include <stdio.h> ////(-"-;)ミスッテ…タ…//// void s(int x, int y, int pap[][10]) { int i, j; int x_dif, y_dif; for (j = 0; j < 3; j++){ for (i = 0; i < 3; i++){ x_dif = x + (i % 3) - 1; y_dif = y + (j - 1); if (x_dif >= 0 && x_dif < 10){ if (y_dif >= 0 && y_dif < 10){ if ((i % 3) - 1 == 0 || ...
main.c: In function 'main': main.c:110:19: error: expected expression before '/' token 110 | *// | ^
s522328958
p00026
C++
#include <iostream> #include <string> #include <vector> #define REP(i,k,n) for(int i=k;i<n;i++) #define rep(i,n) for(int i=0;i<n;i++) using namespace std; vector<string> split(const string &str, char delim) { vector<string> res; size_t current = 0, found; while((found = str.find_first_of(delim, current)) != st...
a.cc: In function 'int main()': a.cc:75:9: error: 'memset' was not declared in this scope 75 | memset(f,0,sizeof(f)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <vector> +++ |+#include <cstring> ...
s082802752
p00026
C++
#include <iostream> #include <string> #include <vector> #include <cstdlib> #define REP(i,k,n) for(int i=k;i<n;i++) #define rep(i,n) for(int i=0;i<n;i++) using namespace std; vector<string> split(const string &str, char delim) { vector<string> res; size_t current = 0, found; while((found = str.find_first_of(del...
a.cc: In function 'int main()': a.cc:76:9: error: 'memset' was not declared in this scope 76 | 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 <cstdlib> +++ |+#include <cstring>...
s054032605
p00026
C++
#include <iostream> #include <iomanip> #include <sstream> #include <stdio.h> #include <vector> #include <stack> #include <queue> #include <algorithm> #include <math.h> #include <utility> #include <string> #include <ctype.h> #include <cstring> #include <cstdio> #include <sstream> #include <functional> using namespace s...
a.cc: In function 'int main()': a.cc:24:15: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 24 | #define scanf scanf_s | ^~~~~~~ a.cc:64:16: note: in expansion of macro 'scanf' 64 | while (scanf("%d,%d,%d", &i, &j, &s)) | ^~~~~
s262128800
p00026
C++
#include <iostream> #include <iomanip> #include <sstream> #include <stdio.h> #include <vector> #include <stack> #include <queue> #include <algorithm> #include <math.h> #include <utility> #include <string> #include <ctype.h> #include <cstring> #include <cstdio> #include <sstream> #include <functional> using namespace s...
a.cc: In function 'int main()': a.cc:24:15: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 24 | #define scanf scanf_s | ^~~~~~~ a.cc:64:16: note: in expansion of macro 'scanf' 64 | while (scanf("%d,%d,%d", &i, &j, &s) != EOF) | ^~~~~
s664006534
p00026
C++
#include <stdio.h> int main() { int ans1 = 0; int ans2 = 0; int x,y,size; int paper[14][14]; for(int i = 0; i < 14; i++){ for(int j = 0; j < 14; j++){ paper[i][j] = 0; } } while(scanf("%d,%d,%d",&x,&y,&size) != EOF){ paper[x + 2][y + 2] ++; paper[x + 1][y + 2] ++; paper[x + 2][y + 1] ++; paper[x ...
a.cc: In function 'int main()': a.cc:45:9: error: 'Sleep' was not declared in this scope 45 | Sleep(2000); | ^~~~~
s622044814
p00026
C++
#include <iostream> #include <fstream> #include <algorithm> #include <vector> #include <string> #include <functional> #include <array> #include <stack> #include <queue> #include <chrono> #include <numeric> #include <memory.h> #include <map> #include <math.h> #include <utility> #include <set> #pragma warning(disable:49...
a.cc: In function 'int main()': a.cc:49:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 49 | while (scanf_s("%d,%d,%d",&x,&y,&size)){ | ^~~~~~~ | scanf
s736413781
p00026
C++
#include <iostream> #include <cstdio> #include <algorithm> using namespace std; int field[10][10]; int sx[]={-1,0,0,0,1},sy[]={0,-1,0,1,0}; int bx[]={-2,-1,-1,-1,0,0,0,0,0,1,1,1,2},by[]={0,-1,0,1,-2,-1,0,1,2,-1,0,1,0}; void small(int x,int y){ for(int i=0;i<5;i++){ field[x+sx][y+sy]++; } } void middle(int x,int y){...
a.cc: In function 'void small(int, int)': a.cc:10:22: error: invalid types 'int [10][10][int*]' for array subscript 10 | field[x+sx][y+sy]++; | ^ a.cc: In function 'void middle(int, int)': a.cc:18:22: error: a function-definition is not allowed here before '{' token 18 |...
s267999053
p00026
C++
#include<iostream> using namespace std; int data[15][15]={0}; int main(){ int x,y,s; char c; while(cin>>x>>c>>y>>c>>s && s){ while(1){ data[x][y]++; if(y-1>=0)data[x][y-1]++; if(x+1<10)data[x+1][y]++; if(y+1<10)data[x][y+1]++; if(x-1>=0)data[x-1][y]++; if(s==1)break; if(x+1<10 && y+1<10)...
a.cc:9:32: error: extended character   is not valid in an identifier 9 | while(cin>>x>>c>>y>>c>>s && s){ | ^ a.cc: In function 'int main()': a.cc:9:32: error: 's\U00003000' was not declared in this scope 9 | while(cin>>x>>c>>y>>c>>s && s){ | ...
s010231315
p00026
C++
#include<stdio.h> static int map[11][11]; void small(int x,int y){ map[y][x]+=1; map[y][x+1]+=1; map[y][x-1]+=1; map[y+1][x]+=1; map[y-1][x]+=1; } void midium(int x,int y){ small(x,y); map[y+1][x+1]+=1; map[y-1][x-1]+=1; map[y-1][x+1]+=1; map[y+1][x-1]+=1; } void big(int x,int y){ medium(x,y); map[y][x+...
a.cc: In function 'void big(int, int)': a.cc:22:9: error: 'medium' was not declared in this scope; did you mean 'midium'? 22 | medium(x,y); | ^~~~~~ | midium a.cc: In function 'int main()': a.cc:46:25: error: 'medium' was not declared in this scope; did you mean 'midium'? 46 | ...
s003101538
p00026
C++
#include <iostream> #include <cmath> #include <vector> #include <cstdio> #include <algorithm> using namespace std; int main () { int m[18][18] = {}; int x, y, s; int dx1[4] = {0, 1, 0, -1}, dy1[4] = {1, 0, -1, 0}; int dx2[8] = {0, 1, 1, 1, 0, -1, -1, -1}, dy2[8] = {1, 1, 0, -1, -1, -1, 0, 1}; int dx3[12] = {0, -1,...
a.cc: In function 'int main()': a.cc:24:24: error: 'B' was not declared in this scope 24 | case 2:B | ^ a.cc:25:41: error: 'i' was not declared in this scope 25 | for (int i = 0; i < 8; i++)m[x + dx2[i]][y + dy2[i]]++; | ...
s528739566
p00026
C++
#include<iostream> using namespace std; int main() { int ma[10][10]; int x,y,d; char c; memset(ma,0,sizeof(ma)); //while(cin>>x>>c>>y>>c>>d){ for(int i=0;i<6;i++){ cin>>x>>c>>y>>c>>d; ma[y][x]++; if(d==1){ if(x>0){ ma[y][x-1]+...
a.cc: In function 'int main()': a.cc:8:5: error: 'memset' was not declared in this scope 8 | memset(ma,0,sizeof(ma)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> +++ |+#include <cstring> 2 ...
s170337839
p00026
C++
import Control.Monad import qualified Data.Array.Unboxed as A import qualified Data.Array.ST as AS import Data.List data Drop = Small | Middle | Large deriving (Enum) spread :: Drop -> (Int,Int) -> [(Int,Int)] spread Small = neighbours 1 spread Middle = \(x,y) -> [(x+i,y+j) | i <- [-1..1], j <- [-1..1]] spread Large =...
a.cc:9:17: error: stray '\' in program 9 | spread Middle = \(x,y) -> [(x+i,y+j) | i <- [-1..1], j <- [-1..1]] | ^ a.cc:9:47: error: too many decimal points in number 9 | spread Middle = \(x,y) -> [(x+i,y+j) | i <- [-1..1], j <- [-1..1]] | ...
s603704210
p00026
C++
#include<iostream> #include<string> #include<cstdio> #include<algorithm> #include<stack> #include<queue> #include<vector> #include<cmath> #include<utility> #include<set> #include<complex> #define vi vector<int> #define vvi vector<vector<int> > #define ll long long int #define vl vector<ll> #define vvl vector<vector<ll>...
a.cc: In function 'int main()': a.cc:71:14: error: expected '}' at end of input 71 | return 0; | ^ a.cc:34:12: note: to match this '{' 34 | int main(){ | ^
s231319922
p00026
C++
#include<iostream> #include<string> #include<cstdio> #include<algorithm> #include<stack> #include<queue> #include<vector> #include<cmath> #include<utility> #include<set> #include<complex> #define vi vector<int> #define vvi vector<vector<int> > #define ll long long int #define vl vector<ll> #define vvl vector<vector<ll>...
a.cc: In function 'int main()': a.cc:71:14: error: expected '}' at end of input 71 | return 0; | ^ a.cc:34:12: note: to match this '{' 34 | int main(){ | ^
s442927636
p00026
C++
#include <iostream> #include <cstdio> #define scanf scanf_s #define SIZE 10 using namespace std; int format[3][12][2] = { { { 0,1 },{ 1,0 },{ 0,-1 },{ -1,0 } }, { { 0,1 },{ 1,1 },{ 1,0 },{ 1,-1 },{ 0,-1 },{ -1,-1 },{ -1,0 },{ -1,1 } }, { { 0,1 },{ 1,1 },{ 1,0 },{ 1,-1 },{ 0,-1 },{ -1,-1 },{ -1,0 },{ -1...
a.cc: In function 'int main()': a.cc:4:15: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 4 | #define scanf scanf_s | ^~~~~~~ a.cc:18:16: note: in expansion of macro 'scanf' 18 | while (scanf("%d,%d,%d", &x, &y, &s)) { | ^~~~~
s776271018
p00026
C++
#include <iostream> #include <cstdio> #define scanf scanf_s #define SIZE 10 using namespace std; int map[SIZE][SIZE]; void drop(int x, int y) { if (x < 0 || y < 0 || x >= SIZE || y >= SIZE) return; map[x][y]++; } int main() { int x, y, s, count = 0, most = 0; while (scanf("%d,%d,%d", &x, &y, &s)) { x--; ...
a.cc: In function 'int main()': a.cc:4:15: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 4 | #define scanf scanf_s | ^~~~~~~ a.cc:20:16: note: in expansion of macro 'scanf' 20 | while (scanf("%d,%d,%d", &x, &y, &s)) { | ^~~~~
s049120951
p00026
C++
#include <iostream> #include <algorithm> int main() { int s = 100; int xy[10][10] = {}; while (true) { int x, y, n; char a, b; std::cin >> x >> a >> y >> b >> n; if (x == 0) { break; } switch (n) { case 1:{ if (x != 0) { ++xy[x - 1][y]; } ++xy[x + 1][y]; if (y != 0) { ++xy[x][y...
In file included from /usr/include/c++/14/algorithm:61, from a.cc:2: /usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]': /usr/inclu...
s302662664
p00026
C++
#include <iostream> #include <algorithm> int main() { int x, y, n; char a, b; int a = 0; int s = 100; int xy[10][10] = {}; while (std::cin >>x>> a >> y >> b >> n) { switch (n) { case 1: { if (x != 0) { ++xy[x - 1][y]; } ++xy[x + 1][y]; if (y != 0) { ++xy[x][y - 1]; } ++xy[x][y + 1...
a.cc: In function 'int main()': a.cc:6:13: error: conflicting declaration 'int a' 6 | int a = 0; | ^ a.cc:5:22: note: previous declaration as 'char a' 5 | char a, b; | ^
s731902453
p00026
C++
#include<iostream> #include<stdio.h> #define DROP(x,y) if(x>=0&&y>=0&&x<10&&y<10)++cloth[x][y] using namespace std; ?? int main(){ ?? ????????int x, y, size; ????????int cloth[10][10]; ????????int count, max; ?????????? ????????for (int i = 0; i < 10; ++i) ????????for (int j = 0; j < 10; ++j) ????????????????cloth[i][j...
a.cc:5:1: error: expected unqualified-id before '?' token 5 | ?? | ^
s133049842
p00026
C++
#include<iostream> int main() { ????????int density[10][10] = {}; ????????int x, y, size; ????????char comma; ????????while (std::cin >> x >> comma >> y >> comma >> size) { ????????????????switch (size) { ????????????????case 3: ????????????????????????if (x - 2 >= 0) ++density[x - 2][y]; ????????????????????????if (y ...
a.cc:14:23: warning: trigraph ??/ ignored, use -trigraphs to enable [-Wtrigraphs] 14 | ????????????????????????// fall through a.cc:20:23: warning: trigraph ??/ ignored, use -trigraphs to enable [-Wtrigraphs] 20 | ????????????????????????// fall through a.cc: In function 'int main()': a.cc:4:1: error: expected pr...
s323021626
p00026
C++
#include<iostream> #include<cstdio> using namespace std; int main() { ????????int paper[15][15] = {{0}}; ????????int x,y,size; ????????while( scanf ("%d,%d,%d",&x ,&y ,&size ) != EOF) ????????{ ????????????????x+=2; ????????????????y+=2; ????????????????if(size==1) ????????????????{ ????????????????????????paper[x][y]...
a.cc: In function 'int main()': a.cc:7:1: error: expected primary-expression before '?' token 7 | ????????int paper[15][15] = {{0}}; | ^ a.cc:7:2: error: expected primary-expression before '?' token 7 | ????????int paper[15][15] = {{0}}; | ^ a.cc:7:3: error: expected primary-expression before '?' t...
s577601358
p00026
C++
#include<iostream> int main(){ int paper[10][10],x,y,a,max=0; std::string s; for(x=0; x<10; x++) for(y=0; y<10; y++) paper[x][y]=0; while(std::cin>>s){ x=s.at(0)-'0'; y=s.at(2)-'0'; a=s.at(4)-'0'; paper[x][y]++; if(x>0) paper[x-1][y]++; if(x<9) paper[x+1][y]++; if(...
a.cc: In function 'int main()': a.cc:35:28: error: expected primary-expression before ',' token 35 | paper[x][y]==0 ? a++:, | ^ a.cc:36:41: error: expected primary-expression before ';' token 36 | paper[x][y]>max ? max=paper[x][y]:; | ...
s049881372
p00026
C++
#include <stdio.h> #define TIMES 6 /* http://rose.u-aizu.ac.jp/onlinejudge/ProblemSet/description.jsp?id=0026&lang=jp */ int main(void) { int paper[10][10] = {0} ; int blank = 0; int maxdk = 0; int x = 0 ; int y = 0 ; int size = 0 ; for ( ; i < TIMES ; i++ ){ scanf("%d",&x) ; scanf(",%d",&y) ; scanf(",%d"...
a.cc: In function 'int main()': a.cc:15:17: error: 'i' was not declared in this scope 15 | for ( ; i < TIMES ; i++ ){ | ^
s266773777
p00026
C++
#include <iostream> #include <string> #include <algorithm> #include <vector> using namespace std; #define REP(i,a,n) for(int i=(a); i<(int)(n); i++) #define rep(i,n) REP(i,0,n) int paper[10][10]; const int dx[] = {0,0,1,-1}; const int dy[] = {1,-1,0,0}; const int diax[] = {1,1,-1,-1}; const int diay[] = {-1,1,1,-1}; ...
a.cc: In function 'int main()': a.cc:50:9: error: 'memset' was not declared in this scope 50 | memset(paper,0,sizeof(paper)); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include <vector> +++ |+#include <c...
s738100105
p00026
C++
#include <iostream> using namespace std; int main(){ int x,y,size; int canvas[10][10]; int empty_num, max_val; int i, j; for(i=0; i<10; i++) for(j=0; j<10; j++) canvas[i][j]=0; while(cin>>x){ cin>>y; cin>>size; for(i=-1; i<=1; i=i+2) if(x+i>=0 && x+i<10) canvas[x+i][y]++; for(i=-1; ...
a.cc:43:3: error: expected unqualified-id before 'return' 43 | return 0; | ^~~~~~ a.cc:44:1: error: expected declaration before '}' token 44 | } | ^
s123655217
p00026
C++
#include <iostream> #include <string> #include <map> #include <vector> #include <algorithm> #include <stdio.h> #include <math.h> #include <iomanip> using namespace std; int main(){ int x,y,size,m[14][14]={0},max=0,none=0; while(scanf("%d,%d,%d",&x,&y,&size)!=EOF{ if(size>=1){ m[x+2][y+2]++; m[x+2][y...
a.cc: In function 'int main()': a.cc:12:43: error: expected ')' before '{' token 12 | while(scanf("%d,%d,%d",&x,&y,&size)!=EOF{ | ~ ^
s215661540
p00026
C++
void dfs1(int x, int y) { field[y][x] += 1; for(int dx = -1 ; dx <= 1 ; dx++) { int nx = x + dx; if(0 <= nx && nx < 10 && nx != x) field[y][nx] += 1; } for(int dy = -1 ; dy <= 1 ; dy++) { int ny = y + dy; if(0 <= ny && ny < 10 && ny != y) field[ny][x] += 1; } } void dfs2(int x, int y) { fie...
a.cc: In function 'void dfs1(int, int)': a.cc:2:3: error: 'field' was not declared in this scope; did you mean 'friend'? 2 | field[y][x] += 1; | ^~~~~ | friend a.cc: In function 'void dfs2(int, int)': a.cc:14:3: error: 'field' was not declared in this scope; did you mean 'friend'? 14 | field[...
s482485397
p00026
C++
#include <iostream> using namespace std; int small_x[4] = {-1, 0, 0, 1}; int small_y[4] = { 0, -1, 1, 0}; int medium_x[8] = {-1, -1, -1, 0, 0, 1, 1, 1}; int medium_y[8] = {-1, 0, 1, -1, 1, -1, 0, 1}; int large_x[12] = {-2, -1, -1, -1, 0, 0, 0, 0, 1, 1, 1, 2}; int large_y[12] = { 0, -1, 0, 1, -2, -1, 1, 2,...
a.cc: In function 'void solve()': a.cc:17:9: error: 'memset' was not declared in this scope 17 | memset(Field, 0, sizeof(Field)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ |+#incl...
s218770374
p00026
C++
import java.util.Scanner; public class Main { static int max = 0; static int count = 100; static int[][] p = new int[10][10]; public static void main(String[] args) { Scanner in = new Scanner(System.in) .useDelimiter("[^0-9]+"); max = 0; count = 100; for (int i = 0; i < p.length; i++) { fo...
a.cc:2:1: error: 'import' does not name a type 2 | import java.util.Scanner; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:4:1: error: expected unqualified-id before 'public' 4 | public class Main { | ^~~~~~
s510129594
p00026
C++
import java.util.Scanner; public class Main { static int max = 0; static int count = 100; static int[][] p = new int[10][10]; public static void main(String[] args) { Scanner in = new Scanner(System.in) .useDelimiter("[^0-9]+"); max = 0; count = 100; for (int i = 0; i < p.len...
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 { | ^~~~~~
s727142290
p00026
C++
//インクを落とす #include<cstdio> using namespace std; int main(void){ int pa[10][10]; int i,j; //ループカウンタ int x,y,size,da=0,not=0; //二次元配列の初期化 for(i=0;i<10;i++){ for(j=0;j<10;j++) pa[i][j]=0; } while(scanf("%d,%d,%d",&x,&y,&size)==3){ switch(size){ case 1: //小 pa[x][y]++; pa[x-1][y]++; pa[x+1...
a.cc: In function 'int main()': a.cc:9:27: error: expected unqualified-id before 'not' token 9 | int x,y,size,da=0,not=0; | ^~~ a.cc:47:38: error: expected primary-expression before ';' token 47 | not++; | ...
s578070159
p00026
C++
//インクを落とす #include<cstdio> using namespace std; int main(void){ int pa[10][10]; int i,j; //ループカウンタ int x,y,size,da=0,not=0; //二次元配列の初期化 for(i=0;i<10;i++){ for(j=0;j<10;j++) pa[i][j]=0; } while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){ switch(size){ case 1: //小 pa[x][y]++; pa[x-1][y]++; pa[x...
a.cc: In function 'int main()': a.cc:9:27: error: expected unqualified-id before 'not' token 9 | int x,y,size,da=0,not=0; | ^~~ a.cc:47:38: error: expected primary-expression before ';' token 47 | not++; | ...
s428200674
p00026
C++
//インクを落とす #include<cstdio> using namespace std; int main(){ int pa[10][10]; int i,j; //ループカウンタ int x,y,size,da=0,not=-1; //二次元配列の初期化 for(i=0;i<10;i++){ for(j=0;j<10;j++) pa[i][j]=0; } while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){ switch(size){ case 1: //小 pa[x][y]++; pa[x-1][y]++; pa[x+1]...
a.cc: In function 'int main()': a.cc:9:27: error: expected unqualified-id before 'not' token 9 | int x,y,size,da=0,not=-1; | ^~~ a.cc:47:38: error: expected primary-expression before ';' token 47 | not++; | ...
s027659582
p00026
C++
//インクを落とす #include<cstdio> using namespace std; int main(void){ int pa[10][10]; int i,j; //ループカウンタ int x,y,size,da=0,not=0; //二次元配列の初期化 for(i=0;i<10;i++){ for(j=0;j<10;j++) pa[i][j]=0; } while(scanf("%d,%d,%d",&x,&y,&size)!=-1){ switch(size){ case 1: //小 pa[x][y]++; pa[x-1][y]++; pa[x+...
a.cc: In function 'int main()': a.cc:9:27: error: expected unqualified-id before 'not' token 9 | int x,y,size,da=0,not=0; | ^~~ a.cc:47:38: error: expected primary-expression before ';' token 47 | not++; | ...
s604400089
p00026
C++
//インクを落とす #include<cstdio> using namespace std; int main(void){ int pa[14][14]; int i,j; //ループカウンタ int x,y,size,da=0,not=0; //二次元配列の初期化 for(i=2;i<12;i++){ for(j=2;j<12;j++) pa[i][j]=0; } while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){ switch(size){ case 1: //小 pa[x][y]++; pa[x-1][y]++; pa[x...
a.cc: In function 'int main()': a.cc:9:27: error: expected unqualified-id before 'not' token 9 | int x,y,size,da=0,not=0; | ^~~ a.cc:47:38: error: expected primary-expression before ';' token 47 | not++; | ...
s902410143
p00026
C++
//インクを落とす #include<cstdio> using namespace std; int main(void){ int pa[14][14]; int i,j; //ループカウンタ int x,y,size,da=0,not=0; //二次元配列の初期化 for(i=2;i<12;i++){ for(j=2;j<12;j++) pa[i][j]=0; } while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){ x=x+2; y=y+2; switch(size){ case 1: //小 pa[x][y]++; pa[x...
a.cc: In function 'int main()': a.cc:9:27: error: expected unqualified-id before 'not' token 9 | int x,y,size,da=0,not=0; | ^~~ a.cc:49:38: error: expected primary-expression before ';' token 49 | not++; | ...
s733258420
p00026
C++
//インクを落とす #include<cstdio> using namespace std; int main(void){ int pa[14][14]; int i,j; //ループカウンタ int x,y,size,da=0,not=0; //二次元配列の初期化 for(i=0;i<14;i++){ for(j=0;j<14;j++) pa[i][j]=0; } while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){ x=x+2; y=y+2; switch(size){ case 1: //小 pa[x][y]++; pa[x...
a.cc: In function 'int main()': a.cc:9:27: error: expected unqualified-id before 'not' token 9 | int x,y,size,da=0,not=0; | ^~~ a.cc:49:38: error: expected primary-expression before ';' token 49 | not++; | ...
s585134629
p00026
C++
//インクを落とす #include<cstdio> using namespace std; int main(void){ int pa[14][14]; int i,j; //ループカウンタ int x,y,size,da=0,not=0; //二次元配列の初期化 for(i=0;i<14;i++){ for(j=0;j<14;j++) pa[i][j]=0; } while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){ x=x+2; y=y+2; switch(size){ case 1: //小 pa[y][x]++; pa[y...
a.cc: In function 'int main()': a.cc:9:27: error: expected unqualified-id before 'not' token 9 | int x,y,size,da=0,not=0; | ^~~ a.cc:49:38: error: expected primary-expression before ';' token 49 | not++; | ...
s717032406
p00026
C++
#include<cstdio> using namespace std; int main(void){ int pa[14][14]; int i,j; int x,y,size,da=0,not=0; for(i=0;i<14;i++){ for(j=0;j<14;j++) pa[i][j]=0; } while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){ x=x+2; y=y+2; switch(size){ case 1: pa[y][x]++; pa[y-1][x]++; pa[y+1][x]++; pa[y]...
a.cc: In function 'int main()': a.cc:8:27: error: expected unqualified-id before 'not' token 8 | int x,y,size,da=0,not=0; | ^~~ a.cc:47:38: error: expected primary-expression before ';' token 47 | not++; | ...
s940307587
p00026
C++
#include<cstdio> using namespace std; int main(){ int pa[14][14]; int i,j; int x,y,size; int da=0,not=0; for(i=0;i<14;i++){ for(j=0;j<14;j++) pa[i][j]=0; } while(scanf("%d,%d,%d",&x,&y,&s)!=-1){ x=x+2; y=y+2; switch(size){ case 1: pa[y][x]++; pa[y-1][x]++; pa[y+1][x]++; pa[y][x...
a.cc: In function 'int main()': a.cc:9:11: error: expected unqualified-id before 'not' token 9 | int da=0,not=0; | ^~~ a.cc:16:32: error: 's' was not declared in this scope 16 | while(scanf("%d,%d,%d",&x,&y,&s)!=-1){ | ^ a.cc:49:10: error: expected primary-e...
s028062856
p00026
C++
#include<cstdio> using namespace std; int main(){ int pa[14][14]; int i,j; int x,y,size; int da=0,not=0; for(i=0;i<14;i++){ for(j=0;j<14;j++) pa[i][j]=0; } while(scanf("%d,%d,%d",&x,&y,&size)!=-1){ x=x+2; y=y+2; switch(size){ case 1: pa[y][x]++; pa[y-1][x]++; pa[y+1][x]++; pa[y...
a.cc: In function 'int main()': a.cc:9:11: error: expected unqualified-id before 'not' token 9 | int da=0,not=0; | ^~~ a.cc:51:10: error: expected primary-expression before ';' token 51 | not++; | ^ a.cc:62:23: error: expected primary-expression before ',' token 62 | print...
s145142627
p00026
C++
#include<cstdio> using namespace std; int main(){ int pa[14][14]; int i,j; int x,y,size; int da; int not; da=not=0; for(i=0;i<14;i++){ for(j=0;j<14;j++) pa[i][j]=0; } while(scanf("%d,%d,%d",&x,&y,&size)!=-1){ x=x+2; y=y+2; switch(size){ case 1: pa[y][x]++; pa[y-1][x]++; pa[y+1][x]+...
a.cc: In function 'int main()': a.cc:10:6: error: expected unqualified-id before 'not' token 10 | int not; | ^~~ a.cc:11:8: error: expected primary-expression before '=' token 11 | da=not=0; | ^ a.cc:52:10: error: expected primary-expression before ';' token 52 | not++; | ...
s368000238
p00026
C++
#include<iostream> using namespace std; int main(){ int grid[14][14]; int s[4][2]={{0,-1},{0,1},{-1,0},{1,0}}; int m[4][2]={{-1,-1},{-1,1},{1,-1},{1,1}}; int l[4][2]={{0,-2},{0,2},{-2,0},{2,0}}; int x, y, size; int i, j; int max=0; int blank; char comma; for(i=0;i<14;i++){ ...
a.cc: In function 'int main()': a.cc:24:17: error: invalid types 'int [14][14][int*]' for array subscript 24 | grid[x+s[0]][y+s[1]] += 1; | ^ a.cc:28:21: error: invalid types 'int [14][14][int*]' for array subscript 28 | grid[x+m[0]][y+m[1]] += 1; | ...
s199820758
p00026
C++
#include<iostream> #include<vector> #include <algorithm> #include<stdio.h> int main(){ std::vector<std::vector<int>> vec(10,std::vector<int>(10,0)); while(1){ int x,y,size; scanf("%d,%d,%d",&x,&y,&size); //std::cin>>x>>y>>size; if(scanf.eof())break; //if(x==0&&y==0&&size==0)break; vec[y][x]++; vec[y-1][...
a.cc: In function 'int main()': a.cc:11:26: error: request for member 'eof' in 'scanf', which is of non-class type 'int(const char*, ...)' 11 | if(scanf.eof())break; | ^~~
s284051947
p00026
C++
#include<iostream> #include<vector> #include<algorithm> #include<stdio.h> int main(){ int x,y,size; std::vector<std::vector<int> > vec(10,std::vector<int>(10,0)); while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){ vec[y][x]++; vec[y-1][x]++; vec[y+1][x]++; vec[y][x-1]++; vec[y][x+1]++; if(size>=2){ vec[y-1][x...
a.cc: In function 'int main()': a.cc:34:23: error: no match for 'operator<' (operand types are 'int' and '__gnu_cxx::__alloc_traits<std::allocator<std::vector<int> >, std::vector<int> >::value_type' {aka 'std::vector<int>'}) 34 | if(max<vec[i])max=vec[i]; In file included from /usr/include/c++/14/str...
s078105425
p00026
C++
#include <iostream> #include <cstdlib> #include <cstdio> #include <cstring> #include <cmath> #include <stack> #include <cctype> #include <complex> #include <vector> #include <algorithm> #include <cassert> using namespace std; bool solve(){ int dx1[] = {0, 1, 0, -1, 0}; int dy1[] = {0, 0, 1, 0, -1}; int dx2[] = {...
a.cc: In function 'bool solve()': a.cc:61:26: error: expected ';' before 'cout' 61 | cout<< ans<< endl | ^ | ; 62 | cout<< ans2<< endl; | ~~~~
s432150828
p00026
C++
#include <iostream> #include <algorithm> using namespace std; //4方向ベクトル→↑←↓ const int px[4] ={1,0,-1,0}; const int py[4] ={0,-1,0,1}; int board[15][15]; int x,y,size; int ans1,ans2; int main() { ans1 = 0; for(int i = 0;i <10;i++){ for(int j = 0;j < 10;j++){ board[i][j] = 0; } } while(scanf("%d,...
a.cc: In function 'int main()': a.cc:21:33: error: reference to 'size' is ambiguous 21 | while(scanf("%d,%d,%d",&x,&y,&size) !=EOF){ | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s153983150
p00026
C++
#include<iostream> using namespace std ; int map[10][10]={}; int sx[] = { 0,-1,1,0 } , sy[] = { -1,0,0,1 } ; int mx[] = { -1,0,1 }, my[] = { -1,0,1 } ; int lx[] = { 0,-1,0,1,-2,-1,1,2,-1,0,1,0 } ; int ly[] = { -2,-1,-1,-1,0,0,0,0,1,1,1,2 } ; int main(){ int x,y,size ; char temp; int enpty=0,max=0; while(1){ ...
a.cc: In function 'int main()': a.cc:46:49: error: no post-increment operator for type 46 | if( map[i][j]==0 ) empty++; | ^~ a.cc:51:14: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} an...
s266227311
p00026
C++
#include<iostream> using namespace std; int main(){ int a[10][10]={},x,y,size,dumy,max=0,ans=0; int mx[12]={0,-1,1,0,-1,1,-1,1,0,-2,2,0},my[12]={-1,0,0,1,-1,-1,1,1,-2,0,0,2}; while(cin>>x>>y>>size!=EOF){ dumy=4*size; for(int i=0;i<dumy;i++){ if(x+mx[i]>=0&&y+my[i]>=0) a[x+mx[i]][y+my[i]]++; } } for(int...
a.cc: In function 'int main()': a.cc:6:30: error: no match for 'operator!=' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int') 6 | while(cin>>x>>y>>size!=EOF){ | ~~~~~~~~~~~~~~~^~ | | | ...
s918736892
p00026
C++
#include<iostream> #define DROP(x,y) if(x>=0&&y>=0&&x<10&&y<10)++cloth[x][y] using namespace std; int main(){ int x, y, size; int cloth[10][10]; int count, max; for (int i = 0; i < 10; ++i) for (int j = 0; j < 10; ++j) cloth[i][j] = 0; while (scanf_s("%d,%d,%d", &x, &y, &size) + 1){ if (size == 1){ DR...
a.cc: In function 'int main()': a.cc:15:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 15 | while (scanf_s("%d,%d,%d", &x, &y, &size) + 1){ | ^~~~~~~ | scanf
s016043231
p00026
C++
#include<iostream> #include<stdio.h> #define DROP(x,y) if(x>=0&&y>=0&&x<10&&y<10)++cloth[x][y] using namespace std; int main(){ int x, y, size; int cloth[10][10]; int count, max; for (int i = 0; i < 10; ++i) for (int j = 0; j < 10; ++j) cloth[i][j] = 0; while (scanf_s("%d,%d,%d", &x, &y, &size) + 1){ if ...
a.cc: In function 'int main()': a.cc:16:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 16 | while (scanf_s("%d,%d,%d", &x, &y, &size) + 1){ | ^~~~~~~ | scanf
s029609560
p00026
C++
#include<iostream> #include<stdio.h> using namespace std; int main(){ int a[10][10]={},x,y,size,dumy=0max=0,ans=0; int mx[12]={0,-1,1,0,-1,1,-1,1,0,-2,2,0},my[12]={-1,0,0,1,-1,-1,1,1,-2,0,0,2}; while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){ dumy=4*size; //cout<<size<<endl; for(int i=0;i<dumy;i++){ if(x+mx[i]>=0...
a.cc: In function 'int main()': a.cc:5:40: error: unable to find numeric literal operator 'operator""max' 5 | int a[10][10]={},x,y,size,dumy=0max=0,ans=0; | ^~~~ a.cc:18:33: error: 'ans' was not declared in this scope; did you mean 'abs'? 18 | ...
s559609681
p00026
C++
#include<iostream> #include<cstdio> #include<algorithm> using namespace std; int grid[14][14] = { 0 }; void small(int x, int y){ grid[x][y]++; grid[x - 1][y]++; grid[x + 1][y]++; grid[x][y - 1]++; grid[x][y + 1]++; } void medium(int x, int y){ small(x, y); grid[x - 1][y - 1]++; grid[x + 1][y - 1]++; grid[x...
a.cc: In function 'int main()': a.cc:36:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 36 | while (scanf_s("%d,%d,%d", &x, &y, &size) != EOF){ | ^~~~~~~ | scanf
s432913988
p00026
C++
#include <iostream> #include <algorithm> #define MAX 30 using namespace std; int main() { int p[MAX][MAX]; for (int i = 0; i < MAX; i++){ for (int j = 0; j < MAX; j++){ p[i][j] = 0; } } int x, y, size; while (scanf_s("%d,%d,%d", &x, &y, &size) != EOF){ x += 10; y += 10; p[x][y]++; p[x - 1][y]++; ...
a.cc: In function 'int main()': a.cc:16:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 16 | while (scanf_s("%d,%d,%d", &x, &y, &size) != EOF){ | ^~~~~~~ | scanf
s222417482
p00026
C++
#include <iostream> #include <algorithm> #include <cstdio> #define MAX 30 using namespace std; int main() { int p[MAX][MAX]; for (int i = 0; i < MAX; i++){ for (int j = 0; j < MAX; j++){ p[i][j] = 0; } } int x, y, size; while (scanf_s("%d,%d,%d", &x, &y, &size) != EOF){ x += 10; y += 10; p[x][y]++; ...
a.cc: In function 'int main()': a.cc:17:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 17 | while (scanf_s("%d,%d,%d", &x, &y, &size) != EOF){ | ^~~~~~~ | scanf
s432466991
p00027
Java
import java.util.Scanner; public class MyClass{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); String[] w = {"Wednesday","Thursday","Friday","Saturday","Sunday","Monday","Tuesday"}; int[] d = {31,29,31,30,31,30,31,31,30,31,30,31}; int ...
Main.java:3: error: class MyClass is public, should be declared in a file named MyClass.java public class MyClass{ ^ 1 error
s362499449
p00027
Java
import java.io.*; import java.util.*; public class Tmp{ public static void main(String[] args)throws IOException{ //BufferedReader reader=new BufferedReader(new InputStreamReader(System.in)); Scanner reader=new Scanner(System.in); //int in=reader.nextInt(); int[] tmp={31,29,31,30,31,30,31,31,30,30,30,31}; St...
Main.java:3: error: class Tmp is public, should be declared in a file named Tmp.java public class Tmp{ ^ 1 error
s025788152
p00027
Java
import java.util.*; public class Main{ private static final Scanner scan = new Scanner(System.in); public static void main(String[] args){ while(scan.hasNext()){ int mon = scan.nextInt(); int day = scan.nextInt(); if(mon == 0){ break; } int year = 2004; Calendar cal = Calendar.getInstance()...
Main.java:46: error: reached end of file while parsing } ^ 1 error
s514726554
p00027
Java
import java.util.*; public class Main{ private static final Scanner scan = new Scanner(System.in); public static void main(String[] args){ while(scan.hasNext()){ int year = 2004; int mon = scan.nextInt(); int dat = scan.nextInt(); Calendar cal = Calendar.getInstance(); cal.set(2004, mon - 1, day);...
Main.java:13: error: cannot find symbol cal.set(2004, mon - 1, day); ^ symbol: variable day location: class Main Main.java:35: error: package Calender does not exist case Calender.SATURDAY : ^ 2 errors
s761490291
p00027
Java
#include <vector> #include <list> #include <map> #include <set> #include <stack> #include <queue> #include <deque> #include <algorithm> #include <utility> #include <functional> #include <sstream> #include <iostream> #include <cstdio> #include <cmath> #include <cstdlib> #include <cctype> #include <string> #include <cstr...
Main.java:1: error: illegal character: '#' #include <vector> ^ Main.java:2: error: illegal character: '#' #include <list> ^ Main.java:3: error: illegal character: '#' #include <map> ^ Main.java:4: error: illegal character: '#' #include <set> ^ Main.java:5: error: illegal character: '#' #include <stack> ^ Main.java:6: e...
s711404150
p00027
C
#include <stdio.h> int main(void) { int date[12][31]; int d; int i, j; int day; day = 5; for (i = 0; i < 12; i++){ switch (i + 1){ case 1: d = 31; break; case 3: d = 31; break; case 5: d = 31; break; case 7: d = 31; break; case 8: d = 31;...
main.c: In function 'main': main.c:69:38: error: expected ')' before 'i' 69 | while (scanf("%d %d", &i, &j) i != 0 && j != 0){ | ~ ^~ | )
s062491285
p00027
C
#include<stdio.h> main(){ int mon[12],month,day,day2,i,j; for(i=0;i<12;i++){ if(i==2){ mon[i]=29; } if(i==1 || i==3 || i==5 || i==7 || i==8 || i==10 || i==12){ mon[i]=31; } else{ mon[i]=30; } while(1){ scanf("%d %d",&month,&day); if(month==0 && day==0){ brea...
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int] 2 | main(){ | ^~~~ main.c: In function 'main': main.c:48:1: error: expected declaration or statement at end of input 48 | } | ^
s018698904
p00027
C
#include <stdio.h> int main(){ int mon,day; while(1){ scanf("%d%d",&mon,&day); if(!mon&&!day)break; t=0; for(i=1;i<mon;i++){ if(i==2)t+=29; else if(i==4||i==6||i==9||i==11)t+=30; else t+=31; } t+=day; switch(t%7){ case 0: printf("Wednesday\n"); break; case 1: printf("Thursday\n"); break;...
main.c: In function 'main': main.c:10:9: error: 't' undeclared (first use in this function) 10 | t=0; | ^ main.c:10:9: note: each undeclared identifier is reported only once for each function it appears in main.c:11:13: error: 'i' undeclared (first use in this function) 11 | for(i=1;...
s864772641
p00027
C
#include <stdio.h> int main(){ int m,day,date; int a[]={0,31,29,31,30,31,30,31,31,30,31,30,31}; int i,j,k; while(1){ date=2; b=1; scanf("%d %d",&m,&day); if(m==0&&day==0)break; for(i=1; i<=12; i++){ for(j=1; j<=a[i]; j++){ date=(date+1)%7; printf(" month:%2d day:%2d date:%2d\n",i,j,date); ...
main.c: In function 'main': main.c:9:17: error: 'b' undeclared (first use in this function) 9 | b=1; | ^ main.c:9:17: note: each undeclared identifier is reported only once for each function it appears in
s242731175
p00027
C
#include <stdio.h> int main(){ int m,day,date; int a[]={0,31,29,31,30,31,30,31,31,30,31,30,31}; int i,j,k; while(1){ date=2; b=1; scanf("%d %d",&m,&day); if(m==0&&day==0)break; for(i=1; i<=12; i++){ for(j=1; j<=a[i]; j++){ date=(date+1)%7; printf(" month:%2d day:%2d date:%2d\n",i,j,date); ...
main.c: In function 'main': main.c:9:17: error: 'b' undeclared (first use in this function) 9 | b=1; | ^ main.c:9:17: note: each undeclared identifier is reported only once for each function it appears in
s189073518
p00027
C
// ConsoleApplication2.cpp : ??????????????? ??¢????????±????????§????????¨????????? ????????????????????????????????? // #define _CRT_SECURE_NO_WARNINGS 1 #include "stdafx.h" #include<string.h> int _tmain(int argc, _TCHAR* argv[]) { char you[8][15]; int a,b,x,y=0,z; strcpy (you[5],"Monday"); strcpy (you[6],"Tue...
main.c:6:10: fatal error: stdafx.h: No such file or directory 6 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s338908938
p00027
C
// ConsoleApplication2.cpp : ??????????????? ??¢????????±????????§????????¨????????? ????????????????????????????????? // #define _CRT_SECURE_NO_WARNINGS 1 #include "stdafx.h" #include<string.h> int _tmain(int argc, _TCHAR* argv[]) { char you[8][15]; int a,b,x,y=0,z; strcpy (you[5],"Monday"); strcpy (you[6],"Tue...
main.c:6:10: fatal error: stdafx.h: No such file or directory 6 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s579119925
p00027
C
// ConsoleApplication2.cpp : ??????????????? ??¢????????±????????§????????¨????????? ????????????????????????????????? // #define _CRT_SECURE_NO_WARNINGS 1 #include "stdafx.h" #include<string.h> int _tmain(int argc, _TCHAR* argv[]) { char you[8][15]; int a,b,x,y=0,z; strcpy (you[5],"Monday"); strcpy (you[6],"Tue...
main.c:6:10: fatal error: stdafx.h: No such file or directory 6 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s307026008
p00027
C
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0027
main.c:1:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token 1 | http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0027 | ^
s664553372
p00027
C
d,s[]={0,31,60,91,121,152,182,213,244,274,305,335};main(m){char [9][9]={"Thurs","Fri","Satur","Sun","Mon","Tues","Wednes"};while(1){scanf("%d%d",&m,&d);if(!m)exit(0);d+=s[m-1];printf("%sday\n",a[(!d%7)?6:(d%7-1)]);}}
main.c:1:1: warning: data definition has no type or storage class 1 | d,s[]={0,31,60,91,121,152,182,213,244,274,305,335};main(m){char [9][9]={"Thurs","Fri","Satur","Sun","Mon","Tues","Wednes"};while(1){scanf("%d%d",&m,&d);if(!m)exit(0);d+=s[m-1];printf("%sday\n",a[(!d%7)?6:(d%7-1)]);}} | ^ main.c:1:1: error:...
s801863394
p00027
C
m,s[]={0,31,60,91,121,152,182,213,244,274,305,335}; main(d){char a[7][9]={"Thurs","Fri","Satur","Sun","Mon","Tues","Wednes"}; while(1) { scanf("%d%d",&m,&d); if(!m)exit(0); d+=s[m-1]; printf("%sday\n",&a[(d%7)?(d%7-1)][0]:6); } }
main.c:1:1: warning: data definition has no type or storage class 1 | m,s[]={0,31,60,91,121,152,182,213,244,274,305,335}; | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'm' [-Wimplicit-int] main.c:1:3: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int] 1 | m,s[]={0,31,60...
s180312460
p00027
C
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while ( sc.hasNext() ) { int i = 0; double in,t,y; in = sc.nextDouble(); t = in / 9.8; y = 4.9 * (t*t); while ( 5*i-5<y ) i++; System.out.println(i); } } }
main.c:1:1: error: unknown type name 'import' 1 | import java.util.*; | ^~~~~~ main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token 1 | import java.util.*; | ^ main.c:3:1: error: unknown type name 'public' 3 | public class Main { | ^~~~~~ main.c:...
s171650704
p00027
C
#include <iostream> int main(){ using namespace std; while(1){ int month,day,year = 2004,mod; cin >> month >> day; if (month==0) break; else if (month<=2) { month += 12; year -= 1; } int k = year % 100; int j = year / 100; mod = (day+(((month+1)*26)/10)+k+(k/4)+(j/4)+5*j)%7; if (mod == 0) cout << "Satur...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s112545179
p00027
C
case 5: printf("Monday\n"); break; case 6: printf("Tuesday\n"); break; } } return 0; }
main.c:2:7: error: expected identifier or '(' before 'case' 2 | case 5: | ^~~~ main.c:4:9: error: expected identifier or '(' before 'break' 4 | break; | ^~~~~ main.c:6:7: error: expected identifier or '(' before 'case' 6 | case 6: | ^~~~ main.c:8:9: ...
s849857928
p00027
C
n[]={"Thursday","Friday","Saturday","Sunday","Monday","Tuesday","Wednesday"},m,d;main(){for(;scanf("%d%d",&m,&d),m;puts(n[(d-13*~m/5)%7]))m<3?d-=2,m+=12:0;}
main.c:1:1: warning: data definition has no type or storage class 1 | n[]={"Thursday","Friday","Saturday","Sunday","Monday","Tuesday","Wednesday"},m,d;main(){for(;scanf("%d%d",&m,&d),m;puts(n[(d-13*~m/5)%7]))m<3?d-=2,m+=12:0;} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int...
s393301964
p00027
C
#include <stdio.h> int main(void){ int i, j; int month, day; int daycount = 0; while(1){ daycount = 0; scanf("%d", &month); scanf("%d", &day); if((month == 0) && (day == 0)){ return 0; } for(i = 1; i < month; i++){ if((i == 11) || (i == 4) || (i == 6) || (i == 9)){ ...
main.c: In function 'main': main.c:21:75: error: stray '\' in program 21 | }else if((i == 1) || (i == 3) || (i == 5) || (i == 7) || (i == 8) ||\ (i == 10) || (i == 12)){ | ^
s417732837
p00027
C
#include<stdio.h> int main(){ int a[11], day, month, i; a[0] = a[2] = a[4] = a[6] = a[7] = a[9] = 31; a[1] = 29; a[3] = a[5] = a[8] = a[10] = 0; while(scanf("%d%d", month, day) != 0){ if(month == 0 && day == 0) break; for(i = 0; i < month - 1; i++) day += a[i]; if(day % 7 == 1) printf("Thursday\n"); if(da...
main.c: In function 'main': main.c:8:43: error: stray '\343' in program 8 | while(scanf("%d%d", month, day) !=<U+3000>0){ | ^~~~~~~~
s835392743
p00027
C
#include<stdio.h> int main(){ int a[11], day, month, i; a[0] = 31; a[2] = 31; a[4] = 31; a[6] = 31; a[7] = 31; a[9] = 31; a[1] = 29; a[3] = 30; a[5] = 30; a[8] = 30; a[10] = 30; while(scanf("%d%d", month, day) != 0){ if(month == 0 && day == 0) break; for(i = 0; i < month - 1; i++) day += a[i]; if(da...
main.c: In function 'main': main.c:16:43: error: stray '\343' in program 16 | while(scanf("%d%d", month, day) !=<U+3000>0){ | ^~~~~~~~
s801477066
p00027
C
n[7]={"Sun","Mon","Tues","Wednes","Thurs","Fri","Satur"};m;main(d){for(;scanf("%d%d",&m,&d)*m;printf("%sday\n",n[(3+(m<3?0:2)+((m+9)%12*13+47)/5+d)%7]));}
main.c:1:1: warning: data definition has no type or storage class 1 | n[7]={"Sun","Mon","Tues","Wednes","Thurs","Fri","Satur"};m;main(d){for(;scanf("%d%d",&m,&d)*m;printf("%sday\n",n[(3+(m<3?0:2)+((m+9)%12*13+47)/5+d)%7]));} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int] ...
s497920265
p00027
C
#include <stdio.h> int main () { int mo; int da; int sum = 0; int i; int array [13] = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; while (1) { scanf("%d %d",&mo, &da); sum = 0; if (mo == 0 && da == 0) { break; } for (i = 1; i < mo; i++...
main.c: In function 'main': main.c:41:5: error: expected declaration or statement at end of input 41 | return 0; | ^~~~~~
s525616695
p00027
C
#include<stdio.h> int main(){ int i,answer=0,mod[12],day[12]={31,29,31,30,31,30,31,31,30,31,30,31}; for(i=0;i<12;i++){ mod[i]=day[i]%7; } char Date1[]="Wednesday"; char Date2[]="Thursday"; char Date3[]="Friday"; char Date4[]="Saturday"; char Date5[]="Sunday"; char Date6[]="Monday"; char Date7[]="Tuesday";...
main.c: In function 'main': main.c:17:37: error: 'number' undeclared (first use in this function) 17 | scanf("%d",&number[i]); | ^~~~~~ main.c:17:37: note: each undeclared identifier is reported only once for each function it appears in main.c:50:1: e...
s588825042
p00027
C
#include<stdio.h> int main(){ int i,answer=0,number[2],mod[12],day[12]={31,29,31,30,31,30,31,31,30,31,30,31}; for(i=0;i<12;i++){ mod[i]=day[i]%7; } char Date1[]="Wednesday"; char Date2[]="Thursday"; char Date3[]="Friday"; char Date4[]="Saturday"; char Date5[]="Sunday"; char Date6[]="Monday"; char Date7[]=...
main.c: In function 'main': main.c:50:1: error: expected declaration or statement at end of input 50 | } | ^
s801487727
p00027
C
#include<stdio.h> int main(){ int i,answer,number[2],mod[12],day[12]={31,29,31,30,31,30,31,31,30,31,30,31}; for(i=0;i<12;i++){ mod[i]=day[i]%7; } char Date1[]="Wednesday"; char Date2[]="Thursday"; char Date3[]="Friday"; char Date4[]="Saturday"; char Date5[]="Sunday"; char Date6[]="Monday"; char Date7[]="T...
main.c: In function 'main': main.c:51:1: error: expected declaration or statement at end of input 51 | } | ^
s598398344
p00027
C
#include<stdio.h> int main(){ int i,answer=0,number1=0,number2=0,mod[12],day[12]={28,31,29,31,30,31,30,31,31,30,31,30}; for(i=0;i<12;i++){ mod[i]=day[i]%7; } char Date1[]="Wednesday"; char Date2[]="Thursday"; char Date3[]="Friday"; char Date4[]="Saturday"; char Date5[]="Sunday"; char Date6[]="Monday"; cha...
main.c: In function 'main': main.c:17:20: error: 'number' undeclared (first use in this function); did you mean 'number2'? 17 | if(number[0]==0&&number[1]==0){ | ^~~~~~ | number2 main.c:17:20: note: each undeclared identifier is reported only once for...
s688202417
p00027
C
#include<iostream> using namespace std; int main(){ int m,d; while(cin >> m >> d){ if(m==0) break; int cd=d; for(int i=1;i<=m;i++){ switch(i){ case 2:cd+=31;break; case 3:cd+=29;break; case 4:cd+=31;break; case 5:cd+=30;break; case 6:cd+=31;break; case 7:c...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s101586155
p00027
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; int day[12] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; string date[7] = { "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday" }; int main() { int m, d; while (cin >> m >> d, m && d) { ...
a.cc: In function 'int main()': a.cc:14:21: error: 'accumulate' was not declared in this scope 14 | int t = d + accumulate(day, day + m - 1, 0); | ^~~~~~~~~~
s220422372
p00027
C++
#include<stdio.h> int main() { int p[12]={31,29,31,30,31,30,31,31,30,31,30,31}; int M,D,sum; while(1) { sum=0; scanf("%d %d",&M,&D); if(M==0)break; for(int i=0;i<M;i++); sum+=p[i]; sum+=D; switch(sum%d) { case 0: printf("Sunday\n"); case 1: printf("Monday\n"); case 2: printf("Tuesday\n"); case 3: printf("Wednesday\...
a.cc: In function 'int main()': a.cc:12:8: error: 'i' was not declared in this scope 12 | sum+=p[i]; | ^ a.cc:16:12: error: 'd' was not declared in this scope 16 | switch(sum%d) | ^
s045705585
p00027
C++
#include <iostream> #include <vector> #include <math.h> #include <stdio.h> using namespace std; double r(double x1,double y1,double x2,double y2){ return sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)); } int main() { // your code goes here int a[13]; a[1]=31; a[2]=29; a[3]=31; a[4]=30; a[5]=31; a[6]=30; a[7]=31; a[8]=31...
a.cc: In function 'int main()': a.cc:59:10: error: expected '}' at end of input 59 | } | ^ a.cc:30:12: note: to match this '{' 30 | while(m!=0){ | ^ a.cc:59:10: error: expected '}' at end of input 59 | } | ^ a.cc:12:12: note: to match this '{' 1...
s085072329
p00027
C++
import sys import math dayy = [0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] def days(a, day): if a == 0: return day else: return days(a-1, day + dayy[a]) while 1: inp = raw_input().split() ii = int(inp[0]) jj = int(inp[1]) if ii == 0 and jj== 0: break ans =...
a.cc:2:1: error: 'import' does not name a type 2 | import sys | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
s335863948
p00027
C++
#include<iostream> using namespace std; int main() { int month[12]; month[0]=31; month[1]=29; month[2]=31; month[3]=30; month[4]=31; month[5]=30; month[6]=31; month[7]=31; month[8]=30; month[9]=31; month[10]=30; month[11]=31; int hoge,fuge; cin >> hoge >> fuga; int i; int count=0; if(hoge!=0) ...
a.cc: In function 'int main()': a.cc:24:24: error: 'fuga' was not declared in this scope; did you mean 'fuge'? 24 | cin >> hoge >> fuga; | ^~~~ | fuge a.cc:38:17: error: 'flag' was not declared in this scope 38 | flag = count % 7; ...
s680403250
p00027
C++
#include<iostream> using namespace std; int main() { int month[12]; month[0]=31; month[1]=29; month[2]=31; month[3]=30; month[4]=31; month[5]=30; month[6]=31; month[7]=31; month[8]=30; month[9]=31; month[10]=30; month[11]=31; int hoge,fuge; cin >> hoge >> fuga; int i; int count=0; if(hoge!=0) ...
a.cc: In function 'int main()': a.cc:24:24: error: 'fuga' was not declared in this scope; did you mean 'fuge'? 24 | cin >> hoge >> fuga; | ^~~~ | fuge
s349071730
p00027
C++
#include<cstdio> int main(){ int a[] = {0,0,31,60,91,121,152,182,213,244,274,305,335,366}; int m, d; char day[7][10] = {"Monday", "Tuesday", "Wednesday", "Thursday","Friday","Saturday","Sunday"}; scanf("%d %d", &m, &d while(m || d){ printf("%s\n", day[(a[m] + d + 2) % 7]); scanf("%d %d", &m, &d } }
a.cc: In function 'int main()': a.cc:7:30: error: expected ')' before 'while' 7 | scanf("%d %d", &m, &d | ~ ^ | ) 8 | while(m || d){ | ~~~~~
s027577981
p00027
C++
int zeller(int y , int m , int d){ if(m==1 || m==2) m+=12; y-=1; return(y + y/4 - y/100 + y/400 + ((13*m+8)/5) + d )%7; } int main(){ int m , d , w=4 , fw; while (cin >> m >> d, m){ switch(zeller(2004,m,d)){ case 0: cout << "Sunday" << endl; break; case 1: cout << "Monday" << endl; break; ca...
a.cc: In function 'int main()': a.cc:8:16: error: 'cin' was not declared in this scope 8 | while (cin >> m >> d, m){ | ^~~ a.cc:11:25: error: 'cout' was not declared in this scope 11 | cout << "Sunday" << endl; | ^~~~ a.cc:11:45: ...
s488978339
p00027
C++
int main() { char yobi[7][10]={"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"}; int month,day; while(1){ scanf("%d %d",&month,&day); if(month==0) break; for(int i=0;i<month;i++){ switch(i){ case 2: day+=29; case 4: case 6: case 9: case 11: day+=30; ...
a.cc: In function 'int main()': a.cc:6:17: error: 'scanf' was not declared in this scope 6 | scanf("%d %d",&month,&day); | ^~~~~ a.cc:22:17: error: 'printf' was not declared in this scope 22 | printf("%s\n",yobi[day%7]); | ^~~~~~ a.cc:1:...