submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s352230424
p00489
C++
using System; using System.Linq; class aoj { static void Main() { int a = int.Parse(Console.ReadLine()); int[] b = new int[a]; for (int i = 0; i < a*(a-1)/2; i++) { int[] c = Console.ReadLine().Split(' ').Select(int.Parse).ToArray(); if (c[2] < c[3]) ...
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:2:7: error: expected nested-name-specifier before 'System' 2 | using System.Linq; | ^~~~~~ a.cc:49:2: error: expected ';' after class definition 49 | } | ^ | ; a.cc: In static...
s459562010
p00489
C++
#include<stdio.h> int main() { int i,j,A,B,a,b,m,n,max,min,r; int st1[100]; scanf("%d",&n); r=n*(n-1)/2; for(i=0;i<r;i++){ scanf("%d %d %d %d",&a,&b,&c,&d); if(c>d){ str[a]+=3; str[b]+=0; } else if(d<c){ str[b]+=3; str[a]+=0; } else{ str[a]+=1; str[b]+=1; } } for(i=0...
a.cc: In function 'int main()': a.cc:9:44: error: 'c' was not declared in this scope 9 | scanf("%d %d %d %d",&a,&b,&c,&d); | ^ a.cc:9:47: error: 'd' was not declared in this scope 9 | scanf("%d %d %d %d",&a,&b,&c,&d); | ...
s550544138
p00489
C++
#include<iostream> using namespace std; struct S{ int a; int b; bool operator > (const S& s)const { if(a < s.a){ return true; } return false; } bool operator > (const S& s)const { if(a > s.a){ return true; } return false; } }; #include<aigorithm> int main() { S st[101]={}; int A,B,C,D,i,n; ...
a.cc:21:9: fatal error: aigorithm: No such file or directory 21 | #include<aigorithm> | ^~~~~~~~~~~ compilation terminated.
s542509593
p00489
C++
#include<iostream> using namespace std; struct S{ int a; int b; bool operator > (const S& s)const { if(a < s.a){ return true; } return false; } bool operator > (const S& s)const { if(a > s.a){ return true; } return false; } }; #include<aigorithm> int main() { S st[101]={}; int A,B,C,D,i,n; ...
a.cc:21:9: fatal error: aigorithm: No such file or directory 21 | #include<aigorithm> | ^~~~~~~~~~~ compilation terminated.
s402742274
p00489
C++
#include<iostream> using namespace std; struct S{ int a; int b; bool operator > (const S& s)const { if(a < s.a){ return true; } return false; } bool operator > (const S& s)const { if(a > s.a){ return true; } return false; } }; #include<aigorithm> int main() { S st[101]={}; int A,B,C,D,i,n; ...
a.cc:21:9: fatal error: aigorithm: No such file or directory 21 | #include<aigorithm> | ^~~~~~~~~~~ compilation terminated.
s620724925
p00489
C++
#include<iostream> using namespace std; #include<aigorithm> int main() { int sta[101]={},stb[101]={}; int A,B,C,D,i,n,m,j; cin>>n; for(i=1;i<=n;i++){ sta[i]=i; } m=n*(n-1)/2; for(i=0;i<m;i++){ cin>>A>>B>>C>>D; if(C>D){ stb[A]+=3; } else if(C<D){ stb[B]+=3; } else{ stb[B]++; stb[A]++; ...
a.cc:3:9: fatal error: aigorithm: No such file or directory 3 | #include<aigorithm> | ^~~~~~~~~~~ compilation terminated.
s963423959
p00489
C++
#include<iostream> using namespace std; #include<algorithm> int main() { int sta[101]={},stb[101]={}; int A,B,C,D,i,n,m,j; cin>>n; for(i=1;i<=n;i++){ sta[i]=i; } m=n*(n-1)/2; for(i=0;i<m;i++){ cin>>A>>B>>C>>D; if(C>D){ stb[A]+=3; } else if(C<D){ stb[B]+=3; } else{ stb[B]++; stb[A]++; ...
a.cc: In function 'int main()': a.cc:43:18: error: expected '}' at end of input 43 | return 0; | ^ a.cc:5:1: note: to match this '{' 5 | { | ^
s383453237
p00489
C++
#include <stdio.h> int main(){ int n,team[100]={0},num[100],rank[100],ta,tb,sa,sb,i,j; int blank; scanf("%d",&n); for(i = 0; i < (n*n-n)/2; i++){ scanf("%d %d %d %d",&ta,&tb,&sa,&sb); if(sa > sb) team[ta-1] += 3; else if(sa < sb) team[tb-1] += 3; else{ team[ta-1]++; team[tb-...
a.cc: In function 'int main()': a.cc:68:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 68 | int main(){ | ^~ a.cc:68:9: note: remove parentheses to default-initialize a variable 68 | int main(){ | ^~ | -- a.cc:68:9: note: or re...
s120780943
p00489
C++
#include<bits/stdc++.h> using namespace std; int sc[110],index[110],rank[110]; int main(){ int N; cin>>N; for(int i=0;i<N*(N-1)/2;++i){ int a,b,c,d; cin>>a>>b>>c>>d; if(c>d) sc[a-1]+=3; else if(c<d) sc[b-1]+=3; else{ sc[a-1]++; sc[b-1]++; } } for(int i=0;i<N;++i) index[i]=i...
a.cc:3:22: error: 'int index [110]' redeclared as different kind of entity 3 | int sc[110],index[110],rank[110]; | ^ In file included from /usr/include/string.h:462, from /usr/include/c++/14/cstring:43, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc+...
s388679151
p00489
C++
#include<iostream> using namespace std; int main(){ int n,a,b,c,d; cin >> n; int A[n]; int B[n]; //n番目のチームの勝ち点 for (int i=0; i<n; i++){ A[i] = 0; B[i] = 0; } for(int i=0; i<n*(n-1)/2; i++){ cin >> a >> b >> c >> d; if( c > d ){ A[a] += 3; B[a] += 3; } if( c < d ){ A[b] += 3; B[b] ...
a.cc: In function 'int main()': a.cc:35:11: error: request for member 'sort' in 'A', which is of non-class type 'int [n]' 35 | A.sort(); | ^~~~ a.cc:36:11: error: request for member 'reverse' in 'A', which is of non-class type 'int [n]' 36 | A.reverse(); | ^~~~~~~
s591546395
p00489
C++
#include<iostream> using namespace std; int main(){ int n,a,b,c,d; cin >> n; int A[n]; int B[n]; //n番目のチームの勝ち点 for (int i=0; i<n; i++){ A[i] = 0; B[i] = 0; } for(int i=0; i<n*(n-1)/2; i++){ cin >> a >> b >> c >> d; if( c > d ){ A[a] += 3; B[a] += 3; } if( c < d ){ A[b] += 3; B[b] ...
a.cc: In function 'int main()': a.cc:35:16: error: request for member 'begin' in 'A', which is of non-class type 'int [n]' 35 | sort(A.begin(),A.end()); | ^~~~~ a.cc:35:26: error: request for member 'end' in 'A', which is of non-class type 'int [n]' 35 | sort(A.begin(),A.end()...
s819870388
p00489
C++
#include <stdio.h> #include <algorithm> #include <utility> using namespace std; typedef pair<int,int> pi; #define F first #define S second const int N=1e2+10; int main(){ int n,a,b,c,d,tot; pi val[N]; scanf("%d",&n); for(int i=1;i<=n;i++)val[i]={0,i}; tot=(n*(n-1))/2 while(tot--){ scanf(...
a.cc: In function 'int main()': a.cc:14:20: error: expected ';' before 'while' 14 | tot=(n*(n-1))/2 | ^ | ; 15 | while(tot--){ | ~~~~~
s432224532
p00489
C++
#include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <ctime> #include <cassert> #include <iostream> #include <sstream> #include <string> #include <list> #include <vector> #include <queue> #include <set> #include <map> #include <utility> #include <numeric> #include <algorithm> #include <bits...
a.cc:63:1: error: 'clone' does not name a type 63 | clone edit download c | ^~~~~
s857383211
p00489
C++
#include <iostream> #include <cstdio> #include <algorithm> using namespace std; bool flag[10000000]; int main(void) { int N; int T1, T2, P1, P2; int cnt[100]={0}; int R = 0; int j = 0; while(cin >> N) { memset(cnt, 0, sizeof(cnt)); for(int i = 0 ; i < N*(N-1)/2 ; i++) { cin >> T1 >> T2 >> P1 >...
a.cc: In function 'int main()': a.cc:13:5: error: 'memset' was not declared in this scope 13 | memset(cnt, 0, sizeof(cnt)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <algorithm> +++ |+#include <cstring>...
s100956895
p00489
C++
#include <stdio.h> int main(){ int n,i,j; scanf("%d",&n); j = n*(n-1); int team[100],score[100],a,b,c,d,e; for(i=0;i<j/2;i++){ scanf("%d%d%d%d",&a,&b,&c,&d); if(c>d){ team[a] += 3; }else if(c<d){ team[b] += 3; }else{ ...
a.cc: In function 'int main()': a.cc:19:30: error: expected ';' before '}' token 19 | score[e] = team[e] | ^ | ; 20 | } | ~ a.cc:41:21: error: 'f' was not declared in this scope 41 | ...
s996144027
p00489
C++
#include<iostream> using namespace std; int main(){ int tmp,n,bell,t1,t2,po1,po2,team[110]={0}; cin >> n; bell=n; bell*=n-1; bell/=2; for(int i=0;i<bell;i++){ cin >> t1 >> t2 >> po1 >> po2; if(po1>po2){ team[t1]+=3; } else if(po2>po1){ team[t2]+=3; } else{ team[t1]+...
a.cc: In function 'int main()': a.cc:59:20: error: expected ';' before 'LANK' 59 | lank[i][0]=LANK | ^ | ; 60 | LANK+=tame; | ~~~~
s604114759
p00489
C++
#include<cstdio> #include <iostream> #include <string> #include<algorithm> #include <map> #pragma warning(disable:4786) // VisualC++6.0の警告対策 using namespace std; #define ll long long #define SINT(n) scanf("%d",&n); #define SINT2(n,m) scanf("%d %d",&n,&m); #define SINT3(n,m,o) scanf("%d %d %d",&n,&m,&o); #define SI...
a.cc: In function 'int main()': a.cc:56:9: error: 'memset' was not declared in this scope 56 | memset(t,sizeof(t),0); | ^~~~~~ a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 5 | #include <map> +++ |+#include <cstring> ...
s210003965
p00489
C++
#include<cstdio> #include <iostream> #include <string> #include<algorithm> #include <map> #pragma warning(disable:4786) // VisualC++6.0の警告対策 using namespace std; #define ll long long #define SINT(n) scanf("%d",&n); #define SINT2(n,m) scanf("%d %d",&n,&m); #define SINT3(n,m,o) scanf("%d %d %d",&n,&m,&o); #define SI...
a.cc: In function 'int main()': a.cc:56:14: error: 'memset' is not a member of 'std'; did you mean 'wmemset'? 56 | std::memset(t,sizeof(t),0); | ^~~~~~ | wmemset
s877430920
p00489
C++
#include<cstdio> #include <iostream> #include <string> #include<algorithm> #include <map> #pragma warning(disable:4786) // VisualC++6.0の警告対策 using namespace std; #define ll long long #define SINT(n) scanf("%d",&n); #define SINT2(n,m) scanf("%d %d",&n,&m); #define SINT3(n,m,o) scanf("%d %d %d",&n,&m,&o); #define SI...
a.cc: In function 'int main()': a.cc:46:22: error: 'memset' was not declared in this scope 46 | #define FILL_ZERO(a) memset(a,0,sizeof(a)); | ^~~~~~ a.cc:60:9: note: in expansion of macro 'FILL_ZERO' 60 | FILL_ZERO(t); | ^~~~~~~~~ a.cc:6:1: note: 'memset' is define...
s728627189
p00490
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int a = in.nextInt(); int b = in.nextInt(); int c = in.nextInt(); int d[] = new int[100]; int e; for(int i = 0; i < n; i++){ d[i] = in.nextInt(); } ...
Main.java:33: error: class, interface, enum, or record expected }} ^ 1 error
s156623031
p00490
Java
package kadai_2; import java.util.*; public class BestPizza { public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc = new Scanner(System.in); int k = sc.nextInt(); int A = sc.nextInt(); int B = sc.nextInt(); int C = sc.nextInt(); int[] D = new int[k]; int x = 0; int...
Main.java:5: error: class BestPizza is public, should be declared in a file named BestPizza.java public class BestPizza { ^ 1 error
s344965269
p00490
Java
import java.util.*; public class Main2{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int[] aa = new int[10000]; int res = 0,sum = 0; int n,a,b,c; n = sc.nextInt(); a = sc.nextInt(); b = sc.nextInt(); c = sc.nextInt(); for(int i=0; i<n; i++){ aa[i] = sc.nextInt(); }...
Main.java:3: error: class Main2 is public, should be declared in a file named Main2.java public class Main2{ ^ 1 error
s950416799
p00490
Java
package SD; import java.util.Scanner; public class aoj0567 { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc=new Scanner(System.in); int toppingtype= sc.nextInt(); int doughprice= sc.nextInt(); int toppingprice= sc.nextInt(); int doughcaroly...
Main.java:3: error: class aoj0567 is public, should be declared in a file named aoj0567.java public class aoj0567 { ^ 1 error
s759140092
p00490
Java
package SD; import java.util.Scanner; public class aoj0567 { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc=new Scanner(System.in); int toppingtype= sc.nextInt(); int doughprice= sc.nextInt(); int toppingprice= sc.nextInt(); int doughcaroly...
Main.java:3: error: class aoj0567 is public, should be declared in a file named aoj0567.java public class aoj0567 { ^ 1 error
s960956508
p00490
Java
import java.util.*; public class Mian { public static void main(String[] args) { Scanner sc = new Scanner (System.in); int n = sc.nextInt(); int [] array = new int[n]; int max = 0, soeji = 0, j, kijyun,hikaku = 0, x = 0; int daikin = 0; int kijikakaku = sc.nextInt(); int sabukakaku = sc.nextInt(); int...
Main.java:2: error: class Mian is public, should be declared in a file named Mian.java public class Mian { ^ 1 error
s781824339
p00490
Java
import java.util.Scanner; public class aoj0567 { public static void main(String[] args){ Scanner in = new Scanner(System.in); int N = in.nextInt(); int D = in.nextInt(); int D2 = in.nextInt(); int A = in.nextInt(); int[]B = new int [N+1]; for(int i = 0;i < N;i++){ B[i] = in.nextInt(); } int max =...
Main.java:3: error: class aoj0567 is public, should be declared in a file named aoj0567.java public class aoj0567 { ^ 1 error
s766482040
p00490
Java
hh
Main.java:1: error: reached end of file while parsing hh ^ 1 error
s923596659
p00490
C
#include<stdio.h> int main(){ int n,a,b,c,d[100]; int i,maxi; double max,cal[100],tmp; scanf("%d%d%d%d",&n,&a,&b,&c); for(i=0;i<n;i++){ scanf("%d",&d[i]); cal[i]=(double)d[i]/(double)b; } for(i=0;i<n;i++)printf("%f\n",cal[i]); tmp=(double)c/(double)a; printf("%0.0...
main.c: In function 'main': main.c:31:5: error: conflicting types for 'd'; have 'int' 31 | int d=tmp; | ^ main.c:4:17: note: previous declaration of 'd' with type 'int[100]' 4 | int n,a,b,c,d[100]; | ^
s032440000
p00490
C
#include<stdio.h> int main(){ int n,a,b,c,d[100]; int i,maxi; double max,cal[100],tmp; scanf("%d%d%d%d",&n,&a,&b,&c); for(i=0;i<n;i++){ scanf("%d",&d[i]); cal[i]=(double)d[i]/(double)b; } tmp=(double)c/(double)a; int j=1; while(++j){ for(maxi=-1,max=tmp,i=...
main.c: In function 'main': main.c:28:28: error: expected ')' before ';' token 28 | printf("%.0f\n",tmp-0.5; | ~ ^ | ) main.c:29:14: error: expected ';' before '}' token 29 | return 0; | ^ | ; 30 | } ...
s834534586
p00490
C
#include<stdio.h> int main(void) { int box,n,t[101]={0},y=0,a,b,cnt2,cnt; scanf("%d %d %d %d",&n,&a,&b,&t[0]); for(cnt=1;cnt<=n;cnt++){ scanf("%d",&t[cnt]); } for(cnt=1;cnt<=n;cnt++){ for(cnt2=1;cnt2<=n;cnt2++){ if(t[cnt2]<t[cnt+1]){ box=t[cnt2]; t[cnt2]=t[cnt2+1]; t[cnt2+1]=box; } } } cn...
main.c: In function 'main': main.c:22:20: error: 'max' undeclared (first use in this function) 22 | if(max<(y+t[0])/(a+cnt2*b)){ | ^~~ main.c:22:20: note: each undeclared identifier is reported only once for each function it appears in
s278565771
p00490
C
#include<stdio.h> int main(void) { int box,n,t[101]={0},y=0,a,b,cnt2,cnt; scanf("%d %d %d %d",&n,&a,&b,&t[0]); for(cnt=1;cnt<=n;cnt++){ scanf("%d",&t[cnt]); } for(cnt=1;cnt<=n;cnt++){ for(cnt2=1;cnt2<=n;cnt2++){ if(t[cnt2]<t[cnt+1]){ box=t[cnt2]; t[cnt2]=t[cnt2+1]; t[cnt2+1]=box; } } } cn...
main.c: In function 'main': main.c:23:20: error: 'max' undeclared (first use in this function) 23 | if(max<y/(a+cnt2*b)){ | ^~~ main.c:23:20: note: each undeclared identifier is reported only once for each function it appears in
s230304225
p00490
C
#include <stdio.h> int main() { int n, kp, tp, kc, tc[101]; int dc[101]; scanf("%d%d%d%d", &n,&kp,&tp,&kc); int ,sumc=kc,sump=kp,i,j,temp; for (i = 0;i < n;i++) { scanf("%d", &tc[i]); } for (i = 0;i < n;i++) { for (j = n - 1;j > i;j--) { if (tc[j - i] < tc[j]) tmp = tc[j]; tc[j] = tc[j - 1]; tc...
main.c: In function 'main': main.c:8:13: error: expected identifier or '(' before ',' token 8 | int ,sumc=kc,sump=kp,i,j,temp; | ^ main.c:9:14: error: 'i' undeclared (first use in this function) 9 | for (i = 0;i < n;i++) { | ^ main.c:9:14: note: each undeclar...
s722395721
p00490
C
#include <stdio.h> int main() { int n, kp, tp, kc, tc[101]; int dc[101]; scanf("%d%d%d%d", &n,&kp,&tp,&kc); int sumc=kc,sump=kp,i,j,temp; for (i = 0;i < n;i++) { scanf("%d", &tc[i]); } for (i = 0;i < n;i++) { for (j = n - 1;j > i;j--) { if (tc[j - i] < tc[j]) tmp = tc[j]; tc[j] = tc[j - 1]; tc[...
main.c: In function 'main': main.c:15:33: error: 'tmp' undeclared (first use in this function); did you mean 'temp'? 15 | tmp = tc[j]; | ^~~ | temp main.c:15:33: note: each undeclared identifier is reported on...
s219344127
p00490
C
include <stdio.h> int main() { int n, kp, tp, kc, tc[101]; int dc[101]; scanf("%d%d%d%d", &n,&kp,&tp,&kc); int sumc=kc,sump=kp,i,j,tmp; for (i = 0;i < n;i++) { scanf("%d", &tc[i]); } for (i = 0;i < n;i++) { for (j = n - 1;j > i;j--) { if (tc[j - i] < tc[j]) tmp = tc[j]; tc[j] = tc[j - 1]; tc[j ...
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include <stdio.h> | ^
s301716720
p00490
C
#include <stdio.h> #include <stdlib.h> void bubble_sort(int *x, int n) { int i, j, temp; for (i = 0; i < n - 1; i++) { for (j = n - 1; j > i; j--) { if (x[j - 1] < x[j]) { temp = x[j]; x[j] = x[j - 1]; x[j - 1]= temp; } } ...
main.c: In function 'main': main.c:45:23: error: implicit declaration of function 'max' [-Wimplicit-function-declaration] 45 | ans = max(ans, sum / (a + b * i)); | ^~~
s743893812
p00490
C
//情報オリンピック2011予選3「最高のピザ」 #include<stdio.h> int main(void) { int n, a, b, c, *ml, f1, f2, goukei, temp, max; scanf("%d",&n); scanf("%d %d",&a, &b); ml = new int [n]; scanf("%d",&c); for(f1 = 0; f1 < n; f1++) scanf("%d",&ml[f1]); //トッピング降順に並べ替え for(f1 = 0; f1 < n-1; f1++){ for(f2 = f1+1; f2 < n; f...
main.c: In function 'main': main.c:12:14: error: 'new' undeclared (first use in this function) 12 | ml = new int [n]; | ^~~ main.c:12:14: note: each undeclared identifier is reported only once for each function it appears in main.c:12:17: error: expected ';' before 'int' 12 | ml...
s971344577
p00490
C
#include <stdio.h> #include <algorithm> using namespace std; int main(){ int N,A,B,C,array[100],i,result = 0,kari; scanf("%d",&N); scanf("%d %d",&A,&B); scanf("%d",&C); for(i = 0;i < N;i++) scanf("%d",&array[i]); sort(array,array + N); reverse(array,array + N); for(i = 0;i < N;i++){ kari = C / (A + B * i); ...
main.c:2:10: fatal error: algorithm: No such file or directory 2 | #include <algorithm> | ^~~~~~~~~~~ compilation terminated.
s221255651
p00490
C++
#include<iostream> using namespace std; int main(){ int k,n,m,p,dat[15000],cnt; double ans=0; cin>>k>>n>>m>>p; for(int i=0;i<k;i++){ cin>>dat[i]; } sort(dat,dat+n,greater<int>()); ans=p/n; for(int i=0;i<k;i++){ cnt+=dat[i]; if((cnt+p)/(n+(i+1)*m)>ans){ ans=(cnt+p)/(n+(i+1)*m); } else{ break; }...
a.cc: In function 'int main()': a.cc:10:9: error: 'sort' was not declared in this scope; did you mean 'short'? 10 | sort(dat,dat+n,greater<int>()); | ^~~~ | short
s056304363
p00490
C++
#include<iostream> #include<algorithm> using namespace std; int func(int dt[],int num){ unsigned long long int c=num; unsigned long long int time=0; for(int i=0;i<c-1;i++){ time+=(c-(i+1))*dt[i]; } return time; } int main(){ int n; while(1){ cin>>n; if(n==0)break; unsigned long long int cost[n]; unsi...
a.cc: In function 'int main()': a.cc:25:26: error: cannot convert 'long long unsigned int*' to 'int*' 25 | ans=func(cost,n); | ^~~~ | | | long long unsigned int* a.cc:5:14: note: initializing argument 1 of ...
s318936777
p00490
C++
#include<bits/stdc++.h> using namespace std; int n,a,b,c,x[100],d,p; main(){ p=0; cin>>n; cin>>a>>b; cin>>c; for(int i=0;i<n;i++){ cin>>x[i]; } d=0; sort(x,x+n); p=c/a; for(int i=0;i<n;i++){ c += b; a += x[i]; p=max(p,k/m); } cout<<p<<endl...
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 4 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:18:17: error: 'k' was not declared in this scope 18 | p=max(p,k/m); | ^ a.cc:18:19: error: 'm' was not declared in this scope 18 | ...
s296290763
p00490
C++
<a href="http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0567">??????</a> #???????????? ?????¶??????????????????????????¶????????¶ #?§£??? ?????????????????§?¬??????§?§£??????????????????????????????????????°??????????????????????????????????????§???????????????????????°????????????????????§??????????????????...
a.cc:1:77: warning: trigraph ??< ignored, use -trigraphs to enable [-Wtrigraphs] 1 | <a href="http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0567">??????</a> a.cc:2:2: error: invalid preprocessing directive #? 2 | #???????????? | ^ a.cc:3:6: error: extended character ¶ is not valid in an identi...
s926990976
p00490
C++
\#include <cstdio> #include <vector> #include <algorithm> using namespace std; int n; int a, b; int c; vector<int> d; int main(){ scanf("%d %d %d %d", &n, &a, &b, &c); for(int i=0; i<n; i++){ int t; scanf("%d", &t); d.push_back(t); } sort(d.rbegin(), d.rend()); printf("%d %d %d %d\n", n, a, b, c); for(in...
a.cc:1:1: error: stray '\' in program 1 | \#include <cstdio> | ^ a.cc:1:2: error: stray '#' in program 1 | \#include <cstdio> | ^ a.cc:1:3: error: 'include' does not name a type 1 | \#include <cstdio> | ^~~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, ...
s793219195
p00490
C++
#include<stdio.h> int main(void) { int n,a,b,c; int cal[10000]={0}; int i,j; int x,z; int rui=0,masa = 0; scanf("%d%d%d%d",&n,&a,&b,&c); for(i = 0;i < n; i++) scanf("%d",&cal[i]); for(i = 0;i < n; i++){ for(j = 0;j < n; j++){ if(cal[i] > cal[j]){ x...
a.cc: In function 'int main()': a.cc:26:9: error: 'amsa' was not declared in this scope; did you mean 'masa'? 26 | amsa = z / ((b*i)+a); | ^~~~ | masa
s790435533
p00490
C++
/** * pizza.cpp * Authorl: Tatsuro Ide * Date: 2/7/2017 * Desc: Competitive Programming AOJ0567 */ #include <iostream> #include <vector> #include <algorithm> #include <functional> using namespace std; int main() { int number_of_toppings, crust_price, topping_price, crust_calories; vector<int> topping_calories...
a.cc: In function 'int main()': a.cc:44:32: error: no match for 'operator+=' (operand types are 'int' and 'std::vector<int>') 44 | total_calories += topping_calories; | ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
s715993291
p00490
C++
#include <iostream> #include <vector> #include <stack> using namespace std; struct Node { int no_; int calorie_; int price_; Node(int n, int c, int p) : no_(n), calorie_(c), price_(p) {} }; int N, A, B, C; vector<int> calorie; int calcBestPizza() { int ans = 0; stack<Node> st; ...
a.cc: In function 'int main(int, const char**)': a.cc:59:5: error: 'sort' was not declared in this scope; did you mean 'short'? 59 | sort(calorie.begin(), calorie.end(), greater<int>()); | ^~~~ | short
s230270435
p00490
C++
#include <iostream> #include <vector> #include <stack> using namespace std; struct Node { int no_; int calorie_; int price_; Node(int n, int c, int p) : no_(n), calorie_(c), price_(p) {} }; int N, A, B, C; vector<int> calorie; int calcBestPizza() { int ans = 0; stack<Node> st; ...
a.cc: In function 'int main(int, const char**)': a.cc:59:5: error: 'sort' was not declared in this scope; did you mean 'short'? 59 | sort(calorie.begin(), calorie.end(), greater<int>()); | ^~~~ | short
s580079731
p00490
C++
#include <iostream> #include <vector> #include <iostream> using namespace std; int main(){ int n; while(cin >> n){ int a,b, k_a; vector<int> v(n); cin >> a >> b; cin >> k_a; for(int i=0;i<n;i++) cin >> v[i]; sort(v.begin(),v.end()); int ans = k_a / a, sum = 0; for(int i=1;i<=n;i++...
a.cc: In function 'int main()': a.cc:15:5: error: 'sort' was not declared in this scope; did you mean 'short'? 15 | sort(v.begin(),v.end()); | ^~~~ | short
s357415553
p00490
C++
#include<iostream> #include<algorithm> using namespace std; const int MAX_B = 1001; typedef struct{ int price; int cal; }Top; int numtop,price; int maxave = 0; Top base; int item[MAX_B]; void solve(int num,Top T){ if(T.cal/T.price > maxave) maxave = T.cal/T.price; for(int i = num+1; i <= numtop; i++){ ...
a.cc: In function 'void solve(int, Top)': a.cc:27:11: error: 'now' was not declared in this scope 27 | cout << now.cal << " " << now.price << endl; | ^~~
s234675784
p00490
C++
#include <iostream> #include <fstream> using namespace std; int a, b, c, d[100], n; //iツ氾板姪堋づ個トツッツピツδ督グツづーツ使ツつ、(f=true)/ツ使ツづュツづ按つ「(f=false)ツづつォ1ツドツδ仰督鳴つスツづィツづ個カツδ債δ環ーツ青板づーツ陛板つキ(kツづ債つサツづェツづ慊づづ個カツδ債δ環ーツづ個和,mツづ債つサツづェツづ慊づづ個値ツ段ツづ個和) double dfs(int i, int m, int k, bool f) { if (i == n-1) { if (f) return ((double)k+(d...
a.cc: In function 'int main()': a.cc:23:22: error: 'argv' was not declared in this scope 23 | ifstream cin(argv[1]); | ^~~~
s780154738
p00490
C++
#include <iostream> #include <queue> #include <vector> #include<algorithm> using namespace std; int maxn; int kv,tv; int kc; vector<int> tc; int dp[101][101]; int main(void) { cin >> maxn; cin >> kv >> tv; cin >> kc; for(int i=0;i<maxn;++i){ int a; cin >> a; tc.push_back(a); } memset(dp,-1,sizeof(dp)); dp...
a.cc: In function 'int main()': a.cc:23:9: error: 'memset' was not declared in this scope 23 | memset(dp,-1,sizeof(dp)); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include<algorithm> +++ |+#include <cstr...
s213896780
p00490
C++
#include <cstdio> #include <algorithm> #include <vector> using namespace std; int n,a,b,c,p;//pはピザの値段/カロリー vector<int> cal; int main(){ scanf("%d",&n); scanf("%d %d",&a,&b); scanf("%d",&c); for(int j=0;j<n;j++) scanf("%d",&cal[j]); sort( cal.begin(), cal.end() ); float max=c/a; //値段当たりのカロリー for(int k=0;k<n;...
a.cc: In function 'int main()': a.cc:24:21: error: 'floor' was not declared in this scope 24 | double bp = floor(max); | ^~~~~
s349790592
p00490
C++
#include "iostream" int main(){ int n; int primes[2]; int pizaKarori; int toppings[100]; int masterK; int masterP; cin >> n; cin >> primes[0] ; cin >> primes[1] ; cin >> pizaKarori; masterK=pizaKarori; masterP=primes[0]; for(int i=0;i<n;i++){ cin >> toppings[i]; } for(int j=0;j<n;j++)...
a.cc: In function 'int main()': a.cc:10:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 10 | 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; ///< Linked to st...
s968784076
p00490
C++
#include<iostream> #include<vector> #include<algorithm> using namespace std; int f(int x,int y){ if(x<y)return false; return true; } int main(){ int n,a,b,c,d,ans[3]; vector<int> vi; scanf("%d%d%d%d",&n,&a,&b,&c); for(int i=0;i<n;i++){ scanf("%d",&d); vi.push_back(d); } sort(vi.begin(),vi.end(),f); ans[0...
a.cc: In function 'int main()': a.cc:21:20: error: invalid types 'int[int]' for array subscript 21 | ans[1]=(c+d[0])/(a+b); | ^ a.cc:22:20: error: invalid types 'int[int]' for array subscript 22 | ans[2]=(c+d[0]+d[1])/(a+b+b); | ^ a.cc:22:25: error...
s314953737
p00490
C++
#include<algorithm> #include<functional> using namespace std; int main() { int i, n, a, b, c, d[10000],g,max; scanf("%d", &n); scanf("%d %d", &a, &b); scanf("%d", &c); for (i = 0; i < n; i++){ scanf("%d", &d[i]); } sort(d, d + n, greater<int>()); max = c / a; for (i = 1; i <= n; i++){ g = 0; for (int i2 ...
a.cc: In function 'int main()': a.cc:7:9: error: 'scanf' was not declared in this scope 7 | scanf("%d", &n); | ^~~~~ a.cc:25:9: error: 'printf' was not declared in this scope 25 | printf("%d\n", max); | ^~~~~~ a.cc:3:1: note: 'printf' is defined in header '<cstdio>'; t...
s148229625
p00490
C++
/* title: Best Pizza * source: JOI2011-2012 Yosen No.3 * hint: * トッピングをx個使用すると仮定した場合、 * そのx個はカロリーが大きい方からx個選んだものが最適になる */ #include <iostream> #include <numeric> // accumulateを使うため #include <vector> using namespace std; int main() { int N, A, B, C; cin >> N >> A >> B >> C; vector<int> toppings(N); for(int ...
a.cc: In function 'int main()': a.cc:24:9: error: 'sort' was not declared in this scope; did you mean 'short'? 24 | sort(toppings.begin(), toppings.end(), greater<int>()); | ^~~~ | short
s551625541
p00491
Java
public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N=sc.nextInt(); int K=sc.nextInt(); int[][] curr =new int[3][2]; int[][] next =new int[3][2]; for(int i=0; i<3; i++) curr[i][0]=1; int[] dayPlan=new int[N]; for(int i=0; i<K; i++) da...
Main.java:5: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:5: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s132033250
p00491
Java
import java.util.*; public class AOJ0568 { static int cnt=0; static int n; static int bfs(int a,int b,int day){ int cnt=0; if(day==n+1){//もしたどり着けたら1を返す。 return 1; } if(m[day][a][b]>-1)return m[day][a][b];//メモしていたらそれを返す。 if(hyou[day]>0){//指定してある場合 if(hyou[day]==a&&a==b){//全部一緒だったら0を返す。 return 0; ...
Main.java:2: error: class AOJ0568 is public, should be declared in a file named AOJ0568.java public class AOJ0568 { ^ 1 error
s524194492
p00491
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { int N,K; Scanner sc = new Scanner(System.in); N=sc.nextInt();//何日間の予定を考えるか K=sc.nextInt();//何日間の予定が決まっているか int pasta[][]=new int[6][N+1]; int pastaplan[]=new int[N+1]; for(int i=0;i<K;i++){ int day=sc.nextInt();//...
Main.java:46: error: reached end of file while parsing } ^ 1 error
s482994828
p00491
Java
import java.util.Scanner; public class AOJ0568 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(),K = sc.nextInt(); long[][] NK = new long[N][6]; int[] dp = new int[N]; for(int i = 0; i < N; i++) dp[i] = 0; for(int i = 0; i < K; i++){ int scan = sc....
Main.java:3: error: class AOJ0568 is public, should be declared in a file named AOJ0568.java public class AOJ0568 { ^ 1 error
s642901150
p00491
Java
import java.util.Scanner; public class aoj0568 { public static void main(String[] args){ Scanner in = new Scanner(System.in); int allday = in.nextInt(); int pasta = in.nextInt(); int sum = 0; int[][]A = new int [3][2]; int[]B = new int [3]; int[]C = new int [allday+1]; for(int i = 1;i <= allday;i++)C[...
Main.java:3: error: class aoj0568 is public, should be declared in a file named aoj0568.java public class aoj0568 { ^ 1 error
s857272694
p00491
C
#include<cstdio> #include<algorithm> #include<iostream> #include<functional> using namespace std; long long int dp[101][4][4]; int main(void) { int i,j,k,n,m,a,b[101],c; long long int sum,x; cin>>n>>m; for(i=1;i<=n;i++){ for(j=1;j<=3;j++){ for(k=0;k<=3;k++) dp[i][j][k]=0; } } for(i=1;i<=n;i++) b[i]=0; for...
main.c:1:9: fatal error: cstdio: No such file or directory 1 | #include<cstdio> | ^~~~~~~~ compilation terminated.
s760018782
p00491
C
#include<cstdio> #include<algorithm> #include<iostream> #include<functional> using namespace std; long long int dp[101][4][4]; int main(void) { int i,j,k,l,n,m,a,b[101],c; long long int sum,x; cin>>n>>m; for(i=1;i<=n;i++){ for(j=1;j<=3;j++){ for(k=0;k<=3;k++) dp[i][j][k]=0; } } for(i=1;i<=n;i++) b[i]=0; f...
main.c:1:9: fatal error: cstdio: No such file or directory 1 | #include<cstdio> | ^~~~~~~~ compilation terminated.
s196817090
p00491
C
#include<stdio.h> int main(void) { int
main.c: In function 'main': main.c:4:1: error: expected identifier or '(' at end of input 4 | int | ^~~ main.c:4:1: error: expected declaration or statement at end of input
s044036780
p00491
C
oppppppp
main.c:1:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input 1 | oppppppp | ^~~~~~~~
s233357472
p00491
C
#include<stdio.h> int main(void) { int a,b,i,j,k,n,m,f[810]={0},d[114][514]={0} scanf("%d %d",&n,&m); for(i=0;i<m;i++){ scanf("%d %d",&a,&b); f[a]=b; } for(i=0;i<9;i++){ d[i][2]=1; if(f[1] && f[1]-i%3-1){ d[i][2]=0; } if(f[2] && f[2]-i/3-1){ d[i][2]=0; } for(i=3;i<n;i++){ for(j=0;j<9;j++){ if(f[i] && f[i]-1-j/3){ for(k...
main.c: In function 'main': main.c:5:1: error: expected ',' or ';' before 'scanf' 5 | scanf("%d %d",&n,&m); | ^~~~~ main.c:23:19: error: lvalue required as left operand of assignment 23 | d[j][i]+=d[k+(j%3)=3][i-1]; | ^ main.c:31:1: error: implicit declaration of function 'prinff'; ...
s338025895
p00491
C
#include<stdio.h> int main(void) { int a,b,i,j,k,n,m,f[810]={0},d[114][514]={0} scanf("%d %d",&n,&m); for(i=0;i<m;i++){ scanf("%d %d",&a,&b); f[a]=b; } for(i=0;i<9;i++){ d[i][2]=1; if(f[1] && f[1]-i%3-1){ d[i][2]=0; } if(f[2] && f[2]-i/3-1){ d[i][2]=0; } for(i=3;i<n;i++){ for(j=0;j<9;j++){ if(f[i] && f[i]-1-j/3){ for(k...
main.c: In function 'main': main.c:5:1: error: expected ',' or ';' before 'scanf' 5 | scanf("%d %d",&n,&m); | ^~~~~ main.c:23:19: error: lvalue required as left operand of assignment 23 | d[j][i]+=d[k+(j%3)=3][i-1]; | ^ main.c:31:1: error: implicit declaration of function 'prinff'; ...
s679907220
p00491
C
#include<stdio.h> int main(void) { int a,b,i,j,k,n,m,f[810]={0},d[114][514]={0} scanf("%d %d",&n,&m); for(i=0;i<m;i++){ scanf("%d %d",&a,&b); f[a]=b; } for(i=0;i<9;i++){ d[i][2]=1; if(f[1] && f[1]-i%3-1){ d[i][2]=0; } if(f[2] && f[2]-i/3-1){ d[i][2]=0; } for(i=3;i<n;i++){ for(j=0;j<9;j++){ if(f[i] && f[i]-1-j/3){ for(k...
main.c: In function 'main': main.c:5:1: error: expected ',' or ';' before 'scanf' 5 | scanf("%d %d",&n,&m); | ^~~~~ main.c:23:19: error: lvalue required as left operand of assignment 23 | d[j][i]+=d[k+(j%3)=3][i-1]; | ^ main.c:31:1: error: implicit declaration of function 'prinff'; ...
s559048121
p00491
C
#include<stdio.h> int main(void) { int a,b,i,j,k,n,m,f[810]={0},d[114][514]={0} scanf("%d %d",&n,&m); for(i=0;i<m;i++){ scanf("%d %d",&a,&b); f[a]=b; } for(i=0;i<9;i++){ d[i][2]=1; if(f[1] && f[1]-i%3-1){ d[i][2]=0; } if(f[2] && f[2]-i/3-1){ d[i][2]=0; } for(i=3;i<n;i++){ for(j=0;j<9;j++){ if(f[i] && f[i]-1-j/3){ for(k...
main.c: In function 'main': main.c:5:1: error: expected ',' or ';' before 'scanf' 5 | scanf("%d %d",&n,&m); | ^~~~~ main.c:23:19: error: lvalue required as left operand of assignment 23 | d[j][i]+=d[k+(j%3)=3][i-1]; | ^ main.c:31:1: error: implicit declaration of function 'prinff'; ...
s819862697
p00491
C
#include<stdio.h> int main(void) { int a,b,i,j,k,n,m,f[810]={0},d[114][514]={0}; scanf("%d %d",&n,&m); for(i=0;i<m;i++){ scanf("%d %d",&a,&b); f[a]=b; } for(i=0;i<9;i++){ d[i][2]=1; if(f[1] && f[1]-i%3-1){ d[i][2]=0; } if(f[2] && f[2]-i/3-1){ d[i][2]=0; } for(i=3;i<n;i++){ for(j=0;j<9;j++){ if(f[i] && f[i]-1-j/3){ for(...
main.c: In function 'main': main.c:23:26: error: lvalue required as left operand of assignment 23 | d[j][i]=d[j][i]+d[k+(j%3)=3][i-1]; | ^ main.c:31:1: error: implicit declaration of function 'prinff'; did you mean 'printf'? [-Wimplicit-function-declaration] 31 | prinff("%d\n",a%100...
s062572988
p00491
C
#include<stdio.h> int main(void) { int a,b,i,j,k,n,m,f[810]={0},d[114][514]={0}; scanf("%d %d",&n,&m); for(i=0;i<m;i++){ scanf("%d %d",&a,&b); f[a]=b; } for(i=0;i<9;i++){ d[i][2]=1; if(f[1] && f[1]-i%3-1){ d[i][2]=0; } if(f[2] && f[2]-i/3-1){ d[i][2]=0; } for(i=3;i<n;i++){ for(j=0;j<9;j++){ if(f[i] && f[i]-1-j/3){ for(...
main.c: In function 'main': main.c:23:19: error: lvalue required as left operand of assignment 23 | d[j][i]+=d[k+(j%3)=3][i-1]; | ^ main.c:31:1: error: implicit declaration of function 'prinff'; did you mean 'printf'? [-Wimplicit-function-declaration] 31 | prinff("%d\n",a%10000); | ^...
s595182510
p00491
C
#include<stdio.h> int main(void) { int a,b,i,j,k,n,m,f[810]={0},d[114][514]={0}; scanf("%d %d",&n,&m); for(i=0;i<m;i++){ scanf("%d %d",&a,&b); f[a]=b; } for(i=0;i<9;i++){ d[i][2]=1; if(f[1] && f[1]-i%3-1){ d[i][2]=0; } if(f[2] && f[2]-i/3-1){ d[i][2]=0; } for(i=3;i<n;i++){ for(j=0;j<9;j++){ if(f[i] && f[i]-1-j/3){ for(...
main.c: In function 'main': main.c:23:19: error: lvalue required as left operand of assignment 23 | d[j][i]+=d[k+(j%3)=3][i-1]; | ^ main.c:32:1: error: implicit declaration of function 'prinff'; did you mean 'printf'? [-Wimplicit-function-declaration] 32 | prinff("%d\n",a%10000); | ^...
s327586354
p00491
C
#include<stdio.h> int main(void) { int a,b,i,j,k,n,m,f[810]={0},d[114][514]={0}; scanf("%d %d",&n,&m); for(i=0;i<m;i++){ scanf("%d %d",&a,&b); f[a]=b; } for(i=0;i<9;i++){ d[i][2]=1; if(f[1] && f[1]-i%3-1){ d[i][2]=0; } if(f[2] && f[2]-i/3-1){ d[i][2]=0; } for(i=3;i<n;i++){ for(j=0;j<9;j++){ if(f[i] && f[i]-1-j/3){ for(...
main.c: In function 'main': main.c:23:19: error: lvalue required as left operand of assignment 23 | d[j][i]+=d[k+(j%3)=3][i-1]; | ^ main.c:34:1: error: implicit declaration of function 'prinff'; did you mean 'printf'? [-Wimplicit-function-declaration] 34 | prinff("%d\n",a%10000); | ^...
s028688125
p00491
C
#include<stdio.h> int main(void) { int a,b,i,j,k,n,m,f[101]={0},d[9][101]={0}; scanf("%d %d",&n,&m); for(i=0;i<m;i++){ scanf("%d %d",&a,&b); f[a]=b; } for(i=0;i<9;i++){ d[i][2]=1; if(f[1] && f[1]-i%3-1){ d[i][2]=0; } if(f[2] && f[2]-i/3-1){ d[i][2]=0; } for(i=3;i<n;i++){ for(j=0;j<9;j++){ if(f[i] && f[i]-1-j/3){ for(k=...
main.c: In function 'main': main.c:23:19: error: lvalue required as left operand of assignment 23 | d[j][i]+=d[k+(j%3)=3][i-1]; | ^ main.c:34:1: error: implicit declaration of function 'prinff'; did you mean 'printf'? [-Wimplicit-function-declaration] 34 | prinff("%d\n",a%10000); | ^...
s432081208
p00491
C
#include<stdio.h> int main(void) { int a,b,i,j,k,n,m,f[101]={0},d[9][101]={0}; scanf("%d %d",&n,&m); for(i=0;i<m;i++){ scanf("%d %d",&a,&b); f[a]=b; } for(i=0;i<9;i++){ d[i][2]=1; if(f[1] && f[1]-i%3-1){ d[i][2]=0; } if(f[2] && f[2]-i/3-1){ d[i][2]=0; } } for(i=3;i<n;i++){ for(j=0;j<9;j++){ if(f[i] && f[i]-1-j/3){ for(...
main.c: In function 'main': main.c:24:19: error: lvalue required as left operand of assignment 24 | d[j][i]+=d[k+(j%3)=3][i-1]; | ^ main.c:35:1: error: implicit declaration of function 'prinff'; did you mean 'printf'? [-Wimplicit-function-declaration] 35 | prinff("%d\n",a%10000); | ^...
s886654389
p00491
C
#include<stdio.h> int main(void) { int a,b,i,j,k,n,m,f[101]={0},d[9][101]={0}; scanf("%d %d",&n,&m); for(i=0;i<m;i++){ scanf("%d %d",&a,&b); f[a]=b; } for(i=0;i<9;i++){ d[i][2]=1; if(f[1] && f[1]-i%3-1){ d[i][2]=0; } if(f[2] && f[2]-i/3-1){ d[i][2]=0; } } for(i=3;i<n;i++){ for(j=0;j<9;j++){ if(f[i] && f[i]-1-j/3){ for(...
main.c: In function 'main': main.c:24:19: error: lvalue required as left operand of assignment 24 | d[j][i]+=d[k+(j%3)=3][i-1]; | ^ main.c:34:1: error: implicit declaration of function 'prinff'; did you mean 'printf'? [-Wimplicit-function-declaration] 34 | prinff("%d\n",a%10000); | ^...
s079847625
p00491
C
#include<stdio.h> int main(void) { int f[101]={0}; int d[9][101]={0}; int a,b,i,j,k,n,m; scanf("%d %d",&n,&m); for(i=0;i<m;i++){ scanf("%d %d",&a,&b); f[a]=b; } for(i=0;i<9;i++){ d[i][2]=1; if(f[1] && f[1]-i%3-1){ d[i][2]=0; } if(f[2] && f[2]-i/3-1){ d[i][2]=0; } } for(i=3;i<n;i++){ for(j=0;j<9;j++){ if(f[i] && f[i]-1-...
main.c: In function 'main': main.c:26:19: error: lvalue required as left operand of assignment 26 | d[j][i]+=d[k+(j%3)=3][i-1]; | ^ main.c:36:1: error: implicit declaration of function 'prinff'; did you mean 'printf'? [-Wimplicit-function-declaration] 36 | prinff("%d\n",a%10000); | ^...
s988834278
p00491
C
#include<stdio.h> int main(void) { int f[101]={0}; int d[9][101]={0}; int a,b,i,j,k,n,m; scanf("%d %d",&n,&m); for(i=0;i<m;i++){ scanf("%d %d",&a,&b); f[a]=b; } for(i=0;i<9;i++){ d[i][2]=1; if(f[1] && f[1]-i%3-1){ d[i][2]=0; } if(f[2] && f[2]-i/3-1){ d[i][2]=0; } } for(i=3;i<n;i++){ for(j=0;j<9;j++){ if(f[i] && f[i]-1-...
main.c: In function 'main': main.c:26:19: error: lvalue required as left operand of assignment 26 | d[j][i]+=d[k+(j%3)=3][i-1]; | ^ main.c:35:1: error: implicit declaration of function 'prinff'; did you mean 'printf'? [-Wimplicit-function-declaration] 35 | prinff("%d\n",a%10000); | ^...
s457121071
p00491
C
#include<stdio.h> int main(void) { int f[101]={0}; int d[9][101]={0}; int a,b,i,j,k,n,m; scanf("%d %d",&n,&m); while(m--){ scanf("%d %d",&a,&b); f[a]=b; } for(i=0;i<9;i++){ d[i][2]=1; if(f[1] && f[1]-i%3-1){ d[i][2]=0; } if(f[2] && f[2]-i/3-1){ d[i][2]=0; } } for(i=3;i<n;i++){ for(j=0;j<9;j++){ if(f[i] && f[i]-1-j/3){ ...
main.c: In function 'main': main.c:26:19: error: lvalue required as left operand of assignment 26 | d[j][i]+=d[k+(j%3)=3][i-1]; | ^ main.c:36:1: error: implicit declaration of function 'prinff'; did you mean 'printf'? [-Wimplicit-function-declaration] 36 | prinff("%d\n",a%10000); | ^...
s356104705
p00491
C
include<stdio.h> #define MOD (10000) int t[104][6],r[104]; int main(void){ int n,k; int i; int a,b; int ans; scanf("%d%d",&n,&k); while(k--){ scanf("%d%d",&a,&b); r[a]=b; } if(r[1]!=0) t[1][(r[1]-1)*2]=1; else t[1][0]=t[1][2]=t[1][4]=1; for(i=2;i<=n;i++){ ...
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include<stdio.h> | ^ main.c: In function 'main': main.c:10:5: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 10 | scanf("%d%d",&n,&k); | ^~~~~ main.c:1:1: note: i...
s386754839
p00491
C
#include<stdio.h> #define MOD 10000 int N ,K ; int plan[ 100 + 1 ][ 4 + 1 ][ 4 + 1 ] ; int _now[ 100 + 1 ] ; int Cnt( int day ,int prev ,int now ) { if( day == N ) { return 1 ; } int &next = _now[ day ] ; if( next > 0 ) { if( prev == now && now == next ) { return 0 ; } return Cnt( day + 1 ,now...
main.c: In function 'Cnt': main.c:16:13: error: expected identifier or '(' before '&' token 16 | int &next = _now[ day ] ; | ^ main.c:17:13: error: 'next' undeclared (first use in this function) 17 | if( next > 0 ) | ^~~~ main.c:17:13: note: each undeclared iden...
s550048396
p00491
C
#include<stdio.h> #include<windows.h> #include<errno.h> #include<stdlib.h> #include<stddef.h> #define Iset int i,j,l #define man 10000 #define cn continue int pas[101], dt[101][4][4]; int main(){ int n, k; Iset; int ans = 0; scanf("%d%d", &n, &k); for (i = 0; i < k; i++) { int a, b; scanf("%d%d", &a, &b); ...
main.c:2:9: fatal error: windows.h: No such file or directory 2 | #include<windows.h> | ^~~~~~~~~~~ compilation terminated.
s008178982
p00491
C
#include <stdio.h> #include <stdbool.h> #define H 6 #define W 100 struct AOJ{ int num; int lock; }; typedef struct AOJ AOJ_0568; void display00(AOJ_0568 data[][W], int height, int width){ int i, k; for(i=0; i<height; i++){ for(k=0; k<width; k++){ printf("%d ", data[i][k].num); } printf("\n"); } return...
main.c: In function 'getResult': main.c:28:43: error: invalid operands to binary % (have 'AOJ_0568' {aka 'struct AOJ'} and 'int') 28 | result += data[i][width-1]%10000; | ~~~~~~~~~~~~~~~~^ | | | ...
s742881142
p00491
C
#include <stdio.h> #define H 6 #define W 100 struct AOJ{ int num; int lock; }; typedef struct AOJ AOJ_0568; void display00(AOJ_0568 data[][W], int height, int width){ int i, k; for(i=0; i<height; i++){ for(k=0; k<width; k++){ printf("%d ", data[i][k].num); } printf("\n"); } return; } int getResult(AO...
main.c: In function 'getResult': main.c:27:43: error: invalid operands to binary % (have 'AOJ_0568' {aka 'struct AOJ'} and 'int') 27 | result += data[i][width-1]%10000; | ~~~~~~~~~~~~~~~~^ | | | ...
s331787313
p00491
C++
#inlcude<cstdio> using namespace std; int d[100], n, k, dp[100][6]; // 0:aa, 1:bb, 2:cc, 3:a, 4:b, 5:c int main() { int a, b; scanf("%d%d", &a, &b); for (int i = 0; i < n; i++) d[i] = 0; for (int i = 0; i < k; i++) scanf("%d%d", &a, &b), d[a-1] = b; dp[0][0] = dp[0][1] = dp[0][2] = dp[0][3] = dp[0][4] = dp[...
a.cc:1:2: error: invalid preprocessing directive #inlcude; did you mean #include? 1 | #inlcude<cstdio> | ^~~~~~~ | include a.cc: In function 'int main()': a.cc:9:3: error: 'scanf' was not declared in this scope 9 | scanf("%d%d", &a, &b); | ^~~~~ a.cc:32:3: error: 'printf' was not declare...
s130930352
p00491
C++
#include <iostream> using namespace std; enum Sauce{NOT_DETERMINED=0, Tomato=1, Cream=2, Basil=3}; enum Seq{SAME, DIFF}; const int divisor = 10000; class Pasta{ public: Pasta(int _N); ~Pasta(); static Sauce* sauceary; int schedule(int i, Sauce yesterday, Seq seq); private: int N; int** memo; }; Pasta::Pasta...
a.cc: In member function 'int Pasta::schedule(int, Sauce, Seq)': a.cc:61:1: warning: control reaches end of non-void function [-Wreturn-type] 61 | } | ^ /usr/bin/ld: /tmp/ccbWW54A.o: warning: relocation against `_ZN5Pasta8saucearyE' in read-only section `.text' /usr/bin/ld: /tmp/ccbWW54A.o: in function `Pasta:...
s217026706
p00491
C++
#include<iostream> #include<cstdio> using namespace std; int main(){ int N,K,A,B[101]; int dp[101][7]={},ans=0; memset(B,-1,sizeof(B)); cin>>N>>K; for(int i=0;i<K;i++){ cin>>A; cin>>B[A]; } dp[0][0]=1; for(int i=0;i<N;i++){ for(int j=0;j<=6;j++){ //printf("%d ",dp[i][j]); if(B[i]!=-1 && (j!=B[i] &...
a.cc: In function 'int main()': a.cc:8:9: error: 'memset' was not declared in this scope 8 | memset(B,-1,sizeof(B)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<cstdio> +++ |+#include <cstring> ...
s166573027
p00491
C++
cin>>n>>k; for(int i=0;i<k;i++){ int a,b; cin>>a>>b; if(b==1)dp[a][2]=INF,dp[a][3]=INF; if(b==2)dp[a][1]=INF,dp[a][3]=INF; if(b==3)dp[a][1]=INF,dp[a][2]=INF; } for(int i=1;i<=3;i++)if(dp[1][i]!=INF)dp[1][i]=1; for(int i=1;i<=n;i++){ for(int j=1;j<=3;j++){ if(dp[i+1][j]!=INF){ for(int k=1;k<=3;...
a.cc:1:9: error: 'cin' does not name a type 1 | cin>>n>>k; | ^~~ a.cc:2:9: error: expected unqualified-id before 'for' 2 | for(int i=0;i<k;i++){ | ^~~ a.cc:2:21: error: 'i' does not name a type 2 | for(int i=0;i<k;i++){ | ^ a.cc:2...
s773306595
p00491
C++
#include <stdio.h> #include <string.h> int main(){ int N,K;//N日分のシミュレーション scanf("%d %d",&N,&K); long long int dp[N][3]; long long int delete[3]; int i,j,k; memset(dp,0,sizeof(dp));//初期化 memset(delete,0,sizeof(delete)); int a,b; for(i=0;i<K;i++){ scanf("%d %d",&a,&b); dp[a-1][b-1]=1; } if(dp[0][0]==0&&dp[...
a.cc: In function 'int main()': a.cc:7:23: error: expected unqualified-id before 'delete' 7 | long long int delete[3]; | ^~~~~~ a.cc:10:22: error: expected primary-expression before ',' token 10 | memset(delete,0,sizeof(delete)); | ^ a.cc:10:...
s328809409
p00491
C++
#include<iostream> using namespace std; int n,m; const int mod=10000; int yotei[101]; int dp[101][3][3]={}; int pasta(int day,int tdby,int y){//日日 おととい 昨日 if(dp[day][tdby][y]!=0)return dp[day][tdby][y]; if(day==n+1)return 1; if(yotei[day]!=-1){ if(tdby==y&&y==yotei[day]){ return 0; }else { return dp[da...
a.cc: In function 'int main()': a.cc:31:9: error: 'memset' was not declared in this scope 31 | memset(yotei,-1,sizeof(yotei)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> +++ |+#include ...
s700896558
p00491
C++
import Control.Monad import Control.Applicative import Data.List main = do [n, k] <- map (read :: String -> Int) . words <$> getLine l <- map (map (read :: String -> Int) . words) <$> replicateM k getLine print $ solve n l func :: Int -> [[Int]] -> [(Int, Int)] func n [] = [(x, -1) | x <- [1..n]] func n ([a, b]:c)...
a.cc:11:30: error: too many decimal points in number 11 | func n [] = [(x, -1) | x <- [1..n]] | ^~~~ a.cc:12:26: error: stray '\' in program 12 | func n ([a, b]:c) = map (\(x, y) -> if x == a then (x, b) else (x, y)) $ func n c | ^ a.cc:21:49: erro...
s812830670
p00491
C++
#include<iostream> #include<map> using namespace std; typedef long long int ll; ll dfs(int day,int r1,int r2); ll dp[101][4][4],n,k; map<int,int> plan; int main(){ cin >> n >> k; for(int i=0;i<k;i++){ int a,b; cin >> a >> b; a--; plan[a] = b; } memset(dp,-1,sizeof(dp)); cout << dfs(0,0,0)%10000 << endl; } ll ...
a.cc: In function 'int main()': a.cc:14:9: error: 'memset' was not declared in this scope 14 | memset(dp,-1,sizeof(dp)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<map> +++ |+#include <cstring> ...
s198242100
p00491
C++
#include <iostream> using namespace std; int main() { int n, k, l, m; cin >> n >> k; int krsw[101][3] = {}; int a[100] = {} ; for(int i = 0; i < k; i++) { cin >> l >> m; a[l] = m; } if(a[1]) krsw[1][a[1]] = 1; else { krsw[1][1] = 1; krsw[1][2] = 1; krsw[1][3] = 1; } for(int hi = 2; hi <= n; hi++) { if(a...
a.cc: In function 'int main()': a.cc:39:45: error: 'i' was not declared in this scope; did you mean 'hi'? 39 | if(krsw[hi][i]>10000)krsw[hi][i] %= 10000; | ^ | hi
s469393926
p00491
C++
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 #include<bits/stdc++.h> #define LL long long #define FOR(i,a,b) for(int i=a;i<=b;++i) using namespace std; static const LL MAX_N = 1e+5; static const LL INF = 1 << 25; struct clothes{ LL A[MAX_...
a.cc:2:1: error: expected unqualified-id before numeric constant 2 | 3 | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:43: /usr/...
s075853636
p00491
C++
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 #include<bits/stdc++.h> #define LL long long #define FOR(i,a,b) for(int i=a;i<=b;++i) using namespace std; static const LL MAX_N = 1e+5; static const LL INF = 1 << 25; struct clothes{ LL A[MAX_...
a.cc:2:1: error: expected unqualified-id before numeric constant 2 | 3 | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:43: /usr/...
s040558307
p00491
C++
#include <bits/stdc++.h> using namespace std ; #define pb(n) push_back(n) #define fi first #define se second #define X real() #define Y imag() #define value(x,y,w,h) (x >= 0 && x < w && y >= 0 && y < h) #define all(r) (r).begin(),(r).end() #define gsort(st,en) sort((st),(en),greater<int>()) #define vmax(ary) *max_elem...
a.cc: In function 'int main()': a.cc:75:13: error: 'c' was not declared in this scope 75 | dp[1][c][0] = 1; | ^ a.cc:84:45: error: 'pc2' was not declared in this scope; did you mean 'pc1'? 84 | dp[i][c][pc1] += dp[i-1][pc1][pc2]; | ...
s898633128
p00491
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>>; int main() { int N, K; cin >> N >> K; vector<int>dis(N); for (int i = 0; i < K; ++i) { int a, b; cin >> a >> b; a-...
a.cc: In function 'int main()': a.cc:42:2: error: expected '}' at end of input 42 | } | ^ a.cc:24:60: note: to match this '{' 24 | for (int pre = 0; pre <= 3; ++pre) { | ^ a.cc:42:2: error: expected '}' at end of input...
s189862671
p00491
C++
#include <iostream> #define rep(i,n) for(int i = 0; i < n; i++) using namespace std; テつ? int dp[3][110][2], num[110]; int n,k; テつ? int main(){ テつ?つ?つ?つ?ep(i,110) num[i] = -1; テつ?つ?つ?つ?in >> n >> k; テつ?つ?つ?つ?ep(i,k){ テつ?つ?つ?つ?つ?つ?つ?つ?nt a,b; テつ?つ?つ?つ?つ?つ?つ?つ?in >> a >> b; テつ?つ?つ?つ?つ?つ?つ?つ?--; b--; テつ?つ?つ?つ?つ?つ?つ?つ?um[a]...
a.cc:4:1: error: '\U000030c6\U00003064' does not name a type 4 | テつ? | ^~~~ a.cc:7:1: error: '\U000030c6\U00003064' does not name a type 7 | テつ? | ^~~~
s951866333
p00491
C++
#include<cstdio> #include<functional> #include<algorithm> #include<iostream> #include<cstring> #include<string> #include<cstdlib> #include<cctype> #include<queue> #define MM #define rep(i,a) for(int i=0;i<a;i++) #define rep2(i,a) for(int i=1;i<=a;i++) #define rep3(i,a) for(int i=1;i<a;i++) #define rep4(i,a) for(int i=0...
a.cc: In function 'int main()': a.cc:24:14: error: expected primary-expression before ']' token 24 | dp[MM][MM][MM]=1; | ^ a.cc:24:18: error: expected primary-expression before ']' token 24 | dp[MM][MM][MM]=1; | ^ a.cc:24:22: error: expected primary-expres...
s927292469
p00491
C++
#include<cstdio> #include<functional> #include<algorithm> #include<iostream> #include<cstring> #include<string> #include<cstdlib> #include<cctype> #include<queue> #define MM #define rep(i,a) for(int i=0;i<a;i++) #define rep2(i,a) for(int i=1;i<=a;i++) #define rep3(i,a) for(int i=1;i<a;i++) #define rep4(i,a) for(int i=0...
a.cc: In function 'int main()': a.cc:24:14: error: expected primary-expression before ']' token 24 | dp[MM][MM][MM]=1; | ^ a.cc:24:18: error: expected primary-expression before ']' token 24 | dp[MM][MM][MM]=1; | ^ a.cc:24:22: error: expected primary-expres...
s002196053
p00491
C++
#include<iostream> using namespace std; int dp[105][3][2],a[105],n,m,p,q; int main(){ cin>>n>>m;for(int i=0;i<m;i++){cin>>p>>q;a[p]=q;} if(a[1]==0){dp[1][0][0]=1;dp[1][1][0]=1;dp[1][2][0]=1;} if(a[1]>=1)dp[1][a[i]-1][0]=1; for(int i=2;i<=n;i++){ if(a[i]==0 || a[i]==1){ dp[i][0][0]+=(dp[i-1][1][0]+dp[i-1][1][1]...
a.cc: In function 'int main()': a.cc:7:28: error: 'i' was not declared in this scope 7 | if(a[1]>=1)dp[1][a[i]-1][0]=1; | ^