submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s381327559 | p00458 | C++ | #include <cstdio>
#include <cstdlib>
#include <iostream>
#include <string>
#include <cmath>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>
typedef long long ll;
using namespace std;
bool kaku[90][90],kouri[90][90];
int dfs(int a,int b){
int re=0;
... | a.cc: In function 'void solve(int, int)':
a.cc:61:12: error: return-statement with a value, in function returning 'void' [-fpermissive]
61 | return 0;
| ^
|
s397081669 | p00458 | C++ | #include <cstdio>
#include <cstdlib>
#include <iostream>
#include <string>
#include <cmath>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>
typedef long long ll;
using namespace std;
int dfs(int a,int b){
int re=0;
bool kaku[90][90]={0},kouri[90][90]={0}... | a.cc: In function 'void solve(int, int)':
a.cc:50:17: error: 'kouri' was not declared in this scope
50 | kouri[i][j]=true;
| ^~~~~
|
s340937317 | p00458 | C++ | #include <cstdio>
#include <cstdlib>
#include <iostream>
#include <string>
#include <cmath>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>
typedef long long ll;
using namespace std;
bool kaku[90][90],kouri[90][90];
int dfs(int a,int b){
int re=0;
if(k... | a.cc: In function 'int dfs(int, int)':
a.cc:26:5: error: 'me' was not declared in this scope; did you mean 're'?
26 | me=dfs(a-1,b);
| ^~
| re
|
s645843971 | p00458 | C++ | #include <cstdio>
#include <cstdlib>
#include <iostream>
#include <string>
#include <cmath>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>
typedef long long ll;
using namespace std;
bool kaku[90][90],kouri[90][90];
int dfs(int a,int b){
int re=0;
if(k... | a.cc: In function 'int dfs(int, int)':
a.cc:26:5: error: 'me' was not declared in this scope; did you mean 're'?
26 | me=dfs(a-1,b);
| ^~
| re
|
s807659881 | p00458 | C++ | #include <stdio.h>
#include <stdlib.h>
int d0,d1,d2,d3,dmax,x,y;
int board[92][92];
int Search(x, y){
if(board[x][y]==0) return 0;
board[x][y]=0;
d0=Search((x-1),y);
dmax=d0;
d1=Search((x+1),y);
if(dmax<d1) dmax=d1;
d2=Search(x,(y-1));
if(dmax<d2) dmax=d2;
d3=Search(x,(y+1));
if(dmax<d3) dmax=d3;
b... | a.cc:8:16: error: expression list treated as compound expression in initializer [-fpermissive]
8 | int Search(x, y){
| ^
a.cc:8:17: error: expected ',' or ';' before '{' token
8 | int Search(x, y){
| ^
a.cc: In function 'int main()':
a.cc:40:41: error: 'Search' cannot ... |
s843674235 | p00458 | C++ | // JOI4.cpp : ??????????????? ??¢????????±????????§????????¨????????? ?????????????????????????????????
//
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stack>
using namespace std;
stack<int> st_i, st_j;
int m, n, lake[90][90], come, max = 0;
bool visit[90][90];
void search(int y, int x) {
st_i.push(y... | a.cc: In function 'void search(int, int)':
a.cc:40:13: error: reference to 'max' is ambiguous
40 | if (max < come) {
| ^~~
In file included from /usr/include/c++/14/deque:62,
from /usr/include/c++/14/stack:62,
from a.cc:5:
/usr/include/c++/14/bits/stl_algob... |
s375799825 | p00458 | C++ | #define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stack>
using namespace std;
stack<int> st_i, st_j;
int m, n, lake[90][90], come, max = 0;
bool visit[90][90];
void search(int y, int x) {
st_i.push(y);
st_j.push(x);
if ((x < m && lake[y][x + 1] == 1) && visit[y][x + 1] == false) {
come++;
visit[y][... | a.cc: In function 'void search(int, int)':
a.cc:38:13: error: reference to 'max' is ambiguous
38 | if (max < come) {
| ^~~
In file included from /usr/include/c++/14/deque:62,
from /usr/include/c++/14/stack:62,
from a.cc:3:
/usr/include/c++/14/bits/stl_algob... |
s389432678 | p00458 | C++ | 10
10
1 1 0 0 0 1 0 0 1 1
1 0 0 0 1 1 1 1 0 0
0 0 0 0 0 0 0 0 0 0
1 0 0 0 1 1 0 1 0 1
0 0 1 1 0 0 0 1 1 1
0 1 1 0 1 0 1 0 0 0
0 1 1 1 0 0 0 1 1 0
1 0 1 0 1 1 0 1 1 0
0 0 0 1 0 0 1 0 0 0
0 0 0 0 0 1 0 0 1 1 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 10
| ^~
|
s316820291 | p00458 | C++ | #include <queue>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
// ------ Class ------ //
class Graph1 {
public:
// ------ Variables ------ //
static const int INF = 1000000000;
int V, E; vector<vector<int> > G;
// ------ Constructors ------ //
Graph1() : V(0), E(0), G(vector<vec... | a.cc: In function 'int main()':
a.cc:67:84: error: no matching function for call to 'max(std::vector<int>&, int&)'
67 | for(int i = 0; i < H * W; i++) vector<int> v = G.dist(i), ret = max(ret, *max_element(v.begin(), v.end()));
| ... |
s208663999 | p00458 | C++ | #include <iostream>
using namespace std;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
int m, n;
bool tront[90][90];
int dfs(int y, int x) {
int dx[4] = {0,1,0,-1}, dy[4] = {1,0,-1,0};
int rep = 0;
tront[ny][nx] = false;
REP(i, 4) {
int nx = x + dx[i], ny = y + dy[i];
if (! (nx >=... | a.cc: In function 'int dfs(int, int)':
a.cc:15:15: error: 'ny' was not declared in this scope; did you mean 'dy'?
15 | tront[ny][nx] = false;
| ^~
| dy
a.cc:15:19: error: 'nx' was not declared in this scope; did you mean 'dx'?
15 | tront[ny][nx] = false;
... |
s122842760 | p00458 | C++ | 3
3
1 1 0
1 0 1
1 1 0
5
3
1 1 1 0 1
1 1 0 0 0
1 0 0 0 1
0
0 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 3
| ^
|
s727673571 | p00458 | C++ | #include <iostream>
#include <algorithm>
#include <queue>
#include <stack>
#include <utility>
#define INF 1000000000
using namespace std;
typedef pair<int, int> pa;
typedef pair<int, pa> pp;
int M, N;
int ary[100][100], dp[100][100];
bool tay[100][100];
int dxy[5] = { 0,1,0,-1,0 };
int dfs(int dis,int y, int x) {
ta... | a.cc: In function 'int dfs(int, int, int)':
a.cc:22:50: error: 'axx' was not declared in this scope; did you mean 'xx'?
22 | if (1 <= yy&&yy <= N && 1 <= xx&&axx <= M && (!tay[yy][xx]) && (ary[yy][xx])) {
| ^~~
| ... |
s784305507 | p00458 | C++ | #include<stdio.h>
#include<string.h>
#include<stdlib.h>
int InputIce[90][90];
int Ice[92][92];
int way=0;
int height; //???
int width; //??¨?
int count=0,count_z=0;
void Check(int a,int b,int count_z){
//a:height,b:width
//?????????count++??????
count_z++;
//????????????
Ice[a][b]=0;
... | a.cc: In function 'int main()':
a.cc:46:31: error: break statement not within loop or switch
46 | if(width==0 && height==0) break;
| ^~~~~
|
s366043097 | p00458 | C++ | #include <iostream>
#include <algorithm>
#include<cstdio>
#include<string>
#include<vector>
#include<map>
#include<stack>
#include<queue>
using namespace std;
int check(int b[92][92], int x, int y, int s);
int max;
int main() {
int m,n;
max = 0;
cin >> m >> n;
int a[92][92] = { 0 };
for (int i = 1; i <= n; i++) {
... | a.cc: In function 'int main()':
a.cc:14:9: error: reference to 'max' is ambiguous
14 | max = 0;
| ^~~
In file included from /usr/include/c++/14/algorithm:61,
from a.cc:2:
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidates are: 'template<class _Tp, class _Compare> cons... |
s234256555 | p00458 | 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:37:16: error: redefinition of 'int dx [4]'
37 | int d[90][90], dx[4] = { 1,-1,0,0 }, dy[4] = { 0,0,1,-1 }, h, w;
| ^~
a.cc:27:5: note: 'int dx [4]' previously defined here
27 | int dx[4] = { 0,1,0,-1 }, dy[4] = { 1,0,-1,0 };
| ^~
a.cc:37:38: error: redefinition of 'int dy [4]'
... |
s010741706 | p00458 | C++ | #include<stdio.h>
#include<iostream>
#include<algorithm>
#include<stack>
#include<string.h>
using namespace std;
struct DDD{
int x,y,c;
};
int main(){
while(1)
int i,j,n,m,p[92][92]={0},ans=0,xm[4]={1,-1,0,0},ym[4]={0,0,1,-1},l;
DDD d;
stack<DDD> zect;
scanf("%d%d",&m,&n);
if(n==0&&m==0)break;
for(i=1;i<=n;i++){
for(j=... | a.cc: In function 'int main()':
a.cc:15:15: error: 'm' was not declared in this scope
15 | scanf("%d%d",&m,&n);
| ^
a.cc:15:18: error: 'n' was not declared in this scope
15 | scanf("%d%d",&m,&n);
| ^
a.cc:16:15: error: break statement not within loop or switch
16 | if... |
s706020547 | p00458 | C++ | #include <stdio.h>
#include <stdlib.h>
int d0,d1,d2,d3,dmax,x,y;
int board[92][92];
int Search(x,y){
if(board[x][y]==0) return 0;
board[x][y]=0;
d0=Search((x-1),y);
dmax=d0;
d1=Search((x+1),y);
if(dmax<d1) dmax=d1;
d2=Search(x,(y-1));
if(dmax<d2) dmax=d2;
d3=Search(x,(y+1));
if(dmax<d3) dmax=d3;
bo... | a.cc:8:15: error: expression list treated as compound expression in initializer [-fpermissive]
8 | int Search(x,y){
| ^
a.cc:8:16: error: expected ',' or ';' before '{' token
8 | int Search(x,y){
| ^
a.cc: In function 'int main()':
a.cc:41:41: error: 'Search' cannot be u... |
s590738014 | p00458 | C++ | #include <stdio.h>
#include <stdlib.h>
int d0,d1,d2,d3,dmax,x,y;
int board[92][92];
int Search(x,y){
if(board[x][y]==0) return 0;
board[x][y]=0;
d0=Search((x-1),y);
dmax=d0;
d1=Search((x+1),y);
if(dmax<d1) dmax=d1;
d2=Search(x,(y-1));
if(dmax<d2) dmax=d2;
d3=Search(x,(y+1));
if(dmax<d3) dmax=d3;
bo... | a.cc:8:15: error: expression list treated as compound expression in initializer [-fpermissive]
8 | int Search(x,y){
| ^
a.cc:8:16: error: expected ',' or ';' before '{' token
8 | int Search(x,y){
| ^
a.cc: In function 'int main()':
a.cc:41:41: error: 'Search' cannot be u... |
s106141616 | p00458 | C++ |
import java.util.*;
import static java.lang.Math.*;
import static java.util.Arrays.*;
public class Main {
int INF = 1 << 28;
int w, h;
boolean[][] map;
int cnt;
int max;
void run() {
Scanner sc = new Scanner(System.in);
for(;;) {
int w = sc.nextInt();
int h = sc.nextInt();
if( (w|h) == 0 ) break... | a.cc:2:1: error: 'import' does not name a type
2 | import java.util.*;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
3 | import static java.lang.Math.*;
| ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-... |
s551482955 | p00458 | C++ | #include<cstdio>
#include<stack>
#include<queue>
#include<cstdlib>
#include<algorithm>
#include<string>
#include<cstring>
using namespace std;
int cell[100][100];
int dx[] = {1, 0, 0, -1};
int dy[] = {0, 1, -1, 0};
int n,m;
int ans;
void debug(){
puts("");
for(int i = 0; i < m; i++){
for(int j = 0; j < n; j++)... | a.cc: In function 'void func(int, int, int)':
a.cc:31:44: error: expected primary-expression before '<' token
31 | if(x+dx[i] = 0 && x+dx[i] =< n && y+dy[i] > 0 && y+dy[i]<=m && cell[x+dx[i]][y+dy[i]]){
| ^
|
s873307667 | p00458 | C++ | /*****include*****/
#include <iostream>
#include <fstream>
/*****デバッグ定義*****/
//#define DEBUG
/*****マクロ定義*****/
/*****名前空間*****/
using namespace std;
/*****グローバル変数置き場*****/
int Field[91][91];
bool Visited[91][91];
static int g_num = 0;
static int g_max_num = 0;
/*****その他関数置き場*****/
void dfs(int sx,int sy){
const in... | a.cc:33:1: error: '::main' must return 'int'
33 | void main(){
| ^~~~
|
s805062963 | p00458 | C++ | #include <cstdio>
#include <algorithm>
#include <queue>
using namespace std;
typedef pair<int,int> p;
int main(){
int x[90][90];
int y[90][90]={},max=0,themax=0,ax,ay,m,n;
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};
queue<p>que;
scanf("%d%d",&m,&n);
for(int i=0;i<n;i++){
for(int j=0;j<m;j++){
scanf("%d",&x[i][j]);
}}
f... | a.cc: In function 'int main()':
a.cc:20:13: error: 'class std::queue<std::pair<int, int> >' has no member named 'clear'
20 | que.clear();
| ^~~~~
|
s489850590 | p00458 | C++ | #include <cstdio>
#include <algorithm>
#include <queue>
using namespace std;
typedef pair<int,int> p;
int main(){
while(1){
int x[90][90];
int y[90][90]={},max=0,themax=0,ax,ay,m,n;
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};
queue<p>que;
scanf("%d%d",&m,&n);
if(m==0) break;
for(int i=0;i<n;i++){
for(int j=0;j<m;j++){... | a.cc: In function 'int main()':
a.cc:44:2: error: expected '}' at end of input
44 | }
| ^
a.cc:6:11: note: to match this '{'
6 | int main(){
| ^
|
s474425676 | p00458 | C++ | #include <cstdio>
#include <algorithm>
#include <queue>
using namespace std;
typedef pair<int,int> p;
int main(){
int x[90][90];
int y[90][90]={},max=0,themax=0,ax,ay,m,n;
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};
queue<p>que;
fscanf(infile,"%d%d",&m,&n);
for(int i=0;i<n;i++){
for(int j=0;j<m;j++){
scanf("%d",&x[i][... | a.cc: In function 'int main()':
a.cc:13:8: error: 'infile' was not declared in this scope; did you mean 'inline'?
13 | fscanf(infile,"%d%d",&m,&n);
| ^~~~~~
| inline
|
s478512660 | p00458 | C++ | #include <cstdio>
#include <algorithm>
#include <queue>
using namespace std;
typedef pair<int,int> p;
int main(){
int x[90][90];
int y[90][90]={},max=0,themax=0,ax,ay,m,n;
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};
queue<p>que;
fscanf(infile,"%d%d",&m,&n);
for(int i=0;i<n;i++){
for(int j=0;j<m;j++){
scanf("%d",&x[i][... | a.cc: In function 'int main()':
a.cc:13:8: error: 'infile' was not declared in this scope; did you mean 'inline'?
13 | fscanf(infile,"%d%d",&m,&n);
| ^~~~~~
| inline
|
s664511819 | p00458 | C++ | #include<cstdio>
#include<cctype>
#include<iostream>
#include<algorithm>
using namespace std;
bool ice[100][100];
int dx[4]={0,1,0,-1};
int dy[4]={-1,0,1,0};
int n,m;
int bre(int x,int y,int c);
int main(){
int i,j;
while(1){
scanf("%d %d",&m,&n);
if(!m && !n) break;
memset(ice,false,sizeof(ice));
... | a.cc: In function 'int main()':
a.cc:20:5: error: 'memset' was not declared in this scope
20 | memset(ice,false,sizeof(ice));
| ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include<algorithm>
+++ |+#include <cstring... |
s916328586 | p00458 | C++ | #include<cstdio>
#include<cctype>
#include<iostream>
#include<algorithm>
using namespace std;
bool ice[100][100];
int dx[4]={0,1,0,-1};
int dy[4]={-1,0,1,0};
int n,m;
int bre(int x,int y,int c){
int ret = c;
for(int i = 0; i < 4; i++){
int nx = x + dx[i];
int ny = y + dy[i];
if(ice[nx][ny]){
ic... | a.cc: In function 'int main()':
a.cc:32:5: error: 'memset' was not declared in this scope
32 | memset(ice,false,sizeof(ice));
| ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include<algorithm>
+++ |+#include <cstring... |
s894752699 | p00458 | C++ | #include<cstdio>
#include<iostream>
#include<algorithm>
using namespace std;
bool ice[100][100];
int dx[4]={0,1,0,-1};
int dy[4]={-1,0,1,0};
int n,m;
int bre(int x,int y,int c){
int ret = c;
for(int i = 0; i < 4; i++){
int nx = x + dx[i];
int ny = y + dy[i];
if(ice[nx][ny]){
ice[nx][ny] = false... | a.cc: In function 'int main()':
a.cc:31:5: error: 'memset' was not declared in this scope
31 | memset(ice,false,sizeof(ice));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include<algorithm>
+++ |+#include <cstring... |
s344008607 | p00458 | C++ | #include <iostream>
#include <stack>
using namespace std;
int main(){
int m;
int n;
int b;
int c;
int h;//現在の割った氷
int i;//割った氷の最高
int j;
int k;
while(cin >>m>>n){
if(m==0&&n==0){break;}
int a[n][m];
int g[n][m];//氷が残っているか
b=0;
while(b<n){
c=0;
while(c<m){
cin >>a[b][c];
g[b][c]=a[b][c];
c=c+1;}
b=b+1;}
stack<int> d;//n... | a.cc: In function 'int main()':
a.cc:44:1: error: 'else' without a previous 'if'
44 | else if(f.top()!=3){j=f.top(); f.pop(); f.push(j+1);}
| ^~~~
|
s496485808 | p00458 | C++ | #include <stdio.h>
#include <stdlib.h>
int d0,d1,d2,d3,dmax,x,y;
int board[92][92];
int Search(x, y){
if(board[x][y]==0) return 0;
board[x][y]=0;
d0=Search((x-1),y);
dmax=d0;
d1=Search((x+1),y);
if(dmax<d1) dmax=d1;
d2=Search(x,(y-1));
if(dmax<d2) dmax=d2;
d3=Search(x,(y+1));
if(dmax<d3) dmax=d3;
b... | a.cc:8:16: error: expression list treated as compound expression in initializer [-fpermissive]
8 | int Search(x, y){
| ^
a.cc:8:17: error: expected ',' or ';' before '{' token
8 | int Search(x, y){
| ^
a.cc: In function 'int main()':
a.cc:40:41: error: 'Search' cannot ... |
s444990693 | p00458 | C++ | #include <cstdio>
#include <vector>
#include <algorithm>
using namespace std;
int solve(int x, int y, int w, int h, vector<vector<int> > f)
{
int ans = 0;
if(f[x][y] == 0)
return 0;
f[x][y] = 0;
int dx[] = {-1, 0, 0, 1};
int dy[] = {0, -1, 1, 0};
for(int i = 0; i < 4; ++i) {
int nx = dx[i] + x;
int ny = dy[i] + y;... | a.cc: In function 'int main()':
a.cc:36:20: error: template argument 1 is invalid
36 | vector<vector<int> f;
| ^
a.cc:36:20: error: template argument 2 is invalid
a.cc:40:1: error: 'f' was not declared in this scope
40 | f.resize(w);
| ^
|
s989175912 | p00458 | C++ | #include <cstdio>
#include <vector>
#include <algorithm>
using namespace std;
int solve(int x, int y, int w, int h, vector<vector<int> > &f)
{
int ans = 0;
if(f[x][y] == 0)
return 0;
f[x][y] = 0;
int dx[] = {-1, 0, 0, 1};
int dy[] = {0, -1, 1, 0};
for(int i = 0; i < 4; ++i) {
int nx = dx[i] + x;
int ny = dy[i] + y... | a.cc: In function 'int main()':
a.cc:36:20: error: template argument 1 is invalid
36 | vector<vector<int> f;
| ^
a.cc:36:20: error: template argument 2 is invalid
a.cc:40:1: error: 'f' was not declared in this scope
40 | f.resize(w);
| ^
|
s297976441 | p00458 | C++ | #include <stdio.h>
#include <string.h>
int map[90][90],m,n;
int main(){
int x,max = 0,i,j;
memset(map,0,sizeof(map));
scanf("%d",&m);
scanf("%d",&n);
for(i=0;i<m;i++){
for(j=0;j<n;j++)scanf("%d",&map[i][j]);
}
for(i=0;i<m;i++){
for(j=0;j<n;j++){
x = rec(i,j);
... | a.cc: In function 'int main()':
a.cc:16:17: error: 'rec' was not declared in this scope
16 | x = rec(i,j);
| ^~~
a.cc: At global scope:
a.cc:23:9: error: 'i' was not declared in this scope
23 | int rec(i,j){
| ^
a.cc:23:11: error: 'j' was not declared in this scope
... |
s181005665 | p00458 | C++ | #include <stdio.h>
#include <string.h>
int map[90][90],m,n;
int rec(i,j);
int main(){
int x,max = 0,i,j;
memset(map,0,sizeof(map));
scanf("%d",&m);
scanf("%d",&n);
for(i=0;i<m;i++){
for(j=0;j<n;j++)scanf("%d",&map[i][j]);
}
for(i=0;i<m;i++){
for(j=0;j<n;j++){
x ... | a.cc:5:9: error: 'i' was not declared in this scope
5 | int rec(i,j);
| ^
a.cc:5:11: error: 'j' was not declared in this scope
5 | int rec(i,j);
| ^
a.cc:5:12: error: expression list treated as compound expression in initializer [-fpermissive]
5 | int rec(i,j);
| ... |
s377303736 | p00458 | C++ | #include<cstdio>
#include<algorithm>
using namespace std;
int w[100][100];
int a,b;
int ans(int a,int b){
int num=0;
w[a][b]=0;
if(a>0 && w[a-1][b]==1){
num=max(num,solve(a-1,b));
}
if(b>0 && w[a][b-1]==1){
num=max(num,solve(a,b-1));
}
if(a<b-1 && w[a+1][b]==1){
num=m... | a.cc: In function 'int ans(int, int)':
a.cc:10:21: error: 'solve' was not declared in this scope
10 | num=max(num,solve(a-1,b));
| ^~~~~
a.cc:13:21: error: 'solve' was not declared in this scope
13 | num=max(num,solve(a,b-1));
| ^~~~~
a.cc:16:21:... |
s081017897 | p00458 | C++ | #include<cstdio>
#include<algorithm>
using namespace std;
int w[100][100];
int a,b;
int ans(int a,int b){
int num=0;
w[a][b]=0;
if(a>0 && w[a-1][b]==1){
num=max(num,solve(a-1,b));
}
if(b>0 && w[a][b-1]==1){
num=max(num,solve(a,b-1));
}
if(a<b-1 && w[a+1][b]==1){
num=m... | a.cc: In function 'int ans(int, int)':
a.cc:10:21: error: 'solve' was not declared in this scope
10 | num=max(num,solve(a-1,b));
| ^~~~~
a.cc:13:21: error: 'solve' was not declared in this scope
13 | num=max(num,solve(a,b-1));
| ^~~~~
a.cc:16:21:... |
s052471575 | p00458 | C++ | #include<cstdio>
int e[100][100],n,m;
int ax[4]={0, 1, 0, -1},ay[4]={1, 0, -1, 0};
int dfs(int x, int y){
int i,w=1;
for(int i=0;i<4;i++){
int nx = x + ax[i];
int ny = y + ay[i];
if(nx < 0 || nx >= n || ny < 0 || ny >= m){
continue;
}
e[x][y] = 0;
if(e[nx][ny] == 1){
int num=dfs... | a.cc: In function 'int main()':
a.cc:30:8: error: 'inti' was not declared in this scope; did you mean 'int'?
30 | for(inti = 0;i < n;i++){
| ^~~~
| int
a.cc:30:17: error: 'i' was not declared in this scope
30 | for(inti = 0;i < n;i++){
| ^
a.cc:35:6: error: 'i... |
s452317272 | p00458 | C++ | /**********************
aoj_0535
Crossing Black Ice
***********************/
#include <iostream>
#include <stack>
using namespace std;
struct pos{
int x; //座標
int y;
int count; //進んだ数
int after_move[100][100]; //今まで進んだ配列を記憶する
};
int main(){
while(1){
int m, n;
cin >> m >> n;
if(m == 0 || n == 0) b... | a.cc: In function 'int main()':
a.cc:44:41: error: 'memcpy' was not declared in this scope
44 | memcpy(p.after_move, ice, sizeof(p.after_move));
| ^~~~~~
a.cc:7:1: note: 'memcpy' is defined in header '<cstring>'; this is probably f... |
s501723918 | p00458 | C++ | /**********************
aoj_0535
Crossing Black Ice
***********************/
#include <iostream>
#include <stack>
#include <cstdio>
using namespace std;
struct pos{
int x; //座標
int y;
int count; //進んだ数
int after_move[100][100]; //今まで進んだ配列を記憶する
};
int main(){
while(1){
int m, n;
cin >> m >> n;
if(m... | a.cc: In function 'int main()':
a.cc:45:41: error: 'memcpy' was not declared in this scope
45 | memcpy(p.after_move, ice, sizeof(p.after_move));
| ^~~~~~
a.cc:8:1: note: 'memcpy' is defined in header '<cstring>'; this is probably f... |
s108662576 | p00458 | C++ | /**********************
aoj_0535
Crossing Black Ice
***********************/
#include <iostream>
#include <stack>
using namespace std;
struct pos{
int x; //座標
int y;
int count; //進んだ数
int after_move[100][100]; //今まで進んだ配列を記憶する
};
int main(){
while(1){
int m, n;
cin >> m >> n;
if(m == 0 || n == 0) b... | a.cc: In function 'int main()':
a.cc:44:41: error: 'memcpy' was not declared in this scope
44 | memcpy(p.after_move, ice, sizeof(p.after_move));
| ^~~~~~
a.cc:7:1: note: 'memcpy' is defined in header '<cstring>'; this is probably f... |
s386705266 | p00458 | C++ | /**********************
aoj_0535
Crossing Black Ice
***********************/
#include <iostream>
#include <stack>
#include <string>
using namespace std;
struct pos{
int x; //座標
int y;
int count; //進んだ数
int after_move[100][100]; //今まで進んだ配列を記憶する
};
int main(){
while(1){
int m, n;
cin >> m >> n;
if(m... | a.cc: In function 'int main()':
a.cc:45:41: error: 'memcpy' was not declared in this scope
45 | memcpy(p.after_move, ice, sizeof(p.after_move));
| ^~~~~~
a.cc:7:1: note: 'memcpy' is defined in header '<cstring>'; this is probably f... |
s216174119 | p00458 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <map>
#include <stack>
#define FOR(i, a, b) for(int i = (a); i < (b); i++)
#define rep(i, n) for(int i = 0; i < (n); i++)
#define MP make_pair
#define X first
#define Y second
using namespace std;
typedef vector<int> vi;
typedef ... | a.cc: In function 'int main()':
a.cc:49:33: error: 'memset' was not declared in this scope
49 | memset(visit, 0, sizeof(visit));
| ^~~~~~
a.cc:7:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstr... |
s674902535 | p00458 | C++ | #include "stdio.h"
int ido(int x,int y,int a[90][90])
{
a[x][y] = 0;
int max = 0;
if(x + 1 < 90)
{
if(a[x + 1][y] == 1)
{
int w = ido(x + 1,y,a)
if(max < w)
{
max = w;
}
}
}
if(0 <= x - 1)
{
int w = ido(x - 1,y,a);
if(max < w)
{
max = w;
}
}
if(y + 1 < 90)
{
int w = ido(x,y + 1,a);
if(max < w)
{
max = w;
}
}
if(0 <= y... | a.cc: In function 'int ido(int, int, int (*)[90])':
a.cc:12:1: error: expected ',' or ';' before 'if'
12 | if(max < w)
| ^~
|
s830427393 | p00458 | C++ | #include "stdio.h"
int ido(int x,int y,int aw[90][90])
{
a[x][y] = 0;
int a[90][90];
for(int i = 0; i < 90; i++)
{
for(int ii = 0; ii < 90; ii++)
{
a[i][ii] = aw[i][ii];
}
}
int max = 0;
if(x + 1 < 90)
{
if(a[x + 1][y] == 1)
{
int w = ido(x + 1,y,a);
if(max < w)
{
max = w;
}
}
}
if(0 <= x - 1)
{
if(a[x - 1][y] == 1)
{... | a.cc: In function 'int ido(int, int, int (*)[90])':
a.cc:5:1: error: 'a' was not declared in this scope
5 | a[x][y] = 0;
| ^
|
s855806380 | p00458 | C++ | /**********************
aoj_0535
Crossing Black Ice
***********************/
#include <iostream>
#include <stack>
using namespace std;
struct pos{
int x; //座標
int y;
int count; //進んだ数
int field[100][100]; //今まで進んだ配列を記憶する
};
int main(){
while(1){
int m, n;
cin >> m >> n;
if(m == 0 || n == 0) break;... | a.cc: In function 'int main()':
a.cc:40:41: error: 'memcpy' was not declared in this scope
40 | memcpy(p.field, ice, sizeof(p.field));
| ^~~~~~
a.cc:7:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by ... |
s128822730 | p00458 | C++ | /**********************
aoj_0535
Crossing Black Ice
***********************/
#include <iostream>
#include <stack>
#include <cstdlib>
using namespace std;
struct pos{
int x; //座標
int y;
int count; //進んだ数
int field[100][100]; //今まで進んだ配列を記憶する
};
int main(){
while(1){
int m, n;
cin >> m >> n;
if(m == ... | a.cc: In function 'int main()':
a.cc:41:41: error: 'memcpy' was not declared in this scope
41 | memcpy(p.field, ice, sizeof(p.field));
| ^~~~~~
a.cc:8:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by ... |
s427531440 | p00459 | C | #include <stdio.h>
#include <string.h>
unsigned int a[1000000000];
unsigned int s[1000000000];
unsigned int t[1000000000];
unsigned int u[1000000000];
int main()
{
int n,m,p,q,r,i,x,y;
for(;;){
scanf("%d",&n);
if(n == 0) break;
for(i=0;i<n;i++){
a[i] = i+1;
}
scanf("%d",&m);
scanf("%d%... | /tmp/ccUGPDGx.o: in function `main':
main.c:(.text+0xe4): relocation truncated to fit: R_X86_64_PC32 against symbol `s' defined in .bss section in /tmp/ccUGPDGx.o
main.c:(.text+0x120): relocation truncated to fit: R_X86_64_PC32 against symbol `t' defined in .bss section in /tmp/ccUGPDGx.o
main.c:(.text+0x15c): relocati... |
s661075634 | p00459 | C | #include<stdio.h>
#include<string.h>
#define Max(x,y) ((x>y)?x:y)
typedef struct card{
int s,t,n;
}card;
card x[10500],y[10500];
int main(){
int i,j,n,m,p,q,r,a,b,c,d;//(a,b)cut c,d:absolute point
int xn,yn,e,f,g;//f:flag g:
while(1){
scanf("%d",&n);
if(n==0)break;
scanf("%d%d%d%d",&m,&p,&q,&r);
xn=1;
x[0... | main.c: In function 'main':
main.c:96:33: error: expected expression before '>' token
96 | > printf("%d %d",c,d);
| ^
main.c:97:1: error: expected expression before '>' token
97 | >
| ^
|
s897595717 | p00459 | C | #include <stdio.h>
int main(){
int i, j, n, m, p, q, r;
while(1){
scanf("%d",&n);
if(n == 0) break;
scanf("%d",&m);
scanf("%d%d%d",&p,&q,&r);
int d[n], a[n], b[n], c[n], x[m][2], count = 0;
for(i = 0 ; i < n ; i++){
d[i] = i + 1;
}
for(i = 0 ; i < m ; i++){
for(j = 0 ; ... | main.c: In function 'main':
main.c:25:20: error: 'k' undeclared (first use in this function)
25 | b[i] = d[x[k][0]];
| ^
main.c:25:20: note: each undeclared identifier is reported only once for each function it appears in
|
s287507936 | p00459 | C | #include <stdio.h>
#include <stdlib.h>
//Impossibly large number
#define ILN 1000000002
typedef struct tag_node{
int num;
struct tag_node *next_series;
struct tag_node *next_one;
}NODE;
NODE *createNode(int i);
NODE *retNode(NODE *START,int i);
void shuffle(int x,int y,NODE *HEAD,NODE *TAIL,int n);
int countCard(... | main.c:127:9: error: expected identifier or '(' before 'return'
127 | return START;
| ^~~~~~
main.c:128:1: error: expected identifier or '(' before '}' token
128 | }
| ^
|
s974796700 | p00459 | C++ | #include<iostream>
using namespace std;
long long int main() {
long long int size;
long long int *card;
long long int *dommy;
long long int search[3];
long long int shuffle[2];
long long int time;
while (cin >> size&&size) {
card = new long long int[size];
for (long long int i = 0; i < size; ++i) {
card[i... | a.cc:3:11: error: '::main' must return 'int'
3 | long long int main() {
| ^~~
|
s413105426 | p00459 | C++ | #define _CRT_SECURE_NO_WARNINGS
#include "bits/stdc++.h"
using namespace std;
#define int int64_t
#define CHOOSE(a) CHOOSE2 a
#define CHOOSE2(a0,a1,a2,a3,x,...) x
#define REP1(i, s, cond, cal) for (signed i = signed(s); i cond; i cal)
#define REP2(i, s, n) REP1(i, s, < signed(n), ++)
#define REP3(i, n) REP2(i, 0, n)
... | a.cc: In function 'int main()':
a.cc:99:35: error: no matching function for call to 'max(long long int, long int)'
99 | ans += max(0ll, min(r, ra.second) - ra.first + 1);
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/1... |
s777128165 | p00459 | C++ |
#if 1
#include <fstream>
#include <string>
#include <sstream>
#include <iostream>
#include <locale>
#include <codecvt>
#include <memory>
#include <iostream>
#include <fstream>
#include <string>
#include <locale>
#include <iomanip>
#include <utility>
#include <algorithm>
int32_t N;
int32_t p, q, r;
int32_t M;
int32_t... | a.cc:2: error: unterminated #if
2 | #if 1
|
s027427103 | p00459 | C++ | #include <algorithm>
#include <climits>
#include <iostream>
#include <string>
#include <vector>
#include<queue>
#include<queue>
#define P pair<int,int>
using namespace std;
queue<P>operator +(queue<P>a, queue<P>b) {
while (b.size()) {
a.push(b.front()); b.pop();
}
return a;
}
queue<P>L;
int main() {
int a;
whil... | a.cc: In function 'int main()':
a.cc:64:2: error: expected '}' at end of input
64 | }
| ^
a.cc:18:12: note: to match this '{'
18 | int main() {
| ^
|
s269535700 | p00459 | 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>
#include <deque>
using namespace std;
#define rep(i,j) REP((i), 0, (j))
#define REP(i,j,k) for(int i=(... | a.cc: In function 'int main()':
a.cc:122:4: error: expected '}' at end of input
122 | }
| ^
a.cc:75:11: note: to match this '{'
75 | int main(){
| ^
|
s525187907 | p00459 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main(){
int n,m,p,q,r,x,y;
vector<int>::iterator itx,ity,it;
for(;cin>>n>>m>>p>>q>>r;cout<<x<<endl){
vector<int> v1(1),v2;
for(v1.push_back(r);m--;v2.clear()){
cin>>x>>y;
itx=upper_bound(v1.begin(),v1.end(),x);
ity=up... | a.cc: In function 'int main()':
a.cc:41:35: error: expected ';' before 'x'
41 | m=*it,++it
| ^
| ;
42 | x+=*it-m;
| ~
|
s824298377 | p00459 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main(){
int n,m,p,q,r,x,y;
vector<int>::iterator itx,ity,it;
for(;cin>>n>>m>>p>>q>>r;cout<<x<<endl){
vector<int> v1,v2;
v1.push_back(0);
for(v1.push_back(r);m--;v2.clear()){
cin>>x>>y;
itx=upper_bound(v1.begin(),v1.end(),... | a.cc: In function 'int main()':
a.cc:42:32: error: expected ';' before '}' token
42 | m=*it++
| ^
| ;
43 | }
| ~
|
s776696430 | p00459 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main(){
int n,m,p,q,r,x,y;
vector<int>::iterator itx,ity,it;
for(;cin>>n>>m>>p>>q>>r;cout<<x<<endl){
vector<int> v1,v2;
v1.push_back(0);
for(v1.push_back(r);m--;v2.clear()){
cin>>x>>y;
itx=upper_bound(v1.begin(),v1.end(),... | a.cc: In function 'int main()':
a.cc:41:37: error: expected ';' before '}' token
41 | x+=it[1]-*it
| ^
| ;
42 | }
| ~
|
s409781547 | p00459 | C++ | #include <cstdio>
#include <algorthm>
#include <queue>
using namespace std;
typedef pair<int,int> P;
#define mp make_pair
#define f first
#define s second
int main(){
while(1){
int n,m,p,q,r;
queue<P>que;
scanf("%d",&n);
if(!n) break;
scanf("%d",&m);
scanf("%d %d %d",&p,&q,&r);
que.push(mp(1,r));
for(int i=0;i<m;i++){
... | a.cc:2:10: fatal error: algorthm: No such file or directory
2 | #include <algorthm>
| ^~~~~~~~~~
compilation terminated.
|
s192817711 | p00459 | C++ |
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
class Deck
{
public:
int start, end;
Deck(int s, int e)
{
start = s;
end = e;
}
vector<Deck> divide(int a, int b = -1)
{
vector<Deck> v;
v.push_back(Deck(start, a));
if(b == -1)
v.push_back(Deck(a 1, ... | a.cc: In member function 'std::vector<Deck> Deck::divide(int, int)':
a.cc:22:23: error: expected primary-expression before '(' token
22 | v.push_back(Deck(a 1, end));
| ^
a.cc:22:28: error: expected ')' before numeric constant
22 | v.push_back(Deck(a 1, end));
| ... |
s557538446 | p00460 | C | #include"bits/stdc++.h"
main(){for(int n,m,s,i,j,d[50][3500],M=1e5;std::cin>>n>>m>>s,n*=n;){std::fill(d[0],d[50],M);d[0][0]=1;for(i=1;i<=n;++i)for(j=0;j<=s;++j){if(j>=i)d[i][j]+=d[i-1][j-i]+d[i][j-i];if(j>m)d[i][j]-=d[i-1][j-m-1];d[i][j]%=M;}printf("%d\n",d[n][s]);}} | main.c:1:9: fatal error: bits/stdc++.h: No such file or directory
1 | #include"bits/stdc++.h"
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s883150726 | p00460 | C++ | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
int main(){
int n,m,s;
while(cin>>n>>m>>s){
if(n==0&&m==0&&s==0)break;
int dp[2][2300][3300];
rep(i,2)rep(j,2300)rep(k,3300)dp[i][j][k]=0;
dp[0][0][0] = 1;
for(int i=1;i<=n*n... | a.cc: In function 'int main()':
a.cc:14:13: error: 'i' was not declared in this scope
14 | rep(i,2)rep(j,2300)rep(k,3300)dp[i][j][k]=0;
| ^
a.cc:14:9: error: 'rep' was not declared in this scope
14 | rep(i,2)rep(j,2300)rep(k,3300)dp[i][j][k]=0;
| ^~~
|
s851976525 | p00460 | C++ | #include <iostream>
using namespace std;
const int MAX_N = 7;
const int MAX_S = 3000;
int dp[MAX_N * MAX_N + 1][MAX_S + 1];
int main()
{
int N, M, S;
while (cin >> N >> M >> S, N) {
memset(dp, 0, sizeof dp);
N *= N;
dp[0][0] = 1;
for (int i = 1; i <= M; ++i) {
for (int j = N; j >= 1; --j) {
fo... | a.cc: In function 'int main()':
a.cc:15:17: error: 'memset' was not declared in this scope
15 | memset(dp, 0, sizeof dp);
| ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <iostream>
+++... |
s309044418 | p00460 | C++ | #include<bits/stdc++.h>
using namespace std;
int dp[2200][3200],_prev[2200][3200],n,m,s;
int main(){
while(true){
cin>>n>>s>>m;if(n==0)return 0;n*=n;
for(int i=0;i<2200;i++){fill(dp[i],dp[i]+3200);fill(_prev[i],_prev[i]+3200);}
for(int i=0;i<=s;i++)_prev[i][0]=1;
for(int i=0;i<n;i++){
for(int j=1;j<=s;j++){... | a.cc: In function 'int main()':
a.cc:7:45: error: no matching function for call to 'fill(int [3200], int*)'
7 | for(int i=0;i<2200;i++){fill(dp[i],dp[i]+3200);fill(_prev[i],_prev[i]+3200);}
| ~~~~^~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/... |
s150856437 | p00460 | C++ | #include<bits/stdc++.h>
using namespace std;
int dp[2200][3200],_prev[2200][3200],n,m,s;
int main(){
while(true){
cin>>n>>s>>m;if(n==0)return 0;n*=n;
for(int i=0;i<2200;i++){fill(dp[i],dp[i]+3180);fill(_prev[i],_prev[i]+3180);}
for(int i=0;i<=s;i++)_prev[i][0]=1;
for(int i=0;i<n;i++){
for(int j=1;j<=s;j++){... | a.cc: In function 'int main()':
a.cc:7:45: error: no matching function for call to 'fill(int [3200], int*)'
7 | for(int i=0;i<2200;i++){fill(dp[i],dp[i]+3180);fill(_prev[i],_prev[i]+3180);}
| ~~~~^~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/... |
s262336171 | p00460 | C++ | #include<iostream>
#include<cstdio>
#include<string>
#include<set>
#include<vector>
#include<algorithm>
#include<functional>
using namespace std;
int dp[49][2999][1999]{};
int main() {
memset(dp, -1, sizeof(dp));
} | a.cc: In function 'int main()':
a.cc:12:9: error: 'memset' was not declared in this scope
12 | memset(dp, -1, sizeof(dp));
| ^~~~~~
a.cc:8:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
7 | #include<functional>
+++ |+#include <c... |
s243457850 | p00460 | C++ | #include<iostream>
#include<map>
#include<string>
#include<vector>
#include<algorithm>
#include<queue>
#include<set>
#include<map>
#define int long long
using namespace std;
int dp[2][2000][3000];
signed main() {
int a, b, c;
while (cin >> a >> b >> c, a || b || c) {
a *= a;
c -= a*(a + 1) / 2;
b -= a;
memse... | a.cc: In function 'int main()':
a.cc:19:17: error: 'memset' was not declared in this scope
19 | memset(dp, 0, sizeof(dp));
| ^~~~~~
a.cc:8:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
7 | #include<set>
+++ |+#i... |
s588551955 | p00460 | C++ | #include<iostream>
#include<map>
#include<string>
#include<vector>
#include<algorithm>
#include<queue>
#include<set>
#include<map>
using namespace std;
int dp[2][2000][3000];
signed main() {
int a, b, c;
while (cin >> a >> b >> c, a || b || c) {
a *= a;
c -= a*(a + 1) / 2;
b -= a;
memset(dp, 0, sizeof(dp));
... | a.cc: In function 'int main()':
a.cc:18:17: error: 'memset' was not declared in this scope
18 | memset(dp, 0, sizeof(dp));
| ^~~~~~
a.cc:8:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
7 | #include<set>
+++ |+#i... |
s311468596 | p00460 | C++ | #include <cstdio>
using namespace std;
int n, m, s;
int dp[49][2001][3001];
int main(){
while(1){
scanf("%d %d %d", &n, &m, &s);
if(n == 0) break;
dp = {{{}}};
for(int i=1; i<s+1; i++){
dp[0][i][i] = 1;
}
for(int i=1; i<n*n; i++){
for(int j=1; j<s+1; j++){
for(int k=1; k<m+1; k++){
for(i... | a.cc: In function 'int main()':
a.cc:11:20: error: assigning to an array from an initializer list
11 | dp = {{{}}};
| ~~~^~~~~~~~
a.cc:29:25: error: 'ans' was not declared in this scope
29 | ans += dp[n*n-1][s][i];
| ^~~
a... |
s609840484 | p00460 | C++ | #include<iostream>
using namespace std;int d[51][3210],n,m,s,i,j,k;int main(){while(cin>>n>>m>>s&&n){n*=n;memset(d,0,sizeof(d));d[0][0]=1;for(k=1;k<=m;k++)for(i=n;i;i--)for(j=k;j<=s;j++)d[i][j]=(d[i][j]+d[i-1][j-k])%100000;cout<<d[n][s]<<endl;}return 0;} | a.cc: In function 'int main()':
a.cc:2:88: error: 'memset' was not declared in this scope
2 | using namespace std;int d[51][3210],n,m,s,i,j,k;int main(){while(cin>>n>>m>>s&&n){n*=n;memset(d,0,sizeof(d));d[0][0]=1;for(k=1;k<=m;k++)for(i=n;i;i--)for(j=k;j<=s;j++)d[i][j]=(d[i][j]+d[i-1][j-k])%100000;cout<<d[n][s]<<end... |
s704654844 | p00460 | C++ | #include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
int main(){
int dp1[50][3001];
int dp2[50][3001];
// x?????????, ?????¨???????¨???????y
int mod=100000;
int n,m,s;
while(scanf("%d%d%d",&n,&m,&s)){
if(n==0&&m==0&&s==0)
break;
memset(dp1,0,sizeof(dp1));
dp1[0][0]=1;
for(in... | a.cc: In function 'int main()':
a.cc:17:17: error: 'memset' was not declared in this scope
17 | memset(dp1,0,sizeof(dp1));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include<algorithm>
++... |
s496746957 | p00460 | C++ | #include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
int main(){
int dp1[50][3001];
int dp2[50][3001];
// x?????????, ?????¨???????¨???????y
int mod=100000;
int n,m,s;
while(scanf("%d%d%d",&n,&m,&s)){
if(n==0&&m==0&&s==0)
break;
memset(dp1,0,sizeof(dp1));
dp1[0][0]=1;
for(in... | a.cc: In function 'int main()':
a.cc:17:17: error: 'memset' was not declared in this scope
17 | memset(dp1,0,sizeof(dp1));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include<algorithm>
++... |
s719862055 | p00460 | C++ | #include<iostream>
#include<cstdio>
#include<cstdlib>
#include<algorithm>
using namespace std;
int main(){
int dp1[50][3001];
int dp2[50][3001];
// x?????????, ?????¨???????¨???????y
int mod=100000;
int n,m,s;
while(scanf("%d%d%d",&n,&m,&s)){
if(n==0&&m==0&&s==0)
break;
memset(dp1,0,sizeof(dp1));
dp1... | a.cc: In function 'int main()':
a.cc:18:17: error: 'memset' was not declared in this scope
18 | memset(dp1,0,sizeof(dp1));
| ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include<algorithm>
++... |
s061925700 | p00460 | C++ | #include<cstdio>
#include<algorithm>
#define mod 100000
using namespace std;
int dp[50][3001];
int main(){
int n,m,s;
while(scanf("%d %d %d",&n,&m,&s)){
if(n==0&&m==0&&s==0)
break;
memset(dp,0,sizeof(dp));
dp[0][0]=1;
for(int i=1;i<=m;i++){
for(int j=n*n;j>0;j--){
for(int k=i;k<=s;k++){
dp[j... | a.cc: In function 'int main()':
a.cc:15:17: error: 'memset' was not declared in this scope
15 | memset(dp,0,sizeof(dp));
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include<algorithm>
+++ ... |
s871220397 | p00460 | C++ | #include<cstdio>
#include<algorithm>
#include<string>
#define mod 100000
using namespace std;
int dp[50][3001];
int main(){
int n,m,s;
while(scanf("%d %d %d",&n,&m,&s)){
if(n==0&&m==0&&s==0)
break;
memset(dp,0,sizeof(dp));
dp[0][0]=1;
for(int i=1;i<=m;i++){
for(int j=n*n;j>0;j--){
for(int k=i;k<=... | a.cc: In function 'int main()':
a.cc:16:17: error: 'memset' was not declared in this scope
16 | memset(dp,0,sizeof(dp));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include<string>
+++ |+#... |
s054463111 | p00460 | C++ |
//y09-6 ビンゴ(2回目)
#include <iostream>
#include <fstream>
#include <stdio.h>
#include <math.h>
#include <time.h>
#include <string>
#include <vector>
#include <map>
#include <list>
#include <set>
#include <stack>
#include <queue>
#include <cstdlib>
#include <algorithm>
#include <random>
#include <cassert>
using namespace... | a.cc: In function 'int main()':
a.cc:47:22: error: 'm' was not declared in this scope
47 | if(j>m) dp[i][j] -= dp[i-1][j-m-1];
| ^
|
s515752749 | p00460 | C++ |
//y09-6 ビンゴ(2回目)
#include <iostream>
#include <fstream>
#include <stdio.h>
#include <math.h>
#include <time.h>
#include <string>
#include <vector>
#include <map>
#include <list>
#include <set>
#include <stack>
#include <queue>
#include <cstdlib>
#include <algorithm>
#include <random>
#include <cassert>
using namespace... | a.cc: In function 'int main()':
a.cc:47:22: error: 'm' was not declared in this scope
47 | if(j>m) dp[i][j] -= dp[i-1][j-M-1];
| ^
|
s881862988 | p00460 | C++ | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
#define REP(i,n) for(i=0; i<(int)(n); i++)
#define rep(i,s,n) for(i=(s); i<(int)(n); i++)
typedef unsigned int uint;
int getInt(){
int ret = 0,c;
c = getchar();
while(!isdigit(c)) c = getchar();
while(isdigit(c)){
ret *= 10;
ret += c - '0';
... | a.cc: In function 'int getInt()':
a.cc:13:10: error: 'isdigit' was not declared in this scope
13 | while(!isdigit(c)) c = getchar();
| ^~~~~~~
a.cc:14:9: error: 'isdigit' was not declared in this scope
14 | while(isdigit(c)){
| ^~~~~~~
|
s226085570 | p00460 | C++ | #include <iostream>
using namespace std;
int dp[59][3001];
int main(void)
{
while(1)
{
int num,max,sum;
cin >> num >> max >> sum;
if(num+max+sum == 0)
return 0;
memset(dp,0,sizeof(dp));
dp[0][0] = 1;
for(int m=1;m<=max;++m)//その数を使ッた時のあれ
{
for(int n=num*num;n>=1;--n)//どの数が使う?(num
{
for(i... | a.cc: In function 'int main()':
a.cc:14:17: error: 'memset' was not declared in this scope
14 | memset(dp,0,sizeof(dp));
| ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <iostream>
+++ ... |
s895423525 | p00460 | C++ | #include <iostream>
#include <cstring>
using namespace std;
int dp[59][3001];
int main(void)
{
while(1)
{
int num,max,sum;
cin >> num >> max >> sum;
if(num+max+sum == 0)
return 0;
memset(dp,0,sizeof(dp));
dp[0][0] = 1;
for(int m=1;m<=max;++m)//その数を使ッた時のあれ
{
for(int n=num*num;n>=1;--n)//どの数が使う?... | a.cc:38:5: error: redefinition of 'int dp [59][3001]'
38 | int dp[59][3001];
| ^~
a.cc:5:5: note: 'int dp [59][3001]' previously declared here
5 | int dp[59][3001];
| ^~
a.cc:40:5: error: redefinition of 'int main()'
40 | int main(void)
| ^~~~
a.cc:7:5: note: 'int main()' previou... |
s641339210 | p00461 | C | #include<stdio.h>
#include<string.h>
#pragma warning(disable:4996)
int main(void){
int n, m;
char s[100002];
int count;
int i,ps;
char *p;
for (;;){
scanf("%d", &n);
if (n == EOF)break;
scanf("%d", &m);
scanf("%s", s);
ps = m;
p = s;
while (ps > 0){
p = strstr(p, "IOI");
for (i = 3; p[i] =... | main.c: In function 'main':
main.c:23:60: error: lvalue required as left operand of assignment
23 | for (i = 3; p[i] = 'O' && p[i + 1] = 'I' && i <= 1 + 2 * n ; i+=2){
| ^
|
s064308552 | p00461 | C | #include<stdio.h>
#include<string.h>
int main()
{
int n,m,i,j,ans;
char str[1000000];
while(1)
{
scanf("%d %d",&n,&m);
if(n==0&&m==0)break;
scanf("%s",str);
i=2*n;
ans=0;
while(str[i]!='\0')
{
for(j=0;j<2*i+1;j++)
{
if(j%2==0 && str[i-j]!='J')
{
i++;
break;
}
if(j%2=... | main.c: In function 'main':
main.c:36:1: error: expected declaration or statement at end of input
36 | }
| ^
|
s695006193 | p00461 | C | c,n;main(x){for(;t=scanf("%d%*d ",&n),n;printf("%d\n",c))for(c=0;x=getchar()%5;)t=x-4?t%2?c+=t>2*n,t+1:2:t%2?1:t+1;} | main.c:1:1: warning: data definition has no type or storage class
1 | c,n;main(x){for(;t=scanf("%d%*d ",&n),n;printf("%d\n",c))for(c=0;x=getchar()%5;)t=x-4?t%2?c+=t>2*n,t+1:2:t%2?1:t+1;}
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'c' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'i... |
s070939521 | p00461 | C | char s[1000001];c[1000001];
main(n,m,i,r){for(;scanf("%d",&n),n;printf("%d\n",r)){
for(memset(c,0,sizeof(c)),scanf("%d%s",&m,s),i=2;i<m;i++)if(s[i-2]=='I'&&s[i-1]=='O'&&s[i]=='I')c[i]=c[i-2]+1;
for(i=r=0;i<m;i++)if(c[i]>=n)r++;
} | main.c:1:17: warning: data definition has no type or storage class
1 | char s[1000001];c[1000001];
| ^
main.c:1:17: error: type defaults to 'int' in declaration of 'c' [-Wimplicit-int]
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
2 | main(n,m,i,r){for(;scanf("%d",&n),n... |
s732186300 | p00461 | C | #include<stdio.h>
int main(){
while(1){
char ch;
bool con=true;
int cou=0;
int m,n;
int i,j;
int ans=0;
scanf("%d",&n);
if(n==0)return 0;
scanf("%d",&m);
for(i=0;i<m;i++){
scanf(" %c",&ch);
if(ch=='I'){
if(!con){
cou++;
if(cou==n+1){
ans++;
cou--;
}
}
e... | main.c: In function 'main':
main.c:6:17: error: unknown type name 'bool'
6 | bool con=true;
| ^~~~
main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
1 | #include<stdio.h>
+++ |+#include <stdbool.h>
2... |
s996457512 | p00461 | C++ | #include<iostream>
#include<string>
#include<cstring>
#include<algorithm>
using namespace std;
char P[2000002],str[1000000];
int main(){
int n,f=1;
for(int i=0;i<2000001;i++){
if(f==1)P[i]='I';
else P[i]='O';
f*=-1;
}
while(cin>>n,n){
int len;
cin>>len;
ci... | a.cc: In function 'int main()':
a.cc:20:24: error: 'm' was not declared in this scope
20 | if(i+1+2*n>m)break;
| ^
|
s168521290 | p00461 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
int n, k;
while (cin >> n){
int ans=0,size=0;
string p = "I", s;
cin >> k;
for (int i = 0; i < n; i++){
p += "OI";
}
cin >> s;
for (int i = 0; i < s.size(); i++){
if (s[i] == p[0]){
if(s[i+1]==p[1]){
size = 2;
for (... | a.cc: In function 'int main()':
a.cc:26:41: error: expected '}' before 'else'
26 | else{
| ^~~~
a.cc:16:49: note: to match this '{'
16 | if(s[i+1]==p[1]){
| ... |
s872769321 | p00461 | C++ |
int main()
{
int n = 1;
while (1){
int m = 0;
int count = 0;
std::string str;
std::string check;
std::cin >> n;
if (n == 0) {
break;
}
for (int i = 0; i < n; i++) {
check += "I";
check += "O";
i... | a.cc: In function 'int main()':
a.cc:9:14: error: 'string' is not a member of 'std'
9 | std::string str;
| ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
+++ |+#include <string>
1 |
a.cc:11:14: error: 'st... |
s297530966 | p00461 | C++ | #include <iostream>
#include <string>
long main()
{
while (1){
long n = 0;
long m = 0;
long count = 0;
std::string str = "";
std::string check = "";
std::cin >> n;
if (n == 0) {
break;
}
for (long i = 0; i < n; i++) {
... | cc1plus: error: '::main' must return 'int'
|
s399176055 | p00461 | C++ | #include <iostream>
#include <string>
long main()
{
while (1){
long n = 0;
long m = 0;
long count = 0;
std::string str = "";
std::string check = "";
std::cin >> n;
if (n == 0) {
break;
}
for (long i = 0; i < n; i++) {
... | cc1plus: error: '::main' must return 'int'
|
s929795740 | p00461 | C++ | #include<iostream>
#include<vector>
#include<string>
#include<cstdio>
using namespace std;
char c[1000000];
int main() {
int a, b;
while (scanf("%d", &a), a) {
scanf("%d%s",&b, c);
int d = strlen(c);
int s = 0;
for (int e = 0; e < d; e++) {
if (c[e] == 'I') {
int k = 1;
for (int f = e + 1; f < d; ... | a.cc: In function 'int main()':
a.cc:12:25: error: 'strlen' was not declared in this scope
12 | int d = strlen(c);
| ^~~~~~
a.cc:5:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include<cstdio>
+++ |... |
s063098939 | p00461 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int n,m,c=0,i;
string s;
while(cin>>n,n){
cin>>m>>s;
for(i=0;i<m-2;i++){
if(s[i]=='l'&&s[i+1]=='O'&&s[i+2]=='l')c++;
}
cout<<c<<endl;
} | a.cc: In function 'int main()':
a.cc:12:4: error: expected '}' at end of input
12 | }
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s452927739 | p00461 | C++ | int main(){
int n;
while(cin>>n,n){
int len;
cin>>len;
string str;
cin>>str;
int ans=0;
for(int i=0;i<len-2;i++)
if(str[i]=='I'&&str[i+1]=='O'&&str[i+2]=='I') ans++,i++;
cout <<ans<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:3:9: error: 'cin' was not declared in this scope
3 | while(cin>>n,n){
| ^~~
a.cc:6:5: error: 'string' was not declared in this scope
6 | string str;
| ^~~~~~
a.cc:7:10: error: 'str' was not declared in this scope; did you mean 'std'?
7 | ... |
s283940330 | p00461 | C++ | #include<bits/stdc++.h>
using namespace std;
#define int long long
struct SuffixArray{
int n,k;
string S;
vector<int> r,r2,t,sa,lcp;
SuffixArray(){}
SuffixArray(string S):S(S){init();}
void init(){
n=S.size();
r.resize(n+1,0);
r2.resize(n+1,0);
t.resize(n+1,0);
sa.resize(n+1,0);
lcp.... | a.cc: In function 'int main()':
a.cc:213:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
213 | gets(buf);
| ^~~~
| getw
|
s455671267 | p00461 | C++ | #include<iostream>
#include<vector>
#include<string.h>
#include<string>
#include<windows.h>
using namespace std;
void make_pn(int n);
int find_IOI(char pn[], char str[]);
char func_pn[1000000];
char str[1000000];
char IO[] = "IO";
int n, m, total;
bool isKisu;
int main()
{
for(;;){
total = 0;
cin >> n;
if(n =... | a.cc:5:9: fatal error: windows.h: No such file or directory
5 | #include<windows.h>
| ^~~~~~~~~~~
compilation terminated.
|
s965008080 | p00461 | C++ | #include <iostream>
#include <algorithm>
#include <string>
using namespace std;
int *buildFail(char *p) {
int m = strlen(p);
int *fail = new int[m+1];
int j = fail[0] = -1;
for (int i = 1; i <= m; ++i) {
while (j >= 0 && p[j] != p[i-1]) j = fail[j];
fail[i] = ++j;
}
return fail;
}
int match(char *t... | a.cc: In function 'int* buildFail(char*)':
a.cc:7:11: error: 'strlen' was not declared in this scope
7 | int m = strlen(p);
| ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <algorithm>
+++ |+#include <cst... |
s666654285 | p00461 | C++ | 1
13
OOIOIOIOIIOII
2
13
OOIOIOIOIIOII
0 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 1
| ^
|
s860827093 | p00461 | C++ | #include<iostream>
#include<string>
using namespace std;
int main()
{
int n,m,ans,c[1000001];
string s;
while(cin>>n>>m>>s,n){
memset(c,0,sizeof(c));
for(int i=m-3;i>=0;i--){
if(s.substr(i,3)=="IOI")c[i]=c[i+2]+1;
}
ans=0;
for(int i=0;i<m;i++)cout<<c[i]<<", ";
puts("");
for(int i... | a.cc: In function 'int main()':
a.cc:9:5: error: 'memset' was not declared in this scope
9 | memset(c,0,sizeof(c));
| ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include<iostream>
+++ |+#include <cstring>
2 | ... |
s932653743 | p00461 | C++ | #include<iostream>
#include<string>
#include<cmemory>
using namespace std;
int main()
{
int n,m,ans,c[1000001];
string s;
while(cin>>n>>m>>s,n){
memset(c,0,sizeof(c));
for(int i=m-3;i>=0;i--){
if(s.substr(i,3)=="IOI")c[i]=c[i+2]+1;
}
ans=0;
for(int i=0;i<m;i++)cout<<c[i]<<", ";
puts(... | a.cc:3:9: fatal error: cmemory: No such file or directory
3 | #include<cmemory>
| ^~~~~~~~~
compilation terminated.
|
s460891184 | p00461 | C++ | #include<iostream>
main(){
int n,m,i,a,c[1000001];
for(std::string s;std::cin>>n>>m>>s,n;printf("%d\n",a))
for(a=0,i=m;--i;a+=c[i]>=n)c[i]=s.substr(i,3)-"IOI"?0:c[i+2]+1;
} | a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:5:46: error: no match for 'operator-' (operand types are 'std::__cxx11::basic_string<char>' and 'const char [4]')
5 | for(a=0,i=m;--i;a+=c[i]>=n)c[i]=s.substr(i,3)-... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.