submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s879178562 | p00207 | C++ | #include<stdio.h>
#include<windows.h>
int main(void)
{
int w,h;
int map[101][101];
int st[2],go[2];
int i,j,k,l,m;
int num;
int b_c,b_ang,b_x,b_y;
int sign;
int ans;
int maps=0;
for(;;)
{
ans=0;
for(i=0;i<100;i++)
{
for(j=0;j<100;j++)
map[i][j]=0;
}
scanf("%d%d",&w,&h);
if(w==0 ... | a.cc:2:9: fatal error: windows.h: No such file or directory
2 | #include<windows.h>
| ^~~~~~~~~~~
compilation terminated.
|
s815595266 | p00207 | C++ | #include<iostream>
bool flag;
int n,sx,sy,gx,gy,col;
void erase(int** field){
for(int i=0; i<102; i++)
for(int j=0; j<102; j++)
field[i][j] = 0;
}
void DFS(int x, int y, int** field){
int xx = x+1;
int yy = y;
if(xx == gx && yy == gy){
flag = true;
return;
}
if(field[yy][xx] == col)
DFS(xx, yy, fi... | a.cc: In function 'int main()':
a.cc:52:23: error: cannot convert 'int (*)[102]' to 'int**'
52 | erase(field);
| ^~~~~
| |
| int (*)[102]
a.cc:6:18: note: initializing argument 1 of 'void erase(int**)'
6 | void ... |
s061382726 | p00207 | C++ | #include<iostream>
int field[102][102];//y,x
bool flag;
int sx,sy,gx,gy,col;
void erase(){
for(int i=0; i<102; i++)
for(int j=0; j<102; j++)
field[i][j] = 0;
}
void DFS(int x, int y){
if(sx < gy)
DFSr(x,y);
else
DFSl(x,y);
}
void DFSr(int x, int y){
if(field[y][x] != col)
return;
if(x == gx && y == ... | a.cc: In function 'void DFS(int, int)':
a.cc:15:17: error: 'DFSr' was not declared in this scope; did you mean 'DFS'?
15 | DFSr(x,y);
| ^~~~
| DFS
a.cc:17:17: error: 'DFSl' was not declared in this scope; did you mean 'DFS'?
17 | DFSl(x,y... |
s230321144 | p00207 | C++ | #include <iostream>
int m[101][101];
int w,h,r,gx,gy;
void dfs(int x,int y,int c){
if(!(x-gx)&&!(y-gy))r=1;
if(x>0&&m[x-1][y]==c)m[x-1][y]=0,dfs(x-1,y,c);
if(x<w&&m[x+1][y]==c)m[x+1][y]=0,dfs(x+1,y,c);
if(y>0&&m[x][y-1]==c)m[x][y-1]=0,dfs(x,y-1,c);
if(y<h&&m[x][y+1]==c)m[x][y+1]=0,dfs(x,y+1,c);
return ;
}
int ma... | a.cc: In function 'int main()':
a.cc:17:9: error: 'point' was not declared in this scope
17 | point sp,bp;
| ^~~~~
|
s597416870 | p00207 | C++ | #include<stdio.h>
#include<string.h>
int gx,gy,m[128][128];
int F(int x,int y,int c)
{
if(x==gx&&y==gy)
return 1;
if(m[y][x]!=c)
return 0;
m[y][x]=-c;
int d[]={0,1,0,-1,0},i,f;
for(i=f=0;i<4;++i)
f=f||F(x+d[i],y+d[i+1],c);
return f;
}
int main()
{
int w,h,sx,sy,x,y,n,c,d,i,j;
while(scanf("%d%d",&w,&h),w)
... | a.cc: In function 'int main()':
a.cc:29:26: error: expected ';' before ')' token
29 | }j<=w;++j)printf("%c",".@#$%*"[m[i][j]]);
| ^
| ;
|
s143901893 | p00207 | C++ | #include<cfloat>
#include<cstring>
#define foreach(t,p,it) for(t::iterator it=p.begin(),it!=p.end(),++it)
#define all(p) p.begin(),p.end()
#define rep(i,n) for(int i=0;i<n;i++)
#define REP(n) rep(i,n)
using namespace std;
const int W=210,H = 210;
int block[W][H];
int ans;
int w,h,xs,ys,xg,yg,n,c,d,x,y;
void solve(int... | a.cc: In function 'int main()':
a.cc:32:11: error: 'cin' was not declared in this scope
32 | while(cin >> w >> h )
| ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
2 | #include<cstring>
+++ |+#include <iostream>
... |
s079509017 | p00207 | C++ | #include<iostream>
#include<vector>
using namespace std;
void PutBlock(vector< vector<int> >&, int, int, int, int);
void CheckMaze1(vector< vector<int> >&, int&, int, int, int, int, int);
void CheckMaze2(vector< vector<int> >&, int&, int, int, int, int, int);
int main(){
int k, i, j, w, h, n, xs, ys, xg, yg, c, d,... | a.cc: In function 'int main()':
a.cc:18:36: error: no matching function for call to 'std::vector<std::vector<int> >::vector(int&, int&)'
18 | vector< vector<int> > data(h, w);
| ^
In file included from /usr/include/c++/14/vector:66,
from a.cc:2:
/usr/incl... |
s351182782 | p00207 | C++ | #include <iostream>
#include <queue>
using namespace std;
#define rep(i,n) for(int i = 0; i < n; i++)
#define MAX 50
int dx[] = {0,0,-1,1},
dy[] = {1,-1,0,0};
typedef pair<int,int> P;
P S,G;
int w,h;
int maze[MAX][MAX];
int color;
bool check()
{
queue<P> que;
que.push(S);
color = maze[S.second][S.first];
int... | a.cc: In function 'int main()':
a.cc:86:2: error: expected '}' at end of input
86 | }
| ^
a.cc:49:1: note: to match this '{'
49 | {
| ^
|
s555099599 | p00207 | C++ | #include <iostream>
#include <queue>
using namespace std;
#define rep(i,n) for(short i = 0; i < n; i++)
#define MAX 50
int dx[] = {0,0,-1,1},
dy[] = {1,-1,0,0};
typedef pair<short,short> P;
P S,G;
short w,h;
short color;
queue<P> que;
que.push(S);
bool check(short maze[MAX][MAX])
{
color = maze[S.second][S.... | a.cc:18:9: error: 'que' does not name a type
18 | que.push(S);
| ^~~
|
s355757095 | p00207 | C++ | #include<iostream> #include<string> #include<string.h> #include<cstring> #include<cmath> #include<algorithm> #include<stdlib.h> #include<queue> #include<map> #include<vector> #include<list> #include<stack> #include<functional>
using namespace std;
#define all(c) (c).begin(), (c).end() #define rep(i,n) for(int i=0;i<n... | a.cc:1:20: warning: extra tokens at end of #include directive
1 | #include<iostream> #include<string> #include<string.h> #include<cstring> #include<cmath> #include<algorithm> #include<stdlib.h> #include<queue> #include<map> #include<vector> #include<list> #include<stack> #include<functional>
| ... |
s831754423 | p00207 | C++ | #include <iostream>
 
using namespace std;
 
int map[101][101];
int xg, yg;
int w, h;
int col;
int dx[] = {0, 1, 0, -1};
int dy[] = {-1, 0, 1, 0};
bool flag;
 
void dfs(int x, int y)
{
    map[y][x] = 0;
 
    if (x == xg && y == yg) {
    ... | a.cc:2:2: error: stray '#' in program
2 |  
| ^
a.cc:4:2: error: stray '#' in program
4 |  
| ^
a.cc:12:2: error: stray '#' in program
12 |  
| ^
a.cc:15:2: error: stray '#' in program
15 |     map[y][x] = 0;
| ^
a.cc:15:8: error: stray '#' in... |
s513836211 | p00207 | C++ | #include <iostream>
 
using namespace std;
 
int map[101][101];
int xg, yg;
int w, h;
int col;
int dx[] = {0, 1, 0, -1};
int dy[] = {-1, 0, 1, 0};
bool flag;
 
void dfs(int x, int y)
{
    map[y][x] = 0;
 
    if (x == xg && y == yg) {
    ... | a.cc:2:2: error: stray '#' in program
2 |  
| ^
a.cc:4:2: error: stray '#' in program
4 |  
| ^
a.cc:12:2: error: stray '#' in program
12 |  
| ^
a.cc:15:2: error: stray '#' in program
15 |     map[y][x] = 0;
| ^
a.cc:15:8: error: stray '#' in... |
s760944637 | p00207 | C++ | int map[100][100];
bool visited[100][100];
int w,h;
int xs,ys;
int xg,yg;
int n;
int dfs(int x,int y) {
static int dx[4]={1,0,-1,0},dy[4]={0,1,0,-1};
if(x==xg&&y==yg) return 1;
visited[x][y]=true;
for(int i=0;i<4;i++) {
int nx=x+dx[i],ny=y+dy[i];
if(0<=nx&&nx<w&&0<=ny&&ny<h&&map[x][y]==map[nx][ny]&&!visit... | a.cc: In function 'int main()':
a.cc:25:17: error: 'memset' was not declared in this scope
25 | memset(map,0,sizeof(map));
| ^~~~~~
a.cc:1:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
+++ |+#include <cstring>
1... |
s529950214 | p00207 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
int w,h,sx,sy,gx,gy;
int mas[101][101],used[101][101];
int dx[] = {0,1,0,-1},dy[] = {1,0,-1,0};
void make_map(int x,int y,int chk,int color){
if(chk == 0){
for(int i=y;i<y+2;i++){
for(int j=x;j<x+4;j++) mas[i][j] = color;
}
}
else {
... | a.cc: In function 'int main()':
a.cc:37:5: error: 'memset' was not declared in this scope
37 | memset(used,false,sizeof(used));
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <algorithm>
+++ |+#include <cstr... |
s752968319 | p00207 | C++ | #include<iostream>
using namespace std;
int a[200][200]={},sx,sy,gx,gy;
int f(int i,int j){
if(i==gy && j==gx)
return 1;
if(a[i+1][j]==a[sy][sx])
if(f(i+1,j)==1)
return 1;
if(a[i][j+1]==a[sy][sx])
if(f(i,j+1)==1)
return 1;
if(a[i-1][j]==a[sx][sy])
if(f(i-1,j)==1)
return 1;
if(a[i][j-1]==a[sx][sy])... | a.cc:55:1: error: expected unqualified-id before '+' token
55 | +-
| ^
|
s326490672 | p00208 | Java | import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main2 {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line;
while(true){
line = br.readLine();
int num = Integer.valueOf(line);
... | Main.java:4: error: class Main2 is public, should be declared in a file named Main2.java
public class Main2 {
^
1 error
|
s578248767 | p00208 | Java | import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main2 {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line;
while(true){
line = br.readLine();
int num = Integer.valueOf(line);
... | Main.java:4: error: class Main2 is public, should be declared in a file named Main2.java
public class Main2 {
^
1 error
|
s090674318 | p00208 | Java | 15
100
1000000000
3
0 | Main.java:1: error: class, interface, enum, or record expected
15
^
1 error
|
s682909743 | p00208 | C | #include <stdio.h>
#include <string.h>
#define MAX (9358757000)
int main(void)
{
int i, j, k;
unsigned long long int num[10000000000];
int n;
int flag;
int temp
memset(j, 0, sizeof(j))
k = 1;
for(j = 0; j < 1000000000; j++){
flag = 0;
j = temp
while (temp /= 10 != 0){
if (j % 4 == 0){
k++;
... | main.c: In function 'main':
main.c:14:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'memset'
14 | memset(j, 0, sizeof(j))
| ^~~~~~
main.c:14:16: error: passing argument 1 of 'memset' makes pointer from integer without a cast [-Wint-conversion]
14 | memset(j, 0, si... |
s563306564 | p00208 | C | main()
{
int n;
while (scanf("%d", &n), n)
{
int t[10], d;
for (d = 0; n; ++d, n /= 8)
t[d] = n % 8;
for (int i = d-1; i >= 0; --i)
printf("%d", t[i] >= 5 ? t[i]+2 : t[i] == 4 ? t[i]+1 : t[i]);
printf("\n");
}
return 0;
} | main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
1 | main()
| ^~~~
main.c: In function 'main':
main.c:4:16: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
4 | while (scanf("%d", &n), n)
| ^~~~~
main.c:1:1: note: include '<std... |
s199473614 | p00208 | C | #include<stdio.h>
int main(){
int i,j,b[10],f=0,c=0;
long a[10],num;
a[0]=1;
for(i=1;i<10;i++){
a[i]=a[i-1]*8;
}
for(i=0;i<10;i++){
b[i]=0;
}
for(;;){
scanf("%ld",&num);
if(num==0){
break;
}
for(i=9;i>=0;i--){
while(f==0){
if(num>=a[i]){
num-=a[i];
c++;
}else{
b[i]=c;
... | main.c: In function 'main':
main.c:53:1: error: stray '\343' in program
53 | <U+3000><U+3000><U+3000><U+3000><U+3000>return 0;
| ^~~~~~~~
main.c:53:3: error: stray '\343' in program
53 | <U+3000><U+3000><U+3000><U+3000><U+3000>return 0;
| ^~~~~~~~
main.c:53:5: error: stray '\343' in program
... |
s829701998 | p00208 | C++ | #include <iostream>
#include <cstdlib>
using namespace std;
int main(void)
{
// itoa
int n;
while (cin >> n, n){
char s[20];
itoa(n, s, 8);
string str = s;
for (int i = 0; i < str.length(); i++){
if ('4' <= str[i]) str[i]++;
if ('6' <= str[i]) str[i]++;
}
cout << str << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:12:17: error: 'itoa' was not declared in this scope
12 | itoa(n, s, 8);
| ^~~~
|
s479031300 | p00208 | C++ | #include <iostream>
#include <cstdlib>
using namespace std;
int main(void)
{
// itoa
int n;
while (cin >> n, n){
char s[20];
_itoa(n, s, 8);
string str = s;
for (int i = 0; i < str.length(); i++){
if ('4' <= str[i]) str[i]++;
if ('6' <= str[i]) str[i]++;
}
cout << str << endl;
}
return 0;
... | a.cc: In function 'int main()':
a.cc:12:17: error: '_itoa' was not declared in this scope
12 | _itoa(n, s, 8);
| ^~~~~
|
s587637480 | p00208 | C++ | #include<iostream>
using namespace std;
int main(void){
int num[] = {1,2,3,5,6,7,8,9};
int n;
while(cin>>n,n){
long long a=0,d=1;
while(n){
a+=nums[n%8]*d;
d*=10;
n/=8;
}
cout<<a<<endl;
}
} | a.cc: In function 'int main()':
a.cc:10:10: error: 'nums' was not declared in this scope; did you mean 'num'?
10 | a+=nums[n%8]*d;
| ^~~~
| num
|
s366323702 | p00208 | C++ | #include <iostream>
using namespace std;
int main(){
long ans=0;
int c=0;
int n;
while(cin>>n){
ans+=n%8*pow(10,c);
n/=8;
if(n==0)break;
c++;
}
for(int i=0;i<=c;i++){
int temp=((long)(ans/pow(10,i))%10);
if(temp==4)ans+=pow(10,i);
if(tem... | a.cc: In function 'int main()':
a.cc:11:18: error: 'pow' was not declared in this scope
11 | ans+=n%8*pow(10,c);
| ^~~
a.cc:17:30: error: 'pow' was not declared in this scope
17 | int temp=((long)(ans/pow(10,i))%10);
| ^~~
|
s059505203 | p00208 | C++ | #include <iostream>
using namespace std;
int main() {
long long ans;
int i,k,n,o[10];
for (i=1,o[0]=1;i<10;i++) o[i]=o[i-1]*8;
while(cin >> n && n>0) {
ans=0;
for (i=9;i>=0;i--) {
if (n>=o[i]) { k=n / o[i]; n=n % o[i];
if (k==4) k=5; else if (k>4) k+=2;
ans+=k;
... | a.cc: In function 'int main()':
a.cc:18:2: error: expected '}' at end of input
18 | }
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s576168024 | p00208 | C++ | #include <stdio.h>
int main(void) {
int i;
char ans[10];
while(scanf("%d",&i),i){
sprintf(a,"%o",i);
for(i=0;i<10;i++){
if(ans[i]>=4) ans[i]++;
if(ans[i]>=6) ans[i]++;
}
printf("%s\n",ans);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:7:9: error: 'a' was not declared in this scope
7 | sprintf(a,"%o",i);
| ^
|
s505003161 | p00208 | C++ | #include <stdio.h>
int main(void) {
int i;
char ans[10];
while(scanf("%d",&i),i){
sprintf(ans,"%o",i);
for(i=0;i<10;i++){
if(ans[i]>=4) ans[i]++;
if(ans[i]>=6) ans[i]++;
if(ans[i]==0) break
}
printf("%s\n",ans);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:11:20: error: expected ';' before '}' token
11 | if(ans[i]==0) break
| ^
| ;
12 | }
| ~
|
s840631043 | p00208 | C++ | #include <stdio.h>
int main(void) {
int i;
char ans[10];
while(scanf("%d",&i),i){
sprintf(ans,"%o",i);
for(i=0;i<10;i++){
if(ans[i]==0) break
if(ans[i]>=4) ans[i]++;
if(ans[i]>=6) ans[i]++;
}
printf("%s\n",ans);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:9:20: error: expected ';' before 'if'
9 | if(ans[i]==0) break
| ^
| ;
10 |
11 | if(ans[i]>=4) ans[i]++;
| ~~
|
s958552495 | p00208 | C++ |
import java.util.Scanner;
import java.util.ArrayList;
import java.util.Stack;
class Main{
public static void main(String[] args){
Solve s = new Solve();
s.solve();
}
}
class Solve{
Solve(){}
Scanner in = new Scanner(System.in);
void solve(){
while(in.hasNext()){
int n = in.nextInt();
if(n == 0... | a.cc:2:1: error: 'import' does not name a type
2 | import java.util.Scanner;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
3 | import java.util.ArrayList;
| ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodule... |
s094206211 | p00208 | C++ | #include<iostream>
using namespace std;
int main() {
long long a[10], c = 1, d, e = 0;
int b = 0;
while (c <= 1000000000) {
a[b] = c;
b++;
c *= 8;
}
while (cin >> d&&d != 0) {
e = 0;
int f = 0;
for (int i = b-1; i >= 0; i--) {
f = 0;
if (a[i] <= d) {
while (a[i] <= d) {
f++;
d -= a[... | a.cc: In function 'int main()':
a.cc:22:47: error: 'pow' was not declared in this scope
22 | e += (pow(10, i)*f);
| ^~~
a.cc:24:47: error: 'pow' was not declared in this scope
24 | e... |
s615426240 | p00208 | C++ | #include<iostream>
using namespace std;
int main() {
long long a[10], c = 1, d, e = 0;
int b = 0;
while (c <= 1000000000) {
a[b] = c;
b++;
c *= 8;
}
while (cin >> d&&d != 0) {
e = 0;
int f = 0;
for (int i = b-1; i >= 0; i--) {
f = 0;
if (a[i] <= d) {
while (a[i] <= d) {
f++;
d -= a[... | a.cc: In function 'int main()':
a.cc:22:47: error: 'pow' was not declared in this scope
22 | e += (pow(10, i)*f);
| ^~~
a.cc:24:47: error: 'pow' was not declared in this scope
24 | e... |
s065832867 | p00208 | C++ | #include <iostream>
using namespace std;
int main() {
int i;
char s[10];
while(cin>>i,i){
sprintf(s,"%o",i);
for(i=0;s[i]!='\0';i++){
if(s[i]>='4')s[i]++;
if(s[i]>='6')s[i]++;
}
printf("%s\n",ans);
}
} | a.cc: In function 'int main()':
a.cc:12:19: error: 'ans' was not declared in this scope; did you mean 'abs'?
12 | printf("%s\n",ans);
| ^~~
| abs
|
s906089820 | p00208 | C++ | #include <iostream>
using namespace std;
long long int d8(long long int c, int n, int d)
{
int r2 = n % 8;
if (r2 > 4) r2++;
if (r2 > 3) r2++;
c += r2 * pow(10,d - 1);
if (n / 8 > 0)
c = d8(c, n / 8, d + 1);
return c;
}
int main()
{
int n;
while (cin >> n && n != 0)
{
cout << d8(0, n, 1) << endl;
}
... | a.cc: In function 'long long int d8(long long int, int, int)':
a.cc:10:19: error: 'pow' was not declared in this scope
10 | c += r2 * pow(10,d - 1);
| ^~~
|
s342670887 | p00208 | C++ | while(1):
n = int(input())
if(not n):
break
print("".join("01235789"[int(i)] for i in oct(n)[2:]))
| a.cc:1:1: error: expected unqualified-id before 'while'
1 | while(1):
| ^~~~~
|
s046025558 | p00208 | C++ | #include <iostream>
#include <algorithm>
#include <cassert>
#include <cctype>
#include <complex>
#include <cstdio>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef __int64 ll;
//typedef long long ll;
ll n;
int main(){
w... | a.cc:16:9: error: '__int64' does not name a type; did you mean '__int64_t'?
16 | typedef __int64 ll;
| ^~~~~~~
| __int64_t
a.cc:18:1: error: 'll' does not name a type
18 | ll n;
| ^~
a.cc: In function 'int main()':
a.cc:21:20: error: 'n' was not declared in this scope; did you me... |
s337751811 | p00208 | C++ | #inmport<cstdio>
s(int n){if(n>7)s(n/8);printf("%d",n%8<4?n%8:n%8<6?n%8+1:n%8+2);}main(){for(int a;scanf("%d",&a),a;puts(""))s(a);} | a.cc:1:2: error: invalid preprocessing directive #inmport; did you mean #import?
1 | #inmport<cstdio>
| ^~~~~~~
| import
a.cc:2:1: error: ISO C++ forbids declaration of 's' with no type [-fpermissive]
2 | s(int n){if(n>7)s(n/8);printf("%d",n%8<4?n%8:n%8<6?n%8+1:n%8+2);}main(){for(int a;scanf("%d",... |
s241322326 | p00208 | C++ | #import<cstdio>
s(int n){if(n>7)s(n/8);printf("%d",n%8<4?n%8:n%8<6?n%8+1:n%8+2);}main(){for(int a;scanf("%d",&a),a;puts(""))s(a);} | a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
1 | #import<cstdio>
| ^~~~~~
a.cc:2:1: error: ISO C++ forbids declaration of 's' with no type [-fpermissive]
2 | s(int n){if(n>7)s(n/8);printf("%d",n%8<4?n%8:n%8<6?n%8+1:n%8+2);}main(){for(int a;scanf("%d",&a),a;puts(""))s(a);}
... |
s949048927 | p00208 | C++ | #inmport<cstdio>
void s(int n){if(n>7)s(n/8);printf("%d",n%8<4?n%8:n%8<6?n%8+1:n%8+2);}main(){for(int a;scanf("%d",&a),a;puts(""))s(a);} | a.cc:1:2: error: invalid preprocessing directive #inmport; did you mean #import?
1 | #inmport<cstdio>
| ^~~~~~~
| import
a.cc: In function 'void s(int)':
a.cc:2:29: error: 'printf' was not declared in this scope
2 | void s(int n){if(n>7)s(n/8);printf("%d",n%8<4?n%8:n%8<6?n%8+1:n%8+2);}main(){for(i... |
s988988842 | p00208 | C++ | #import<cstdio>
t[]={0,1,2,3,5,7,8,9};
void s(int n){if(n>7)s(n/8);printf("%d",t[n%8]);}
main(){for(int a;scanf("%d",&a),a;puts(""))s(a);} | a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
1 | #import<cstdio>
| ^~~~~~
a.cc:2:1: error: 't' does not name a type
2 | t[]={0,1,2,3,5,7,8,9};
| ^
a.cc: In function 'void s(int)':
a.cc:3:41: error: 't' was not declared in this scope
3 | void s(int n){if(n>7)s(n/8);pri... |
s361384155 | p00208 | C++ | #import<cstdio>
int t[]={,1,2,3,5,7,8,9,};void s(int n){if(n>7)s(n/8);printf("%d",t[n%8]);}main(){for(int a;scanf("%d",&a),a;puts(""))s(a);} | a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
1 | #import<cstdio>
| ^~~~~~
a.cc:2:10: error: expected primary-expression before ',' token
2 | int t[]={,1,2,3,5,7,8,9,};void s(int n){if(n>7)s(n/8);printf("%d",t[n%8]);}main(){for(int a;scanf("%d",&a),a;puts(""))s(a);}
| ... |
s565972192 | p00208 | C++ | #include<iostream>
int n;
int pw[10] = {1,10,100,1000,10000,100000,1000000,10000000,100000000,1000000000};
void solve(){
__int64 ans = 0;
int tmp = n;
for(int i=0; i<10; i++){
int temp = tmp%8;
if(temp==4)
temp++;
else if(temp > 4)
temp+=2;
ans += temp*pw[i];
tmp = tmp/8;
if(tmp == 0)
break;
... | a.cc: In function 'void solve()':
a.cc:7:9: error: '__int64' was not declared in this scope; did you mean '__int64_t'?
7 | __int64 ans = 0;
| ^~~~~~~
| __int64_t
a.cc:15:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
15 | ans += temp*pw[i]... |
s249471878 | p00208 | C++ | 1>------ rhJn: vWFNg: algo, \¬: Release Win32 ------
1>2011/07/23 16:18:47 ÉrhðJnµÜµ½B
1>InitializeBuildStatus:
1> "AlwaysCreate" ªwè³ê½½ß "Release\algo.unsuccessfulbuild" ð쬵ĢܷB
1>ClCompile:
1> 0208.cpp
1>Link:
1> R[h¶¬µÄ¢Ü·B
1> R[h¶¬ªI¹µÜµ½B
... | a.cc:1:10: error: extended character is not valid in an identifier
1 | 1>------ rhJn: vWFNg: algo, \¬: Release Win32 ------
| ^
a.cc:1:10: error: extended character is not valid in an identifier
a.cc:1:10: error: extended character is not valid in an identifier
a.cc:1:10: error: ... |
s027819241 | p00208 | C++ | tw | a.cc:1:1: error: 'tw' does not name a type
1 | tw
| ^~
|
s265984389 | p00208 | C++ | #include<iostream>
#include<sstream>
#include<algorithm>
using namespace std;
const string s = "01235789"
int main(){
int n;
while(cin >> n, n){
stringstream ss;
while(n){
ss << s[n % 8];
n /= 8;
}
string ans = ss.str();
reverse(ans.begin(), ans.end());
cout << ans << endl;
... | a.cc:9:1: error: expected ',' or ';' before 'int'
9 | int main(){
| ^~~
|
s936848611 | p00208 | C++ | #include<iostream>
#define N 1000000000
using namespace std;
int data[N];
int check(int n, int keta){
for(int i = 0; i < keta; i++){
if(n%10 == 4 || n%10 == 6) return 0;
n/=10;
}
return 1;
}
void make(){
int num = 0;
int keta = 1;
for(int i = 0; i < N; i++){
num++;
if(num == 10) keta++... | a.cc: In function 'void make()':
a.cc:31:25: error: reference to 'data' is ambiguous
31 | if(check(num,keta)) data[i] = num;
| ^~~~
In file included from /usr/include/c++/14/string:53,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/inc... |
s941253688 | p00208 | C++ | #include <iostream>
#include <string>
using namespace std;
int main() {
long long int n, r;
string s="";
char x[sizeof(int)];
while(cin >> n) {
if(!n)
break;
r=0;
for(int i=0; i<n; i++) {
while(1) {
r++;
sprintf(x, "%d", r);
if(!(strchr(x, '4')!=NULL)&&!(strchr(x, '6')!=NULL))
br... | a.cc: In function 'int main()':
a.cc:21:38: error: 'strchr' was not declared in this scope
21 | if(!(strchr(x, '4')!=NULL)&&!(strchr(x, '6')!=NULL))
| ^~~~~~
a.cc:2:1: note: 'strchr' is defined in header '<cstring>'; this is probably fixable ... |
s828982528 | p00208 | C++ | #define _USE_MATH_DEFINES
#define INF 10000000
#include <iostream>
#include <sstream>
#include <cmath>
#include <algorithm>
#include <queue>
#include <stack>
#include <limits>
#include <map>
#include <string>
#include <cstring>
#include <set>
#include <deque>
#include <bitset>
#include <list>
using namespace std;
typ... | a.cc: In function 'int main()':
a.cc:37:33: error: expected ';' before '}' token
37 | printf("%s",buf)
| ^
| ;
38 | }
| ~
|
s495806904 | p00208 | C++ | #include <iostream>
#include <string>
#include <cmath>
using namespace std;
string toOct(long long d)
{
char c[30];
string s = "";
sprintf_s(c, "%o", d);
s += c;
return s;
}
string solve(long long n)
{
char c[30];
string s;
s = toOct(n);
for( int i = 0; i < (int)s.length(); i++)
{
if( s[i] >= '4'... | a.cc: In function 'std::string toOct(long long int)':
a.cc:12:9: error: 'sprintf_s' was not declared in this scope; did you mean 'sprintf'?
12 | sprintf_s(c, "%o", d);
| ^~~~~~~~~
| sprintf
|
s494597390 | p00208 | C++ | #include <iostream>
#include <string>
#include <cstring>
#include <cmath>
using namespace std;
string toOct(long long d)
{
char c[30];
string s = "";
sprintf_s(c, "%o", d);
s += c;
return s;
}
string solve(long long n)
{
char c[30];
string s;
s = toOct(n);
for( int i = 0; i < (int)s.length(); i++)
... | a.cc: In function 'std::string toOct(long long int)':
a.cc:13:9: error: 'sprintf_s' was not declared in this scope; did you mean 'sprintf'?
13 | sprintf_s(c, "%o", d);
| ^~~~~~~~~
| sprintf
|
s905263292 | p00208 | C++ | #include <iostream>
using namespace std;
int main(){char s[]={'0','1','2','3','5','7','8','9'};int n;for(;cin>>n,n;cout<<a<<endl)for(string a="";n>0;n/=8)a=s[n%8]+a;} | a.cc: In function 'int main()':
a.cc:3:82: error: 'a' was not declared in this scope
3 | int main(){char s[]={'0','1','2','3','5','7','8','9'};int n;for(;cin>>n,n;cout<<a<<endl)for(string a="";n>0;n/=8)a=s[n%8]+a;}
| ^
|
s928174378 | p00208 | C++ | #include<iostream>
using namespace std;
const int table[] = { 1,2,3,4,5,6,7,8,9 };
void surgeon(int x)
{
if(x>=8)
{
surgeon(n/8);
}
return(table[n%8]);
}
int main()
{
int n;
while(cin>>n, n>0)
{
surgeon(n);
cout<<endl;
}
return 0;
} | a.cc: In function 'void surgeon(int)':
a.cc:9:11: error: 'n' was not declared in this scope
9 | surgeon(n/8);
| ^
a.cc:11:15: error: 'n' was not declared in this scope
11 | return(table[n%8]);
| ^
|
s833252267 | p00208 | C++ | #include<iostream>
using namespace std;
const int table[] = { 1,2,3,4,5,6,7,8,9 };
void surgeon(int x)
{
if(x>=8)
{
surgeon(x/8);
}
return(table[x%8]);
}
int main()
{
int x;
while(cin>>x, x>0)
{
surgeon(n);
cout<<endl;
}
return 0;
} | a.cc: In function 'void surgeon(int)':
a.cc:11:18: error: return-statement with a value, in function returning 'void' [-fpermissive]
11 | return(table[x%8]);
| ~~~~~~~~~~^~
a.cc: In function 'int main()':
a.cc:18:11: error: 'n' was not declared in this scope
18 | surgeon(n);
| ^
|
s093304191 | p00208 | C++ | #include<iostream>
using namespace std;
const int table[] = { 1,2,3,4,5,6,7,8,9 };
void surgeon(int x)
{
if(x>=8)
{
surgeon(x/8);
}
return(table[x%8]);
}
int main()
{
int x;
while(cin>>x, x>0)
{
surgeon(x);
cout<<endl;
}
return 0;
} | a.cc: In function 'void surgeon(int)':
a.cc:11:18: error: return-statement with a value, in function returning 'void' [-fpermissive]
11 | return(table[x%8]);
| ~~~~~~~~~~^~
|
s222961656 | p00208 | C++ | #include<iostream>
int main(){
while(1){
int a;
std::cin>>a;
double int b=1;
if(a==0)break;
for(int i=0;i<a;i++){
b++;
int n=10;
for(int j=0;j<10;j++){
while(a%n==4||a%6==&||a/n==4||a/n==6){
b++;
}
}
}
std::cout<<b<<std::endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:6:17: error: two or more data types in declaration of 'b'
6 | double int b=1;
| ^~~~~~
a.cc:9:25: error: 'b' was not declared in this scope
9 | b++;
| ^
a.cc:12:53: error: expected pr... |
s257586199 | p00209 | Java | import java.util.*;
class Main {
static int[][] map;
static int[][] cx;
public static void main(String[] args) {
Scanner stdIn = new Scanner(System.in);
while (true) {
int n = stdIn.nextInt();
int m = stdIn.nextInt();
if (n == 0 && m == 0){
break;
}
map = new int[n][n];
for (int i = 0; i ... | Main.java:48: error: unnamed classes are a preview feature and are disabled by default.
static void rotate(int[][] a) {
^
(use --enable-preview to enable unnamed classes)
Main.java:93: error: class, interface, enum, or record expected
}
^
2 errors
|
s658850574 | p00209 | Java | import java.util.Scanner;
public class A0209 {
static int n, m;
static int win[][], pic[][];
public static boolean search(int x, int y) {
for (int i = 0; i < m; i++) {
for (int j = 0; j < m; j++) {
if (pic[i][j] != -1 && win[y + i][x + j] != pic[i][j]) {
return false;
}
}
}
return true;
}... | Main.java:3: error: class A0209 is public, should be declared in a file named A0209.java
public class A0209 {
^
1 error
|
s661420121 | p00209 | C++ | d | a.cc:1:1: error: 'd' does not name a type
1 | d
| ^
|
s465228661 | p00209 | C++ | chinko | a.cc:1:1: error: 'chinko' does not name a type
1 | chinko
| ^~~~~~
|
s099520569 | p00209 | C++ | #include <iostream>
#include <cstdio>
using namespace std;
int n,m,pic[101][101],ed[51][51];
int edb[101][101];
int site;
int num,flag = 0;
int ans,count;
void deb() {
for(int i=0;i<n;i++){
for(int j=0;j<n;j++)
cout <<pic[i][j] << " ";
cout << endl;
}
cout << "-------------------"<<endl;
... | a.cc:166:1: error: expected declaration before '}' token
166 | }
| ^
|
s450759771 | p00209 | C++ | #include <bits/stdc++.h>
using namespace std;
void f(int set[][51],int m)
{
int ans[100][100]={};
for(int i=0;i<m;i++)
{
for(int j=0;j<m;j++)
{
ans[j][(m-1)-i]=set[i][j];
}
}
for(int i=0;i<m;i++)
{
for(int j=0;j<m;j++)
{
set[i][j]=ans[i][j];
}
}
}
int main()
{
int n,m;
while(cin >> n >> ... | a.cc: In function 'int main()':
a.cc:77:32: error: cannot convert 'int (*)[501]' to 'int (*)[51]'
77 | else f(set,m);
| ^~~
| |
| int (*)[501]
a.cc:5:12: note: initializing argumen... |
s056111296 | p00209 | C++ | #include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<cmath>
#include<cstring>
#include<queue>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loop(i,0,a)
#define pb push_back
#define mp make_pair
#define all(in) in.be... | a.cc: In function 'int main()':
a.cc:50:28: error: 'i' was not declared in this scope
50 | if(i==3)break;
| ^
|
s052427906 | p00209 | C++ | #include<bits/stdc++.h>
using namespace std;
#define rep(i, n) for ( int i = 0; i < (int)n; i++ )
#define NMAX 200
#define MMAX 100
#define INFTY (1<<21)
int n, m, T[NMAX][NMAX], P[MMAX][MMAX];
void valid(int sx, int sy, int &lx, int &ly) {
int ax = -1, ay;
rep(y, m)
rep(x, m)
{
if (P[x][y] == -1)
continue... | a.cc:52:1: error: '::main' must return 'int'
52 | void main() {
| ^~~~
|
s549733709 | p00209 | C++ |
#include<cstdio>
#include<iostream>
#include<algorithm>
#include<string>
#include<queue>
#include<vector>
#include<functional>
#include<cmath>
#include<map>
#include<stack>
#include<set>
#include<numeric>
#include<limits>
#include<iterator>
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
... | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s036623764 | p00209 | C++ | #include<cstdio>
#include<iostream>
#include<algorithm>
#include<string>
#include<queue>
#include<vector>
#include<functional>
#include<cmath>
#include<map>
#include<stack>
#include<set>
#include<numeric>
#include<limits>
#include<iterator>
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
... | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s941513031 | p00209 | C++ | #include <cstdio>
#include <cstring>
#include <numeric>
#include <pmmintrin.h>
#define REP(i, a, b) for (int i = (a); i < (b); ++i)
#define rep(i, n) REP(i, 0, n)
typedef long long llong;
char A[101][128], B[101][128];
__m128i mado[101][16], pic[101][16];
int a[4];
int n, m;
int main()
{
while (scanf("%d%d", &m, &n)... | a.cc: In function 'int main()':
a.cc:35:56: error: '_mm_alignr_epi8' was not declared in this scope; did you mean '_mm_setr_epi8'?
35 | mado[i+k][l] = _mm_alignr_epi8(mado[i+k][l], mado[i+k][l-1], 1);
| ^~~~~~~~~~~~~... |
s202742765 | p00209 | C++ | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <ctime>
#include <cassert>
#include <iostream>
#include <cctype>
#include <sstream>
#include <string>
#include <list>
#include <vector>
#include <queue>
#include <set>
#include <stack>
#include <map>
#include <utility>
#include <numeric>
... | a.cc: In instantiation of 'void chmin(T&, C) [with T = std::complex<int>; C = std::complex<int>]':
a.cc:67:13: required from here
67 | chmin(P, complex<int>(x + sx + 1, y + sy + 1));
| ~~~~~^~~~~~~... |
s177100531 | p00209 | C++ | #include<iostream>
#include<vector>
#include<map>
#include<algorithm>
using namespace std;
vector< vector<int> > MakeMatrix(int);
multimap<int, int> SpinMatrix(vector< vector<int> >&);
void SearchPicture(vector< vector<int> >, vector< vector<int> >,
multimap<int, int>, int&, int&);
bool SearchPictureInner(vector... | a.cc: In function 'std::multimap<int, int> SpinMatrix(std::vector<std::vector<int> >&)':
a.cc:58:55: error: no matching function for call to 'std::vector<std::vector<int> >::vector(std::vector<std::vector<int> >::size_type, std::vector<std::vector<int> >::size_type)'
58 | vector< vector<int> > _data(data.size(), d... |
s938028977 | p00209 | C++ | #include<iostream>
#include<vector>
#include<map>
#include<algorithm>
using namespace std;
vector< vector<int> > MakeMatrix(int);
multimap<int, int> SpinMatrix(vector< vector<int> >&);
void SearchPicture(vector< vector<int> >, vector< vector<int> >,
multimap<int, int>, int&, int&);
bool SearchPictureInner(vector... | a.cc: In function 'std::multimap<int, int> SpinMatrix(std::vector<std::vector<int> >&)':
a.cc:59:35: error: no matching function for call to 'std::vector<std::vector<int> >::vector(int&, int&)'
59 | vector< vector<int> > _data(n, n);
| ^
In file included from /usr/include/c+... |
s851715667 | p00209 | C++ | #include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
int n,m;
int rx,ry;
int px,py;
int pic[101][101];
int pic2[101][101];
int p[101][101];
bool check(int x,int y){
for(int i=0;i<m;i++){
for(int j=0;j<m;j++){
if(p[j][i]!=-1 && p[j][i]!=pic[x+j][y+i])return false;
}
}
return true;
}
... | a.cc: In function 'int main()':
a.cc:63:17: error: 'memset' was not declared in this scope
63 | memset(pic,0,sizeof(pic));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include<algorithm>
++... |
s494780882 | p00209 | C++ | #include <iostream>
using namespace std;
const int max_matrix_size = 100;
void p(int a[max_matrix_size][max_matrix_size], int size, int offseti = 0, int offsetj = 0){
for(int i = 0; i < size; i++){
for(int j = 0; j < size; j++){
cout << a[offseti+i][offsetj+j] << ' ';
}
cout << endl;
}
}
// aの[starti][st... | a.cc: In function 'void rotateMatrix(int (*)[100], int)':
a.cc:38:9: error: 'memcpy' was not declared in this scope
38 | memcpy(a, tmp, sizeof(int)*max_matrix_size*max_matrix_size);
| ^~~~~~
a.cc:2:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include ... |
s610146228 | p00210 | C | #include <stdio.h>
#define CWALL '#'
#define CFLOOR '.'
#define CEXIT 'X'
#define CEAST 'E'
#define CNORTH 'N'
#define CWEST 'W'
#define CSOUTH 'S'
enum direction {
EAST = 0,
NORTH,
WEST,
SOUTH
};
typedef struct {
int real;
int imag;
} complex_t;
void complex_mul(const complex_t *s1, const c... | main.c: In function 'main':
main.c:113:33: error: 'direction' undeclared (first use in this function)
113 | pdir = (direction)((dir.imag==-1)*1 + (dir.real==-1)*2 + (dir.imag==1)*3);
| ^~~~~~~~~
main.c:113:33: note: each undeclared identifier is reported o... |
s612787213 | p00210 | C | #include <stdio.h>
#define CWALL '#'
#define CFLOOR '.'
#define CEXIT 'X'
#define CEAST 'E'
#define CNORTH 'N'
#define CWEST 'W'
#define CSOUTH 'S'
enum direction {
EAST = 0,
NORTH,
WEST,
SOUTH
};
typedef struct {
int real;
int imag;
} complex_t;
void complex_mul(const complex_t *s1, const c... | main.c:44:25: error: initializer element is not constant
44 | complex_t look_dir[] = {right, front, left, back};
| ^~~~~
main.c:44:25: note: (near initialization for 'look_dir[0]')
main.c:44:32: error: initializer element is not constant
44 | complex_t look_dir[] = {right, front, lef... |
s267688947 | p00210 | C++ | #include <bits/stdc++.h>
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define RFOR(i,a,b) for(int i=(b) - 1;i>=(a);i--)
#define REP(i,n) for(int i=0;i<(n);i++)
#define RREP(i,n) for(int i=n-1;i>=0;i--)
#define PB push_back
#define INF (1<<29)
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
... | a.cc: In function 'int main()':
a.cc:159:12: error: 'a' was not declared in this scope
159 | if(a >= 0) cout << a << endl;
| ^
|
s854615179 | p00210 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
struct State{char x[35][35];};
int H,W,dx[4]={-1,0,1,0},dy[4]={0,1,0,-1};State S;char f[5]="NESW";
int solve(State V,int depth){
if(depth==31)return 99999999;
bool OK=true;
for(int i=0;i<H;i++){
for(int j=0;j<W;j++){
if(V.x[i][j]>='A' && V.x[i][j]<='W'... | a.cc: In function 'int solve(State, int)':
a.cc:15:9: error: 'vector' was not declared in this scope
15 | vector<int>G[30][30];
| ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
2 | #include<algorithm>
+++ |+#inc... |
s315695198 | p00210 | C++ | #include <iostream>
#include <string>
using namespace std;
int dx[]={1,0,-1,0};
int dy[]={0,-1,0,1};
int main()
{
int W,H;
while(cin >> W >> H, (W||H))
{
int cnt=0, p[35][35],tp[35][35];
char f[35][35];
cin.ignore();
for(int i=0; i<H; i++)
{
string t;
getline(cin, t);
for(int j=0; j<W; j++)
{... | a.cc: In function 'int main()':
a.cc:72:25: error: 'memcpy' was not declared in this scope
72 | memcpy(p, tp, sizeof(p));
| ^~~~~~
a.cc:2:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include ... |
s350920527 | p00211 | Java | import java.math.*;
import java.util.*;
public class a0211{
public static void main(String[] args){
int i;
Scanner sc=new Scanner(System.in);
int n;
while(true){
n=sc.nextInt();
if(n==0)
break;
int[] a=new int[n];
int[] b=new int[n];
for(i=0;i<n;++i){
a[i]=sc.nextInt();
b[i]=sc.nextI... | Main.java:3: error: class a0211 is public, should be declared in a file named a0211.java
public class a0211{
^
1 error
|
s114687229 | p00211 | C++ | #include<iostream>
using namespace std;
int gcd(int a,int b){ return a%b==0 ? b : gcd(b,a%b);}
int main(){
while(true){
long long int p = 1;
int d[11];
int v[11];
int n;
cin >> n;
for(int i=0;i<n;i++){
cin >> d[i] >> v[i];
p *= d[i] / gcd(d[i],v[i]);
}
for(int i=0;... | a.cc: In function 'int main()':
a.cc:22:2: error: expected '}' at end of input
22 | }
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s261581978 | p00211 | C++ | #include<iostream>
#include<algorithm>
#include<vector>
#define PB push_back
using namespace std;
int gcd(int a,int b){ return a%b==0 ? b : gcd(b,a%b);}
vector<long long int> lcm(vector<long long int> v){
vector<long long int> ret;
for(int i=0;i<v.size()-1;i++){
ret.PB(v[i]*v[i+1]/gcd(v[i],v[i+1]));
}
... | a.cc: In function 'int main()':
a.cc:42:14: error: redeclaration of 'bool flg'
42 | bool flg = true;
| ^~~
a.cc:33:14: note: 'bool flg' previously declared here
33 | bool flg = true;
| ^~~
|
s878713730 | p00211 | C++ | #include<iostream>
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;
typedef long long ll;
ll lcm(ll a,ll b){return a/__gcd(a,b)*b;}
int main(){
int n,d[10],v[10],t;
while(cin>>n,n){
rep(i,n)cin>>d[i]>>v[i],t=__gcd(d[i],v[i]),d[i]/=t,v[i]/=t;
ll a=d[0],b=v[0];
rep(i,n)a=lcm(a,d[i]),b=__gcd(b,(ll)v[i]);... | a.cc: In function 'll lcm(ll, ll)':
a.cc:5:28: error: '__gcd' was not declared in this scope
5 | ll lcm(ll a,ll b){return a/__gcd(a,b)*b;}
| ^~~~~
a.cc: In function 'int main()':
a.cc:9:43: error: '__gcd' was not declared in this scope
9 | rep(i,n)cin>>d[i]>>v[i]... |
s087459006 | p00211 | C++ | #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 <cstdio>
#include <cmath>
#include <cstdlib>
#include <c... | a.cc: In function 'int main()':
a.cc:67:36: error: 'runnner' was not declared in this scope; did you mean 'runner'?
67 | ll tmp=gcd(runnner[i][0],runnner[i][1]);
| ^~~~~~~
| runner
|
s746418015 | p00211 | C++ |
import java.util.*;
import java.io.*;
import java.math.BigInteger;
import static java.util.Arrays.*;
import static java.util.Collections.*;
import static java.lang.Math.*;
public class Main {
int INF = 1 << 28;
//long INF = 1L << 62;
double EPS = 1e-10;
void run() {
Scanner sc = new Scanner(System.in);
for... | 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 java.io.*;
| ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: ... |
s875037278 | p00212 | C | #include <cstdio>
#include <cstdlib>
#include <queue>
#include <vector>
#include <utility>
#include <functional>
using namespace std;
#define INF 19980725
/** 割引券の枚数 */
static int c;
#define C 10
/** 町の数 */
static int n;
#define N 100
/** 路線数 */
static int m;
#define M 500
/** 出発地 */
static int s;
/** 目的地 */
static i... | main.c:1:10: fatal error: cstdio: No such file or directory
1 | #include <cstdio>
| ^~~~~~~~
compilation terminated.
|
s393293464 | p00212 | C | #include<stdio.h>
#include<string.h>
#include<utility>
#include<queue>
#include<algorithm>
using namespace std;
#define INF 100000000
int C,N,M,S,D,g1[101][101],g2[101][101],s,t,c,d[101],u[101];
typedef struct P{int p,c,t;}P;
struct Order
{
bool operator ()(P const& a, P const& b) const
{
return a.c==b.c?a.t<b.t:a.... | main.c:3:9: fatal error: utility: No such file or directory
3 | #include<utility>
| ^~~~~~~~~
compilation terminated.
|
s764482891 | p00212 | C++ | #include <iostream>
#include <queue>
#include <algorithm>
#define MAX 1000000000
#define Debug(X) debug( __LINE__, X )
template<class T>
void debug( int line, T dbg ){
std::cout << line << ": " << dbg << std::endl;
}
class State{
public:
int p, s, c;
State():p(0), s(0), c(0){}
State(int P, int S, int C):p(P), s(S... | a.cc: In function 'int main()':
a.cc:33:17: error: 'memset' was not declared in this scope
33 | memset( used, 0, sizeof( used ) );
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include <algori... |
s962708879 | p00212 | C++ | #include<iostream>
using namespace std;
#include<vector>
#include<queue>
#include<math.h>
struct crq{
int cost;
int ticket;
int now;
bool operator >(const crq& p) const{
return cost > p.cost;
}
};//cost root que
struct root{
int s;
int g;
int cost;
};
priority_queue<crq,vector<crq>,greater<crq>> q;
vector<ro... | a.cc: In function 'int main()':
a.cc:34:21: error: 'INT_MAX' was not declared in this scope
34 | ans=INT_MAX;
| ^~~~~~~
a.cc:6:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
5 | #include<math.h>
+++ |+#inclu... |
s601666400 | p00212 | C++ | #include<iostream>
using namespace std;
#include<vector>
#include<queue>
#include<math.h>
struct crq{
int cost;
int ticket;
int now;
bool operator >(const crq& p) const{
return cost > p.cost;
}
};//cost root que
struct root{
int s;
int g;
int cost;
};
priority_queue<crq,vector<crq>,greater<crq>> q;
vector<ro... | a.cc: In function 'int main()':
a.cc:34:21: error: 'INT_MAX' was not declared in this scope
34 | ans=INT_MAX;
| ^~~~~~~
a.cc:6:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
5 | #include<math.h>
+++ |+#inclu... |
s447095260 | p00212 | C++ | #include<iostream>
using namespace std;
#include<vector>
#include<queue>
#include<math.h>
struct crq{
int cost;
int ticket;
int now;
bool operator >(const crq& p) const{
return cost > p.cost;
}
};//cost root que
struct root{
int s;
int g;
int cost;
};
priority_queue<crq,vector<crq>,greater<crq>> q;
vector<ro... | a.cc: In function 'int main()':
a.cc:34:21: error: 'INT_MAX' was not declared in this scope
34 | ans=INT_MAX;
| ^~~~~~~
a.cc:6:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
5 | #include<math.h>
+++ |+#inclu... |
s954886650 | p00212 | C++ | #include<iostream>
using namespace std;
#include<vector>
#include<queue>
#include<math.h>
struct crq{
int cost;
int ticket;
int now;
bool operator >(const crq& p) const{
return cost > p.cost;
}
};//cost root que
struct root{
int s;
int g;
int cost;
};
priority_queue<crq,vector<crq>,greater<crq>> q;
vector<ro... | a.cc: In function 'int main()':
a.cc:34:21: error: 'INT_MAX' was not declared in this scope
34 | ans=INT_MAX;
| ^~~~~~~
a.cc:6:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
5 | #include<math.h>
+++ |+#inclu... |
s493623224 | p00212 | C++ | #include<iostream>
using namespace std;
#include<vector>
#include<queue>
//#include<math.h>
struct crq{
int cost;
int ticket;
int now;
bool operator >(const crq& p) const{
return cost > p.cost;
}
};//cost root que
struct root{
int s;
int g;
int cost;
};
priority_queue<crq,vector<crq>,greater<crq>> q;
vector<... | a.cc: In function 'int main()':
a.cc:36:21: error: 'INT_MAX' was not declared in this scope
36 | ans=INT_MAX;
| ^~~~~~~
a.cc:5:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
4 | #include<queue>
+++ |+#includ... |
s335535985 | p00212 | C++ | #include<iostream>
using namespace std;
#include<vector>
#include<queue>
//#include<math.h>
struct crq{
int cost;
int ticket;
int now;
bool operator > (const crq& p) const{
return cost > p.cost;
}
};//cost root que
struct root{
int s;
int g;
int cost;
};
vector<root> vr;
int c;
int n;
int m;
int s;
int d;... | a.cc: In function 'int main()':
a.cc:37:21: error: 'INT_MAX' was not declared in this scope
37 | ans=INT_MAX;
| ^~~~~~~
a.cc:5:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
4 | #include<queue>
+++ |+#includ... |
s646470480 | p00212 | C++ | #include<iostream>
using namespace std;
#include<vector>
#include<queue>
//#include<math.h>
struct crq{
int cost;
int ticket;
int now;
bool operator > (const crq& p) const{
return cost > p.cost;
}
};//cost root que
struct root{
int s;
int g;
int cost;
};
vector<root> vr;
int c;
int n;
int m;
int s;
int d;... | a.cc: In function 'int main()':
a.cc:42:61: error: 'INT_MAX' was not declared in this scope
42 | for(int j=0;j<11;j++)townMin[i][j]=INT_MAX;
| ^~~~~~~
a.cc:5:1: note: 'INT_MAX' is defined in header '<climits>'; this is probabl... |
s872043693 | p00212 | C++ | #include <iostream>
#include <queue>
#include <functional>
#include <algorithm>
const int MAX_V = 100;
const int INF = 0x3f3f3f3f;
//??? T???cap??????rev????????°???????????§?????£???????????????
struct Edge{
int to;
int cost;
Edge(int to_, int cost_) :to(to_), cost(cost_){}
};
std::vector<Edge > G[MAX_V]; //??£?... | a.cc: In function 'void ClearEdge()':
a.cc:27:9: error: 'memset' was not declared in this scope
27 | memset(d, 0, sizeof(d));
| ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include <algorithm>
+++ |+#include... |
s438579090 | p00212 | C++ | #include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define fr first
#define sc second
typedef pair<int, int> Pii;
typedef pair<int, Pii> Pip;
typedef vector<int> Vi;
const int INF = (1<<25);
const int MAX_V = 101;
const int dx[]={1,0,-1,0}, dy[]={0,-1,0,1};
struct edge {
int to, cost;
edge(int _to, ... | a.cc: In function 'int dij(int, int, int)':
a.cc:45:20: error: 'G' was not declared in this scope
45 | for(int i=0; i<G[v].size(); i++) {
| ^
a.cc: In function 'int main()':
a.cc:67:5: error: 'init' was not declared in this scope; did you mean 'int'?
67 | init(n);
| ^~~~... |
s255738466 | p00212 | C++ | include<bits/stdc++.h>
#define F first
#define S second
#define INF 1<<28
using namespace std;
int c, n, s, d;
typedef pair < int, int > P;
typedef pair < int, P > PP;
vector < P > vec[111];
int solve(){
int dist[111][11]; for(int i=0;i<111;i++)for(int j=0;j<11;j++) dist[i][j] = INF;
priority_queue < PP, vect... | a.cc:1:1: error: 'include' does not name a type
1 | include<bits/stdc++.h>
| ^~~~~~~
a.cc:8:9: error: 'pair' does not name a type
8 | typedef pair < int, int > P;
| ^~~~
a.cc:9:9: error: 'pair' does not name a type
9 | typedef pair < int, P > PP;
| ^~~~
a.cc:10:1: error: 'v... |
s932252300 | p00212 | C++ | #include<iostream>
#include<string>
#include<vector>
#include<cstdio>
#include<queue>
#include<map>
#define P pair<int,int>
using namespace std;
struct K {
int basho, nokori, mincost;
};
bool operator<(K a, K b) {
return a.mincost > b.mincost;
}
int main() {
int cost[100][11];//n???????????°????????§m??????????????... | a.cc: In function 'int main()':
a.cc:21:17: error: 'memset' was not declared in this scope
21 | memset(cost, 0x3f, sizeof(cost));
| ^~~~~~
a.cc:7:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
6 | #include<map>
+... |
s608759993 | p00212 | C++ | #pragma once
#include <vector>
#include <queue>
#include <algorithm>
#include <string.h>
template <size_t N, typename COST_T>
class Dijkstra
{
public:
struct Path
{
int connectingIndex;
COST_T cost;
};
struct Agent
{
int index;
int prev_index;
COST_T cost;
bool operator<(const Agent& rhs) const
{
... | a.cc:1:9: warning: #pragma once in main file
1 | #pragma once
| ^~~~
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s803026418 | p00212 | C++ | typedef pair<int, int> pi; // ?????????????????? ?????¨??????
typedef pair<int, pi>P; // ????????? pi
struct edge{ int to, cost; };
int C, V, E, S, D;
int d[128][16];
vector<vector<edge> >G(128);
void dijkstra(int s){
priority_queue<P, vector<P>, greater<P> >q;
rep(i, V) rep(j, C+1) d[i][j] = INF;
d[s][C] = 0;... | a.cc:1:9: error: 'pair' does not name a type
1 | typedef pair<int, int> pi; // ?????????????????? ?????¨??????
| ^~~~
a.cc:2:9: error: 'pair' does not name a type
2 | typedef pair<int, pi>P; // ????????? pi
| ^~~~
a.cc:8:1: error: 'vector' does not name a type
8 | vector<vector<e... |
s193514451 | p00212 | C++ | typedef pair<int, int> pi; // ?????????????????? ?????¨??????
typedef pair<int, pi> P; // ????????? pi
struct edge{ int to, cost; };
int C, V, E, S, D;
int d[128][16];
vector<vector<edge> >G(128);
void dijkstra(int s){
priority_queue<P, vector<P>, greater<P> >q;
rep(i, V) rep(j, C+1) d[i][j] = INF;
d[s][C] = 0... | a.cc:1:9: error: 'pair' does not name a type
1 | typedef pair<int, int> pi; // ?????????????????? ?????¨??????
| ^~~~
a.cc:2:9: error: 'pair' does not name a type
2 | typedef pair<int, pi> P; // ????????? pi
| ^~~~
a.cc:8:1: error: 'vector' does not name a type
8 | vector<vector<... |
s496669719 | p00212 | C++ | #include "bits/stdc++.h"
using namespace std;
const int MOD = (int)1e9 + 7, INF = (1 << 27); const ll INFLL = (1LL << 55);
#define FOR(i,a,b) for(int (i)=(a);i<(int)(b);i++)
#define rep(i,n) FOR(i,0,n)
template<typename T> void dbg(T x) { cout << x << "\n"; }
template<typename T, typename U> static void chmin(T &x, U y... | a.cc:3:54: error: 'll' does not name a type
3 | const int MOD = (int)1e9 + 7, INF = (1 << 27); const ll INFLL = (1LL << 55);
| ^~
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.