submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s310068560
p00767
C++
#include <bits/stdc++.h> #define rep(i, from, to) for (int i = from; i < to; ++i) #define REP(i, from, to) for (int i = from; i <= to; ++i) using namespace std; struct node { int x, y; }; int taikaku(int x, int y) { return x * x + y * y; } bool cmp(const node &n1, const node &n2) { if (taikaku(n1.x, n1.y) < taikak...
a.cc: In function 'void solve()': a.cc:30:25: error: reference to 'data' is ambiguous 30 | data.push_back(n); | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bitset:52, from /usr/include/x86_6...
s504891243
p00767
C++
#include <bits/stdc++.h> #define rep(i, from, to) for (int i = from; i < to; ++i) #define REP(i, from, to) for (int i = from; i <= to; ++i) using namespace std; struct node { int x, y; }; int taikaku(int x, int y) { return x * x + y * y; } bool cmp(const node &n1, const node &n2) { if (taikaku(n1.x, n1.y) < taikak...
a.cc: In function 'void solve()': a.cc:30:25: error: reference to 'data' is ambiguous 30 | data.push_back(n); | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bitset:52, from /usr/include/x86_6...
s394658575
p00767
C++
#include<algorithm> #include<iostream> #include<utility> #include<string> #include<vector> #include<cmath> #include<stack> #define rep(i,n) for(int i=0;i<n;i++) #define loop(i,x,n) for(int i=x;i<n;i++) #define int long long using namespace std; long long k=1000000007; signed main(){ int H,W; while(cin>>H>>W,H) { ...
a.cc: In function 'int main()': a.cc:21:20: error: expected ';' before '<' token 21 | for(int h=1,h<r;h++) { | ^ | ; a.cc:21:20: error: expected primary-expression before '<' token
s179862137
p00767
C++
#include<algorithm> #include<iostream> #include<utility> #include<string> #include<vector> #include<cmath> #include<stack> #define rep(i,n) for(int i=0;i<n;i++) #define loop(i,x,n) for(int i=x;i<n;i++) #define int long long using namespace std; long long k=1000000007; signed main(){ int H,W; while(cin>>H>>W,H) { ...
a.cc: In function 'int main()': a.cc:21:20: error: expected ';' before '<' token 21 | for(int h=1,h<r;h++) { | ^ | ; a.cc:21:20: error: expected primary-expression before '<' token
s773303264
p00767
C++
#include<iostream> #include<cmath> #include<vector> #include<utility> #include<algorithm> using namespace std; int main(){ int a,b; int sankaku[101][110]; vector<pair<double,int> >aa; sort(aa.begin(),aa.end()); for(int i=1;i<101;i++) for(int j=i+1;j<101;j++) aa.push_back(make_pair(sqrt(i*i+j*j),1000...
a.cc: In function 'int main()': a.cc:22:50: error: invalid operands of types 'double' and 'int' to binary 'operator%' 22 | cout<<aa[i].second/1000<<" "<<aa[i].first%1000<<endl; | ^~~~~ | | | ...
s048725617
p00767
C++
#include <bits/stdc++.h> using namespace std; int main(){ int w, h; int min; while(1){ cin >> h >> w; if ( w == 0 && h == 0) break; min = 0; int length = w*w + h*h; bool flag = false; for(int i = 1; ...
a.cc: In function 'int main()': a.cc:21:38: error: expected ';' before ')' token 21 | for(int i = 1; i <= 150 , i++){ | ^ | ; a.cc:23:40: error: expected ';' before ')' token 23 | for(int j = 1; j < 150, j++)...
s923986605
p00767
C++
#include <bits/stdc++.h> using namespace std; int main(){ int w, h; int min; while(1){ cin >> h >> w; if ( w == 0 && h == 0) break; min = 0; int length = w*w + h*h; bool flag = false; for(int i = 1; ...
a.cc: In function 'int main()': a.cc:44:17: error: 'i' was not declared in this scope 44 | cout << i << " " << j; | ^ a.cc:44:29: error: 'j' was not declared in this scope 44 | cout << i << " " << j; | ^ a.cc: At global scope: a.cc:47:1: erro...
s154137957
p00767
C++
#include <bits/stdc++.h> using namespace std; int main(){ int w, h; int min; while(1){ cin >> h >> w; if ( w == 0 && h == 0) break; int H=0, W=0; min = 0; int length = w*w + h*h; bool flag = false; ...
a.cc: In function 'int main()': a.cc:48:17: error: 'H' was not declared in this scope 48 | cout << H << " " << W; | ^ a.cc:48:29: error: 'W' was not declared in this scope 48 | cout << H << " " << W; | ^ a.cc: At global scope: a.cc:51:1: erro...
s400623349
p00767
C++
#include <bits/stdc++.h> using namespace std; int main(){ int w, h; int H, W; int min; while(1){ cin >> h >> w; if ( w == 0 && h == 0) break; min = 0; int length = w*w + h*h; bool flag = false; ...
a.cc:51:1: error: expected declaration before '}' token 51 | } | ^
s859128785
p00767
C++
#include<iostream> #include<algorithm> #include<vector> using namespace std; struct E{ int x,y; operator<(E a) { if(x*x+y*y!=a.x*a.x+a.y*a.y)return x*x+y*y<a.x*a.x+a.y*a.y; else return x<a.x; } }; main() { int h,w; while(cin>>h>>w,h) { E a,b,c; a.x=h,a.y=w; b.x=b.y=150; for(int i=1;i<150;i++)for(int ...
a.cc:7:9: error: ISO C++ forbids declaration of 'operator<' with no type [-fpermissive] 7 | operator<(E a) | ^~~~~~~~ a.cc:13:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 13 | main() | ^~~~
s583246420
p00767
C++
#include<iostream> #include<algorithm> #include<vector> using namespace std; struct E{ int x,y; operator<(E a) { if(x*x+y*y!=a.x*a.x+a.y*a.y)return x*x+y*y<a.x*a.x+a.y*a.y; else return x<a.x; } }; main() { int h,w; while(cin>>h>>w,h) { E a,b,c; a.x=h,a.y=w; b.x=b.y=150; for(int i=1;i<150;i++)for(int ...
a.cc:7:9: error: ISO C++ forbids declaration of 'operator<' with no type [-fpermissive] 7 | operator<(E a) | ^~~~~~~~ a.cc:13:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 13 | main() | ^~~~
s572402126
p00767
C++
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 #include<stdio.h> int main(void) { int a[100],...
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 1 | ^ a.cc: In function 'int main()': a.cc:102:9: error: 'scanf' was not declared in this scope 102 | scanf("%d %d", &a[i], &b[i]); | ^~~~~ a.cc:176:13: error: 'printf' was not declared in this scope 176 | ...
s042104179
p00767
C++
#include <iostream> #include <vector> using namespace std; using ll = long long; #define FOR(i, a, b) for(int i=(a);i<(b);++i) #define REP(i, n) for(int i=0;i<(n);++i) #define ALL(v) (v).begin(),(v).end() typedef pair<int, int> P; const int MOD = (int) 1e9 + 7; template<class T> bool chmax(T &a, const T &b) { if...
a.cc: In function 'int main()': a.cc:60:17: error: 'sort' was not declared in this scope; did you mean 'short'? 60 | sort(ALL(v), compare); | ^~~~ | short
s223360639
p00767
C++
#include<bits/stdc++.h> #define rep(i,a,b) for(int i=int(a);i<int(b);++i) using namespace std; typedef long long ll; int INF = (1LL << 30) - 1; int MOD = 1e9+7; main(){ int H,W; cin >> H >> W; while(H){ int minh, minw, mind = INF; rep(i,1,151)rep(j,i+1,151){ int d = i * i + j * j...
a.cc:7:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 7 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:14:68: error: expected ')' before '{' token 14 | if(d > H * H + W * W || (d == H * H + W * W) && (H < i){ | ~ ...
s776605382
p00767
C++
#include <iostream> using namespace std; struct Rect { int h, w, diagonal; void norm() { diagonal = h*h+w*w; } bool operator< (const Rect &r) const { return diagonal != r.diagonal ? diagonal < r.diagonal : h < r.h; } bool operator== (const Rect &r) const { return diagonal == r.diagonal && h == ...
a.cc: In function 'int main()': a.cc:31:3: error: 'sort' was not declared in this scope; did you mean 'short'? 31 | sort(r[0], r[0]+150*150); | ^~~~ | short
s258484502
p00767
C++
#include <iostream> #include <map> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { map<int, int>m; map<int, int>::iterator pm; int size, rect, h, w; for(h = 1; h < 101; h++){ for(w = 1; w < 101; w++){ if(w > h){ size = (h * h + w * w ) * 100 + w; rect = h * 100 + w; m.insert(pair<int, ...
a.cc:5:22: error: '_TCHAR' has not been declared 5 | int _tmain(int argc, _TCHAR* argv[]) | ^~~~~~
s792254677
p00768
Java
import java.io.InputStream; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.InputMismatchException; import java.util.NoSuchElementException; import java.math.BigInteger; public class Main{ static PrintWriter o...
Main.java:48: error: cannot find symbol for(int i=0;i<n;){ ^ symbol: variable n location: class Main Main.java:50: error: cannot find symbol while(i<n&&dat[i][1]==dat[st][1]&&dat[i][2]==dat[st][2]) i++; ^ symbol: variable n location: class Main Main.java:55: error: cannot fin...
s531186703
p00768
Java
import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class Main { public static void main(String[]args) { List<Team> team_list = new ArrayList<Team>(); Scanner sc = new Scanner(System.in); int M = sc.nextInt(), T = sc.nextInt(), P = sc.nextInt(), R = sc.nextInt(); for(int i...
Main.java:38: error: unexpected type team_list.get(j) = team_list.get(j); ^ required: variable found: value Main.java:39: error: unexpected type team_list.get(j) = team_tmp; ^ required: variable found: value 2 errors
s728014523
p00768
C
#include <iostream> #include <vector> #include <algorithm> using namespace std; struct Score{ int team_num; int ac=0; int time=0; int miss_tmp[20]={0}; int miss_sum=0; }; bool asc(const Score& left, const Score& right) { return left.ac == right.ac ? (left.time == right.time ? left.team_num > right.team_num : ...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s216740539
p00768
C
#include "stdio.h" #define TEAM_MAX 300 int main(int argc, char const *argv[]) { int ti,team,probrem,record; int ti_keika,team_num,pro_num,gouhi; int i,j,k; int score[TEAM_MAX][50]; int score_sin[TEAM_MAX]; int min; int min_num; int syuturyoku_count = 0; int dataset = 0; while(...
main.c: In function 'main': main.c:29:13: error: break statement not within loop or switch 29 | break; | ^~~~~ main.c: At top level: main.c:82:5: error: expected identifier or '(' before 'return' 82 | return 0; | ^~~~~~ main.c:83:1: error: expected identifier or '(' bef...
s340693318
p00768
C
#include<iostream> #include<string.h> using namespace std; const int INF=5000000; int data[51][12]; int main(){ int M,T,P,R; while(cin>>M>>T>>P>>R && M){ fill((int*)data,(int*)(data+12),0); for(int i=0;i<R;i++){ int m,t,p,j; cin>>m>>t>>p>>j; if(j==0){ data[t][0]++; data[t][11]+=m+data[t][p]*20...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s761888626
p00768
C
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdbool.h> const int MAX_T = 50; const int MAX_P = 10; typedef struct { int id; int time; int problem_submit[MAX_P]; bool problem_accepted[MAX_P]; } team_log; team_log logs[MAX_T]; int M, T, P, R; int count_of_accepted(team_log *t) { int cnt ...
main.c:12:13: error: variably modified 'problem_submit' at file scope 12 | int problem_submit[MAX_P]; | ^~~~~~~~~~~~~~ main.c:13:14: error: variably modified 'problem_accepted' at file scope 13 | bool problem_accepted[MAX_P]; | ^~~~~~~~~~~~~~~~ main.c:16:10: er...
s276909740
p00768
C++
#include <iostream> #include <vector> #include <algorithm> #include <cstdio> #define REP(i,n) for( int i = 0; i < n; i++ ) using namespace std; /* より多くの問題に正解したチームを上位とする. 正解した問題数が同じ場合は,所要時間合計の少ないチームを上位とする. 複数のチームが同数の問題に正解し,所要時間合計も同じなら,それらのチームを同順位とする. */ struct team{ int ans,time,name; int q[50]={0}; ...
a.cc: In function 'int main()': a.cc:79:18: error: expected '}' at end of input 79 | return 0; | ^ a.cc:32:1: note: to match this '{' 32 | { | ^
s569731673
p00768
C++
#include <iostream> #include <vector> #include <algorithm> #include <cstdio> #define REP(i,n) for( int i = 0; i < n; i++ ) using namespace std; /* より多くの問題に正解したチームを上位とする. 正解した問題数が同じ場合は,所要時間合計の少ないチームを上位とする. 複数のチームが同数の問題に正解し,所要時間合計も同じなら,それらのチームを同順位とする. */ struct team{ int ans,time,name; int q[50]; team...
a.cc: In function 'int main()': a.cc:79:18: error: expected '}' at end of input 79 | return 0; | ^ a.cc:32:1: note: to match this '{' 32 | { | ^
s021477826
p00768
C++
#include <iostream> #include <vector> #include <algorithm> #include <cstdio> #define REP(i,n) for( int i = 0; i < n; i++ ) using namespace std; /* より多くの問題に正解したチームを上位とする. 正解した問題数が同じ場合は,所要時間合計の少ないチームを上位とする. 複数のチームが同数の問題に正解し,所要時間合計も同じなら,それらのチームを同順位とする. */ struct team{ int ans,time,name; int q[50]; fill( ...
a.cc:20:11: error: 'q' is not a type 20 | fill( q, q + 50, 0 ); | ^ a.cc:20:14: error: 'q' is not a type 20 | fill( q, q + 50, 0 ); | ^ a.cc:20:16: error: expected ',' or '...' before '+' token 20 | fill( q, q + 50, 0 ); | ^ a.cc:20:5: error: ...
s087165704
p00768
C++
#include <iostream> #include <vector> #include <utility> #include <algorithm> #include <functional> using namespace std; int time[51][11]; bool memo[51][11]; int main(void){ int M, T, P, R; int m, t, p, j; vector<pair<int, pair<int, int> > > v; while(cin >> M >> T >> P >> R, M || T || P || R){ v.clear()...
a.cc:9:16: error: 'int time [51][11]' redeclared as different kind of entity 9 | int time[51][11]; | ^ 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...
s666027030
p00768
C++
#include <iostream> #include <vector> using namespace std; struct Team { int id; int crr_num; int time_sum; int fal[10]; bool operator < (const Team& oth)const{ if(crr_num==oth.crr_num) { if(time_sum==oth.time_sum) return id>oth.id; return time_sum<oth.time_sum; } return crr_num>oth.crr_num; } }; ...
a.cc: In function 'int main(int, const char**)': a.cc:52:17: error: 'sort' was not declared in this scope; did you mean 'short'? 52 | sort(jg.begin(),jg.end()); | ^~~~ | short
s016418671
p00768
C++
#include <iostream> #include <vector> #include <algorithm> #include <cstdio> #define REP(i,n) for( int i = 0; i < n; i++ ) using namespace std; /* より多くの問題に正解したチームを上位とする. 正解した問題数が同じ場合は,所要時間合計の少ないチームを上位とする. 複数のチームが同数の問題に正解し,所要時間合計も同じなら,それらのチームを同順位とする. */ struct team{ int ans,time,name; int q[50]={0}; ...
a.cc: In function 'int main()': a.cc:79:18: error: expected '}' at end of input 79 | return 0; | ^ a.cc:32:1: note: to match this '{' 32 | { | ^
s823764030
p00768
C++
#include<iostream> #include<vector> using namespace std; typedef pair<int,int> pii; typedef pair<pii,int> tri; int main(){ int m,t,p,r; int team[55][15]; while(cin>>m>>t>>p>>r,m){ memset(team,0,sizeof(team)); vector<tri> ans; int a,b,c,d; for(int i=0;i<r;i++){ cin>>a>>b>>c>>d; if(d!=0...
a.cc: In function 'int main()': a.cc:11:5: error: 'memset' was not declared in this scope 11 | memset(team,0,sizeof(team)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<vector> +++ |+#include <cstring> ...
s479230634
p00768
C++
#include<iostream> #include<vector> using namespace std; typedef pair<int,int> pii; typedef pair<pii,int> tri; int main(){ int m,t,p,r; int team[55][15]; while(cin>>m>>t>>p>>r,m){ memset(team,0,sizeof(team)); vector<tri> ans; int a,b,c,d; for(int i=0;i<r;i++){ cin>>a>>b>>c>>d; if(d!=0...
a.cc: In function 'int main()': a.cc:11:5: error: 'memset' was not declared in this scope 11 | memset(team,0,sizeof(team)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<vector> +++ |+#include <cstring> ...
s196760869
p00768
C++
#include<iostream> #include<vector> #include<algorithm> using namespace std; typedef pair<int,int> pii; typedef pair<pii,int> tri; int main(){ int m,t,p,r; int team[55][15]; while(cin>>m>>t>>p>>r,m){ memset(team,0,sizeof(team)); vector<tri> ans; int a,b,c,d; for(int i=0;i<r;i++){ cin>>a>>b>...
a.cc: In function 'int main()': a.cc:12:5: error: 'memset' was not declared in this scope 12 | memset(team,0,sizeof(team)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include<algorithm> +++ |+#include <cstring> ...
s705128750
p00768
C++
300 10 8 5 50 5 2 1 70 5 2 0 75 1 1 0 100 3 1 0 150 3 2 0 240 5 5 7 50 1 1 0 60 2 2 0 70 2 3 0 90 1 3 0 120 3 5 0 140 4 1 0 150 2 4 1 180 3 5 4 15 2 2 1 20 2 2 1 25 2 2 0 60 1 1 0 120 5 5 4 15 5 4 1 20 5 4 0 40 1 1 0 40 2 2 0 120 2 3 4 30 1 1 0 40 2 1 0 50 2 2 0 60 1 2 0 120 3 3 2 0 1 1 0 1 2 2 0 300 5 8 0 0 0 0 0
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 300 10 8 5 | ^~~
s810455133
p00768
C++
#include<iostream> #include<vector> #include<algorithm> using namespace std; int m,t,p,r; struct team{ int id; int ac; int time[100]; bool ok[200]; }; int or(team a,team b){//aのほうが強ければ1,bなら0,同じなら2 if(a.ac>b.ac)return 1; else if(a.ac<b.ac)return 0; int at=0,bt=0; for(int i=0;i<=p;i++){ if(a.ok[i]==true)at+=a.time[i]; ...
a.cc:12:5: error: expected unqualified-id before 'or' token 12 | int or(team a,team b){//aのほうが強ければ1,bなら0,同じなら2 | ^~ a.cc: In function 'int main()': a.cc:50:12: error: expected primary-expression before 'or' token 50 | if(or(ta[i],ta[j])==1)swap(ta[i],ta[j]); | ^~ a.cc:50:19: war...
s334871964
p00768
C++
#include<iostream> #include<vector> #include<algorithm> using namespace std; int m,t,p,r; struct team{ int id=0; int ac=0; int time[100]; bool ok[200]; }; int or(team a,team b){//aのほうが強ければ1,bなら0,同じなら2 if(a.ac>b.ac)return 1; else if(a.ac<b.ac)return 0; int at=0,bt=0; for(int i=0;i<=p;i++){ if(a.ok[i]==true)at+=a.time[...
a.cc:12:5: error: expected unqualified-id before 'or' token 12 | int or(team a,team b){//aのほうが強ければ1,bなら0,同じなら2 | ^~ a.cc: In function 'int main()': a.cc:50:12: error: expected primary-expression before 'or' token 50 | if(or(ta[i],ta[j])==1)swap(ta[i],ta[j]); | ^~ a.cc:50:19: war...
s002438033
p00768
C++
#include<iostream> #include<vector> #include<algorithm> using namespace std; struct team{ int id; int ac; int time[100]; bool ok[200]; }; int m,t,p,r; int or(team a,team b){//aのほうが強ければ1,bなら0,同じなら2 if(a.ac>b.ac)return 1; else if(a.ac<b.ac)return 0; int at=0,bt=0; for(int i=0;i<=p;i++){ if(a.ok[i]==true)at+=a.time[i]; ...
a.cc:12:5: error: expected unqualified-id before 'or' token 12 | int or(team a,team b){//aのほうが強ければ1,bなら0,同じなら2 | ^~ a.cc: In function 'int main()': a.cc:50:12: error: expected primary-expression before 'or' token 50 | if(or(ta[i],ta[j])==1)swap(ta[i],ta[j]); | ^~ a.cc:50:19: war...
s197164866
p00768
C++
#include<iostream> #include<vector> #include<algorithm> using namespace std; struct team{ int id; int ac; int time[100]; bool ok[200]; }; int m,t,p,r; int or(team a,team b){//aのほうが強ければ1,bなら0,同じなら2 if(a.ac>b.ac)return 1; else if(a.ac<b.ac)return 0; int at=0,bt=0; for(int i=0;i<=p;i++){ if(a.ok[i]==true)at+=a.time[i]; ...
a.cc:12:5: error: expected unqualified-id before 'or' token 12 | int or(team a,team b){//aのほうが強ければ1,bなら0,同じなら2 | ^~ a.cc: In function 'int main()': a.cc:50:12: error: expected primary-expression before 'or' token 50 | if(or(ta[i],ta[j])==1)swap(ta[i],ta[j]); | ^~ a.cc:50:19: war...
s969153264
p00768
C++
#include<iostream> #include<vector> #include<algorithm> using namespace std; int m,t,p,r; struct team{ int id; int ac; int time[100]; bool ok[200]; }; int or(team a,team b){//aのほうが強ければ1,bなら0,同じなら2 if(a.ac>b.ac)return 1; else if(a.ac<b.ac)return 0; int at=0,bt=0; for(int i=0;i<=p;i++){ if(a.ok[i]==true)at+=a.time[i]; ...
a.cc:13:5: error: expected unqualified-id before 'or' token 13 | int or(team a,team b){//aのほうが強ければ1,bなら0,同じなら2 | ^~ a.cc: In function 'int main()': a.cc:51:12: error: expected primary-expression before 'or' token 51 | if(or(ta[i],ta[j])==1)swap(ta[i],ta[j]); | ^~ a.cc:51:19: war...
s692413886
p00768
C++
#include<iostream> #include<vector> #include<algorithm> using namespace std; int m,t,p,r; struct team{ int id; int ac; int time[100]; bool ok[200]; };; int or(team a,team b){//aのほうが強ければ1,bなら0,同じなら2 if(a.ac>b.ac)return 1; else if(a.ac<b.ac)return 0; int at=0,bt=0; for(int i=0;i<=p;i++){ if(a.ok[i]==true)at+=a.time[i];...
a.cc:13:5: error: expected unqualified-id before 'or' token 13 | int or(team a,team b){//aのほうが強ければ1,bなら0,同じなら2 | ^~ a.cc: In function 'int main()': a.cc:51:12: error: expected primary-expression before 'or' token 51 | if(or(ta[i],ta[j])==1)swap(ta[i],ta[j]); | ^~ a.cc:51:19: war...
s862923797
p00768
C++
#include<iostream> #include<vector> #include<algorithm> using namespace std; int m,t,p,r; class team{ public: int id; int ac; int time[100]; bool ok[200]; }; int or(team a,team b){//aのほうが強ければ1,bなら0,同じなら2 if(a.ac>b.ac)return 1; else if(a.ac<b.ac)return 0; int at=0,bt=0; for(int i=0;i<=p;i++){ if(a.ok[i]==true)at+=a.ti...
a.cc:14:5: error: expected unqualified-id before 'or' token 14 | int or(team a,team b){//aのほうが強ければ1,bなら0,同じなら2 | ^~ a.cc: In function 'int main()': a.cc:52:12: error: expected primary-expression before 'or' token 52 | if(or(ta[i],ta[j])==1)swap(ta[i],ta[j]); | ^~ a.cc:52:19: war...
s556825676
p00768
C++
#include<iostream> #include<vector> #include<algorithm> #include<string> using namespace std; int m,t,p,r; class team{ public: int id; int ac; int time[200]; bool ok[200]; }; int or(team a,team b){//aのほうが強ければ1,bなら0,同じなら2 if(a.ac>b.ac)return 1; else if(a.ac<b.ac)return 0; int at=0,bt=0; for(int i=0;i<=p;i++){ if(a.ok[i...
a.cc:15:5: error: expected unqualified-id before 'or' token 15 | int or(team a,team b){//aのほうが強ければ1,bなら0,同じなら2 | ^~ a.cc: In function 'int main()': a.cc:52:12: error: expected primary-expression before 'or' token 52 | if(or(ta[i],ta[j])==1)swap(ta[i],ta[j]); | ^~ a.cc:52:19: war...
s474406543
p00768
C++
#include<iostream> #include<vector> #include<algorithm> #include<string> using namespace std; int m,t,p,r; struct team{ int time[200]; bool ok[200]; int id; int ac; }; int or(team a,team b){//aのほうが強ければ1,bなら0,同じなら2 if(a.ac>b.ac)return 1; else if(a.ac<b.ac)return 0; int at=0,bt=0; for(int i=0;i<=p;i++){ if(a.ok[i]==true...
a.cc:14:5: error: expected unqualified-id before 'or' token 14 | int or(team a,team b){//aのほうが強ければ1,bなら0,同じなら2 | ^~ a.cc: In function 'int main()': a.cc:51:12: error: expected primary-expression before 'or' token 51 | if(or(ta[i],ta[j])==1)swap(ta[i],ta[j]); | ^~ a.cc:51:19: war...
s686030956
p00768
C++
#include<iostream> #include<vector> #include<algorithm> #include<string> using namespace std; int m,t,p,r; struct team{ int time[200]; bool ok[200]; int id; int ac; }; //team a,team b int or(){//aのほうが強ければ1,bなら0,同じなら2 if(a.ac>b.ac)return 1; else if(a.ac<b.ac)return 0; int at=0,bt=0; for(int i=0;i<=p;i++){ if(a.ok[i]==tr...
a.cc:14:5: error: expected unqualified-id before 'or' token 14 | int or(){//aのほうが強ければ1,bなら0,同じなら2 | ^~ a.cc: In function 'int main()': a.cc:51:12: error: expected primary-expression before 'or' token 51 | if(or(ta[i],ta[j])==1)swap(ta[i],ta[j]); | ^~ a.cc:51:19: warning: ignorin...
s000728374
p00768
C++
#include<stdio.h> int main(){ int M,T,P,R; while(1){ scanf("%d%d%d%d",&M,&T,&P,&R); if(M==0&&T==0&&P==0&&R==0)break; int n[51][11][2]={};int n2[51][11]={}; int m,t,p,j; for(int i=0;i<R;i++) { scanf("%d%d%d%d",&m,&t,&p,&j); if(j==0){n[t][p]+=m;n2[t][p]=1;} else{n[t][p]+=20;} } int N[51][3]={}; for(int i=1;i<=T;i++...
a.cc: In function 'int main()': a.cc:17:17: error: incompatible types in assignment of 'int' to 'int [2]' 17 | if(j==0){n[t][p]+=m;n2[t][p]=1;} | ~~~~~~~^~~ a.cc:18:13: error: incompatible types in assignment of 'int' to 'int [2]' 18 | else{n[t][p]+=20;} | ~~~~~~~^~~~ a.cc:25:8: error: i...
s478012490
p00768
C++
#include <algorithm> #include <cmath> #include <climits> #include <cstdio> #include <cstdlib> #include <cstring> #include <fstream> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> #include <cassert> using namespa...
In file included from /usr/include/c++/14/bits/stl_algobase.h:71, from /usr/include/c++/14/algorithm:60, from a.cc:1: /usr/include/c++/14/bits/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::__ops::_Iter_less_iter::operator()(_Iterator1, _Iterator2) const [with _Iterat...
s282943287
p00768
C++
#include <cstring> #include <iostream> #include <algorithm> #include <utility> using namespace std; typedef pair<int, int> PII; int WA[10][50]; int main() { int M, T, P, R; while (cin>>M>>T>>P>>R, M||T||P||R) { memset(WA, 0, sizeof(WA)); vector<pair<PII, int>> score(T); for (int i=0; i<T; i++) { ...
a.cc: In function 'int main()': a.cc:16:5: error: 'vector' was not declared in this scope 16 | vector<pair<PII, int>> score(T); | ^~~~~~ a.cc:5:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' 4 | #include <utility> +++ |+#include <vec...
s733066091
p00768
C++
#include<iostream> //#include<fstream> #include<vector> using namespace std; int main(){ ifstream fin; fin.open("input.txt"); int M, T, P, R;//input int m, t, p, j;//input int time[50]; //経過時間 int solve[50]; //正解数 int miss[50][10]; //間違えた数 int count; vector<int> v,s;//解けた問題数ごとに... while(true){ for (...
a.cc: In function 'int main()': a.cc:9:18: error: aggregate 'std::ifstream fin' has incomplete type and cannot be defined 9 | ifstream fin; | ^~~ a.cc:4:1: note: 'std::ifstream' is defined in header '<fstream>'; this is probably fixable by adding '#include <fstream>' 3 | #include<...
s941159263
p00768
C++
#include <bits/stdc++.h> using namespace std; int main(void){ int M,T,P,R,m,t,p,j; while(cin>>M>>T>>P>>R, M|T|P|R){ int cnt[51]={}; int time[51]={}; int penalty[51][11]={}; int s[51]={}; /*????????¨??????????????£????¨????*/ while(R--){ cin>>m>>t>>p...
a.cc: In function 'int main()': a.cc:32:25: error: no matching function for call to 'swap(int*, int*)' 32 | swap(&s[b],&s[b-1]); | ~~~~^~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/bits/stl_pair.h:61, from /usr/include/c++/14/bits/stl_algobas...
s777314904
p00768
C++
#include<iostream> #include<string> using namespace std; bool solved[50][10]; int time[50][10]; int anstime[50]; int main(){ int m,t,p,r; int a[4]; while(true){ cin>>m>>t>>p>>r; if(m==0&&t==0&&p==0&&r==0) break; for(int i=0;i<t;i++){ anstime[i]=0; for(int j=0;j<p;j++){ solved[i][j]=false; time...
a.cc:5:16: error: 'int time [50][10]' redeclared as different kind of entity 5 | int time[50][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...
s895345444
p00768
C++
#include<iostream> #include<string> using namespace std; bool solved[10000][100]; long long time[10000][100]; long long anstime[10000]; int main(){ int m,t,p,r; while(true){ cin>>m>>t>>p>>r; if(m==0&&t==0&&p==0&&r==0) break; for(int i=0;i<t;i++){ anstime[i]=0; for(int j=0;j<p;j++){ solved[i][j]=fal...
a.cc:5:26: error: 'long long int time [10000][100]' redeclared as different kind of entity 5 | long long time[10000][100]; | ^ 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...
s410586134
p00768
C++
int M, T, P, R; cin >> M >> T >> P >> R; vector<Team> teams(T, Team(P)); for (int i = 0; i < T; ++i) { teams[i].num = i + 1; } for (int i = 0; i < R; ++i) { int m, t, p, j; cin >> m >> t >> p >> j; // judge is incorrect. if (j != 0) { teams[t - 1].incorrects[p - 1]++; continue; } // judg...
a.cc:3:9: error: 'cin' does not name a type 3 | cin >> M >> T >> P >> R; | ^~~ a.cc:5:9: error: 'vector' does not name a type 5 | vector<Team> teams(T, Team(P)); | ^~~~~~ a.cc:7:9: error: expected unqualified-id before 'for' 7 | for (int i = 0; i < T; ++i)...
s988463988
p00768
C++
int M, T, P, R; cin >> M >> T >> P >> R; vector<Team> teams(T, Team(P)); for (int i = 0; i < T; ++i) { teams[i].num = i + 1; } for (int i = 0; i < R; ++i) { int m, t, p, j; cin >> m >> t >> p >> j; // judge is incorrect. if (j != 0) { teams[t - 1].incorrects[p - 1]++; continue; } // judg...
a.cc:3:9: error: 'cin' does not name a type 3 | cin >> M >> T >> P >> R; | ^~~ a.cc:5:9: error: 'vector' does not name a type 5 | vector<Team> teams(T, Team(P)); | ^~~~~~ a.cc:7:9: error: expected unqualified-id before 'for' 7 | for (int i = 0; i < T; ++i)...
s056761990
p00768
C++
int M, T, P, R; cin >> M >> T >> P >> R; vector<Team> teams(T, Team(P)); for (int i = 0; i < T; ++i) { teams[i].num = i + 1; } for (int i = 0; i < R; ++i) { int m, t, p, j; cin >> m >> t >> p >> j; // judge is incorrect. if (j != 0) { teams[t - 1].incorrects[p - 1]++; continue; } // judg...
a.cc:3:9: error: 'cin' does not name a type 3 | cin >> M >> T >> P >> R; | ^~~ a.cc:5:9: error: 'vector' does not name a type 5 | vector<Team> teams(T, Team(P)); | ^~~~~~ a.cc:7:9: error: expected unqualified-id before 'for' 7 | for (int i = 0; i < T; ++i)...
s377840676
p00768
C++
#include <iostream> #include <iomanip> #include <vector> #include <queue> #include <stack> #include <map> #include <set> #include <cmath> #include <cstdio> #include <cstdlib> #include <functional> #include <string> #include <algorithm> #include <string> #include <climits> #include <utility> #define REP(i, n) for (int ...
a.cc: In function 'int main()': a.cc:37:98: error: no matching function for call to 'std::vector<std::vector<std::pair<int, int> > >::vector(int&, std::vector<std::pair<bool, int> >)' 37 | vector<vector<pair<int,int>>> team(T,vector<pair<bool,int>>(P,make_pair(false,0)));//first is the number of prob...
s405936771
p00768
C++
#include<iostream> using namespace std; const int INF=5000000; int data[51][12]; int main(){ int M,T,P,R; while(cin>>M>>T>>P>>R && M){ fill((int*)data,(int*)(data+12),0); for(int i=0;i<R;i++){ int m,t,p,j; cin>>m>>t>>p>>j; if(j==0){ data[t][0]++; data[t][11]+=m+data[t][p]*20; } else data...
a.cc: In function 'int main()': a.cc:11:28: error: reference to 'data' is ambiguous 11 | fill((int*)data,(int*)(data+12),0); | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s364347000
p00768
C++
#include<iostream> using namespace std; const int INF=5000000; int data[51][12]; int main(){ int M,T,P,R; while(cin>>M>>T>>P>>R && M){ fill((int*)data,(int*)(data+12),0); for(int i=0;i<R;i++){ int m,t,p,j; cin>>m>>t>>p>>j; if(j==0){ data[t][0]++; data[t][11]+=m+data[t][p]*20; } else data...
a.cc: In function 'int main()': a.cc:11:28: error: reference to 'data' is ambiguous 11 | fill((int*)data,(int*)(data+12),0); | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s691328794
p00768
C++
#include<iostream> using namespace std; const int INF=5000000; int data[51][12]; int main(){ int M,T,P,R; while(cin>>M>>T>>P>>R && M){ fill((int*)data,(int*)(data+12),0); for(int i=0;i<R;i++){ int m,t,p,j; cin>>m>>t>>p>>j; if(j==0){ data[t][0]++; data[t][11]+=m+data[t][p]*20; } else data...
a.cc: In function 'int main()': a.cc:11:28: error: reference to 'data' is ambiguous 11 | fill((int*)data,(int*)(data+12),0); | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s719509244
p00768
C++
#include<iostream> using namespace std; const int INF=5000000; int data[51][12]; int main(){ int M,T,P,R; while(cin>>M>>T>>P>>R && M){ fill((int*)data,(int*)(data+12),0); for(int i=0;i<R;i++){ int m,t,p,j; cin>>m>>t>>p>>j; if(j==0){ data[t][0]++; data[t][11]+=m+data[t][p]*20; } else data...
a.cc: In function 'int main()': a.cc:11:28: error: reference to 'data' is ambiguous 11 | fill((int*)data,(int*)(data+12),0); | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s326867347
p00768
C++
#include<iostream> using namespace std; const int INF=50000000; int data[51][12]; int main(){ int M,T,P,R; while(cin>>M>>T>>P>>R && M){ fill((int*)data,(int*)(data+12),0); for(int i=0;i<R;i++){ int m,t,p,j; cin>>m>>t>>p>>j; if(j==0){ data[t][0]++; data[t][11]+=m+data[t][p]*20; } else dat...
a.cc: In function 'int main()': a.cc:11:28: error: reference to 'data' is ambiguous 11 | fill((int*)data,(int*)(data+12),0); | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s823496637
p00768
C++
#include<iostream> using namespace std; const int INF=50000000; int data[51][12]; int main(){ int M,T,P,R; while(cin>>M>>T>>P>>R && M){ fill((int*)data,(int*)(data+12),0); for(int i=0;i<R;i++){ int m,t,p,j; cin>>m>>t>>p>>j; if(j==0){ data[t][0]++; data[t][11]+=m+data[t][p]*20; } else dat...
a.cc: In function 'int main()': a.cc:11:28: error: reference to 'data' is ambiguous 11 | fill((int*)data,(int*)(data+12),0); | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s762044708
p00768
C++
#include <iostream> #include <queue> #include <tuple> #include <map> #include <set> using namespace std; #define rep(i,n) for(int i = 0; i < n; i++) struct Team { int no, time; map<int, int> wa; set<int> ac; Team() : time(0) {} bool operator < (Team &other) { if (ac.size() == other.ac.size()) { if (time ==...
a.cc: In function 'int main()': a.cc:49:17: error: 'sort' was not declared in this scope; did you mean 'short'? 49 | sort(teams.begin(), teams.end()); | ^~~~ | short a.cc:50:17: error: 'reverse' was not declared in this scope 50 | reverse...
s110824720
p00768
C++
#include <iostream> #include <queue> #include <tuple> #include <map> #include <set> using namespace std; #define rep(i,n) for(int i = 0; i < n; i++) struct Team { int no, time; map<int, int> wa; set<int> ac; Team() : time(0) {} bool operator < (const Team &other) { if (ac.size() == other.ac.size()) { if (t...
a.cc: In function 'int main()': a.cc:49:17: error: 'sort' was not declared in this scope; did you mean 'short'? 49 | sort(teams.begin(), teams.end()); | ^~~~ | short a.cc:50:17: error: 'reverse' was not declared in this scope 50 | reverse...
s588303703
p00768
C++
#include <iostream> #include <queue> #include <tuple> #include <map> #include <set> using namespace std; #define rep(i,n) for(int i = 0; i < n; i++) struct Team { int no, time; map<int, int> wa; set<int> ac; Team() : time(0) {} bool operator < (const Team &other) { if (ac.size() == other.ac.size()) { if (t...
a.cc: In function 'int main()': a.cc:49:17: error: 'sort' was not declared in this scope; did you mean 'short'? 49 | sort(teams.begin(), teams.end()); | ^~~~ | short a.cc:50:17: error: 'reverse' was not declared in this scope 50 | reverse...
s377282582
p00768
C++
#include<iostream> #include<queue> #include<string> #include<stack> #include<cstdio> #include<algorithm> using namespace std; int main(void) { int m,t,p,r; int i,j; int mi,ti,pi,ji; int rank[55][2]=0; int miss[55][10]={}; int max[10][50]={}; int num[10]={}; while(1){ cin>>m>>t>>p>>r; if(r==0)...
a.cc: In function 'int main()': a.cc:15:19: error: array must be initialized with a brace-enclosed initializer 15 | int rank[55][2]=0; | ^ a.cc:43:30: error: expected ')' before '}' token 43 | if(rank[max[i][j]][0] | ~ ^ | ...
s596598455
p00768
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) #define REP(i, s, n) for (int i = (s); i < (n); i++) #define all(co) begin(co), end(co) int main() { int m,t,p,r; while (cin >> m >> t >> p >> r && m) { vector<vector<int>> v(t, vector<int>(p)); rep(i, r) { int m, t, p,...
a.cc: In function 'int main()': a.cc:19:26: error: no 'operator--(int)' declared for postfix '--' [-fpermissive] 19 | else v[t]--; a.cc:24:40: error: 'class std::map<int, std::vector<int> >' has no member named 'push_back' 24 | if(rank.count(s)) rank.push_back(i + 1); | ...
s620409510
p00768
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) #define REP(i, s, n) for (int i = (s); i < (n); i++) #define all(co) begin(co), end(co) int main() { int m,t,p,r; while (cin >> m >> t >> p >> r && m) { vector<vector<int>> v(t, vector<int>(p)); rep(i, r) { int m, t, p,...
a.cc: In function 'int main()': a.cc:19:26: error: no 'operator--(int)' declared for postfix '--' [-fpermissive] 19 | else v[t]--; a.cc:24:40: error: 'class std::map<int, std::vector<int> >' has no member named 'push_back' 24 | if(rank.count(s)) rank.push_back(i + 1); | ...
s221658406
p00768
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) #define REP(i, s, n) for (int i = (s); i < (n); i++) #define all(co) begin(co), end(co) int main() { int m,t,p,r; while (cin >> m >> t >> p >> r && m) { vector<vector<int>> v(t, vector<int>(p)); rep(i, r) { int m, t, p,...
a.cc: In function 'int main()': a.cc:24:40: error: 'class std::map<int, std::vector<int> >' has no member named 'push_back' 24 | if(rank.count(s)) rank.push_back(i + 1); | ^~~~~~~~~ a.cc:25:33: error: no matching function for call to 'std::map<int, std::ve...
s004303551
p00768
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) #define REP(i, s, n) for (int i = (s); i < (n); i++) #define all(co) begin(co), end(co) int main() { int m,t,p,r; while (cin >> m >> t >> p >> r && m) { vector<vector<int>> v(t, vector<int>(p)); rep(i, r) { int m, t, p,...
a.cc: In function 'int main()': a.cc:25:33: error: no matching function for call to 'std::map<int, std::vector<int> >::insert(int&, std::vector<int>)' 25 | else rank.insert(s, vector<int>{i+1}); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/ma...
s612429953
p00768
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) #define REP(i, s, n) for (int i = (s); i < (n); i++) #define all(co) begin(co), end(co) int main() { int m,t,p,r; while (cin >> m >> t >> p >> r && m) { vector<vector<int>> v(t, vector<int>(p)); rep(i, r) { int m, t, p,...
a.cc: In function 'int main()': a.cc:28:28: error: 'struct std::pair<const int, std::vector<int> >' has no member named 'size' 28 | rep(i, it->size() - 1) cout << it->at(i) << '='; | ^~~~ a.cc:4:40: note: in definition of macro 'rep' 4 | #define rep(i, n) for (int...
s267742171
p00768
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) #define REP(i, s, n) for (int i = (s); i < (n); i++) #define all(co) begin(co), end(co) int main() { int m,t,p,r; while (cin >> m >> t >> p >> r && m) { vector<vector<int>> v(t, vector<int>(p)); rep(i, r) { int m, t, p,...
a.cc: In function 'int main()': a.cc:40:2: error: expected '}' at end of input 40 | } | ^ a.cc:8:12: note: to match this '{' 8 | int main() { | ^
s417735774
p00768
C++
#include<iostream> #include<string> #include<cstdio> #include<algorithm> #include<stack> #include<queue> #include<vector> #include<cmath> #include<utility> #include<set> #include<complex> #include<map> #define vi vector<int> #define vvi vector<vector<int> > #define ll long long int #define vl vector<ll> #define vvl vec...
a.cc: In function 'int main()': a.cc:41:16: error: template argument 1 is invalid 41 | vector<data>v; | ^ a.cc:41:16: error: template argument 2 is invalid a.cc:45:9: error: reference to 'data' is ambiguous 45 | data temp; | ^~~~ In file included from /usr/include/c+...
s019243692
p00768
C++
#include<iostream> #include<cstdio> #include<algorithm> #include<cmath> #include<vector> #include<map> #include<string> using namespace std; struct team{int m; int t; int p; int j; }; int A[100000]; vector<int>G; int main(){ int M,T,P,R; vect...
a.cc: In function 'int main()': a.cc:46:28: error: expected ';' before '}' token 46 | printf("=") | ^ | ; 47 | } | ~ a.cc:49:28: error: expected ';' before '}' token 49 | p...
s703291486
p00768
C++
#include <iostream> #define REP(i, a, n) for(int i = (a); i <= (n); i++) using namespace std; typedef pair<int, int> PII; int M, T, P, R, m, t, p, j, q[51][11]; PII s[51]; int main(void) { while(cin >> M >> T >> P >> R, M || T || P || R) { REP(i, 1, T) { s[i] = PII(P, 0); REP(j, 1, P) q[i][j] = 0; ...
a.cc: In function 'int main()': a.cc:32:5: error: 'sort' was not declared in this scope; did you mean 'short'? 32 | sort(s + 1, s + T + 1); | ^~~~ | short
s418897786
p00768
C++
#include <iostream> #include <cstdio> #include <vector> #include <queue> #include <stack> #include <map> #include <string> #include <algorithm> using namespace std; struct Team { Team(int team_number) { tn_ = team_number; n_ = 0; t_ = 0; pc_ = 0; } int tn_; int n_; ...
a.cc: In function 'int main(int, char**)': a.cc:87:12: error: expected '(' before 'cout' 87 | if cout<<endl; | ^~~~ | (
s255032063
p00768
C++
#include<iostream> using namespace std; int main(){ while(1){ int M,T,P,R; cin>>M>>T>>P>>R; if(M==0&&T==0&&P==0&&R==0) break; int CP[50],TT[50],PT[50][10]; for(int i=0;i<R;i++){ CP[i]==TT[i]=0; for(int j=0;j<P;j++){ PT[i][j]=0; } } for(int i=0;i<R;i++){ int m,t,p,j; cin>>m>>t>>p...
a.cc: In function 'int main()': a.cc:14:30: error: lvalue required as left operand of assignment 14 | CP[i]==TT[i]=0; | ~~~~~^~~~~~~ a.cc:49:44: error: 'CO' was not declared in this scope; did you mean 'CP'? 49 | if(CO[j...
s535371115
p00768
C++
a#include <iostream> using namespace std; int main() { while(true){ int M, T, P, R; cin >> M >> T >> P >> R; if(M==0 && T==0 && P==0 && R==0) break; int CP[50], TT[50], PT[50][10]; for(int i=0; i<T; i++){ CP[i] = TT[i] = 0; for(int j=...
a.cc:1:2: error: stray '#' in program 1 | a#include <iostream> | ^ a.cc:1:1: error: 'a' does not name a type 1 | a#include <iostream> | ^ a.cc: In function 'int main()': a.cc:8:9: error: 'cin' was not declared in this scope 8 | cin >> M >> T >> P >> R; | ^~~ a.cc:56:21: er...
s164045716
p00768
C++
#include<iostream> using namespace std; int main(){ while(true){ int M,T,P,R; cin>>M>>T>>P>>R; if(M==0&&T==0&&P==0&&R==0) break; int CP[50],YY[50],PT[50][10]; for(int i=0;i<T;i++){ CP[i]=TT[i]=0; for(int j=0;j<P;j++) PT[i][j]=0; } for(int i=0;i<R;i++){ q int m,t,p,j; cin>>m>>t>>p>>j; ...
a.cc: In function 'int main()': a.cc:12:31: error: 'TT' was not declared in this scope; did you mean 'PT'? 12 | CP[i]=TT[i]=0; | ^~ | PT a.cc:17:1: error: 'q' was not declared in this scope 17 | q ...
s254748629
p00768
C++
#include<iostream> using namespace std; int main(){ while(1){ int M,T,P,R; cin>>M>>T>>P>>R; if(M==0&&T==0&&P==0&&R==0) break; int CP[50],TT[50],PT[50][10]; for(int i=0;i<T;i++){ CP[i]=TT[i]=0; for(int j=0;j<P;j++){ PT[i][j]=0; } } for(int i=0;i<R;i++){ int m,t,p,j; cin>>m>>t>>p>...
a.cc: In function 'int main()': a.cc:56:39: error: 'tnoaw' was not declared in this scope; did you mean 'tnow'? 56 | if(CP[tnoaw]==CP[tpre]&&TT[tpre]==TT[tnow]){ | ^~~~~ | tnow
s180389496
p00768
C++
#include<iostream> using namespace std; int main(){ while(true){ int M,T,P,R; cin>>M>>T>>P>>R; if(M==0&&T==0&&P==0&&R==0) break; int CP[50],TT[50],PT[50][10]; for(int i=0;i<T;i++){ CP[i]=TT[i]=0; for(int j=0;j<P;j++) PT[i][j]=0; } for(int i=0;i<R;i++){ q int m,t,p,j; cin>>m>>t>>p>>j; ...
a.cc: In function 'int main()': a.cc:17:1: error: 'q' was not declared in this scope 17 | q int m,t,p,j; | ^ a.cc:18:30: error: 'm' was not declared in this scope 18 | cin>>m>>t>>p>>j; | ^ a.cc:18:33: error: 't' was not declare...
s383015130
p00768
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
s265273494
p00768
C++
#iniclude<iostream> using namespace std; int main(){ while(true){ int M, T, P, R; cin >> M >> T >> P >> R; if(M==0 && T==0 && P==0 && R==0) break; int CP[50], TT[50], PT[50][10]; for(int i=0; i<T; i++){ CP[i] = TT[i] = 0; for(int j=0; j<P; j++) PT[i][j] = 0; } for(int i=0; i<R; i++){...
a.cc:1:2: error: invalid preprocessing directive #iniclude; did you mean #include? 1 | #iniclude<iostream> | ^~~~~~~~ | include a.cc: In function 'int main()': a.cc:7:17: error: 'cin' was not declared in this scope 7 | cin >> M >> T >> P >> R; | ^~~ a.cc:1:1: ...
s290262994
p00768
C++
#include<iostream> using namespace std; int main(){ while(true){ int M, T, P, R; cin >> M >> T >> P >> R; if(M==0 && T==0 && P==0 && R==0) break; int CP[50], TT[50], PT[50][10]; for(int i=0; i<T; i++){ CP[i] = TT[i] = 0; for(int j=0; j<P; j++) PT[i][j] = 0; } for(int i=0; i<R; i++){ ...
a.cc: In function 'int main()': a.cc:23:28: error: 'j' was not declared in this scope 23 | if(j==0){ | ^ a.cc:25:53: error: invalid types 'int[int]' for array subscript 25 | TT[t-1] += (m+PT[t-1[p-1]); | ...
s881389785
p00768
C++
#include<iostream> using namespace std; int main(){ while(true){ int M, T, P, R; cin >> M >> T >> P >> R; if(M==0 && T==0 && P==0 && R==0) break; int CP[T], TT[T], PT[T][P]; //正解数、時間計、ペナルティ for(int i=0; i<T; i++){ CP[i] = TT[i] = 0; for(int j=0; j<P; j++){ PT[i][j] = 0; } } for(int i=0...
a.cc:54:15: warning: multi-character character constant [-Wmultichar] 54 | cout << ', '; | ^~~~ a.cc:66:1: error: expected declaration before '}' token 66 | } | ^
s007459672
p00768
C++
#include<iostream> using namespace std; int main(){ while(true){ int M, T, P, R; cin >> M >> T >> P >> R; if(M==0 && T==0 && P==0 && R==0) break; int CP[50], TT[50], PT[50][10]; //正解数、時間計、ペナルティ for(int i=0; i<T; i++){ CP[i] = TT[i] = 0; for(int j=0; j<P; j++){ PT[i][j] = 0; } } for(int...
a.cc: In function 'int main()': a.cc:54:18: error: expected ';' before '}' token 54 | cout << ',' | ^ | ; 55 | } | ~
s954440731
p00768
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
s182411911
p00768
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
s863185530
p00768
C++
a
a.cc:1:1: error: 'a' does not name a type 1 | a | ^
s321756673
p00768
C++
#include "iostream" #include "cstring" #include "vector" using namespace std; typedef struct res { int solve; int time; int id; static bool comp(const res& l, const res& r) { if(l.solve!=r.solve) return l.solve>r.solve; if(l.time!=r.time) return l.time<r.time; return l.id>r.id; } }res; int main(void) { ...
a.cc: In function 'int main()': a.cc:42:17: error: 'sort' was not declared in this scope; did you mean 'short'? 42 | sort(result,result+T,res::comp); | ^~~~ | short
s155341685
p00768
C++
#include <iostream> #include <vector> #include <algorithm> #include <functional> using namespace std; int main() { while (1) { int mm,m,tt,t,pp,p,rr,r; cin >> mm >> tt >> pp >> rr; struct Teem{ int judge[10] = {0}; }teem[50]; int sum[51] = {0}; int ans[51]...
a.cc: In function 'int main()': a.cc:78:17: error: expected primary-expression before 'else' 78 | else { | ^~~~
s478173890
p00768
C++
#include <iostream> #include <vector> using namespace std; const int MAX_T = 51; const int MAX_P = 11; typedef pair<int,int> PP; typedef pair<PP,int> P; int main(){ int m,t,p,r,team[MAX_T][MAX_P],judge[MAX_T][MAX_P]; int mi,ti,pi,ji,accnt[MAX_T]; while(cin >> m >> t >> p >> r , m + t + p + r){ vector<P> v; ...
a.cc: In function 'int main()': a.cc:38:5: error: 'sort' was not declared in this scope; did you mean 'short'? 38 | sort(v.begin(),v.end()); | ^~~~ | short
s558645030
p00768
C++
#include <iostream> #include <cstring> #include <vector> #include <map> using namespace std; struct agg{ int sol,tim,num; int wrg[11]; }; class ctr{ public: bool operator()(const agg& left,const agg& right)const{ if(left.sol == right.sol && left.tim == right.tim){ return left.num > right.num; } ...
a.cc: In function 'int main()': a.cc:48:5: error: 'sort' was not declared in this scope; did you mean 'short'? 48 | sort(info.begin()+1,info.end(),ctr()); | ^~~~ | short
s496420920
p00768
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; class team{ public: int num, ans, time; team(int n){ num = n; ans = time = 0; } bool operator<(const team &t2)const{ if (ans != t2.ans) return ans > t2.ans; else if (time != t2.time) return time < t2.time; else retur...
a.cc:23:1: error: extended character   is not valid in an identifier 23 | int main() | ^ a.cc:23:1: error: ISO C++ forbids declaration of 'int\U00003000main' with no type [-fpermissive] 23 | int main() | ^~~~~~~~~
s286187600
p00768
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; class team{ public: int num, ans, time; team(int n){ num = n; ans = time = 0; } bool operator<(const team &t2)const{ if (ans != t2.ans) return ans > t2.ans; else if (time != t2.time) return time < t2.time; else retur...
a.cc:23:1: error: extended character   is not valid in an identifier 23 | int main( ) | ^ a.cc:23:11: error: extended character   is not valid in an identifier 23 | int main( ) | ^ a.cc:23:10: error: expected constructor, destructor, or type conversion before '(' token 23 | int main( ) ...
s598952081
p00768
C++
#include <iostream> #include <vector> using namespace std; struct team{ int n, c, t, p; }; bool operator<(const team team1, const team team2){ bool rep; if(team1.c == team2.c){ rep = (team1.t == team2.t) ? team1.n > team2.n : team1.t < team2.t; }else{ rep = (team1.c > team2.c); } return rep; } int main(){ ...
a.cc: In function 'int main()': a.cc:39:17: error: 'sort' was not declared in this scope; did you mean 'short'? 39 | sort(teams.begin(), teams.end()); | ^~~~ | short
s431778134
p00769
Java
import java.io.*; import java.util.*; import java.lang.ArrayIndexOutOfBoundsException; import java.math.BigInteger; import topcoder.SRM660Div2.PrivateD2party; /** * @author yoshikyoto */ class Main { public static void main(String[] args) throws Exception{ BufferedReader br = new BufferedReader(new InputStreamRe...
Main.java:6: error: package topcoder.SRM660Div2 does not exist import topcoder.SRM660Div2.PrivateD2party; ^ 1 error
s483894832
p00769
Java
import java.util.*; public enum Main { _; Scanner sc = new Scanner(System.in); public static void main(String[] args) { _.run(); } void run() { int n = Integer.parseInt(sc.nextLine()); while(n-- > 0) { String str = sc.nextLine(); Parser p = new Parser(str); int res = p.get().need(); System...
Main.java:5: error: as of release 9, '_' is a keyword, and may not be used as an identifier _; ^ Main.java:10: error: as of release 9, '_' is a keyword, and may not be used as an identifier _.run(); ^ 2 errors
s491920127
p00769
C++
#include <iostream> #include <string> #include <vector> using namespace std; int n; string s; int p; int calc() { //cout << p << endl; vector<int> vec; while(1){ if(s[p] == '['){ p++; vec.push_back(calc()); //p++; } else if(s[p] == ']'){ sort(vec.begin(), vec.end()); i...
a.cc: In function 'int calc()': a.cc:22:7: error: 'sort' was not declared in this scope; did you mean 'short'? 22 | sort(vec.begin(), vec.end()); | ^~~~ | short
s439374508
p00769
C++
#include <iostream> #include <string> #include <vector> using namespace std; int n; string s; int p; int calc() { //cout << p << endl; vector<int> vec; while(1){ if(s[p] == '['){ p++; vec.push_back(calc()); //p++; } else if(s[p] == ']'){ sort(vec.begin(), vec.end()); i...
a.cc: In function 'int calc()': a.cc:22:7: error: 'sort' was not declared in this scope; did you mean 'short'? 22 | sort(vec.begin(), vec.end()); | ^~~~ | short
s279466310
p00769
C++
#include <iostream> #include <string> #include <vector> using namespace std; int n; string s; int p; int calc() { //cout << p << endl; vector<int> vec; while(1){ if(s[p] == '['){ p++; vec.push_back(calc()); //p++; } else if(s[p] == ']'){ sort(vec.begin(), vec.end()); i...
a.cc: In function 'int calc()': a.cc:22:7: error: 'sort' was not declared in this scope; did you mean 'short'? 22 | sort(vec.begin(), vec.end()); | ^~~~ | short
s193975685
p00769
C++
#define _CRT_SECURE_NO_WARNINGS #define _USE_MATH_DEFINES #include <iostream> #include <map> #include <set> #include <list> #include <cstdio> #include <cmath> #include <cstring> #include <string> #include <vector> #include <algorithm> #include <utility> #include <queue> #include <iomanip> #define SIZE 101 #define INF ...
a.cc:27:5: error: 'int index' redeclared as different kind of entity 27 | int index = 0; | ^~~~~ In file included from /usr/include/string.h:462, from /usr/include/c++/14/cstring:43, from a.cc:9: /usr/include/strings.h:50:20: note: previous declaration 'const char* index(c...
s400185277
p00769
C++
#define _CRT_SECURE_NO_WARNINGS #define _USE_MATH_DEFINES #include <iostream> #include <map> #include <set> #include <list> #include <cstdio> #include <cmath> #include <cstring> #include <string> #include <vector> #include <algorithm> #include <utility> #include <queue> #include <iomanip> #define SIZE 101 #define INF ...
a.cc:27:5: error: 'int index' redeclared as different kind of entity 27 | int index = 0; | ^~~~~ In file included from /usr/include/string.h:462, from /usr/include/c++/14/cstring:43, from a.cc:9: /usr/include/strings.h:50:20: note: previous declaration 'const char* index(c...