submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s915734905
p00445
C++
#include<iostream> #include<cstdio> using namespace std; int main(){ int n,JOI=0,IOI=0; char s[100000]; while(scanf("%s",s)!=EOF){ n=strlen(s); for(int i=0;i<n;i++){ if(s[i]=='J'){ if(s[i+1]=='O'){ if(s[i+2]=='I'){ JOI++; } } } else if(s[i]=='I'){ if(s[i+1]=='O'){ if(s[i...
a.cc: In function 'int main()': a.cc:8:7: error: 'strlen' was not declared in this scope 8 | n=strlen(s); | ^~~~~~ a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<cstdio> +++ |+#include <cstring> 3 | using name...
s154594915
p00445
C++
#include<iostream> #include<cstdio> using namespace std; int main(){ int n,JOI=0,IOI=0; char s[10000]; while(scanf("%s",s)!=EOF){ n=strlen(s); for(int i=0;i<n;i++){ if(s[i]=='J'){ if(s[i+1]=='O'){ if(s[i+2]=='I'){ JOI++; } } } else if(s[i]=='I'){ if(s[i+1]=='O'){ if(s[i+...
a.cc: In function 'int main()': a.cc:8:7: error: 'strlen' was not declared in this scope 8 | n=strlen(s); | ^~~~~~ a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<cstdio> +++ |+#include <cstring> 3 | using name...
s286667874
p00445
C++
#include<iostream> #include<string> using namespace std; const string IOI = "IOI"; const string JOI = "JOI"; int main(){ sring str; while(1){ cin >> str; if(str == EOF)break; int ioicnt = 0; int joicnt = 0; int len = str.length(); for(int i=0;i<len;i++){ if(str[i] == IOI[0]){ if(i+1 < l...
a.cc: In function 'int main()': a.cc:10:9: error: 'sring' was not declared in this scope 10 | sring str; | ^~~~~ a.cc:13:24: error: 'str' was not declared in this scope; did you mean 'std'? 13 | cin >> str; | ^~~ | std...
s129836990
p00445
C++
#include <iostream> #include <string> #include <cstdio> using namespace std; int main(){ int n ,cnt=0 ,cont=0; char s[10000]; while( cin >> s ){ n = strlen(s); for( int i=0 ; i<n ; i++ ){ if( s[i] == 'J' && s[i+1] == 'O' && s[i+2] == 'I' ){ cnt++; } if( s[i] == 'I' && s[i+1] == 'O' && s[i+...
a.cc: In function 'int main()': a.cc:9:7: error: 'strlen' was not declared in this scope 9 | n = strlen(s); | ^~~~~~ a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <cstdio> +++ |+#include <cstring> 4 | using nam...
s787177371
p00445
C++
#include <iostream> #include <string> #include <cstdio> using namespace std; int main(){ int n ,cnt=0 ,cont=0; char s[10000]; while( cin >> s ){ n = strlen(s); for( int i=0 ; i<n ; i++ ){ if( s[i] == 'J' && s[i+1] == 'O' && s[i+2] == 'I' ){ cnt++; } if( s[i] == 'I' && s[i+1] == 'O' && s[i+...
a.cc: In function 'int main()': a.cc:9:7: error: 'strlen' was not declared in this scope 9 | n = strlen(s); | ^~~~~~ a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <cstdio> +++ |+#include <cstring> 4 | using nam...
s853088983
p00445
C++
#include <iostream> #include <string> using namespace std; int main(){ int n ,cnt=0 ,cont=0; char s[10000]; while( cin >> s ){ n = strlen(s); for( int i=0 ; i<n ; i++ ){ if( s[i] == 'J' && s[i+1] == 'O' && s[i+2] == 'I' ){ cnt++; } if( s[i] == 'I' && s[i+1] == 'O' && s[i+2] == 'I' ){ ...
a.cc: In function 'int main()': a.cc:8:7: error: 'strlen' was not declared in this scope 8 | n = strlen(s); | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ |+#include <cstring> 2 | #includ...
s252895720
p00445
C++
#include <iostream> #include <algorithm> #include <string> #include <vector> #include <map> #include <sstream> #include <functional> #include <numeric> #include <cmath> #include <cstring> #include <queue> using namespace std; const int INF = 1 << 29; typedef pair<int, int> P; string n; int main(void) { while(cin >...
In file included from /usr/include/c++/14/bits/stl_algobase.h:71, 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...
s931884868
p00445
C++
import java.io.*; import java.util.*; class Main{ public static void main(String[] args){ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String line; int[] flag = new int['Z']; int oi = 0; try{ while(null!=(line = br.readLine())){ while((oi = line.indexOf("OI")) != -1){ ...
a.cc:1:1: error: 'import' does not name a type 1 | import java.io.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.util.*; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:5:11:...
s191082671
p00445
C++
#include <stdio.h> #include <iostream> #include <string> using namespace std; int main(){ char s[10000]; while(~scanf("%s",s)){ int length = strlen(s); int I,J; I=J=0; for(int i=0;i<length;i++){ if(i+2>=length) break; if(s[i]=='J'){ if(s[i+1]=='O'){ if(s[i+2]=='I') J++; } } if(s[i]=='...
a.cc: In function 'int main()': a.cc:8:30: error: 'strlen' was not declared in this scope 8 | int length = strlen(s); | ^~~~~~ a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <iostr...
s220542919
p00446
C
#include<stdio.h> #include<algorithm> using namespace std; int n,cardta[1000],cardha[1000]; int i,j,h,flg,flg1,flg2,ta,ha,temp; int ba,cntta,cntha; int main(void){ scanf("%d",&n); while(n!=0){ h=0; ta=0; ha=0; for(i=0;i<n;i++){ scanf("%d",&cardta[i]); } for(i=1;i<=n*2;i++){ //花子が持っているカード抽出 flg=0; ...
main.c:2:9: fatal error: algorithm: No such file or directory 2 | #include<algorithm> | ^~~~~~~~~~~ compilation terminated.
s266830587
p00446
C
#include<cstdio> #include<algorithm> #include<functional> using namespace std; int main() { while(1){ int n,x; int i,j; int tarou[110] = {0},hanako[110] = {0}; int field = 0; int flg1 = 0,flg2 = 0; scanf("%d",&n); if(n == 0) break; for(i = 0; i < n; i+...
main.c:1:9: fatal error: cstdio: No such file or directory 1 | #include<cstdio> | ^~~~~~~~ compilation terminated.
s663972255
p00446
C++
#include<iostream> using namespace std; int main(){ int n; while(cin >> n, n){ bool t[n+1], h[n+1]; int taro = n, hana = n; for(int i = 0; i < n+1; i++) t[i] = false; for(int i = 0; i < n; i++){ int x; cin >> x; t...
a.cc: In function 'int main()': a.cc:59:24: error: invalid types 'int[int]' for array subscript 59 | if(hana[i]) sum += i; | ^ a.cc:62:24: error: invalid types 'int[int]' for array subscript 62 | if(taro[i]) sum += i; | ^
s224208891
p00446
C++
#include <cstdio> int n, tn, hn, turn, card; bool t[201], h[201]; int main(){ while(scanf("%d", &n)){ if(n == 0) break; tn = n; hn = n; turn = 1; card = 0; for(int i = 1; i <= 200; i++){ t[i] = false; h[i] = false; } for(int i = 1; i <= n; i++){ int tmp; scanf("%d", &tmp); t[tmp] = true; } ...
a.cc: In function 'int main()': a.cc:48:59: error: expected ';' before ':' token 48 | ok = false: | ^ | ;
s582245385
p00446
C++
<cstdio> using namespace std; int card[256]; int main() { int n; while (scanf("%d", &n), n){ for (int i = 1; i < n * 2 + 1; i++){ card[i] = 2; } for (int i = 0; i < n; i++){ int pass; scanf("%d", &pass); card[pass] = 1; } ...
a.cc:1:2: error: expected unqualified-id before '<' token 1 | <cstdio> | ^ a.cc: In function 'int main()': a.cc:11:12: error: 'scanf' was not declared in this scope 11 | while (scanf("%d", &n), n){ | ^~~~~ a.cc:42:9: error: 'printf' was not declared in this scope 42 | prin...
s107409026
p00446
C++
#include<iostream> #include<vector> using namespace std; void elim(vector<int> *tmp,int cnt){ vector<int>::iterator ite=tmp->begin(); for(int i=0;i<cnt;i++){ ite++; } tmp->erase(ite); } int main(){ int n; while(cin>>n){ if(n==0)break; int tmp; vector<int> a,b; for(int i=0;i<n;i++){ ...
a.cc: In function 'int main()': a.cc:23:5: error: 'sort' was not declared in this scope; did you mean 'short'? 23 | sort(a.begin(),a.end()); | ^~~~ | short
s053042414
p00446
C++
#include <cstdio> #include <cstdlib> #include <iostream> #include <string> #include <cmath> #include <algorithm> #include <vector> #include <queue> #include <stack> #include <map> #include <set> using namespace std; void slove(int n){ int card[202]={0},no[2],in,ba=0,ban=1; no[0]=no[1]=n; f...
a.cc: In function 'int main()': a.cc:56:21: error: 'n' was not declared in this scope; did you mean 'yn'? 56 | scanf("%d",&n); | ^ | yn
s730212603
p00446
C++
#include <stdio.h> int main(void) { int n, i, top, buf, num, cou[2], turn, cards[2][100], bufcou, deglis[200]; while(scanf("%d", &n)){ if(n == 0)break; top = 0; cou[0] = n; cou[1] = n; turn = 1; bufcou = 0; memset(deglis, 0, sizeof(deglis)); for (i = 0; n > i; i++){ scanf("%d", &cards[0][i]); deg...
a.cc: In function 'int main()': a.cc:13:17: error: 'memset' was not declared in this scope 13 | memset(deglis, 0, sizeof(deglis)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <stdio....
s072063583
p00446
C++
#include<bits/stdc++.h> using namespace std; bool A[200],B[200]; int N; void change(bool *C,int &c,int &fld){ for(int i=fld+1;i<2*N;i++){ if(C[i]){ C[i]=false; c--; fld=i; return; } } fld=-1; } void solve(){ int a,b,fld=-1; a=b=N; f...
a.cc: In function 'void solve()': a.cc:27:12: error: 'i' was not declared in this scope 27 | if(i%2)change(B,b,fld); | ^
s062613393
p00446
C++
#include <iostream> using std::cin; using std::cout; int n; class mine { private: int a; public: mine(void){a=1;} int get{return a;} void change{a==1?a=2:a=1;} }; mine turn(); int main() { std::ios::sync_with_stdio(false); int c[200]; int s[2]; int ba; int cnt; while(cin>>n&&n!=0) { for(int i=...
a.cc:14:26: error: expected ';' at end of member declaration 14 | int get{return a;} | ^ | ; a.cc:15:14: error: variable or field 'change' declared void 15 | void change{a==1?a=2:a=1;} | ^~~~~~ a.cc:15:34: error: exp...
s897763562
p00446
C++
#include<stdio.h> #include<iostream> using namespace std; int main() { int a[101],b[101],s,i,w,y,j,m,d,t,n; cin>>n; while(n!=0){ for(i=0;i<n;i++){ cin>>a[i]; b[i]=0; } for(i=0;i<n-1;i++){ for(j=i;j<n;j++){ if(a[i]>a[j]){ s=a[i]; a[i]=a[j]; a[j]=s; } } } s=0; m=0; for(i=1;i<=2*n;i++){...
a.cc: In function 'int main()': a.cc:95:13: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 95 | cin<<n; | ~~~^~~ | | | | | int | std::istream {aka std::basic_istream<char>} a.cc:...
s285245931
p00446
C++
#include<stdio.h> #include<iostream> using namespace std; int main() { int a[101],b[101],s,i,w,y,j,m,d,t,n; cin>>n; while(n!=0){ for(i=0;i<n;i++){ cin>>a[i]; b[i]=0; } for(i=0;i<n-1;i++){ for(j=i;j<n;j++){ if(a[i]>a[j]){ s=a[i]; a[i]=a[j]; a[j]=s; } } } s=0; m=0; for(i=1;i<=2*n;i++){...
a.cc: In function 'int main()': a.cc:95:13: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 95 | cin<<n; | ~~~^~~ | | | | | int | std::istream {aka std::basic_istream<char>} a.cc:...
s624526166
p00446
C++
#include <iostream> #include <cstdio> #include <algorithm> #include <functional> #include <vector> #include <string> ?? #define rep(i,n) for(int i=0;i<n;i++) using namespace std; ?? vector<int> game(vector<int> t, vector<int> h, int n){ ?????????? ????????int turn = 1; //1=taro 0=hana ????????int field = 0, f; ???????...
a.cc:80:7: warning: trigraph ??/ ignored, use -trigraphs to enable [-Wtrigraphs] 80 | ????????//rep(i,n) cout << taro[i] << "\n"; a.cc:81:7: warning: trigraph ??/ ignored, use -trigraphs to enable [-Wtrigraphs] 81 | ????????//rep(i,n) cout << hana[i] << "\n"; a.cc:7:1: error: expected unqualified-id before '?' to...
s129933589
p00446
C++
#include <iostream> #include <cstdio> #include <algorithm> #include <functional> #include <vector> #include <string> ?? #define rep(i,n) for(int i=0;i<n;i++) using namespace std; ?? vector<int> game(vector<int> t, vector<int> h, int n){ ?????????? ????????int turn = 1; //1=taro 0=hana ????????int field = 0, f; ???????...
a.cc:80:7: warning: trigraph ??/ ignored, use -trigraphs to enable [-Wtrigraphs] 80 | ????????//rep(i,n) cout << taro[i] << "\n"; a.cc:81:7: warning: trigraph ??/ ignored, use -trigraphs to enable [-Wtrigraphs] 81 | ????????//rep(i,n) cout << hana[i] << "\n"; a.cc:7:1: error: expected unqualified-id before '?' to...
s973643510
p00446
C++
#include <iostream> #include <set> #include <algorithm> using namespace std; set<int> tro,hnk; set<int>::iterator it; int main(){ int N,hog,ba,ta,ha; while(1){ cin>>N; if(N==0) break; tro.clear(); hnk.clear(); for(int i=0;i<N;i++){ cin>>hog; tro.insert(hog); } for(int i=1;i<=N*2;i++){ if(tro.fi...
a.cc: In function 'int main()': a.cc:74:33: error: 'ya' was not declared in this scope; did you mean 'ha'? 74 | cout<<ha<<endl<<ya<<endl; | ^~ | ha
s924568722
p00446
C++
let rec solve() = let rec input = function | 0 -> [] | n -> Scanf.scanf "%d\n" (fun x -> x::input (n - 1)) in let rec ura i n = function | [] -> if i > n then [] else i::ura (i + 1) n [] | w::d as q -> if i = w then ura (i + 1) n d else i::ura (i + 1) n q in let rec last p l a b = let rec can...
a.cc:1:1: error: 'let' does not name a type 1 | let rec solve() = | ^~~ a.cc:32:13: error: expected constructor, destructor, or type conversion before 'end' 32 | solve() end | ^~~
s434931171
p00446
C++
#include <iostream> int main(){ cout << "????????´??????SEX???" << endl; return 0; }
a.cc: In function 'int main()': a.cc:4:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 4 | cout << "????????´??????SEX???" << endl; | ^~~~ | std::cout In file included from a.cc:1: /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cou...
s813701983
p00446
C++
#include <iostream> int cardnum; int main(){ cin >> cardnum; if (cardnum == 0)break; vector<int> taro(cardnum), hanako; vector<bool> check(cardnum * 2, false); for (int i = 0; i < cardnum; i++) { cin >> taro[i]; check[taro[i] - 1] = true; } cout << "????????´??????SEX???" << endl; return 0; }
a.cc: In function 'int main()': a.cc:5:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | cin >> cardnum; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to sta...
s084075049
p00446
C++
#include<iostream> using namespace std; int main(){ int n,card[201]={0},x,t,ba,i,cnt,c; while(1){ cin>>n; if(n==0) break; for(i=0;i<n;i++){ cin>>c; card[c]=1; } ba=0; t=0; x=0; cnt=0; while(1){ if(ba==0){ for(i=1;i<=2*n;i++){ if(card[i]==(t+1)%2){ ba=i; card[i]=2; break; } ...
a.cc: In function 'int main()': a.cc:78:2: error: expected '}' at end of input 78 | } | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s377659261
p00446
C++
#include <bits/stdc++.h> using namespace std; int n; int main() { while(cin >> n, n) { vector<vector<int> > a(2); a[0].resize(n); set<int> s; for(int i = 0; i < n; i++) cin >> a[i], s.insert(a[i]); for(int i = 1; i <= 2 * n; i++) { if(s.find(a[i]) == s.end()) b.push_back(i); } sort(a[0].begin(), a[0].en...
a.cc: In function 'int main()': a.cc:8:48: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and '__gnu_cxx::__alloc_traits<std::allocator<std::vector<int> >, std::vector<int> >::value_type' {aka 'std::vector<int>'}) 8 | for(int i = 0; i < n; i++) ci...
s626159737
p00446
C++
#include "bits/stdc++.h" using namespace std; int solve(set<int> s,int a){ for(auto it=s.begin();it!=s.end();it++){ if(a<*it) return *it; } return 0; } int calc(set<int> s){ int sum=0; for(auto it=s.begin();it!=s.end();it++) sum+=*it; return sum; } int main(){ set<int> s1,s2; bool f[201]; int n; while(1){ cin>>n; if(!n...
a.cc: In function 'int main()': a.cc:34:11: error: cannot convert 'std::set<int>::empty' from type 'bool (std::set<int>::)() const noexcept' to type 'bool' 34 | while(!s1.empty||!s2.empty){ | ^~~~~ a.cc:34:11: error: in argument to unary ! 34 | while(!s1.empty||!s2.empty){ | ~~~^~~~~ ...
s098182153
p00446
C++
#include "bits/stdc++.h" using namespace std; int solve(set<int> s,int a){ for(auto it=s.begin();it!=s.end();it++){ if(a<*it) return *it; } return 0; } int calc(set<int> s){ int sum=0; for(auto it=s.begin();it!=s.end();it++) sum+=*it; return sum; } int main(){ set<int> s1,s2; bool f[201]; int n; while(1){ cin>>n; if(!n...
a.cc: In function 'int main()': a.cc:34:11: error: cannot convert 'std::set<int>::empty' from type 'bool (std::set<int>::)() const noexcept' to type 'bool' 34 | while(!s1.empty||!s2.empty){ | ^~~~~ a.cc:34:11: error: in argument to unary ! 34 | while(!s1.empty||!s2.empty){ | ~~~^~~~~ ...
s905646931
p00446
C++
// // main.cpp #include <iostream> #include <vector> using namespace std; const int TARO = 0; const int HANAKO = 1; vector<int> card[2]; int n; int now=-1; int turn = TARO; //int hanakopoint,taropoint; void search(){ int Min = 10000; for(int i=0;i<card[turn].size();i++){ if(now < card[turn][i]){ Min = min(car...
a.cc: In function 'int main()': a.cc:60:17: error: 'sort' was not declared in this scope; did you mean 'short'? 60 | sort(card[TARO].begin(),card[TARO].end()); | ^~~~ | short
s592575706
p00446
C++
#include <iostream> #include <vector> #include <algorithm> int main(){ int N; std::vector<int> taro, hanako; std::cin >> N; if(N == 0){ break; } for(int i = 0; i < N; ++i){ int input; std::cin >> input; taro.push_back(input); } for(int i = 1; i <= N * 2; ++i){ if(std::find(taro.begin(), taro.end...
a.cc: In function 'int main()': a.cc:12:17: error: break statement not within loop or switch 12 | break; | ^~~~~
s126871174
p00446
C++
#include <iostream> #include <vector> #include <algorithm> int main(){ int N; std::vector<int> taro, hanako; std::cin >> N; if(N == 0){ break; } for(int i = 0; i < N; ++i){ int input; std::cin >> input; taro.push_back(input); } for(int i = 1; i <= N * 2; ++i){ if(std::find(taro.begin(), taro.end...
a.cc: In function 'int main()': a.cc:12:17: error: break statement not within loop or switch 12 | break; | ^~~~~
s819031879
p00446
C++
a
a.cc:1:1: error: 'a' does not name a type 1 | a | ^
s895336320
p00446
C++
a #include <iostream> #include <cstdio> #include <cstdlib> #include <cmath> #include <algorithm> #include <vector> #include <string> using namespace std; #define MAX 100000000 int n; int minFunc(int v[102], int k){ int i; for(i = 0;i < n;i++){ if(v[i] > k)break; } return i; } int main(){ int a[102], b[102]; w...
a.cc:1:1: error: 'a' does not name a type 1 | a | ^ In file included from /usr/include/c++/14/iosfwd:42, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:2: /usr/include/c++...
s950558986
p00446
C++
#include <iostream> using namespace std; ios::sync_with_stdio(false); int z[205], b; int main(void) { int n, i, x, m[2],t; while (1){ cin >> n; if (n == 0){ break; } for (i = 1; i <= 2 * n; i++){ z[i] = 1; } for (i = 1; i <= n; i++){ cin >> t; z[t] = 0; } m[0] = m[1] = n; x = 0; b = 0; ...
a.cc:3:1: error: specializing member 'std::basic_ios<char>::sync_with_stdio' requires 'template<>' syntax 3 | ios::sync_with_stdio(false); | ^~~
s617341996
p00446
C++
#include <iostream> #include <vector> using namespace std; int main() { int n; while(cin>>n,n){ vector<int> taro,hana; int num[201]; memset(num,0,sizeof(num)); for(int i=0; i<n; i++){ int a; cin>>a; num[a]=1; } for(int i=1; i<=2*n; i++){ if( num[i] )taro.push_back(i); else hana.push_b...
a.cc: In function 'int main()': a.cc:10:17: error: 'memset' was not declared in this scope 10 | memset(num,0,sizeof(num)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <vector> +++ ...
s786791447
p00446
C++
#include<iostream> #include<vector> using namespace std; int check_c(int arr[], int nc); int check_min(int arr[]); int n; int main() { for(;;){ int cont = 0, nowc, total = 0; int hcont, tcont; int temp; bool flg,nxflg, isgoto = 0; int arr[202]; cin >> n; if(n == 0){ break; } vector<int> t...
a.cc: In function 'int main()': a.cc:38:17: error: 'sort' was not declared in this scope; did you mean 'short'? 38 | sort(taro.begin(), taro.end()); | ^~~~ | short
s111379518
p00446
C++
#include<stdio.h> int main(){ while(1){ int n; scanf("%d",&n); if(n==0){ break; } int card[201]; for(int i=0;i<201;i++){ card[i]=0; } for(int i=1;i<=n;i++){ card[i]=2; } for(int i=0;i<n;i++){ int a; scanf("%d",&a); card[a]=1; } int turn=1; int now=0; while(1){ now++; if(now>n){ now=0; int con[3]={}; for(int i=1...
a.cc: In function 'int main()': a.cc:64:2: error: expected '}' at end of input 64 | } | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s404470715
p00446
C++
#include <iostream> #include <list> using namespace std; int main(void) { char flag[201] = {0}; int n; while (1){ list<int> lst_taro, lst_hana; memset(flag, 0, 201); cin >> n; if (n == 0){ break; } for (int i = 0; i < n; i++){ int c; cin >> c; lst_taro.push_back(c); flag[c] = 1; }...
a.cc: In function 'int main()': a.cc:13:17: error: 'memset' was not declared in this scope 13 | memset(flag, 0, 201); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <list> +++ |+#incl...
s226467975
p00446
C++
5 1 7 9 6 10 10 8 7 14 18 4 11 3 17 5 19 0
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 5 | ^
s049044381
p00446
C++
#include<iostream> #include<vector> using namespace std; int main(){ int n; vector<int> t,h; int tmp; int p,m; int i; while(1){ cin >> n; if(!n)break; t.clear(); for(i=0;i<n;i++){ cin >> tmp; t.push_back(tmp); } sort(t.begin(),t.end()); h.clear(); int j = 0; ...
a.cc: In function 'int main()': a.cc:21:5: error: 'sort' was not declared in this scope; did you mean 'short'? 21 | sort(t.begin(),t.end()); | ^~~~ | short
s803795250
p00446
C++
#include <iostream> using namespace std; const int TARO = 1, HANAKO = 2; int main() { for (;;) { int n; cin >> n; if (!n) return 0; int L[201]; fill(L, L+2*n+1, HANAKO); for (int i = 0; i < n; i++) { int x; cin >> x; L[x] = TARO; } int b = 0, t = n, h = n; for ...
a.cc: In function 'int main()': a.cc:21:20: error: no matching function for call to 'find(int*, int*, const int&)' 21 | int *p = find(L+1+b, L+2*n+1, s ? TARO : HANAKO); | ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/bits/locale_facets.h:48, ...
s423494484
p00446
C++
#include <iostream> #include <vector> #include <algorithm> #define REP(i,n) for(int i=0;i<n;++i) using namespace std; //タロー→ハナァコォ const int NONE = -1; int main(void) { while(1) { int n; vector<int> card[2]; cin >> n; if(n==0) return 0; int field=NONE;//今場に出ているカード int turn=0;//0:太郎,1:花子; bool a...
a.cc: In function 'int main()': a.cc:71:65: error: no matching function for call to 'std::vector<int>::erase(<unresolved overloaded function type>)' 71 | card[turn].erase(card[turn].begin); | ~~~~~~~~~~~~~~~~^~~~~~~...
s493858011
p00446
C++
#include<iostream> #include<vector> #include<algorithm> using namespace std; int main(){ int n; vector<int> taro,hanako; while(cin>>n,n){ int i,j; taro.clear(); hanako.clear(); for(i=0;i<n;i++){ int a; cin>>a; taro.push_back(a); } sort(taro.begin(),taro.end()); for(int i=1;i<=2*n;i++){ if(...
a.cc: In function 'int main()': a.cc:28:48: error: cannot convert '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' to 'int*' in assignment 28 | p = upper_bound(taro.begin(),taro.end(),card); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ...
s932784888
p00446
C++
#include <cstdio> #include <list> using namespace std; #define TARO 0 #define HANAKO 1 char search(list<char>& target, char num) { list<char>::iterator it = target.begin(); while (1) { if (it == target.end()) return 0; if (*it > num) { char ret = *it; target.erase(i...
a.cc: In function 'int main()': a.cc:27:9: error: 'vector' was not declared in this scope 27 | vector<bool> flag(200); | ^~~~~~ a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' 2 | #include <list> +++ |+#include <vector>...
s881944846
p00446
C++
#include <stdio.h> #include<math.h> #include <string.h> #include <ctype.h> int main(){ int n,i,j,a,suu1,suu2,ba,t; int tarou[100]; int hanako[100]; while(1){ scanf("%d",&n); if(n==0)break; for(i=0;i<n;i++)tarou[i]=0;hanako[i]=0; for(i=0;i<n;i++)scanf("%d",&tarou[i]); for(i=0;i<n;i++){ for(j=0;j<n-1;j++){ if(ratou[j]>...
a.cc: In function 'int main()': a.cc:18:4: error: 'ratou' was not declared in this scope 18 | if(ratou[j]>tarou[j+1]){ | ^~~~~
s353106086
p00446
C++
hanako++; } } int field=0; int fieldO=-1; int point[2]; point[0]=n; point[1]=n; while(point[0]!=0 && point[1]!=0){ for(int i=0;i<2;i++){ for(int j=0;j<n;j++){ if(player[i][j]>field){ field=player[i][j]; player[i][j]=-1; point[i]--; fieldO=i; ...
a.cc:1:9: error: 'hanako' does not name a type 1 | hanako++; | ^~~~~~ a.cc:2:7: error: expected declaration before '}' token 2 | } | ^ a.cc:3:5: error: expected declaration before '}' token 3 | } | ^ a.cc:7:5: error: 'point' does not name a type; did you...
s352999242
p00446
C++
#include<iostream> using namespace std; int n, Taro, Hanako, i, x, turn, card[201], field; int main(){ while(1){ cin >> n; if(!n){break;} Taro = n; Hanako = n; for(i=0;i<n;i++){ cin >> x; card[x] = 1; } for(i=1;i<=2*n;i++){ if(!card[i]){ card[i] = 2; } } turn = 1; while(Taro>0 && Hanako>0){ ...
a.cc:67:1: error: extended character   is not valid in an identifier 67 |     } | ^ a.cc:67:1: error: extended character   is not valid in an identifier a.cc:67:1: error: extended character   is not valid in an identifier a.cc:67:1: error: extended character   is not valid in an identifier a.cc: In function 'i...
s910476910
p00447
C
#include<stdio.h> #include<mpi.h> #include<stdlib.h> int main(int argc, char *argv[]) { int nmax, rank, np, *p, *data, *result; int start, end, tag = 0; double t0, t1; MPI_Request req0, req1; MPI_Status stat; int m,n,i,j,temp,x1[205],y1[205],x2[1010],y2[1010],count,sum,k; int difx,dify,range; MPI_In...
main.c:2:9: fatal error: mpi.h: No such file or directory 2 | #include<mpi.h> | ^~~~~~~ compilation terminated.
s902937677
p00447
C
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <math.h> int main(void) { int m, n; int *mx; mx = malloc(1000000); int *my; my = malloc(1000000); int *nx; nx = malloc(1000000); int *ny; ny = malloc(1000000); int mxmax = 0; int mymax = 0; int mxmin =...
main.c: In function 'main': main.c:58:30: error: expected ';' before '}' token 58 | nymin = ny[j] | ^ | ; 59 | } | ~
s332076782
p00447
C
#include <stdio.h> #include <stdlib.h> int x,y; int sx[200],sy[200],gx[1000],gy[1000],m,n,ss; void Ssort(){ int a,b,c; for(a=0;a<m-1;a++){ for(b=a;b<m;b++){ if(sy[a]>sy[b]){ c=sy[a]; sy[a]=sy[b]; sy[b]=c; c=sx[a]; sx[a]=sx[b]; sx[b]=c; } if(sy[a]==sy[b] && sx[a]>sx[b]){ c=sy[a]...
main.c:52:1: error: unknown type name 'bool' 52 | bool Scheck(int k){ | ^~~~ main.c:3:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>' 2 | #include <stdlib.h> +++ |+#include <stdbool.h> 3 | main.c: In function 'Scheck': main.c:56:32: error...
s639870907
p00447
C
#include <stdio.h> #include <stdlib.h> int x,y; int sx[200],sy[200],gx[1000],gy[1000],m,n,ss; void Ssort(){ int a,b,c; for(a=0;a<m-1;a++){ for(b=a;b<m;b++){ if(sy[a]>sy[b]){ c=sy[a]; sy[a]=sy[b]; sy[b]=c; c=sx[a]; sx[a]=sx[b]; sx[b]=c; } if(sy[a]==sy[b] && sx[a]>sx[b]){ c=sy[a]...
main.c:52:1: error: unknown type name 'bool' 52 | bool Scheck(int k){ | ^~~~ main.c:3:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>' 2 | #include <stdlib.h> +++ |+#include <stdbool.h> 3 | main.c: In function 'Scheck': main.c:56:32: error...
s462918420
p00447
C
#include <stdio.h> #include <stdlib.h> int x,y; int sx[200],sy[200],gx[1000],gy[1000],m,n,ss; void Ssort(){ int a,b,c; for(a=0;a<m-1;a++){ for(b=a;b<m;b++){ if(sy[a]>sy[b]){ c=sy[a]; sy[a]=sy[b]; sy[b]=c; c=sx[a]; sx[a]=sx[b]; sx[b]=c; } if(sy[a]==sy[b] && sx[a]>sx[b]){ c=sy[a]...
main.c:52:1: error: unknown type name 'bool' 52 | bool Scheck(int k){ | ^~~~ main.c:3:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>' 2 | #include <stdlib.h> +++ |+#include <stdbool.h> 3 | main.c:67:1: error: unknown type name 'bool' 6...
s009316742
p00447
C
#include<stdio.h>int a[200],b[200],c[1000],d[1000],n,m,i,j,k,t=0;int w,q; int main(){for(;;){scanf("%d",&n);if(n==0)break;for(i=0;i<n;i++){scanf("%d %d",&a[i],&b[i]);}scanf("%d",&m);for(i=0;i<m;i++){scanf("%d %d",&c[i],&d[i]);}for(i=0;i<m;i++){w=c[i]-a[0];q=d[i]-b[0];for(j=1;j<n;j++){for(k=0;k<m;k++){if(a[j]+w==c[k]){i...
main.c:1:18: warning: extra tokens at end of #include directive 1 | #include<stdio.h>int a[200],b[200],c[1000],d[1000],n,m,i,j,k,t=0;int w,q; | ^~~ main.c: In function 'main': main.c:2:32: error: 'n' undeclared (first use in this function) 2 | int main(){for(;;){scanf("%d",&n);if(n==0)bre...
s316075577
p00447
C
typedef for(int i=0;i<n;i++) r; a[200],b[200],c[1000],d[1000],n,m,i,j,k,t=0,w,q;main(){for(;;){scanf("%d",&n);if(n==0)break;for(i=0;i<n;i++){scanf("%d %d",&a[i],&b[i]);}scanf("%d",&m);for(i=0;i<m;i++){scanf("%d %d",&c[i],&d[i]);}for(i=0;i<m;i++){w=c[i]-a[0];q=d[i]-b[0];for(j=1;j<n;j++){for(k=0;k<m;k++){if(a[j]+w==c[k]...
main.c:2:9: error: expected identifier or '(' before 'for' 2 | typedef for(int i=0;i<n;i++) r; | ^~~ main.c:2:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 2 | typedef for(int i=0;i<n;i++) r; | ^ main.c:2:26: error: expected '=', ',', ';', ...
s672985425
p00447
C
typedef for(int i=0;i<n;i++) r; a[200],b[200],c[1000],d[1000],n,m,i,j,k,t=0,w,q;main(){for(;;){scanf("%d",&n);if(n==0)break;for(i=0;i<n;i++){scanf("%d %d",&a[i],&b[i]);}scanf("%d",&m);for(i=0;i<m;i++){scanf("%d %d",&c[i],&d[i]);}for(i=0;i<m;i++){w=c[i]-a[0];q=d[i]-b[0];for(j=1;j<n;j++){for(k=0;k<m;k++){if(a[j]+w==c[k])...
main.c:1:9: error: expected identifier or '(' before 'for' 1 | typedef for(int i=0;i<n;i++) r; | ^~~ main.c:1:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | typedef for(int i=0;i<n;i++) r; | ^ main.c:1:26: error: expected '=', ',', ';', ...
s629043616
p00447
C
a[200],b[200],c[1000],d[1000],n,m,i,j,k,t,w,q;main(){for(){scanf("%d",&n);if(!n)break;for(i=0;i<n;i++){scanf("%d %d",&a[i],&b[i]);}scanf("%d",&m);for(i=0;i<m;i++){scanf("%d %d",&c[i],&d[i]);}for(i=0;i<m;i++){w=c[i]-a[0];q=d[i]-b[0];for(j=1;j<n;j++){for(k=0;k<m;k++){if(a[j]+w==c[k]){if(b[j]+q==d[k]){t++;break;}}}}if(t==...
main.c:1:1: warning: data definition has no type or storage class 1 | a[200],b[200],c[1000],d[1000],n,m,i,j,k,t,w,q;main(){for(){scanf("%d",&n);if(!n)break;for(i=0;i<n;i++){scanf("%d %d",&a[i],&b[i]);}scanf("%d",&m);for(i=0;i<m;i++){scanf("%d %d",&c[i],&d[i]);}for(i=0;i<m;i++){w=c[i]-a[0];q=d[i]-b[0];for(j=1;j<n;j+...
s538060604
p00447
C
main(){for(;;){a[200],b[200],c[1000],d[1000],n,m,i,j,k,t,w,q;scanf("%d",&n);if(!n)break;for(i=0;i<n;i++){scanf("%d%d",&a[i],&b[i]);}scanf("%d",&m);for(i=0;i<m;i++){scanf("%d%d",&c[i],&d[i]);}for(i=0;i<m;i++){w=c[i]-a[0];q=d[i]-b[0];for(j=1;j<n;j++){for(k=0;k<m;k++){if(!a[j]+w-c[k]){if(!b[j]+q-d[k]){t++;break;}}}}if(!t-...
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main(){for(;;){a[200],b[200],c[1000],d[1000],n,m,i,j,k,t,w,q;scanf("%d",&n);if(!n)break;for(i=0;i<n;i++){scanf("%d%d",&a[i],&b[i]);}scanf("%d",&m);for(i=0;i<m;i++){scanf("%d%d",&c[i],&d[i]);}for(i=0;i<m;i++){w=c[i]-a[0];q=d[i]-b[0];for(j=1;j<n;j+...
s052032204
p00447
C
#define for(int i=0;i<n;i++){ a;a[200],b[200],c[1000],d[1000],n,m,i,j,k,t,w,q;main(){for(;;){scanf("%d",&n);if(!n)break;for(i=0;i<n;i++)scanf("%d%d",&a[i],&b[i]);scanf("%d",&m);for(i=0;i<m;i++)scanf("%d%d",&c[i],&d[i]);for(i=0;i<m;i++){w=c[i]-a[0];q=d[i]-b[0];for(j=0;j<n;j++){for(k=0;k<m;k++){if(a[j]+w==c[k]){if(b[j]+q...
main.c:1:17: error: expected ',' or ')', found "i" 1 | #define for(int i=0;i<n;i++){ a;a[200],b[200],c[1000],d[1000],n,m,i,j,k,t,w,q;main(){for(;;){scanf("%d",&n);if(!n)break;for(i=0;i<n;i++)scanf("%d%d",&a[i],&b[i]);scanf("%d",&m);for(i=0;i<m;i++)scanf("%d%d",&c[i],&d[i]);for(i=0;i<m;i++){w=c[i]-a[0];q=d[i]-b[0];f...
s245692615
p00447
C
#define for(int i=0;i<n;i++) a;a[200],b[200],c[1000],d[1000],n,m,i,j,k,t,w,q;main(){for(;;){scanf("%d",&n);if(!n)break;for(i=0;i<n;i++)scanf("%d%d",&a[i],&b[i]);scanf("%d",&m);for(i=0;i<m;i++)scanf("%d%d",&c[i],&d[i]);for(i=0;i<m;i++){w=c[i]-a[0];q=d[i]-b[0];for(j=0;j<n;j++){for(k=0;k<m;k++){if(a[j]+w==c[k]){if(b[j]+q=...
main.c:1:17: error: expected ',' or ')', found "i" 1 | #define for(int i=0;i<n;i++) a;a[200],b[200],c[1000],d[1000],n,m,i,j,k,t,w,q;main(){for(;;){scanf("%d",&n);if(!n)break;for(i=0;i<n;i++)scanf("%d%d",&a[i],&b[i]);scanf("%d",&m);for(i=0;i<m;i++)scanf("%d%d",&c[i],&d[i]);for(i=0;i<m;i++){w=c[i]-a[0];q=d[i]-b[0];fo...
s575428268
p00447
C
#define for(int i=0;i<n;i++) r; a[200],b[200],c[1000],d[1000],n,m,i,j,k,t,w,q;main(){for(;;){scanf("%d",&n);if(!n)break;for(i=0;i<n;i++)scanf("%d%d",&a[i],&b[i]);scanf("%d",&m);for(i=0;i<m;i++)scanf("%d%d",&c[i],&d[i]);for(i=0;i<m;i++){w=c[i]-a[0];q=d[i]-b[0];for(j=0;j<n;j++){for(k=0;k<m;k++){if(a[j]+w==c[k]){if(b[j]+q...
main.c:1:17: error: expected ',' or ')', found "i" 1 | #define for(int i=0;i<n;i++) r; | ^ main.c:2:1: warning: data definition has no type or storage class 2 | a[200],b[200],c[1000],d[1000],n,m,i,j,k,t,w,q;main(){for(;;){scanf("%d",&n);if(!n)break;for(i=0;i<n;i++)scanf("%d%d",&a[i],&b[i])...
s473773128
p00447
C
#define for(i=0;i<n;i++) r; a[200],b[200],c[1000],d[1000],n,m,i,j,k,t,w,q;main(){for(;;){scanf("%d",&n);if(!n)break;for(i=0;i<n;i++)scanf("%d%d",&a[i],&b[i]);scanf("%d",&m);for(i=0;i<m;i++)scanf("%d%d",&c[i],&d[i]);for(i=0;i<m;i++){w=c[i]-a[0];q=d[i]-b[0];for(j=0;j<n;j++){for(k=0;k<m;k++){if(a[j]+w==c[k]){if(b[j]+q==d[...
main.c:1:14: error: expected ',' or ')', found "=" 1 | #define for(i=0;i<n;i++) r; | ^ main.c:2:1: warning: data definition has no type or storage class 2 | a[200],b[200],c[1000],d[1000],n,m,i,j,k,t,w,q;main(){for(;;){scanf("%d",&n);if(!n)break;for(i=0;i<n;i++)scanf("%d%d",&a[i],&b[i]);scanf(...
s213056743
p00447
C
typedef for(i=0;i<n;i++) r; a[200],b[200],c[1000],d[1000],n,m,i,j,k,t,w,q;main(){for(;;){scanf("%d",&n);if(!n)break;for(i=0;i<n;i++)scanf("%d%d",&a[i],&b[i]);scanf("%d",&m);for(i=0;i<m;i++)scanf("%d%d",&c[i],&d[i]);for(i=0;i<m;i++){w=c[i]-a[0];q=d[i]-b[0];for(j=0;j<n;j++){for(k=0;k<m;k++){if(a[j]+w==c[k]){if(b[j]+q==d[...
main.c:1:9: error: expected identifier or '(' before 'for' 1 | typedef for(i=0;i<n;i++) r; | ^~~ main.c:1:18: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | typedef for(i=0;i<n;i++) r; | ^ main.c:1:22: error: expected '=', ',', ';', 'asm' or '__...
s216172687
p00447
C
define for(i=0;i<n;i++) r; a[200],b[200],c[1000],d[1000],n,m,i,j,k,t,w,q;main(){for(;;){scanf("%d",&n);if(!n)break;for(i=0;i<n;i++)scanf("%d%d",&a[i],&b[i]);scanf("%d",&m);for(i=0;i<m;i++)scanf("%d%d",&c[i],&d[i]);for(i=0;i<m;i++){w=c[i]-a[0];q=d[i]-b[0];for(j=0;j<n;j++){for(k=0;k<m;k++){if(a[j]+w==c[k]){if(b[j]+q==d[k...
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'for' 1 | define for(i=0;i<n;i++) r; | ^~~ main.c:1:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | define for(i=0;i<n;i++) r; | ^ main.c:1:21: error: expected '=', ',',...
s133574675
p00447
C
#define r for(i=0;i<n;i++); a[200],b[200],c[1000],d[1000],n,m,i,j,k,t,w,q;main(){for(;;){scanf("%d",&n);if(!n)break;r{scanf("%d%d",&a[i],&b[i]);scanf("%d",&m);for(i=0;i<m;i++)scanf("%d%d",&c[i],&d[i]);for(i=0;i<m;i++){w=c[i]-a[0];q=d[i]-b[0];r{for(k=0;k<m;k++){if(a[j]+w==c[k]){if(b[j]+q==d[k]){t++;break;}}}}if(t==n-1){...
main.c:2:1: warning: data definition has no type or storage class 2 | a[200],b[200],c[1000],d[1000],n,m,i,j,k,t,w,q;main(){for(;;){scanf("%d",&n);if(!n)break;r{scanf("%d%d",&a[i],&b[i]);scanf("%d",&m);for(i=0;i<m;i++)scanf("%d%d",&c[i],&d[i]);for(i=0;i<m;i++){w=c[i]-a[0];q=d[i]-b[0];r{for(k=0;k<m;k++){if(a[j]+w==c[...
s925532126
p00447
C
#define r for(i=0;i<n;i++) a[200],b[200],c[1000],d[1000],n,m,i,j,k,t,w,q;main(){for(;;){scanf("%d",&n);if(!n)break;r{scanf("%d%d",&a[i],&b[i]);scanf("%d",&m);for(i=0;i<m;i++)scanf("%d%d",&c[i],&d[i]);for(i=0;i<m;i++){w=c[i]-a[0];q=d[i]-b[0];r{for(k=0;k<m;k++){if(a[j]+w==c[k]){if(b[j]+q==d[k]){t++;break;}}}}if(t==n-1){p...
main.c:2:1: warning: data definition has no type or storage class 2 | a[200],b[200],c[1000],d[1000],n,m,i,j,k,t,w,q;main(){for(;;){scanf("%d",&n);if(!n)break;r{scanf("%d%d",&a[i],&b[i]);scanf("%d",&m);for(i=0;i<m;i++)scanf("%d%d",&c[i],&d[i]);for(i=0;i<m;i++){w=c[i]-a[0];q=d[i]-b[0];r{for(k=0;k<m;k++){if(a[j]+w==c[...
s641109698
p00447
C++
#include <iostream> using namespace std; int n,m,seiz[220][2],data[1100][2],x,y,cnt,k; int main(){ while(;;){ cin>>m; if(m==0){ break; } for(int i=0;i<m;i++){ cin>>seiz[i][0]>>seiz[i][1]; } cin>>n; for(int i=0;i<n;i++){ cin>>data[i][0]>>data[i][1]; } for(int i=0;i<n;i++){ cnt=1; x=data[i][0]-seiz[0]...
a.cc: In function 'int main()': a.cc:5:15: error: expected primary-expression before ';' token 5 | while(;;){ | ^ a.cc:5:15: error: expected ')' before ';' token 5 | while(;;){ | ~^ | ) a.cc:5:17: error: expected primary-expression befor...
s368211177
p00447
C++
#include<iostream> #include<map> #include<algorithm> #include<mpi.h> using namespace std; typedef pair<int, int> P; #define F first #define S second int main(int argc, char *argv[]) { int size, tag = 0; int m, n, x, y; int ans_x, ans_y; int rank, numprocs; P target[256], star[1024]; P shift[1024]; ...
a.cc:4:9: fatal error: mpi.h: No such file or directory 4 | #include<mpi.h> | ^~~~~~~ compilation terminated.
s152697809
p00447
C++
#include<iostream> #include<map> #include<algorithm> #include"mpi.h" using namespace std; typedef pair<int, int> P; #define F first #define S second int main(int argc, char *argv[]) { int size, tag = 0; int m, n, x, y; int ans_x, ans_y; int rank, numprocs; P target[256], star[1024]; P shift[1024]; ...
a.cc:4:9: fatal error: mpi.h: No such file or directory 4 | #include"mpi.h" | ^~~~~~~ compilation terminated.
s648880969
p00447
C++
#include<iostream> #include<map> #include<algorithm> #include<mpi.h> using namespace std; typedef pair<int, int> P; #define F first #define S second int main(int argc, char *argv[]) { int size, tag = 0; int m, n, x, y; int ans_x, ans_y; int rank, numprocs; P target[256], star[1024]; P shift[1024]; ...
a.cc:4:9: fatal error: mpi.h: No such file or directory 4 | #include<mpi.h> | ^~~~~~~ compilation terminated.
s172204737
p00447
C++
#include <bits/stdc++.h> using namespace std; #define FOR(i, s, n) for(int i = s; i < (int)n; ++i) #define per(i, n) for(int i = n; i >= 0; i--) #define ROF(i, s, n) for(int i = s; i >= (int)n; i--) #define FORIT(i, A) for (auto i : A) #define PRINT(x) cout << (x) << "\n" #define ALL(a) (a).begin(),(a).end() #define RA...
a.cc: In function 'int main()': a.cc:102:2: error: expected '}' at end of input 102 | } | ^ a.cc:84:12: note: to match this '{' 84 | int main() { | ^
s081731894
p00447
C++
#include <bits/stdc++.h> using namespace std; #define FOR(i, s, n) for(int i = s; i < (int)n; ++i) #define per(i, n) for(int i = n; i >= 0; i--) #define ROF(i, s, n) for(int i = s; i >= (int)n; i--) #define FORIT(i, A) for (auto i : A) #define PRINT(x) cout << (x) << "\n" #define ALL(a) (a).begin(),(a).end() #define RA...
a.cc: In function 'int main()': a.cc:102:2: error: expected '}' at end of input 102 | } | ^ a.cc:84:12: note: to match this '{' 84 | int main() { | ^
s850174041
p00447
C++
#include <bits/stdc++.h> using namespace std; #define FOR(i, s, n) for(int i = s; i < (int)n; ++i) #define per(i, n) for(int i = n; i >= 0; i--) #define ROF(i, s, n) for(int i = s; i >= (int)n; i--) #define FORIT(i, A) for (auto i : A) #define PRINT(x) cout << (x) << "\n" #define ALL(a) (a).begin(),(a).end() #define RA...
a.cc: In function 'int main()': a.cc:101:2: error: expected '}' at end of input 101 | } | ^ a.cc:84:12: note: to match this '{' 84 | int main() { | ^
s550933340
p00447
C++
#include <bits/stdc++.h> using namespace std; #define FOR(i, s, n) for(int i = s; i < (int)n; ++i) #define per(i, n) for(int i = n; i >= 0; i--) #define ROF(i, s, n) for(int i = s; i >= (int)n; i--) #define FORIT(i, A) for (auto i : A) #define PRINT(x) cout << (x) << "\n" #define ALL(a) (a).begin(),(a).end() #define RA...
a.cc: In function 'int main()': a.cc:101:2: error: expected '}' at end of input 101 | } | ^ a.cc:84:12: note: to match this '{' 84 | int main() { | ^
s440013436
p00447
C++
#include <bits/stdc++.h> using namespace std; #define FOR(i, s, n) for(int i = s; i < (int)n; ++i) #define per(i, n) for(int i = n; i >= 0; i--) #define ROF(i, s, n) for(int i = s; i >= (int)n; i--) #define FORIT(i, A) for (auto i : A) #define PRINT(x) cout << (x) << "\n" #define ALL(a) (a).begin(),(a).end() #define RA...
a.cc: In function 'int main()': a.cc:101:2: error: expected '}' at end of input 101 | } | ^ a.cc:84:12: note: to match this '{' 84 | int main() { | ^
s586425926
p00447
C++
#include <bits/stdc++.h> using namespace std; #define FOR(i, s, n) for(int i = s; i < (int)n; ++i) #define per(i, n) for(int i = n; i >= 0; i--) #define ROF(i, s, n) for(int i = s; i >= (int)n; i--) #define FORIT(i, A) for (auto i : A) #define PRINT(x) cout << (x) << "\n" #define ALL(a) (a).begin(),(a).end() #define RA...
a.cc: In function 'int main()': a.cc:101:2: error: expected '}' at end of input 101 | } | ^ a.cc:84:12: note: to match this '{' 84 | int main() { | ^
s053830067
p00447
C++
#include <bits/stdc++.h> using namespace std; #define FOR(i, s, n) for(int i = s; i < (int)n; ++i) #define per(i, n) for(int i = n; i >= 0; i--) #define ROF(i, s, n) for(int i = s; i >= (int)n; i--) #define FORIT(i, A) for (auto i : A) #define PRINT(x) cout << (x) << "\n" #define ALL(a) (a).begin(),(a).end() #define RA...
a.cc: In function 'int main()': a.cc:101:2: error: expected '}' at end of input 101 | } | ^ a.cc:84:12: note: to match this '{' 84 | int main() { | ^
s912048722
p00447
C++
#include<iostream> using namespace std; struct location{ int x; int y; }; bool solve2(int m, int n, location sample[], location star[], int start) { int star_now = start; for (int i = 1; i < m - 1; i++){ location vec_sample; vec_sample.x = sample[i + 1].x - sample[i].x; vec_s...
a.cc: In function 'bool solve2(int, int, location*, location*, int)': a.cc:28:13: error: 'j' was not declared in this scope 28 | if (j == m){ return false; } | ^
s378070068
p00447
C++
//aoj 0524 Searching Constellation #include<iostream> using namespace std; int main(){ while (1){ int n, m, x, y, roop = 0, a[200][2]={}, b[1000][2]={}, star[1000000][2]={},starx[1000000] = {}, stary[1000000] = {}, starx2[1000000] = {}, stary2[1000000] = {};; cin >> n; if (n == 0){ return 0; } fo...
a.cc:94:5: error: redefinition of 'int main()' 94 | int main(){ | ^~~~ a.cc:8:5: note: 'int main()' previously defined here 8 | int main(){ | ^~~~
s251946729
p00447
C++
#include <stdio.h> #include <algorithm> #include <set> using namespace std; pair<int,int> d[300]; pair<int,int> dd[2000]; int main(){ int m; scnaf("%d".&m); for(int i = 0; i < m; i++){ int a,b; scanf("%d%d",&a,&b); d[i] = make_pair(a,b); } int n; scanf("%d",&n); map<pair<int,int> > mp; for(int i = 0; i...
a.cc: In function 'int main()': a.cc:12:13: error: expected unqualified-id before '&' token 12 | scnaf("%d".&m); | ^ a.cc:12:2: error: 'scnaf' was not declared in this scope; did you mean 'scanf'? 12 | scnaf("%d".&m); | ^~~~~ | scanf a.cc:20:2: error: 'map' was not declared in th...
s057680862
p00447
C++
#include <stdio.h> #include <algorithm> #include <set> using namespace std; pair<int,int> d[300]; pair<int,int> dd[2000]; int main(){ int m; scnaf("%d".&m); for(int i = 0; i < m; i++){ int a,b; scanf("%d%d",&a,&b); d[i] = make_pair(a,b); } int n; scanf("%d",&n); set<pair<int,int> > mp; for(int i = 0; i...
a.cc: In function 'int main()': a.cc:12:13: error: expected unqualified-id before '&' token 12 | scnaf("%d".&m); | ^ a.cc:12:2: error: 'scnaf' was not declared in this scope; did you mean 'scanf'? 12 | scnaf("%d".&m); | ^~~~~ | scanf
s935244668
p00447
C++
#include <stdio.h> #include <algorithm> #include <set> using namespace std; pair<int,int> d[300]; pair<int,int> dd[2000]; int main(){ int m; scnaf("%d",&m); for(int i = 0; i < m; i++){ int a,b; scanf("%d%d",&a,&b); d[i] = make_pair(a,b); } int n; scanf("%d",&n); set<pair<int,int> > mp; for(int i = 0; i...
a.cc: In function 'int main()': a.cc:12:2: error: 'scnaf' was not declared in this scope; did you mean 'scanf'? 12 | scnaf("%d",&m); | ^~~~~ | scanf
s157787928
p00447
C++
#include<iostream> using namespace std; main(){ int n,m,i,j,k,l,x[9999][2],y[9999][2],x2,y2,c,a; while(true){ cin>>m; if(m==0){break;} for(i=0;i<m;i++){cin>>x[i][0]>>y[i][0];} cin>>n; for(i=0;i<n;i++){cin>>x[i][1]>>y[i][1];} for(i=0;i<m;i++){ for(j=0;j<n;j++){ a=0;x2=x[j][1]-x[i][0];y2=y[j][1]-y[i][0]; for(k=0;k<m;k++)...
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 3 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:26:2: error: expected '}' at end of input 26 | } | ^ a.cc:3:7: note: to match this '{' 3 | main(){ | ^
s265226401
p00447
C++
#include <bits/stdc++.h> using namespace std; typedef pair<int, int> P; P f(P a, P b) { return P(b.first - a.first, b.second - a.second); } int main() { int m, n; while (true) { cin >> m; if (m == 0) break; vector<P> seiza(m); for (int i = 0; i < m; ++i) cin >> seiza[i].first >> seiza[i].second; ci...
a.cc: In function 'int main()': a.cc:36:47: error: 'f' cannot be used as a function 36 | P amount_of_change = f(s0, image[i]); | ~^~~~~~~~~~~~~~
s647845249
p00447
C++
#include <bits/stdc++.h> #define FOR(i,n) for(int i=0;i<(int)(n);i++) #define FORR(i,m,n) for(int i=(int)(m);i<(int)(n);i++) #define pb(a) push_back(a) #define mp(x,y) make_pair(x,y) #define ZERO(a) memset(a,0,sizeof(a)) #define len(a) sizeof(a) #define ll long long #define pair<int,int> pii #define INF 1<<29 #define M...
a.cc:9:9: warning: ISO C++11 requires whitespace after the macro name 9 | #define pair<int,int> pii | ^~~~ a.cc:15:23: error: 'int y1 [201]' redeclared as different kind of entity 15 | int x1[MAX_M],y1[MAX_M],x2[MAX_N],y2[MAX_N]; | ^ In file included from /usr/include/fe...
s028165760
p00447
C++
#include <bits/stdc++.h> #define FOR(i,n) for(int i=0;i<(int)(n);i++) #define FORR(i,m,n) for(int i=(int)(m);i<(int)(n);i++) #define pb(a) push_back(a) #define mp(x,y) make_pair(x,y) #define ZERO(a) memset(a,0,sizeof(a)) #define len(a) sizeof(a) #define ll long long #define pair<int,int> pii #define INF 1<<29 #define M...
a.cc:9:9: warning: ISO C++11 requires whitespace after the macro name 9 | #define pair<int,int> pii | ^~~~ a.cc:15:23: error: 'int y1 [201]' redeclared as different kind of entity 15 | int x1[MAX_M],y1[MAX_M],x2[MAX_N],y2[MAX_N]; | ^ In file included from /usr/include/fe...
s306591425
p00447
C++
#include <bits/stdc++.h> #define FOR(i,n) for(int i=0;i<(int)(n);i++) #define FORR(i,m,n) for(int i=(int)(m);i<(int)(n);i++) #define pb(a) push_back(a) #define mp(x,y) make_pair(x,y) #define ZERO(a) memset(a,0,sizeof(a)) #define len(a) sizeof(a) #define ll long long #define pii pair<int,int> #define INF 1<<29 #define M...
a.cc:15:23: error: 'int y1 [201]' redeclared as different kind of entity 15 | int x1[MAX_M],y1[MAX_M],x2[MAX_N],y2[MAX_N]; | ^ In file included from /usr/include/features.h:523, from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39, from /usr/inc...
s722870152
p00447
C++
#include <bits/stdc++.h> #define FOR(i,n) for(int i=0;i<(int)(n);i++) #define FORR(i,m,n) for(int i=(int)(m);i<(int)(n);i++) #define pb(a) push_back(a) #define mp(x,y) make_pair(x,y) #define ZERO(a) memset(a,0,sizeof(a)) #define len(a) sizeof(a) #define ll long long #define pii pair<int,int> #define INF 1<<29 #define M...
a.cc:15:23: error: 'int y1 [201]' redeclared as different kind of entity 15 | int x1[MAX_M],y1[MAX_M],x2[MAX_N],y2[MAX_N]; | ^ In file included from /usr/include/features.h:523, from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39, from /usr/inc...
s451000509
p00447
C++
#include <bits/stdc++.h> #define FOR(i,n) for(int i=0;i<(int)(n);i++) #define FORR(i,m,n) for(int i=(int)(m);i<(int)(n);i++) #define pb(a) push_back(a) #define mp(x,y) make_pair(x,y) #define ZERO(a) memset(a,0,sizeof(a)) #define len(a) sizeof(a) #define ll long long #define pii pair<int,int> #define INF 1<<29 #define M...
a.cc:15:23: error: 'int y1 [201]' redeclared as different kind of entity 15 | int x1[MAX_M],y1[MAX_M],x2[MAX_N],y2[MAX_N]; | ^ In file included from /usr/include/features.h:523, from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39, from /usr/inc...
s390903215
p00447
C++
#include <bits/stdc++.h> #define FOR(i,n) for(int i=0;i<(int)(n);i++) #define FORR(i,m,n) for(int i=(int)(m);i<(int)(n);i++) #define pb(a) push_back(a) #define mp(x,y) make_pair(x,y) #define ZERO(a) memset(a,0,sizeof(a)) #define len(a) sizeof(a) #define ll long long #define INF 1<<29 #define MAX_M 201 #define MAX_N 111...
a.cc:12:9: error: 'pair' does not name a type 12 | typedef pair<int,int> pii | ^~~~ a.cc:15:23: error: 'int y1 [201]' redeclared as different kind of entity 15 | int x1[MAX_M],y1[MAX_M],x2[MAX_N],y2[MAX_N]; | ^ In file included from /usr/include/features.h:523, ...
s986973858
p00447
C++
#include <bits/stdc++.h> #define FOR(i,n) for(int i=0;i<(int)(n);i++) #define FORR(i,m,n) for(int i=(int)(m);i<(int)(n);i++) #define pb(a) push_back(a) #define mp(x,y) make_pair(x,y) #define ZERO(a) memset(a,0,sizeof(a)) #define len(a) sizeof(a) #define ll long long #define INF 1<<29 #define MAX_M 201 #define MAX_N 111...
a.cc:12:9: error: 'pair' does not name a type 12 | typedef pair<int,int> pii | ^~~~ a.cc:15:23: error: 'int y1 [201]' redeclared as different kind of entity 15 | int x1[MAX_M],y1[MAX_M],x2[MAX_N],y2[MAX_N]; | ^ In file included from /usr/include/features.h:523, ...
s255758938
p00447
C++
#include <iostream> #include <vector> #include <utility> using namespace std; typedef pair <int,int> PII; typedef vector <PII> VPII; int main( void ) { int m, n; while ( cin >> m && m ) { int x, y; VPII search( m ); for ( int i = 0; i < m; i++ ) { cin >> x >> y; search[i] = make_pair( x, y ); } ...
a.cc: In function 'int main()': a.cc:45:42: error: no matching function for call to 'find(std::vector<std::pair<int, int> >::iterator, std::vector<std::pair<int, int> >::iterator, PII&)' 45 | if ( find( field.begin(), field.end(), q ) == field.end() ) found = false; | ...
s073398252
p00447
C++
5 8 5 6 4 4 3 7 10 0 10 10 10 5 2 7 9 7 8 10 10 2 1 2 8 1 6 7 6 0 0 9 5 904207 809784 845370 244806 499091 59863 638406 182509 435076 362268 10 757559 866424 114810 239537 519926 989458 461089 424480 674361 448440 81851 150384 459107 795405 299682 6700 254125 362183 50795 541942 0
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 5 | ^
s106095463
p00447
C++
int a[200],b[200],c[1000],d[1000],n,m,i,j,k,t=0;int w,q;int main(){for(;;){scanf("%d",&n);if(n==0)break;for(i=0;i<n;i++){scanf("%d %d",&a[i],&b[i]);}scanf("%d",&m);for(i=0;i<m;i++){scanf("%d %d",&c[i],&d[i]);}for(i=0;i<m;i++){w=c[i]-a[0];q=d[i]-b[0];for(j=1;j<n;j++){for(k=0;k<m;k++){if(a[j]+w==c[k]){if(b[j]+q==d[k]){t+...
a.cc: In function 'int main()': a.cc:1:76: error: 'scanf' was not declared in this scope 1 | int a[200],b[200],c[1000],d[1000],n,m,i,j,k,t=0;int w,q;int main(){for(;;){scanf("%d",&n);if(n==0)break;for(i=0;i<n;i++){scanf("%d %d",&a[i],&b[i]);}scanf("%d",&m);for(i=0;i<m;i++){scanf("%d %d",&c[i],&d[i]);}for(i=0;i<m;i+...
s178279688
p00447
C++
#include<stdio.h>int a[200],b[200],c[1000],d[1000],n,m,i,j,k,t=0;int w,q;int main(){for(;;){scanf("%d",&n);if(n==0)break;for(i=0;i<n;i++){scanf("%d %d",&a[i],&b[i]);}scanf("%d",&m);for(i=0;i<m;i++){scanf("%d %d",&c[i],&d[i]);}for(i=0;i<m;i++){w=c[i]-a[0];q=d[i]-b[0];for(j=1;j<n;j++){for(k=0;k<m;k++){if(a[j]+w==c[k]){if...
a.cc:1:22: warning: extra tokens at end of #include directive 1 | #include<stdio.h>int a[200],b[200],c[1000],d[1000],n,m,i,j,k,t=0;int w,q;int main(){for(;;){scanf("%d",&n);if(n==0)break;for(i=0;i<n;i++){scanf("%d %d",&a[i],&b[i]);}scanf("%d",&m);for(i=0;i<m;i++){scanf("%d %d",&c[i],&d[i]);}for(i=0;i<m;i++){w=c[i]-...
s450339262
p00447
C++
#include <iostream> #include <queue> using namespace std; int main(){ int m; int c; int f; int g; int h; int i; int j; int k; while(cin >>m){ if(m==0){break;} int a[m]; int b[m]; c=0; while(c<m){ cin >>a[c]; cin >>b[c]; c=c+1;} cin >>n; int d[n]; int e[n]; c=0; while(c<n){ cin >>d[c]; cin >>e[c]; c=c+1;} c=0; while(c<n...
a.cc: In function 'int main()': a.cc:22:7: error: 'n' was not declared in this scope 22 | cin >>n; | ^ a.cc:27:7: error: 'd' was not declared in this scope 27 | cin >>d[c]; | ^ a.cc:28:7: error: 'e' was not declared in this scope 28 | cin >>e[c]; | ^ a.cc:33:3: error: 'd' wa...
s138236763
p00447
C++
#include<iostream> int a[200],b[200],c[1000],d[1000],n,m,i,j,k,t=0,w,q;main(){for(;;){cin>>n;if(!n)break;for(i=0;i<n;i++){cin>>a[i]>>b[i];}cin>>m;for(i=0;i<m;i++){cin>>c[i]>>d[i];}for(i=0;i<m;i++){w=c[i]-a[0];q=d[i]-b[0];for(j=1;j<n;j++){for(k=0;k<m;k++){if(a[j]+w==c[k]){if(b[j]+q==d[k]){t++;break;}}}}if(t==n-1){cout<<...
a.cc:2:53: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | int a[200],b[200],c[1000],d[1000],n,m,i,j,k,t=0,w,q;main(){for(;;){cin>>n;if(!n)break;for(i=0;i<n;i++){cin>>a[i]>>b[i];}cin>>m;for(i=0;i<m;i++){cin>>c[i]>>d[i];}for(i=0;i<m;i++){w=c[i]-a[0];q=d[i]-b[0];for(j=1;j<n;j++){for(k=...
s693447015
p00447
C++
typedef for(int i=0;i<n;i++) r; a[200],b[200],c[1000],d[1000],n,m,i,j,k,t=0,w,q;main(){for(;;){scanf("%d",&n);if(n==0)break;for(i=0;i<n;i++){scanf("%d %d",&a[i],&b[i]);}scanf("%d",&m);for(i=0;i<m;i++){scanf("%d %d",&c[i],&d[i]);}for(i=0;i<m;i++){w=c[i]-a[0];q=d[i]-b[0];for(j=1;j<n;j++){for(k=0;k<m;k++){if(a[j]+w==c[k])...
a.cc:1:9: error: expected unqualified-id before 'for' 1 | typedef for(int i=0;i<n;i++) r; | ^~~ a.cc:1:21: error: 'i' does not name a type 1 | typedef for(int i=0;i<n;i++) r; | ^ a.cc:1:25: error: 'i' does not name a type 1 | typedef for(int i=0;i<n;i++) r; | ...