submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s513949830 | p00518 | Java | import java.io.*;
import java.util.Arrays;
class Main{
static final PrintWriter out=new PrintWriter(System.out);
static final int MOD=10007;
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line="";
while((line=br.readLi... | Main.java:19: error: bad operand types for binary operator '&&'
if((i>>(1<<0)&1)&&(i>>pic[0]&1)) dp[0][i]=1;
^
first type: int
second type: int
Main.java:24: error: bad operand types for binary operator '&'
if((j>>pic[i]&1==0)&&(k>>pic[i]&1==0)) dp[i][k]+=dp[i-1][j];
^
first type: i... |
s346062529 | p00518 | Java | import java.io.*;
import java.util.Arrays;
class Main{
static final PrintWriter out=new PrintWriter(System.out);
static final int MOD=10007;
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line="";
while((line=br.readLi... | Main.java:25: error: bad operand type int for unary operator '!'
if((!j>>pic[i]&1)==0&&(k>>pic[i]&1)==0&&(j&k)!=0) dp[i][k]+=dp[i-1][j];
^
1 error
|
s285128873 | p00518 | Java | ?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import java.io.*;
import java.util.Arrays;
class Main{
static final PrintWriter out=new PrintWriter(System.out);
static final int MOD=10007;
public static void main(String[] args) throws ... | Main.java:1: error: class, interface, enum, or record expected
?
^
Main.java:45: error: class, interface, enum, or record expected
import java.util.Arrays;
^
2 errors
|
s289858860 | p00518 | Java | import java.io.*;
import java.util.Scanner;
public class AOJ0595{
public static void main(String[] args) throws IOException {
Scanner sc = new Scanner(System.in);
BufferedReader input = new BufferedReader (new InputStreamReader (System.in));
int n = sc.nextInt();
String str = input.readLine();
... | Main.java:4: error: class AOJ0595 is public, should be declared in a file named AOJ0595.java
public class AOJ0595{
^
1 error
|
s501364343 | p00518 | Java | import java.io.*;
import java.util.Scanner;
public class AOJ0595 {
public static void main(String[] args) throws IOException {
Scanner sc = new Scanner(System.in);
BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
int n = sc.nextInt();
String str = input.readLine();
char[] kanrisy... | Main.java:4: error: class AOJ0595 is public, should be declared in a file named AOJ0595.java
public class AOJ0595 {
^
1 error
|
s873078189 | p00518 | Java | import java.util.Scanner;
public class AOJ0595 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
String str = sc.next();
char[] kanrisya = new char[n + 1];
kanrisya = str.toCharArray();
int[] kanri = new int[n + 1];
int[][] bunki = new int[n + 1][7];
... | Main.java:3: error: class AOJ0595 is public, should be declared in a file named AOJ0595.java
public class AOJ0595 {
^
1 error
|
s403890731 | p00518 | C | #include <bits/stdc++.h>
using namespace std;
const int MOD = 10007;
int dp[1024][8];
int joi(char c)
{
if (c == 'J') return 4;
else if (c == 'O') return 2;
return 1;
}
int main()
{
int n;
char key[1024] = {0};
scanf("%d", &n);
scanf("%s", key);
int first = joi(*key);
for (int i = 1; i < 8; i++){
if ... | main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
1 | #include <bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s714788223 | p00518 | C | #define r(i,n) for(int i=0;i<n;i++)
int a[999][8],n,t,d[99];char s[999];main(){scanf("%d%s",&n,s);a[0][1]=d[79]=1;d[73]=2;r(i,n)r(j,8)r(k,8)if(j&k&&k>>d[s[i]]&1)a[i+1][k]+=a[i][j]%10007;r(i,8)t+=a[n][i];printf("%d\n",t%10007);} | main.c:2:37: error: return type defaults to 'int' [-Wimplicit-int]
2 | int a[999][8],n,t,d[99];char s[999];main(){scanf("%d%s",&n,s);a[0][1]=d[79]=1;d[73]=2;r(i,n)r(j,8)r(k,8)if(j&k&&k>>d[s[i]]&1)a[i+1][k]+=a[i][j]%10007;r(i,8)t+=a[n][i];printf("%d\n",t%10007);}
| ^~~~
main... |
s138130786 | p00518 | C | int a[1999][9],z,u,n,i,j,k;main(){scanf("%d ",&n);a[0][2]=1;for(i=0;i<n;i++){u=getchar()%4-1;fprintf(stderr,"%d\n",u);for(j=8;j--;){for(k=8;k--;)if(j&k&&j>>u&1)a[i+1][j]+=a[i][k]%10007;z+=a[n][j];}}printf("%d\n",z%10007);} | main.c:1:28: error: return type defaults to 'int' [-Wimplicit-int]
1 | int a[1999][9],z,u,n,i,j,k;main(){scanf("%d ",&n);a[0][2]=1;for(i=0;i<n;i++){u=getchar()%4-1;fprintf(stderr,"%d\n",u);for(j=8;j--;){for(k=8;k--;)if(j&k&&j>>u&1)a[i+1][j]+=a[i][k]%10007;z+=a[n][j];}}printf("%d\n",z%10007);}
| ... |
s105823035 | p00518 | C++ | #include<stdio.h>
#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
int dp[1001][8];
memset(dp, 0, sizeof(dp));
int n, i, i2, i3,k;
char sc[1000];
cin >> n >> sc;
for (i = 0; i < n; i++){
if (sc[i] == 'J')k = 1;
else if (sc[i] == 'O')k = 2;
else if (sc[i] == 'I')k = 4;
for (i2 = 1; ... | a.cc: In function 'int main()':
a.cc:8:9: error: 'memset' was not declared in this scope
8 | 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 <cstr... |
s730299608 | p00518 | C++ | #include<stdio.h>
#include<iostream>
#include<algorithm>
#include<memory>
using namespace std;
int main()
{
int dp[1001][8];
memset(dp, 0, sizeof(dp));
int n, i, i2, i3,k;
char sc[1001];
cin >> n >> sc;
for (i = 0; i < n; i++){
if (sc[i] == 'J')k = 1;
else if (sc[i] == 'O')k = 2;
else if (sc[i] == 'I')k =... | a.cc: In function 'int main()':
a.cc:10:9: error: 'memset' was not declared in this scope
10 | memset(dp, 0, sizeof(dp));
| ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include<memory>
+++ |+#include <cstrin... |
s170238292 | p00518 | C++ | d | a.cc:1:1: error: 'd' does not name a type
1 | d
| ^
|
s513510214 | p00518 | C++ | #include<iostream>
using namespace std;
int dp[1005][9];
int check(char a){
switch(a){
case 'J':
return 1;
case 'O':
return 2;
case 'I':
return 4;
default:
return 0;
}
}
int main(){
unsigned long long n,ans;
string s;
ci... | a.cc: In function 'int main()':
a.cc:20:5: error: 'memset' was not declared in this scope
20 | memset(dp,0,sizeof(dp));
| ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include<iostream>
+++ |+#include <cstring>
2... |
s521019561 | p00518 | C++ | #include<iostream>
#include<stdlib.h>
using namespace std;
int dp[1005][9];
int check(char a){
switch(a){
case 'J':
return 1;
case 'O':
return 2;
case 'I':
return 4;
default:
return 0;
}
}
int main(){
unsigned long long n,ans;
... | a.cc: In function 'int main()':
a.cc:21:5: error: 'memset' was not declared in this scope
21 | 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<stdlib.h>
+++ |+#include <cstring>
3... |
s066567135 | p00518 | C++ | #include<iostream>
#include<stdlib.h>
using namespace std;
int dp[1005][9];
int check(char a){
switch(a){
case 'J':
return 1;
case 'O':
return 2;
case 'I':
return 4;
default:
return 0;
}
}
int main(){
unsigned long long n,ans;
... | a.cc: In function 'int main()':
a.cc:21:5: error: 'memset' was not declared in this scope
21 | 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<stdlib.h>
+++ |+#include <cstring>
3... |
s478607092 | p00518 | C++ | #include<iostream>
#include<string>
using namespace std;
#define MOD 10007
int main(){
int x[1001][3][2][2][2];
int k[1001];
int l[3];
memset(x,0,sizeof(x));
x[0][0][1][0][0]=1;
k[0]=0;
int m,sum=0;
string S;
cin>>m;
cin>>S;
for(int i=0;i<m;i++){
if(S[i]=='J'){
k[i+1]=0;
}
else if(S[i]=='O'){
k... | a.cc: In function 'int main()':
a.cc:11:9: error: 'memset' was not declared in this scope
11 | memset(x,0,sizeof(x));
| ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include<iostream>
+++ |+#include <cstring>... |
s301844799 | p00518 | C++ | #include <iostream>
#include <string>
using namespace std;
const int MOD = 10007;
int joi(char c)
{
if(c=='J') return 1;
if(c=='O') return 2;
return 4;
}
int main()
{
int dp[8][1000]={};
int n;
string s;
cin >> n;
cin >> s;
for(int j=0;j<8;j++)
if(joi(s[i])&j) dp[j][0]=1;
for(int i=1;i<n;i++)
for(int ... | a.cc: In function 'int main()':
a.cc:23:26: error: 'i' was not declared in this scope
23 | if(joi(s[i])&j) dp[j][0]=1;
| ^
|
s764550570 | p00518 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
int dp[1001][8];
int can[8][7]={0,0,0,0,0,0,0,1,3,5,7,0,0,0,2,3,6,7,0,0,0,1,2,3,5,6,7,0,4,5,6,7,0,0,0,1,3,4,5,6,7,0,2,3,4,5,6,7,0,1,2,3,4,5,6,7};
int not[3][4]={0,1,2,3,0,1,4,5,0,2,4,6};
int main(){
int n;
char z;
cin>>n>>z;
for(int i=0;i<n;i++){
for(int... | a.cc:6:5: error: expected unqualified-id before 'not' token
6 | int not[3][4]={0,1,2,3,0,1,4,5,0,2,4,6};
| ^~~
a.cc: In lambda function:
a.cc:23:36: error: expected '{' before '[' token
23 | if(not[set][j]==i){
| ^
a.cc: In function 'int ... |
s918366280 | p00518 | C++ | #include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <map>
#include <sstream>
#include <queue>
#include <cstring>
#include <cstdlib>
#include <algorithm>
#include <iterator>
#include <stack>
#include <list>
using namespace std;
typedef long long int lli;
typedef pair<int,int> P;
#define F... | a.cc: In function 'int main()':
a.cc:79:18: error: expected '}' at end of input
79 | return 0;
| ^
a.cc:22:11: note: to match this '{'
22 | int main(){
| ^
|
s680591753 | p00518 | C++ | #include<bits/stdc++.h>
#define r(i,n) for(int i=0;i<n;i++)
int a[1010][8],n,t,d[90];char s[1010];main(){scanf("%d%s",&n,s);a[0][1]=d[79]=1;d[73]=2;r(i,n)r(j,8)r(k,8)if(j&k&&k>>d[s+i]&1)(a[i+1][k]+=a[i][j])%=10007;r(i,8)t+=a[n][i];printf("%d\n",t%10007);} | a.cc:3:39: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
3 | int a[1010][8],n,t,d[90];char s[1010];main(){scanf("%d%s",&n,s);a[0][1]=d[79]=1;d[73]=2;r(i,n)r(j,8)r(k,8)if(j&k&&k>>d[s+i]&1)(a[i+1][k]+=a[i][j])%=10007;r(i,8)t+=a[n][i];printf("%d\n",t%10007);}
| ... |
s603147897 | p00518 | C++ | #include<bits/stdc++.h>
#define r(i,n) for(int i=0;i<n;i++)
int a[1010][8],n,t,d[90];char s[1010];main(){scanf("%d%s",&n,s);a[0][1]=d[79]=1;d[73]=2;r(i,n)r(j,8)r(k,8)if(j&k&&k>>d[s+i]&1)(a[i+1][k]+=a[i][j])%=10007;r(i,8)t+=a[n][i];printf("%d\n",t%10007);} | a.cc:3:39: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
3 | int a[1010][8],n,t,d[90];char s[1010];main(){scanf("%d%s",&n,s);a[0][1]=d[79]=1;d[73]=2;r(i,n)r(j,8)r(k,8)if(j&k&&k>>d[s+i]&1)(a[i+1][k]+=a[i][j])%=10007;r(i,8)t+=a[n][i];printf("%d\n",t%10007);}
| ... |
s447146496 | p00518 | C++ | int a[999][8],z,u,n,i,j,k;main(){scanf("%d ",&n);a[0][2]=1;for(i=0;i<n;i++){u=getchar()%4-1;j=8;while(j--){k=8;while(k--){if(j&k&&j>>u&1)a[i+1][j]+=a[i][k]%10007;}z+=a[n][j];}}printf("%d\n",z%10007);} | a.cc:1:27: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
1 | int a[999][8],z,u,n,i,j,k;main(){scanf("%d ",&n);a[0][2]=1;for(i=0;i<n;i++){u=getchar()%4-1;j=8;while(j--){k=8;while(k--){if(j&k&&j>>u&1)a[i+1][j]+=a[i][k]%10007;}z+=a[n][j];}}printf("%d\n",z%10007);}
| ... |
s170043572 | p00518 | C++ | #include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <string>
#include <map>
#include <queue>
#include <stack>
#include <cstring>
#include <cmath>
#include <deque>
#include <set>
#define rep_(v, f, l) for (auto v = (f); v != (l); ++v)
#define rep(v, n) rep_(v, 0, n)
#define lep(v, o) r... | a.cc: In instantiation of 'bool in(T&) [with T = int]':
a.cc:32:4: required from here
32 | in(N), in(need);
| ~~^~~
a.cc:24:58: error: cannot convert 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} to 'bool' in return
24 | template<typename T> inline bool in(T& ... |
s948460949 | p00519 | Java | import java.io.*;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.PriorityQueue;
class Main{
static final PrintWriter out=new PrintWriter(System.out);
static final int INF=Integer.MAX_VALUE/2;
public static cl... | Main.java:116: error: reached end of file while parsing
}
^
1 error
|
s944836977 | p00519 | Java | import java.io.*;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.PriorityQueue;
class Main{
static final PrintWriter out=new PrintWriter(System.out);
static final int INF=Integer.MAX_VALUE/2;
public static cl... | Main.java:57: error: non-static variable this cannot be referenced from a static context
array[i]=new MyArrayList();
^
Main.java:110: error: cannot find symbol
if(d[e.to]>d[v]+e.cost){
^
symbol: variable d
location: class Main
Main.java:110: error: cannot find symbol
if(d[e.to]>d[v]+e.cost){
... |
s098926435 | p00519 | Java | import java.io.*;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.PriorityQueue;
class Main{
static final PrintWriter out=new PrintWriter(System.out);
static final int INF=Integer.MAX_VALUE/2;
public static cl... | Main.java:66: error: cannot find symbol
for(int i=0;i<n;i++) bfs(i,d[i],visited,cg,array);
^
symbol: variable visited
location: class Main
Main.java:79: error: cannot find symbol
Arrays.fill(visited,false);
^
symbol: variable visited
location: class Main
2 errors
|
s124890440 | p00519 | Java | import java.io.*;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.PriorityQueue;
class Main{
static final PrintWriter out=new PrintWriter(System.out);
static final int INF=Integer.MAX_VALUE;
public static clas... | Main.java:58: error: incompatible types: MyArrayList[] cannot be converted to MyArrayList
MyArrayList carray=array.clone();
^
Main.java:69: error: array required, but MyArrayList found
if(cg[i][j]) carray[i].add(new Edge(j,c[i]));
^
Main.java:72: error: incompatible type... |
s519773697 | p00519 | Java | import java.io.*;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.PriorityQueue;
class Main{
static final PrintWriter out=new PrintWriter(System.out);
static final int INF=Integer.MAX_VALUE;
public static clas... | Main.java:82: error: illegal start of expression
while(!que.isEmpty()&&){
^
Main.java:100: error: ')' expected
while(!pque.isEmpty()dist[dist.length-1]!=INF){
^
Main.java:100: error: not a statement
while(!pque.isEmpty()dist[dist.length-1]!=INF){
... |
s615570985 | p00519 | Java | import java.io.*;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.PriorityQueue;
import java.util.StringTokenizer;
class Main{
static final PrintWriter out=new PrintWriter(System.out);
static final int INF=In... | Main.java:45: error: cannot find symbol
int n=Integer.parseInt(line.split(" ")[0]);
^
symbol: variable line
location: class Main
Main.java:46: error: cannot find symbol
int k=Integer.parseInt(line.split(" ")[1]);
^
symbol: variable line
location: class Main
2 er... |
s922123101 | p00519 | Java | import java.io.*;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.PriorityQueue;
import java.util.StringTokenizer;
class Main{
static final int INF=Integer.MAX_VALUE;
public static class Edge{
int to;
int cost;
p... | Main.java:44: error: cannot find symbol
int n=Integer.parseInt(line.split(" ")[0]);
^
symbol: variable line
location: class Main
Main.java:45: error: cannot find symbol
int k=Integer.parseInt(line.split(" ")[1]);
^
symbol: variable line
location: class Main
2 er... |
s622325537 | p00519 | C++ | #include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
using namespace std;
struct T{
int v,r;
};
struct S{
int v,c,r;
bool operator<(S s)const{
return c>s.c;
}
};
int N,K;
int C[5001],R[5001];
vector<int> G[5001];
int main(){
cin>>N>>K;
for(int i=1;i<=N;i++){
cin>>C[i]>>R[i];
... | a.cc: In function 'int main()':
a.cc:41:22: error: use of an operand of type 'bool' in 'operator++' is forbidden in C++17
41 | if(mem[cs.v][cs.r]++)continue;
| ~~~~~~~~~~~~~~^
a.cc:44:18: error: 'H' was not declared in this scope
44 | for(auto e:H[cs.v]){
| ^
a.cc:45:... |
s007580507 | p00519 | C++ | #include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <string>
#include <map>
#include <queue>
#include <stack>
#include <cstring>
#include <cmath>
#include <deque>
#include <set>
#include <climits>
#define rep_(v, f, l) for (auto v = (f); v != (l); ++v)
#define rep(v, n) rep_(v, 0, n)
... | a.cc: In instantiation of 'bool in(T&) [with T = int]':
a.cc:80:4: required from here
80 | in(N), in(K);
| ~~^~~
a.cc:25:58: error: cannot convert 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} to 'bool' in return
25 | template<typename T> inline bool in(T& x){... |
s035867956 | p00519 | C++ | import java.io.*;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.PriorityQueue;
import java.util.StringTokenizer;
class Main{
static final PrintWriter out=new PrintWriter(System.out);
static final int INF=In... | a.cc:1:1: error: 'import' does not name a type
1 | import java.io.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
2 | import java.util.ArrayDeque;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a... |
s571838653 | p00519 | C++ | #include "bits/stdc++.h"
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define INF 999999999
vector<int> pass[6000];
int n,k;
int c[6000],r[6000];
int d[6000];
bool used[6000];
void dfs(int v,int u,int f,int end,bool visited[6000]){
if(visited[u])return ;
visited[u] = true;
d[u] = mi... | a.cc: In function 'int main()':
a.cc:52:17: error: 'class std::vector<int>' has no member named 'pb'
52 | pass[a].pb(b);
| ^~
a.cc:53:17: error: 'class std::vector<int>' has no member named 'pb'
53 | pass[b].pb(a);
| ^~
|
s484158100 | p00519 | C++ | #include <queue>
#include <vector>
#include <utility>
#include <iostream>
using namespace std;
#define INF (1 << 30)
#define WHITE 0
#define GRAY 1
#define BLACK 2
int main()
{
int N, K, A, B;
cin >> N >> K;
vector<int> C(N + 1);
vector<int> R(N + 1);
vector<int> S(N + 1);
vector<int> D(N + 1);
vector... | a.cc: In function 'int main()':
a.cc:84:29: error: 'MAX_N' was not declared in this scope
84 | for (int i = 0; i < MAX_N; i++)
| ^~~~~
|
s494513223 | p00519 | C++ | #include <iostream>
#include <vector>
#include <queue>
#include <climits>
using namespace std;
int n,k;
vector<int> c,r,result;
vector<bool> p, notv;
priority_queue<pair<int,int>, vector<pair<int,int>>, greater<pair<int,int>>> q;
void addRoute(int now, int remain, int cost){
notv[i] = false;
if(remain){
for(int ... | a.cc: In function 'void addRoute(int, int, int)':
a.cc:13:14: error: 'i' was not declared in this scope
13 | notv[i] = false;
| ^
|
s060161184 | p00519 | C++ | #include <iostream>
#include <queue>
#include <vector>
#include <set>
using namespace std;
const int INF = 1000000007;
class V
{
public:
V(){dj=INF;visited=false;}
unordered_set<int> graph;
unordered_set<int> graph2;
int cost;
int dj;
int num;
bool visited;
};
V v[5000];
int main()
{
int n, k;
cin >> n >>... | a.cc:14:9: error: 'unordered_set' does not name a type
14 | unordered_set<int> graph;
| ^~~~~~~~~~~~~
a.cc:15:9: error: 'unordered_set' does not name a type
15 | unordered_set<int> graph2;
| ^~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:35:24: error: 'class V' has ... |
s798269146 | p00519 | C++ | #include <iostream>
#include <queue>
#include <vector>
#include <set>
#include <unordered_set>
using namespace std;
const int INF = 1000000007;
class V
{
public:
V(){dj=INF;visited=false;}
unordered_set<int> graph;
unordered_set<int> graph2;
int cost;
int dj;
int num;
bool visited;
};
V v[5000];
int main()
... | a.cc: In function 'int main()':
a.cc:50:81: error: conversion from 'std::unordered_set<int>::iterator' {aka 'std::__detail::_Insert_base<int, int, std::allocator<int>, std::__detail::_Identity, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Pr... |
s797511732 | p00519 | C++ | #include <iostream>
#include <queue>
#include <vector>
#include <set>
#include <unordered_set>
using namespace std;
const int INF = 1000000007;
class V
{
public:
V(){dj=INF;visited=false;}
unordered_set<int> graph;
unordered_set<int> graph2;
int cost;
int dj;
int num;
bool visited;
};
V v[5000];
int main()
... | a.cc: In function 'int main()':
a.cc:50:81: error: conversion from 'std::unordered_set<int>::iterator' {aka 'std::__detail::_Insert_base<int, int, std::allocator<int>, std::__detail::_Identity, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Pr... |
s218455372 | p00519 | C++ | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define PB push_back
#define PPB pop_back
typedef pair<int, int> pii;
typedef pair<int, pii> pip;
static const int INF = 1LL<<61;
static const int MAX_N = 5005;
struct S {
int to, c, r;
S(int p1, int p2, int p3) {
to = p1;
c = p2;
r... | a.cc: In function 'int main()':
a.cc:69:14: error: reference to 'visit' is ambiguous
69 | memset(visit, 0, sizeof(visit));
| ^~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:80,
from a.cc:1:
/usr/include/c++/14/variant:1855:5: note: candidates a... |
s262018001 | p00519 | C++ | #include <queue>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int V, E, s, t, w[5003], r[5003], d[5003]; vector<int> G[5003], H[5003];
int main() {
scanf("%d%d", &V, &E);
for(int i = 0; i < V; i++) scanf("%d%d", &s, &t);
for(int i = 0; i < E; i++) {
scanf("%d%d", &s, &t); s--, t-... | a.cc: In function 'int main()':
a.cc:31:16: error: 'que' was not declared in this scope; did you mean 'que2'?
31 | while(!que.empty()){
| ^~~
| que2
|
s618311206 | p00519 | C++ |
#include <stdio.h>
#include <vector>
#include <queue>
#include <functional>
#include <utility>
#define MAX_N 5000
using namespace std;
struct edge { int to, cost; };
vector<edge> graph[MAX_N];
vector<int> simpg[MAX_N];
bool bfsflag[MAX_N];
int dist[MAX_N];
int n, k;
int c[MAX_N], r[MAX_N];
using P = pair<int, int... | a.cc: In function 'void dijkstra(int)':
a.cc:25:46: error: 'INT_MAX' was not declared in this scope
25 | for (int a = 0; a < n; ++a)dist[a] = INT_MAX - 100000;
| ^~~~~~~
a.cc:7:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by ... |
s093005435 | p00519 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<(n);i++)
const int INF = 1e9;
int n, k; //????????° ???????????¬??°
int c[5010], r[5010]; //???????????£?¶???????????????????????????¬??°
vector<int> d[5010];//?????????... | a.cc: In function 'void dijkstra(int)':
a.cc:31:58: error: 'G' was not declared in this scope
31 | dist[u] = min(dist[u], dist[v] + G[v][u]);//??????????????£??\????????????G?????¨??§?????????
| ^
a.cc: In function 'int main()':
a... |
s046865920 | p00519 | C++ | #include<iostream>
#include<queue>
#include<vector>
#include<map>
using namespace std;
bool used[5005];
int town[5005][2];//??????????????¢
vector<int> v1[5005];
vector<pair<int,int> > v2[5005];
queue<int> bfs;
priority_queue<pair<int,int>,vector<pair<int,int> >,greater<pair<int,int> > > q1;
int main(){
int n,m;
int... | a.cc: In function 'int main()':
a.cc:45:17: error: 'memset' was not declared in this scope
45 | memset(used,false,sizeof(used));
| ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include<map>
++... |
s716263300 | p00519 | C++ | #include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstring>
using namespace std;
typedef int ll;
typedef pair<ll,ll> P;
typedef double db;
const ll INF = 0xfffffff;
ll n,k;
ll c[5000],r[5000];
ll d[5000]... | a.cc: In function 'int main()':
a.cc:51:53: error: 'x' was not declared in this scope
51 | if(t.second) for(ll i=0;i<G[x].size();++i) if(d[G[t.first][i]]>p.first||tmax[G[t.first][i]]<t.second-1) q2.push(P(G[t.first][i],t.second-1));
| ... |
s656312753 | p00519 | C++ | #include <cstdio>
#include <stack>
#include <map>
#include <queue>
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <bitset>
#include <math.h>
#include <stdio.h>
#include <queue>
#define F first
#define S second
#define MP make_pair
#define INF 1e9
#define MOD 1000000007
using names... | a.cc: In function 'void bfs(int, int)':
a.cc:37:9: error: 'memset' was not declared in this scope
37 | memset(flag, 0, sizeof(flag));
| ^~~~~~
a.cc:11:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
10 | #include <math.h>
+++ |+#i... |
s108969884 | p00519 | C++ | #include <queue>
#include <vector>
#include <iostream>
#include <functional>
using namespace std;
struct state {
int cost, pos, rem;
state() : cost(0), pos(0), rem(0) {};
state(int c, int p, int r) : cost(c), pos(p), rem(r) {};
};
bool operator<(const state& s1, const state& s2) {
return s1.cost < s2.cost;
}
bool o... | a.cc: In function 'int main()':
a.cc:45:18: error: 'min_element' was not declared in this scope
45 | cout << *min_element(dist[n - 1].begin(), dist[n - 1].end());
| ^~~~~~~~~~~
|
s580499364 | p00519 | C++ | #include <cstdio>
#include <vector>
#include <queue>
using namespace std;
typedef pair<int, int> P;
const int INF = 1 << 30;
int n, k;
int c[5001], r[5001], road[2], cost[5001];
vector<int> city[5001];
queue<int> que;
priority_queue<P, vector<P>, greater<P> > p_que;
void dfs(int v, int count){
if(count == 0)
retu... | a.cc: In function 'void dfs(int, int)':
a.cc:20:20: error: 'flag' was not declared in this scope
20 | if(flag[city[v][i]])
| ^~~~
a.cc: In function 'void dijkstra()':
a.cc:49:17: error: 'flag' was not declared in this scope
49 | flag[now] = 1;
| ... |
s417632728 | p00519 | C++ | #include <cstdio>
#include <vector>
#include <queue>
using namespace std;
typedef pair<int, int> P;
const int INF = 1 << 30;
int n, k;
int c[5001], r[5001], road[2], cost[5001];
bool flag[5001];
vector<int> city[5001];
queue<int> que;
priority_queue<P, vector<P>, greater<P> > p_que;
void dfs(int v, int count){
if(c... | a.cc: In function 'void dfs(int, int)':
a.cc:17:34: error: 'i' was not declared in this scope
17 | if(count == 0 || flag[v][i])
| ^
a.cc:21:36: error: expected ']' before ';' token
21 | flag[city[v][i] = 1;
| ^... |
s790290036 | p00519 | C++ | #include <cstdio>
#include <vector>
#include <queue>
using namespace std;
typedef pair<int, int> P;
const int INF = 1 << 30;
int n, k;
int c[5001], r[5001], road[2], cost[5001];
bool flag[5001];
vector<int> city[5001];
queue<int> que;
priority_queue<P, vector<P>, greater<P> > p_que;
void dfs(int v, int count){
if(... | a.cc: In function 'void dfs(int, int)':
a.cc:19:22: error: 'i' was not declared in this scope
19 | flag[city[v][i]] = 1;
| ^
|
s702833679 | p00519 | C++ | #include<iostream>
#include<cstdio>
#include<vector>
#include<queue>
#include<algorithm>
#define int long long
#define P pair<int,int>
using namespace std;
int cost[5000], idou[5000], mincost[5000];
vector<int>rinsetu[5000];
bool operator <(P a, P b) {
return a.first < b.first;
}
signed main()
{
int a, b;
cin >> a ... | a.cc: In function 'int main()':
a.cc:19:40: error: 'LLONG_MAX' was not declared in this scope
19 | fill(mincost + 1, mincost + a, LLONG_MAX / 3);
| ^~~~~~~~~
a.cc:6:1: note: 'LLONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include... |
s338674420 | p00519 | C++ | #include<iostream>
#include<algorithm>
#include<vector>
#include<utility>
#include<functional>
#include<queue>
using namespace std;
#define INF 1000000007
typedef pair<int, int> P;
struct edge{int to,cost;};
int d[5005];
P cst[5005];
bool used[5005];
vector<edge>graf[5005];
vector<edge>G[5005];
int main() {
int... | a.cc: In function 'int main()':
a.cc:37:8: error: 'Q' was not declared in this scope
37 | Q.push(P(0,ia));
| ^
a.cc:47:51: error: expected ')' before ';' token
47 | q.push(P(d[e.to],e.to));
| ^
| ... |
s062341291 | p00519 | C++ | #include "iostream"
#include "climits"
#include "list"
#include "queue"
#include "stack"
#include "set"
#include "functional"
#include "algorithm"
#include "math.h"
#include "utility"
#include "string"
#include "map"
#include "unordered_map"
#include "iomanip"
#include "random"
using namespace std;
const long long int... | a.cc: In function 'int main()':
a.cc:60:55: error: 'i' was not declared in this scope
60 | if (move[j] && move[j] <= far[i])can[i].push_back(j);
| ^
|
s321038357 | p00519 | C++ | #include<string>
#include<deque>
#include<queue>
#include<vector>
#include<algorithm>
#include<iostream>
#include<set>
#include<cmath>
#include<tuple>
#include<map>
#include<functional>
using namespace std;
typedef long long int llint;
typedef bool izryt;
#define mp make_pair
#define mt make_tuple
#define pub push_back... | a.cc:27:20: error: 'std::vector<std::vector<int> > time' redeclared as different kind of entity
27 | vector<vector<int>>time;
| ^~~~
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
from /usr/... |
s751363475 | p00519 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> P;
#define F first
#define S second
#define MP make_pair
int N, K;
int c[5000], r[5000];
bool flag[5000];
int flag2[5000];
vector<int> G[5000], G2[5000];
priority_queue<P, vector<P>, greater<P> > pq;
void bfs(int s)
{
queue<P> que;
que.push(MP(s, 0)... | a.cc: In function 'int main()':
a.cc:56:17: error: 'scnaf' was not declared in this scope; did you mean 'scanf'?
56 | scnaf("%d%d", c + i, r + i);
| ^~~~~
| scanf
|
s653703145 | p00519 | C++ | #include <iostream>
#include <vector>
#include <utility>
#include <queue>
#include <cstring>
#define INF 900000000
using namespace std;
int n, k, c[5010], r[5010], cost[5010];
vector<int> road[5010];
vector<pair<int, int>> adj[5010];
bool done[5010];
void dfs (int dep, int lim, int num)
{
done[lim]=true;
... | a.cc:24:1: error: extended character is not valid in an identifier
24 | if (!done[u])
| ^
a.cc:24:1: error: extended character is not valid in an identifier
a.cc:24:1: error: extended character is not valid in an identifier
a.cc:24:1: error: extended character is not valid in an identifier
a.cc:2... |
s431410552 | p00519 | C++ | #include <iostream>
#include <vector>
#include <utility>
#include <queue>
#include <cstring>
#define INF 900000000
using namespace std;
int n, k, c[5010], r[5010], cost[5010];
vector<int> road[5010];
vector<pair<int, int>> adj[5010];
bool done[5010];
void dfs (int dep, int lim, int num)
{
done[lim]=true;
... | a.cc:24:1: error: extended character is not valid in an identifier
24 | if (!done[u])
| ^
a.cc:24:1: error: extended character is not valid in an identifier
a.cc:24:1: error: extended character is not valid in an identifier
a.cc:24:1: error: extended character is not valid in an identifier
a.cc:... |
s995249590 | p00519 | C++ | #include<iostream>
#include<queue>
#include<vector>
#include<cstdio>
using namespace std;
struct P{int c,r;};
struct State{
int t;
int pos, remain;
bool operator < (const State& st) const {
return t > st.t;
}
};
const int MAX = 5001;
const int INF = (1<<25);
int T[MAX][MAX];
vector<int> Edge[MAX];
P pric... | a.cc: In function 'void solve()':
a.cc:38:3: error: 'memset' was not declared in this scope
38 | memset(T, -1, sizeof(T));
| ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include<cstdio>
+++ |+#include <cstring>
5 | ... |
s337999716 | p00520 | C++ | #include <iostream>
#include <algorithm>
int32_t N;
int32_t D[120];
int32_t A[120];
int32_t dp[100][0X80];
struct R_print {
template<typename T>
T operator=(T&& v) {
std::cout << v << ')' << '\n'; return std::forward<T>(v);
}
};
//i??\?????????????????¨???????????§???eatable_flag???i????????????i??????7???(????... | a.cc:17:25: error: 'uint8_t' has not been declared
17 | int32_t func(int l_pos, uint8_t eatable_flag)
| ^~~~~~~
a.cc: In function 'int32_t func(int, int)':
a.cc:22:17: error: 'uint16_t' was not declared in this scope
22 | uint16_t mask = 0;
| ^~~... |
s100841246 | p00520 | C++ | #include <iostream>
#include <algorithm>
int32_t N;
int32_t D[120];
int32_t A[120];
int32_t dp[100][0X80];
struct R_print {
template<typename T>
T operator=(T&& v) {
std::cout << v << ')' << '\n'; return std::forward<T>(v);
}
};
//i??\??????????????????¨????????????§???eatable_flag???i????????... | a.cc:17:25: error: 'uint8_t' has not been declared
17 | int32_t func(int l_pos, uint8_t eatable_flag)
| ^~~~~~~
a.cc: In function 'int32_t func(int, int)':
a.cc:22:9: error: 'uint16_t' was not declared in this scope
22 | uint16_t mask = 0;
| ^~~~~~~~
a.cc:3:1: n... |
s362881656 | p00520 | C++ | #include <stdio.h>
#include <tchar.h>
#include<set>
#include<deque>
#include<queue>
#include<map>
#include<string>
#include<iostream>
#include<cstdio>
#include<vector>
#include<algorithm>
#include<functional>
#define fir first
#define sec second
#define mp make_pair
#define mt make_tuple
#define pub push_back
using na... | a.cc:2:10: fatal error: tchar.h: No such file or directory
2 | #include <tchar.h>
| ^~~~~~~~~
compilation terminated.
|
s958154202 | p00520 | C++ | #include <stdio.h>
//#include <tchar.h>
#include<set>
#include<deque>
#include<queue>
#include<map>
#include<string>
#include<iostream>
#include<cstdio>
#include<vector>
#include<algorithm>
#include<functional>
#define fir first
#define sec second
#define mp make_pair
#define mt make_tuple
#define pub push_back
using ... | a.cc: In function 'int main()':
a.cc:42:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
42 | scanf_s("%d",&N);
| ^~~~~~~
| scanf
|
s959487757 | p00521 | Java | import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.InputMismatchException;
... | Main.java:50: error: <identifier> expected
public staitc int numOfEmblem(){
^
1 error
|
s401743298 | p00521 | Java | import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.InputMismatchException;
... | Main.java:25: error: illegal initializer for char
static final char JOI={'J','O','I'};
^
Main.java:31: error: cannot find symbol
flag=ir.makeCharMap(m,n);
^
symbol: method makeCharMap(int,int)
location: variable ir of type InputReader
Main.java:32: error: cannot find symbol
emblem=ir.... |
s366626825 | p00521 | Java | import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.InputMismatchException;
... | Main.java:31: error: cannot find symbol
flag=ir.makeCharMap(m,n);
^
symbol: method makeCharMap(int,int)
location: variable ir of type InputReader
Main.java:32: error: cannot find symbol
emblem=ir.makeCharMap(2,2);
^
symbol: method makeCharMap(int,int)
location: variable ir of type InputReade... |
s217133916 | p00521 | Java | import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.InputMismatchException;
... | Main.java:37: error: incompatible types: possible lossy conversion from int to char
count[i][j]=_count(i-1,j-1)+_count(i,j-1)+_count(i,j)+_count(i-1,j);
^
Main.java:38: error: cannot find symbol
sum+=count[i][j];
^
symbol: variable sum
location: class Main
Main... |
s727789532 | p00521 | Java | import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.InputMismatchException;
... | Main.java:39: error: cannot find symbol
sum+=t;
^
symbol: variable sum
location: class Main
Main.java:47: error: cannot find symbol
int cnt=sum-4*(count[i-1][j-1]+count[i][j-1]+count[i][j]+count[i-1][j]);
^
symbol: variable sum
location: class Main
2 errors
|
s375467680 | p00521 | Java | import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.InputMismatchException;
... | Main.java:63: error: missing return statement
}
^
1 error
|
s453888129 | p00521 | Java | import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.InputMismatchException;
... | Main.java:58: error: cannot find symbol
ans=Math.max(cnt,ans);
^
symbol: variable cnt
location: class Main
1 error
|
s725013589 | p00521 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
int n, m;
char c[1080][1080];
int cnt[1080][1080];
int ans[2][2], anss, res;
int main(){
cin >> m >> n;
for(int i = 1;i <= m;i++)
for(int j = 1;j <= n;j++)
cin >> c[i][j];
for(int i = 0;i < 2;i++)
for(int j = 0;j < 2;j++)
cin >> ans[i][j];
... | a.cc: In function 'int main()':
a.cc:40:88: error: expected ';' before 'tmp'
40 | if(c[k + o][l + p] != ans[o][p]tmp = 0;
| ^~~
| ... |
s004075532 | p00521 | C++ | #include<stdio.h>
char new[1001][1001];
int i,j,k;
int main(void)
{
char old[5];
char joi[3]={'J','O','I'};
int m,n;
int cnt,c,max;
c=0;
cnt=0;
max=0;
scanf("%d %d",&m,&n);
for(i=0;i<m;i++){
for(j=0;j<n;j++){
scanf(" %c",&new[i][j]);
}
}
for(i=0;i<4;i++){
scanf(" %c",&old[i]);
}
for(i=0;i<m-1;i+... | a.cc:2:6: error: expected unqualified-id before 'new'
2 | char new[1001][1001];
| ^~~
a.cc: In function 'int main()':
a.cc:17:41: error: expected type-specifier before '[' token
17 | scanf(" %c",&new[i][j]);
| ^
a.cc:25:31: error: e... |
s483880272 | p00521 | C++ | #include<stdio.h>
char new[1001][1001];
int i,j,k;
int main(void)
{
char old[5];
char joi[3]={'J','O','I'};
int m,n;
long long int cnt,c,max;
c=0;
cnt=0;
max=0;
scanf("%d %d",&m,&n);
for(i=0;i<m;i++){
for(j=0;j<n;j++){
scanf(" %c",&new[i][j]);
}
}
for(i=0;i<4;i++){
scanf(" %c",&old[i]);
}
for(i=... | a.cc:2:6: error: expected unqualified-id before 'new'
2 | char new[1001][1001];
| ^~~
a.cc: In function 'int main()':
a.cc:17:41: error: expected type-specifier before '[' token
17 | scanf(" %c",&new[i][j]);
| ^
a.cc:25:31: error: e... |
s584311919 | p00521 | C++ | #include<stdio.h>
char new[1001][1001];
int i,j,k;
int main(void)
{
char old[5];
char joi[3]={'J','O','I'};
int m,n;
int cnt,c,max;
c=0;
cnt=0;
max=0;
scanf("%d %d",&m,&n);
for(i=0;i<m;i++){
for(j=0;j<n;j++){
scanf(" %c",&new[i][j]);
}
}
for(i=0;i<4;i++){
scanf(" %c",&old[i]);
}
for(i=0;i<m;i++)... | a.cc:2:6: error: expected unqualified-id before 'new'
2 | char new[1001][1001];
| ^~~
a.cc: In function 'int main()':
a.cc:17:41: error: expected type-specifier before '[' token
17 | scanf(" %c",&new[i][j]);
| ^
a.cc:25:31: error: e... |
s009208158 | p00521 | C++ | #include<stdio.h>
char new[1002][1002];
int i,j,k;
int main(void)
{
char old[5];
char joi[3]={'J','O','I'};
int m,n;
int cnt,c,max;
c=0;
cnt=0;
max=0;
scanf("%d %d",&m,&n);
for(i=0;i<m;i++){
for(j=0;j<n;j++){
scanf(" %c",&new[i][j]);
}
}
for(i=0;i<4;i++){
scanf(" %c",&old[i]);
}
for(i=0;i<m;i++)... | a.cc:2:6: error: expected unqualified-id before 'new'
2 | char new[1002][1002];
| ^~~
a.cc: In function 'int main()':
a.cc:17:41: error: expected type-specifier before '[' token
17 | scanf(" %c",&new[i][j]);
| ^
a.cc:25:31: error: e... |
s113263564 | p00521 | C++ | #include <iostream>
#include <string>
#include <algorithm>
using namespace std;
const int MAX_M = 1000, MAX_N = 1000;
int M, N;
string flag[MAX_M];
string Emb[2];
int table[MAX_M][MAX_N];
int res, plus, n;
bool lu(int i, int j){ return flag[i][j] == Emb[0][0]; }
bool ru(int i, int j){ return flag[i][j + 1] == Emb[0][... | a.cc: In function 'int main()':
a.cc:47:9: error: reference to 'plus' is ambiguous
47 | plus = 0;
| ^~~~
In file included from /usr/include/c++/14/string:49,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
... |
s008283098 | p00521 | C++ | #include <string>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
const string JOI = "JOI";
int main()
{
int H, W;
scanf("%d", &H);
scanf("%d", &W);
vector<string> D(H);
for (int i = 0; i < H; i++)
{
cin >> D[i];
}
string C1, C2; cin >> C1 >> C2;
int sum = 0;
for (in... | a.cc: In function 'int main()':
a.cc:65:56: error: redeclaration of 'std::string R1'
65 | string R1 = D[i - 1].substr(j - 1, 2);
| ^~
a.cc:58:56: note: 'std::string R1' previously declared here
58 | ... |
s877635867 | p00521 | C++ | #include<bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;i++)
using namespace std;
struct st {
int x, y;
char c;
};
bool operator<(st a, st b) {
if (a.x == b.x&&a.y == b.y)return a.c < b.c;
if (a.x == b.x)return a.y < b.y;
return a.x < b.x;
}
char s[1000][1001], f[2][3];
int main() {
int m, n; scanf("%d%d", &m, &... | a.cc: In function 'int main()':
a.cc:48:37: error: no matching function for call to 'swap(char&, char)'
48 | swap(s[p.first.x][p.first.y], (char)p.first.c);
| ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14... |
s499013106 | p00521 | C++ | #include <iomanip>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <algorithm>
#include <utility>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <set>
#define INF_LL 9000000000000000000
#define INF 2000000000
#define REP(i, n) for(int i = 0;i < (n);i++)
#define FOR(i, a... | a.cc: In function 'int main()':
a.cc:74:9: error: 'cin' was not declared in this scope
74 | cin >> M >> N;
| ^~~
a.cc:12:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
11 | #include <set>
+++ |+#include <iostream>
12 |
a.... |
s617091352 | p00521 | C++ | //============================================================================
// Name : AOJ.cpp
// Author :
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#include <iostr... | a.cc: In function 'int main()':
a.cc:16:19: error: initializer-string for 'char [4]' is too long [-fpermissive]
16 | char b[4]="SJOI";
| ^~~~~~
|
s316626869 | p00522 | Java | import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.math.BigInteger;
public class Main{
static PrintWriter out... | Main.java:60: error: cannot find symbol
for(int i=0;i<n;i++) ret[a.length-1-i]=a[i];
^
symbol: variable n
location: class Main
1 error
|
s530864115 | p00522 | C++ | #include<iostream>
using namespace std;
const int INF = 1000000000;
int M,N,ans;
int ma[10003];
int ha[503][2];
int dp[503][10003];
int main(void){
cin >> M >> N;
for(int i = 0;i < m;i++){
cin>>ma[i];
}
sort(ma,ma + M,greater<int>());
for(int i = 1;i < M;i++)ma[i] += ma[i-1];
for(int i = 0;i < N;i++){
cin >>... | a.cc: In function 'int main()':
a.cc:11:27: error: 'm' was not declared in this scope
11 | for(int i = 0;i < m;i++){
| ^
a.cc:14:9: error: 'sort' was not declared in this scope; did you mean 'short'?
14 | sort(ma,ma + M,greater<int>());
| ^~~~
| ... |
s397891793 | p00522 | C++ | #include <functional>
#include <iostream>
int p[100100],c[100100],e[100100];
int dp[2][100100];//dp[i+1][j]:=i番目までの箱を使ってj個の饅頭
int main()
{
int n,m;
cin >> n >> m;
int sum=0;
for(int i=0;i<n;i++)cin >> p[i];
for(int i=0;i<m;i++)cin >> c[i] >> e[i];
sort(p,p+n,greater<int>());
for(int i=0;i<n;... | a.cc: In function 'int main()':
a.cc:8:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
8 | cin >> n >> m;
| ^~~
| std::cin
In file included from a.cc:2:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Li... |
s957512823 | p00522 | C++ | #include <functional>
#include <iostream>
using namespace std;
int p[100100],c[100100],e[100100];
int dp[2][100100];//dp[i+1][j]:=i番目までの箱を使ってj個の饅頭
int main()
{
int n,m;
cin >> n >> m;
int sum=0;
for(int i=0;i<n;i++)cin >> p[i];
for(int i=0;i<m;i++)cin >> c[i] >> e[i];
sort(p,p+n,greater<int>());... | a.cc: In function 'int main()':
a.cc:13:5: error: 'sort' was not declared in this scope; did you mean 'short'?
13 | sort(p,p+n,greater<int>());
| ^~~~
| short
a.cc:19:22: error: 'INF' was not declared in this scope
19 | dp[i][j]=INF;
| ^~~
|
s182841722 | p00522 | C++ | #include <iostream>
#include <queue>
using namespace std;
int main() {
const int INF = 1001001001;
const int LIM_M = 10000;
const int LIM_N = 500;
int M, N;
int P[LIM_M + 10];
int C[LIM_N + 10], E[LIM_N + 10];
int PSum[LIM_M + 10];
int dp[LIM_M + 10];
int main() {
int i, j;
scanf("%d%d", &M, &N);
for (i = 0;... | a.cc: In function 'int main()':
a.cc:18:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
18 | int main() {
| ^~
a.cc:18:9: note: remove parentheses to default-initialize a variable
18 | int main() {
| ^~
| --
a.cc:18:9: note: or ... |
s743686088 | p00522 | C++ | #include<iostream>
#include<vector>
using namespace std;
typedef pair<int,int> pii;
typedef vector<int> vi;
#define dump(x) cerr << #x << " = " << (x) << endl
#define rep(i,n) for(int i=0;i<(n);i++)
#define all(a) (a).begin(),(a).end()
#define pb push_back
#define INF 999999999
int main(){
int m,n;
cin>>... | a.cc: In function 'int main()':
a.cc:56:5: error: 'sort' was not declared in this scope; did you mean 'short'?
56 | sort(all(man),greater<int>());
| ^~~~
| short
|
s124542487 | p00522 | C++ | #include<iostream>
#include<vector>
using namespace std;
typedef pair<int,int> pii;
typedef vector<int> vi;
#define dump(x) cerr << #x << " = " << (x) << endl
#define rep(i,n) for(int i=0;i<(n);i++)
#define all(a) (a).begin(),(a).end()
#define pb push_back
#define INF 999999999
int main(){
int m,n;
cin>>... | a.cc: In function 'int main()':
a.cc:56:5: error: 'sort' was not declared in this scope; did you mean 'short'?
56 | sort(all(man),greater<int>());
| ^~~~
| short
|
s310051136 | p00522 | C++ | #include <cstdio>
#include <algorithm>
#include <map>
using namespace std;
int m, n;
int p[10001];
int c[501];
int e[501];
int dp[10001][501];
/*
??????????????? ?????????????£???? ??¨ ??±????????± ???????????????
?\?????????????????£??????¨??? ??????????????????
???????????\?????± ????????????
*/
int solve(int i,in... | a.cc: In function 'int main()':
a.cc:47:9: error: 'memset' was not declared in this scope
47 | memset(dp, -1, sizeof(dp));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include <map>
+++ |+#include <cstring... |
s063713133 | p00522 | C++ | #include <cstdio>
#include <algorithm>
#include <map>
#include <memset>
using namespace std;
int m, n;
int p[10001];
int c[501];
int e[501];
int dp[10001][501];
/*
??????????????? ?????????????£???? ??¨ ??±????????± ???????????????
?\?????????????????£??????¨??? ??????????????????
???????????\?????± ????????????
*/
... | a.cc:4:10: fatal error: memset: No such file or directory
4 | #include <memset>
| ^~~~~~~~
compilation terminated.
|
s635148795 | p00522 | C++ | #include<bits/stdc++.h>
using namespace std;
#define INF (1<<30)
??
int main()
{
????int M, N, C[10000], E[10000];
????int P[10001] = {0};
??
????cin >> M >> N;
????for(int i = 1; i <= M; i++) {
????????cin >> P[i];
????}
????for(int i = 0; i < N; i++) {
????????cin >> C[i] >> E[i];
????}
??
????sort(P + 1, P + M + 1, ... | a.cc:4:1: error: expected unqualified-id before '?' token
4 | ??
| ^
|
s100982747 | p00522 | C++ | #include<bits/stdc++.h>
using namespace std;
#define INF (1<<30)
??
int main()
{
????int M, N, C[10000], E[10000];
????int P[10001] = {0};
??
????cin >> M >> N;
????for(int i = 1; i <= M; i++) {
????????cin >> P[i];
????}
????for(int i = 0; i < N; i++) {
????????cin >> C[i] >> E[i];
????}
??
????sort(P + 1, P + M + 1, ... | a.cc:4:1: error: expected unqualified-id before '?' token
4 | ??
| ^
|
s407341698 | p00522 | C++ | #include<bits/stdc++.h>
using namespace std;
#define INF (1<<55)
const long long INF = 1LL << 55;
int main()
{
int M, N, C[10000], E[10000];
int P[10001] = {0};
cin >> M >> N;
for(int i = 1; i <= M; i++) {
cin >> P[i];
}
for(int i = 0; i < N; i++) {
cin >> C[i] >> E[i];
}
sort(P + 1, P + M... | a.cc:3:14: error: expected unqualified-id before numeric constant
3 | #define INF (1<<55)
| ^
a.cc:4:17: note: in expansion of macro 'INF'
4 | const long long INF = 1LL << 55;
| ^~~
a.cc:3:14: error: expected ')' before numeric constant
3 | #define INF (1<<55)
... |
s199624926 | p00522 | C++ | import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.math.BigInteger;
public class Main{
static PrintWriter out... | a.cc:1:1: error: 'import' does not name a type
1 | import java.io.InputStream;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
2 | import java.io.IOException;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodu... |
s982759391 | p00522 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
#define INF 10000000
typedef pair<int,int> P;
int main()
{
int M, N;
cin >> M >> N;
vector<int> man;
vector<P> pack;
for(int i=0; i<M; ++i) {
int temp;
cin >> temp;
man.push_back(temp);
... | a.cc: In function 'int main()':
a.cc:62:16: error: no matching function for call to 'max(long long int&, __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type)'
62 | ans=max(ans,man[i]-dp[(N-1)%2][i]);
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/stri... |
s670822651 | p00523 | Java | import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.HashSet;
import java.uti... | Main.java:40: error: variable a is already defined in method main(String[])
long a=sum[i+N]-sum[r];
^
1 error
|
s710358250 | p00523 | Java | import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.math.BigInteger;
public class Main{
static PrintWriter out... | Main.java:17: error: cannot find symbol
N=ir.nextInt();
^
symbol: variable N
location: class Main
Main.java:18: error: cannot find symbol
int[] s=ir.nextIntArray(N);
^
symbol: variable N
location: class Main
Main.java:19: error: cannot find symbol
long[] sum=new long[2*N+1];
... |
s477610096 | p00523 | Java | import java.util.Scanner;
public class Baumkuchen {
public static void main(String[] args){
int B1 = 0;
int B2 = 0;
int B3 = 0;
int B4 = 0;
int Bmin = 0;
int BMIN = 0;
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
int b[] = new int[n];
for(int x = 0; x <= n-1; x++){
b[x] = scan... | Main.java:3: error: class Baumkuchen is public, should be declared in a file named Baumkuchen.java
public class Baumkuchen {
^
1 error
|
s135122699 | p00523 | Java | import java.io.*;
public class Main{
public static void main(String[] args){
InputStreamReader is = new InputStreamReader(System.in);
BufferedReader br = BufferedReader(is);
String str = br.readLine();
int kosuu = Integer.perseInt(str);
int[] A = new int[kosuu];//配列の宣言の仕方自信なし
int m = 2000000000, M = 0;... | Main.java:16: error: ';' expected
A[i] = Integer.perseInt(br.readLine())//??????????????????????????
^
1 error
|
s213421696 | p00523 | Java | import java.io.*;
public class Main{
public static void main(String[] args){
InputStreamReader is = new InputStreamReader(System.in);
BufferedReader br = BufferedReader(is);
String str = br.readLine();
int kosuu = Integer.perseInt(str);
int[] A = new int[kosuu];//配列の宣言の仕方自信なし
int m = 2000000000, M = 0;... | Main.java:16: error: ';' expected
str = br.readLine()
^
Main.java:17: error: ';' expected
A[i] = Integer.perseInt(str)//??????????????????????????
^
2 errors
|
s563870074 | p00523 | Java | import java.io.*;
public class Main{
public static void main(String[] args) throws IOException{
InputStreamReader is = new InputStreamReader(System.in);
BufferedReader br = BufferedReader(is);
String str = br.readLine();
int kosuu = Integer.perseInt(str);
int[] A = new int[kosuu];//配列の宣言の仕方自信なし
int m =... | Main.java:6: error: cannot find symbol
BufferedReader br = BufferedReader(is);
^
symbol: method BufferedReader(InputStreamReader)
location: class Main
Main.java:9: error: cannot find symbol
int kosuu = Integer.perseInt(str);
^
symbol: method perseInt(String)
lo... |
s883553113 | p00523 | Java | import java.io.*;
public class Main{
public static void main(String[] args) throws IOException{
InputStreamReader is = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(is);
String str = br.readLine();
int kosuu = Integer.perseInt(str);
int[] A = new int[kosuu];//配列の宣言の仕方自信なし
int... | Main.java:9: error: cannot find symbol
int kosuu = Integer.perseInt(str);
^
symbol: method perseInt(String)
location: class Integer
Main.java:17: error: cannot find symbol
A[i] = Integer.perseInt(str);//??????????????????????????
^
symbol: method perseInt(String)
l... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.