submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s697435518
p03666
C++
#include <bits/stdc++.h> #define ll long long; int main(){ ll n, a, b, l, r; cin>>n>>a>>b>>l>>r; int flag = 1; ll x, y; for(ll i = 0; i <= n-1;i++){ x = a+l*i-(n-i-1)*r; y = a+r*i-(n-i-1)*l; if(x <= b && b <= y){ flag = 0; } } printf("%s\n", fla...
a.cc: In function 'int main()': a.cc:3:17: error: declaration does not declare anything [-fpermissive] 3 | #define ll long long; | ^~~~ a.cc:6:5: note: in expansion of macro 'll' 6 | ll n, a, b, l, r; | ^~ a.cc:6:8: error: 'n' was not declared in this scope; did you mean 'yn'...
s664116161
p03666
C++
//#pragma GCC target("avx2") //#pragma GCC optimization("O3") //#pragma GCC optimization("unroll-loops") //assert(q==w) если q!=w --> runtime error #include <bits/stdc++.h> #define pb push_back #define F first #define S second #define all(x) x.begin(),x.end() #define ub upper_bound #define lb lower_bound #define bit _...
a.cc: In function 'int main()': a.cc:51:12: error: expected primary-expression before ')' token 51 | if(){ | ^
s685791706
p03666
C++
#include <iostream> using namespace std; int main(){ long long N, A, B, C, D; cin >> N >> A >> B >> C >> D; // 深さN-1のノードに対して判定処理を行う。 for(long long i = 0; i < N; ++i){ // lower_bound long long lb = A + i * C + (i - (n - 1)) * D; // upper_bound long long ub = A + (i - (n -...
a.cc: In function 'int main()': a.cc:10:42: error: 'n' was not declared in this scope 10 | long long lb = A + i * C + (i - (n - 1)) * D; | ^
s137717581
p03666
C++
#include <iostream> using namespace std; int main(){ long long N, A, B, C, D; cin >> N >> A >> B >> C >> D; // 深さN-1のノードに対して判定処理を行う。 for(long long i = 0; i < N; ++i){ // lower_bound long long lb = A + i * C + (i - (n - 1)) * D; // upper_bound long long ub = a + (i - (n -...
a.cc: In function 'int main()': a.cc:10:42: error: 'n' was not declared in this scope 10 | long long lb = A + i * C + (i - (n - 1)) * D; | ^ a.cc:12:24: error: 'a' was not declared in this scope 12 | long long ub = a + (i - (n - 1)) * C + i * D; ...
s365316676
p03666
C++
\#include <bits/stdc++.h> using namespace std; using ll = long long; using db = double; #define fi first #define se second #define pb push_back #define all(v) (v).begin(),(v).end() #define siz(v) (ll)(v).size() #define rep(i,n) for(ll i=0;i<(ll)(n);i++) #define repn(i,n) for(ll i=0;i<=(ll)(n);i++) typedef pair<int,int>...
a.cc:1:1: error: stray '\' in program 1 | \#include <bits/stdc++.h> | ^ a.cc:1:2: error: stray '#' in program 1 | \#include <bits/stdc++.h> | ^ a.cc:1:3: error: 'include' does not name a type 1 | \#include <bits/stdc++.h> | ^~~~~~~ a.cc:12:9: error: 'pair' does not name a type 12 | t...
s194316216
p03666
C++
tr(); } const int MOD = 1e9+7; const LL LINF = 1001002003004005006ll; const int INF = 1001001001; signed main(int argc, char const *argv[]) { cin.tie(0); ios::sync_with_stdio(false); LL N,A,B,C,D; cin >> N >> A>>B>>C>>D; N--; LL dif = abs(A-B); bool ok = 0; for(LL i = 0; i <= N/2; i++){ ...
a.cc:1:5: error: expected constructor, destructor, or type conversion before ';' token 1 | tr(); | ^ a.cc:2:1: error: expected declaration before '}' token 2 | } | ^ a.cc:5:7: error: 'LL' does not name a type 5 | const LL LINF = 1001002003004005006ll; | ^~ a.cc: In function 'int ...
s801403910
p03666
C++
#include <bits/stdc++.h> using namespace std; #define int long long signed main(){ int n,a,b,c,d; cin>>n>>a>>b>>c>>d; bool flg=false; for(int m=0;m<n;m++){ if(m*c+(n-1-m)*d<=b-a && b-a<=d*m-(n-1-m)*c)flg=true; cout<<(flg?"YES":"NO")<<endl; }
a.cc: In function 'int main()': a.cc:16:2: error: expected '}' at end of input 16 | } | ^ a.cc:5:14: note: to match this '{' 5 | signed main(){ | ^
s566277228
p03666
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> pa; #define MM 1000000000 #define MOD MM + 7 #define MAX 10100000 #define INF 1e15 #define MAP 110 #define initial_value -1 #define LINF 1LL << 60 #define Pair pair<int, int> #define chmax(a, b) (a < b ? a = b : 0) #define chmin(a,...
a.cc: In function 'int main()': a.cc:24:18: error: 'diff' was not declared in this scope 24 | if(mi <= diff && diff <= ma) ans = true; | ^~~~
s939879516
p03666
C++
#include <cstdio> #include <cstdlib> #include <iostream> using namespace std; typedef long long LL; int main() { LL n, a, b, c, d; scanf("%lld%lld%lld%lld%lld", &n, &a, &b, &c, &d); for (register int i = 0; i < n; i++) { LL maxv = a + i*d - (n-i-1)*c; LL minv = a + i*c - (n-i-1)*d; if (minv <= b && b <= max...
a.cc: In function 'int main()': a.cc:12:27: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 12 | for (register int i = 0; i < n; i++) | ^ a.cc:16:60: error: expected primary-expression before 'return' 16 | if (minv <= b && b...
s338652744
p03666
C++
#include <bits/stdc++.h> using namespace std; //repetition #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define rep(i, n) for(int i = 0; i < (int)(n); i++) //container util #define all(x) (x).begin(),(x).end() //typedef typedef long long ll; typedef vector<int> VI; typedef vector<VI> VVI; typedef vector<ll> VLL; type...
a.cc: In function 'int main()': a.cc:31:9: error: 'n' was not declared in this scope 31 | rep(i,n+1){ | ^ a.cc:6:44: note: in definition of macro 'rep' 6 | #define rep(i, n) for(int i = 0; i < (int)(n); i++) | ^ a.cc:32:13: error: 'c' was not decla...
s287215660
p03666
C++
/** SXR0aXAkI0JwbXptI3FhI3Z3I293bCNqY2IjUG0jMCNicG0jVHFkcXZvLyNCcG0jQW10bjBhY2phcWFicXZvLyNNYm16dml0MSNWdyNhdGN1am16I2tpdiNhbXF9bSNQcXUjVnd6I0F0bW14MSNQcWEjaXptI2l0dCNicHF2b2EjUXYjYnBtI3BtaWRtdmEjaXZsI3d2I21pemJwMSNFcHcjcWEjYnBtem0ja2l2I3F2Ym16a21sbSNRdiNQcWEjeHptYW12a20jbXtrbXhiI0lhI3BtI3htenVxYmJtYnBHI1BtI3N2d2VtYnAj...
a.cc:36:13: error: '__int64' does not name a type; did you mean '__int64_t'? 36 | #define int __int64 | ^~~~~~~ a.cc:67:1: note: in expansion of macro 'int' 67 | int go(int x) { | ^~~ a.cc:71:2: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 71 | main() { ...
s474742436
p03666
C++
#include <bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair #define fi first #define se second #define FOR(i, a, b) for(int i=(a);i<(b);i++) #define REP(i, n) FOR(i, 0, n) #define RFOR(i, a, b) for(int i=(a);i>=(b);i--) #define RREP(i, n) RFOR(i, n, 0) #define MFOR(i, m) for(auto i=(m).beg...
a.cc: In function 'int main()': a.cc:45:9: error: ordered comparison of pointer with integer zero ('int' and 'void*') 45 | (0 < && diff < c) || | ~~^~~~~~~~~ a.cc:45:14: error: label 'diff' used but not defined 45 | (0 < && diff < c) || | ^~~~
s295034529
p03666
C++
#include<cstdio> #include<cstring> #include<cmath> #include<algorithm> #define ll long long using namespace std; int main() { ll n,a,b,c,d,i,x1,x2,y1,y2; scanf("%lld%lld%lld%lld%lld",&n,&a,&b,&c,&d);n--; for(i=0;i<=n;i++) { x1=i*c;x2=(n-i)*d;y1=-i*c;y2=-(n-i)*d; if(y1+y2<=b-a&&x1+x2>=b-a) break } if(i<=n||...
a.cc: In function 'int main()': a.cc:15:56: error: expected ';' before '}' token 15 | if(y1+y2<=b-a&&x1+x2>=b-a) break | ^ | ; 16 | } | ~ ...
s840818421
p03666
C++
#include<iostream> using namespace std; int main(){ int N,A,B,C,D; cin>>N>>A>>B>>C>>D; int max=0; if(C>D) max=C-1; else max=D; if((B-A)/N<max) cout<<"Yes"; else cout<<"No""; }
a.cc:10:16: warning: missing terminating " character 10 | else cout<<"No""; | ^ a.cc:10:16: error: missing terminating " character 10 | else cout<<"No""; | ^~ a.cc: In function 'int main()': a.cc:10:16: error: expected ';' before '}' token 10 | else cout<<"No""; ...
s376603155
p03666
C++
#include <iostream> using namespace std; #include <iostream> #include <cmath> #include <cstdio> #include <algorithm> #include <random> #include <string> #include <bitset> #include <map> #include <vector> #include <stack> #include <queue> #include <list> #include <set> #include <cstring> #include <cstdlib> #include <cct...
a.cc:80:51: error: extended character “ is not valid in an identifier 80 | if(b >= a -d*(n-1) && b <= a + d*(n-1)) {cout << “YES” << endl; | ^ a.cc:80:51: error: extended character ” is not valid in an identifier a.cc:82:9: error: extended character “ is not v...
s209477777
p03666
C++
#include <iostream> using namespace std; int main() { long long n, a, b, c, d; cin >> n >> a >> b >> c >> d; cout << ((b <= a + d * (n - 1 ) && b >= a - d * (n - 1)? "YES" : "NO") << endl; return 0; } #include <iostream> #include <cmath> #include <cstdio> #include <algorithm> #include <random> #include <string> #inc...
a.cc:89:51: error: extended character “ is not valid in an identifier 89 | if(b >= a -d*(n-1) && b <= a + d*(n-1)) {cout << “YES” << endl; | ^ a.cc:89:51: error: extended character ” is not valid in an identifier a.cc:91:9: error: extended character “ is not v...
s854104862
p03666
C++
#include <iostream> using namespace std; int main() { long long n, a, b, c, d; cin >> n >> a >> b >> c >> d; cout << ((b <= a + d * (n - 1 ) && b >= a - d * (n - 1)? "YES" : "NO") << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:72: error: invalid operands of types 'const char*' and '<unresolved overloaded function type>' to binary 'operator<<' 8 | cout << ((b <= a + d * (n - 1 ) && b >= a - d * (n - 1)? "YES" : "NO") << endl; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...
s607803825
p03666
C++
#include <iostream> using namespace:std int main() { long long n, a, b, c, d; cin >> n >> a >> b >> c >> d; cout << ((b <= a + d * (n - 1 ) && b >= a - d * (n - 1)? "YES" : "NO") << endl; return 0; }
a.cc:2:16: error: expected identifier before ':' token 2 | using namespace:std | ^ a.cc:2:16: error: expected ';' before ':' token 2 | using namespace:std | ^ | ; a.cc:2:16: error: expected unqualified-id before ':' token
s859017130
p03666
C++
#include <iostream> using namespace:std int main() { long long n, a, b, c, d; cin >> n >> a >> b >> c >> d; cout << ((b <= a + d * (n - 1 ) && b >= a - d * (n - 1)? "YES" : "NO") << endl; return 0 }
a.cc:2:16: error: expected identifier before ':' token 2 | using namespace:std | ^ a.cc:2:16: error: expected ';' before ':' token 2 | using namespace:std | ^ | ; a.cc:2:16: error: expected unqualified-id before ':' token
s525580363
p03666
C
#include<stdio.h> int main() { long n,a,b,c,d,e,N,x,i; scanf_s("%ld,%ld,%ld,%ld,%ld", &n,&a,&b,&c,&d); e = d - c; n--; N = n / 2; if (a - b >= 0) { x = a - b; } else { x = b - a; } if (n % 2 == 0) { for (i = 0; i <= N; i++) { if (x <= e*N || (c*2*(N-i) -e*i)<= x <= d*2*(N-i)+e*i) { printf("YES")...
main.c: In function 'main': main.c:6:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 6 | scanf_s("%ld,%ld,%ld,%ld,%ld", &n,&a,&b,&c,&d); | ^~~~~~~ | scanf
s606534988
p03666
C++
491995 412925347 825318103 59999126 59999339
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 491995 412925347 825318103 59999126 59999339 | ^~~~~~
s754222007
p03666
C++
#include <algorithm> #include <iostream> #include <cstdio> #include <map> #include <numeric> #include <cmath> #include <set> #include <sstream> #include <string> #include <vector> #include <queue> #include <stack> #include <complex> #include <string.h> #include <unordered_set> #include <unordered_map> #include <bitset>...
a.cc: In function 'bool solve()': a.cc:53:20: error: no matching function for call to 'max(int, ll)' 53 | for (ll k = max(0, L / a); k <= R / a + 1; k++) { | ~~~^~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from a.cc:1: /usr/include/c++/14/bits/stl_algo...
s073709473
p03666
C++
#define REP(i, n) for (int i = 0; i < (n); i++) #define RREP(i, a, b) for (int i = a; i < (b); i++) #define FOR(i, n) for (int i = n; i >= 0; i--) #include <algorithm> #include <cmath> #include <cstdio> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <stri...
a.cc: In function 'int main()': a.cc:42:27: error: expected '}' at end of input 42 | cout << "YES" << endl; | ^ a.cc:21:12: note: to match this '{' 21 | int main() { | ^
s448958250
p03666
C++
#include "bits/stdc++.h" #define lpa(i,a,b) for(int i=a; i<b; ++i) #define lp(i,n) lpa(i,0,n) using namespace std; int main() { ll n,a,b,c,d,flag=0; cin>>n>>a>>b>>c>>d; lp(i,n) if(i*c-d*(n-1-i)<=(b-a) && (b-a)<=i*d-(n-1-i)*c) flag=1; if(flag==1) cout<<"YES"; else cout<<"NO"; }
a.cc: In function 'int main()': a.cc:7:9: error: 'll' was not declared in this scope; did you mean 'lp'? 7 | ll n,a,b,c,d,flag=0; | ^~ | lp a.cc:8:14: error: 'n' was not declared in this scope; did you mean 'yn'? 8 | cin>>n>>a>>b>>c>>d; | ^ | ...
s122901093
p03666
C++
#include "bits/stdc++.h" #define lpa(i,a,b) for(i=a; i<b; ++i) #define lp(i,n) lpa(i,0,n) using namespace std; int main() { int n,a,b,c,d; cin>>n>>a>>b>>c>>d; a=b-a; b=0; lp(m,n-1) if(m*c-d*(n-1-m)<=a && a<=m*d-(n-1-m)*c) b=1; if(b==1) cout<<"YES"; else cout<<"NO"; }
a.cc: In function 'int main()': a.cc:10:12: error: 'm' was not declared in this scope 10 | lp(m,n-1) if(m*c-d*(n-1-m)<=a && a<=m*d-(n-1-m)*c) b=1; | ^ a.cc:2:24: note: in definition of macro 'lpa' 2 | #define lpa(i,a,b) for(i=a; i<b; ++i) | ^ a.cc:10:9: note:...
s563968535
p03666
C++
#include <iostream> #include <cstdlib> #include <vector> using namespace std; int n, diff, c, d, width; int main() { int a, b; cin >> n >> a >> b >> c >> d; diff = abs(a - b); width = abs(c - d); n--; while (diff - d > 0) { diff -= d; n--; } if (n % 2 == 0) { if...
a.cc:28:4: error: expected unqualified-id before 'return' 28 | return 0; | ^~~~~~ a.cc:29:1: error: expected declaration before '}' token 29 | } | ^
s381670101
p03666
C++
#include "Select.h" #if defined(B_CPP) #include <iostream> #include <string> #include <algorithm> using std::cin; using std::cout; using std::endl; using std::string; int i, j, k, l, m, n; int H, W, N, Q; signed long long a, b, c, d; int main() { cin >> N >> a >> b >> c >> d; unsigned long long distance; if (a...
a.cc:1:10: fatal error: Select.h: No such file or directory 1 | #include "Select.h" | ^~~~~~~~~~ compilation terminated.
s948963216
p03666
C
GNU nano 2.8.2 File: b.c Modified #include <stdio.h> #define abs(a) ((a)>0 ? (a) : (-(a))) #define min(a,b) ((a)<(b) ? (a):(b)) main(){ long N,A,B,C,D; scanf("%ld %ld %ld %ld %ld",&N,&A,&B,&C,&D); long M=(N+1)/2-1; long d; if(N%2) d=abs(A-B)...
main.c:1:3: error: unknown type name 'GNU' 1 | GNU nano 2.8.2 File: b.c Modified | ^~~ main.c:1:12: error: too many decimal points in number 1 | GNU nano 2.8.2 File: b.c Modified | ^~~~~ main...
s548211892
p03666
C++
#include<iostream> #include<utility> #include<tuple> #include<set> #include<list> #include<vector> #include<map> #include<algorithm> #include<queue> #define dump(x) cerr << #x << " = " << (x) << endl; #define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FUNCTION__ << endl; #define int l...
a.cc: In function 'int main()': a.cc:45:22: error: 'make\U0000209aair' was not declared in this scope 45 | ranges.push_back(makeₚair(A,A)); | ^~~~~~~~
s612844724
p03666
C++
#include <bits/stdc++.h> using namespace std; #define int long long int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n, a, b, c, d; cin >> n >> a >> b >> c >> d; for (int i = 0; i < n; i++) { int mn = a + i * c, mx = a + i * d; int kek1 = mn - (n - i - 1ll) * d, kek2 = mx - (n - ...
cc1plus: error: '::main' must return 'int'
s539932195
p03666
C++
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <iostream> #include <algorithm> #include <time.h> #include<cstdio> #include<vector> #include<functional> using namespace std; long long n, a, b, c, d; int main() { scanf("%lld%lld%lld%lld%lld", &n, &a, &b, &c, &d); for (int i =...
a.cc: In function 'int main()': a.cc:19:26: error: 'N' was not declared in this scope 19 | for (int i = 0; i != N; ++i){ | ^
s157019264
p03666
Java
import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.Arrays; import java.util.InputMismatchException; import java.io.OutputStream; import java.util.StringTokenizer; import java.io.BufferedReader; import java.io.InputStreamReader; impor...
Main.java:52: error: illegal start of expression if() ^ 1 error
s223602391
p03666
C++
from math import gcd N,A,B,C,D=map(int,input().split()) def egcd(a, b): if a == 0: return (b, 0, 1) else: g, x, y = egcd(b % a, a) return (g, y - (b // a) * x, x) if C==0 and D==0: if A==B: print("YES") else: print("NO") elif C==0 or D==0: if D==0: C,D...
a.cc:27:10: error: invalid preprocessing directive #xC 27 | #xC+yD=B-A | ^~ a.cc:30:10: error: invalid preprocessing directive #x 30 | # x+=D*alpha | ^ a.cc:31:10: error: invalid preprocessing directive #y 31 | # y-=C*alpha | ^ a.cc:1:1: error:...
s323194447
p03666
C++
#include <bits/stdc++.h> using namespace std; #define endl '\n' #define MOD 1e9 + 7 int main() { ios_base::sync_with_stdio(0); cin.tie(0); double a,b,c,d; int n; cin >> n >> a >> b >> c >> d; int diff = abs(a-b); if(n%2==1) { if(c==d) { if(diff/(n-1)%d==0) co...
a.cc: In function 'int main()': a.cc:21:26: error: invalid operands of types 'int' and 'double' to binary 'operator%' 21 | if(diff/(n-1)%d==0) cout << "YES"; | ~~~~~~~~~~^~ | | | | int double
s801778337
p03666
C++
#include <iostream> using namespace std; int main(void){ // Here your code ! long long int n,a,b,c,d; cin>>n>>a>>b>>c>>d; n=n-1; int flag=1; long long int x=b-a; long long int sup=(d*n-x)/(c+d); long long int inf=(c*n-x+c+d-1)/(c+d); if(sup<inf){ cout<<"NO"; ...
a.cc: In function 'int main()': a.cc:20:15: error: expected ';' before '}' token 20 | flag=0 | ^ | ; 21 | } | ~
s559376217
p03666
C++
#include<iostream> #include <list> #include<stack> #include<queue> #include <vector> #include <set> #include <map> #include<algorithm> #include<math.h> #include<stdlib.h> #include<string.h> #include"time.h" using namespace std; #define FOR(k,m,n) for(int (k)=(m);(k)<(n);(k)++) #define REP(i,n) FOR((i),0,(n)) #define L...
a.cc: In function 'int main()': a.cc:17:12: error: expected primary-expression before 'long' 17 | #define LL long long | ^~~~ a.cc:57:58: note: in expansion of macro 'LL' 57 | if (rest % 2 == 0 && near <= esp*LL(rest / 2)){ | ...
s599095617
p03666
C++
#include <bits/stdc++.h> using namespace std; #define int int64_t int main() { //freopen("input.txt", "r", stdin); ios::sync_with_stdio(0); cin.tie(0); int n, a, b, c, d; cin >> n >> a >> b >> c >> d; int start = a - (n - 1) * d; int len = (n - 1) * (d - c); int space = 2 * c + (n - 2...
a.cc:5:13: error: '::main' must return 'int' 5 | #define int int64_t | ^~~~~~~ a.cc:7:1: note: in expansion of macro 'int' 7 | int main() | ^~~
s373877530
p03666
C++
/* СТРОИМ СТЕНУ РАБОТЯГИ! █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█ █═╩═╦═╩═╦═╩═╦═╩═╦═╩═╦═╩═╦═╩═█ █═╦═╩═╦═╩═╦═╩═╦═╩═╦═╩═╦═╩═╦═█ █═╩═╦═╩═╦═╩═╦═╩═╦═╩═╦═╩═╦═╩═█ █═╦═╩═╦═╩═╦═╩═╦═╩═╦═╩═╦═╩═╦═█ █═╩═╦═╩═╦═╩═╦═╩═╦═╩═╦═╩═╦═╩═█ █═╦═╩═╦═╩═╦═╩═╦═╩═╦═╩═╦═╩═╦═█ █═╩═╦═╩═╦═╩═╦═╩═╦═╩═╦═╩═╦═╩═█ █═╦═╩═╦═╩═╦═╩═╦═╩═╦═╩═╦═╩═╦═█ █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄...
a.cc: In function 'int main()': a.cc:140:22: error: 'sum' was not declared in this scope 140 | long long diff = sum - b; | ^~~
s519854046
p03666
C
#include <stdio.h> int main(void) { int N A B C D; scanf("%ld %ld %ld %ld %ld", &N, &A, &B, &C, &D); if(N == 3) { if(A <= B) { if(C <= B - A && B - A <= D) printf("YES"); else printf("NO"); } else { if(C <= A - B && A - B <= D) printf("YES"); else ...
main.c: In function 'main': main.c:4:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'A' 4 | int N A B C D; | ^ main.c:4:9: error: unknown type name 'A' main.c:4:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'C' 4 | int N A B C D; | ^ ma...
s606956931
p03666
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.util.Arrays; import java.util.StringTokenizer; public class B { public static void main(String[] args) { FastScanner scan = new FastScanner(); PrintWriter out = new PrintWriter(Sy...
Main.java:8: error: class B is public, should be declared in a file named B.java public class B { ^ 1 error
s105937284
p03666
C++
#include<map> #include<set> #include<cmath> #include<queue> #include<cstdio> #include<vector> #include<cctype> #include<cstdlib> #include<cstring> #include<utility> #include<algorithm> #define fi first #define se second #define pb push_back #define mp make_pair #define For(i,x,y) for(int i=((int)x);i<=((int)y);i++) #d...
a.cc: In function 'int main()': a.cc:55:17: error: 'else' without a previous 'if' 55 | else | ^~~~
s887836718
p03667
C++
#include <bits/stdc++.h> #include <omp.h> using namespace std; typedef unsigned long long ull; typedef long long ll; typedef double ld; #define int ll #define rand shittttty_shit mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); mt19937_64 rng_64(chrono::steady_clock::now().time_since_epoch().cou...
a.cc:235:2: error: stray '#' in program 235 | }#include <bits/stdc++.h> | ^ a.cc:235:3: error: 'include' does not name a type 235 | }#include <bits/stdc++.h> | ^~~~~~~ a.cc:247:9: error: redefinition of 'std::mt19937 rng' 247 | mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); ...
s182281092
p03667
C++
fn read<T: std::str::FromStr>() -> T { let mut s = String::new(); std::io::stdin().read_line(&mut s).ok(); s.trim().parse().ok().unwrap() } fn read_vec<T: std::str::FromStr>() -> Vec<T> { read::<String>() .split_whitespace() .map(|e| e.parse().ok().unwrap()) .collect() } fn mai...
a.cc:21:14: error: too many decimal points in number 21 | for i in 0..m { | ^~~~ a.cc:32:14: error: too many decimal points in number 32 | for i in 1..n + 1 { | ^~~~ a.cc:33:18: error: too many decimal points in number 33 | for j in 0..count[i] { | ...
s401321793
p03667
C++
#include<cstdio> #define fo(i,a,b) for(int i=a;i<=b;i++) using namespace std; const int maxn=2e5+5; int n,a[maxn],num[maxn]; int ans,cov[maxn]; void ADD(int x) { if (x<=0) return; if (++cov[x]==1) ans++; } void DEC(int x) { if (x<=0) return; if (--cov[x]==0) ans--; } int m; int main() { scanf("%d %d",&n,&m); fo(i,1,n) ...
a.cc:1:18: warning: extra tokens at end of #include directive 1 | #include<cstdio> #define fo(i,a,b) for(int i=a;i<=b;i++) using namespace std; const int maxn=2e5+5; int n,a[maxn],num[maxn]; int ans,cov[maxn]; void ADD(int x) { if (x<=0) return; if (++cov[x]==1) ans++; } void DEC(int x) { if (x<=0) return; if (--co...
s045772676
p03667
C++
#include<bits/stdc++.h> using namespace std; map<long long, long long> ccount; long long N, M; long long A[200005]; long long NUM[200005]; long long X[200005]; long long Y[200005]; bool paint[200005]; int main(){ cin >> N >> M; for(long long i = 0; i < N; i++){ cin >> A[i]; NUM[A[i]]++; } for(long long i = 0;...
a.cc: In function 'int main()': a.cc:44:50: error: no matching function for call to 'max(int, long long int)' 44 | paint[max(0, j - 1 - k)] = true; | ~~~^~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, ...
s659766319
p03667
C++
if (d[i] == 0) { res++; }
a.cc:1:1: error: expected unqualified-id before 'if' 1 | if (d[i] == 0) { | ^~
s051497684
p03667
C++
#include <cmath> #include <vector> #include <map> #include <set> #include <functional> #include <queue> #include <iostream> #include <string.h> #include <iomanip> #include <algorithm> #include <functional> #include <cstdint> #include <climits> #include <unordered_set> #include <sstream> using namespace std; #define l...
a.cc: In function 'int main()': a.cc:72:17: error: no matching function for call to 'sequence_::add(int&)' 72 | if(s.add(x)) | ~~~~~^~~ a.cc:29:10: note: candidate: 'bool sequence_::add(int, int)' 29 | bool add(int x, int index) | ^~~ a.cc:29:10: note: candidate expec...
s920524277
p03667
C++
#include <iostream> #include <string> using namespace std; int cnt[200001]; int cover[200001]; int val[200001]; int main() { memset(cnt, 0, sizeof(cnt)); memset(cover, 0, sizeof(cover)); int N, M; cin >> N >> M; for (int i = 1; i <= N; i++) { int a; cin >> a; val[i] = a; cnt[a]++; int pos = a - cnt[a...
a.cc: In function 'int main()': a.cc:11:9: error: 'memset' was not declared in this scope 11 | memset(cnt, 0, sizeof(cnt)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ |+#include <c...
s136461288
p03667
C++
#include<bits/stdc++.h> using namespace std; const int MAXN = 200000+10; int cnt[MAXN<<1]; int cover[MAXN<<1]; int array[MAXN<<1]; int res=0; int N,M; void check(){ cout<<"--------------------------------"<<endl; vector<int> a(array+1,array+N+1); sort(a.begin(),a.end()); cout<<"array:\t"; for(int i=1;i<=...
a.cc: In function 'void check()': a.cc:15:24: error: reference to 'array' is ambiguous 15 | vector<int> a(array+1,array+N+1); | ^~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60, from /...
s226729908
p03667
C++
#include <bits/stdc++.h> #define M 100005 #define N 1005 #define ll long long #define oo 1000000000 #define mod 5557 using namespace std; int A[M],B[M],ans,n,m,dp[M],cnt[M],V[M][M],sum[M],t; void check(int &a,int b){ if(a==-1||a>b)a=b; } int main(){ int i,j,a,b; cin>>n>>m; for(i=1;i<=n;i++){ scanf("%d",&A[i]); ...
/tmp/ccVUlZqd.o: in function `main': a.cc:(.text+0x146): relocation truncated to fit: R_X86_64_PC32 against symbol `sum' defined in .bss section in /tmp/ccVUlZqd.o a.cc:(.text+0x153): relocation truncated to fit: R_X86_64_PC32 against symbol `t' defined in .bss section in /tmp/ccVUlZqd.o a.cc:(.text+0x15c): relocation ...
s864009875
p03667
C++
#include <bits/stdc++.h> using namespace std; const int N = 1234567; int a[N], cnt[N], b[N]; int main() { int n, tt; scanf("%d %d", &n, &tt); int empty = n; for (int i = 1; i <= n; i++) { scanf("%d", a + i); cnt[a[i]]++; int pos...
a.cc: In function 'int main()': a.cc:30:15: error: 'posa' was not declared in this scope; did you mean 'pos'? 30 | b[posa]--; | ^~~~ | pos
s603591633
p03667
C++
if(p>0 && br[p]==0) ++emp; } int main(){ cin>>n>>m; emp=n; REP(i,n){ scanf("%d",&ar[i]); add(ar[i]); } REP(hoge,m){ int x,y;scanf("%d%d",&x,&y);--x; rem(ar[x]); add(y); ar[x]=y; printf("%d\n",emp); } return 0; }
a.cc:1:3: error: expected unqualified-id before 'if' 1 | if(p>0 && br[p]==0) ++emp; | ^~ a.cc:2:1: error: expected declaration before '}' token 2 | } | ^ a.cc: In function 'int main()': a.cc:4:3: error: 'cin' was not declared in this scope 4 | cin>>n>>m; | ^~~ a.cc:4:8: error: 'n' ...
s897162893
p03667
C++
#include <bits/stdc++.h> using namespace std; #include <vector> #define vi vector<int> #define pb push_back const int N = 100005; int FREQ[N], FREQ2[N]; int dp[N][N]; const int INF = 100000000; int A[N]; int ans(int n){ memset(FREQ, 0, sizeof FREQ); for(int i = 1; i <= n; i++) FREQ[A[i]]++; for(int i = 1; ...
/tmp/ccdUVmUX.o: in function `ans(int)': a.cc:(.text+0x3d): relocation truncated to fit: R_X86_64_PC32 against symbol `A' defined in .bss section in /tmp/ccdUVmUX.o /tmp/ccdUVmUX.o: in function `main': a.cc:(.text+0x2f1): relocation truncated to fit: R_X86_64_PC32 against symbol `A' defined in .bss section in /tmp/ccdU...
s299793768
p03667
C++
#include <bits/stdc++.h> using namespace std; #include <vector> #define vi vector<int> #define pb push_back const int N = 100005; int freq[N], freq2[N]; int dp[N][N]; const int INF = 100000000; int A[N]; int ans(int n){ memset(freq, 0, sizeof freq); for(int i = 1; i <= n; i++) freq[A[i]]++; for(int i = 1; ...
/tmp/ccWwlofg.o: in function `ans(int)': a.cc:(.text+0x3d): relocation truncated to fit: R_X86_64_PC32 against symbol `A' defined in .bss section in /tmp/ccWwlofg.o /tmp/ccWwlofg.o: in function `main': a.cc:(.text+0x2f1): relocation truncated to fit: R_X86_64_PC32 against symbol `A' defined in .bss section in /tmp/ccWw...
s106607795
p03667
C++
#include <iostream> using namespace std; #include <vector> #define vi vector<int> #define pb push_back const int N = 100005; int freq[N], freq2[N]; int dp[N][N]; const int INF = 100000000; int A[N]; int ans(int n){ memset(freq, 0, sizeof freq); for(int i = 1; i <= n; i++) freq[A[i]]++; for(int i = 1; i <= ...
a.cc: In function 'int ans(int)': a.cc:12:5: error: 'memset' was not declared in this scope 12 | memset(freq, 0, sizeof freq); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <vector> +++ |+#include <cstring>...
s897536544
p03667
C++
#include <bits/stdc++.h> #define ll long long #define INF 1000000005 #define MOD 1000000007 #define EPS 1e-10 #define rep(i,n) for(int i=0;i<(int)n;++i) #define each(a, b) for(auto (a): (b)) #define all(v) (v).begin(),(v).end() #define fi first #define se second #define pb push_back #define show(x) cout <<#x<<" = "<<(x...
a.cc: In function 'int main()': a.cc:66:36: error: expected ';' before ':' token 66 | inc = 0: | ^ | ;
s106199974
p03667
C++
#include <bits/stdc++.h> #define MaxN 200005 #define INF 2140000000 #define eps 1e-9 #define MOD 1000000007 #define pi 3.1415926535897932384626433832795 using namespace std; int N,M,fr[MaxN],v[MaxN],P,X; int main() { cin>>N>>M; if(N>300) return 0; for(int i=1;i<=N;i++) cin>>v[i],fr[v[i]]...
a.cc: In function 'int main()': a.cc:44:18: error: no matching function for call to 'max(int)' 44 | cout<<max(Poz+Neg)<<endl; | ~~~^~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, ...
s873701711
p03668
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, N) for (int i = 0; i < (int)N; i++) const ll MOD = pow(10,9)+7; const ll LLINF = pow(2,61)-1; const int INF = pow(2,30)-1; vector<vector<ll>> adj; int dfs(int n=0, int p=-1) { int result = 0; for (auto x: adj[n]) { if (x==p) c...
a.cc: In function 'int main()': a.cc:28:9: error: 'x' was not declared in this scope 28 | adj[x].push_back(y); | ^ a.cc:28:22: error: 'y' was not declared in this scope 28 | adj[x].push_back(y); | ^
s553531657
p03668
Java
import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner sc =new Scanner(System.in); int n = sc.nextInt(); n--; int a[][] = new int[2][n]; for(int i = 0;i < n;i++){ for(int j = 0;j < 2;j++){ a[j][i] = sc.nextInt(); } } sc.close(); int count...
Main.java:2: error: class Program is public, should be declared in a file named Program.java public class Program ^ 1 error
s490619060
p03668
C++
#include <iostream> #include <algorithm> #include <vector> #include <queue> #include <string> using ll = long long; using namespace std; vector<int> G[100010]; int childs[100010]={0}, par[100010]; int grundy(int i=0) { int ans = 0; for (auto g:G[i]) { if (childs[g]) continue; childs[i]++; ...
a.cc: In function 'int grundy(int)': a.cc:24:13: error: 'child' was not declared in this scope; did you mean 'childs'? 24 | if (child[i] > 1) ans = 0; | ^~~~~ | childs
s754938235
p03668
C++
#include <bits/stdc++.h> using namespace std; const int N=1000010 vector<int> e[N]; int n,sg[N],u,v; void dfs(int u,int fa) { sg[u]=0; for(auto v : e[u]) { if(v==fa)continue; dfs(v,u); sg[u]^=sg[v]+1; } } int main() { cin>>n; for(int i=1;i<n;++i) { cin>>u>...
a.cc:6:1: error: expected ',' or ';' before 'vector' 6 | vector<int> e[N]; | ^~~~~~ a.cc: In function 'void dfs(int, int)': a.cc:12:18: error: 'e' was not declared in this scope 12 | for(auto v : e[u]) | ^ a.cc: In function 'int main()': a.cc:26:9: error: 'e' was not declared in ...
s036197848
p03668
C++
// luogu-judger-enable-o2
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s551049165
p03668
C++
//Relive your past life. //Face your demons. //The past is never dead,it is not even past. //The memories are not only the key to the past but...also to the future. //coded in Rusty Lake #include<cmath> #include<math.h> #include<ctype.h> #include<algorithm> #include<bitset> #include<cassert> #include<cctype> #include<c...
a.cc: In function 'void dfs(int, int)': a.cc:75:8: error: 'cnt' was not declared in this scope; did you mean 'int'? 75 | if(cnt==1)++a[x]; | ^~~ | int
s774238297
p03668
C++
#include <stdio.h> #include <algorithm> #include <assert.h> #include <bitset> #include <cmath> #include <complex> #include <deque> #include <functional> #include <iostream> #include <limits.h> #include <map> #include <math.h> #include <queue> #include <set> #include <stdlib.h> #include <string...
a.cc:66:24: error: extended character “ is not valid in an identifier 66 | cout<<((dfs(1,0)!=0)?“Alice”:“Bob”); | ^ a.cc:66:24: error: extended character ” is not valid in an identifier a.cc:66:32: error: extended character “ is not valid in an identifier 66 | cout<<((dfs(1,0)!=0)...
s268863220
p03668
C++
#include <stdio.h> #include <algorithm> #include <assert.h> #include <bitset> #include <cmath> #include <complex> #include <deque> #include <functional> #include <iostream> #include <limits.h> #include <map> #include <math.h> #include <queue> #include <set> #include <stdlib.h> #include <string...
a.cc:66:19: error: extended character “ is not valid in an identifier 66 | cout<<(dfs(1,0)?“Alice”:“Bob”); | ^ a.cc:66:19: error: extended character ” is not valid in an identifier a.cc:66:27: error: extended character “ is not valid in an identifier 66 | cout<<(dfs(1,0)?“Alice”:“Bob”)...
s015649269
p03668
C++
#include <stdio.h> #include <algorithm> #include <assert.h> #include <bitset> #include <cmath> #include <complex> #include <deque> #include <functional> #include <iostream> #include <limits.h> #include <map> #include <math.h> #include <queue> #include <set> #include <stdlib.h> #include <string...
a.cc:66:17: error: extended character “ is not valid in an identifier 66 | cout<<(dfs(1)?“Alice”:“Bob”); | ^ a.cc:66:17: error: extended character ” is not valid in an identifier a.cc:66:25: error: extended character “ is not valid in an identifier 66 | cout<<(dfs(1)?“Alice”:“Bob”); ...
s118877476
p03668
C++
#include <bits/stdc++.h> using namespace std; vector<int> edge[1000010]; int n,poi[1000010],u,v; void dfs(int u,int fa) { poi[u]=0; for(auto v : edge[u]) { if(v==fa) continue; dfs(v,u); sg[u]^=sg[v]+1; } } int main() { scanf("%d",&n); for(int i=1;i<=n-1;++i) { ...
a.cc: In function 'void dfs(int, int)': a.cc:14:9: error: 'sg' was not declared in this scope 14 | sg[u]^=sg[v]+1; | ^~
s966313476
p03668
C++
#include <algorithm> #include <iostream> #include <cstring> #include <cstdio> #include <cmath> using namespace std; inline int getint() { static char c; while ((c = getchar()) < '0' || c > '9'); int res = c - '0'; while ((c = getchar()) >= '0' && c <= '9') res = res * 10 + c - '0'; return res; } const int Max...
a.cc:22:1: error: 'vector' does not name a type 22 | vector<int> adj[MaxN + 1]; | ^~~~~~ a.cc: In function 'int dfs(int, int)': a.cc:27:22: error: 'adj' was not declared in this scope 27 | for (int v : adj[u]) | ^~~ a.cc: In function 'int main()': a.cc:39:17: error: 'adj' ...
s763663497
p03668
C++
//作者:中国江苏省南京市李硕睿 #include<cmath> #include<math.h> #include<ctype.h> #include<algorithm> #include<bitset> #include<cassert> #include<cctype> #include<cerrno> #include<cfloat> #include<ciso646> #include<climits> #include<clocale> #include<complex> #include<csetjmp> #include<csignal> #include<cstdarg> #include<cstddef> #i...
a.cc:59:11: error: expected unqualified-id before '=' token 59 | const int =1e5+7; | ^ a.cc:60:17: error: 'N' was not declared in this scope 60 | vector<int> adj[N]; | ^ a.cc:61:10: error: 'N' was not declared in this scope 61 | int mark[N]; | ^ a.cc:62:9: e...
s113027754
p03668
Java
import java.util.*; public class Main { static ArrayList[] edge; public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); edge = new ArrayList[N + 1]; for(int i = 1; i < N + 1; i++) { edge[i] = new ArrayList<Integer>(); } for(int i = 0; i ...
Main.java:33: error: missing return statement } ^ Note: Main.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 1 error
s730260209
p03668
C++
#include<list> #include<deque> #include<queue> #include<map> #include<set> #include<stack> #include<cmath> using namespace std; int n; #define MAX 100002 vector<int> v[MAX]; int gr[MAX]; inline void dfs(int b,int pr=-1) { if (v[b].size() == 1 ) { gr[b] = 0; return; } for (int i = 0; i < v[b].size(); i++) { ...
a.cc: In function 'int main()': a.cc:33:9: error: 'cin' was not declared in this scope 33 | cin >> n; | ^~~ a.cc:8:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 7 | #include<cmath> +++ |+#include <iostream> 8 | using na...
s060485619
p03668
C++
#include<bits/stdc++.h> using namespace std; const int MAX = 1234567; vector<int> g[MAX]; int dfs (int v, int r) { int res = 0; for (auto u : g[v]) if (u != r) res ^= dfs (u, v); return res + 1; } int main() { ios_base :: sync_with_stdio(false); cin.tie(0); cin >> n; for (int i = 0; i < n-1; i++) { ...
a.cc: In function 'int main()': a.cc:20:16: error: 'n' was not declared in this scope; did you mean 'yn'? 20 | cin >> n; | ^ | yn
s438284662
p03668
C++
#include<iostream> #include<algorithm> #include<string> #include<vector> #define rep(i,n) for(int i=0;i<n;i++) using namespace std; int n,x[100010]; int main(){ cin>>n; memset(x,0,n); for(int i=0;i<n;i++){ int a,b;cin>>a>>b;a--,b--; x[a]++,x[b]++; } int cnt=0; for(int i=0;i<n;i++){ if(x[i]%2==1)cnt++; } i...
a.cc: In function 'int main()': a.cc:10:9: error: 'memset' was not declared in this scope 10 | memset(x,0,n); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include<vector> +++ |+#include <cstring> 5 | #...
s237659871
p03668
C++
#include<bits/stdc++.h> using namespace std; #define For(i,a,b) for(int i=a;i<b;i++) const int M=100005; bool has[M]; int n,fa[M],sg[M],res; vector<int>G[M]; int Tz(int x=1,int f=-1){ int res=sg[x]; For(i,0,G[x].size())if(G[x][i]!=f) res^=(Tz(G[x][i],x)+1); return res; } int main(){ scanf("%d",&n); For(...
a.cc: In function 'int main()': a.cc:22:19: error: 'dfs' was not declared in this scope; did you mean 'ffs'? 22 | For(i,0,n)dfs(i); | ^~~ | ffs
s510152669
p03668
C++
#include<iostream> #include<algorithm> #include<string> #include<vector> #define rep(i,n) for(int i=0;i<n;i++) using namespace std; int n,x[100010]; int main(){ cin>>n; memset(x,0,n); for(int i=0;i<n;i++){ int a,b;a--,b--; x[a]++,x[b]++; } int cnt=0; for(int i=0;i<n;i++){ if(x[i]%2==1)cnt++; }i if(cnt%2==...
a.cc: In function 'int main()': a.cc:10:9: error: 'memset' was not declared in this scope 10 | memset(x,0,n); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include<vector> +++ |+#include <cstring> 5 | #...
s011614043
p03668
C++
#include <bits/stdc++.h> using namespace std; typedef unsigned long long ull; int N; vector<vector<int > > to; int dfs(int i,int from) { if (to[i].size() == 1) { return 1; } else { int ret = 0; for (int j = 0; j < to[i].size(); j++) { if (to[i][j] != from) { ret += dfs(to[i][j], i); } } } return ...
a.cc: In function 'int dfs(int, int)': a.cc:18:16: error: 'ret' was not declared in this scope 18 | return ret % 2; | ^~~
s038811646
p03668
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; template<typename T> using Graph = vector<vector<T>>; #define REP(i, a, b) for (int i = (int)(a); i < (int)(b); i++) #define rep(i, a) REP(i, 0, a) #define EACH(i, a) for (auto i: a) #define ITR(x, a) for (__typeof(a.begin()) x = a.begin(); x != a.end...
a.cc: In function 'int main()': a.cc:33:16: error: 'class std::set<int>' has no member named 'add' 33 | cand.add(y[i]); | ^~~ a.cc:41:14: error: 'class std::set<int>' has no member named 'remove' 41 | cand.remove(x[i]); | ^~~~~~ a.cc:46:14: error: 'class s...
s433043901
p03668
C++
#include <iostream> #include <cstdio> using anemspace std; int main() { char c; while(scanf("%c",&c)!=EOF); printf("Alice"); }
a.cc:3:7: error: expected nested-name-specifier before 'anemspace' 3 | using anemspace std; | ^~~~~~~~~
s600440775
p03668
C++
//Copyright(c)2017 Mstdream #include<bits/stdc++.h> using namespace std; inline void splay(int &v){ v=0;char c=0;int p=1; while(c<'0' || c>'9'){if(c=='-')p=-1;c=getchar();} while(c>='0' && c<='9'){v=(v<<3)+(v<<1)+c-'0';c=getchar();} v*=p; } const int N=200020; int nxt[N*2],fir[N],to[N*2],sz,n,dp[N]; void add(int x,...
a.cc: Assembler messages: a.cc:34: Error: operand type mismatch for `mov'
s294941022
p03668
C++
#include<cstdio> #include<cstring> #include<cctype> #include<algorithm> #define ll long long #define INF 1000000000 #define clr(x) memset(x,0,sizeof(x)) using namespace std; inline int read() { register int ret=0,c=getchar(); while(!isdigit(c))c=getchar(); while(isdigit(c))ret=ret*10+c-'0',c=getchar(); return ret;...
a.cc: In function 'int read()': a.cc:12:22: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 12 | register int ret=0,c=getchar(); | ^~~ a.cc:12:28: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 12 | reg...
s183574642
p03668
C++
#include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #include<cstdlib> #include<ctime> #include<cmath> using namespace std; typedef long long LL; const int N=500050; int head[N],to[N],next[N],sg[N],n,tot; void addedge(int u,int v){ tot++;to[tot]=v,next[tot]=head[u],head[u]=tot; tot++;to[tot]=u...
a.cc: In function 'void addedge(int, int)': a.cc:16:25: error: reference to 'next' is ambiguous 16 | tot++;to[tot]=v,next[tot]=head[u],head[u]=tot; | ^~~~ In file included from /usr/include/c++/14/string:47, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s397929080
p03668
C++
#include<cstdio> #include<algorithm> #define fo(i,a,b) for(int i=a;i<=b;i++) using namespace std; typedef long long LL; const int maxn=1e5+5; int n; int tot,go[2*maxn],next[2*maxn],f1[maxn]; void ins(int x,int y) { go[++tot]=y; next[tot]=f1[x]; f1[x]=tot; } int sg[maxn]; void dfs(int k,int last) { sg[k]=0; fo...
a.cc: In function 'void ins(int, int)': a.cc:16:9: error: reference to 'next' is ambiguous 16 | next[tot]=f1[x]; | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:66, from /usr/include/c++/14/algorithm:60, from a.cc:2: /usr/include/c++/14/bit...
s213355724
p03668
C++
5 1 2 2 3 1 4 4 5
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 5 | ^
s773625872
p03668
C++
#include <cstdio> #include <iostream> #include <cstdlib> #include <cstring> #include <algorithm> #include <cmath> #include <queue> using namespace std; const int N=100010; int e[N*2],next[N*2],head[N],ed=0; void adde(int x,int y){e[++ed]=y;next[ed]=head[x];head[x]=ed;} int dfs(int x,int fa){ int i,t=0; for(i=he...
a.cc: In function 'void adde(int, int)': a.cc:11:34: error: reference to 'next' is ambiguous 11 | void adde(int x,int y){e[++ed]=y;next[ed]=head[x];head[x]=ed;} | ^~~~ In file included from /usr/include/c++/14/string:47, from /usr/include/c++/14/bits/locale_cla...
s771778642
p03668
C++
#include <vector> static const int MAXN = 100005; int n; std::vector<int> e[MAXN]; int f[MAXN]; void dfs(int u, int p = -1) { f[u] = 0; for (int v : e[u]) if (v != p) { dfs(v, u); f[u] ^= (f[v] + 1); } } int main() { scanf("%d", &n); for (int i = 0, u, v; i < n - 1; ++i) { ...
a.cc: In function 'int main()': a.cc:20:5: error: 'scanf' was not declared in this scope 20 | scanf("%d", &n); | ^~~~~ a.cc:28:5: error: 'puts' was not declared in this scope 28 | puts(f[0] == 0 ? "Bob" : "Alice"); | ^~~~
s387350573
p03669
C++
#include<bits/stdc++.h> using namespace std; const int N=410; int n,h,in[N],out[N]; int fa[N]; bool ok[N]; int find(const int &x){return fa[x]==x?x:fa[x]=find(fa[x]);} int main(){ n=read();h=read(); for(int i=1;i<=(h<<1);i++) fa[i]=i; for(int i=1;i<=n;i++){ int A=read(),B=read(),C=read(),D=read(); ...
a.cc: In function 'int main()': a.cc:9:11: error: too few arguments to function 'ssize_t read(int, void*, size_t)' 9 | n=read();h=read(); | ~~~~^~ In file included from /usr/include/x86_64-linux-gnu/bits/sigstksz.h:24, from /usr/include/signal.h:328, from /usr/inclu...
s941292504
p03669
C++
#include <iostream> #include <vector> #include<string.h> using namespace std; struct node { int a, b, c, d; }; vector<int> v[2][200]; node nd[100010]; bool rcd[100010]; int count = 1; int N, H; bool dfs(int f, int h) { for (int i = 0; i < v[f][h].size(); i++) { if (rcd[v[f][h][i]] == 1) ...
a.cc: In function 'int main()': a.cc:78:2: error: expected '}' at end of input 78 | } | ^ a.cc:45:1: note: to match this '{' 45 | { | ^ a.cc: In function 'bool dfs(int, int)': a.cc:42:1: warning: control reaches end of non-void function [-Wreturn-type] 42 | } | ^
s832193581
p03669
C++
//AtCoder Grand Contest 017 E - Jigsaw #include <cstdio> #include <iostream> #include <cmath> using namespace std; int qr(){int ret = 0,f=1;char ch =getchar();while(!isdigit(ch))f=ch=='-'?-1:1,ch=getchar();while(isdigit(ch))ret=ret*10+ch-'0',ch=getchar();return ret*f;} #define maxN 100005 #define maxH 205 int inde...
a.cc: In function 'void read(int, int)': a.cc:19:5: error: 'nxt' was not declared in this scope 19 | nxt[++tot] = fir[x]; | ^~~ a.cc:19:11: error: 'tot' was not declared in this scope 19 | nxt[++tot] = fir[x]; | ^~~ a.cc:19:18: error: 'fir' was not declared in this scope 19 | ...
s764102524
p03669
C++
//AtCoder Grand Contest 017 E - Jigsaw #include <cstdio> #include <iostream> #include <cmath> using namespace std; int qr(){int ret = 0,f=1;char ch =getchar();while(!isdigit(ch))f=ch=='-'?-1:1,ch=getchar();while(isdigit(ch))ret=ret*10+ch-'0',ch=getchar();return ret*f;} #define maxN 100005 #define maxH 205 int fir[...
a.cc: In function 'int main()': a.cc:41:9: error: redeclaration of 'int N' 41 | int N = N; | ^ a.cc:40:9: note: 'int N' previously declared here 40 | int N = qr(),H = qr(); | ^
s982545589
p03669
C++
#include <bits/stdc++.h> using namespace std; typedef long long i64; const int MAXN = (200 + 10) * 2; class no_solution : public std::exception { public: const char * what(void) const noexcept { return "no solution reachable"; } }; namespace disjointSet { int fa[MAXN]; void init() { memset(fa, 0x00, sizeof fa...
a.cc: In function 'void disjointSet::merge(int, int)': a.cc:34:15: error: 'disjointSet::fa' cannot be used as a function 34 | x = fa(x), y = fa(y); | ~~^~~ a.cc:34:26: error: 'disjointSet::fa' cannot be used as a function 34 | x = fa(x), y = fa(y); | ...
s357648144
p03669
C++
#include<bits/stdc++.h> #define rep(i,a,b) for(int i=(a);i<=(b);i++) #define per(i,a,b) for(int i=(a);i>=(b);i--) #define forE(i,x) for(int i=head[x];i!=-1;i=ne[i]) using namespace std; typedef long long i64; typedef unsigned long long u64; typedef unsigned u32; typedef pair<int,int> pin; #define mk(a,b) make_pair(a,b)...
a.cc: In function 'int main()': a.cc:53:28: error: reference to 'get' is ambiguous 53 | rep(i,1,m)if(rd[i])get[find(i)]=1; | ^~~ In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:80, from a.cc:1: /usr/include/c++/14/variant:1180:5: note...
s099582289
p03669
C++
#include<iostream> #include<algorithm> #include<vector> using namespace std; #define sz(x) (int)(x.size()) #define fi(a,b) for(int i=a;i<b;++i) #define fj(a,b) for(int j=a;j<b;++j) #define pb push_back #define mp make_pair typedef pair<int, int> pii; /////////////////////// int const N = 1e5 + 41; int const H = 241;...
a.cc: In function 'void solve()': a.cc:62:17: error: 'memset' was not declared in this scope 62 | memset(pe, 0, sizeof(pe)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include<vector> +++...
s170573692
p03669
C++
#include <algorithm> #include <cassert> #include <cstring> #include <iostream> using namespace std; #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define REP(i, n) FOR(i, 0, n) #define TRACE(x) cout << #x << " = " << x << endl #define _ << " _ " << typedef long long llint; const int MAX = 444; vector<int> E...
a.cc:17:1: error: 'vector' does not name a type 17 | vector<int> E[MAX]; | ^~~~~~ a.cc:24:1: error: 'vector' does not name a type 24 | vector<int> v; | ^~~~~~ a.cc: In function 'void dfs(int)': a.cc:29:3: error: 'v' was not declared in this scope 29 | v.push_back(x); | ^ a.cc:30:15: error...
s154982523
p03669
C++
#include <iostream> #include <vector> #include <cstdio> #include <sstream> #include <map> #include <string> #include <algorithm> #include <queue> #include <cmath> #include <functional> #include <set> #include <ctime> #include <random> #include <chrono> #include <cassert> #include <tuple> #include <utility> using namesp...
a.cc: In function 'int main()': a.cc:203:25: error: 'souce' was not declared in this scope; did you mean 'source'? 203 | f += dinic_maxflow(G, souce, sink); | ^~~~~ | source
s876650303
p03669
C++
#include<bits/stdc++.h> #define pii pair<int,int> #define fi first #define se second #define mp make_pair #define pb push_back #define eb emplace_back #define pf push_front #define pb2 pop_back #define pf2 pop_front #define line printf("\n") #define pq priority_queue #define rep(k,i,j) for(int k = (int)i;k<(int)j;k++)...
a.cc: In function 'int cycle2(int)': a.cc:58:47: error: return-statement with no value, in function returning 'int' [-fpermissive] 58 | if(adj[a].size()==0){bisa= 0;return;} | ^~~~~~ a.cc:62:26: error: return-statement with no value, in function re...
s539337260
p03670
C++
#include <bits/stdc++.h> #define ln '\n' #define all(dat) dat.begin(), dat.end() #define loop(i, to) for (int i = 0; i < to; ++i) #define cont(i, to) for (int i = 1; i <= to; ++i) #define circ(i, fm, to) for (int i = fm; i <= to; ++i) #define foreach(i, dat) for (__typeof(d...
/tmp/cc4vm9Jb.o: in function `main': a.cc:(.text+0x5e6): relocation truncated to fit: R_X86_64_PC32 against symbol `ans' defined in .bss section in /tmp/cc4vm9Jb.o a.cc:(.text+0x604): relocation truncated to fit: R_X86_64_PC32 against symbol `ans' defined in .bss section in /tmp/cc4vm9Jb.o /tmp/cc4vm9Jb.o: in function ...
s916163306
p03670
C++
#include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #define fo(i,j,l) for(int i=j;i<=l;++i) #define fd(i,j,l) for(int i=j;i>=l;--i) using namespace std; typedef long long LL; const LL N=21,M=(1<<19)+3,mo=1e9+7; int dir[N][N],m2[N],next[N]; int n,m,k,a,b,c; LL f[2][N][M],g[N][M]; int main() { ...
a.cc: In function 'int main()': a.cc:34:46: error: reference to 'next' is ambiguous 34 | LL ok=f[u][0][i]%mo; next[n]=n+1; | ^~~~ In file included from /usr/include/c++/14/string:47, from /usr/include/c++/14/bits/locale_class...
s605208982
p03670
C++
#include<bits/stdc++.h> using namespace std; const int MX=21,MXM=1<<19|1 int d[MXM],f[MXM],md=1000000007; int n,m,K,u[MX][MX],ans; #define lb(x) ((x)&(-(x))) int main() { int i,j,a,b,c,k; cin>>n>>m>>K; for(i=0;i<K;i++)cin>>a>>b>>c,u[a-1][b-1]=c+1; d[0]=1; #define A(x) (f[x]=(f[x]+d[k])%md) for(i=0;i<m;i++)for(j=...
a.cc:5:1: error: expected ',' or ';' before 'int' 5 | int d[MXM],f[MXM],md=1000000007; | ^~~ a.cc: In function 'int main()': a.cc:12:9: error: 'd' was not declared in this scope 12 | d[0]=1; | ^ a.cc:13:23: error: 'f' was not declared in this scope 13 | #define A(x) (f[x]=(...
s882854345
p03670
C++
test_code
a.cc:1:1: error: 'test_code' does not name a type 1 | test_code | ^~~~~~~~~
s442481532
p03670
C++
#include<bits/stdc++.h> #define mo 1000000007 //#define add(a,b) (a+b>=mo)?(a+=b-mo):(a+=b) #define lowbit(s) ((s)&(-(s))) using namespace std; int f[2][22][1<<20],a[22][22]; inline void add(int &a,int b){(a+b>=mo)?(a+=b-mo):(a+=b);} int main() { int n,m,q;scanf("%d%d%d",&n,&m,&q); memset(a,255,sizeof(a)); while (q...
a.cc: In function 'int main()': a.cc:41:2: error: expected '}' at end of input 41 | } | ^ a.cc:9:1: note: to match this '{' 9 | { | ^