submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s568434604
p00602
C
#include<stdlib.h> p(int*a,int*b){return*a-*b;}c,V,i,f[999]; main(d){for(;f[1]=scanf("%d%d",&V,&d)+1;printf("%d\n",c)){ for(f[0]=i=2;i<V;i++)f[i]=(f[i-1]+f[i-2])%1001; qsort(f,V,4,p); for(i=c=1;i<V;f[i]-f[i++-1]<d?:c++);} div(0);}
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int] 2 | p(int*a,int*b){return*a-*b;}c,V,i,f[999]; | ^ main.c:2:29: warning: data definition has no type or storage class 2 | p(int*a,int*b){return*a-*b;}c,V,i,f[999]; | ^ main.c:2:29: error: type defaults to 'i...
s552674681
p00602
C++
#ifndef _GLIBCXX_NO_ASSERT #include <cassert> #endif #include <cctype> #include <cerrno> #include <cfloat> #include <ciso646> #include <climits> #include <clocale> #include <cmath> #include <csetjmp> #include <csignal> #include <cstdarg> #include <cstddef> #include <cstdio> #include <cstdlib> #include <cstring> #includ...
a.cc:91:9: error: return type specification for constructor invalid 91 | void UF () | ^~~~
s233407441
p00602
C++
#ifndef _GLIBCXX_NO_ASSERT #include <cassert> #endif #include <cctype> #include <cerrno> #include <cfloat> #include <ciso646> #include <climits> #include <clocale> #include <cmath> #include <csetjmp> #include <csignal> #include <cstdarg> #include <cstddef> #include <cstdio> #include <cstdlib> #include <cstring> #includ...
a.cc:91:9: error: return type specification for constructor invalid 91 | void UF () | ^~~~
s233296892
p00602
C++
#ifndef _GLIBCXX_NO_ASSERT #include <cassert> #endif #include <cctype> #include <cerrno> #include <cfloat> #include <ciso646> #include <climits> #include <clocale> #include <cmath> #include <csetjmp> #include <csignal> #include <cstdarg> #include <cstddef> #include <cstdio> #include <cstdlib> #include <cstring> #includ...
a.cc:91:9: error: return type specification for constructor invalid 91 | void UF () | ^~~~
s102151093
p00602
C++
#ifndef _GLIBCXX_NO_ASSERT #include <cassert> #endif #include <cctype> #include <cerrno> #include <cfloat> #include <ciso646> #include <climits> #include <clocale> #include <cmath> #include <csetjmp> #include <csignal> #include <cstdarg> #include <cstddef> #include <cstdio> #include <cstdlib> #include <cstring> #includ...
a.cc:91:9: error: return type specification for constructor invalid 91 | void UF () | ^~~~
s973548576
p00602
C++
#ifndef _GLIBCXX_NO_ASSERT #include <cassert> #endif #include <cctype> #include <cerrno> #include <cfloat> #include <ciso646> #include <climits> #include <clocale> #include <cmath> #include <csetjmp> #include <csignal> #include <cstdarg> #include <cstddef> #include <cstdio> #include <cstdlib> #include <cstring> #includ...
a.cc:91:9: error: return type specification for constructor invalid 91 | int UF () | ^~~ a.cc: In constructor 'UF<T>::UF()': a.cc:94:24: error: returning a value from a constructor 94 | return 0; | ^
s465790501
p00602
C++
#ifndef _GLIBCXX_NO_ASSERT #include <cassert> #endif #include <cctype> #include <cerrno> #include <cfloat> #include <ciso646> #include <climits> #include <clocale> #include <cmath> #include <csetjmp> #include <csignal> #include <cstdarg> #include <cstddef> #include <cstdio> #include <cstdlib> #include <cstring> #includ...
a.cc: In member function 'void UF<T>::push(T)': a.cc:93:24: error: 'count' does not name a type 93 | static count = 0; | ^~~~~
s681621179
p00602
C++
#include <iostream> #include <cstdlib> #include <cmath> using namespace std; int F[1001]; int P[10010]; void init(int N){ for(int i=0;i<=N;i++) P[i] = i; } int root(int a){ if(P[a]==a) return a; return(P[a] = root(P[a])); } bool is_same_set(int a, int b){ return root(a) == root(b); }...
a.cc:48:27: error: stray '\' in program 48 | if(root(i)==i)\\ 49 | count++;
s128453682
p00602
C++
#include <iostream> #include <vector> using namespace std; int P[100000]; int fibo[1000]; void init(int n){ for (int i = 0; i < n; ++i){P[i] = i;} } int root(int n){ if(P[n]==n){return n;} return root(P[n]); } void unite(int a, int b){ P[root(a)] = root(b); } bool is_in_the_same_tree(int a, int b){ retur...
a.cc: In function 'int num_of_trees(int)': a.cc:30:12: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int&)' 30 | if(find(roots.begin(), roots.end(), roothere) == roots.end()){ | ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /...
s299932594
p00602
C++
#include <iostream> #include <vector> using namespace std; int P[100000]; int fibo[1000]; void init(int n){ for (int i = 0; i < n; ++i){P[i] = i;} } int root(int n){ if(P[n]==n){return n;} return root(P[n]); } void unite(int a, int b){ P[root(a)] = root(b); } bool is_in_the_same_tree(int a, int b){ retur...
a.cc: In function 'int num_of_trees(int)': a.cc:30:12: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int&)' 30 | if(find(roots.begin(), roots.end(), roothere) == roots.end()){ | ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /...
s643052706
p00602
C++
import java.util.*; import static java.util.Arrays.*; import static java.lang.Math.*; public class Main { static Scanner sc = new Scanner(System.in); static int V, d, N; static int[] fib = new int[1001]; public static void main(String[] args) { N = 1001; fib[0] = 1; fib[1] = 2; for (int i = 2; i < 1001; i...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*; | ^~~~~~ 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 static java.util.Arrays.*; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodule...
s549333876
p00602
C++
import java.util.*; import java.io.*; class Main { public static void main(String[] args) { Scanner stdin = new Scanner(System.in); while ( stdin.hasNextInt() ) { final int V = stdin.nextInt(); final int d = stdin.nextInt(); solve( V, d ); } } static void solve( final int V, final i...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*; | ^~~~~~ 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.*; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:6:11:...
s606205464
p00602
C++
#include<stdlib.h> p(int*a,int*b){return *a-*b;}d,c,V,i,f[1001];main(){for(;~scanf("%d%d",&V,&d);printf("%d\n",c)){for(f[1]=3,f[0]=i=2;i<V;)f[i]=(f[i-1]+f[i++-2])%1001;for(qsort(f,V,4,p),c=1;i;f[i]-f[--i]<d?:c++);}}
a.cc:2:1: error: ISO C++ forbids declaration of 'p' with no type [-fpermissive] 2 | p(int*a,int*b){return *a-*b;}d,c,V,i,f[1001];main(){for(;~scanf("%d%d",&V,&d);printf("%d\n",c)){for(f[1]=3,f[0]=i=2;i<V;)f[i]=(f[i-1]+f[i++-2])%1001;for(qsort(f,V,4,p),c=1;i;f[i]-f[--i]<d?:c++);}} | ^ a.cc:2:30: error: 'd' doe...
s568567370
p00603
Java
import java.math.*; public class Main{ public static void main(String[] arg) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String is; String[] ia; while((is = in.readLine()) != null){ ...
Main.java:3: error: cannot find symbol public static void main(String[] arg) throws IOException { ^ symbol: class IOException location: class Main Main.java:4: error: cannot find symbol BufferedReader in = new BufferedReader(new InputStr...
s436833765
p00604
C
#include<stdio.h> #include<stdlib.h> int a; int cmp(const void *s,const void *b){ return (*(int *)b)-(*(int *)s); } int main(void){ int n,m,k; int i,j; while(scanf("%d",&n)!=EOF){ m=0; for(i=n;i>0;i--){ scanf("%d",&a); m+=a*i; } printf("%d\n",m); return 0;}
main.c: In function 'main': main.c:19:1: error: expected declaration or statement at end of input 19 | return 0;} | ^~~~~~
s171251874
p00604
C
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <algorithm> using namespace std; int main() { int i,t,a[100],sum=0; while(scanf("%d",&t)==1){ for(i=0;i<t;i++){ scanf("%d",&a[i]); } sort(a,a+t); for(i=0;i<t;i++){ sum+=(a[i]*(t-i)); ...
main.c:4:10: fatal error: algorithm: No such file or directory 4 | #include <algorithm> | ^~~~~~~~~~~ compilation terminated.
s886228000
p00604
C++
#include <iostream> #include <vector> using namespace std; int main(){ int n; while(cin >> n){ int result = 0; vector<int> p; int tmp; for(int i=1; i<=n; i++){ cin >> tmp; p.push_back(tmp); } sort(p.begin(), p.end()); tmp = 0; ...
a.cc: In function 'int main()': a.cc:16:9: error: 'sort' was not declared in this scope; did you mean 'short'? 16 | sort(p.begin(), p.end()); | ^~~~ | short
s980654638
p00604
C++
#include <iostream> using namespace std; int main(){ int loop_num; long sum; long Penalty[12800]; while(cin >> loop_num){ for(int i=0;i<loop_num;i++){ cin >> Penalty[i]; } sort(Penalty,Penalty+loop_num); sum = 0; for(int i=0;i<loop_num;i++){ sum += Penalty[i]*(loop_num-i)...
a.cc: In function 'int main()': a.cc:14:5: error: 'sort' was not declared in this scope; did you mean 'short'? 14 | sort(Penalty,Penalty+loop_num); | ^~~~ | short
s888555654
p00604
C++
#include <iostream> #include <algorithm> #define MAX 20000 int main(void){ int array[MAX],n,sum,ans; while(cin >> n){ for(int i = 0 ; i < n ; i++) cin >> array[i]; sort(array,array+n); sum = 0; ans = 0; for(int i = 0 ; i < n ; i++){ sum += array[i]; ans += sum; } cou...
a.cc: In function 'int main()': a.cc:8:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 8 | while(cin >> n){ | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ...
s752982480
p00604
C++
//使い方もわからないくせにincludeしまくる人間のクズ #include<cstdio> #include<cstdlib> #include<cstring> #include<cctype> #include<cmath> #include<stack> #include<queue> #include<vector> #include<list> #include<deque> //using namespaceは必須 using namespace std; //defineは可読性を左右する諸刃の剣 //型宣言をいつやればいいのか分からないためグローバルに宣言 int a[10], b, i; char str...
a.cc:27:2: error: expected ';' after class definition 27 | } | ^ | ; a.cc: In member function 'char InterestingNumber::test()': a.cc:25:17: error: 'Interesting' is not a member of 'std' 25 | return std::Interesting; | ^~~~~~~~~~~ a.cc: In function 'int main()': a.cc:53:3: e...
s584212723
p00604
C++
#include<iostream> using namespace std; int main() { int n; for(;cin>>n;) { long long int data[n]; for(int i=0;i<n;i++) cin>>data[i]; long long int ans=0; long long int sum=0; sort(data,data+n); for(int i=0;i<n;i++) { sum+=data[i]; ans+=sum; } cout<<ans<<endl;...
a.cc: In function 'int main()': a.cc:14:7: error: 'sort' was not declared in this scope; did you mean 'short'? 14 | sort(data,data+n); | ^~~~ | short
s931117219
p00604
C++
#include <iostream> #include <math.h> using namespace std; int main(int argc, const char * argv[]) { int n; while(cin >> n){ int times[n]; for(int i = 0; i < n; i++){ cin >> times[i]; } sort(times, times+n); int part_sum = 0; int all_sum = 0...
a.cc: In function 'int main(int, const char**)': a.cc:14:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 14 | sort(times, times+n); | ^~~~ | sqrt a.cc:23:26: error: expected primary-expression before '<<' token 23 | cout << all_sum; << "\n"; ...
s602711619
p00604
C++
#include <iostream> #include <math.h> using namespace std; int main(int argc, const char * argv[]) { int n; while(cin >> n){ int times[n]; for(int i = 0; i < n; i++){ cin >> times[i]; } sort(times, times+n); int part_sum = 0; int all_sum = 0...
a.cc: In function 'int main(int, const char**)': a.cc:14:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 14 | sort(times, times+n); | ^~~~ | sqrt
s066099179
p00605
Java
import java.util.Scanner; /** * Vampirish Night * URL:http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=1019&lang=jp * * @author Igari Kazuya */ public class P1019_Vampirish_Night { /** * @param args */ public static void main(String[] args) { // TODO ツ篠ゥツ督ョツ青カツ青ャツつウツづェツつスツδソツッツドツ・ツスツタツブ Scanne...
Main.java:9: error: class P1019_Vampirish_Night is public, should be declared in a file named P1019_Vampirish_Night.java public class P1019_Vampirish_Night { ^ 1 error
s780006900
p00605
C
for(;scanf("%d%d",&n,&k),n;){ for(i=0;i<k;i++)scanf("%d",a+i); for(;n--;) for(i=0;i<k;a[i++]-=x)scanf("%d",&x),; for(i=0;i<k&&a[i]>=0;i++); puts(k-i?"No":"Yes"); } return 0; }
main.c:1:3: error: expected identifier or '(' before 'for' 1 | for(;scanf("%d%d",&n,&k),n;){ | ^~~ main.c:1:14: error: expected declaration specifiers or '...' before string constant 1 | for(;scanf("%d%d",&n,&k),n;){ | ^~~~~~ main.c:1:21: error: expected declaration specifiers or ...
s008992319
p00605
C
K,B,n,*p;main(N,S){for(;scanf("%d%d",&N,&K)*N;n=!puts(n&1?"No":"Yes"))for(;~N--;n|=2)for(p=S+K*4;S-p--;n|=*p<0)scanf("%d",&B),*p=n?*p-B:B;}
main.c:1:1: warning: data definition has no type or storage class 1 | K,B,n,*p;main(N,S){for(;scanf("%d%d",&N,&K)*N;n=!puts(n&1?"No":"Yes"))for(;~N--;n|=2)for(p=S+K*4;S-p--;n|=*p<0)scanf("%d",&B),*p=n?*p-B:B;} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'K' [-Wimplicit-int] main.c:1:3: err...
s054980052
p00605
C
#define _USE_MATH_DEFINES #define INF 100000000 #include <iostream> #include <sstream> #include <cmath> #include <cstdlib> #include <algorithm> #include <queue> #include <stack> #include <limits> #include <map> #include <string> #include <cstring> #include <set> #include <deque> #include <bitset> #include <list> using...
main.c:3:10: fatal error: iostream: No such file or directory 3 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s012613255
p00605
C
using System; using System.Collections.Generic; using System.Text; class TEST{ static void Main(){ while(true){ String s=""; if((s=Console.ReadLine())==null)break; long[] ss=Array.ConvertAll(s.Split(' '),elem=>long.Parse(elem)); if(ss[0]==0)break; long N=ss[0]; long K=ss[1]; Sol mySol=new Sol(N,K); ...
main.c:1:1: error: unknown type name 'using' 1 | using System; | ^~~~~ main.c:2:1: error: unknown type name 'using' 2 | using System.Collections.Generic; | ^~~~~ main.c:2:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token 2 | using System.Collections.Generic; | ...
s398647737
p00605
C++
#include<string> #include<vector> #include<utility> #include<queue> #include<algorithm> #include<cmath> #define INF 2147483647 #define llINF 9223372036854775807 #define pb push_back #define mp make_pair #define F first #define S second #define ll long long using namespace std; int main(){ int a,b; while(cin>>a>>b...
a.cc: In function 'int main()': a.cc:18:9: error: 'cin' was not declared in this scope 18 | while(cin>>a>>b,a+b){ | ^~~ a.cc:7:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 6 | #include<cmath> +++ |+#include <iostream> 7 | #d...
s312852200
p00605
C++
#include <iostream> #include <vector> #include <string> #include <algorithm> using namespace std; int exist[100000]; int needed[100000]; int main(){ int n,k; while(1) { cin >> n >> k; if (n==0)break; memset(exist,0,sizeof(exist)); memset(needed,0,sizeof(needed)); for (int i=0; i<k; i++) { cin >> exi...
a.cc: In function 'int main()': a.cc:16:17: error: 'memset' was not declared in this scope 16 | memset(exist,0,sizeof(exist)); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include <algorithm>...
s616256477
p00605
C++
#include <iostream> #include <cstdio> #include <vector> using namespace std; int N, K; int main() { while (scanf("%d %d ", &N, &K) == 2) { if (N == 0 && K == 0) { break; } // printf("(N, K) = (%d, %d)\n", N, K); vector<int> S; for (int i = 0; i < K; i++) { int s; scanf("%d "...
a.cc:45:5: error: redefinition of 'int N' 45 | int N, K; | ^ a.cc:6:5: note: 'int N' previously declared here 6 | int N, K; | ^ a.cc:45:8: error: redefinition of 'int K' 45 | int N, K; | ^ a.cc:6:8: note: 'int K' previously declared here 6 | int N, K; | ^ a.cc...
s746346684
p00605
C++
#include<stdio.h> int main(){ int N,K; int S[100]; int B; int count; int h=1; int i,j; scanf("%d %d",&N,&K); while((N!=0)&&(K!=0)){ h=1; for(i=0;i<K;i++){ scanf("%d",&S[i]); } for(i=0;i<N;i++){ for(j=0;j<K;j++){ scanf("%d",&B); } } } if(h==1){ printf("Yes\n"); } sca...
a.cc:37:9: error: expected unqualified-id before 'return' 37 | return 0; | ^~~~~~ a.cc:39:1: error: expected declaration before '}' token 39 | } | ^
s617550524
p00605
C++
#include<cstdio> #include<vector> using namespace std; int main(){ int N, K; while( scanf("%d %d", &N, &K), N||K ){ vector<int> bloods; for( int i=0; i<K; i++ ){ int b; scanf("%d", &b); bloods.push_back(b); } for( int i=0; i<N; i++ ){ for( int j=0; j<K; j++ ){ int b...
a.cc: In function 'int main()': a.cc:24:18: error: 'j' was not declared in this scope 24 | if( bloods[j] < 0 ){ | ^ a.cc:31:2: error: expected '}' at end of input 31 | } | ^ a.cc:5:11: note: to match this '{' 5 | int main(){ | ^
s636367769
p00605
C++
#include<stdio.h> main(){ int N,K,blood[101],family[101],tmp,i,j,x; while(1){ scanf("%d %d", &N, &K) if(N==0&&k==0) break; tmp=1; for(i=0;i<K;i++) scanf("%d",&blood[i]); for(i=0;i<N;i++){ for(j=0;j<K;j++){ scanf("%d",&x);...
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:5:32: error: expected ';' before 'if' 5 | scanf("%d %d", &N, &K) | ^ | ; 6 | ...
s524937732
p00605
C++
#include<stdio.h> main(){ int N,K,blood[101],family[101],tmp,i,j,x; while(1){ scanf("%d %d", &N, &K); if(N==0&&k==0) break; tmp=1; for(i=0;i<K;i++) scanf("%d",&blood[i]); for(i=0;i<N;i++){ for(j=0;j<K;j++){ scanf("%d",&x)...
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:6:19: error: 'k' was not declared in this scope 6 | if(N==0&&k==0) | ^
s710045835
p00606
C
#include "stdio.h" #include "math.h" int main() { int n; char s, t, b; scanf("%d", &n); while(n>0){ scanf(" %c %c %c", &s, &t, &b); s-='A'; t-='A'; b-='A'; int footprint1[9]={0,0,0,0,0,0,0,0,0}; int footprint2[9]; footprint1[s] = 1; for(int i=0; i<n; i++){ for(int j=0; j<9; j++) footprint2[j]=0; ...
/usr/bin/ld: /tmp/ccEm14L3.o: in function `main': main.c:(.text+0x2fe): undefined reference to `pow' collect2: error: ld returned 1 exit status
s036818790
p00606
C
#include "stdio.h" #include "math.h" int main() { int n; char s, t, b; scanf("%d", &n); while(n>0){ scanf(" %c %c %c", &s, &t, &b); s-='A'; t-='A'; b-='A'; int footprint1[9]={0,0,0,0,0,0,0,0,0}; int footprint2[9]; footprint1[s] = 1; for(int i=0; i<n; i++){ for(int j=0; j<9; j++) footprint2[j]=0; ...
/usr/bin/ld: /tmp/ccHTJXQ4.o: in function `main': main.c:(.text+0x2fe): undefined reference to `pow' collect2: error: ld returned 1 exit status
s718877377
p00606
C++
#include <bits/stdc++.h> using namespace std; int dp[16][9]; const int m[]={-3,-1,1,3}; int main(){ while(true){ int n; cin>>n; if(n==0) return 0; char s,t,b; cin>>s>>t>>b; int ss=s-'A',bb=b-'A',tt=t-'A'; memset(dp,0,sizeof(dp)); dp[0][tt]=1; for(int i=0;i<n;i++){ for(int j=0;j<9;j++){ if(dp[i][j]...
a.cc: In function 'int main()': a.cc:23:52: error: invalid operands of types 'double' and 'int' to binary 'operator>>' 23 | printf("%.15lf\n",(double)dp[n][ss]>>(2*n)); | ~~~~~~~~~~~~~~~~~^~~~~~~ | | | ...
s480870387
p00606
C++
#include<iostream> #include<map> #include<string> #include<vector> #include<algorithm> #include<queue> #include<set> #include<map> using namespace std; double dp[16][9]; int k, x, y, z; int b[9][4]={ {1,3,-1,-1}, { 0,2,4,-1 }, { 1,5,-1,-1 }, { 0,4,6,-1 }, { 1,3,5,7 }, { 2,4,8,-1 }, { 3,7,-1,-1 }, { 4,6,8,-1 },...
a.cc: In function 'int main()': a.cc:26:17: error: 'memset' was not declared in this scope 26 | memset(dp, 0, sizeof(dp)); | ^~~~~~ a.cc:8:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 7 | #include<set> +++ |+#i...
s087068887
p00606
C++
# include <iostream> # include <algorithm> # include <vector> # include <string> # include <set> # include <map> # include <cmath> # include <iomanip> # include <functional> # include <utility> # include <stack> # include <queue> # include <list> using namespace std; using LL = long long; constexpr int MOD = 1000000000...
a.cc: In function 'int main()': a.cc:34:17: error: 'memset' was not declared in this scope 34 | memset(dp, 0.0, sizeof(dp)); | ^~~~~~ a.cc:14:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 13 | # include <list> ++...
s035544341
p00606
C++
# include <iostream> # include <algorithm> # include <vector> # include <string> # include <set> # include <map> # include <cmath> # include <iomanip> # include <functional> # include <utility> # include <stack> # include <queue> # include <list> using namespace std; using LL = long long; constexpr int MOD = 1000000000...
a.cc: In function 'int main()': a.cc:34:17: error: 'memset' was not declared in this scope 34 | memset(dp, 0.0, sizeof(dp)); | ^~~~~~ a.cc:14:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 13 | # include <list> ++...
s341498460
p00606
C++
# include <iostream> # include <algorithm> # include <vector> # include <string> # include <set> # include <map> # include <cmath> # include <iomanip> # include <functional> # include <utility> # include <stack> # include <queue> # include <list> using namespace std; using LL = long long; constexpr int MOD = 1000000000...
a.cc: In function 'int main()': a.cc:34:22: error: 'memset' is not a member of 'std'; did you mean 'wmemset'? 34 | std::memset(dp, 0.0, sizeof(dp)); | ^~~~~~ | wmemset
s079822112
p00606
C++
#include <stdio.h> int dp[16][3 + 2][3 + 2]; int main(void) { int n; char s[2], e[2], t[2]; int start; int end; int not; int mot; while (1){ scanf("%d", &n); if (n == 0) break; scanf("%s%s%s", s, e, t); for (int i = 0; i < 5; i++){ for (int j = 0; j < 5; j++){ for (int k = 0; k < 16; k++...
a.cc: In function 'int main()': a.cc:11:13: error: expected unqualified-id before 'not' token 11 | int not; | ^~~ a.cc:34:21: error: expected primary-expression before '=' token 34 | not = t[0] - 'A'; | ^ a.cc:38:36: error: expected primary-expre...
s439930391
p00606
C++
#include <iostream> #include <vector> #include <fstream> using namespace std; int n; char s,t,b; double calc(){ char floar[3][3]; floar[0][0] = 'A'; floar[0][1] = 'B'; floar[0][2] = 'C'; floar[1][0] = 'D'; floar[1][1] = 'E'; floar[1][2] = 'F'; floar[2][0] = 'G'; floar[2][1] = 'H'; floar[2][2] = 'I'; pai...
a.cc: In function 'int main()': a.cc:135:8: error: expected ';' before ':' token 135 | solve(): | ^ | ;
s526867294
p00606
C++
#include<iostream> #include<cstdio> using namespace std; char s,t,b; char fld[3][3]={"ABC","DEF","GHI"}; int ans,sum,dx[]={1,0,-1,0},dy[]={0,1,0,-1}; void rep(int now,int y,int x){ int X,Y; if(now==0){ sum++; if(fld[y][x]==t){ ans++; } return ; } for(int i=0;i<4;i++){ X=x+dx[i]; Y=y+dy[i]; if(X>=0&...
a.cc:5:17: error: initializer-string for 'char [3]' is too long [-fpermissive] 5 | char fld[3][3]={"ABC","DEF","GHI"}; | ^~~~~ a.cc:5:23: error: initializer-string for 'char [3]' is too long [-fpermissive] 5 | char fld[3][3]={"ABC","DEF","GHI"}; | ^~~~~ a.cc:5:2...
s370549348
p00606
C++
int dy[4]={0,0,1,-1}; int bx,by; int tx,ty; long double rec(int rest,int x,int y){ //cout<<"x:"<<x<<"y:"<<y<<endl; if(x<0||x>2||y<0||y>2)return 0; if(dp[rest][x][y]>0)return dp[rest][x][y]; if(rest==0){ if(x==tx&&y==ty)return 1; else return 0; } long double sum=0; for(int i=0;...
a.cc: In function 'long double rec(int, int, int)': a.cc:8:9: error: 'dp' was not declared in this scope; did you mean 'dy'? 8 | if(dp[rest][x][y]>0)return dp[rest][x][y]; | ^~ | dy a.cc:16:18: error: 'dx' was not declared in this scope; did you mean 'x'? 16 | if(((x+dx...
s279873153
p00606
C++
#include <iostream> using namespace std; int n; char room[10] = "ABCDEFGHI"; char s, t, b; int off[4][2] = {{-1, 0}, {1, 0}, {0, -1}, {0, 1}}; int x, y; double table[3][3]; double solve() { memset(&table[0][0], 0, sizeof(double) * 9); table[x][y] = 1.0; for(int k=0; k<n; k++) { double temp[3][3]; memset(&te...
a.cc: In function 'double solve()': a.cc:15:9: error: 'memset' was not declared in this scope 15 | memset(&table[0][0], 0, sizeof(double) * 9); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream>...
s254202848
p00606
C++
#include <iostream> #include <algorithm> #include <cmath> #include <map> #include <cstdio> #include <iomanip> using namespace std; const double EPS = 1e-8; int n; pair<int, int> s, t, b; double dp[16][3][3]; int dy[] = {-1, 0, 1, 0}; int dx[] = {0, 1, 0, -1}; bool equals(double a, double b){ return abs(a-b) < EPS...
a.cc:27:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 27 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:74:4: error: expected '}' at end of input 74 | } | ^ a.cc:27:7: note: to match this '{' 27 | main(){ | ^
s508976105
p00606
C++
#include<iostream> #include<map> #include<string.h> using namespace std; int dx[]={0,1,0,-1}; int dy[]={1,0,-1,0}; struct Cor{ int x,y; Cor(int a,int b){ x=a,y=b; } }; int main() { map<char,pair<int,int>> M; M['A']=make_pair(0,0); M['B']=make_pair(1,0); M['C']=make_pair(2,0); M['D']=make_pair(0,1); M['E']...
a.cc: In function 'int main()': a.cc:35:31: error: expected unqualified-id before 'not' token 35 | pair<int,int> not=M[b]; | ^~~ a.cc:52:107: error: expected primary-expression before ')' token 52 | if(nx<0 || nx>=...
s781259019
p00606
C++
#include<iostream> #include<map> #include<string.h> using namespace std; int dx[]={0,1,0,-1}; int dy[]={1,0,-1,0}; int main() { map<char,pair<int,int> > M; M['A']=make_pair(0,0); M['B']=make_pair(1,0); M['C']=make_pair(2,0); M['D']=make_pair(0,1); M['E']=make_pair(1,1); M['F']=make_pair(2,1); M['G']=make_pair...
a.cc: In function 'int main()': a.cc:28:31: error: expected unqualified-id before 'not' token 28 | pair<int,int> not=M[b]; | ^~~ a.cc:45:107: error: expected primary-expression before ')' token 45 | if(nx<0 || nx>=...
s172355264
p00606
C++
#Include <iostream> #include <queue> using namespace std; static const int MV = 100; typedef pair<int, int> T; int main() { while(1) { int w, h, Gcount=0, sum=0; cin >> w >> h; if (w ==0 && h == 0) break; char M[h][w]; int A[h][w]; queue<T> Q; for (int i=0;i<h;i++) { for (int...
a.cc:2:2: error: invalid preprocessing directive #Include; did you mean #include? 2 | #Include <iostream> | ^~~~~~~ | include a.cc: In function 'int main()': a.cc:12:5: error: 'cin' was not declared in this scope 12 | cin >> w >> h; | ^~~ a.cc:4:1: note: 'std::cin' is defined in heade...
s436320429
p00606
C++
#include<stdlib.h> #include<iostream> using namespace std; int s,t,b,n; double p,nn; int d[4]={1,3,-1,-3}; double df[10][20]; void dfs(int s,int n){ double p1; if(n==0){ if(s==t){p+=pow(0.25,nn);} return; } if(df[s][n]>=0){ p+=df[s][n]; return; }else{ for(int i=0;i<4;i++){ if(s+d[i]==b){ p1=p; ...
a.cc: In function 'void dfs(int, int)': a.cc:11:29: error: 'pow' was not declared in this scope 11 | if(s==t){p+=pow(0.25,nn);} | ^~~
s260369002
p00606
C++
#include<iostream> #include<algorithm> #include<vectoer> #include<string> #include<map> #include<cstdio> #define f first #define s second using namespace std; typedef pair<int,int> P; int dx[4]={0,0,1,-1}; int dy[4]={1,-1,0,0}; int main(void){ int n,id=0; string s="ABCDEFGHI"; char s,t,d; map<char,P>mp; for(int ...
a.cc:3:9: fatal error: vectoer: No such file or directory 3 | #include<vectoer> | ^~~~~~~~~ compilation terminated.
s342342166
p00606
C++
#include<iostream> #include<algorithm> #include<vectoer> #include<string> #include<map> #include<cstdio> #define f first #define s second using namespace std; typedef pair<int,int> P; int dx[4]={0,0,1,-1}; int dy[4]={1,-1,0,0}; int main(void){ int n,id=0; string s="ABCDEFGHI"; char s,t,d; map<char,P>mp; f...
a.cc:3:9: fatal error: vectoer: No such file or directory 3 | #include<vectoer> | ^~~~~~~~~ compilation terminated.
s389992273
p00606
C++
#include<iostream> #include<algorithm> #include<vector> #include<string> #include<map> #include<cstdio> #define f first #define s second using namespace std; typedef pair<int,int> P; int dx[4]={0,0,1,-1}; int dy[4]={1,-1,0,0}; int main(void){ int n,id=0; string s="ABCDEFGHI"; char s,t,d; map<char,P>mp...
a.cc: In function 'int main()': a.cc:9:11: error: conflicting declaration 'char second' 9 | #define s second | ^~~~~~ a.cc:22:6: note: in expansion of macro 's' 22 | char s,t,d; | ^ a.cc:9:11: note: previous declaration as 'std::string second' 9 | #define s second | ...
s190604626
p00606
C++
#include<iostream> #include<algorithm> #include<vector> #include<string> #include<map> #include<cstdio> #define f first #define s second using namespace std; typedef pair<int,int> P; int dx[4]={0,0,1,-1}; int dy[4]={1,-1,0,0}; int main(void){ int n,id=0; string s="ABCDEFGHI"; char s,t,d; map<cha...
a.cc: In function 'int main()': a.cc:9:11: error: conflicting declaration 'char second' 9 | #define s second | ^~~~~~ a.cc:22:6: note: in expansion of macro 's' 22 | char s,t,d; | ^ a.cc:9:11: note: previous declaration as 'std::string second' 9 | #define s second | ...
s164716008
p00606
C++
#include<iostream> #include<algorithm> #include<vector> #include<string> #include<map> #include<cstdio> #define f first #define s second using namespace std; typedef pair<int,int> P; int dx[4]={0,0,1,-1}; int dy[4]={1,-1,0,0}; int main(void){ int n,id=0; string s="ABCDEFGHI"; char s,t,d; m...
a.cc: In function 'int main()': a.cc:9:11: error: conflicting declaration 'char second' 9 | #define s second | ^~~~~~ a.cc:22:6: note: in expansion of macro 's' 22 | char s,t,d; | ^ a.cc:9:11: note: previous declaration as 'std::string second' 9 | #define s second | ...
s956725700
p00606
C++
#define rep(i,n) for(int i=0;i<n;i++) #define ck(a) (0<=(a)&&(a)<9) int di[]={-3,-1,1,3}; int main(){ int n,s,t,b; char cs,ct,cb; while(scanf("%d",&n),n){ scanf(" %c %c %c",&cs,&ct,&cb); s=cs-'A', t=ct-'A', b=cb-'A'; double p[9]={0}; p[s]=1; while(n--){ double q[9]=...
a.cc: In function 'int main()': a.cc:6:11: error: 'scanf' was not declared in this scope 6 | while(scanf("%d",&n),n){ | ^~~~~ a.cc:19:9: error: 'printf' was not declared in this scope 19 | printf("%.8f\n",p[t]); | ^~~~~~ a.cc:1:1: note: 'printf' is defined in header '<cs...
s514345048
p00607
Java
import java.util.Scanner; public class EditText { static final int MAXINPUTLINE = 10; static final int MAXINPUTCOMMAND = 300; static final int MAXMODIFIEDTEXTLINE = 100; static final int MAXMODIFIERTEXTCHAR = 1000; static String[] modifyingText = new String[MAXMODIFIEDTEXTLINE]; static String b...
Main.java:3: error: class EditText is public, should be declared in a file named EditText.java public class EditText { ^ 1 error
s568951289
p00607
Java
import java.util.ArrayList; import java.util.Scanner; public class EditText { static final int MAXINPUTLINE = 10; static final int MAXINPUTCOMMAND = 300; static final int MAXMODIFIEDTEXTLINE = 100; static final int MAXMODIFIERTEXTCHAR = 1000; static Scanner scan = new Scanner(System.in); static...
Main.java:4: error: class EditText is public, should be declared in a file named EditText.java public class EditText { ^ 1 error
s416618457
p00607
Java
import java.util.ArrayList; import java.util.Scanner; public class EditText { static final int MAXINPUTLINE = 10; static final int MAXINPUTCOMMAND = 300; static final int MAXMODIFIEDTEXTLINE = 100; static final int MAXMODIFIERTEXTCHAR = 1000; static final String ENDOFLINE = "$"; static Scanner ...
Main.java:4: error: class EditText is public, should be declared in a file named EditText.java public class EditText { ^ 1 error
s698397090
p00607
Java
import java.util.ArrayList; import java.util.Scanner; public class EditText { static final int MAXINPUTLINE = 10; static final int MAXINPUTCOMMAND = 300; static final int MAXMODIFIEDTEXTLINE = 100; static final int MAXMODIFIERTEXTCHAR = 1000; static final String ENDOFLINE = "$"; static Scanner ...
Main.java:4: error: class EditText is public, should be declared in a file named EditText.java public class EditText { ^ 1 error
s380891773
p00607
Java
import java.awt.Point; import java.io.InputStreamReader; import java.nio.Buffer; import java.util.ArrayList; import java.util.List; import java.util.Scanner; import java.util.regex.Pattern; public class AOJ1021 { /** * @param args */ public static void main(String[] args) throws Exception { // TODO Auto-gener...
Main.java:9: error: class AOJ1021 is public, should be declared in a file named AOJ1021.java public class AOJ1021 { ^ 1 error
s563428125
p00607
C
#include <cstdio> #include <iostream> #include <string> #include <vector> #include <list> using namespace std; vector<string> text; string buf; int row, col; void func_a(){ col = 0; } void func_e(){ col = text[row].size() - 1; } void func_p(){ if (row > 0) row--; func_a(); } void func_n(){ if (row < text.si...
main.c:1:10: fatal error: cstdio: No such file or directory 1 | #include <cstdio> | ^~~~~~~~ compilation terminated.
s796388798
p00607
C++
#include <iostream> #include <string> #include <vector> using namespace std; int main() { vector<string> e; string s; while (getline(cin, s), s != "END_OF_TEXT") { e.push_back(s); } int y = 0, x = 0; string buffer = ""; char c; while (cin >> c, c != '-') { switch (c) { case 'a': x = 0; break; ...
a.cc: In function 'int main()': a.cc:29:40: error: no matching function for call to 'min(std::vector<std::__cxx11::basic_string<char> >::size_type, int)' 29 | y = min(e.size()-1, y+1); | ~~~^~~~~~~~~~~~~~~~~ In file included from /usr/include/...
s317506166
p00607
C++
#include <iostream> #include <string> #include <cstring> #include <cmath> #include <vector> #include <map> #include <set> #include <queue> #include <stack> #include <algorithm> #include <sstream> using namespace std; int main(){ char str[128][1024],c,buf[1024],input[1024]; int i,j,now_x,now_y,y_max; memset(str,...
a.cc: In function 'int main()': a.cc:20:11: error: 'gets' was not declared in this scope; did you mean 'getw'? 20 | for(i=0;gets(input);i++){ | ^~~~ | getw
s012325604
p00607
C++
#include <iostream> #include <stdio.h> #include <string> #include <cstring> #include <cmath> #include <vector> #include <map> #include <set> #include <queue> #include <stack> #include <algorithm> #include <sstream> using namespace std; int main(){ char str[128][1024],c,buf[1024],input[1024]; int i,j,now_x,now_y,y_...
a.cc: In function 'int main()': a.cc:21:11: error: 'gets' was not declared in this scope; did you mean 'getw'? 21 | for(i=0;gets(input);i++){ | ^~~~ | getw
s960854618
p00607
C++
import java.awt.Point; import java.io.InputStreamReader; import java.nio.Buffer; import java.util.ArrayList; import java.util.List; import java.util.Scanner; import java.util.regex.Pattern; public class Main { /** * @param args */ public static void main(String[] args) throws Exception { // TODO Auto-generate...
a.cc:1:1: error: 'import' does not name a type 1 | import java.awt.Point; | ^~~~~~ 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.InputStreamReader; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmod...
s396444893
p00607
C++
#define _USE_MATH_DEFINES #include <iostream> #include <memory> #include <memory.h> #include <fstream> #include <cmath> #include <math.h> #include <numeric> #include <vector> #include <stack> #include <string> #include <queue> #include <sstream> #include <cstdlib> #include <cassert> #include <cstdio> #include <cstring>...
a.cc: In function 'void do_k(std::vector<std::__cxx11::basic_string<char> >&, std::string&)': a.cc:101:10: error: 'else' without a previous 'if' 101 | }else{ | ^~~~
s500398102
p00607
C++
#include <iostream> #include <algorithm> #include <vector> #include <algorithm> #include <string> using namespace std; template <class T> void pv(T a, T b) { for(typeof(a) it = a; it != b; ++it) cerr << *it << " "; cerr << endl; } #define all(v) (v).begin(), (v).end() vector<string> text; vector<char> command; ...
a.cc: In function 'void com_f()': a.cc:43:24: error: expected ';' before '}' token 43 | com_f() | ^ | ; 44 | } | ~
s850004811
p00607
C++
#include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> #include<cassert> #include<iostream> #include<sstream> #include<string> #include<vector> #include<queue> #include<set> #include<map> #include<utility> #include<numeric> #include<algorithm> #include<bitset> #include<complex> #include<stack> using name...
a.cc: In function 'int main()': a.cc:71:17: error: 'gets' was not declared in this scope; did you mean 'getw'? 71 | gets(s); | ^~~~ | getw
s597919111
p00607
C++
#include <iostream> #include <vector> #include <string> using namespace std; void doA(int *l, int *c, string &s, string &b, vector<string> &v) { *c = 0; } void doE(int *l, int *c, string &s, string &b, vector<string> &v) { *c = s.size(); } void doP(int *l, int *c, string &s, string &b, vector<string> &v) { if...
a.cc: In function 'void doY(int*, int*, std::string&, std::string&, std::vector<std::__cxx11::basic_string<char> >&)': a.cc:73:19: error: expected primary-expression before ')' token 73 | v.insert(itr, ); | ^
s104312987
p00607
C++
#include <cstdio> #include <iostream> #include <string> #include <vector> #include <list> using namespace std; vector<string> text; string buf; int row, col; void func_a(){ col = 0; } void func_e(){ col = text[row].size() - 1; } void func_p(){ if (row > 0) row--; func_a(); } void func_n(){ if (row < text.si...
a.cc: In function 'int main()': a.cc:120:20: error: expected '}' at end of input 120 | return (0); | ^ a.cc:81:1: note: to match this '{' 81 | { | ^
s755406368
p00607
C++
#include <iostream> #include <string> &#160; using namespace std; &#160; int main(){ &#160;&#160;&#160;&#160;string str[1000]; &#160;&#160;&#160;&#160;string s; &#160;&#160;&#160;&#160;int size = 0; &#160;&#160;&#160;&#160;while(getline(cin,s)){ &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;if(s == "END_OF_TEXT") bre...
a.cc:3:2: error: stray '#' in program 3 | &#160; | ^ a.cc:5:2: error: stray '#' in program 5 | &#160; | ^ a.cc:7:2: error: stray '#' in program 7 | &#160;&#160;&#160;&#160;string str[1000]; | ^ a.cc:7:8: error: stray '#' in program 7 | &#160;&#160;&#160;&#160;string str[1000]; ...
s047613521
p00607
C++
#include<iostream> #include<vector> #include<algorithm> using namespace std; vector< vector<char> > t,u; vector<char> tmp; vector<char> z; char ch; int x,y; void input(); void funcA(); void funcE(); void funcP(); void funcN(); void funcF(); void funcB(); void funcD(); void funcK(); void funcY(); void yinsert(int,ve...
/usr/bin/ld: /tmp/cchXCm8x.o: in function `funcD()': a.cc:(.text+0x3c7): undefined reference to `xdelete(int, int)' /usr/bin/ld: a.cc:(.text+0x406): undefined reference to `xdelete(int, int)' /usr/bin/ld: a.cc:(.text+0x4ae): undefined reference to `ydelete(int)' /usr/bin/ld: /tmp/cchXCm8x.o: in function `funcK()': a.cc...
s865606188
p00607
C++
#include<iostream> #include<vector> #include<algorithm> using namespace std; vector< vector<char> > t,u; vector<char> tmp; vector<char> z; char ch; int x,y; void input(); void funcA(); void funcE(); void funcP(); void funcN(); void funcF(); void funcB(); void funcD(); void funcK(); void funcY(); void yinsert(int,ve...
/usr/bin/ld: /tmp/cclyDZR9.o: in function `funcD()': a.cc:(.text+0x3c7): undefined reference to `xdelete(int, int)' /usr/bin/ld: a.cc:(.text+0x406): undefined reference to `xdelete(int, int)' /usr/bin/ld: a.cc:(.text+0x4ae): undefined reference to `ydelete(int)' /usr/bin/ld: /tmp/cclyDZR9.o: in function `funcK()': a.cc...
s471370590
p00607
C++
#include<iostream> #include<vector> #include<algorithm> using namespace std; vector< vector<char> > t,u; vector<char> tmp; char ch; int x,y; void input(); void funcA(); void funcE(); void funcP(); void funcN(); void funcF(); void funcB(); void funcD(); void funcK(); void funcY(); void yinsert(int,vector<char>); voi...
/usr/bin/ld: /tmp/cc66aCe7.o: in function `funcD()': a.cc:(.text+0x3c7): undefined reference to `xdelete(int, int)' /usr/bin/ld: a.cc:(.text+0x406): undefined reference to `xdelete(int, int)' /usr/bin/ld: a.cc:(.text+0x4ae): undefined reference to `ydelete(int)' /usr/bin/ld: /tmp/cc66aCe7.o: in function `funcK()': a.cc...
s322032816
p00608
Java
// AOJ 1022 #include<iostream> #include<string> #include<map> #include<algorithm> #include<vector> #define value first #define p second using namespace std; typedef pair<int,int> result; // {{{ const int OutOfIntExc = 1, NegIntExc = 2, NotEquationExc = 3, NotNumExc = 4, LackNumExc = 5, IterExceedExc = 6, I...
Main.java:2: error: illegal character: '#' #include<iostream> ^ Main.java:3: error: illegal character: '#' #include<string> ^ Main.java:4: error: illegal character: '#' #include<map> ^ Main.java:5: error: illegal character: '#' #include<algorithm> ^ Main.java:6: error: illegal character: '#' #include<vector> ^ Main.jav...
s325836820
p00608
Java
aimport java.io.*; import java.util.*; import java.math.*; public class Main{ public static void main(String[] arg) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String[] ia; while(true){ ia...
Main.java:1: error: class, interface, enum, or record expected aimport java.io.*; ^ Main.java:2: error: class, interface, enum, or record expected import java.util.*; ^ Main.java:3: error: class, interface, enum, or record expected import java.math.*; ^ 3 errors
s199459531
p00608
C++
// AOJ 1022 #include<iostream> #include<string> #include<map> #include<algorithm> #define value first #define p second using namespace std; typedef pair<int,int> result; const int OutOfIntExc = 1, NegIntExc = 2, NotEquationExc = 3, NotNumExc = 4, NotMultExc = 5; result equation...
a.cc: In function 'result expression(const std::string&, int)': a.cc:42:37: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and 'result' {aka 'std::pair<int, int>'}) 42 | cout << "r_:" << r.value << "," << r_ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~ ~~ | ...
s342179824
p00608
C++
// AOJ 1022 #include<iostream> #include<string> #include<map> #include<algorithm> #define value first #define p second using namespace std; typedef pair<int,int> result; const int OutOfIntExc = 1, NegIntExc = 2, NotEquationExc = 3, NotNumExc = 4, LackNumExc = 5, IterEx...
a.cc: In function 'bool solve()': a.cc:190:1: warning: control reaches end of non-void function [-Wreturn-type] 190 | } | ^ /usr/bin/ld: /tmp/ccmbA8kc.o: in function `equation(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)': a.cc:(.text+0x64): undefined reference to...
s568912463
p00608
C++
// AOJ 1022 #include<iostream> #include<string> #include<map> #include<algorithm> #include<vector> #define value first #define p second using namespace std; typedef pair<int,int> result; const int OutOfIntExc = 1, NegIntExc = 2, NotEquationExc = 3, NotNumExc = 4, LackNumExc = 5...
a.cc: In function 'bool solve()': a.cc:185:13: error: 'VSOLVABLE' was not declared in this scope 185 | if (VSOLVABLE[i] and incorrect | ^~~~~~~~~ a.cc:185:30: error: 'incorrect' was not declared in this scope 185 | if (VSOLVABLE[i] and incorrect | ...
s490999545
p00608
C++
// AOJ 1022 #include<iostream> #include<string> #include<map> #include<algorithm> #include<vector> #define value first #define p second using namespace std; typedef pair<int,int> result; const int OutOfIntExc = 1, NegIntExc = 2, NotEquationExc = 3, NotNumExc = 4, LackNumExc = 5...
a.cc: In function 'bool solve()': a.cc:185:13: error: 'VSOLVABLE' was not declared in this scope 185 | if (VSOLVABLE[i] and incorrect | ^~~~~~~~~ a.cc:185:30: error: 'incorrect' was not declared in this scope 185 | if (VSOLVABLE[i] and incorrect | ...
s977154171
p00608
C++
// AOJ 1022 #include<iostream> #include<string> #include<map> #include<algorithm> #include<vector> #define value first #define p second using namespace std; typedef pair<int,int> result; const int OutOfIntExc = 1, NegIntExc = 2, NotEquationExc = 3, NotNumExc = 4, LackNumExc = 5...
a.cc: In function 'bool solve()': a.cc:185:13: error: 'VSOLVABLE' was not declared in this scope 185 | if (VSOLVABLE[i] and incorrect | ^~~~~~~~~ a.cc:185:30: error: 'incorrect' was not declared in this scope 185 | if (VSOLVABLE[i] and incorrect | ...
s805465379
p00608
C++
// AOJ 1022 #include<iostream> #include<string> #include<map> #include<algorithm> #include<vector> #define value first #define p second using namespace std; typedef pair<int,int> result; const int OutOfIntExc = 1, NegIntExc = 2, NotEquationExc = 3, NotNumExc = 4, LackNumExc = 5...
a.cc: In function 'bool solve()': a.cc:185:13: error: 'VSOLVABLE' was not declared in this scope 185 | if (VSOLVABLE[i] and incorrect | ^~~~~~~~~ a.cc:185:30: error: 'incorrect' was not declared in this scope 185 | if (VSOLVABLE[i] and incorrect | ...
s369085402
p00608
C++
5 5 4=..2 +#=#+ .-2=. =#*#= .-.=3 6 7 3 1 4 / 8 1 6 8..3=2 2 2 + 0 0
a.cc:3:2: error: stray '#' in program 3 | +#=#+ | ^ a.cc:3:4: error: stray '#' in program 3 | +#=#+ | ^ a.cc:5:2: error: stray '#' in program 5 | =#*#= | ^ a.cc:5:4: error: stray '#' in program 5 | =#*#= | ^ a.cc:10:1: error: too many decimal points in number 10 | 8..3...
s878919860
p00608
C++
puts "Hello World"
a.cc:1:1: error: 'puts' does not name a type 1 | puts "Hello World" | ^~~~
s876560726
p00608
C++
#include <bits/stdc++.h> #define REP(i,n) for(int i=0; i<(int)(n); ++i) using namespace std; typedef long long LL; typedef pair<int, LL> Result; class ParseError{}; struct Parser{ Result expr(string s, int p){ Result r = term(s, p); while(s[r.first] == '+' || s[r.first] == '-'){ Result ...
a.cc:55:15: error: 'char select [10]' redeclared as different kind of entity 55 | char select[10]; | ^ In file included from /usr/include/x86_64-linux-gnu/sys/types.h:179, from /usr/include/stdlib.h:514, from /usr/include/c++/14/cstdlib:79, from ...
s717076813
p00608
C++
#include <iostream> #include <vector> using namespace std; #define rep(i, b) for( int i = 0; i < b; i++ ) typedef vector<char> vec; // char op[5] = { '=', '-', '+' , '*', '/' }; // char num[10] = {'0','1','2','3','4','5','6','7','8','9'}; int main(){ int h, w; while( cin >> h >> w, h ){ vector< vector...
In file included from /usr/include/c++/14/string:51, 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...
s186875678
p00608
C++
#include<iostream> #include<vector> using namespace std; #define INF (1<<24) bool isNum(char ch){return ('0'<=ch&&ch<='9');} struct calcStr{ string s; int pos,len; void init(){ pos=0;len=s.size(); } int head2Num(){ int res=0; while(1){ if(pos==len)break; if('0'<=s[pos]&&s[pos]<='9'){ ...
a.cc: In function 'bool solve()': a.cc:85:3: error: 'sort' was not declared in this scope; did you mean 'short'? 85 | sort(u,u+N); | ^~~~ | short a.cc:88:10: error: 'next_permutation' was not declared in this scope 88 | }while(next_permutation(u,u+N)); | ^~~~~~~~~~~~~~~~
s698145752
p00609
C++
#include<stdio.h> #include<algorithm> #include<vector> using namespace std; //vector<pair<int,int> >A[510][510]; vector<pair<int,int> >B[510][510]; int dx[]={1,1,1,0,0,0,-1,-1,-1}; int dy[]={1,0,-1,1,0,-1,1,0,-1}; int ax[110000]; int ay[110000]; int main(){ int a,b,c; while(scanf("%d%d%d",&a,&b,&c),a+b){ for(int i=...
a.cc: In function 'int main()': a.cc:37:44: error: 'sqrt' was not declared in this scope 37 | if(sqrt((ax[i]-B[nx][ny][k].first)*(ax[i]-B[nx][ny][k].first)+ | ^~~~
s845582030
p00609
C++
#include<iostream> #include<vector> #include<cmath> #include<algorithm> using namespace std; typedef pair<int, int> P; #define X first #define Y second vector<P> A,B[100010]; int main(){ while(1){ int an,bn,r,ans=0,n=0; int x,y; vector<P>::iterator it1; vector<P>::iterator it2; cin>>an>>bn>>r; if(an==0 && ...
a.cc: In function 'int main()': a.cc:7:11: error: 'class std::vector<std::pair<int, int> >' has no member named 'first' 7 | #define X first | ^~~~~ a.cc:26:30: note: in expansion of macro 'X' 26 | B[x].X=x; | ^ a.cc:8:11: error: 'class st...
s676737242
p00609
C++
#include<iostream> #include<vector> #include<cmath> #include<algorithm> using namespace std; typedef pair<int, int> P; #define X first #define Y second vector<P> A[100010],B[100010]; int main(){ while(1){ int an,bn,r,ans=0,n=0; int x,y; vector<P>::iterator it1; vector<P>::iterator it2; cin>>an>>bn>>r; if(a...
a.cc: In function 'int main()': a.cc:7:11: error: 'class std::vector<std::pair<int, int> >' has no member named 'first' 7 | #define X first | ^~~~~ a.cc:22:30: note: in expansion of macro 'X' 22 | A[i].X=x; | ^ a.cc:8:11: error: 'class st...
s417185355
p00609
C++
#include<iostream> #include<vector> #include<cmath> #include<algorithm> using namespace std; typedef pair<int, int> P; #define X first #define Y second vector<P> B[100010]; P A[100010]={}; int main(){ while(1){ B.clear(); int an,bn,r,ans=0,n=0; int x,y; vector<P>::iterator it1; vector<P>::iterator it2; cin...
a.cc: In function 'int main()': a.cc:13:19: error: request for member 'clear' in 'B', which is of non-class type 'std::vector<std::pair<int, int> > [100010]' 13 | B.clear(); | ^~~~~
s216640945
p00609
C++
#include<iostream> #include<vector> #include<cmath> #include<algorithm> using namespace std; typedef pair<int, int> P; #define X first #define Y second vector<int> B[100010]; P A[100010]; int main(){ while(1){ B.clear(); int an,bn,r,ans=0,n=0; int x,y; vector<int>::iterator it1; vector<int>::iterator it2; ...
a.cc: In function 'int main()': a.cc:13:19: error: request for member 'clear' in 'B', which is of non-class type 'std::vector<int> [100010]' 13 | B.clear(); | ^~~~~
s162573344
p00609
C++
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <iostream> #include <vector> #define or0(a) (a)<0?0:(a) using namespace std; int main(){ int an, bn, r, ans = 0, d, b0, b1; vector< vector<int> > a; scanf("%d %d %d", &an, &bn, &r); a.resize(10000); for (int i = 0; i < a.size(); i++){ a[i].resize(313);...
a.cc: In function 'int main()': a.cc:36:21: error: no matching function for call to 'fill(<unresolved overloaded function type>, <unresolved overloaded function type>, int)' 36 | fill(a.begin, a.end,0); | ~~~~^~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51...
s468703293
p00609
C++
#include <stdio.h> #include <iostream> #include <vector> #define or0(a) (a)<0?0:(a) using namespace std; int main(){ int an, bn, r, ans = 0, d, b0, b1; vector< vector<int> > a; scanf("%d %d %d", &an, &bn, &r); a.resize(10000); for (int i = 0; i < a.size(); i++){ a[i].resize(313); } while (an){ d = 16 * r * ...
In file included from /usr/include/c++/14/string:51, 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...
s493893076
p00609
C++
a
a.cc:1:1: error: 'a' does not name a type 1 | a | ^
s168994886
p00609
C++
g#include <bits/stdc++.h> using namespace std; #define whole(xs) (xs).begin(),(xs).end() template<class T> ostream& operator<<(ostream& os, const vector<T>& vs) { if (vs.empty()) return os << "[]"; os << "[" << vs[0]; for (int i = 1; i < vs.size(); i++) os << " " << vs[i]; return os << "]"; } typed...
a.cc:1:2: error: stray '#' in program 1 | g#include <bits/stdc++.h> | ^ a.cc:1:1: error: 'g' does not name a type 1 | g#include <bits/stdc++.h> | ^ a.cc:8:1: error: 'ostream' does not name a type 8 | ostream& operator<<(ostream& os, const vector<T>& vs) { | ^~~~~~~ a.cc:40:5: error: 'shar...
s374922410
p00609
C++
#include<iostream> #include<algorithm> #include<vector> using namespace std; #pragma warning(disable:4996) int n, m, r, x[100000], y[100000]; vector<int>dp[11000]; int main() { while (true) { cin >> n >> m >> r; if (n == 0)break; for (int i = 0; i < 11000; i++)dp[i].clear(); for (int i = 0; i < n; i++)cin >> x[i...
a.cc: In function 'int main()': a.cc:21:41: error: 'sqrt' was not declared in this scope 21 | int L = sqrt(r*r*16 - j*j); | ^~~~