submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s696247128
p00933
C++
#include<cstdio> #include<vector> #include<cmath> #include<algorithm> ?? using namespace std; ?? typedef double Real; typedef vector<int> Vector; ?? const Real inf=1e12; const Real eps=1e-9; ?? template<class T> bool eq(T a, T b){ ????????return abs(a-b)<eps; } ?? template<class T> int sgn(T a){ ????????if(eq(a,0.0)) r...
a.cc:5:1: error: expected unqualified-id before '?' token 5 | ?? | ^ a.cc:7:1: error: expected unqualified-id before '?' token 7 | ?? | ^ a.cc:9:9: error: 'vector' does not name a type 9 | typedef vector<int> Vector; | ^~~~~~ a.cc:10:1: error: expected unqualified-id before '?' tok...
s786094895
p00935
Java
import java.util.Scanner; public class ICPCRegional2015A { public static void main(String[] args) throws Exception { new ICPCRegional2015A().solve(); } private void solve() throws Exception { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] ds = new in...
Main.java:4: error: class ICPCRegional2015A is public, should be declared in a file named ICPCRegional2015A.java public class ICPCRegional2015A { ^ 1 error
s075121415
p00935
Java
import java.io.PrintWriter; import java.math.BigDecimal; import java.util.Scanner; import java.util.Set; import java.util.TreeSet; public class ProblemA { private static Scanner scanner; private static PrintWriter writer; private static int nod; // private static int[] numbers; private static String numbers = n...
Main.java:7: error: class ProblemA is public, should be declared in a file named ProblemA.java public class ProblemA { ^ 1 error
s657350229
p00935
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main2{ public static void main(String args[]) throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int N = Integer.parseInt(br.readLine()); String D = br.readLine()....
Main.java:5: error: class Main2 is public, should be declared in a file named Main2.java public class Main2{ ^ 1 error
s553357029
p00935
C
#include<stdio.h> int main(void){ int n,a,i,ii,y,s[2048]; scanf("%d",&n); for(i=1;i<=n;i++){ scanf("%d",&a); s[i] = a; } for(i=0;i<=9;i++){ y=0; for(ii=1;ii<=n;ii++){ if(s[ii]==i){ y=1; break; } } if(y==0){ printf("%d\n",i); return 0; ...
main.c: In function 'main': main.c:39:61: error: expected ')' before 'y' 39 | if(s[ii]==i/100 &&s[ii+1]==(i/10)%10 &&s[ii+2]==i%10 | ~ ^ | ) 40 | y=1; | ...
s133815358
p00935
C
#include<stdio.h> int main(void){ int n,a,i,ii,y,s[2048]; scanf("%d",&n); for(i=1;i<=n;i++){ scanf("%d",&a); s[i] = a; } for(i=0;i<=9;i++){ y=0; for(ii=1;ii<=n;ii++){ if(s[ii]==i){ y=1; break; } } if(y==0){ printf("%d\n",i); return 0; ...
main.c:49:1: error: expected identifier or '(' before 'return' 49 | return 0; | ^~~~~~ main.c:50:1: error: expected identifier or '(' before '}' token 50 | } | ^
s946415381
p00935
C
#include<stdio.h> #include<stdlib.h> #include<string.h> int N,i,t; char x[1005],d[10]; int main() { scanf("%d",&N); for(i=0;i<N;x[i++]=t+'0')scanf("%d",&t); for(i=0;i<100000;i++) { itoa(i,d,10); if(strstr(x,d)==NULL) { puts(d); return 0; } } }
main.c: In function 'main': main.c:12:17: error: implicit declaration of function 'itoa' [-Wimplicit-function-declaration] 12 | itoa(i,d,10); | ^~~~
s861657054
p00935
C
#include<iostream> #include<cstdio> #include<cstring> using namespace std; int a[1010]; int t[10],b[10],top; bool ok(int t) { for(int i=1;i<=top;i++) if(a[t+i-1]!=b[i]) return false; return true; } int main() { int N; cin>>N; for(int i=1;i<=N;i++) cin>>a[i]; for(int i=0;;i++) { top=0; int x=i; do ...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s070273434
p00935
C
#include<iostream> #include<cmath> using namespace std; typedef long long ll; const ll inf=abs((-1ll<<63)+1); int le(int a) { if(a==0) return 1; int s=0; while(a) { s++; a/=10; } return s; } int main() { //freopen(".in","r",stdin); //freopen(".out","w",stdout); int n,i,a[1010],l,j; cin>>n; bool b; for...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s255604766
p00935
C
#include <cstdio> using namespace std; int n; int d[1005]; bool vis[1005]; void dfs(int now,int bs,int ans) { if (bs>3||now>n) return; ans=ans*10+d[now]; vis[ans]=1; dfs(now+1,bs+1,ans); } int main() { register int i,j; scanf("%d",&n); for (i=1;i<=n;i++) { scanf("%d",&d[i]); vis[d[i]]=1; } for (i=1;i<=n;i...
main.c:1:10: fatal error: cstdio: No such file or directory 1 | #include <cstdio> | ^~~~~~~~ compilation terminated.
s705272210
p00935
C
#include <map> #include <ctime> #include <cmath> #include <queue> #include <string> #include <vector> #include <cstdio> #include <cstring> #include <cstdlib> #include <iostream> #include <algorithm> using namespace std; int a[1001]; int b[1000000]; int main() { int n,i,j,k,t,s; scanf("%d",&n); for(i=0;i<n;i...
main.c:1:10: fatal error: map: No such file or directory 1 | #include <map> | ^~~~~ compilation terminated.
s287648638
p00935
C++
#include <bits/stdc++.h> using namespace std; int main(void){ int n; cin >> n; char c; string s=""; while(n--){ cin >> c; s+=c; } for(int i=0; i<=1997; i++){//4桁は997個だけ1997より小さい if(s.find(to_string(i))==npos){//nposとは部分列が入っていないのをさす cout << i << "\n"; ...
a.cc: In function 'int main()': a.cc:13:34: error: 'npos' was not declared in this scope 13 | if(s.find(to_string(i))==npos){//nposとは部分列が入っていないのをさす | ^~~~
s058674189
p00935
C++
100 7 2 7 5 4 7 4 4 5 8 1 5 7 7 0 5 6 2 0 4 3 4 1 1 0 6 1 6 6 2 1 7 9 2 4 6 9 3 6 2 8 0 5 9 7 6 3 1 4 9 1 9 1 2 6 4 2 9 7 8 3 9 5 5 2 3 3 8 4 0 6 8 2 5 5 0 6 7 1 8 5 1 4 8 1 3 7 3 3 5 3 0 6 0 6 5 3 2 2 2
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 100 | ^~~
s808229996
p00935
C++
#include <sstream> #include <algorithm> #include <string> #include <vector> using namespace std; int main() { int n; cin >> n; string s(n, ' '); for (int i=0; i<n; i++) cin >> s[i]; vector<int> nums; for (int k=1; k<=3; k++) for (int i...
a.cc: In function 'int main()': a.cc:10:9: error: 'cin' was not declared in this scope 10 | cin >> n; | ^~~ a.cc:5:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 4 | #include <vector> +++ |+#include <iostream> 5 | using ...
s907802431
p00935
C++
#include<iostream> #include<string> #include<cstdio> main(){ string s,t; int N,x; for(cin>>N;N--;){cin>>t,s+=t;} char buf[9],*p=s.c_str(); for(x=0;;x++){ sprintf(buf,"%d",x); if(!strstr(p,buf)){puts(buf);return 0;} }
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 4 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:5:1: error: 'string' was not declared in this scope 5 | string s,t; | ^~~~~~ a.cc:5:1: note: suggested alternatives: In file included from /usr/include/c++/14...
s057720602
p00935
C++
#include<iostream> #include<string> #include<cstdio> #include<cstring> main(){ string s,t; int N,x; for(cin>>N;N--;){cin>>t,s+=t;} char buf[9],*p=s.c_str(); for(x=0;;x++){ sprintf(buf,"%d",x); if(!strstr(p,buf)){puts(buf);return 0;} }
a.cc:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 5 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:6:1: error: 'string' was not declared in this scope 6 | string s,t; | ^~~~~~ a.cc:6:1: note: suggested alternatives: In file included from /usr/include/c++/14...
s102110652
p00935
C++
#include<iostream> #include<string> #include<cstdio> #include<cstring> using namespace std; main(){ string s,t; int N,x; for(cin>>N;N--;){cin>>t,s+=t;} char buf[9],*p=s.c_str(); for(x=0;;x++){ sprintf(buf,"%d",x); if(!strstr(p,buf)){puts(buf);return 0;} }
a.cc:6:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 6 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:10:23: error: invalid conversion from 'const char*' to 'char*' [-fpermissive] 10 | char buf[9],*p=s.c_str(); | ~~~~~~~^~ | ...
s017235559
p00935
C++
#include<iostream> #include<string> #include<cstdio> #include<cstring> using namespace std; main(){ string s,t; int N,x; for(cin>>N;N--;){cin>>t,s+=t;} char buf[9]; const char *p=s.c_str(); for(x=0;;x++){ sprintf(buf,"%d",x); if(!strstr(p,buf)){puts(buf);return 0;} }
a.cc:6:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 6 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:15:2: error: expected '}' at end of input 15 | } | ^ a.cc:6:7: note: to match this '{' 6 | main(){ | ^
s936026184
p00935
C++
#include <iostream> #include <algorithm> #include <cmath> #include <vector> #include <complex> #include <queue> #include <deque> #include <set> #include <map> #include <unordered_set> #include <unordered_map> #include <iomanip> #include <assert.h> #include <array> #include <cstdio> #include <cstring> #include <random> ...
In file included from /usr/include/c++/14/set:62, from a.cc:8: /usr/include/c++/14/bits/stl_tree.h: In instantiation of 'static const _Key& std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_S_key(_Const_Link_type) [with _Key = std::deque<char>; _Val = std::deque<char>; _KeyOfValue = std::_Iden...
s975303778
p00935
C++
test
a.cc:1:1: error: 'test' does not name a type 1 | test | ^~~~
s179776428
p00935
C++
23333
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 23333 | ^~~~~
s378587133
p00935
C++
#include <iostream> #include <cstdio> #include <string> using namespace std; int main(){ int n; string c; string s=""; cin >> n; for(int i=0;i<n;i++){ cin >> c; s+=c; } const char *ss = s.c_str(); for(int i=0;i<=1000;i++){ char tmp[5]; sprintf(tmp,"%d",i); if(strstr(ss,tmp)==N...
a.cc: In function 'int main()': a.cc:21:8: error: 'strstr' was not declared in this scope 21 | if(strstr(ss,tmp)==NULL){ | ^~~~~~ a.cc:3:1: note: 'strstr' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <cstdio> +++ |+#include <cstring> ...
s420000938
p00935
C++
#include <iostream> #include <cstdio> #include <string> using namespace std; int main(){ int n; string c; string s=""; cin >> n; for(int i=0;i<n;i++){ cin >> c; s+=c; } const char *ss = s.c_str(); for(int i=0;i<=1000;i++){ char tmp[5]; sprintf(tmp,"%d",i); if(strstr(ss,tmp)==N...
a.cc: In function 'int main()': a.cc:21:8: error: 'strstr' was not declared in this scope 21 | if(strstr(ss,tmp)==NULL){ | ^~~~~~ a.cc:3:1: note: 'strstr' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <cstdio> +++ |+#include <cstring> ...
s141983928
p00935
C++
#include <iostream> #include <cstdio> #include <string> using namespace std; int main(){ int n; string c; string s=""; cin >> n; for(int i=0;i<n;i++){ cin >> c; s+=c; } const char *ss = s.c_str(); for(int i=0;i<=1000;i++){ char tmp[5]; sprintf(tmp,"%d",i); if(strstr(ss,tmp)==N...
a.cc: In function 'int main()': a.cc:21:8: error: 'strstr' was not declared in this scope 21 | if(strstr(ss,tmp)==NULL){ | ^~~~~~ a.cc:3:1: note: 'strstr' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <cstdio> +++ |+#include <cstring> ...
s036920649
p00935
C++
#include <string> #include <iostream> using namespace std; int n, a, c; string s; int main() { scanf("%d", &n); for(int i = 0; i < n; i++) scanf("%d", &a), s += (char)(a + 48); while(true) if(s.find(to_string(c++)) == string::npos) { printf("%d\n", c--); break; } } return 0; }
a.cc:13:9: error: expected unqualified-id before 'return' 13 | return 0; | ^~~~~~ a.cc:14:1: error: expected declaration before '}' token 14 | } | ^
s644322622
p00935
C++
#include<stdio.h> #include<stdlib.h> #include<string.h> int N,i,t; char x[1005],d[10]; int main() { scanf("%d",&N); for(i=0;i<N;x[i++]=t+'0')scanf("%d",&t); for(i=0;i<100000;i++) { itoa(i,d,10); if(strstr(x,d)==NULL) { puts(d); return 0; } } }
a.cc: In function 'int main()': a.cc:12:17: error: 'itoa' was not declared in this scope 12 | itoa(i,d,10); | ^~~~
s506945564
p00935
C++
#include <bits/stdc++.h> using namespace std; #define FOR(i,a,b) for(int i=a;i<b;i++) #define REP(i,b) FOR(i,0,b) #define INF 1e9 using ll = long long; const ll mod = LLONG_MAX; int check1(int a[], int N){ for (int p = 0; p < 10; p++) { for (int j = 0; j < N; j++) { if(p == a[j]) continue; } retur...
a.cc: In function 'int check10(int*, int)': a.cc:24:19: error: 'i' was not declared in this scope 24 | if(p == a[i] && q == a[i+1]) continue; | ^ a.cc:27:17: error: 'q' was not declared in this scope 27 | return p*10+q; | ^ a.cc: At global scope: a.cc:32:5...
s688043634
p00936
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { new Main2().run(); } void run() { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int r[] = new int[n]; for (int i = 0; i < r.length; i++) { r[i] = sc.nextInt(); } double c[] = new double[n]; for (...
Main.java:6: error: cannot find symbol new Main2().run(); ^ symbol: class Main2 location: class Main 1 error
s536517445
p00936
C
#include <stdio.h> #include <math.h> int r[502]; double WID[502]; double width(int r1, int r2) { if (r1 == 10001 && r2 == 10001) { return 0.0; } else if (r1 == 10001) { return (double)r2; } else if (r2 == 10001){ return (double)r1; } else return 2 * sqrt((double)(r1 * r2)); } int main(void) { int N; do...
/usr/bin/ld: /tmp/cc2jxkFn.o: in function `width': main.c:(.text+0x68): undefined reference to `sqrt' collect2: error: ld returned 1 exit status
s697389669
p00936
C
#include <stdio.h> #include <math.h> int r[502]; double WID[502]; double width(int r1, int r2) { if (r1 == 10001 && r2 == 10001) { return 0.0; } else if (r1 == 10001) { return (double)r2; } else if (r2 == 10001){ return (double)r1; } else return 2 * sqrt((double)(r1 * r2)); } int main(void) { int N,i,j,...
/usr/bin/ld: /tmp/cc3K1Yun.o: in function `width': main.c:(.text+0x68): undefined reference to `sqrt' collect2: error: ld returned 1 exit status
s479390498
p00936
C++
#include <iostream> #include <cmath> #define rep(i,n) for(int i=0;i<n;++i) using namespace std; double r[1010],x[1010]; const double eps=1e-6; const double inf=1e9; bool cross(int m,double cx,double cy){ rep(i,m){ double d=0.0; d+=1.0*(x[i]-cx)*(x[i]-cx); d+=1.0*(r[i]-cy)*(r[i]-cy); double rr=(r[i]+r[m])*(r...
a.cc: In function 'int main()': a.cc:46:9: error: 'assert' was not declared in this scope 46 | assert(ans<inf); | ^~~~~~ a.cc:3:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>' 2 | #include <cmath> +++ |+#include <cassert> 3 |...
s395380331
p00936
C++
ing namespace std; int main() { long long int N; cin >> N; long double ans = 0; vector<long double>R( N + 2 ), Len( N + 3 ); for( size_t i = 1; i <= N; i++ ) { cin >> R[i]; } for( size_t i = 1; i < N + 2; i++ ) { long double L = R[i] + R[i - 1]; long double X = R[i] - R[i - 1]; long double Y = sqrtl( L*...
a.cc:1:1: error: 'ing' does not name a type; did you mean 'int'? 1 | ing namespace std; | ^~~ | int a.cc: In function 'int main()': a.cc:5:9: error: 'cin' was not declared in this scope 5 | cin >> N; | ^~~ a.cc:7:9: error: 'vector' was not declared in this scope 7 | ...
s260684513
p00936
C++
#include<iostream> #include<math.h> #include<iomanip> using namespace std; #define REP(i, n) for(int i=0; i<n; i++) int n; double r[500]; double dp[500]; double dis(double r1, double r2){ return sqrt(pow(r1+r2, 2)-pow(r1-r2, 2)); } int main(){ cin >> n; REP(i, n){ cin >> r[i]; } int s...
a.cc:71:2: error: 'javascript' does not name a type 71 | }javascript:void(0) | ^~~~~~~~~~
s520986311
p00937
Java
import java.io.BufferedReader; import java.io.Closeable; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.util.Arrays; import java.util.SortedMap; import java.util.StringTokenizer; import java.util.TreeMap; public class Main { public static boolean[][] mul(final...
Main.java:66: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:66: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s367777465
p00937
C
#include <bits/stdc++.h> #define fo(i,a,b) for (int i = a;i <= b;i ++) using namespace std; const int maxn = 105; int n,m,step[3],t; bitset<60> d[maxn][maxn]; int f[maxn]; bool solve() { bool flag = false; for (int i = 1; i <= n; i++) { int wp = 0; //if (f[i] < 1 << 29) continue; for (int k = 0; k < 3; ...
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory 1 | #include <bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s192570852
p00937
C++
#include <iostream> #include <stdio.h> #include <sstream> #include <string> #include <vector> #include <map> #include <queue> #include <algorithm> #include <set> #include <math.h> #include <utility> #include <stack> #include <string.h> #include <complex> using namespace std; const int INF = 1<<29; const double EPS = 1...
a.cc: In function 'int main()': a.cc:57:5: error: 'bitset' was not declared in this scope 57 | bitset<50> cango[50][1001]; | ^~~~~~ a.cc:15:1: note: 'std::bitset' is defined in header '<bitset>'; this is probably fixable by adding '#include <bitset>' 14 | #include <complex> +++ |+#include <bitset>...
s415532205
p00937
C++
#include <iostream> #include <queue> #include <vector> using namespace std; constexpr int MAX_N = 50; constexpr int MAX_C = 100; constexpr int INF = (1 << 29); vector<int> G[MAX_N], G2[MAX_N][3]; bool visited[MAX_N][MAX_C]; bool dfs(int curr, int goal, int rem) { if (visited[curr][rem]) return 0; visited[cu...
a.cc: In function 'int main()': a.cc:73:5: error: 'memset' was not declared in this scope 73 | memset(visited, 0, sizeof(visited)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <queue> +++ |+#include <cstr...
s358554524
p00937
C++
#include <iostream> #include <vector> using namespace std; int INF = 1000000000; void rec(vector< vector< vector<bool> > > &D, vector< vector<int> > &G, vector<int> d, int v, int n){ int m = 0; for(int i = 0; i < 3; ++i) m = max(m, G[v][i]); for(int i = 0; i < 3; ++i){ for(int j = 0; j < n; ++j){ if(D[i...
a.cc: In function 'int main()': a.cc:78:19: error: no matching function for call to 'max(<brace-enclosed initializer list>)' 78 | else cout << max({G_[0][0],G_[0][1],G_[0][2]}) << endl; | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, fr...
s289070387
p00937
C++
#include <bits/stdc++.h> using namespace std; using ll=long long; using pii=pair<int,int>; #define rep(i,n) for(int i=0;i<n;i++) #define all(a) a.begin(),a.end() #define INF 1e9 using vb=vector<bool>; using vvb=vector<vb>; int main(){ int n,m,a[3]; while(cin>>n>>m>>a[0]>>a[1]>>a[2]){ vvb z(n,vb(n,false)); auto ...
a.cc: In function 'int main()': a.cc:32:17: error: 'vvd' was not declared in this scope; did you mean 'vvb'? 32 | vvd d(n,vb(n,true)); | ^~~ | vvb a.cc:34:25: error: 'd' was not declared in this scope 34 | d&=dd[p][i][j]; | ...
s650281310
p00937
C++
#include <bits/stdc++.h> using namespace std; using ll=long long; using pii=pair<int,int>; #define rep(i,n) for(int i=0;i<n;i++) #define all(a) a.begin(),a.end() #define INF 1e9 using vb=vector<bool>; using vvb=vector<vb>; int main(){ int n,m,a[3]; while(cin>>n>>m>>a[0]>>a[1]>>a[2]){ vvb z(n,vb(n,false)); auto ...
a.cc: In function 'int main()': a.cc:32:17: error: 'vvd' was not declared in this scope; did you mean 'vvb'? 32 | vvd d(n,vb(n,true)); | ^~~ | vvb a.cc:34:25: error: 'd' was not declared in this scope 34 | d&=dd[p][i][j]; | ...
s011507875
p00937
C++
#include <bits/stdc++.h> using namespace std; using ll=long long; using pii=pair<int,int>; #define rep(i,n) for(int i=0;i<n;i++) #define all(a) a.begin(),a.end() #define INF 1e9 using vb=vector<bool>; using vvb=vector<vb>; int main(){ int n,m,a[3]; while(cin>>n>>m>>a[0]>>a[1]>>a[2]){ vvb z(n,vb(n,false)); auto ...
a.cc: In function 'int main()': a.cc:34:26: error: no match for 'operator&=' (operand types are 'vvb' {aka 'std::vector<std::vector<bool> >'} and 'std::vector<bool>::reference') 34 | d&=dd[p][i][j]; | ~^~~~~~~~~~~~~ In file included from /usr/include/x86_64-linux...
s745020852
p00937
C++
#include <bits/stdc++.h> using namespace std; using ll=long long; using pii=pair<int,int>; #define rep(i,n) for(int i=0;i<n;i++) #define all(a) a.begin(),a.end() #define INF 1e9 using vb=vector<bool>; using vvb=vector<vb>; int main(){ int n,m,a[3]; while(cin>>n>>m>>a[0]>>a[1]>>a[2]){ vvb z(n,vb(n,false)); auto ...
a.cc: In function 'int main()': a.cc:34:32: error: no match for 'operator&=' (operand types are 'std::vector<bool>::reference' and 'std::vector<bool>::reference') 34 | d[i][j]&=dd[p][i][j]; | ~~~~~~~^~~~~~~~~~~~~ In file included from /usr/include/x86_64-linux-gn...
s483712308
p00937
C++
#include <bits/stdc++.h> using namespace std; using ll=long long; using pii=pair<int,int>; #define rep(i,n) for(int i=0;i<n;i++) #define all(a) a.begin(),a.end() #define INF 1e9 using vi=vector<int>; using vvi=vector<vi>; int main(){ int n,m,a[3]; while(cin>>n>>m>>a[0]>>a[1]>>a[2]){ vvi z(n,vi(n,0)); auto e=z; ...
a.cc: In lambda function: a.cc:39:95: error: invalid types 'const __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type {aka const int}[int]' for array subscript 39 | rep(p,3) ok&=[=]{bool r=0; rep(j,n) r|=(g.count(j) and d[p][i][j]); return r;}(); | ...
s774021353
p00937
C++
#include <bits/stdc++.h> using namespace std; using ll=long long; using pii=pair<int,int>; #define rep(i,n) for(int i=0;i<n;i++) #define all(a) a.begin(),a.end() #define INF 1e9 using vi=vector<int>; using vvi=vector<vi>; int main(){ int n,m,a[3]; while(cin>>n>>m>>a[0]>>a[1]>>a[2]){ vvi z(n,vi(n,0)); auto e=z; ...
a.cc: In lambda function: a.cc:39:106: error: assignment of read-only variable 'ok' 39 | rep(p,3) [=](bool&){bool r=0; rep(j,n) r|=(g.count(j) and d[p][i][j]); ok&=r;}(ok); | ~...
s150626491
p00937
C++
#include <bits/stdc++.h> using namespace std; using ll=long long; using pii=pair<int,int>; #define rep(i,n) for(int i=0;i<n;i++) #define all(a) a.begin(),a.end() #define INF 1e9 using vi=vector<int>; using vvi=vector<vi>; int main(){ int n,m,a[3]; while(cin>>n>>m>>a[0]>>a[1]>>a[2]){ vvi z(n,vi(n,0)); auto e=z; ...
a.cc: In function 'int main()': a.cc:39:104: error: no match for call to '(main()::<lambda()>) (bool&)' 39 | rep(p,3) [&]{bool r=0; rep(j,n) r|=(g.count(j) and d[p][i][j]); ok&=r;}(ok); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...
s449602459
p00937
C++
#include <bits/stdc++.h> using namespace std; using ll=long long; using pii=pair<int,int>; #define rep(i,n) for(int i=0;i<n;i++) #define all(a) a.begin(),a.end() #define INF 1e9 using vi=vector<int>; using vvi=vector<vi>; vvi matmul(vvi a, vvi b){ int n=a.size(); auto d=vvi(n,vi(n,0)); rep(i,n)rep(j,n)rep(k,n){ ...
a.cc: In function 'vvi matmul(vvi, vvi)': a.cc:16:26: error: 'r' was not declared in this scope 16 | d[i][j]|=r[i][k]*a[k][j]; | ^
s947228914
p00937
C++
#include <bits/stdc++.h> using namespace std; using vi=vector<int>; using vvi=vector<vi>; #define rep(i,n) for(int i=0;i<n;i++) #define all(a) a.begin(),a.end() vvi matmul(vvi a, vvi b){ int n=a.size(); vvi d(n,vi(n,0)); rep(i,n)rep(j,n)rep(k,n) d[i][j]|=a[i][k]&b[k][j]; return d; } unnordered_map<int,vvi> memo; ...
a.cc:15:1: error: 'unnordered_map' does not name a type 15 | unnordered_map<int,vvi> memo; | ^~~~~~~~~~~~~~ a.cc: In function 'vvi matpow(vvi, int)': a.cc:17:16: error: 'memo' was not declared in this scope 17 | return memo[p]=memo.find(p)==memo.end()?p%2?matmul(matpow(a,p-1),a):matmul(matpow(a,p/2)...
s748095224
p00937
C++
#include <bits/stdc++.h> using namespace std; using ll=long long; using vi=vector<int>; using vvi=vector<vi>; #define rep(i,n) for(int i=0;i<n;i++) #define all(a) a.begin(),a.end() using vll=vevtor<ll>; vll matmul(vll a, vvi b){ int n=a.size(); vll d(n,0); vll r(n,vi(n,0)); rep(i,n)rep(j,n){ d[j]|=b[j]&(1<<(n-i-...
a.cc:8:11: error: 'vevtor' does not name a type 8 | using vll=vevtor<ll>; | ^~~~~~ a.cc:10:1: error: 'vll' does not name a type; did you mean 'll'? 10 | vll matmul(vll a, vvi b){ | ^~~ | ll a.cc:23:8: error: 'vll' was not declared in this scope; did you mean 'll'? 23 | vector<vll> ...
s924026210
p00937
C++
#include <bits/stdc++.h> using namespace std; using ll=long long; using vi=vector<int>; using vvi=vector<vi>; #define rep(i,n) for(int i=0;i<n;i++) #define all(a) a.begin(),a.end() using vll=vector<ll>; vll matmul(vll a, vvi b){ int n=a.size(); vll d(n,0); vll r(n,vi(n,0)); rep(i,n)rep(j,n){ d[j]|=b[j]&(1<<(n-i-...
a.cc: In function 'vll matmul(vll, vvi)': a.cc:13:24: error: no matching function for call to 'std::vector<long long int>::vector(int&, vi)' 13 | vll r(n,vi(n,0)); | ^ In file included from /usr/include/c++/14/vector:66, from /usr/include/c++/14/functional:64, ...
s408525185
p00937
C++
#include <bits/stdc++.h> using namespace std; using ll=long long; using vi=vector<int>; using vvi=vector<vi>; #define rep(i,n) for(int i=0;i<n;i++) #define all(a) a.begin(),a.end() using vll=vector<ll>; vll matmul(vll a, vvi b){ int n=a.size(); vll d(n,0); vll r(n,0); rep(i,n)rep(j,n){ d[j]|=b[j]&(1<<(n-i-1)); ...
a.cc: In function 'vll matmul(vll, vvi)': a.cc:15:27: error: no match for 'operator&' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<std::vector<int> >, std::vector<int> >::value_type' {aka 'std::vector<int>'} and 'int') 15 | d[j]|=b[j]&(1<<(n-i-1)); In file included from /usr/include/x...
s725183781
p00937
C++
#include <bits/stdc++.h> using namespace std; using ll=long long; using vi=vector<int>; using vvi=vector<vi>; #define rep(i,n) for(int i=0;i<n;i++) #define all(a) a.begin(),a.end() using vll=vector<ll>; vll matmul(vll a, vll b){ int n=a.size(); vll d(n,0); vll r(n,0); rep(i,n)rep(j,n){ d[j]|=b[j]&(1<<(n-i-1)); ...
a.cc: In function 'vll matmul(vll, vll)': a.cc:18:21: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type {aka long long int}[int]' for array subscript 18 | r[i][j]=!!(c[i]&d[j]); | ^ a.cc:18:28: error: 'c' was not declar...
s269217806
p00937
C++
#include <bits/stdc++.h> using namespace std; using ll=long long; using vi=vector<int>; using vvi=vector<vi>; #define rep(i,n) for(int i=0;i<n;i++) #define all(a) a.begin(),a.end() using vll=vector<ll>; vll matmul(vll a, vll b){ int n=a.size(); vll d(n,0); vll r(n,0); rep(i,n)rep(j,n){ d[j]|=b[j]&(1<<(n-i-1)); ...
a.cc: In function 'vll matmul(vll, vll)': a.cc:18:21: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type {aka long long int}[int]' for array subscript 18 | r[i][j]=!!(a[i]&d[j]); | ^
s391188152
p00938
C++
#include<bits/stdc++.h> #define N 1005 using namespace std; typedef pair<int,int> P; typedef pair<P,int> P1; int n,w,d,x,y,ans; vector<P1> v; char f; stack<P> q; bool used[N]; void add_point(int num){ if(f=='N'){ if(x+y<d)v.push_back(P1(P(x+y+w*2+d,0),num)); else v.push_back(P1(P(x+y-d,0),num)); if(w+y-x...
a.cc: In function 'void solve()': a.cc:47:5: error: 'useds' was not declared in this scope; did you mean 'used'? 47 | useds[v[i].second]=true; | ^~~~~ | used
s426978891
p00938
C++
#include<bits/stdc++.h> #define N 1005 using namespace std; typedef pair<int,int> P; typedef pair<P,int> P1; int n,w,d,x,y,ans; vector<P1> v; char f; stack<P> q; bool used[N]; void add_point(int num){ if(f=='N'){ if(x+y<d)v.push_back(P1(P(x+y+w*2+d,0),num)); else v.push_back(P1(P(x+y-d,0),num)); if(w+y-x...
a.cc: In function 'void solve()': a.cc:52:9: error: 'useds' was not declared in this scope; did you mean 'used'? 52 | useds[v[idx].second]=true; | ^~~~~ | used
s797694959
p00939
C++
#include <bits/stdc++.h> #define _overload(_1,_2,_3,name,...) name #define _rep(i,n) _range(i,0,n) #define _range(i,a,b) for(int i=(int)(a);i<(int)(b);++i) #define rep(...) _overload(__VA_ARGS__,_range,_rep,)(__VA_ARGS__) #define _rrep(i,n) _rrange(i,n,0) #define _rrange(i,a,b) for(int i=(int)(a)-1;i>=(int)(b);--i)...
a.cc: In function 'll calc()': a.cc:80:18: error: conversion from 'int [10]' to non-scalar type 'vi' {aka 'std::vector<int>'} requested 80 | vi cnt_org = cnt; | ^~~ a.cc:96:9: error: incompatible types in assignment of 'vi' {aka 'std::vector<int>'} to 'int [10]' 96 | cnt = cnt_org; ...
s476955419
p00939
C++
#include<bits/stdc++.h> using namespace std; #define SLL(a) scanf("%lld",&a) #define LL long long int #define mp make_pair LL n,ss,pp,dp[15][3][130][30004],val[30004]; int dg[15],l,uid,tc,vis[15][3][130][30004]; //vector<int>dg; char ch[15]; map< pair< pair<int,int> , pair<int,LL> >,LL >MP; map<LL,int> hs; LL go(int ...
a.cc: In function 'int main()': a.cc:66:11: error: 'gets' was not declared in this scope; did you mean 'getw'? 66 | while(gets(ch)) | ^~~~ | getw
s404513245
p00939
C++
#include<iostream> #include<list> #include<string> #include<cstring> #include<sstream> #include<cctype> #include<string.h> #include<algorithm> #include<cmath> #include<stack> #include<fstream> #include<cstdlib> #include<vector> #include<map> #include<set> #include<utility> #include<iomanip> #include<queue> using namesp...
a.cc: In function 'int main()': a.cc:143:11: error: 'gets' was not declared in this scope; did you mean 'getw'? 143 | while(gets(ch)) | ^~~~ | getw
s452551260
p00939
C++
#include<iostream> #include<list> #include<string> #include<cstring> #include<sstream> #include<cctype> #include<string.h> #include<algorithm> #include<cmath> #include<stack> #include<fstream> #include<cstdlib> #include<vector> #include<map> #include<set> #include<utility> #include<iomanip> #include<queue> using namesp...
a.cc: In function 'int main()': a.cc:143:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 143 | gets(ch); | ^~~~ | getw
s324065306
p00943
C
#include <bits/stdc++.h> using namespace std; #define LL long long int N,M,x,y,pt; LL b[50]; int C[50]; int st[50],ne[5010],go[5010]; class rec{ public: int x,l; LL d; bool operator < (const rec &X)const{ return l<X.l; } bool operator > (const rec &X)const{ return l>X.l; } }p1,p2; class poi{ public: LL d; ...
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory 1 | #include <bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s318481728
p00943
C++
#include<stdio.h> #include<vector> #include<algorithm> #define INF 0x3f3f3f3f using namespace std; vector<int>G[50]; int w[50],best,cnt[50],vis[50],n,b[50]; void dfs(int u, int pw) { if (pw >= best||pw>b[u])return; b[u] = min(b[u], pw); int tem = 0; vis[u] = 1; if (!cnt[u]) tem += w[u]; cnt[u]++; for (int i = ...
a.cc: In function 'int main()': a.cc:53:9: error: 'memset' was not declared in this scope 53 | memset(b, 0x3f, sizeof b); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include<algorithm> +++ |+#include <cst...
s648561785
p00943
C++
#include<iostream> #include<algorithm> #include<cstring> #include<cstdio> #include<vector> #define mem(a) memset(a,0,sizeof(a)) #define LL long long using namespace std; const int MAXN = 45; int n, m; int weight[MAXN]; int map[MAXN][MAXN]; int vis[MAXN]; int maxn=0; int visflag[MAXN]; int visnode[MAXN][MAXN]; int ans =...
a.cc: In function 'int main()': a.cc:81:40: error: 'INT_MAX' was not declared in this scope 81 | passvalue[i] = INT_MAX; | ^~~~~~~ a.cc:6:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' ...
s821498227
p00946
C
#include<stdio.h> #include<stdlib.h> int main(){ int n,m; scanf("%d %d",&n,%m); int input[m], flag[m]; int i; for(i=1;i<m;i++){ scanf("%d",&input[i]); } for(i=m-1;i>=0;i--){ if(flag[input[i]]==0){ printf("%d\n",input[i]); flag[input[i]]=i; } } for(i=0;i<n;i++){ if(flag[i]...
main.c: In function 'main': main.c:6:20: error: expected expression before '%' token 6 | scanf("%d %d",&n,%m); | ^
s881956919
p00946
C
#include<stdio.h> #include<stdlib.h> int main(){ int n,m; scanf("%d %d",&n,%m); int input[m], flag[n]; int i; for(i=1;i<m;i++){ scanf("%d",&input[i]); } for(i=m-1;i>=0;i--){ if(flag[input[i]]==0){ printf("%d\n",input[i]); flag[input[i]]=i; } } for(i=0;i<n;i++){ if(flag[...
main.c: In function 'main': main.c:6:20: error: expected expression before '%' token 6 | scanf("%d %d",&n,%m); | ^
s697331027
p00946
C
#include<stdio.h> int main(void){ int n,m; int i,j,k; int tmp[]; int req[100001],fin[200001]; scanf("%d %d",&n,&m); for(i=0;i<m;i++){ scanf("%d",&req[i]); } for(i=m;i>=0;i--){ for(j=0;j<i;j++){ if(req[j] == req[i]){ req[j]=0; } } } // putchar('\n'); for(i=0;i<n;i++){ ...
main.c: In function 'main': main.c:6:7: error: array size missing in 'tmp' 6 | int tmp[]; | ^~~
s945154158
p00946
C
#include <bits/stdc++.h> using namespace std; int ar[200005]; int n,m,x; stack<int> st; int main() { while(scanf("%d %d",&n,&m)!=EOF) { for(int i=n; i>0; i--) { ar[i]=0; st.push(i); } for(int i=0; i<m; i++) { scanf("%d",&x); ...
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory 1 | #include <bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s629201555
p00946
C
#include <bits/stdc++.h> using namespace std; #define N 200005 int a[N],flag[N]; int n,m; int main() { cin>>n>>m; for (int i=1;i<=m;++i) scanf("%d",&a[i]); for (int i=m;i;--i) { if (flag[a[i]]) continue; flag[a[i]]=1; printf("%d\n",a[i]); } for (int i=1;i<=n;++i) if (!fla...
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory 1 | #include <bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s726962633
p00946
C
#include<bits/stdc++.h> using namespace std; const int maxn=2*100005; int a[maxn],num=0; bool vis[maxn]; int main() { int n,m; int x; scanf("%d%d",&n,&m); for(int i=1;i<=m;i++){ scanf("%d",&x); a[++num]=x; vis[x]=1; } for(int i=num;i>=1;i--){ printf("%d\n",a[i]); } for(int i=1;i<=n;i++){ if(vis[i]...
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory 1 | #include<bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s859531101
p00946
C
#include<cstdio> #include<iostream> #include<cstring> using namespace std; int n,m,a[200000],b[200000],x; int main() { scanf("%d%d",&n,&m); for (int i=n;i>=1;i--) { a[i]=n-i+1; } for (int i=1;i<=m;i++) { scanf("%d",&x); a[n+i]=x; } for (int i=n+m;i>=1;i--) if (!b[a[i]]) { b[a[i]]=1; printf("%d\n",a[...
main.c:1:9: fatal error: cstdio: No such file or directory 1 | #include<cstdio> | ^~~~~~~~ compilation terminated.
s488852247
p00946
C
#include <stdio.h> #include <algorithm> #include <string.h> #include <iostream> using namespace std; int a[200005], b[100005]; int main() { int n; int m; while (cin >> n >> m) { memset(a, 0, sizeof(a)); memset(b, 0, sizeof(b)); int l = 0; while (m--) { int x; scanf("%d", &x); b[l++] = x; } f...
main.c:2:10: fatal error: algorithm: No such file or directory 2 | #include <algorithm> | ^~~~~~~~~~~ compilation terminated.
s034338923
p00946
C++
#include <deque> #include <iostream> using namespace std; int main(){ int i,n,c,m,buf; cin>>n>>m; deque<int> l(n); for(i=0;i<n;i++){ l[i]=i+1; } for(i=0;i<m;i++){ cin>>c; auto r=find(l.begin(),l.end(),c); buf=(*r); l.erase(r); l.push_front(buf); ...
a.cc: In function 'int main()': a.cc:14:20: error: no matching function for call to 'find(std::deque<int>::iterator, std::deque<int>::iterator, int&)' 14 | auto r=find(l.begin(),l.end(),c); | ~~~~^~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/bits/locale_facets.h:48, ...
s946404523
p00946
C++
#include<stdio.h> #include<stdlib.h> #include<vector> #include<map> #include<utility> using namespace std; bool mycomp1(pair<int,int> a, pair<int,int>b){ return a.second>b.second; } bool mycomp2(pair<int,int> a, pair<int,int>b){ return a.first<b.first; } map<int, int> update; int main(){ int n,m; scanf("%d %d"...
a.cc: In function 'int main()': a.cc:33:14: error: 'sort' is not a member of 'std'; did you mean 'qsort'? 33 | std::sort(requests.begin(), requests.end(), mycomp1); | ^~~~ | qsort a.cc:40:14: error: 'sort' is not a member of 'std'; did you mean 'qsort'? 40 | s...
s505155387
p00946
C++
#include<stdio.h> #include<stdlib.h> #include<vector> #include<map> #include<utility> using namespace std; bool mycomp1(pair<int,int> a, pair<int,int>b){ return a.second>b.second; } bool mycomp2(pair<int,int> a, pair<int,int>b){ return a.first<b.first; } map<int, int> update; int main(){ int n,m; scanf("%d %d"...
a.cc: In function 'int main()': a.cc:33:14: error: 'sort' is not a member of 'std'; did you mean 'qsort'? 33 | std::sort(requests.begin(), requests.end(), mycomp1); | ^~~~ | qsort a.cc:40:14: error: 'sort' is not a member of 'std'; did you mean 'qsort'? 40 | s...
s359915542
p00946
C++
#include<stdio.h> #include<stdlib.h> #include<vector> #include<map> #include<utility> using namespace std; bool mycomp1(pair<int,int> a, pair<int,int>b){ return a.second>b.second; } bool mycomp2(pair<int,int> a, pair<int,int>b){ return a.first<b.first; } map<int, int> update; int main(){ int n,m; scanf("%d %d"...
a.cc: In function 'int main()': a.cc:33:14: error: 'sort' is not a member of 'std'; did you mean 'qsort'? 33 | std::sort(requests.begin(), requests.end(), mycomp1); | ^~~~ | qsort a.cc:40:14: error: 'sort' is not a member of 'std'; did you mean 'qsort'? 40 | s...
s193427889
p00946
C++
#include <iostream> #include <vector> #include <unordered_set> using namespace std; int main(int argc, char **argv) { int nLength, nRequests; cin >> nLength >> nRequests; vector<int> tmpRequests; tmpRequests.reserve(nRequests); for (int i = 0; i < nRequests; i++) { int query; cin >> query; tmpRequests....
a.cc: In function 'int main(int, char**)': a.cc:33:25: error: no matching function for call to 'find(std::unordered_set<int>::iterator, std::unordered_set<int>::iterator, int&)' 33 | if (find(requestSet.begin(), requestSet.end(), query) == requestSet.end()) | ~~~~^~~~~~~~~~~...
s719360702
p00946
C++
#include <iostream> #include <vector> #include <unordered_set> using namespace std; int main(int argc, char **argv) { int nLength, nRequests; cin >> nLength >> nRequests; vector<int> tmpRequests; tmpRequests.reserve(nRequests); for (int i = 0; i < nRequests; i++) { int query; cin >> query; tmpRequests....
a.cc: In function 'int main(int, char**)': a.cc:33:25: error: no matching function for call to 'find(std::unordered_set<int>::iterator, std::unordered_set<int>::iterator, int&)' 33 | if (find(requestSet.begin(), requestSet.end(), query) == requestSet.end()) | ~~~~^~~~~~~~~~~...
s496991588
p00946
C++
#include <iostream> #include <vector> #include <unordered_set> using namespace std; int main(int argc, char **argv) { int nLength, nRequests; cin >> nLength >> nRequests; vector<int> tmpRequests; tmpRequests.reserve(nRequests); for (int i = 0; i < nRequests; i++) { int query; cin >> query; tmpRequests....
a.cc: In function 'int main(int, char**)': a.cc:33:25: error: no matching function for call to 'find(std::unordered_set<int>::iterator, std::unordered_set<int>::iterator, int&)' 33 | if (find(requestSet.begin(), requestSet.end(), query) == requestSet.end()) | ~~~~^~~~~~~~~~~...
s188515436
p00946
C++
#include <iostream> #include <vector> #include <unordered_set> using namespace std; int main(int argc, char **argv) { int nLength, nRequests; cin >> nLength >> nRequests; vector<int> tmpRequests; tmpRequests.reserve(nRequests); for (int i = 0; i < nRequests; i++) { int query; cin >> query; tmpRequests....
a.cc: In function 'int main(int, char**)': a.cc:33:25: error: no matching function for call to 'find(std::unordered_set<int>::iterator, std::unordered_set<int>::iterator, int&)' 33 | if (find(requestSet.begin(), requestSet.end(), query) == requestSet.end()) | ~~~~^~~~~~~~~~~...
s770659406
p00946
C++
#include <iostream> #include <vector> #include <set> using namespace std; int main(int argc, char **argv) { int nLength, nRequests; cin >> nLength >> nRequests; vector<int> tmpRequests; tmpRequests.reserve(nRequests); for (int i = 0; i < nRequests; i++) { int query; cin >> query; tmpRequests.push_back(...
a.cc: In function 'int main(int, char**)': a.cc:27:20: error: 'class std::set<int>' has no member named 'reserve' 27 | requestSet.reserve(nRequests); | ^~~~~~~ a.cc:33:25: error: no matching function for call to 'find(std::set<int>::iterator, std::set<int>::iterator, int&)' 33 | ...
s790182800
p00946
C++
#include <iostream> #include <vector> #include <set> using namespace std; int main(int argc, char **argv) { int nLength, nRequests; cin >> nLength >> nRequests; vector<int> tmpRequests; tmpRequests.reserve(nRequests); for (int i = 0; i < nRequests; i++) { int query; cin >> query; tmpRequests.push_back(...
a.cc: In function 'int main(int, char**)': a.cc:32:25: error: no matching function for call to 'find(std::set<int>::iterator, std::set<int>::iterator, int&)' 32 | if (find(requestSet.begin(), requestSet.end(), query) == requestSet.end()) | ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...
s842095979
p00946
C++
#include <iostream> #include <vector> #include <set> using namespace std; int main(int argc, char **argv) { int nLength, nRequests; cin >> nLength >> nRequests; vector<int> tmpRequests; tmpRequests.reserve(nRequests); for (int i = 0; i < nRequests; i++) { int query; cin >> query; tmpRequests.push_back(...
a.cc: In function 'int main(int, char**)': a.cc:32:25: error: no matching function for call to 'find(std::set<int>::iterator, std::set<int>::iterator, int&)' 32 | if (find(requestSet.begin(), requestSet.end(), query) == requestSet.end()) | ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...
s742180832
p00946
C++
#include <vector> #include <cstdio> int main(){ scanf("%d",&n,&k); std::vector<int>v(n+1),w(k); for(int i=0;i<k;i++)scanf("%d",&w[k]); for(int i=k-1;i>=0;i--)if(!v[w[k]])v[w[k]]=1,printf("%d\n",w[k]); for(int i=1;i<=n;i++)if(!v[i])printf("%d\n",i); }
a.cc: In function 'int main()': a.cc:4:21: error: 'n' was not declared in this scope 4 | scanf("%d",&n,&k); | ^ a.cc:4:24: error: 'k' was not declared in this scope 4 | scanf("%d",&n,&k); | ^
s013732890
p00946
C++
test
a.cc:1:1: error: 'test' does not name a type 1 | test | ^~~~
s269182903
p00946
C++
#include <bits/stdc++.h> #define _overload(_1,_2,_3,name,...) name #define _rep(i,n) _range(i,0,n) #define _range(i,a,b) for(int i=(int)(a);i<(int)(b);++i) #define rep(...) _overload(__VA_ARGS__,_range,_rep,)(__VA_ARGS__) #define _rrep(i,n) _rrange(i,n,0) #define _rrange(i,a,b) for(int i=(int)(a)-1;i>=(int)(b);--i)...
a.cc: In function 'int main()': a.cc:69:17: error: 'e' was not declared in this scope 69 | if(used[e]) continue; | ^ a.cc:70:17: error: 'e' was not declared in this scope 70 | cout << e + 1 << endl; | ^
s181090274
p00947
C
#include <cstdio> #include <algorithm> using namespace std; int a[10][10], b[5]; int cale() { int i = a[0][b[4]]; for (int k = 3; k >= 1; k--) i = a[i][b[k]]; return i; } int cal() { return a[cale()][b[0]]; } bool detected(int x) { for (int i = 1; i < 5; i++) { b[i] = x % 10; x /= 10; } b[0] = cale(); fo...
main.c:1:10: fatal error: cstdio: No such file or directory 1 | #include <cstdio> | ^~~~~~~~ compilation terminated.
s873363131
p00947
C
#include<iostream> #include<cstdio> #include<cstring> #include<cstdlib> #include<cmath> #include<algorithm> #include<vector> #include<queue> #include<set> #include<stack> #define inf 0x3f3f3f3f #define esp 1e-7 using namespace std; int read(){ int x=0,f=1;char ch=getchar(); while(ch<'0'||ch>'9'){if(ch=='-')f=-1...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s085044912
p00947
C
#include<bits/stdc++.h> #define pb push_back using namespace std; typedef long long ll; int a[11][11]; int check(int i,int b,int c,int d,int e) { int temp; temp=a[0][i]; temp=a[temp][b]; temp=a[temp][c]; temp=a[temp][d]; temp=a[temp][e]; return temp; } int vm(int i,int b,int c,int d) { int temp; temp=a[0][i]; ...
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory 1 | #include<bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s237957642
p00947
C
#include <iostream> #include <cstring> #include <string> #include <set> #include <cstdio> #include <algorithm> using namespace std; set<int> F; set<int> G; char D[1000000][5]; int main() { int A[12][12]; memset(A,0,sizeof(A)); for(int r=0;r<=9;r++) for(int c=0;c<=9;c++) { scanf("%d",&...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s188289818
p00947
C
#include<stdio.h> int main() { int mat[SIZE][SIZE]; int i,j; int fault=0; int a,b,c,d,e; int result=0; for(i=0;i<10;i++) { for(j=0;j<10;j++) { scanf("%d",&mat[i][j]); } } for(a=0;a<10;a++) { for(b=0;b<10;b++) { for(c=0;c<10;c++) { for(d=0;d<10;d++) { fau...
main.c: In function 'main': main.c:4:11: error: 'SIZE' undeclared (first use in this function) 4 | int mat[SIZE][SIZE]; | ^~~~ main.c:4:11: note: each undeclared identifier is reported only once for each function it appears in
s161051062
p00947
C
#include<stdio.h> #include<windows.h> int count=0; void input(int table[10][10]){ int i,j; for(i=0;i<10;i++){ for(j=0;j<10;j++){ scanf("%d",&table[i][j]); } } } void output(int table[10][10]){ int i,j; printf("output\n"); for(i=0;i<10;i++){ for(j=0;j<10;j++){ printf("%d ",table[i][j]); } printf(...
main.c:2:9: fatal error: windows.h: No such file or directory 2 | #include<windows.h> | ^~~~~~~~~~~ compilation terminated.
s040060205
p00947
C++
#include <string> #include <set> #include <cstdio> using namespace std; const int M=4; int m[10][10]; char s0[M+1]; int chk(const string &s){ int d=0; for(int i=0;i<4;i++)d=m[d][s[i]-'0']; return d; } bool correct(const string &s){ return chk(s)+'0'==s[M]; } int main(){ set<string>se; for(int i=0;i<10;i++)for(int...
a.cc: In function 'int main()': a.cc:25:23: error: 'count_if' was not declared in this scope 25 | printf("%d\n",count_if(se.begin(),se.end(),[&](string s)->bool{ | ^~~~~~~~
s005816984
p00947
C++
#include <string> #include <set> #include <cstdio> #include <algorithm> using namespace std; const int M=4; int m[10][10]; char s0[M+2]; int chk(const string &s){ int d=0; for(int i=0;i<4;i++)d=m[d][s[i]-'0']; return d; } bool correct(const string &s){ return d[chk(s)][s[M]-'0']==0; } int main(){ set<string>se; f...
a.cc: In function 'bool correct(const std::string&)': a.cc:15:16: error: 'd' was not declared in this scope 15 | return d[chk(s)][s[M]-'0']==0; | ^
s377285622
p00947
C++
#include "bits/stdc++.h" using namespace std; //#define int long long #define DBG 1 #define dump(o) if(DBG){cerr<<#o<<" "<<(o)<<" ";} #define dumpl(o) if(DBG){cerr<<#o<<" "<<(o)<<endl;} #define dumpc(o) if(DBG){cerr<<#o; for(auto &e:(o))cerr<<" "<<e;cerr<<endl;} #define rep(i,a,b) for(int i=(a);i<(b);i++) #define rrep...
a.cc: In function 'int check(std::string&)': a.cc:34:32: error: cannot bind non-const lvalue reference of type 'std::string&' {aka 'std::__cxx11::basic_string<char>&'} to an rvalue of type 'std::__cxx11::basic_string<char>' 34 | return table[e(s.substr(0, 4)) - '0'][s[4] - '0']; | ...
s587427042
p00947
C++
#include "bits/stdc++.h" using namespace std; //#define int long long #define DBG 1 #define dump(o) if(DBG){cerr<<#o<<" "<<(o)<<" ";} #define dumpl(o) if(DBG){cerr<<#o<<" "<<(o)<<endl;} #define dumpc(o) if(DBG){cerr<<#o; for(auto &e:(o))cerr<<" "<<e;cerr<<endl;} #define rep(i,a,b) for(int i=(a);i<(b);i++) #define rrep...
a.cc: In function 'int check(const std::string&)': a.cc:34:32: error: cannot bind non-const lvalue reference of type 'std::string&' {aka 'std::__cxx11::basic_string<char>&'} to an rvalue of type 'std::__cxx11::basic_string<char>' 34 | return table[e(s.substr(0, 4)) - '0'][s[4] - '0']; | ...
s525955647
p00947
C++
#include<cstdio> #include<iostream> #include<cstring> #include<vector> #include<queue> #include<set> #include<cmath> #include<algorithm> #include<map> #include<cstdlib> #include<stack> #include<sstream> #include<string> #include<cassert> #include<ctime> #include<functional> #include<deque> #include<bitset> using namesp...
a.cc: In function 'int main()': a.cc:48:32: error: 'col' was not declared in this scope; did you mean 'cosl'? 48 | maxlen[col] = max(maxlen[col], (int)st.size()); | ^~~ | cosl
s911125200
p00948
Java
// http://icpc.iisf.or.jp/past-icpc/regional2016/problems.pdf // problem C // ng: 15-34 import java.util.*; public class C { public static void main(String[] args) { // int n = 4; // int arms[] = {1, 3, 2}; Scanner scan = new Scanner(System.in); String line = scan.nextLine(); int n = Integer.pa...
Main.java:7: error: class C is public, should be declared in a file named C.java public class C { ^ 1 error
s349110105
p00948
Java
//61511457 import java.util.*; public class C { public static void main(String[] args) { Scanner scan = new Scanner(System.in); String str = scan.nextLine(); String[] div = str.split(" ", 0); int n = Integer.parseInt(div[0]); int m = Integer.parseInt(div[1]); boolean[][] map = new boolean[n][n...
Main.java:3: error: class C is public, should be declared in a file named C.java public class C { ^ 1 error
s788256505
p00948
Java
//61511457 import java.util.*; public class 1369 { public static void main(String[] args) { Scanner scan = new Scanner(System.in); String str = scan.nextLine(); String[] div = str.split(" ", 0); int n = Integer.parseInt(div[0]); int m = Integer.parseInt(div[1]); boolean[][] map = new boolean[n...
Main.java:3: error: <identifier> expected public class 1369 { ^ 1 error
s546936762
p00948
C
#include<cstdio> #include<iostream> #include<cmath> #include<cstring> #include<algorithm> #include<queue> using namespace std; int main(){ cout<<1<<endl; return 0; }
main.c:1:9: fatal error: cstdio: No such file or directory 1 | #include<cstdio> | ^~~~~~~~ compilation terminated.
s717768382
p00948
C++
#include <iostream> #include <vector> #define rep(i,n) for(int i = 0;i < n;i++) using namespace std; int n, m; int main(){ cin >> n >> m; int cnt[200100] = {}; vector<pair<int,int> > vp; bool f[200100] = {}; fill(cnt,cnt+n,1); rep(i,m){ int x, y; cin >> x >> y; vp.pus...
a.cc: In function 'int main()': a.cc:21:5: error: 'sort' was not declared in this scope; did you mean 'short'? 21 | sort(vp.begin(),vp.end()); | ^~~~ | short
s875437609
p00948
C++
#include <iostream> #include <vector> #define rep(i,n) for(int i = 0;i < n;i++) using namespace std; int n, m; int main(){ cin >> n >> m; int cnt[200100] = {}; vector<pair<int,int> > vp; bool f[200100] = {}; fill(cnt,cnt+n,1); rep(i,m){ int x, y; cin >> x >> y; vp.pus...
a.cc: In function 'int main()': a.cc:21:5: error: 'sort' was not declared in this scope; did you mean 'short'? 21 | sort(vp.begin(),vp.end()); | ^~~~ | short