submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s032876341
p04050
C++
#include<bits\stdc++.h> using namespace std; typedef long long ll; ll qread() { ll ans=0;char c=getchar(); while(c<'0' or c>'9') c=getchar(); while('0'<=c and c<='9') ans=ans*10+c-'0',c=getchar(); return ans; } void write(ll num) { if(num>9) write(num%10); putchar('0'+num%10); } void writeln(ll num) {write(num);p...
a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory 1 | #include<bits\stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s592302713
p04050
C++
#include <bits/stdc++.h> using namespace std; int cl = 0, n, m; int a[102], b[102]; set<int> ke; signed main() { scanf("%d%d", &n, &m); for (int i = 1; i <= m; i++) { scanf("%d", &a[i]); if (a[i] % 2) cl++; if (a[i] % 2) ke.insert(a[i]); } if (m == 1) { cout << a[1] <<...
a.cc: In function 'int main()': a.cc:45:29: error: break statement not within loop or switch 45 | if (!ke.size()) break; | ^~~~~
s010162125
p04050
C++
#include <vector> #include <iostream> using namespace std; int main() { int N, M; cin >> N >> M; vector<int> A(M); vector<int> odds; for (int i = 0; i < M; ++i) { cin >> A[i]; if (A[i] & 1) odds.push_back(A[i]); } if (odds.size() >= 3) { cout << "Impossible" << endl; } else if (N == 2) { cout << 2 << e...
a.cc: In function 'int main()': a.cc:20:31: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int)' 20 | int ptr = find(A.begin(), A.end(), N / 2 + 1) - A.begin(); | ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file include...
s955162565
p04050
C++
#include<cstdio> #include<algorithm> #include<iostream> #include<queue> #include<set> #define rep(i,s,t) for(register int i=s;i<=t;++i) #define _rep(i,s,t) for(register int i=s;i>=t;--i) #define Rep(i,s,t) for(register int i=s;i<t;++i) #define go(x) for(register int e=las[x];e;e=nxt[e]) #define re register #define fi f...
a.cc: In function 'int main()': a.cc:46:9: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 46 | rep(i,1,m){ | ^ a.cc:6:37: note: in definition of macro 'rep' 6 | #define rep(i,s,t) for(register int i=s;i<=t;++i) | ^ a.c...
s234548704
p04050
C++
#include<iostream> #include<vector> #include<algorithm> #include<set> #include<map> #include<iomanip> #include<math.h> #include<bitset> #include<assert> using namespace std; using ll=long long; using ld=long double; using P=pair<ll,ll>; #define MOD 1000000007LL #define INF 1000000000LL #define EPS 1e-10 #define FOR(i,n...
a.cc:9:9: fatal error: assert: No such file or directory 9 | #include<assert> | ^~~~~~~~ compilation terminated.
s089832190
p04050
C++
#include<iostream> #include<vector> #include<algorithm> #include<set> #include<map> #include<iomanip> #include<math.h> #include<bitset> using namespace std; using ll=long long; using ld=long double; using P=pair<ll,ll>; #define MOD 1000000007LL #define INF 1000000000LL #define EPS 1e-10 #define FOR(i,n,m) for(ll i=n;i<...
a.cc: In function 'int main()': a.cc:37:17: error: 'assert' was not declared in this scope 37 | assert(false); | ^~~~~~ a.cc:9:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>' 8 | #include<bitset> +++ |+#include <c...
s633890929
p04050
C++
#include <bits/stdc++.h> #define For(i, j, k) for (int i = j; i <= k; ++ i) #define Forr(i, j, k) for (int i = j; i >= k; -- i) using namespace std; inline int read() { int x = 0, p = 1; char c = getchar(); for (; !isdigit(c); c = getchar()) if (c == '-') p = -1; for (; isdigit(c); c = getchar()) x = (x << 1) + (...
a.cc: In function 'int main()': a.cc:46:9: error: 'iNt' was not declared in this scope; did you mean 'int'? 46 | iNt tt = 0; For(i, 1, cnt) if (ans[i] == 0) ++ tt; | ^~~ | int a.cc:46:56: error: 'tt' was not declared in this scope; did you mean 'tp'? 46 | iNt tt = 0; Fo...
s379763627
p04050
C++
#include<stdio.h> #include<cstring> #include<cstdlib> #include<algorithm> #include<vector> #include<map> #include<set> #include<cmath> #include<iostream> #include<queue> #include<string> using namespace std; typedef long long ll; typedef pair<int,int> pii; typedef long double ld; typedef unsigned long long ull; typedef...
a.cc: In function 'int main()': a.cc:42:13: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 42 | rep(i,1,m) a[i]=read(),if(a[i]&1) num++; | ^ a.cc:22:38: note: in definition of macro 'rep' 22 | #define rep(i,j,k) for(register int i=(int)(j);i<=(int)(k);...
s701140744
p04050
C++
if (n == 1) { cout << "1\n1\n1\n"; return 0; }
a.cc:1:9: error: expected unqualified-id before 'if' 1 | if (n == 1) { | ^~
s036992569
p04050
C++
#include <bits/stdc++.h> using namespace std; const int MOD=1e9+7; const double PI=3.14159265359; int main(){ ios_base::sync_with_stdio(0); cin.tie(0); int n,m; cin>>n>>m; vector<int> v(m); int oct=0; for(int&i:v)cin>>i, oct+=i%2; if(oct>2){ cout<<"Impossible"; ...
a.cc:24:15: warning: missing terminating " character 24 | cout<<"1 /n 1 /n 1; | ^ a.cc:24:15: error: missing terminating " character 24 | cout<<"1 /n 1 /n 1; | ^~~~~~~~~~~~~ a.cc: In function 'int main()': a.cc:25:9: error: expected primary-expression before...
s267040798
p04050
C++
#include <bits/stdc++.h> using namespace std; const int MOD=1e9+7; const double PI=3.14159265359; int main(){ ios_base::sync_with_stdio(0); cin.tie(0); int n,m; cin>>n>>m; vector<int> v(m); int oct=0; for(int&i:v)cin>>i, oct+=i%2; if(oct>2){ cout<<"Impossible"; ...
a.cc: In function 'int main()': a.cc:24:36: error: expected ';' before 'return' 24 | cout<<"1 /n 1 /n 1 /n 1 /n" | ^ | ; 25 | return 0; | ~~~~~~
s287826304
p04050
C++
#include <bits/stdc++.h> using namespace std; const int N = 110, M = 100010; vector<int>v, u; int num, n, k, x; int main() { scanf("%d%d", &n, &k); if (n == 1) return puts("1\n1\n1"), 0; if (k == 1) { scanf("%d", &x); printf("%d\n%d\n%d %d", x, 2, x - 1, 1); return 0; } for (int i = 1; i <= k; i++) { s...
a.cc: In function 'int main()': a.cc:26:9: error: 'else' without a previous 'if' 26 | else | ^~~~
s456001348
p04050
C++
#include <bits/stdc++.h> using namespace std; const int N = 110, M = 100010; vector<int>v, u; int num, n, k, x; int main() { scanf("%d%d", &n, &k); if (n == 1) return puts("1\n1\n1"), 0; if (k == 1) { scanf("%d", &x); printf("%d\n%d\n%d %d", x, 2, x - 1, 1); return 0; } for (int i = 1; i <= k; i++) { s...
a.cc: In function 'int main()': a.cc:25:44: error: expected primary-expression before ')' token 25 | sort(v.begin(),v.end(),greater<int>); | ^ a.cc:26:9: error: 'else' without a previous 'if' 26 | else | ^~~~
s588495142
p04050
C++
#include <bits/stdc++.h> using namespace std; const int N = 110, M = 100010; vector<int>v, u; int num, n, k, x; int main() { scanf("%d%d", &n, &k); for (int i = 1; i <= n; i++) { scanf("%d", &x); v.push_back(x); num += x & 1; n += x; if (x & 1) u.push_back(x); } sort(v.begin(), v.end(), greater<int>);...
a.cc: In function 'int main()': a.cc:18:46: error: expected primary-expression before ')' token 18 | sort(v.begin(), v.end(), greater<int>); | ^
s830933164
p04050
C++
#include <bits/stdc++.h> using namespace std; int m, n; const int N = 200; int ai[N], c; int main() { cin >> m >> n; if (n == 1) { int a; cin >> a; if (a == 1) cout << 1 << endl << 1 << endl << 1 << endl; else cout << a << endl << 2 << endl << a - 1 << " " << 1 << endl; ...
a.cc: In function 'int main()': a.cc:42:29: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} and 'std::ostream' {aka 'std::basic_ostream<char>'}) 42 | else cout << n << endl << cout << ai[A] - 1 << " "; | ~~~~~~~~~~~~...
s250103300
p04050
C++
#include <vector> using namespace std; int N, M; vector<int> even; vector<int> odd; vector<int> a; vector<int> b; int main() { cin >> N >> M; for (int i = 0; i < M; ++i) { int t; cin >> t; if (t & 1) { odd.push_back(t); } else { even.push_back(t); } } if (odd.size() > 2) { ...
a.cc: In function 'int main()': a.cc:11:3: error: 'cin' was not declared in this scope 11 | cin >> N >> M; | ^~~ a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 1 | #include <vector> +++ |+#include <iostream> 2 | using namespa...
s101076008
p04050
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <cstdio> #include <queue> #include "math.h" #include <complex> #include <iomanip> #include <map> #define ifor(i,a,b) for (int i=(a);i<(b);i++) #define rfor(i,a,b) for (int i=(b)-1;i>=(a);i--) #define rep(i,n) for (int i=0;i<(n);i++) #...
a.cc: In function 'int main()': a.cc:71:5: error: 'else' without a previous 'if' 71 | else{ | ^~~~
s915101497
p04050
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <cstdio> #include <queue> #include "math.h" #include <complex> #include <iomanip> #include <map> #define ifor(i,a,b) for (int i=(a);i<(b);i++) #define rfor(i,a,b) for (int i=(b)-1;i>=(a);i--) #define rep(i,n) for (int i=0;i<(n);i++) #...
a.cc: In function 'int main()': a.cc:71:5: error: 'else' without a previous 'if' 71 | else{ | ^~~~
s198804733
p04050
C++
#include <bits/stdc++.h> using namespace std; #define COUT(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << endl template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } template...
a.cc: In function 'int main()': a.cc:39:13: error: expected '}' before 'else' 39 | else { | ^~~~ a.cc:35:37: note: to match this '{' 35 | if (odd == 0 || M == 1) { | ^
s456029820
p04050
Java
import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Collections; import java.util.NoSuchElementException; public class Main { private static class Task { void solve(FastScanner in, PrintWriter out) throws Ex...
Main.java:19: error: unreachable statement return; ^ 1 error
s574316289
p04051
C++
#include <bits/stdc++.h> using namespace std; #define M 4005 #define delta 2001 #define MOD 1000000007 #define ll long long #define int long long int n; int a[M], b[M]; ll ans; ll f[M][M], mns[M][M]; inline ll quick_pow(ll x, ll k) { ll res = 1; while (k) { if (k & 1) (res *= x) %= MOD; (x *= x) %= MOD; k >>...
cc1plus: error: '::main' must return 'int'
s197952389
p04051
C++
#include <bits/stdc++.h> using namespace std; inline int read() { int x=0,f=1,c=getchar(); while(c<48) c=='-'&&(f=-1),c=getchar(); while(c>47) x=x*10+c-'0',c=getchar(); return x*f; } const int MAXN = 200005; const int mod=1e9+7; const int size=2001; int fac[size*5],ifac[size*5]; int a[MAXN],b[MAXN],dp[size*5][siz...
a.cc:15:9: error: reference to 'size' is ambiguous 15 | int fac[size*5],ifac[size*5]; | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52, from a.cc:...
s547547425
p04051
C++
#include <bits/stdc++.h> using namespace std; inline int read() { int x=0,f=1,c=getchar(); while(c<48) c=='-'&&(f=-1),c=getchar(); while(c>47) x=x*10+c-'0',c=getchar(); return x*f; } const int MAXN = 200005; const int mod=1e9+7,size=2001; int fac[size*5],ifac[size*5]; int a[MAXN],b[MAXN],dp[size*5][size*5]; int n...
a.cc:14:9: error: reference to 'size' is ambiguous 14 | int fac[size*5],ifac[size*5]; | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52, from a.cc:...
s821853926
p04051
C++
#include<bits/stdc++.h> #define int long long using namespace std; const int N=5e3; const int M=2e3+88; const int mod=1e9+7; int n,a[M*100],b[M*100],f[N+99][N+99],fac[M*10+99],da; int ksm(int x,int y){ int base=1; while(y){ if(y&1)base=(1ll*base*x)%mod; x=(1ll*x*x)%mod; y>>=1; }return base; } int C(int n,int m...
a.cc: In function 'int main()': a.cc:38:48: error: expected ')' before 'mod' 38 | da=((da-C(2*(a[i]+b[i]),a[i]*2)mod)%mod+mod)%mod; | ~ ^~~ | ) a.cc:38:65: error: expected ')' before ';' token 3...
s792393510
p04051
C++
/* Though leaves are many , the root is one. Through all the lying days of my youth I swayed my leaves and flowers in the sun. Now I may wither into the truth. - William Butler Yeats */ #pragma GCC optimize("Ofast,no-stack-protector") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx") #pragma GCC targ...
In file included from /usr/include/c++/14/string:43, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52, from a.cc:11: /usr/include/c++/14/bits/allocator.h: In destructor 'std::__cxx11::basic_string<char>::_Alloc_hider::~_All...
s272305335
p04051
C++
/* Though leaves are many , the root is one. Through all the lying days of my youth I swayed my leaves and flowers in the sun. Now I may wither into the truth. - William Butler Yeats */ #pragma GCC optimize("Ofast,no-stack-protector") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx") #pragma GCC targ...
In file included from /usr/include/c++/14/string:43, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52, from a.cc:11: /usr/include/c++/14/bits/allocator.h: In destructor 'std::__cxx11::basic_string<char>::_Alloc_hider::~_All...
s602956232
p04051
C++
#include<cstdio> #include<cctype> #define rr register using namespace std; const int M=4001,N=200011,mod=1000000007; int dp[M][M],fac[M<<1],inv[M<<1],a[N],b[N],ans; inline signed iut(){ rr int ans=0; rr char c=getchar(); while(!isdigit(c)) c=getchar(); while(isdigit(c)) ans=ans*10+c-48,c=getchar(); retu...
a.cc: In function 'int iut()': a.cc:8:12: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 8 | rr int ans=0; rr char c=getchar(); | ^~~ a.cc:8:27: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 8 | rr int ans=0; rr char...
s740115291
p04051
C++
#include<cstdio> #include<cctype> #define rr register using namespace std; const int M=4001,N=200011,mod=1000000007; int dp[M][M],fac[M<<1],inv[M<<1],a[N],b[N],ans; inline signed iut(){ rr int ans=0; rr char c=getchar(); while(!isdigit(c)) c=getchar(); while(isdigit(c)) ans=ans*10+c-48,c=getchar(); retu...
a.cc: In function 'int iut()': a.cc:8:12: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 8 | rr int ans=0; rr char c=getchar(); | ^~~ a.cc:8:27: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 8 | rr int ans=0; rr char...
s417710663
p04051
C++
//G #include<bits/stdc++.h> using namespace std; #define as 1000000007 long long n; struct { long long a,b; }cas[200000]; long long op(int n) { long long QWQ=1; for(int i=1;i<=n;i++) QWQ*=i; return QWQ%as; } long long Con(long long a,long long b) { return op(a+b)/op(a)/op(b)%as; } int main() { long long ans=0;...
a.cc: In function 'int main()': a.cc:26:22: error: 'a' was not declared in this scope 26 | cin>>a[i]>>b[i]; | ^ a.cc:26:28: error: 'b' was not declared in this scope 26 | cin>>a[i]>>b[i]; | ^ a.cc:32:37: error: 'a' was not...
s118242533
p04051
C++
//G #include<bits/stdc++.h> using namespacde std; #define as 1000000007 long long n; struct { long long a,b; }cas[200000]; long long op(int n) { long long QWQ=1; for(int i=1;i<=n;i++) QWQ*=i; return QWQ%as; } long long Con(long long a,long long b) { return op(a+b)/op(a)/op(b)%as; } int main() { long long ans=0...
a.cc:3:7: error: expected nested-name-specifier before 'namespacde' 3 | using namespacde std; | ^~~~~~~~~~ a.cc: In function 'int main()': a.cc:23:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 23 | cin>>n; | ^~~ | std::cin In file include...
s441190472
p04051
C++
#include<iostream> #include<cstdio> #include<cmath> #include<algorithm> #include<cstring> const int maxn = int(4e4) + 7, mod = int(1e9) + 7; typedef long long ll; ll fac[maxn], inv[maxn]; ll pow(ll x,ll y){ x%=P; ll ans=1; while(y){ if (y&1) ans=ans*x%P; x=x*x%P; y>>=1; } ret...
a.cc: In function 'll pow(ll, ll)': a.cc:10:8: error: 'P' was not declared in this scope 10 | x%=P; | ^ a.cc: In function 'int main()': a.cc:48:31: error: call of overloaded 'pow(int, int)' is ambiguous 48 | printf("%lld\n", ans * pow(2, mod - 2) % mod); | ~~~...
s932731662
p04051
C++
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstring> #include <ctime> #include <deque> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <vector> using namespace std; namespace io { #define SIZ (1 << 21 | 1) #define gc() (io::iS == io::...
a.cc: In function 'int main()': a.cc:90:96: error: expected primary-expression before 'if' 90 | for(int i= 1; i <= n; i++) ans= ((long long)ans - C(2 * (a[i] + b[i]), 2 * b[i])) % P, if(ans < 0) ans+= P; | ^~...
s603380047
p04051
C++
#include <algorithm> #include <bitset> #include <cassert> #include <chrono> #include <climits> #include <cmath> #include <complex> #include <cstring> #include <deque> #include <functional> #include <iostream> #include <iomanip> #include <list> #include <map> #include <numeric> #include <queue> #include <random> #includ...
a.cc: In function 'int main()': a.cc:129:5: error: 'make' was not declared in this scope 129 | make(); | ^~~~ a.cc:138:16: error: 'comb' was not declared in this scope; did you mean 'wctomb'? 138 | ans -= comb(2*a+2*b,2*a); | ^~~~ | wctomb
s075848833
p04051
C++
/***"In the name of Allah(swt), the most gracious, most merciful. Allah(swt) blesses with knowledge whom he wants."***/ /*Header file starts here*/ //#include<bits/stdc++.h> #include<vector> #include<list> #include<map> #include<set> #include<queue> #include<stack> #include<bitset> #include<algorithm> #include<iostream...
a.cc:31:12: error: 'long long long' is too long for GCC 31 | #define ll long long | ^~~~ a.cc:99:19: note: in expansion of macro 'll' 99 | typedef long long ll ; | ^~ a.cc:31:17: error: 'long long long' is too long for GCC 31 | #define ll long long | ...
s910630543
p04051
C++
/* بسم الله الرحمن الرحیم */ /* شهید حاج قاسم سلیمانی انتقام سخت نزدیک است */ #include <bits/stdc++.h> using namespace std ; #define int ll #define all(x) x.begin() , x.end() #define PB push_back #define F first #define S second #define _sz(x) (int)x.size() #define debug(x) cerr << #x << " = " << x << endl...
a.cc:10:13: error: '::main' must return 'int' 10 | #define int ll | ^~ a.cc:45:1: note: in expansion of macro 'int' 45 | int main() { | ^~~
s268183133
p04051
C++
/* بسم الله الرحمن الرحیم */ /* شهید حاج قاسم سلیمانی انتقام سخت نزدیک است */ #include <bits/stdc++.h> using namespace std ; #define int ll #define all(x) x.begin() , x.end() #define PB push_back #define F first #define S second #define _sz(x) (int)x.size() #define debug(x) cerr << #x << " = " << x << endl...
a.cc:10:13: error: '::main' must return 'int' 10 | #define int ll | ^~ a.cc:45:1: note: in expansion of macro 'int' 45 | int main() { | ^~~
s151207768
p04051
C++
/* بسم الله الرحمن الرحیم */ /* شهید حاج قاسم سلیمانی انتقام سخت نزدیک است */ #include <bits/stdc++.h> using namespace std ; #define all(x) x.begin() , x.end() #define PB push_back #define F first #define S second #define _sz(x) (int)x.size() #define debug(x) cerr << #x << " = " << x << endl typedef long l...
a.cc: In function 'int main()': a.cc:58:24: error: 'pw' was not declared in this scope; did you mean 'pow'? 58 | ans = mul(ans, pw(2, MOD - 2)) ; | ^~ | pow
s431853499
p04051
C++
/* بسم الله الرحمن الرحیم */ /* شهید حاج قاسم سلیمانی انتقام سخت نزدیک است */ #include <bits/stdc++.h> using namespace std ; #define all(x) x.begin() , x.end() #define PB push_back #define F first #define S second #define _sz(x) (int)x.size() #define debug(x) cerr << #x << " = " << x << endl typedef long l...
a.cc: In function 'int main()': a.cc:54:9: error: 'prep' was not declared in this scope 54 | prep() ; | ^~~~
s317955010
p04051
C++
v#include<bits/stdc++.h> using namespace std; const int N = 200 * 1000 + 20, mod = 1e9 + 7, X = 4000 + 20; int x[N], y[N], dp[X][X], c[X][X], n, ans; int sum(int a, int b) { return ((1LL * a + b) % mod + mod) % mod; } int mul(int a, int b) { return ((1LL * a * b) % mod + mod) % mod; } int pw(int a, int b) {...
a.cc:1:2: error: stray '#' in program 1 | v#include<bits/stdc++.h> | ^ a.cc:1:1: error: 'v' does not name a type 1 | v#include<bits/stdc++.h> | ^ a.cc: In function 'int main()': a.cc:27:5: error: 'ios_base' has not been declared 27 | ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);...
s842274925
p04051
C++
#include <bits/stdc++.h> using namespace std; #define ff first #define ss second #define pb push_back const int MAXN = 2e5 + 100, maxval = 2010, mod = 1e9 + 7; int n; int a[MAXN], b[MAXN]; int dp[maxval << 1][maxval << 1]; long long fact[MAXN], invfact[MAXN]; long long ans; long long pw(long long a, long long b) { ...
a.cc: In function 'int main()': a.cc:68:26: error: 'invfact' cannot be used as a function 68 | cout << ans * invfact(2) % mod << '\n'; | ~~~~~~~^~~
s603246528
p04051
C++
#include <bits/stdc++.h> #define BIT(n) (1LL << (n)) #define BITF(n, i) (((n) >> i) & 1) #define REP(i, n) for (int i = 0; i < n; i++) #define REPB(i, n) for (int i = 0; i < BIT(n); i++) #define REPS(i, x) for (int i = 1; i <= x; i++) #define REPR(i, n) for (int i = n; i >= 0; i--) #define REPZ(i, x) for (int i = 0; i ...
a.cc: In function 'int main()': a.cc:1511:28: error: invalid operands of types 'double' and 'const long long int' to binary 'operator%' 1511 | int val = round(ab[i]) % MOD; | ~~~~~~~~~~~~ ^ ~~~ | | | | double const long long int
s596521219
p04051
C++
#include<iostream> #define mod 1000000007 using namespace std; long long dp[8001][8001],a[8001],b[8001],ans,jc[8001],invjc[8001]; long long C(int a,int b) { return jc[b]*invjc[a]%mod*invjc[b-a]%mod; } long long fast_pow(long long a,int b) { if (b==0) return 1; if (b&1) return fast_pow(a*a%mod,b/2)*a%mod; ...
a.cc:4:14: error: '\U0000ff18001' was not declared in this scope 4 | long long dp[8001][8001],a[8001],b[8001],ans,jc[8001],invjc[8001]; | ^~~~~ a.cc: In function 'int main()': a.cc:25:5: error: 'dp' was not declared in this scope 25 | dp[2000-a[i]][2000-b[i]]++; | ^~ a.cc:28:7: e...
s918053575
p04051
C++
#include<bits/stdc++.h> using namespace std; #define Max(x,y) ((x)>(y)?(x):(y)) #define Min(x,y) ((x)<(y)?(x):(y)) #define ll long long #define ls o<<1 #define rs o<<1|1 const int N=20+10,M=2000+10,inf=0x3f3f3f3f; const ll P=1e9+7; ll n,c[N]; template<class t>void rd(t &x){ x=0;int w=0;char ch=0; while(!isdigit...
a.cc: In function 'long long int C(int, int)': a.cc:19:27: error: 'fac' was not declared in this scope 19 | ll C(int x,int y){return (fac[x]*ifac[y]%P)*ifac[x-y]%P;} | ^~~ a.cc:19:34: error: 'ifac' was not declared in this scope 19 | ll C(int x,int y){return (fac[x]*ifac[y]%P)*ifac...
s559424355
p04051
C++
#include <cstdio> #define rint register int #define N 200005 #define M 2003 using namespace std; const int Mod = 1e9 + 7; const int eps = 2001; int n, a[N], b[N], f[M << 1][M << 1]; int fac[M << 1], inv[M << 1], ifac[M << 1]; inline void prework() { fac[0] = inv[1] = ifac[0] = 1; for (rint i = 1; i <= eps << ...
a.cc: In function 'void prework()': a.cc:14:15: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 14 | for (rint i = 1; i <= eps << 1; ++i) | ^ a.cc:16:15: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 16 | for (rint i...
s804973046
p04051
C++
#include <iostream> #include <vector> #include <queue> using namespace std; typedef long long LL; const int N=200000 + 10; const LL MOD = 1000000007; int n,a[N],b[N]; LL fac[N],inv[N]; LL mpow(LL a, LL x){ if(x==0)return 1; LL t=mpow(a,x>>1); if(x%2==0)return t*t%MOD; return t*t%MOD*a%MOD; } int getId...
a.cc: In function 'int main()': a.cc:71:5: error: 'memset' was not declared in this scope 71 | memset(head,-1,sizeof(head)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <queue> +++ |+#include <cstring> ...
s468597312
p04051
C++
#include<cstdio> #include<cstring> #include<cmath> #include<cstdlib> #include<algorithm> #include<set> #define ll long long #define mod 1000000007 #define Mod1(x) (x>=mod?x-mod:x) #define Mod2(x) (x<0?x+mod:x) #define maxn 200010 inline ll read() { ll x=0; char c=getchar(),f=1; for(;c<'0'||'9'<c;c=getchar())if(c=='-'...
a.cc:39:9: error: ISO C++ forbids declaration of 'power' with no type [-fpermissive] 39 | inline power(ll a,ll b) | ^~~~~
s967988491
p04051
C++
#include<cstdio> #include<cstring> #include<cmath> #include<cstdlib> #include<algorithm> #include<set> #define ll long long #define mod 1000000007 #define Mod1(x) (x>=mod?x-mod:x) #define Mod2(x) (x<0?x+mod:x) #define maxn 200010 inline ll read() { ll x=0; char c=getchar(),f=1; for(;c<'0'||'9'<c;c=getchar())if(c=='-'...
a.cc:38:8: error: ISO C++ forbids declaration of 'getid' with no type [-fpermissive] 38 | inline getid(int x,int y){return (x+2000)*4001+(y+2000)+1;} | ^~~~~
s622643746
p04051
C++
123
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 123 | ^~~
s387600483
p04051
C++
43241324
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 43241324 | ^~~~~~~~
s992479801
p04051
C++
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <math.h> #include <time.h> #include <iostream> #include <algorithm> #include <stack> #include <queue> #include <map> #include <set> #include <iomanip> #include <assert.h> #include <fstream> using namespace std; typedef long long ll; const int MAXN =...
a.cc: In function 'int main()': a.cc:68:67: error: 'ans' was not declared in this scope; did you mean 'ans2'? 68 | ans1 = ((ll)mrk[i][j] * f[i][j] + ans) % MOD; | ^~~ | ...
s015037795
p04051
C
#include<stdio.h> int fact(int n); int main() { int n,i,j; scanf("%d",&n); int a[n],b[n]; for(int i=0;i<n;i++) { scanf("%d%d",&a[i],&b[i]); } for(i=0;i<n;i++) { for(j=i+1;j<n;j++) { sum+=fact(a[i]+b[i]+a[j]+b[j])/(fact(a[i]+a[j])*fact(b[i]+b[j])); } } printf("%d",sum); return 0; } int fact(int n) { int i=n,f=1; while(i...
main.c: In function 'main': main.c:16:1: error: 'sum' undeclared (first use in this function) 16 | sum+=fact(a[i]+b[i]+a[j]+b[j])/(fact(a[i]+a[j])*fact(b[i]+b[j])); | ^~~ main.c:16:1: note: each undeclared identifier is reported only once for each function it appears in
s022362749
p04051
C++
#include <cstdio> #include <cstring> #include <algorithm> #include <set> using namespace std; #define mod 1000000007 #define N 4050 #define m 2001 #define M 200050 typedef long long ll; int f[N][N],n; struct A { int x,y; }a[M]; ll fac[M],inv[M]; const ll inv2=(mod+1)/2; ll qp(ll x,ll y) { ll re=1; for(;y;y>>=1,x=x*x...
a.cc: In function 'int main()': a.cc:39:54: error: expected ']' before ')' token 39 | f[i][j]=(ll(f[i][j])+f[i-1][j)+f[i][j-1])%mod; | ^ | ] a.cc:39:65: error: expected ';' be...
s069989211
p04051
C++
#include<bits/stdc++.h> using namespace std; #define ll long long #define pb push_back const int maxn = 2e5 + 20; const int maxm = 2e3 + 20; const int mod = 1e9 + 7; ll dp[2 * maxm][2 * maxm] , a[maxn] , b[maxn] , fac[maxn] , caf[maxn]; void mkay(int &a) { while(a >= mod) a -= mod; } int bpw(int a , int b) { i...
a.cc: In function 'int main()': a.cc:64:39: error: cannot bind non-const lvalue reference of type 'int&' to a value of type 'long long int' 64 | mkay(dp[i][j] += dp[i - 1][j] + dp[i][j - 1]); | ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:13:16: note: init...
s349242929
p04051
C++
#include <bits/stdc++.h> using namespace std; #define qqqq qqqqq // asdlfjasdjgflajsdgfkjsagjdkfa // aesiufaepwueoqtqp9yerfjkhasdklvbae // faisdufgweaigfvklsdbviagsdigajsbdlkvbsdf // efuigaisdgvfsadgfklsadjlfgsajldgasdf const int MAXN = 2e3 + 10; const int MOD = 1e9 + 7; int n, dp[2 * MAXN][2 * MAXN], go[2 * MAX...
/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
s832927741
p04051
C++
#include <bits/stdc++.h> using namespace std; #define qqqq qqqqq const int MAXN = 2e3 + 10; const int MOD = 1e9 + 7; int n, dp[2 * MAXN][2 * MAXN], go[2 * MAXN][2 * MAXN]; int fac[4 * MAXN]; long long po(long long v, long long u) { return u ? (po(v * v % MOD, u >> 1) * (u & 1 ? v : 1) % MOD) : 1; } int ente...
/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
s555502149
p04051
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; #define sqr(x) ((x)*(x)) #define mp make_pair #define uint unsigned #define int long long #define PI pair<int,int> inline char gc(){ static char buf[100000],*p1=buf,*p2=buf; return p1==p2&&(p2=(p1=buf)+fread(buf,1...
a.cc:42:6: error: conflicting declaration 'long int dp [8020][4010]' 42 | long dp[N<<2][N<<1]; | ^~ a.cc:41:10: note: previous declaration as 'int dp [4010][4010]' 41 | signed n,dp[N<<1][N<<1],a[M],b[M],ans; | ^~ a.cc: In function 'int main()': a.cc:55:17: error: 'c' was not declared in ...
s277067488
p04051
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; #define sqr(x) ((x)*(x)) #define mp make_pair #define uint unsigned #define int long long #define PI pair<int,int> inline char gc(){ static char buf[100000],*p1=buf,*p2=buf; return p1==p2&&(p2=(p1=buf)+fread(buf,1...
a.cc:42:6: error: conflicting declaration 'long int dp [8020][4010]' 42 | long dp[N<<2][N<<1]; | ^~ a.cc:41:10: note: previous declaration as 'int dp [4010][4010]' 41 | signed n,dp[N<<1][N<<1],a[M],b[M],ans; | ^~ cc1plus: error: '::main' must return 'int' a.cc: In function 'int main()': ...
s040451154
p04051
C++
#include <cstdio> const long long MOD = 1000000007; int a[200001],b[200001]; long long fac[8001],ni[8001],f[4001][4001],ans; int n,x,y,p; long long C(int n,int m) { return fac[n]*ni[m]%MOD*ni[n-m]%MOD; } long long fun(long long a,int k) { long long s=1; while (k) { if (k&1) s=s*a%MOD; a=a*a%...
a.cc: In function 'int main()': a.cc:27:9: error: 'read' was not declared in this scope; did you mean 'fread'? 27 | read(a[i]); | ^~~~ | fread
s013256581
p04051
C++
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #define pb push_back #define fs first #define sc second #define all(x) (x).begin(), (x).end() #define sz(x) (int)(x).size() using namespace std; using namespace __gnu_pbds; typedef long long ll; typedef vector<int> vi; typedef vector<ll> vll; typedef ve...
a.cc:26:7: error: expected unqualified-id before '.' token 26 | inline./ a void add(int &x, int y) { | ^ a.cc: In function 'int main()': a.cc:36:9: error: 'add' was not declared in this scope; did you mean 'std::filesystem::perm_options::add'? 36 | add(bn[i][j], bn[i-1][j-1]); | ...
s350884092
p04051
C++
#include<iostream> using namespace std; main(){ long n; cin>>n; long long a[n],b[n]; long long sum; for(long i=0;i<n;i++){ cin>>a[i]>>b[i]; } for(long i=0;i<n-1;i++){ for(long j=i+1;j<n;j++){ long long aa=1; if(b[i]+b[j]<=a[i]+a[j]){ for(long k=a[i]+a[j]+1;k<=a[i]+a[j]+b[i]+b[j];k++){ aa=k*aa/(k-a[i]-a[j]); }} else{ fo...
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 3 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:23:10: error: 'bb' was not declared in this scope; did you mean 'b'? 23 | sum +=aa/bb%(10^9+7); | ^~ | b
s509468562
p04051
C++
#include<iostream> using namespace std; main(){ long n; cin>>n; long long a[n],b[n]; long long sum; for(long i=0;i<n;i++){ cin>>a[i]>>b[i]; } for(long i=0;i<n-1;i++){ for(long j=i+1;j<n;j++){ long long aa=1; if(b[i]+b[j]<=a[i]+a[j]){ for(long k=a[i]+a[j]+1;k<=a[i]+a[j]+b[i]+b[j];k++){ aa=k*aa/(k-a[i]-a[j]); } else{ for...
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 3 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:18:1: error: expected '}' before 'else' 18 | else{ | ^~~~ a.cc:14:25: note: to match this '{' 14 | if(b[i]+b[j]<=a[i]+a[j]){ | ...
s980961754
p04051
C++
#include <bits/stdc++.h> using namespace std; #define fi first #define se second #define pb push_back #define mp make_pair const int MOD = 1e9 + 7; const int N = 2001; int a[200001]; int b[200001]; int dp[8001][8001]; int choose(int a, int b)...
a.cc: In function 'int choose(int, int)': a.cc:23:21: error: expected primary-expression before 'long' 23 | dp[a][b] = (long long(choose(a - 1, b)) + long long(choose(a - 1, b - 1)))%MOD; | ^~~~ a.cc:23:21: error: expected ')' before 'long' 23 | dp[a][b] = (long long(choo...
s250717547
p04051
C++
#include <bits/stdc++.h> #define FO(i,a,b) for (int i = (a); i < (b); i++) #define sz(v) int(v.size()) #define N 2048 #define MOD 1000000007 using namespace std; int r[8005][4005]; int c[2005][2005]; int main() { int n; scanf("%d", &n); FO(i,0,n) { int a, b; scanf("%d %d", &a, &b); r[2001-a...
a.cc:41:8: error: stray '@' in program 41 | [ishraq@Boo E]$ fg | ^ a.cc:45:8: error: stray '@' in program 45 | [ishraq@Boo E]$ cat main.cpp | ^ a.cc:41:1: error: expected unqualified-id before '[' token 41 | [ishraq@Boo E]$ fg | ^ a.cc:55:5: error: redefinition of 'int r [8005][...
s817368956
p04051
C++
#include <bits/stdc++.h> // iostream is too mainstream #include <cstdio> // bitch please #include <iostream> #include <algorithm> #include <cstdlib> #include <vector> #include <set> #include <map> #include <queue> #include <stack> #include <list> #include <cmath> #include <iomanip> #include <time.h> #define dibs reserv...
a.cc: In function 'int main()': a.cc:59:9: error: 'poly' was not declared in this scope 59 | poly P(2048,vector<long long>(2048,0)); | ^~~~ a.cc:63:17: error: 'P' was not declared in this scope 63 | P[a][b]++;} | ^ a.cc:64:13: error: expected ';' before ...
s724454197
p04051
C++
#include<vector> #include<cmath> #include<map> #include<cstdlib> #include<iostream> #include<sstream> #include<fstream> #include<string> #include<algorithm> #include<cstring> #include<cstdio> #include<set> #include<stack> #include<bitset> #include<functional> #include<ctime> #include<queue> #include<deque> #include<com...
a.cc: In function 'int main()': a.cc:102:49: error: no match for 'operator+=' (operand types are 'double' and 'P' {aka 'std::complex<double>'}) 102 | rep(i,2050) rep(j,2050) mat[i][j].real()+=P(ma[i][j],0); | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
s040923796
p04051
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef long double ld; #define forn(i, a, n) for (int i = a; i < n; ++i) #define ford(i, a, n) for (int i = n - 1; i >= a; --i) #define fore(i, a, n) for (int i = a; i <= n; ++i) #define all(a) (a).begin(), (a).end() ...
a.cc: In function 'int main()': a.cc:425:33: error: 'class Conv64' has no member named 'multuply'; did you mean 'multiply'? 425 | vector<int64_t> res = c.multuply(in, in); | ^~~~~~~~ | multiply a.cc:432:37: error: no match for 'operat...
s877606431
p04051
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef long double ld; #define forn(i, a, n) for (int i = a; i < n; ++i) #define ford(i, a, n) for (int i = n - 1; i >= a; --i) #define fore(i, a, n) for (int i = a; i <= n; ++i) #define all(a) (a).begin(), (a).end() ...
a.cc: In function 'int main()': a.cc:423:32: error: expected ';' before 'l' 423 | in[a * N + b]++l | ^ | ; a.cc:425:33: error: 'class Conv64' has no member named 'multuply'; did you mean 'multiply'? 425 | vector<int64_...
s570188151
p04051
C++
#include<vector> #include<cmath> #include<map> #include<cstdlib> #include<iostream> #include<sstream> #include<fstream> #include<string> #include<algorithm> #include<cstring> #include<cstdio> #include<set> #include<stack> #include<bitset> #include<functional> #include<ctime> #include<queue> #include<deque> #include<com...
a.cc: In function 'int main()': a.cc:102:47: error: lvalue required as left operand of assignment 102 | rep(i,2050) rep(j,2050) mat[i][j].real()=ma[i][j]; | ~~~~~~~~~~~~~~^~
s659171877
p04051
C++
#include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <vector> #include <string> #include <algorithm> #include <stack> #include <queue> #include <set> #include <cmath> #include <map> using namespace std; #define MOD 1000000007 #define ADD(X,Y) ((X) = ((X) + (Y)%MOD) % MOD) typedef long lo...
a.cc: In function 'int main()': a.cc:35:56: error: expected ':' before ')' token 35 | v[i][j] = ((j > 0 ? v[i + 1][j]) + (i > 0 ? v[i][j + 1] : 0)) % MOD; | ^ | : a.cc:35:...