submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s441785582
p00221
C++
#include <stdio.h> #include <stdlib.h> #include <string.h> void make_pat(int count, char pat[]) { int d = 0; pat[0] = '\0'; if (count % 3 == 0){ d = 1; strcat(pat, "Fizz"); } if (count % 5 == 0){ d = 1; strcat(pat, "Buzz"); } if (d == 0){ itoa(count, pat, 10); } } int main(void) { int n; // ”­Œ¾‰...
a.cc: In function 'void make_pat(int, char*)': a.cc:19:17: error: 'itoa' was not declared in this scope 19 | itoa(count, pat, 10); | ^~~~
s963917146
p00221
C++
#include <stdio.h> #include <stdlib.h> #include <string.h> void make_pat(int count, char pat[]) { int d = 0; pat[0] = '\0'; if (count % 3 == 0){ d = 1; strcat(pat, "Fizz"); } if (count % 5 == 0){ d = 1; strcat(pat, "Buzz"); } if (d == 0){ itoa(count, pat, 10); } } int main(void) { int n; // ”­Œ¾‰...
a.cc: In function 'void make_pat(int, char*)': a.cc:19:17: error: 'itoa' was not declared in this scope 19 | itoa(count, pat, 10); | ^~~~
s584284343
p00221
C++
#include<iostream> struct person{ int num; struct person *prev; struct person *next; }; struct person *head,*p,*now; int m,n; char s[10]; void set(){ for(int i=0; i<m; i++){ p[i].num = i+1; p[i].prev = p+i-1; p[i].next = p+i+1; } p[0].prev = p+m-1; p[m-1].next = p; } void del(struct person *a){ (a->p...
a.cc: In function 'int main()': a.cc:54:36: error: 'strcmp' was not declared in this scope 54 | if(strcmp(s,"FizzBuzz") != 0) | ^~~~~~ a.cc:2:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstr...
s769250727
p00221
C++
#include<iostream> #include<string> #include<sstream> using namespace std; int main(){ int m,n,i,p[999],q; string s; stringstream t; while(cin>>m>>n,m|n){ for(i=0;i++<m;)p[i-1]=i; for(q=m,i=1;n-->0;){ cin>>s; if(q==1)continue; t.str(""); if(i%3&&i%5){ t<<i; }else{ if(!(i%3))t<<"Fizz"; if(!(i%5))t<<"Buzz"; } if(s!=t....
a.cc:34:3: error: stray '#' in program 34 | }}#include<iostream> | ^ a.cc:34:4: error: 'include' does not name a type 34 | }}#include<iostream> | ^~~~~~~ a.cc:37:25: error: redefinition of 'int main()' 37 | using namespace std;int main(){int m,n,i,p[999],q;string s;stringstream t;while(cin>>m>...
s783175064
p00221
C++
#include<stdio.h> #include<list> int main(){ using namespace std; int i,n,m; char opn[10],ans[10]; bool ff,bf; list<int> player; list<int>::iterator it,nx; do{ scanf("%d %d",&m,&n); if(!m&&!n) break; for(i=0;i<m;i++) player.push_back(i+1); for(i=0,it=player.begin();i<n&&player.size()>1;i+...
a.cc: In function 'int main()': a.cc:23:10: error: 'strcmp' was not declared in this scope 23 | if(strcmp(ans,opn)){ | ^~~~~~ a.cc:3:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<list> +++ |+#include <cstring> 3...
s483469047
p00221
C++
#include<cstdio> #include<iostream> #include<string> #include<vector> #include<queue> using namespace std; bool judge(const int x,const char str[]){ char ans[10]; if(x%3 ==0 && x%5 == 0) strcpy(ans,"FizzBuzz"); else if(x%3==0) strcpy(ans,"Fizz"); else if(x%5==0) strcpy(ans,"Buzz"); else sprintf(ans,"...
a.cc: In function 'bool judge(int, const char*)': a.cc:14:17: error: 'strcpy' was not declared in this scope 14 | strcpy(ans,"FizzBuzz"); | ^~~~~~ a.cc:6:1: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 5 | #include<...
s820613811
p00221
C++
#include<cstdio> #include<iostream> #include<vector> #include<queue> #include<cstring> using namespace std; bool judge(const int x,const char str[]){ char ans[10]; if(x%3 ==0 && x%5 == 0) strcpy(ans,"FizzBuzz"); else if(x%3==0) strcpy(ans,"Fizz"); else if(x%5==0) strcpy(ans,"Buzz"); else sprintf(ans,...
a.cc: In function 'int main()': a.cc:63:17: error: 'sort' was not declared in this scope; did you mean 'short'? 63 | sort(ans.begin(),ans.end()); | ^~~~ | short
s211742005
p00221
C++
#include <stdio.h> #include <string.h> void get_correct(int i,char buf[16]) { if(i % 3 == 0 ) { if(i% 5 == 0) { strcpy(buf,"FizzBuzz"); return; } strcpy(buf,"Fizz"); return; } if(i%5==0) { strcpy(buf,"Buzz"); return; ...
a.cc: In function 'int main()': a.cc:65:48: error: expected ':' before ')' token 65 | printf("%d%s",i+1,i==m-1?""," "); | ^ | : a.cc:65:48: error: expected primary-expression before ')' token
s884871839
p00221
C++
#include<iostream> #include<string> #include<vector> #include<cstring> #include<stdlib> using namespace std; bool mem[1001]; bool FizzBuzz(int a,string str){ if(str=="FizzBuzz"){ if(a%15==0)return true; else return false; } else if(str=="Fizz"){ if(a%3==0)return true; else return false; } else if(str=="...
a.cc:5:9: fatal error: stdlib: No such file or directory 5 | #include<stdlib> | ^~~~~~~~ compilation terminated.
s063149448
p00221
C++
#include <iostream> #include <cstring> #include <cstdlib> using namespace std; int main(){ int m , n; while(cin >> m >> n , m + n){ int p = 1; int p_num = m; bool exist[1001]; memset(exist,true,sizeof(exist)); for(int i=1; i<=n; i++){ string com; cin >> com; bool ok = i%3 != 0...
a.cc: In function 'int main()': a.cc:34:20: error: expected ';' before ')' token 34 | for(i <= m; i++){ | ^ | ;
s572752266
p00221
C++
while 1: n = map(int,raw_input().split()) if n[0] == n[1] == 0: break m, o = [1 for x in range(n[0])], 0 for x in range(1,n[1]+1): a = raw_input() if sum(m) == 1: pass elif x % 15 == 0: ...
a.cc:1:1: error: expected unqualified-id before 'while' 1 | while 1: | ^~~~~
s523235609
p00221
C++
while 1: m, n = map(int, raw_input().split()) if not m: break p = range(m) t = 0 for i in range(1, n + 1): s = raw_input() if(i % 15 == 0 and s != "FizzBuzz" or i % 5 == 0 and s != "Buzz" or i % 3 == 0 and s != "Fizz" or i % 3 and i % 5 and s != str(i)): p.pop(t) els...
a.cc:1:1: error: expected unqualified-id before 'while' 1 | while 1: | ^~~~~
s335522836
p00221
C++
#include <iostream> #include <string> using namespace std; void solve() { int m, n; while(cin >> m >> n, m || n) { int count = m; bool flag[10002]; memset(flag, 1, sizeof(flag)); string ans = ""; for(int i = 1; i <= n; ++i) { string speak; cin >> speak; if(i % 15 == 0) { if(speak != "Fi...
a.cc: In function 'void solve()': a.cc:13:17: error: 'memset' was not declared in this scope 13 | memset(flag, 1, sizeof(flag)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream...
s950411857
p00221
C++
#include <iostream> #include <algorithm> #include <queue> #include <string> #include <cctype> using namespace std; bool check(int turn, string str, int player) { if(turn%3 == 0 && turn%5 == 0){ return str == "FizzBuzz"; } else if(turn%3 == 0){ return str == "Fizz"; } else if(turn%5 == 0){ return str...
a.cc: In function 'bool check(int, std::string, int)': a.cc:19:16: error: no matching function for call to 'all_of(std::__cxx11::basic_string<char>::iterator, std::__cxx11::basic_string<char>::iterator, <unresolved overloaded function type>)' 19 | return all_of(str.begin(), str.end(), isdigit) && atoi(str.c_str())...
s672691197
p00221
C++
#include<iostream> #include<string.h> using namespace std; int m,n; char talk[1024],num[200]; int main(){ int i; while( cin >> m >> n ){ int kill[1000] = {0}; int man = 0; if( m == 0 && n == 0 ) break; for( i = 1;i <= n;i++ ){ cin >> talk; if( i % 15 == 0 ) strcpy( num,"FizzBuzz" ); else if...
a.cc: In function 'int main()': a.cc:25:33: error: 'itoa' was not declared in this scope 25 | itoa( i,num,10 ); | ^~~~
s932107846
p00222
Java
//配列に入れたらTime Limit Exceededでした. //直しても直してもTime Limit Exceededですよー! import java.util.*; public class Main{ static Scanner kbd = new Scanner(System.in); static boolean[] prime = new boolean[10000001]; public static void main(String[] args){ prepare(); while(true){ int n = kbd.nextInt(); if(n...
Main.java:31: error: cannot find symbol while(!(prime[m] && prime[m-2] && prime[m-6] && prime[m-8])){ ^ symbol: variable m location: class Main Main.java:31: error: cannot find symbol while(!(prime[m] && prime[m-2] && prime[m-6] && prime[m-8])){ ^ symbol: variable m...
s816541700
p00222
Java
package springstudy; import java.util.*; public class Primenumber { static final int max=100000; public static void main(String[] args) { //*ここから boolean prime[] = new boolean[max+1]; for(int i=0;i<max;i++)prime[i]=true; prime[1]=false; for(int i=2;i<max;i++){ if(prime[i]){ for(int s=i*2;s<=max;s+=i)...
Main.java:3: error: class Primenumber is public, should be declared in a file named Primenumber.java public class Primenumber { ^ 1 error
s383445727
p00222
Java
import java.util.Arrays; import java.util.Scanner; public class Main2 { static int MAX=10000001; static boolean[] is=new boolean[MAX]; static{ Arrays.fill(is,true); is[0]=is[1]=false; for(int i=2;i*i<=is.length;i++){ if(is[i]){ for(int j=i+i;j<is.length;j+=i){ is[j]=false; } } } } publi...
Main.java:4: error: class Main2 is public, should be declared in a file named Main2.java public class Main2 { ^ 1 error
s240558050
p00222
Java
import java.util.*; public class p0222{ private static final int mx = 10000000; public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n; boolean[] prime = (new boolean[mx]); Arrays.fill(prime, true); prime[0] = prime[1] = false; for(int i = 2; i < mx; ++i) if(prime[i]) ...
Main.java:3: error: class p0222 is public, should be declared in a file named p0222.java public class p0222{ ^ 1 error
s708184986
p00222
C
#include<stdio.h> int main(void) { int i,j,n; char prime[10000001]; for(i = 0;i <= 10000000;i++){ prime[i]='1'; } for(i = 2;i <= 10000000;i++){ if(prime[i]){ for(j=i+i;j<=10000000;j+=i){ prime[j]='0'; } } } while(scanf("%d",&n),n){ if(n%2==0){ n--; } for(i=n;i>=13;i-=2){ ...
main.c:35:5: error: expected identifier or '(' before 'return' 35 | return (0); | ^~~~~~ main.c:36:1: error: expected identifier or '(' before '}' token 36 | } | ^
s017247756
p00222
C
#include<stdio.h> #define M 10000000 char p[M]={1,1}; int main(){ int i,j,n; for(i=2;i*i<M;i++){ if(p[i])continue; for(j=i*i;j<M;j+=i)p[j]=1; } while(scanf("%d",&n),n){ for(;1;n--){ if(p[n-8]+p[n-6]+p[n-2]+p[n]==0)break; } printf("%d\n",n);
main.c: In function 'main': main.c:14:5: error: expected declaration or statement at end of input 14 | printf("%d\n",n); | ^~~~~~ main.c:14:5: error: expected declaration or statement at end of input
s266732810
p00222
C
include<stdio.h> #include<math.h> #define N 10000000 int main(){ int n; int a[N]; int b; int i, j, p; int c[N][2]; p = 1; while (1==1){ scanf("%d", &c[p][0]); if(c[p][0]!=0)p++; else break; } b = (int)pow(N, 0.5); a[0] = -1; for (i = 2; i <= b; i++){ for (j = 2; j <= N/ i; j++){ a[i*j - 1] =...
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include<stdio.h> | ^ main.c: In function 'main': main.c:13:17: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 13 | scanf("%d", &c[p][0]); | ...
s541613168
p00222
C
include<stdio.h> #include<math.h> #define N 1000000 int main(){ int n; int a[N]; int b; int i, j, p; int c[N][2]; p = 1; while (1==1){ scanf("%d", &c[p][0]); if(c[p][0]!=0)p++; else break; } b = (int)pow(N, 0.5); a[0] = -1; for (i = 2; i <= b; i++){ for (j = 2; j <= N/ i; j++){ a[i*j - 1] = ...
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include<stdio.h> | ^ main.c: In function 'main': main.c:13:17: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 13 | scanf("%d", &c[p][0]); | ...
s880259989
p00222
C
#include<stdio.h> #include<math.h> #define N 10000000 int main(){ int n; int a[N]; int b; int i, j, p; int c[N]; int d[N]; p = 1; while (1==1){ scanf("%d", &c[p][0]); if(c[p][0]!=0)p++; else break; } b = (int)pow(N, 0.5); a[0] = -1; for (i = 2; i <= b; i++){ for (j = 2; j <= N/ i; j++){ a[i...
main.c: In function 'main': main.c:14:34: error: subscripted value is neither array nor pointer nor vector 14 | scanf("%d", &c[p][0]); | ^ main.c:15:24: error: subscripted value is neither array nor pointer nor vector 15 | if(c[p][0]!=0)p++; ...
s084089763
p00222
C
#include<stdio.h> #include<math.h> #define N 10000000 int main(){ int *a; int b; int i, j, p; int c[1000]; int d[1000]; a = new int[N]; p = 1; while (1==1){ scanf("%d", &c[p]); if(c[p]!=0)p++; else break; } b = (int)pow(N, 0.5); a[0] = -1; for (i = 2; i <= b; i++){ for (j = 2; j <= N/ i; j++){ ...
main.c: In function 'main': main.c:11:13: error: 'new' undeclared (first use in this function) 11 | a = new int[N]; | ^~~ main.c:11:13: note: each undeclared identifier is reported only once for each function it appears in main.c:11:16: error: expected ';' before 'int' 11 | a = n...
s059754085
p00222
C
N=1e7,a['aaaa'];main(i,j){for(i=j=2;i*i<N;a[i]||j>N?j=++i:a[j+=i]++);for(;i=~scanf("%d",&N);N&&printf("%d\n",N))for(;a[N]+a[N-2]+a[N-6]+a[N-8]&&N--;);}
main.c:1:1: warning: data definition has no type or storage class 1 | N=1e7,a['aaaa'];main(i,j){for(i=j=2;i*i<N;a[i]||j>N?j=++i:a[j+=i]++);for(;i=~scanf("%d",&N);N&&printf("%d\n",N))for(;a[N]+a[N-2]+a[N-6]+a[N-8]&&N--;);} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'N' [-Wimplicit-int] mai...
s098323469
p00222
C
import java.util.*; import static java.lang.Math.*; import static java.util.Arrays.*; public class Main { int INF = 1 << 28; final int N = 10000001; boolean prime[]; LinkedList<Integer> maxp; int[] p4; void run() { Scanner sc = new Scanner(System.in); prime = new boolean[N]; maxp = new LinkedList<Integ...
main.c:2:1: error: unknown type name 'import' 2 | import java.util.*; | ^~~~~~ main.c:2:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token 2 | import java.util.*; | ^ main.c:3:7: error: expected ';' before 'static' 3 | import static java.lang.Math.*; | ...
s931201399
p00222
C++
#include<bits/stdc++.h> using namespace std; int prime(int x) { if (x < 2)return 0; else if (x == 2) return 1; if (x % 2 == 0) return 0; for (int i = 3; i*i <=x; i += 2) { if (x%i == 0) return 0; } return 1; } int main() { int x; while (cin>>x)) { for(int i=x; i>=13; i--){ if (prime(i) && prime(i - 2) &&...
a.cc: In function 'int main()': a.cc:14:23: error: expected primary-expression before ')' token 14 | while (cin>>x)) { | ^
s963040269
p00222
C++
#include<bits/stdc++.h> using namespace std; void prime() { if (x < 2)return 0; else if (x == 2) return 1; if (x % 2 == 0) return 0; for (int i = 3; i*i <=x; i += 2) { if (x%i == 0) return 0; } return 1; } int main() { int x; while (cin>>x) { prime(); if(!x)return 0; for(int i=x; i>=13; i--){ ...
a.cc: In function 'void prime()': a.cc:4:13: error: 'x' was not declared in this scope 4 | if (x < 2)return 0; | ^ a.cc:4:26: error: return-statement with a value, in function returning 'void' [-fpermissive] 4 | if (x < 2)return 0; | ^ a.cc:5:33: ...
s145299339
p00222
C++
public class Main{ static int N = 10000001; public void run(java.io.InputStream in, java.io.PrintStream out){ java.util.Scanner sc = new java.util.Scanner(in); int[] p; int pn, i, n, a; p = new int[N / 6]; pn = getprime(p); for(;;){ n = sc.nextInt(); if(n == 0)break; a = ...
a.cc:1:1: error: expected unqualified-id before 'public' 1 | public class Main{ | ^~~~~~
s874091658
p00222
C++
#include<iostream> #include<vector> using namespace std; vector<int> prime; void sieve(int n){ vector<bool> is_prime(n, 1); prime.push_back(1); for (int i = 2; i <= n; i++) { if(is_prime[i] == false)continue; prime.push_back(i); for (int j = i; j <= n; j+=i) is_prime[j] = false; } } int main(int ar...
a.cc: In function 'int main(int, char**)': a.cc:19:17: error: 'upper_bound' was not declared in this scope 19 | int start = upper_bound(prime.begin(), prime.end(), n) - | ^~~~~~~~~~~
s384177526
p00222
C++
#include <vector> #include <iostream> #include <algorithm> using namespace std; vector<bool> dp, searched; bool is_prime(int n) { if (searched[n]) { return dp[n]; } return isprime(n, 2); } bool isprime(int n, int k) { if (n < k * k) { searched[n] = true; dp[n] = true; return true; } if (n % ...
a.cc: In function 'bool is_prime(int)': a.cc:16:16: error: 'isprime' was not declared in this scope; did you mean 'is_prime'? 16 | return isprime(n, 2); | ^~~~~~~ | is_prime a.cc: In function 'bool isprime(int, int)': a.cc:41:32: error: too many arguments to function...
s205157879
p00222
C++
#include <vector> #include <iostream> #include <algorithm> using namespace std; vector<bool> dp, searched; bool is_prime(int n) { if (searched[n]) { return dp[n]; } return isprime(n, 2); } bool isprime(int n, int k) { if (n < k * k) { searched[n] = true; dp[n] = true; return true; } if (n % ...
a.cc: In function 'bool is_prime(int)': a.cc:16:16: error: 'isprime' was not declared in this scope; did you mean 'is_prime'? 16 | return isprime(n, 2); | ^~~~~~~ | is_prime
s318194195
p00222
C++
#include <iostream> using namespace std; int main(){ int x=100000; bool isPrime[x]; isPrime[0]=isPrime[1]=false; for(int i=2; i<x; i++) isPrime[i]=true; for(int i=2; i*i<x; i++){ if(isPrime[i]){ for(int j=i*i; j<x;j+=i) isPrime[j]=false; } } int n; int ans=0; while(true){ cin >> n; if(n==...
a.cc: In function 'int main()': a.cc:37:10: error: expected '}' at end of input 37 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s216613933
p00222
C++
#include <iostream> using namespace std; int main(){ int x=100000; bool isPrime[x]; isPrime[0]=isPrime[1]=false; for(int i=2; i<x; i++) isPrime[i]=true; for(int i=2; i*i<x; i++){ if(isPrime[i]){ for(int j=i*i; j<x;j+=i) isPrime[j]=false; } } int n; int ans=0; while(true){ cin >> n; if(n==...
a.cc: In function 'int main()': a.cc:37:10: error: expected '}' at end of input 37 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s811855443
p00222
C++
#include <iostream> using namespace std; bool isPrime(int n){ if(n<=1) return false; for(int i=2; i*i<=n; i++){ if(n%i==0) return false; } return true; } int main(){ int n; int ans; while(true){ ans=0; cin >> n; if(n==0) break; int i=n; while(i>=13){ if(isPrime(i)&&isPrime(i-2)&...
a.cc: In function 'int main()': a.cc:37:10: error: expected '}' at end of input 37 | } | ^ a.cc:16:11: note: to match this '{' 16 | int main(){ | ^
s202394359
p00222
C++
#include<iostream> using namespace std; int main(){ int n, count=0; int temp = 0; int maxn = 0; int sosuu[3] = { 0 }; cin >> n; while (n != 0){ for (int i = 2; i <= n - 8; i++){ for (int l = 2; l < i; l++){ if (i%l == 0) count++; } if (count == 0) { temp = i; sosuu[0] = temp + 2; sosuu[...
a.cc: In function 'int main()': a.cc:33:10: error: expected '}' at end of input 33 | } | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s101946740
p00222
C++
#include "bits/stdc++.h" #include<unordered_map> #include<unordered_set> #pragma warning(disable:4996) using namespace std; using ld = long double; template<class T> using Table = vector<vector<T>>; const ld eps=1e-9; //// < "D:\D_Download\Visual Studio 2015\Projects\programing_contest_c++\Debug\a.txt" bool isso(long...
a.cc: In function 'int main()': a.cc:37:17: error: 'mp' was not declared in this scope 37 | mp.clear(); | ^~
s994714317
p00222
C++
#include "bits/stdc++.h" #include<unordered_map> #include<unordered_set> #pragma warning(disable:4996) using namespace std; using ld = long double; template<class T> using Table = vector<vector<T>>; const ld eps=1e-9; //// < "D:\D_Download\Visual Studio 2015\Projects\programing_contest_c++\Debug\a.txt" long long int ...
a.cc: In function 'bool mirror_rabin(long long int)': a.cc:29:13: error: 'a' was not declared in this scope 29 | if (a == 1 || a == 0)return false; | ^ a.cc:30:42: error: 'a' was not declared in this scope 30 | for (long long int i = 2; i*i <= a; ++i) { | ...
s159051330
p00222
C++
#include <stdio.h> int prime(int); int main() { int n, sw; scanf("%d", &n); while (n > 0) { sw = 0; while (sw == 0) { if (prime(n) > 0) { if (prime(n-2) > 0) { if (prime(n-6) > 0) { if (prime(n-8) > 0) sw = 1; } } } if (sw > 0) break; else n--; } printf("...
/usr/bin/ld: /tmp/ccLX2eHT.o: in function `main': a.cc:(.text+0x37): undefined reference to `prime(int)' /usr/bin/ld: a.cc:(.text+0x4d): undefined reference to `prime(int)' /usr/bin/ld: a.cc:(.text+0x63): undefined reference to `prime(int)' /usr/bin/ld: a.cc:(.text+0x79): undefined reference to `prime(int)' collect2: e...
s609501966
p00222
C++
#include <iostream> using namespace std; void prime(bool is_prime[]){ is_prime[0]=is_prime[1]=false; for(int i=2; i<1000000; i++){ is_prime[i]=true; } for(int i=2; i*i<1000000; i++){ if(is_prime[i]){ for(int j=i*i; j<1000000; j+=i){ is_prime[j]=false; } } } }; int main(){ bool is_prime[1000000]...
a.cc:25:9: error: expected unqualified-id before 'while' 25 | while(true){ | ^~~~~ a.cc:46:9: error: expected unqualified-id before 'return' 46 | return 0; | ^~~~~~ a.cc:47:1: error: expected declaration before '}' token 47 | } | ^
s060066081
p00222
C++
#include<iostream> using namespace std; int main() { bool is_prime[10000001]; is_prime[0]=is_prime[1]=false; for(int i=2;i<10000001;i++){ is_prime[i]=true; } for(int i=2;i*i<100000011;i++){ if(is_prime[i]){ for(int j=i*i;j<10000001j+=i){ is_prime[j]=false; } } } while(true){ int n; c...
a.cc: In function 'int main()': a.cc:16:40: error: invalid operands of types 'int' and '__complex__ int' to binary 'operator<' 16 | for(int j=i*i;j<10000001j+=i){ | ~^~~~~~~~~~ | | | | ...
s282179091
p00222
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
s437595152
p00222
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() ...
a.cc: In function 'void Eratosthenes()': a.cc:31:9: error: 'memset' was not declared in this scope 31 | memset(arr, 1, sizeof(arr)); | ^~~~~~ a.cc:16:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 15 | #include<iterator> +++ |+#i...
s693053737
p00222
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() ...
a.cc: In function 'void Eratosthenes()': a.cc:31:9: error: 'memset' was not declared in this scope 31 | memset(arr, 1, sizeof(arr)); | ^~~~~~ a.cc:16:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 15 | #include<iterator> +++ |+#i...
s797524338
p00222
C++
#define MAX 10000000 int p[MAX]; int four[1000]; int main(void) { int i,j,f=0; //ツ倍ツ青板づーツ渉慊外 for(i=2 ; i<=MAX/2 ; i++){ for(j=2 ; i*j<=MAX ; j++){ if(p[i*j] == 0) p[i*j] = 1; } } for(i=3 ; i < MAX-7 ; i+=2){ if(p[i] == 0 && p[i+2]==0 && p[i+6]==0 && p[i+8]==0) { four[f++]=i+8; /...
a.cc: In function 'int main()': a.cc:23:8: error: 'scanf' was not declared in this scope 23 | for(;scanf("%d",&j),j;) | ^~~~~ a.cc:26:7: error: 'printf' was not declared in this scope 26 | printf("%d\n",four[i-1]); | ^~~~~~ a.cc:1:1: note: 'printf' is defined in header '<cstdio>';...
s891281046
p00222
C++
#include<iostream> #include <algorithm> using namespace std; #define MAX_LIST 10000000 int main(){ //bool *prime=(bool *)malloc(sizeof(bool)*MAX_LIST); bool prime[MAX_LIST]; for(int i=0;i<MAX_LIST;i++){ prime[i]=1; } prime[0]=prime[1]=0; for(int i=0;i*i<MAX_LIST;i++){ if(prime[i]==1){ for(int j=i*2;j<M...
a.cc:40:9: error: unterminated comment 40 | /* | ^ a.cc: In function 'int main()': a.cc:21:10: error: expected '}' at end of input 21 | } | ^ a.cc:8:11: note: to match this '{' 8 | int main(){ | ^
s122605532
p00222
C++
//テ・ツ崢崚」ツ?、テ・ツュツ静ァツエツ?ヲツ閉ーテ」ツ?ョテ・ツ、ツァテ」ツ?催」ツ?陛」ツつ津ゥツ?催・ツ按療」ツ?ォテ・ツ?・テ」ツつ古」ツ?淌」ツつ欝ime Limit Exceededテ」ツ?ァテ」ツ?療」ツ?? //テァツ崢エテ」ツ?療」ツ?ヲテ」ツつづァツ崢エテ」ツ?療」ツ?ヲテ」ツつ5ime Limit Exceeded___テ」ツδ嘉」ツδ?」ツδ愿」ツ?ァテ」ツ?? //テ」ツつィテ」ツδゥテ」ツつケテ」ツδ暗」ツδ?」ツδ催」ツつケテ」ツ?ョテァツッツゥテ」ツつ津」ツ?凖」ツ?」テ」ツ?凝」ツつ甘・ツソツ佚」ツつ古」ツ?ヲテ」ツ??」ツ?セテ」ツ?療」ツ?淌」ツ?? // Respect2Dテ」ツ?陛」ツつ禿...
a.cc:6:1: error: 'import' does not name a type 6 | import java.util.*; | ^~~~~~ a.cc:6:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:7:1: error: expected unqualified-id before 'public' 7 | public class Main{ | ^~~~~~
s178747492
p00222
C++
cout << n << " " << p[idx] << endl;
a.cc:1:9: error: 'cout' does not name a type 1 | cout << n << " " << p[idx] << endl; | ^~~~
s967803875
p00222
C++
#include <iostream> #include <cmath> using namespace std; bool flag[10000001]; int main(){ int n; for(int i=0;i <= 1000000;i++){ if(i<=1)flag[i]=false; else flag[i]=true; } for(int i=2;i <= 1001 ;i++){ if(flag[i]==true){ for(int j=i*2 ; j<=1000000 ; j=j+i){ ...
a.cc: In function 'int main()': a.cc:20:9: error: 'forint' was not declared in this scope; did you mean 'rint'? 20 | forint i=n;i!=0;i--){ | ^~~~~~ | rint a.cc:20:20: error: 'i' was not declared in this scope 20 | forint i=n;i!=0;i--){ | ^
s000029819
p00222
C++
#include<iostream> #include<algorithm> using namespace std; #define MAX_N 10000000 int prime[MAX_N]; bool is_prime[MAX_N+1]; int sieve(int n){ int p=0; memset(is_prime,true,sizeof(is_prime)); is_prime[0]=is_prime[1]=false; for(int i=2;i<=n;i++){ if(is_prime[i]){ prime[p++]=i; for(int j=2*i;j<=n;j+=i)is_pr...
a.cc: In function 'int sieve(int)': a.cc:11:9: error: 'memset' was not declared in this scope 11 | memset(is_prime,true,sizeof(is_prime)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<algorithm> ++...
s052079336
p00222
C++
#include<iostream> char p[10000001]; void sieve() { memset( p, 1, sizeof( p ) ); p[0] = p[1] = 0; for( int i = 2; i <= 10000000; ++i ) if( p[i] ) for( int j = i * 2; j <= 10000000; j += i ) p[j] = 0; return; } int main() { sieve(); int n; while( std::cin >> n, n ) { while( true ) { if( p[n...
a.cc: In function 'void sieve()': a.cc:7:9: error: 'memset' was not declared in this scope 7 | memset( p, 1, sizeof( p ) ); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> +++ |+#include <c...
s500270726
p00222
C++
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n = 0,maxPQ = 0; while(sc.hasNext()){ n = sc.nextInt(); if(n==0) break; boolean[] check = new boolean[n]; System.out.println(checkPrime(check)); } } ...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Scanner; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: expected unqualified-id before 'public' 3 | public class Main{ | ^~~~~~
s799171942
p00223
Java
import java.io.IOException; import java.util.Arrays; import java.util.NavigableSet; import java.util.PriorityQueue; import java.util.Scanner; import java.util.TreeSet; import lombok.Data; import scala.inline; import scala.collection.parallel.immutable.ParIterable; public class Main { public static void main(String...
Main.java:9: error: package lombok does not exist import lombok.Data; ^ Main.java:10: error: package scala does not exist import scala.inline; ^ Main.java:11: error: package scala.collection.parallel.immutable does not exist import scala.collection.parallel.immutable.ParIterable; ...
s602206230
p00223
Java
import java.util.*; import java.lang.*; import java.math.*; import java.io.*; import static java.lang.Math.*; import static java.util.Arrays.*; public class Main{ Scanner sc=new Scanner(System.in); int INF=1<<28; double EPS=1e-9; int m, n; R r0; int[][] a; void run(){ /* byte[][][][] d=new byte[50][50]...
Main.java:82: error: incompatible types: possible lossy conversion from int to byte d[ty2][tx2][ky2][kx2]=d[r.ty][r.tx][r.ky][r.kx]+1; ^ 1 error
s258451628
p00223
C
6 6 2 4 6 2 0 0 0 0 1 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 3 3 1 1 3 3 0 0 0 0 1 0 0 0 0 0 0
main.c:1:1: error: expected identifier or '(' before numeric constant 1 | 6 6 | ^
s892366901
p00223
C
#include<stdio.h> #include<queue> using namespace std; queue<int> tx, ty, kx, ky; int d[50][50]; void move(void); void clean(void); int main(void) { int x, y, X, Y,i,j; while (1) { for (i = 0; i < 50; i++) { for (j = 0; j < 50; j++) { d[i][j] = 1; } } scanf("%d %d", &X, &Y); //???????????? if (X =...
main.c:2:9: fatal error: queue: No such file or directory 2 | #include<queue> | ^~~~~~~ compilation terminated.
s579839628
p00223
C
#include <iostream> #include <queue> using namespace std; const int INF = 1000000; int H,W; class Point{ public: int tx; int ty; int kx; int ky; int f; void set(int a,int b,int c,int d,int f){ tx = a; ty = b; kx = c; ky = d; this->f = f; } }; int is_out_of_area(int y,int x){ return...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s202559424
p00223
C
#include <iostream> #include <queue> using namespace std; const int INF = 1000000; int H,W; class Point{ public: int tx; int ty; int kx; int ky; int f; void set(int a,int b,int c,int d,int f){ tx = a; ty = b; kx = c; ky = d; this->f = f; } }; int is_out_of_area(int y,int x){ return...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s069627826
p00223
C
#include <algorithm> #include <cctype> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <map> #include <numeric> #include <queue> #include <set> #include <string> #include <vector> using namespace std; #define reps(i,f,n) for...
main.c:1:10: fatal error: algorithm: No such file or directory 1 | #include <algorithm> | ^~~~~~~~~~~ compilation terminated.
s519285730
p00223
C++
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s240682969
p00223
C++
#include<iostream> #include<queue> #include<map> using namespace std; int dx[4] = { 1,0,-1,0 }; int dy[4] = { 0,1,0,-1 }; class state{ public: int tx; int ty; int kx; int ky; }; int main() { int W, H, tx, ty, kx, ky; bool d[52][52]; map<state,bool> m; state num; state copy; while (true) { cin >> W >> H; i...
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, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/includ...
s434784458
p00223
C++
#include <iostream> #include <queue> using namespace std; const unsigned char INF = 255; int H,W; bool F[52][52]; unsigned char D[52][52][52][52]; class Point{ public: int tx; int ty; int kx; int ky; void set(int a,int b,int c,int d){ tx = a; ty = b; kx = c; ky = d; } }; int is_out_of...
a.cc: In function 'int main()': a.cc:32:21: error: redeclaration of 'int inc_ky' 32 | int inc_ty,inc_ky,inc_ky,inc_kx; | ^~~~~~ a.cc:32:14: note: 'int inc_ky' previously declared here 32 | int inc_ty,inc_ky,inc_ky,inc_kx; | ^~~~~~ a.cc:80:26: error: '_ky' was not d...
s432566476
p00223
C++
#include <iostream> #include <queue> using namespace std; const unsigned char INF = 255; int H,W; bool F[52][52]; unsigned char D[52][52][52][52]; class Point{ public: int tx; int ty; int kx; int ky; void set(int a,int b,int c,int d){ tx = a; ty = b; kx = c; ky = d; } }; int is_out_of...
a.cc: In function 'int main()': a.cc:32:21: error: redeclaration of 'int inc_ky' 32 | int inc_ty,inc_ky,inc_ky,inc_kx; | ^~~~~~ a.cc:32:14: note: 'int inc_ky' previously declared here 32 | int inc_ty,inc_ky,inc_ky,inc_kx; | ^~~~~~ a.cc:116:11: error: 'inc_tx' was n...
s299735751
p00223
C++
#include <iostream> #include <queue> using namespace std; const unsigned char INF = 255; int H,W; bool F[52][52]; unsigned char D[52][52][52][52]; class Point{ public: int tx; int ty; int kx; int ky; void set(int a,int b,int c,int d){ tx = a; ty = b; kx = c; ky = d; } }; int is_out_of...
a.cc: In function 'int main()': a.cc:32:21: error: redeclaration of 'int inc_ky' 32 | int inc_ty,inc_ky,inc_ky,inc_kx; | ^~~~~~ a.cc:32:14: note: 'int inc_ky' previously declared here 32 | int inc_ty,inc_ky,inc_ky,inc_kx; | ^~~~~~ a.cc:116:11: error: 'inc_tx' was n...
s610825364
p00223
C++
#include <iostream> #include <queue> using namespace std; const unsigned char INF = 255; int H,W; bool F[52][52]; unsigned char D[52][52][52][52]; class Point{ public: int tx; int ty; int kx; int ky; void set(int a,int b,int c,int d){ tx = a; ty = b; kx = c; ky = d; } }; int is_out_of...
a.cc: In function 'int main()': a.cc:32:21: error: redeclaration of 'int inc_ty' 32 | int inc_ty,inc_ky,inc_ty,inc_kx; | ^~~~~~ a.cc:32:7: note: 'int inc_ty' previously declared here 32 | int inc_ty,inc_ky,inc_ty,inc_kx; | ^~~~~~ a.cc:116:11: error: 'inc_tx' was not decla...
s745340223
p00223
C++
#include <iostream> #include <queue> using namespace std; int H,W; class Point{ public: int tx; //タカユキの座標 int ty; int kx; //カズユキの座標 int ky; int d; //ターン回数 void set(int a,int b,int c,int d){ tx = a; ty = b; kx = c; ky = d; } }; int is_out_of_area(int y,int x) //座標が範囲内か確認する関数 { return x < ...
a.cc: In function 'int main()': a.cc:79:10: error: 'inc_ty' was not declared in this scope; did you mean 'ino_t'? 79 | if(inc_ty || inc_ky){ //どちらかが動ける状態であったならキューにプッシュ | ^~~~~~ | ino_t a.cc:79:20: error: 'inc_ky' was not declared in this scope 79 | if(inc_ty || inc_ky){ /...
s584298387
p00223
C++
const int dx[][4] = {{1, 0, -1, 0}, {-1, 0, 1, 0}}; const int dy[][4] = {{0, 1, 0, -1}, {0, -1, 0, 1}}; int X, Y; bool map[50][50]; bool passed[50][50][50][50]; struct P { int tx, ty; int kx, ky; int cost; P(int _tx, int _ty, int _kx, int _ky, int _cost) : tx(_tx), ty(_ty), kx(_kx), ky(_ky), cost(_c...
a.cc: In function 'int main()': a.cc:26:11: error: 'cin' was not declared in this scope 26 | while(cin >> X >> Y, X|Y) | ^~~ a.cc:29:9: error: 'memset' was not declared in this scope 29 | memset(passed, 0, sizeof passed); | ^~~~~~ a.cc:1:1: note: 'memset' is defined in he...
s556654710
p00223
C++
const int dx[][4] = {{1, 0, -1, 0}, {-1, 0, 1, 0}}; const int dy[][4] = {{0, 1, 0, -1}, {0, -1, 0, 1}}; int X, Y; bool map[50][50]; bool passed[50][50][50][50]; struct P { int tx, ty; int kx, ky; int cost; P(int _tx, int _ty, int _kx, int _ky, int _cost) : tx(_tx), ty(_ty), kx(_kx), ky(_ky), cost(_c...
a.cc: In function 'int main()': a.cc:26:11: error: 'cin' was not declared in this scope 26 | while(cin >> X >> Y, X|Y) | ^~~ a.cc:29:9: error: 'memset' was not declared in this scope 29 | memset(passed, 0, sizeof passed); | ^~~~~~ a.cc:1:1: note: 'memset' is defined in he...
s194373120
p00223
C++
#include <iostream> #include <queue> #include <map> #include <string> const int dx[][4] = {{1, 0, -1, 0}, {-1, 0, 1, 0}}; const int dy[][4] = {{0, 1, 0, -1}, {0, -1, 0, 1}}; int X, Y; bool map[50][50]; bool passed[50][50][50][50]; struct P { int tx, ty; int kx, ky; int cost; P(int _tx, int _ty, in...
a.cc: In function 'int main()': a.cc:32:11: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 32 | while(cin >> X >> Y, X|Y) | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istre...
s637659016
p00223
C++
#include <iostream> #include <queue> #include <map> #include <string> using namespace std; const int dx[][4] = {{1, 0, -1, 0}, {-1, 0, 1, 0}}; const int dy[][4] = {{0, 1, 0, -1}, {0, -1, 0, 1}}; int X, Y; bool map[50][50]; bool passed[50][50][50][50]; struct P { int tx, ty; int kx, ky; int cost; P...
a.cc: In function 'bool check(int, int)': a.cc:27:50: error: reference to 'map' is ambiguous 27 | return x < 0 || x >= X || y < 0 || y >= Y || map[y][x]; | ^~~ In file included from /usr/include/c++/14/map:63, from a.cc:3: /usr/include/c++/1...
s560078839
p00223
C++
#include <iostream> #include <queue> #include <cstring> using namespace std; int H,W; bool F[52][52]; //障害物 bool D[52][52][52][52]; //探索済みかの判定用 int inc_tx[4] = {1,-1,0,0}; int inc_ty[4] = {0,0,1,-1}; int inc_kx[4] = {-1,1,0,0}; int inc_ky[4] = {0,0,-1,1}; class Point{ public: int tx; //タカユキの座標 int ty; int kx; ...
a.cc: In function 'int main()': a.cc:74:29: error: invalid types 'int[int]' for array subscript 74 | q.tx = p.tx + inc_tx[i]; q.ty = p.ty + inc_ty[i]; | ^ a.cc:74:54: error: invalid types 'int[int]' for array subscript 74 | q.tx = p.tx + inc_tx[i]; q.ty = p.ty + i...
s592951166
p00223
C++
#include <iostream> #include <queue> #include <algorithm> using namespace std; struct State{ int tx, ty, kx, ky; State(int tx, int ty, int kx, int ky) : tx(tx), ty(ty), kx(kx), ky(ky) {} }; #define MAX 51 #define INF 1e9 int H, W, tx, ty, kx, ky; int field[MAX][MAX]; const int ttx[] = {-1,0,0,1}; const int tty...
a.cc: In function 'int bfs()': a.cc:28:3: error: 'memset' was not declared in this scope 28 | memset(vis, false, sizeof(vis)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <algorithm> +++ |+#include <cstring> ...
s941481438
p00223
C++
#include<cstdio> #include<iostream> #include<algorithm> #include<queue> using namespace std; struct Data{ int x1,y1,x2,y2,cnt; Data(){} Data(int x1,int y1,int x2,int y2,int cnt): x1(x1),y1(y1),x2(x2),y2(y2),cnt(cnt){} }; bool memo[50][50][50][50]; int dx[] = {0,1,-1,0}, dy[] = {1,0,0,-1}; int main() { int x,y; w...
a.cc: In function 'int main()': a.cc:28:17: error: 'memset' was not declared in this scope 28 | memset(memo,0,sizeof(memo)); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include<queue> +++ ...
s893107113
p00223
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <queue> #include <cstring> #define REP(i,k,n) for(int i=k;i<n;i++) #define rep(i,n) for(int i=0;i<n;i++) #define INF 1<<30 using namespace std; int dx[4] = {1,0,-1,0}; int dy[4] = {0,1,0,-1}; struct Data { int tx,ty,kx,ky,cost; ...
a.cc: In function 'int main()': a.cc:37:22: error: expected '}' at end of input 37 | ky--; | ^ a.cc:28:9: note: to match this '{' 28 | { | ^ a.cc:37:22: error: expected '}' at end of input 37 | ky--; | ^...
s419986115
p00223
C++
#include<iostream> #include<queue> using namespace std; int x,y,tx,ty,kx,ky,cou; int mas[111][111]; int ans=0; bool used[111][111][111][111]; int dx[]={-1,0,0,1}; int dy[]={0,-1,1,0}; struct P{ int tx,ty,kx,ky,cou; P(int tx,int ty,int kx,int ky,int cou):tx(tx),ty(ty),kx(kx),ky(ky),cou(cou){} }; int bfs(); int mai...
a.cc: In function 'int main()': a.cc:21:5: error: 'memset' was not declared in this scope 21 | 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<queue> +++ |+#include <cstring> ...
s586286707
p00223
C++
#include<iostream> #include<utility> #include<complex> #include<queue> using namespace std; typedef complex<int> P; int X, Y; bool field[54][54]; const P dx[4] = { P(1, 0), P(0, 1), P(-1, 0), P(0, -1) }; struct Node { int rap; P tak, kaz; }; bool in_room(P p) { int x = p.real(), y = p.imag(); return (0 <= x...
a.cc: In function 'int main()': a.cc:35:21: error: cannot convert 'P' {aka 'std::complex<int>'} to 'int' in initialization 35 | que.push((Node){tak, kaz}); | ^~~ | | | P {aka std::complex<int>}
s517686840
p00223
C++
#include <iostream> #include <queue> #define rep2(x,from,to) for(int x=(from);(x)<(to);(x)++) #define rep(x,to) rep2(x,0,to) using namespace std; bool mem[52][52][52][52] = {{{{}}}}; struct S{ int a,b,c,d,t; }; int dx[4] = {-1,0,1,0}; int dy[4] = {0,1,0,-1}; void init() { memset(mem,0,sizeof(mem)); } int main(){ int...
a.cc: In function 'void init()': a.cc:13:9: error: 'memset' was not declared in this scope 13 | memset(mem,0,sizeof(mem)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <queue> +++ |+#include <cstri...
s129946883
p00223
C++
#include <queue> #include <vector> #include <iostream> #define INF (1 << 25) using namespace std; vector<vector<vector<vector<int> > > > dp; vector<vector<int> > M; int H, W, sx1, sy1, sx2, sy2; const int dx[4] = { 0, 1, 0, -1 }; const int dy[4] = { 1, 0, -1, 0 }; int bfs() { dp = vector<vector<vector<vector...
a.cc: In function 'int bfs()': a.cc:51:98: error: expected ')' before ';' token 51 | que.push(make_pair(make_pair(make_pair(tx1, ty1), make_pair(tx2, ty2)), turn + 1); | ~ ^ | ...
s641805922
p00223
C++
State(int a,int b,int c,int d):a(a),b(b),c(c),d(d){}; }; int h,w; int table[51][51],memo[51][51][51][51]; int Y[4]={-1,0,1,0}; int X[4]={0,1,0,-1}; bool in(int a,int b){ if(a<0 || b<0 || h<=a || w<=b)return false; return true; } void init(){ for(int i=0;i<51;i++) for(int j=0;j<51;j++) for(int k=0;k...
a.cc:1:3: error: ISO C++ forbids declaration of 'State' with no type [-fpermissive] 1 | State(int a,int b,int c,int d):a(a),b(b),c(c),d(d){}; | ^~~~~ a.cc: In function 'int State(int, int, int, int)': a.cc:1:34: error: only constructors take member initializers 1 | State(int a,int b,int c,int d):a(a...
s674891291
p00223
C++
#include<queue> #include<iostream> #include<algorithm> #include <conio.h> using namespace std; struct maigo{ int x[2];// ????????????[0]???????????????[1] int y[2];// ????????????[0]???????????????[1] int count = 1; }; int main(){ queue<maigo> q; int tx, ty; int kx, ky; int **depart, X, Y; int flag = 0, a = 0; ...
a.cc:4:10: fatal error: conio.h: No such file or directory 4 | #include <conio.h> | ^~~~~~~~~ compilation terminated.
s337423349
p00223
C++
#include<queue> #include<iostream> #include<algorithm> #include <conio.h> using namespace std; struct maigo{ int x[2]; int y[2]; int count = 1; }; int main(){ queue<maigo> q; int tx, ty; int kx, ky; int **depart, X, Y; int flag = 0, a = 0; cin >> X >> Y; while (X != 0 && Y != 0){ depart = new int*[Y + 2]; ...
a.cc:4:10: fatal error: conio.h: No such file or directory 4 | #include <conio.h> | ^~~~~~~~~ compilation terminated.
s228151119
p00223
C++
#include<queue> #include<iostream> #include<algorithm> #include <conio.h> using namespace std; struct maigo{ int x[2];// ????????????[0]???????????????[1] int y[2];// ????????????[0]???????????????[1] int count; }; int main(){ queue<maigo> q; int tx, ty; int kx, ky; int **depart, X, Y; int flag = 0, a = 0; cin ...
a.cc:4:10: fatal error: conio.h: No such file or directory 4 | #include <conio.h> | ^~~~~~~~~ compilation terminated.
s984652352
p00223
C++
#include<iostream> #include<algorithm> #include <conio.h> using namespace std; struct maigo{ int x[2];// ????????????[0]???????????????[1] int y[2];// ????????????[0]???????????????[1] int count; }; int main(){ queue<maigo> q; int tx, ty; int kx, ky; int **depart, X, Y; int flag = 0, a = 0; cin >> X >> Y; whil...
a.cc:3:10: fatal error: conio.h: No such file or directory 3 | #include <conio.h> | ^~~~~~~~~ compilation terminated.
s357250029
p00223
C++
#include<iostream> #include<algorithm> using namespace std; struct maigo{ int x[2];// ????????????[0]???????????????[1] int y[2];// ????????????[0]???????????????[1] int count; }; int main(){ queue<maigo> q; int tx, ty; int kx, ky; int **depart, X, Y; int flag = 0, a = 0; cin >> X >> Y; while (X != 0 && Y != 0...
a.cc: In function 'int main()': a.cc:10:9: error: 'queue' was not declared in this scope 10 | queue<maigo> q; | ^~~~~ a.cc:3:1: note: 'std::queue' is defined in header '<queue>'; this is probably fixable by adding '#include <queue>' 2 | #include<algorithm> +++ |+#include <queue> 3 | u...
s984906899
p00223
C++
#include<iostream> #include<queue> using namespace std; struct l{ int tx; int ty; int kx; int ky; int cnt; }; queue<l> p; int ps[50505050]={}; int main(){ int x,y,tlx,tly,klx,kly,d[50][50],i,j,cl,tmx[4]={0,1,0,-1},tmy[4]={-1,0,1,0},kmx[4]={0,-1,0,1},kmy[4]={1,0,-1,0},k,z; l v; while(1){ cin>>x>>y; if(x==0&&...
a.cc: In function 'int main()': a.cc:86:1: error: expected primary-expression before '?' token 86 | ????????????return 0; | ^ a.cc:86:2: error: expected primary-expression before '?' token 86 | ????????????return 0; | ^ a.cc:86:3: error: expected primary-expression before '?' token 86 | ??????????...
s491029126
p00223
C++
#include<queue> #include<vector> #include<iostream> #include<algorithm> using namespace std; int same[51][51][51][51]; struct maigo{ int x[2];// ????????????[0]???????????????[1] int y[2];// ????????????[0]???????????????[1] int count; }; int main(){ queue<maigo> q; int tx, ty; int kx, ky; int **depart, X, Y; i...
a.cc: In function 'int main()': a.cc:97:1: error: expected primary-expression before '?' token 97 | ????????? t.y[0] == t.y[1] + dx2[i] * (-1)){ | ^ a.cc:97:2: error: expected primary-expression before '?' token 97 | ????????? ...
s057579020
p00223
C++
#include<queue> #include<iostream> #include<algorithm> using namespace std; bool same[52][52][52][52] = { 0 }; queue<maigo> q; struct maigo{ int x[2];// ????????????[0]???????????????[1] int y[2];// ????????????[0]???????????????[1] int count; }; int main(){ int tx, ty; int kx, ky; int **depart, X, Y; int flag = ...
a.cc:6:7: error: 'maigo' was not declared in this scope 6 | queue<maigo> q; | ^~~~~ a.cc:6:12: error: template argument 1 is invalid 6 | queue<maigo> q; | ^ a.cc:6:12: error: template argument 2 is invalid a.cc: In function 'int main()': a.cc:40:19: error: request for member 'push' ...
s392354064
p00223
C++
#include<stdio.h> #include<iostream> #include<queue> using namespace std; struct oza{ int x; int y; }; int A[52][52][52][52]; int main(){ oza k; oza t; queue<oza> ka; queue<oza> ta; queue<int> Z; int w,h,b; int d=0,c=0,i=0,j=0,l=-1,D[52][52]; int tx[4]={ 1, 0,-1,0 }; int kx[4]={-1, 0, 1,0 }; int ty[...
a.cc: In function 'int main()': a.cc:24:9: error: 'memset' was not declared in this scope 24 | memset(A,0,sizeof(A)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include<queue> +++ |+#include <cstring> ...
s441263792
p00223
C++
#include<stdio.h> #include<iostream> #include<queue> using namespace std; struct oza{ int x; int y; }; int A[52][52][52][52]; int main(){ oza k; oza t; queue<oza> ka; queue<oza> ta; queue<int> Z; int w,h,b; int d=0,c=0,i=0,j=0,l=-1,D[52][52]; int tx[4]={ 1, 0,-1,0 }; int kx[4]={-1, 0, 1,0 }; int ty[...
a.cc: In function 'int main()': a.cc:24:9: error: 'memset' was not declared in this scope 24 | memset(A,0,sizeof(A)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include<queue> +++ |+#include <cstring> ...
s223025594
p00223
C++
#include<stdio.h> #include<iostream> #include<queue> using namespace std; struct oza{ int x; int y; }; int A[52][52][52][52]; int main(){ oza k; oza t; queue<oza> ka; queue<oza> ta; queue<int> Z; int w,h,b; int d=0,c=0,i=0,j=0,l=-1,D[52][52]; int tx[4]={ 1, 0,-1,0 }; int kx[4]={-1, 0, 1,0 }; int ty[...
a.cc: In function 'int main()': a.cc:24:9: error: 'memset' was not declared in this scope 24 | memset(A,0,sizeof(A)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include<queue> +++ |+#include <cstring> ...
s065925505
p00223
C++
#include<stdio.h> #include<iostream> #include<queue> #include<string.h> using namespace std; struct oza{ int x; int y; }; int A[50][50][50][50]; int main(){ oza k; oza t; queue<oza> ka; queue<oza> ta; queue<int> Z; int w,h,b; int d=0,c=0,i=0,j=0,l=-1,D[52][52]; int tx[4]={ 1, 0,-1,0 }; int kx[4]={-1,...
a.cc:104:9: error: expected unqualified-id before 'return' 104 | return 0; | ^~~~~~ a.cc:106:1: error: expected declaration before '}' token 106 | } | ^
s601209731
p00223
C++
#include<stdio.h> #include<iostream> #include<queue> #include<string.h> using namespace std; struct oza{ int x; int y; }; int A[50][50][50][50]; int main(){ oza k; oza t; queue<oza> ka; queue<oza> ta; queue<int> Z; int w,h,b; int d=0,c=0,i=0,j=0,l=-1,D[52][52]; int tx[4]={ 1, 0,-1,0 }; int kx[4]={-1,...
a.cc:488:1: warning: integer constant is too large for its type 488 | 44444444444444444444444444444444444444444444444444444444444444 continue; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc: In function 'int main()': a.cc:126:9: warning: empty parentheses were disambiguated as a function...
s916590225
p00223
C++
#include<stdio.h> #include<iostream> #include<queue> #include<string.h> #include<cstring> using namespace std; struct oza{ int x; int y; }; int A[50][50][50][50]; int main(){ oza k; oza t; queue<oza> ka; queue<oza> ta; queue<int> Z; int w,h,b; int d=0,c=0,i=0,j=0,l=-1,D[52][52]; int tx[4]={ 1, 0,-1,0 }; ...
a.cc:489:1: warning: integer constant is too large for its type 489 | 44444444444444444444444444444444444444444444444444444444444444 continue; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc: In function 'int main()': a.cc:127:9: warning: empty parentheses were disambiguated as a function...
s436782388
p00223
C++
#include<iostream> #include<cstdio> #include<map> #include<set> #include<queue> #define P pair<int,int> using namespace std; int dx[4] = { -1,0,0,1 }, dy[4] = { 0,-1,1,0 }; int main() { int a, b; while (cin >> a >> b, a | b) { int c, d, e, f; cin >> c >> d >> e >> f; c--; d--; e--; f--; bool ba[50][50]; in...
a.cc: In function 'int main()': a.cc:18:17: error: 'memset' was not declared in this scope 18 | memset(k, -1, sizeof(k)); | ^~~~~~ a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 5 | #include<queue> +++ |+#...
s044903795
p00223
C++
#include<iostream> #include<string> #include<cstdio> #include<algorithm> #include<queue> #define P pair<int,int> using namespace std; bool c[52][52]; int d[52][52]; int x[4] = { -1,0,0,1 }, y[4] = { 0,-1,1,0 }; int main() { int a, b; while (cin >> a >> b, a | b) { memset(c, true, sizeof(c)); memset(d,-1,sizeof(d...
a.cc: In function 'int main()': a.cc:15:17: error: 'memset' was not declared in this scope 15 | memset(c, true, sizeof(c)); | ^~~~~~ a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 5 | #include<queue> +++ |...
s155728855
p00223
C++
#include<iostream> #include<string> #include<cstdio> #include<algorithm> #include<queue> #define P pair<int,int> using namespace std; bool c[52][52]; int d[52][52]; int x[4] = { -1,0,0,1 }, y[4] = { 0,-1,1,0 }; int main() { int a, b; while (cin >> a >> b, a | b) { memset(c, true, sizeof(c)); memset(d,-1,sizeof(d...
a.cc: In function 'int main()': a.cc:15:17: error: 'memset' was not declared in this scope 15 | memset(c, true, sizeof(c)); | ^~~~~~ a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 5 | #include<queue> +++ |...
s474287739
p00223
C++
#include<iostream> #include<string> #include<vector> #include<queue> #define p pair<int,int> #define P pair<p,p> using namespace std; int a[50][50][50][50]; int x[4] = { -1,0,0,1 }, y[4] = { 0,-1,1,0 }; int S[50][50]; signed main() { int b, c; while (cin >> c >> b, b | c) { memset(a, 0x3f, sizeof(a)); int d, e, ...
a.cc: In function 'int main()': a.cc:15:17: error: 'memset' was not declared in this scope 15 | memset(a, 0x3f, sizeof(a)); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include<queue> +++ |...
s745156610
p00223
C++
#include<iostream> #include<string> #include<vector> #include<queue> #define p pair<int,int> #define P pair<p,p> using namespace std; int a[50][50][50][50]; int x[4] = { -1,0,0,1 }, y[4] = { 0,-1,1,0 }; int S[50][50]; signed main() { int b, c; while (cin >> c >> b, b | c) { memset(a, 0x3f, sizeof(a)); int d, e, ...
a.cc: In function 'int main()': a.cc:15:17: error: 'memset' was not declared in this scope 15 | memset(a, 0x3f, sizeof(a)); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include<queue> +++ |...
s072629500
p00223
C++
#include <bits/stdc++.h> using namespace std; int table[51][51]; bool memo[51][51][51][51]; int main() { while(1){ int w,h; //scanf(" %d %d",&w,&h); cin >> w >> h; if(w==0&&h==0) break; int tx,ty,kx,ky; //scanf(" %d %d %d %d",&tx,&ty,&kx,&ky); cin >...
a.cc: In function 'int main()': a.cc:46:18: error: 'v' was not declared in this scope 46 | if(table[v[0]][v[1]] == 1 || table[v[2]][v[3]] == 1){ | ^