submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s109171540
p00114
C++
#include<iostream> #include<cstdio> #include<map> #include<set> #include<cmath> #include<climits> #include<vector> #include<algorithm> #include<queue> #include<stack> using namespace std; #define ing long long int gcd(int a, int b){ if(b == 0) return a; return gcd(b, a % b); } int lcm(int a, int b){ return a*b / ...
cc1plus: error: '::main' must return 'int'
s732440442
p00114
C++
#include<iostream> #include<cstdio> #include<map> #include<set> #include<cmath> #include<climits> #include<vector> #include<algorithm> #include<queue> #include<stack> using namespace std; long long gcd(long long a, long long b){ if(b == 0) return a; return gcd(b, a % b); } long long lcm(long long a, long long b){ ...
cc1plus: error: '::main' must return 'int'
s711235046
p00114
C++
#include<iostream> #include<string> #include<algorithm> #include<map> #include<set> #include<utility> #include<vector> #include<cmath> #include<cstring> #include<cstdio> #include<time.h> #define loop(i,a,b) for(int i=a;i<b;i++) #define rep(i,a) loop(i,0,a) #define pb push_back #define mp make_pair #define all(in) in.b...
a.cc: In function 'int main()': a.cc:38:27: error: '__lcm' was not declared in this scope 38 | cout<<__lcm(in[0],__lcm(in[1],in[2]))<<endl; | ^~~~~ a.cc:38:15: error: '__lcm' was not declared in this scope 38 | cout<<__lcm(in[0],__lcm(in[1],in[2]))<<endl; | ...
s394102106
p00114
C++
#include<iostream> #include<algorithm> #define ll long long int using namespace std; ll rep(ll s,ll t){ return (s/__gcd(s,t))*t; } ll main(){ ll a1,a2,a3,x,y,z,m1,m2,m3,now,a,b,c; while(cin>>a1>>m1>>a2>>m2>>a3>>m3,a1||m1||a2||m2||a3||m3){ x=a1%m1;a=-1;b=-1;c=-1; y=a2%m2;now=1; z=a3%m3; while(a==-1||b==-1||c=...
a.cc:3:22: error: '::main' must return 'int' 3 | #define ll long long int | ^~~ a.cc:8:1: note: in expansion of macro 'll' 8 | ll main(){ | ^~
s638425091
p00114
C++
#include <cstdio> #include <cstring> #include <cstdlib> #include <cmath> #include <complex> #include <string> #include <sstream> #include <algorithm> #include <vector> #include <queue> #include <stack> #include <functional> #include <iostream> #include <map> #include <set> using namespace std; typedef pair<int,int> P; ...
a.cc: In function 'int main()': a.cc:61:31: error: 'gcd' was not declared in this scope 61 | cout << c1*c2/gcd(c1, c2)*c3/gcd(c2,c3)/gcd(c1,c3)*gcd(c1, gcd(c2,c3)) << endl; | ^~~
s854020453
p00115
C
afdfd
main.c:1:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input 1 | afdfd | ^~~~~
s312434851
p00115
C++
#define _CRT_SECURE_NO_WARNINGS #define _USE_MATH_DEFINES #include <iostream> #include <algorithm> #include <functional> #include <string> #include <queue> #include <cmath> #include <stack> #include <numeric> #include <ctime> #include <algorithm> #include <set> #include <stdio.h> #include <map> using namespace std; t...
a.cc: In constructor 'Mat3i::Mat3i()': a.cc:25:17: error: 'memset' was not declared in this scope 25 | memset(a, 0, sizeof(int)* 3 * 3); | ^~~~~~ a.cc:17:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 16 | #include ...
s962135821
p00115
C++
// AOJ 0115 #include<cstdio> #include<cmath> #define rep(i,a) for(int i=0;i<(a);++i) const double EPS = 1e-5; struct Pt { double x, y, z; Pt( double x = 0, double y = 0, double z = 0 ) : x(x), y(y), z(z) {} Pt& operator+= ( const Pt &p ) { x += p.x; y += p.y; z += p.z; return *this; } Pt& operator...
a.cc: In function 'bool intersect(const Pt&, Pt&)': a.cc:87:22: error: cannot bind non-const lvalue reference of type 'Pt&' to an rvalue of type 'Pt' 87 | Pt &ap = v[0]-uaz, bp = v[0]-enemy; | ~~~~^~~~
s645777590
p00115
C++
// AOJ 0115 #include<cstdio> #include<cmath> #define rep(i,a) for(int i=0;i<(a);++i) const double EPS = 1e-5; struct Pt { double x, y, z; Pt( double x = 0, double y = 0, double z = 0 ) : x(x), y(y), z(z) {} Pt& operator+= ( const Pt &p ) { x += p.x; y += p.y; z += p.z; return *this; } Pt& operator...
a.cc: In function 'bool intersect(const Pt&, Pt&)': a.cc:87:22: error: cannot bind non-const lvalue reference of type 'Pt&' to an rvalue of type 'Pt' 87 | Pt &ap = v[0]-uaz, bp = v[0]-enemy; | ~~~~^~~~
s060140438
p00115
C++
// AOJ 0115 #include<cstdio> #include<cmath> #define rep(i,a) for(int i=0;i<(a);++i) const double EPS = 1e-5; struct Pt { double x, y, z; Pt( double x = 0, double y = 0, double z = 0 ) : x(x), y(y), z(z) {} Pt& operator+= ( const Pt &p ) { x += p.x; y += p.y; z += p.z; return *this; } Pt& operator...
a.cc: In function 'bool intersect(const Pt&, Pt*)': a.cc:87:22: error: cannot bind non-const lvalue reference of type 'Pt&' to an rvalue of type 'Pt' 87 | Pt &ap = v[0]-uaz, bp = v[0]-enemy; | ~~~~^~~~
s343643039
p00115
C++
// AOJ 0115 #include<cstdio> #include<cmath> #define rep(i,a) for(int i=0;i<(a);++i) const double EPS = 1e-5; struct Pt { double x, y, z; Pt( double x = 0, double y = 0, double z = 0 ) : x(x), y(y), z(z) {} Pt& operator+= ( const Pt &p ) { x += p.x; y += p.y; z += p.z; return *this; } Pt& operator...
a.cc: In function 'bool intersect(Pt&, Pt&)': a.cc:87:22: error: cannot bind non-const lvalue reference of type 'Pt&' to an rvalue of type 'Pt' 87 | Pt &ap = v[0]-uaz, bp = v[0]-enemy; | ~~~~^~~~
s101429936
p00115
C++
// AOJ 0115 #include<cstdio> #include<cmath> #define rep(i,a) for(int i=0;i<(a);++i) const double EPS = 1e-5; struct Pt { double x, y, z; Pt( double x = 0, double y = 0, double z = 0 ) : x(x), y(y), z(z) {} Pt& operator+= ( const Pt &p ) { x += p.x; y += p.y; z += p.z; return *this; } Pt& operator...
a.cc: In function 'bool intersect(const Pt&, Pt&)': a.cc:87:22: error: cannot bind non-const lvalue reference of type 'Pt&' to an rvalue of type 'Pt' 87 | Pt &ap = v[0]-uaz, bp = v[0]-enemy; | ~~~~^~~~
s961976961
p00115
C++
// AOJ 0115 #include<cstdio> #include<cmath> #define rep(i,a) for(int i=0;i<(a);++i) const double EPS = 1e-5; struct Pt { double x, y, z; Pt( double x = 0, double y = 0, double z = 0 ) : x(x), y(y), z(z) {} Pt& operator+= ( const Pt &p ) { x += p.x; y += p.y; z += p.z; return *this; } Pt& operator...
a.cc: In function 'bool intersect()': a.cc:88:22: error: cannot bind non-const lvalue reference of type 'Pt&' to an rvalue of type 'Pt' 88 | Pt &ap = v[0]-uaz, bp = v[0]-enemy; | ~~~~^~~~
s295648589
p00115
C++
#include <iostream> #include <cmath> using namespace std; const double eps = 1e-8; class P { public: double x, y, z; P(){}; P(double x, double y, double z) : x(x), y(y), z(z) {}; P operator+(const P &p) { return P(x + p.x, y + p.y, z + p.z); } P operator-(const P &p) { return P(x - p.x, y - p.y, z - p.z); }...
a.cc: In function 'int main()': a.cc:51:74: error: no match for 'operator-' (operand types are 'int' and 'P') 51 | double t = dot(z, cross(p[(i + 1) % 3 + 2] - p[i + 2], i - p[i + 2])); | ~ ^ ~~~~~~~~ | ...
s704973798
p00115
C++
// ?????¬???????????¬?????? #include <iostream> #include <iomanip> #include <cstdio> #include <string> #include <cstring> #include <deque> #include <list> #include <queue> #include <stack> #include <vector> #include <utility> #include <algorithm> #include <map> #include <set> #include <complex> #include <cmath> #inclu...
a.cc: In function 'int main()': a.cc:102:61: error: 'k' was not declared in this scope 102 | if(ans[0] < 0 || ans[1] < 0 || ans[0] + ans[1] > 1.0 || k < 0) cout << "HIT" << endl; | ^
s690275289
p00115
C++
#include<cmath> #include<algorithm> #include<iostream> #include<vector> #include<climits> #include<cfloat> #include <quadmath.h> using namespace std; typedef long double __float128; ld EPS = 1e-20; ld add(ld a, ld b){ if(abs(a+b) < EPS * (abs(a)+abs(b)))return 0; return a+b; } struct point{ ld x,y,z; poi...
a.cc:11:21: error: conflicting declaration 'typedef long double __float128' 11 | typedef long double __float128; | ^~~~~~~~~~ cc1plus: note: previous declaration as '__float128' a.cc:13:1: error: 'ld' does not name a type 13 | ld EPS = 1e-20; | ^~ a.cc:16:1: error: 'ld' does not na...
s821505129
p00115
C++
#include<cmath> #include<algorithm> #include<iostream> #include<vector> #include<climits> #include<cfloat> #include <quadmath.h> using namespace std; typedef __float128 ld; ld EPS = 1e-20; ld add(ld a, ld b){ if(abs(a+b) < EPS * (abs(a)+abs(b)))return 0; return a+b; } struct point{ ld x,y,z; point(){} ...
a.cc: In function 'ld dist(point, point)': a.cc:37:18: error: call of overloaded 'pow(ld, int)' is ambiguous 37 | return sqrt(pow(a.x-b.x,2)+pow(a.y-b.y,2)+pow(a.z-b.z,2)); | ~~~^~~~~~~~~~~ In file included from /usr/include/features.h:523, from /usr/include/x86_64-linux-gnu/c+...
s038498254
p00115
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) #define IINF (INT_MAX) #define EPS (1e-7) #define equals(a,b) (fabs((a)-(b))<EPS) using namespace std; //作成中 どれもVirifyしてない class Point3d{ public: double x,y,z; Point3d(double x=0,double y=0,double z=0):x(x),y(y),z(z){} ...
a.cc: In function 'std::ostream& operator<<(std::ostream&, const Point3d&)': a.cc:59:1: warning: no return statement in function returning non-void [-Wreturn-type] 59 | } | ^ a.cc: In function 'std::ostream& operator<<(std::ostream&, const Segment3d&)': a.cc:63:1: warning: no return statement in function retur...
s186782081
p00115
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) #define IINF (INT_MAX) #define EPS (1e-7) #define equals(a,b) (fabs((a)-(b))<EPS) using namespace std; //作成中 どれもVirifyしてない class Point3d{ public: double x,y,z; Point3d(double x=0,double y=0,double z=0):x(x),y(y),z(z){} ...
a.cc: In function 'std::ostream& operator<<(std::ostream&, const Point3d&)': a.cc:59:1: warning: no return statement in function returning non-void [-Wreturn-type] 59 | } | ^ a.cc: In function 'std::ostream& operator<<(std::ostream&, const Segment3d&)': a.cc:63:1: warning: no return statement in function retur...
s254125315
p00116
Java
import java.util.Scanner; public class a { public static void main(String[] a) { Scanner s = new Scanner(System.in); for (;;) { int h = s.nextInt() + 1; int w = s.nextInt() + 1; if (h * w == 1) break; int[][] l = new int[h][w]; ...
Main.java:3: error: class a is public, should be declared in a file named a.java public class a { ^ 1 error
s953873492
p00116
Java
/* Rectangular Seaching */ import java.io.*; import java.util.*; public class Main_prev{ public static void main(String args[]){ try{ new Main_prev(); }catch(IOException err){ err.printStackTrace(); } } public Main_prev() throws IOException{ BufferedReader in = new BufferedReader(new InputStreamReade...
Main.java:5: error: class Main_prev is public, should be declared in a file named Main_prev.java public class Main_prev{ ^ 1 error
s612447625
p00116
Java
/* Rectangular Seaching */ import java.io.*; import java.util.*; public class Main_prev{ public static void main(String args[]){ try{ new Main_prev(); }catch(IOException err){ err.printStackTrace(); } } public Main_prev() throws IOException{ BufferedReader in = new BufferedReader(new InputStreamReade...
Main.java:5: error: class Main_prev is public, should be declared in a file named Main_prev.java public class Main_prev{ ^ 1 error
s147871332
p00116
Java
import java.util.*; public class Main{ Scanner sc = new Scanner(System.in); void run(){ for(;;){int h=sc.nextInt(); int w=sc.nextInt(); if(h+w==0) break;int[][]fl=new int[h+1][w+1];int[][]ft=new int[h+1][w+1]; int m=0; for(int i=1;i<=h;i++){ char[]c=("*"+sc.next()).toCharArray();for(int j=1;j<=w;j++){fl[i][j]=fl[i][j-1...
Main.java:13: error: illegal start of expression fl[i][j] = 0;ft[i][j]=fl[i][j];for(int k=0;k<i;k++)ft[k][j]=Math.min(ft[k][j],fl[i][j]);for(int k=0;k<=i;++)m=Math.max(max,ft[k][j]*(i-k+1)); ^ 1 error
s524809720
p00116
C
#include <cstdio> #include <stack> #include <algorithm> using namespace std; struct Rectangle{ int height; int pos;}; int func(int size, int buffer[]){ stack<Rectangle> S; int maxv = 0; buffer[size] = 0; for(int i = 0; i <= size; ++i){ Rectangle rect; rect.height = buffer[i]; rect.pos = i; i...
main.c:1:10: fatal error: cstdio: No such file or directory 1 | #include <cstdio> | ^~~~~~~~ compilation terminated.
s837208976
p00116
C
#include<stdio.h> #define MAX 501 #define BLOCK '*' #define DOT '.' void input( char cel[][ MAX ], short H, short W ); void search( char cel[][ MAX ], short up, short down, short left, short right, long *Sp ); void judge( long S[] ); void output( long S ); int main() { short H = 0; short W = 0; while(1) { l...
main.c: In function 'input': main.c:48:17: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 48 | gets( cel[ num1 ] ); | ^~~~ | fgets main.c: In function 'search': main.c:96:101: error: 'Cp' undeclared (...
s094552567
p00116
C
#include<stdio.h> #define MAX 501 #define BLOCK '*' #define DOT '.' void input( char cel[][ MAX ], short H, short W ); void search( char cel[][ MAX ], short up, short down, short left, short right, long *Sp ); void judge( long S[] ); void output( long S ); int main() { short H = 0; short W = 0; while(1) { l...
main.c: In function 'input': main.c:48:17: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 48 | gets( cel[ num1 ] ); | ^~~~ | fgets main.c: In function 'search': main.c:96:101: error: 'Cp' undeclared (...
s972070482
p00116
C
#include<stdio.h> #define MAX 501 #define BLOCK '*' #define DOT '.' void input( char cel[][ MAX ], short H, short W ); void search( char cel[][ MAX ], short up, short down, short left, short right, long *Sp ); void judge( long S[] ); void output( long S ); int main() { short H = 0; short W = 0; while(1) { l...
main.c: In function 'input': main.c:48:17: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 48 | gets( cel[ num1 ] ); | ^~~~ | fgets main.c: In function 'search': main.c:96:101: error: 'Cp' undeclared (...
s512460187
p00116
C
#include<stdio.h> #define MAX 501 #define BLOCK '*' #define DOT '.' void input( char cel[][ MAX ], short H, short W ); void search( char cel[][ MAX ], short up, short down, short left, short right, long *Sp ); void judge( long S[] ); void output( long S ); int main() { short H = 0; short W = 0; while(1) { l...
main.c: In function 'input': main.c:48:17: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 48 | gets( cel[ num1 ] ); | ^~~~ | fgets main.c: In function 'search': main.c:96:101: error: 'Cp' undeclared (...
s560568886
p00116
C++
#include <iostream> #include <string> #include <cstring> #include <vector> #include <cstdlib> #include <algorithm> #include <utility> typedef std::pair<char, char> WH; typedef std::vector<WH> whvec; int main(){ int h, w; while( std::cin >> h >> w, w + h != 0 ){ bool map[501][501]; std::string in; whvec data[...
a.cc: In function 'int main()': a.cc:39:74: error: no matching function for call to 'min(char&, int&)' 39 | wh = WH( std::min(data[i - 1][l][m].first, x_cnt), data[i - 1][l][m].second + 1 ); | ...
s349267682
p00116
C++
#include <iostream> #include <string> #include <cstring> #include <vector> #include <cstdlib> #include <algorithm> #include <utility> #define YNUM(X) ( X < 0 ? X + 3 : X ) int h, w; bool map[502][502]; std::string in; int data[3][502][502]; int data_max = 0; int height_sum[502][502], width_sum[502][502]; int main...
a.cc: In function 'int main()': a.cc:81:2: error: expected '}' at end of input 81 | } | ^ a.cc:18:11: note: to match this '{' 18 | int main(){ | ^
s180935640
p00116
C++
#include <iostream> #include <string> #include <cstring> #include <vector> #include <cstdlib> #include <algorithm> #include <utility> #define YNUM(X) ( X < 0 ? X + 3 : X ) int h, w; bool map[502][502]; char in[502]; int data[3][502][502]; int data_max = 0; int height_sum[502][502], width_sum[502][502]; int main()...
a.cc: In function 'int main()': a.cc:46:64: error: 'wh' was not declared in this scope; did you mean 'w'? 46 | data_max = std::max( data_max, wh.first * wh.second ); | ^~ | ...
s591325662
p00116
C++
#include <cstdio> #include <iostream> using namespace std; char str[512][512]; int H, W; int size(int si, int sj) { int max = 0; for (int ei = si; ei < H; ei++){ for (int ej = sj; ej < W; ej++){ int f = 1; for (int i = si; i <= ei; i++){ for (int j = sj; j <= ej; j++){ if (str[i][j] != '.'){ ...
a.cc: In function 'int main()': a.cc:46:25: error: 'strcpy' was not declared in this scope 46 | strcpy(str[i], ""); | ^~~~~~ a.cc:3:1: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <iostr...
s842070715
p00116
C++
g#include <cstdio> #include <cstdlib> #include <cmath> #include <climits> #include <cfloat> #include <cstring> #include <map> #include <utility> #include <set> #include <iostream> #include <memory> #include <string> #include <vector> #include <algorithm> #include <functional> #include <sstream> #include <fstream> #incl...
a.cc:1:2: error: stray '#' in program 1 | g#include <cstdio> | ^ a.cc:1:1: error: 'g' does not name a type 1 | g#include <cstdio> | ^ In file included from /usr/include/c++/14/cmath:45, from a.cc:3: /usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu_cx...
s655367191
p00116
C++
#include <iostream> using namespace std; #define REP(i,n) for(i=1;i<=n;i++) short x,y,w[505][505];char map[505][505];int main(){int i,j,k;while(cin>>y>>x,y){REP(i,y)cin>>map[i]+1;memset(w,0,sizeof(w));REP(i,y)REP(j,x)w[i][j]=x-j+1;REP(i,y)REP(j,x)if(map[i][j]=='.')continue;else for(k=j;k>0;k--)if(w[i][k]>j-k)w[i][k]=j-...
a.cc: In function 'int main()': a.cc:4:104: error: 'memset' was not declared in this scope 4 | short x,y,w[505][505];char map[505][505];int main(){int i,j,k;while(cin>>y>>x,y){REP(i,y)cin>>map[i]+1;memset(w,0,sizeof(w));REP(i,y)REP(j,x)w[i][j]=x-j+1;REP(i,y)REP(j,x)if(map[i][j]=='.')continue;else for(k=j;k>0;k--)if...
s491508929
p00116
C++
#include <iostream> #include <stdlib.h> using namespace std; #define REP(i,n) for(i=1;i<=n;i++) short x,y,w[505][505];char map[505][505];int main(){int i,j,k;while(cin>>y>>x,y){REP(i,y)cin>>map[i]+1;memset(w,0,sizeof(w));REP(i,y)REP(j,x)w[i][j]=x-j+1;REP(i,y)REP(j,x)if(map[i][j]=='.')continue;else for(k=j;k>0;k--)if(w[...
a.cc: In function 'int main()': a.cc:5:104: error: 'memset' was not declared in this scope 5 | short x,y,w[505][505];char map[505][505];int main(){int i,j,k;while(cin>>y>>x,y){REP(i,y)cin>>map[i]+1;memset(w,0,sizeof(w));REP(i,y)REP(j,x)w[i][j]=x-j+1;REP(i,y)REP(j,x)if(map[i][j]=='.')continue;else for(k=j;k>0;k--)if...
s176228498
p00116
C++
#include<stdio.h> #include<stack> #include<algorithm> #include<map> using namespace std; int h,w; char m[512][512]; int AboveHeight(int x,int y) { int res=0; while(m[y][x]=='.') { ++res; --y; } return res; } int Solve(int y) { typedef pair<int,int>P; int res=0, x; stack<P> s; for(x=1; x<=w+1; ++x) { ...
a.cc: In function 'int main()': a.cc:51:17: error: 'memset' was not declared in this scope 51 | memset(m,'*',sizeof(m)); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include<map> +++ |+#inc...
s928676392
p00116
C++
#include <iostream> #include <vector> #include <string> #include <algorithm> using namespace std; const int INF = 99999; void p(vector<int> v){ for(int i = 0; i < v.size(); i++){ cout << (i?" ":"") << v[i]; } cout << endl; } void p(vector<string> v){ for(int i = 0; i < v.size(); i++){ cout << (i?"\n":"") <<...
a.cc:72:2: error: stray '#' in program 72 | }#include <iostream> | ^ a.cc:72:3: error: 'include' does not name a type 72 | }#include <iostream> | ^~~~~~~ a.cc:79:11: error: redefinition of 'const int INF' 79 | const int INF = 99999; | ^~~ a.cc:8:11: note: 'const int INF' previous...
s154602986
p00116
C++
while True: H,W = map(int, raw_input().split(" ")) if (H,W) == (0,0): break field = [raw_input() for _ in xrange(H)] space = [[0]*(W+1) for _ in xrange(H)] for x in xrange(W-1,-1,-1): for y in xrange(H): if field[y][x]==".": space[y][x] = space[y][x+1]+1 ...
a.cc:1:1: error: expected unqualified-id before 'while' 1 | while True: | ^~~~~
s530991358
p00116
C++
#include<iostream> #include<string> #include<algorithm> using namespace std; int main(){ int h, w; string s[999]; int data[999][999]; while(true){ cin >> h >> w; if(!h && !w) break; for(int i=0;i<h;i++) cin >> s[i]; for(int i=0;i<h;i++){ int k = 0; for(int j=w-1;j>=0;j--){ data...
a.cc:24:6: error: stray '#' in program 24 | }#include<iostream> | ^ a.cc: In function 'int main()': a.cc:24:7: error: 'include' was not declared in this scope 24 | }#include<iostream> | ^~~~~~~ a.cc:24:23: error: expected primary-expression before '>' token 24 | }#include<ios...
s758434524
p00117
Java
#include<iostream> using namespace std; static const int INF = 1<<21; int n, m, a, b, c, d, s, g, v, p; int mat[21][21]; void floyd(){ for(int k = 1; k <= n; k++){ for(int i = 1; i <= n; i++){ for(int j = 1; j <= n; j++){ mat[i][j] = min(mat[i][j], mat[i][k]+mat[k][j]); ...
Main.java:1: error: illegal character: '#' #include<iostream> ^ Main.java:1: error: class, interface, enum, or record expected #include<iostream> ^ Main.java:4: error: class, interface, enum, or record expected static const int INF = 1<<21; ^ Main.java:5: error: class, interface, enum, or record expected...
s329691908
p00117
Java
import java.util.Arrays; import java.util.Scanner; public class Main{ public static void main(String[] args){ new Main().run(); } int[][] cost; boolean[] visit; int[] dist; int n; public void run(){ Scanner scan = new Scanner(System.in); while(true){ n = scan.nextInt(); int m = scan.nextInt(...
Main.java:62: error: reached end of file while parsing } ^ 1 error
s902474265
p00117
C
#include<stdio.h> #include<stdlib.h> #define INF 10000000 #define N 21 #define error(s) do{fprintf(stderr , s); exit(-1);}while(0) int M[N][N],a[N][N],W[N][N],p[N][N];; void floyd(void); void path(int i, int j); int main(){ int i,j,n,m,a1,b,c,d,x1,x2,y1,y2; for(i = 0 ; i < N ; i++){ for(j = 1 ; j < N ; j++){ ...
main.c: In function 'main': main.c:59:9: error: too many arguments to function 'path' 59 | path(x1,x2,&y1); | ^~~~ main.c:12:6: note: declared here 12 | void path(int i, int j); | ^~~~ main.c:61:9: error: too many arguments to function 'path' 61 | path(x2,x1,&y1); ...
s066770792
p00117
C
#include<stdio.h> #include<string.h> #include<limits.h> int min( int a ,int b ) { return a > b ? b : a ; } void in( int move[][ 200 ] ,int next[][ 200 ] ,int *ans ,int m ) { int now ,nex ; int go ,back ; int i ,j ; for( i = 0 ; i < m ; ++i ) { scanf( "%d,%d,%d,%d" ,&now ,&nex ,&go ,&back ) ; ++next[ n...
main.c:46:1: error: unknown type name 'bool' 46 | bool came[ 200 ][ 200 ] ; | ^~~~ main.c:5:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>' 4 | #include<limits.h> +++ |+#include <stdbool.h> 5 | main.c: In function 'search': main.c:58:67: ...
s062163512
p00117
C
n,g[21][21],i;x,X;D(S,G){int c[21],f[21]={0};for(memset(c,1,84),c[S]=0;S;){for(i=n+1;--i;c[i]=c[S]+g[S][i]<?c[i])f[S]=1;for(S=i=0;++i<=n;)S=f[i]|c[i]>c[S]?S:i;}return c[G];}main(y,Y){for(memset(g,scanf("%d%d",&n,&i),1764);~i--;~i&&(g[x][X]=y,g[X][x]=Y))scanf("%d,%d,%d,%d",&x,&X,&y,&Y);exit(!printf("%d\n",y-Y-D(x,X)-D(X...
main.c:1:1: warning: data definition has no type or storage class 1 | n,g[21][21],i;x,X;D(S,G){int c[21],f[21]={0};for(memset(c,1,84),c[S]=0;S;){for(i=n+1;--i;c[i]=c[S]+g[S][i]<?c[i])f[S]=1;for(S=i=0;++i<=n;)S=f[i]|c[i]>c[S]?S:i;}return c[G];}main(y,Y){for(memset(g,scanf("%d%d",&n,&i),1764);~i--;~i&&(g[x][X]=y,g[X]...
s750521954
p00117
C++
#include <iostream> #include <string> #include <algorithm> #include <functional> #include <vector> #include <utility> #include <cstring> #include <iomanip> #include <numeric> #include <cmath> #include <queue> #include <map> using namespace std; typedef long long ll; typedef pair<int, int> P; const int INF = 1<<30; con...
a.cc: In function 'int search(int, int)': a.cc:33:12: error: 'd' was not declared in this scope; did you mean 'dy'? 33 | if(d[now.second] < now.first) continue; | ^ | dy
s979126162
p00117
C++
#include <iostream> #include <string> #include <sstream> #include <algorithm> int n, m, start, goal, money, pole; int roads[21][21]; int in[4]; std::string input; int check( int pos, int hbt, unsigned int c ){ if( pos == goal ) return c; unsigned int cost = -1; for( int i = 1; i <= m; ++i ){ if( roads[pos][i] ...
a.cc: In function 'int main()': a.cc:26:9: error: 'memset' was not declared in this scope 26 | memset( roads, -1, sizeof( roads ) ); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include <algorithm> +++ |+#...
s885074825
p00117
C++
#include <iostream> #include <algorithm> #define MAX_N 20 #define INF 1e9 using namespace std; int dp[MAX_N][MAX_N]; int dp[MAX_N][MAX_N]; int n,m; void warshall_froyd(){ for(int k=0;k<n;k++){ for(int i=0;i<n;i++){ for(int j=0;j<n;j++) dp[i][j] = min(dp[i][j], dp[i][k] + dp[k][j]); } } } in...
a.cc:8:5: error: redefinition of 'int dp [20][20]' 8 | int dp[MAX_N][MAX_N]; | ^~ a.cc:7:5: note: 'int dp [20][20]' previously declared here 7 | int dp[MAX_N][MAX_N]; | ^~ a.cc: In function 'int main()': a.cc:39:10: error: 'start' was not declared in this scope 39 | cin >> start >> goal...
s260404866
p00117
C++
#include <iostrem> #include <cstdio> using namspace std; int N, M, A, B, C, D, x1, x2, y1, y2; int K[32][32]; const int inf =1001001001; int main(){ for (int i = 0; i < 32; ++i) { for (int j = 0; j < 32; ++i) { K[i][j]= inf; } } scanf("%d%d", &N, &M); for(int i=0; i<M; ++i){ scanf("%d,...
a.cc:1:10: fatal error: iostrem: No such file or directory 1 | #include <iostrem> | ^~~~~~~~~ compilation terminated.
s489188983
p00117
C++
#include <iostrem> #include <cstdio> using namspace std; int N, M, A, B, C, D, x1, x2, y1, y2; int K[32][32]; const int inf =1001001001; int main(){ for (int i = 0; i < 32; ++i) { for (int j = 0; j < 32; ++i) { K[i][j]= inf; } } scanf("%d%d", &N, &M); for(int i=0; i<M; ++i){ scanf("%d,%...
a.cc:1:10: fatal error: iostrem: No such file or directory 1 | #include <iostrem> | ^~~~~~~~~ compilation terminated.
s605044442
p00117
C++
#include <iostream> #include <cstdio> using namespace std; int N, M, A, B, C, D, x1, x2, y1, y2; int K[32][32]; int mini(int s,int t){ if(s>t){ return t; } return s } int main(){ scanf("%d%d", &N, &M); for (int i=0; i<M;++i){ scanf("%d,%d,%d,%d", &A, &B, &C, &D); K[A][B]=C; K[B][A]=D; //...
a.cc:4:31: warning: built-in function 'y1' declared as non-function [-Wbuiltin-declaration-mismatch] 4 | int N, M, A, B, C, D, x1, x2, y1, y2; | ^~ a.cc: In function 'int mini(int, int)': a.cc:11:11: error: expected ';' before '}' token 11 | return s | ^ ...
s203644567
p00117
C++
#include <iostream> #include <stdio.h> using namespace std; int main(){ int cityNum,roadNum; int city[20]; int road[190][2]; int roadCost[190][2]; //0:0-1 1:1-0 int i,j; int start,goal,money,hashira; bool flg; cin>>cityNum>>roadNum; for(i=0;i<roadNum;i++){ scanf("%d,%d,%d,%d",&road[i][0],&road[i][1],&road...
a.cc: In function 'int main()': a.cc:39:28: error: invalid operands of types 'int' and 'int [2]' to binary 'operator-' 39 | cout<<money-hashira-road[goal]<<endl; | ~~~~~~~~~~~~~^~~~~~~~~~~ | | | | int int [2]
s752378829
p00117
C++
def show(m,a,b,c,d,x): for i in xrange(m): x[a[i]-1][b[i]-1] = c[i] x[b[i]-1][a[i]-1] = d[i] return x def fw(n,x): for r in xrange(n): for p in xrange(n): for q in xrange(n): if x[p][q] > x[p][r] + x[r][q]: x[p][q] = x[p][r] + x[r][q] ...
a.cc:1:1: error: 'def' does not name a type 1 | def show(m,a,b,c,d,x): | ^~~
s135259325
p00117
C++
#include <iostream> using namespace std; int main(){ int cost[22][22]={0}; int n,m,i,j,k,a,b,c,d; char cc; cin>>n>>m; for(i=1;i<=n;i++){ for(j=1;j<=n;j++){ cost[i][j] = 1<<28; } } for(i=0;i<m;i++){ cin>>a>>cc>>b>>cc>>c>>cc>>d; cost[a][b]=c;cost[...
a.cc:24:5: error: 'cin' does not name a type 24 | cin>>a>>cc>>b>>cc>>c>>cc>>d; | ^~~ a.cc:25:5: error: 'cout' does not name a type 25 | cout << c-d-cost[a][b]-cost[b][a] << endl; | ^~~~ a.cc:26:1: error: expected declaration before '}' token 26 | } | ^
s337725191
p00117
C++
#include <iostream> using namespace std; int main(){ int cost[22][22]={0}; int n,m,i,j,k,a,b,c,d; char cc; cin>>n>>m; for(i=1;i<=n;i++){ for(j=1;j<=n;j++){ cost[i][j] = 1<<28; } } for(i=0;i<m;i++){ cin>>a>>cc>>b>>cc>>c>>cc>>d; cost[a][b]=c;cost[...
a.cc: In function 'int main()': a.cc:24:2: error: expected '}' at end of input 24 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s739797588
p00117
C++
#include <list> #include <queue> #include <vector> #include <algorithm> #include <functional> #define INF (1LL << 60) using namespace std; bool used[200000]; long long dist[200000]; void dijkstra(int V, int E, int s, vector<pair<int, long long> > X[]) { priority_queue<pair<long long, int>, vector<pair<long long, int> ...
a.cc:26:31: warning: built-in function 'y1' declared as non-function [-Wbuiltin-declaration-mismatch] 26 | int V, E, a, b, c, d, x1, x2, y1, y2; vector<pair<int, int> > G[200000]; | ^~ a.cc: In function 'int main()': a.cc:28:9: error: 'scanf' was not declared in this scope 28 |...
s992523173
p00117
C++
#include <list> #include <queue> #include <vector> #include <algorithm> #include <functional> #define INF (1LL << 60) using namespace std; bool used[200000]; long long dist[200000]; void dijkstra(int V, int E, int s, vector<pair<int, long long> > X[]) { priority_queue<pair<long long, int>, vector<pair<long long, int> ...
a.cc: In function 'int main()': a.cc:28:9: error: 'scanf' was not declared in this scope 28 | scanf("%d%d", &V, &E); | ^~~~~ a.cc:35:32: error: cannot convert 'std::vector<std::pair<int, int> >*' to 'std::vector<std::pair<int, long long int> >*' 35 | dijkstra(V, E, f1 - 1, G); g1 -= ...
s336659011
p00117
C++
#define scanf_s scanf #include <stdio.h> #include<iostream> #include <list> #include <vector> #include <iostream> using namespace std; #define MAX 101 struct node { list<int> li; list<int> cost; }; int sum = 0, n, m, s, g, ans,flag = 0,min = -1; void sai(int N, int a,int f) { if (N < m) { if (f == a) { //&& flag ...
a.cc: In function 'void sai(int, int, int)': a.cc:18:29: error: reference to 'min' is ambiguous 18 | if (min == -1 || min > sum) min = sum; | ^~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classe...
s475210348
p00117
C++
#define scanf_s scanf #include <stdio.h> #include<iostream> #include <list> #include <vector> #include <iostream> using namespace std; #define MAX 101 struct node { list<int> li; list<int> cost; }; int sum = 0, n, m, s, g, ans,flag = 0,min = -1; node x[MAX]; void sai(int N, int a,int f) { if (N < m) { if (f == a)...
a.cc: In function 'void sai(int, int, int)': a.cc:19:29: error: reference to 'min' is ambiguous 19 | if (min == -1 || min > sum) min = sum; | ^~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classe...
s814324835
p00117
C++
#define scanf_s scanf #include <stdio.h> #include<iostream> #include <list> #include <vector> #include <iostream> using namespace std; #define MAX 101 struct node { list<int> li; list<int> cost; }; int sum = 0, n, m, s, g, ans,flag = 0,min = -1; node x[MAX]; void sai(int N, int a,int f) { if (N < m) { if (f == a)...
a.cc: In function 'void sai(int, int, int)': a.cc:19:29: error: reference to 'min' is ambiguous 19 | if (min == -1 || min > sum) min = sum; | ^~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classe...
s913592368
p00117
C++
#define scanf_s scanf #include <stdio.h> #include<iostream> #include <list> #include <vector> #include <iostream> using namespace std; #define MAX 101 struct node { list<int> li; list<int> cost; }; int sum = 0, n, m, s, g, ans, min = -1; node x[MAX]; void sai(int N, int a,int f) { if (N < m) { if (f == a) { if...
a.cc: In function 'void sai(int, int, int)': a.cc:19:29: error: reference to 'min' is ambiguous 19 | if (min == -1 || min > sum) min = sum; | ^~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classe...
s121196648
p00117
C++
#include <bits/stdc++.h> using namespace std; int n,m; int place[21][21]; int road[21][21]; int co[21][21]; int maxnum[21],minnum[21]; int serch(int start,int finish,int money,int go,int now) { if(money<0)return 0; if(go==1&&start==now)return money; if(finish==now)go=1; int ans=0; for(int i=minnum[n...
a.cc: In function 'int serch(int, int, int, int, int)': a.cc:17:30: error: too many arguments to function 'int serch(int, int, int, int, int)' 17 | ans=max(ans,serch(start,finish,money-place[now][i],go,i,now)); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:8:5: not...
s490517194
p00117
C++
#include<iostream> #include<algorithm> #define INF 50000000 using namespace std; int graf[20][20]; int kyo[20]; bool use[20]; void dijk(int ve, int st) { fill(kyo, kyo + ve, INF); fill(use, use + ve, false); kyo[st - 1] = 0; while (1) { int v = -1; for (int i = 0;i < ve; i++) { if (!use[i] && (v == -1 || ...
a.cc: In function 'void dijk(int, int)': a.cc:23:65: error: expected ')' before ']' token 23 | kyo[i] = min(kyo[i], kyo[v] + graf[v][i]]); | ~ ^ | ) a.cc: ...
s408386866
p00117
C++
#if 0 accept????????? 30?????????????????£??? ??????????????????????????????????§£???????????£????????? ??????????????????????????????????§£???????????£????????§ ??????????????????????§£????????????????????¨???????????? Floyd-Warshall????????¨?????? #endif #include <iostream> using namespace std; int N, M, A, B, C...
a.cc:3:20: error: extended character £ is not valid in an identifier 3 | 30?????????????????£??? | ^ a.cc:5:35: error: extended character § is not valid in an identifier 5 | ??????????????????????????????????§£???????????£????????? | ^ a.cc:5:35: ...
s309805664
p00117
C++
#include<cstdio> #include<iostream> #include<algorithm> #include<string> #include<queue> #include<vector> #include<functional> #include<cmath> #include<map> #include<stack> #include<set> #include<numeric> #include<limits> #include<iterator> #define all(x) (x).begin(),(x).end() #define rall(x) (x).rbegin(),(x).rend() ...
a.cc: In function 'int main()': a.cc:63:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 63 | scanf_s("%d,%d,%d,%d", &a, &b, &c, &d); | ^~~~~~~ | scanf a.cc:68:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf...
s656851453
p00117
C++
#include<cstdio> #include<iostream> #include<algorithm> #include<string> #include<queue> #include<vector> #include<functional> #include<cmath> #include<map> #include<stack> #include<set> #include<numeric> #include<limits> #include<iterator> #define all(x) (x).begin(),(x).end() #define rall(x) (x).rbegin(),(x).rend() ...
a.cc: In function 'int main()': a.cc:62:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 62 | scanf_s("%d,%d,%d,%d", &a, &b, &c, &d); | ^~~~~~~ | scanf a.cc:67:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf...
s406296275
p00117
C++
#include<iostream> using namespace std; #define REP(i, n) for(int i=0; i<n; i++) #define REP1(i, n) for(int i=0; i<n; i++) int INF = 10e8; int n, m; int dis[21][21]; int s, g, v, p; int main(){ cin >> n >> m; REP(i, n+1){ REP(j, n+1){ if(i!=0 && i==j){ dis[i][j] = 0; ...
a.cc: In function 'int main()': a.cc:28:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 28 | scanf_s("%d,%d,%d,%d", &a, &b, &c, &d); | ^~~~~~~ | scanf a.cc:33:5: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 33 | scanf_s("%...
s464686913
p00117
C++
#include<iostream> #include<cstdio> using namespace std; #define REP(i, n) for(int i=0; i<n; i++) #define REP1(i, n) for(int i=0; i<n; i++) int INF = 10e8; int n, m; int dis[21][21]; int s, g, v, p; int main(){ cin >> n >> m; REP(i, n+1){ REP(j, n+1){ if(i!=0 && i==j){ d...
a.cc: In function 'int main()': a.cc:29:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 29 | scanf_s("%d,%d,%d,%d", &a, &b, &c, &d); | ^~~~~~~ | scanf a.cc:34:5: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 34 | scanf_s("%...
s407669204
p00117
C++
#include<bits/stdc++.h> #define SIZE 100005 #define MAX_V 100001 #define INF (1e9 + 1) using namespace std; typedef long long ll; typedef pair<int,int> P; int g[20][20]; int main(){ int n,m; scanf("%d%d",&n,&m); for(int i=0;i<n;i++){ for(int j=0;j<m;j++){ g[i][j]=INF; } } for(int i=0;i<m;i++){ int a,b,c,...
a.cc: In function 'int main()': a.cc:29:34: error: invalid types 'int[int]' for array subscript 29 | g[i][j]=min(g[i][j],g[i][k]+g[k][j]); | ^ a.cc:29:46: error: invalid types 'int[int]' for array subscript 29 | ...
s794330781
p00117
C++
#include <stdio.h> #include <math.h> #include<iostream> #include<string> #include<algorithm> #include<set> #include<map> #include<vector> #include<stack> #include<queue> #include<cmath> #include<numeric> using namespace std; int main(){ int n,m; int a[20][20]; cin>>n>>m; fill(&a[0][0],&a[20][20],I...
a.cc: In function 'int main()': a.cc:24:30: error: 'INT_MAX' was not declared in this scope 24 | fill(&a[0][0],&a[20][20],INT_MAX/2); | ^~~~~~~ a.cc:13:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 12 | #include<...
s575997281
p00117
C++
#include <stdio.h> #include <math.h> #include<iostream> #include<string> #include<algorithm> #include<set> #include<map> #include<vector> #include<stack> #include<queue> #include<cmath> #include<numeric> using namespace std; int main(){ int n,m; int a[20][20]; cin>>n>>m; fill(&a[0][0],&a[20][20],I...
a.cc: In function 'int main()': a.cc:24:30: error: 'INT_MAX' was not declared in this scope 24 | fill(&a[0][0],&a[20][20],INT_MAX/2); | ^~~~~~~ a.cc:13:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 12 | #include<...
s359964447
p00117
C++
#include <stdio.h> #include <math.h> #include<iostream> #include<string> #include<algorithm> #include<set> #include<map> #include<vector> #include<stack> #include<queue> #include<cmath> #include<numeric> using namespace std; int main(){ int n,m; int a[20][20]; cin>>n>>m; fill(&a[0][0],&a[20][20],I...
a.cc: In function 'int main()': a.cc:24:30: error: 'INT_MAX' was not declared in this scope 24 | fill(&a[0][0],&a[20][20],INT_MAX/2); | ^~~~~~~ a.cc:13:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 12 | #include<...
s759065937
p00117
C++
#include<iostream> #include<vector> #include<string.h> #include<stdlib.h> using namespace std; struct Node{ int num; vector<int> edge_to; vector<int> edge_cost; bool done; int cost; }; vector<string> splitAll(string s, string t) { vector<string> v; for (int p = 0; (p = s.find(t)) != s.npos; ) { v....
a.cc: In function 'int main()': a.cc:103:16: error: conflicting declaration 'std::vector<Node> n' 103 | vector<Node> n; | ^ a.cc:55:7: note: previous declaration as 'int n' 55 | int n,m; | ^ a.cc:104:5: error: request for member 'reserve' in 'n', which is of non-class type 'int...
s546324903
p00117
C++
#include <iostream> #include <vector> #include <queue> #include <string> using namespace std; int d[21][21]; int main(){ char ch; int n, m; memset(d, -1, sizeof(d)); int x1, x2, y1, y2; cin >> n >> m; for(int i = 0; i < m; i++){ int a, b, c, d2; cin >> a >> ch >> b >> ch >> c >> ch >> d2; d[a]...
a.cc: In function 'int main()': a.cc:12:3: error: 'memset' was not declared in this scope 12 | memset(d, -1, sizeof(d)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <queue> +++ |+#include <cstring> 4 | #i...
s506336553
p00117
C++
#include<vector> #include<list> #include<algorithm> #include<iostream> #include<string> #include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> using namespace std; void f(int a[][21],int b[],int c,int e,int m){ int i; if(c==e){ if(b[c]==-1||b[c]>m) b[c]=m; }else if(b[c]==-1||b[c]>m){ b...
a.cc: In function 'int main()': a.cc:43:12: error: no match for 'operator>' (operand types are 'std::basic_ostream<char>' and 'int') 43 | cout<<x-y>0?x-y:0<<endl; | ~~~~~~~~~^~ | | | | | int | std::basic_ostream<char> a.cc:43:12: note: candidate: 'operator>(int, ...
s249127128
p00117
C++
} int x1, x2, y1, y2; scanf("%d,%d,%d,%d",&x1,&x2,&y1,&y2); //processing int lowest = wfloyd(n,x1,x2) + wfloyd(n,x2,x1), res = y1 - y2 - lowest; std::cout << wfloyd(n,x1,x2) << std::endl; std::cout << wfloyd(n,x2,x1) << std::endl; std::cout << res << std::endl; return 0; }
a.cc:1:9: error: expected declaration before '}' token 1 | } | ^ a.cc:3:21: warning: built-in function 'y1' declared as non-function [-Wbuiltin-declaration-mismatch] 3 | int x1, x2, y1, y2; | ^~ a.cc:4:14: error: expected constructor, destructor, or type c...
s695568949
p00117
C++
#include <iostream> using namespace std; #define INF (1<<30) int dist[30][30]; int main(){ int n, m; cin >> n >> m; for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ if(i == j)dist[i][j] = 0; else dist[i][j] = INF; } } for(int i=0;i<m;i++){ int a, b, c, d; cin >> a >> b >> c >> d; dist[a-1][b-1]...
a.cc:32:44: error: extended character   is not valid in an identifier 32 | cout << (y1 - y2 - dist[x1-1][x2-1] - dist[x2-1][x1-1]) << endl; | ^ a.cc: In function 'int main()': a.cc:32:44: error: expected ')' before '\U00003000' 32 | cout << (y1 - y2...
s026063959
p00117
C++
#include <algorithm> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <cctype> #include <cmath> #include <cassert> #include <iostream> #include <map> #include <queue> #include <sstream> #include <string> #include <stack> #include <set> #include <vector> using namespace std; #define ...
a.cc:77:5: warning: missing terminating " character 77 | "rep(i, n) dp[i][i] = 0; | ^ a.cc:77:5: error: missing terminating " character 77 | "rep(i, n) dp[i][i] = 0; | ^~~~~~~~~~~~~~~~~~~~~~~~
s527306172
p00117
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; int main() { int n, m; int x1, x2, y1, y2; char dummy; cin >> n; cin >> m; vector<int> a(m), b(m), c(m), d(m); vector< vector <int> > map(n + 1, vector<int>(n + 1, INT_MAX / 4)); for(int i = 0; i < m; i++) { ...
a.cc: In function 'int main()': a.cc:17:62: error: 'INT_MAX' was not declared in this scope 17 | vector< vector <int> > map(n + 1, vector<int>(n + 1, INT_MAX / 4)); | ^~~~~~~ a.cc:5:1: note: 'INT_MAX' is defined in header '<climits>'; this is...
s601815399
p00118
Java
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int H=sc.nextInt(); int W=sc.nextInt(); String[][] k=new int[H][W]; for(int i=0;i<H;i++){ for(int j=0;j<W;j++){ k[i][j]=sc.next; } } solve(); } void kukaku(int x,int y){ String p=k[x][y]; k[x][y]="."; int[] dx={-1...
Main.java:7: error: incompatible types: int[][] cannot be converted to String[][] String[][] k=new int[H][W]; ^ Main.java:10: error: cannot find symbol k[i][j]=sc.next; ^ symbol: variable next location: variable sc of type Scanner Main.java:13: error: non-static method solve() cannot be ref...
s786659743
p00118
Java
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); public int H=sc.nextInt(); public int W=sc.nextInt(); public String[][] k=new String[H][W]; for(int i=0;i<H;i++){ for(int j=0;j<W;j++){ k[i][j]=sc.next; } } solve(); } void kukaku(int x,int y){ String p=k[x][y]; k...
Main.java:5: error: illegal start of expression public int H=sc.nextInt(); ^ Main.java:8: error: illegal start of type for(int i=0;i<H;i++){ ^ Main.java:8: error: > or ',' expected for(int i=0;i<H;i++){ ^ Main.java:8: error: <identifier> expected for(int i=0;i<H;i++){ ^ Main.java:13: err...
s078467358
p00118
Java
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); public int H=sc.nextInt(); public int W=sc.nextInt(); public String[][] k=new String[H][W]; for(int i=0;i<H;i++){ for(int j=0;j<W;j++){ k[i][j]=sc.next; } } solve(); } void kukaku(int x,int y){ String p=k[x][y]; k...
Main.java:5: error: illegal start of expression public int H=sc.nextInt(); ^ Main.java:8: error: illegal start of type for(int i=0;i<H;i++){ ^ Main.java:8: error: > or ',' expected for(int i=0;i<H;i++){ ^ Main.java:8: error: <identifier> expected for(int i=0;i<H;i++){ ^ Main.java:13: err...
s695177329
p00118
Java
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int H=sc.nextInt(); int W=sc.nextInt(); String[][] k=new String[H][W]; for(int i=0;i<H;i++){ for(int j=0;j<W;j++){ k[i][j]=sc.next; } } solve(); } void kukaku(int x,int y){ String p=k[x][y]; k[x][y]="."; int[] dx=...
Main.java:10: error: cannot find symbol k[i][j]=sc.next; ^ symbol: variable next location: variable sc of type Scanner Main.java:13: error: non-static method solve() cannot be referenced from a static context solve(); ^ Main.java:16: error: cannot find symbol String p=k[x][y]; ^ symbol: var...
s573825234
p00118
Java
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int H=sc.nextInt(); int W=sc.nextInt(); String[][] k=new String[H][W]; for(int i=0;i<H;i++){ for(int j=0;j<W;j++){ k[i][j]=sc.next; } } solve(); } void kukaku(int x,int y){ String p=this.k[x][y]; this.k[x][y]=".";...
Main.java:10: error: cannot find symbol k[i][j]=sc.next; ^ symbol: variable next location: variable sc of type Scanner Main.java:13: error: non-static method solve() cannot be referenced from a static context solve(); ^ Main.java:16: error: cannot find symbol String p=this.k[x][y]; ^ symb...
s340411090
p00118
Java
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int H=sc.nextInt(); int W=sc.nextInt(); String[][] k=new String[H][W]; for(int i=0;i<H;i++){ for(int j=0;j<W;j++){ k[i][j]=sc.next; } } solve(); void kukaku(int x,int y){ String p=k[x][y]; k[x][y]="."; int[] dx={-...
Main.java:14: error: illegal start of expression void kukaku(int x,int y){ ^ Main.java:14: error: ';' expected void kukaku(int x,int y){ ^ Main.java:14: error: <identifier> expected void kukaku(int x,int y){ ^ Main.java:14: error: ';' expected void kukaku(int x,int y){ ...
s681996585
p00118
Java
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int H=sc.nextInt(); int W=sc.nextInt(); String[][] k=new String[H][W]; for(int i=0;i<H;i++){ for(int j=0;j<W;j++){ k[i][j]=sc.next; } } solve(); void kukaku(int x,int y){ String p=k[x][y]; k[x][y]="."; int[] dx={-...
Main.java:14: error: illegal start of expression void kukaku(int x,int y){ ^ Main.java:14: error: ';' expected void kukaku(int x,int y){ ^ Main.java:14: error: <identifier> expected void kukaku(int x,int y){ ^ Main.java:14: error: ';' expected void kukaku(int x,int y){ ...
s479343715
p00118
Java
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int H=sc.nextInt(); int W=sc.nextInt(); String[][] k=new String[H][W]; for(int i=0;i<H;i++){ for(int j=0;j<W;j++){ k[i][j]=sc.next; } } solve(); void kukaku(int x,int y){ String p=k[x][y]; k[x][y]="."; int[] dx={-...
Main.java:14: error: illegal start of expression void kukaku(int x,int y){ ^ Main.java:14: error: ';' expected void kukaku(int x,int y){ ^ Main.java:14: error: <identifier> expected void kukaku(int x,int y){ ^ Main.java:14: error: ';' expected void kukaku(int x,int y){ ...
s195819185
p00118
Java
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int H=sc.nextInt(); int W=sc.nextInt(); String[][] k=new String[H][W]; for(int i=0;i<H;i++){ for(int j=0;j<W;j++){ k[i][j]=sc.next(); } } solve(); void kukaku(int x,int y){ String p=k[x][y]; k[x][y]="."; int[] dx=...
Main.java:14: error: illegal start of expression void kukaku(int x,int y){ ^ Main.java:14: error: ';' expected void kukaku(int x,int y){ ^ Main.java:14: error: <identifier> expected void kukaku(int x,int y){ ^ Main.java:14: error: ';' expected void kukaku(int x,int y){ ...
s653051600
p00118
Java
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); protected int H=sc.nextInt(); protected int W=sc.nextInt(); protected String[][] k=new String[H][W]; for(int i=0;i<H;i++){ for(int j=0;j<W;j++){ k[i][j]=sc.next(); } } solve(); } void kukaku(int x,int y){ String p...
Main.java:5: error: illegal start of expression protected int H=sc.nextInt(); ^ Main.java:8: error: illegal start of type for(int i=0;i<H;i++){ ^ Main.java:8: error: > or ',' expected for(int i=0;i<H;i++){ ^ Main.java:8: error: <identifier> expected for(int i=0;i<H;i++){ ^ Main.java:13: ...
s801179958
p00118
Java
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); protected int H=sc.nextInt(); protected int W=sc.nextInt(); protected String[][] k=new String[H][W]; for(int i=0;i<H;i++){ for(int j=0;j<W;j++){ k[i][j]=sc.next(); } } solve(); } public static void kukaku(int x,in...
Main.java:5: error: illegal start of expression protected int H=sc.nextInt(); ^ Main.java:8: error: illegal start of type for(int i=0;i<H;i++){ ^ Main.java:8: error: > or ',' expected for(int i=0;i<H;i++){ ^ Main.java:8: error: <identifier> expected for(int i=0;i<H;i++){ ^ Main.java:13: ...
s812359658
p00118
Java
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int H=sc.nextInt(); int W=sc.nextInt(); String[][] k=new String[H][W]; for(int i=0;i<H;i++){ for(int j=0;j<W;j++){ k[i][j]=sc.next(); } } solve(); } public static void kukaku(int x,int y){ String p=k[x][y]; k[x][y...
Main.java:16: error: cannot find symbol String p=k[x][y]; ^ symbol: variable k location: class Main Main.java:17: error: cannot find symbol k[x][y]="."; ^ symbol: variable k location: class Main Main.java:21: error: cannot find symbol if(p!="."&&p==k[x+dx[i]][y+dy[i]]&&x+dx[i]>=0&&x+dx[i]<H&&y+dy[i...
s993187823
p00118
Java
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int H=sc.nextInt(); int W=sc.nextInt(); String[][] k=new String[H][W]; for(int i=0;i<H;i++){ for(int j=0;j<W;j++){ k[i][j]=sc.next(); } } int num=0; for(int i=0;i<H;i++){ for(int j=0;j<W;j++){ kukaku(i,j,H,W); num...
Main.java:21: error: illegal start of expression public static void kukaku(int x,int y,int h,int w){ ^ 1 error
s739555405
p00118
Java
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int H=sc.nextInt(); int W=sc.nextInt(); String[][] k=new String[H][W]; for(int i=0;i<H;i++){ for(int j=0;j<W;j++){ k[i][j]=sc.next(); } } int num=0; for(int i=0;i<H;i++){ for(int j=0;j<W;j++){ kukaku(i,j,H,W); num...
Main.java:21: error: illegal start of expression void kukaku(int x,int y,int h,int w){ ^ Main.java:21: error: ';' expected void kukaku(int x,int y,int h,int w){ ^ Main.java:21: error: <identifier> expected void kukaku(int x,int y,int h,int w){ ^ Main.java:21: error: <identifier> expected vo...
s059059328
p00118
Java
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int H=sc.nextInt(); int W=sc.nextInt(); String[][] k=new String[H][W]; for(int i=0;i<H;i++){ for(int j=0;j<W;j++){ k[i][j]=sc.next(); } } int num=0; for(int i=0;i<H;i++){ for(int j=0;j<W;j++){ kukaku(i,j,H,W); num...
Main.java:21: error: illegal start of expression void kukaku(int x,int y,int h,int w){ ^ Main.java:21: error: ';' expected void kukaku(int x,int y,int h,int w){ ^ Main.java:21: error: <identifier> expected void kukaku(int x,int y,int h,int w){ ^ Main.java:21: error: <identifier> expected vo...
s907335518
p00118
Java
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int H=sc.nextInt(); int W=sc.nextInt(); String[][] k=new String[H][W]; for(int i=0;i<H;i++){ for(int j=0;j<W;j++){ k[i][j]=sc.next(); } } int num=0; for(int i=0;i<H;i++){ for(int j=0;j<W;j++){ kukaku(i,j,H,W); num...
Main.java:32: error: reached end of file while parsing } ^ 1 error
s803222388
p00118
Java
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int H=sc.nextInt(); int W=sc.nextInt(); String[][] k=new String[H][W]; for(int i=0;i<H;i++){ for(int j=0;j<W;j++){ k[i][j]=sc.next(); } } int num=0; for(int i=0;i<H;i++){ for(int j=0;j<W;j++){ kukaku(i,j,H,W); num...
Main.java:16: error: non-static method kukaku(int,int,int,int) cannot be referenced from a static context kukaku(i,j,H,W); ^ Main.java:23: error: cannot find symbol String p=k[x][y]; ^ symbol: variable k location: class Main Main.java:24: error: cannot find symbol k[x][y]="."; ^ symbol: variable k ...
s354705825
p00118
Java
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int H=sc.nextInt(); int W=sc.nextInt(); String[][] k=new String[H][W]; for(int i=0;i<H;i++){ for(int j=0;j<W;j++){ k[i][j]=sc.next(); } } int num=0; for(int i=0;i<H;i++){ for(int j=0;j<W;j++){ kukaku(i,j,H,W); num...
Main.java:23: error: cannot find symbol String p=k[x][y]; ^ symbol: variable k location: class Main Main.java:24: error: cannot find symbol k[x][y]="."; ^ symbol: variable k location: class Main Main.java:28: error: cannot find symbol if(p!="."&&p==k[x+dx[i]][y+dy[i]]&&x+dx[i]>=0&&x+dx[i]<h&&y+dy[i...
s529445396
p00118
Java
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int H=sc.nextInt(); int W=sc.nextInt(); public String[][] k=new String[H][W]; for(int i=0;i<H;i++){ for(int j=0;j<W;j++){ k[i][j]=sc.next(); } } int num=0; for(int i=0;i<H;i++){ for(int j=0;j<W;j++){ kukaku(i,j,H,...
Main.java:7: error: illegal start of expression public String[][] k=new String[H][W]; ^ Main.java:8: error: illegal start of type for(int i=0;i<H;i++){ ^ Main.java:8: error: > or ',' expected for(int i=0;i<H;i++){ ^ Main.java:8: error: <identifier> expected for(int i=0;i<H;i++){ ^ Main.j...
s869663684
p00118
Java
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int H=sc.nextInt(); int W=sc.nextInt(); String[][] k=new String[H][W]; for(int i=0;i<H;i++){ for(int j=0;j<W;j++){ k[i][j]=sc.next(); } } int num=0; for(int i=0;i<H;i++){ for(int j=0;j<W;j++){ kukaku(k,i,j,H,W); n...
Main.java:16: error: incompatible types: String[][] cannot be converted to String[] kukaku(k,i,j,H,W); ^ Main.java:23: error: array required, but String found String p=k[I][J]; ^ Main.java:24: error: array required, but String found k[I][J]="."; ^ Main.java:28: error: array required, but String ...
s518571028
p00118
Java
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int H=sc.nextInt(); int W=sc.nextInt(); String[][] k=new String[H][W]; for(int i=0;i<H;i++){ for(int j=0;j<W;j++){ k[i][j]=sc.next(); } } int num=0; for(int i=0;i<H;i++){ for(int j=0;j<W;j++){ kukaku(k,i,j,H,W); n...
Main.java:16: error: incompatible types: String[][] cannot be converted to String[] kukaku(k,i,j,H,W); ^ Main.java:23: error: array required, but String found String p=k[I][J]; ^ Main.java:24: error: array required, but String found k[I][J]="."; ^ Main.java:28: error: array required, but String ...
s170638090
p00118
Java
import java.util.*; public class Main{ Scanner sc=new Scanner(System.in); int H=sc.nextInt(); int W=sc.nextInt(); String[][] k=new String[H][W]; for(int i=0;i<H;i++){ for(int j=0;j<W;j++){ k[i][j]=sc.next(); } } public static void main(String[] args){ int num=0; for(int i=0;i<H;i++){ for(int j=0;j<W;j++)...
Main.java:14: error: illegal start of type for(int i=0;i<H;i++){ ^ Main.java:14: error: > or ',' expected for(int i=0;i<H;i++){ ^ Main.java:14: error: <identifier> expected for(int i=0;i<H;i++){ ^ 3 errors