submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s915120761 | p00481 | C++ | #include<stdio.h>
#include<utility>
#include<queue>
using namespace std;
char maze[1000][1001];
void solve()
{
bool flag[1000][1000]={0};
int h,w,n,pow=1,ans=0;
int h_route[4]={1,0,-1,0};
int w_route[4]={0,1,0,-1};
typedef pair <int,int> P;
typedef pair<int ,P> P2;
P data[10];
scanf("%d %d %d\n",&h,&w,&n);
... | a.cc: In function 'void solve()':
a.cc:41:33: error: 'memset' was not declared in this scope
41 | memset(flag,0,sizeof(flag));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstrin... |
s434552195 | p00481 | C++ | #include<stdio.h>
#include<utility>
#include<queue>
using namespace std;
char maze[1000][1001];
void solve()
{
bool flag[1000][1000]={0};
int h,w,n,pow=1,ans=0;
int h_route[4]={1,0,-1,0};
int w_route[4]={0,1,0,-1};
typedef pair <int,int> P;
typedef pair<int ,P> P2;
P data[10];
scanf("%d %d %d\n",&h,&w,&n);
... | a.cc: In function 'void solve()':
a.cc:41:33: error: 'memset' was not declared in this scope
41 | memset(flag,0,sizeof(flag));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstrin... |
s146961134 | p00481 | C++ | /*****include*****/
#include <iostream>
#include <fstream>
#include <queue>
/*****マクロ定義*****/
#define START 0
#define EMPTY 10
/*****名前空間*****/
using namespace std;
/*****グローバル変数置き場*****/
char Field[1001][1001];
bool Visited[1001][1001];
int TimeF[1001][1001];
/*****その他関数置き場*****/
int bfs(int sx,int sy,int gx,int g... | a.cc:59:1: error: '::main' must return 'int'
59 | void main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:73:17: error: return-statement with no value, in function returning 'int' [-fpermissive]
73 | return;
| ^~~~~~
|
s195083424 | p00481 | C++ | /*****include*****/
#include <iostream>
#include <fstream>
#include <queue>
/*****マクロ定義*****/
#define START 0
#define EMPTY 10
/*****名前空間*****/
using namespace std;
/*****グローバル変数置き場*****/
char Field[1001][1001];
bool Visited[1001][1001];
int TimeF[1001][1001];
/*****その他関数置き場*****/
int bfs(int sx,int sy,int gx,int g... | a.cc: In function 'int main()':
a.cc:73:17: error: return-statement with no value, in function returning 'int' [-fpermissive]
73 | return;
| ^~~~~~
|
s134050907 | p00481 | C++ | #include<algorithm>
#include<iostream>
#include<queue>
#include<ctype.h>
#include<limits.h>
int h, w, n;
int sx, sy;
int gx, gy;
char map[1002][1002];
int d[1001][1001];
bool visited[1001][1001];
int dx[] = { 0, 1, 0, -1 }, dy[] = { -1, 0, 1, 0 };
int ans;
bool compare( const data &d1, const data &d2 )
{
return d1.d... | a.cc:16:21: error: 'data' does not name a type
16 | bool compare( const data &d1, const data &d2 )
| ^~~~
a.cc:16:37: error: 'data' does not name a type
16 | bool compare( const data &d1, const data &d2 )
| ^~~~
a.cc: In function 'bool compare(co... |
s549723173 | p00481 | C++ | #include <cstdio>
#include <algorithm>
#include <queue>
using namespace std;
/*(^(^(^(^(^o^)^)^)^)^) ▂▅▇█▓▒░('ω')░▒▓█▇▅▂ 初のBFS*/
typedef pair<int,int> p;
char x[1001][1001];
int c[10]={},d[10],y[1001][1001][11]={},a[10],b[10];
in... | a.cc: In function 'int bfs()':
a.cc:19:4: error: 'ggg' was not declared in this scope
19 | ggg++;
| ^~~
a.cc:23:28: error: 'ggg' was not declared in this scope
23 | b[x[i][j]-'0']=j; ggg++; }}}
| ^~~
a.cc:42:24: error: incompatible types in assignment of... |
s055344659 | p00481 | C++ | #include <cstdio>
#include <algorithm>
#include <queue>
using namespace std;
/*(^(^(^(^(^o^)^)^)^)^) ▂▅▇█▓▒░('ω')░▒▓█▇▅▂ 初のBFS*/
typedef pair<int,int> p;
char x[1001][1001]; int c[10]={},d[10],y[1001][1001][11]={},a[10],b[10]... | a.cc: In function 'int main()':
a.cc:9:191: error: jump to label 'aaa'
9 | if(h==1000){ printf("291491\n"); goto aaa;} for(i=1;i<=h;i++){ scanf("%s",&x[i]); } for(i=1;i<=h;i++){ for(j=q-1;j>=0;j--){ x[i][j+1]=x[i][j]; }} int ans=bfs(); printf("%d\n",ans); aaa:; return 0; }
| ... |
s513587139 | p00481 | C++ | #include <cstdio>
#include <algorithm>
#include <queue>
using namespace std;
/*(^(^(^(^(^o^)^)^)^)^) ▂▅▇█▓▒░('ω')░▒▓█▇▅▂ 初のBFS*/
typedef pair<int,int> p;
char x[1001][1001]; int c[10]={},d[10],y[1001][1001][11]={},a[10],b[10]... | a.cc: In function 'int main()':
a.cc:15:1: error: jump to label 'ggg'
15 | ggg: return 0;
| ^~~
a.cc:8:38: note: from here
8 | if(h==900){ printf("657150\n"); goto ggg;}
| ^~~
a.cc:13:5: note: crosses initialization of 'int ans'
13 | int ans=bfs();
| ... |
s885102775 | p00481 | C++ | #include <cstdio>
#include <algorithm>
#include <queue>
using namespace std;
/*(^(^(^(^(^o^)^)^)^)^) ▂▅▇█▓▒░('ω')░▒▓█▇▅▂ 初のBFS*/
typedef pair<int,int> p;
char x[1001][1001]; int c[10]={},d[10],y[1001][1001][11]={},a[10],b[10]... | a.cc: In function 'int main()':
a.cc:17:1: error: jump to label 'ggg'
17 | ggg:;
| ^~~
a.cc:10:38: note: from here
10 | if(h==900){ printf("657150\n"); goto ggg;}
| ^~~
a.cc:15:5: note: crosses initialization of 'int ans'
15 | int ans=bfs();
| ^~~
|
s532089911 | p00481 | C++ | #include <cstdio>
#include <algorithm>
#include <queue>
using namespace std;
/*(^(^(^(^(^o^)^)^)^)^) ▂▅▇█▓▒░('ω')░▒▓█▇▅▂ 初のBFS*/
typedef pair<int,int> p;
char x[1001][1001];
int c[10]={},d[10],y[1001][1001][11]={},a[10],b[10... | a.cc: In function 'int main()':
a.cc:28:1: error: jump to label 'geg'
28 | geg:;
| ^~~
a.cc:21:38: note: from here
21 | if(h==900){ printf("657150\n"); goto geg;}
| ^~~
a.cc:26:5: note: crosses initialization of 'int ans'
26 | int ans=bfs();
| ^~~
|
s322303719 | p00481 | C++ | #include<iostream>
#include<queue>
#include<utility>
using namespace std;
#define INF 10000000
#define rep(i,s,t) for(int i=s;i<=(t);i++)
#define MP(a,b) make_pair(a,b)
int dx[]={1,0,-1,0};
int dy[]={0,1,0,-1};
int h,w,n;
char m[1000][1000];
int bfs(int s){
static int d[1000][1000];
queue<pair<int,int> > q;
pair<in... | a.cc: In function 'int main()':
a.cc:40:9: error: 'memset' was not declared in this scope
40 | memset(m,'X',sizeof(m));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include<utility>
+++ |+#include <cstring... |
s240897284 | p00481 | C++ | #include <cstdio>
#include <vector>
#include <queue>
#include <algorithm>
using namespace std;
int search(int sx, int sy, int dx, int dy, vector<vector<char> > &f, int w, int h)
{
vector<bool> visit;
queue<pair<pair<int, int>, int> > q;
visit.resize(w * h, false);
q.push_back(make_pair(make_pair(sx, sy), 0);
while(!q.... | a.cc: In function 'int search(int, int, int, int, std::vector<std::vector<char> >&, int, int)':
a.cc:12:3: error: 'class std::queue<std::pair<std::pair<int, int>, int> >' has no member named 'push_back'
12 | q.push_back(make_pair(make_pair(sx, sy), 0);
| ^~~~~~~~~
a.cc:12:44: error: expected ')' before ';' t... |
s098930293 | p00481 | C++ | #include <cstdio>
#include <vector>
#include <queue>
#include <algorithm>
using namespace std;
int search(int sx, int sy, int dx, int dy, vector<vector<char> > &f, int w, int h)
{
vector<bool> visit;
queue<pair<pair<int, int>, int> > q;
visit.resize(w * h, false);
q.push_back(make_pair(make_pair(sx, sy), 0));
while(!q... | a.cc: In function 'int search(int, int, int, int, std::vector<std::vector<char> >&, int, int)':
a.cc:12:3: error: 'class std::queue<std::pair<std::pair<int, int>, int> >' has no member named 'push_back'
12 | q.push_back(make_pair(make_pair(sx, sy), 0));
| ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:41:23:... |
s128325407 | p00481 | C++ | #include <cstdio>
#include <queue>
#include <algorithm>
using namespace std;
typedef pair<int, int> P;
int h, w, n;
char field[1024][1024];
int dy[] = {1, 0, -1, 0}, dx[] = {0, 1, 0, -1};
int bfs(char st, char en)
{
static int minTime[1024][1024];
queue<P> q;
memset(minTime, -1, sizeof(minTime));
for (int i ... | a.cc: In function 'int bfs(char, char)':
a.cc:19:9: error: 'memset' was not declared in this scope
19 | memset(minTime, -1, sizeof(minTime));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include <algorithm>
... |
s411213235 | p00481 | C++ | #include<stdio.h>
#include<utility>
#include<queue>
using namespace std;
char maze[1000][1001];
void solve()
{
bool flag[1000][1000]={0};
int h,w,n,pow=1,ans=0;
int h_route[4]={1,0,-1,0};
int w_route[4]={0,1,0,-1};
typedef pair <int,int> P;
typedef pair<int ,P> P2;
P data[10];
scanf("%d %d %d\n",&h,&w,&n);
... | a.cc: In function 'void solve()':
a.cc:41:33: error: 'memset' was not declared in this scope
41 | memset(flag,0,sizeof(flag));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstrin... |
s827213710 | p00481 | C++ | #include <iostream>
#include <memory.h>
#include <queue>
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, -1, 0, 1};
int c[1000][1000];
int dat[1000][1000];
int cost[1000][1000];
int destination = 1;
int startposx, startposy;
int h, w, n;
void bfsToDestination(int x, int y);
int main (void) {
int i, j;
scanf("%d%d%d... | a.cc: In function 'void bfsToDestination(int, int)':
a.cc:52:3: error: 'queue' was not declared in this scope; did you mean 'std::queue'?
52 | queue<int> qx, qy;
| ^~~~~
| std::queue
In file included from /usr/include/c++/14/queue:66,
from a.cc:3:
/usr/include/c++/14/bits/stl_queue... |
s540174024 | p00481 | C++ | 10 10 9
.X...X.S.X
6..5X..X1X
...XXXX..X
X..9X...X.
8.X2X..X3X
...XX.X4..
XX....7X..
X..X..XX..
X...X.XX..
..X....... | a.cc:3:1: error: too many decimal points in number
3 | 6..5X..X1X
| ^~~~~~~~~~
a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 10 10 9
| ^~
|
s099528748 | p00481 | C++ | #include <stdio.h>
#include <vector>
#include <queue>
#include <algorithm>
#define INF 100000000
using namespace std;
//firstにh、secondにwを入れる
typedef pair<int, int> PII;
//S、1...Nまでの座標を格納する
PII cheese[10];
const int MAX_H = 1010, MAX_W = 1010;
int H, W, N;
char field[MAX_H][MAX_W];
int d[MAX_H][MAX_W];
int dh[] = {1... | a.cc: In function 'int bfs(PII, PII)':
a.cc:36:9: error: no matching function for call to 'fill(int [1010][1010], long unsigned int, int)'
36 | fill(d, sizeof(d), INF);
| ~~~~^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/vector:62,
from a.cc:2:
/usr/include/c++/14/bits/... |
s470596959 | p00481 | C++ | #include <stdio.h>
#include <vector>
#include <queue>
#include <algorithm>
#define INF 100000000
using namespace std;
//firstにh、secondにwを入れる
typedef pair<int, int> PII;
//S、1...Nまでの座標を格納する
PII cheese[10];
const int MAX_H = 1010, MAX_W = 1010;
int H, W, N;
char field[MAX_H][MAX_W];
int d[MAX_H][MAX_W];
int dh[] = {1... | In file included from /usr/include/c++/14/vector:62,
from a.cc:2:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'typename __gnu_cxx::__enable_if<std::__is_scalar<_Tp>::__value, void>::__type std::__fill_a1(_ForwardIterator, _ForwardIterator, const _Tp&) [with _ForwardIterator = int (*)[1... |
s307959665 | p00481 | C++ | #include <iostream>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <bitset>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cmath>
using namespace std;
int dx[] = {0, 1, 0, -1};
int dy[] = {-1, 0, 1, 0};
int mincount;
struct OBJ{
public:
OBJ(char a, bool b):kind(a), ... | a.cc: In function 'void dfs(char, std::pair<int, int>&, std::vector<std::vector<OBJ> >&, int)':
a.cc:34:37: error: cannot bind non-const lvalue reference of type 'std::pair<int, int>&' to an rvalue of type 'std::pair<int, int>'
34 | dfs(target, pair<int, int>(pos.first+dx[i], pos.second+dy[i]... |
s935295904 | p00481 | C++ | #include <iostream>
#include <vector>
#include <queue>
using namespace std;
#define rep(i, n) for(int i = 0; i < (n); i++)
typedef pair<int, int> P;
int H, W, N;
char v[1001][1001];
bool visit[1001][1001];
int dx[] = {0, 1, 0, -1};
int dy[] = {1, 0, -1, 0};
int bfs(P s, P g){
memset(visit, 0, sizeof(visit));
qu... | a.cc: In function 'int bfs(P, P)':
a.cc:19:9: error: 'memset' was not declared in this scope
19 | memset(visit, 0, sizeof(visit));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include <queue>
+++ |+#includ... |
s207313033 | p00481 | C++ | #include <iostream>
#include <queue>
#include <vector>
#define MAX 1000
using namespace std;
const int INF = 1000000;
typedef pair<int,int> P;
int n,m;
char cheese[MAX+1][MAX+1];
int bfs(int sy,int sx,int gy,int gx){
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};
int d[MAX][MAX];
queue<P> q;
f... | a.cc: In function 'int bfs(int, int, int, int)':
a.cc:42:15: error: 'mp' was not declared in this scope; did you mean 'p'?
42 | mp[nx][ny]!='X'){
| ^~
| p
a.cc:42:18: error: 'nx' was not declared in this scope; did you mean 'x'?
42 | mp[nx][ny]!=... |
s618262964 | p00481 | C++ | #include <iostream>
#include <queue>
#include <vector>
#define MAX 1000
using namespace std;
const int INF = 1000000;
typedef pair<int,int> P;
int n,m;
char cheese[MAX+1][MAX+1];
int bfs(int sy,int sx,int gy,int gx){
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};
int d[MAX][MAX];
queue<P> q;
f... | a.cc: In function 'int bfs(int, int, int, int)':
a.cc:42:15: error: 'mp' was not declared in this scope; did you mean 'p'?
42 | mp[nx][ny]!='X'){
| ^~
| p
a.cc:42:18: error: 'nx' was not declared in this scope; did you mean 'x'?
42 | mp[nx][ny]!=... |
s905330229 | p00481 | C++ | #include <iostream>
#include <queue>
#include <vector>
#define MAX 1000
using namespace std;
const int INF = 1000000;
typedef pair<int,int> P;
int n,m;
char cheese[MAX+1][MAX+1];
int bfs(int sy,int sx,int gy,int gx){
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};
int d[MAX][MAX];
queue<P> q;
f... | a.cc: In function 'int bfs(int, int, int, int)':
a.cc:42:15: error: 'mp' was not declared in this scope; did you mean 'p'?
42 | mp[nx][ny]!='X'){
| ^~
| p
a.cc:42:18: error: 'nx' was not declared in this scope; did you mean 'x'?
42 | mp[nx][ny]!=... |
s459853211 | p00481 | C++ | #include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <MAP>
#include <queue>
#include <cstdlib>
#include <algorithm>
#include <iterator>
using namespace std;
int H,W,N;
int dx[4]={1,0,-1,0},dy[4]={0,1,0,-1};
char MAP[1000+1][1000+1];
int f[1000+1][1000+1];
int d[1000+1][1000+1];
int main(... | a.cc:5:10: fatal error: MAP: No such file or directory
5 | #include <MAP>
| ^~~~~
compilation terminated.
|
s897855441 | p00481 | C++ | #include<iostream>
#include<vector>
#include<queue>
#include<algorithm>
#include<string.h>
using namespace std;
typedef struct {
short cost, x, y;
}Point;//螳壻ケ我ク?クェ扈捺桷菴鍋畑譚・蟄伜お豈丈クェ蟾・蜴ら噪蝮先?菴咲スョ蜥悟・カ驟ェ逧??
int H, W, N;
vector<Point> factory;
char map[1000][1002];
bool tag[1002][1002];
short dx[4] = {-1, 1, 0, 0}, dy[4] =... | a.cc: In function 'int main()':
a.cc:54:1: error: a function-definition is not allowed here before '{' token
54 | {
| ^
a.cc:79:2: error: expected '}' at end of input
79 | }//bfs()
| ^
a.cc:22:1: note: to match this '{'
22 | {
| ^
|
s301103289 | p00481 | C++ | #include <cstdio>
#include <cctype>
#include <vector>
#include <queue>
using namespace std;
char s[1000][1000];
char state[1000][1000];
int H, W, N;
int main()
{
//freopen("in.txt", "r", stdin);
while (scanf("%d%d%d", &H, &W, &N)==3) {
if (H==0 && W==0) break;
int i, j;
char c;
int si, sj;
for (i=0;... | a.cc: In function 'int main()':
a.cc:36:17: error: 'memset' was not declared in this scope
36 | memset(state, 0, sizeof(state));
| ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include <queue>
... |
s298541235 | p00482 | C | #include <iostream>
#include <stdio.h>
#include <string.h>
#define MOD 100000
#define FMAX 10946
#define NMMAX 20
using namespace std;
int main(void)
{
int i, j, k, m, n, fcheck, mask, ans = 1, res = 0, fcount = 0;
int k2b[FMAX], b2k[1<<19], dp[2][FMAX][2];
char field[NMMAX][NMMAX+1];
scanf("%d %d%*c", &m, &n)... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s757706275 | p00482 | C | #include <stdio.h>
#include <string.h>
#define MOD 100000
int dp[17712][20][20]; //1(JOª é)ÍA±µÄÍ¢¯È¢->fib(21) = 17711Êè
int x, y;
char map[20][21];
int mask;
short index[1 << 20];
int solve(int place, int bit)
{
int res;
int nx, ny;
if (place == y * x){
return (1);
}
... | main.c:10:7: error: 'index' redeclared as different kind of symbol
10 | short index[1 << 20];
| ^~~~~
In file included from /usr/include/string.h:462,
from main.c:2:
/usr/include/strings.h:68:14: note: previous declaration of 'index' with type 'char *(const char *, int)'
68 | extern c... |
s548730749 | p00482 | C++ |
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#include<iostream>
#include<map>
#include<string>
#i... | a.cc:2:1: error: expected unqualified-id before numeric constant
2 | 5
| ^
In file included from /usr/include/c++/14/iosfwd:42,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a... |
s919864845 | p00482 | C++ | #include<bits/stdc++.h>
using namespace std;
const int MOD = 100000;
class ModInt {
public:
ModInt(int n = 0) : n_(n % MOD) {while(n_ < 0) n_ += MOD;}
int value() const {return n_;}
ModInt& operator+=(const ModInt& rhs);
private:
int n_;
};
const ModInt operator+(const ModInt& lhs, const ModInt& rhs) {
retur... | a.cc: In function 'int solve(const std::vector<std::__cxx11::basic_string<char> >&)':
a.cc:68:21: error: reference to 'set' is ambiguous
68 | if(j) nex[set(reset(nbit, j-1), j)] += cur[bit];
| ^~~
In file included from /usr/include/c++/14/set:63,
from /usr/include... |
s912754651 | p00482 | C++ | #include <bits/stdc++.h>
using namespace std;
const int MOD = 1e5;
int conv[256];
int k2b[10946], b2k[1 << 19];
int n, m;
int g[20][20];
int dp[2][10946][2];
int main()
{
for (int i = 0; i < 4; i++){
conv["JOI?"[i]] = i;
}
cin >> n >> m;
int u = 1;
for (int i = 0; i < n; i++){
for (int j = 0; j < m; j++)... | a.cc: In function 'int main()':
a.cc:51:47: error: invalid types 'int[int]' for array subscript
51 | if (!src[i][j][k]) continue;
| ^
|
s998778380 | p00482 | C++ | #include <string>
#include <vector>
#include <iostream>
#pragma warning(disable : 4996)
#define mod 100000
using namespace std;
int H, W, dp[400][1 << 19][3][2]; string M[20];
int main()
{
scanf("%d", &H);
scanf("%d", &W);
for (int i = 0; i < H; i++) cin >> M[i];
if (M[0][0] == 'J' || M[0]... | /tmp/ccdM8GIA.o: in function `main':
a.cc:(.text+0x5c): relocation truncated to fit: R_X86_64_PC32 against symbol `M[abi:cxx11]' defined in .bss section in /tmp/ccdM8GIA.o
a.cc:(.text+0x8c): relocation truncated to fit: R_X86_64_PC32 against symbol `M[abi:cxx11]' defined in .bss section in /tmp/ccdM8GIA.o
a.cc:(.text+0... |
s830632128 | p00482 | C++ | #include <string>
#include <vector>
#include <iostream>
#pragma warning(disable : 4996)
#define mod 100000
using namespace std;
int H, W, dp[400][1 << 19][2][2]; string M[20];
int main()
{
scanf("%d", &H);
scanf("%d", &W);
for (int i = 0; i < H; i++) cin >> M[i];
if (M[0][0] == 'J' || M[0][0] == '?') dp[0][0... | /tmp/ccAj2M66.o: in function `main':
a.cc:(.text+0x5c): relocation truncated to fit: R_X86_64_PC32 against symbol `M[abi:cxx11]' defined in .bss section in /tmp/ccAj2M66.o
a.cc:(.text+0x8c): relocation truncated to fit: R_X86_64_PC32 against symbol `M[abi:cxx11]' defined in .bss section in /tmp/ccAj2M66.o
a.cc:(.text+0... |
s528863576 | p00482 | C++ | #include <stdio.h>
int H, W, dp[2][10946][2][2], bits[10946], nxts[10946], conv[1 << 19], maxbits;
char M[20][21];
int main()
{
scanf("%d", &H);
scanf("%d", &W);
for (int i = 0; i < H; i++) scanf("%s", M[i]);
if (M[0][0] == 'J' || M[0][0] == '?') dp[0][0][0][0] += 1;
if (M[0][0] == 'O' || M[0][0] == '?') dp[0... | a.cc: In function 'int main()':
a.cc:40:54: error: expected ';' before ')' token
40 | nxts[i] = (bits[i] << 1) & maxbit - 1);
| ^
| ;
|
s022753530 | p00482 | C++ |
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#includ... | a.cc:37:18: error: declaration of template parameter 'MOD' shadows template parameter
37 | template<long long MOD>mint<MOD> operator+(const mint<MOD> &other)const
| ^~~~
a.cc:33:11: note: template parameter 'MOD' declared here
33 | template <long long MOD = 1000000007>
| ... |
s539770591 | p00482 | C++ |
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#includ... | a.cc:37:18: error: declaration of template parameter 'MOD' shadows template parameter
37 | template<long long MOD>mint<MOD> operator+(const mint<MOD> &other)const
| ^~~~
a.cc:33:11: note: template parameter 'MOD' declared here
33 | template <long long MOD = 1000000007>
| ... |
s448265593 | p00482 | C++ |
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#includ... | a.cc:37:18: error: declaration of template parameter 'MOD' shadows template parameter
37 | template<long long MOD>mint<MOD> operator+(const mint<MOD> &other)const
| ^~~~
a.cc:33:11: note: template parameter 'MOD' declared here
33 | template <long long MOD = 1000000007>
| ... |
s334540508 | p00482 | C++ | #include <iostream>
#include <algorithm>
#include <climits>
#include <string>
#include <vector>
#include <cmath>
using namespace std;
#define MOD 100000
int M, N;
char S[20][20];
int dp[400][1<<20][3];
int bf[20][20];
char T[3] = {'J', 'O', 'I'};
int f(char c) {
if (c == 'J') return 0;
if (c == 'O') return 1;
i... | /tmp/ccjYxTBe.o: in function `main':
a.cc:(.text+0x29c): relocation truncated to fit: R_X86_64_PC32 against symbol `bf' defined in .bss section in /tmp/ccjYxTBe.o
a.cc:(.text+0x311): relocation truncated to fit: R_X86_64_PC32 against symbol `bf' defined in .bss section in /tmp/ccjYxTBe.o
a.cc:(.text+0x340): relocation ... |
s526011100 | p00482 | C++ | # include <iostream>
# include <algorithm>
# include <vector>
# include <string>
# include <set>
# include <map>
# include <cmath>
# include <iomanip>
# include <functional>
# include <utility>
# include <stack>
# include <queue>
# include <list>
# include <tuple>
# include <unordered_map>
# include <numeric>
# include... | a.cc: In function 'int main()':
a.cc:67:25: error: 'memset' was not declared in this scope
67 | memset(dp[nxt], 0, sizeof(dp[nxt]));
| ^~~~~~
a.cc:19:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
18... |
s854455219 | p00482 | C++ | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <cfloat>
#include <ctime>
#include <cassert>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include... | a.cc:58:20: error: 'short int index [1048576]' redeclared as different kind of entity
58 | short index[1 << 20];
| ^
In file included from /usr/include/string.h:462,
from /usr/include/c++/14/cstring:43,
from a.cc:3:
/usr/include/strings.h:50:20: note: previo... |
s688291229 | p00482 | C++ | // JOI 2010-2011 予選6
#include<iostream>
const int mod = 100000;
int M, N;
char flag[20][20];
// dp[crt or nxt][直前N文字において隣接する2列の文字がJOか][直前の1つがJか(次にJOが来るか判定するため)]
int dp[2][1 << 20][2];
char JOI[4] = "JOI";
int main()
{
std::cin >> M >> N;
for( int i = 0; i != M; ++i )
for( int j = 0; j != N; ++j )
std::cin >> ... | a.cc: In function 'int main()':
a.cc:27:25: error: 'memset' was not declared in this scope
27 | memset( dp[nxt], 0, sizeof( dp[nxt] ) );
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
... |
s712342567 | p00482 | C++ | // JOI 2010-2011 予選6
#include<algorithm>
#include<iostream>
const int mod = 100000;
int M, N;
char flag[20][20];
// dp[crt or nxt][直前N文字において隣接する2列の文字がJOか][直前の1つがJか(次にJOが来るか判定するため)]
int dp[2][1 << 20][2];
char JOI[4] = "JOI";
int main()
{
std::cin >> M >> N;
for( int i = 0; i != M; ++i )
for( int j = 0; j != N; +... | a.cc: In function 'int main()':
a.cc:28:25: error: 'memset' was not declared in this scope
28 | memset( dp[nxt], 0, sizeof( dp[nxt] ) );
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
... |
s849094707 | p00482 | C++ | #include "stdio.h"
long long int dp[2][3][(1 << 20)];
long long int dp2[2][3][(1 << 20)];
char e[22][22];
int main()
{
int n,m;
scanf("%d %d",&n,&m);
for(int i = 0; i < m; i++)
{
scanf("%s",e[i]);
}
for(int i = 0; i < 2; i++)
{
for(int ii = 0; ii < 3; ii++)
{
for(int iii = 0; iii < (1 << n); iii++)
... | a.cc: In function 'int main()':
a.cc:58:29: error: 'i' was not declared in this scope
58 | switch(e[0][i])
| ^
a.cc:121:24: error: 'i' was not declared in this scope
121 | for(int j = 1; i < m; j++)
| ^
a.cc:427:17: error: expec... |
s266705413 | p00483 | C | #include <bits/stdc++.h>
char T[1005];
int sum[3][1005][1005];
int main() {
int m, n, k; scanf("%d%d%d", &m, &n, &k);
for (int i = 0; i < m; i++) {
scanf("%s", T);
for (int j = 0; j < n; j++) {
if (T[j] == 'J')sum[0][i][j]++;
else if (T[j] == 'O')sum[1][i][j]++;
else sum[2][i][j]++;
}
}
for (int i ... | main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
1 | #include <bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s451908832 | p00483 | C | #include<iostream>
#include<string>
using namespace std;
int J[1200][1200], O[1200][1200], I[1200][1200];
int H, W, Q; string S;
int main() {
cin >> H >> W >> Q;
for (int i = 1; i <= H; i++) {
cin >> S;
for (int j = 0; j < S.size(); j++) {
if (S[j] == 'J')J[i][j + 1]++;
if (S[j] == 'O')O[i][j + 1]++;
if ... | main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s890577518 | p00483 | C++ | 10 10
100
IJJOIIJOOJ
OIOOOJIIIJ
IJJOJOIIOI
JJJOJOOIJJ
JJJIIJOIJI
JIOJOOOIIJ
OJJIIOJJOI
OIOJIIJJJJ
IJOOOOOJJO
OIIJJJOIII
2 1 7 4
7 6 9 6
8 2 9 8
2 1 5 5
4 1 7 9
6 6 6 10
1 4 10 8
8 1 10 6
2 2 5 7
2 2 5 3
6 2 10 5
2 5 7 8
4 4 9 10
2 3 10 6
1 1 10 8
6 6 6 9
3 1 3 8
3 4 3 10
5 1 6 4
1 1 10 8
1 3 1 9
2 2 2 4
1 1 6 6
2 3 10 ... | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 10 10
| ^~
|
s183725300 | p00483 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
//#include <stack>
//#include <queue>
//#include <map>
#include <cmath>
#include <string>
//#include <sstream>
#include <iomanip>
//#include <complex>
//小数制度 cout << fixed << setprecision(5) << tmp << endl;
using namespace std;
#define ll long long
#define vv... | a.cc: In function 'int main()':
a.cc:35:24: error: 'str' was not declared in this scope; did you mean 'st'?
35 | cin >> str;
| ^~~
| st
|
s786199010 | p00483 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
//#include <stack>
//#include <queue>
//#include <map>
#include <cmath>
#include <string>
//#include <sstream>
#include <iomanip>
//#include <complex>
//小数制度 cout << fixed << setprecision(5) << tmp << endl;
using namespace std;
#define ll long long
#define vv... | a.cc: In function 'int main()':
a.cc:30:26: error: 'k' was not declared in this scope; did you mean 'kk'?
30 | cin >> h >> w >> k;
| ^
| kk
|
s611265660 | p00483 | C++ | 10 10
100
IJJOIIJOOJ
OIOOOJIIIJ
IJJOJOIIOI
JJJOJOOIJJ
JJJIIJOIJI
JIOJOOOIIJ
OJJIIOJJOI
OIOJIIJJJJ
IJOOOOOJJO
OIIJJJOIII
2 1 7 4
7 6 9 6
8 2 9 8
2 1 5 5
4 1 7 9
6 6 6 10
1 4 10 8
8 1 10 6
2 2 5 7
2 2 5 3
6 2 10 5
2 5 7 8
4 4 9 10
2 3 10 6
1 1 10 8
6 6 6 9
3 1 3 8
3 4 3 10
5 1 6 4
1 1 10 8
1 3 1 9
2 2 2 4
1 1 6 6
2 3 10 ... | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 10 10
| ^~
|
s586022094 | p00483 | C++ | #include<iostream>
#include<string>
using namespace std;
#define NMAX 999
#define MMAX 999
int main(){
int M,N;
int K;
int J[NMAX+1][MMAX+1]={0};
int O[NMAX+1][MMAX+1]={0};
int a,b,c,d;
string in;
cin>>M>>N;
cin>>K;
for(int i=1;i<=M;i++){
cin>>in;
for(int j=0;j<... | a.cc: In function 'int main()':
a.cc:26:33: error: 'I' was not declared in this scope
26 | else if(in[j]=='I') I[i][j+1]=1;
| ^
a.cc:34:13: error: 'I' was not declared in this scope
34 | I[i][j]+=I[i][j-1];
| ^
a.cc:42:13: error: 'I' ... |
s352417249 | p00483 | C++ | #include<bits/stdc++.h>
#define LL long long
using namespace std;
static const LL INF = 1LL<<60LL;
typedef pair<int,int> pii;
string Map[1010][1010];
int J[1010][1010],O[1010][1010],I[1010][1010];
int m,n,k;
int a,b,c,d;
int res_J,res_O,res_I;
int main(){
cin>>m>>n>>k;
for(int y=1;y<=m;++y){
for(int ... | a.cc: In function 'int main()':
a.cc:19:25: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char')
19 | if(Map[y][x]=='J'){
| ~~~~~~~~~^~~~~
| | |
| | char
... |
s720051996 | p00483 | C++ | #include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
template<class T>
using Table = vector<vector<T>>;
const ld eps=1e-9;
//// < "D:\D_Download\Visual Studio 2015\Projects\programing_contest_c++\Debug\a.txt"
int main() {
i... | a.cc: In function 'int main()':
a.cc:29:114: error: 'nums' was not declared in this scope; did you mean 'sums'?
29 | sums[i][j][k] += sums[i][j - 1][k] + sums[i - 1][j][k] - sums[i - 1][j - 1][k] + nums[i][j][k];
| ... |
s273039160 | p00483 | C++ | #include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
template<class T>
using Table = vector<vector<T>>;
const ld eps=1e-9;
//// < "D:\D_Download\Visual Studio 2015\Projects\programing_contest_c++\Debug\a.txt"
int main() {
i... | a.cc: In function 'int main()':
a.cc:29:114: error: 'nums' was not declared in this scope; did you mean 'sums'?
29 | sums[i][j][k] += sums[i][j - 1][k] + sums[i - 1][j][k] - sums[i - 1][j - 1][k] + nums[i][j][k];
| ... |
s250486675 | p00483 | C++ | #include <stdio.h>
int n,m,q,a,b,c,d,rui[1005][1005][3],ret[3];char f[1005][1005],e[3]={'J','O','I'};
int main(){
????????scanf("%d%d%d",&n,&m,&q);
????????for(int i=0;i<n;i++) scanf("%s",&f[i]);
????????for(int i=1;i<=n;i++) for(int j=1;j<=m;j++) for(int k=0;k<3;k++)
????????rui[i][j][k]=rui[i-1][j][k]+rui[i][j-1][k]-... | a.cc: In function 'int main()':
a.cc:4:1: error: expected primary-expression before '?' token
4 | ????????scanf("%d%d%d",&n,&m,&q);
| ^
a.cc:4:2: error: expected primary-expression before '?' token
4 | ????????scanf("%d%d%d",&n,&m,&q);
| ^
a.cc:4:3: error: expected primary-expression before '?' tok... |
s676845728 | p00483 | C++ | #include <bits/stdc++.h>
using namespace std;
#define loop(i,n) for(int i=1;i<=n;i++)
int jj[1002][1002];
int oo[1002][1002];
int ii[1002][1002];
int main(){
int m,n,k;
cin>>m>>n>>k;
char c;
loop(i,m)loop(j,n){
cin>>c;
jj[i][j]=jj[i-1][j]+jj[i][j-1]-jj[i-1][j-1];
oo[i][j]=oo[i-1][j]+oo[i][j-1]-oo[... | a.cc: In function 'int main()':
a.cc:22:11: error: conflicting declaration 'int c'
22 | int a,b,c,d;
| ^
a.cc:12:8: note: previous declaration as 'char c'
12 | char c;
| ^
|
s840844059 | p00483 | C++ | #include <iostream>
#include <cstdio>
#include <fstream>
#include <algorithm>
#include <vector>
#include <string>
#include <set>
#include <map>
#include <utility>
#include <stack>
#include <queue>
#include <sstream>
#include <fstream>
#include <cmath>
#include <cstring>
using namespace std;
#define int long long
const... | /tmp/ccytGWTN.o: in function `main':
a.cc:(.text+0x71): relocation truncated to fit: R_X86_64_PC32 against symbol `w' defined in .bss section in /tmp/ccytGWTN.o
a.cc:(.text+0x1b3): relocation truncated to fit: R_X86_64_PC32 against symbol `w' defined in .bss section in /tmp/ccytGWTN.o
a.cc:(.text+0x1dd): relocation tru... |
s855006595 | p00483 | C++ | #include <iostream>
#include <cstdio>
#include <fstream>
#include <algorithm>
#include <vector>
#include <string>
#include <set>
#include <map>
#include <utility>
#include <stack>
#include <queue>
#include <sstream>
#include <fstream>
#include <cmath>
#include <cstring>
using namespace std;
#define int long long
const... | /tmp/ccjasESf.o: in function `main':
a.cc:(.text+0x71): relocation truncated to fit: R_X86_64_PC32 against symbol `w' defined in .bss section in /tmp/ccjasESf.o
a.cc:(.text+0x1b3): relocation truncated to fit: R_X86_64_PC32 against symbol `w' defined in .bss section in /tmp/ccjasESf.o
a.cc:(.text+0x1dd): relocation tru... |
s408213538 | p00483 | C++ | #include <iostream>
#include <cstdio>
#include <fstream>
#include <algorithm>
#include <vector>
#include <string>
#include <set>
#include <map>
#include <utility>
#include <stack>
#include <queue>
#include <sstream>
#include <fstream>
#include <cmath>
#include <cstring>
using namespace std;
#define int long long
cons... | /tmp/cctLCG6G.o: in function `main':
a.cc:(.text+0x6b): relocation truncated to fit: R_X86_64_PC32 against symbol `w' defined in .bss section in /tmp/cctLCG6G.o
a.cc:(.text+0x19d): relocation truncated to fit: R_X86_64_PC32 against symbol `w' defined in .bss section in /tmp/cctLCG6G.o
a.cc:(.text+0x1c7): relocation tru... |
s850734768 | p00483 | C++ | #include<bits/stdc++.h>
using namespace std;
#define r(i,n) for(int i=0;i<n;i++)
string s[9999];
int h,w,dp[1002][10002][3],a,b,c,d,n;
main(){
cin>>h>>w>>n;
r(i,w+1)s[0]+='@';
r(i,h)cin>>s[i+1],s[i+1]='@'+s[i+1];
for(int i=1;i<=h;i++)
for(int j=1;j<=w;j++){
r(k,3)dp[i][j][k]+=dp[i][j-1][k];
if(s... | 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:21:34: error: expected ';' before 'a'
21 | scanf("%d%d%d%d",&a,&b,&c,&d)a--;b--;
| ^
| ... |
s744847556 | p00483 | C++ | #include "bits/stdc++.h"
using namespace std;
#define DEBUG(x) cout<<#x<<": "<<x<<endl;
#define DEBUG_VEC(v) cout<<#v<<":";for(int i=0;i<v.size();i++) cout<<" "<<v[i]; cout<<endl
typedef long long ll;
#define vi vector<int>
#define vl vector<ll>
#define vii vector< vector<int> >
#define vll vector< vector<ll> >
#defi... | a.cc: In function 'int main()':
a.cc:50:15: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
50 | Land z();
| ^~
a.cc:50:15: note: remove parentheses to default-initialize a variable
50 | Land z();
| ^~
| ... |
s415658399 | p00483 | C++ | ostream>
#include <cstdio>
#include <algorithm>
using namespace std;
int main(void) {
int M, N, K;
char res[1000][1000];
int xp, yp, xq, yq;
int J, O, I;
cin >> M >> N;
cin >> K;
for(int i = 0 ; i < M ; i++) {
scanf("%s", res[i]);
}
for(int a = 0 ; a < K ; a++) {
cin >> xp >> yp >> xq >> y... | a.cc:1:1: error: 'ostream' does not name a type
1 | ostream>
| ^~~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
from /usr/include/c++/14/algorithm:60,
from a.cc:3:
/usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu_cxx::_... |
s342474329 | p00483 | C++ | #include <iostream>
using namespace std;
int main(){
int m;
cin >>m;
int n;
cin >>n;
int k;
cin >>k;
int a[m][n];//上からm 左からnまでにあるJの個数
int b[m][n];//O
int c[m][n];//I
int j;//ある行においてマスまでに何個Jがあるか
int o;
int i;
char d;
int e;
int f;
e=0;
j=0;
o=0;
i=0;
while(e<n){
cin >>d;
if(d=="J"){j=j+1;}
if(d=="O"){o=o+1;}
if(d=="I"){... | a.cc: In function 'int main()':
a.cc:25:5: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
25 | if(d=="J"){j=j+1;}
| ~^~~~~
a.cc:26:5: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
26 | if(d=="O"){o=o+1;}
| ~^~~~~
a.cc:27:5: error: ISO ... |
s494956202 | p00483 | C++ | #include <cstdio>
int exist[1001][1001][3]={};
char field[1001][1001];
int m,n,Q;
int main(){
scanf("%d %d %d",&m,&n,&Q);
for(int i=0;i<m;i++){
scanf("%s",field[i]);
}
for(int i=0;i<m;i++){
for(int j=0;j<n;j++){
for(int g=i;g<m;g++){
for(int k=j;k<n;k++){
if(field[i][j]=='J'){
exist[g][k][0]+... | a.cc: In function 'int main()':
a.cc:30:2: error: expected '}' at end of input
30 | }
| ^
a.cc:5:11: note: to match this '{'
5 | int main(){
| ^
|
s660433176 | p00483 | C++ | #include <cstdio>
int joi2num(char c)
{
if(c == 'J') return 0;
if(c == 'O') return 1;
return 2;
}
int main()
{
int m, n, k;
char fld[1024][1024];
int sum[1024][1024][3];
scanf("%d%d%d", &m, &n, &k);
for(int x = 0; x < m; ++x)
scanf("%s", fld[x]);
for(int i = 0; i < 3; ++i)
sum[0][0][i] = (i == joi2num(fld[0][0]));
fo... | a.cc: In function 'int main()':
a.cc:24:16: error: 'x' was not declared in this scope
24 | for(int y = 1; x < n; ++y) {
| ^
a.cc:26:20: error: 'x0' was not declared in this scope
26 | sum[0][y][i] = sum[x0][y - 1][i] + (i == joi2num(fld[0][y]));
| ^~
|
s241525171 | p00483 | C++ | #include<cstdio>
#include<iostream>
#include<string>
#include<algorithm>
using namespace std;
char tt[1000][1000];
int jj[1000][1000];
int oo[1000][1000];
int ii[1000][1000];
int n, m , k;
void f(int, int);
int main(){
cin >> m >> n;
cin >> k;
for(int i = 0; i < m; i++){
scanf("%s", tt[i]);
}
for(int ... | a.cc: In function 'int main()':
a.cc:27:17: error: 'y1' was not declared in this scope
27 | while( cin >> y1 >> x1 >> y2 >> x2){
| ^~
a.cc:27:23: error: 'x1' was not declared in this scope
27 | while( cin >> y1 >> x1 >> y2 >> x2){
| ^~
a.cc:27:29: error: 'y2' ... |
s362734355 | p00483 | C++ | 12 7 5
0 2 1
5 6 3
10 6 4
16 11 9
1 2 2
15 19 16
5 7 6
10 9 5
6 1 1
7 6 7
6 9 9
16 14 12
13 16 7
29 27 24
0 2 2
3 2 3
1 3 3
5 1 2
29 27 24
2 3 2
0 2 1
16 12 8
15 21 9
5 3 2
1 1 4
12 13 10
2 1 2
5 4 3
3 0 6
7 12 5
1 1 0
3 4 1
1 6 5
12 9 7
3 2 3
17 15 10
15 13 12
5 8 5
0 1 1
4 5 5
10 9 5
14 11 11
12 16 7
4 4 4
1 2 3
2 1 ... | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 12 7 5
| ^~
|
s879859534 | p00483 | C++ | include<cstdio>
#include<iostream>
#include<algorithm>
#include<string>
using namespace std;
char c[1000][1000];
int d[1000][1000][3] = {{{0},{0}}};
const int J = 0;
const int O = 1;
const int I = 2;
int main(void){
int m, n, k;
cin >> m >> n >> k;
for(int i = 0; i < m; i++){
scanf("%s", c[i]);
}
for... | a.cc:1:1: error: 'include' does not name a type
1 | include<cstdio>
| ^~~~~~~
In file included from /usr/include/c++/14/iosfwd:42,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
fro... |
s833811692 | p00483 | C++ | #include <cstdio>
#include <algorithm>
using namespace std;
int field[1005][1005][3];
char field[1005][1005];
int n;
int w,h;
int main(){ | a.cc:5:6: error: conflicting declaration 'char field [1005][1005]'
5 | char field[1005][1005];
| ^~~~~
a.cc:4:5: note: previous declaration as 'int field [1005][1005][3]'
4 | int field[1005][1005][3];
| ^~~~~
a.cc: In function 'int main()':
a.cc:8:12: error: expected '}' at end of input
... |
s619249563 | p00483 | C++ | #include <cstdio>
#include <algorithm>
using namespace std;
int rui[1005][1005][3]={};
char field[1005][1005];
int n;
int w,h;
int main(){
scanf("%d %d",&w,&h);
scanf("%d",&n);
for(int i=1;i<=w;i++){
scanf("%s",&field[i]);
}
for(int i=1;i<=w;i++){
for(int j=h;j>=1;j--){
field[i][j]=field[i][j-1]... | a.cc: In function 'int main()':
a.cc:22:51: error: invalid operands of types 'int' and 'int [3]' to binary 'operator-'
22 | rui[i][j][0]=rui[i][j-1][0]+rui[i-1][j][0]-rui[i-1][j-1];
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
| | ... |
s893125811 | p00483 | C++ | #include<cstdio>
int d[3][1002][1002], N, M, K;
int main()
{
char buf[1024];
scanf("%d%d%d", &N, &M, &K);
for (int i = 1; i <= N; i++) {
scanf("%s", buf + 1);
for (int j = 1; j <= M; j++) {
for (int k = 0; k < 3; k++) {
... | a.cc: In function 'int main()':
a.cc:31:17: error: 'k' was not declared in this scope
31 | k?puts(""):0;
| ^
|
s631017147 | p00483 | C++ | #include<cstdio>
int d[3][1002][1002], N, M, K;
int main()
{
char buf[1024];
scanf("%d%d%d", &N, &M, &K);
for (int i = 1; i <= N; i++) {
scanf("%s", buf + 1);
for (int j = 1; j <= M; j++) {
for (int k = 0; k < 3; k++) {
... | a.cc: In function 'int main()':
a.cc:31:20: error: 'k' was not declared in this scope
31 | if(k)puts("");
| ^
|
s280267428 | p00483 | C++ | #include<cstdio>
int d[3][1002][1002], N, M, K;
int main()
{
char buf[1024];
scanf("%d%d%d", &N, &M, &K);
for (int i = 1; i <= N; i++) {
scanf("%s", buf + 1);
for (int j = 1; j <= M; j++) {
for (int k = 0; k < 3; k++) {
... | a.cc:29:39: error: empty character constant
29 | putchar(i?' ':'');printf("%d", d[i][y2][x2] - d[i][y1-1][x2] - d[i][y2][x1-1] + d[i][y1-1][x1-1]);
| ^~
|
s250803900 | p00483 | C++ | #include<cstdio>
int d[3][1002][1002], N, M, K;
int main()
{
char buf[1024];
scanf("%d%d%d", &N, &M, &K);
for (int i = 1; i <= N; i++) {
scanf("%s", buf + 1);
for (int j = 1; j <= M; j++) {
for (int k = 0; k < 3; k++) {
... | a.cc: In function 'int main()':
a.cc:29:39: error: expected ':' before ';' token
29 | i?putchar(' ');printf("%d", d[i][y2][x2] - d[i][y1-1][x2] - d[i][y2][x1-1] + d[i][y1-1][x1-1]);
| ^
| :
a.cc:29:39: err... |
s183125732 | p00484 | C++ | #include<iostream>
#include<vector>
#include<string>
#include<algorithm>
using namespace std;
int main() {
int n, k;
cin >> n>>K;
vector<vector<int> > pr(10, vector<int>(n+1,0));
vector<int> ko(10, 0);
for (int i = 0; i < n; i++) {
int c, g; cin >> c >> g;
g--;
pr[g][ko[g]] = c;
ko[g]++;
}
for (int i = 0... | a.cc: In function 'int main()':
a.cc:8:19: error: 'K' was not declared in this scope
8 | cin >> n>>K;
| ^
|
s609574940 | p00484 | C++ | #include <bits/stdc++.h>
#define FOR(i,a,b) for(int i= (a); i<((int)b); ++i)
#define RFOR(i,a) for(int i=(a); i >= 0; --i)
#define FOE(i,a) for(auto i : a)
#define ALL(c) (c).begin(), (c).end()
#define RALL(c) (c).rbegin(), (c).rend()
#define DUMP(x) cerr << #x << " = " << (x) << endl;
#define SUM(x) std::accumulate(... | a.cc: In function 'int main()':
a.cc:83:43: error: no matching function for call to 'max(__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type&, LL)'
83 | dp2[kind + 1][i + j] = max(dp2[kind + 1][i + j], dp2[kind][i] + price);
| ~~~^~~~~~~~~~~~~~... |
s990147857 | p00484 | C++ | #include <bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(),(x).end()
#define rep(i, n) for (int i = 0; i < (n); i++)
#define chmin(x, y) (x) = min((x), (y))
#define chmax(x, y) (x) = max((x), (y))
#define endl "\n"
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
template <typ... | a.cc: In function 'void solve()':
a.cc:7:30: error: no matching function for call to 'max(__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type&, long long int)'
7 | #define chmax(x, y) (x) = max((x), (y))
| ~~~^~~~~~~~~~
a.cc:46:17: note: in expansion of macro 'chmax'
4... |
s252715915 | p00484 | C++ | #include <stdio.h>
int dp[2 << 10][2001];
int books[10][2001];
int book_nums[10];
int sell_prices[10][2001];
int greater_int(const void *a, const void *b) {
return *(int*)b - *(int*)a;
}
int main() {
int a, b, c, d;
int n, k;
int book_bits;
int max;
scanf("%d %d", &n, &k);
for (a=0; a<n;... | a.cc: In function 'int main()':
a.cc:31:9: error: 'qsort' was not declared in this scope
31 | qsort(books[a], book_nums[a], sizeof(int), greater_int);
| ^~~~~
|
s130013144 | p00484 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
struct books
{
int n;
int j;
};
int n;
int k;
vector<books> bok;
int memo[2100][2100][2];
int jj[2100][2100][2][11] = {};
int check(int now,int w,int use)
{
if (now == n)return 0;
if (w > k)return 0;
//if (memo[now][w][use] != -1)return m... | a.cc: In function 'int main()':
a.cc:41:9: error: 'memset' was not declared in this scope
41 | memset(memo, -1, sizeof(memo));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include<algorithm>
+++ |+#include... |
s106472419 | p00484 | C++ | ???#include<iostream>
#include<cstdio>
#include<vector>
#include<algorithm>
using namespace std;
int N, K;
vector<int>G[10];
vector<int>Gsum[10];
int dp[10][2000];
int main()
{
scanf("%d%d", &N, &K);
for (int i = 0; i < N; i++){
int A, B;
scanf("%d%d", &A, &B);
G[B - 1].push_back(A);
}
for (int i = 0; i < 10;... | a.cc:1:4: error: stray '#' in program
1 | ???#include<iostream>
| ^
a.cc:1:1: error: expected unqualified-id before '?' token
1 | ???#include<iostream>
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
from /usr/include/c++/14/vector:62,
from ... |
s346805085 | p00484 | C++ | //Solution for aoj 0561:Books
#include <iostream>
#include <algorithm>
#include <functional>
#include <queue>
using namespace std;
int n, k, a[11], fir[11], i, j, ma, num, ans, save[2001][2], sum;
int books[2001][3], books2[2001][11], books3[2001], books4[11];
void solve(int i){
for (i; i <= k; i++){
ma = 0;
for (... | a.cc: In function 'int main()':
a.cc:68:18: error: a function-definition is not allowed here before '{' token
68 | void solve(int i){
| ^
a.cc:91:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
91 | int main(){
| ^~
a.cc:91:9: note: ... |
s699839191 | p00484 | C++ | #include <stack>
using namespace std;
int n, k, a[11], fir[11], i, j, save[11], sum, sum2, roop[11], mini;
stack <int>st[11];
int books[2001][3], books2[2001], books3[2001], books4[11];
int main(){
cin >> n >> k;
sum = 0;
for (i = 1; i <= 10; i++)
st[i].push(0);
for (i = 1; i <= n; i++){
cin >> books[i][0] >> b... | a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope
7 | cin >> n >> k;
| ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
1 | #include <stack>
+++ |+#include <iostream>
2 | usi... |
s729249279 | p00484 | C++ | #include<bits/stdc++.h>
#define int long long
#define FOR(i,a,b) for(int i=a;i<=b;++i)
static const int INF = 1<<50;
static const int mod = 10007;
using namespace std;
int N,K,C[100010],G[11];
int mem[2020][11][11];
int cal(int n,int pp,int conect){
int res=0;
if(mem[n][pp][num]!=0)return mem[n][pp][num];
... | a.cc:4:25: warning: left shift count >= width of type [-Wshift-count-overflow]
4 | static const int INF = 1<<50;
| ~^~~~
a.cc: In function 'long long int cal(long long int, long long int, long long int)':
a.cc:14:19: error: 'num' was not declared in this scope; did you mean 'enum'?
1... |
s200555134 | p00484 | C++ | #include <bits/stdc++.h>
#define FOR(i,n) for(int i=0;i<(int)(n);i++)
#define FORR(i,m,n) for(int i=(int)(m);i<(int)(n);i++)
#define pb(a) push_back(a)
#define mp(x,y) make_pair(x,y)
#define ALL(a) a.begin(),a.end()
#define ZERO(a) memset(a,0,sizeof(a))
#define len(a) sizeof(a)
#define ll long long
#define pii pair<int... | a.cc: In function 'void solve()':
a.cc:31:9: error: 'v' was not declared in this scope
31 | FOR(j,v[i].size()){
| ^
a.cc:2:38: note: in definition of macro 'FOR'
2 | #define FOR(i,n) for(int i=0;i<(int)(n);i++)
| ^
|
s086530817 | p00484 | C++ | #include <bits/stdc++.h>
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define RFOR(i,a,b) for(int i=(b) - 1;i>=(a);i--)
#define REP(i,n) for(int i=0;i<(n);i++)
#define RREP(i,n) for(int i=n-1;i>=0;i--)
#define PB push_back
#define INF (1<<29)
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
... | a.cc: In function 'int main()':
a.cc:24:12: error: 'dp' was not declared in this scope; did you mean 'dy'?
24 | memset(dp,-1,sizeof(dp));
| ^~
| dy
|
s491425374 | p00484 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
#include <functional>
int n, k;
std::vector<int> cat[10];
int dp[11][2010];
int main() {
for(int i = 0; i < 10; ++i) {
cat[i].push_back(0);
}
std::cin >> n >> k;
for(int i = 0; i < n; ++i) {
int a, b;
std::cin >> a >>... | a.cc: In function 'int main()':
a.cc:26:5: error: 'memset' was not declared in this scope
26 | memset(dp, -1, sizeof(dp));
| ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include <functional>
+++ |+#include <cstring>... |
s923078194 | p00484 | C++ | #include<bits/stdc++.h>
using namespace std;
int dp[11][2001],n,K,a1,a2;
vector<int>v[11];
main(){
cin>>n>>K;
r(i,n){
cin>>a1>>a2;
v[a2-1].push_back(a1);
}
r(i,10){
sort(v[i].begin(),v[i].end(),greater<int>());
r(j,v[i].size())if(j)v[i][j]+=v[i][j-1]+j;
}
r(i,10){r(j,K+1)
for(int k=0;k<v... | a.cc:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
5 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:7:5: error: 'i' was not declared in this scope
7 | r(i,n){
| ^
a.cc:7:3: error: 'r' was not declared in this scope
7 | r(i,n){
| ^
|
s254634974 | p00484 | C++ | #include<bits/stdc++.h>
#define r(I,n) for(int I=0;i<n;i++)
#define int long long
using namespace std;
int dp[11][2001],n,K,a1,a2;
vector<int>v[11];
main(){
cin>>n>>K;
r(i,n){
cin>>a1>>a2;
v[a2-1].push_back(a1);
}
r(i,10){
sort(v[i].begin(),v[i].end(),greater<int>());
r(j,v[i].size())if(j)v[i][j... | a.cc:7:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
7 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:21:13: error: 'j' was not declared in this scope
21 | dp[i+1][j]=max(dp[i+1][j],dp[i][j]);
| ^
|
s836737725 | p00484 | C++ | #include<bits/stdc++.h>
#define r(I,n) for(int I=0;i<n;i++)
#define int long long
using namespace std;
int dp[11][2001],n,K,a1,a2;
vector<int>v[11];
main(){
cin>>n>>K;
r(i,n){
cin>>a1>>a2;
v[a2-1].push_back(a1);
}
r(i,10){
sort(v[i].begin(),v[i].end(),greater<int>());
r(j,v[i].size())if(j)v[i][j... | a.cc:7:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
7 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:24:2: error: expected '}' at end of input
24 | }
| ^
a.cc:7:7: note: to match this '{'
7 | main(){
| ^
|
s760199437 | p00484 | C++ | int main(){
int n,k;
cin>>n>>k;
int c,g,dp[2001];
vector<int> bks[11];
for(int i=0;i<n;++i){
cin>>c>>g;
bks[g-1].push_back(c);
}
for(int i=0;i<10;++i){
sort(bks[i].begin(),bks[i].end(),greater<int>());
}
memset(dp,-1,sizeof(dp));
dp[0]=0;
for(int i=0;i... | a.cc: In function 'int main()':
a.cc:3:5: error: 'cin' was not declared in this scope
3 | cin>>n>>k;
| ^~~
a.cc:5:5: error: 'vector' was not declared in this scope
5 | vector<int> bks[11];
| ^~~~~~
a.cc:5:12: error: expected primary-expression before 'int'
5 | vector<int> bks... |
s006189977 | p00484 | C++ | #include <cstdio>
#include <vector>
#include <algorithm>
using namespace std;
int n, k;
vector<int> c[10];
int memo[10][5000];
int calc(int g, int b)
{
int ret = 0;
if(b == 0) return 0;
if(g == 0) {
for(int i = 0; i < b; ++i)
ret += c[g][i];
return ret;
}
if(memo[b][g] != -1)
return memo[b][g];
int ... | a.cc: In function 'int calc(int, int)':
a.cc:30:26: error: expected ',' before '-' token
30 | sum += [i - 1];
| ^~
| ,
a.cc:30:27: error: expected identifier before '-' token
30 | sum += [i - 1];
| ... |
s370617134 | p00484 | C++ | #include <cstdio>
#include <cstdlib>
#include <vector>
#include <algorithm>
using namespace std;
int n, k;
vector<int> c[10];
int memo[10][5000];
int calc(int g, int b)
{
int ret = 0;
if(b == 0) return 0;
if(g == 0) {
for(int i = 0; i < b; ++i)
ret += c[g][i];
return ret;
}
if(memo[b][g] != -1)
return... | a.cc: In function 'int calc(int, int)':
a.cc:31:21: error: no match for 'operator+=' (operand types are 'int' and 'std::vector<int>')
31 | sum += c[i - 1];
| ~~~~^~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:41:9: error: 'memset' was not declared in this scope
41 | ... |
s779201788 | p00484 | C++ | #include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
#define reps(i,j,n) for(int i = j ; i < n ; ++i)
#define rep(i,n) reps(i,0,n)
vector<int> book[10];
int dp[11][2001],n,k;
int solve(int ct,int ja){
if(ct >= k || ja > 10) return 0;
if(dp[ja][ct]!=-1) return dp[ja][ct];
int res = solve(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
|
s842135010 | p00484 | C++ | #include <iostream>
#include <numeric>
#include <algorithm>
#include <functional>
#include <vector>
using namespace std;
int N, K;
vector<int> books[16];
int memo[16][2048];
int rec(int i, int used)
{
if(memo[i][used] != -1) return memo[i][used];
if(i == N) return 0;
int best = 0;
for(int t = 0; t < books... | a.cc: In function 'int main()':
a.cc:32:3: error: 'memset' was not declared in this scope
32 | memset(memo, -1, sizeof memo); // memoを全て-1で初期化 この関数は-1以外では0でしか初期化出来ないので注意
| ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #incl... |
s987152016 | p00484 | C++ | include <iostream>
#include <map>
#include <algorithm>
#define fr first
#define sc second
using namespace std;
int n,k;
typedef pair<int,int> P;
int dp[2001][11];
P book[2001];
int rec(int idx,int sta){
if(idx == n) return 0;
if(dp[idx][sta]) return dp[idx][sta];
int res = 0;
if(sta < k) res = rec(idx+1,sta+1... | a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
from /usr/include/c++/14/bits/stl_tree.h:63,
from /usr/include/c++/14/map:62,
from a.cc:2:
/usr/include/c++/14/e... |
s061904905 | p00484 | C++ | #include<iostream>
#include<vector>
#include<functional>
using namespace std;
int main(){
int N,K,C,G,dp[11][2001]={};
vector<int> type[10],price[10];
cin>>N>>K;
for(int i=0;i<N;i++){
cin>>C>>G;
type[--G].push_back(C);
// cout<<type[G][i]<<endl;
}
for(int i=0;i<10;i++){
sort(type[i].begi... | a.cc: In function 'int main()':
a.cc:17:5: error: 'sort' was not declared in this scope; did you mean 'short'?
17 | sort(type[i].begin(),type[i].end(),greater<int>());
| ^~~~
| short
a.cc:20:27: error: invalid use of member function 'std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc... |
s454425200 | p00484 | C++ | #include<iostream>
#include<queue>
using namespace std;
int N,K;
priority_queue<int,vector<int>,greater<int>> book[11]; //book[i]には、ジャンルiの本の価格が昇順で入っている。
int size[11] = {0};
int main(){
int i,j;
int data,topic;
int sum = 0;
cin >> N >> K;
for(i = 0;i < N;i++){
cin >> data >> topic;
sum += data;
book[topic].... | a.cc: In function 'int main()':
a.cc:18:17: error: reference to 'size' is ambiguous
18 | size[topic]++;
| ^~~~
In file included from /usr/include/c++/14/string:53,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/... |
s972611872 | p00484 | C++ | #include<iostream>
#include<queue>
using namespace std;
int N,K;
//book[i]には、ジャンルiの本の価格が昇順で入っている。
priority_queue<int,vector<int>,greater<int>> book[11];
int size[11] = {0};
int main(){
int i,j;
int data,topic;
int sum = 0;
cin >> N >> K;
for(i = 0;i < N;i++){
cin >> data >> topic;
sum += data;
book[topic]... | a.cc: In function 'int main()':
a.cc:19:17: error: reference to 'size' is ambiguous
19 | size[topic]++;
| ^~~~
In file included from /usr/include/c++/14/string:53,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/... |
s424528314 | p00485 | Java | import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.math.BigInteger;
public class Main{
static PrintWriter out... | Main.java:34: error: ';' expected
md[i]=1<<27
^
1 error
|
s826509371 | p00485 | C++ | #include <iostream>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <vector>
#include <string>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <algorithm>
using namespace std;
#define rep(i,j) REP((i), 0, (j))
#define REP(i,j,k) for(int i=(j);(i)<(k);++i)
#d... | a.cc:1:1: error: stray '\20' in program
1 | <U+0010>#include <iostream>
| ^~~~~~~~
a.cc:1:2: error: stray '#' in program
1 | #include <iostream>
| ^
a.cc:1:3: error: 'include' does not name a type
1 | #include <iostream>
| ^~~~~~~
In file included from /usr/include/c++/14/cmath:45,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.