submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s144617839
p03988
C++
#include <bits/stdc++.h> #include <boost/range/algorithm.hpp> #include <boost/range/numeric.hpp> #include <boost/range/irange.hpp> #include <boost/range/adaptor/indexed.hpp> using namespace std; using namespace boost::adaptors; using namespace std::string_literals; using ll = int64_t; using vecint = vector<int>; using...
a.cc:2:10: fatal error: boost/range/algorithm.hpp: No such file or directory 2 | #include <boost/range/algorithm.hpp> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated.
s954025627
p03988
C++
#include <iostream> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <vector> #include <string> #include <queue> #include <deque> #include <list> #include <set> #include <map> #include <bitset> using namespace std; int main() { int N; cin >> N; vector<int> v; for (int i = 0; i ...
a.cc: In function 'int main()': a.cc:23:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 23 | sort(v.begin(), v.end(), greater<int>()); | ^~~~ | sqrt
s240105892
p03988
C++
#include <iostream> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <vector> #include <string> #include <queue> #include <deque> #include <list> #include <set> #include <map> #include <bitset> using namespace std; int main(){ int N; cin >> N; vector<int> v; for(int i=0;i<N;...
a.cc: In function 'int main()': a.cc:23:3: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 23 | sort(v.begin(), v.end(), std::greater<int>() ); | ^~~~ | sqrt
s938447324
p03988
C++
#include "bits/stdc++.h" using namespace std; using ll = long long; using pii = pair<int, int>; using pll = pair<ll, ll>; using vi = vector<int>; using vl = vector<ll>; using vvi = vector<vi>; using vvl = vector<vl>; const ll INF = 1LL << 60; const ll MOD = 1000000007; template <class T> bool ch...
a.cc: In function 'int main()': a.cc:74:25: error: expected ';' before '}' token 74 | continue | ^ | ; 75 | } else { | ~
s372318760
p03988
C++
#include <bits/stdc++.h> using namespace std; const int MOD=1e9+7; //const int MOD=998244353; const int INF=1e9; const long long LINF=1e18; #define int long long //template template <typename T> void fin(T a){ cout<<a<<endl; exit(0); } //main signed main(){ int N;cin>>N; std::vector<int> v(N); for(int i=0;i<N...
a.cc: In function 'int main()': a.cc:22:4: error: expected ';' before numeric constant 22 | 5 4 3 3 4 5 | ^~ | ;
s715548740
p03988
C++
#include <bits/stdc++.h> using namespace std; #pragma comment(linker, "/stack:200000000") #pragma GCC optimize("Ofast") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #define start_routine() int begtime = clock(); #define end_routine() int endtime = clock(); cerr << endl << "Time elapse...
a.cc:81:5: error: redefinition of 'long long int n' 81 | int n; | ^ a.cc:47:5: note: 'long long int n' previously declared here 47 | int n, k; | ^
s799542152
p03988
C++
#include "bits/stdc++.h" #include <MT.h> typedef long long ll; #define int ll #define fi first #define se second #define SORT(a) sort(a.begin(),a.end()) #define rep(i,n) for(int i = 0;i < (n) ; i++) #define REP(i,n) for(int i = 0;i < (n) ; i++) #define MP(a,b) make_pair(a,b) #define pb(a) push_back(a) #define INF LLO...
a.cc:2:10: fatal error: MT.h: No such file or directory 2 | #include <MT.h> | ^~~~~~ compilation terminated.
s311366953
p03988
C++
///*BY ME*/// #include <bits/stdc++.h> using namespace std; #define y1 sijf #define RampageRead ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);mt19937 rng(std::chrono::system_clock::now().time_since_epoch().count()) #define all(v) (v).begin(),(v).end() #define pb push_back #define F first #define S second #define ...
a.cc: In function 'int main()': a.cc:28:26: error: expected ';' before '{' token 28 | for(int i=0;i<n;i++)5 | ^ | ; 29 | { | ~
s343747377
p03988
C++
///*BY ME*/// #include <bits/stdc++.h> #define y1 sijf //#define RampageRead ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);mt19937 rng(std::chrono::system_clock::now().time_since_epoch().count()) #define all(v) (v).begin(),(v).end() #define pb push_back #define F first #define S second #define endl '\n' #define ...
a.cc: In function 'int main()': a.cc:22:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 22 | cin>>n; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, from a.cc:2: /usr/include/c++/14/iostream:62:18: note: ...
s259078257
p03988
C++
///*BY ME*/// #include <bits/stdc++.h> #define y1 sijf #define RampageRead ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);mt19937 rng(std::chrono::system_clock::now().time_since_epoch().count()) #define all(v) (v).begin(),(v).end() #define pb push_back #define F first #define S second #define endl '\n' #define fl...
a.cc: In function 'int main()': a.cc:5:21: error: 'ios_base' has not been declared 5 | #define RampageRead ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);mt19937 rng(std::chrono::system_clock::now().time_since_epoch().count()) | ^~~~~~~~ a.cc:21:5: note: in expansion of macro 'Rampage...
s121690758
p03988
C++
var n,mi,ma,i,a:Longint; cnt:array[1..99]of Longint; f:Boolean; begin read(n); mi:=n; for i:=1 to n do begin read(a); if mi>a then mi:=a; if ma<a then ma:=a; inc(cnt[a]); end; f:=true; if cnt[mi]-ma mod 2<>1 then f:=false; for i:=mi+1 to ma do begin if cnt[i]<2 then f:=false; end; if f and(mi*2>=m...
a.cc:3:19: error: too many decimal points in number 3 | cnt:array[1..99]of Longint; | ^~~~~ a.cc:19:40: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes 19 | if f and(mi*2>=ma)then writeln('Possible')else writeln('Impossible'); | ...
s278139428
p03988
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int (i)=0;(i)<(int)(n);(i)++) int main(void){ int N; cin >> N; int a[N+10]; rep(i,N)cin >> a[i]; sort(a,a + N); int separate = (N - 1) - a[N - 1]; int depth = N - separate; map<int,int> mp; rep(i,N)mp[a[i]]++; if(d...
a.cc: In function 'int main()': a.cc:32:9: error: 'i' was not declared in this scope 32 | for(i,N - 1){ | ^ a.cc:38:5: error: expected primary-expression before 'if' 38 | if(cou == separate)cout << "Possible" << "\n"; | ^~ a.cc:37:6: error: expected ';' before 'if' 37 | } ...
s380035639
p03988
C++
#include <iostream> #include <vector> using namespace std; typedef long long int ll; #define all(x) x.begin(),x.end() int main() { int n; cin >> n; vector<int> a(n); for(int i = 0; i < n; i++){ cin >> a[i]; } int k = *max_element(all(a)); vector<int> cnt(k+1); for(int i = 0; i < n; i++){ cnt[a[i]]++; }...
a.cc: In function 'int main()': a.cc:18:18: error: 'max_element' was not declared in this scope 18 | int k = *max_element(all(a)); | ^~~~~~~~~~~
s788891686
p03988
C++
#include <bits/stdc++.h> #define bp __builtin_popcountll #define pb push_back #define in(s) freopen(s, "r", stdin); #define inout(s, end1, end2) freopen((string(s) + "." + end1).c_str(), "r", stdin),\ freopen((string(s) + "." + end2).c_str(), "w", stdout); #define fi first #define se second #define bw(i, r, l) for (i...
a.cc: In function 'int main()': a.cc:41:13: error: 'k' was not declared in this scope 41 | if (k & 1) fw (i, mn, (mx + 1) / 2 + 1) if (cnt[i] > 2) bad(); | ^
s305890584
p03988
C++
/*input 4 3 3 3 2 */ #include <bits/stdc++.h> #pragma GCC optimize("unroll-loops,no-stack-protector") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") using namespace std; typedef long long ll; typedef pair<int,int> pii; typedef pair<ll,ll> pll; typedef pair<double,double> pdd; #define IOS ...
a.cc: In function 'int main()': a.cc:82:23: error: 'k' was not declared in this scope 82 | if(i<(k+1)/2+1){ | ^
s462281519
p03988
C++
#include <bits/stdc++.h> using namespace std; const int MAXn = 100 + 10; int n, ar[MAXn], max1 = 0 , min1 = MAXn, cnt, cnt2; int main() { cin >> n; for (int i = 0; i < n; i++) { cin >> ar[i]; min1 = min(min1 , ar[i]); if (ar[i] == min1) cnt2++; else if (ar[i] < max1) cnt2 = 0; if (ar[i] == max1) cn...
a.cc: In function 'int main()': a.cc:20:86: error: expected ';' before 'return' 20 | if (min1 < max1 / 2 + (max1 % 2) || cnt < 2 || (cnt2 > 1 && min1 == max1 / 2) | ^ | ...
s345601471
p03988
C++
#include <bits/stdc++.h> using namespace std; struct P { //string r; int x,y,z; bool operator<(const P &a)const{ // if(y!=a.y) // return y>a.y; return x<a.x; // return z>a.z; } }; vector<int> v[155]; //bitset<4001000> b; int a,c,i,b,k,d,n,m,e;//dy[15]={0,1,0,-1,-1,1,-1,1},d...
a.cc: In function 'int main()': a.cc:73:41: error: expected ']' before ')' token 73 | if(max(j[o[a]/2],j[o[a]/2+o[a]%2)>1) | ^ | ]
s322066689
p03988
C++
def check(a): a = sorted(a) d = {} for x in a: if x not in d.keys(): d[x] = 1 else: d[x] += 1 if (a[-1]+1)>>1 != a[0]: return False if (a[-1]&1) != 1 and d[a[0]]!=1: return False if (a[-1]&1) == 1 and d[a[0]]!=2: return False fo...
a.cc:24:15: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes 24 | print 'Possible' | ^~~~~~~~~~ a.cc:26:15: warning: multi-character literal with 10 characters exceeds 'int' size of 4 bytes 26 | print 'Impossible' | ^~~~~~~~~~...
s558308626
p03988
C++
#include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <algorithm> typedef long long ll ; #define rep(i, a, b) for (int i = a; i <= b; ++ i) const int N = 500 ; using namespace std ; int n, a[N] ; int main() { scanf("%d", &n) ; int x ; rep(i, 1, n) scanf("%d", &x), ++ a[x] ; int x =...
a.cc: In function 'int main()': a.cc:17:13: error: redeclaration of 'int x' 17 | int x = 1 ; | ^ a.cc:15:13: note: 'int x' previously declared here 15 | int x ; | ^
s308636898
p03988
C++
#include <iostream> #include <vector> using namespace std; typedef long long lli; lli n; vector<lli> a; int pos(){ cout << "Possible" << endl; return 0; } int imp(){ cout << "Impossible" << endl; return 0; } int main(){ cin >> n; a = vector<lli> (n); for(lli i = 0;i < n;i++) cin >> a[i]; ...
a.cc: In function 'int main()': a.cc:19:5: error: 'sort' was not declared in this scope; did you mean 'short'? 19 | sort(a.begin(),a.end()); | ^~~~ | short a.cc:22:16: error: 'upper_bound' was not declared in this scope 22 | if(upper_bound(a.begin(),a.end(),i) - lower_bound(a.b...
s299021007
p03988
C++
#include <cstdio> #include <vector> #include <algorithm> #include <map> using namespace std; int main() { size_t N; scanf("%zu", &N); vector<int> a(N); map<int, int> m; int max_a=0; for (size_t i=0; i<N; ++i) { scanf("%d", &a[i]); ++m[a[i]]; if (max_a < a[i]) ...
a.cc: In function 'int main()': a.cc:33:10: error: 'i' was not declared in this scope 33 | for (i=max_a/2; --i;) | ^
s268208923
p03988
C++
use std::cmp; fn main(){ let mut sc = Scanner::new(); while let Ok(n) = sc.wrapped() { let mut a = vec![0i32; n]; for e in a.iter_mut() { *e = sc.next(); } let solve = || { let mut cnt = vec![0; n+1]; let mut max = 0; for i in 0.....
a.cc:14:22: error: too many decimal points in number 14 | for i in 0..n { | ^~~~ a.cc:44:2: error: invalid preprocessing directive #[ 44 | #[allow(dead_code)] | ^ a.cc:50:2: error: invalid preprocessing directive #[ 50 | #[allow(dead_code)] | ^ a.cc:1:1: err...
s200474694
p03988
C++
#include <bits/stdc++.h> #define SZ(X) ((int)(X).size()) #define ALL(X) (X).begin(), (X).end() #define REP(I, N) for (int I = 0; I < (N); ++I) #define REPP(I, A, B) for (int I = (A); I < (B); ++I) #define RI(X) scanf("%d", &(X)) #define RII(X, Y) scanf("%d%d", &(X), &(Y)) #define RIII(X, Y, Z) scanf("%d%d%d", &(X), &(Y...
a.cc:52:27: error: macro "REPP" requires 3 arguments, but only 2 given 52 | REPP(i,h+1){ | ^ a.cc:5:9: note: macro "REPP" defined here 5 | #define REPP(I, A, B) for (int I = (A); I < (B); ++I) | ^~~~ a.cc:67:25: error: macro "REPP" requires 3 argument...
s240380824
p03988
C++
#include <iostream> #include <algorithm> using namespace std; void solve(); int main(int argc, char *argv[]) { if (argc == 2) { freopen(argv[1], "r", stdin); } else if (argc == 3) { freopen(argv[1], "r", stdin); freopen(argv[2], "w", stdout); } solve(); return 0; } const in...
a.cc: In function 'void solve()': a.cc:25:9: error: 'memset' was not declared in this scope 25 | memset(cnt,0,sizeof(cnt)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <algorithm> +++ |+#include <...
s091623895
p03988
C++
#include <iostream> #include <cstdio> #include <vector> #include <string> #include <set> #include <algorithm> using namespace std; #define mP make_pair #define pB push_back #define X first #define Y second int Abs(int x){ if(x < 0) return -x; else return x; } int main(){ int n; cin >> n; vector<int> v; for(...
a.cc: In function 'int main()': a.cc:42:32: error: expected primary-expression before '||' token 42 | if((i >= 0) && || Abs(v[i] - tt) > 1){ | ^~
s471701220
p03988
C++
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <algorithm> #include <utility> #include <functional> #include <cstring> #include <queue> #include <stack> #include <math.h> #include <iterator> #include <vector> #include <string> #include <set> #include <math.h> #include <iostream> #include<map> #include <io...
a.cc: In function 'int main()': a.cc:52:1: error: jump to label 'impossible' 52 | impossible:; | ^~~~~~~~~~ a.cc:38:47: note: from here 38 | if ((a[0]-1) * 2 + 1 > a[n - 1]) goto impossible; | ^~~~~~~~~~ a.cc:40:13: note: crosses initialization...
s174849537
p03988
C++
#include<iostream> #include<algorithm> #include<climits> #include<cmath> #include<cstdio> #include<cstdlib> #include<ctime> #include<string> #include<cstring> #include<vector> #include<stack> #include<queue> #include<set> #include<bitset> using namespace std; typedef long long ll; typedef unsigned long long ull; type...
a.cc: In function 'bool solve()': a.cc:54:6: error: 'n' was not declared in this scope; did you mean 'yn'? 54 | if(n == 2 && a[1] == 1)return true; | ^ | yn a.cc:58:13: error: 'n' was not declared in this scope 58 | rep1(i, n)if(a[i] != 2)return false; | ^ a.cc:25:34:...
s680295661
p03988
C++
#include <iostream> #include <vector> #include <string> #include <sstream> #include <algorithm> using namespace std; template <class F, class T> void convert(const F &f, T &t){ stringstream ss; ss << f; ss >> t; } long int pow(long int n, int m){ if(m<=0){ return 1; }else{ return n * pow(n,m-1); }...
a.cc: In function 'int main()': a.cc:88:2: error: expected '}' at end of input 88 | } | ^ a.cc:25:11: note: to match this '{' 25 | int main(){ | ^
s151786391
p03988
C++
#include <iostream> #include <vector> #include <string> #include <sstream> #include <algorithm> using namespace std; template <class F, class T> void convert(const F &f, T &t){ stringstream ss; ss << f; ss >> t; } long int pow(long int n, int m){ if(m<=0){ return 1; }else{ return n * pow(n,m-1); }...
a.cc: In function 'int main()': a.cc:82:2: error: expected '}' at end of input 82 | } | ^ a.cc:25:11: note: to match this '{' 25 | int main(){ | ^
s451387231
p03988
C++
#include <iostream> #include <vector> #include <string> #include <sstream> #include <algorithm> using namespace std; template <class F, class T> void convert(const F &f, T &t){ stringstream ss; ss << f; ss >> t; } long int pow(long int n, int m){ if(m<=0){ return 1; }else{ return n * pow(n,m-1); }...
a.cc: In function 'int main()': a.cc:39:3: error: expected '}' before 'else' 39 | else if(ma<2){ | ^~~~ a.cc:37:30: note: to match this '{' 37 | if(!(a[0]==1 && a[1]==1)){ | ^ a.cc:82:2: error: expected '}' at end of input 82 | } | ^ a.cc:25:11: note: to ...
s657992932
p03988
C++
#include <bits/stdc++.h> #include<iostream> #include<cstdio> #include<vector> #include<queue> #include<map> #include<cstring> #include<string> #include <math.h> #include<algorithm> // #include <boost/multiprecision/cpp_int.hpp> ...
a.cc: In function 'int main()': a.cc:160:21: error: expected ')' before '!' token 160 | if(a![0]=a[n-1]/2+1){ | ~ ^ | )
s535495924
p03988
C++
#include <bits/stdc++.h> #include <stdio.h> #include <ctype.h> #define y second #define x first #define lsb(x) (x&-x) #define pb push_back #define l(x) x<<1 #define r(x) (x<<1)|1 #define non(x) ( (x) > N? (x) - N : (x) + N) #define y second const int MOD=1000000007; //LOL const int MAXM=210*210; const int NMAX=6100; co...
a.cc: In function 'int main()': a.cc:62:34: error: use of an operand of type 'bool' in 'operator--' is forbidden 62 | m[max(i-1, k+1-i)]--; | ~~~~~~~~~~~~~~~~~^ a.cc:75:23: error: use of an operand of type 'bool' in 'operator++' is forbidden in C++17 75 | m[A[...
s772687673
p03988
C
#define _CRT_SECURE_NO_WARNINGS #include <bits/stdc++.h> using namespace std; #define int long long const int MAX_N = 100; int N, A[MAX_N]; int cnt[MAX_N]; bool Solve() { int ma = 0, mi = MAX_N; for (int i = 0; i < N; i++) { mi = min(mi, A[i]); ma = max(ma, A[i]); cnt[A[i]]++; } if (N > 2 && ma < 2) retur...
main.c:2:10: fatal error: bits/stdc++.h: No such file or directory 2 | #include <bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s211684544
p03988
C++
#include <iostream> #include <vector> using namespace std; int main(){ int N; vector<int> v; cin>>N; v.resize(N); for(int i=0; i<N; i++){ cin>>v[i]; } sort(v.begin(), v.end()); if(v[N-1]!=v[N-2]){ cout<<"Impossible"<<endl; }else if(N!=2 && v[1]==1){ cout<<"Impossible"<<endl; }else{ cout<<"Possibl...
a.cc: In function 'int main()': a.cc:17:9: error: 'sort' was not declared in this scope; did you mean 'short'? 17 | sort(v.begin(), v.end()); | ^~~~ | short
s331423943
p03988
C++
main(){puts("Possible");}
a.cc:1:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 1 | main(){puts("Possible");} | ^~~~ a.cc: In function 'int main()': a.cc:1:8: error: 'puts' was not declared in this scope 1 | main(){puts("Possible");} | ^~~~
s266550554
p03988
C++
import random print(random.choice(['Possible','Impossible']))
a.cc:2:22: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes 2 | print(random.choice(['Possible','Impossible'])) | ^~~~~~~~~~ a.cc:2:33: warning: multi-character literal with 10 characters exceeds 'int' size of 4 bytes 2 | print(random.choice(['Possible'...
s435359113
p03989
C
#include<bits/stdc++.h> #define pb push_back #define ins insert #define F first #define S second #define var auto using namespace std; typedef long long ll; const int Mod = 924844033; const int Max = 4010; ll dp[Max][Max]; ll numofway[Max][Max]; ll fact[Max]; void Solve(vector<int> A , int cntOfElem) { int n = A.s...
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory 1 | #include<bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s990792359
p03989
C++
#include<bits/stdc++.h> using namespace std; const long long delta = 924844033, maxn = 2005; long long pat_chos[maxn][maxn]; void calc_pat_chos(){ for(long long i = 0; i < maxn; i++) pat_chos[i][0] = pat_chos[i][1] = 1; pat_chos[0][1] = 0; for(long long i = 2; i < maxn; i++) for(long long...
a.cc: In function 'void solve(long long int, long long int)': a.cc:42:118: error: expected ')' before ';' token 42 | ans = (ans + delta + (((i & 1) * (-1) + ((i & 1) == 0) ) * ((fact[n - i] * dp[v.size()][i]) % delta)) % delta; | ~ ...
s624047859
p03989
C++
#include<bits/stdc++.h> using namespace std; const long long delta = 924844033, maxn = 2005; long long pat_chos[maxn][maxn]; void calc_pat_chos(){ for(long long i = 0; i < maxn; i++) pat_chos[i][0] = pat_chos[i][1] = 1; pat_chos[0][1] = 0; for(long long i = 2; i < maxn; i++) for(long long...
a.cc: In function 'void nap(std::vector<long long int>&)': a.cc:22:31: error: expected primary-expression before 'long' 22 | for(long long i = 1; i <= long long(v.size()); i++){ | ^~~~ a.cc:22:30: error: expected ';' before 'long' 22 | for(long long i = 1; i <= long lon...
s970824750
p03989
Java
import java.io.*; import java.util.*; public class TaskA { //FastIO io = new FastIO("in.txt"); int N, M; long[][] dp; static long MOD = 1000000007; static long[] FS = new long[1005]; void init(){ FS[0] = 1; for(int i=1; i<1005; i++){ FS[i] = (FS[i-1] * i) % MOD; ...
Main.java:4: error: class TaskA is public, should be declared in a file named TaskA.java public class TaskA { ^ Main.java:47: error: cannot find symbol N = io.nextInt(); M = io.nextInt(); ^ symbol: variable io location: class TaskA Main.java:47: error: cannot find symbol N = io....
s684532931
p03989
C++
#include <iostream> #include <vector> #include <map> using namespace std; typedef long long ll; const int MOD = 924844033; struct Modint { ll val; Modint (ll _val = 0) : val(_val % MOD) {} Modint operator+ (Modint other) const { return Modint(val + other.val); } void operator+= (Modint other)...
a.cc:78:1: error: expected ',' or ';' before 'const' 78 | const Modint inv2 = inv(Modint(2)); | ^~~~~
s004998278
p03989
C++
#include <iostream> #include <algorithm> #include <utility> #include <vector> #include <numeric> #include <array> template <class T, class U> inline bool chmin(T &lhs, const U &rhs) { if (lhs > rhs) { lhs = rhs; return true; } return false; } template <class T, class U> inline bool chmax(T &lhs, const U &rhs) { ...
a.cc:22:16: error: 'int_fast64_t' does not name a type 22 | using int_ = int_fast64_t; | ^~~~~~~~~~~~ a.cc:24:5: error: 'int_' does not name a type; did you mean 'int'? 24 | int_ i; | ^~~~ | int a.cc:25:23: error: expected ')' before 'i_' 25 | constexpr itr(in...
s349917679
p03989
C++
#include <iostream> #include <algorithm> #include <utility> #include <vector> #include <numeric> #include <array> template <class T, class U> inline bool chmin(T &lhs, const U &rhs) { if (lhs > rhs) { lhs = rhs; return true; } return false; } template <class T, class U> inline bool chmax(T &lhs, const U &rhs) { ...
a.cc:22:16: error: 'int_fast64_t' does not name a type 22 | using int_ = int_fast64_t; | ^~~~~~~~~~~~ a.cc:24:5: error: 'int_' does not name a type; did you mean 'int'? 24 | int_ i; | ^~~~ | int a.cc:25:23: error: expected ')' before 'i_' 25 | constexpr itr(in...
s093733100
p03989
C++
#include <iostream> #include <algorithm> #include <utility> #include <vector> #include <numeric> template <class T, class U> inline bool chmin(T &lhs, const U &rhs) { if (lhs > rhs) { lhs = rhs; return true; } return false; } template <class T, class U> inline bool chmax(T &lhs, const U &rhs) { if (lhs < rhs) ...
a.cc:21:16: error: 'int_fast64_t' does not name a type 21 | using int_ = int_fast64_t; | ^~~~~~~~~~~~ a.cc:23:5: error: 'int_' does not name a type; did you mean 'int'? 23 | int_ i; | ^~~~ | int a.cc:24:23: error: expected ')' before 'i_' 24 | constexpr itr(in...
s274785608
p03989
C++
#include <iostream> #include <algorithm> #include <cmath> #include <stdio.h> #include <stdlib.h> #include <vector> #include <map> #include <queue> #include <set> #include <string> #include <string.h> #include <stack> #include <assert.h> #include <self/combinatorics> #define Endl endl #define mp make_pair #define ll lon...
a.cc:14:10: fatal error: self/combinatorics: No such file or directory 14 | #include <self/combinatorics> | ^~~~~~~~~~~~~~~~~~~~ compilation terminated.
s820945997
p03989
C++
#pragma GCC optimize("Ofast") #pragma GCC optimize("no-stack-protector") #pragma GCC optimize("unroll-loops") #pragma GCC optimize("fast-math") #pragma GCC target("sse,sse2,sse3,ssse3,popcnt,abm,mmx,tune=native") #include <iostream> #include <vector> #include <algorithm> #include <set> #include <map> #include <unordere...
a.cc: In function 'int main()': a.cc:147:36: error: too many arguments to function 'long long int mod(long long int)' 147 | dp[i + j] = mod(dp[i + j], mult(dp1[i], dp2[j])); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:68:5: note: declared here 68 | int mod(...
s517144727
p03989
C++
#include<bits/stdc++.h> using namespace std; const int N=4005; const int mod=924844033; #define ll long long int n,k,ok[N]; ll f[N][2],fac[N/2]; int main(){ scanf("%d%d",&n,&k); fac[0]=1;ll s; for(int i=1;i<=n;i++)fac[i]=fac[i-1]*i%mod; f[0][0]=1;ll cnt=0; for(int i=1;i<=k;i++){ ok[cnt+1]=1;cnt+=(n-i)/k+1; ok[...
a.cc: In function 'int main()': a.cc:18:31: error: expected '}' at end of input 18 | for(int i=1;i<=s;i++){ | ~^ a.cc:18:31: error: expected '}' at end of input a.cc:8:11: note: to match this '{' 8 | int main(){ | ^
s836027344
p03989
C++
#include<bits/stdc++.h> using namespace std; #define LL long long #define P pair<LL,LL> const LL inf = 0x3f3f3f3f; const LL mod = 924844033; const LL N = 4e3+10; template <typename tp> inline void read(tp &x) { x=0;char c=getchar();int f=0; for(;c>'9'||c<'0';f|=(c=='-'),c=getchar()); for(;c<='9'&&c>='0';x=(x<<3...
a.cc: In function 'int main()': a.cc:27:33: error: reference to 'end' is ambiguous 27 | end[tot]=1; | ^~~ In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166, from a.cc:1: /usr/include/c++/14/valarray:1265...
s465678428
p03989
C++
#include<cstdio> #include<algorithm> #define rep(i,s,t) for(register int i=s;i<=t;++i) using namespace std; const int mod=924844033; const int N=5011 int n,k,tot,ans; int f[N][N][2],fac[N]; bool vis[N][2]; int ed[N]; int main(){ scanf("%d%d",&n,&k); f[1][0][0]=1; rep(i,1,n) rep(j,0,1) if(!vis[i][j]){ for(re...
a.cc:7:1: error: expected ',' or ';' before 'int' 7 | int n,k,tot,ans; | ^~~ a.cc: In function 'int main()': a.cc:12:23: error: 'n' was not declared in this scope 12 | scanf("%d%d",&n,&k); | ^ a.cc:12:26: error: 'k' was not declared in this scope 12 | scanf("%...
s096785859
p03989
C++
#include <bits/stdc++.h> using namespace std; const int N=2050,mod=924844033; int n,m,k,ans,jc[N]= {1},f[N*2][N][2]; bool ed[N],vis[N][2]; int main() { scanf("%d%d",&n,&k); for(int i=1; i<=n; i++) for(int j=0; j<2; j++) if(!vis[i][j]) int cnt=0; for(int x=i,y=j; x<=n; x+=k,y^=1) { cnt++; vi...
a.cc: In function 'int main()': a.cc:13:43: error: 'i' was not declared in this scope 13 | for(int x=i,y=j; x<=n; x+=k,y^=1) | ^ a.cc:13:61: error: 'y' was not declared in this scope 13 | for(int x=i,y=...
s883731385
p03989
C++
#include<iostream> #include<cstdio> #include<cstring> #include<cstdlib> #include<algorithm> using namespace std; typedef long long ll; const int N=4009; const ll md=924844033; int n,k; bool vis[N][N]; ll g[N],fac[N]; int end[N],tot; ll f[N][N][2]; int main() { scanf("%d%d",&n,&k); for(int i=1;i<=n;i++) for(int ...
a.cc: In function 'int main()': a.cc:29:33: error: reference to 'end' is ambiguous 29 | end[tot+=len]=1; | ^~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s078065998
p03989
C++
#include <bits/stdc++.h> using namespace std; const long long mod = 924844033; void add(long long &x, long long y) { x += y; if (x >= mod) x -= mod; } int main() { int n, K; cin >> n >> K; static long long dp[2020][2020][2]; // pos, num, L/H vector<int> c(K * 2); for (int i = 0; i < min(n, 2 * K); i++) { ...
a.cc: In function 'int main()': a.cc:61:36: error: expected ';' before ')' token 61 | for (int i = 1; i < 1010101) fact[i] = i * fact[i - 1] % mod; | ^ | ;
s446811436
p03989
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; public class Main { static InputStream is; static PrintWriter out; static String INPUT = ""; static void solve() { int n = ...
Main.java:124: error: cannot find symbol int P = NTTPrimes[k], g = NTTPrimitiveRoots[k]; ^ symbol: variable NTTPrimes location: class Main Main.java:124: error: cannot find symbol int P = NTTPrimes[k], g = NTTPrimitiveRoots[k]; ^ symbol: variable NTTPrimitiveRoots...
s898602665
p03990
C++
#include<cstdio> #define fr(N,i,x) for (int i=N.lnk[x];i;i=N.nxt[i]) using namespace std; const int maxn=200005,maxe=maxn<<1; int n,X,Y,dst[maxn],fa[maxn],Dst[maxn],Q[maxn],ans;bool vis[maxn]; struct ljb{ int e,lnk[maxn],nxt[maxe],son[maxe]; inline void add_e(int x,int y){son[++e]=y;nxt[e]=lnk[x];lnk[x]=e;} }A,B; inl...
a.cc:26:8: error: ISO C++ forbids declaration of 'check' with no type [-fpermissive] 26 | inline check(int x,int y){ | ^~~~~
s900253297
p03990
C++
#include<bis/stdc++.h> using namespace std; const int maxn=2e5+10; int n,x,y,ans,vis[maxn]; int read(){ int x=0,f=1;char ch=getchar(); while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();} while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();} return x*f; } void print(int x){ if(x<0)putchar('-'),x=-x; ...
a.cc:1:9: fatal error: bis/stdc++.h: No such file or directory 1 | #include<bis/stdc++.h> | ^~~~~~~~~~~~~~ compilation terminated.
s503464709
p03990
C++
#include<bits/stdc++.h> #define N 200005 using namespace std; int n,x,y; int xx[N],yy[N]; int head[N],ver[N*2],nxt[N*2],tot; void add(int a,int b) { tot++;nxt[tot]=head[a];head[a]=tot;ver[tot]=b;return ; } int dis[N]; int f[N][20]; void dfs(int x,int fa) { for(int i=head[x];i;i=nxt[i]) { if(ver[i]==fa)continue; ...
a.cc: In function 'void dfs(int, int)': a.cc:22:16: error: return-statement with a value, in function returning 'void' [-fpermissive] 22 | return 0; | ^ a.cc: In function 'int main()': a.cc:63:21: error: too few arguments to function 'void dfs(int, int)' 63 | dis[y]=1;dfs(y); ...
s017686212
p03990
C++
include <cstdio> #include <cstdlib> #include <cstring> #include <algorithm> #include <iostream> #include <vector> #include <queue> using namespace std; const int maxn = 2e6 + 5; vector<int> blue[maxn], red[maxn]; int dep[maxn], fa[maxn], dp[maxn]; bool safe[maxn]; void dfs(int v, int p) { fa[v] = p; for (int i=...
a.cc:1:1: error: 'include' does not name a type 1 | include <cstdio> | ^~~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/algorithm:60, from a.cc:4: /usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gn...
s773726381
p03991
C++
#include <iostream> #include <algorithm> using namespace std ; const int N = 4e5+5,M = N<<1,mod = 924844033,GG = 5,IG = 554906420 ; inline int add(int a,int b){ return a+b >= mod ? a+b-mod : a+b ; } inline int sub(int a,int b){ return a >= b ? a-b : a-b+mod ; } inline int mul(int a,int b){ return 1ll*a*b%mod ; } inline...
a.cc: In function 'void dfs(int, int)': a.cc:53:9: error: reference to 'size' is ambiguous 53 | size[x] = 1 ; | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h...
s614721374
p03991
C++
#include <iostream> #include <algorithm> using namespace std ; const int N = 4e5+5,M = N<<1,mod = 924844033,GG = 5,IG = 554906420 ; inline int add(int a,int b){ return a+b >= mod ? a+b-mod : a+b ; } inline int sub(int a,int b){ return a >= b ? a-b : a-b+mod ; } inline int mul(int a,int b){ return 1ll*a*b%mod ; } inline...
a.cc: In function 'int adde(int, int)': a.cc:51:85: warning: no return statement in function returning non-void [-Wreturn-type] 51 | inline int adde(int x,int y){ ver[++tot] = y ; Next[tot] = head[x] ; head[x] = tot ;} | ^ a.cc...
s016064709
p03991
C
#include <algorithm> #include <iostream> #include <cstdlib> #include <cstring> #include <cstdio> #include <vector> #include <cmath> #define re register using namespace std; inline int read() { int X=0,w=1; char c=getchar(); while (c<'0'||c>'9') { if (c=='-') w=-1; c=getchar(); } while (c>='0'&&c<='9') X=X*...
main.c:1:10: fatal error: algorithm: No such file or directory 1 | #include <algorithm> | ^~~~~~~~~~~ compilation terminated.
s988778827
p03991
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 = 600005; const int mod = 922844033; std::vector<int> G[MAXN]; int f[MAXN],g[MAXN],rev[MAXN]; int fac[MAXN],ifac[MAX...
a.cc: In function 'void dfs(int, int)': a.cc:47:9: error: reference to 'size' is ambiguous 47 | size[x]=1; | ^~~~ 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...
s302073209
p03991
C++
#include<iostream> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; const int N=5e5,mod=924844033; int b[N],n,rev[N],w[N],limn,a[N],size[N],fst[N],nxt[N],to[N],fac[N],ifac[N],mm; void ade(int u,int v){to[++mm]=v,nxt[mm]=fst[u],fst[u]=mm;} void dfs(int u,int fa) { size[u]=1;++a[n]; for...
a.cc: In function 'void dfs(int, int)': a.cc:11:5: error: reference to 'size' is ambiguous 11 | size[u]=1;++a[n]; | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41,...
s601105849
p03991
C++
#include <bits/stdc++.h> #define ll long long using ull = unsigned long long; using namespace std; #define dump(x) \ if (dbg) { \ cerr << #x << " = " << (x) << endl; \ } #define overload4(_1, _2, _3, _4, name, ...) name #define FOR1(n) for (ll i =...
a.cc:18:21: warning: overflow in conversion from 'long long int' to 'int' changes value from '1152921504606846976' to '0' [-Woverflow] 18 | const int INF = 1ll << 60; | ~~~~^~~~~ a.cc: In function 'void solve()': a.cc:506:5: error: 'ans' was not declared in this scope; did you mean 'abs'? 506...
s181004301
p03991
C++
#include <bits/stdc++.h> #define ll long long using ull = unsigned long long; using namespace std; #define dump(x) \ if (dbg) { \ cerr << #x << " = " << (x) << endl; \ } #define overload4(_1, _2, _3, _4, name, ...) name #define FOR1(n) for (ll i =...
a.cc:18:21: warning: overflow in conversion from 'long long int' to 'int' changes value from '1152921504606846976' to '0' [-Woverflow] 18 | const int INF = 1ll << 60; | ~~~~^~~~~ a.cc: In function 'void solve()': a.cc:506:5: error: 'ans' was not declared in this scope; did you mean 'abs'? 506...
s903122602
p03991
C++
#pragma GCC optimize("O2") #pragma GCC optimize("unroll-loops") #pragma GCC target("avx,avx2,sse,sse2,ssse3,tune=native") #include<bits/stdc++.h> #define all(x) x.begin(), x.end() #define rall(x) x.rbegin(), x.rend() #define pb push_back using namespace std; using ll = long long; using vi = vector<ll>; using pi = pair<...
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:4: /usr/include/c++/14/bits/allocator.h: In destructor 'std::_Vector_base<int, std::allocator<int> >::_Vector_...
s377611044
p03991
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef long double ld; #define pii pair<int,int> #define fi first #define se second #define mp make_pair #define poly vector<ll> #define For(i,l,r) for(int i=(int)(l);i<=(int)(r);i++) #define Rep(i,r,l) for(int i=(int)(r...
a.cc: In function 'void dfs(int, int, int)': a.cc:86:9: error: reference to 'size' is ambiguous 86 | size[u]=1; | ^~~~ 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++...
s015121993
p03991
C++
#include<bits/stdc++.h> #define mod 924844033 using namespace std; int n,x,y; int fir[200005],nxt[400005],to[400005],cnt; int size[200005],Cnt[200005]; int fac[200005],ifac[200005]; int lim=1,L=0,f[800005],g[800005],R[800005],Inv; int read(){ int x=0;char ch=getchar(); while(!isdigit(ch)) ch=getchar(); whi...
a.cc: In function 'void dfs(int, int)': a.cc:23:5: error: reference to 'size' is ambiguous 23 | size[x]=1; | ^~~~ 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, ...
s339503427
p03991
C++
#include<bits/stdc++.h> #define mod 924844033 using namespace std; int n,x,y; int fir[200005],nxt[400005],to[400005],cnt; int size[200005],Cnt[200005]; int fac[200005],ifac[200005]; int lim=1,L=0,f[800005],g[800005],R[800005],Inv; int read(){ int x=0;char ch=getchar(); while(!isdigit(ch)) ch=getchar(); whi...
a.cc: In function 'void dfs(int, int)': a.cc:23:5: error: reference to 'size' is ambiguous 23 | size[x]=1; | ^~~~ 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, ...
s873029942
p03991
C++
#include <iostream> #include <cstdio> using namespace std; const int maxn = 2e5 + 50,maxm = 5.3e5,mod = 924844033,g = 5; int n,x,y,cnt,N,last[maxn],d[maxn],size[maxn],ifac[maxn],inv[20],W[20],inv_W[20],rev[maxm],F[maxm],G[maxm]; struct edge{ int v,nxt; }e[2 * maxn]; int read(){ int x = 0; char c = getchar(); while(...
a.cc: In function 'void dfs(int, int)': a.cc:72:9: error: reference to 'size' is ambiguous 72 | size[u] = 1; | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:...
s573960071
p03991
C
#include <iostream> #include <cstdio> using namespace std; const int maxn = 2e5 + 50,maxm = 5.3e5,mod = 924844033,g = 5; int n,x,y,cnt,N,last[maxn],d[maxn],size[maxn],ifac[maxn],inv[20],W[20],inv_W[20],rev[maxm],F[maxm],G[maxm]; struct edge{ int v,nxt; }e[2 * maxn]; int read(){ int x = 0; char c = getchar(); while(...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s412699305
p03991
C++
#include <iostream> #include <cstdio> using namespace std; const int maxn = 2e5 + 50,maxm = 5.3e5,mod = 924844033,g = 5; int n,x,y,cnt,N,last[maxn],d[maxn],size[maxn],ifac[maxn],inv[20],W[20],inv_W[20],rev[maxm],F[maxm],G[maxm]; struct edge{ int v,nxt; }e[2 * maxn]; int read(){ int x = 0; char c = getchar(); while(...
a.cc: In function 'void dfs(int, int)': a.cc:72:9: error: reference to 'size' is ambiguous 72 | size[u] = 1; | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:...
s428244857
p03991
C++
#include <cstdio> #include <iostream> #include <vector> using namespace std; const int g = 5, mod = 924844033, N = 3e5 + 10; int F[N], G[N], cnt[N], fac[N], inv[N], pos[N], sz[N], n; vector<int> gr[N]; void dfs(int u, int fa) { sz[u] = 1; for(auto v : gr[u]) { if(v == fa) continue; dfs(v, u); ...
a.cc: In function 'int main()': a.cc:61:5: error: 'reverse' was not declared in this scope 61 | reverse(F, F + 1 + n); | ^~~~~~~
s384080194
p03991
C
#include<bits/stdc++.h> #define ll long long #define poly vector<ll> using namespace std; const int N=5250007; const int mod=924844033; int n; int rev[N],g[N],sz[N]; vector<int> ve[N]; ll fac[N],finv[N]; poly f,h; inline ll qpow(ll x,int k,ll r=1){ for(;k;k>>=1,x=x*x%mod) if(k&1) r=r*x%mod; return r; } inline void nt...
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory 1 | #include<bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s867690498
p03991
C++
#include<cstdio> #include<cstring> #include<iostream> #include<algorithm> #define poly vector<ll> #define ll long long using namespace std; const int N=540000; const int mod=943718401; int r[N],siz[N],tong[N]; ll n,m,ni[N],js[N]; ll a[N],b[N],ans; vector<int> g[N]; inline ll C(int x,int y){ return js[x]*ni[y]%mod*ni[x...
a.cc:13:1: error: 'vector' does not name a type 13 | vector<int> g[N]; | ^~~~~~ a.cc: In function 'void dfs(int, int)': a.cc:41:23: error: 'g' was not declared in this scope 41 | for(int i=0;i<g[x].size();++i){ | ^ a.cc: In function 'int main()': a.cc:49:44: error: 'g' wa...
s807491094
p03991
C
#include<cstdio> #include<cstring> #include<iostream> #include<algorithm> #define poly vector<ll> #define ll long long using namespace std; const int N=540000; const int mod=943718401; int r[N],siz[N],tong[N]; ll n,m,ni[N],js[N]; ll a[N],b[N],ans; vector<int> g[N]; inline ll C(int x,int y){ return js[x]*ni[y]%mod*ni[x...
main.c:1:9: fatal error: cstdio: No such file or directory 1 | #include<cstdio> | ^~~~~~~~ compilation terminated.
s193919019
p03991
C
#include<bits/stdc++.h> #define poly vector<ll> #define ll long long using namespace std; const int N=540000; const int mod=943718401; int r[N],siz[N],tong[N]; ll n,m,ni[N],js[N]; ll a[N],b[N],ans; vector<int> g[N]; inline ll C(int x,int y){ return js[x]*ni[y]%mod*ni[x-y]%mod; } inline ll qpow(ll x,ll y,ll ans=1){ fo...
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory 1 | #include<bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s902937128
p03991
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; typedef long long LL; const int N = 200000 + 10; const int MOD = 924844033; const int root = 44009197; // root ^ (2^21) % MOD = 1 const int root_1 = 921713838; // root * root_1 = 1 const int root_pw = 1 << 21; // 998244353 = 119 * 2^23 + ...
a.cc: In function 'void getAns(std::vector<int>)': a.cc:91:5: error: 'memset' was not declared in this scope 91 | memset(c,0,sizeof(c)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <algorithm> +++ |+#incl...
s688510172
p03991
C++
#include <iostream> #include <algorithm> #include <iomanip> #include <map> #include <set> #include <queue> #include <stack> #include <numeric> #include <bitset> static constexpr int MOD = 924844033; using ll = long long; using u32 = uint32_t; using namespace std; #pragma GCC optimize ("O1") template<class T> constexpr...
a.cc:13:13: error: 'uint32_t' does not name a type 13 | using u32 = uint32_t; | ^~~~~~~~ a.cc:10:1: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>' 9 | #include <bitset> +++ |+#include <cstdint> 10 | a.cc:16:39: error: '::numeric_...
s912085562
p03991
C++
#include <iostream> #include <algorithm> #include <iomanip> #include <map> #include <set> #include <queue> #include <stack> #include <numeric> #include <bitset> static const int MOD = 924844033; using ll = long long; using u32 = uint32_t; using namespace std; #pragma GCC optimize ("O2") template<class T> constexpr T ...
a.cc:13:13: error: 'uint32_t' does not name a type 13 | using u32 = uint32_t; | ^~~~~~~~ a.cc:10:1: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>' 9 | #include <bitset> +++ |+#include <cstdint> 10 | a.cc:17:39: error: '::numeric_...
s486346709
p03991
C++
#include<vector> #include<iostream> #include<functional> using namespace std; using ll=long long; const ll MOD=924844033; using Graph=vector<vector<int>>; vector<ll> fact; vector<ll> factInv; ll powm(ll x,ll k){ ll res=1; while(k){ if(k&1) res=res*x%MOD; k>>=1; x=x*x%MOD; } re...
a.cc: In function 'int main()': a.cc:44:5: error: 'assert' was not declared in this scope 44 | assert(n<=10000); | ^~~~~~ a.cc:4:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>' 3 | #include<functional> +++ |+#include <cassert> 4 |
s753966954
p03991
C++
#include <iostream> #include <algorithm> #include <iomanip> #include <map> #include <set> #include <queue> #include <stack> #include <numeric> #include <bitset> static const int MOD = 924844033; using ll = int64_t; using u32 = uint32_t; using namespace std; template<class T> constexpr T INF = ::numeric_limits<T>::max...
a.cc:13:13: error: 'uint32_t' does not name a type 13 | using u32 = uint32_t; | ^~~~~~~~ a.cc:10:1: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>' 9 | #include <bitset> +++ |+#include <cstdint> 10 | a.cc:16:39: error: '::numeric_...
s642448436
p03991
C++
#include <smmintrin.h> #include <immintrin.h> #pragma GCC target("avx2") #pragma GCC target("fma") #pragma GCC optimize("Ofast") #include <stdio.h> #include <algorithm> #include <assert.h> #include <bitset> #include <cmath> #include <complex> #include <deque> #include <functional> #include <iostream> #in...
In file included from /usr/include/c++/14/string:43, from /usr/include/c++/14/bitset:52, from a.cc:10: /usr/include/c++/14/bits/allocator.h: In destructor 'std::_Vector_base<int, std::allocator<int> >::_Vector_impl::~_Vector_impl()': /usr/include/c++/14/bits/allocator.h:182:7: error: i...
s629560677
p03991
C++
#include <cstdio> typedef long long LL; const int N = 2e5 + 10; const int Mod = 924844033; const int M = (1 << 20) + 10; struct E {int v, nt;} e[N<<1]; int n, L, tot, a[M], b[M], h[N], wn[30], fac[N], inv[N], rev[M]; inline int mls(int x) {return x < 0 ? x + Mod : x;} inline int pls(int x) {return x >= Mod ? x - Mod ...
a.cc: In function 'int dfs(int, int)': a.cc:36:18: error: expected ';' before '}' token 36 | return sz | ^ | ; 37 | } | ~
s695345277
p03991
C++
//~ #pragma GCC optimize ("Ofast") #include <bits/stdc++.h> using namespace std; #define sim template < class c #define ris return * this #define dor > debug & operator << #define eni(x) sim > typename \ enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) { sim > struct rge {c b, e; }; sim > rge<c> range(c ...
a.cc:231:2: error: stray '\' in program 231 | }\ | ^
s194035815
p03991
C++
// <easy.cpp> - Mon Mar 27 20:17:23 2017 // This file is created by XuYike's black technology automatically. // Copyright (C) 2015 ChangJun High School, Inc. // I don't know what this program is. #include <iostream> #include <vector> #include <algorithm> #include <cstring> #include <cstdio> #include <cmath> using nam...
a.cc: In function 'void dfs(int, int)': a.cc:35:12: error: reference to 'size' is ambiguous 35 | A[n]++;size[x]=1; | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_ba...
s545868453
p03991
C++
#include <cstdio> #include <cstring> #include <algorithm> using namespace std; const int maxn = 2e5, maxm = 19; const int mod = 924844033, gen = 5; int n; vector<int> g[maxn]; int size[maxn], cnt[maxn]; int fact[maxn + 1], ifact[maxn + 1]; int a[maxn], b[maxn]; void Dfs(int u, int p) { size[u] = 1; for (int v : ...
a.cc:10:1: error: 'vector' does not name a type 10 | vector<int> g[maxn]; | ^~~~~~ a.cc: In function 'void Dfs(int, int)': a.cc:17:16: error: 'g' was not declared in this scope 17 | for (int v : g[u]) { | ^ a.cc: In function 'int main()': a.cc:85:5: error: 'g' was not declared in this...
s711518246
p03991
C++
#include<cmath> #include<vector> #include<cstdio> #include<cstring> #include<iostream> #include<algorithm> using namespace std; const int MAXN = 524290; const int MOD = 924844033; int a[MAXN], b[MAXN]; int n, m, i, j, k, x, y; int size[MAXN]; int first[MAXN], next[MAXN], go[MAXN], t, pre[MAXN]; int bit[MAXN], f[MAXN]; ...
a.cc: In function 'void add(int, int)': a.cc:26:9: error: reference to 'next' is ambiguous 26 | next[++t] = first[x]; first[x] = t; go[t] = y; | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:66, from /usr/include/c++/14/bits/specfun.h:43, f...
s685983040
p03991
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; const int N=1e6+10,p=924844033; int inc(int x,int y){x+=y;return x>=p?x-p:x;} int dec(int x,int y){x-=y;return x<0?x+p:x;} int mul(int x,int y){return (ll)x*y%p;} int power(int x,int y){ int ans=1; for (;y;y>>=1,x=mul(x,x)) if (y&1) ans=...
a.cc: In function 'void add(int, int)': a.cc:43:5: error: reference to 'next' is ambiguous 43 | next[cnt]=head[f]; | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:66, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/...
s756818142
p03991
C++
#include<iostream> #include<cstdio> #include<cstring> #include<cstdlib> #include<cmath> #include<algorithm> #define N 200005 #define M 524289 #define LL long long #define oo (1<<30) #define V 32768 #define LD long double using namespace std; const int mo=924844303; const LD Pi=acos(-1.0); int n,m,head[N],num[2*N],next[...
a.cc: In function 'void dfs(int, int)': a.cc:30:27: error: reference to 'next' is ambiguous 30 | for(i=head[t];i;i=next[i]) | ^~~~ In file included from /usr/include/c++/14/string:47, from /usr/include/c++/14/bits/locale_classes.h:40, from /us...
s866878556
p03991
C++
//ProblemF.cpp #include <iostream> static std::istream & ip = std::cin; static std::ostream & op = std::cout; #if OJ_MYPC #include <ojio.h> #endif #ifndef OPENOJIO #define OPENOJIO #endif #if 1 || DEFINE /***************************************************************/ typedef unsigned long long u64; typedef long ...
a.cc: In member function 'void FFT<Type>::calc(std::vector<_Tp>&, const std::vector<_Tp>&, int)': a.cc:142:27: error: 'inv' was not declared in this scope; did you mean 'int'? 142 | calc(rst, inv); | ^~~ | int
s579279944
p03991
C++
//ProblemF.cpp #include <iostream> static std::istream & ip = std::cin; static std::ostream & op = std::cout; #if OJ_MYPC #include <ojio.h> #endif #ifndef OPENOJIO #define OPENOJIO #endif #if 1 || DEFINE /***************************************************************/ typedef unsigned long long u64; typedef long ...
a.cc: In function 'std::istream& operator>>(std::ostream&, const ModInt<_MOD>&)': a.cc:95:105: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'long long int') 95 | friend std::istream& operator >> (std::ostream& istr, const ModInt & a) { long long t; i...
s072199212
p03991
C++
#include <math.h> #include <stdio.h> #include <string.h> #include <vector> #include <string> #include <queue> #include <map> #include <algorithm> #include <cmath> #include <iostream> #include <sstream> #include <set> using namespace std; const int mmod = 924844033; vector<vector<int> > G; vector<int> sz; vector<int> ...
a.cc: In function 'int main()': a.cc:106:26: error: 'b' was not declared in this scope 106 | res = (res * inv_fac[b]) % mmod; | ^
s127985486
p03991
C++
#include <math.h> #include <stdio.h> #include <string.h> #include <vector> #include <string> #include <queue> #include <map> #include <algorithm> #include <cmath> #include <iostream> #include <sstream> #include <set> using namespace std; const int mmod = 924844033; vector<vector<int> > G; vector<int> sz; vector<int> ...
a.cc: In function 'int main()': a.cc:103:7: error: 'res' was not declared in this scope 103 | res = (res - 1LL * partial_combi(ww, K) * oo) % mmod; | ^~~ a.cc:105:5: error: 'res' was not declared in this scope 105 | res = (res * inv_fac[b]) % mmod; | ^~~ a.cc:105:26: error: 'b' was n...
s379425389
p03992
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; printf("%s %s",s.substr(0,4),s.substr(4)) }
a.cc: In function 'int main()': a.cc:7:46: error: expected ';' before '}' token 7 | printf("%s %s",s.substr(0,4),s.substr(4)) | ^ | ; 8 | } | ~
s753772365
p03992
C++
#include <bits/stdc++.h> using namespace std; #define _GLIBCXX_DEBUG #define rep(i, from, to) for (int i = from; i < (to); ++i) #define mp(x,y) make_pair(x,y) #define all(x) (x).begin(),(x).end() #define sz(x) (int)(x).size() #define pb push_back using ll = long long; using vin=vector<int>; using vll=vector<ll>; using ...
a.cc: In function 'int main()': a.cc:28:16: error: expected unqualified-id before numeric constant 28 | rep(0,4,12)cout<<s[i]; | ^ a.cc:4:35: note: in definition of macro 'rep' 4 | #define rep(i, from, to) for (int i = from; i < (to); ++i) | ...
s318555844
p03992
C++
#include <bits/stdc++.h> using namespace std; #define _GLIBCXX_DEBUG #define rep(i, from, to) for (int i = from; i < (to); ++i) #define mp(x,y) make_pair(x,y) #define all(x) (x).begin(),(x).end() #define sz(x) (int)(x).size() #define pb push_back using ll = long long; using vin=vector<int>; using vll=vector<ll>; using ...
a.cc: In function 'int main()': a.cc:28:16: error: expected unqualified-id before numeric constant 28 | rep(0,4,12)cout<<s[i]<<endl; | ^ a.cc:4:35: note: in definition of macro 'rep' 4 | #define rep(i, from, to) for (int i = from; i < (to); ++i) | ...
s238392266
p03992
C++
#include <bits/stdc++.h> using namespace std; int main(){ string S; cin>>S; for(int i=0;i<12;i++){ cout<<S[i]; if(i==3){ cout<<" "; break; } } for(int i=4;i<=12;i++){ cout<<S[i];    } cout<<endl; }
a.cc:15:1: error: extended character   is not valid in an identifier 15 |    } | ^ a.cc:15:1: error: extended character   is not valid in an identifier a.cc:15:1: error: extended character   is not valid in an identifier a.cc: In function 'int main()': a.cc:15:1: error: '\U00003000\U00003000\U00003000' was not...
s426040377
p03992
C++
#include <bits/stdc++.h> #include <vector> #include <algorithm> #include <iostream> using namespace std; int main() { string s; cin >> s; cout << s.at(0) << s.at(1) << s.at(2) << s.at(3) << ' ' << s.at(4) << s,at(5) << s.at(6) << s.at(7) << s.at(8) << s.at(9) << s.at(10) << s.at(11) << endl; }
a.cc: In function 'int main()': a.cc:10:75: error: 'at' was not declared in this scope 10 | cout << s.at(0) << s.at(1) << s.at(2) << s.at(3) << ' ' << s.at(4) << s,at(5) << s.at(6) << s.at(7) << s.at(8) << s.at(9) << s.at(10) << s.at(11) << endl; | ...
s659050904
p03992
C++
#include<bits/stdc++.h> using namespace std; int main(){ string s; cin>>s; for(int i=0;i<=3;i++){ cout<<s[i]; } cout<<" "; for(int i=4;i<=s.size()){ cout<<s[i]; } cout<<endl; }
a.cc: In function 'int main()': a.cc:11:26: error: expected ';' before ')' token 11 | for(int i=4;i<=s.size()){ | ^ | ;
s969122687
p03992
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); char[] ch=sc.next().toCharArray(); StringBuffer sb=new StringBuffer(); for(int i=0;i<12;i++){ if(i=3){ sb.append(ch[i]+" "); }else{ sb.append(ch[i]); } ...
Main.java:8: error: incompatible types: int cannot be converted to boolean if(i=3){ ^ 1 error