submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s906613001 | p00438 | C++ | #include <cstdio>
#include <cstring>
using namespace std;
typedef __int64 Int;
#define MAX_L 16
Int table[MAX_L + 1][MAX_L + 1];
bool wall[MAX_L + 1][MAX_L + 1];
int a, b, n;
Int dp(int x, int y){
if(x == a && y == b) return 1;
if(x > a || y > b) return 0;
if(table[x][y] >= 0) return table[x][y];
if(wall[x][y]) r... | a.cc:5:9: error: '__int64' does not name a type; did you mean '__int64_t'?
5 | typedef __int64 Int;
| ^~~~~~~
| __int64_t
a.cc:7:1: error: 'Int' does not name a type; did you mean 'int'?
7 | Int table[MAX_L + 1][MAX_L + 1];
| ^~~
| int
a.cc:11:1: error: 'Int' does not nam... |
s171791505 | p00438 | C++ | #include<bits/sdtc++.h>
using namespace std;
typedef pair<int,int> pii;
int main(){
int r,c;
int n;
while(1){
cin>>r>>c;
if(r==0)break;
cin>>n;
int dp[c][r];
memset(dp,-1,sizeof(dp));
for(int i=0;i<n;i++){
int a,b;
cin>>a>>b;
dp[b-1][a-1]=0;
}
for(int i=c-1;i>=0... | a.cc:1:9: fatal error: bits/sdtc++.h: No such file or directory
1 | #include<bits/sdtc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s182040490 | p00438 | C++ | #include<bis/stdc++.h>
using namespace std;
typedef pair<int,int> pii;
int main(){
int r,c;
int n;
while(1){
cin>>r>>c;
if(r==0)break;
cin>>n;
int dp[c][r];
memset(dp,-1,sizeof(dp));
for(int i=0;i<n;i++){
int a,b;
cin>>a>>b;
dp[b-1][a-1]=0;
}
for(int i=c-1;i>=0;... | a.cc:1:9: fatal error: bis/stdc++.h: No such file or directory
1 | #include<bis/stdc++.h>
| ^~~~~~~~~~~~~~
compilation terminated.
|
s048578754 | p00438 | C++ |
//include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include ... | a.cc:118:9: error: expected unqualified-id before 'return'
118 | return 0;
| ^~~~~~
a.cc:119:1: error: expected declaration before '}' token
119 | }
| ^
|
s961019268 | p00438 | C++ | #include <iostream>
using namespace std;
int mass[17][17];
int memo[17][17];
int solve( int x ,int y ,int maxx ,int maxy);
int main(){
int n ,x ,y;
int cx ,cy;
while( true ){
memset( mass ,0 ,sizeof( mass ) );
memset( memo ,0 ,sizeof( memo ) );
cin >> x >> y;
if( x == 0 && y == 0 ) break;
ma... | a.cc: In function 'int main()':
a.cc:11:5: error: 'memset' was not declared in this scope
11 | memset( mass ,0 ,sizeof( mass ) );
| ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <iostream>
+++ |+#include <cst... |
s910257166 | p00438 | C++ | #include <stdio.h>
int dp[16];
bool u[16][16];
int main()
{
int a,b;
scanf("%d%d",&a,&b);
for(int i = 0; i < b; i++)
{
for(int ii = 0; ii < a; ii++)
{
u[i] = true;
}
}
int n;
scanf("%d",&n);
for(int i = 0; i < n; i++)
{
int x,y;
scanf("%d%d",&x,&y);
u[y - 1][x - 1] = false;
}
for(int i = 0; ... | a.cc: In function 'int main()':
a.cc:14:9: error: incompatible types in assignment of 'bool' to 'bool [16]'
14 | u[i] = true;
| ~~~~~^~~~~~
|
s265839967 | p00438 | C++ | #include<stdio.h>
int main(void){
int road[20][20]={{0}},i,j,t,a,b,tree,tx,ty,ans;
for(;;){
road[1][1]=1;
scanf("%d %d",&a,&b);
if(a==0&&b==0)break;
scanf("%d",&tree);
for(t=0;t<tree;t++){
scanf("%d %d",&tx,&ty);
road[tx][ty]=-1;
}
for(i=1;i<=a;i++){
for(j=1;j<=b;j++)... | a.cc: In function 'int main()':
a.cc:35:2: error: expected '}' at end of input
35 | }
| ^
a.cc:2:15: note: to match this '{'
2 | int main(void){
| ^
|
s489589491 | p00438 | C++ | #include<cstdio>
#include<math.h>
#include<algorithm>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
const int INF=1001001001;
int A,B;
int N;
long long int DP[20][20];
int main(){
while(1){
memset(DP,0,sizeof(DP));
scanf("%d %d",&A,&B);
if(A==0&&B==0)break;
scanf("%d",&N);
rep(i,N){
int a,b;
... | a.cc: In function 'int main()':
a.cc:15:9: error: 'memset' was not declared in this scope
15 | 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<algorithm>
+++ |+#include <cstri... |
s884727351 | p00438 | C++ | #include<math.h>
#include<algorithm>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
const int INF=1001001001;
int A,B;
int N;
long long int DP[20][20];
int main(){
while(1){
memset(DP,0,sizeof(DP));
scanf("%d %d",&A,&B);
if(A==0&&B==0)break;
scanf("%d",&N);
rep(i,N){
int a,b;
scanf("%d %d",&a... | a.cc: In function 'int main()':
a.cc:15:9: 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>
+++ |+#include <cstri... |
s290309156 | p00438 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
int main(){
int W, H;
while(cin >> W >> H, W||H){
int n, dp[17][17] = {0};
bool xx[17][17];
memset(xx, false, sizeof(xx));
cin >> n;
for(int i = 0; i < n; i++){
int x, y; cin >> x >> ... | a.cc: In function 'int main()':
a.cc:12:9: error: 'memset' was not declared in this scope
12 | memset(xx, false, sizeof(xx));
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <algorithm>
+++ |+#include... |
s366206591 | p00438 | C++ | #include <iostream>
#include <stack>
#include <algorithm>
using namespace std;
typedef pair<int,int>pa;
int ma[42][42];
int main(){
while(true){
int a,b,x,y;
int n;
cin>>a>>b;
if(a==0)break;
cin>>n;
memset(ma,0,sizeof(ma));
while(n--){
cin>>x>>y;x-... | a.cc: In function 'int main()':
a.cc:14:9: error: 'memset' was not declared in this scope
14 | memset(ma,0,sizeof(ma));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include <algorithm>
+++ |+#include <cstr... |
s372014378 | p00438 | C++ | #include <iostream>
#include <vector>
class Road{
private:
int col,row,close_num, goal_num;
std::vector<int> close_x;
std::vector<int> close_y;
public:
Road(int a, int b, int n);
~Road() = default;
void inPoint();
void go_road(int now_x,int now_y);
int isGo(int x, int y);
void showGoal();
};
int main(){
i... | a.cc:37:1: error: ISO C++ forbids declaration of 'Road' with no type [-fpermissive]
37 | Road(int a, int b, int n){
| ^~~~
a.cc: In function 'int Road(int, int, int)':
a.cc:38:9: error: 'col' was not declared in this scope
38 | col = a; //column
| ^~~
a.cc:39:9: error: 'row' was not de... |
s618165773 | p00438 | C++ | #include <iostream>
#include <arrary>
#include <iterator>
int main(){
std::array<int, 256> crossing; //16*16
int length,width;
while(std::cin >> width >> length){
if(width == 0 && length == 0){
break;
}
int construction;
std::cin >> construction;
for(int i = 0; i < construction; ++i){
int con_le... | a.cc:2:10: fatal error: arrary: No such file or directory
2 | #include <arrary>
| ^~~~~~~~
compilation terminated.
|
s290296603 | p00438 | C++ | #include <iostream>
#include <arrary>
#include <iterator>
int main(){
std::array<int, 256> crossing; //16*16
int length,width;
while(std::cin >> width >> length){
if(width == 0 && length == 0){
break;
}
int construction;
std::cin >> construction;
for(int i = 0; i < construction; ++i){
int con_le... | a.cc:2:10: fatal error: arrary: No such file or directory
2 | #include <arrary>
| ^~~~~~~~
compilation terminated.
|
s098770692 | p00438 | C++ | #include <iostream>
#include <arrary>
#include <iterator>
int main(){
std::array<int, 256> crossing; //16*16
int length,width;
while(std::cin >> width >> length){
if(width == 0 && length == 0) break;
int construction;
std::cin >> construction;
for(int i = 0; i < construction; ++i){
int con_length,con... | a.cc:2:10: fatal error: arrary: No such file or directory
2 | #include <arrary>
| ^~~~~~~~
compilation terminated.
|
s188008848 | p00438 | C++ | #include <iostream>
#include <arrary>
#include <iterator>
int main(){
int length,width;
while(std::cin >> width >> length){
std::array<int, 256> crossing; //16*16
if(width == 0 && length == 0) break;
int construction;
std::cin >> construction;
for(int i = 0; i < construction; ++i){
int con_length,co... | a.cc:2:10: fatal error: arrary: No such file or directory
2 | #include <arrary>
| ^~~~~~~~
compilation terminated.
|
s854423138 | p00438 | C++ | #include <iostream>
#include <arrary>
#include <iterator>
int main(){
int length,width;
while(std::cin >> width >> length){
std::array<int, 256> crossing; //16*16
if(width == 0 && length == 0) break;
int construction;
std::cin >> construction;
for(int i = 0; i < construction; ++i){
int con_length,co... | a.cc:2:10: fatal error: arrary: No such file or directory
2 | #include <arrary>
| ^~~~~~~~
compilation terminated.
|
s338390784 | p00438 | C++ | #include <iostream>
#include <arrary>
#include <iterator>
int main(){
int length,width;
while(std::cin >> width >> length){
std::array<int, 256> crossing; //16*16
if(width == 0 && length == 0) break;
int construction;
std::cin >> construction;
int con_length, con_width;
for(int i = 0; i < constructio... | a.cc:2:10: fatal error: arrary: No such file or directory
2 | #include <arrary>
| ^~~~~~~~
compilation terminated.
|
s040296621 | p00438 | C++ | #include <iostream>
#include <arrary>
#include <iterator>
int main(){
int length,width;
while(std::cin >> width >> length){
std::array<int, 256> crossing; //16*16
if(width == 0 && length == 0) break;
int construction;
std::cin >> construction;
for(int i = 0; i < construction; ++i){
int con_length, c... | a.cc:2:10: fatal error: arrary: No such file or directory
2 | #include <arrary>
| ^~~~~~~~
compilation terminated.
|
s427307996 | p00438 | C++ | #include <iostream>
#include <arrary>
#include <iterator>
int main(){
int length,width;
while(std::cin >> width >> length){
std::array<int, 256> crossing; //16*16
if(width == 0 && length == 0) break;
int construction;
std::cin >> construction;
for(int i = 0; i < construction; ++i){
int con_length, c... | a.cc:2:10: fatal error: arrary: No such file or directory
2 | #include <arrary>
| ^~~~~~~~
compilation terminated.
|
s685208062 | p00438 | C++ | #include <iostream>
#include <arrary>
#include <iterator>
int main(){
int length,width;
while(std::cin >> width >> length){
std::array<int, 256> crossing; //16*16
if(width == 0 && length == 0) break;
int construction;
std::cin >> construction;
for(int i = 0; i < construction; ++i){
int con_length, c... | a.cc:2:10: fatal error: arrary: No such file or directory
2 | #include <arrary>
| ^~~~~~~~
compilation terminated.
|
s423518878 | p00438 | C++ | #include <iostream>
#include <array>
#include <iterator>
int main(){
int length,width;
while(std::cin >> width >> length){
std::array<int, 256> crossing; //16*16
if(width == 0 && length == 0) break;
int construction;
std::cin >> construction;
for(int i = 0; i < construction; ++i){
int con_length, co... | a.cc: In function 'int main()':
a.cc:25:53: error: expected ';' before '!=' token
25 | for(auto itr = crossing.begin(), itr != crossing.end(), ++itr){
| ^~~
| ;
a.cc:25:54: error: expec... |
s448360858 | p00438 | C++ | #include <iostream>
#include <array>
#include <iterator>
int main(){
int length,width;
while(std::cin >> width >> length){
std::array<int, 256> crossing; //16*16
if(width == 0 && length == 0) break;
int construction;
std::cin >> construction;
for(int i = 0; i < construction; ++i){
int con_length, co... | a.cc: In function 'int main()':
a.cc:25:53: error: expected ';' before '!=' token
25 | for(auto itr = crossing.begin(), itr != crossing.end(), ++itr){
| ^~~
| ;
a.cc:25:54: error: expec... |
s292502524 | p00438 | C++ | #include <iostream>
#include <array>
#include <iterator>
int main(){
int length,width;
while(std::cin >> width >> length){
std::array<int, 256> crossing; //16*16
if(width == 0 && length == 0) break;
int construction;
std::cin >> construction;
for(int i = 0; i < construction; ++i){
int con_length, co... | a.cc: In function 'int main()':
a.cc:56:54: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
56 | std::cout << *itr << endl;
| ^~~~
| std::endl
... |
s643871845 | p00438 | C++ | #include <iostream>
#include <vector>
int main(){
u_int a; // width
u_int b; // height
while(std::cin >> a >> b){
if(a == 0 && b == 0){
break;
}
// initialization
std::vector<std::vector<u_int>> path(a+1, std::vector<int>(b+1, 1));
//for(u_int i = 0; i < a+... | a.cc: In function 'int main()':
a.cc:13:75: error: no matching function for call to 'std::vector<std::vector<unsigned int> >::vector(u_int, std::vector<int>)'
13 | std::vector<std::vector<u_int>> path(a+1, std::vector<int>(b+1, 1));
| ... |
s722612534 | p00438 | C++ | #include <cstdio>
#define REP(i,n) for(int i=0;i<(int)(n);i++)
using namespace std;
int main(){
while(1){
long long int a,b,c,d,n;
long long int way[16][16]={{0}};
bool flg;
scanf("%d%d\n",&a,&b);
if(a==0&&b==0)break;
scanf("%d\n",&n);
REP(i,n){
scanf("%d%d\n",&c,&d);
way[d-1][... | a.cc: In function 'int main()':
a.cc:35:5: error: 'cout' was not declared in this scope
35 | cout << way[b-1][a-1] << endl;
| ^~~~
a.cc:2:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
1 | #include <cstdio>
+++ |+#include <iostream... |
s317882664 | p00438 | C++ | #include <iostream>
using namespace std;
int main() {
while(1)
int a[17][17]={} ,x ,y ,n ,badpoint ,badpoint1;
cin>>x>>y>>n;
if(x==0&&y==0)
break;
for(int i=0;i<n;i++){
cin>>badpoint>>badpoint1;
a[badpoint][badpoint1]=-1;
}
a[0][1]=1;
for(int i=1;i<=x;i++){
for(int j=1;j<=y;j++){
if(a[i][j]==0)
... | a.cc: In function 'int main()':
a.cc:7:14: error: 'x' was not declared in this scope
7 | cin>>x>>y>>n;
| ^
a.cc:7:17: error: 'y' was not declared in this scope
7 | cin>>x>>y>>n;
| ^
a.cc:7:20: error: 'n' was not declared in this scope
7 | cin>... |
s441579717 | p00438 | C++ | #include<bits/stdc++.h>
using namespace std;
int area[18][18];
int a,b,n;
int ans=0;
int saiki(int x,int y){
//cout << x << ' ' << y << endl;
if(area[x][y] == -1) return 0;
if(x == a && y == b) {
// cout << 'z' << endl;
return 1;
}
ans += saiki(x,y+1);
ans += saiki(x+1,y);
return 0;
}
int main(... | a.cc: In function 'int main()':
a.cc:38:2: error: expected '}' at end of input
38 | }
| ^
a.cc:20:11: note: to match this '{'
20 | int main(){
| ^
|
s800077973 | p00438 | C++ | #include <iostream>
typedef std::pair<int, int> P;
const int MAX_AB = 16;
const int MAX_N = 40;
int N, A, B;
int dp[MAX_AB][MAX_AB];
bool obstacle[MAX_AB][MAX_AB] = {false};
void solve(){
for(int i = 0; i < B; ++i){
for(int j = 0; j < A; ++j){
if(obstacle[i][j])
continue;
... | a.cc: In function 'int main()':
a.cc:30:5: error: 'memset' was not declared in this scope
30 | memset(dp, 0, MAX_AB * MAX_AB);
| ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <iostream>
+++ |+#include <cstrin... |
s307095545 | p00438 | C++ | #include <iostream>
typedef std::pair<int, int> P;
const int MAX_AB = 16;
const int MAX_N = 40;
int N, A, B;
int dp[MAX_AB][MAX_AB];
bool obstacle[MAX_AB][MAX_AB] = {false};
void solve(){
for(int i = 0; i < B; ++i){
for(int j = 0; j < A; ++j){
if(obstacle[i][j])
continue;
... | a.cc: In function 'int main()':
a.cc:30:5: error: 'memset' was not declared in this scope
30 | memset(dp, 0, MAX_AB * MAX_AB);
| ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <iostream>
+++ |+#include <cstrin... |
s027276814 | p00438 | C++ | #include <iostream>
typedef std::pair<int, int> P;
const int MAX_AB = 16;
const int MAX_N = 40;
int N, A, B;
int dp[MAX_AB][MAX_AB];
bool obstacle[MAX_AB][MAX_AB] = {false};
void solve(){
for(int i = 0; i < B; ++i){
for(int j = 0; j < A; ++j){
if(obstacle[i][j])
continue;
... | a.cc: In function 'int main()':
a.cc:30:5: error: 'memset' was not declared in this scope
30 | memset(dp, 0, MAX_AB * MAX_AB);
| ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <iostream>
+++ |+#include <cstrin... |
s169688004 | p00438 | C++ | #include <cstdio>
#include <string>
using namespace std;
int main(){
const int size = 16 + 1;
int a, b, n, x, y;
int dp[size][size];
bool fab[size][size];
while(true){
scanf("%d%d", &a, &b);
if(a == 0 && b == 0) break;
scanf("%d", &n);
memset(fab, false, sizeof(fab));
for(int i = 0; i < n; i++){
sc... | a.cc: In function 'int main()':
a.cc:15:17: error: 'memset' was not declared in this scope
15 | memset(fab, false, sizeof(fab));
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <string>
... |
s331935303 | p00438 | C++ | #include<stdio.h>
#include<iostream>
long long int memo[20][20],j[1000000000];
long long int a,b,c,i,k=0,A,B,C;
long long int f(int x,int y){
if(memo[x][y]==-2)return 0;
if(x==1&&y==1)return 1;
if(x==1)
return memo[x][y]=f(x,y-1);
if(y==1)
return memo[x][y]=f(x-1,y);
if(memo[x][y]!=-1){
... | /tmp/ccLApzsC.o: in function `main':
a.cc:(.text+0x26d): relocation truncated to fit: R_X86_64_PC32 against symbol `B' defined in .bss section in /tmp/ccLApzsC.o
a.cc:(.text+0x277): relocation truncated to fit: R_X86_64_PC32 against symbol `A' defined in .bss section in /tmp/ccLApzsC.o
a.cc:(.text+0x295): relocation tr... |
s752713030 | p00438 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
while(1){
int int dp[100][100] = {0},built[100][100] = {0};x,y,n,X,Y,dx[] = {-1,0},dy[] = {0,-1};
dp[1][1] = 1;
scanf("%d%d%d",&x,&y,&n);
if(x == 0 && y == 0)break;
for(int i = 1;i <= n;i++){
scanf("%d%d",&X,&Y);
built[X... | a.cc: In function 'int main()':
a.cc:8:5: error: two or more data types in declaration of 'dp'
8 | int int dp[100][100] = {0},built[100][100] = {0};x,y,n,X,Y,dx[] = {-1,0},dy[] = {0,-1};
| ^~~
a.cc:8:5: error: two or more data types in declaration of 'built'
a.cc:8:54: error: 'x' was not declared in t... |
s115770572 | p00438 | C++ | #include<bits/stdc++.h>
using namespace std;
int f(int x,int y)
{
if(x == 1 && y == 1)return 1;
if(x <= 0 || y <= 0)return 0;
if(load[x][y] == 0) return f(x - 1,y) + f(x,y - 1);
return 0;
}
int main()
{
int a,b,n,x,y;
while(1){
int load[17][17] = {0};
cin >> a >> b;
if... | a.cc: In function 'int f(int, int)':
a.cc:9:8: error: 'load' was not declared in this scope
9 | if(load[x][y] == 0) return f(x - 1,y) + f(x,y - 1);
| ^~~~
|
s301499572 | p00438 | C++ | import java.util.Scanner;
public class Main {
public static void main(String[] args){
new Main();
}
public Main(){
Scanner sc = new Scanner(System.in);
while(true){
int w = sc.nextInt();
int h = sc.nextInt();
if(h==0 && w==0)break;
int[][] dp = new int[h][w];
dp[0][0] = ... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.Scanner;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
3 | public class Main {
| ^~~~~~
|
s075563009 | p00438 | C++ | #include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
int a,b,n,m=0;
int ans[100];
int con1[40],con2[40];
int road[16][16];
while(1)
{
cin>>a>>b;
if(a==0&&b==0)break;
cin>>n;
for(int i=0;i<n;i++)cin>>con1[i]>>c... | a.cc: In function 'int main()':
a.cc:25:12: error: expected ';' before '}' token
25 | m++
| ^
| ;
26 | }
| ~
|
s235622921 | p00438 | C++ | #include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
int a,b,n,m=0;
int ans[100];
int con1[40],con2[40];
int road[16][16];
while(1)
{
cin>>a>>b;
if(a==0&&b==0)break;
cin>>n;
for(int i=0;i<n;i++)cin>>con1[i]>>c... | a.cc: In function 'int main()':
a.cc:25:12: error: expected ';' before '}' token
25 | m++
| ^
| ;
26 | }
| ~
|
s444923640 | p00438 | C++ | #include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
int a,b,n,m=0;
int ans[1000];
int con1[40],con2[40];
int road[16][16];
while(1)
{
cin>>a>>b;
if(a==0&&b==0)break;
cin>>n;
for(int i=0;i<n;i++)cin>>con1[i]>>... | a.cc: In function 'int main()':
a.cc:25:12: error: expected ';' before '}' token
25 | m++
| ^
| ;
26 | }
| ~
|
s131943765 | p00438 | C++ | #include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
int a,b,n,m=0;
int ans[10000];
int con1[40],con2[40];
int road[16][16];
while(1)
{
cin>>a>>b;
if(a==0&&b==0)break;
cin>>n;
for(int i=0;i<n;i++)cin>>con1[i]>... | a.cc: In function 'int main()':
a.cc:25:12: error: expected ';' before '}' token
25 | m++
| ^
| ;
26 | }
| ~
|
s262118175 | p00438 | C++ | #include<stdio.h>
int main(void)
|
int a,b,n,x,y,i,j,dp[101][101]
scanf("%d%d%d",&a,&b,&n);
for(i=1;i<=a;i++){
for(j=1;j<b;j++){
dp[i][j]=0;
}
}
for(i=1;i<=n;i++){
scanf("%d%d",&x,&y);
dp[x][y]=-1;
}
dp[1][1]=1;
for(i=1;i<=a;i++){
for(j=1;j<=b;j++){
if(dp[i][j]!=-1){
if(dp[i+1][j]==0&&i<=a){... | a.cc:3:1: error: expected initializer before '|' token
3 | |
| ^
a.cc:6:9: error: expected unqualified-id before 'for'
6 | for(i=1;i<=a;i++){
| ^~~
a.cc:6:17: error: 'i' does not name a type
6 | for(i=1;i<=a;i++){
| ^
a.cc:6:22: error: 'i' does not n... |
s863467912 | p00438 | C++ | {
int a,b,n,x,y;
while(1){
cin>>a>>b;
if(a==0)break;
int route[a+1][b+1];
cin>>n;
for(int i=1;i<=a;i++){
for(int j=1;j<=b;j++){
route[i][j]=0;
}
}
for(int i=0;i<n;i++){
cin>>x>>y;
route[x][y]=-1;
}
route[1][1]=1;
for(int i=1;i<=a;i++){
for(int j=1;j<=b;j++){
if(route[i][j]==-1){
route[i][j]=0;
}else{
i... | a.cc:1:1: error: expected unqualified-id before '{' token
1 | {
| ^
|
s961398041 | p00438 | C++ | #include <bits/std/c++.h>
using namespace std;
#define loop(i,n) for(int i=1;i<=n;i++)
int pat[17][17];
bool out[17][17];
int solve(){
int a, b, n, x, y;
cin >> a >> b;
if (a == 0)return 0;
cin >> n;
loop(i, n){
cin >> x;
cin >> y;
out[x][y] = 1;
}
loop(i, a)pat[i][1] = 1;
loop(j, b)pat[1][j] = 1;
loop... | a.cc:1:10: fatal error: bits/std/c++.h: No such file or directory
1 | #include <bits/std/c++.h>
| ^~~~~~~~~~~~~~~~
compilation terminated.
|
s764243690 | p00438 | C++ |
#include<iostream>
#include<stdio.h>
#include<string>
#include<math.h>
#include<iomanip>
#include<algorithm>
#include<string.h>
#include<cctype>
#include<map>
#include<set>
#include<vector>
#include<sstream>
#include<stack>
#include<queue>
using namespace std;
int dir_x[2]={1,0};
int dir_y[2]={0,... | a.cc: In function 'int bfs()':
a.cc:46:32: error: reference to 'map' is ambiguous
46 | if(next_x<n&&next_y<m&&(map[next_x][next_y]==0))
| ^~~
In file included from /usr/include/c++/14/map:63,
from a.cc:10:
/usr/include/c++/14/bits/stl_map.h:102:11: note: c... |
s473278417 | p00438 | C++ |
#include<iostream>
#include<stdio.h>
#include<string>
#include<math.h>
#include<iomanip>
#include<algorithm>
#include<string.h>
#include<cctype>
#include<map>
#include<set>
#include<vector>
#include<sstream>
#include<stack>
#include<queue>
using namespace std;
int dir_x[2]={1,0};
int dir_y[2]={0,... | a.cc: In function 'int bfs()':
a.cc:46:34: error: missing template arguments before '[' token
46 | if(next_x<n&&next_y<m&&map[next_x][next_y]==0)
| ^
a.cc: In function 'int main()':
a.cc:70:8: error: redeclaration of 'int count'
70 | int count=bfs();
| ... |
s068000858 | p00438 | C++ |
#include<iostream>
#include<stdio.h>
#include<string>
#include<math.h>
#include<iomanip>
#include<algorithm>
#include<string.h>
#include<cctype>
#include<map>
#include<set>
#include<vector>
#include<sstream>
#include<stack>
#include<queue>
using namespace std;
struct stu
{
int x;
int y; ... | a.cc: In function 'int bfs()':
a.cc:55:30: error: reference to 'map' is ambiguous
55 | if((q.x<n)&&(q.y<m)&&(map[q.x][q.y]!=1))
| ^~~
In file included from /usr/include/c++/14/map:63,
from a.cc:10:
/usr/include/c++/14/bits/stl_map.h:102:11: note: candidates ... |
s888968749 | p00438 | C++ | #include<iostream>
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
using namespace std;
long long sousuu = 1, ans;
int main()
{
int machi[20][20] = { 0,0 }, a, b, n; cin >> a >> b;
bool kouji[20][20] = { false };
a--; b--;
while (scanf_s("%d",&n)) {
if (n == 0) { break; }cout << n << end... | a.cc: In function 'int main()':
a.cc:12:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
12 | while (scanf_s("%d",&n)) {
| ^~~~~~~
| scanf
|
s119418272 | p00438 | C++ | #include<iostream>
#include<cstdio>
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
using namespace std;
long long sousuu = 1, ans;
int main()
{
int machi[20][20] = { 0,0 }, a, b, n; cin >> a >> b;
bool kouji[20][20] = { false };
a--; b--;
while (scanf_s("%d",&n)) {
if (n == 0) { break; ... | a.cc: In function 'int main()':
a.cc:13:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
13 | while (scanf_s("%d",&n)) {
| ^~~~~~~
| scanf
|
s877916209 | p00438 | C++ | import Control.Monad
import Control.Applicative
main :: IO ()
main = do
[a, b] <- getInts
if (a == 0 && b == 0) then return ()
else do
n <- getInt
ss <- getIntsLines n
print $ solve [1,1] (ss ++ [[a+1, x] | x <- [1..b]] ++ [[x,b+1]|x<-[1..a]]) a b
main
solve p ss a b
| p == [a,b] = 1
| notE... | a.cc:11:50: error: too many decimal points in number
11 | print $ solve [1,1] (ss ++ [[a+1, x] | x <- [1..b]] ++ [[x,b+1]|x<-[1..a]]) a b
| ^~~~
a.cc:11:73: error: too many decimal points in number
11 | print $ solve [1,1] (ss ++ [[a+1, x] | x <- [1..... |
s989516083 | p00438 | C++ | #include <iostream>
#include <vector>
/*
substitute 0 for cannot through path
'x' and 'y' is point of construction
'row' is a
'column' is b
*/
/*
void cannotThroughPath(int x, int y, int row, int column){
int v[row][column];
if(x == 1 && y != 1){
for(int i = 0; i < column; ++i){
v[x-1][i] = 0;
}
} else if(x... | a.cc: In function 'int main()':
a.cc:60:52: error: 'column' was not declared in this scope
60 | for(int i = 0; i < column; ++i){
| ^~~~~~
a.cc:64:52: error: 'row' was not declared in this scope
64 | ... |
s574285333 | p00438 | C++ | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <cmath>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <stdlib.h>
#include <stdio.h>
#include <bitset>
#include <cstring>
using namespace std;
#define FOR(I,A,B) for(int I... | a.cc: In function 'int main()':
a.cc:35:16: error: 'x' was not declared in this scope
35 | if(ng[y][x]) dp[y][0] = 1;
| ^
a.cc:39:13: error: 'y' was not declared in this scope
39 | if(ng[y][x]) dp[0][x] = 1;
| ^
|
s904866733 | p00438 | C++ | include<iostream>
#include<queue>
using namespace std;
#include<stdio.h>
int main(void)
{
while (1)
{
int a, b, i,j, n, x, y, m[18][18] = { 0 }, c = 0;
pair<int, int> g, h;
queue<pair<int, int> > q;
scanf("%d %d", &a, &b);
if (a == 0 && b == 0)
{
break;
}
for (i = 0; i <= a + 1; i++)
{
for (j ... | 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/deque:62,
from /usr/include/c++/14/queue:62,
from a.cc:2:
/usr/include/c++/14/ext/type_t... |
s723357125 | p00438 | C++ | #include <stdio.h>
#include <queue>
#include <iostream>
using namespace std;
??
int main (){
??
while (1){
??
int a,b,s,k,s2,i[18][18]={0},count=0;
??
stack <pair<int,int> > que;
??
pair <int,int> p,g;
??
p.first=1;
p.second=1;
??
que.push(p);
??
scanf ("%d %d",&a,&b);
??
if (a==0&&b==0) break;
??
for (s=0;s<=a+1;s++){... | a.cc:5:1: error: expected unqualified-id before '?' token
5 | ??
| ^
|
s851267226 | p00438 | C++ | #include <stdio.h>
#include <queue>
#include <iostream>
using namespace std;
??
int main (){
??
while (1){
??
int a,b,s,k,s2,i[18][18]={0},count=0;
??
queue <pair<int,int> > que;
??
pair <int,int> p,g;
??
p.first=1;
p.second=1;
??
que.push(p);
??
scanf ("%d %d",&a,&b);
??
if (a==0&&b==0) break;
??
for (s=0;s<=a+1;s++){... | a.cc:5:1: error: expected unqualified-id before '?' token
5 | ??
| ^
|
s421017876 | p00438 | C++ | #include<iostream>
#include<string>
#include<vector>
#include<utility>
#include<queue>
#include<algorithm>
#include<cmath>
#define INF 2147483647
#define IN 2047483647
#define llINF 9223372036854775807
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define ll long long
using namespace std;... | a.cc: In function 'int main()':
a.cc:24:9: error: no matching function for call to 'fill(int [(a * 2)][(b * 2)], int)'
24 | fill(dp,IN);
| ~~~~^~~~~~~
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/incl... |
s863246421 | p00438 | C++ | #include<iostream>
#include<string>
#include<vector>
#include<utility>
#include<queue>
#include<algorithm>
#include<cmath>
#define INF 2147483647
#define IN 2047483647
#define llINF 9223372036854775807
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define ll long long
using namespace std;... | a.cc: In function 'int main()':
a.cc:24:9: error: no matching function for call to 'fill(int [(a * 2)][(b * 2)], int)'
24 | fill(dp,IN);
| ~~~~^~~~~~~
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/incl... |
s343395573 | p00438 | C++ | #include<iostream>
using namespace std;
bool cant[20][20];
ll mp[20][20];
int a,b,ans;
int main()
{
while(cin >> a >> b,a)
{
for(int i = 0;i < 20;i++)for(int j = 0;j < 20;j++)
{
mp[i][j] = 0;
cant[i][j] = false;
}
ans = 0;
int n;
cin >> n;
for(int i = 0;i < n;i++)
{
int x,y;
cin >... | a.cc:6:1: error: 'll' does not name a type
6 | ll mp[20][20];
| ^~
a.cc: In function 'int main()':
a.cc:15:25: error: 'mp' was not declared in this scope
15 | mp[i][j] = 0;
| ^~
a.cc:33:25: error: 'mp' was not declared in this scope
33 | ... |
s620554654 | p00438 | C++ | #include<bits/stdc++.h>
#include<windows.h>
using namespace std ;
typedef pair<int,int> pii ;
int a = 0 ;
int b = 0 ;
int n = 0 ;
int dp[16][16] = {1} ;
vector<pii> construct ;
int inf = pow(10,9) ;
int solve()
{
for ( int i = 0 ; i < 16 ; i++ )
{
for ( int j = 0 ; j < 16 ; j++ )
{
dp[i][j] = 0 ;
... | a.cc:2:9: fatal error: windows.h: No such file or directory
2 | #include<windows.h>
| ^~~~~~~~~~~
compilation terminated.
|
s471206796 | p00438 | C++ | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
#define INF (1<<30)
#define INFLL (1ll<<60)
typedef pair<int, int> P;
typedef pair<ll, P> E;
#define MOD (1000000007ll)
#define l_ength size
#define PI 3.14159265358979
void mul_mod(ll& a, ll b){
a *= b;
a %= MOD;
}
void add_mod(ll& a, ll b... | a.cc: In function 'int main()':
a.cc:25:5: error: expected initializer before 'll'
25 | ll dp[20][20];
| ^~
a.cc:37:17: error: 'j' was not declared in this scope
37 | for(j=0; j<b; ++j){
| ^
a.cc:39:21: error: 'dp' was not declared in this scope; did you mean 'dup'?... |
s204469890 | p00438 | C++ | #include<stdio.h>
int a,b,cnt,flg[20][20],x,y;
int main(void)
{
int n,i;
while(1){
scanf("%d%d",&a,&b);
if(a==0&&b==0) break;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d",&x,&y);
flg[x][y]=1;
}
cnt=0;
func(1,1);
printf("%d\n",cnt);
}
return 0;
}
int func(int x1,int y1){
// printf("x1=%d y1=... | a.cc: In function 'int main()':
a.cc:15:17: error: 'func' was not declared in this scope
15 | func(1,1);
| ^~~~
a.cc: In function 'int func(int, int)':
a.cc:27:1: warning: no return statement in function returning non-void [-Wreturn-type]
27 | }
| ^
|
s358088032 | p00438 | C++ | #include<stdio.h>
int a,b,cnt,flg[20][20],x,y;
int main(void)
{
int n,i;
while(1){
scanf("%d%d",&a,&b);
if(a==0&&b==0) break;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d",&x,&y);
flg[x][y]=1;
}
cnt=0;
func(1,1);
printf("%d\n",cnt);
}
return 0;
}
int func(int x1,int y1){
if(x1==a&&y1==b) cnt... | a.cc: In function 'int main()':
a.cc:15:17: error: 'func' was not declared in this scope
15 | func(1,1);
| ^~~~
a.cc: In function 'int func(int, int)':
a.cc:26:1: warning: no return statement in function returning non-void [-Wreturn-type]
26 | }
| ^
|
s744070990 | p00438 | C++ | #include<stdio.h>
int a,b,cnt,flg[20][20],x,y;
int main(void)
{
int n,i,j;
while(1){
scanf("%d%d",&a,&b);
if(a==0&&b==0) break;
scanf("%d",&n);
for(i=0;i<a;i++){
for(j=0;j<b;j++) flg[i][j]=0;
}
for(i=0;i<n;i++){
scanf("%d%d",&x,&y);
flg[x][y]=1;
}
cnt=0;
func(1,1);
printf("%d\n",cnt);
}
... | a.cc: In function 'int main()':
a.cc:18:17: error: 'func' was not declared in this scope
18 | func(1,1);
| ^~~~
a.cc: In function 'int func(int, int)':
a.cc:30:1: warning: no return statement in function returning non-void [-Wreturn-type]
30 | }
| ^
|
s370983596 | p00438 | C++ | #include<stdio.h>
int a,b,cnt,flg[50][50],x,y;
int main(void)
{
int n,i,j;
while(1){
scanf("%d%d",&a,&b);
if(a==0&&b==0) break;
scanf("%d",&n);
for(i=0;i<a;i++){
for(j=0;j<b;j++) flg[i][j]=0;
}
for(i=0;i<n;i++){
scanf("%d%d",&x,&y);
flg[x][y]=1;
}
cnt=0;
func(1,1);
printf("%d\n",cnt);
}
... | a.cc: In function 'int main()':
a.cc:18:17: error: 'func' was not declared in this scope
18 | func(1,1);
| ^~~~
a.cc: In function 'int func(int, int)':
a.cc:30:1: warning: no return statement in function returning non-void [-Wreturn-type]
30 | }
| ^
|
s330435927 | p00438 | C++ | #include<stdio.h>
int a,b,cnt,flg[50][50],x,y;
int main(void)
{
int n,i,j;
while(1){
scanf("%d%d",&a,&b);
if(a==0&&b==0) break;
scanf("%d",&n);
for(i=0;i<a;i++){
for(j=0;j<b;j++) flg[i][j]=0;
}
for(i=0;i<n;i++){
scanf("%d%d",&x,&y);
flg[x][y]=1;
}
cnt=0;
func(1,1);
printf("%d\n",cnt);
}
... | a.cc: In function 'int main()':
a.cc:18:17: error: 'func' was not declared in this scope
18 | func(1,1);
| ^~~~
a.cc: In function 'int func(int, int)':
a.cc:30:1: warning: no return statement in function returning non-void [-Wreturn-type]
30 | }
| ^
|
s845079264 | p00438 | C++ | #include<stdio.h>
int a,b,cnt,flg[50][50],x,y;
int main(void)
{
int n,i,j;
while(1){
scanf("%d%d",&a,&b);
if(a==0&&b==0) break;
scanf("%d",&n);
for(i=0;i<a;i++){
for(j=0;j<b;j++) flg[i][j]=0;
}
for(i=0;i<n;i++){
scanf("%d%d",&x,&y);
flg[x][y]=1;
}
cnt=0;
func(1,1);
printf("%d\n",cnt);
}
... | a.cc: In function 'int main()':
a.cc:18:17: error: 'func' was not declared in this scope
18 | func(1,1);
| ^~~~
a.cc: In function 'int func(int, int)':
a.cc:30:1: warning: no return statement in function returning non-void [-Wreturn-type]
30 | }
| ^
|
s775282258 | p00438 | C++ | #include<stdio.h>
int a,b,cnt,flg[50][50],x,y;
int main(void)
{
int n,i,j;
while(1){
scanf("%d%d",&a,&b);
if(a==0&&b==0) break;
scanf("%d",&n);
for(i=0;i<a;i++){
for(j=0;j<b;j++) flg[i][j]=0;
}
for(i=0;i<n;i++){
scanf("%d%d",&x,&y);
flg[x][y]=1;
}
cnt=0;
func(1,1);
printf("%d\n",cnt);
}
... | a.cc: In function 'int main()':
a.cc:18:17: error: 'func' was not declared in this scope
18 | func(1,1);
| ^~~~
a.cc: In function 'int func(int, int)':
a.cc:30:1: warning: no return statement in function returning non-void [-Wreturn-type]
30 | }
| ^
|
s506000692 | p00438 | C++ | #include <iostream>
#include <vector>
int main(){
int a,b;
while(std::cin >> a >> b){
if(a==0&&b==0) break;
std::cin >> int n;
std::vector<std::vector<int>> map(a,vector<int>(b,1)); //地図
for(int i=0;i<n;++i){
std::cin >> int x >> int y;
map[x][y]=0;
}
for(int i=1;i<a;++i){
for(int j=1;j<b;++j... | a.cc: In function 'int main()':
a.cc:9:29: error: expected primary-expression before 'int'
9 | std::cin >> int n;
| ^~~
a.cc:10:53: error: 'vector' was not declared in this scope
10 | std::vector<std::vector<int>> map(a,vector<int>(b,1)); //地図
... |
s240963658 | p00438 | C++ | #include <iostream>
#include <vector>
int main(){
int a,b;
while(std::cin >> a >> b){
if(a==0&&b==0) break;
std::cin >> int n;
std::vector<std::vector<int>> map(a,std::vector<int>(b,1)); //地図
for(int i=0;i<n;++i){
std::cin >> int x >> int y;
map[x][y]=0;
}
for(int i=1;i<a;++i){
for(int j=1;j<... | a.cc: In function 'int main()':
a.cc:9:29: error: expected primary-expression before 'int'
9 | std::cin >> int n;
| ^~~
a.cc:12:31: error: 'n' was not declared in this scope
12 | for(int i=0;i<n;++i){
| ^
a.cc:1... |
s576529991 | p00438 | C++ | #include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
int main(){
int n,m,i,j,k,xmax;
while(1){
xmax=0;
cin >> n >> m;
if(n == 1 && m ==1){
cout << 1 << end;
continue;
}
if(n == 0 && m == 0)break;
int MP[m+1][n+1];
for(i=1;i<=m;i++){
for(j=1;j<=... | a.cc: In function 'int main()':
a.cc:12:17: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
12 | cout << 1 << end;
| ~~~~~~~~~~^~~~~~
In file included from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr... |
s912205589 | p00438 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
int a;
int b;
int n;
int d;
int e;
int f;
int g;
while(cin >>a){
cin >> b;
if(a==0){break;}
cin >> n;
int c[a][b];
d=0;
while(d<a){
g=0;
while(g<b){
c[d][g]=-1;
g=g+1;}
d=d+1;}
d=0;
while(d<n){
cin >>e;
cin >>f;
c[e-1][f-1]=0;
d=d+1;}
c[0][0]=1;
d=1... | a.cc: In function 'int main()':
a.cc:33:33: error: expected ';' before '}' token
33 | if(c[d][0]!=0){c[d][0]=c[d-1][0]}
| ^
| ;
a.cc:37:33: error: expected ';' before '}' token
37 | if(c[0][d]!=0){c[0][d]=c[0][d-1]}
| ... |
s548224007 | p00438 | C++ | #include<cstdio>
#include<iostream>
using namespace std;
int main(){
int a,b;
int cnt=0;
intm[16]={0};
while(scanf("%d%d",&a,&b),a,b){
int ro[32][32]={{0}};
ro[0][1]=1;
int n;
scanf("%d",&n);
int x,y;
for(int i=0;i<n;i++){
scanf("%d%d",&x,&y);... | a.cc: In function 'int main()':
a.cc:8:5: error: 'intm' was not declared in this scope; did you mean 'int'?
8 | intm[16]={0};
| ^~~~
| int
a.cc:25:9: error: 'm' was not declared in this scope
25 | m[cnt]=ro[b][a];
| ^
a.cc:29:23: error: 'm' was not declared in this s... |
s949191898 | p00438 | C++ | #include<iostream>
using namespace std;
int main(){
whie(1){
int a,b,n,x,y,dp[18][18];
bool c[18][18];
for(int i=0;i<18;i++)for(int j=0;j<18;j++){dp[i][j]=0; c[i][j]=true;}
scanf("%d%d",&a,&b);
if(a==0&&b==0)break;
scanf("%d",&n);
for(int i=0;i<n;i++){
scanf("%d%d",&x,&y);
c[x][y]=false;
}
dp[1][1]=1;
for(... | a.cc: In function 'int main()':
a.cc:5:1: error: 'whie' was not declared in this scope
5 | whie(1){
| ^~~~
|
s471538149 | p00438 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
int main()
{
int a,b;
while(cin>>a>>b,a)
{
int dp[b+1][a+1];
memset(dp,0,sizeof(dp));
dp[1][1]=1;
int n; cin>>n;
bool flag[b+1][a+1];
memset(flag,0,sizeof(flag));
for(int i = 0; i < n; ++i)
{
int s,t; cin>>s>>t;
flag[t][s]=true;
}
... | a.cc: In function 'int main()':
a.cc:10:17: error: 'memset' was not declared in this scope
10 | 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>
+++ ... |
s831645680 | p00438 | C++ | #include<iostream>
#include<string>
#include<vector>
using namespace std;
int FindRoad(const vector<vector<int> >& road, int x, int y);
int h,w;
int n;
int dummy = 0;
int result = 0;
int main(void) {
int x,y;
vector<vector<int> > road(18,vector<int>(18));
cin >> w >> h;
while(w != 0 && h != 0) {
cin >> ... | a.cc: In function 'int FindRoad(const std::vector<std::vector<int> >&, int, int)':
a.cc:39:37: error: return-statement with no value, in function returning 'int' [-fpermissive]
39 | if( x == w && y == h) { result++; return; }
| ^~~~~~
|
s497932148 | p00438 | C++ | /* AOJ 0515 School Road */
#include <iostream>
using namespace std;
const int MAX_A = 16;
const int MAX_B = 16;
int n_routes[MAX_A + 1][MAX_B + 1];
bool closed[MAX_A + 1][MAX_B + 1];
int a, b;
void setup();
void solve();
int
main()
{
for (;;) {
cin >> a >> b;
if (a == 0 && b == 0) break;
... | a.cc: In function 'void setup()':
a.cc:37:5: error: 'memset' was not declared in this scope
37 | memset(n_routes, 0, sizeof n_routes);
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include <iostream>
+++ |+#include... |
s724758887 | p00438 | C++ | #include<iostream>
#include<queue>
#include<map>
using namespace std;
int mas[1000][1000];
int x[2]={1,0},y[2]={0,1};
typedef pair<int,int>P;
int road(int,int);
int main(){
int h,w,cnt,n,x,y;
while(1){
cin >> h >> w;
if(h==0 && w==0){
break;
}
cin >> n;
memset(mas,0,sizeof(mas));
... | a.cc: In function 'int main()':
a.cc:18:5: error: 'memset' was not declared in this scope
18 | memset(mas,0,sizeof(mas));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include<map>
+++ |+#include <cstring>
4 | ... |
s480301168 | p00438 | C++ |
#include<iostream>
using namespace std;
int construct[17][17], dp[17][17], W, H, N;
int main()
{
loop:
cin >> W >> H;
if(!W | a.cc: In function 'int main()':
a.cc:10:8: error: expected ')' at end of input
10 | if(!W
| ~ ^
| )
a.cc:10:8: error: expected statement at end of input
a.cc:10:8: error: expected '}' at end of input
a.cc:7:1: note: to match this '{'
7 | {
| ^
|
s907281792 | p00438 | C++ | import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
//while(true){
int w = sc.nextInt();
int h = sc.nextInt();
//if(w==0&&h==0)break;
int n = sc.nextInt();
boolean map[][]=new boolean[w+1][h+1];
for(int i=0;i<n;i++)map[sc... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.Scanner;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: expected unqualified-id before 'public'
2 | public class Main{
| ^~~~~~
|
s732890978 | p00438 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
#include <map>
//#include <fstream>
int count_course(const u_int a, const u_int b, const std::map<u_int, std::vector<u_int>> &point)
{
auto it = point.find(a);
if(it != point.end()){
std::vector<u_int> vec = it -> second;
if((std::find(... | a.cc: In function 'int main()':
a.cc:47:14: error: 'get_course' was not declared in this scope; did you mean 'count_course'?
47 | m += get_course(a, b, point);
| ^~~~~~~~~~
| count_course
|
s084597490 | p00438 | C++ | #include <iostream>
#include <array>
//#include <fstream>
int main()
{
const u_int max_point = 16;
u_int a, b, n, x, y;
std::ifstream ifs("515.txt");
while(1){
std::cin /*ifs*/ >> a >> b;
if(a == 0 && b == 0)
break;
std::array<std::array<u_int, max_point>, m... | a.cc: In function 'int main()':
a.cc:9:22: error: variable 'std::ifstream ifs' has initializer but incomplete type
9 | std::ifstream ifs("515.txt");
| ^
a.cc:3:1: note: 'std::ifstream' is defined in header '<fstream>'; this is probably fixable by adding '#include <fstream>'
2 | #i... |
s198014493 | p00438 | C++ | #include <iostream>
#include <vector>
/*動的計画法で解く*/
int main(){
//入力1行目
int a, b;
std::cin >> a >> b;
//入力2行目
int n;
std::cin >> n;
//二次元のベクタ用意(a*b) dpはパターン数をいれる 1で初期化しておく(結局上書き)
std::vector<std::vector<int> > dp(a, std::vector<int>(b, 1));
//工事中の点に0をいれる
int x, y;
for(int i = 0; i < n; ++i){
std::cin >> x ... | a.cc:13:37: error: extended character is not valid in an identifier
13 | std::vector<std::vector<int> > dp(a, std::vector<int>(b, 1));
| ^
a.cc: In function 'int main()':
a.cc:13:39: error: template argument 1 is invalid
13 | std::vector<std::vector<int>... |
s875206961 | p00438 | C++ | #include <iostream>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <vector>
#include <map>
#include <string>
#define loop(lp) for(int lp2 = 0; lp2 < lp; lp2 ++)
#define ascent(i, a, b) for(int i = a; i < b; i ++)
#define pb push_back
//#define pair<int, int> ii
using namespace std;
int dp[20][20]... | a.cc: In function 'int main()':
a.cc:34:9: error: 'memset' was not declared in this scope
34 | memset(dp, 0, sizeof(dp));
| ^~~~~~
a.cc:7:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
6 | #include <map>
+++ |+#include <cstring>... |
s938853353 | p00438 | C++ | #include <iostream>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <vector>
#include <map>
#include <string>
#define loop(lp) for(int lp2 = 0; lp2 < lp; lp2 ++)
#define ascent(i, a, b) for(int i = a; i < b; i ++)
#define pb push_back
//#define pair<int, int> ii
using namespace std;
int dp[200][20... | a.cc: In function 'int main()':
a.cc:34:9: error: 'memset' was not declared in this scope
34 | memset(dp, 0, sizeof(dp));
| ^~~~~~
a.cc:7:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
6 | #include <map>
+++ |+#include <cstring>... |
s019028476 | p00438 | C++ | #include <iostream>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <vector>
#include <map>
#include <string>
#define loop(lp) for(int lp2 = 0; lp2 < lp; lp2 ++)
#define ascent(i, a, b) for(int i = a; i < b; i ++)
#define pb push_back
using namespace std;
int dp[200][200];
int main() {
int a, b;
... | a.cc: In function 'int main()':
a.cc:32:9: error: 'memset' was not declared in this scope
32 | memset(dp, 0, sizeof(dp));
| ^~~~~~
a.cc:7:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
6 | #include <map>
+++ |+#include <cstring>... |
s419456485 | p00439 | Java | n,k = map(int,input().split())
a = [int(input()) for i in range(n)]
unko = [0]
for i in range(n):
unko.append(unko[i]+a[i])
inf = float("inf")*(-1)
mvl = inf
for i in range(n-k+1):
if unko[i+k]-unko[i] >= mvl:
mvl = unko[i+k]-unko[i]
print(mvl)
| Main.java:1: error: class, interface, enum, or record expected
n,k = map(int,input().split())
^
1 error
|
s484611594 | p00439 | Java |
public class Main {
public static class BIT {
int[] dat;
public BIT(int n){
dat = new int[n + 1];
}
public void add(int k, int a){ // k : 0-indexed
for(int i = k + 1; i < dat.length; i += i & -i){
dat[i] += a;
}
}
public int sum(int s, int t){ // [s, t)
if(s > 0) return sum(0, ... | Main.java:29: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:29: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s102773721 | p00439 | Java | #include<stdio.h>
#include<iostream>
#include<math.h>
#include<chrono>
#include<string>
using namespace std;
int main() {
int nsize;
int ksize;
int a[100000];
while (true) {
cin >> nsize >> ksize;
if (nsize == 0 && ksize == 0)break;
for (int i = 0; i < nsize; i++) {
cin >> a[i];
}
int maxva... | Main.java:1: error: illegal character: '#'
#include<stdio.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include<stdio.h>
^
Main.java:2: error: illegal character: '#'
#include<iostream>
^
Main.java:3: error: illegal character: '#'
#include<math.h>
^
Main.java:4: error: illegal character: '... |
s527513194 | p00439 | C | #include<stdio.h>
int main(){
int n,k;
int i,j,u[5],v=0;
int a[100000],sum=0,x=0;
while(scanf("%d%d",&n,&k),n!=0 && k!=0){
for(i=0;i<n;i++) scanf("%d",&a[i]);
for(i=0;i<n-k+1;i++){
for(j=0;j<k;j++) sum+=a[j]:
if(sum>w) w=sum;
}
u[v]=w,v++;
sum=0;
}
for(i=0;i<v;i++) printf("%d\n",u[i]);
return 0;
... | main.c: In function 'main':
main.c:9:51: error: expected ';' before ':' token
9 | for(j=0;j<k;j++) sum+=a[j]:
| ^
| ;
main.c:12:22: error: 'w' undeclared (first use in this functio... |
s303814815 | p00439 | C | #include<stdio.h>
int main(){
int n,k;
int i,j,u[5],v=0;
int a[100000],sum=0,x=0;
while(scanf("%d%d",&n,&k),n!=0 && k!=0){
for(i=0;i<n;i++) scanf("%d",&a[i]);
for(i=0;i<n-k+1;i++){
for(j=0;j<k;j++) sum+=a[j]:
if(sum>w) w=sum;
sum=0;
}
u[v]=w,v++;
}
for(i=0;i<v;i++) printf("%d\n",u[i]);
return 0;... | main.c: In function 'main':
main.c:9:51: error: expected ';' before ':' token
9 | for(j=0;j<k;j++) sum+=a[j]:
| ^
| ;
main.c:13:22: error: 'w' undeclared (first use in this functio... |
s511828544 | p00439 | C | #include<stdio.h>
int main()
{
int n,k,i,sum,max;
int a[100000];
while(scanf("%d%d",&n,&k),n+k){
max=0;
for(i=0;i<n;i++) scanf("%d",&a[i]);
for(i=0;i<n-k;i++){
sum=0;
for(j=i;j<i+k;j++){
sum+=a[j];
if(max<sum) max=sum;
... | main.c: In function 'main':
main.c:15:17: error: 'j' undeclared (first use in this function)
15 | for(j=i;j<i+k;j++){
| ^
main.c:15:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:23:1: error: expected declaration or statement at end... |
s676334099 | p00439 | C | #include <stdio.h>
#include <stdlib.h>
#define INFILE "input.txt"
#define???OUTFILE "output.txt"
signed int a[100000],ans;
unsigned int n,k;
FILE*fp,*fq;
void solve(void){
int i,diff;
ans = 0;
for(i = 0;i < k;i++)ans += a[i];
diff = 0;
while(i < n){
diff += a[i];
diff -= a[i - k];
if(diff > 0){
ans += d... | main.c:4:8: error: macro names must be identifiers
4 | #define???OUTFILE "output.txt"
| ^
main.c: In function 'inp':
main.c:29:16: error: passing argument 1 of 'fscanf' from incompatible pointer type [-Wincompatible-pointer-types]
29 | fscanf("%d%d",&n,&k);
| ^~~~~~
... |
s474258053 | p00439 | C | #include <stdio.h>
#include <stdlib.h>
#define INFILE "input.txt"
#define???OUTFILEPYON "output.txt"
signed int a[100000],ans;
unsigned int n,k;
FILE*fp,*fq;
void solve(void){
int i,diff;
ans = 0;
for(i = 0;i < k;i++)ans += a[i];
diff = 0;
while(i < n){
diff += a[i];
diff -= a[i - k];
if(diff > 0){
ans ... | main.c:4:8: error: macro names must be identifiers
4 | #define???OUTFILEPYON "output.txt"
| ^
main.c: In function 'inp':
main.c:29:16: error: passing argument 1 of 'fscanf' from incompatible pointer type [-Wincompatible-pointer-types]
29 | fscanf("%d%d",&n,&k);
| ^~~~~~
... |
s300612122 | p00439 | C | #include <stdio.h>
int c[100000],d[100000]
int main(){
int a,b,e,i,j;
while(1){
scanf("%d %d",&a,&b);
if(a==0&&b==0){
return 0;
}
for(i=0;i<a;i++){
scanf("%d",&c[i]);
}
for(i=0;i<a-b+1;i++){
d[i]=0;
for(j=i;j<b+i;j++){
d[i]+=c[j];
}
}
for(i=0;i<a-b+1;i++){
for(j=0;j<a-b-1;j++){
if(c[j]<=c... | main.c:3:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
3 | int main(){
| ^~~
|
s271799160 | p00439 | C | #include<stdio.h>
int solve(void){
int a,i,k,n,kei=0,ans=-1000000000;
static int wa[100001]={0};
scanf("%d %d",&n,&k);
if(n==0){return 1;}
for(i=1;i<=N;i++){
scanf("%d",&a);
kei+=a;
wa[i]=kei;
}
for(i=0;i<=n-k;i++){
a=wa[i+k]-wa[i];
if(ans<a){ans=a;}
}
printf("%d\n",ans);
return 0;
}
int main(void){
while(solve()==0){}... | main.c: In function 'solve':
main.c:7:12: error: 'N' undeclared (first use in this function)
7 | for(i=1;i<=N;i++){
| ^
main.c:7:12: note: each undeclared identifier is reported only once for each function it appears in
|
s829631969 | p00439 | C | #include <stdio.h>
#define rep(i,j,k) for(i = j;i <= k;i++)
int main(){
int n,k,a[100000],max,temp;
while(1){
int i,j;
scanf("%d%d",&n,&k);
rep(i,0,n-1){
scanf("%d",&a[i]);
}
max = 0;
temp = 0;
rep(i,0,k-1){
max += a[i]
}
rep(i,1,n-k){
rep(j,i,i+k... | main.c: In function 'main':
main.c:17:20: error: expected ';' before '}' token
17 | max += a[i]
| ^
| ;
18 | }
| ~
|
s810040849 | p00439 | C | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
int i,j;
__int64 n,k,a[100005],x,ans;
int comp(const void *p,const void *q){
return *(int *)p-*(int *)q;
}
int main(){
scanf("%lld %lld",&n,&k);
while(n!=0 && k!=0){
a[0]=0,a[1]=0;
for(i=1;i<=n;i++){
scanf("%lld",&x);
a[i]+=x;
if(i<n)a[i+1]=a[i];... | main.c:6:1: error: unknown type name '__int64'; did you mean '__int64_t'?
6 | __int64 n,k,a[100005],x,ans;
| ^~~~~~~
| __int64_t
|
s561174923 | p00439 | C | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
int i,j;
__int64 n,k,a[100005],x,ans;
int comp(const void *p,const void *q){
return *(int *)p-*(int *)q;
}
int main(){
scanf("%lld %lld",&n,&k);
while(n!=0 && k!=0){
a[0]=0,a[1]=0;
for(i=1;i<=n;i++){
scanf("%lld",&x);
a[i]+=x;
if(i<n)a[i+1]=a[i];... | main.c:6:1: error: unknown type name '__int64'; did you mean '__int64_t'?
6 | __int64 n,k,a[100005],x,ans;
| ^~~~~~~
| __int64_t
|
s774284004 | p00439 | C | #include<stdio.h>
#define rep(i,n) for((i)=0;(i)<(int)(n);(i)++)
int max(int,int);
int main(void){
int i,n,k,a[100001],sum;
while(scanf("%d %d",&n,&k),n,k){
sum=0;
rep(i,n)scanf("%d",&a[i]);
rep(i,k)sum+=a[i];
for(i=1;m<k;i++,m++)
ans=(ans>sum+=a[m]-a[i])?ans:sum+=a[m]-a[i];
}
return ... | main.c: In function 'main':
main.c:13:13: error: 'm' undeclared (first use in this function)
13 | for(i=1;m<k;i++,m++)
| ^
main.c:13:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:14:7: error: 'ans' undeclared (first use in this function)
14... |
s789431129 | p00439 | C | #include <iostream>
#include <algorithm>
using namespace std;
int main( void )
{
int n, k, input[5000];
while(cin >> n >> k, n | k) {
int sum = 0;
for(int i=0; i < n; ++i) {
cin >> input[i];
if(i < k) sum += input[i];
}
int i, j, ans = sum;
i = 0; j = k-1;
while(j < n-1) {
sum -= input[i++];
... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s514225861 | p00439 | C | #include<stdio.h>
int main(){
int n,k,max=0;
int val;
int sumArray[1000003];
scanf("%d %d",&n,&k);
for(int i=0;i<n;i++){
scanf("%d",&val);
if(i == 0)sumArray[i]=val;
else sumArray[i]=sumArray[i-1]+val;
}
max = sumArray[k-1];
for(int i=k;i<n;i++){
if(sumArray[i]-sumArray[i-k] > max)max=sumArray[i]-sumArr... | main.c: In function 'main':
main.c:21:8: warning: missing terminating " character
21 | printf("%d\",&max);
| ^
main.c:21:8: error: missing terminating " character
21 | printf("%d\",&max);
| ^~~~~~~~~~~~
main.c:22:1: error: expected expression before 'return'
22 | return 0;
| ^~~... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.