submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s592345865
p00447
C++
a[200],b[200],c[1000],d[1000],n,m,i,j,k,t=0,w,q;main(){for(;;){scanf("%d",&n);if(!n)break;for(i=0;i<n;i++){scanf("%d %d",&a[i],&b[i]);}scanf("%d",&m);for(i=0;i<m;i++){scanf("%d %d",&c[i],&d[i]);}for(i=0;i<m;i++){w=c[i]-a[0];q=d[i]-b[0];for(j=1;j<n;j++){for(k=0;k<m;k++){if(a[j]+w==c[k]){if(b[j]+q==d[k]){t++;break;}}}}if...
a.cc:1:1: error: 'a' does not name a type 1 | a[200],b[200],c[1000],d[1000],n,m,i,j,k,t=0,w,q;main(){for(;;){scanf("%d",&n);if(!n)break;for(i=0;i<n;i++){scanf("%d %d",&a[i],&b[i]);}scanf("%d",&m);for(i=0;i<m;i++){scanf("%d %d",&c[i],&d[i]);}for(i=0;i<m;i++){w=c[i]-a[0];q=d[i]-b[0];for(j=1;j<n;j++){for(k=0;k<m;k++){...
s285217185
p00447
C++
#include <cstdio> #include <vector> using namespace std; int main() { while(true) { int m, n; vector<pair<int, int> > ms, ns; scanf("%d", &m); if(m == 0) break; ms.resize(m); for(int i = 0; i < m; ++i) scanf("%d%d", &ms[i].first, &ms[i].second); scanf("%d", &n); ns.resize(n); for(int i = 0; i < n; ++i) scanf("%d%d", ...
a.cc: In function 'int main()': a.cc:27:5: error: 'binary_search' was not declared in this scope 27 | if(!binary_search(ns.begin(), ns.end(), make_pair(ms[i].first + dx, ms[i].second + dy))) | ^~~~~~~~~~~~~
s892287777
p00447
C++
a[200],b[200],c[1000],d[1000],n,m,i,j,k,t;main(){for(;scanf("%d",&n)&&n;){for(i=0;i<n;i++){scanf("%d%d",&a[i],&b[i]);}scanf("%d",&m);for(i=0;i<m;i++){scanf("%d%d",&c[i],&d[i]);}for(i=0;i<m;i++){for(j=1;j<n;j++){for(k=0;k<m;k++){if(a[j]+c[i]-a[0]==c[k]){if(b[j]+d[i]-b[0]==d[k]){t++;}}}}if(t==n-1){printf("%d %d\n",c[i]-a...
a.cc:1:1: error: 'a' does not name a type 1 | a[200],b[200],c[1000],d[1000],n,m,i,j,k,t;main(){for(;scanf("%d",&n)&&n;){for(i=0;i<n;i++){scanf("%d%d",&a[i],&b[i]);}scanf("%d",&m);for(i=0;i<m;i++){scanf("%d%d",&c[i],&d[i]);}for(i=0;i<m;i++){for(j=1;j<n;j++){for(k=0;k<m;k++){if(a[j]+c[i]-a[0]==c[k]){if(b[j]+d[i]-b[0]...
s197880866
p00447
C++
#include<iostream> #include<sstream> #include<cstdio> #include<cstdlib> #include<vector> #include<string> #include<stack> #include<queue> #include<deque> #include<set> #include<map> #include<algorithm> #include<functional> #include<utility> #include<cmath> #include<ctime> #include<complex> using namespace std; #defin...
a.cc: In function 'int main()': a.cc:46:21: error: redeclaration of 'int x' 46 | int x=0; int y; | ^ a.cc:29:25: note: 'int x' previously declared here 29 | int m,n,x,y; | ^ a.cc:46:30: error: redeclaration of 'int y' 46 | ...
s708140794
p00447
C++
#include <iostream> #include <vector> using namespace std; #define MAX 200 struct Point{ int x, y; bool operator < (const Point p)const{ if(x != p.x){ return x < p.x; }else{ return y < p.y; } } }; int n, m; Point star[MAX], pict[MAX*5]; Point search(){ Point res; vector<Point> v;...
a.cc: In function 'Point search()': a.cc:35:3: error: 'sort' was not declared in this scope; did you mean 'short'? 35 | sort(v.begin(),v.end()); | ^~~~ | short
s913852437
p00448
Java
import java.util.Scanner; public class Solve { private static boolean debug = false; private static int r; private static int c; private static int[][] senbeis; private static int URA = 0, OMOTE = 1; @SuppressWarnings("unused") private static void debug(String format, Object... objects) { if (!debu...
Main.java:3: error: class Solve is public, should be declared in a file named Solve.java public class Solve { ^ 1 error
s672684931
p00448
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner scn = new Scanner(System.in); int row,col; int[] cols; int cnt_min = 10*10000; row = scn.nextInt(); col = scn.nextInt(); cols = new int[col]; for(int i=0; i<row; i++) for(int j=0; j<col; j++) cols[j] = cols...
Main.java:23: error: bad operand types for binary operator '&' if(column&1 == 0) ^ first type: int second type: boolean 1 error
s854263817
p00448
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner scn = new Scanner(System.in); int row,col; int[] cols; int cnt_min = 10*10000; while(true){ row = scn.nextInt(); col = scn.nextInt(); if(row==0&&col==0) break; cols = new int[col]; for(int i=0; i<row; i++) for(in...
Main.java:26: error: bad operand types for binary operator '&' if(column&1 == 0) ^ first type: int second type: boolean 1 error
s901678917
p00448
Java
import java.util.*; public class aoj525{ public static void main(String[] args){ Scanner scn = new Scanner(System.in); int row,col; int[] cols; int cnt_min = 10*10000; while(true){ row = scn.nextInt(); col = scn.nextInt(); if(row==0&&col==0) break; cols = new int[col]; for(int i=0;...
Main.java:3: error: class aoj525 is public, should be declared in a file named aoj525.java public class aoj525{ ^ 1 error
s483604249
p00448
Java
import java.util.*; public class aoj525{ public static void main(String[] args){ Scanner scn = new Scanner(System.in); int row,col; int[] cols; int cnt_min; while(true){ cnt_min = 10*10000; row = scn.nextInt(); col = scn.nextInt(); if(row==0&&col==0) break; cols = new int[col]; ...
Main.java:3: error: class aoj525 is public, should be declared in a file named aoj525.java public class aoj525{ ^ 1 error
s568636553
p00448
C
#include <cstdio> #include <algorithm> using namespace std; int r, c, a[15][10005], maxn; void dfs(int x) { if (x == r + 1) { int temp = 0; for (int j = 1; j <= c; j++) { int s = 0; for (int i = 1; i <= r; i++) if (a[i][j] == 1) ...
main.c:1:10: fatal error: cstdio: No such file or directory 1 | #include <cstdio> | ^~~~~~~~ compilation terminated.
s346570680
p00448
C
#include<stdio.h> int r,c; char senbei[10][10000],check[10]; long max; void search(int i){ if(i>=r){ long stock; stock=count(); max=(stock>max)?stock:max; return; } check[i]=1; search(i+1); check[i]=0; search(i+1); } long count(){ int i,j; char num; long ans=0; for(i=0;i<c;i++){ num=0; for(j=0...
main.c: In function 'search': main.c:11:23: error: implicit declaration of function 'count' [-Wimplicit-function-declaration] 11 | stock=count(); | ^~~~~ main.c: At top level: main.c:21:6: error: conflicting types for 'count'; have 'long int()' 21 | long count(){ ...
s800271706
p00448
C
#include<stdio.h> int r,c; char senbei[10][10000],check[10]; long max; void search(int i){ if(i>=r){ long stock; stock=count(); max=(stock>max)?stock:max; return; } check[i]=1; search(i+1); check[i]=0; search(i+1); } long count(){ int i,j; char num; long ans=0; for(i=0;i<c;i++){ num=0; for(j=0...
main.c: In function 'search': main.c:11:23: error: implicit declaration of function 'count' [-Wimplicit-function-declaration] 11 | stock=count(); | ^~~~~ main.c: At top level: main.c:21:6: error: conflicting types for 'count'; have 'long int()' 21 | long count(){ ...
s768185877
p00448
C
#include<cstdio> #include<cstring> #include<algorithm> #include<queue> #include<string> #include<cstring> #include<iomanip> #include<iostream> #include<stack> #include<cmath> #include<map> #include<vector> #define ll long long #define inf 0x3f3f3f3f #define INF 1000000000 #define bug1 cout<<"bug1"<<endl; #define bug2 c...
main.c:1:9: fatal error: cstdio: No such file or directory 1 | #include<cstdio> | ^~~~~~~~ compilation terminated.
s648831296
p00448
C
#include<cstdio> #include<cstring> #include<iostream> #include<algorithm> using namespace std; int r,c,ans; bool pan[12][10002]; bool dis[10002]; void dfs(int x) { if(x>r) { int cnt=0; for(int j=1;j<=c;j++) { int sum=0; for(int i=1;i<=r;i++) if(dis...
main.c:1:9: fatal error: cstdio: No such file or directory 1 | #include<cstdio> | ^~~~~~~~ compilation terminated.
s461608048
p00448
C
//Garden Luba thinks about #include <iostream> #include <cstdio> using namespace std; int a[120]; int n,k; int main(){ scanf("%d%d",&n,&k); int i; for(i = 0; i < n; i++) scanf("%d",&a[i]); int minh = 999999; for(i = 0; i < n; i++){ if(k%a[i]==0){ ...
main.c:2:10: fatal error: iostream: No such file or directory 2 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s688125238
p00448
C
#include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <ctime> #include <iostream> #include <algorithm> #include <sstream> #include <string> #include <vector> #include <queue> #include <stack> #include <map> #include <set> #include <utility> #include <cctype> #include <numeric> using namespac...
main.c:1:10: fatal error: cstdio: No such file or directory 1 | #include <cstdio> | ^~~~~~~~ compilation terminated.
s369578085
p00448
C
#include<stdio.h> #include<stdlib.h> #define RMAX 10 #define CMAX 10000 int main(void){ int R,C; char *Buffer=NULL; int Osenbei[RMAX][CMAX]; int RSum[RMAX],CSum[CMAX]; int Count,Count2,GoodSenbei=0; int Best=0; //入力 while(1){ //行列サイズ入力 scanf("%d %d%*c",&R,&C); if(R==0&&C==0){return 0;}//終了判定 for(Cou...
main.c: In function 'main': main.c:49:67: error: expected ';' before '}' token 49 | GoodSenbei+=Osenbei[Count][Count2] | ^ | ; 50 | ...
s745929229
p00448
C
//Osenbei #include <stdio.h> #include <string.h> int A[10001]; int main(){ int C, R, tmp, mask, ans, a, b, c, i, j; while(true){ scanf("%d %d", &C, &R); if((C | R) == 0){ break; } memset(A, 0, sizeof(A)); for(i = 0; i < C; ++i){ for(j = 0; j < R; ++j){ scanf("%d", &tmp); ...
main.c: In function 'main': main.c:8:9: error: 'true' undeclared (first use in this function) 8 | while(true){ | ^~~~ main.c:4:1: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>' 3 | #include <string.h> +++ |+#include <stdbool.h> 4 ...
s185809858
p00448
C++
#include <iostream> using namespace std; int main(){ int R, C; static int s[10][10000]; while(cin >> R >> C){ for(int i=0;i<R;i++){ for(int j=0;j<C;j++) cin >> s[i][j]; } int res = 0; for(int b=0;b<(1<<R);b++){ int sum = 0; for(int j=0;j<C;j++){ int cnt = 0; for(int i=0;i<R;i++){ if(b...
a.cc: In function 'int main()': a.cc:29:1: error: return-statement with no value, in function returning 'int' [-fpermissive] 29 | return; | ^~~~~~
s600324057
p00448
C++
#include<iostream> #define MAX_C 10000 using namespace std; int r,c; int senbei[1<<10][MAX_C+1]; int bitCnt(int n){ int cnt=0; while(n>0){ if(n%2==1)cnt++; n/=2; } if(r-cnt<cnt){ return r-cnt; }else{ return cnt; } } int rec(int s,int n){ if(senbei[s][n]!=-1){ return senbei[s][n]; }...
a.cc: In function 'int main()': a.cc:55:3: error: 'memset' was not declared in this scope 55 | memset(tmp,0,sizeof(tmp)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> +++ |+#include <cstring> 2 |...
s131460248
p00448
C++
#include<iostream> #include<map> #define MAX_C 10000 using namespace std; int r,c; int senbei[1<<10][MAX_C+1]; int bitCnt(int n){ int cnt=0; while(n>0){ if(n%2==1)cnt++; n/=2; } if(r-cnt<cnt){ return r-cnt; }else{ return cnt; } } int rec(int s,int n){ if(senbei[s][n]!=-1){ return sen...
a.cc: In function 'int main()': a.cc:56:3: error: 'memset' was not declared in this scope 56 | memset(tmp,0,sizeof(tmp)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<map> +++ |+#include <cstring> 3 | #def...
s662969755
p00448
C++
#include<iostream> #include<map> #define MAX_C 10000 using namespace std; int r,c; int senbei[1<<10][MAX_C+1]; int bitCnt(int n){ int cnt=0; while(n>0){ if(n%2==1)cnt++; n/=2; } if(r-cnt<cnt){ return r-cnt; }else{ return cnt; } } int rec(int s,int n){ if(senbei[s][n]!=-1){ return sen...
a.cc: In function 'int main()': a.cc:56:3: error: 'memset' was not declared in this scope 56 | memset(tmp,0,sizeof(tmp)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<map> +++ |+#include <cstring> 3 | #def...
s353897375
p00448
C++
#include<iostream> #define MAX_C 10000 using namespace std; int r,c; int senbei[1<<10][MAX_C+1]; int bitCnt(int n){ int cnt=0; while(n>0){ if(n%2==1)cnt++; n/=2; } if(r-cnt<cnt){ return r-cnt; }else{ return cnt; } } int rec(int s,int n){ if(senbei[s][n]!=-1){ return senbei[s][n]; }...
a.cc: In function 'int main()': a.cc:56:5: error: 'memset' was not declared in this scope 56 | memset(tmp,0,sizeof(tmp)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> +++ |+#include <cstring> ...
s174105338
p00448
C++
/* AOJ 0525 * * http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0525 * */ //include #include<bits/stdc++.h> //using using namespace std; //define static const typedef #define FOR(i, s, n) for(int (i) = (s); (i) < (n); (i)++) #define REP(i, n) FOR((i), 0, (n)) #define ALL(a) (a).begin(), (a).end() #defi...
a.cc: In function 'void solve(VVI)': a.cc:48:13: error: no matching function for call to 'std::set<std::vector<std::vector<char> > >::count(VVI&)' 48 | if(a.count(ar)){ | ~~~~~~~^~~~ In file included from /usr/include/c++/14/set:63, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++....
s807305565
p00448
C++
/* AOJ 0525 * * http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0525 * */ //include #include<bits/stdc++.h> //using using namespace std; //define static const typedef #define FOR(i, s, n) for(int (i) = (s); (i) < (n); (i)++) #define REP(i, n) FOR((i), 0, (n)) #define ALL(a) (a).begin(), (a).end() #defi...
a.cc: In function 'void solve()': a.cc:64:11: error: 'ar' was not declared in this scope; did you mean 'a'? 64 | solve(ar); | ^~ | a
s680132007
p00448
C++
#include <cstdio> #include <algorithm> #include <bitset> using namespace std; const int MAX_R = 10; const int MAX_C = 10000; //input int R, C; bitset<MAX_C> a[MAX_R]; int ans; void dfs(int k){ if(k == R){ //row certain int result = 0; //cur max value for(int j = 0; j < C; j +...
a.cc: In function 'int main(int, const char**)': a.cc:53:30: error: 'tmp' was not declared in this scope; did you mean 'temp'? 53 | scanf("%d", &tmp); | ^~~ | temp
s345178569
p00448
C++
#include<iostream> #include<algorithm> int r, c, res = 0; int data[11][10001], buf[11][10001]; void reverse(int *ose){ for (int i = 0; i < c; i++){ ose[i] = (ose[i] + 1) % 2; } } int main(){ while (std::cin >> r >> c, r || c){ for (int i = 0; i < r; i++){ for (int j = 0; j < c; j++){ std::cin >> data[...
a.cc: In function 'int main()': a.cc:24:25: error: 'memcpy' was not declared in this scope 24 | memcpy(buf, data, sizeof(buf)); | ^~~~~~ a.cc:3:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #in...
s203063927
p00448
C++
#include<iostream> #include<stdio.h> #include<math.h> #include <iomanip> #include <map> #include <set> using namespace std; #define FR(i,k,N) for(int i=k; i<N;i++) #define REP(i,N) for(int i=0; i<N;i++) int a,b; int main(){ //8bit??§131?????¨??? /* cout<<"b1="<<b1<<endl; cout<<...
a.cc: In function 'int main()': a.cc:31:13: error: 'bitset' was not declared in this scope 31 | bitset<10> senbei(i); | ^~~~~~ a.cc:7:1: note: 'std::bitset' is defined in header '<bitset>'; this is probably fixable by adding '#include <bitset>' 6 | #include <set> +++ |+#include...
s770388475
p00448
C++
#include<iostream> #include<stdio.h> #include<math.h> #include <iomanip> #include <map> #include <set> using namespace std; #define FR(i,k,N) for(int i=k; i<N;i++) #define REP(i,N) for(int i=0; i<N;i++) int a,b; int main(){ //8bit??§131?????¨??? /* cout<<"b1="<<b1<<endl; cout<<...
a.cc: In function 'int main()': a.cc:31:13: error: 'bitset' was not declared in this scope 31 | bitset<10> senbei(i); | ^~~~~~ a.cc:7:1: note: 'std::bitset' is defined in header '<bitset>'; this is probably fixable by adding '#include <bitset>' 6 | #include <set> +++ |+#include...
s530369670
p00448
C++
#include?<iostream> #include?<bitset> #include?<algorithm> ? using?namespace?std; ? bitset<10000>?cookie[10]; ? int?main() { ? ????int?R,?C; ????while(cin?>>?R?>>?C?&&?R?>?0) ????{ ????????int?i,?j; ????????for?(i?=?0;?i?<?R;?++i) ????????{ ????????????for?(j?=?0;?j?<?C;?++j) ????????????{ ????????????????bool?upwards;...
a.cc:1:9: error: #include expects "FILENAME" or <FILENAME> 1 | #include?<iostream> | ^ a.cc:2:9: error: #include expects "FILENAME" or <FILENAME> 2 | #include?<bitset> | ^ a.cc:3:9: error: #include expects "FILENAME" or <FILENAME> 3 | #include?<algorithm> | ^ a.cc:4...
s789089258
p00448
C++
#include "bits/stdc++.h" using namespace std; #define rep(i,n) for(int i=0;i<(int)(n);i++) int main(){ int n,m; while(cin>>n>>m){ if(n==0&&m==0)break; int data[11][10010]; rep(i,n)rep(j,m)cin>>data[i][j]; int ans=0; rep(i,1<<n){ int t=0; rep(j,m){ int a=0; rep(k...
a.cc: In function 'int main()': a.cc:17:18: error: expected ';' before 'if' 17 | rep(k,n)a | ^ | ; 18 | if((i&(1<<k))!=0)a+=!data[k][j]; | ~~ a.cc:19:11: error: 'else' without a previous 'if' 19 | else a+=data[k][j]...
s594767438
p00448
C++
#include"bits/stdc++.h" using namespace std;#define rep(i,n) for(inti=0;i<(int)(n);i++) int main(){int n,m,d[11][10010],r,t,a;while(cin>>n>>m&&n&&m){rep(i,n)rep(j,m)cin>>d[i][j];r=0;rep(i,1<<n){t=0;rep(j,m){a=0;rep(k,n)a+=(d[k][j]+!!(i&(1<<k)))%2;t+=max(a,n-a);}r=max(r,t);}cout<<r<<endl;}}
a.cc:1:25: warning: extra tokens at end of #include directive 1 | #include"bits/stdc++.h" using namespace std;#define rep(i,n) for(inti=0;i<(int)(n);i++) int main(){int n,m,d[11][10010],r,t,a;while(cin>>n>>m&&n&&m){rep(i,n)rep(j,m)cin>>d[i][j];r=0;rep(i,1<<n){t=0;rep(j,m){a=0;rep(k,n)a+=(d[k][j]+!!(i&(1<<k)))%2;t+=...
s008807312
p00448
C++
#include <cstdio> #include <algorithm> using namespace std; int bd[10][1000]; int main(){ int r, c; scanf_s(" %d %d", &r, &c); for (int i = 0; i < r; i++){ for (int j = 0; j < c; j++){ scanf_s(" %d", &bd[i][j]); } } int ans = -1; int up = (1 << r); for (int sl = 0; sl < up; sl++){ int h = sl; for (...
a.cc: In function 'int main()': a.cc:10:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 10 | scanf_s(" %d %d", &r, &c); | ^~~~~~~ | scanf
s660669971
p00448
C++
#include <iostream> using namespace std; int r,c; int max_on; int row_on[11]; int col_on[10005]; bool grid[11][10005]; bool flip_pattern[11]; int cur_on = 0; // void setFlipStatus(unsigned int p){ for (int i = 0; i<r; ++i) { if (p & (1<<i)) { flip_pattern[i] = true; } else ...
a.cc: In function 'int main()': a.cc:51:9: error: 'memset' was not declared in this scope 51 | memset(flip_pattern, 0, sizeof(flip_pattern)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> ...
s126168715
p00448
C++
#include <iostream> using namespace std; int r,c; int max_on; int row_on[11]; int col_on[10005]; bool grid[11][10005]; bool flip_pattern[11]; int cur_on = 0; // void setFlipStatus(unsigned int p){ for (int i = 0; i<r; ++i) { if (p & (1<<i)) { flip_pattern[i] = true; } else ...
a.cc: In function 'int main()': a.cc:51:9: error: 'memset' was not declared in this scope 51 | memset(flip_pattern, 0, sizeof(flip_pattern)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> ...
s520614380
p00448
C++
#include <iostream> #include <algorithm> using namespace::std; int ans = 0; void solve(int** osenbei, int i, const int c, const int r, int temp){ int bef = 0; int aft = 0; for(int i = 0; i < c; i++){ int bef = 0; int aft = 0; for(int j = 0; j < r; j++){//i??????????????? if(osenbei[i][j] == 1){ osenb...
a.cc: In function 'int main()': a.cc:79:15: error: redeclaration of 'int** osenbei' 79 | int** osenbei = new int*[c]; | ^~~~~~~ a.cc:78:15: note: 'int** osenbei' previously declared here 78 | int** osenbei = new int*[c]; | ^~~~~~~
s682319397
p00448
C++
#include <vector> #include <algorithm> #include <set> #include <map> #include <queue> #include <stack> #include <iostream> #include <cstdio> #include <cmath> #include <cstring> using namespace std; int sen[10][10000]; int w,h,ans,mai,x; int main() { while(1){ cin>>h>>w; if(!h&&!w) return; ans=0; for(int i=0;i<h;i++) ...
a.cc: In function 'int main()': a.cc:18:12: error: return-statement with no value, in function returning 'int' [-fpermissive] 18 | if(!h&&!w) return; | ^~~~~~
s402055444
p00448
C++
#include "iostream" #include "algorithm" using namespace std; int H, W; bool status[10][10000]; bool gap[10]; int box; int num; int ans; int main() { cin >> H >> W; while (H != 0 && W != 0) { for (int i = 0; i < H; i++) { for (int j = 0; j < W; j++) { cin >> status[i][j]; } } for (int j = 0; j < W; ...
a.cc: In function 'int main()': a.cc:28:37: error: 'pow' was not declared in this scope 28 | for (int n = 1; n < pow(2,H); n++) { | ^~~
s841306267
p00448
C++
#include "iostream" #include "algorithm" using namespace std; int H, W; bool status[10][10000]; bool gap[10]; int box; int num; int ans; int main() { cin >> H >> W; while (H != 0 && W != 0) { for (int i = 0; i < H; i++) { for (int j = 0; j < W; j++) { cin >> status[i][j]; } } for (int j = 0; j < W; ...
a.cc: In function 'int main()': a.cc:28:37: error: 'pow' was not declared in this scope 28 | for (int n = 1; n < pow(2,H); n++) { | ^~~
s521824816
p00448
C++
#include "iostream" #include "algorithm" using namespace std; int H, W; int status[10][10000]; int gap[10]; int box; int num; int ans; int main() { cin >> H >> W; while (H != 0 && W != 0) { for (int i = 0; i < H; i++) { for (int j = 0; j < W; j++) { cin >> status[i][j]; } } for (int j = 0; j < W; j+...
a.cc: In function 'int main()': a.cc:28:37: error: 'pow' was not declared in this scope 28 | for (int n = 1; n < pow(2,H); n++) { | ^~~
s142923701
p00448
C++
#include <bits/stdc++> using namespace std; using ll=long long; using ull=unsigned long long; const char en='?\n'; int main(){ int r,c,buf; bool st[10][10000]; cin>>r>>c; for(int i=0;i<r;i++){ for(int k=0;k<c;k++){
a.cc:1:10: fatal error: bits/stdc++: No such file or directory 1 | #include <bits/stdc++> | ^~~~~~~~~~~~~ compilation terminated.
s752868177
p00448
C++
#include "bits/stdc++.h" using namespace std; using ll=long long; using ull=unsigned long long; const char en='?\n'; int main(){ int r,c,buf; bool st[10][10000]; cin>>r>>c; for(int i=0;i<r;i++){ for(int k=0;k<c;k++){ cin>>buf; st[r][c]=buf; } } int result=0,count; for(knt flag=0;flag<(1<<r);i++...
a.cc:7:15: warning: multi-character character constant [-Wmultichar] 7 | const char en='?\n'; | ^~~~~ a.cc:7:15: warning: overflow in conversion from 'int' to 'char' changes value from '16138' to '10' [-Woverflow] a.cc: In function 'int main()': a.cc:22:13: error: 'knt' was not declared in this ...
s935803183
p00448
C++
#include "bits/stdc++.h" using namespace std; using ll=long long; using ull=unsigned long long; const char en='?\n'; int main(){ int r,c,buf; bool st[10][10000]; cin>>r>>c; for(int i=0;i<r;i++){ for(int k=0;k<c;k++){ cin>>buf; st[r][c]=buf; } } int result=0,count; for(int flag=0;flag<(1<<r);i++...
a.cc:7:15: warning: multi-character character constant [-Wmultichar] 7 | const char en='?\n'; | ^~~~~ a.cc:7:15: warning: overflow in conversion from 'int' to 'char' changes value from '16138' to '10' [-Woverflow] a.cc: In function 'int main()': a.cc:22:36: error: 'i' was not declared in this sc...
s491171526
p00448
C++
#include <iostream> #include <string> #include <cstdio> #include <cmath> #include <algorithm> using namespace std; int s[15][10005]; int m,n; int maxn=0; void dfs(int x ) { if(x==m+1) { int term=0; for(int i=1; i<=n; i++) { int sum1=0; for(int j=1; j<=m; j++) ...
a.cc: In function 'int main()': a.cc:44:9: error: 'ans' was not declared in this scope; did you mean 'abs'? 44 | ans=0; | ^~~ | abs
s777451537
p00448
C++
/* * AOJ 0525: Osenbei * ?¢???????R???C?????????????????????0???1???????¬?????????´????????´????????????????????¬????±??????????????????°????°????0??? * ?±?????????????????´¢???????????? * ???????????????10???????????????????????¬????????¨??¨????????????????????¶????????????1????????°???????????¬?????????????°?0???...
a.cc: In function 'void solve()': a.cc:22:5: error: 'memset' was not declared in this scope 22 | memset(one, 0, sizeof(one)); | ^~~~~~ a.cc:11:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 10 | #include <iostream> +++ |+#include <cstrin...
s688059338
p00448
C++
#include <cstdio> int R,C; // (1 <= R <= 10, 1 <= C <= 10 000) const int MAX_ROW = 10; const int MAX_COL = 10000; bool is_flipped[MAX_ROW + 1][MAX_COL + 1]; void flip(int row) { for(int c=0;c<C;c++) is_flipped[row][c] = !is_flipped[row][c]; } int solve() { int min_score = R*C; for(int i=0;i<1<<R;i++) { for(in...
a.cc: In function 'int solve()': a.cc:26:39: error: 'min' is not a member of 'std' 26 | score += std::min(column_sum, R-column_sum); | ^~~ a.cc:28:34: error: 'min' is not a member of 'std' 28 | min_score = std::min(min_score,score...
s531752122
p00448
C++
#include<algorithm> #include<iostream> #include<bitset> using namespace std; const int MAX_R=10; const int MAX_C=1000; int R,C; bitset<MAX_C> a[MAX_R]; int ans; void check(int k) { if(k==R) { int result=0; for(int j=0;j<C;j++) { int num=0; for(int i=0;i<R;i++) if(a[i][j]) num++; } result+=max...
a.cc: In function 'void check(int)': a.cc:22:29: error: 'num' was not declared in this scope; did you mean 'enum'? 22 | result+=max(num,R-num); | ^~~ | enum
s027871613
p00448
C++
//??????????¨????????????????????¬¬??????????¢? //??????????´¢+DFS ?????? #include <iostream> #define MAX_N 10 #define MAX_M 10000 using namespace std; bool ex[MAX_N][MAX_M]; int n,m,ans void Dfs(int x) { if(x==n) { int sum=0; for(int j=0;j<m;j++) { int right=0; for(int i...
a.cc:9:1: error: expected initializer before 'void' 9 | void Dfs(int x) | ^~~~ a.cc: In function 'int main()': a.cc:37:9: error: 'ans' was not declared in this scope; did you mean 'abs'? 37 | ans=0; | ^~~ | abs a.cc:44:13: error: 'Dfs' was not declared in this scope 4...
s187442917
p00448
C++
#include<stdio.h> int main(void){ int i, j, k, l, R, C, count0, count1, Count[10], a[10][10000]; scanf("%d %d", &R, &C); while ( 1 ) { count0 = count1 = 0; for ( i = 0; i < R; i++ ) { for ( j = 0; j < C; j++ ) { scanf("%d", &a[i][j]); Count[i] += a...
a.cc: In function 'int main()': a.cc:35:2: error: expected '}' at end of input 35 | } | ^ a.cc:2:15: note: to match this '{' 2 | int main(void){ | ^
s776865315
p00448
C++
#include <iostream> #include <stdio.h> #include <string.h> #include <string> #include <functional> #include <algorithm> #include <string> #include <vector> #include <algorithm> #include <time.h> #include <stdlib.h> #include <math.h> using namespace std; int main (void) { long C,c,n,m,a[10000][10000],z[10000],o[10000...
a.cc: In function 'int main()': a.cc:26:17: error: break statement not within loop or switch 26 | break; | ^~~~~ a.cc:30:17: error: break statement not within loop or switch 30 | break; | ^~~~~ a.cc: At global scope: a.cc:127:1: error: ex...
s602280528
p00448
C++
#include <iostream> #include <stdio.h> #include <string.h> #include <string> #include <functional> #include <algorithm> #include <string> #include <vector> #include <algorithm> #include <time.h> #include <stdlib.h> #include <math.h> using namespace std; int main (void) { long C,c,n,m,a[10000][10000],z[10000],o[10000...
a.cc: In function 'int main()': a.cc:26:17: error: break statement not within loop or switch 26 | break; | ^~~~~ a.cc:30:17: error: break statement not within loop or switch 30 | break; | ^~~~~ a.cc: At global scope: a.cc:127:1: error: ex...
s513272270
p00448
C++
#include <iostream> #include <stdio.h> #include <string.h> #include <string> #include <functional> #include <algorithm> #include <string> #include <vector> #include <algorithm> #include <time.h> #include <stdlib.h> #include <math.h> using namespace std; int main (void) { long C,c,n,m,a[10000][10000],z[10000],o[10000...
a.cc: In function 'int main()': a.cc:26:17: error: break statement not within loop or switch 26 | break; | ^~~~~ a.cc:30:17: error: break statement not within loop or switch 30 | break; | ^~~~~ a.cc: At global scope: a.cc:127:1: error: ex...
s187104206
p00448
C++
#include <iostream> #include <vector> #include <string> #include <algorithm> #include <cmath> #include <map> #include <stack> #include <queue> #include <cstdio> #include <cstdlib> using namespace std; int a[102][10002], f[10], n, m; int calc(int f[10]){ int ans = 0; for(int i = 0;i < m;i++){ int res = 0; for(in...
a.cc: In function 'int solve(int, int)': a.cc:31:41: error: 'c' was not declared in this scope 31 | for(int i = 0;i < 10;i++)f[i] = c[i]; | ^
s520428569
p00448
C++
#include <iostream> #include <algorithm> using namespace std; const int MAX_R=10; const int MAX_C=10000; int pan[MAX_R][MAX_C]; int r,c; void reverse(int row){ for(int i=0; i<c; i++){ if(pan[row][i]==0) pan[row][i]=1; else pan[row][i]=0; } } int dfs(int row, int rev){ if(rev) reverse(ro...
a.cc: In function 'int dfs(int, int)': a.cc:34:5: error: 'a' was not declared in this scope 34 | a=dfs(row+1, 0); | ^ a.cc:35:5: error: 'b' was not declared in this scope 35 | b=dfs(row+1, 1); | ^
s705626067
p00448
C++
/*直接对行用dfs:TLE*/ #include <iostream> #include <algorithm> using namespace std; const int MAX_R=10; const int MAX_C=10000; int pan[MAX_R][MAX_C]; int r,c; void reverse(int row){ for(int i=0; i<c; i++){ if(pan[row][i]==0) pan[row][i]=1; else pan[row][i]=0; } } int dfs(int row){ if(rev) re...
a.cc: In function 'int dfs(int)': a.cc:21:8: error: 'rev' was not declared in this scope 21 | if(rev) reverse(row); | ^~~ a.cc:23:12: error: 'rev' was not declared in this scope 23 | if(rev) reverse(row); | ^~~
s460545930
p00448
C++
#include <iostream> #include <algorithm> using namespace std; const int MAX_R=10; const int MAX_C=10000; int pan[MAX_R][MAX_C]; int r,c; void reverse(int row){ for(int i=0; i<c; i++){ if(pan[row][i]==0) pan[row][i]=1; else pan[row][i]=0; } } int dfs(int row){ if(row==(r-1)){ if(...
a.cc: In function 'int dfs(int)': a.cc:21:12: error: 'rev' was not declared in this scope 21 | if(rev) reverse(row); | ^~~
s319568812
p00448
C++
#include<iostream> #include<cstring> #include<cstdio> #include<cmath> #include<algorithm> using namespace std; bool s[15][10005]= {0}; int n, m; int dfs(int x) { if(x==n+1) { int sum=0; int term=0; for(int j=1;j<=m;j++) { fo...
a.cc: In function 'int main()': a.cc:41:9: error: 'ans' was not declared in this scope; did you mean 'abs'? 41 | ans=0; | ^~~ | abs
s370305668
p00448
C++
#include<iostream> #include<cstring> #include<cstdio> #include<cmath> #include<algorithm> using namespace std; bool s[15][10005]= {0}; int n, m; void reverse(int row){ for(int i=1; i<=c; i++){ if(s[row][i]==0) s[row][i]=1; else s[row][i]=0; } } int dfs(int x) { ...
a.cc: In function 'void reverse(int)': a.cc:14:21: error: 'c' was not declared in this scope 14 | for(int i=1; i<=c; i++){ | ^
s922620361
p00448
C++
#include<iostream> #include<cstring> #include<cstdio> #include<cmath> #include<algorithm> using namespace std; bool s[15][10005]= {0}; int n, m; void reverse(int row){ for(int i=1; i<=m; i++){ if(s[row][i]==0) s[row][i]=1; else s[row][i]=0; } } int dfs(int x) { ...
a.cc: In function 'int dfs(int)': a.cc:31:13: error: 'tern' was not declared in this scope; did you mean 'term'? 31 | tern>n-tern?(sum+=term):(sum+=(n-term)); | ^~~~ | term
s233557319
p00448
C++
#include <algorithm> #include <cstdio> using namespace std; const int MAX_R=15; const int MAX_C=10005; bool pan[MAX_R][MAX_C]={0}; int r,c; void reverse(int row){ for(int i=0; i<c; i++){ if(pan[row][i]==0) pan[row][i]=1; else pan[row][i]=0; } } int dfs(int row){ if(row==r){ int c...
a.cc: In function 'int main()': a.cc:43:17: error: 'cin' was not declared in this scope 43 | cin>>pan[i][j]; | ^~~ a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 2 | #include <cstdio> +++ |+#include <i...
s321846575
p00448
C++
a
a.cc:1:1: error: 'a' does not name a type 1 | a | ^
s074552914
p00448
C++
6
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 6 | ^
s216706363
p00448
C++
#include<stdio.h> #include<algorithm.h> int n,m; int sen[10][10000]; int maxi; void saiki(int dep){ if(dep>=m){ int cont=0; for(int i=0;i<m;i++){ int con[2]; con[0]=0;con[1]=0; for(int j=0;j<n;j++){ con[sen[j][i]]++; } cont+=max(con[0],con[1]); } if(cont>maxi){ maxi=cont; } return; ...
a.cc:2:9: fatal error: algorithm.h: No such file or directory 2 | #include<algorithm.h> | ^~~~~~~~~~~~~ compilation terminated.
s118570602
p00448
C++
#include<stdio.h> #include<algorithm> int n,m; int sen[10][10000]; int maxi; void saiki(int dep){ if(dep>=m){ int cont=0; for(int i=0;i<m;i++){ int con[2]; con[0]=0;con[1]=0; for(int j=0;j<n;j++){ con[sen[j][i]]++; } cont+=max(con[0],con[1]); } if(cont>maxi){ maxi=cont; } return; }...
a.cc: In function 'void saiki(int)': a.cc:17:31: error: 'max' was not declared in this scope; did you mean 'std::max'? 17 | cont+=max(con[0],con[1]); | ^~~ | std::max In file included from /usr/include/c++/14/algorithm:61...
s127884164
p00448
C++
#include<stdio.h> int r,c,s[10][10000],n; int f(int d[10][10000],bool t[10]){ int max=0,i,j,jk; for(i=0;i<r;i++){ if(t[i]){ for(j=0;j<c;j++){ d[i][j]= 1-d[i][j]; } } } for(i=0;i<r;i++){ jk=0; for(j=0;j<c;j++){ jk+=d[i][j]; } if(jk>c-jk) max+=jk; else max+=c-jk; } return max; } void s...
a.cc:38:1: error: '::main' must return 'int' 38 | void main(){ | ^~~~
s436208429
p00448
C++
%23include%20%3Ciostream%3E%0Ausing%20namespace%20std;%0A%0Aint%20r,%20c;%0Aint%20s[10][10000];%0A%0Aint%20rec(int%20step)%0A%7B%0A%0A%20%20%20%20int%20ret%20=%200;%0A%20%20%20%20if(step%20==%20r)%20%7B%0A%20%20%20%20%20%20%20%20for(int%20j%20=%200;%20j%20%3C%20c;%20j++)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20int%...
a.cc:1:26: error: exponent has no digits 1 | %23include%20%3Ciostream%3E%0Ausing%20namespace%20std;%0A%0Aint%20r,%20c;%0Aint%20s[10][10000];%0A%0Aint%20rec(int%20step)%0A%7B%0A%0A%20%20%20%20int%20ret%20=%200;%0A%20%20%20%20if(step%20==%20r)%20%7B%0A%20%20%20%20%20%20%20%20for(int%20j%20=%200;%20j%20%3C%20c;%20j++)...
s912747532
p00448
C++
#include<string.h> #include<math.h> #include<algorithm> #include<cstring> #include<queue> using namespace std; #define INF 10000000 int max(int a,int b){ if(a>b){ return a; }else{ return b; } } int main(){ while(1){ int senbei[10][1000]; int r,c,i,count,a,ans=0; int d[10]; cin>>r>>c; if(r==0&&c==0)br...
a.cc: In function 'int main()': a.cc:21:17: error: 'cin' was not declared in this scope 21 | cin>>r>>c; | ^~~ a.cc:6:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 5 | #include<queue> +++ |+#include <iostream...
s982209739
p00448
C++
#include <cstdio> #include <algorithm> using namespace std; int main() { while(true) { int r, c; int fld[10000] = {0}; scanf("%d%d", &r, &c); if(r == 0) break; for(int i = 0; i < r; ++i) { for(int j = 0; j < c; ++j) { int t; scanf("%d", %t); fld[j] |= t << i; } } int ans = 0; for(int bit = 0; bit < (1 << r); ++bit) { ...
a.cc: In function 'int main()': a.cc:16:13: error: expected primary-expression before '%' token 16 | scanf("%d", %t); | ^
s415972416
p00448
C++
using System; class _0525 { static int h, w, count, maxCount; static int[,] Osenbei; static int[] power2 = { 1, 2, 4, 8, 16, 32, 64, 128, 256, 512 }; public static void Main() { string str = Console.ReadLine(); string[] data; while (str != "0 0") { h = 0; ...
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:5:15: error: expected unqualified-id before '[' token 5 | static int[,] Osenbei; | ^ a.cc:6:15: error: expected unqualified-id before '[' token 6 | static int[] power2 = { ...
s195166313
p00448
C++
#include <iostream> using namespace std; const int MAX_R = 10, MAX_C = 10000; int osenbei[MAX_R][MAX_C]; int tosenbei[MAX_R][MAX_C]; int R, C; int A; void dfs(int depth, int turn){ if(depth == R){ int a = 0; memcpy(tosenbei, osenbei, sizeof(osenbei)); for(int i=0; i<R; i++){ i...
a.cc: In function 'void dfs(int, int)': a.cc:14:9: error: 'memcpy' was not declared in this scope 14 | memcpy(tosenbei, osenbei, sizeof(osenbei)); | ^~~~~~ a.cc:2:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostre...
s091706316
p00448
C++
#include <cstdio> #include <iostream> #include <algorithm> #include <cstdlib> #include <vector> #include <queue> #include <map> #include <functional> #include <cstring> using namespace std; int main(){ int h,w; while(scanf("%d%d",&h,&w),(h|w)){ bool field[16][100010] = {{0}}; for(int i = 0; i < h; i++){ for(in...
a.cc: In function 'int main()': a.cc:31:33: error: 'else' without a previous 'if' 31 | else{ | ^~~~ a.cc:33:55: error: 'j' was not declared in this scope 33 | board[j][k] = field[j][k]; | ...
s285688163
p00449
Java
import java.util.*; public class P0526{ int[][] M = new int[101][101]; int [] d = new int[101]; int[] flg = new int[101]; int a,n,m,c,e,k,min,z; public void compute(){ Scanner scan = new Scanner(System.in); for(int i=0;i<101;i++){ for(int j=0;j<101;j++){ M[i][j]=99999999; } d[i]=9...
Main.java:2: error: class P0526 is public, should be declared in a file named P0526.java public class P0526{ ^ 1 error
s210702650
p00449
Java
import java.util.*; public class Main{ int max =(1<<27); int[][] M = new int[101][101]; int [] d = new int[101]; int[] flg = new int[101]; int a,n,m,c,e,k,min,z; public void compute(){ Scanner scan = new Scanner(System.in); for(int i=0;i<101;i++){ for(int j=0;j<101;j++){ M[i][j]=; ...
Main.java:12: error: illegal start of expression M[i][j]=; ^ 1 error
s109840761
p00449
C
#include<stdio.h> #include<string.h> long ship[100][100]; int main(){ int k,r,i,a,b,n,j; long p; while(1){ scanf("%d %d",&n,&k); if(n==0) break; memset(ship,8,sizeof(ship)); for(i=0;i<n;i++){ ship[i][i]=0; } for(i=0;i<k;i++){ scanf("%d",&r); if(r==0){ scanf("%d %...
main.c: In function 'main': main.c:24:21: error: 'ii' undeclared (first use in this function); did you mean 'i'? 24 | for(ii=0;ii<n;ii++){ | ^~ | i main.c:24:21: note: each undeclared identifier is reported only once for each function it appears in
s073935461
p00449
C
#include<stdio.h> #define INF 1000000 int graph[101][101],n,c,d; void warshall_floyd(){ int i,j; for(i=1;i<=n;i++) for(j=1;j<=n;j++) graph[i][j]=graph[j][i]=min(graph[i][j],graph[i][c]+graph[c][d]+graph[d][j]); } int min(int x,int y){ return x<y?x:y; } int main(){ int k,i,j,x,e,a,b; while(scanf(...
main.c: In function 'warshall_floyd': main.c:9:31: error: implicit declaration of function 'min' [-Wimplicit-function-declaration] 9 | graph[i][j]=graph[j][i]=min(graph[i][j],graph[i][c]+graph[c][d]+graph[d][j]); | ^~~ main.c: In function 'main': main.c:31:14: error: expect...
s595188722
p00449
C
#include<stdio.h> #define INF 1000000 int graph[101][101],n,c,d; void warshall_floyd(){ int i,j; for(i=1;i<=n;i++) for(j=1;j<=n;j++) graph[i][j]=graph[j][i]=min(graph[i][j],graph[i][c]+graph[c][d]+graph[d][j]); } int min(int x,int y){ return x<y?x:y; } int main(){ int k,i,j,x,e,a,b; while(scanf(...
main.c: In function 'warshall_floyd': main.c:9:31: error: implicit declaration of function 'min' [-Wimplicit-function-declaration] 9 | graph[i][j]=graph[j][i]=min(graph[i][j],graph[i][c]+graph[c][d]+graph[d][j]); | ^~~ main.c: In function 'main': main.c:24:7: error: 'garph'...
s912989101
p00449
C
#include <iostream> #include <vector> #include <queue> #include <algorithm> #include <cstring> #define INF 1 << 29 using namespace std; typedef int Weight; struct Edge{ int src; int dst; Weight weight; Edge(int src, int dst, Weight weight): src(src), dst(dst), weight(weight){ } }; struct...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s186768596
p00449
C
#include <iostream> #include <vector> #include <queue> #include <algorithm> #include <cstring> #define INF 1 << 29 using namespace std; typedef int Weight; struct Edge{ int src; int dst; Weight weight; Edge(int src, int dst, Weight weight): src(src), dst(dst), weight(weight){ } }; struct...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s220636866
p00449
C
#include <iostream> #include <vector> #include <queue> #include <algorithm> #include <cstring> #define INF 1 << 29 using namespace std; typedef int Weight; struct Edge{ int src; int dst; Weight weight; Edge(int src, int dst, Weight weight): src(src), dst(dst), weight(weight){ } }; struct...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s120996055
p00449
C++
#include<iostream> #include<queue> #include<vector> #define INF 1<<28 #define F first #define S second using namespace std; typedef pair < int, int > P; int ans[111]; int n; int solve(int a){ vector < P > g[111]; priority_queue < P, vector<P>, greater<P> > que; fill(ans, ans+n+1, INF); ans[a] = 0; que.pu...
a.cc: In function 'int solve(int)': a.cc:33:1: warning: no return statement in function returning non-void [-Wreturn-type] 33 | } | ^ a.cc: In function 'int main()': a.cc:49:11: error: 'g' was not declared in this scope 49 | g[a].push_back( P(b, c) ); | ^
s398406018
p00449
C++
#include<cstdio> #include<iostream> #include<algorithm> using namespace std; int n,k; int x,a,b,c,d,e; int f[100][100]; int fod() { int mi[100]; bool used[100]; for(int j=0;j<n;j++){ mi[j]=INT_MAX; used[j]=false; } mi[a-1]=0; while(true){ int v=-1; for(int j=0;j<n;j++){ if(!used[j]&&(v==-1||mi[j]<mi[v...
a.cc: In function 'int fod()': a.cc:14:23: error: 'INT_MAX' was not declared in this scope 14 | mi[j]=INT_MAX; | ^~~~~~~ a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 3 | #include<algorithm> +++ |+...
s689868965
p00449
C++
#include<cstdio> #include<iostream> #include<algorithm> using namespace std; int n,k; int x,a,b,c,d,e; int f[100][100]; /*int INT_MAX=2147483467;*/ int fod() { int mi[100]; bool used[100]; for(int j=0;j<n;j++){ mi[j]=INT_MAX/3; used[j]=false; } mi[a-1]=0; while(true){ int v=-1; for(int j=0;j<n;j++){ if...
a.cc: In function 'int fod()': a.cc:14:23: error: 'INT_MAX' was not declared in this scope 14 | mi[j]=INT_MAX/3; | ^~~~~~~ a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 3 | #include<algorithm> +++ ...
s449093568
p00449
C++
#include<iostream> using namespace std; int INF=1e9; void dijkstra(int a,int b,int *mindist,int cost[101][101],bool *used,int n){ int cur,cur_spot; for(int i=0 ; i < 101 ; i++){ mindist[i]=INF; used[i]=0; } mindist[a]=0; for(int _=0 ; _ < n ; _++){ cur=INT_MAX; for(int i=1 ; i <=...
a.cc: In function 'void dijkstra(int, int, int*, int (*)[101], bool*, int)': a.cc:18:9: error: 'INT_MAX' was not declared in this scope 18 | cur=INT_MAX; | ^~~~~~~ a.cc:2:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 1 | #include<io...
s448162395
p00449
C++
#include <iostream> #include <vector> #include <queue> #include <functional> using namespace std; struct edge { int to, cost; edge(int _to, int _cost) {to = _to; cost=_cost;} }; typedef pair<int, int> pii; int INF = 1012012012; vector<edge> e[100]; int ds(int s, int g) { int field[100]; priority_queue<pii, vector...
a.cc: In function 'int main()': a.cc:55:29: error: invalid types 'int[int]' for array subscript 55 | if(e[c-1].empty()) { | ^ a.cc:56:34: error: invalid types 'int[int]' for array subscript 56 | e[c-1].push_back(edge(d-1, e)...
s561937400
p00449
C++
#include <iostream> #include <vector> #include <queue> #include <functional> using namespace std; struct edge { int to, cost; edge(int _to, int _cost) {to = _to; cost=_cost;} }; typedef pair<int, int> pii; int INF = 1012012012; vector<edge> e[100]; int ds(int s, int g) { int field[100]; priority_queue<pii, vector...
a.cc: In function 'int main()': a.cc:55:29: error: invalid types 'int[int]' for array subscript 55 | if(e[c-1].empty()) { | ^ a.cc:56:34: error: invalid types 'int[int]' for array subscript 56 | e[c-1].push_back(edge(d-1, e)...
s299877870
p00449
C++
#include<cstdio> #include<math.h> #include<algorithm> #include<string.h> #include<vector> #include<queue> using namespace std; #define rep(i,n) for(int i=0;i<n;i++) const int INF=1001001001; vector<pair<int,int>???> edge[102];//[?§????] <??????????????????> int N,K; int map[102];//????????°????????????????????¢ in...
a.cc:13:22: warning: trigraph ??> ignored, use -trigraphs to enable [-Wtrigraphs] 13 | vector<pair<int,int>???> edge[102];//[?§????] <??????????????????> a.cc:13:24: error: template argument 1 is invalid 13 | vector<pair<int,int>???> edge[102];//[?§????] <??????????????????> | ^ a.cc:...
s687681872
p00449
C++
#include <iostream> #include <algorithm> using namespace std; int mp[101][101]; bool flg[101] ={}; int n,q; int dis[101]; int sssp(int s,int g) { for(int i=1;i<=n;i++) dis[i] = 1000000000,flg[i] = 0; //flg[s] = 1; dis[s] = 0; int ima; while(1) { int mindis = 1000000000; for(int i=1;i<=n;i++) ...
a.cc: In function 'int main()': a.cc:83:4: error: expected '}' at end of input 83 | } | ^ a.cc:43:12: note: to match this '{' 43 | int main() { | ^
s820532688
p00449
C++
# include <iostream> # include <queue> # include <vector> # include <algorithm> # include <functional> const int MAX_N = 100; const int INF = 100000000; typedef std::pair<int, int> P; struct edge { int to, cost; edge(int _t, int _c) : to(_t), cost(_c) {} }; int n, k; std::vector<edge> G[MAX_N]; int d[MAX_N]; int...
In file included from /usr/include/c++/14/queue:66, from a.cc:2: /usr/include/c++/14/bits/stl_queue.h: In instantiation of 'class std::priority_queue<std::pair<int, int>, std::vector<std::pair<int, int> >, std::greater<std::pair<int, int> >()>': a.cc:22:60: required from here 22 | std::pri...
s495424390
p00449
C++
#include <cstdio> #include <algorithm> using namespace std; #define REP(i,n) for(int i = 0; i < (int)(n); ++i) const int INF = 100000000; const int MAX_V = 100; int graph[MAX_V][MAX_V]; int N, k; bool visited[MAX_V]; int cost[MAX_V]; void init_graph() { REP(i, N) { REP(j, N) { if (i == j) gr...
a.cc: In function 'void solve()': a.cc:45:17: error: 'make_edge' was not declared in this scope 45 | make_edge(c, d, e); | ^~~~~~~~~ a.cc:47:31: error: 'u' was not declared in this scope 47 | if (c < graph[u][v]) { | ^ a.cc:...
s012486175
p00449
C++
#include <cstdio> #include <algorithm> using namespace std; #define REP(i,n) for(int i = 0; i < (int)(n); ++i) const int INF = 100000000; const int MAX_V = 100; int graph[MAX_V][MAX_V]; int N, k; bool visited[MAX_V]; int cost[MAX_V]; void init_graph() { REP(i, N) { REP(j, N) { if (i == j) gr...
a.cc: In function 'void solve()': a.cc:45:17: error: 'make_edge' was not declared in this scope 45 | make_edge(c, d, e); | ^~~~~~~~~ a.cc:46:31: error: 'u' was not declared in this scope 46 | if (c < graph[u][v]) { | ^ a.cc:...
s524485011
p00449
C++
#include <cstdio> #include <algorithm> using namespace std; #define REP(i,n) for(int i = 0; i < (int)(n); ++i) const int INF = 100000000; const int MAX_V = 100; int graph[MAX_V][MAX_V]; int N, k; bool visited[MAX_V]; int cost[MAX_V]; void init_graph() { REP(i, N) { REP(j, N) { if (i == j) gr...
a.cc: In function 'void solve()': a.cc:45:17: error: 'make_edge' was not declared in this scope 45 | make_edge(c, d, e); | ^~~~~~~~~
s797666930
p00449
C++
#include <iostream> #include <algorithm> #include <vector> #include <cstdio> #include <cstdlib> #include <string> #include <cmath> using namespace std; #define rep(i,n) for(int i=0;i<(n);i++) #define reps(i,f,n) for(int i=(f);i<(n);i++) #define fi first #define se second void floyd (int n){//n??????????????° rep(k, n...
a.cc: In function 'void floyd(int)': a.cc:16:17: error: 'dist' was not declared in this scope 16 | dist[i][j] = min(dist[i][j], dist[i][k] + dist[k][j]);//???????????????????????¢?????\??? | ^~~~ a.cc:19:19: error: 's' was not declared in this scope 19 | printf("%d ", s);...
s140120615
p00449
C++
#include <iostream> #include <algorithm> using namespace std; #define INF 100000000 int map[100][100]={}; int n,k,count,tmin=100; int dd[101],col[100]={}; int main(){ int t,a,b,c,d,e; cin >> n >> k; while(n!=0&&k!=0){ for (int i=0;i<10000;i++)map[i/100][i%100]=0; for (int i=0;i<k;i++){ cin >>...
a.cc: In function 'int main()': a.cc:26:9: error: reference to 'count' is ambiguous 26 | count = 1; | ^~~~~ In file included from /usr/include/c++/14/algorithm:86, from a.cc:2: /usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note: candidates are: 'template<class _Executio...
s622477343
p00449
C++
#include <iostream> #include <algorithm> using namespace std; #define INF 100000000 int map[100][100]; int n,k,count,tmin=100; int dd[101],col[100]; int main(){ int t,a,b,c,d,e; cin >> n >> k; while(n!=0&&k!=0){ for (int i=0;i<10000;i++)map[i/100][i%100]=0; for (int i=0;i<k;i++){ cin >> t; /...
a.cc: In function 'int main()': a.cc:27:9: error: reference to 'count' is ambiguous 27 | count = 1; | ^~~~~ In file included from /usr/include/c++/14/algorithm:86, from a.cc:2: /usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note: candidates are: 'template<class _Executio...
s170097761
p00449
C++
#include<bits/stdc++.h> using namespace std; int dist[105],n,m,a,b,c,d; queue<pair<int,int>,vector<pair<int,int>>,greater<pair<int,int>>> Q; vector<pair<int,int>>x[105]; void add_edge(int a1,int a2,int a3){ x[a1].push_back(make_pair(a2,a3)); x[a2].push_back(make_pair(a1,a3)); } int solve(int b1,int b2){ for(int i=0;...
a.cc:4:65: error: wrong number of template arguments (3, should be at least 1) 4 | queue<pair<int,int>,vector<pair<int,int>>,greater<pair<int,int>>> Q; | ^ In file included from /usr/include/c++/14/queue:66, from /usr/include/x86...
s149152362
p00449
C++
#include<bits/stdc++.h> using namespace std; int dist[105],n,m,a,b,c,d; queue<pair<int,int>,vector<pair<int,int>>,greater<pair<int,int>>> Q; vector<pair<int,int>>x[105]; void add_edge(int a1,int a2,int a3){ x[a1].push_back(make_pair(a2,a3)); x[a2].push_back(make_pair(a1,a3)); } int solve(int b1,int b2){ for(int i=0;...
a.cc:4:65: error: wrong number of template arguments (3, should be at least 1) 4 | queue<pair<int,int>,vector<pair<int,int>>,greater<pair<int,int>>> Q; | ^ In file included from /usr/include/c++/14/queue:66, from /usr/include/x86...
s287817610
p00449
C++
#include <iostream> #include <vector> #include <queue> #include <utility> #include <climits> #include <functional> using Pair = std::pair<int, int>; struct Node { std::vector<Pair> edges; int minCost = std::numeric_limits<int>::max(); bool done; }; int main() { int n, k; while (std::cin >> n >> k, n + k != 0)...
a.cc:13:28: error: 'numeric_limits' is not a member of 'std' 13 | int minCost = std::numeric_limits<int>::max(); | ^~~~~~~~~~~~~~ a.cc:13:43: error: expected primary-expression before 'int' 13 | int minCost = std::numeric_limits<int>::max(); | ...
s880919163
p00449
C++
3 8 1 3 1 10 0 2 3 1 2 3 20 1 1 2 5 0 3 2 1 1 3 7 1 2 1 9 0 2 3 5 16 1 1 2 343750 1 1 3 3343 1 1 4 347392 1 1 5 5497 1 2 3 123394 1 2 4 545492 1 2 5 458 1 3 4 343983 1 3 5 843468 1 4 5 15934 0 2 1 0 4 1 0 3 2 0 4 2 0 4 3 0 5 3 0 0
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 3 8 | ^
s707597626
p00449
C++
#include<map> #include<queue> #include<utility> #include<cstdio> #include<vector> #include<algorithm> #include<numeric> #include<functional> #include<string> #include<iostream> using namespace std; const long long int one = 1; const long long int big = (one<<40); typedef long long int llint; map<int,llint> cost[100]; ...
a.cc: In function 'llint dike(int, int)': a.cc:24:14: error: '_Tree_iterator' is not a member of 'std'; did you mean '_Rb_tree_iterator'? 24 | std::_Tree_iterator<std::_Tree_val<std::_Tree_simple_types<std::pair<const int,llint> > > > it; | ^~~~~~~~~~~~~~ | _Rb_tree_iter...