submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s694254874 | p03809 | C++ | #include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
const int M = N * 2;
int fir[N] , ne[M] , to[M] , cnt , dp[N] , n , m , x , y , du[N] , A[N] , fa[N];
void add(int x , int y) {
ne[++ cnt] = fir[x];
fir[x] = cnt;
to[cnt] = y;
++ du[x];
}
void link(int x , int y) {
add(x , y);
add(y ... | a.cc: In function 'void calc(int, int)':
a.cc:48:19: error: 'cxt' was not declared in this scope; did you mean 'cnt'?
48 | dp[x] = now + cxt.back() + A[x] * 2; A[fa[x]] -= A[x];
| ^~~
| cnt
|
s942060224 | p03809 | C++ | Home
Problem
Status
Contest
User
Group
Forum
Article
Logout
Nurdaulet
Begin: 2018-05-19 11:00 BST
Day5
End: 2018-05-19 16:00 BST
05:00:00
Ended
Overview
Problem
Status
Rank (05:00:00)
Discuss
A
B
C
D
E
F
G
H
I
J
K
Time limit2000 msMemory limit262144 kB
C - Cleaning AtCoder - 2304
All Copyright Reserved ©... | a.cc:36:24: error: extended character © is not valid in an identifier
36 | All Copyright Reserved ©2018 Xu Han
| ^
a.cc:38:1: error: extended character × is not valid in an identifier
38 | ×
| ^
a.cc:1:2: error: 'Home' does not name a type
1 | Home
| ^~~~
In file inc... |
s579486270 | p03809 | C++ | Home
Problem
Status
Contest
User
Group
Forum
Article
Logout
Nurdaulet
Begin: 2018-05-19 11:00 BST
Day5
End: 2018-05-19 16:00 BST
05:00:00
Ended
Overview
Problem
Status
Rank (05:00:00)
Discuss
A
B
C
D
E
F
G
H
I
J
K
Time limit2000 msMemory limit262144 kB
C - Cleaning AtCoder - 2304
All Copyright Reserved ©... | a.cc:36:24: error: extended character © is not valid in an identifier
36 | All Copyright Reserved ©2018 Xu Han
| ^
a.cc:38:1: error: extended character × is not valid in an identifier
38 | ×
| ^
a.cc:1:2: error: 'Home' does not name a type
1 | Home
| ^~~~
In file inc... |
s150623169 | p03809 | C++ | #include <bits/stdc++.h>
using namespace std;
#define INF_LL (int64)1e18
#define INF (int32)1e9
#define REP(i, n) for(int i = 0;i < (n);i++)
#define FOR(i, a, b) for(int i = (a);i < (b);i++)
#define all(x) x.begin(),x.end()
#define fs first
#define sc second
using int32 = int_fast32_t;
using uint32 = uint_fast32_t;
u... | a.cc: In function 'int64 dfs(int32, int32)':
a.cc:44:29: error: no match for 'operator-' (operand types are 'int64' {aka 'long int'} and 'std::vector<long int>')
44 | if((sum-x)/2 <= (sum-c) && (sum-x)/2 <= sum/2) return x;
| ~~~^~
| | |
|... |
s435962941 | p03809 | C++ | #include <bits/stdc++.h>
using namespace std;
#define INF_LL (int64)1e18
#define INF (int32)1e9
#define REP(i, n) for(int i = 0;i < (n);i++)
#define FOR(i, a, b) for(int i = (a);i < (b);i++)
#define all(x) x.begin(),x.end()
#define fs first
#define sc second
using int32 = int_fast32_t;
using uint32 = uint_fast32_t;
u... | a.cc: In function 'int64 dfs(int32, int32)':
a.cc:36:17: error: 'sum' was not declared in this scope
36 | sum += c[c.size()-1];
| ^~~
a.cc:40:26: error: 'sum' was not declared in this scope
40 | int32 x = 2*A[v]-sum;
| ^~~
|
s355789043 | p03809 | C++ | #include <bits/stdc++.h>
using namespace std;
const int maxn=1e5+10,mod=1e9+7;
int n,m,k,t,a[maxn],rt;
vector<int>e[maxn];
bool flag=true;
long long dfs(int x,int y=0)
{
if(!flag)return -1;
if(e[x].size()==1)return a[x];
long long sum=0;
vector<long long>t... | a.cc: In function 'long long int dfs(int, int)':
a.cc:21:17: error: return-statement with no value, in function returning 'long long int' [-fpermissive]
21 | return;
| ^~~~~~
|
s624548153 | p03809 | C++ | #include <bits/stdc++.h>
using namespace std;
const int maxn=1e5+10,mod=1e9+7;
int n,m,k,t,a[maxn],rt;
vector<int>e[maxn];
bool flag=true;
long long dfs(int x,int y=0)
{
if(!flag)return -1;
if(e[x].size()==1)return a[x];
long long sum=0;
vector<long long>tmp;
for(int i=0;i<e[x].size();i++)
{
... | a.cc: In function 'long long int dfs(int, int)':
a.cc:21:13: error: return-statement with no value, in function returning 'long long int' [-fpermissive]
21 | return;
| ^~~~~~
|
s248596433 | p03809 | C++ | #include <bits/stdc++.h>
#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++)
#define all(c) c.begin(), c.end()
#define rall(c) c.rbegin(), c.rend()
#define debug(x) cerr << #x << ": " << x << endl;
using namespace std;
typedef long long ll;
typedef ... | a.cc: In function 'int dfs(int)':
a.cc:29:16: error: no match for 'operator[]' (operand types are 'std::vector<long long int>' and '<unresolved overloaded function type>')
29 | if(used[next]) continue;
| ^
In file included from /usr/include/c++/14/vector:66,
from /usr/in... |
s606736690 | p03809 | C++ | /*
cat <<EOF >mistaken-paste
*/
#pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
#define _USE_MATH_DEFINES
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <math.h>
#include <time.h>
#define BIG 2000000007
#define VERYBIG 200000000000007LL
#de... | a.cc:5:32: warning: option '-Wincompatible-pointer-types' is valid for C/ObjC but not for C++ [-Wpragmas]
5 | #pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc: In function 'ull solve()':
a.cc:241:9: error: jump to label 'success... |
s604351005 | p03809 | C++ | =#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <queue>
using namespace std;
int n;
typedef long long i64;
vector<int> edges[100010];
i64 a[100010];
void input()
{
cin >> n;
for(int i = 1;i <= n;i++)
{
cin >> a[i];
}
for(int i = 0;i < n - 1;i++)
{
int s,t;
cin >... | a.cc:1:2: error: stray '#' in program
1 | =#include <iostream>
| ^
a.cc:1:1: error: expected unqualified-id before '=' token
1 | =#include <iostream>
| ^
In file included from /usr/include/c++/14/bits/char_traits.h:42,
from /usr/include/c++/14/string:42,
from a.cc:... |
s772297668 | p03809 | 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 'long long int dfs(int, int)':
a.cc:49:23: error: 'c' was not declared in this scope
49 | long long rem=c[a];
| ^
a.cc: In function 'int main()':
a.cc:71:20: error: 'c' was not declared in this scope
71 | if(c[0]==c[1])cout<<"YES"<<endl;
... |
s668273125 | p03809 | C++ | #include<set>
#include<map>
#include<list>
#include<queue>
#include<stack>
#include<string>
#include<math.h>
#include<time.h>
#include<vector>
#include<bitset>
#include<memory>
#include<utility>
#include<fstream>
#include<stdio.h>
#include<sstream>
#include<iostream>
#include<stdlib.h>
#include<string.h>
#include<algor... | a.cc: In function 'void dfs(int)':
a.cc:58:13: error: 'def' was not declared in this scope; did you mean 'deg'?
58 | if (def[t->y]>1) val[x]-=val[t->y]*2;
| ^~~
| deg
|
s832494194 | p03809 | C++ | #define rep(...) _overload(__VA_ARGS__,_range,_rep,)(__VA_ARGS__)
#define _rrep(i,n) _rrange(i,n,0)
#define _rrange(i,a,b) for(int i=(int)(a)-1;i>=(int)(b);--i)
#define rrep(...) _overload(__VA_ARGS__,_rrange,_rrep,)(__VA_ARGS__)
#define _all(arg) begin(arg),end(arg)
#define uniq(arg) sort(_all(arg)),(arg).erase(un... | a.cc:26:10: error: 'vector' does not name a type
26 | using vi=vector<int>;
| ^~~~~~
a.cc:27:11: error: 'vector' does not name a type
27 | using vll=vector<ll>;
| ^~~~~~
a.cc:30:19: error: 'acos' was not declared in this scope
30 | const double PI = acos(-1.0);
| ... |
s487997306 | p03809 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef double db;
typedef long long ll;
#define w1 first
#define w2 second
#define ls (x<<1)
#define rs (x<<1|1)
#define pb push_back
#define mid ((l+r)>>1)
#define SZ(x) ((x).size())
#define All(x) (x).begin(),(x).end()
#define rep(i,a,b) for(ll (i)=(a);(i)<=(b);(i)++)
#de... | a.cc:44:1: error: '::main' must return 'int'
44 | ll main(){
| ^~
a.cc: In function 'll dfs(ll, ll)':
a.cc:43:1: warning: control reaches end of non-void function [-Wreturn-type]
43 | }
| ^
|
s234936524 | p03809 | C++ | #include <iostream>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < int(n); ++i)
typedef long long ll;
typedef vector<int> VI;
typedef pair<ll, ll> PL;
const int N = 123456;
ll a[N];
VI edges[N];
ll dfs(int v, int par) {
vector<ll> pool;
ll tot = 0;
rep(i, edges[v].size()) {
... | a.cc: In function 'll dfs(int, int)':
a.cc:45:3: error: 'sort' was not declared in this scope; did you mean 'short'?
45 | sort(pool.rbegin(), pool.rend());
| ^~~~
| short
|
s751175928 | p03809 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int TAM = 100004;
vector <ll> adj [TAM];
ll val [TAM], pt [TAM];
int n;
void form( int x ){
int nxt;
for( int i = 0 ; i < adj[x].size() ; i ++ ){
nxt = adj[x][i];
if( nxt == pt[x] ) continue;
pt[nxt] = x;
... | a.cc: In function 'll find_up(int)':
a.cc:39:17: error: expected ';' before 'if'
39 | sum += v
| ^
| ;
40 | if( v > cap ) pos = 0;
| ~~
|
s125696606 | p03809 | C | #include<vector>
#include<stdio.h>
#include<algorithm>
using namespace std;
int n;
vector<int> e[111111];
long long int A[111111];
bool dfs(int x,int fat){
if(e[x].size() == 1){
return true;
}
long long int sum = 0, mx = 0;
for(vector<int>::iterator it = e[x].begin(); it!=e[x].end(); it++){
int y = *it;
if(y ... | main.c:1:9: fatal error: vector: No such file or directory
1 | #include<vector>
| ^~~~~~~~
compilation terminated.
|
s476138634 | p03809 | C++ | #include <cstdio>
#include <cstring>
#include <vector>
#include <queue>
#include <string>
#include <algorithm>
#include <iostream>
#include <string>
#include <map>
#include <set>
#include <functional>
#include <iostream>
#define MOD 1000000007LL
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
int n... | a.cc: In function 'int main()':
a.cc:125:26: error: 'v' was not declared in this scope
125 | if(!flag[v]){
| ^
|
s111042192 | p03809 | C++ | #include <cstdio>
#include <cstring>
#include <vector>
#include <queue>
#include <string>
#include <algorithm>
#include <iostream>
#include <string>
#include <map>
#include <set>
#include <functional>
#include <iostream>
#define MOD 1000000007LL
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
int n... | a.cc: In function 'int main()':
a.cc:103:53: error: reference to 'next' is ambiguous
103 | if(!next[G[v][i]] && cnt[G[v][i]]+1==G[G[v][i]].size()){
| ^~~~
In file included from /usr/include/c++/14/bits/stl_algoba... |
s758900307 | p03809 | C++ |
#if 1
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <queue>
#include <stack>
#include <array>
#include <deque>
#include <algorithm>
#include <utility>
#include <cstdint>
#include <functional>
#include... | a.cc:28:35: error: 'MAX_N' was not declared in this scope
28 | std::unordered_set<int64_t> graph[MAX_N];//木
| ^~~~~
a.cc: In function 'int main()':
a.cc:47:17: error: 'graph' was not declared in this scope; did you mean 'isgraph'?
47 | graph[a].insert(b);
... |
s995326369 | p03809 | C++ | #include <cstdio>
#include <iostream>
#include <cmath>
#include <cstring>
#include <sstream>
#include <algorithm>
#include <cstdlib>
#include <map>
#include <queue>
#include <utility>
#include <vector>
#include <set>
#include <memory.h>
#include <iomanip>
#include <bitset>
#include <list>
#include <stack>
using namesp... | a.cc: In function 'int cansolve(int)':
a.cc:37:17: error: 'else' without a previous 'if'
37 | else ans -= tmp;
| ^~~~
|
s642924996 | p03809 | C++ | #include <iostream>
#include <cstring>
#include <vector>
#include <cstdio>
using namespace std;
const int NICO = 1000000 + 10;
typedef long long LL;
int a[NICO], b[NICO], deg[NICO], root;
int n, vis[NICO], ok = 1;
LL val[NICO];
vector<int> vec[NICO];
void dfs(int x)
{
vis[x] = 1, LL sum = 0;
if(deg[x] == 1) ret... | a.cc: In function 'void dfs(int)':
a.cc:14:20: error: expected primary-expression before 'sum'
14 | vis[x] = 1, LL sum = 0;
| ^~~
a.cc:21:9: error: 'sum' was not declared in this scope
21 | sum += val[cur];
| ^~~
a.cc:23:27: error: 'sum' was not declared in this ... |
s590772621 | p03809 | C++ | #include <cstdio>
#include <algorithm>
#include <cmath>
#include <queue>
#include <vector>
#include <map>
#include <set>
using namespace std;
typedef pair<int , int> P2;
typedef pair<pair<int , int> , int> P3;
typedef pair<pair<int , int> , pair<int , int> > P4;
#define Fst first
#define Snd second
#define PB(a) push... | a.cc:24:9: error: '__int64' does not name a type; did you mean '__int64_t'?
24 | typedef __int64 LL;
| ^~~~~~~
| __int64_t
a.cc:31:1: error: 'LL' does not name a type
31 | LL dfs(int p , int q){
| ^~
a.cc: In function 'int main()':
a.cc:62:9: error: 'dfs' was not declared in this... |
s819087990 | p03809 | C++ | #include <iostream>
#include <vector>
#define rep(i, n) for(int i = 0; i < n; i++)
using namespace std;
typedef struct {
int a;
vector<int> ns;
} node;
int n;
vector<node> nodes;
bool dfs(int cur, int parent)
{
node n = nodes[cur];
int sum = 0;
rep(i, n.ns.size()) {
int next = n.ns[i];
if(next !=... | a.cc: In function 'bool dfs(int, int)':
a.cc:34:40: error: expected ';' before '}' token
34 | return (2 * n.a - sum == 2 * t.a)
| ^
| ;
35 | }
| ~
|
s913648365 | p03809 | C++ | #include <bits/stdc++.h>
using namespace std;
const int N = 111111;
vector<int> a[N];
long long cnt[N];
int dfs(int v, int p = -1) {
if (a[v].size() == 1) {
return cnt[v];
}
long long mx = 0;
long long sum = 0;
for (int x : a[v]) { if (x == p) continue; int mn = dfs(x, v); mx = max(mx, mn); sum += mn; }
int num_sm =... | a.cc: In function 'int dfs(int, int)':
a.cc:15:72: error: no matching function for call to 'max(long long int&, int&)'
15 | for (int x : a[v]) { if (x == p) continue; int mn = dfs(x, v); mx = max(mx, mn); sum += mn; }
| ~~~^~~~~~~~
In file inc... |
s945198033 | p03809 | 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 'll dfs(int, int)':
a.cc:27:16: error: 'C' was not declared in this scope
27 | FORR(r,C) tot+=r;
| ^
a.cc:8:33: note: in definition of macro 'FORR'
8 | #define FORR(x,arr) for(auto& x:arr)
| ^~~
|
s580691801 | p03809 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
#define sz 1000000
vector <int> a[sz];
int n, v, u, d[sz];
int dfs(int v, int pr = -1) {
vector <int> g;
for (int i = 0; i < a[v].size(); i++) {
if (a[v][i] == pr) continue;
g.pb(dfs(a[v][i], v));
}
if (a[v].size() == 1) {
return d[v];
... | a.cc: In function 'int dfs(int, int)':
a.cc:16:19: error: 'class std::vector<int>' has no member named 'pb'
16 | g.pb(dfs(a[v][i], v));
| ^~
|
s457173695 | p03809 | C++ | #include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <iomanip>
#include <unordered_map>
#include <map>
#include <set>
using namespace std;
vector<vector<int>> G,GG;
vector<bool> seen;
vector<long long> a;
vector<long long> b;
void dfs(int u){
seen[u]=true;
for(int... | a.cc: In function 'long long int dfs2(int)':
a.cc:47:13: error: no matching function for call to 'max(int, long long int)'
47 | di=max(1,di/2);
| ~~~^~~~~~~~
In file included from /usr/include/c++/14/bits/specfun.h:43,
from /usr/include/c++/14/cmath:3906,
from a... |
s511504906 | p03809 | C++ | #include<cstdio>
#include<iostream>
#include<vector>
#include<set>
#include<queue>
#include<algorithm>
#include<utility>
using namespace std;
int a[100009],b[100009],st[100009],isl[100009],par[100009],cnt[100009],used[100009];
vector<int> con[100009];
queue<int> check;
int main(){
int n;
cin>>n;
for(int i=1;i<=n;i++... | a.cc: In function 'int main()':
a.cc:55:17: error: jump to label 'nex'
55 | nex:sum=0;
| ^~~
a.cc:31:33: note: from here
31 | if(used[f])goto nex;
| ^~~
a.cc:34:33: note: crosses initialization of 'int cn'
34 | ... |
s712929060 | p03809 | C++ | #include <bits/stdc++.h>
#define int long long
using namespace std;
int N, A[100000];
vector< int > g[100000];
int rec(int idx, int par = -1)
{
if(g[idx].size() == 1) return (A[idx]);
priority_queue< int > que;
que.push(0);
int sum = 0;
for(auto &to : g[idx]) {
if(to == par) continue;
auto get =... | a.cc: In function 'int main()':
a.cc:51:9: error: expected ',' before ';' token
51 | root = i;
| ^
| ,
a.cc:51:9: error: expected identifier before ';' token
a.cc:51:9: error: expected ']' before ';' token
51 | root = i;
| ^
| ]
a.cc: In lambda function:
a.c... |
s882314704 | p03809 | C++ | #include<iostream>
#include<cstring>
#include<cstdio>
#include<algorithm>
typedef long long ll;
using namespace std;
int getint(){
int f=1,x=0;
char ch=getchar();
while('0'>ch||ch>'9'){if(ch=='-')f=-1;ch=getchar();}
while('0'<=ch&&ch<='9'){x=x*10+ch-'0';ch=getchar();}
return f*x;
}
#define N 212345
struct edge {... | a.cc: In function 'void solve()':
a.cc:52:52: error: 'y' was not declared in this scope
52 | f[x]=2*a[x]-s; if(f[x]<0||f[x]>sum[y]) flag=false;
| ^
|
s779189657 | p03809 | C++ | //In the Name of God
//Ya Ali
#include<bits/stdc++.h>
#define int long long
#define pb push_back
#define ld long double
#define err(A) cout<<#A<<" = "<<(A)<<endl
using namespace std;
const int maxn=131072;
int n;
vector<int> g[maxn];
int a[maxn];
int root;
int s;
int dfs(int v,int par=-1)
{
int s=0;
int... | a.cc: In function 'long long int dfs(long long int, long long int)':
a.cc:37:9: error: 'tmp' was not declared in this scope; did you mean 'tm'?
37 | tmp=dfs(u,v);
| ^~~
| tm
|
s152084930 | p03809 | 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),
| ^~~~~~~~
|
s087975096 | p03810 | C++ | //In the name of GOD
//SMani24
#include <bits/stdc++.h>
#define int long long
using namespace std;
const int N = 1e5 + 10;
int n, a[N];
void read_input() {
cin >> n;
for (int i = 0; i < n; i++)
cin >> a[i];
}
void write_output(int cnt) {
int sum = 0;
int tf = 0, f = -1;
for (int i = 0; i < n; i++) {
sum += a... | a.cc: In function 'void write_output(long long int)':
a.cc:47:16: error: expected ';' before '}' token
47 | exit(0)
| ^
| ;
48 | }
| ~
|
s513419105 | p03810 | C++ | //BE NAM NAMI HAGH
#include<bits/stdc++.h>
using namespace std;
#define X first
#define Y second
const int MAXN = 1e5 + 5;
int seg[MAXN << 2];
int a[MAXN];
long long s;
int n, gc;
void input();
void build(int, int, int);
void get(int, int, int, int, int);
void solve();
int main() {
ios:: sync_with_stdio(0), cin.ti... | a.cc: In function 'void solve()':
a.cc:70:44: error: 'sz' was not declared in this scope; did you mean 's'?
70 | if ((a[i] % gc == 1) && (((sz - 1) / gc) & 1)) {
| ^~
| s
|
s282371784 | p03810 | C++ | //besmellah
#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 58;
int a[maxn];
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int n;
cin >> n;
long long sum = 0;
for (int i = 0; i < n; i++) {
cin >> a[i];
sum += a[i];
}
if (n % 2 == 0) {
if (sum % 2) cout << "First";
else cou... | a.cc:47:11: error: redefinition of 'const int maxn'
47 | const int maxn = 1e5 + 58;
| ^~~~
a.cc:5:11: note: 'const int maxn' previously defined here
5 | const int maxn = 1e5 + 58;
| ^~~~
a.cc:48:5: error: redefinition of 'int a [100058]'
48 | int a[maxn];
| ^
a.cc:6:5... |
s745584787 | p03810 | C++ | #include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <set>
#include <map>
#include <queue>
#include <random>
#include <chrono>
#include <tuple>
#include <random>
using namespace std;
typedef long long ll;
typedef long double ld;
#define fastInp cin.tie(0); cout.tie(0); ios_base::sync_... | /usr/bin/ld: /tmp/cc0WhQPK.o: in function `main':
a.cc:(.text+0x133): undefined reference to `debug()'
collect2: error: ld returned 1 exit status
|
s210647239 | p03810 | C++ | #include <iostream>
#include <map>
#include <set>
#include <cmath>
#include <algorithm>
#include <vector>
#include <string>
#include <fstream>
#include <bitset>
#include <queue>
#include <stack>
#include <deque>
#include <complex>
#include <iomanip>
#include <stdio.h>
#include <string.h>
#include <random>
#include <fun... | a.cc: In function 'void solve(long long int)':
a.cc:117:13: error: '__gcd' was not declared in this scope
117 | g = __gcd(g, a[i]);
| ^~~~~
a.cc:117:13: note: suggested alternatives:
In file included from /usr/include/c++/14/algorithm:61,
from a.cc:5:
/usr/include/c++/14/bit... |
s877586099 | p03810 | C++ | #include <iostream>
#include <map>
#include <set>
#include <cmath>
#include <algorithm>
#include <vector>
#include <string>
#include <fstream>
#include <bitset>
#include <queue>
#include <stack>
#include <deque>
#include <complex>
#include <iomanip>
#include <stdio.h>
#include <string.h>
#include <random>
#include <fun... | a.cc: In function 'void solve(long long int)':
a.cc:114:31: error: return-statement with a value, in function returning 'void' [-fpermissive]
114 | if (a[i] == 0) return 1;
| ^
|
s252347207 | p03810 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef vector <ll> vi;
typedef pair <ll, ll> pi;
typedef vector <pi> vpi;
typedef long double ld;
#define pb emplace_back
#define mp make_pair
#define lb lower_bound
#define ub upper_bound
#define ALL(x) x.begin(),x.end()
#define SZ(x) (ll) x.size()
#... | a.cc:4:17: error: 'll' was not declared in this scope; did you mean 'LL'?
4 | typedef vector <ll> vi;
| ^~
| LL
a.cc:4:19: error: template argument 1 is invalid
4 | typedef vector <ll> vi;
| ^
a.cc:4:19: error: template argument 2 is invalid
a.... |
s508785710 | p03810 | C++ | #include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <cstring>
using namespace std;
#define x first
#define y second
#define mp make_pair
#define pb push_back
typedef long long ll;
const ll MOD = 1e9+7;
int n;
int a[100005];
bool check() {
bool ok = false;
int br = 0;
int pos =... | a.cc: In function 'int main()':
a.cc:50:9: error: 'book' was not declared in this scope; did you mean 'bool'?
50 | book ok = true;
| ^~~~
| bool
a.cc:53:29: error: 'ok' was not declared in this scope
53 | if (a[i]%2) ok = false;
| ... |
s001012712 | p03810 | C++ | #include <iostream>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <algorithm>
#define int long long
#define rep(x, a, b) for(int x = (a); x <= (b); ++x)
#define rop(x, a, b) for(int x = (a); x < (b); ++x)
#define per(x, a, b) for(int x = (a); x >= (b); --x)
using namespace std;
typedef long long LL;
ty... | cc1plus: error: '::main' must return 'int'
|
s412359742 | p03810 | Java | public class Suger extends Condiments {
Suger(Bevarage bvr)
{
this.bvr=bvr;
des=" , Suger";
}
int cost() {
return bvr.cost()+5;
}
} | Main.java:1: error: class Suger is public, should be declared in a file named Suger.java
public class Suger extends Condiments {
^
Main.java:1: error: cannot find symbol
public class Suger extends Condiments {
^
symbol: class Condiments
Main.java:3: error: cannot find symbol
Suge... |
s558302317 | p03810 | Java | public class Mocha extends Condiments{
Mocha(Bevarage bvr)
{
this.bvr=bvr;
des=" , Mocha";
}
int cost() {
return bvr.cost()+10;
}
}
| Main.java:1: error: class Mocha is public, should be declared in a file named Mocha.java
public class Mocha extends Condiments{
^
Main.java:1: error: cannot find symbol
public class Mocha extends Condiments{
^
symbol: class Condiments
Main.java:3: error: cannot find symbol
Mocha(... |
s696937937 | p03810 | Java | public class DarkRoast extends Bevarage{
DarkRoast()
{
des="Finest Dark roast";
}
@Override
int cost() {
return 30;
//throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
} | Main.java:11: error: reached end of file while parsing
}
^
1 error
|
s402221667 | p03810 | Java | abstract public class Condiments extends Bevarage {
Bevarage bvr;
String getDES()
{
return bvr.getDES()+des;
}
}
| Main.java:1: error: class Condiments is public, should be declared in a file named Condiments.java
abstract public class Condiments extends Bevarage {
^
Main.java:1: error: cannot find symbol
abstract public class Condiments extends Bevarage {
^
symbol: class B... |
s595370032 | p03810 | Java | abstract public class Bevarage {
String des;
String getDES()
{
return des;
}
abstract int cost();
} | Main.java:1: error: class Bevarage is public, should be declared in a file named Bevarage.java
abstract public class Bevarage {
^
1 error
|
s359737388 | p03810 | Java | public class Main {
public static void main(String[] args) {
Bevarage bvr= new DarkRoast();
bvr= new Mocha(bvr);
bvr= new Mocha(bvr);
bvr= new Suger(bvr);
System.out.println("total cost : "+bvr.cost());
}
} | Main.java:5: error: cannot find symbol
Bevarage bvr= new DarkRoast();
^
symbol: class Bevarage
location: class Main
Main.java:5: error: cannot find symbol
Bevarage bvr= new DarkRoast();
^
symbol: class DarkRoast
location: class Main
Main.java:6: error: canno... |
s467571269 | p03810 | C++ | #include<bits/stdc++.h>
#define rep(i, n) for(int i = 1, i##_end_ = (n); i <= i##_end_; ++i)
using namespace std;
typedef pair<int, int> pii;
typedef long long ll;
const int maxn = 300300;
int n, a[maxn];
bool eval() {
int odd = 0, even = 0, p = -1;
for(int i = 1; i <= n; ++i) {
if(a[i] & 1) {
... | a.cc:18:6: error: stray '`' in program
18 | }`
| ^
|
s571452744 | p03810 | C | #include <bits/stdc++.h>
using namespace std;
using lint = long long int;
using pint = pair<int, int>;
using plint = pair<lint, lint>;
struct fast_ios { fast_ios(){ cin.tie(0); ios::sync_with_stdio(false); cout << fixed << setprecision(20); }; } fast_ios_;
#define FOR(i, begin, end) for(int i=(begin),i##_end_=(end);i<i... | main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
1 | #include <bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s116874868 | p03810 | C | #include <bits/stdc++.h>
using namespace std;
using lint = long long int;
using pint = pair<int, int>;
using plint = pair<lint, lint>;
struct fast_ios { fast_ios(){ cin.tie(0); ios::sync_with_stdio(false); cout << fixed << setprecision(20); }; } fast_ios_;
#define FOR(i, begin, end) for(int i=(begin),i##_end_=(end);i<i... | main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
1 | #include <bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s239790900 | p03810 | C++ | #include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
const int maxn = 1e3 + 20;
string A , s[maxn];
int N , cost[maxn] , dp[maxn][maxn] , sum[maxn][maxn][11];
bool cmp(string &a , string &b)
{
if(a.size() != b.size())
return a.size() < b.size();
else
return a < b;
}
int sol... | a.cc: In function 'int solve(int, int, int)':
a.cc:37:1: warning: no return statement in function returning non-void [-Wreturn-type]
37 | }
| ^
a.cc: In function 'int main()':
a.cc:89:17: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int')
89... |
s369712646 | p03810 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define sqr(x) ((x)*(x))
#define mp make_pair
#define uint unsigned
#define 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)... | a.cc: In function 'bool solve()':
a.cc:43:55: error: 'sss' was not declared in this scope
43 | for(int i=1;i<=n;i++)if(a[i]%2==0)sum++; else sss++;
| ^~~
a.cc:44:36: error: 'sss' was not declared in this scope
44 | if(sum&1)return 1; else... |
s273068877 | p03810 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define sqr(x) ((x)*(x))
#define mp make_pair
#define uint unsigned
#define 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)... | a.cc: In function 'int main()':
a.cc:55:22: error: 'i' was not declared in this scope
55 | if(a[i]==1)puts("Second"); else puts("First"); return 0;
| ^
|
s174898651 | p03810 | C++ | #include<cstdio>
#include<cmath>
#include<cstring>
#include<algorithm>
#define LL long long
#define fo(i,j,k) for(int i=j;i<=k;i++)
#define fd(i,j,k) for(int i=j;i>=k;i--)
#define fr(i,j) for(int i=beg[j];i;i=nex[i])
using namespace std;
int const mn=1e5+3;
int n,a[mn];
int dfs(){
int tmp=0,tm2=0,tm3=0;
fo(i,1,n)tmp=... | a.cc: In function 'int main()':
a.cc:21:12: error: expected primary-expression before '=' token
21 | int main(){=
| ^
|
s873212609 | p03810 | C++ | #include<bits\stdc++.h>
#define fo(i,j,l) for(int i=j;i<=l;++i)
#define fd(i,j,l) for(int i=j;i>=l;--i)
using namespace std;
typedef long long ll;
const ll N=1e5+7;
inline int read()
{
int o=0; char ch=' ';
for(;ch<'0'||ch>'9';ch=getchar());
for(;ch>='0'&&ch<='9';ch=getchar())o=o*10+ch-48;
return o;
}
int main()... | a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory
1 | #include<bits\stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s258333382 | p03810 | C++ | #include <iostream>
#include <cstdio>
#include <cstring>
#include <cassert>
#include <cctype>
using namespace std;
typedef long long lint;
#define cout cerr
#define ni (next_num<int>())
template<class T>inline T next_num(){
T i=0;char c;
while(!isdigit(c=getchar())&&c!='-');
bool flag=c=='-';
flag?c=getchar():0;
w... | a.cc: In function 'bool Main()':
a.cc:31:25: error: expected primary-expression before '=' token
31 | hasone||=a[i]==1;
| ^
|
s098586545 | p03810 | C++ | #include<iostream>
#include<fstream>
#include<sstream>
#include<algorithm>
#include<cstdio>
#include<cctype>
#include<cassert>
#include<cmath>
#include<ctime>
#include<cstdlib>
#include<cstring>
#include<string>
#include<queue>
#include<vector>
#include<map>
#include<set>
#include<bitset>
#include<stack>
#include<ioman... | a.cc:77:7: error: extended character “ is not valid in an identifier
77 | scanf(“%d”,&n);
| ^
a.cc:77:9: error: extended character ” is not valid in an identifier
77 | scanf(“%d”,&n);
| ^
a.cc:79:18: error: extended character “ is not valid in an identifier
79 | rep(i,1,n) scanf(“%d”,... |
s932877725 | p03810 | C++ | First consider an easier version of problem: we don’t divide the integers by their GCD. In
this case, obviously the answer only depends on the parity of the total number of stones. The
original problem also has something to do with parities.Suppose that in your turn all integers are odd. If all integers are one, you ca... | a.cc:1:49: error: extended character ’ is not valid in an identifier
1 | First consider an easier version of problem: we don’t divide the integers by their GCD. In
| ^
a.cc:3:134: error: extended character ’ is not valid in an identifier
3 | original problem... |
s677767586 | p03810 | C++ | #include <bits/stdc++.h>
using namespace std;
const int MAXN = 200010;
int a[MAXN], n;
inline bool solve()
{
int cnt0 = 0, cnt1 = 0, d = 0;
for( int i = 1 ; i <= n ; i++ )
if( a[ i ] & 1 ) cnt1++;
else cnt0++;
if( cnt0 & 1 ) return true;
if( cnt1 ^ 1 ) return false;
for( int i = 1 ; i <= n ; i++ )
if( a[ ... | a.cc:31:38: error: extended character “ is not valid in an identifier
31 | if( solve() ) return printf( “First\n" ), 0;
| ^
a.cc:31:44: error: stray '\' in program
31 | if( solve() ) return printf( “First\n" ), 0;
| ... |
s432951693 | p03810 | C++ | #include<iostream>
#include<fstream>
#include<algorithm>
#include<vector>
#include<queue>
#include<map>
#include<set>
#include<string>
#include<cmath>
#include<cstdio>
#include<cassert>
using namespace std;
#define REP(i,m,n) for(int i=(m); i<(int)(n); i++)
#define RREP(i,m,n) for(int i=(int)(n-1); i>=m; i--)
#define ... | a.cc: In function 'bool can_win()':
a.cc:28:74: error: 'ostream_iterator' was not declared in this scope
28 | #define darr_range(a, f, t) if (opt_debug) { copy( (a) + (f), (a) + (t), ostream_iterator<int>(cerr, " ") ); cerr << endl; }
| ^... |
s196780757 | p03810 | C++ | 463456 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 463456
| ^~~~~~
|
s612663174 | p03810 | C++ | #include <bits/stdc++.h>
#define long long LL
using namespace std;
int n,tot;
LL a[100010];
LL gcd(LL x,LL y)
{
if (x%y == 0) return y;
else return gcd(y,x%y);
}
void init()
{
for (int i = 0;i < n;i++) if (a[i]&1) a[i]--;
LL g = a[0];
for (int i = 1;i < n;i++) g = gcd(g,a[i]);
for (int i = 0;i <... | a.cc:5:1: error: 'LL' does not name a type
5 | LL a[100010];
| ^~
a.cc:6:1: error: 'LL' does not name a type
6 | LL gcd(LL x,LL y)
| ^~
a.cc: In function 'void init()':
a.cc:13:35: error: 'a' was not declared in this scope
13 | for (int i = 0;i < n;i++) if (a[i]&1) a[i]--;
| ... |
s598419836 | p03810 | C++ | #include <bits/stdc++.h>
#define long long LL
using namespace std;
int n,tot;
LL a[100010];
LL gcd(LL x,LL y)
{
if (x%y == 0) return y;
else return gcd(y,x%y);
}
void init()
{
for (int i = 0;i < n;i++) if (a[i]&1) a[i]--;
LL g = a[0];
for (int i = 1;i < n;i++) g = gcd(g,a[i]);
for (int i = 0;i <... | a.cc:5:1: error: 'LL' does not name a type
5 | LL a[100010];
| ^~
a.cc:6:1: error: 'LL' does not name a type
6 | LL gcd(LL x,LL y)
| ^~
a.cc: In function 'void init()':
a.cc:13:35: error: 'a' was not declared in this scope
13 | for (int i = 0;i < n;i++) if (a[i]&1) a[i]--;
| ... |
s223747067 | p03810 | C++ | #include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<stack>
#include<queue>
using namespace std;
typedef long long ll;
typedef vector<ll> vl;
typedef vector<int > vi;
ll gcd(ll a, ll b) {
if (a > b)swap(a, b);
if (b%a == 0)return a;
return gcd(b, b%a);
}
vl gcd(vl A) {
ll g = A[0];
for... | a.cc:27:25: error: 'const' qualifiers cannot be applied to 'vl&' {aka 'std::vector<long long int>&'}
27 | int numofeven(vl& const A) {
| ^
|
s607507483 | p03810 | 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 cal(std::vector<int>)':
a.cc:42:12: error: 'n' was not declared in this scope
42 | if(n==1) return 1;
| ^
|
s429835169 | p03810 | C++ | #include <bits/stdc++.h>
#define ll long long
using namespace std;
#define N 100010
int n;
int a[N];
void end(int x)
{
if (x == 1) puts ("First");
else puts ("Second");
exit(0);
}
int gcd(int x, int y)
{
while(x)
{
int z = x;
x = y % x;
y = z;
}
return y;
}
int main()
{
cin >> n;
for (int i = 0; i < n... | a.cc: In function 'int main()':
a.cc:40:49: error: expected ';' before '}' token
40 | if (a[i] == 1) F1 ++;111
| ^
| ;
41 | }
| ~ ... |
s635925929 | p03810 | C++ | #include <bits/stdc++.h>
#define ll long long
using namespace std;
#define N 100010
int n;
int a[N];
void end(int x)
{
if (x == 1) puts ("First");
else puts ("Second");
exit(0);
}
int gcd(int x, int y)
{
while(x)
{
int z = x;
x = y % x;
y = z;
}
return y;
}
int main()
{
cin >> n;
for (int i = 0; i < n... | a.cc: In function 'int main()':
a.cc:40:49: error: expected ';' before '}' token
40 | if (a[i] == 1) F1 ++;111
| ^
| ;
41 | }
| ~ ... |
s356208642 | p03810 | Java | import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.InputMismatchException;
public class Main {
InputStream is;
int __t__ = 1;
int __f__ = 0;
... | Main.java:35: error: bad operand type int for unary operator '!'
else if (!notOne || !odd)
^
1 error
|
s967799085 | p03810 | C++ | #include <bits/stdc++.h>
using namespace std;
int Cint[7] = { 4, 6, 8, 10, 100, 1000, 10000 };
bool end = false;
bool y[7]; //4,6,8,10,100,1000,100000
//0,1,2,3, 4, 5, 6
bool now = true; // chokudai_s
int ch(int n) {
for (int i = 6; i >= 0; i--) {
if (n == 1) {
end = true;
return -1;
}
end = true;
i... | a.cc: In function 'int ch(int)':
a.cc:12:25: error: reference to 'end' is ambiguous
12 | end = true;
| ^~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166,
from a.cc:1:
/usr/include/c++/14/valarray:1265:5: note: candi... |
s355721049 | p03810 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> PII;
const int MM = 1e9 + 7;
const double eps = 1e-8;
const int MAXN = 2e6 + 10;
int n, m;
void prework(){
}
void read(){
}
void solve(int casi){
cin>>n;
if (n % 2 == 0){
int ans = 0;
for(int i = 1; i <= n; i++){
... | a.cc: In function 'void solve(int)':
a.cc:45:33: error: no match for 'operator==' (operand types are 'std::vector<int>' and 'int')
45 | if (umi == 1 && umi[0] > 1)
| ~~~ ^~ ~
| | |
| | ... |
s295586446 | p03810 | 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:23:25: error: 'P' was not declared in this scope
23 | if(N==1) return P("Second\n");
| ^
|
s059211517 | p03810 | C++ | #include<bits/stdc++.h>
using namespace std;
#define int long long
typedef pair<int,int>pint;
typedef vector<int>vint;
typedef vector<pint>vpint;
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define all(v) (v).begin(),(v).end()
#define rep(i,n) for(int i=0;i<(n);i++)
#define reps(i,f,n... | a.cc: In function 'bool check(vint)':
a.cc:27:11: error: 'N' was not declared in this scope
27 | rep(i,N)if(A[i]%2)t=i;
| ^
a.cc:14:33: note: in definition of macro 'rep'
14 | #define rep(i,n) for(int i=0;i<(n);i++)
| ^
a.cc:31:19: error: 'N' was not decla... |
s126477549 | p03810 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
long long n,i,sum=0,k=0;
int a[100005];
while(cin>>n){
k++;
for(i=0;i<n;i++)
{
cin>>a[i];
sum=sum+a[i];
}
sum=sum-2-n+1;
if(k<36){
if(sum%2==0)
{
cout<<"First"<<endl;
}
else
... | a.cc: In function 'int main()':
a.cc:30:2: error: expected '}' at end of input
30 | }
| ^
a.cc:4:1: note: to match this '{'
4 | {
| ^
|
s326466264 | p03810 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int simulator(vector<long>& cur) {
long sum = 0;
for(int i = 0; i < cur.size(); i++) {
sum += cur[i] - 1;
}
bool win = (sum & 1);
int odds = 0;
for(int i = 0; i < cur.size(); i++) {
if(cur[i] == 1) return win;
if(cu... | a.cc: In function 'int main()':
a.cc:47:45: error: invalid operands of types 'const char [7]' and '<unresolved overloaded function type>' to binary 'operator<<'
47 | cout << simulator(a) ? "First" : "Second" << endl;
| ~~~~~~~~~^~~~~~~
a.cc: In function 'int simulator(std::... |
s197532859 | p03811 | C++ | #include <bits/stdc++.h>
#define pii pair <int, int>
using namespace std;
const int N = 2005, M = 4005;
int n, a[N], edge[N][N], ans[N], root[N], sz[N], b[N], ed[N], fa[N];
bool vis[N];
int gcd(int x, int y) {
if (y == 0) return x;
return gcd(y, x % y);
}
void dfs(int x) {
vis[x] = 1;
sz[x] = 1;
... | a.cc: In function 'int main()':
a.cc:77:20: error: 'szof' was not declared in this scope; did you mean 'sz'?
77 | memset(vis, 0, szof(vis));
| ^~~~
| sz
|
s111935628 | p03811 | C++ | #include <bits/stdc++.h>
#define pii pair <int, int>
using namespace std;
const int N = 2005, M = 4005;
int n, a[N], edge[N][N], ans[N], root[N], size[N], b[N], ed[N], fa[N];
bool vis[N];
int gcd(int x, int y) {
if (y == 0) return x;
return gcd(y, x % y);
}
void dfs(int x) {
vis[x] = 1;
size[x] = 1... | a.cc: In function 'void dfs(int)':
a.cc:18:5: error: reference to 'size' is ambiguous
18 | size[x] = 1;
| ^~~~
In file included from /usr/include/c++/14/string:53,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
... |
s664893540 | p03811 | C++ | #include <iostream>
#include <algorithm>
#include <cmath>
#include <stdio.h>
#include <stdlib.h>
#include <vector>
#include <map>
#include <self/operator>
#include <queue>
#include <set>
#include <string>
#include <string.h>
#include <stack>
#include <assert.h>
#include <bitset>
#define Endl endl
#define mp make_pair
#... | a.cc:8:10: fatal error: self/operator: No such file or directory
8 | #include <self/operator>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s351882515 | p03811 | C++ | #include <bits/stdc++.h>
using namespace std;
const int jt=998244353;
#define loop(i,n) for(int i=0;i<(n);i++)
#define pool(i,n) for(int i=(n)-1;i>=0;i--)
#define cont(i,n) for(int i=1;i<=(n);i++)
#define tnoc(i,n) for(int i=(n);i>=1;i--)
#define circ(i,a,b) for(int i=(a);i<=(b);i++)
#define cric(i,a,b) for(int i=(b);i... | a.cc: In member function 'modint<jt>& modint<jt>::operator+=(const modint<jt>&) const':
a.cc:168:66: error: assignment of member 'modint<jt>::x' in read-only object
168 | modint<jt> inline &operator+=(const modint<jt> &m)const{x+=m.x;if(x>=jt)x-=jt;return *this;}
| ... |
s926445692 | p03811 | C++ | #include <bits/stdc++.h>
using namespace std;
const int jt=998244353;
#define loop(i,n) for(int i=0;i<(n);i++)
#define pool(i,n) for(int i=(n)-1;i>=0;i--)
#define cont(i,n) for(int i=1;i<=(n);i++)
#define tnoc(i,n) for(int i=(n);i>=1;i--)
#define circ(i,a,b) for(int i=(a);i<=(b);i++)
#define cric(i,a,b) for(int i=(b);i... | a.cc: In member function 'modint<jt>& modint<jt>::operator+=(const modint<jt>&) const':
a.cc:168:66: error: assignment of member 'modint<jt>::x' in read-only object
168 | modint<jt> inline &operator+=(const modint<jt> &m)const{x+=m.x;if(x>=jt)x-=jt;return *this;}
| ... |
s031336922 | p03811 | C++ | #pragma GCC optimize ("Ofast")
#include <iostream>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <set>
#include <deque>
#define rep(x, a, b) for(int x = (a); x <= (b); ++x)
#define rop(x, a, b) for(int x = (a); x < (b); ++x)
#define per(x, a, b) for(int x = (a); x >= (b); --x)
usi... | a.cc: In member function 'void graph::dfs(int)':
a.cc:30:25: error: 'vis' was not declared in this scope; did you mean 'vs'?
30 | vis[nw][*IT] = 1;
| ^~~
| vs
a.cc:39:36: error: 'vis' was not declared in this scope; did you mean 'vs'... |
s490704757 | p03811 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
#define N 2010
#define chmax(a,b) a=max(a,b);
vector<ll> g[N];
ll a[N],n;
vector<ll> t[N];
ll nz[N];
ll gcd(ll a,ll b){
if(a<b)swap(a,b);
if(b==0)return a;
a%=b;
return gcd(a,b);
}
void Solve(){
for(int i=0;i<n;i... | a.cc: In function 'void Solve()':
a.cc:26:24: error: no matching function for call to 'std::priority_queue<long long int>::push(std::pair<long long int, int>)'
26 | if(nz[i]==0)Q.push(make_pair(a[i],i));
| ~~~~~~^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/queue:66,
... |
s369580291 | p03811 | C++ | #pragma GCC optimize(2)
// Happy TLE and WA every day!
// by: zxb the vegetable chicken
#include<bits/stdc++.h>
#define mp make_pair
#define rep(i,n) for(int i = 0; i < n; i++)
#define foreach(i,c) for(VAR(i, (c).begin()); i != (c).end(); ++i)
#define BINF 0x7fffffff
#define INF 0x3f3f3f3f
#define LINF 32233... | a.cc:34:15: error: 'int index [2020]' redeclared as different kind of entity
34 | int index[2020];
| ^
In file included from /usr/include/string.h:462,
from /usr/include/c++/14/cstring:43,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
... |
s554509442 | p03811 | C++ | #include<bits/stdc++.h>
using namespace std;
const int N=2005;
vector<int> ad[N],ap[N];
priority_queue<int> pq;
int a[N],ans[N],vis[N],tail[N];
int n,v,cnt;
void dfs(int x){
vis[x]=1;
for(int i=0;i<ad[x].size();i++){
v=ad[x][i];
if(vis[v])continue;
tail[v]=1;ap[x].push_back(v);
dfs(v);
}
}
int main(){
cin>n... | a.cc: In function 'int main()':
a.cc:18:12: error: no match for 'operator>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int')
18 | cin>n;
| ~~~^~
| | |
| | int
| std::istream {aka std::basic_istream<char>}
a.cc:18:12: not... |
s829294708 | p03811 | C++ | #include <cstdio>
#include <iostream>
#include <algorithm>
#include <string>
#include <cstring>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <cmath>
#include <iomanip>
#include <cassert>
#include <bitset>
using namespace std;
typedef pair<int, int> P;
#define rep(i, n) for (int i=0; i<(n);... | /tmp/ccpmts8z.o: in function `dfs(int)':
a.cc:(.text+0x1c9): relocation truncated to fit: R_X86_64_PC32 against symbol `dead' defined in .bss section in /tmp/ccpmts8z.o
a.cc:(.text+0x208): relocation truncated to fit: R_X86_64_PC32 against symbol `used' defined in .bss section in /tmp/ccpmts8z.o
a.cc:(.text+0x21a): rel... |
s851587009 | p03811 | C++ | #include<iostream>
#include<stdio.h>
#include<cstring>
#include<algorithm>
#include<strak>
#define fo(i,a,b) for(i=a;i<=b;i++)
#define ll long long
using namespace std;
int n,a[2005],tot,du[2005],h[2005],to[4000005],nex[4000005];
bool bhz[2005][2005],pd[2005];
int gcd(int a,int b)
{
return b?gcd(b,a%b):a;
}
struct ... | a.cc:5:9: fatal error: strak: No such file or directory
5 | #include<strak>
| ^~~~~~~
compilation terminated.
|
s624971310 | p03811 | C++ | #include<iostream>
#include<stdio.h>
#include<cstring>
#include<algorithm>
#include<queue>
#define fo(i,a,b) for(i=a;i<=b;i++)
#define ll long long
using namespace std;
int n,a[2005],tot,du[2005],h[2005],to[4000005],nex[4000005];
bool bhz[2005][2005],pd[2005];
int gcd(int a,int b)
{
return b?gcd(b,a%b):a;
}
struct ... | a.cc: In function 'int main()':
a.cc:63:9: error: expected ',' or ';' before 'for'
63 | for(;k;k=nex[k])
| ^~~
a.cc:63:24: error: expected ';' before ')' token
63 | for(;k;k=nex[k])
| ^
| ;
a.cc:74:16: error: 't' was not decla... |
s992709442 | p03811 | C++ | #include<iostream>
#include<stdio.h>
#include<cstring>
#include<algorithm>
#include<queue>
#define fo(i,a,b) for(i=a;i<=b;i++)
#define ll long long
using namespace std;
int n,a[2005],tot,du[2005],h[2005],to[4000005],nex[4000005];
bool bhz[2005][2005],pd[2005];
int gcd(int a,int b)
{
return b?gcd(b,a%b):a;
}
struct ... | a.cc: In function 'int main()':
a.cc:74:13: error: 'd' was not declared in this scope
74 | d[go[t]]--;
| ^
a.cc:74:15: error: 'go' was not declared in this scope; did you mean 'to'?
74 | d[go[t]]--;
| ^~
| to
a.cc:76:17: error: 'zlt... |
s070115768 | p03811 | C++ | #include<bits/stdc++.h>
using namespace std;
const int N=2005;
struct edge{
int to,next;
}e[N*N/2];
int gcd(int x,int y){
return y?gcd(y,x%y):x;
}
int head[N],tot;
int deg[N],a[N],n;
bool vis[N];
void add(int x,int y){
e[++tot]=(edge){y,head[x]};
head[x]=tot; deg[y]++;
}
void dfs(int x){
vis[x]=1;
for (int i=1;i... | a.cc: In function 'int main()':
a.cc:36:61: error: 'struct edge' has no member named 'ext'; did you mean 'next'?
36 | for (int k=head[j];k;k=e[k].ext)
| ^~~
| ... |
s522860761 | p03811 | C++ | #include<iostream>
#include<string>
#include<algorithm>
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<cmath>
#include<queue>
using namespace std;
typedef long long s64;
const int ONE = 2005;
const int MOD = 1e9 + 7;
int get()
{
int res = 1, Q = 1; char c;
while( (c = getchar()) < 48 || c > 57)
... | a.cc: In function 'void Add(int, int)':
a.cc:42:29: error: reference to 'next' is ambiguous
42 | Input[v]++, next[++tot] = first[u], first[u] = tot, go[tot] = v;
| ^~~~
In file included from /usr/include/c++/14/string:47,
from /usr/include/c++/14/bit... |
s934798785 | p03811 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
typedef pair<int,P> P1;
typedef pair<P,P> P2;
#define pu push
#define pb push_back
#define mp make_pair
#define eps 1e-7
#define INF 1000000000
#define mod 1000000007
#define fi first
#define sc second
#define rep(i,x) for(int ... | a.cc: In function 'std::vector<int> make(std::vector<int>, int)':
a.cc:42:28: error: incompatible types in assignment of 'int' to 'bool [2005]'
42 | used[L[i]] = 0;
| ~~~~~~~~~~~^~~
|
s397008419 | p03811 | C | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <vector>
#define rep(i,x,y) for (int i=x;i<=y;i++)
#define dep(i,y,x) for (int i=y;i>=x;i--)
#define sz(x) (int)(x.size())
using namespace std;
typedef long long LL;
typedef unsigned long long uLL;
const int maxn=2000+7;
struct ... | main.c:1:10: fatal error: cstdio: No such file or directory
1 | #include <cstdio>
| ^~~~~~~~
compilation terminated.
|
s732126414 | p03811 | C++ | #include <algorithm>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <tupl... | a.cc: In function 'int main()':
a.cc:119:7: error: 'uf' was not declared in this scope
119 | uf.unite(i, j);
| ^~
|
s223718913 | p03811 | C++ | #include<stdio.h>
#include<utility>
int gcd(int a, int b) {
if (a < b) return gcd(b, a);
if (a%b == 0) return b;
return gcd(b, a%b);
}
int main() {
int i, j, n;
int *a;
scanf("%d",&n);
a = (int*)malloc(sizeof(int)*n);
for (i = 0; i < n; i++) {
scanf("%d",&a[i]);
}
for (i = 0; i < n; i++) {
for (j = 0; ... | a.cc: In function 'int main()':
a.cc:13:19: error: 'malloc' was not declared in this scope
13 | a = (int*)malloc(sizeof(int)*n);
| ^~~~~~
a.cc:3:1: note: 'malloc' is defined in header '<cstdlib>'; this is probably fixable by adding '#include <cstdlib>'
2 | #include<utility>
+++ ... |
s113805678 | p03811 | C | #include<stdio.h>
int gcd(int a, int b) {
if (a < b) return gcd(b, a);
if (a%b == 0) return b;
return gcd(b, a%b);
}
int main() {
int i, j, n;
int *a;
scanf("%d",&n);
a = (int*)malloc(sizeof(int)*n);
for (i = 0; i < n; i++) {
scanf("%d",&a[i]);
}
for (i = 0; i < n; i++) {
for (j = 0; j < n-1 ; j++) {
... | main.c: In function 'main':
main.c:13:19: error: implicit declaration of function 'malloc' [-Wimplicit-function-declaration]
13 | a = (int*)malloc(sizeof(int)*n);
| ^~~~~~
main.c:2:1: note: include '<stdlib.h>' or provide a declaration of 'malloc'
1 | #include<stdio.h>
+++ |+#in... |
s214254128 | p03811 | C++ | #include <cstdio>
#include <algorithm>
#include <cmath>
#include <queue>
#include <vector>
#include <map>
#include <set>
using namespace std;
typedef pair<int , int> P2;
typedef pair<pair<int , int> , int> P3;
typedef pair<pair<int , int> , pair<int , int> > P4;
#define Fst first
#define Snd second
#define PB(a) push... | a.cc: In function 'std::vector<int> func(int)':
a.cc:49:31: error: cannot bind non-const lvalue reference of type 'std::vector<int>&' to an rvalue of type 'std::vector<int>'
49 | V = mer(V,func(i));
| ~~~~^~~
a.cc:33:47: note: initializing argument 2 of 'std::vector<... |
s601394777 | p03811 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
int Eulg(int a, int b);
int main(int argc, char *argv[]){
int N;
cin>>N;
int *a = new int[N]();
for(int i=0; i<N; i++){
cin>>a[i];
}
sort(a, a+N);
bool flag = true;
while(flag){
for(int i=0; i<N; i++){
for(int j=i+1; j<N; j++){
if(Eulg(... | a.cc: In function 'int main(int, char**)':
a.cc:29:48: error: 'b' was not declared in this scope
29 | a[i] = b[j];
| ^
|
s073720077 | p03811 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
int Eulg(int a, int b);
int main(int argc, char *argv[]){
int N;
cin>>N;
int *a = new int[N]();
for(int i=0; i<N; i++){
cin>>a[i];
}
sort(a, a+N);
bool flag = true;
while(flag){
for(int i=0; i<N; i++){
for(int j=i+1; j<N; j++){
if(Eulg(... | a.cc: In function 'int main(int, char**)':
a.cc:29:48: error: 'b' was not declared in this scope
29 | a[i] = b[i];
| ^
|
s457949780 | p03811 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
int Eulg(int a, int b);
int main(int argc, char *argv[]){
int N;
cin>>N;
int *a = new int[N]();
for(int i=0; i<N; i++){
cin>>a[i];
}
sort(a, a+N);
bool flag = true;
while(flag){
for(int i=0; i<N; i++){
for(int j=i+1; j<N; j++){
if(Eulg(... | a.cc: In function 'int main(int, char**)':
a.cc:29:48: error: 'b' was not declared in this scope
29 | a[i] = b[i];
| ^
|
s959550857 | p03811 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
int Eulg(int a, int b);
int main(int argc, char *argv[]){
int N;
cin>>N;
int *a = new int[N]();
for(int i=0; i<N; i++){
cin>>a[i];
}
sort(a, a+N);
bool flag = true;
while(flag){
for(int i=0; i<N; i++){
for(int j=i+1; j<N; j++){
if(Eulg(... | a.cc: In function 'int main(int, char**)':
a.cc:29:48: error: 'b' was not declared in this scope
29 | a[i] = b[i];
| ^
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.