submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s710605179 | p00091 | C++ | #include<iostream>
#include<cstdio>
#include<algorithm>
#include<climits>
#include<string>
#include<vector>
#include<list>
#include<map>
#include<set>
#include<cmath>
#include<queue>
using namespace std;
struct Ink{
int y,x,size;
Ink(){}
Ink(int _y,int _x,int _size){
y=_y; x=_x; size=_size;
}
};
const int blur_... | a.cc: In function 'void dfs(int (*)[10], std::vector<Ink>)':
a.cc:34:49: warning: 'sizeof' on array function parameter 'fld' will return size of 'int (*)[10]' [-Wsizeof-array-argument]
34 | memcpy(fld_c,fld,sizeof(fld));
| ~^~~~
a.cc:27:14:... |
s243640283 | p00091 | C++ | #include <bits/stdc++.h>
using namespace std;
const int dx[] = {0, -1, 0, 1, 0, -1, -1, 1, 1, -2, 0, 2, 0};
const int dy[] = {0, 0, -1, 0, 1, 1, -1, -1, 1, 0, -2, 0, 2};
const int size[] = {5, 9, 13};
typedef vector<int> Vi;
typedef vector<Vi> VVi;
typedef tuple<int, int, int> T;
bool ingrid(int i, int j)
{
return ... | a.cc: In function 'std::vector<std::tuple<int, int, int> > search(int, VVi)':
a.cc:40:53: error: reference to 'size' is ambiguous
40 | for (int d = 0; d < size[s]; d++){
| ^~~~
In file included from /usr/include/c++/14/string:5... |
s771206736 | p00091 | C++ | #include <bits/stdc++.h>
using namespace std;
const int dx[] = {0, -1, 0, 1, 0, -1, -1, 1, 1, -2, 0, 2, 0};
const int dy[] = {0, 0, -1, 0, 1, 1, -1, -1, 1, 0, -2, 0, 2};
const int size[] = {5, 9, 13};
typedef vector<int> Vi;
typedef vector<Vi> VVi;
typedef tuple<int, int, int> T;
bool ingrid(int i, int j)
{
return ... | a.cc: In function 'std::vector<std::tuple<int, int, int> > search(int, VVi)':
a.cc:39:53: error: reference to 'size' is ambiguous
39 | for (int d = 0; d < size[s]; d++){
| ^~~~
In file included from /usr/include/c++/14/string:5... |
s697606194 | p00091 | C++ | #include <bits/stdc++.h>
using namespace std;
const int dx[] = {0, -1, 0, 1, 0, -1, -1, 1, 1, -2, 0, 2, 0};
const int dy[] = {0, 0, -1, 0, 1, 1, -1, -1, 1, 0, -2, 0, 2};
const int size[] = {5, 9, 13};
typedef vector<int> Vi;
typedef vector<Vi> VVi;
typedef tuple<int, int, int> T;
bool ingrid(int i, int j)
{
return ... | a.cc: In function 'std::vector<std::tuple<int, int, int> > search(int, VVi&)':
a.cc:39:53: error: reference to 'size' is ambiguous
39 | for (int d = 0; d < size[s]; d++){
| ^~~~
In file included from /usr/include/c++/14/string:... |
s819618127 | p00091 | C++ | #include <bits/stdc++.h>
using namespace std;
#define int short
const int dx[] = {0, -1, 0, 1, 0, -1, -1, 1, 1, -2, 0, 2, 0};
const int dy[] = {0, 0, -1, 0, 1, 1, -1, -1, 1, 0, -2, 0, 2};
const int size[] = {5, 9, 13};
typedef vector<int> Vi;
typedef vector<Vi> VVi;
typedef tuple<int, int, int> T;
bool ingrid(int i... | a.cc: In function 'std::vector<std::tuple<short int, short int, short int> > search(short int, VVi&)':
a.cc:41:53: error: reference to 'size' is ambiguous
41 | for (int d = 0; d < size[s]; d++){
| ^~~~
In file included from /us... |
s926269417 | p00091 | C++ | #include<iostream>
#include<vector>
#include<set>
using namespace std;
#define r(a) for(int a=0;a<10;a++)
struct pain{short int x,y,s,t;};
vector<pain>vec;
set<vector<short int> >se;
short int n;
vector<vector<short int> >c(10,vector<short int>(10,0));
short int s(short int i,short int j){ if(!i||!j||i==9||j==9)retu... | a.cc: In function 'bool dfs(int, int)':
a.cc:99:13: error: 'tp' was not declared in this scope; did you mean 'tr'?
99 | tp.s=1;
| ^~
| tr
|
s626853636 | p00091 | C++ | n_drop, cloth = int(input()), [[int(i) for i in input().split()] for _ in range(10)]
n_stain = sum(sum(i) for i in cloth)
n = (n_stain - 5 * n_drop) // 4
drops_candidate = []
dl = 0
while 2 * dl <= n:
dm = n - 2 * dl
ds = n_drop - dm - dl
if ds >= 0:
drops_candidate.append([ds, dm, dl])
dl += 1... | a.cc:1:1: error: 'n_drop' does not name a type
1 | n_drop, cloth = int(input()), [[int(i) for i in input().split()] for _ in range(10)]
| ^~~~~~
|
s920211579 | p00091 | C++ | #include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<cmath>
#include<cstring>
#include<queue>
#include<cstdio>
#include<sstream>
#include<iomanip>
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loop(i,0,a)
#define pb push_back
#defi... | a.cc:38:20: error: too many initializers for 'int [3]'
38 | int co[3]={0,5,9,13};
| ^
|
s547053416 | p00091 | C++ | #include<iostream>
#include<queue>
#include<vector>
#include<tuple>
#include<algorithm>
using namespace std;
vector<vector<__int8>>S;
bool dp[13][160];
vector<tuple<vector<vector<short>>, int, vector<tuple<short, short, short>>>>Vec;
vector<vector<short>> solve(vector<vector<short>>p, int x, int y, int r) {
if (r == 1... | a.cc:7:15: error: '__int8' was not declared in this scope; did you mean 'u_int'?
7 | vector<vector<__int8>>S;
| ^~~~~~
| u_int
a.cc:7:15: error: template argument 1 is invalid
a.cc:7:15: error: template argument 2 is invalid
a.cc:7:21: error: template argument 1 is invalid
... |
s103788182 | p00091 | C++ | #include<iostream>
#include<queue>
#include<vector>
#include<tuple>
#include<algorithm>
#include<csdtlib>
#include<ctime>
using namespace std;
vector<vector<char>>S;
bool dp[13][160]; int LIM2 = 0;
vector<vector<char>> solve(vector<vector<char>>p, int x, int y, int r) {
if (r == 1) { p[x][y]--; p[x + 1][y]--; p[x - 1]... | a.cc:6:9: fatal error: csdtlib: No such file or directory
6 | #include<csdtlib>
| ^~~~~~~~~
compilation terminated.
|
s165557104 | p00091 | C++ | #include<iostream>
#include<queue>
#include<vector>
#include<tuple>
#include<cstdlib>
#include<ctime>
#include<algorithm>
using namespace std;
vector<vector<char>>S;
bool dp[13][160]; int LIM2 = 0;
vector<vector<char>> solve(vector<vector<char>>p, int x, int y, int r) {
if (r == 1) { p[x][y]--; p[x + 1][y]--; p[x - 1]... | a.cc: In function 'bool hantei(std::vector<std::vector<char> >)':
a.cc:67:33: error: 'n' was not declared in this scope
67 | if (rand() % 10 == 0 && n == 12)return false;
| ^
|
s665643526 | p00091 | C++ | #include <iostream>
#include <stdio.h>
#include <string.h>
#include <string>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <random>
#include <cstdlib>
#include <cmath>
#include <sstream>
using namespace std;
#define R 10
#define PSIZE 5
//????????????????????????14*14???????????????... | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s305820190 | p00091 | C++ | #include <bits/stdc++.h>
using namespace std;
int n;
int b[10][10];
int ans_x[12], ans_y[12], ans_type[12];
bool inside(int y, int x) {
return 0 <= y && y < 10 && 0 <= x && x < 10;
}
inline bool latte(int y, int x, int type, int d = 0) {
int dx[13] = {0, 0, 1, 0, -1, -1, 1, 1, -1, 0, 2, 0, -2};
int dy[13] = {... | a.cc: In function 'bool dfs(int, int, int)':
a.cc:67:30: error: expected ';' before '}' token
67 | latte(y, x, i - 1, 1)
| ^
| ;
68 | }
| ~
|
s692807420 | p00091 | C++ | #include <bits/stdc++.h>
using namespace std;
int n;
int b[10][10];
int dx[13] = {0, 0, 1, 0, -1, -1, 1, 1, -1, 0, 2, 0, -2};
int dy[13] = {0, -1, 0, 1, 0, -1, -1, 1, 1, -2, 0, 2, 0};
inline bool inside(int y, int x) {
return 0 <= y && y < 10 && 0 <= x && x < 10;
}
inline bool latte(int y, int x, int type, int d ... | a.cc: In function 'int main()':
a.cc:71:8: error: expected ';' before '}' token
71 | dfs()
| ^
| ;
72 | }
| ~
|
s393385231 | p00091 | C++ | import itertools
dx = (0, 0, 0, 1,-1, 1, 1,-1,-1,-2, 2, 0, 0)
dy = (0, 1,-1, 0, 0, 1,-1, 1,-1, 0, 0,-2, 2)
dd = (5, 9, 13)
def drop(fab, used, size_list):
for xy in range(100):
y = xy%10
x = xy//10
size = size_list[used]
check = True
for i in range(size):
if fab... | a.cc:1:1: error: 'import' does not name a type
1 | import itertools
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
|
s223451242 | p00091 | C++ | ed | a.cc:1:1: error: 'ed' does not name a type
1 | ed
| ^~
|
s251850146 | p00091 | C++ | #include <iostream>
#include <vector>
#include <string.h>
using namespace std;
//debugFlag
bool g_bDebugFlag = false;
enum{
NONE = 0,
SMALL = 1,
MEDIUM = 2,
LARGE = 3,
};
enum{
FLAG_SMALL = 1 << 0,
FLAG_MEDIUM = 1 << 1,
FLAG_LARGE = 1 << 2,
};
int smallDrop[] = {
0, 1, 0,
1, 1, 1,
0, 1, 0
};
int mediumDr... | a.cc: In member function 'void Cloth::removeStain(int, int, int)':
a.cc:254:49: error: '__debugbreak' was not declared in this scope
254 | __debugbreak();
| ^~~~~~~~~~~~
|
s103208898 | p00091 | C++ | #include <iostream>
#include <vector>
#include <string>
#include <sstream>
using namespace std;
int pattern_small[] = {
0,1,0,
1,1,1,
0,1,0
};
int pattern_med[] = {
1,1,1,
1,1,1,
1,1,1
};
int pattern_big[] = {
0,0,1,0,0,
0,1,1,1,0,
1,1,1,1,1,
0,1,1,1,0,
0,0,1,0,0
};
i... | a.cc: In function 'bool dfs(int, int)':
a.cc:126:9: error: 'memcpy' was not declared in this scope
126 | memcpy(temp, mat, sizeof(mat));
| ^~~~~~
a.cc:5:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include <sstream>
+++ |+... |
s380170376 | p00091 | C++ | #include<iostream>
#include<algorithm>
#include<vector>
#include<map>
using namespace std;
int a[10][10];
int rem, n;
bool big(int x, int y, int r){
bool res = true;
if(x - 2 < 0 || x + 2 >= 10 || y - 2 < 0 || y + 2 >= 10)return false;
for(int i = x - 2;i <= x + 2;i++)
for(int j = y - 2;j <= y + 2;j++)
... | a.cc: In function 'bool solve(int, int, int)':
a.cc:64:8: error: 'counter' was not declared in this scope
64 | if(counter() > n)return false;
| ^~~~~~~
|
s742784553 | p00091 | C++ | // test20.cpp : コンソール アプリケーションのエントリ ポイントを定義します。
//
#include "stdafx.h"
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int map[12][12];
int n;
bool hantei3(int x,int y){
if(map[y][x] && map[y][x-1] && map[y][x-2] && map[y][x+1] && map[y][x+2] && map[y-2][x] && map[y-1][x] && map[y+1][x]... | a.cc:4:10: fatal error: stdafx.h: No such file or directory
4 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s599388437 | p00092 | C |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#include<stdio.h>
#include<algorithm>
using namespace std;
int main()
{
int n,ans = 0;
int dp[1100][1100];
char field;
while(scanf("%d",&n),n)
{
for(int i = 0; i < n; i++)
... | main.c:2:1: error: expected identifier or '(' before numeric constant
2 | 1
| ^
In file included from /usr/include/stdio.h:47,
from main.c:42:
/usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h:28:43: error: unknown type name 'size_t'
28 | ... |
s708370934 | p00092 | C | // AOJ Volume 0 Problem 0092
#include <stdio.h>
#include <string.h>
int map[1000][1000];
int index[1001][1001][2];
int main(void)
{
int n;
char str[1001];
int i, j;
int max;
int s;
while (1){
scanf("%d", &n);
if (n == 0){
break;
}
for (i = 0; i < n; i++){
scanf("%s", str);
for (j = ... | main.c:7:13: error: 'index' redeclared as different kind of symbol
7 | int index[1001][1001][2];
| ^~~~~
In file included from /usr/include/string.h:462,
from main.c:4:
/usr/include/strings.h:68:14: note: previous declaration of 'index' with type 'char *(const char *, int)... |
s166061575 | p00092 | C | // AOJ Volume 0 Problem 0092
#include <stdio.h>
#include <string.h>
char map[1000][1000];
int index[1001][1001][2];
int main(void)
{
int n;
char str[1001];
int i, j;
int max;
int s;
while (1){
scanf("%d", &n);
if (n == 0){
break;
}
for (i = 0; i < n; i++){
scanf("%s", str);
for (j = 0; s... | main.c:7:5: error: 'index' redeclared as different kind of symbol
7 | int index[1001][1001][2];
| ^~~~~
In file included from /usr/include/string.h:462,
from main.c:4:
/usr/include/strings.h:68:14: note: previous declaration of 'index' with type 'char *(const char *, int)'
68 | extern ... |
s774242224 | p00092 | C | // AOJ Volume 0 Problem 0092
#include <stdio.h>
#include <string.h>
int map[1000][1000];
int index[1001][1001][2];
int main(void)
{
int n;
char str[1001];
int i, j;
int max;
int s;
while (1){
scanf("%d", &n);
if (n == 0){
break;
}
for (i = 0; i < n; i++){
scanf("%s", str);
for (j = 0; st... | main.c:7:5: error: 'index' redeclared as different kind of symbol
7 | int index[1001][1001][2];
| ^~~~~
In file included from /usr/include/string.h:462,
from main.c:4:
/usr/include/strings.h:68:14: note: previous declaration of 'index' with type 'char *(const char *, int)'
68 | extern ... |
s831789944 | p00092 | C | // AOJ Volume 0 Problem 0092
#include <stdio.h>
#include <string.h>
char map[1000][1000];
char index[1001][1001][2];
int main(void)
{
int n;
char str[1001];
int i, j;
int max;
int s;
while (1){
scanf("%d", &n);
if (n == 0){
break;
}
for (i = 0; i < n; i++){
scanf("%s", str);
for (j = 0; ... | main.c:7:6: error: 'index' redeclared as different kind of symbol
7 | char index[1001][1001][2];
| ^~~~~
In file included from /usr/include/string.h:462,
from main.c:4:
/usr/include/strings.h:68:14: note: previous declaration of 'index' with type 'char *(const char *, int)'
68 | exter... |
s270727728 | p00092 | C | // AOJ Volume 0 Problem 0092
#include <stdio.h>
#include <string.h>
#define SIZE (100)
int map[SIZE][SIZE];
int index[SIZE + 1][SIZE + 1][2];
int main(void)
{
int n;
char str[1001];
int i, j;
int max;
int s;
while (1){
scanf("%d", &n);
if (n == 0){
break;
}
for (i = 0; i < n; i++){
scanf("... | main.c:9:5: error: 'index' redeclared as different kind of symbol
9 | int index[SIZE + 1][SIZE + 1][2];
| ^~~~~
In file included from /usr/include/string.h:462,
from main.c:4:
/usr/include/strings.h:68:14: note: previous declaration of 'index' with type 'char *(const char *, int)'
68 |... |
s205766806 | p00092 | C | // AOJ Volume 0 Problem 0092
#include <stdio.h>
#include <string.h>
#define SIZE (100)
int map[SIZE][SIZE];
int index[SIZE + 1][SIZE + 1][2];
int main(void)
{
int n;
char str[1001];
int i, j;
int max;
int s;
while (1){
scanf("%d", &n);
if (n == 0){
break;
}
for (i = 0; i < n; i++){
scanf("... | main.c:9:5: error: 'index' redeclared as different kind of symbol
9 | int index[SIZE + 1][SIZE + 1][2];
| ^~~~~
In file included from /usr/include/string.h:462,
from main.c:4:
/usr/include/strings.h:68:14: note: previous declaration of 'index' with type 'char *(const char *, int)'
68 |... |
s456080409 | p00092 | C | z[2002],*a=z,*b=z+1001,m,i,j,t;main(n){for(;scanf("%d",&n),i=n;printf("%d\n",m))
for(memset(a,m=0,4004);i--;t=a,a=b,b=t)
for(j=scanf(" ");j++<n;)
m=fmax(m,b[j]=getchar()-'*'?1+fmin(fmin(b[j-1],a[j-1]),a[j]):0);
}
}
} | main.c:1:1: warning: data definition has no type or storage class
1 | z[2002],*a=z,*b=z+1001,m,i,j,t;main(n){for(;scanf("%d",&n),i=n;printf("%d\n",m))
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'z' [-Wimplicit-int]
main.c:1:10: error: type defaults to 'int' in declaration of 'a' [-Wimplic... |
s069927633 | p00092 | C | z[3001],*a=z,*b=z+1001,m,i,j;main(n){for(;scanf("%d",&n),i=n;printf("%d\n",m))for(memset(a,m=0,2e3);i--;j=a,a=b,b=j)for(j=scanf(" ");j++<n;a[j]=0;)m=fmax(m,b[j]=getchar()-42?1+fmin(fmin(b[j-1],a[j-1]),a[j]):0);} | main.c:1:1: warning: data definition has no type or storage class
1 | z[3001],*a=z,*b=z+1001,m,i,j;main(n){for(;scanf("%d",&n),i=n;printf("%d\n",m))for(memset(a,m=0,2e3);i--;j=a,a=b,b=j)for(j=scanf(" ");j++<n;a[j]=0;)m=fmax(m,b[j]=getchar()-42?1+fmin(fmin(b[j-1],a[j-1]),a[j]):0);}
| ^
main.c:1:1: error: type ... |
s623718190 | p00092 | C | z[2002],*a=z,*b=z+1001,m,i,j;main(n){for(;scanf("%d",&n),i=n;printf("%d\n",m))for(memset(a,m=0,4004);i--;j=a,a=b,b=j)for(j=scanf(" ");j++<n;a[j]=0;)m=fmax(m,b[j]=getchar()-42?1+fmin(fmin(b[j-1],a[j-1]),a[j]):0);} | main.c:1:1: warning: data definition has no type or storage class
1 | z[2002],*a=z,*b=z+1001,m,i,j;main(n){for(;scanf("%d",&n),i=n;printf("%d\n",m))for(memset(a,m=0,4004);i--;j=a,a=b,b=j)for(j=scanf(" ");j++<n;a[j]=0;)m=fmax(m,b[j]=getchar()-42?1+fmin(fmin(b[j-1],a[j-1]),a[j]):0);}
| ^
main.c:1:1: error: type... |
s262218264 | p00092 | C | z[4000],*a=z,*b=z+2e3,m,i,j;main(n){for(;scanf("%d",&n),i=n;printf("%d\n",m))for(memset(a,m=0,8e3);i--;j=a,a=b,b=j)for(j=scanf(" ");j++<n;)m=fmax(m,b[j]=getchar()-42?1+fmin(fmin(b[j-1],a[j-1]),a[j]):0);} | main.c:1:1: warning: data definition has no type or storage class
1 | z[4000],*a=z,*b=z+2e3,m,i,j;main(n){for(;scanf("%d",&n),i=n;printf("%d\n",m))for(memset(a,m=0,8e3);i--;j=a,a=b,b=j)for(j=scanf(" ");j++<n;)m=fmax(m,b[j]=getchar()-42?1+fmin(fmin(b[j-1],a[j-1]),a[j]):0);}
| ^
main.c:1:1: error: type defaults... |
s655674013 | p00092 | C | *a=z,*b=z+2000,m,i,j,z[999];main(n){for(;scanf("%d",&n),i=n;printf("%d\n",m))for(memset(a,m=0,8e3);i--;j=a,a=b,b=j)for(j=0;j++<=n;)m=fmax(m,b[j]=getchar()-46?0:1+fmin(fmin(b[j-1],a[j-1]),a[j]));} | main.c:1:1: warning: data definition has no type or storage class
1 | *a=z,*b=z+2000,m,i,j,z[999];main(n){for(;scanf("%d",&n),i=n;printf("%d\n",m))for(memset(a,m=0,8e3);i--;j=a,a=b,b=j)for(j=0;j++<=n;)m=fmax(m,b[j]=getchar()-46?0:1+fmin(fmin(b[j-1],a[j-1]),a[j]));}
| ^
main.c:1:2: error: type defaults to 'int... |
s725589727 | p00092 | C | z[4000],*a=z,*b=z+2000,m,i,j;main(n){for(;scanf("%d",&n),i=n;printf("%d\n",m))for(memset(a,m=0,8e3);i--;a^=b^=a^=b)for(j=0;j++<=n;)m=fmax(m,b[j]=getchar()-46?0:1+fmin(fmin(b[j-1],a[j-1]),a[j]));} | main.c:1:1: warning: data definition has no type or storage class
1 | z[4000],*a=z,*b=z+2000,m,i,j;main(n){for(;scanf("%d",&n),i=n;printf("%d\n",m))for(memset(a,m=0,8e3);i--;a^=b^=a^=b)for(j=0;j++<=n;)m=fmax(m,b[j]=getchar()-46?0:1+fmin(fmin(b[j-1],a[j-1]),a[j]));}
| ^
main.c:1:1: error: type defaults to 'int... |
s562656753 | p00092 | C | z[4000],*a=z,*b=z+2000,m,i,j;main(n){for(;scanf("%d",&n),n;m=!printf("%d\n",m))for(i=++n;i--;j=a,a=b,b=j)for(j=n;j--;)m=fmax(m,b[j]=i<n&getchar()>45?1+fmin(fmin(b[j+1],a[j+1]),a[j])):0;} | main.c:1:1: warning: data definition has no type or storage class
1 | z[4000],*a=z,*b=z+2000,m,i,j;main(n){for(;scanf("%d",&n),n;m=!printf("%d\n",m))for(i=++n;i--;j=a,a=b,b=j)for(j=n;j--;)m=fmax(m,b[j]=i<n&getchar()>45?1+fmin(fmin(b[j+1],a[j+1]),a[j])):0;}
| ^
main.c:1:1: error: type defaults to 'int' in decl... |
s455423885 | p00092 | C | z[4000],*a=z,*b=z+2000,m,i,j;main(n){for(;scanf("%d",&n),i=n;printf("%d\n",m))for(memset(a,m=0,8e3);i--;j=a,a=b,b=j)for(j=n+1;j--;)m=fmax(m,b[j]=getchar()>45?1+fmin(fmin(b[j+1],a[j+1]),a[j])):0;} | main.c:1:1: warning: data definition has no type or storage class
1 | z[4000],*a=z,*b=z+2000,m,i,j;main(n){for(;scanf("%d",&n),i=n;printf("%d\n",m))for(memset(a,m=0,8e3);i--;j=a,a=b,b=j)for(j=n+1;j--;)m=fmax(m,b[j]=getchar()>45?1+fmin(fmin(b[j+1],a[j+1]),a[j])):0;}
| ^
main.c:1:1: error: type defaults to 'int... |
s214453105 | p00092 | C | z[4000],*a=z,*b=z+2000,m,i,j,k;main(n){for(;!scanf("%d",&n)|n;m=!printf("%d\n",m))for(i=++n;i--;j=a,a=b,b=j)for(j=n;j--;k>m?m=k:0)k=b[j]=n+~i&&getchar()>45?1+fmin(fmin(b[j+1],a[j+1]),a[j]):0);} | main.c:1:1: warning: data definition has no type or storage class
1 | z[4000],*a=z,*b=z+2000,m,i,j,k;main(n){for(;!scanf("%d",&n)|n;m=!printf("%d\n",m))for(i=++n;i--;j=a,a=b,b=j)for(j=n;j--;k>m?m=k:0)k=b[j]=n+~i&&getchar()>45?1+fmin(fmin(b[j+1],a[j+1]),a[j]):0);}
| ^
main.c:1:1: error: type defaults to 'int' ... |
s703973909 | p00092 | C | z[4000],*a=z,*b=z+2000,m,i,j,t;main(n){for(;scanf("%d",&n)*n++;m=!printf("%d\n",m))for(i=n;i--;j=a,a=b,b=j)for(j=n;j--;t>m?m=t:0)k=b[j]=n+~i&&getchar()>45?1+fmin(a[j],fmin(b[j+1],a[j+1])):0;} | main.c:1:1: warning: data definition has no type or storage class
1 | z[4000],*a=z,*b=z+2000,m,i,j,t;main(n){for(;scanf("%d",&n)*n++;m=!printf("%d\n",m))for(i=n;i--;j=a,a=b,b=j)for(j=n;j--;t>m?m=t:0)k=b[j]=n+~i&&getchar()>45?1+fmin(a[j],fmin(b[j+1],a[j+1])):0;}
| ^
main.c:1:1: error: type defaults to 'int' in... |
s732771467 | p00092 | C | z[2002],*a=z,*b=z+999,j,m,k,t,i;main(n){for(;m=scanf("%d",&n)-++n;printf("%d\n",m))for(i=n;i--;j=a,a=b,b=j)for(j=n;j--;m<k?m=k:0)b[j]=k=n+~i&&getch()>45?fmin(t=a[j],t<k?t:k)+1:0;} | main.c:1:1: warning: data definition has no type or storage class
1 | z[2002],*a=z,*b=z+999,j,m,k,t,i;main(n){for(;m=scanf("%d",&n)-++n;printf("%d\n",m))for(i=n;i--;j=a,a=b,b=j)for(j=n;j--;m<k?m=k:0)b[j]=k=n+~i&&getch()>45?fmin(t=a[j],t<k?t:k)+1:0;}
| ^
main.c:1:1: error: type defaults to 'int' in declaration... |
s350688102 | p00092 | C | #include<iostream>
using namespace std;
int min(int,int);
int main(void){
char dp[1001][1001];
int n,i,j,max,M[1001][1001];
while(cin >> n,n){
max=0;
for(i=0;i<n;i++){
for(j=0;j<n;j++){
M[i][j]=1;
}
}
for(i=0;i<n;i++){
for(j=0;j<n;j++){
cin >> dp[i][j];
... | main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s733100333 | p00092 | C | #include<iostream>
#include<algorithm>
using namespace std;
int main(void){
char dp[1001][1001];
int n,M[1001][1001];
while(cin >> n,n){
for(int i=0;i<n;i++)
for(int j=0;j<n;j++)
M[i][j]=1;
for(int i=0;i<n;i++){
for(int j=0;j<n;j++){
cin >> dp[i][j];
... | main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s123769808 | p00092 | C | #include<iostream>
using namespace std;
int main()
{
int n;
for(;cin>>n,n;)
{
string s[n];
int ans=0;
for(int i=0;i<n;i++)
cin>>s[i];
for(int x=0;x<n;x++)
for(int y=0;y<n;y++)
{
if(s[x][y]=='.')
{
int count = 1;
for(int tmp=1;tmp<n;tmp++)
{
if(tmp+x>=n ||t... | main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s699483944 | p00092 | C | #include <stdio.h>
#define MIN(a,b) ((a) < (b) ? (a) : (b))
int main(void){
char c[2];
int fr[1000][1000],n,i,j,x,ans;
while(scanf("%d",&n)){
if(n==0)break;
ans=0;
for(i=0;i<n;i++){
for(j=0;j<n;j++){
scanf("%1s",&c);
if(c[0]=='.'){
if(i==0 || j==0)fr[i][j]=1;
else {
x=MIN(MIN(fr[i][j... | main.c: In function 'main':
main.c:25:1: error: expected declaration or statement at end of input
25 | }
| ^
|
s997184488 | p00092 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
dp[1111][1111];
string s[1111];
main()
{
int n;
while(cin>>n,n)
{
for(int i=0;i<n;i++)for(int j=0;j<n;j++)dp[i][j]=0;
dp[0][0]=s[0][0]=='.';
for(int i=1;i<n;i++)
{
if(s[i][0]=='.')dp[i][0]=dp[i-1][0]+1;
... | a.cc:4:1: error: 'dp' does not name a type
4 | dp[1111][1111];
| ^~
a.cc:6:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
6 | main()
| ^~~~
a.cc: In function 'int main()':
a.cc:11:49: error: 'dp' was not declared in this scope
11 | for(int i=0;i<n;i++)for(i... |
s019105427 | p00092 | C++ | while(1):
n = int(input())
if n == 0:
break
a = [0 for i in range(n)]
b = [[0 for i in range(n)] for j in range(n)]
c_ = [[2000 for i in range(n)] for j in range(n)]
c = [[0 for i in range(n)] for j in range(n)]
for i in range(n):
a[i] = [0 if i == "." else 1 for i in list(in... | a.cc:1:1: error: expected unqualified-id before 'while'
1 | while(1):
| ^~~~~
|
s227662354 | p00092 | C++ | #include<iostream>
#include<string>
#define NMAX 1010
int n;
string sqs[NMAX];
int sqi[NMAX][NMAX]={0};
int c;
int max;
using namespace std;
int main(){
int n;
string sqs[NMAX];
int sqi[NMAX][NMAX];
int c;
int max;
while(1){
cin>>n;
if(n==0) break;
for... | a.cc:7:5: error: 'string' does not name a type; did you mean 'stdin'?
7 | string sqs[NMAX];
| ^~~~~~
| stdin
|
s232862474 | p00092 | C++ | #include<iostream>
#include<string>
#define NMAX 1010
int n;
string sqs[NMAX];
int sqi[NMAX][NMAX];
int c;
int max;
using namespace std;
int main(){
int n;
string sqs[NMAX];
int sqi[NMAX][NMAX];
int c;
int max;
while(1){
cin>>n;
if(n==0) break;
for(int i=0;i<n;i++... | a.cc:7:1: error: 'string' does not name a type; did you mean 'stdin'?
7 | string sqs[NMAX];
| ^~~~~~
| stdin
|
s419984366 | p00092 | C++ | #include<iostream>
#include<string>
#define NMAX 1010
int n;
string sqs[NMAX];
int sqi[NMAX][NMAX];
int c;
int max;
using namespace std;
int main(){
while(1){
cin>>n;
if(n==0) break;
for(int i=0;i<n;i++){
cin>>sqs[i];
}
for(int i=0;i<n;i++){
sq... | a.cc:7:1: error: 'string' does not name a type; did you mean 'stdin'?
7 | string sqs[NMAX];
| ^~~~~~
| stdin
a.cc: In function 'int main()':
a.cc:22:18: error: 'sqs' was not declared in this scope; did you mean 'sqi'?
22 | cin>>sqs[i];
| ^~~
| ... |
s792417416 | p00092 | C++ | #include<iostream>
#include<string>
#define NMAX 1010
using namespace std;
int n;
string sqs[NMAX];
int sqi[NMAX][NMAX];
int c;
int max;
int main(){
while(1){
cin>>n;
if(n==0) break;
for(int i=0;i<n;i++){
cin>>sqs[i];
}
for(int i=0;i<n;i++){
s... | a.cc: In function 'int main()':
a.cc:35:9: error: reference to 'max' is ambiguous
35 | max=0;
| ^~~
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
... |
s450681862 | p00092 | C++ | #include<iostream>
#include<string>
#define NMAX 1010
using namespace std;
int n;
string sqs[NMAX];
int sqi[NMAX][NMAX];
int c;
int main(){
while(1){
cin>>n;
if(n==0) break;
for(int i=0;i<n;i++){
cin>>sqs[i];
}
for(int i=0;i<n;i++){
sqi[i][0]=1... | a.cc: In function 'int main()':
a.cc:33:13: error: overloaded function with no contextual type information
33 | max=0;
| ^
a.cc:39:21: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<='
39 | if(k+1<=max) continue;
... |
s677297000 | p00092 | C++ | 10
...*....**
..........
**....**..
........*.
..*.......
..........
.*........
..........
....*..***
.*....*...
10
****.*****
*..*.*....
****.*....
*....*....
*....*****
..........
****.*****
*..*...*..
****...*..
*..*...*..
0 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 10
| ^~
|
s405469202 | p00092 | C++ | #include <iostream>
#include <cstdio>
using namespace std;
#define MAX(A, B) ((A) > (B)? (A): (B))
#define MIN(A, B) ((A) < (B)? (A): (B))
int search(int x, int y, int pat);
int n;
bool tront[1000][1000];
int table[1000][1000];
int main() {
int i, j;
while (1) {
int max = 0;
memset(table, 0, sizeof(table));
... | a.cc: In function 'int main()':
a.cc:18:17: error: 'memset' was not declared in this scope
18 | memset(table, 0, sizeof(table));
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <cstdio>
... |
s326879074 | p00092 | C++ | #include<bits/stdc++.h>
using namespace std;
string str[1000];
int serch(int now,int y,int x,char s,int maxe)
{
if(maxe==now+x)return 0;
for(int i=0;;i++){
if(str[y+i][x+now]!=s||str[y+now][x+i]!=s)return 0;
if(y+i==y+now)break;
}
return serch(now+1,y,x,s)+1;
}
int main()
{
int n;
... | a.cc: In function 'int serch(int, int, int, char, int)':
a.cc:11:17: error: too few arguments to function 'int serch(int, int, int, char, int)'
11 | return serch(now+1,y,x,s)+1;
| ~~~~~^~~~~~~~~~~~~
a.cc:4:5: note: declared here
4 | int serch(int now,int y,int x,char s,int maxe)
| ... |
s121055405 | p00092 | C++ | #include <stdio.h>
#include <queue>
using namespace std;
int main()
{
queue<int> x,y,longth;
int n,memlongth,ans;
int dx1[9] = {-1,-1,-1,0,0,0,1,1,1},dy1[9] = {-1,0,1,-1,0,1,-1,0,1},dx2[3] = {1,0,1},dx2[3] = {0,1,1};
while(1)
{
char field[1010][1010] = {0},N;
scanf("%d",&n);
... | a.cc: In function 'int main()':
a.cc:10:90: error: redeclaration of 'int dx2 [3]'
10 | int dx1[9] = {-1,-1,-1,0,0,0,1,1,1},dy1[9] = {-1,0,1,-1,0,1,-1,0,1},dx2[3] = {1,0,1},dx2[3] = {0,1,1};
| ^~~
a.cc:10:73: note: 'int... |
s671599292 | p00092 | C++ | #include <stdio.h>
#include <algorithm>
#include <iostream>
#include <stdlib.h>
#define rep(i, n) for(int i=0;i<n;i++)
#define FOR(i, j, n) for(int i=j;i<n;i++)
int N;
// char** data;
char data[50][50];
// int** dp;
int dp[50][50];
int search() {
int max = 0;
FOR(i, 1, N) {
FOR(j, 1, N) {
... | a.cc: In function 'int main()':
a.cc:43:9: error: 'memset' was not declared in this scope
43 | memset(dp, 0, sizeof(dp));
| ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include <stdlib.h>
+++ |+#include <cst... |
s861037119 | p00092 | C++ | #include <stdio.h>
#include <algorithm>
#include <iostream>
#include <stdlib.h>
#define rep(i, n) for(int i=0;i<n;i++)
#define FOR(i, j, n) for(int i=j;i<n;i++)
int N;
char data[50][50];
int dp[50][50];
int search() {
int max = 0;
FOR(i, 1, N) {
FOR(j, 1, N) {
int k = i;
int l ... | a.cc: In function 'int main()':
a.cc:41:9: error: 'memset' was not declared in this scope
41 | memset(dp, 0, sizeof(dp));
| ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include <stdlib.h>
+++ |+#include <cst... |
s209351777 | p00092 | C++ |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#include<stdio.h>
#include<algorithm>
using namespace std;
int main()
{
int n,ans = 0;
int dp[1100][1100];
char field;
while(scanf("%d",&n),n)
{
for(int i = 0; i < n; i++)
... | a.cc:2:1: error: expected unqualified-id before numeric constant
2 | 1
| ^
In file included from /usr/include/c++/14/cstdlib:79,
from /usr/include/c++/14/bits/stl_algo.h:71,
from /usr/include/c++/14/algorithm:61,
from a.cc:43:
/usr/include/stdlib.h:98:8: erro... |
s399084541 | p00092 | C++ | z[4000],*a=z,*b=z+2000,m,i,j;main(n){for(;!scanf("%d",&n)||n;m=!printf("%d\n",m))for(i=++n;i--;j=a,a=b,b=j)for(j=n;j--;)m=fmax(m,b[j]=n+~i&&getchar()>45?1+fmin(fmin(b[j+1],a[j+1]),a[j]):0);} | a.cc:1:1: error: 'z' does not name a type
1 | z[4000],*a=z,*b=z+2000,m,i,j;main(n){for(;!scanf("%d",&n)||n;m=!printf("%d\n",m))for(i=++n;i--;j=a,a=b,b=j)for(j=n;j--;)m=fmax(m,b[j]=n+~i&&getchar()>45?1+fmin(fmin(b[j+1],a[j+1]),a[j]):0);}
| ^
a.cc:1:34: error: expected constructor, destructor, or type conversio... |
s497753005 | p00092 | C++ | z[4000],*a=z,*b=z+2000,m,i,j,k;main(n){for(;scanf("%d",&n),n;m=!printf("%d\n",m))for(i=++n;i--;j=a,a=b,b=j)for(j=n;j--;k>m?m=k:0)k=b[j]=n+~i&&getchar()>45?1+fmin(fmin(b[j+1],a[j+1]),a[j]):0;} | a.cc:1:1: error: 'z' does not name a type
1 | z[4000],*a=z,*b=z+2000,m,i,j,k;main(n){for(;scanf("%d",&n),n;m=!printf("%d\n",m))for(i=++n;i--;j=a,a=b,b=j)for(j=n;j--;k>m?m=k:0)k=b[j]=n+~i&&getchar()>45?1+fmin(fmin(b[j+1],a[j+1]),a[j]):0;}
| ^
a.cc:1:36: error: expected constructor, destructor, or type conversi... |
s263339819 | p00092 | C++ | #include <cstdio>
#include <algorithm>
#include <cstring>
using namespace std;
int n;
char str[1005][1005];
int rui[1001][1001];
int main(){
while(1){
scanf("%d",&n);
if(!n) break;
for(int i=1;i<=n;i++){
scanf("%s",&str[i]);
}
for(int j=1;j<=n;j++){
for(int i=n-1;i>=0;i--){
str[j][i+1]=str[j][i];
}
}
mems... | a.cc: In function 'int main()':
a.cc:58:2: error: expected '}' at end of input
58 | }
| ^
a.cc:8:11: note: to match this '{'
8 | int main(){
| ^
|
s093672077 | p00092 | C++ | #include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
int n;
char str[1005][1005];
int rui[1001][1001]={};
int main(){
while(1){
scanf("%d",&n);
if(!n) break;
memset(rui,0,sizeof(rui));
for(int i=1;i<=n;i++){
scanf("%s",&str[i]);
}
for(int j=1;j<=n;j++){
for(int i=n-1;i>=0;i--){
str... | a.cc: In function 'int main()':
a.cc:58:2: error: expected '}' at end of input
58 | }
| ^
a.cc:8:11: note: to match this '{'
8 | int main(){
| ^
|
s152453589 | p00092 | C++ | #include <iostream>
#include <stdio.h>
using namespace std;
int main() {
char c[1001];
int d[2][1002],i,j,k,n,m,mx;
while(true) {
cin >> n; k=0; mx=0;
if (n==0) break;
memset(d,0,sizeof(d));
for (i=0;i<n;i++) {
cin >> c;
for (j=0;j<n;j++) {
if (c[j]=='.') {
m=min(d[k][j],... | a.cc: In function 'int main()':
a.cc:10:12: error: 'memset' was not declared in this scope
10 | memset(d,0,sizeof(d));
| ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <iostream>
+++ |+#include <... |
s316399441 | p00092 | C++ | #Include <iostream>
using namespace std;
int main () {
int i,j,n;
int dp[1001][1001];
int ma;
char c;
cin >> n;
while(n != 0) {
ma = 0;
for(i=0; i<n; i++){ dp[0][i] = 0; }
for(i=0; i<n; i++){ dp[i][0] = 0; }
for(int i=1; i<=n; i++){
for(int j=1; j<=n; j++) {
cin >> c;
if(c ==... | a.cc:1:2: error: invalid preprocessing directive #Include; did you mean #include?
1 | #Include <iostream>
| ^~~~~~~
| include
a.cc: In function 'int main()':
a.cc:11:3: error: 'cin' was not declared in this scope
11 | cin >> n;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostr... |
s401534165 | p00092 | C++ | #include<iostream>
using namespace std;
#define N 1000
#define max((a),(b)) ((a)>(b)?(a):(b))
#define min((a),(b)) ((a)>(b)?(b):(a))
int main() {
char map[N][N]; int l[N][N], ans, n, dp[N][N], c;
while(1) {
cin >> n;
if(!n) break;
c = 0;
for(int i=0; i<n; ++i) {
for(int j=0; j<n; ++j) {
cin >> map[i... | a.cc:6:13: error: expected parameter name, found "("
6 | #define max((a),(b)) ((a)>(b)?(a):(b))
| ^
a.cc:7:13: error: expected parameter name, found "("
7 | #define min((a),(b)) ((a)>(b)?(b):(a))
| ^
|
s641246071 | p00093 | Java | package benkyo;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
public class BenkyoMain {
public static void main(String args[] ) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line = br.read... | Main.java:8: error: class BenkyoMain is public, should be declared in a file named BenkyoMain.java
public class BenkyoMain {
^
1 error
|
s382304904 | p00093 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
public class AOJ_0093
{
public static void main(String[] args) throws IOException
{
BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
;
while (input.ready... | Main.java:6: error: class AOJ_0093 is public, should be declared in a file named AOJ_0093.java
public class AOJ_0093
^
1 error
|
s586462149 | p00093 | Java | public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (true) {
int a = sc.nextInt();
int b = sc.nextInt();
if (a == 0 && b == 0) {
break;
}
hasLeapYear(a, b);
}
sc.close();
}
private static void hasLeapYear(int a, int b) {
boolean h... | Main.java:4: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:4: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s069383733 | p00093 | Java | import java.util.Scanner;
public class m_0093 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a,b,flag=0;
while(true) {
a=sc.nextInt();
b=sc.nextInt();
if ( a == 0 && b == 0 )break;
while ( a < b ) {
if ( a % 4 == 0 && a % 100 != 0 || a % 400 == 0 ) {
Syst... | Main.java:2: error: class m_0093 is public, should be declared in a file named m_0093.java
public class m_0093 {
^
1 error
|
s152843894 | p00093 | Java | // 作成日 : 2012/11/02
// 作成者 : 01 石川力太
package 電話番号管理3;
import java.io.*;
import java.sql.*;
public class Member3 {
// Oracle DB 操作用のクラスをインスタンス化
OracleManager olm;
BufferedReader br;
ResultSet rs;
public Member3 () throws IOException, SQLException {
olm = new OracleManager(); //DB操作?
br = new BufferedReader(... | Main.java:8: error: class Member3 is public, should be declared in a file named Member3.java
public class Member3 {
^
Main.java:11: error: cannot find symbol
OracleManager olm;
^
symbol: class OracleManager
location: class Member3
Main.java:16: error: cannot find symbol
olm = new OracleManager(); //DB?... |
s094833993 | p00093 | Java | import java.io.*;
class Main{
public static void main(String[] args)throws IOException{
BufferedReader br = null;
String buf;
try{
br = new BufferedReader(new InputStreamReader(System.in));
while((buf = br.readLine()) !=null){
int[] year = new int[2];
for(int i=0;year.length;i++){
year[i]= I... | Main.java:11: error: incompatible types: int cannot be converted to boolean
for(int i=0;year.length;i++){
^
Main.java:12: error: incompatible types: String[] cannot be converted to String
year[i]= Integer.parseInt(buf.split(" "));
^
Note: Some messages ... |
s613180368 | p00093 | Java | import java.io.*;
class Main{
public static void main(String[] args)throws IOException{
BufferedReader br = null;
String buf;
try{
br = new BufferedReader(new InputStreamReader(System.in));
while((buf = br.readLine()) !=null){
int[] year = new int[2];
for(int i=0;i<year.length;i++){
year[i]=... | Main.java:25: error: 'finally' without 'try'
}finally{
^
Main.java:7: error: 'try' without 'catch', 'finally' or resource declarations
try{
^
Main.java:31: error: reached end of file while parsing
}
^
3 errors
|
s419185249 | p00093 | Java | import java.io.*;
class Main{
public static void main(String[] args)throws IOException{
BufferedReader br = null;
String buf;
int line = true;
try{
br = new BufferedReader(new InputStreamReader(System.in));
while((buf = br.readLine()) !=null){
int[] year = new int[2];
for(int i=0;i<year.length;i+... | Main.java:31: error: 'finally' without 'try'
}finally{
^
Main.java:8: error: 'try' without 'catch', 'finally' or resource declarations
try{
^
Main.java:37: error: reached end of file while parsing
}
^
3 errors
|
s365111918 | p00093 | Java | import java.io.*;
class Main{
public static void main(String[] args)throws IOException{
BufferedReader br = null;
String buf;
int line = true;
try{
br = new BufferedReader(new InputStreamReader(System.in));
while((buf = br.readLine()) !=null){
int[] year = new int[2];
for(int i=0;i<year.length;i+... | Main.java:7: error: incompatible types: boolean cannot be converted to int
int line = true;
^
Main.java:16: error: incompatible types: int cannot be converted to boolean
if(line){
^
Main.java:17: error: incompatible types: boolean cannot be converted to int
line = false;
^
3 error... |
s333488191 | p00093 | C | #include<stdio.h>
/*与えられた期間の間のうるう年をすべて出力*/
void leap_year(int year1, int year2);
int main(void)
{
while(1){
int a, b; /*a は year1 , b は year2*/
scanf("%d %d", &a, &b);
if (a == 0 && b == 0){
break;
}else if (a == b){
printf("NA\n");
printf("\n");
... | main.c: In function 'leap_year':
main.c:24:16: error: expected expression before '/' token
24 | int limit; /もしも、うるう年がなかった時に使う/
| ^
main.c:24:23: error: stray '\343' in program
24 | int limit; /<U+3082><U+3057><U+3082><U+3001><U+3046><U+308B><U+3046><U+5E74><U+304C><U+306A><U+304B><U+3... |
s095998740 | p00093 | C | #include <stdio.h>
int main(void){
int a, b;
int i, c;
while(scanf("%d %d", &a, &b) != EOF){
if(a == 0 && b == 0) break;
c = 0;
putchar('\n');
for(i = a; i <= b; i++){
if(i % 4 == 0 && i %100 != 0){
printf("%d\n", i);
c++;
}else if(i % 400 == 0){
printf("%d\n", i);
c++;
}
... | main.c: In function 'main':
main.c:10:1: error: stray '\343' in program
10 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>putchar('\n');
| ^~~~~~~~
main.c:10:3: error: stray '\343' in program
10 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>putchar('\n'... |
s799235120 | p00093 | C | #include<stdio.h>
int main(){
int a,b,i,temp,judge=0;
while(1){
??????temp=0;
scanf("%d %d", &a, &b);
if((a==0)&&(b==0))break;
if(judge!=0) printf("\n");
judge++;
for(i=a;i<=b;i++){
if(i%400==0){
printf("%d\n",i);
temp=1;
}
else if((i%4==0)&&(i%100!=0)){
printf("%... | main.c: In function 'main':
main.c:5:1: error: expected expression before '?' token
5 | ??????temp=0;
| ^
|
s240130527 | p00093 | C | #include<stdio.h>
int main(){
int a,b,i,temp,judge=0;
while(1){
??????temp=0;
scanf("%d %d", &a, &b);
if((a==0)&&(b==0))break;
if(judge!=0) printf("\n");
judge++;
for(i=a;i<=b;i++){
if(i%400==0){
printf("%d\n",i);
temp=1;
}
else if((i%4==0)&&(i%100!=0)){
printf("%... | main.c: In function 'main':
main.c:5:1: error: expected expression before '?' token
5 | ??????temp=0;
| ^
|
s186724017 | p00093 | C | #include<stdio.h>
int main(){
int a,b,i,temp,judge=0;
while(1){
??????temp=0;
scanf("%d %d", &a, &b);
if((a==0)&&(b==0))break;
if(judge!=0) {printf("\n");}
judge++;
for(i=a;i<=b;i++){
if(i%400==0){
printf("%d\n",i);
temp=1;
}
else if((i%4==0)&&(i%100!=0)){
printf(... | main.c: In function 'main':
main.c:5:1: error: expected expression before '?' token
5 | ??????temp=0;
| ^
|
s522895160 | p00093 | C | #include<stdio.h>
int main(void){
int before,after;
int i;
int flag = 0;
scanf("%d %d",&before,&after);
if(before == 0 && after == 0){
break;
}
for(i = before;i <= after;i++){
if(i % 4 == 0){
if(i % 100 != 0){
flag = 1;
... | main.c: In function 'main':
main.c:8:13: error: break statement not within loop or switch
8 | break;
| ^~~~~
|
s617561092 | p00093 | C | #include<stdio.h>
int main(void){
int before,after;
int i;
int flag = 0;
scanf("%d %d",&before,&after);
for(i = before;i <= after;i++){
if(i % 4 == 0){
if(i % 100 != 0){
flag = 1;
printf("%d\n",i);
}
... | main.c: In function 'main':
main.c:29:30: error: expected ';' before 'puts'
29 | scanf("%d %d",&before,&after)
| ^
| ;
30 | puts("");
| ~~~~
|
s912902239 | p00093 | C | #include<stdio.h>
int main(void){
int before,after;
int i;
int flag = 0;
scanf("%d %d",&before,&after);
for(i = before;i <= after;i++){
if(i % 4 == 0&&i % 100 != 0||i%400==0){
flag = 1;
printf("%d\n",i);
}
}
... | main.c:15:9: error: expected identifier or '(' before 'if'
15 | if(flag == 0){
| ^~
main.c:18:9: warning: data definition has no type or storage class
18 | flag = 0;
| ^~~~
main.c:18:9: error: type defaults to 'int' in declaration of 'flag' [-Wimplicit-int]
main.c:21:5:... |
s222982612 | p00093 | C | include <stdio.h>
int main(void){
int a,b,c;
c=0;
scanf("%d%d",&a,&b);
while(1){
scanf("%d%d",&a,&b);
if(a==0&&b==0){break;}
if(a%4==0){
if(a%400==0&&a%100==0){
printf("%d\n",a);
c=c++;}
else if(a%100!=0){
printf("%d\n",a);
c=c++;
}
if(a==b){break;}
a=a+1;}
}
if(c==0){printf("NA... | main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include <stdio.h>
| ^
|
s301255383 | p00093 | C | #include <iostream>
#include <algorithm>
#include <vector>
#include <cstdio>
#include <string>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <cmath>
#include <functional>
#include <numeric>
#include <iomanip>
#define fi first
#define se second
#define fcout(n) cout<<fixed<<setprecision((n))
#... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s795008158 | p00093 | C | #include <iostream>
#include <algorithm>
#include <vector>
#include <cstdio>
#include <string>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <cmath>
#include <functional>
#include <numeric>
#include <iomanip>
#define fi first
#define se second
#define fcout(n) cout<<fixed<<setprecision((n))
#... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s196094567 | p00093 | C | #include <stdio.h>
int main(void)
{
int start, end;
int year;
int flg_null;
int flg_dsp;
flg_null = 0;
while (1){
scanf("%d%d", &start, &end);
if (start == 0 && end == 0){
break;
}
if (flg_null == 1){
printf("\n");
flg_null = 1;
}
flg_dsp = 0;
for (year = start; year <= end; year++){
... | main.c:36:5: error: redefinition of 'main'
36 | int main(void)
| ^~~~
main.c:3:5: note: previous definition of 'main' with type 'int(void)'
3 | int main(void)
| ^~~~
|
s618782133 | p00093 | C | #include <stdio.h>
int main(void)
{
int a;
int b;
int i;
int leap;
scanf("%d%d", &a, &b);
while(a != 0 && b != 0){
leap = 1;
for (i = a; i <= b; i++){
if (i % 400 == 0){
printf("%d\n", i);
leap = 0;
}
else if((i % 4 == 0) && (i % 100 != 0)){
printf("%d\n", i);
leap = 0;
}
}
if... | main.c: In function 'main':
main.c:24:3: error: stray '\343' in program
24 | <U+30C4><U+3000><U+30C4><U+3000><U+30C4><U+3000><U+30C4><U+3000><U+30C4><U+3000><U+30C4><U+3000><U+30C4><U+3000><U+30C4><U+3000><U+30C4><U+3000>}
| ^~~~~~~~
main.c:24:1: error: unknown type name '\U000030c4'
24 | ツ ツ ツ ツ ツ ... |
s392837807 | p00093 | C | #include<stdio.h>
int main(){
int a,i,b,count=0;
while(1)
{
count=0;
scanf("%d%d",&a,&b);
printf("\n");
if(a==0 && b==0){ break; }
for(i=a;i<=b;i++)
{
if(i%4==0 && i%100!=0)
{
printf("%d\n",i);
count++;
}
else if(i%400==0)
{
printf("%d\n"... | main.c: In function 'main':
main.c:38:3: error: expected declaration or statement at end of input
38 | return 0;
| ^~~~~~
|
s886760766 | p00093 | C | a,b,i,c,k[3100];main(){for(scanf("%d%d",&a,&b);a;puts("")){c=0;for(i=a;i<=b;i++)if(i%400==0||(i%100!=0&&i%4==0))k[c++]=i;if(!c)puts("NA");elsefor(i=0;i<c;)printf("%d\n",k[i++]);scanf("%d%d",&a,&b);}exit(0);} | main.c:1:1: warning: data definition has no type or storage class
1 | a,b,i,c,k[3100];main(){for(scanf("%d%d",&a,&b);a;puts("")){c=0;for(i=a;i<=b;i++)if(i%400==0||(i%100!=0&&i%4==0))k[c++]=i;if(!c)puts("NA");elsefor(i=0;i<c;)printf("%d\n",k[i++]);scanf("%d%d",&a,&b);}exit(0);}
| ^
main.c:1:1: error: type defa... |
s597168697 | p00093 | C | a,b,i,c,k[3100];main(){for(scanf("%d%d",&a,&b);a;puts("")){c=0;for(i=a;i<=b;i++)if(i%400==0||(i%100!=0&&i%4==0))k[c++]=i;if(!c)puts("NA");elsefor(i=0;i<c;)printf("%d\n",k[i++]);scanf("%d%d",&a,&b);}exit(0);} | main.c:1:1: warning: data definition has no type or storage class
1 | a,b,i,c,k[3100];main(){for(scanf("%d%d",&a,&b);a;puts("")){c=0;for(i=a;i<=b;i++)if(i%400==0||(i%100!=0&&i%4==0))k[c++]=i;if(!c)puts("NA");elsefor(i=0;i<c;)printf("%d\n",k[i++]);scanf("%d%d",&a,&b);}exit(0);}
| ^
main.c:1:1: error: type defa... |
s225724877 | p00093 | C | #include <stdio.h>
int main(int argc, const char * argv[])
{
int a, b, y;
while(1) {
scanf("%d %d", &a, &b);
if (a == 0 && b == 0) {
break;
} else {
int cnt = 0;
if (cnt != 0) {
printf("\n");
}
for (y = a;... | main.c: In function 'main':
main.c:30:5: error: expected declaration or statement at end of input
30 | return 0;
| ^~~~~~
|
s838465669 | p00093 | C | #include <stdio.h>
struct year {
int start;
int end;
};
void outputLeapyear(int, int);
int main(void)
{
int isInit = 0;
struct year year;
while (scanf("%d %d", &year.start, &year.end), !(year.start == 0 && year.end == 0)) {
if (isInit == 0) {
isInit++;
} else {
printf("\n");
outputLeapyear(year.s... | main.c: In function 'main':
main.c:45:1: error: expected declaration or statement at end of input
45 | }
| ^
|
s351151223 | p00093 | C | include<stdio.h>
main(){
int a,b,i,x,y=0;
while(1){ /* 無限ループ */
x=0;
y++;
scanf("%d %d",&a,&b);
if(a==0 && b==0){
break; //ループを抜ける
}
if(y!=1){
printf("\n");
}
for(i=a;i<=b;i++){
if(i%400==0){
printf("%d\n",i);
x=1;
}
else if(i%4==0 && i%100!=0){
... | main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
|
s200686707 | p00093 | C | #include <stdio.h>
int main(void)
{
int a,b;
int i;
int uru;
while(1){
scanf("%d",&a);
scanf("%d",&b);
uru=0;
if(a==0 && b==0)
break;
for(i=a;i<=b;i++){
if(i%4==0 && i%100!=0){
printf("%d\n",i);
uru++;
}else if(i%100==0 && i%400!=0)
printf("");
else if(i%400==0){00
pr... | main.c: In function 'main':
main.c:23:45: error: expected ';' before 'printf'
23 | else if(i%400==0){00
| ^
| ;
24 | printf("%d\n",i);
| ... |
s878791017 | p00093 | C | #include<stdio.h>
int main(){
int a, b, i, c = true;
while(scanf("%d%d", &a, &b)){
if(a == 0 && b == 0) break;
for(i = a; i <= b; i++){
if(i % 4 == 0){
if(i % 100 == 0){
if(i % 400 == 0){
printf("%d\n", i);
c = false;
}
}else{
printf("%d\n", i);
c = false;
}
}
... | main.c: In function 'main':
main.c:4:26: error: 'true' undeclared (first use in this function)
4 | int a, b, i, c = true;
| ^~~~
main.c:2:1: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
1 | #include<stdio.h>
+... |
s766775575 | p00093 | C | #include<stdio.h>
int main(){
int a, b, i, c = true;
while(scanf("%d%d", &a, &b)){
if(a == 0 && b == 0) break;
for(i = a; i <= b; i++){
if(i % 4 == 0){
if(i % 100 == 0){
if(i % 400 == 0){
printf("%d\n", i);
c = false;
}
}else{
printf("%d\n", i);
c = false;
}
}
... | main.c: In function 'main':
main.c:4:26: error: 'true' undeclared (first use in this function)
4 | int a, b, i, c = true;
| ^~~~
main.c:2:1: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
1 | #include<stdio.h>
+... |
s505751495 | p00093 | C | #include <stdio.h>
int main( void ) {
int i, a, b, first = 1, exist;
while ( scanf( "%d %d", &a, &b ), a ) {
if ( !first )
putchar( '\n' );
exist = 0;
for ( i = ( ( a - 1 ) / 4 * 4 + 4; i <= b; i += 4 )
if ( !( i % 4 ) && i % 25 || !( i % 400 ) ) {
printf( "%d\n", i );
exist = 1;
}
if ( !... | main.c: In function 'main':
main.c:11:50: error: expected ')' before ';' token
11 | for ( i = ( ( a - 1 ) / 4 * 4 + 4; i <= b; i += 4 )
| ~ ^
| )
main.c:11:68: error: expected ';' before 'if'
... |
s907240760 | p00093 | C++ | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
| |
s470133903 | p00093 | C++ | #include <stdio.h>
int count_number(void);
int main(void)
{
int a;
int b;
while (1) {
scanf("%d %d", &a, &b);
if (a == 0 && b == 0) {
break;
} else {
int count = 0;
for (int i=a; i++; i<=b) {
if (((i % 4) == 0) && ((i % 100) != 0) &&... | a.cc:7:1: error: extended character is not valid in an identifier
7 | int a;
| ^
a.cc: In function 'int main()':
a.cc:7:1: error: '\U00003000int' was not declared in this scope
7 | int a;
| ^~~~~
a.cc:10:25: error: 'a' was not declared in this scope
10 | scanf("%d %d", &a, &b);
... |
s613940941 | p00093 | C++ | #include<stdio.h>
/*与えられた期間の間のうるう年をすべて出力*/
void leap_year(int year1, int year2);
int main(void)
{
while (1){
int a, b; /*a は year1 , b は year2*/
scanf("%d %d", &a, &b);
if (a == 0 && b == 0){
break;
}else if (a == b){
printf("\n");
printf("NA\n");... | a.cc: In function 'int main()':
a.cc:18:6: error: 'c' was not declared in this scope
18 | c }
| ^
|
s226001296 | p00093 | C++ | /*
2014.07.04 1230~1237
C language Lecture week ∞
*/
#include <stdio.h>
int leap_chk ( int year );
int main (void) {
int init;
int last;
int count = 0;
scanf ( "%d", &init );
scanf ( "%d", &last );
for ( int ly = init; ly <= last; ly ++ ) {
if ( leap_chk ( ... | a.cc: In function 'int leap_chk(int)':
a.cc:48:5: error: expected '}' before 'else'
48 | else {
| ^~~~
a.cc:38:26: note: to match this '{'
38 | if ( year % 4 == 0 ) {
| ^
|
s328034899 | p00093 | C++ | #include <stdio.h>
void Leap_Year(int start_year, int end_year)
{
if((start_year != 0) || (end_year != 0)) {
for(int i = start_year; i <= end_year; ++i) {
if(i % 400 != 0) {
if((i % 100 != 0) && (i % 4 == 0)) {
printf("%d\n", i);
} else {
... | a.cc: In function 'void Leap_Year(int, int)':
a.cc:12:15: error: expected '}' before 'else'
12 | } else {
| ^~~~
a.cc:7:30: note: to match this '{'
7 | if(i % 400 != 0) {
| ^
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.