submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s035354999
p00186
C++
#include <iostream> #include <csdio> using namespace std; int main(void) { int q1, b, c1, c2, q2; while(1){ scanf("%d", &q1); if (q1 == 0) break; scanf("%d %d %d %d", &b, &c1, &c2, &q2); if (c1 <= c2){ int x = min(b/c1, q2); int y = ((b - x) * c1) / c2; if ((x + y) < q1){ printf("NA\n"); ...
a.cc:2:10: fatal error: csdio: No such file or directory 2 | #include <csdio> | ^~~~~~~ compilation terminated.
s948640742
p00186
C++
g#include <iostream> using namespace std; int main() { int q1, b, c1, c2, q2; while(cin >> q1, q1) { cin >> b >> c1 >> c2 >> q2; int aizu = min(b / c1, q2); if (aizu == 0) { cout << "NA" << endl; continue; } int money = b - aizu * c1; int ordinal = money / c2; bool possible = ...
a.cc:1:2: error: stray '#' in program 1 | g#include <iostream> | ^ a.cc:1:1: error: 'g' does not name a type 1 | g#include <iostream> | ^ a.cc: In function 'int main()': a.cc:7:15: error: 'cin' was not declared in this scope 7 | while(cin >> q1, q1) { | ^~~ a.cc:9:23...
s305755668
p00186
C++
#include<ios> main(){for(int q,b,c,d,r,A,N;std::cin>>q>>b>>c>>d>>r,q;A?printf("%d %d\n",A,N):printf("NA\n"))for(A=0;r;r--){N=(b-r*c)/d;if(b>=r*c&&N+r>=q){A=r;r=1;}}}
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | main(){for(int q,b,c,d,r,A,N;std::cin>>q>>b>>c>>d>>r,q;A?printf("%d %d\n",A,N):printf("NA\n"))for(A=0;r;r--){N=(b-r*c)/d;if(b>=r*c&&N+r>=q){A=r;r=1;}}} | ^~~~ a.cc: In function 'int main()': a.cc:2:35: error: 'cin' is no...
s732779468
p00186
C++
#include<iostream> #include<algorithm> #include<vector> using namespace std; typedef unsigned long long ull; class AOJ0186{ private: int q1,b,c1,c2,q2; public: AOJ0186(int a,int b,int c,int d,int f):q1(a),b(b),c1(c),c2(d),q2(f){} ~AOJ0186(){} void run(){ int aizu_meet,meet; bool ok = false; ...
a.cc:38:30: error: expected '}' at end of input 38 | if(!ok)cout << "NA" << endl; | ^ a.cc:7:14: note: to match this '{' 7 | class AOJ0186{ | ^ a.cc: In member function 'void AOJ0186::run()': a.cc:38:30: error: expected '}' at end of input 38 | if(!ok)co...
s318838649
p00186
C++
#include <iostream> using namespace std; int main(){ int b,c1,c2,q1,q2,aizu,ord; while(cin>>q1,q1){ cin>>b>>c1>>c2>>q2; if(b/c1>q2){ aizu=q2; ord=(b-c1*q2)/c2; }else{ aizu=b/c1; ord=(b%c1)/c2; } //cout<<aizu<<" "<<ord<<endl; if(c1>b){cout<<"NA"<<endl;} else if((aizu+ord)<q1){ for(int i=a...
a.cc: In function 'int main()': a.cc:26:29: error: 'flag' was not declared in this scope 26 | if(!flag){ | ^~~~
s180621031
p00186
C++
#include <iostream> #include <algorithm> #include <cmath> #include <cassert> #include <sstream> using namespace std; void failed() { cout << "NA" << endl; } int main() { int Q1, B, C1, C2, Q2; while(cin >> Q1) { if(Q1 == 0) break; cin >> B >> C1 >> C2 >> Q2; stringstream ss; ss...
In file included from /usr/include/c++/14/cassert:44, from a.cc:4: a.cc: In function 'int main()': a.cc:25:20: error: no match for 'operator&&' (operand types are 'bool' and 'std::__cxx11::basic_stringstream<char>::__string_type' {aka 'std::__cxx11::basic_string<char>'}) 25 | assert(Q2 >= 1 && s...
s274373485
p00187
C
#include <cstdio> #include <cmath> #include <algorithm> #include <vector> using namespace std; int main() { Point p[3], q[3], x[3]; double S; while (1){ for (int i = 0; i < 3; i++){ int x1, y1, x2, y2; scanf("%d %d %d %d", &x1, &y1, &x2, &y2); if (i == 0 && x1 == 0...
main.c:1:10: fatal error: cstdio: No such file or directory 1 | #include <cstdio> | ^~~~~~~~ compilation terminated.
s434343968
p00187
C++
#include <cstdio> #include <cmath> #include <algorithm> #include <vector> using namespace std; int main() { Point p[3], q[3], x[3]; double S; while (1){ for (int i = 0; i < 3; i++){ int x1, y1, x2, y2; scanf("%d %d %d %d", &x1, &y1, &x2, &y2); if (i == 0 && x1 == 0...
a.cc: In function 'int main()': a.cc:10:5: error: 'Point' was not declared in this scope 10 | Point p[3], q[3], x[3]; | ^~~~~ a.cc:20:25: error: 'p' was not declared in this scope 20 | p[i] = Point(x1, y1); q[i] = Point(x2, y2); | ^ a.cc:20:47: e...
s365019064
p00187
C++
#include <cstdio> #include <cmath> #include <algorithm> #include <vector> using namespace std; int main() { Point p[3], q[3], x[3]; double S; while (1){ for (int i = 0; i < 3; i++){ int x1, y1, x2, y2; scanf("%d %d %d %d", &x1, &y1, &x2, &y2); if (i == 0 && x1 == 0...
a.cc: In function 'int main()': a.cc:10:5: error: 'Point' was not declared in this scope 10 | Point p[3], q[3], x[3]; | ^~~~~ a.cc:20:25: error: 'p' was not declared in this scope 20 | p[i] = Point(x1, y1); q[i] = Point(x2, y2); | ^ a.cc:20:47: e...
s063848519
p00187
C++
#include<cmath> #include<algorithm> #include<iostream> #include<vector> #include<climits> using namespace std; double EPS = 1e-10; const double PI = acos(-1); double add(double a, double b){ if(abs(a+b) < EPS * (abs(a)+abs(b)))return 0; return a+b; } struct point{ double x, y; point(){} point(double x,dou...
a.cc: In function 'int main()': a.cc:104:2: error: expected '}' at end of input 104 | } | ^ a.cc:69:15: note: to match this '{' 69 | int main(void){ | ^
s455248429
p00187
C++
# -*- coding: utf-8 -*- EPS = 1e-9 class Point attr_reader :x, :y def initialize(x, y=nil) @x, @y = x, y if y @x, @y = x[0], x[1] unless y end def +(other) Point.new(@x + other.x, @y + other.y) end def -(other) Point.new(@x - other.x, @y - other.y) end def *(other) Point.new(@x * ot...
a.cc:1:3: error: invalid preprocessing directive #- 1 | # -*- coding: utf-8 -*- | ^ a.cc:7:5: error: stray '@' in program 7 | @x, @y = x, y if y | ^ a.cc:7:9: error: stray '@' in program 7 | @x, @y = x, y if y | ^ a.cc:8:5: error: stray '@' in program 8 | @x, ...
s642707514
p00188
Java
import java.util.Scanner; //Search public class AOJ0188 { static int c; static int[] a; static int comp(int k, int x){ c++; return a[k]-x; } public static void main(String[] args) { Scanner sc = new Scanner(System.in); while(true){ int n = sc.nextInt(); if(n==0)break; a = new int[n]; for(in...
Main.java:4: error: class AOJ0188 is public, should be declared in a file named AOJ0188.java public class AOJ0188 { ^ 1 error
s307419862
p00188
Java
import java.util.Scanner; class Main { public static void main(String args[]) { Scanner sc = new Scanner(System.in); while (true) { int n = sc.nextInt(); if (n == 0) break; int num[] = new int[n]; for (int i = 0; i < n; i++) num[i] = sc.nextInt(); int x = sc.nextInt(); int left = 0, right...
Main.java:25: error: 'else' without 'if' else if (right - left < 2) ^ 1 error
s284184488
p00188
Java
import java.util.*; public class Main{ Main(){ Scanner sc = new Scanner(System.in); while(sc.hasNext()){ int r = sc.nextInt(), t, cnt=1, l=0; if(r == 0) break; int[] ary = new int[r+1]; for(int i = 0; i < r; i++) ary[i] = sc.nextInt(); t = sc.nextInt(); r--; for(;l <=...
Main.java:24: error: ';' expected if(l >= r) break ^ 1 error
s283042598
p00188
C
#include<stdio.h> int main(){ int n, a[100], i, target, mid, max, min, p, t = 0; scanf("%d", &n); if (n == 0)break; p = n; max = n - 1; min = 0; for (i = 0; i < n; i++){ scanf("%d", &a[i]); } scanf("%d", &target); mid = (min + max) / 2; while (1){ if (a[mid] == target){ t++; break;...
main.c: In function 'main': main.c:6:28: error: break statement not within loop or switch 6 | if (n == 0)break; | ^~~~~
s072112862
p00188
C
#include <stdio.h> main(){ int a,n[100],i,key,l=0,r=100,mid,c=1; while(1){ scanf("%d",&a); if(a==0) break; for(i=0;i<=a;i++){ scanf("%d",&n[i]); } key=n[a]; r=a-1; if(l!=r){ while(l<r){ c++; mid=(l+r)/2; if(n[mid]==key) break; else if(n[mid]<key) l=mid+1; else r=mid-1; ...
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int] 2 | main(){ | ^~~~ main.c: In function 'main': main.c:21:10: error: 'count' undeclared (first use in this function) 21 | else count=0; | ^~~~~ main.c:21:10: note: each undeclared identifier is reported only once for each f...
s546709859
p00188
C
#include <iostream> using namespace std; int n[101]; int m; int ans; int N; void func(int j,int k){ ans++; if (n[(j+k)/2]==m||j>=k) { return; } else { if (n[(j+k)/2]<m) { func((j+k)/2+1,k); } else if (n[(j+k)/2]>m) { func(j,(j+k)/2-1); } } return; } int main(){ while (1) { cin>>N; if ...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s417491226
p00188
C
#define $ scanf("%d", a[100],l,r,p,n;main(c){for(;l=$&r)*r;printf("%d\n",c)){for(;c=l;)$--l+a);for($&n;l<r&&!++c|a[p=l+r>>1]-n;)a[p]<n?r=p:(l=p+1);}}
main.c:2:1: warning: data definition has no type or storage class 2 | a[100],l,r,p,n;main(c){for(;l=$&r)*r;printf("%d\n",c)){for(;c=l;)$--l+a);for($&n;l<r&&!++c|a[p=l+r>>1]-n;)a[p]<n?r=p:(l=p+1);}} | ^ main.c:2:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int] main.c:2:8: error: type def...
s419836993
p00188
C
#include <stdio.h> int main(void) { int i, n; int x[101]; int search; int l, r, c; int cnt; while (scanf("%d", &n); && n){ for (i = 0; i < n; i++){ scanf("%d", &x[i]); } scanf("%d", &search); l = 0; r = n - 1; while (l <= r){ c = (l + r) / 2; cnt++; if (c == search){ break; } ...
main.c: In function 'main': main.c:10:31: error: expected ')' before ';' token 10 | while (scanf("%d", &n); && n){ | ~ ^ | )
s118905127
p00188
C++
#include <bits/stdc++.h> テつ? using namespace std; テつ? #define FOR(i,k,n) for(int i = (k); i < (n); i++) #define REP(i,n) FOR(i,0,n) #define INF 114514810 #define ELEM(array) (sizeof (array)/sizeof *(array)) #define MAX_N 100 typedef long long ll; テつ? int n = -1; int a[101]; int k; テつ? void serch(int k) { テつ?つ?つ?つ?つ? テつ...
a.cc:2:1: error: '\U000030c6\U00003064' does not name a type 2 | テつ? | ^~~~ a.cc:4:1: error: '\U000030c6\U00003064' does not name a type 4 | テつ? | ^~~~ a.cc:11:1: error: '\U000030c6\U00003064' does not name a type 11 | テつ? | ^~~~ a.cc:15:1: error: '\U000030c6\U00003064' does not name a type...
s747775164
p00188
C++
import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner scan =new Scanner(System.in); while(true){ int n=scan.nextInt(); if(n==0)break; int []a=new int[101]; for(int i=0;i<n;i++){ a[i]=scan.nextInt(); } int m=scan.nextInt(); int r=0,l=...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Arrays; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.util.Scanner; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-t...
s975806389
p00188
C++
import java.util.Scanner; public class Main { public static void main(String[] args) { new Main().run(); } void run(){ Scanner sc = new Scanner(System.in); while(true){ int b = sc.nextInt(); if(b == 0){ //System.out.println("break"); break; } int[] a = new int[b]; int left,right,searchv...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Scanner; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: expected unqualified-id before 'public' 3 | public class Main { | ^~~~~~
s865089376
p00188
C++
import java.util.Scanner; public class Main { public static void main(String[] args) { new Main().run(); } void run(){ Scanner sc = new Scanner(System.in); while(true){ int b = sc.nextInt(); if(b == 0){ //System.out.println("break"); break; } int[] a = new int[b]; int left,right,searchv...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Scanner; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: expected unqualified-id before 'public' 3 | public class Main { | ^~~~~~
s678356749
p00188
C++
import math def f(check, n, L, count): count += 1 median = int(math.floor(float(n-1)/2)) if len(L) == 1: return count elif L[median] == check: return count elif L[median] < check: L = L[median+1:] elif check < L[median]: L = L[:median] n = len(L) return f...
a.cc:1:1: error: 'import' does not name a type 1 | import math | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
s959327184
p00188
C++
import java.util.*; class Main{ public static void main(String args[]){ Solve s = new Solve(); s.solve(); } } class Solve{ Scanner in = new Scanner(System.in); void solve(){ while(in.hasNext()){ int n = in.nextInt(); if(n == 0) return; int[] a = new int[n]; for(int i = 0; i < n; i++) a[i] = in....
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:4:15: error: expected ':' before 'static' 4 | public static void main(String args[]){ | ^~~~~~~ | : a.cc:4:...
s978056639
p00188
C++
#include <stdio.h> int a, b, c; int main() { while(true) { scanf("%d", &a); if(a == 0) break; for(int i = 0; i < n; i++) scanf("%d", &b); c = 0; while (a != 0) { a /= 2; c++; } printf("%d\n", c); } return 0; }
a.cc: In function 'int main()': a.cc:7:36: error: 'n' was not declared in this scope 7 | for(int i = 0; i < n; i++) scanf("%d", &b); | ^
s162787889
p00188
C++
#include<utility> #include<iostream> using namespace std; int n,num[100],aid,sum; void reading(); void binary(); int main(){ while(1){ sum=0; cin >> n; if(n==0)break; reading(); sort(); binary(); cout << sum << endl; } return 0; } void reading(){ for(int i=0;i<n;++i)cin >> num[i]; cin >> aid; ...
a.cc: In function 'int main()': a.cc:17:17: error: 'sort' was not declared in this scope; did you mean 'short'? 17 | sort(); | ^~~~ | short
s011884257
p00188
C++
// #include <iostream> #include <math.h> using namespace std; int main(){ int a, b, times; int i1, tyuusinn, yousosuu, yousosuu2; while(1){ cin >> a; if(a==0){break;} i1=0; times=0; int w[a]; while(1){ cin >> b; w[i1]=b; i1++; if(i1==a)break; ...
a.cc: In function 'int main()': a.cc:24:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 24 | sort(w, w+a); | ^~~~ | sqrt
s865135088
p00188
C++
// #include <iostream> #include <math.h> using namespace std; int main(){ int a, b, times; int i1, tyuusinn, yousosuu, yousosuu2; while(1){ cin >> a; if(a==0){break;} i1=0; times=0; int w[a]; while(1){ cin >> b; w[i1]=b; i1++; if(i1==a)break; ...
a.cc: In function 'int main()': a.cc:24:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 24 | sort(w, w+a); | ^~~~ | sqrt
s415864790
p00188
C++
#include <iostream> #include <math.h> using namespace std; int main(){ int a, b, i1, times, max, min, tyuusinn; while(1){ cin >> a; if(a==0){break;} i1=0; int w[a]; while(1){ cin >> b; w[i1]=b; i1++; if(i1==a){break;} } max=a-1; min=0; times=0; sort(w, w+a...
a.cc: In function 'int main()': a.cc:20:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 20 | sort(w, w+a); | ^~~~ | sqrt
s361603868
p00188
C++
#include <iostream> #include <math.h> using namespace std; int main(){ int a, b, times; int i1, tyuusinn, yousosuu, yousosuu2; while(1){ cin >> a; if(a==0){break;} i1=0; times=0; int w[a]; while(1){ cin >> b; w[i1]=b; i1++; if(i1==a)break; } ...
a.cc: In function 'int main()': a.cc:19:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 19 | sort(w, w+a); | ^~~~ | sqrt
s548148460
p00188
C++
#include <iostream> #include <math.h> using namespace std; int main(){ int a, b, times; int i1, tyuusinn, yousosuu, yousosuu2; while(1){ cin >> a; if(a==0){break;} i1=0; times=0; int w[a]; while(1){ cin >> b; w[i1]=b; i1++; if(i1==a)break; } ...
a.cc: In function 'int main()': a.cc:19:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 19 | sort(w, w+a); | ^~~~ | sqrt
s709837429
p00188
C++
#include <iostream> #include <math.h> using namespace std; int main(){ int a, b, times; int i1, tyuusinn, yousosuu, yousosuu2; while(1){ cin >> a; if(a==0){break;} i1=0; times=0; int w[a]; while(1){ cin >> b; w[i1]=b; i1++; if(i1==a)break; } ...
a.cc: In function 'int main()': a.cc:19:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 19 | sort(w, w+a); | ^~~~ | sqrt
s724322662
p00188
C++
#include <cstdio> #define buf 1000001 using namespace std; int cnt,b[buf]; void binary_search(int d,int a); int main(void){ int i,j,a,n; char str[200]; for( ; ; ){ fgets(str,sizeof(str),stdin); sscanf(str,"%d",&a); if(a==0) break; for(i=0;i<a;i++){ fgets(str,sizeof(str),stdin); sscan...
a.cc: In function 'void binary_search(int, int)': a.cc:34:21: error: 'a1' was not declared in this scope; did you mean 'a'? 34 | left = 0; right = a1; | ^~ | a
s441999285
p00188
C++
#include <iostream> using namespace std; int nibn(int a[], int s, int e, int k); int nibn(int a[], int s, int e, int k){ if(s>e) return 1; if(a[(s+e)/2] == k){ return 1; } else if(a[(s+e)/2] < k){ return 1 + nibn(a,(s+e)/2+1,e,k); } else if(a[(s+e)/2] > k){ return 1 + nibn(a,s,(s+e)/2-1,k); } } int main...
a.cc: In function 'int main()': a.cc:23:17: error: 'ans' was not declared in this scope; did you mean 'abs'? 23 | ans = 0; | ^~~ | abs a.cc: In function 'int nibn(int*, int, int, int)': a.cc:16:1: warning: control reaches end of non-void function [-Wreturn-...
s978563166
p00188
C++
#include<iostream> #include<map> #include<cstdio> #include<cstring> #include<string> using namespace std; int main(){ int set[101],n,k,cnt,a,b; while(1){ cin >> n; if(n==0)break; for(int i=0;i<n;i++){ cin >> set[i]; } cin >> k; cnt=0; n--; a=n/2; for(int i=0,j=n;i<=j&&set[a]!=k;cnt++){ a=(i+j)/2; if(s...
a.cc:25:17: error: extended character   is not valid in an identifier 25 | cout << cnt << endl; | ^ a.cc: In function 'int main()': a.cc:25:17: error: 'cnt\U00003000' was not declared in this scope 25 | cout << cnt << endl; | ^~~~~
s924715726
p00188
C++
#include <stdio.h> int main(void) { int n; int i; int a[128], key; int left, right, center; int count; while (scanf("%d", &n) && n){ for (i = 0; i < n; i++){ scanf("%d", &a[i]); } scanf("%d", &key); //探す数 left = 0; right = n - 1; count = 0; while (l <= r){ center = (l + r) / 2; co...
a.cc: In function 'int main()': a.cc:20:24: error: 'l' was not declared in this scope 20 | while (l <= r){ | ^ a.cc:20:29: error: 'r' was not declared in this scope 20 | while (l <= r){ | ^
s557777459
p00189
Java
import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.PriorityQueue; import java.util.Scanner; public class Main{ public static void main(String[] args)throws Exception{ new Main().solve(); } void solve(){ Scanner sc=new Scanner(System.in); while(sc.hasNext()){ int n=...
Main.java:67: error: cannot find symbol for(int ii=0;ii<edges[u.me].size();ii++){ ^ symbol: variable edges location: class Main.Dijkstra Main.java:68: error: cannot find symbol Edge e=edges[u.me].get(ii); ^ symbol: variable edges location: class Main.Dijkstra Mai...
s953760423
p00189
Java
import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.PriorityQueue; import java.util.Scanner; public class Q0189 { public static void main(String[] args)throws Exception{ new Q0189().solve(); } void solve(){ Scanner sc=new Scanner(System.in); while(true){ int n=sc.ne...
Main.java:7: error: class Q0189 is public, should be declared in a file named Q0189.java public class Q0189 { ^ 1 error
s803140804
p00189
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; ?? import static java.lang.Integer.parseInt; ?? /** ??* Convenient Location ??*/ public class Main { ?? ????????static final int MAX_LOC = 10; ?? ????????public static void main(String[] args) throws IOException { ?????????????...
Main.java:4: error: class, interface, enum, or record expected ?? ^ Main.java:6: error: class, interface, enum, or record expected ?? ^ Main.java:11: error: illegal start of type ?? ^ Main.java:13: error: illegal start of type ?? ^ Main.java:15: error: illegal start of expression ????????????????BufferedReader br = new...
s372877060
p00189
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; ?? import static java.lang.Integer.parseInt; ?? /** ??* Convenient Location ??*/ public class Main { ?? ????????static final int MAX_LOC = 10; ?? ????????public static void main(String[] args) throws IOException { ?????????????...
Main.java:4: error: class, interface, enum, or record expected ?? ^ Main.java:6: error: class, interface, enum, or record expected ?? ^ Main.java:11: error: illegal start of type ?? ^ Main.java:13: error: illegal start of type ?? ^ Main.java:15: error: illegal start of expression ????????????????BufferedReader br = new...
s619073589
p00189
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; ?? import static java.lang.Integer.parseInt; ?? /** ??* Convenient Location ??*/ public class Main { ?? ????????static final int MAX_LOC = 10; ?? ????????public static void main(String[] args) throws IOException { ?????????????...
Main.java:4: error: class, interface, enum, or record expected ?? ^ Main.java:6: error: class, interface, enum, or record expected ?? ^ Main.java:11: error: illegal start of type ?? ^ Main.java:13: error: illegal start of type ?? ^ Main.java:15: error: illegal start of expression ????????????????BufferedReader br = new...
s930432575
p00189
Java
import java.util.List; import java.util.ArrayList; import java.util.Scanner; public class Vol0189 { final static int INF = 100000000; final static int abmax = 10; public static void warshallFloyd(int v, int[][] d) { for (int k = 0; k < v; k++) { for (int i = 0; i < v; i++) { for (int j = 0; j < v; j++) ...
Main.java:6: error: class Vol0189 is public, should be declared in a file named Vol0189.java public class Vol0189 { ^ 1 error
s654875507
p00189
Java
import java.util.Scanner; public class aoj0189 { public static void main(String[] args){ Scanner sc = new Scanner(System.in); while(true){ int cyoten = sc.nextInt(); if(cyoten==0) break; int mati=0; int miti[][] = new int[cyoten][3]; for(int i=0; i<cyoten; i++){ for(int j=0; ...
Main.java:3: error: class aoj0189 is public, should be declared in a file named aoj0189.java public class aoj0189 { ^ 1 error
s163591009
p00189
C
#include <algorithm> #include <iostream> #include <cstdio> #include <cstring> #include <cmath> #include <map> using namespace std; int maze[50][50]; int tag[20]; int main() { int n; while(~scanf("%d",&n) && n){ memset(tag,0,sizeof(tag)); memset(maze,0x3f,sizeof(maze)); for(int i = 0;...
main.c:1:10: fatal error: algorithm: No such file or directory 1 | #include <algorithm> | ^~~~~~~~~~~ compilation terminated.
s762985827
p00189
C
#include<iostream> using namespace std; int map[15][15]; int INF=999999; int main() { int number; for(;;) { cin>>number; if(number==0)break; for(int i=0;i<=14;i++) { for(int k=0;k<=14;k++) { if(i==k)map[i][k]=-1; else m...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s275068838
p00189
C
#include<iostream> #include<cstring> #include<cstdio> using namespace std; int map[15][15]; int x,y; void init() { for(int i=0; i<15; i++) { for(int j=0; j<15; j++) { map[i][j]=99999999; if(i==j) { map[i][j]=0; } } } }...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s929753102
p00189
C
#include<iostream> #include<cmath> #include<set> using namespace std; int map[90][90]; int ar[90]={0}; const int INF=99999999; int main() { int n; while(cin>>n&&n){ for(int i=0;i<90;i++){ ar[i]=0; } for(int i=0;i<=2*n;i++){ for(int j=0;j<=2*n;...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s639133270
p00189
C
#include <iostream> #include <stdio.h> #include <string.h> #include <algorithm> using namespace std; typedef struct edge { int s; int e; int l; bool operator<(const edge n)const { return l<n.l; } } edge; edge a[50]; int fa[15]; int num[15]; int getFather(int u) { if(fa[u]!=u) fa[u]=getFather(fa[u]); return ...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s780955648
p00189
C
// // main.cpp // 7.16练习 // // Created by Rain on 2018/7/16. // Copyright © 2018年 Rain. All rights reserved. // #include<stdio.h> #include<string.h> #include<math.h> //#include<map> //#include<set> #include "stdlib.h" #include "time.h" #include<deque> #include<queue> #include<stack> #include<string> #include<iostre...
main.c:15:9: fatal error: deque: No such file or directory 15 | #include<deque> | ^~~~~~~ compilation terminated.
s096371020
p00189
C
#include<stdio.h> #include<string.h> #include<algorithm> #include<iostream> using namespace std; #define INF 0x3f3f3f int dis[110][110]; void floyd(int n) { for(int k=0;k<n;k++) { for(int i=0;i<n;i++) { for(int j=0;j<n;j++) { dis[i][j]=min(dis[i][j],(dis[...
main.c:3:9: fatal error: algorithm: No such file or directory 3 | #include<algorithm> | ^~~~~~~~~~~ compilation terminated.
s167634796
p00189
C
#include<iostream> #include<algorithm> #define inf 0x3f3f3f3f using namespace std; int map[50][50]; int n; int min(int a,int b){ return a>b?b:a; } void floyd(int n){ int i,j,k; for(k=0;k<n;++k){ for(j=0;j<n;++j){ for(i=0;i<n;++i){ map[j][k]=min(map[j][k],map[j][i]+map[i][k]); } } } } int max(int x,int...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s116046706
p00189
C
#include<stdio.h> #include<string.h> #include<iostream> #include<algorithm> #include<math.h> using namespace std; #define baba 0x3f3f3f3f int main() { int n,m; while (cin >>m) { int l[20]; int asdf; memset(l,0x3f3f3f3f,sizeof(l)); int a[12][12]; memset(a,baba,sizeof(a)); n=0; for(int...
main.c:3:9: fatal error: iostream: No such file or directory 3 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s558484913
p00189
C
// // Create by Running Photon on 2015-03-27 // #include <iostream> #include <cstdio> #include <cstring> #include <cmath> #include <cstdlib> #include <iomanip> #include <algorithm> #include <cctype> #include <stack> #include <queue> #include <map> #include <string> #include <set> #include <vector> using namespace std;...
main.c:5:10: fatal error: iostream: No such file or directory 5 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s791756055
p00189
C
#include<bits/stdc++.h> using namespace std; int city[1000][1000],vis[1000],ans[1000]; void dfs(int root,int total) { // cout<<"root= "<<root<<"total="<<total<<endl; vis[root]=1; if(ans[root]==0||ans[root]>total) { ans[root]=total; } for(int i=0;i<=10;i++) if(!vis[i]&&city[root][i]) ...
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory 1 | #include<bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s230848958
p00189
C
#include <stdio.h> #include <string.h> #define INF 0x3f3f3f int map[15][15], sum; int min(int a, int b) { return a < b ? a : b; } int zdl(int start) { int list[13]; bool next[13]; memset(next, false, sizeof(next)); for(int i=0; i<=sum; i++) { list[i] = map[start][i]; } next[start] = true; int ans = 0, st = ...
main.c: In function 'zdl': main.c:13:9: error: unknown type name 'bool' 13 | bool next[13]; | ^~~~ main.c:3:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>' 2 | #include <string.h> +++ |+#include <stdbool.h> 3 | #define INF ...
s389594561
p00189
C
#include<iostream> #include<cstring> #include<stdio.h> #include<math.h> #include<algorithm> using namespace std; const int maxn=10200; #define oo 1100000 int low[maxn]; int Map[1200][1200]; int v[maxn]; int ans[maxn]; int n; #define N 111 void init() { for(int i=0; i<=N; i++) for(int j=0; j<=N; j++) ...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s971683931
p00189
C
#include<stdio.h> #include<stdlib.h> #include<math.h> #include<string.h> #include<algorithm> #include<stack> #include<queue> using namespace std; #define oo 0x3f3f3f3f #define maxn 66 int maps[maxn][maxn], vis[maxn], dist[maxn]; int ans; int dij(int x) { memset(vis, 0, sizeof(vis)); for(int i=0; i<=ans; i++) ...
main.c:5:9: fatal error: algorithm: No such file or directory 5 | #include<algorithm> | ^~~~~~~~~~~ compilation terminated.
s059126259
p00189
C
#include<cstdio> #include<iostream> #include <algorithm> #include<cmath> #include<cstring> #include<string> #include<cstdlib> #include<ctime> #include<stack> #include<queue> #include<set> #include<map> #include<vector> #define mem(name,value) memset(name,value,sizeof(name)) #define pb push_back using namespace std; typ...
main.c:1:9: fatal error: cstdio: No such file or directory 1 | #include<cstdio> | ^~~~~~~~ compilation terminated.
s912167269
p00189
C
#include<stdio.h> #include<stdlib.h> #define INF 100000 int m[10][10]; int main(void) { int n,a,b,time,t_num,min,index; int i,j,k; while (1) { scanf("%d", &n); if (n == 0)break; int sum[10] = { 0 }; int town[10] = { 0 }; t_num = 0; for (i = 0; i < n; i++) { for (j = 0; j < n; j++) if (i == j)m[...
main.c: In function 'main': main.c:39:51: error: called object 'min' is not a function or function pointer 39 | m[j][k] = min(m[j][k], m[j][i] + m[i][k]); | ^~~ main.c:9:30: note: declared here 9 | int n,a,b,t...
s533426843
p00189
C
#include <iostream> #include <algorithm> #include <cstdio> #define INF 200000 using namespace std; const int MAX=11; int d[MAX][MAX]; int V=11; int main() { int n; while(~scanf("%d", &n) && n) { for(int i=0; i<V; i++) { for(int j=0; j<V; j++) { if(...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s982062032
p00189
C
#include<stdio.h> #include<algorithm> #include<math.h> #include<string.h> #include<string> #include<iostream> #include<stack> #include<queue> #include<map> #define pi 3.1415926 #define INF 0x3f3f3f3f using namespace std; int Map[50][50]; int vis[15]; int main() { int n; while(~scanf("%d",&n)) { if(n==0)...
main.c:2:9: fatal error: algorithm: No such file or directory 2 | #include<algorithm> | ^~~~~~~~~~~ compilation terminated.
s554464010
p00189
C
#include<iostream> using namespace std; const int maxn = 20; const int INF = 0x3f3f3f3f; int d[maxn][maxn]; int n; int m; int res; int floyd() { int start; for(int i = 0; i <= m; i++) d[i][i] = 0; for(int k =0; k<=m; k++) for(int i = 0; i <= m; i++) for(int j = 0; j <= m; j++) { if(d[i][j] > d[i][k...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s193892682
p00189
C
#include<iostream> #include<cstdio> #include<cmath> #include<set> #include<cstring> #include<algorithm> #include<queue> #include<sstream> #define N 99999999 using namespace std; int mp[20][20],vis[20],d[20]; void init() { for(int i=0; i<20; i++) for(int j=0; j<20; j++) mp[i][j]=N; memset(vis...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s047708974
p00189
C
#include<stdio.h> #include<string.h> #include<iostream> #include<algorithm> #define MAX 6666666 using namespace std; int map[10][10],p,v[10],V[10]; void floyd(int n); int main() { int n,x,y,w,i,j,s,max; while(cin>>n,n!=0) { s=0; max=-1; memset(v,0,sizeof(v)); memset(V,0,sizeo...
main.c:3:9: fatal error: iostream: No such file or directory 3 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s321803404
p00189
C
#include<stdio.h> #define INF 1000000 #define rep(i,n) for((i)=0;(i)<=(int)(n);(i)++) void warshall_floyd(void); int min(int,int); int graph[10][10],n; int main(void){ int a,b,c,i,j,sum[10],ans1,ans2; while(scanf("%d",&n),n){ for(i=0;i<9;i++)sum[i]=0; ans1=INF; rep(i,9){ rep(j,9){ graph[i][j...
main.c: In function 'warshall_floyd': main.c:50:12: error: expected ';' before ')' token 50 | for(i,9) | ^ | ; main.c:50:12: error: expected expression before ')' token main.c:51:14: error: expected ';' before ')' token 51 | for(j,9) | ^ | ...
s286110801
p00189
C
#include <stdio.h> struct road{ int from; int to; int distance; }; int calc_shortestDistance(int, int, int, int, struct *road, int); int main(void) { int n; int a, b, c; struct road[45]; int city_size; int max_distance; int min_amount, amount; int min_city; int i, j; while(true){ scanf("...
main.c:9:54: error: expected '{' before '*' token 9 | int calc_shortestDistance(int, int, int, int, struct *road, int); | ^ main.c:55:82: error: expected '{' before '*' token 55 | int calc_shortestDistance(int from, int to, int city_size, int road_size, ...
s107175282
p00189
C++
#include<iostream> #include<cstring> using namespace std; int time[10][10]; int town; int INF = 9999; void fw(){ for(int k = 0; k <= town; k++){ for(int i = 0; i <= town; i++){ for(int j = 0; j <= town; j++){ time[i][j] = min(time[i][j], time[i][k] + time[k][j]); } ...
a.cc:5:16: error: 'int time [10][10]' redeclared as different kind of entity 5 | int time[10][10]; | ^ In file included from /usr/include/pthread.h:23, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35, from /usr/include/x86_64-linux-gnu/c++/14/b...
s633789902
p00189
C++
#include<iostream> #include<cstring> using namespace std; int time[10][10]; int town; int INF = 9999; void fw(){ for(int k = 0; k <= town; k++){ for(int i = 0; i <= town; i++){ for(int j = 0; j <= town; j++){ time[i][j] = min(time[i][j], time[i][k] + time[k][j]); } ...
a.cc:5:16: error: 'int time [10][10]' redeclared as different kind of entity 5 | int time[10][10]; | ^ In file included from /usr/include/pthread.h:23, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35, from /usr/include/x86_64-linux-gnu/c++/14/b...
s017138595
p00189
C++
#include <iostream> #include <stdio.h> #include <string.h> #include <algorithm> #include <cmath> #include <queue> #include <set> using namespace std; const int maxn=110; const int INF=99999999; int n,m; int Map[maxn][maxn]; int Min(int x,int y) {return x<y ? x:y;} int main() { while(cin>>m&&m!=0) { fo...
a.cc: In function 'int main()': a.cc:40:16: error: 'INT_MAX' was not declared in this scope 40 | int mm=INT_MAX; | ^~~~~~~ a.cc:8:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 7 | #include <set> +++ |+#include <climits>...
s532498236
p00189
C++
#include<algorithm> #include<stdio.h> #define INF 0x3f3f3f3f typedef long long ll; using namespace std; #define N 15 int n; int dis[N],maps[N][N]; int main() { int i,a,b,c,j,k; while(scanf("%d",&n),n) { for(i=0;i<N;i++) { for(j=0;j<N;j++) { maps[i][...
a.cc: In function 'int main()': a.cc:46:9: error: 'memset' was not declared in this scope 46 | memset(dis,0,sizeof(dis)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<stdio.h> +++ |+#include <cstri...
s027506606
p00189
C++
#include <algorithm> #include <cstdio> #include <limits> #include <queue> #include <vector> using namespace std; int d[10][10]; int main() { for (;;) { int n; scanf("%d", &n); if (n == 0) break; for (int u = 0; u < 10; u++) for (int v = 0; v < 10; v++) d[u][v] = (u == v) ? 0 : (INT_MAX / 2); int N = 0...
a.cc: In function 'int main()': a.cc:16:59: error: 'INT_MAX' was not declared in this scope 16 | d[u][v] = (u == v) ? 0 : (INT_MAX / 2); | ^~~~~~~ a.cc:5:1: note: 'INT_MAX' is defined in header '<climits>'; this is probab...
s647397199
p00189
C++
#define _CRT_SECURE_NO_WARNINGS #include<fstream> #include<iostream> #include<string> #include<iomanip> #include<list> #include<math.h> #include<stack> #include<queue> #include<vector> #include<algorithm> #include<utility> using namespace std; typedef struct edge { int from; int to; int time; } edge; int main()...
a.cc: In function 'int main()': a.cc:29:28: error: 'INT_MAX' was not declared in this scope 29 | int min_ = INT_MAX; | ^~~~~~~ a.cc:14:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 13 | #include<utility...
s300578831
p00189
C++
#define _CRT_SECURE_NO_WARNINGS #include<fstream> #include<iostream> #include<string> #include<iomanip> #include<list> #include<math.h> #include<stack> #include<queue> #include<vector> #include<algorithm> #include<utility> using namespace std; typedef struct edge { int from; int to; int time; } edge; int main()...
a.cc: In function 'int main()': a.cc:29:28: error: 'INT_MAX' was not declared in this scope 29 | int min_ = INT_MAX; | ^~~~~~~ a.cc:14:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 13 | #include<utility...
s551553315
p00189
C++
6 0 1 80 1 2 20 0 2 60 2 3 50 3 4 60 1 4 90 2 0 1 1 1 2 1 0
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 6 | ^
s382738749
p00189
C++
//繝ゥ繧、繝悶Λ繝ェ繝?せ繝?#include <bits/stdc++.h> using namespace std; #define FOR(i, s, n) for(int i = s; i < (int)n; i++) #define per(i, n) for(int i = n; i >= 0; i--) #define ROF(i, s, n) for(int i = s; i >= (int)n; i--) #define FORIT(i, A) for (auto i : A) #define PRINT(x) cout << (x) << "\n" #define ALL(a) (a).begin(),(a)....
a.cc:20:9: error: 'vector' does not name a type 20 | typedef vector<int> VI; | ^~~~~~ a.cc:21:9: error: 'vector' does not name a type 21 | typedef vector<VI> VVI; | ^~~~~~ a.cc:22:9: error: 'vector' does not name a type 22 | typedef vector<string> VS; | ^~~~~~ a.cc:23:...
s590308432
p00189
C++
//繝ゥ繧、繝悶Λ繝ェ繝?せ繝?#include <bits/stdc++.h> using namespace std; #define FOR(i, s, n) for(int i = s; i < (int)n; i++) #define per(i, n) for(int i = n; i >= 0; i--) #define ROF(i, s, n) for(int i = s; i >= (int)n; i--) #define FORIT(i, A) for (auto i : A) #define PRINT(x) cout << (x) << "\n" #define ALL(a) (a).begin(),(a)....
a.cc:20:9: error: 'vector' does not name a type 20 | typedef vector<int> VI; | ^~~~~~ a.cc:21:9: error: 'vector' does not name a type 21 | typedef vector<VI> VVI; | ^~~~~~ a.cc:22:9: error: 'vector' does not name a type 22 | typedef vector<string> VS; | ^~~~~~ a.cc:23:...
s211006030
p00189
C++
#include <cstdio> #include <iostream> #include <queue> using namespace std; int main(){ while(1){ int n; long road[10][10]; scanf(" %d", &n); if(n==0) break; memset(road, -1, sizeof(road)); for(int i=0; i<10; ++i) road[i][i]=0; int city=0; //街の数 for(int i=0; i<n; ++i){ int a, b, c; scanf(...
a.cc: In function 'int main()': a.cc:13:17: error: 'memset' was not declared in this scope 13 | memset(road, -1, sizeof(road)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <queue> ...
s559005512
p00189
C++
// Warshall-floyd #include <iostream> #include <algorith> using namespace std; #define INF 114514810 int n, a, b, c, v, d[11][11];// v: num of nodes void init() { for(int i=0; i<n; i++) { for(int j=0; j<n; j++) { if(i==j)// If not exist cost, cost=INF d[i][j] = 0; e...
a.cc:3:10: fatal error: algorith: No such file or directory 3 | #include <algorith> | ^~~~~~~~~~ compilation terminated.
s574182569
p00189
C++
#include <cstdio> #include <cstring> #include <vector> #include <algorithm> #include <bitset> #include <map> #include <set> #include <iostream> #include <sstream> using namespace std; #define INF INT_MAX>>1 int main() { // freopen("in","r",stdin); int n; while(scanf("%d",&n)&&n){ int u,v,w,max_...
a.cc: In function 'int main()': a.cc:11:13: error: 'INT_MAX' was not declared in this scope 11 | #define INF INT_MAX>>1 | ^~~~~~~ a.cc:37:23: note: in expansion of macro 'INF' 37 | int ans_sum = INF,ans_i; | ^~~ a.cc:10:1: note: 'INT_MAX' is defined in header ...
s535443054
p00189
C++
#include <iostream> #include <cstdio> #include <algorithm> using namespace std; const int N = 10; const int M = 10; const int INF = 0x3f3f3f3f; int d[N][N]; int n; /*void input() { for (int i = 0; i < N; i ++) fill(d[i], d[i]+N, INF); int m; cin >> m; n = 0; while ( m-- ) { int a, b,...
a.cc: In function 'int main()': a.cc:64:5: error: 're' was not declared in this scope 64 | re | ^~ a.cc:64:7: error: expected '}' at end of input 64 | re | ^ a.cc:50:1: note: to match this '{' 50 | { | ^
s738544828
p00189
C++
import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.PriorityQueue; import java.util.Scanner; public class Main{ public static void main(String[] args)throws Exception{ new Main().solve(); } void solve(){ Scanner sc=new Scanner(System.in); while(sc.hasNext()){ int n=...
a.cc:48:25: error: stray '@' in program 48 | @SuppressWarnings("unchecked") | ^ a.cc:106:17: error: stray '@' in program 106 | @Override | ^ a.cc:1:1: error: 'import' does not name a type 1 | import java.util.ArrayList;...
s091273300
p00189
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <cmath> #include <cstdio> #include <functional> #include <numeric> #include <stack> #include <queue> #include <map> #include <set> #include <utility> #include <sstream> #include <complex> using namespace std; #define FOR(i,a,b) for(...
a.cc: In function 'int main()': a.cc:80:27: error: 'INT_MAX' was not declared in this scope 80 | int ans = INT_MAX, index = INT_MAX; | ^~~~~~~ a.cc:16:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 15 | #...
s905617445
p00189
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <cmath> #include <cstdio> #include <functional> #include <numeric> #include <stack> #include <queue> #include <map> #include <set> #include <utility> #include <sstream> #include <complex> using namespace std; #define FOR(i,a,b) for(...
a.cc: In function 'int main()': a.cc:80:27: error: 'INT_MAX' was not declared in this scope 80 | int ans = INT_MAX, index = INT_MAX; | ^~~~~~~ a.cc:16:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 15 | #...
s929475961
p00189
C++
#include<cstdio> #include<iostream> using namespace std; #define INF 100000 int road, max = 0, time[10][10],sum,root[10]; void dijkstra(int a) { int i,j,k=INF,used[10],minroot; for (i = 0; i <= max; i++) { used[i] = 0; root[i] = INF; } root[a] = 0; while (1) { minroot = INF; for (i = 0; i <= max; i++)...
a.cc:7:32: error: 'int time [10][10]' redeclared as different kind of entity 7 | int road, max = 0, time[10][10],sum,root[10]; | ^ In file included from /usr/include/pthread.h:23, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35, ...
s111827647
p00189
C++
#include<cstdio> #include<iostream> using namespace std; #define INF 100000 int road, max = 0, time[10][10] = { 0 }, sum, root[10] = { 0 }; void dijkstra(int a) { int i,j,k=INF,used[10],minroot; for (i = 0; i <= max; i++) { used[i] = 0; root[i] = INF; } root[a] = 0; while (1) { minroot = INF; for (i =...
a.cc:7:32: error: 'int time [10][10]' redeclared as different kind of entity 7 | int road, max = 0, time[10][10] = { 0 }, sum, root[10] = { 0 }; | ^ In file included from /usr/include/pthread.h:23, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:3...
s727341493
p00189
C++
#include<cstdio> #include<iostream> using namespace std; #define INF 100000 int road, max = 0, time[10][10] = { 0 }, sum, root[10] = { 0 }; void dijkstra(int a) { int i,j,k=INF,used[10],minroot; for (i = 0; i <= max; i++) { used[i] = 0; root[i] = INF; } root[a] = 0; while (1) { minroot = INF; for (i =...
a.cc:7:32: error: 'int time [10][10]' redeclared as different kind of entity 7 | int road, max = 0, time[10][10] = { 0 }, sum, root[10] = { 0 }; | ^ In file included from /usr/include/pthread.h:23, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:3...
s235452977
p00189
C++
#include<cstdio> #include<iostream> using namespace std; #define INF 100000 int road, max = 0, time_[10][10] = { 0 }, sum, root[10] = { 0 }; void dijkstra(int a) { int i,j,k=INF,used[10],minroot; for (i = 0; i <= max; i++) { used[i] = 0; root[i] = INF; } root[a] = 0; while (1) { minroot = INF; for (i ...
a.cc: In function 'void dijkstra(int)': a.cc:12:26: error: reference to 'max' is ambiguous 12 | for (i = 0; i <= max; i++) { | ^~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr...
s554431882
p00189
C++
#include<cstdio> #include<iostream> using namespace std; #define INF 100000 int road, max = 0, time_[10][10] = { 0 }, sum, root[10] = { 0 }; void dijkstra(int a) { int i,j,k=INF,used[10],minroot; for (i = 0; i <= max; i++) { used[i] = 0; root[i] = INF; } root[a] = 0; while (1) { minroot = INF; for (i ...
a.cc: In function 'void dijkstra(int)': a.cc:12:26: error: reference to 'max' is ambiguous 12 | for (i = 0; i <= max; i++) { | ^~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr...
s556464646
p00189
C++
#include<stdio.h> #include<string.h> #define INF 0x3f3f3f int max(int a,int b) { return a>b?a:b; } int map[110]110],visit[110],vis[110]; int n,m; int dijkstra(int a) { memset(visit,0,sizeof(visit)); int i,j,next,sum,min; for(i=0;i<m;i++) vis[i]=map[a][i]; visit[a]=1; for(i=0;i<m;i++) { min=INF; for(j=0;j<m;...
a.cc:8:13: error: expected initializer before numeric constant 8 | int map[110]110],visit[110],vis[110]; | ^~~ a.cc: In function 'int dijkstra(int)': a.cc:12:16: error: 'visit' was not declared in this scope 12 | memset(visit,0,sizeof(visit)); | ^~~~~ a.cc:15:9: err...
s142027346
p00189
C++
#include <iostream> using namespace std; const int INF = 2 << 35; int main() { int data[11][11]; int n; int a,s,d; int ans,anssum; int sum=0; while (true) { for(int i=0;i<10;i++) { for(int k = 0;k<10;k++) { data[i][k] = INF; } } cin >> n ; if(n == 0)return 0; for(int i = 0; i< n;++i) { cin >> a >> s >> d; d...
a.cc:4:19: warning: left shift count >= width of type [-Wshift-count-overflow] 4 | const int INF = 2 << 35; | ~~^~~~~ a.cc: In function 'int main()': a.cc:65:21: error: 'ansnum' was not declared in this scope; did you mean 'anssum'? 65 | cout << ans <<" "<< ansnum << "\n"; | ...
s231434010
p00189
C++
#include<iostream> #include<algorithm> #include<queue> using namespace std; const int MAX_V = 100, INF = 999999; static int cost[MAX_V][MAX_V]; static int d[MAX_V]; bool used[MAX_V]; static int V; int E; void dijkstra(int s) { fill(d, d + V, INF); fill(used, used + V, false); d[s] = 0; while (true) { int v = -...
a.cc: In function 'int main()': a.cc:34:17: error: 'memset' was not declared in this scope 34 | memset(cost, 999999, sizeof(cost)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include<queue>...
s553546630
p00189
C++
#include<algorithm> #include<stdio.h> #include<vector> #include<queue> using namespace std; int C = 0; int N = 0; int R[10][10] = { 0 }; int M[10] = { 0 }; bool solve() { int sum = INT_MAX,ans = 0; for (int i = 0; i <= C; i++) { queue<int> q; q.push(i); M[i] = 0; while (!q.empty()) { for (int j = 0; j <...
a.cc: In function 'bool solve()': a.cc:14:19: error: 'INT_MAX' was not declared in this scope 14 | int sum = INT_MAX,ans = 0; | ^~~~~~~ a.cc:5:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 4 | #include<queue> +++ |+#...
s660266632
p00189
C++
#include <iostream> #define MAX 10 #define INF INT_MAX using namespace std; int d[MAX][MAX]; int n, num_ver = 0; int min_t = INF; int min_ver; void init(); void input(); void wf(); int main(){ while(cin >> n, n){ init(); input(); wf(); for(int i = 0; i <= num_ver; i++){ int tmp =...
a.cc:4:13: error: 'INT_MAX' was not declared in this scope 4 | #define INF INT_MAX | ^~~~~~~ a.cc:9:13: note: in expansion of macro 'INF' 9 | int min_t = INF; | ^~~ a.cc:2:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climi...
s866478908
p00189
C++
#include <bits/stdc++.h> using namespace std; int d[11][11]; static const int INF = 99999999; void solve() { int n; while (cin >> n && n) { for (int i = 0; i < 10; i++) { for (int j = 0; j < 10; j++) { d[i][j] = INF; } d[i][i] = 0; } for (int i = 0; i < n; i++) { int f...
a.cc: In function 'int main()': a.cc:50:10: error: expected ';' before 'return' 50 | solve() | ^ | ; 51 | return 0; | ~~~~~~
s493691410
p00189
C++
//C++14 (Clang 3.8.0) #include <vector> #include <list> #include <map> #include <set> #include <queue> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #includ...
a.cc: In function 'int main()': a.cc:61:21: error: 'print' was not declared in this scope; did you mean 'rint'? 61 | if(ans==inf)print("0\n"); | ^~~~~ | rint
s118473958
p00189
C++
// // main.cpp // #include <iostream> //#include <algorithm> #include <vector> //#include <limits> #include <math.h> //#include <queue> //#include <tuple> //#include <stdio.h> //#include <stdlib.h> //#include <string> //#include "string.h" // #include <unordered_map> #include <map> #include <unordered_set> //#include...
a.cc: In function 'int main()': a.cc:110:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 110 | sort(fences.begin(), fences.end(), Fc::compareLen); | ^~~~ | sqrt
s082666013
p00189
C++
#include <iostream> using namespace std; const int INF = 1000000000; int main() { while(true){ int n; cin >> n; if(n==0) break; int T[10][10]; for(int i=0; i<10; i++){ for(int j=0; j<10; j++){ if(i==j){ T[i][j] = 0; } else{ T[i][j] = INF; } } } int m = 0; for(in...
a.cc: In function 'int main()': a.cc:55:18: error: 'Time' was not declared in this scope; did you mean 'time'? 55 | sumtime+=Time[i][j]; | ^~~~ | time a.cc:62:13: error: 'anstonw' was not declared in this scope; did you mean 'anstown'? 62 | cout << anstonw...
s247322969
p00189
C++
#include <iostream> using namespace std; const int INF = 1000000000; int main() { while(true){ int n; cin >> n; if(n==0) break; int T[10][10]; for(int i=0; i<10; i++){ for(int j=0; j<10; j++){ if(i==j){ T[i][j] = 0; } else{ T[i][j] = INF; } } } int m = 0; for(in...
a.cc: In function 'int main()': a.cc:55:18: error: 'Time' was not declared in this scope; did you mean 'time'? 55 | sumtime+=Time[i][j]; | ^~~~ | time a.cc:62:13: error: 'anstonw' was not declared in this scope; did you mean 'anstown'? 62 | cout << anstonw...
s541066881
p00189
C++
// 2014/06/16 Tazoe #include <iostream> using namespace std; const int INF = 1000000000; int main() { while(true){ int n; cin >> n; if(n==0) break; int T[10][10]; for(int i=0; i<10; i++){ for(int j=0; j<10; j++){ if(i==j){ T[i][j] = 0; } else{ T[i][j] = INF; } } } ...
a.cc: In function 'int main()': a.cc:62:9: error: 'min_town_time_n' was not declared in this scope; did you mean 'min_town_time'? 62 | min_town_time_n; | ^~~~~~~~~~~~~~~ | min_town_time