submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s488486534
p03808
C++
#include <bits/stdc++.h> using namespace std; #define repl(i,a,b) for(int i=(int)(a);i<(int)(b);i++) #define rep(i,n) repl(i,0,n) #define mp(a,b) make_pair((a),(b)) #define pb(a) push_back((a)) #define all(x) (x).begin(),(x).end() #define uniq(x) sort(all(x)),(x).erase(unique(all(x)),end(x)) #define fi first #define se...
a.cc: In function 'bool solve()': a.cc:31:12: error: 'dd' was not declared in this scope; did you mean 'd'? 31 | if( d<=dd && (nn-d)%n!=0 ) return false; | ^~ | d
s618624733
p03808
C++
#include <iostream> #include <cstdio> #include <cstring> #include <cstdlib> #include <algorithm> #include <vector> #include <string> #include <stack> #include <queue> #include <set> #include <map> using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<string> vs; int main() { int n; c...
a.cc:111:1: error: expected declaration before '}' token 111 | } | ^
s930072001
p03808
C++
#include <iostream> #include <cstdio> #include <cstring> #include <cstdlib> #include <algorithm> #include <vector> #include <string> #include <stack> #include <queue> #include <set> #include <map> using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<string> vs; int main() { int n; c...
a.cc:111:1: error: expected declaration before '}' token 111 | } | ^
s558380930
p03808
C++
#include <bits/stdc++.h> #define ll long long #define INF 999999999 #define MOD 1000000007 #define rep(i,n) for(int i=0;i<n;i++) using namespace std; typedef pair<int,int>P; const int MAX_N = 100005; int a[MAX_N]; int b[MAX_N]; int main() { int n; ll asum = 0; cin >> n; rep(i,n){ scanf("%d",&a[i]); asum +=...
a.cc: In function 'int main()': a.cc:2:12: error: expected primary-expression before 'long' 2 | #define ll long long | ^~~~ a.cc:29:19: note: in expansion of macro 'll' 29 | ll nsum = ll(n) * (n+1) / 2; | ^~
s020797362
p03808
C++
#include <iostream> #include <vector> #include <algorithm> #include <bitset> #include <fstream> #include <sstream> #include <string> #include <time.h> #include <math.h> using namespace std; int main() { int N; cin >> N; vector <long long int> A(N); auto minIt = A.begin(); auto It = A.begin(); for (int i...
a.cc: In function 'int main()': a.cc:46:12: error: expected '}' at end of input 46 | return 0; | ^ a.cc:13:12: note: to match this '{' 13 | int main() { | ^
s413786697
p03808
C++
#include <bits/stdc++.h> #include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> #include <numeric> using namespace std; #define forn(i,n) for (int i = 0; i < int(n); ++i) #define forsn(i,x,y) for(long long i = (x) ; i <= (y) ; ++i) typedef long long ll; typedef long double ld; ...
a.cc: In function 'int main()': a.cc:33:24: error: expected ';' before 'if' 33 | ave = (n * (n+1)) / 2 | ^ | ; 34 | if(total % ave != 0) { | ~~
s714632900
p03808
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <numeric> #include <map> #define REP(i,n) for (int i=0;i<(n);i++) #define ll long long #define ull unsigned long long int dx[4] = {1, 0, -1, 0}; int dy[4] = {0, 1, 0, -1}; using namespace std; int main(){ cin.tie(0); ios::sync_w...
a.cc: In function 'int main()': a.cc:85:14: error: redeclaration of 'bool issort' 85 | bool issort = true; | ^~~~~~ a.cc:28:22: note: 'bool issort' previously declared here 28 | bool issort = true; | ^~~~~~ a.cc:95:2: error: expected '}' at end...
s956695006
p03808
C++
#include <iostream> #include <string> #include <queue> using namespace std; #define REP(i,n) for(int i = 0; i < (int)(n); ++i) #define FOR(i,a,b) for(int i = (a); i <= (int)(b); ++i) #define ALL(c) (c).begin(), (c).end() #define SIZE(v) ((int)v.size()) int main() { bool error = false; int N; cin >> N; long long A[...
a.cc: In function 'int main()': a.cc:42:25: error: 's' was not declared in this scope 42 | s[i] = (x-dA[i])/N; | ^ a.cc:48:24: error: 's' was not declared in this scope 48 | sum += s[i]*(N+0-i); | ^
s951628747
p03808
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { int N; cin >> N; long long S; vector<int> A(N),B(N); for(int i=0;i<N;++i) { cin >> A[i]; S+=A[i]; } if(S%(N*(N+1)/2)) { cout << "NO" << endl; return 0; } for(int i=0;i<N-1;++i) B[i] = A[i+1]-A[i]; B...
a.cc:20:3: error: expected unqualified-id before 'for' 20 | for(int i=0;i<N;++i) { | ^~~ a.cc:20:15: error: 'i' does not name a type 20 | for(int i=0;i<N;++i) { | ^ a.cc:20:19: error: expected unqualified-id before '++' token 20 | for(int i=0;i<N;++i) { | ...
s398024222
p03808
C++
foo
a.cc:1:1: error: 'foo' does not name a type 1 | foo | ^~~
s416187372
p03808
C
#include <stdio.h> int main() { int n; int flag = 0, b, c; int flag2 = 0; int i; int sum; int tmp; int x0, x1, xa, xb; scanf("%d", &n); if (n <= 1) { printf("YES\n"); return 0; } scanf("%d", &xa); scanf("%d", &xb); b = xb - xa; tmp = xb + xa; ...
main.c: In function 'main': main.c:53:27: error: lvalue required as left operand of assignment 53 | if (flag >= 2 || b - c= n || tmp != n * (n + 1) / 2 * b) | ^
s483883825
p03808
C++
#include <iostream> #include <vector> using namespace std; int main(){ int N; vector<int> a; int b = 0; int sum = 0; int c = 0; cin >> N; for(int i = 0; i < N; i++){ cin >> b; a.push_back(b); sum += b; } int trial = sum / (N*(N+1)/2); if (sum % (N*(N+1)/2) != 0){ cout << "NO" << ...
a.cc: In function 'int main()': a.cc:36:16: error: no match for 'operator<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [4]') 36 | cout < "NO\n"; | ~~~~ ^ ~~~~~~ | | | | | const char [4] | std::...
s093600251
p03808
C++
#include <iostream> #include <vector> using namespace std; typedef long long ll; int main(void){ // Here your code ! int N,t = 0; ll res = 0; cin >> N; vector<int> a(N); bool f0 = true; for(int i = 0; i < N; i++){ cin >> a[i]; if(a[i]!=a[(i+1)%N])f0 = false; ...
a.cc: In function 'int main()': a.cc:65:2: error: expected '}' at end of input 65 | } | ^ a.cc:7:15: note: to match this '{' 7 | int main(void){ | ^
s361370221
p03808
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef vector<int> vi; #define FOR(i,a,b) for(int i=(a);i<(int)(b);i++) #define rep(i,n) FOR(i,0,n) #define ALL(x) (x).begin(),(x).end() #define RALL(x) (x).rbegin(),(x).rend() #define SZ(x) (int)(x).size() #define mse...
a.cc: In function 'int main()': a.cc:38:27: error: 'class std::set<int>' has no member named 'push' 38 | S.push(d1); | ^~~~
s377839205
p03808
C++
#include <bits/stdc++.h> #define ld long double #define ll long long int #define mod 1000000007 #define ll_inf 1000000000000000 #define int_inf 1000000000 #define pb push_back #define endl '\n' #define Endl '\n' #define eps 1e-9 #define PI acos(-1.0) #define ii pair<int,int> #define se second #define fi first #define p...
a.cc: In function 'int main()': a.cc:49:5: error: 'i' was not declared in this scope 49 | i(x>mx-mn){ | ^
s529832085
p03808
C++
#include <bits/stdc++.h> #define F first #define S second #define prev azaza using namespace std; typedef long long ll; typedef long double ld; const int max_n = 100005; ll a[max_n]; ll maxtree[4 * max_n]; ll mintree[4 * max_n]; void build_tree(int cur, int l, int r) { if (l == r) { maxtree[cur] = ...
a.cc: In function 'void check(ll)': a.cc:80:16: error: return-statement with a value, in function returning 'void' [-fpermissive] 80 | return 0; | ^
s314128767
p03808
C++
#include <bits/stdc++.h> #define F first #define S second #define prev azaza using namespace std; typedef long long ll; typedef long double ld; const int max_n = 100005; ll a[max_n]; ll maxtree[4 * max_n]; ll mintree[4 * max_n]; void build_tree(int cur, int l, int r) { if (l == r) { maxtree[cur] = ...
a.cc: In function 'void check(ll)': a.cc:75:16: error: return-statement with a value, in function returning 'void' [-fpermissive] 75 | return 0; | ^
s420809338
p03808
C++
#include<cstdio> #include<cstring> #include<cmath> #include<cstdlib> #include<algorithm> using namespace std; const int MaxN = 1e5; int n; bool flag; int ans[MaxN+5]; int main() { scanf("%d", &n); for(int i = 1; i <= n; i++) { scanf("%d", &ans[i]); } sort(ans + 1, ans + n + 1); for(int i = n; i >= 1; i--) { ...
a.cc: In function 'int main()': a.cc:22:10: error: expected '}' at end of input 22 | } | ^ a.cc:12:1: note: to match this '{' 12 | { | ^
s364371612
p03808
C++
#include <iostream> #include <vector> using namespace std; int main(){ int N; vector<int> a; int b = 0; int sum = 0; int c[100000]; cin >> N; for(int i = 0; i < N; i++){ cin >> b; a.push_back(b); sum += b; } int trial = sum / (N*(N+1)/2); if (sum % (N*(N+1)/2) != 0){ cout << "NO"...
a.cc: In function 'int main()': a.cc:44:9: error: 'i' was not declared in this scope 44 | c[i] = (a[N-1] + trial - a[0]) / N; | ^ a.cc:48:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 48 | if (c == trial) | ~~^~~~~~~~
s219708359
p03808
C++
#include<string> #include<iostream> #include<algorithm> #include<set> #include<stack> #include<unordered_set> #include<math.h> #include<vector> #include<sstream> #include<queue> #include<functional> #include<bitset> #include<cstdio> #include<iomanip> #include <cstring> #include <climits> using namespace std; #deine int...
a.cc:18:2: error: invalid preprocessing directive #deine; did you mean #define? 18 | #deine int long long | ^~~~~ | define a.cc:19:2: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 19 | main() { | ^~~~ a.cc: In function 'int main()': a.cc:20:37: warning: overflow...
s975371943
p03808
C++
#include <iostream> #include <vector> #include <numeric> #include <algorithm> int main() { std::ios_base::sync_with_stdio(false); std::cin.tie(nullptr); int n; std::cin >> n; std::vector<int> as(n), diffs(n + 1); for (auto& i : as) std::cin >> i; as.push_back(as.front()); std::adjacent_difference(std::...
a.cc: In function 'int main()': a.cc:26:8: error: redeclaration of 'bool ok' 26 | bool ok = true; | ^~ a.cc:17:8: note: 'bool ok' previously declared here 17 | bool ok = true; | ^~
s027813531
p03808
C++
#include <bits/stdc++.h> #define REP(i,n,N) for(int i=n;i<N;i++) #define p(S) cout<<S<<endl using namespace std; int main() { long long int N; cin>>N; int A[100005],now; long long int sum=0; bool flag,flag2=false; REP(i,1,N+1){ cin>>A[i]; sum+=A[i]; } p( if(sum%(N*(N+1)/2)!=0){ p("NO"); }else{ while(...
a.cc:52:2: error: unterminated argument list invoking macro "p" 52 | } | ^ a.cc: In function 'int main()': a.cc:16:9: error: 'p' was not declared in this scope 16 | p( | ^ a.cc:16:10: error: expected '}' at end of input 16 | p( | ^ a.cc:6:12: note: to match t...
s535228551
p03808
C++
# include <cstdio> # include <cstring> # include <cstdlib> # include <iostream> # include <vector> # include <queue> # include <stack> # include <map> # include <set> # include <cmath> # include <algorithm> using namespace std; # define lowbit(x) ((x)&(-x)) # define pi acos(-1.0) # define eps 1e-3 # define MOD 10000000...
a.cc: In function 'int main()': a.cc:54:40: error: no matching function for call to 'min(int&, LL)' 54 | FOR(i,1,n) scanf("%d",a+i), lll=min(lll,a[i]/yin); | ~~~^~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/...
s955868102
p03808
Java
public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); long np=0; for(int i=1; i<=n; i++){ np += i; } long[] a = new long[n]; int even = 0; int odd = 0; long sum=0; int check=0; int dang=0; for(int i=0; i<n; i++){ a[i] = sc.ne...
Main.java:3: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:3: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s577245783
p03808
C++
#include <cstdio> #include <algorithm> #include <iostream> #include <vector> #include <map> #define pb push_back using namespace std; int main(void){ long long int n,x,i,j; long long int as; int flag=0; int maxi,maxt,tmp; vector<long long int> a,b; vector<long long int> ai; map<long long int,long long in...
a.cc: In function 'int main()': a.cc:41:13: error: expected primary-expression before '<' token 41 | if(a[j]=<0){flag=1;break;} | ^
s754838870
p03808
C++
#include<iostream> using namespace std; main() { long n,a[1<<17],m=1LL<<60,M=0; cin>>n; for(int i=0;i<n;i++) { cin>>a[i]; m=min(m,a[i]); M=max(M,a[i]); } if(m*n<M) { cout<<"NO"<<endl; return 0; } for(int i=0;i<n;i++) { long x=a[(i+n)%n]-a[(i-1+n)%n]; if(x<0) { x+=n*((-x)/n)+n; } else if...
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 3 | main() | ^~~~ a.cc: In function 'int main()': a.cc:31:36: error: expected ',' or ';' before ']' token 31 | long y=a[(i+1+n)%n]]-a[(i+n)%n]]; | ^
s149023073
p03808
C++
#include <iostream> #include <vector> #include <numeric> int main() { std::ios_base::sync_with_stdio(false); std::cin.tie(nullptr); int n; std::cin >> n; std::vector<int> as(n), diffs(n + 1); for (auto& i : as) std::cin >> i; as.push_back(as.front()); std::adjacent_difference(std::begin(as), std::end(a...
a.cc: In function 'int main()': a.cc:16:8: error: 'for_each' is not a member of 'std' 16 | std::for_each(std::begin(diffs) + 1, std::end(diffs), | ^~~~~~~~
s742914835
p03808
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int n=sc.nextInt(); long sub=0l; int t1; int t2; t1=sc.nextInt(); sub-=t1; for(int i=0;i<n-1;i++){ t2=sc.nextInt(); sub+=(long)(abs(t2-t1)); t1=t2; } if(sub%((long)(2*n-2))==0){System.out.println("YES");}el...
Main.java:13: error: cannot find symbol sub+=(long)(abs(t2-t1)); ^ symbol: method abs(int) location: class Main 1 error
s532872478
p03808
C++
#include<cstdio> #include<cstdlib> #include<cmath> #include<iostream> #include<string> #include<stack> #include<queue> #include<vector> #include<tuple> #include<map> #include<set> #include<algorithm> #define rep(n) for(int i=0;i<n;i++) #define repp(j, n) for(int j=0;j<n;j++) #define reppp(i, m, n) for(int i=m;i<=n;i++...
a.cc: In function 'int main()': a.cc:52:22: error: 'm' was not declared in this scope 52 | ll d_count = m, i = 1; | ^ a.cc:66:20: error: 'i' was not declared in this scope 66 | if(i >= n){ | ^ a.cc:69:26: error: 'i' was not declared in th...
s006079884
p03808
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); long[] a = new long[n]; long max = 0; int p=0; int pNext=0; for(int i=0; i<n; i++){ a[i] = sc.nextLong(); } for(int i=0; i<n; i++){ if(a[i] > max){ max...
Main.java:53: error: illegal start of expression static boolean check(long[] a){ ^ 1 error
s989000610
p03808
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 <i...
a.cc: In function 'int main()': a.cc:38:31: error: 'INT_MAX' was not declared in this scope 38 | int min_now = INT_MAX; | ^~~~~~~ a.cc:20:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 19 | #include <...
s092074493
p03808
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int n=sc.nextInt(); long sub=0l; int t1; int t2; t1=sc.nextInt(); sub-=t1; for(int i=0;i<n-1;i++){ t2=sc.nextInt(); sub+=(long)(t2-t1); t1=t2; } if(sub%((long)(2n-2))==0){System.out.println("YES");}else{Sys...
Main.java:16: error: ')' expected if(sub%((long)(2n-2))==0){System.out.println("YES");}else{System.out.println("NO");} ^ Main.java:16: error: not a statement if(sub%((long)(2n-2))==0){System.out.println("YES");}else{System.out.println("NO");} ^ Main.java:16: error: ';' expected if(sub%(...
s823034238
p03808
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int n=sc.nextInt(); long sub=0l; int t1; int t2; t1=sc.nextInt(); sub-=t1; for(int i=0;i<n-1;i++){ t2=sc.nextInt(); sub+=(long)(t2-t1); t1=t2; } if(sub%((long)(2n-2))==0){System.out.println("YES");}else{Sys...
Main.java:16: error: ')' expected if(sub%((long)(2n-2))==0){System.out.println("YES");}else{System.out.println("NO");} ^ Main.java:16: error: not a statement if(sub%((long)(2n-2))==0){System.out.println("YES");}else{System.out.println("NO");} ^ Main.java:16: error: ';' expected if(sub%(...
s497432511
p03808
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int n=sc.nextInt(); long sub=0l; int t1; int t2; t1=sc.nextInt(); sub-=t1; for(int i=0;i<n-1;i++){ t2=sc.nextInt(); sub+=(long)(t2-t1); t1=t2; } if(sub%((long)(2n-2))==0l){System.out.println("YES");}else{Sy...
Main.java:16: error: ')' expected if(sub%((long)(2n-2))==0l){System.out.println("YES");}else{System.out.println("NO");} ^ Main.java:16: error: not a statement if(sub%((long)(2n-2))==0l){System.out.println("YES");}else{System.out.println("NO");} ^ Main.java:16: error: ';' expected if(sub...
s978830833
p03808
C++
#include <bits/stdc++.h> using namespace std; const int dx[]={1,0,-1,0,1,-1,-1,1}; const int dy[]={0,1,0,-1,1,1,-1,-1}; const int INF = 1e9; const long long LINF = 1e18; const double EPS = 1e-8; #define pb push_back #define mk make_pair #define fr first #define sc second #define ll long long #define reps(i,j,...
a.cc: In function 'int main()': a.cc:70:5: error: 'mx' was not declared in this scope; did you mean 'mn'? 70 | mx = -LINF; | ^~ | mn
s407570470
p03808
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int n=sc.nextInt(); long sub=0l; int t1; int t2; /*t1=sc.nextInt(); sub-=t1; for(int i=0;i<n-1;i++){ t2=sc.nextInt(); sub+=(long)(t2-t1); t1=t2; }*/ if(sub%(long)(2n-2)==0l){System.out.println("YES");}else{...
Main.java:16: error: ')' expected if(sub%(long)(2n-2)==0l){System.out.println("YES");}else{System.out.println("NO");} ^ Main.java:16: error: not a statement if(sub%(long)(2n-2)==0l){System.out.println("YES");}else{System.out.println("NO");} ^ Main.java:16: error: ';' expected if(sub%(long...
s255692212
p03808
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int n=sc.nextInt(); long sub=0l; int t1; int t2; t1=sc.nextInt(); sub-=t1; for(int i=0;i<n-1;i++){ t2=sc.nextInt(); sub+=(long)(t2-t1); t1=t2; } if(sub%(long)(2n-2)==0l){System.out.println("YES");}else{Syst...
Main.java:16: error: ')' expected if(sub%(long)(2n-2)==0l){System.out.println("YES");}else{System.out.println("NO");} ^ Main.java:16: error: not a statement if(sub%(long)(2n-2)==0l){System.out.println("YES");}else{System.out.println("NO");} ^ Main.java:16: error: ';' expected if(sub%(long...
s403665074
p03808
C++
#include <bits/stdc++.h> #include <sys/types.h> #include <sys/wait.h> using namespace std; using ll = long long; #define int ll #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define all(c) begin(c), end(c) #define dump(x) cerr << __LINE__ << ":\t" #x " = " << x << endl template <typename T> struct rmq { sta...
/usr/bin/ld: /tmp/ccWqHZ01.o: warning: relocation against `_ZN3rmqIxE3INFE' in read-only section `.text._ZNK3rmqIxE5queryExxxx[_ZNK3rmqIxE5queryExxxx]' /usr/bin/ld: /tmp/ccWqHZ01.o: in function `rmq<long long>::query(long long, long long, long long, long long) const': a.cc:(.text._ZNK3rmqIxE5queryExxxx[_ZNK3rmqIxE5quer...
s997646910
p03808
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; #define int ll #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define all(c) begin(c), end(c) #define dump(x) cerr << __LINE__ << ":\t" #x " = " << x << endl template <typename T> struct rmq { static const int INF = std::numeric_limits<int>:...
/usr/bin/ld: /tmp/cccdBpRP.o: warning: relocation against `_ZN3rmqIxE3INFE' in read-only section `.text._ZNK3rmqIxE5queryExxxx[_ZNK3rmqIxE5queryExxxx]' /usr/bin/ld: /tmp/cccdBpRP.o: in function `rmq<long long>::query(long long, long long, long long, long long) const': a.cc:(.text._ZNK3rmqIxE5queryExxxx[_ZNK3rmqIxE5quer...
s938725487
p03808
C++
#include <iostream> #include <iterator> #include <string> #include <vector> #include <algorithm> using namespace std; int main(){ cin.tie(0); ios::sync_with_stdio(false); int n; vector<int>a; cin >> n; for(int i = 0; i < n; ++i){ int buf; cin >> buf; a.push_back(buf); } while(true){ size_t max...
a.cc: In function 'int main()': a.cc:43:1: error: jump to label 'END' 43 | END: | ^~~ a.cc:29:38: note: from here 29 | goto END; | ^~~ a.cc:38:14: note: crosses initialization of 'bool z' 38 | bool z = false; | ...
s573222958
p03808
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int n=sc.nextInt(); long sub=0l; int t1; int t2; t1=sc.nextInt(); for(int i=0;i<n-1;i++){ t2=sc.nextInt(); sub+=(long)(t2-t1); t1=t2; } )if(sub%(long)(2n-2)==0l){System.out.println("YES");}else{System.out.p...
Main.java:15: error: illegal start of expression )if(sub%(long)(2n-2)==0l){System.out.println("YES");}else{System.out.println("NO");} ^ Main.java:15: error: ')' expected )if(sub%(long)(2n-2)==0l){System.out.println("YES");}else{System.out.println("NO");} ^ Main.java:15: error: not a statement )if(sub%(l...
s965045886
p03808
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int n=sc.nextInt(); long sub=0l; int t1; int t2; t1=sc.nextInt(); for(int i=0;i<n-1;i++){ t2=sc.nextInt(); sub+=(long)(t2-t1); t1=t2; } if(sub%(long)(2n-2)==0l){System.out.println("YES");}else{System.out.pr...
Main.java:15: error: ')' expected if(sub%(long)(2n-2)==0l){System.out.println("YES");}else{System.out.println("NO");} ^ Main.java:15: error: not a statement if(sub%(long)(2n-2)==0l){System.out.println("YES");}else{System.out.println("NO");} ^ Main.java:15: error: ';' expected if(sub%(long...
s974781131
p03808
Java
/* * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package java.util.stream; import java.nio.charset.Charset; import java.nio.file.Files; import java.nio.file.P...
Main.java:25: error: package exists in another module: java.base package java.util.stream; ^ Main.java:78: error: interface LongStream is public, should be declared in a file named LongStream.java public interface LongStream extends BaseStream<Long, LongStream> { ^ Main.java:78: error: cannot find symbol public ...
s906894853
p03808
C++
#include<iostream> #include<vector> #include<algorithm> using namespace std; bool canberemoved(vector<int>& A, int N) { int sum = 0; sum = A[0] - A[N]; for (int i =0; i < N-1) { sum += A[i+1] - A[i]; } return sum == 0; } int main() { int N; int x; vector<int> A; cin >> N; for (int i=0; i< N;...
a.cc: In function 'bool canberemoved(std::vector<int>&, int)': a.cc:11:25: error: expected ';' before ')' token 11 | for (int i =0; i < N-1) { | ^ | ;
s479585610
p03808
C++
#include <iostream> #include <string> #include <list> #include <vector> #include <algorithm> #define int long long #define MAX(a,b) ((a) > (b)) ? (a) : (b) #define MIN(a,b) ((a) < (b)) ? (a) : (b) using namespace std; signed main() { int n; cin >> n; int a[100000]; int min = INT_MAX; int min_ind = -1; for (int i...
a.cc: In function 'int main()': a.cc:16:19: error: 'INT_MAX' was not declared in this scope 16 | int min = INT_MAX; | ^~~~~~~ a.cc:6:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 5 | #include <algorithm> +++ |+#inclu...
s732285739
p03808
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int n=sc.nextInt(); long sub=0l; int t1,t2; t1=sc.nextInt(); for(int i=0;i<n-1;i++){ t2=sc.nextInt(); sub+=(long)(t2-t1); t1=t2; } if(sub%(long)(2n-2)==0l){System.out.println("YES");}else{System.out.println...
Main.java:14: error: ')' expected if(sub%(long)(2n-2)==0l){System.out.println("YES");}else{System.out.println("NO");} ^ Main.java:14: error: not a statement if(sub%(long)(2n-2)==0l){System.out.println("YES");}else{System.out.println("NO");} ^ Main.java:14: error: ';' expected if(sub%(long...
s213286321
p03808
C++
#include<bits/stdc++.h> using namespace std; const int maxn=1e5+100; int a[maxn],mx=maxn-1,s,n; int main() { cin>>n; for(int i=0;i<n;i++) cin>>a[i]; for(int i=0;i<n;i++) s+=a[i]; if(s % ((n*(n+1))/2) ) { cout<<"NO"; return 0; }
a.cc: In function 'int main()': a.cc:18:6: error: expected '}' at end of input 18 | } | ^ a.cc:8:1: note: to match this '{' 8 | { | ^
s121661462
p03808
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int n=sc.nextInt(); long sub=0l; int t1,t2; t1=sc.nextInt(); for(int i=0;i<n-1;i++){ t2=sc.nextInt(); sub+=(long)(t2-t1); t1=t2; } if(sub%(long)(2n-2)==0l){System.out.println("YES");}else{System.out.println...
Main.java:14: error: ')' expected if(sub%(long)(2n-2)==0l){System.out.println("YES");}else{System.out.println("NO");} ^ Main.java:14: error: not a statement if(sub%(long)(2n-2)==0l){System.out.println("YES");}else{System.out.println("NO");} ^ Main.java:14: error: ';' expected if(sub%(long...
s715118037
p03808
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int n=sc.nextInt(); long sub=0l; int t1,t2; t1=sc.nextInt(); for(int i=0;i<n-1;i++){ t2=sc.nextInt(); sub+=(long)(t2-t1); t1=t2; } ; if(sub/(long)(2n-2)==(long)(sub/(long)(2n-2))){ System.out.println("YES")...
Main.java:15: error: ')' expected if(sub/(long)(2n-2)==(long)(sub/(long)(2n-2))){ ^ Main.java:15: error: not a statement if(sub/(long)(2n-2)==(long)(sub/(long)(2n-2))){ ^ Main.java:15: error: ';' expected if(sub/(long)(2n-2)==(long)(sub/(long)(2n-2))){ ^ Main.java:15: er...
s854608407
p03808
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int n=sc.nextInt(); long sub=0l; int t1,t2; t1=sc.nextInt(); for(int i=0;i<n-1;i++){ t2=sc.nextInt(); sub+=(long)(t2-t1); t1=t2; } if(sub/(long)(2n-2)==(long)(sub/(long)(2n-2))){ System.out.println("YES");...
Main.java:15: error: ')' expected if(sub/(long)(2n-2)==(long)(sub/(long)(2n-2))){ ^ Main.java:15: error: not a statement if(sub/(long)(2n-2)==(long)(sub/(long)(2n-2))){ ^ Main.java:15: error: ';' expected if(sub/(long)(2n-2)==(long)(sub/(long)(2n-2))){ ^ Main.java:15: er...
s764310930
p03808
C++
#include <iostream> #include <vector> #include <numeric> int main() { std::ios_base::sync_with_stdio(false); std::cin.tie(nullptr); int n; std::cin >> n; std::vector<int> as(n), diffs(n); for (auto& i : as) std::cin >> i; std::adjacent_difference(std::begin(as), std::end(as), std::begin(diffs)); bool o...
a.cc: In function 'int main()': a.cc:18:8: error: 'for_each' is not a member of 'std' 18 | std::for_each(std::begin(diffs) + 1, std::end(diffs), | ^~~~~~~~
s709466270
p03808
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int n=sc.nextInt(); long sub=0l; int t1,t2; t1=sc.nextInt(); for(int i=0;i<n-1;i++){ t2=sc.nextInt(); sub+=(long)(t2-t1); t1=t2; } if(sub/(long)(2n-2)==(long)(sub/(long)(2n-2))){System.out.println("YES");}e...
Main.java:14: error: ')' expected if(sub/(long)(2n-2)==(long)(sub/(long)(2n-2))){System.out.println("YES");}else{System.out.println("NO");} ^ Main.java:14: error: not a statement if(sub/(long)(2n-2)==(long)(sub/(long)(2n-2))){System.out.println("YES");}else{System.out.println("NO");} ^ Ma...
s223985010
p03808
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...
a.cc: In function 'int main()': a.cc:52:20: error: expected ';' before 'return' 52 | cout<<"YES" | ^ | ; 53 | return 0; | ~~~~~~
s538112680
p03808
C++
#include <iostream> #include <unordered_map> #define REP(i, a, n) for(int i = a; i <= n; i++) using namespace std; int main(void) { const int SIZE = 100001; int N, A[SIZE]; cin >> N; REP(i, 1, N) cin >> A[i]; int mod = N * (N + 1) / 2; int sum = 0; bool uniq = true; unordered_map<int, bool> map; REP...
a.cc: In function 'int main()': a.cc:29:13: error: no matching function for call to 'max(long int&, int)' 29 | mx = max(mx, abs(A[i] - A[i + 1])); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40...
s534369024
p03808
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int n=sc.nextInt(); long sub=0; int t1,t2; t1=sc.nextInt(); for(int i=0;i<n-1;i++){ t2=sc.nextInt(); sub+=(long)(t2-t1); t1=t2; } if(sub/(long)(2n-2)==(long)(sub/(long)(2n-2))) System.out.println("YES"); el...
Main.java:14: error: ')' expected if(sub/(long)(2n-2)==(long)(sub/(long)(2n-2))) System.out.println("YES"); else System.out.println("NO"); ^ Main.java:14: error: not a statement if(sub/(long)(2n-2)==(long)(sub/(long)(2n-2))) System.out.println("YES"); else System.out.println("NO"); ^ Main...
s452130031
p03808
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int n=sc.nextInt(); long sub=0; int t1,t2; t1=sc.nextInt(); for(int i=0;i<n-1;i++){ t2=sc.nextInt(); sub+=(long)(t2-t1); t1=t2; } if(sub/(long)(2n-2)==(long)(sub/(long)(2n-2))) System.out.println("YES"); el...
Main.java:14: error: ')' expected if(sub/(long)(2n-2)==(long)(sub/(long)(2n-2))) System.out.println("YES"); else System.out.println("NO"); ^ Main.java:14: error: not a statement if(sub/(long)(2n-2)==(long)(sub/(long)(2n-2))) System.out.println("YES"); else System.out.println("NO"); ^ Main...
s698482169
p03808
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int n=sc.nextInt(); long sub=0; int t1,t2; t1=sc.nextInt(); for(int i=0;i<n-1;i++){ t2=sc.nextInt(); sub+=(long)(t2-t1); t1=t2; } if(sub/(long)(2n-2)==(long)(sub/(long)(2n-2)))System.out.println("YES"); els...
Main.java:14: error: ')' expected if(sub/(long)(2n-2)==(long)(sub/(long)(2n-2)))System.out.println("YES"); else System.out.println("NO"); ^ Main.java:14: error: not a statement if(sub/(long)(2n-2)==(long)(sub/(long)(2n-2)))System.out.println("YES"); else System.out.println("NO"); ^ Main.j...
s958143638
p03808
C++
#include <sstream> #include <cstring> #include <cstdio> int main(void) { uint64_t n; std::cin >> n; uint64_t* a = new uint64_t[n]; uint64_t sum; for (int i = 0; i < n; i++) { std::cin >> a[i]; sum += a[i]; } if (sum % (n * (n-1)) == 0) { std::cout << "YES" << std::endl; } else { std::cout << "NO" << st...
a.cc: In function 'int main()': a.cc:5:9: error: 'uint64_t' was not declared in this scope 5 | uint64_t n; | ^~~~~~~~ a.cc:4:1: note: 'uint64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>' 3 | #include <cstdio> +++ |+#include <cstdint> 4 ...
s905291127
p03808
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int mod = 1e9+7; #ifndef M_PI #define M_PI acos(-1.0) #endif int main(){ int n; cin>>n; vector<int> a(n); ll sum=0; for(int i=0; i<n; ++i){ scanf("%d", &a[i]); sum += a[i]; } if(sum % ((n+1)*n/2)){ cout<<"NO\n"; retu...
a.cc: In function 'int main()': a.cc:30:17: error: 'cnt2' was not declared in this scope; did you mean 'cn2'? 30 | cnt2 -= (diff-cnt)/n | ^~~~ | cn2 a.cc:32:19: error: 'cnt2' was not declared in this scope; did you mean 'cn2'? 32 | if(cnt != cnt2...
s171841283
p03808
C++
//I_F_A #include "bits/stdc++.h" using namespace std; bool func(long long *arr,long long n){ long long ans = 0; for(long long i=1;i<=n;i++) if(arr[i] == i) ans++; if(ans == 0) return 1; for(long long i=1;i<=n;i++) if(arr[i] != 0) return 0; return 1; } int main(){ ios_base::sync_with_stdio(false); ...
a.cc: In function 'int main()': a.cc:25:23: error: 'n' was not declared in this scope; did you mean 'yn'? 25 | long long arr[n+1]; | ^ | yn a.cc:27:24: error: 'arr' was not declared in this scope 27 | cin >> arr[i]; | ...
s295362592
p03808
Java
public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); sc.nextLine(); int[] a = new int[n]; boolean b = false; for (int i=0;i<n;i++){ a[i] = sc.nextInt(); if (a[i]>=n){ b = true; } } if (b==true){ System.out.println("YES...
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
s191784734
p03809
C++
#include<bits/stdc++.h> #define MN 100005 struct edge{ int to,nxt; }e[MN<<1]; int n,a[MN],rt,l[MN],r[MN],du[MN],h[MN]; void ins(int x,int y) { static int cnt=0; du[x]++; e[++cnt].nxt=h[x];e[cnt].to=y;h[x]=cnt; } void dfs(int x,int f) { if(x!=rt&&du[x]==1) { l[x]=r[x]=a[x]; return ; } int MI=0; for(int i=h[x...
a.cc:46:17: error: stray '\' in program 46 | dfs(rt,0\); | ^
s519965069
p03809
C++
#include <bits/stdc++.h> #define f first #define s second using namespace std; using ll = long long; using ii = pair<int, int>; ll A[100001]; vector<int> G[100001]; inline ll dfs(int u, int p) { if (G[u].size() == 1) return A[u]; ll ret = 2*A[u], m = 0; for (int v : G[u]) if (v != p) { int x = dfs...
a.cc: In function 'll dfs(int, int)': a.cc:17:16: error: no matching function for call to 'max(int&, ll&)' 17 | m = max(x, m); | ~~~^~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, fr...
s669650420
p03809
C++
#pragma 03 #pragma GCC optimization ("unroll-loops") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,sse4.2,popcnt,abm,mmx,avx,tune=native") #define _CRT_SECURE_NO_WARNINGS #include <bits/stdc++.h> #include <unordered_map> #include <unordered_set> using namespace std; #define ll long long #define eb emplace_back #define e...
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:5: /usr/include/c++/14/bits/allocator.h: In destructor 'std::_Vector_base<int, std::allocator<int> >::_Vector_...
s573073395
p03809
C++
#include<bits/stdc++.h> using namespace std; #define int long long #define fi first #define se second #define pb push_back typedef pair<int, int> ii; typedef pair<ii, int> iii; typedef pair<ii, ii> iiii; int n, A[100005]; vector<int> vc[100005]; bool ck = 1; int dfs(int u, int p){ int ans = 0; for(int i = 0; i < ...
a.cc: In function 'int main()': a.cc:47:43: error: expected primary-expression before ')' token 47 | if(A[root] * 2 == dfs(root, root))) cout << "YES"; | ^
s312308513
p03809
C++
#include<bits/stdc++.h> using namespace std; #define vi vector<int> #define vii vector<pair<int, int> > #define fi first #define se second #define int long long int a[100005]; bool ch=1; vi G[100005]; void dfs(int u, int p) { if(G[u].size()==1) return; int sum=-a[u]; for(auto v: G[u]) { if(v==p) continue; dfs(v...
a.cc: In function 'int main()': a.cc:38:42: error: no match for 'operator<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [3]') 38 | if(a[1]-a[2]) return cout<"NO", 0; | ~~~~^~~~~ | ...
s007229386
p03809
C++
#include<bits/stdc++.h> using namespace std; #define vi vector<int> #define vii vector<pair<int, int> > #define fi first #define se second #define int long long int a[100005]; bool ch=1; vi G[100005]; void dfs(int u, int p) { if(G[u].size()==1) return; int sum=-a[u]; for(auto v: G[u]) { if(v==p) continue; dfs(v...
a.cc: In function 'int main()': a.cc:38:42: error: no match for 'operator<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [3]') 38 | if(a[1]-a[2]) return cout<"NO", 0; | ~~~~^~~~~ | ...
s389849875
p03809
C++
#include <iostream> #include <vector> #include <string> #include <algorithm> #include <set> #include <cassert> using namespace std; std::vector<int64_t> numbers; vector<vector<int>> graph; std::vector<bool> used; std::pair<bool, int64_t> Dfs(int v) { used[v] = true; std::vector<int64_t> elements; int64_t...
a.cc: In function 'int main()': a.cc:74:16: error: no match for 'operator==' (operand types are 'std::pair<bool, long int>' and 'std::pair<bool, long long int>') 74 | if (Dfs(v) == make_pair(true, 0ll)) { | ~~~~~~ ^~ ~~~~~~~~~~~~~~~~~~~~ | | | | | ...
s965756659
p03809
C++
#include <bits/stdc++.h> using namespace std; vector<int> parent(vector<vector<int>> &E, int r){ int N = E.size(); vector<int> p(N, -1); queue<int> Q; Q.push(r); while (!Q.empty()){ int v = Q.front(); Q.pop(); for (int w : E[v]){ if (p[w] == -1){ p[w] = v; Q.push(w); } } } return p; } vecto...
a.cc: In function 'void dfs(std::vector<long long int>&, std::vector<std::vector<int> >&, int, bool&)': a.cc:42:27: error: no matching function for call to 'max(long long int, int)' 42 | long long pair_cnt = max(sum - A[v], 0); | ~~~^~~~~~~~~~~~~~~ In file included from /usr/include/c+...
s083257471
p03809
C++
#include <iostream> #include <vector> #define int long long #define MAXN 200000 int a[MAXN]; int n; std::vector<int> Adj[MAXN]; int dfs(int u, int p = -1) { int ret = a[u]; if(Adj[u].size() == 1 && p != -1) return ret; int sum = 0; int max = 0; for(int j : Adj[u]) { if(j == p) continue; ...
a.cc: In function 'long long int dfs(long long int, long long int)': a.cc:34:20: error: no matching function for call to 'max(long long int, int)' 34 | if(ret < std::max(2*max - sum, 0)) | ~~~~~~~~^~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/incl...
s187636491
p03809
C++
#include <bits/stdc++.h> template <typename T> inline void rd(T& x) { int si = 1; char c = getchar(); x = 0; while(!isdigit(c)) si = c == '-' ? -1 : si, c = getchar(); while(isdigit(c)) x = x * 10 + c - 48, c = getchar(); x *= si; } template <typename T, typename... Args> inline void rd(T& x, Args&... args) { rd(x...
a.cc: In function 'void Dfs(int)': a.cc:32:52: error: 'u' was not declared in this scope 32 | if(f[cur] < 0 || f[cur] > a[cur] || mx > a[u]) { | ^
s994152848
p03809
C++
#include <bits/stdc++.h> template <typename T> inline void rd(T& x) { int si = 1; char c = getchar(); x = 0; while(!isdigit(c)) si = c == '-' ? -1 : si, c = getchar(); while(isdigit(c)) x = x * 10 + c - 48, c = getchar(); x *= si; } template <typename T, typename... Args> inline void rd(T& x, Args&... args) { rd(x...
a.cc: In function 'void Dfs(int)': a.cc:31:47: error: 'u' was not declared in this scope 31 | if(f[cur] < 0 || f[cur] > a[cur] || f[u] > s) { | ^
s762012297
p03809
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i,n) for(int i=0; i<(n); i++) int n, a[100005], v, u, t; bool out; vector<int> G[100005]; ll dfs(int u, int p){ if(G[u].size() == 1) return a[u]; ll mxv = 0, ac = 0, ret; for(int nx: G[u]) if(nx != p){ ll tmp = dfs(nx,u); ac += tmp; ...
a.cc: In function 'int main()': a.cc:32:17: error: return-statement with no value, in function returning 'int' [-fpermissive] 32 | return; | ^~~~~~
s861136168
p03809
C++
#include <bits/stdc++.h> // clang-format off #define pb push_back #define eb emplace_back #define fi first #define se second #define each(x,v) for(auto& x : v) #define all(v) (v).begin(),(v).end() #define sz(v) ((int)(v).size()) #define ini(...) int __VA_ARGS__; in(__VA_ARGS__) #define inl(...) long long __VA_ARGS__; ...
a.cc: In lambda function: a.cc:149:19: error: no match for 'operator-' (operand types are 'll' {aka 'long long int'} and 'vl' {aka 'std::vector<long long int, std::allocator<long long int> >'}) 149 | ll self = l - A; | ~ ^ ~ | | | | | vl {aka...
s932474991
p03809
C++
#include <bits/stdc++.h> using namespace std; static vector<long long> adj[100005]; static long long arr[100005]; long long dfs(long long u, long long p){ if(adj[u].size() == 1) return arr[u]; long long rope = 0; long long maxChildRope = 0; for(long long v : adj[u]){ if(v == p) continue; long long childRope =...
a.cc: In function 'long long int dfs(long long int, long long int)': a.cc:19:53: error: 'childRope' was not declared in this scope; did you mean 'maxChildRope'? 19 | long long maxConnect = min(rope / 2, rope - childRope); | ^~~~~~~~~ | ...
s075302532
p03809
C++
#include<bits/stdc++.h> using namespace std; #define LL long long #define ULL unsigned long long #define mp make_pair #define pb push_back #define pii pair<int,int> #define pll pair<LL,LL> #define x first #define y second #define pi acos(-1) #define sqr(x) ((x)*(x)) #define pdd pair<double,double> #define MEMS(x) memse...
a.cc: In function 'void dfs(int, int)': a.cc:59:17: error: no match for 'operator[]' (operand types are 'long long int [100005]' and 'std::pair<long long int, long long int>') 59 | tot+=Min[it]; | ^
s557877813
p03809
C++
#include<bits/stdc++.h> using namespace std; #define LL long long #define ULL unsigned long long #define mp make_pair #define pb push_back #define pii pair<int,int> #define pll pair<LL,LL> #define x first #define y second #define pi acos(-1) #define sqr(x) ((x)*(x)) #define pdd pair<double,double> #define MEMS(x) memse...
a.cc: In function 'void dfs(int, int)': a.cc:52:24: error: 'i' was not declared in this scope 52 | Min[x]=max(Max[i]&1,2*val[x]-Max[x]); | ^
s577609766
p03809
C++
#include <assert.h> #include <limits.h> #include <cmath> #include <algorithm> #include <bitset> #include <cctype> #include <complex> #include <deque> #include <iomanip> #include <iostream> #include <unordered_map> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #incl...
a.cc: In function 'int main()': a.cc:93:14: error: 'coout' is not a member of 'std'; did you mean 'cout'? 93 | std::coout<<"NO"; | ^~~~~ | cout
s743177370
p03809
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; int n; vector<vector<int>> v(100010); ll a[100010]; bool used[100010]; bool pos = true; ll dfs(int p){ used[p] = true; bool leaf = true; ll sum = 0, MAX = 0; for(auto i:v[p]){ if(!used[i]){ ll t = dfs(i); ...
a.cc: In function 'll dfs(int)': a.cc:34:9: error: expected ',' or ';' before 'return' 34 | return ret; | ^~~~~~
s495022903
p03809
C++
#include <cstdio> #include <cstring> #include <algorithm> #include <vector> #include <queue> #include <iostream> #include <set> using namespace std; #define LL long long #define pb push_back #define mp make_pair #define fi first #define se second int n; LL a[100005]; LL Have[100005]; vector < int > E[100005]; void ye...
a.cc: In function 'int main()': a.cc:119:17: error: 'assert' was not declared in this scope 119 | assert(1==2); | ^~~~~~ a.cc:8:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>' 7 | #include <set> +++ |+#include <cas...
s660202470
p03809
C++
#include<iostream> #include<algorithm> #include<vector> #include<string> #include<set> #include<queue> #include<stack> #include<functional> using namespace std; int p = 1000000007; #define int __int128 #define vel vector<long long> #define vvel vector<vel> #define rep(i,n) for(long long i=0;i<n;i++) #define sor(v) sort...
a.cc: In function 'int main()': a.cc:68:20: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and '__int128') 68 | int n; cin >> n; | ~~~ ^~ ~ | | | | | __int128 | s...
s670727528
p03809
C++
#include<cstdio> #include<cstdlib> #include<iostream> #include<vector> #include<queue> #include<bitset> #include<string> #include<stack> #include<set> #include<unordered_set> #include<map> #include<unordered_map> #include<cstring> #include<complex> #include<cmath> #include<iomanip> #include<numeric> #include<algorithm>...
a.cc: In function 'int main()': a.cc:65:34: error: 'a' was not declared in this scope 65 | fup(i,1,n,1)scanf("%lld",a+i); | ^ a.cc:70:17: error: 'v' was not declared in this scope 70 | v[x].pb(y); | ^ a.cc:75:20: error: 'v' was n...
s351721839
p03809
C++
#include <algorithm> #include <bitset> #include <complex> #include <deque> #include <exception> #include <fstream> #include <functional> #include <iomanip> #include <ios> #include <iosfwd> #include <iostream> #include <istream> #include <iterator> #include <limits> #include <list> #include <locale> #include <map> #incl...
a.cc:108:21: error: stray '#' in program 108 | Solve().solve();#include <algorithm> | ^ a.cc: In function 'int main()': a.cc:108:22: error: 'include' was not declared in this scope 108 | Solve().solve();#include <algorithm> | ^~~~~~~ a.cc:108:31: error: '...
s974061135
p03809
C++
#include <bits/stdc++.h> #define int long long #define rep(i, n) for (int i = 0; i < (int) (n); i++) using namespace std; signed main() { int N; cin >> N; vector<int> A(N); rep(i, N) cin >> A[i]; vector<vector<int>> g(N, vector<int>()); rep(i, N-1) { int a, b; cin >> a >> b; a--;b--; g[a]....
a.cc: In instantiation of 'main()::<lambda(auto:28&&, long long int, long long int, long long int&)> [with auto:28 = main()::<lambda(auto:28&&, long long int, long long int, long long int&)>&]': a.cc:39:10: required from here 39 | if (dfs(dfs, -1, 0, res)) cout << "YES" << endl; | ~~~^~~~~~~~~~~~~~~~...
s495493984
p03809
C++
#include <bits/stdc++.h> #define int long long #define rep(i, n) for (int i = 0; i < (int) (n); i++) using namespace std; signed main() { int N; cin >> N; vector<int> A(N); rep(i, N) cin >> A[i]; vector<vector<int>> g(N, vector<int>()); rep(i, N-1) { int a, b; cin >> a >> b; a--;b--; g[a]....
a.cc: In instantiation of 'main()::<lambda(auto:28, long long int, long long int, long long int&)> [with auto:28 = main()::<lambda(auto:28, long long int, long long int, long long int&)>]': a.cc:39:10: required from here 39 | if (dfs(dfs, -1, 0, res)) cout << "YES" << endl; | ~~~^~~~~~~~~~~~~~~~~ a.c...
s548349855
p03809
C++
#include<stdio.h> #include<bits/locale_facets.h> #include<memory.h> #include<math.h> using namespace std; const int nn=100001; int A[nn],degree[nn],time[nn]; long long input(); void output(long long value); template<int nodes>struct phylogenetic_tree { int root,total,t,memory,other,father[nodes],son[nodes],depth[nodes...
a.cc:7:29: error: 'int time [100001]' redeclared as different kind of entity 7 | int A[nn],degree[nn],time[nn]; | ^ In file included from /usr/include/pthread.h:23, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35, from /usr/include...
s923807312
p03809
C++
#include <bits/stdc++.h> using namespace std; int n; long long a[100010]; bool visited[100010] = {}; vector<int> graph[100010]; long long dfs(int idx){ visited[idx] = true; priority_queue<long long> que; long long line = 0; for(int i = 0;i < graph[idx].size();i++){ if(!visited[graph[idx][i]...
a.cc:96:7: error: stray '@' in program 96 | someha@DESKTOP-UG27 | ^ a.cc:96:1: error: 'someha' does not name a type 96 | someha@DESKTOP-UG27 | ^~~~~~
s716266631
p03809
C++
#include <bits/stdc++.h> using namespace std; int n; long long a[100010]; bool visited[100010] = {}; vector<int> graph[100010]; long long dfs(int idx){ visited[idx] = true; priority_queue<long long> que; long long line = 0; for(int i = 0;i < graph[idx].size();i++){ if(!visited[graph[idx][i]...
a.cc: In function 'int main()': a.cc:63:20: error: expected initializer before '==' token 63 | int ta[100010] == {}; | ^~ a.cc:69:9: error: 'ta' was not declared in this scope; did you mean 't'? 69 | ta[root] = 1; | ^~ | t
s575405173
p03809
C++
#include<bits/stdc++.h> using namespace std; #define int long long myMake(int cur, vector<vector<int> > &adj, vector<vector<int> > &G, vector<bool> &used){ used[cur] = true; for(auto nxt : adj[cur]){ if(used[nxt]) continue; G[cur].push_back(nxt); myMake(nxt, adj, G, used); } } int...
a.cc:5:1: error: ISO C++ forbids declaration of 'myMake' with no type [-fpermissive] 5 | myMake(int cur, vector<vector<int> > &adj, vector<vector<int> > &G, vector<bool> &used){ | ^~~~~~ a.cc: In function 'int myMake(long long int, std::vector<std::vector<long long int> >&, std::vector<std::vector<long long i...
s819004052
p03809
C++
#include<bits/stdc++.h> using namespace std; #define int long long make(int cur, vector<vector<int> > &adj, vector<vector<int> > &G, vector<bool> &used){ used[cur] = true; for(auto nxt : adj[cur]){ if(used[nxt]) continue; G[cur].push_back(nxt); make(nxt, adj, G, used); } } int dfs...
a.cc:5:1: error: ISO C++ forbids declaration of 'make' with no type [-fpermissive] 5 | make(int cur, vector<vector<int> > &adj, vector<vector<int> > &G, vector<bool> &used){ | ^~~~ a.cc: In function 'int make(long long int, std::vector<std::vector<long long int> >&, std::vector<std::vector<long long int> >&, ...
s621085730
p03809
C++
#include<iostream> #include<string> #include<cmath> #include<queue> #include<map> #include<set> #include<list> #include<iomanip> #include<vector> #include<random> #include<functional> #include<algorithm> #include<stack> #include<cstdio> #include<bitset> #include<unordered_map> #include <climits> #include<fstream> using...
In file included from /usr/include/c++/14/string:49, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/includ...
s493256158
p03809
C++
#include<iostream> #include<cstdio> using namespace std; #define MAX 100100 #define ll long long inline int read() { int x=0;bool t=false;char ch=getchar(); while((ch<'0'||ch>'9')&&ch!='-')ch=getchar(); if(ch=='-')t=true,ch=getchar(); while(ch<='9'&&ch>='0')x=x*10+ch-48,ch=getchar(); return t?-x:x; ...
a.cc: In function 'int main()': a.cc:49:5: error: 'sreturn' was not declared in this scope 49 | sreturn 0; | ^~~~~~~
s046049602
p03809
C++
#include<iostream> #include<cstdio> using namespace std; #define MAX 100100 #define ll long long inline int read() { int x=0;bool t=false;char ch=getchar(); while((ch<'0'||ch>'9')&&ch!='-')ch=getchar(); if(ch=='-')t=true,ch=getchar(); while(ch<='9'&&ch>='0')x=x*10+ch-48,ch=getchar(); return t?-x:x; ...
a.cc: In function 'void dfs(int, int)': a.cc:28:24: error: no matching function for call to 'min(int&, long long int)' 28 | ll mn=min(sum/2,min(mx,sum-mx)); | ~~~^~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classe...
s002645499
p03809
C++
#include <iostream> #include <algorithm> #include <string> #include <vector> #include <queue> #include <cmath> typedef long long ll; typedef unsigned int uint; using namespace std; int N, A[100005]; vector <int> G[100005]; bool visited[100005]; int dfs(int x) { visited[x] = true; if (G[x].size() == 1) { ...
a.cc: In function 'int main()': a.cc:66:16: error: a function-definition is not allowed here before '{' token 66 | int dfs(int x) { | ^ a.cc:85:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 85 | int main() { | ^~ a.cc:85:9: note: rem...
s106663085
p03809
C++
#include<bits/stdc++.h> #define X first #define Y second #define pb emplace_back #define FOR(i,a,b) for(int (i)=(a);i<(b);++(i)) #define EFOR(i,a,b) for(int (i)=(a);i<=(b);++(i)) #define rep(X,Y) for (int (X) = 0;(X) < (Y);++(X)) #define reps(X,S,Y) for (int (X) = S;(X) < (Y);++(X)) #define rrep(X,Y) for (int (X) = (Y)...
a.cc: In function 'std::pair<long long int, long long int> dfs(int, int)': a.cc:54:7: error: 'maxbmaxa' was not declared in this scope; did you mean 'maxamaxa'? 54 | maxbmaxa = max(maxbmaxa, x); | ^~~~~~~~ | maxamaxa a.cc:72:9: error: 'maxbmaxa' was not declared in this scope; did you m...
s826045538
p03809
C++
#include<bits/stdc++.h> #define X first #define Y second #define pb emplace_back #define FOR(i,a,b) for(int (i)=(a);i<(b);++(i)) #define EFOR(i,a,b) for(int (i)=(a);i<=(b);++(i)) #define rep(X,Y) for (int (X) = 0;(X) < (Y);++(X)) #define reps(X,S,Y) for (int (X) = S;(X) < (Y);++(X)) #define rrep(X,Y) for (int (X) = (Y)...
a.cc: In function 'int main()': a.cc:93:7: error: 'cnt' was not declared in this scope; did you mean 'int'? 93 | cnt++; | ^~~ | int
s410249238
p03809
C++
#include <bits/stdc++.h> using namespace std; typedef long long LL; LL read(){ LL x=0,f=1; char ch=getchar(); while (!isdigit(ch)&&ch!='-') ch=getchar(); if (ch=='-') f=-1,ch=getchar(); while (isdigit(ch)) x=(x<<1)+(x<<3)+(ch^48),ch=getchar(); return x*f; } const int N=100005; int n,A[N],in[N]; vector <int>...
a.cc: In function 'int main()': a.cc:55:28: error: no match for 'operator=' (operand types are 'std::vector<int>' and 'int') 55 | rt=i; | ^ In file included from /usr/include/c++/14/vector:72, from /usr/include/c++/14/functional:64, ...
s823454651
p03809
C++
#include <bits/stdc++.h> using namespace std; #define fi first #define se second #define pb push_back #define mp make_pair #define int long long typedef pair<int, int> ii; const int N = 1e5 + 5; int n, a[N], x[N], y[N], root; vector<int> graph[N]; void dfs(int u,int p){ if(graph[u].size() == 1){ y[u] ...
a.cc: In function 'int main()': a.cc:65:25: error: no matching function for call to 'max(long long int&, std::vector<long long int>::size_type)' 65 | mx = max(mx, graph[i].size()); | ~~~^~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, ...
s162229525
p03809
C++
/*+lmake * STD = c++14 * DEFINE += WAAUTOMATON */ #include <bits/stdc++.h> using namespace std; using LL=long long; using ULL=unsigned long long; #ifdef WAAUTOMATON #define debug(args...) \ { ...
a.cc:30:6: warning: attribute ignored [-Wattributes] 30 | void [[noreturn]] out(int t=0) | ^ a.cc:30:6: note: an attribute that appertains to a type-specifier is ignored a.cc: In function 'LL dp(int, int)': a.cc:58:23: error: no matching function for call to 'max(int&, LL&)' 58 | mx=max...
s000343878
p03809
C++
#include<bits/stdc++.h> using namespace std; #define all(vec) vec.begin(),vec.end() typedef long long int ll; typedef pair<ll,ll> P; const ll MOD=1000000007; const ll INF=1000000010; const ll LINF=4000000000000000010LL; const int MAX=310; const double EPS=1e-3; int dx[4]={0,1,0,1}; int dy[4]={0,0,1,1}; vector<int> G[10...
a.cc: In function 'int main()': a.cc:43:27: error: expected primary-expression before ']' token 43 | cin>>a[i];] | ^