submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s156939132
p00532
C++
#include<bits/stdc++> using namespace std; int main(){ int player,rounds,i,j,k; cin>>player>>rounds; int target[rounds],forecast[player],sum[player]; for(i=0;i<player;i++)sum[i]=0; for(i=0;i<rounds;i++)cin>>target[i]; for(i=0;i<rounds;i++){ for(k=0;k<player;k++)cin>>forecast[k]; for(j=0;j<player;j++){ if(target[i]=...
a.cc:1:9: fatal error: bits/stdc++: No such file or directory 1 | #include<bits/stdc++> | ^~~~~~~~~~~~~ compilation terminated.
s926479778
p00532
C++
#include <iostream> #include <cstdio> #include <algorithm> #include <vector> using namespace std; int main() { int n, m; cin >> n >> m; vector<int> t; std::vector<int> tmp; for (int i = 0; i <= m; i++) { int tmp; cin >> tmp; t. push_back(tmp); } vector<int>p(n, 0); for (int i = 0; i < n; i++){ co...
a.cc: In function 'int main()': a.cc:25:10: error: expected '}' at end of input 25 | } | ^ a.cc:9:1: note: to match this '{' 9 | { | ^
s500584377
p00532
C++
#include <iostream> #include <cstdio> #include <algorithm> #include <vector> using namespace std; int main() { int n, m; cin >> n >> m; vector<int> t; std::vector<int> tmp; for (int i = 0; i <= m; i++) { int tmp; cin >> tmp; t. push_back(tmp); } vector<int>p(n, 0); for (int i = 0; i < n; i++){ co...
a.cc: In function 'int main()': a.cc:25:10: error: expected '}' at end of input 25 | } | ^ a.cc:9:1: note: to match this '{' 9 | { | ^
s979219165
p00532
C++
#include <iostream> using namespace std; int main() { int N, M, i, j; int target[100], cnt[100], data[100][100]; cin >> N; cin >> M; for (i = 0; i < M; i++) { cin >> &target[i]; --target[i]; } for (i = 0; i < M; i++) { for (j = 0; j < N; j++) { cin >> &data[i][j]; --data[i][j]; cnt[j] = 0; ...
a.cc: In function 'int main()': a.cc:13:21: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int*') 13 | cin >> &target[i]; | ~~~ ^~ ~~~~~~~~~~ | | | | | int* | ...
s586813909
p00532
C++
#include<iostream> using namespace std; int main(){ int n,m,reason; cin >> n >> m; int tag[m],table[n]; for(int i=0; i<m; i++)[ cin >> tag[i]; } for(int i=0; i<m; i++){ for(int j=0; j<n; j++){ cin >> reason; if(reason == tag[i]){ table[j]++; } else{ tab...
a.cc: In function 'int main()': a.cc:13:5: warning: capture of variable 'std::cin' with non-automatic storage duration 13 | cin >> tag[i]; | ^~~ In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::istream std::cin' declared here 62 | extern istream cin; ///< Lin...
s870428214
p00532
C++
#include<iostream> using namespace std; int i, N, M; int A[101], B[101][101], P[101]; int main(){ cin >> N >> M; for (i=1; i<=M; i++) { cin >> A[i]; } for (i=1; i<=M; i++) { for (j=1; j<=N; j++) { cin >> B[i][j]; } } for (j=1; j<=N; j++) { p[j] = 0; } for (i=1; i<=M; ...
a.cc: In function 'int main()': a.cc:9:14: error: 'j' was not declared in this scope 9 | for (j=1; j<=N; j++) { | ^ a.cc:13:10: error: 'j' was not declared in this scope 13 | for (j=1; j<=N; j++) { p[j] = 0; } | ^ a.cc:13:28: error: 'p' was not declared in this scope...
s351625564
p00532
C++
#include<iostream> using namespace std; int i, j, N, M; int A[101], B[101][101], P[101]; int main(){ cin >> N >> M; for (i=1; i<=M; i++) { cin >> A[i]; } for (i=1; i<=M; i++) { for (j=1; j<=N; j++) { cin >> B[i][j]; } } for (j=1; j<=N; j++) { p[j] = 0; } for (i=1; i<=...
a.cc: In function 'int main()': a.cc:13:28: error: 'p' was not declared in this scope 13 | for (j=1; j<=N; j++) { p[j] = 0; } | ^
s390453310
p00533
Java
import java.io.*; import java.util.StringTokenizer; class Main{ static final PrintWriter out=new PrintWriter(System.out); public static void main(String[] args) throws IOException{ BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); String line=""; while((line=br.readLine())!=null&&!line.isEmpty(...
Main.java:13: error: cannot find symbol int h=Integer.parseInt(st.netToken()); ^ symbol: method netToken() location: variable st of type StringTokenizer Main.java:14: error: cannot find symbol int w=Integer.parseInt(st.netToken()); ^ symbol: method netToken() ...
s060961441
p00533
Java
import java.util.Scanner; public class weatherforecast { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int H = sc.nextInt(); int W = sc.nextInt(); int cnt=0; int ccnt=0; String data[][] = new String[H][W]; for(int i = 0;i < H;i++){ for(int k = 0;k < W;k++){ data[...
Main.java:3: error: class weatherforecast is public, should be declared in a file named weatherforecast.java public class weatherforecast { ^ 1 error
s937586247
p00533
Java
import java.util.Scanner; public class weatherforecast { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int H = sc.nextInt(); int W = sc.nextInt(); int cnt=0; int ccnt=0; String data[][] = new String[H][W]; for(int i = 0;i < H;i++){ for(int k = 0;k < W;k++){ data[...
Main.java:3: error: class weatherforecast is public, should be declared in a file named weatherforecast.java public class weatherforecast { ^ 1 error
s134707292
p00533
Java
import java.util.Scanner; public class weatherforecast { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int H = sc.nextInt(); int W = sc.nextInt(); int cnt=0; int ccnt=0; String data[][] = new String[H][W]; for(int i = 0;i < H;i++){ for(int k = 0;k < W;k++){ data[i...
Main.java:2: error: class weatherforecast is public, should be declared in a file named weatherforecast.java public class weatherforecast { ^ 1 error
s321541592
p00533
Java
import java.util.Scanner; public class weatherforecast { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int H = sc.nextInt(); int W = sc.nextInt(); int cnt=0; int ccnt=0; String data[][] = new String[H][W]; for(int i = 0;i < H;i++){ for(int k = 0;k < W;k++){ data[i...
Main.java:2: error: class weatherforecast is public, should be declared in a file named weatherforecast.java public class weatherforecast { ^ 1 error
s987112070
p00533
Java
import java.util.Scanner; public class main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int H = sc.nextInt(); int W = sc.nextInt(); int cnt=0; int ccnt=0; String data[][] = new String[H][W]; for(int i = 0;i < H;i++){ for(int k = 0;k < W;k++){ data[i][k] = sc.ne...
Main.java:2: error: class main is public, should be declared in a file named main.java public class main{ ^ 1 error
s599432860
p00533
Java
package second; import java.util.Scanner; public class WeatherForecaster { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int h = sc.nextInt(); int w = sc.nextInt(); int ans[][] = new int[1000][1000]; //????°?????????????????????\????????????????????? //??\?????????????¨???...
Main.java:4: error: class WeatherForecaster is public, should be declared in a file named WeatherForecaster.java public class WeatherForecaster { ^ 1 error
s594409074
p00533
Java
import java.util.Scanner; public class SDAOJ_610 { public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc = new Scanner(System.in); int H = sc.nextInt(); int W = sc.nextInt(); char[] kumo = new char[W]; int[][] ans = new int [H][W]; int count = 0; int no = 0; for(int...
Main.java:3: error: class SDAOJ_610 is public, should be declared in a file named SDAOJ_610.java public class SDAOJ_610 { ^ 1 error
s730095302
p00533
Java
import java.util.Scanner; public class main { public static void main(String args[]){ Scanner sc = new Scanner(System.in); int h = sc.nextInt(); int w = sc.nextInt(); int[][] section = new int[h][w]; for (int i = 0; i < h; i++){ char [] wether = sc.next().toCharArray(); int count = 0; for(int j = 0;...
Main.java:2: error: class main is public, should be declared in a file named main.java public class main { ^ 1 error
s496085982
p00533
Java
public class main { public static void main(String args[]){ Scanner sc = new Scanner(System.in); int h = sc.nextInt(); int w = sc.nextInt(); int[][] section = new int[h][w]; for (int i = 0; i < h; i++){ char [] wether = sc.next().toCharArray(); int count = 0; for(int j = 0; j < w; j++){ if(wethe...
Main.java:1: error: class main is public, should be declared in a file named main.java public class main { ^ Main.java:3: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class main Main.java:3: error: cannot find symbol Scanner sc = new Scanner(System....
s949746814
p00533
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc = new Scanner(System.in); int H = sc.nextInt(); int W = sc.nextInt(); int[][] A; A = new int[H][W]; for(int i=0; i<H; i++){...
Main.java:28: error: reached end of file while parsing } ^ 1 error
s547946637
p00533
Java
import java.util.Scanner; public class mapcloud{ public void draw(int h,int w){ char[] c = new char[w]; int[][] map= new int[h][w]; int t = 0; for(int i = 0; i < h; i++){ t = -1; for(int j = 0; j < w ; j++){ if(c[j] == 'c') t = 0; map...
Main.java:26: error: illegal start of expression public static void main(String[] args) { ^ Main.java:33: error: class, interface, enum, or record expected } ^ 2 errors
s240155945
p00533
Java
import java.util.Scanner; public class mapcloud{ public int w; public int h; public char[] c = new char[w]; int t = 0; void draw(int h,int w){ int[][] map= new int[h][w]; for(int i = 0; i < h; i++){ t = -1; for(int j = 0; j < w ; j++){ if(c[j] == 'c') t = ...
Main.java:29: error: illegal start of expression public static void main(String[] args) { ^ Main.java:36: error: class, interface, enum, or record expected } ^ 2 errors
s349077188
p00533
Java
import java.util.Scanner; public class Main{ public int w; public int h; public char[] c = new char[w]; int t = 0; void doIt(int h,int w){ int[][] map= new int[h][w]; for(int i = 0; i < h; i++){ t = -1; for(int j = 0; j < w ; j++){ if(c[j] == 'c') t = 0; ...
Main.java:29: error: illegal start of expression public static void main(String[] args) { ^ Main.java:36: error: class, interface, enum, or record expected } ^ 2 errors
s836357086
p00533
Java
import java.util.Scanner; public int w; public int h; public class Main{ public int w; public int h; public char[] c = new char[w]; int t = 0; void doIt(int h,int w){ int[][] map= new int[h][w]; for(int i = 0; i < h; i++){ t = -1; for(int j = 0; j < w ; j++){ ...
Main.java:3: error: unnamed classes are a preview feature and are disabled by default. public int w; ^ (use --enable-preview to enable unnamed classes) Main.java:30: error: illegal start of expression public static void main(String[] args) { ^ 2 errors
s383980637
p00533
C
j;main(k){scanf("%d%d\n",&k,&j);for(k=-1;~j=getchar();printf(j-10?" ":""))printf(j-10?"%d":"\n",k=j-10?j-99?k<0?-1:k+1:0:-1);return 0;}
main.c:1:1: warning: data definition has no type or storage class 1 | j;main(k){scanf("%d%d\n",&k,&j);for(k=-1;~j=getchar();printf(j-10?" ":""))printf(j-10?"%d":"\n",k=j-10?j-99?k<0?-1:k+1:0:-1);return 0;} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'j' [-Wimplicit-int] main.c:1:3: error: ...
s370661576
p00533
C
include <iostream> using namespace std; int main (){ char ny; int dr[101][101],h,w,c=0,i; cin>>h>>w; for (int s=0;s<h;s++){ for (int s_=0;s_<w;s_++){ cin>>ny; dr[s][s_]=-1; if (ny=='c')dr[s][s_]=0; } } for (int s=0;s<h;s++){ for (int s_=0;s_<w;s_++...
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include <iostream> | ^ main.c: In function 'main': main.c:6:1: error: 'cin' undeclared (first use in this function) 6 | cin>>h>>w; | ^~~ main.c:6:1: note: each undeclared identifier is reported only once...
s802342564
p00533
C
#include <stdio.h> int main(void) { int h,w,i,j,e,b; char a[100][100]; scanf("%d %d",&h,&w); for(i=0;i<h;i++){ scanf("%s",&a[i]); } for(i=0;i<h;i++){ for(j=0;j<w;j++){ if(a[i][j]=='c'){ a[i][j]=0; } else if(a[i][j]=='.' && j==0){ a[i][j]=-1; } else if(a[i][j]=='.'){ b=j; g: ...
main.c: In function 'main': main.c:30:51: error: expected expression before ';' token 30 | b-; | ^
s368609091
p00533
C++
#include<iostream> #include<algorithm> #include<cstdio> using namespace std; int main(void) { int H=0,W=0,a=0,c=0,d=0; cin>>H>>W; char d=0; for(int i=0;i<H;i++){ for(int j=0;j<W;j++){ cin>>d; if(d=='.'&&c==0){cout<<"-1";} else(d=='c'){cout<<"0";c=1;a=0;} else(d=='.'){a++;cout<<a;} if(j==W-1){cout<<...
a.cc: In function 'int main()': a.cc:9:14: error: conflicting declaration 'char d' 9 | char d=0; | ^ a.cc:7:29: note: previous declaration as 'int d' 7 | int H=0,W=0,a=0,c=0,d=0; | ^ a.cc:14:37: error: expected ';' before '{' token 14 | ...
s552321776
p00533
C++
#include<iostream> #include<algorithm> #include<cstdio> using namespace std; int main(void) { int H=0,W=0,a=0,c=0,d=0; cin>>H>>W; char d=0; for(int i=0;i<H;i++){ for(int j=0;j<W;j++){ cin>>d; if(d=='.'&&c==0){cout<<"-1";} else if(d=='c'){cout<<"0";c=1;a=0;} else if(d=='.'){a++;cout<<a;} if(j==W-1){...
a.cc: In function 'int main()': a.cc:9:14: error: conflicting declaration 'char d' 9 | char d=0; | ^ a.cc:7:29: note: previous declaration as 'int d' 7 | int H=0,W=0,a=0,c=0,d=0; | ^
s321971010
p00533
C++
#include<iostream> #include<algorithm> #include<cstdio> using namespace std; int main(void) { int H=0,W=0,a=0,c=0; cin>>H>>W; char d=0; for(int i=0;i<H;i++){ for(int j=0;j<W;j++){ cin>>d; if(d=='.'&&c==0){cout<<"-1";} else if(d=='c'){cout<<"0";c=1;a=0;} else if(d=='.'){a++;cout<<a;} if(j==W-1){cout...
a.cc: In function 'int main()': a.cc:17:39: error: expected ';' before '}' token 17 | else{cout<<" "} | ^ | ;
s729345021
p00533
C++
#include<iostream> #include<algorithm> using namespace std; int main() { int h,w; cin >> h >> w; char a[h][w]; int b[h][w]; for(int i=0;i<h;i++) for(int j=0;j<w;j++) cin >> a[i][j]; for(int i=0;i<h;i++){ for(int j=0;j<w;j++){ int d=0; for(int k=j;k>=0;k--){ if(a[i][k]=='c'...
a.cc: In function 'int main()': a.cc:31:18: error: 'j' was not declared in this scope 31 | cout << a[i][j] << endl; | ^
s312192413
p00533
C++
#include <bits/stdc++.h> using namespace std; #define for_(i,a,b) for(int i=(a);i<(b);++i) int main() { int H, W; cin >> H >> W; vector< string > grid(H); for_(i,0,H) cin >> grid[i]; for_(y,0,H) { for_(x,0,W) { int xx = x; while (xx >= 0 && grid[y][xx] == '.') --xx; cout << (xx >= 0 ? x - xx : -1)...
a.cc: In function 'int main()': a.cc:17:85: error: 'c' was not declared in this scope 17 | cout << (xx >= 0 ? x - xx : -1) << (x < W - 1 ? " " : "\n");c | ^
s970187138
p00533
C++
#include <iostream> using namespace std; int main() { int n,m; int ans[100][100]; char a[100][100]; for(int i = 0;i<100;i++){ for(int j = 0;j<100;j++){ ans[i][j]=101; } } cin >> n >> m; for(int i = 0;i<n;i++){ for(int j=0;j<m;j++){ cin >> a[i][j]; } } for(int i =0;i<n;i++){ for(int j = m-1;j>=...
a.cc: In function 'int main()': a.cc:34:43: error: expected primary-expression before ')' token 34 | if(ans[i][j]==101;){ans[i][j]=-1;} | ^
s856475011
p00533
C++
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); int a,b,flag; char ch; cin>>a>>b; for(int i= 0;i<a;i++){ flag = -1; for(int j = 0 ; j < b;j++){ scanf("%c",&ch); if(ch == 'c'){ ...
a.cc: In function 'int main()': a.cc:24:7: error: 'retrun' was not declared in this scope 24 | retrun 0; | ^~~~~~
s665055550
p00533
C++
import java.util.Scanner; public class Main { public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc = new Scanner(System.in); int H=sc.nextInt(); int W=sc.nextInt(); boolean conte=true; boolean[][] c=new boolean[H][W]; int[][] field=new int[H][W]; String[] str=new Strin...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Scanner; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: expected unqualified-id before 'public' 2 | public class Main { | ^~~~~~
s311478870
p00533
C++
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int H = sc.nextInt(); int W = sc.nextInt(); int cnt=0; int ccnt=0; int i = 0,k = 0; String data[][] = new String[H][W]; for(i = 0;i < H;i++){ for(k = 0;k < W;k++){ data[i][k] =...
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: expected unqualified-id before 'public' 2 | public class Main { | ^~~~~~
s471058915
p00533
C++
#include <iostream> #include<vector> #include<string> using namespace std; int main() { int a,b; cin>>a>>b; for(int c=0;c<a;c++){ string d; cin>>d; vector<int>s(b); for(int e=0;e<b;e++){ if(d[e]=='c')s[e]++; } for(int f=0;f<a;f++){int q=-1; for(int g=f;g!=0;g--){ if(s[g]){q]=f=g;break;} ...
a.cc: In function 'int main()': a.cc:19:43: error: expected ';' before ']' token 19 | if(s[g]){q]=f=g;break;} | ^ | ;
s713243967
p00533
C++
#include<iostream> using namespace std; int main(){ int h, w, i, j, ch; char cl[100][100]; int po[100][100]; cin >> h >> w; for (i=0; i<h; i++){ cin >> cl[i]; } for (i=0; i<h; i++){ for (j=w; j>0; j--){ ch = j;po[i][j-1]=0; while(ch > 0){ if (cl[i][ch-1] == 'c'){ break; } ch...
a.cc: In function 'int main()': a.cc:32:4: error: expected '}' at end of input 32 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s942046334
p00533
C++
AIZU ONLINE JUDGE PAGETOP ?? ??????????????? ?? ??????????????° ?? ??????????????? ?? ??????????????? ?? ????????? ?? ?? ?????°??¢?????? ??????????¨???? ??\??¬??? ?? ??±??? My Status ????????????????????????????? HOME- Notes #1599446 Solution for 0610: Weather Forecaster by rainkouta ?????????????????? ????????????...
a.cc:6:15: error: extended character ° is not valid in an identifier 6 | ??????????????° | ^ a.cc:15:6: error: extended character ° is not valid in an identifier 15 | ?????°??¢?????? | ^ a.cc:15:9: error: extended character ¢ is not valid in an identifier 15 | ?????°??¢?????? ...
s049200283
p00533
C++
include<stdio.h> int main(){ ????char c; ????int w,h,k,i; ????scanf("%d %d",&h,&w); ????while(h--){ ????????k=-1; ????????for(i=0;i<w;i++){ ????????????scanf(" %c",&c); ????????????if(c=='c')k=0; ????????????else if(k+1)k++; ????????????if(i)printf(" "); ????????????printf("%d",k); ????????} ????????printf("\n"); ????}...
a.cc:30:12: error: extended character ± is not valid in an identifier 30 | ???????????±????????????????????? | ^ a.cc:31:6: error: stray '#' in program 31 | Case # | ^ a.cc:38:6: error: stray '#' in program 38 | Case #1: | ^ a.cc:45:6: error: stray '#' in program 45 | ...
s298845514
p00533
C++
include<stdio.h> int main(){ ????char c; ????int w,h,k,i; ????scanf("%d %d",&h,&w); ????while(h--){ ????????k=-1; ????????for(i=0;i<w;i++){ ????????????scanf(" %c",&c); ????????????if(c=='c')k=0; ????????????else if(k+1)k++; ????????????if(i)printf(" "); ????????????printf("%d",k); ????????} ????????printf("\n"); ????}...
a.cc:1:1: error: 'include' does not name a type 1 | include<stdio.h> | ^~~~~~~
s029477529
p00533
C++
#include<stdio.h> int main(){ ????char c; ????int w,h,k,i; ????scanf("%d %d",&h,&w); ????while(h--){ ????????k=-1; ????????for(i=0;i<w;i++){ ????????????scanf(" %c",&c); ????????????if(c=='c')k=0; ????????????else if(k+1)k++; ????????????if(i)printf(" "); ????????????printf("%d",k); ????????} ????????printf("\n"); ????...
a.cc: In function 'int main()': a.cc:3:1: error: expected primary-expression before '?' token 3 | ????char c; | ^ a.cc:3:2: error: expected primary-expression before '?' token 3 | ????char c; | ^ a.cc:3:3: error: expected primary-expression before '?' token 3 | ????char c; | ^ a.cc:3:4:...
s299268494
p00533
C++
#include<stdio.h> int main(void) { int w,h,i[105][105],j,A,last,r,f; char f[105][105]; scanf("%d %d",&w,&h,); for(i=0;i<h;i++){ scanf("%s",&f[i]); } for(i=0;i<h;i++){ last=-1; for(j=0;j<w;j++){ } } for(i=0;i<100;i++){ for(j=0;j<w;j++){ if(f[i][j]=='c') last=j; r=-1; if(last!=-1){ r=...
a.cc: In function 'int main()': a.cc:5:14: error: conflicting declaration 'char f [105][105]' 5 | char f[105][105]; | ^ a.cc:4:40: note: previous declaration as 'int f' 4 | int w,h,i[105][105],j,A,last,r,f; | ^ a.cc:6:29: error: exp...
s633658946
p00533
C++
#include<iostream> using namespace std; int main() { char sky[100][100] = { -2999 }; int res[100][100]; int n, m, i, j, k; scanf_s("%d%d", &n,&m); for (i = 0; i < n; i++) { for (j = 0; j < m; j++) { scanf("%s", &sky[i][j]); } } for (i = 0; i < n; i++) { for (j = 0; j < m; j++) { if (sky[i][j] == 'c')...
a.cc: In function 'int main()': a.cc:4:32: error: narrowing conversion of '-2999' from 'int' to 'char' [-Wnarrowing] 4 | char sky[100][100] = { -2999 }; | ^~~~~ a.cc:7:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 7 | scanf_s("%d%d...
s012023110
p00533
C++
#include<iostream> using namespace std; int H,W,x[1000][1000],c[1000][1000]; int main(){ cin>>H>>W; for(int i=0;i<H;i++){ for(int j=0;j<W;j++){ char f;cin>>f; if(f~=='c')x[i][j]=1; c[i][j]=-1; } } for(int i=0;i<H;i++){ for(int j=0;j<W;j++){ for(int k=j;k>=0;k--){ if(x[i][k]==1){c[i][j]=j-k;bre...
a.cc: In function 'int main()': a.cc:9:29: error: expected ')' before '~' token 9 | if(f~=='c')x[i][j]=1; | ~ ^ | )
s901598987
p00533
C++
#include<iostream> #include<cstring> using namespace std; int main(void){ int h,w,con=0; char c[100][100],d[1 string str; string::size_type index; cin>>h>>w; for(int i=0;i<h;i++){ for(int j=0;j<w;j++){ cin>>c[i][j]; } } for(int i=0;i<h;i++){ for(int j=0;j<w;j++){ str=(c[i][j]); index=str.fi...
a.cc: In function 'int main()': a.cc:6:29: error: expected ']' before 'string' 6 | char c[100][100],d[1 | ^ | ] 7 | string str; | ~~~~~~ a.cc:20:25: error: 'str' was not declared in this scope; did y...
s423983815
p00533
C++
#include<iostream> #include<cstring> using namespace std; int main(void){ int h,w,con=0; char c[100][100],d[100][100]; string str; cin>>h>>w; for(int i=0;i<h;i++){ for(int j=0;j<w;j++){ cin>>c[i][j]; } } for(int i=0;i<h;i++){ for(int j=0;j<w;j++){ str=(c[i][j]); index=str.find("c"); i...
a.cc: In function 'int main()': a.cc:20:43: error: overloaded function with no contextual type information 20 | index=str.find("c"); | ^ a.cc:22:33: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'op...
s312848404
p00533
C++
#include <iosream> using namespace std; int main(){ int h, w, a[100][100]; char in; cin >> h >> w; for(int i = 0; i<h;i++){ for(int j = 0;j<w;j++){ cin >> in; if(in == 'c') a[i][j] == 0; else if(j == 0) a[i][0] = -1; else if(a[i][j-1] == -1) a[i][j] = -1; else a[i][j] = a[i][j-1] + 1; cout << a...
a.cc:1:10: fatal error: iosream: No such file or directory 1 | #include <iosream> | ^~~~~~~~~ compilation terminated.
s366598686
p00533
C++
#include<stdio.h> #include<iostream> using namespace std; int p[100][100]; int main(){ int w,h,i,j; char c[201]; cin>>h>>w; for(i=0;i<h;i++){ scanf("%s",c); for(j=0;j<w;j++){ if(c[j]=='c')p[i][j]=0; else p[i]j[]=-1; } } for(i=0;i<h;i++){ for(j=1;j<w;j++){ if(p[i][j-1]>=0&&p[i][j]<0)p[i][j]=p[i][j-1]+1; } } for(i=0;i<h;...
a.cc: In function 'int main()': a.cc:13:10: error: expected ';' before 'j' 13 | else p[i]j[]=-1; | ^ | ;
s371227348
p00533
C++
#include <iostream> using namespace std; int main (){ /*-------------custom------------------*/ int h,w,ans[101][101]={-2},checker,b=0; char dr[101][101]={0}; /*-------------------------------------*/ /*-------------imput-------------------*/ cin>>h>>w; for (int s=0;s<h;s++){ for (int s_=0;s_<w;s_++){ ...
a.cc:54:2: error: expected class-name at end of input 54 | ~ | ^
s768323966
p00533
C++
#include <iostream> using namespace std; int main (){ /*-------------custom------------------*/ int h,w,ans[101][101]={-2},checker,b=0; char dr[101][101]={0}; /*-------------------------------------*/ /*-------------imput-------------------*/ cin>>h>>w; for (int s=0;s<h;s++){ for (int s_=0;s_<w;s_++){ ...
a.cc:54:2: error: expected class-name at end of input 54 | ~ | ^
s478745877
p00533
C++
#include <iostream> using namespace std; int main (){ /*-------------custom------------------*/ int h,w,ans[101][101]={-2},checker,b=0; char dr[101][101]={0}; /*-------------------------------------*/ /*-------------imput-------------------*/ cin>>h>>w; for (int s=0;s<h;s++){ for (int s_=0;s_<w;s_++){ ...
a.cc:54:2: error: expected class-name at end of input 54 | ~ | ^
s826993970
p00533
C++
include <iostream> using namespace std; int main (){ char ny; int dr[101][101],h,w,c=0,i; cin>>h>>w; for (int s=0;s<h;s++){ for (int s_=0;s_<w;s_++){ cin>>ny; dr[s][s_]=-1; if (ny=='c')dr[s][s_]=0; } } for (int s=0;s<h;s++){ for (int s_=0;s_<w;s_++...
a.cc:1:1: error: 'include' does not name a type 1 | include <iostream> | ^~~~~~~ a.cc: In function 'int main()': a.cc:6:1: error: 'cin' was not declared in this scope 6 | cin>>h>>w; | ^~~ a.cc:33:17: error: 'cout' was not declared in this scope 33 | cout<<dr[s][s_]; | ...
s829769923
p00533
C++
include <iostream> using namespace std; int main (){ char ny; int dr[101][101],h,w,c=0,i; cin>>h>>w; for (int s=0;s<h;s++){ for (int s_=0;s_<w;s_++){ cin>>ny; dr[s][s_]=-1; if (ny=='c')dr[s][s_]=0; } } for (int s=0;s<h;s++){ for (int s_=0;s_<w;s_++...
a.cc:1:1: error: 'include' does not name a type 1 | include <iostream> | ^~~~~~~ a.cc: In function 'int main()': a.cc:6:1: error: 'cin' was not declared in this scope 6 | cin>>h>>w; | ^~~ a.cc:33:17: error: 'cout' was not declared in this scope 33 | cout<<dr[s][s_]; | ...
s234532754
p00533
C++
include <iostream> using namespace std; int main (){ char ny; int dr[101][101],h,w,c=0,i; cin>>h>>w; for (int s=0;s<h;s++){ for (int s_=0;s_<w;s_++){ cin>>ny; dr[s][s_]=-1; if (ny=='c')dr[s][s_]=0; } } for (int s=0;s<h;s++){ for (int s_=0;s_<w;s_++...
a.cc:1:1: error: 'include' does not name a type 1 | include <iostream> | ^~~~~~~ a.cc: In function 'int main()': a.cc:6:1: error: 'cin' was not declared in this scope 6 | cin>>h>>w; | ^~~ a.cc:33:17: error: 'cout' was not declared in this scope 33 | cout<<dr[s][s_]; | ...
s754334694
p00533
C++
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <math.h> #include <vector> #include <algorithm> #include <functional> #include <numeric> using namespace std; #define REP(i,n) for (int i = 0; i < n; i++) int main() { int H, W; char w[123][123]; scanf("%d %d", &H, &W); REP(i, H) scanf("%s", w[i]); ...
a.cc: In function 'int main()': a.cc:24:9: error: 'memset' was not declared in this scope 24 | memset(r, 0xFF, sizeof(r)); | ^~~~~~ a.cc:9:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 8 | #include <numeric> +++ |+#include <cst...
s334105993
p00533
C++
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <math.h> #include <vector> #include <algorithm> #include <functional> #include <numeric> #include <string> using namespace std; #define REP(i,n) for (int i = 0; i < n; i++) int main() { int H, W; char w[123][123]; scanf("%d %d", &H, &W); REP(i, H) s...
a.cc: In function 'int main()': a.cc:25:9: error: 'memset' was not declared in this scope 25 | memset(r, 0xFF, sizeof(r)); | ^~~~~~ a.cc:10:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 9 | #include <string> +++ |+#include <cst...
s994140575
p00534
Java
import java.io.*; import java.util.StringTokenizer; class Main{ static final PrintWriter out=new PrintWriter(System.out); public static void main(String[] args) throws IOException{ BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); String line=""; while((line=br.readLine())!=null&&!line.isEmpty(...
Main.java:12: error: cannot find symbol StringTokenier st=new StringTokenizer(line); ^ symbol: class StringTokenier location: class Main 1 error
s900305707
p00534
Java
import java.io.*; import java.util.StringTokenizer; class Main{ static final PrintWriter out=new PrintWriter(System.out); static final int INF=Integer.MAX_VALUE/2; public static void main(String[] args) throws IOException{ BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); String line=""; while(...
Main.java:18: error: ';' expected tir[m-1][n]=0 ^ 1 error
s541409419
p00534
Java
import java.io.*; import java.util.StringTokenizer; class Main{ static final PrintWriter out=new PrintWriter(System.out); static final int INF=Integer.MAX_VALUE/2; public static void main(String[] args) throws IOException{ BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); String line=""; while(...
Main.java:17: error: cannot find symbol Arrays.fill(tir[m-1],INF); ^ symbol: variable Arrays location: class Main 1 error
s209414999
p00534
Java
package ex; import java.util.*; public class Q2 { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int m = sc.nextInt(); int[] r = new int[n+3]; int[] day = new int[m+3]; int[] day2 = new int[m+3]; int ans=0; int count=0; for(int i=0;i<n;i++){ r[i]...
Main.java:3: error: class Q2 is public, should be declared in a file named Q2.java public class Q2 { ^ 1 error
s338949020
p00534
Java
package ex; import java.util.*; public class Q2 { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int m = sc.nextInt(); int[] r = new int[n+3]; int[] day = new int[m+3]; int ans=0; int count=0; for(int i=0;i<n;i++){ r[i] = sc.nextInt(); } for(in...
Main.java:3: error: class Q2 is public, should be declared in a file named Q2.java public class Q2 { ^ 1 error
s057862709
p00534
Java
import java.util.*; public class Q2 { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int m = sc.nextInt(); int[] r = new int[n+3]; int[] day = new int[m+3]; int ans=0; int count=0; for(int i=0;i<n;i++){ r[i] = sc.nextInt(); } for(int i=0;i<m;i+...
Main.java:2: error: class Q2 is public, should be declared in a file named Q2.java public class Q2 { ^ 1 error
s868268336
p00534
C
#include<cstdio> int N=0,M=0; int D[1010]={},C[1010]={}; int min(int a,int b){ if (a<b){ return a; } return b; } int mena(int i,int j){//???i????¬?????????????????????? j????????\?????? if (M<j){ //printf("%d??\??\????????????%d??\?????\????????£??????return 1000009",M,j); return 1000009; } if (N<i){ ...
main.c:1:9: fatal error: cstdio: No such file or directory 1 | #include<cstdio> | ^~~~~~~~ compilation terminated.
s133241617
p00534
C
#define k 1024 #define r(a) for(int i=0;i<a;i++) #define s(a) scanf("%d",a); #define m(a,b) a=a<b?a:b main(w,n,m,c[k],d[k],p[k]){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]);}
main.c:5:13: error: expected ')' before '[' token 5 | main(w,n,m,c[k],d[k],p[k]){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]);} | ^ | )
s623797062
p00534
C
#define k 1024 #define r(a) for(int i=0;i<a;i++) #define s(a) scanf("%d",a); #define m(a,b) a=a<b?a:b main(w,n,m,c[],d[],p[]){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]);}
main.c:5:13: error: expected ')' before '[' token 5 | main(w,n,m,c[],d[],p[]){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]);} | ^ | )
s663473460
p00534
C
#define k 1024 #define r(a) for(int i=0;i<a;i++) #define s(a) scanf("%d",a); #define m(a,b) a=a<b?a:b int w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]);}
main.c:5:26: error: return type defaults to 'int' [-Wimplicit-int] 5 | int w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]);} | ^~~~ main.c: In function 'main': main.c:3:14: error: implicit declaratio...
s878229450
p00534
C
#define k 1024 #define r(a) for(i=0;i<a;i++) #define s(a) scanf("%d",a); #define m(a,b) a>b&&a=b i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]),exit(0);}
main.c:5:1: warning: data definition has no type or storage class 5 | i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]),exit(0);} | ^ main.c:5:1: error: type defaults to 'int' in declaration of 'i' [-Wimplicit-int] main.c:5:...
s265738933
p00534
C
#define k 1024 #define r(a) for(i=0;i<a;i++) #define s(a) scanf("%d",a); #define m(a,b) a<b?:a=b i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]),exit(0);}
main.c:5:1: warning: data definition has no type or storage class 5 | i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]),exit(0);} | ^ main.c:5:1: error: type defaults to 'int' in declaration of 'i' [-Wimplicit-int] main.c:5:...
s804128389
p00534
C
#define k 1024 #define r(a) for(i=0;i<a;i++) #define s(a) scanf("%d",a); #define m(a,b) a=a<b?a:b i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m)r(n)s(&w),m(p[i],p[i+1]+w*d[n-i-1]);printf("%d\n",p[0]),exit(0);}
main.c:5:1: warning: data definition has no type or storage class 5 | i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m)r(n)s(&w),m(p[i],p[i+1]+w*d[n-i-1]);printf("%d\n",p[0]),exit(0);} | ^ main.c:5:1: error: type defaults to 'int' in declaration of 'i' [-Wimplicit-int] main.c:5:3: ...
s041919329
p00534
C
#define r(a,i)for(i=0;i<a;i++) #define s (scanf("%d",&w),w) #define c(a,b)a=a<b?a:b d[999],p[999];main(i,j,w,n,m){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit();}
main.c:4:1: warning: data definition has no type or storage class 4 | d[999],p[999];main(i,j,w,n,m){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit();} | ^ main.c:4:1: error: type defaults to 'int' in declaration of 'd' [-Wimplicit-int] main.c:4:8: error: t...
s756565214
p00534
C
#define r(a,i)for(i=0;i<a;i++) #define s (scanf("%d",&w),w) #define c(a,b)a<b?:a=b d[999],p[999];main(i,j,w,n,m){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
main.c:4:1: warning: data definition has no type or storage class 4 | d[999],p[999];main(i,j,w,n,m){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);} | ^ main.c:4:1: error: type defaults to 'int' in declaration of 'd' [-Wimplicit-int] main.c:4:8: error: ...
s811386416
p00534
C
#define r(a,i)for(i=0;i<a;i++) #define s (scanf("%d",&w),w) #define c(a,b)a=a<b?a:b d[999],p[999];main(i,j,w,n,m,*q){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)q=p+i,c(*q,q[i]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
main.c:4:1: warning: data definition has no type or storage class 4 | d[999],p[999];main(i,j,w,n,m,*q){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)q=p+i,c(*q,q[i]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);} | ^ main.c:4:1: error: type defaults to 'int' in declaration of 'd' [-Wimplicit-int] main.c:4:8: er...
s502987474
p00534
C
#define r(a,i)for(i=0;i<a;i++) #define s (scanf("%d",&w),w) #define c(a,b)a=a<b?a:b d[999],p[999];main(i,j,w,n,m,q){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)q=p+i,c(*q,q[i]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
main.c:4:1: warning: data definition has no type or storage class 4 | d[999],p[999];main(i,j,w,n,m,q){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)q=p+i,c(*q,q[i]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);} | ^ main.c:4:1: error: type defaults to 'int' in declaration of 'd' [-Wimplicit-int] main.c:4:8: err...
s033719513
p00534
C
#define r(a,i)for(i=0;i<a;i++) #define s (scanf("%d",&w),w); #define c(a,b)a=a<b?a:b d[999],p[999];main(i,j,w,n,m){n=sm=sr(n,i)d[i]=sr(n,i)p[i]=1e9;r(m,j){sr(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
main.c:4:1: warning: data definition has no type or storage class 4 | d[999],p[999];main(i,j,w,n,m){n=sm=sr(n,i)d[i]=sr(n,i)p[i]=1e9;r(m,j){sr(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);} | ^ main.c:4:1: error: type defaults to 'int' in declaration of 'd' [-Wimplicit-int] main.c:4:8: error: type...
s872682695
p00534
C
#include <iostream> #include <vector> #include <cstdio> #define MIN(a, b) ((a) < (b) ? (a) : (b)) long int dp [1000] [1000];//??´????????\?????? int n, m; int d[1000], c[1000];//?????¢????????? long int func(int place, int date){ if (place == n){ return 0; } else if (!dp[place][date]){ if ((n - place) > (m - ...
main.c:2:10: fatal error: iostream: No such file or directory 2 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s985564722
p00534
C
#include<stdio.h> #include<algorithm> #include<string.h> using namespace std; long long int dp[1001][1001]; int main(void) { int N,M,i,j,D[1001],C[1001]; scanf("%d %d", &N, &M); for (i = 1; i <= N; i++) { scanf("%d", &D[i]); } for (j = 1; j <= M; j++) { scanf("%d", &C[j]); } memset(dp, 0x7f, sizeof(dp)); ...
main.c:2:9: fatal error: algorithm: No such file or directory 2 | #include<algorithm> | ^~~~~~~~~~~ compilation terminated.
s749043955
p00534
C
#include <stdio.h> #include <limits.h> typedef signed long long slolo; int N, M, D[1001], C[1001]; slolo min, map[1001][1001]; slolo a(int i, int j, slolo tired) { if (i == N) { if (min > tired) min = tired; return tired; } if ((M-j) < (N-i)) return LONG_MAX; if (map[i][j] != -1) { return a(N,j,tired+map[i]...
main.c: In function 'main': main.c:29:15: error: 'LONG_LONG_MAX' undeclared (first use in this function); did you mean 'LLONG_MAX'? 29 | min = LONG_LONG_MAX; | ^~~~~~~~~~~~~ | LLONG_MAX main.c:29:15: note: each undeclared identifier is reported only once for each funct...
s754332346
p00534
C++
#include <iostream> #include<algorithm> #define INF 100000 using namespace std; int main(void){ int N,M; cin >> N >> M; int *D = new int[N+1]; //距離 int *C = new int[M+1]; //日にち int dp[N+1][M+1]; for(int i=1;i < N+1;i++)cin >> D[i]; for(int i=1;i < M+1;i++)cin >> C[i]; //正し...
a.cc:17:41: error: extended character   is not valid in an identifier 17 | for(int i=1;i < M+1;i++)cin >> C[i]; //正しく値は代入されている | ^ a.cc: In function 'int main()': a.cc:17:41: error: '\U00003000' was not declared in this scope 17 | for(int i=1;i < M+1;i++)cin >...
s925904395
p00534
C++
#include <iostream> #include<algorithm> #define INF 100000 using namespace std; int main(void){ int N,M; cin >> N >> M; int *D = new int[N+1]; //距離 int *C = new int[M+1]; //日にち int dp[N+1][M+1]; for(int i=1;i < N+1;i++)cin >> D[i]; for(int i=1;i < M+1;i++)cin >> C[i]; //正し...
a.cc:17:41: error: extended character   is not valid in an identifier 17 | for(int i=1;i < M+1;i++)cin >> C[i]; //正しく値は代入されている | ^ a.cc: In function 'int main()': a.cc:17:41: error: '\U00003000' was not declared in this scope 17 | for(int i=1;i < M+1;i++)cin >...
s418562716
p00534
C++
#include <iostream> #include<algorithm> #define INF 100000 using namespace std; int main(void){ int N,M; cin >> N >> M; int *D = new int[N+1]; int *C = new int[M+1]; int dp[N+1][M+1]; for(int i=1;i < N+1;i++)cin >> D[i]; for(int i=1;i < M+1;i++)cin >> C[i];  ...
a.cc:17:41: error: extended character   is not valid in an identifier 17 | for(int i=1;i < M+1;i++)cin >> C[i];  | ^ a.cc: In function 'int main()': a.cc:17:41: error: '\U00003000' was not declared in this scope 17 | for(int i=1;i < M+1;i++)cin >> C[i];  ...
s107606942
p00534
C++
#include <iostream> #include<algorithm> #define INF 100000 using namespace std; int main(void){ int N,M; cin >> N >> M; int *D = new int[N+1]; int *C = new int[M+1]; int dp[N+1][M+1]; for(int i=1;i < N+1;i++)cin >> D[i]; for(int i=1;i < M+1;i++)cin >> C[i];  ...
a.cc:17:41: error: extended character   is not valid in an identifier 17 | for(int i=1;i < M+1;i++)cin >> C[i];  | ^ a.cc: In function 'int main()': a.cc:17:41: error: '\U00003000' was not declared in this scope 17 | for(int i=1;i < M+1;i++)cin >> C[i];  ...
s341341344
p00534
C++
#include <iostream> #include<algorithm> #define INF 100000 using namespace std; int main(void){ int N,M; cin >> N >> M; int *D = new int[N+1]; int *C = new int[M+1]; int dp[N+1][M+1]; for(int i=1;i < N+1;i++){cin >> D[i];} for(int i=1;i < M+1;i++){cin >> C[i];}  ...
a.cc:17:43: error: extended character   is not valid in an identifier 17 | for(int i=1;i < M+1;i++){cin >> C[i];}  | ^ a.cc: In function 'int main()': a.cc:17:43: error: '\U00003000' was not declared in this scope 17 | for(int i=1;i < M+1;i++){cin >> C[i];} ...
s995632482
p00534
C++
#include <iostream> #include<algorithm> #define INF 100000 using namespace std; int main(void){ int N,M; cin >> N >> M; int D[N+1]; int C[M+1]; int dp[N+1][M+1]; for(int i=1;i < N+1;i++){cin >> D[i];} for(int i=1;i < M+1;i++){cin >> C[i];}  for(int i...
a.cc:17:43: error: extended character   is not valid in an identifier 17 | for(int i=1;i < M+1;i++){cin >> C[i];}  | ^ a.cc: In function 'int main()': a.cc:17:43: error: '\U00003000' was not declared in this scope 17 | for(int i=1;i < M+1;i++){cin >> C[i];} ...
s040101946
p00534
C++
#include <iostream> #include<algorithm> #define INF 100000 using namespace std; int main(void){ int N,M; cin >> N >> M; int D[N+1]; int C[M+1]; int dp[N+1][M+1]; for(int i=1;i < N+1;i++){cin >> D[i];} for(int i=1;i < M+1;i++){cin >> C[i];}  for(int i ...
a.cc:17:43: error: extended character   is not valid in an identifier 17 | for(int i=1;i < M+1;i++){cin >> C[i];}  | ^ a.cc: In function 'int main()': a.cc:17:43: error: '\U00003000' was not declared in this scope 17 | for(int i=1;i < M+1;i++){cin >> C[i];} ...
s652394514
p00534
C++
#include <stdio.h> #include <stdlib.h> #include <iostream> #include <vector> #include <string> #include <queue> #include <algorithm> #include <math.h> #include <utility> #include <set> #include <map> #define INF INT_MAX #define rep(i,n) for(int i =0;i<n;i++) using namespace std; typedef long long int ll; int main(){ ...
a.cc: In function 'int main()': a.cc:12:13: error: 'INT_MAX' was not declared in this scope 12 | #define INF INT_MAX | ^~~~~~~ a.cc:42:15: note: in expansion of macro 'INF' 42 | int ans = INF; | ^~~ a.cc:12:1: note: 'INT_MAX' is defined in header '<climits>'; this is prob...
s420190661
p00534
C++
#include<bits/stdc++.h> #define REP(i,s,n) for(int i=s;i<n;i++) #define rep(i,n) REP(i,0,n) using namespace std; const int IINF = INT_MAX; int N,M,D[1002],C[1002],dp[1002][1002]; int main(){ cin >> N >> M; rep(i,N) cin >> D[i]; rep(i,M) cin >> C[i]; rep(i,M+1) rep(j,N+1) dp[i][j] = IINF; dp[0][0] = 0; r...
a.cc: In function 'int main()': a.cc:21:10: error: 'day1' was not declared in this scope; did you mean 'day'? 21 | dp[day1+1][city+1] = min(dp[day+1][city+1],dp[day][city]+D[city]*C[day]); | ^~~~ | day
s852975276
p00534
C++
#include <iostream> #include <vector> #include <algorithm> #include <climits> using namespace std; #define INF INT_MAX; int n,m; vector<int> d; vector<int> c; vector< vector<int> > dp; void dfs(int nisu,int shi,int hiro){ if( dp[shi][nisu] == INF ){ dp[shi][nisu] = min(dp[shi][nisu-1],hiro); if(m-nisu>n-shi)...
a.cc: In function 'void dfs(int, int, int)': a.cc:13:28: error: expected primary-expression before ')' token 13 | if( dp[shi][nisu] == INF ){ | ^
s492566819
p00534
C++
#include <iostream> #include <algorithm> #define INF (2 << 28) using namespace std; int N, M, d[1000], c[1001], dp[1001][1001]; int rec(int now, int day) { if(now == N) return 0; if(day > M) return INF; if(~dp[now][day]) return dp[now][day]; return dp[now][day] = min(rec(now, day + 1), rec(...
a.cc: In function 'int main()': a.cc:23:5: error: 'memset' was not declared in this scope 23 | 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 <algorithm> +++ |+#include <cstring> ...
s631828551
p00534
C++
11 21 28 558 915 253 963 539 686 300 665 653 661 637 92 985 880 338 83 846 227 42 598 575 560 184 307 670 909 682 465 73 200 712
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 11 21 | ^~
s210795825
p00534
C++
// JOI14-quest4.cpp : Defines the entry point for the console application. // #include <stdio.h> int dp[1001][1001] = { 0 }; int main(void) { int city_number, day, distance[1001], weather[1001]; scanf_s("%d %d", &city_number, &day); for (int i = 0; i < city_number; i++) { scanf_s("%d", &distance[i]); } for...
a.cc: In function 'int main()': a.cc:13:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 13 | scanf_s("%d %d", &city_number, &day); | ^~~~~~~ | scanf
s192711532
p00534
C++
#include <bits/stdc++.h> using namespace std;int N,M,i.j;main(){cin>>N>>M;vector<int>D(N);for(i=0;i<N;){cin>>D[i++];}vector<int>C(M);for(i=0;i<N;){cin>>D[i++];}vector<vector<int> >dp(M+1,vector<int>(N+1,1<<30));dp[0][0]=0;for(i=1;i<=M;i++){for(j=0;j<=N;j++){if(j==0){dp[i][j]=dp[i-1][j];}else{dp[i][j]=min(dp[i-1][j],dp[...
a.cc:2:30: error: expected initializer before '.' token 2 | using namespace std;int N,M,i.j;main(){cin>>N>>M;vector<int>D(N);for(i=0;i<N;){cin>>D[i++];}vector<int>C(M);for(i=0;i<N;){cin>>D[i++];}vector<vector<int> >dp(M+1,vector<int>(N+1,1<<30));dp[0][0]=0;for(i=1;i<=M;i++){for(j=0;j<=N;j++){if(j==0){dp[i][j]=dp[i-...
s428852493
p00534
C++
1 2 #include <bits/stdc++.h> using namespace std;int N,M,i,j;main(){cin>>N>>M;vector<int>D(N);for(i=0;i<N;i++){cin>>D[i];}vector<int>C(M);for(i=0;i<N;i++){cin>>D[i];}vector<vector<int> >dp(M+1,vector<int>(N+1,(1<<30)));dp[0][0]=0;for(i=1;i<=M;i++){for(j=0;j<=N;j++){if(j==0){dp[i][j]=dp[i-1][j];}else{dp[i][j]=min(dp[i...
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 1 | ^ 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:4: /usr/i...
s354811874
p00534
C++
#include <bits/stdc++.h> #define R(i,n) for(int i=0;i<n;i++) using namespace std; main(){ int N,M,i,j; cin>>N>>M; vector<int>D(N); vector<int>C(M); R(i,N){cin>>D[i];} R(i,M){cin>>C[i];} vector<vector<int> >dp(M+1,vector<int>(N+1,1<<30));dp[0][0]=0; R(i,M){R(0,N+1){ if(j==0){dp[i+1][j]=dp[i][j];} else{dp[i+1][j]=min(dp[...
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:12:10: error: expected unqualified-id before numeric constant 12 | R(i,M){R(0,N+1){ | ^ a.cc:2:24: note: in definition of macro 'R' 2 | #define R(...
s427010940
p00534
C++
#include <cstdio> #define k 1024 #define r(i,a) for(int i=1;i<=a;i++) #define s(a) scanf("%d",&a); #define m(a,b) a<b?a:b int n,m,c[k],d[k],p[k]; int main(){ s(n),s(m); r(i,n)s(c[i]) r(i,m)s(d[i]) r(i,n)p[i]=1<<30; p[1]=0; r(i,m)r(j,n)p[n-j]=m(p[n-j],p[n-j-1]+c[i]*d[j]); printf("%d\n",p[n]); }
a.cc: In function 'int main()': a.cc:8:13: error: expected primary-expression before ',' token 8 | s(n),s(m); | ^
s657034547
p00534
C++
#include <cstdio> #define k 1024 #define r(a) for(int i=0;i<a;i++) #define s(a) scanf("%d",&a); #define m(a,b) a<b?a:b int w,n,m,c[k],d[k],p[k]; int main(){ s(n)s(m) r(n)s(d[i]) r(m)s(c[i]) r(n+1)p[i]=1<<29; p[0]=0; r(m*n)w=n-i%n,p[n-j]=m(p[w],p[w-1]+c[i/n]*d[w-1]); printf("%d\n",p[n]); }
a.cc: In function 'int main()': a.cc:13:27: error: 'j' was not declared in this scope 13 | r(m*n)w=n-i%n,p[n-j]=m(p[w],p[w-1]+c[i/n]*d[w-1]); | ^
s154288363
p00534
C++
#include <cstdio> #define k 1024 #define r(a) for(int i=0;i<a;i++) #define s(a) scanf("%d",&a); #define m(a,b) a<b?a:b w,n,m,c[k],d[k],p[k]; main(){s(n)s(m)r(n)s(d[i])r(m)s(c[i])r(n+1)p[i]=1e9;p[0]=0;r(m*n)w=n-i%n,p[w]=m(p[w],p[w-1]+c[i/n]*d[w-1]);printf("%d\n",p[n]);}
a.cc:6:1: error: 'w' does not name a type 6 | w,n,m,c[k],d[k],p[k]; | ^ a.cc:7:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 7 | main(){s(n)s(m)r(n)s(d[i])r(m)s(c[i])r(n+1)p[i]=1e9;p[0]=0;r(m*n)w=n-i%n,p[w]=m(p[w],p[w-1]+c[i/n]*d[w-1]);printf("%d\n",p[n]);} | ^~~~ a....
s117386646
p00534
C++
#include <cstdio> #define k 1024 #define r(a) for(int i=0;i<a;i++) #define s(a) scanf("%d",&a); #define m(a,b) a<b?a:b int n,m,c[k],d[k],p[k];main(w){s(n)s(m)r(n)s(d[i])r(m)s(c[i])r(n+1)p[i]=1e9;p[0]=0;r(m*n)w=n-i%n,p[w]=m(p[w],p[w-1]+c[i/n]*d[w-1]);printf("%d\n",p[n]);}
a.cc:6:28: error: expected constructor, destructor, or type conversion before '(' token 6 | int n,m,c[k],d[k],p[k];main(w){s(n)s(m)r(n)s(d[i])r(m)s(c[i])r(n+1)p[i]=1e9;p[0]=0;r(m*n)w=n-i%n,p[w]=m(p[w],p[w-1]+c[i/n]*d[w-1]);printf("%d\n",p[n]);} | ^
s297296279
p00534
C++
#include <iostream.h> #define k 1024 #define r(a) for(int i=0;i<a;i++) #define s(a) cin>>*a; #define m(a,b) a<b?a:b int w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i+1]=1e9;r(m*n)w=n-i%n,p[w]=m(p[w],p[w-1]+c[i/n]*d[w-1]);cout<<p[n]<<endl;}
a.cc:1:10: fatal error: iostream.h: No such file or directory 1 | #include <iostream.h> | ^~~~~~~~~~~~ compilation terminated.
s239417465
p00534
C++
#import<stdio> #define k 1024 #define r(a) for(int i=0;i<a;i++) #define s(a) scanf("%d",a); #define m(a,b) a<b?a:b int w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,p[w]=m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]);}
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 1 | #import<stdio> | ^~~~~~ a.cc:1:8: fatal error: stdio: No such file or directory 1 | #import<stdio> | ^~~~~~~ compilation terminated.
s359728639
p00534
C++
#import<cstdio> #define k 1024 #define r(a) for(int i=0;i<a;i++) #define s(a) scanf("%d",a); #define m(a,b) a<b?a:b main(w,n,m,c[k],d[k],p[k]){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,p[w]=m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]);}
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 1 | #import<cstdio> | ^~~~~~ a.cc:6:5: error: expected constructor, destructor, or type conversion before '(' token 6 | main(w,n,m,c[k],d[k],p[k]){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,p[w]=m(p[w],p[w+1]+c[i/n]*d[n-w...
s762984768
p00534
C++
#import<cstdio> #define k 1024 #define r(a) for(int i=0;i<a;i++) #define s(a) scanf("%d",a); #define m(a,b) a<b?a:b int w,n,m,c[k],d[k],p[k];main{s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,p[w]=m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]);}
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 1 | #import<cstdio> | ^~~~~~ a.cc:6:26: error: 'main' does not name a type 6 | int w,n,m,c[k],d[k],p[k];main{s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,p[w]=m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]);} | ...