submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s111065743
p03769
C++
#include <stdio.h> #include <iostream> using namespace std; const int maxn=105; int odd[maxn],even[maxn]; long long n; int main(){ int i,num=1; scanf("%lld",&n);n++; while(n>1){ if(n&1)odd[++odd[0]]=num++,n--; else even[++even[0]]=num++,n/=2; } printf("%d\n",odd[0]+even[0]<<1); ...
a.cc:5:25: error: expected initializer before '\U0000ff1b' 5 | int odd[maxn],even[maxn]; | ^~ a.cc: In function 'int main()': a.cc:9:19: error: 'n' was not declared in this scope 9 | scanf("%lld",&n);n++; | ^ a.cc:12:14: error: 'even' was not declared in...
s623347409
p03769
C++
#include <bits/stdc++.h> using namespace std; int main() { tread x; return 0; }
a.cc: In function 'int main()': a.cc:11:3: error: 'tread' was not declared in this scope; did you mean 'read'? 11 | tread x; | ^~~~~ | read
s460313282
p03769
C++
#include<bits/stdc++.h> using namespace std; void read(int &x) { x=0;int f=1;char ch=getchar(); for(;!isdigit(ch);ch=getchar()) if(ch=='-') f=-f; for(;isdigit(ch);ch=getchar()) x=x*10+ch-'0';x*=f; } void print(int x) { if(x<0) putchar('-'),x=-x; if(!x) return ;print(x/10),putchar(x%10+48); } voi...
a.cc: In function 'int main()': a.cc:30:10: error: cannot bind non-const lvalue reference of type 'int&' to a value of type 'long long int' 30 | read(n);long long p=101;n++; | ^ a.cc:6:16: note: initializing argument 1 of 'void read(int&)' 6 | void read(int &x) { | ~~~~~^
s115501636
p03769
C++
#include<bits/stdc++.h> using namespace std; void read(int &x) { x=0;int f=1;char ch=getchar(); for(;!isdigit(ch);ch=getchar()) if(ch=='-') f=-f; for(;isdigit(ch);ch=getchar()) x=x*10+ch-'0';x*=f; } void print(int x) { if(x<0) putchar('-'),x=-x; if(!x) return ;print(x/10),putchar(x%10+48); } voi...
a.cc: In function 'int main()': a.cc:30:10: error: cannot bind non-const lvalue reference of type 'int&' to a value of type 'long long int' 30 | read(n);long long p=101;n++; | ^ a.cc:6:16: note: initializing argument 1 of 'void read(int&)' 6 | void read(int &x) { | ~~~~~^
s888324742
p03769
C++
/** SXR0aXAkI0JwbXptI3FhI3Z3I293bCNqY2IjUG0jMCNicG0jVHFkcXZvLyNCcG0jQW10bjBhY2phcWFicXZvLyNNYm16dml0MSNWdyNhdGN1am16I2tpdiNhbXF9bSNQcXUjVnd6I0F0bW14MSNQcWEjaXptI2l0dCNicHF2b2EjUXYjYnBtI3BtaWRtdmEjaXZsI3d2I21pemJwMSNFcHcjcWEjYnBtem0ja2l2I3F2Ym16a21sbSNRdiNQcWEjeHptYW12a20jbXtrbXhiI0lhI3BtI3htenVxYmJtYnBHI1BtI3N2d2VtYnAj...
a.cc:63:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 63 | main() { | ^~~~ a.cc: In function 'int main()': a.cc:61:13: error: '__int64' was not declared in this scope; did you mean '__ynf64'? 61 | #define int __int64 | ^~~~~~~ a.cc:68:5: note: in expansion ...
s092276490
p03769
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define EPS (1e-7) #define INF (1e9) #define PI (acos(-1)) //const ll mod = 1000000007; string ans; ll N; ll moji[205]; void f(int in) { cout << in << endl; //char out = (char)('0' + in); string now; for(int i = 1; i <= 200; i++) { ...
a.cc: In function 'void f(int)': a.cc:21:23: error: 'out' was not declared in this scope 21 | ans.push_back(out); | ^~~
s089991871
p03769
C++
#include<bits/stdc++.h> using namespace std; using ll=__int128; const ll INF=1e15; int main(){ vector<vector<ll>> comb(300,vector<ll>(300,0)); for(int i=0;i<300;i++){ comb[i][0]=1; comb[i][i]=1; } for(int i=1;i<300;i++){ for(int j=1;j<i;j++){ comb[i][j]=min(comb[i-1]...
a.cc:64:2: error: stray '#' in program 64 | }#include<bits/stdc++.h> | ^ a.cc:64:3: error: 'include' does not name a type 64 | }#include<bits/stdc++.h> | ^~~~~~~ a.cc:68:10: error: redefinition of 'const ll INF' 68 | const ll INF=1e15; | ^~~ a.cc:5:10: note: 'const ll INF' previou...
s011990805
p03769
C++
#include <cstdio> #include <iostream> #include <algorithm> using namespace std; inline char get(void) { static char buf[100000], *S = buf, *T = buf; if (S == T) { T = (S = buf) + fread(buf, 1, 100000, stdin); if(S == T) return EOF; } return *S++; } template<typename T> inline void read(T &x) { static char c; ...
a.cc: In function 'int main()': a.cc:35:15: error: expected primary-expression before '%' token 35 | print(%d,sum); | ^ a.cc:35:16: error: 'd' was not declared in this scope 35 | print(%d,sum); | ^ a.cc:35:9: error: 'print' was not declared in this scope; d...
s015542667
p03769
C++
#include <cstdio> #include <iostream> #include <algorithm> using namespace std; inline char get(void) { static char buf[100000], *S = buf, *T = buf; if (S == T) { T = (S = buf) + fread(buf, 1, 100000, stdin); if(S == T) return EOF; } return *S++; } template<typename T> inline void read(T &x) { static char c; ...
a.cc: In function 'int main()': a.cc:35:15: error: expected primary-expression before '%' token 35 | print(%d,&sum); | ^ a.cc:35:16: error: 'd' was not declared in this scope 35 | print(%d,&sum); | ^ a.cc:35:9: error: 'print' was not declared in this scope;...
s658308741
p03769
C++
#include <bits/stdc++.h> #define ll long long #define fi first #define sec second #define rep(i,a,n) for(int i=a;i<n;i++) #define per(i,a,n) for(int i=n-1;i>=a;i--) #define pb push_back #define pii pair<int,int> #define sit set<int>:: iterator #define IOS ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0) using na...
a.cc: In function 'int main()': a.cc:26:17: error: 'V' was not declared in this scope 26 | V.pb(cnt); | ^ a.cc:30:11: error: 'V' was not declared in this scope 30 | cout<<V.size()<<endl; | ^
s401336428
p03769
C++
#include<bits/stdc++.h> 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<(ll)m;i++) #define REP(i,n) FOR(i,0,n) #define DUMP(a) REP(d,a.size()){cout<<a[d];if(d!=a.size()-1)cout<<" ";els...
a.cc: In function 'int main()': a.cc:66:39: error: 'Y' was not declared in this scope 66 | cout<<a.size()+b.size()<<endl;Y | ^ a.cc:67:13: error: 'i' was not declared in this scope 67 | REP(i,a.size()) { | ^ a.cc:9:31: note: in definiti...
s198938759
p03769
C++
#include <bits/stdc++.h> using namespace std; typedef pair<int, int> pii; typedef long long ll; typedef vector<int> vi; #define pb push_back #define eb emplace_back #define mp make_pair #define fi first #define se second #define rep(i,n) rep2(i,0,n) #define rep2(i,m,n) for(int i=m;i<(n);i++) #define ALL(c) (c).begin(...
a.cc: In function 'int main()': a.cc:65:13: error: 'p' was not declared in this scope 65 | if (p) { | ^
s399757902
p03769
C++
299
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 299 | ^~~
s280893751
p03769
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; #define sqr(x) ((x)*(x)) #define mp make_pair #define uint unsigned #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,100000,stdin),p1==p2)?EOF:*p1++; } #define gc getchar...
a.cc: In function 'void solve(ll, int)': a.cc:40:34: error: 'fro' was not declared in this scope 40 | solve(n-1,id+1); fro.push_front(id); bac.push_back(id); | ^~~ a.cc:40:54: error: 'bac' was not declared in this scope 40 | solve(n-1,id+1); f...
s009396199
p03769
C++
#ifdef DEBUG #include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <iostream> #include <cassert> #include <sstream> #include <fstream> #include <functional> #include <set> #include <bitset> #include <string> #include <utility> #include <queue> #include <deque> #include <vector> #include <map...
a.cc:287:24: error: extended character ‘ is not valid in an identifier 287 | io.out(m << 1, ‘\n’); | ^ a.cc:287:25: error: stray '\' in program 287 | io.out(m << 1, ‘\n’); | ^ a.cc:287:26: error: extended character ’ is not valid in an ident...
s102649459
p03769
C++
#include <iostream> #include <algorithm> #include <vector> #include <queue> #include <map> #include <unordered_map> #include <set> #include <climits> #include <deque> using namespace std; int main(){ cin.tie(0); ios::sync_with_stdio(false); long long N; cin >> N; N++; int A, B; vector<int> ...
a.cc: In function 'int main()': a.cc:23:17: error: expected '}' at end of input 23 | N--; | ^ a.cc:21:23: note: to match this '{' 21 | if(N % 2 == 1){ | ^ a.cc:23:17: error: expected '}' at end of input 23 | N--; | ...
s547596680
p03769
C++
#include<bits\stdc++.h> using namespace std; typedef long long ll; ll N; int main() { scanf("%lld",&N); ll now = 2; for(ll i = 63; i >= 2; i--) { ll num = pow(2,i - 1) - 1; while(N >= num) { for(int j = 0; j < i; j++) { printf("%d ",now)...
a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory 1 | #include<bits\stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s961476669
p03769
C++
#include <iostream> #include <fstream> #include <cstdio> #include <cmath> #include <vector> #include <cstring> #include <string> #include <set> #include <map> #include <stack> #include <queue> #include <algorithm> using namespace std; #define REP(i,n) for(int i=0; i<n; ++i) #define FOR(i,a,b) for(int i=a; i<=b; ++i) #...
a.cc: In function 'int main()': a.cc:43:13: error: 'm' was not declared in this scope 43 | FOR(i,1,m-1){ | ^ a.cc:16:36: note: in definition of macro 'FOR' 16 | #define FOR(i,a,b) for(int i=a; i<=b; ++i) | ^
s143972880
p03769
Java
public class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); long N = sc.nextLong(); long[] c = new long[200]; int[] result = new int[200]; int sum = 0; int num = 1; while(N!=0) { long pos = 0x0000000000000001L;...
Main.java:4: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:4: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s777549906
p03769
Java
public class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); long N = sc.nextLong(); long[] c = new long[200]; int[] result = new int[200]; int sum = 0; int num = 1; while(N!=0) { long pos = 0x0000000000000001L...
Main.java:5: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:5: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s302133997
p03769
C++
// Template {{{ #include <bits/stdc++.h> #define REP(i,n) for(int i=0; i<(int)(n); ++i) using namespace std; typedef long long LL; #ifdef LOCAL #include "contest.h" #else #define error(args...) #endif const int dx[4] = {1, 0, -1, 0}; const int dy[4] = {0, 1, 0, -1}; inline bool valid(int x, int w) { return 0 <= x &&...
a.cc: In function 'int main()': a.cc:85:24: error: expected ';' before ':' token 85 | cout << " ": | ^ | ; a.cc: In function 'int eval(LL, int)': a.cc:49:1: warning: control reaches end of non-void function [-Wreturn-type] 49 | } | ^
s166935568
p03769
C++
def nCr(a,b): tmp=1 for i in range(a,a-b,-1):tmp*=i for i in range(1,b+1,1):tmp//=i return tmp n=int(input()) out=[] co=1 coo=0 while n>0: t=2 while True: sum1=0 for j in range(2,t+1,2): sum1+=nCr(t,j) # print(n,sum) if n<sum1: t-=1 # n-=rco break rco=sum1 t+=1 ad=[co for _ in range(t)] s...
a.cc:17:17: error: invalid preprocessing directive #print 17 | # print(n,sum) | ^~~~~ a.cc:20:25: error: invalid preprocessing directive #n 20 | # n-=rco | ^ a.cc:27:9: error: invalid preprocessing directive #print 27 | # ...
s843495800
p03769
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Map.Entry; import java.util.PriorityQueue; import java.util.StringTokenizer; import java.util.TreeMap; public class Interse...
Main.java:14: error: class IntersectingDates is public, should be declared in a file named IntersectingDates.java public class IntersectingDates ^ Note: Main.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 1 error
s471524927
p03769
C++
#define _GLIBCXX_IOSTREAM #include<bits/stdc++.h> typedef unsigned int uint; typedef long long ll; typedef unsigned long long ull; typedef double lf; typedef long double llf; typedef std::pair<int,int> pii; #define xx first #define yy second template<typename T> inline T max(T a,T b){return a>b?a:b;} template<typena...
a.cc: In function 'int main()': a.cc:80:12: error: ambiguous overload for 'operator,' (operand types are 'Fw<Cp>' and 'std::__cxx11::list<int>::size_type' {aka 'long unsigned int'}) 80 | out,s.size(),'\n'; | ~~~^~~~~~~~~ a.cc:37:12: note: candidate: 'Fw<T>& Fw<T>::operator,(int) [with T = Cp]' ...
s563809744
p03769
C++
#define _GLIBCXX_IOSTREAM #include<bits/stdc++.h> typedef unsigned int uint; typedef long long ll; typedef unsigned long long ull; typedef double lf; typedef long double llf; typedef std::pair<int,int> pii; #define xx first #define yy second template<typename T> inline T max(T a,T b){return a>b?a:b;} template<typena...
a.cc: In function 'int main()': a.cc:80:12: error: ambiguous overload for 'operator,' (operand types are 'Fw<Cp>' and 'std::__cxx11::list<int>::size_type' {aka 'long unsigned int'}) 80 | out,s.size(),'\n'; | ~~~^~~~~~~~~ a.cc:37:12: note: candidate: 'Fw<T>& Fw<T>::operator,(int) [with T = Cp]' ...
s834570585
p03770
C++
#include<bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; #ifndef ONLINE_JUDGE #define trace(...) __f(#__VA_ARGS__, __VA_ARGS__) template <class Arg1> void __f(const char* name, Arg1&& arg1) { cerr << name << " : " << arg1 <...
a.cc: In function 'void merge(ll, ll)': a.cc:92:12: error: reference to 'size' is ambiguous 92 | if(size[parx]>=size[pary]) | ^~~~ 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++...
s873565861
p03770
C++
21 77 68 16 73 16 99 19 66 2 87 2 16 7 17 10 36 10 68 2 38 10 74 13 55 21 21 3 7 12 41 13 88 18 6 2 12 13 87 1 9 2 27 13 15
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 21 77 68 | ^~
s150024962
p03770
C++
#include <bits/stdc++.h> typedef long long int ll; typedef long double ld; #define pb push_back #define pii pair < ll , ll > #define F first #define S second #define endl '\n' #define int long long #define sync ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0) #pragma GCC optimize ("Ofast") #pragma GCC optimize (...
a.cc: In function 'll dfs(ll)': a.cc:43:1: warning: no return statement in function returning non-void [-Wreturn-type] 43 | } | ^ a.cc: In function 'int32_t main()': a.cc:58:8: error: redeclaration of 'll y' 58 | ll y=-1; | ^ a.cc:49:12: note: 'll y' previously declared here 49 | ll ...
s875982293
p03770
C++
#include <bits/stdc++.h> typedef long long int ll; typedef long double ld; #define pb push_back #define pii pair < ll , ll > #define F first #define S second #define endl '\n' #define int long long #define sync ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0) #pragma GCC optimize ("Ofast") #pragma GCC optimize (...
a.cc: In function 'll dfs(ll)': a.cc:43:1: warning: no return statement in function returning non-void [-Wreturn-type] 43 | } | ^ a.cc: In function 'int32_t main()': a.cc:62:35: error: 'o' was not declared in this scope 62 | if (q[0].F.S!=q[i].F.S && o==-1){ | ...
s746129573
p03770
C++
#include<bits/stdc++.h> #define mod 1000000007 typedef long long ll; ll gi(){ ll x=0,f=1; char ch=getchar(); while(!isdigit(ch))f^=ch=='-',ch=getchar(); while(isdigit(ch))x=x*10+ch-'0',ch=getchar(); return f?x:-x; } int pow(int x,int y){ int ret=1; while(y){ if(y&1)ret=1ll*ret*x%mod; x=1ll*x*x%mod;y>>=1; } ...
a.cc: In function 'int main()': a.cc:32:52: error: expected ';' before 'int' 32 | else if(w[i]==mnw[c[i]])++cnt[c[i]] | ^ | ; 33 | int mn=0,cmn=0; | ~~~ ...
s404133805
p03770
C
#include <iostream> #include <cstring> using namespace std; typedef long long LL; const int maxn = 1000005; const int inf = 0x3f3f3f3f; const int mod = 1000000007; int n, A, B; int fac[maxn], inv[maxn]; int c[maxn], w[maxn], minci[maxn]; int Gs[maxn]; inline int pow(int a, int b) { int ans = 1; for(; b; b >>= 1...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s869720792
p03770
C++
#include<bits/stdc++.h> #pragma GCC optimize("O3") #define fi first #define se second #define pb push_back #define pf push_front #define mod 1000000007 using namespace std; typedef long long ll; int add(int a, int b) { ll x = a+b; if(x >= mod) x -= mod; if(x < 0) x += mod; return x; ...
a.cc: In function 'int main()': a.cc:135:19: error: 'rms' was not declared in this scope 135 | --rms; | ^~~ a.cc:137:12: error: 'rms' was not declared in this scope 137 | if(rms <= 0) | ^~~
s692307168
p03770
C++
#include <iostream> #include <cstdlib> #include <cstdio> #include <cstring> #include <algorithm> using namespace std; typedef long long LL; typedef pair <int, int> pr; const int N = 2e5 + 10; const int INF = 2e9; const LL mod = 1e9 + 7; inline LL power(LL a, LL n, LL mod) { LL Ans = 1; while (n) { if (...
a.cc:57:1: error: 'vector' does not name a type 57 | vector <int> vec[N]; | ^~~~~~ a.cc: In function 'int main()': a.cc:86:17: error: 'vec' was not declared in this scope 86 | vec[col[i]].push_back(i); | ^~~ a.cc:93:32: error: 'vec' was not declared in this scope 93 ...
s468503195
p03770
C++
#include <bits/stdc++.h> #define mod 1000000007ll #define M 200010 using namespace std; struct edge { int to; int nxt; }e[3000010]; int n,minnum,minnum2; int color[M],dlfl[M],pos[M],vis[M]; long long val[M],minn[M]; long long fac[M],rfac[M]; long long X,Y; int head[M],cnt; void addedge(int x,int y) { e[++cnt].nxt = ...
a.cc: In function 'void find()': a.cc:62:29: error: 'min1' was not declared in this scope; did you mean 'minn'? 62 | if(val[i] < min1) | ^~~~ | minn a.cc:70:30: error: 'min2' was not declared in this scope; did you mean 'minn'? 70...
s760051986
p03770
C++
#include <string> #include <vector> #include <algorithm> #include <numeric> #include <set> #include <map> #include <queue> #include <iostream> #include <sstream> #include <cstdio> #include <cmath> #include <ctime> #include <cstring> #include <cctype> #include <cassert> #include <limits> #include <functional> #include <...
a.cc: In function 'int main()': a.cc:150:34: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, long long int> >, std::pair<int, long long int> >::value_type' {aka 'struct std::pair<int, long long int>'} has no member named 'escond'; did you mean 'second'? 150 | int col=data2[i].escond; ...
s620015817
p03770
C++
#include <bits/stdc++.h> inline int read() { int ret, cc; while (!isdigit(cc = getchar())); ret = cc - 48; while ( isdigit(cc = getchar())) ret = cc - 48 + ret * 10; return ret; } const int MOD = 1000000007; inline int add(int a, int b) { return (a += b) >= MOD ? a - MOD : a; } inline int sub(int a, int b) { r...
a.cc: In function 'int main()': a.cc:43:17: error: 'size' was not declared in this scope; did you mean 'std::size'? 43 | size[i] = 1, pa[i] = i; | ^~~~ | std::size In file included from /usr/include/c++/14/string:53, from /usr/include/c++/1...
s870287509
p03770
C++
#include <bits/stdc++.h> inline int read() { int ret, cc; while (!isdigit(cc = getchar())); ret = cc - 48; while ( isdigit(cc = getchar())) ret = cc - 48 + ret * 10; return ret; } const int MOD = 1000000007; inline int add(int a, int b) { return (a += b) >= MOD ? a - MOD : a; } inline int sub(int a, int b) { r...
a.cc: In function 'int main()': a.cc:43:17: error: 'size' was not declared in this scope; did you mean 'std::size'? 43 | size[i] = 1, pa[i] = i; | ^~~~ | std::size In file included from /usr/include/c++/14/string:53, from /usr/include/c++/1...
s789819432
p03770
C++
// warm heart, wagging tail,and a smile just for you! // ███████████ // ███╬╬╬╬╬╬╬╬╬╬███ // ███╬╬╬╬╬████╬╬╬╬╬╬███ // ...
a.cc: In function 'long long int unit(long long int, long long int)': a.cc:61:1: warning: no return statement in function returning non-void [-Wreturn-type] 61 | } | ^ a.cc: In function 'int main()': a.cc:139:13: error: no match for 'operator[]' (operand types are 'P' {aka 'std::pair<long long int, long long i...
s016115327
p03770
C++
#include <cstdio> #include <algorithm> using namespace std; const int maxn=2e5+5,pps=1e9+7; bool vis[maxn]; int n,x,y,tot,ans=1,top; int fac[maxn],inv[maxn],sta[maxn],insta[maxn]; int sum[maxn],now[maxn],pre[maxn<<2],son[maxn<<2],color[maxn]; int read() { int x=0,f=1;char ch=getchar(); for(;ch<'0'||ch>'9';ch=getch...
a.cc:115:11: error: redefinition of 'const int maxn' 115 | const int maxn=2e5+5,pps=1e9+7; | ^~~~ a.cc:5:11: note: 'const int maxn' previously defined here 5 | const int maxn=2e5+5,pps=1e9+7; | ^~~~ a.cc:115:22: error: redefinition of 'const int pps' 115 | const int maxn=2e5+5,pp...
s057986578
p03770
C++
# include <bits/stdc++.h> using namespace std; typedef long long ll; const int maxn(2e5 + 5); const int mod(1e9 + 7); int n, mn[maxn], inv[maxn], size[maxn], mn1 = mod, mn2 = mod, x, y, id[maxn], ans = 1, cnt; vector <int> ball[maxn]; inline bool Cmp(int i, int j) { return mn[i] < mn[j]; } int main() { register i...
a.cc: In function 'int main()': a.cc:16:22: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 16 | register int i, j, w, c, nmn; | ^ a.cc:16:25: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 16 | registe...
s463378680
p03770
C++
#include<cstdio> #include<cstring> #include<vector> #include<algorithm> #define LL long long #define maxn 2000005 #define mod 1000000007 #define INF (LL)1e16 using namespace std; typedef pair<LL,int> PLI; LL n,ans,c[maxn],Siz,cnt[maxn],fact[maxn],inv[maxn],mnp[maxn],Mnp2,Mnp; LL w[maxn],x,y,Mn=INF,Mn2=INF,mn[maxn]; boo...
/tmp/cc8uo8oB.o: in function `addedge(long long, long long)': a.cc:(.text+0xf): relocation truncated to fit: R_X86_64_PC32 against symbol `ncnt' defined in .bss section in /tmp/cc8uo8oB.o a.cc:(.text+0x1a): relocation truncated to fit: R_X86_64_PC32 against symbol `ncnt' defined in .bss section in /tmp/cc8uo8oB.o a.cc:...
s113561676
p03770
C++
#include<cstdio> #include<cstring> #include<vector> #include<algorithm> #define LL long long #define maxn 2000005 #define mod 1000000007 #define INF (LL)1e16 using namespace std; typedef pair<LL,int> PLI; LL n,ans,c[maxn],Siz,cnt[maxn],fact[maxn],inv[maxn],mnp[maxn],Mnp2,Mnp; LL w[maxn],x,y,Mn=INF,Mn2=INF,mn[maxn]; boo...
/tmp/ccq0wKvd.o: in function `addedge(long long, long long)': a.cc:(.text+0xf): relocation truncated to fit: R_X86_64_PC32 against symbol `ncnt' defined in .bss section in /tmp/ccq0wKvd.o a.cc:(.text+0x1a): relocation truncated to fit: R_X86_64_PC32 against symbol `ncnt' defined in .bss section in /tmp/ccq0wKvd.o a.cc:...
s596926497
p03770
C++
#include<cstdio> #include<cstring> #include<vector> #include<algorithm> #define LL long long #define maxn 200005 #define mod 1000000007 #define INF (LL)1e16 using namespace std; typedef pair<LL,int> PLI; LL n,ans,c[maxn],Siz,cnt[maxn],fact[maxn],inv[maxn],mnp[maxn],Mnp2,Mnp; LL w[maxn],x,y,Mn=INF,Mn2=INF,mn[maxn]; bool...
cc1plus: error: '::main' must return 'int'
s511779861
p03770
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; #define sqr(x) ((x)*(x)) #define mp make_pair #define uint unsigned #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,100000,stdin),p1==p2)?EOF:*p1++; } #define gc getchar...
a.cc: In function 'int main()': a.cc:78:9: error: expected unqualified-id before 'for' 78 | for(int i=1;i<=n;i++)M[getfather(i)][c[i]]++; | ^~~ a.cc:77:37: error: expected ';' before 'for' 77 | for(int i=1;i<=n;i++)for(int | ^ | ...
s055267996
p03770
C++
#include <bits/stdc++.h> #define x first #define y second #define y1 secondy1 #define rank tipa_rank #define pb push_back #define mp make_pair #define pow10 tipa_pow10 #define ll long long #define INF 1000000000 #define EPS 1e-9 #define EPS2 1e-8 #define PI acos(-1.0) using namespace std; const int MOD = INF + 7; int n...
a.cc: In function 'int main()': a.cc:116:25: error: 'cntByColor' was not declared in this scope; did you mean 'cntByColour'? 116 | cntByColor[weight[i].second]--; | ^~~~~~~~~~ | cntByColour a.cc: In function 'long long int modInverse(...
s777861417
p03770
C++
#include <cstdio> #include <algorithm> #include <cstring> #include <vector> #define Rep(i, n) for (int i = 1; i <= n; i ++) #define Rep0(i, n) for (int i = 0; i <= n; i ++) #define RepG(i, x) for (int i = head[x]; i; i = edge[i].next) #define v edge[i].to #define mp(a, b) make_pair(a, b) using namespace std; const i...
a.cc: In function 'int main()': a.cc:56:15: error: no match for 'operator[]' (operand types are 'int [200010]' and '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'std::pair<int, int>'}) 56 | ls[col[b[0]].second] = 0; | ^
s247675132
p03770
C++
#include <cstdio> #include <algorithm> #include <cstring> #include <vector> #define Rep(i, n) for (int i = 1; i <= n; i ++) #define Rep0(i, n) for (int i = 0; i <= n; i ++) #define RepG(i, x) for (int i = head[x]; i; i = edge[i].next) #define v edge[i].to #define mp(a, b) make_pair(a, b) using namespace std; const i...
a.cc: In function 'int find_(std::vector<std::pair<int, int> >&, int)': a.cc:32:18: error: no match for 'operator>' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'std::pair<int, int>'} and 'int') 32 | if (a[l] > k) return l - 1; In...
s999514866
p03770
C++
#include <cstdio> #include <iostream> #include <algorithm> #include <cstring> #include <cmath> #define For(i, j, k) for(int i = j; i <= k; i++) #define Forr(i, j, k) for(int i = j; i >= k; i--) #define pb push_back using namespace std; const int Mod = 1e9 + 7; const int N = 200010; typedef long long LL; LL Pow(LL ...
a.cc:36:1: error: 'vector' does not name a type 36 | vector<int> S[N]; | ^~~~~~ a.cc: In function 'int main()': a.cc:77:22: error: 'S' was not declared in this scope 77 | For(i, 1, n) S[find(i)].pb(col[i]); | ^ a.cc:81:22: error: 'S' was not declared in this scope 81 | ...
s299849377
p03770
C++
#include <bits/stdc++.h> using namespace std; #define N 210000 #define mod 1000000007 #define ll long long int n,X,Y,cnt; int c[N],w[N],a[N],pos[N],num[N],jc[N],njc[N]; vector<int>v1[N],v2[N]; int cmp(int x,int y){return v1[x][0]<v1[y][0];} int qpow(int x,int y) { int ret=1; while(y) { if(y&1)ret=(ll)ret*x%mod; ...
a.cc: In function 'int main()': a.cc:51:28: error: no matching function for call to 'max(int&, __gnu_cxx::__normal_iterator<int*, std::vector<int> >::difference_type)' 51 | if(cnt>1)num[1]=max(num[1], | ~~~^~~~~~~~ 52 | upper_bound(v2[1].begin(),v2[1].end(),Y-v2[2][0]...
s544144252
p03770
C++
#include<stdio.h> #include<cstring> #include<cstdlib> #include<cmath> #include<iostream> #include<algorithm> #include<vector> #include<map> #include<set> #include<queue> #include<bitset> #include<utility> #include<functional> #include<iomanip> #include<sstream> #include<ctime> #include<cassert> using namespace std; #de...
a.cc: In function 'int main()': a.cc:139:29: error: 'mimi' was not declared in this scope; did you mean 'mini'? 139 | tar=mimi; | ^~~~ | mini
s073976211
p03770
C++
#include <iostream> #include <fstream> #include <cassert> #include <typeinfo> #include <vector> #include <stack> #include <cmath> #include <set> #include <map> #include <string> #include <algorithm> #include <cstdio> #include <queue> #include <iomanip> #include <cctype> #include <random> #define syosu(x) fixed<<setprec...
a.cc: In function 'int main()': a.cc:100:30: error: no matching function for call to 'max(__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type&, __gnu_cxx::__normal_iterator<int*, std::vector<int> >::difference_type)' 100 | else b[i]=max(b[i],upper_bound(a[i].begin(),a[i].end(),y-a[1][0])-a...
s900395944
p03770
C++
#include <iostream> #include <fstream> #include <cassert> #include <typeinfo> #include <vector> #include <stack> #include <cmath> #include <set> #include <map> #include <string> #include <algorithm> #include <cstdio> #include <queue> #include <iomanip> #include <cctype> #include <random> #define syosu(x) fixed<<setprec...
a.cc: In function 'int main()': a.cc:99:31: error: no matching function for call to 'max(__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type&, __gnu_cxx::__normal_iterator<int*, std::vector<int> >::difference_type)' 99 | if(i) b[i]=max(b[i],it-a[i].begin()); | ...
s723888050
p03770
C++
#include <iostream> #include <fstream> #include <cassert> #include <typeinfo> #include <vector> #include <stack> #include <cmath> #include <set> #include <map> #include <string> #include <algorithm> #include <cstdio> #include <queue> #include <iomanip> #include <cctype> #include <random> #define syosu(x) fixed<<setprec...
a.cc: In function 'int main()': a.cc:99:31: error: no matching function for call to 'max(__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type&, __gnu_cxx::__normal_iterator<int*, std::vector<int> >::difference_type)' 99 | if(i) b[i]=max(b[i],it-a[i].begin()); | ...
s723263721
p03770
C++
c#include<bits/stdc++.h> #define rep(i,k,n) for(int i=k;i<=n;i++) #define rep2(i,k,n) for(int i=k;i>=n;i--) using namespace std; typedef long long ll; const int mod=1e9+7; const int N=2e5+7; void upd(int& x,int y){x+=y;if(x>=mod)x-=mod;} int qpow(int a,int b){int aa=a,res=1;for(;b;b>>=1){if(b&1)res=1ll*res*aa%mod;aa=1...
a.cc:1:2: error: stray '#' in program 1 | c#include<bits/stdc++.h> | ^ a.cc:1:1: error: 'c' does not name a type 1 | c#include<bits/stdc++.h> | ^ a.cc:26:1: error: 'vector' does not name a type 26 | vector<int> tu[N]; | ^~~~~~ a.cc: In function 'int main()': a.cc:29:9: error: 'scanf' was n...
s694285220
p03770
C++
N, X, Y = map( int, input().split() ) C = [] W = [] for i in range( N ): c, w = map( int, input().split() ) C.append( c - 1 ) W.append( w ) c2w = [ [] for i in range( N ) ] for i in range( N ): c2w[ C[ i ] ].append( W[ i ] ) for i in range( N ): c2w[ C[ i ] ].sort() W.sort() minw, minw2 = W[ 0 ], W[ 1 ] if...
a.cc:1:1: error: 'N' does not name a type 1 | N, X, Y = map( int, input().split() ) | ^
s770062739
p03770
C++
#include <cstdio> #include <vector> #include <unordered_map> typedef long long ll; constexpr int MAX_N = 200200; constexpr int MOD = 1000000007; using namespace std; int n, x, y; int col[MAX_N], weight[MAX_N]; vector<pair<int, int>> each[MAX_N]; vector<pair<int, int>> all; vector<int> adj[MAX_N]; bool vis[MAX_N];...
a.cc: In function 'int main()': a.cc:70:5: error: 'sort' was not declared in this scope; did you mean 'short'? 70 | sort(all.begin(), all.end()); | ^~~~ | short
s160412902
p03770
C++
//#include <bits/stdc++.h> #include <iostream> #include <vector> #include <queue> #include <deque> #include <map> using namespace std; #define pb push_back #define mp make_pair typedef long long ll; ll n,x,y; vector<ll>v[222222]; struct item{ ll c,w; }a[222222]; struct tree{ ll c,w,id; tree(){ w=(ll)1e18; }...
a.cc: In function 'int main()': a.cc:120:3: error: 'sort' was not declared in this scope; did you mean 'short'? 120 | sort(a+1,a+n+1,&cmp); | ^~~~ | short
s537991159
p03770
C++
#include<bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair #define F first #define S second #define fo(i, n) for(int i = 1; i <= n; ++i) #define rep(i, a, b) for(int (i) = (a); (i) < (b); ++(i)) typedef long long ll; typedef pair <int, int> pii; typedef pair <ll, ll> pll; const int N = ...
a.cc:45:8: error: ISO C++ forbids declaration of 'uni' with no type [-fpermissive] 45 | inline uni(int x, int y) | ^~~ a.cc: In function 'int uni(int, int)': a.cc:53:1: warning: no return statement in function returning non-void [-Wreturn-type] 53 | } | ^
s554907806
p03770
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int M = 1e9 + 7; const int N = 2e5 + 7; const int K = 20; vector <pair <int, int> > g[N][K]; vector <int> kek[N]; bool u[N][K]; bool vis[N]; vector <int> ind, t; void dos(int i) { if (vis[i]) { return; } ind.push_back...
a.cc: In function 'void dos(int)': a.cc:27:13: error: cannot convert 'std::vector<std::pair<int, int> >' to 'int' 27 | dos(to); | ^~ | | | std::vector<std::pair<int, int> > a.cc:17:14: note: initializing argument 1 of 'void dos(int)' 17 | void dos(in...
s904618259
p03770
C++
#include <bits/stdc++.h> using namespace std; typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x<(to);x++) #define FORR(x,arr) for(auto& x:arr) #define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++) #define ALL(a) (a.begin()),(a.end()) #define ZER...
a.cc: In function 'void solve()': a.cc:64:17: error: 'aort' was not declared in this scope; did you mean 'abort'? 64 | aort(ALL(CC[i])); | ^~~~ | abort
s652189332
p03770
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int M = 1e9 + 7; const int N = 2e5 + 7; const int K = 20; vector <pair <int, int> > g[N][K]; bool u[N][K]; vector <int> ind, t; void dfs(int i, int k) { if (u[i][k]) { return; } u[i][k] = true; for (auto to : g[i]...
a.cc: In function 'int main()': a.cc:146:19: error: 'j' was not declared in this scope 146 | if (!u[i][j]) | ^
s186907179
p03771
C++
/*====Corycle====*/ #include<algorithm> #include<iostream> #include<iomanip> #include<cstring> #include<cstdlib> #include<complex> #include<cstdio> #include<vector> #include<cmath> #include<ctime> #include<stack> #include<queue> #include<map> #define ll long long #define pii pair<int,int> #define fst first #define scd ...
a.cc: In function 'int main()': a.cc:37:52: error: 'v' was not declared in this scope 37 | for(int i=1;i<=n;i++)a[i]=read();a[0]=-inf-v-1;a[n+1]=inf+v+1; | ^
s800948047
p03771
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:32:20: error: expected ';' before 'for' 32 | #define REP(i,a,b) for(int i=a;i<b;i++) | ^~~ a.cc:33:18: note: in expansion of macro 'REP' 33 | #define rep(i,n) REP(i,0,n) | ^~~ a.cc:65:17: note: in expansion of macro 'rep' 65 |...
s083763167
p03771
C++
#include <cstdio> #include <iostream> #define ri register int using namespace std; const int N = 2e5 + 50; int n, v, m; int a[N], f[N], g[N]; int lb[N], rb[N], ans[N]; int pre[1 << 18 | 5][18], nxt[1 << 18 | 5][18]; int main() { scanf("%d%d", &n, &v); for (int i = 1; i <= n; i ++) scanf("%d", &a[i]); for (int ...
a.cc: In function 'int main()': a.cc:20:11: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 20 | for (ri i = 1; i <= n; i ++) { | ^ a.cc:22:13: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 22 | for (ri j = 1; j < m; j ++)...
s504172224
p03771
C++
//2018-1-18 //miaomiao // #include <bits/stdc++.h> using namespace std; #define Set(a, v) memset(a, v, sizeof(a)) #define For(i, a, b) for(int i = (a); i <= (int)(b); ++i) #define M 18 #define N (100000+5) int n, m, dn, pos[N], dis[M], nxt[N][M], beg[N], end[N]; int f[1<<M]; bool Solve(int l, int r){ if(l == 1 && ...
a.cc: In function 'int main()': a.cc:50:50: error: reference to 'end' is ambiguous 50 | beg[++cnt] = st; end[cnt] = ed; | ^~~ In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166, from a.cc...
s718115655
p03771
C++
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<iostream> #include<algorithm> using namespace std; namespace INPUT{ const int L=1<<15; char _buf[L],*S,*T,c; char _gc(){ if(S==T){ T=(S=_buf)+fread(_buf,1,L,stdin); if(S==T) return EOF; } return *S++; } void readi(int &X){ register bo...
a.cc: In function 'void INPUT::readi(int&)': a.cc:20:31: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 20 | register bool flag; | ^~~~ a.cc: In function 'int main()': a.cc:81:16: error: 'nxt' was not declared in this scope 81 ...
s469540688
p03771
C++
#include <set> #include <map> #include <queue> #include <ctime> #include <cmath> #include <cstdio> #include <bitset> #include <vector> #include <cstring> #include <cassert> #include <iostream> #include <algorithm> using namespace std; typedef double db; typedef long long ll; typedef long double ld; typedef vector<int> ...
a.cc: In function 'int main()': a.cc:61:23: error: 'V' was not declared in this scope 61 | while((1<<m)<=V)m++;m++; | ^ a.cc:64:51: error: 'V' was not declared in this scope 64 | rep(j,1,n)lj[j][i]=(x[j]-x[j-1]<=(V>>i))?lj[j-1][i]:j; | ...
s476884811
p03771
C++
#include<bits/stdc++.h> using namespace std; const int N=2e5+10; int n,x[N],d[20],id,dep; struct array{ int L[N],R[N],l[N],r[N],cnt; void init(int dep); }a[20]; void array::init(int dep){ int dis=d[dep]; cnt++;L[1]=R[1]=x[1]; for (int i=2;i<=n;i++){ if (x[i]<=R[cnt]+dis) R[cnt]=x[i];else cnt++,L[cnt]=R[cnt]=x[...
a.cc:9:6: error: reference to 'array' is ambiguous 9 | void array::init(int dep){ | ^~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, ...
s946701738
p03771
C++
#include<bits/stdc++.h> using namespace std; #define N 1111116 #define K 20 int n,m,v,a[N],l[N][K],r[N][K],f[N],g[N],h[N]; int read(){ int x=0,f=1;char ch=getchar(); for (;!isdigit(ch);ch=getchar()) if (ch=='-') f=-f; for (;isdigit(ch);ch=getchar()) x=x*10+ch-'0'; return x*f; } int main(){ n=read();v=read(); fo...
a.cc: In function 'int main()': a.cc:40:2: error: expected '}' at end of input 40 | } | ^ a.cc:14:11: note: to match this '{' 14 | int main(){ | ^
s559929564
p03771
C++
#include <iostream> #include <cstdio> #include <cstdlib> #include <cstring> #include <algorithm> #include <vector> #include <queue> #include <stack> #include <cmath> using namespace std; const int MAXN = 200000 + 1000; const int MAXM = 1048576; const int MAXK = 20; int n, m, V; int a[MAXN], v[MAXK]; int f[MAXM], g[...
a.cc: In function 'void init()': a.cc:41:17: error: reference to 'next' is ambiguous 41 | next[n + 1][i] = next[n][i] = n; | ^~~~ In file included from /usr/include/c++/14/string:47, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/i...
s273222346
p03771
C++
# include <bits/stdc++.h> using namespace std; int N, V; const int maxn = 200010; bool f[maxn][1<<20]; bool g[maxn][1<<20]; int x[maxn], l[maxn][20], r[maxn][20]; int val[20]; int m, mask; int main() { scanf("%d%d", &N, &V); for(int i = 0; i < N; ++i) scanf("%d", &x[i]); for(int v = V; v; v /= 2) val[m++] = v; ...
/tmp/cc5dBexW.o: in function `main': a.cc:(.text+0x49): relocation truncated to fit: R_X86_64_PC32 against symbol `x' defined in .bss section in /tmp/cc5dBexW.o a.cc:(.text+0x86): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/cc5dBexW.o a.cc:(.text+0x8f): relocation trunc...
s353872915
p03771
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 pb2 pop_back #define pf push_front #define pf2 pop_front #define line printf("\n") #define rep(k,i,j) for(int k = (int)i;k<(int) j;k++) #define repd(k,i,j) for(int k = i;k>=(int)j;k--)...
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory 1 | #include<bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s664605845
p03771
C
#include<stdio.h> #include<string.h> #define N_MAX 200000 #define GROUP_MAX 18 #define DP_SIZE ((N_MAX+31)/32) typedef struct tag_group_t { int l, r, is_invalid; }group_t; unsigned long dp[GROUP_MAX][DP_SIZE]; group_t g_group[GROUP_MAX+1][GROUP_MAX+1]; int group_num; int n, v; int x[N_MAX]; int group_ma...
main.c:114:9: error: expected identifier or '(' before 'return' 114 | return 0; | ^~~~~~ main.c:115:1: error: expected identifier or '(' before '}' token 115 | } | ^
s607357154
p03771
C++
#include<cstdio> #include<map> #include<algorithm> using namespace std; const int NMAX = 300000; const int LOGN = 30; int V[LOGN]; int Lmost[NMAX][LOGN], Rmost[NMAX][LOGN]; int dpL[1<<LOGN], dpR[1<<LOGN]; int arr[NMAX+1]; int dp[NMAX+2]; int main(){ int N; scanf("%d%d",&N,&V[0]); for(int i=1;i<=N;i++) scanf(...
/tmp/cc4uZpl3.o: in function `main': a.cc:(.text+0x43): relocation truncated to fit: R_X86_64_PC32 against symbol `arr' defined in .bss section in /tmp/cc4uZpl3.o a.cc:(.text+0x12d): relocation truncated to fit: R_X86_64_PC32 against symbol `arr' defined in .bss section in /tmp/cc4uZpl3.o a.cc:(.text+0x147): relocation...
s407075220
p03771
C++
/* Hanit Banga */ #include <algorithm> #include <iostream> #include <cstdlib> #include <cstring> #include <cstdio> #include <vector> #include <map> #include <set> using namespace std; #define pb push_back #define fast_cin() ios_base::sync_with_stdio(false) typedef long long ll; typedef pair <int, int> pii; typedef ...
a.cc:23:29: error: 'log2' was not declared in this scope 23 | const int N = 2e5 + 10, M = log2(N) + 10; | ^~~~ a.cc:27:63: error: size of array 'lt' is not an integral constant-expression 27 | int v[N] = {0}, dp_lt[2 * N] = {0}, dp_rt[2 * N] = {0}, lt[N][M] = {0}, rt[N][M] = {0};...
s591089320
p03771
C++
// package atcoder.agc.agc012; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.Arrays; import java.util.InputMismatchException; public class Main { public static void main(String[] args) { InputReader in = new InputReader(System.in); PrintWriter...
a.cc:3:1: error: 'import' does not name a type 3 | import java.io.IOException; | ^~~~~~ a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:4:1: error: 'import' does not name a type 4 | import java.io.InputStream; | ^~~~~~ a.cc:4:1: note: C++20 'import' only available with '-fmodu...
s086203422
p03771
C++
#define _USE_MATH_DEFINES #include <algorithm> #include <cstdio> #include <functional> #include <iostream> #include <cfloat> #include <climits> #include <cstdlib> #include <cstring> #include <cmath> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <time.h> #i...
a.cc: In function 'std::vector<int> solve()': a.cc:94:22: error: conflicting declaration 'std::vector<bool> ok' 94 | vector<bool> ok(N); | ^~ a.cc:77:14: note: previous declaration as 'bool ok' 77 | bool ok = true; | ^~ a.cc:98:38: error: invalid types...
s961367534
p03771
C++
#include <bits/stdc++.h> using namespace std; int main() { int n, v; cin >> n >> v; int a[n + 2]; for(int i = 0; i < n; i++) cin >> a[i]; if(n == 0 or v == 0) { cout << "Impossible" << '\n'; } if(n == 1 or v == 1) cout << "Possible" << '\n'; if(n == 3 or v == 2) ...
a.cc: In function 'int main()': a.cc:23:93: error: expected ';' before '}' token 23 | printf("Impossible\nPossible\nPossible\nPossible\nPossible\nPossible\nImpossible\n") | ^ | ...
s196028318
p03772
C++
#include<bits/stdc++.h> using namespace std; const int N=105,M=1e9+7; int n,m,a[N],dp[N][N][N]; int main(){ scanf("%d",&n); m=(n<<1)-1; for (int i=1;i<=m;i++)scanf("%d",&a[i]); sort(a+1,a+m+1); dp[1][1][1]=1; for (int i=1;i<n;i++) for (int j=1;j<=m;j++) for (int k=1;k<=j;k++){ int x=j;y=k; if (a[n-i]...
a.cc: In function 'int main()': a.cc:14:41: error: 'y' was not declared in this scope 14 | int x=j;y=k; | ^
s521388463
p03772
C++
//Created Time:2019年12月02日 星期一 20时04分36秒 #include <iostream> #include <cstdio> #include <algorithm> #include <cstring> #define N 102 #define mod 1000000007 using namespace std; int n; int a[N], f[N][N][N]; int main(){ scanf("%d", &n); for(int i = 1; i <= n * 2 - 1; ++i) scanf("%d", a + i); sort(a + 1, a + n * 2...
a.cc:37:7: error: stray '@' in program 37 | noip01@ubuntu:~/work/a$ | ^ a.cc:37:1: error: 'noip01' does not name a type 37 | noip01@ubuntu:~/work/a$ | ^~~~~~
s794269474
p03772
C++
#include<cstdio> #include<cstring> #include<algorithm> using namespace std; typedef long long ll; const int N=105; const int mod=1e9+7; int n,a[N],f[N/2][N][N]; int main() { scanf("%d",&n); for(int i=1;<2*n;i++) scanf("%d",&a[i]); sort(a+1,a+2*n); f[n][1][0]=1; for(int i=n-1;i;i--) { int al=(a[...
a.cc: In function 'int main()': a.cc:12:17: error: expected primary-expression before '<' token 12 | for(int i=1;<2*n;i++) | ^
s962161590
p03772
C++
#include <cstdio> #include <algorithm> using namespace std; #define ref(i,x,y)for(int i=x;i<=y;++i) #define def(i,x,y)for(int i=x;i>=y;--i) const int mod=1e9+7; void inc(int&a,int b){ a+=b;if(a>=mod)a-=mod; } int n,ans,a[100],f[100][100][51][51],g[100][100][51][51];bool b[100]; int main(){ scanf("%d",&n); ref(i,1,2*...
a.cc: In function 'int main()': a.cc:29:74: error: 'kl' was not declared in this scope; did you mean 'k'? 29 | ref(I,(ti-1),i-1) if(b[I]) inc(g[I][j][t-kl+2][1],s); | ^~ | ...
s945398143
p03772
C++
#include<algorithm> #include<iostream> #include<cstdio> #define MN 100 #define mod 1000000007 using namespace std; inline 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; } int n,a[MN+5],f[MN/2+5][MN+5][...
a.cc: In function 'int main()': a.cc:20:25: error: 'memcpy' was not declared in this scope 20 | sort(a+1,a+n*2);memcpy(b,a,sizeof(b)); | ^~~~~~ a.cc:4:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include<cst...
s818256301
p03772
C++
#include <stdio.h> #include <vector> #include <map> long long mod = 1000000007; std::map<std::vector<long long>, long long> m; long long DFS(std::vector<long long> v, std::vector<long long> cc, long long n) { if (n == 1) return 1; long long l, i, j, c, k; std::vector<long long> V; for (k = i = 0; i != 100; i++) ...
a.cc: In function 'long long int DFS(std::vector<long long int>, std::vector<long long int>, long long int)': a.cc:12:29: error: expected ';' before 'for' 12 | cc[i] && k++ | ^ | ; 13 | for (c = 0, l = v.size(), i = 1; i !...
s597896354
p03773
C++
#include <iostream> #include <math.h> #include <bits/stdc++.h> using namespace std; int main() { int a,b,c; cin>>a>>b; c=a+b; if(c<24) cout<<c; else if(c==24) couy<<0; else cout<<c-24; return 0; }
a.cc: In function 'int main()': a.cc:14:9: error: 'couy' was not declared in this scope 14 | couy<<0; | ^~~~
s426058285
p03773
Java
import java.io.*; import java.util.*; public class Balanced { public static void main(String[] args) throws IOException { Scanner sc = new Scanner(System.in); PrintWriter out = new PrintWriter(System.out); int a=sc.nextInt(), b=sc.nextInt(); System.out.println((a+b)%24); out.close(); } static class Scann...
Main.java:4: error: class Balanced is public, should be declared in a file named Balanced.java public class Balanced { ^ 1 error
s145836479
p03773
C++
#include <bits/stdc++.h> const long long MOD = 1e9+7; using namespace std; int main () { ios::sync_with_stdio(0); cin.tie(0); int A,B; cin >> A >> B; if (A+B<=24) { cout << A+B << endl; } else if (A+B>=24) { cout << 24-A << end; } return 0; }
a.cc: In function 'int main()': a.cc:15:30: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 15 | cout << 24-A << end; | ~~~~~~~~~~~~~^~~~~~ In file included from /usr/include/c++/14/istream:41, ...
s998210726
p03773
C++
#include <iostream> using namespace std; int main() { int A,B; std::cin >> A; std::cin >> B; if(A+B<24){ cout<<A+B;} else if(A+B=>24){ cout<<(A+B)-24; } return 0; }
a.cc: In function 'int main()': a.cc:12:13: error: expected primary-expression before '>' token 12 | else if(A+B=>24){ | ^
s293477465
p03773
C++
#include <iostream> using namespace std; int main() { int a,b,c=0; cin>>a>>b; c=a+b; if(c<24) cout<<c; else if(c==24) cout<<12; else { c-=24; cout<<c; } return 0;
a.cc: In function 'int main()': a.cc:17:14: error: expected '}' at end of input 17 | return 0; | ^ a.cc:5:1: note: to match this '{' 5 | { | ^
s929994092
p03773
C++
#include<iostream> #include<algorithm> #include<string> #include<cmath> #include<vector> #include<map> using namespace; int F(long long A, long long B){ int ta = A, tb = B; int ca = 0, cb = 0; for(int i = 0; i < 10; i++){ if(ta != 0) ca++; if(tb != 0) cb++; ta /= 10; tb /= 1...
a.cc:7:16: error: expected identifier before ';' token 7 | using namespace; | ^ 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 a.cc:1: /usr/include/...
s861223086
p03773
C++
#include <bits/stdc++.h> using namespace std; #define ll long long signed main() { char A,B; cin >> A >> B; if(A+B < 24){cout << A+B;} else{cout << A+B-24; }
a.cc: In function 'int main()': a.cc:12:4: error: expected '}' at end of input 12 | } | ^ a.cc:7:1: note: to match this '{' 7 | { | ^
s114949920
p03773
Java
import java.util.*; public class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.next(); int b = sc.next(); System.out.println((a + b) % 24); } }
Main.java:8: error: incompatible types: String cannot be converted to int int a = sc.next(); ^ Main.java:9: error: incompatible types: String cannot be converted to int int b = sc.next(); ^ 2 errors
s431355398
p03773
C++
//In the name of 'ALLAH' #include<bits/stdc++.h> using namespace std; int main() { int a , b ; cin>>a>>b; if( a + b => 24 ) { cout << a+b-24 <<endl; } else { cout<< a+b <<endl; } }
a.cc: In function 'int main()': a.cc:9:16: error: expected primary-expression before '>' token 9 | if( a + b => 24 ) | ^
s876470752
p03773
C++
#include<bits/stdc++.h> using namespace std; #define bug printf("bug\n"); #define bug2(var) cout<<#var<<" "<<var<<endl; #define co(q) cout<<q<<endl; #define all(q) (q).begin(),(q).end() typedef long long int ll; typedef unsigned long long int ull; const int MOD = (int)1e9+7; const i...
a.cc: In function 'int main()': a.cc:64:6: error: expected '}' at end of input 64 | } | ^ a.cc:28:5: note: to match this '{' 28 | { | ^
s539453970
p03773
C
#include<stdio.h> int a,b,c; scanf("%d",&a); scanf("%d",&b); c=a+b; printf("%d",c);
main.c:4:7: error: expected declaration specifiers or '...' before string constant 4 | scanf("%d",&a); | ^~~~ main.c:4:12: error: expected declaration specifiers or '...' before '&' token 4 | scanf("%d",&a); | ^ main.c:5:7: error: expected declaration specifiers or '...' before stri...
s635900160
p03773
C++
#include <iostream> #include<bits/stdc++.h> #include<cmath> using namespace std; int main() { int a,b,c; cin>>a>>b; c=a+b; if(c<24) { cout<<c; } else { d=c-24; cout<<d; } return 0; }
a.cc: In function 'int main()': a.cc:19:4: error: 'd' was not declared in this scope 19 | d=c-24; | ^
s639243313
p03773
C++
#include <iostream> int main() { int A, B; cin >> A >> B; cout << (A + B) % 24 << endl; return 0; }
a.cc: In function 'int main()': a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | cin >> A >> B; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked t...
s332078734
p03773
C++
#incluce <iostream> int main() { int A, B; cin >> A >> B; cout << (A + B /24) << endl; }
a.cc:1:2: error: invalid preprocessing directive #incluce; did you mean #include? 1 | #incluce <iostream> | ^~~~~~~ | include a.cc: In function 'int main()': a.cc:5:3: error: 'cin' was not declared in this scope 5 | cin >> A >> B; | ^~~ a.cc:6:3: error: 'cout' was not declared in this sc...
s055376012
p03773
C++
//AUTHOR:BlackBox Inc.// #include<bits/stdc++.h> #include<unordered_map> #include<tr1/unordered_map> #define ll long long #define ull unsigned long long #define vi vector<int> #define vlli vector<long long int> #define vvi vector<vector<int>> #define endl "\n" #define vpii vector<pair<int,int>> #define vs vector<strin...
a.cc: In function 'int main()': a.cc:47:9: error: expected primary-expression before '>' token 47 | if (a+b=>24) | ^
s186730935
p03773
Java
import java.util.Scanner; public class A { public static void main(String[] args){ Scanner in = new Scanner(System.in); int a = in.nextInt(); int b = in.nextInt(); System.out.println((a + b) % 24); } }
Main.java:3: error: class A is public, should be declared in a file named A.java public class A { ^ 1 error