submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s621978781
p00189
C++
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s341046443
p00189
C++
#include <queue> #include <iostream> #include <vector> using namespace std; #define REP(i,n) for(int i=0;i<(int)n;++i) #define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i) #define ALL(c) (c).begin(), (c).end() #define INF 9999999 typedef int Weight; struct Edge { int src, dst; Weight weight;...
a.cc: In function 'std::vector<int> buildPath(const std::vector<std::vector<int> >&, int, int)': a.cc:63:3: error: 'reverse' was not declared in this scope 63 | reverse(ALL(path)); | ^~~~~~~ a.cc: In function 'bool shortestPath(const Graph&, Matrix&, std::vector<std::vector<int> >&)': a.cc:58:1: warning: c...
s008987974
p00189
C++
#include<iostream> #include<queue> #define HOME 10 #define ROAD 45 #define MAX 100000000 using namespace std; int dis[HOME][HOME]; bool chk[HOME]; class Datum { public: int now; int dis; Datum(int n, int d) {now = n;dis = d;} Datum() {} }; bool operator<( const Datum& a, const Datum& b ) { return a.dis < b.di...
a.cc: In function 'int main()': a.cc:76:25: error: 'memset' was not declared in this scope 76 | memset( chk, false, n*sizeof(bool) ); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2...
s383883825
p00189
C++
#include<cstdio> #include<iostream> #include<string> #include<map> #include<queue> #include<set> using namespace std; #define rep(i,n) for(int i=0;i<n;i++) #define reps(i,n) for(int i=1;i<=n;i++) int main(){ while(1){ int n; cin>>n; if(n==0)break; int dp[111][111]={0}; rep(i,111)rep(j,111)dp[i][j]=1000...
a.cc: In function 'int main()': a.cc:42:31: error: 'm' was not declared in this scope 42 | rep(j,m){ | ^ a.cc:10:32: note: in definition of macro 'rep' 10 | #define rep(i,n) for(int i=0;i<n;i++) | ^
s108704441
p00189
C++
#include <iostream> #include <vector> #include <queue> const int INF = INT_MAX/10; using namespace std; const int V_MAX = 10; const int E_MAX = 45; typedef pair<int, int> P; // v, cost int main() { int N; while (cin >> N) { int V = 0; int d[V_MAX][V_MAX]; if (N == 0) break; for (int i = 0; i <...
a.cc:5:17: error: 'INT_MAX' was not declared in this scope 5 | const int INF = INT_MAX/10; | ^~~~~~~ a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 3 | #include <queue> +++ |+#include <climits> 4 |
s538320030
p00189
C++
#include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <ctime> #include <cassert> #include <iostream> #include <cctype> #include <sstream> #include <string> #include <list> #include <vector> #include <queue> #include <set> #include <stack> #include <map> #include <utility> #include <numeric> ...
a.cc: In function 'int dijkstra(std::vector<Edge>&, int, int)': a.cc:44:19: error: 'INT_MAX' was not declared in this scope 44 | vint d(m, INT_MAX); | ^~~~~~~ a.cc:24:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 23 | #...
s014656049
p00189
C++
#include <cstdio> #include <algorithm> using namespace std; int map[10][10]; int cmp(int i,int j,int k){ if(map[i][j]==-1){ if(map[i][k]>=0 && map[k][j]>=0) return map[i][k]+map[k][j]; else return -1; }else if(map[i][k]==-1 || map[k][j]==-1) return map[i][j]; else return m...
a.cc: In function 'int main()': a.cc:24:5: error: 'memset' was not declared in this scope 24 | memset(map,-1,sizeof(map)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <algorithm> +++ |+#include <cstring> ...
s440437440
p00189
C++
#include <cstdio> #include <algorithm> using namespace std; int map[10][10]; int cmp(int i,int j,int k){ if(map[i][j]==-1){ if(map[i][k]>=0 && map[k][j]>=0) return map[i][k]+map[k][j]; else return -1; }else if(map[i][k]==-1 || map[k][j]==-1) return map[i][j]; else return m...
a.cc: In function 'int main()': a.cc:24:5: error: 'memset' was not declared in this scope 24 | memset(map,-1,sizeof(map)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <algorithm> +++ |+#include <cstring> ...
s312782592
p00189
C++
#include<queue> #include<cstdio> #include<cstring> #include<cmath> using namespace std; #define rep(i,n) for(int i=0;i<n;i++) #define REP(n) rep(i,n) const int TOWN = 11; const int ROAD = 50; const int INF = 10000; int d[TOWN][TOWN] ; int n,a,b,c; int main() { while(cin >> n && n) { memset(d,INF,sizeof(d)); i...
a.cc: In function 'int main()': a.cc:19:15: error: 'cin' was not declared in this scope 19 | while(cin >> n && n) | ^~~ a.cc:5:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 4 | #include<cmath> +++ |+#include <iostream...
s987727469
p00189
C++
#include<iostream> #include<cstdio> #include<vector> #include<cstring> #define inf 1000000000 using namespace std; unsigned long long d[10][10],sum[10]; int v; int main() { int n; while(cin>>n,n) { bool used[10]; memset(used,0,sizeof(used)); memset(d,0,sizeof(d)); memset(sum,0,sizeof(sum)); for(int i=0;i<...
a.cc: In function 'int main()': a.cc:52:21: error: 'min_element' was not declared in this scope 52 | ans=min_element(sum,sum+v)-sum; | ^~~~~~~~~~~
s644484963
p00189
C++
#include<iostream> #include<cstdio> #include<vector> #include<cstring> #define inf 1000000000 using namespace std; unsigned long long d[10][10],sum[10]; int v; int main() { int n; while(cin>>n,n) { bool used[10]; memset(used,0,sizeof(used)); memset(d,0,sizeof(d)); memset(sum,0,sizeof(sum)); for(int i=0;i<...
a.cc: In function 'int main()': a.cc:52:21: error: 'min_element' was not declared in this scope 52 | ans=min_element(sum,sum+v)-sum; | ^~~~~~~~~~~
s138739990
p00189
C++
#include<iostream> #include<algorithm> using namespace std; #define INF 10000 #define MAXV 45 int dist[MAXV][MAXV]; int main(void){ int n; while(1){ int town=0; cin >> n; if(n==0)break; memset(dist,INF,sizeof(int)*MAXV*MAXV); for(int i=0; i<n; i++){ int from,to,cost; cin >> from >> to >> cost; ...
a.cc: In function 'int main()': a.cc:18:17: error: 'memset' was not declared in this scope 18 | memset(dist,INF,sizeof(int)*MAXV*MAXV); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<al...
s621758160
p00189
C++
#include<iostream> #include<algorithm> #include<string> using namespace std; #define INF 10000 #define MAXV 45 int dist[MAXV][MAXV]; int main(void){ int n; while(1){ int town=0; cin >> n; if(n==0)break; memset(dist,INF,sizeof(int)*MAXV*MAXV); for(int i=0; i<n; i++){ int from,to,cost; cin >> from ...
a.cc: In function 'int main()': a.cc:19:17: error: 'memset' was not declared in this scope 19 | memset(dist,INF,sizeof(int)*MAXV*MAXV); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<al...
s632889701
p00189
C++
#include <iostream> #include <vector> #include <algorithm> #include <climits> using namespace std; int main(){ while(true){ int n; cin >> n; if(n == 0){ break; } int* start = new int[n]; int* goal = new int[n]; int* cost = new int[n]; for(int i = 0; i < n; i++){ cin >> start[i] >> goal[i] >>...
In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/includ...
s495349641
p00189
C++
>#include <iostream> #include <cstdio> #include <iomanip> #include <vector> #include <map> #include <set> #include <queue> #include <bitset> #include <stack> #include <utility> #include <numeric> #include <algorithm> #include <functional> #include <cctype> #include <complex> #include <string> #include <sstream> using ...
a.cc:1:2: error: stray '#' in program 1 | >#include <iostream> | ^ a.cc:1:1: error: expected unqualified-id before '>' token 1 | >#include <iostream> | ^ In file included from /usr/include/c++/14/iosfwd:42, from /usr/include/c++/14/iomanip:41, from a.cc:3: /usr/inc...
s867957321
p00189
C++
#include<cmath> #include<cctype> #include<cstdlib> #include<cstdio> #include<iostream> #include<algorithm> #include<vector> #include<deque> #include<string> #include<queue> #include<map> #include<set> #include<utility> #include<queue> using namespace std; const int MAX = 10; const int INF = INT_MAX/3; int main(){ i...
a.cc:19:17: error: 'INT_MAX' was not declared in this scope 19 | const int INF = INT_MAX/3; | ^~~~~~~ a.cc:15:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 14 | #include<utility> +++ |+#include <climits> 15 | #include<queue>...
s929311316
p00189
C++
#include <iostream> #include <set> #include "procpn.hpp" using namespace std; using namespace procon; int main(){ int e; set<int> v; int d[MAX_V][MAX_V]; while(cin >> e,e){ fill((int*)d,(int*)d + MAX_V * MAX_V,INF); FOR(i,0,e){ int f,t,p; cin >> f >> t >> p; ...
a.cc:3:10: fatal error: procpn.hpp: No such file or directory 3 | #include "procpn.hpp" | ^~~~~~~~~~~~ compilation terminated.
s305414491
p00189
C++
#include <iostream> #include <set> #include "procpn.hpp" using namespace std; using namespace procon; int main(){ int e; set<int> v; int d[MAX_V][MAX_V]; while(cin >> e,e){ fill((int*)d,(int*)d + MAX_V * MAX_V,INF); FOR(i,0,e){ int f,t,p; cin >> f >> t >> p; ...
a.cc:3:10: fatal error: procpn.hpp: No such file or directory 3 | #include "procpn.hpp" | ^~~~~~~~~~~~ compilation terminated.
s499828480
p00189
C++
#include <cstring> #include <iostream> #include <queue> using namespace std; int n, m; // 道の数,街の数 int edges[10][10]; int dijkstra(int from, int to) { bool visited[m]; fill(visited, visited + m, false); priority_queue<pair<int, int>, vector<pair<int, int> >, greater<pair<int, int> > > que; que.push(mak...
a.cc:64:2: error: 'x' does not name a type 64 | }x | ^
s816492950
p00189
C++
#include <iostream> #include <map> using namespace std; #define MAX(x,y) (x>y?x:y) #define MIN(x,y) (x>y?y:x) #define INF 1000000 typedef long long ll; typedef map<ll,int> M; ll cost[15][15]; int main() { int n; ll sum; int max=0; M d; while(cin>>n,n){ max=0; for(int i=0;i<15;i++){ for(int j=0;j<15;j++){...
a.cc: In function 'int main()': a.cc:29:25: error: expected initializer before 'll' 29 | ll c; | ^~ a.cc:30:33: error: 'b' was not declared in this scope 30 | cin>>a>>b>>c; | ^ a.cc:30:36: error: 'c...
s113708667
p00189
C++
#include<iostream> #include<fstream> #include<vector> #include<algorithm> #include<string> #include<cstring> using namespace std; #define INF 100000000 int edges[20][20]; int dist[20][20]; int main(){ cin.sync_with_stdio(false); while(1){ int N; cin >> N; if(N == 0) break; ...
a.cc: In function 'int main()': a.cc:76:19: error: 'dis' was not declared in this scope; did you mean 'ids'? 76 | if(dis[i][j]==INF)continue; | ^~~ | ids
s925842897
p00190
C++
#include <bits/stdc++.h> #ifndef INCLUDE_ZOBRIST_HASH_HPP #define INCLUDE_ZOBRIST_HASH_HPP #include <random> #include <iostream> #include <typeinfo> namespace orislib { template <typename T, int W, int H, int STATE> struct ZobristHash { typedef T hash_t; ZobristHash() { std::random_device rd; std::mt199...
a.cc:194:1: error: expected unqualified-id before 'return' 194 | return 0; | ^~~~~~ a.cc:195:1: error: expected declaration before '}' token 195 | } | ^
s269673887
p00190
C++
#include <bits/stdc++.h> using namespace std; #define FOR(i,a,b) for(int i=(a);i<(b);i++) #define REP(i,n) FOR(i,0,n) #define ALL(v) (v).begin(),(v).end() #define fi first #define se second template<typename A, typename B> inline bool chmax(A &a, B b) { if (a<b) { a=b; return 1; } return 0; } template<typename A, ty...
a.cc: In function 'int main()': a.cc:43:11: error: 'ans' was not declared in this scope; did you mean 'abs'? 43 | d[ans] = 0; | ^~~ | abs
s180124070
p00190
C++
#include<iostream> #include<algorithm> using namespace std; #define N 5 #define REP(i, n) for ( int i = 0; i < (int)n; i++ ) #define LIMIT 20 static const int T[12][2] = {{-1, -1}, {1, 1}, {1, 2}, {1, 3}, {2, 0}, {2, 1}, {2, 2}, {2, 3}, {2, 4}, {3, 1}, {3, 2}, {3, 3}}; static const int g[N][N] = {{-1, -1, 0,...
a.cc: In function 'int idp(Puzzle)': a.cc:75:12: error: 'INT_MAX' was not declared in this scope 75 | return INT_MAX; | ^~~~~~~ a.cc:3:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 2 | #include<algorithm> +++ |+#include <climit...
s752933029
p00190
C++
#include <iostream> #include <iomanip> #include <vector> #include <map> #include <set> #include <queue> #include <cmath> using namespace std; #define NONE -1 #include <windows.h> void print( const vector < vector <int> > &F ) { for ( int i = 0; i < 5; i++ ) { for ( int j = 0; j < 5; j++ ) { cout << setw(3) <...
a.cc:12:10: fatal error: windows.h: No such file or directory 12 | #include <windows.h> | ^~~~~~~~~~~ compilation terminated.
s792823395
p00190
C++
#include<iostream> #include<algorithm> using namespace std; #define N 5 #define REP(i, n) for ( int i = 0; i < (int)n; i++ ) #define LIMIT 20 // ƒS[ƒ‹‚̂ǂ±‚É‚ ‚é‚Ì‚© static const int T[12][2] = { {-1, -1}, {1, 1}, {1, 2}, {1, 3}, {2, 0}, {2, 1}, {2, 2}, {2, 3}, {2, 4}, {3, 1}, {3, 2}, {3, 3} }; // ƒ...
a.cc: In function 'int idp(Puzzle)': a.cc:120:16: error: 'INT_MAX' was not declared in this scope 120 | return INT_MAX; | ^~~~~~~ a.cc:3:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 2 | #include<algorithm> +++ |+#includ...
s539239684
p00190
C++
#include<iostream> #include<map> #include<deque> using namespace std; struct board{ char s[14]; int z1,z2; bool operator<(const board& rhs)const{return strcmp(s,rhs.s)<0;} }; int main(){ int d[13][5]={ {2,-1}, //0 {2,5,-1}, //1 {0,1,3,6,-1}, //2 {2,7,-1}, //3 {5,-1}, //4 {1,4,6,9,-1}, //5 {2,5,7...
a.cc: In member function 'bool board::operator<(const board&) const': a.cc:8:54: error: 'strcmp' was not declared in this scope 8 | bool operator<(const board& rhs)const{return strcmp(s,rhs.s)<0;} | ^~~~~~ a.cc:4:1: note: 'strcmp' is defined in head...
s673247435
p00190
C++
#include<iostream> #include<map> #include<deque> #include<cstdlib> using namespace std;struct B{int z[2];char s[14];bool operator<(const B&r)const{return strcmp(s,r.s)<0;}};int main(){int a[13][5]={{2,-1},{2,5,-1},{0,1,3,6,-1},{2,7,-1},{5,-1},{1,4,6,9,-1},{2,5,7,10,-1},{3,6,8,11,-1},{7,-1},{5,10,-1},{6,9,11,12,-1},{7,1...
a.cc: In member function 'bool B::operator<(const B&) const': a.cc:5:88: error: 'strcmp' was not declared in this scope 5 | using namespace std;struct B{int z[2];char s[14];bool operator<(const B&r)const{return strcmp(s,r.s)<0;}};int main(){int a[13][5]={{2,-1},{2,5,-1},{0,1,3,6,-1},{2,7,-1},{5,-1},{1,4,6,9,-1},{2,...
s808831626
p00190
C++
#include <stdlib.h> using namespace std; int p[5][5],x[11]={1,2,3,0,1,2,3,4,1,2,3},y[11]={1,1,1,2,2,2,2,2,3,3,3},s,sx[2],sy[2] ,mx[4]={1,0,-1,0},my[4]={0,-1,0,1},lt; int search(int t,int mx2,int my2,int mc) { int a,i,j,x2,y2,s2; if (s==0) { if (lt>t) lt=t; return 1;} for (i=0;i<2;i++) for (j=0;j<4;j++) { x...
a.cc: In function 'int main()': a.cc:28:10: error: 'cin' was not declared in this scope 28 | while (cin >> p[0][2] && p[0][2]!=-1) { | ^~~ a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 1 | #include <stdlib.h> +++ |+#inclu...
s238024611
p00191
Java
import java.util.*; import java.math.BigDecimal; public class AOJ_0191{ void run(){ Scanner sc = new Scanner(System.in); while(true){ int n = sc.nextInt(); int m = sc.nextInt(); if(n == 0 && m == 0){ break; } double[][] g =...
Main.java:4: error: class AOJ_0191 is public, should be declared in a file named AOJ_0191.java public class AOJ_0191{ ^ Note: Main.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. 1 error
s360197911
p00191
C
#include<stdio.h> double t[100][100]; double dp[100][100]; double ans(int num,int id,int n){ int i; double tmp,t=0; if(num==0) return 1; if(dp[num][id]!=-1) return dp[num][id]; for(i=0;i<n;i++){ tmp=t[id][i] * ans(num-1,i,n); if(t<tmp) t=tmp; } return dp[num][id]=t; } int main(){ int m,n;...
main.c: In function 'ans': main.c:14:10: error: subscripted value is neither array nor pointer nor vector 14 | tmp=t[id][i] * ans(num-1,i,n); | ^
s417949171
p00191
C
#include<stdio.h> #define Double double #define Int int #define For for #define Scanf scanf #define If if #define Printf printf #define Roop(i,n) for(i=0;i<n;i++) #define Roop2(i,n) for(i=1;i<=n;i++) #define Roop3(i,n) for(i=2;i<=n;i++) int main(){ Int i,j,k,n,m; Double max=0.0; scanf("%d%d",&n,&m); Roop(i,n) Roop...
main.c: In function 'main': main.c:18:16: error: 'x' undeclared (first use in this function) 18 | Scanf("%lf",&x[i][j]); | ^ main.c:18:16: note: each undeclared identifier is reported only once for each function it appears in main.c:22:4: error: 'dp' undeclared (first use in this function) ...
s623734946
p00191
C
#include <cstdio> #include <algorithm> using namespace std; int main() { int n, m; while(scanf("%d %d\n", &n, &m), n || m){ long double g[n][n]; /* dp[a][b]??????a?????????b?????\?????????????????????a?????§????????????????????§??? */ long double dp[m][n]; for(int i = 0; i < n; i++){ for(int j = 0; j < n; ...
main.c:1:10: fatal error: cstdio: No such file or directory 1 | #include <cstdio> | ^~~~~~~~ compilation terminated.
s722597338
p00191
C
3 3 1.3 3.0 0.5 2.4 2.1 1.0 3.0 0.8 1.2 2 2 1.0 1.0 1.0 1.0 0 0
main.c:1:1: error: expected identifier or '(' before numeric constant 1 | 3 3 | ^
s313496319
p00191
C
a=100;double x[a][a],y[a][a],r,z; main(n,m,i,j,k){for(;scanf("%d%d",&n,&m),m;printf("%.2f\n",r)){ memset(x,0,sizeof(x)); for(i=0;i<n;i++)for(j=0;j<n;j++)scanf("%lf",y[i]+j); for(j=0;j<n;j++)x[0][j]=1; for(i=1;i<m;i++)for(j=0;j<n;j++)for(k=0;k<n;k++)if(x[i][j]<(z=x[i-1][k]*y[k][j]))x[i][j]=z; for(r=j=0;j<n;j++)r=r<x[m-1...
main.c:1:1: warning: data definition has no type or storage class 1 | a=100;double x[a][a],y[a][a],r,z; | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int] main.c:1:14: error: variably modified 'x' at file scope 1 | a=100;double x[a][a],y[a][a],r,z; | ^ ...
s439528186
p00191
C++
import java.util.Scanner; import java.math.BigDecimal; public class Main { void doIt() { Scanner stdIn = new Scanner(System.in); while(true) { int n = stdIn.nextInt();//肥料の種類 int m = stdIn.nextInt();//肥料を与える回数 if(n + m == 0) break; double[][] table = new double[n][n]; for(int r = 0; r < n; r++) { ...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Scanner; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.math.BigDecimal; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodul...
s154498065
p00191
C++
#include <iostream> #include <cstdio> using namespace std; double memo [101][102]; double mp[101][101]; double ans; int n,m; int cnt; void saiki(double seki,double pseki,int mae,int kai) { // cout <<"seki="<<seki<<" mae="<<mae<<" kai="<<kai<<endl; cnt++; if(kai == m && ans < seki) ans = seki; if(kai == m ...
a.cc:57:7: error: stray '\' in program 57 | ?\?\ for(int j=0;j<=m;j++)for(int k=0;k<=n;k++)memo[j][k] = -1; | ^ a.cc:57:9: error: stray '\' in program 57 | ?\?\ for(int j=0;j<=m;j++)for(int k=0;k<=n;k++)memo[j][k] = -1; | ^ a.cc: In function 'int main()': a.cc:57:6: error: expe...
s985587465
p00191
C++
#include<iostream> #include<string> #include<algorithm> #include<map> #include<set> #include<utility> #include<vector> #include<cmath> #include<cstdio> #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 it ::iterator #define all(in) in.begin(),in.end...
a.cc: In function 'int main()': a.cc:28:13: error: 'j' was not declared in this scope 28 | now[j] = 0; | ^
s618202679
p00191
C++
p#include <iostream> #include<iomanip> #include<algorithm> #define shosu(x) fixed<<setprecision(x) using namespace std; int n,m; double ef[105][105]; double func(){ double ans=0,dp[105][105]={0}; for(int i=0;i<m;i++){ dp[0][i]=1; } for(int i=1;i<n;i++){ for(int j=0;j<m;j++){ for(int k=0;k<m;k++){ int t...
a.cc:1:2: error: stray '#' in program 1 | p#include <iostream> | ^ a.cc:1:1: error: 'p' does not name a type 1 | p#include <iostream> | ^ In file included from /usr/include/c++/14/iosfwd:42, from /usr/include/c++/14/iomanip:41, from a.cc:2: /usr/include/c++/14/bits...
s529070968
p00191
C++
#include <iostream> #include<iomanip> #include<algorithm> #define shosu(x) fixed<<setprecision(x) using namespace std; int n,m; double ef[105][105]; double func(){ double ans=0,dp[105][105]={0}; for(int i=0;i<m;i++){ dp[0][i]=1; } for(int i=1;i<n;i++){ for(int j=0;j<m;j++){ for(int k=0;k<m;k++){ int tm...
a.cc: In function 'double func()': a.cc:19:40: error: no matching function for call to 'max(int&, double)' 19 | tmp=max(tmp,dp[i-1][k]*ef[k][j]); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, ...
s688970301
p00191
C++
#include <iostream> #include<iomanip> #include<algorithm> #define shosu(x) fixed<<setprecision(x) using namespace std; int n,m; double ef[105][105]; double func(){ double ans=0,dp[105][105]={0}; for(int i=0;i<m;i++){ dp[0][i]=1; } for(int i=1;i<n;i++){ for(int j=0;j<m;j++){ int tmp=0; for(int k=0;k<m;k+...
a.cc: In function 'double func()': a.cc:19:40: error: no matching function for call to 'max(int&, double)' 19 | tmp=max(tmp,dp[i-1][k]*ef[k][j]); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, ...
s013934435
p00191
C++
#include<iostream> #include<cstdio> #include<algorithm> using namespace std; double c[100][100]; double dp[100][100];//i??\??????j???????????¬ signed main() { int a, b; while(scanf("%d%d", &a, &b),a|b) { for (int d = 0; d < a; d++) { for (int e = 0; e < a; e++) { scanf("%lf", &c[d][e]); } } memset(dp...
a.cc: In function 'int main()': a.cc:16:17: error: 'memset' was not declared in this scope 16 | memset(dp, 0, sizeof(dp)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include<algorithm> ++...
s813297241
p00191
C++
#include<iostream> #include<cmath> #include<vector> using namespace std; const double eps = 1.0e-10; double eq(double a, double b){ //a==b return abs(b-a)<eps; } double gt(double a, double b){ //a>b return !eq(a,b) && a > b; } int main(){ while(true){ int n,m; double answer = -1; cin >> n >> m; ...
a.cc: In function 'int main()': a.cc:41:10: error: 'j' was not declared in this scope 41 | dp[j][i] = t; | ^ a.cc:41:18: error: 't' was not declared in this scope 41 | dp[j][i] = t; | ^ a.cc:46:18: error: 'greedy' was not declared in this scope 46 | ans...
s592405615
p00191
C++
#include <iostream> using namespace std; int n, m; double map[100][100], Max; void search( int prev, double point, int count ) { if(count == m) { if(Max < point) { Max = point; } return; } for(int i=0; i < n; ++i) serch(i, point*map[prev][i], count + 1); } int main( void ) { while(cin >> n >> m, n | ...
a.cc: In function 'void search(int, double, int)': a.cc:17:17: error: 'serch' was not declared in this scope; did you mean 'search'? 17 | serch(i, point*map[prev][i], count + 1); | ^~~~~ | search
s971743148
p00191
C++
#include <iostream> using namespace std; int n, m; double map[100][100], Max; void search( int prev, double point, int count ) { if(count == m) { if(Max < point) { Max = point; } return; } for(int i=0; i < n; ++i) serach(i, point*map[prev][i], count + 1); } int main( void ) { while(cin >> n >> m, n |...
a.cc: In function 'void search(int, double, int)': a.cc:17:17: error: 'serach' was not declared in this scope; did you mean 'search'? 17 | serach(i, point*map[prev][i], count + 1); | ^~~~~~ | search
s802013240
p00191
C++
#include <iostream> #include <fstream> #include <vector> #include <string> #include <map> #include <sstream> #include <queue> #include <cstdlib> #include <algorithm> #include <iterator> #include <stack> #include <list> using namespace std; #define INF 100000000 typedef long long int lli; typedef pair<int,int> P; doubl...
a.cc: In function 'int main()': a.cc:54:17: error: 'a' was not declared in this scope 54 | a/=100; | ^
s924592714
p00191
C++
#include <stdio.h> using namespace std; int main() { int i,j,k,m,n,f; double a,d[100][100],an[2][100]; while(cin >> n >> m) { if (n==0 && m==0) break; for (i=0;i<n;i++) { an[0][i]=1; for (j=0;j<n;j++) cin >> d[i][j];} f=0; for (k=0;k<m-1;k++) { for (i=0;i<n;i++) { a=0; for (j=0;j<n;j++) a=a < an[f]...
a.cc: In function 'int main()': a.cc:7:15: error: 'cin' was not declared in this scope 7 | while(cin >> n >> m) { | ^~~ a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 1 | #include <stdio.h> +++ |+#include <iost...
s904209018
p00192
C++
#include<iostream> #include<vector> using namespace std; const int NIL = -1; const int INF = 12000; enum {UNDER, ABOVE}; int time; class Car { public: int id, arrive, sojourn; int leave; Car(int i, int a, int s) :id(i), arrive(a), sojourn(s) {} void park(int t) {leave = t + sojourn;} int remain()...
a.cc:9:5: error: 'int time' redeclared as different kind of entity 9 | int time; | ^~~~ 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/bits/gthr.h:157, ...
s122898086
p00192
C++
#include <bits/stdc++.h> using namespace std; ???? class Car{ public: ????int id, in_time, rest_time; ????Car(){} ????Car(int a, int b, int c): id(a), in_time(b), rest_time(c){} }; ???? const int INF = (1<<28); ???? int m, n; queue<Car> que; Car pa[20]; vector<int> ans; ???? void init(){ ????for(int i=0;i<m*2;i++) pa[...
a.cc:4:1: error: expected unqualified-id before '?' token 4 | ???? | ^ a.cc:11:1: error: expected unqualified-id before '?' token 11 | ???? | ^ a.cc:13:1: error: expected unqualified-id before '?' token 13 | ???? | ^ a.cc:15:7: error: 'Car' was not declared in this scope 15 | queue<Car> q...
s058609855
p00192
C++
#include <iostream> #include <vector> #include <set> #include <map> #include <queue> #include <sstream> #include <algorithm> #include <numeric> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #include <cstdlib> #include <cassert> #define rep(i,n) for(int i=0;i<n;i++) #define rp(i,c) rep(i,(c)....
a.cc: In function 'int main()': a.cc:83:34: error: incompatible types in assignment of 'int' to 'int [2]' 83 | rep(i,m)spc[i].id=0; | ~~~~~~~~~^~
s629747844
p00192
C++
#include<bits/stdc++.h> using namespace std; typedef pair < int , int > Pi; #define fr first #define sc second vector< stack < Pi > > park; queue< Pi > sleep; vector< int > ans; set< int > out_time; int exit_F5; void parking(const int& now){ while(!sleep.empty()){ const int id = sleep.front().fr, time = sleep...
a.cc:8:13: error: 'std::queue<std::pair<int, int> > sleep' redeclared as different kind of entity 8 | queue< Pi > sleep; | ^~~~~ In file included from /usr/include/x86_64-linux-gnu/bits/sigstksz.h:24, from /usr/include/signal.h:328, from /usr/include/c++/14/csigna...
s466723157
p00193
Java
6 6 6 1 1 6 1 3 2 3 5 1 6 5 6 2 1 3 5 3 6 6 6 3 2 3 5 6 1 1 1 1 6 5 6 2 2 3 5 3 0 0
Main.java:1: error: class, interface, enum, or record expected 6 6 ^ 1 error
s193977925
p00193
Java
import java.util.*; public class DevenEleven { public static void main(String[] args) { Scanner s=new Scanner(System.in); for(int m,n,x,a[][];(n=s.nextInt())>0;){ m=s.nextInt(); x=s.nextInt(); a=new int[n][m]; Deque<int[]>q=new ArrayDeque<int[]>(); for(int i=0;i<x;++i){ int u=s.nextInt()-1,v=s....
Main.java:3: error: class DevenEleven is public, should be declared in a file named DevenEleven.java public class DevenEleven { ^ 1 error
s386126077
p00193
C
#include<cstdio> #include<cstring> #include<utility> #include<algorithm> #include<queue> using namespace std; typedef struct pos { int x,y,cost; bool operator ()(pos const& a, pos const& b) const { return a.cost>b.cost; } }pos; int M,N,S,T,m[101][101],i,j,p,q,R,t; int bfs(int x,int y,int abj) { int i,c=1,mx[2...
main.c:1:9: fatal error: cstdio: No such file or directory 1 | #include<cstdio> | ^~~~~~~~ compilation terminated.
s053000118
p00193
C++
#include <bits/stdc++.h> using namespace std; ?? #define reps(i,f,n) for(int i=f; i<int(n); ++i) #define rep(i,n) reps(i,0,n) ?? typedef long long ll; typedef vector<int> vi; typedef vector<vi> vvi; typedef pair<int, int> pii; ?? const int INF = 1001001001; ?? int dist(pii a, pii b) { ????????int dy = a.first - b.first...
a.cc:3:1: error: expected unqualified-id before '?' token 3 | ?? | ^ a.cc:11:1: error: expected unqualified-id before '?' token 11 | ?? | ^ a.cc:13:1: error: expected unqualified-id before '?' token 13 | ?? | ^ a.cc:29:1: error: expected unqualified-id before '?' token 29 | ?? | ^
s519720753
p00193
C++
#include <iostream> #include <sstream> #include <fstream> #include <vector> #include <list> #include <set> #include <map> #include <stack> #include <queue> #include <algorithm> #include <numeric> #include <cstdio> #include <cstdlib> #include <cstring> #include <climits> #include <cmath> using namespace std; typedef pa...
a.cc: In function 'int bfs(VVI&, int, int)': a.cc:49:13: error: 'answer' was not declared in this scope 49 | answer++; | ^~~~~~
s291117274
p00193
C++
#include <iostream> #include <algorithm> #include <vector> #include <queue> using namespace std; typedef pair<int,int> pii; int n,m; int s,t; pii ps[101]; // ‚»‚ꂼ‚ê‚̍À•W‚©‚çˆê”Ô‹ß‚¢ƒRƒ“ƒrƒj‚Ö‚Ì‹——£ int dists[101][101]; const int INF=1000000000; pii cand[101]; bool used[101][101]; bool noSet[101][101]; const int d...
a.cc: In function 'int updateMinDist(int, int, bool)': a.cc:28:5: error: 'memset' was not declared in this scope 28 | memset(used,0,sizeof(used)); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include <queue> +++ |...
s124237645
p00193
C++
#include <cstdio> #include <queue> #include <utility> #include <algorithm> using namespace std; #define INF (1<<30) typedef pair<int,int> _P; typedef pair<_P,int> P; int map[100][100]; bool vst[100][100]; int dx1[6]={-1,0,1,0,-1,-1},dy1[6]={-1,-1,0,1,1,0}; int dx2[6]={0,1,1,1,0,-1},dy2[6]={-1,-1,0,1,1,0}; int main...
a.cc: In function 'int main()': a.cc:31:25: error: 'memset' was not declared in this scope 31 | memset(vst,false,sizeof(vst)); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #inc...
s327043066
p00193
C++
include<cstdio> #include<algorithm> #include<queue> using namespace std; int dx[2][6] = { {-1, 0, 1,-1,-1,0 } , {-1,0,0,1,1,1} }; int dy[2][6] = { { 0, 1, 0, 1,-1,-1} , {0,1,-1,0,1,-1} }; class P{ public: int x; int y; int cost; P(){} P(int x,int y,int cost):x(x),y(y),...
a.cc:1:1: error: 'include' does not name a type 1 | include<cstdio> | ^~~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/algorithm:60, from a.cc:2: /usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu...
s037877978
p00194
C++
#include<iostream> #define rep(i,n) for(int i=0;i<n;i++) #define ck(a,b) (0<=a&&a<b) #define Y1 b1[0]-'a' #define X1 b1[2]-'1' #define Y2 b2[0]-'a' #define X2 b2[2]-'1' using namespace std; int dy[]={-1,0,1,0},dx[]={0,1,0,-1}; int m,n,ds,ns,nc,nj,sy,sx,gy,gx,t, S[25][25],D[25][25][25][25]; bool V[25][25][110][4]; char ...
a.cc: In function 'void dfs(int, int, int, int)': a.cc:17:40: error: expected ';' before 'continue' 17 | if(!ck(ny,m)||!ck(nx,n)continue; | ^~~~~~~~ a.cc:18:41: error: expected ')' before ';' token 18 | c=D[y][x][ny][nx],nt=t+c; | ...
s019713957
p00194
C++
priority_queue<NODE> Q; Q.push(NODE(start,P(start.x-1,start.y),0)); while(Q.size()){ NODE q = Q.top(); Q.pop(); //usleep(30000); if(memo[q.cost][q.cur.y][q.cur.x])continue; else memo[q.cost][q.cur.y][q.cur.x] = true; if(q.cur.x == goal.x && q.cur.y == goal.y){ cout << q.cost << endl; b...
a.cc:2:17: error: 'priority_queue' does not name a type 2 | priority_queue<NODE> Q; | ^~~~~~~~~~~~~~ a.cc:3:17: error: 'Q' does not name a type 3 | Q.push(NODE(start,P(start.x-1,start.y),0)); | ^ a.cc:4:17: error: expected unqualified-i...
s080449367
p00195
C
#include <stdio.h> int main(void) { int x, a, b, c, d ; while (1) { scanf("%d%d", & a, & b) ; if (a == 0 && b == 0 || c = a + b) { break ; } d = 0 ; for (x = 1 ; x < 5 ; x ++) { scanf("%d%d", & a, & b) ; if (a + b > c) { ...
main.c: In function 'main': main.c:8:35: error: lvalue required as left operand of assignment 8 | if (a == 0 && b == 0 || c = a + b) { | ^
s015024534
p00195
C
#include<stdio.h> char returnsname(int); int main(void){ int i,sum,a,b,c; int top,topn; i = 0; top = 0; while(1){ scanf(" %d %d",&a,&b); if(a == 0 && b == 0){ break; } c = a + b; if(top < c){ top = c; topn = i + 1; } i++; if(i==5){ switch(topn){ case 1: re...
/usr/bin/ld: /tmp/cc6rbhsH.o: in function `main': main.c:(.text+0xc5): undefined reference to `returnsname' collect2: error: ld returned 1 exit status
s744366371
p00195
C
#include<stdio.h> int main(void){ int i,sum,a,b,c; int top,topn; i = 0; top = 0; while(1){ scanf(" %d %d",&a,&b); if(a == 0 && b == 0){ break; } c = a + b; if(top < c){ top = c; topn = i + 1; } i++; if(i==5){ switch(topn){ case 1: return('A'); break; c...
main.c: In function 'main': main.c:46:42: error: implicit declaration of function 'returnsname' [-Wimplicit-function-declaration] 46 | printf("%c %d\n",returnsname(topn),top); | ^~~~~~~~~~~
s778249184
p00195
C
#include<stdio.h> int main(){ int a[5],x,y,max; while(scanf("%d %d",&x,&y),x||y){ max=0; a[0]=x+y; for(i=1;i<5;i++){ scanf("%d %d",&x,&y); a[i]=x+y; } for(i=0;i<5;i++) if(max<a[i]) max=a[i]; for(i=0;i<5;i++) if(a[i]==max) printf("%c %d\n",'A'+i.max); } return 0; }
main.c: In function 'main': main.c:7:5: error: 'i' undeclared (first use in this function) 7 | for(i=1;i<5;i++){ | ^ main.c:7:5: note: each undeclared identifier is reported only once for each function it appears in
s038009421
p00195
C
#include<stdio.h> int main(){ int a[5],x,y,max,i; while(scanf("%d %d",&x,&y),x||y){ max=0; a[0]=x+y; for(i=1;i<5;i++){ scanf("%d %d",&x,&y); a[i]=x+y; } for(i=0;i<5;i++) if(max<a[i]) max=a[i]; for(i=0;i<5;i++) if(a[i]==max) printf("%c %d\n",'A'+i.max); } return 0; }
main.c: In function 'main': main.c:16:23: error: request for member 'max' in something not a structure or union 16 | printf("%c %d\n",'A'+i.max); | ^
s336852232
p00195
C
include <stdio.h> main(){ int data[5]; int i, max, a, b, ans; while(1){ scanf("%d %d", &a, &b); if(a==0 && b==0) break; data[0]=a+b; for(i=1;i<5;i++){ scanf("%d %d", &a, &b); data[i]=a+b; } max=-1; for(i=0;i<5;i++){ if(max<data[i]){ max=data[i]; ans=i; } ...
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include <stdio.h> | ^
s743117966
p00195
C
#include <stdio.h> int main(void){ int a[5],s,b,c,d,e,f,g,h,i,j,k,l,n,m; j=0; a[5]=0; for(n=0;n<10;n++){ scanf("%d %d",&b,&c); scanf("%d %d",&d,&e); scanf("%d %d",&f,&g); scanf("%d %d",&h,&k); scanf("%d %d",&l,&m); a[0]=b+c; a[1]=d+e; a[2]=f+g; a[3]=h+k; a[4]...
main.c: In function 'main': main.c:27:11: error: 't' undeclared (first use in this function) 27 | t=a[i]; | ^ main.c:27:11: note: each undeclared identifier is reported only once for each function it appears in
s076975201
p00195
C
#include <stdio.h> int main(void) { int gozen,gogo; int kazu[5]; int maxmise; int maxkazu; int i; while(1) { scanf("%d %d",&gozen,&gogo); if(gozen==0 && gogo==)break; kazu[0]=gozen+gogo; for(i=1;i<5;i++) { scanf("%d %d",&gozen,&gogo); kazu[i]=gozen+gogo; } maxmise=0; maxkazu=kazu[0]; for(i=...
main.c: In function 'main': main.c:11:38: error: expected expression before ')' token 11 | if(gozen==0 && gogo==)break; | ^
s372173083
p00195
C++
#include<iostream> using namespace std; int main(){ int shop[5]; char ans;int answer; while(true){ int s1,s2; cin>>s1>>s2; if(s1==0&&s2==0)break; shop[0]=s1+s2; for(int i=1;i<5;i++){ cin>>s1>>s2; shop[i]=s1+s2; } for(int i=0;i<5;i++)cout<<shop[i]<<endl; answer=0 for(int i=0;i<5;i++){ answer...
a.cc: In function 'int main()': a.cc:20:17: error: expected ';' before 'for' 20 | answer=0 | ^ | ; 21 | for(int i=0;i<5;i++){ | ~~~ a.cc:21:21: error: 'i' was not declared in this scope 21 | for(int i=0;i<5;i++){ | ...
s694608453
p00195
C++
#include<iostream> #include<cstdio> #include<string> #include<map> using namespace std; int main(){ pair<int,char>shop[5]; int am[5],pm[5]; while(1){ cin >> am[0] >> pm[0]; if(am[0] == 0 && pm[0] == 0)break; for(int i=1;i<5;i++){ cin >> am[i] >> pm[i]; } for(int i=0;i<5;i++){ ...
a.cc: In function 'int main()': a.cc:24:5: error: 'sort' was not declared in this scope; did you mean 'short'? 24 | sort(shop,shop+5); | ^~~~ | short
s722736791
p00195
C++
#include<iostream> #include<cstdio> #include<string> #include<map> using namespace std; int main(){ pair<int,char>shop[5]; int am[5],pm[5]; while(1){ cin >> am[0] >> pm[0]; if(am[0] == 0 && pm[0] == 0)break; for(int i=1;i<5;i++){ cin >> am[i] >> pm[i]; } for(int i=0;i<5;i++){ ...
a.cc: In function 'int main()': a.cc:24:5: error: 'sort' was not declared in this scope; did you mean 'short'? 24 | sort(shop,shop+5); | ^~~~ | short
s541950826
p00195
C++
#include<iostream> #include<cstdio> #include<string> #include<map> using namespace std; int main(){ pair<int,char>shop[5]; int am[5],pm[5]; while(1){ cin >> am[0] >> pm[0]; if(am[0] == 0 && pm[0] == 0)break; for(int i=1;i<5;i++){ cin >> am[i] >> pm[i]; } for(int i=0;i<5;i++){ ...
a.cc: In function 'int main()': a.cc:24:5: error: 'sort' was not declared in this scope; did you mean 'short'? 24 | sort(shop,shop+5); | ^~~~ | short
s280280485
p00195
C++
#include<iostream> #include<cstdio> #include<string> #include<map> using namespace std; int main(){ pair<int,char> shop[5]; int am[5],pm[5]; while(1){ cin >> am[0] >> pm[0]; if(am[0] == 0 && pm[0] == 0)break; for(int i=1;i<5;i++){ cin >> am[i] >> pm[i]; } for(int i=0;i<5;i++){ ...
a.cc: In function 'int main()': a.cc:24:5: error: 'sort' was not declared in this scope; did you mean 'short'? 24 | sort(shop,shop+5); | ^~~~ | short
s987504719
p00195
C++
using System; class Program { static void Main() { char[] chars = { 'A', 'B', 'C', 'D', 'E' }; while (true) { var maxNo = 0; var maxCount = 0; for (var i = 0; i < 5; i++) { var l = Console.ReadLine().Split(' '); var count = int.P...
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:27:2: error: expected ';' after class definition 27 | } | ^ | ; a.cc: In static member function 'static void Program::Main()': a.cc:5:13: error: structured binding declaration cannot have typ...
s543639246
p00195
C++
#include<stdio> int main(void) { int a[5],b[5]; int i,max,sum[5]; char c2,c[5]={'A','B','C','D','E'}; while (scanf("%d %d",&a[0],&b[0])!=EOF){ if(a[0]==0&&b[0]==0) break; sum[0]=a[0]+b[0]; max=sum[0]; c2='A'; for(i=1;i<5;i++){ scanf("%d %d",&a[i],&b[i]); sum[i]=a[i]+b[i]; } for(i=0;i<5;...
a.cc:1:9: fatal error: stdio: No such file or directory 1 | #include<stdio> | ^~~~~~~ compilation terminated.
s400318022
p00195
C++
#include<stdio> int main(void) { int a[5],b[5]; int i,max,sum[5]; char c2,c[5]={'A','B','C','D','E'}; while (scanf("%d %d",&a[0],&b[0])!=EOF){ if(a[0]==0&&b[0]==0) break; sum[0]=a[0]+b[0]; max=sum[0]; c2='A'; for(i=1;i<5;i++){ scanf("%d %d",&a[i],&b[i]); sum[i]=a[i]+b[i]; } for(i=0;i<5;...
a.cc:1:9: fatal error: stdio: No such file or directory 1 | #include<stdio> | ^~~~~~~ compilation terminated.
s052493791
p00195
C++
#include<iostream> #include<vector> #include<algorithm> using namespace std; int main() { enum tol { a, b, c, d, e }; vector<tol>l; vector<int>ll; int a1, a2; while (cin >> a1 >> a2){ if (a1 == 0 && a2 == 0)break; int o[5]; int oo[5]; a1 += a2; o[0] = a1; for (int i = 1; i < 5; i++) { cin >> a1 >> a...
a.cc: In function 'int main()': a.cc:25:42: error: expected ')' before ';' token 25 | ll.push_back(o[0];) | ~ ^ | ) a.cc:25:43: error: expected primary-expression before ')' token 25 | ...
s865379504
p00195
C++
#include<iostream> #include<vector> #include<algorithm> using namespace std; int main() { enum tol { a, b, c, d, e }; vector<tol>l; vector<int>ll; int a1, a2; while (cin >> a1 >> a2){ if (a1 == 0 && a2 == 0)break; int o[5]; int oo[5]; a1 += a2; o[0] = a1; for (int i = 1; i < 5; i++) { cin >> a1 >> a...
a.cc: In function 'int main()': a.cc:25:42: error: expected ')' before ';' token 25 | ll.push_back(o[0];) | ~ ^ | ) a.cc:25:43: error: expected primary-expression before ')' token 25 | ...
s510082146
p00195
C++
#include<iostream> using namespace std; int main() { int s,a,d,c; while(cin>>a>>d,a)) { s=a+d;c=0; for(int i=1;i<5;i++) { cin>>a>>d; if(s<a+d)s=a+d,c=i; } cout<<(char)(c+'A')<<' '<<s<<endl; } }
a.cc: In function 'int main()': a.cc:5:19: error: expected primary-expression before ')' token 5 | while(cin>>a>>d,a)) { | ^
s485602897
p00195
C++
#include<stdio.h> #include<string.h> int main(void) { int a[5],b[5],d,i,j; char c[5]="ABCDE"; scanf("%d %d",&a[0],&b[0]); while(a[i]!=0 || b[i]!=0){ d=0; j=0; for(i=1;i<5;i++){ scanf("%d %d",&a[i],&b[i]); if(a[i]+b[i]>d){ d=a[i]+b[i]; j=i; } } printf("%c %d\n",c[j],d); i=0; scanf("% %d",&a[...
a.cc: In function 'int main()': a.cc:6:19: error: initializer-string for 'char [5]' is too long [-fpermissive] 6 | char c[5]="ABCDE"; | ^~~~~~~
s026736071
p00195
C++
#include<stdio.h> #include<string.h> int main(void) { int a[5],b[5],d,i,j; char c[5]="ABCDE"; scanf("%d %d",&a[0],&b[0]); while(a[i]!=0 || b[i]!=0){ j=0; d=0; if(a[i]+b[i]>d){ d=a[i]+b[i]; j=i; } for(i=1;i<5;i++){ scanf("%d %d",&a[i],&b[i]); if(a[i]+b[i]>d){ d=a[i]+b[i]; j=i; } } printf(...
a.cc: In function 'int main()': a.cc:6:19: error: initializer-string for 'char [5]' is too long [-fpermissive] 6 | char c[5]="ABCDE"; | ^~~~~~~
s029384493
p00195
C++
#include<stdio.h> #include<string.h> int main(void) { int a[5],b[5],d,i,j; char c[5]="ABCDE"; scanf("%d %d",&a[0],&b[0]); while(a[0]!=0 || b[0]!=0){ j=0; d=a[0]+b[0]; for(i=1;i<5;i++){ scanf("%d %d",&a[i],&b[i]); if(a[i]+b[i]>d){ d=a[i]+b[i]; j=i; } } printf("%c %d\n",c[j],d); scanf("% %d",&a...
a.cc: In function 'int main()': a.cc:6:19: error: initializer-string for 'char [5]' is too long [-fpermissive] 6 | char c[5]="ABCDE"; | ^~~~~~~
s899752481
p00195
C++
#include<stdio.h> #include<string.h> int main(void) { int a[5],b[5],d,i,j; char c[5]="ABCDE"; scanf("%d %d",&a[0],&b[0]); while(a[0]!=0 || b[0]!=0){ j=0; d=a[0]+b[0]; for(i=1;i<5;i++){ scanf("%d %d",&a[i],&b[i]); if(a[i]+b[i]>d){ d=a[i]+b[i]; j=i; } } printf("%c %d\n",c[j],d); scanf("% %d",&a...
a.cc: In function 'int main()': a.cc:6:19: error: initializer-string for 'char [5]' is too long [-fpermissive] 6 | char c[5]="ABCDE"; | ^~~~~~~
s625278917
p00195
C++
#include <iostream> #include <string> using namespace std; int GetMaxs(int date[], int n){ int max=0, maxn=0; for(int i=0; i<n; i++){ if(max<date[i]){ max = date[i]; maxn = i; } } return (maxn); } int main(void){ int m[5],am,pm; string s; while(cin>>am>>pm,am){ m[0] = am + pm; for(int i=1; i<5; i+...
a.cc: In function 'int main()': a.cc:25:37: error: 'date' was not declared in this scope 25 | cout << s << " " << date[Getmax(m,5)] <<endl; | ^~~~ a.cc:25:42: error: 'Getmax' was not declared in this scope; did you mean 'GetMaxs'? 25 | cout...
s482208400
p00196
Java
import java.util.*; /* 19:08 ~ &#160;*/ public class Main { static class Team{ String name; int win , lose , other; public Team(String n , int[] result) { this.name = n; this.win = result[0]; this.lose = result[1]; this.other = result[2]; } } static void sort( ArrayList<Team> list , int left , in...
Main.java:20: error: illegal start of expression &#160; &#160; &#160; &#160; if (left <= right) { ^ Main.java:20: error: illegal character: '#' &#160; &#160; &#160; &#160; if (left <= right) { ^ Main.java:20: error: illegal start of expression &#160; &#160; &#160; &#160; if (left <= right) { ^ Main.java:20: err...
s264492389
p00196
C
#include <stdio.h> int struct a{ char name; int score[10],win,lose; }; int main(){ int n,j,i,top=0,b,con=0; while(1){ scanf("%d",&n); if(n==0) break; struct a p[10]; for(i=0;i<n;i++){ p[i].win=0; p[i].lose=0; scanf("%c",&p[i].name); for(j=0;j<n-1;j++){ scanf("%d",&p[i].s...
main.c:2:5: error: two or more data types in declaration specifiers 2 | int struct a{ | ^~~~~~ main.c:5:1: warning: useless type name in empty declaration 5 | }; | ^
s594012370
p00196
C
main(){ while(1){ int n,j,i,top=0,b,con=0; scanf("%d",&n); if(n==0) break; struct a p[10]; for(i=0;i<n;i++){ p[i].win=0; p[i].lose=0; scanf("%s",p[i].name); for(j=0;j<n-1;j++){ scanf("%d",&p[i].score[j]); if(p[i].score[j]==0) p[i].win+=1; else if(p[i].score[j]==1) p[i].los...
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main(){ | ^~~~ main.c: In function 'main': main.c:4:5: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 4 | scanf("%d",&n); | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declar...
s560448194
p00196
C
1. #include <iostream> 2. using namespace std; 3. 4. int main() 5. { 6. int n; 7. while (cin >> n, n) 8. { 9. char name[10]; 10. int win[10] = {0}; 11. int lose[10] = {0}; 12. 13. for (int i = 0; i < n; i++) 14....
main.c:1:4: error: expected identifier or '(' before numeric constant 1 | 1. #include <iostream> | ^~ main.c:1:7: error: stray '#' in program 1 | 1. #include <iostream> | ^ main.c:3:4: error: expected identifier or '(' before numeric constant 3 | 3. | ^~
s732929802
p00196
C
#include <iostream> #include <cstdio> using namespace std; int i,j,make[100],kati[100]; char name[100]; void change(){ int tmp1,tmp2; char tmp3; tmp1 = kati[i]; kati[i] = kati[j]; kati[j] = tmp1; tmp2 = make[i]; make[i] = make[j]; make[j] = tmp2; tmp3 = name[i]; name[i] = name[j]; name[j] ...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s495028415
p00196
C++
#include<cstdio> #include<cstring> #include<algorithm> #include<functional> #include<vector> #include<stack> #include<queue> #include<iostream> using namespace std; int main(void) { char name[10]; int toku[9][5],n,make,hiki,sum[9],touroku[9]; int flg[9]; while(1) { cin>>n; if(n==0) break; for(int i=0;i<n;i++)...
a.cc: In function 'int main()': a.cc:26:25: error: 'kati' was not declared in this scope 26 | kati=0;make=0; | ^~~~
s711830524
p00196
C++
#include<stdio.h> int main(void) { int n,i,j,a[10][9],b[10],w,flg[10]; char name[10],x; while(1){ scanf("%d",&n); if(n==0) break; for(i=0;i<n;i++){ scanf(" %c",&name[i]); for(j=0;j<n-1;j++){ scanf(" %d",&a[i][j]); } } for(i=0;i<n;i++) b[i]=0,flg=i; for(i=0;i<n;i++){ for(j=0...
a.cc: In function 'int main()': a.cc:15:44: error: incompatible types in assignment of 'int' to 'int [10]' 15 | for(i=0;i<n;i++) b[i]=0,flg=i; | ~~~^~ a.cc:52:2: error: expected '}' at end of input 52 | } | ^ a.cc:3:1: note: to match this '{' ...
s577202665
p00196
C++
#include <bits/stdc++.h> using namespace std; typedef pair<char,pair<int,int> > p; int main() { int n; while(cin>>n,n){ vector<p>a; for(int i=0;i<n;i++){ p data;cin>>data.first; data.second.first=0; data.second.second=0; for(int j=0;j<n-1;j++){ int p;cin>>p; if(p==0)data.second.first++; el...
a.cc: In function 'int main()': a.cc:26:25: error: 'v' was not declared in this scope 26 | v.erase(v.begin()+f); | ^
s993623155
p00196
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; class team { public: team(){c=w=l=0;} char c; int w,l; operator<(const team& t) const { return w!=t.w ? w>t.w : l<t.l; } }; int main() { int n,s; while(cin >> n, n) { vector<team> v; for(int j=0; j<n; j++) { ...
a.cc:15:17: error: ISO C++ forbids declaration of 'operator<' with no type [-fpermissive] 15 | operator<(const team& t) const | ^~~~~~~~
s377841713
p00196
C++
include<iostream> #include<cstdlib> #define MAX 10 using namespace std; struct datum { char name; int win; int lose; }; datum data[MAX]; int compare ( const void * a, const void * b ) { const datum x = *((datum*)a); const datum y = *((datum*)b); if ( x.win == y.win ) return x.lose - y.lose; return y.win -...
a.cc:1:1: error: 'include' does not name a type 1 | include<iostream> | ^~~~~~~ a.cc: In function 'int main()': a.cc:28:17: error: 'cin' was not declared in this scope 28 | cin >> n; | ^~~ a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably f...
s421551163
p00196
C++
#include<iostream> #include<vector> #include<string> #include<utility> #include<algorithm> using namespace std; bool hikaku(const pair<int,string>& A,const pair<int,string>& B){ return A.first > B.first; } int main(){ int n,k,win,lose,les; string s; while(cin >> n,n){ vector<pair<int,string> >p; // vector < pa...
a.cc: In function 'int main()': a.cc:32:37: error: 'c' was not declared in this scope 32 | for(int i=0;i<n;i++)c | ^
s959211565
p00196
C++
#include <iostream> #include <vector> using namespace std; int main(){ int n; while(cin >> n && n){ vector<string> a; vector< pair<int,int> > v; for(int i = 0 ; i < n ; i++){ string name; cin >> name; a.push_back(name); int w = 0; for(int j = 0 ; j < n - 1 ; j++){ int t; cin >> t; if...
a.cc: In function 'int main()': a.cc:23:17: error: 'sort' was not declared in this scope; did you mean 'short'? 23 | sort(v.begin(),v.end()); | ^~~~ | short
s964775197
p00196
C++
#include <iostream> using namespace std; int main(){ int n; while(cin >> n){ if(n == 0){ break; } pair<pair<int,int>,pair<int,char> > t[n]; for(int i = 0; i < n; i++){ t[i].second.first = i; cin >> t[i].second.second; t[i].first.first = 0; t[i].first.second = 0; ...
a.cc: In function 'int main()': a.cc:30:5: error: 'sort' was not declared in this scope; did you mean 'short'? 30 | sort(t, t + n); | ^~~~ | short
s056423628
p00196
C++
#include<iostream> using namespace std; typedef pair<int,int> P; typedef pair<P,string> PP; int n,m; PP t[10]; int main(){ while(cin>>n&&n){ for(int i=0;i<n;i++){ cin>>t[i].second; t[i].first.first=t[i].first.second=0; for(int j=0;j<n;j++){ if(i==j)continue; cin>>m; if(m==0)t[i].first.first--...
a.cc: In function 'int main()': a.cc:19:5: error: 'sort' was not declared in this scope; did you mean 'short'? 19 | sort(t,t+n); | ^~~~ | short a.cc:23:2: error: expected '}' at end of input 23 | } | ^ a.cc:7:11: note: to match this '{' 7 | int main(){ | ^
s288676679
p00196
C++
#include<iostream> #include<algorithm> using namespace std; typedef pair<int,int> P; typedef pair<P,string> PP; int n,m; PP t[10]; int main(){ while(cin>>n&&n){ for(int i=0;i<n;i++){ cin>>t[i].second; t[i].first.first=t[i].first.second=0; for(int j=0;j<n;j++){ if(i==j)continue; cin>>m; if(m==...
a.cc: In function 'int main()': a.cc:24:2: error: expected '}' at end of input 24 | } | ^ a.cc:8:11: note: to match this '{' 8 | int main(){ | ^