submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s323403224
p03684
C++
#include<bits/stdc++.h> using namespace std; #define int long long typedef pair<int, int> iPair; struct Graph { int V, E; vector< pair<int, iPair> > edges; Graph(int V, int E) { this->V = V; this->E = E; } void addEdge(int u, int v, int w) { edges.push_back({w...
a.cc: In function 'int main()': a.cc:101:31: error: request for member 'first' in 'edges2', which is of non-class type 'data [100001]' 101 | cin >> edges2.first >> edges2.second; | ^~~~~ a.cc:101:47: error: request for member 'second' in 'edges2', which is of non-cl...
s024231867
p03684
C++
#include<bits/stdc++.h> using namespace std; #define int long long typedef pair<int, int> iPair; struct Graph { int V, E; vector< pair<int, iPair> > edges; Graph(int V, int E) { this->V = V; this->E = E; } void addEdge(int u, int v, int w) { edges.push_back({w...
a.cc: In function 'int main()': a.cc:105:39: error: expected unqualified-id before '.' token 105 | for(int i = 0; i < n-1; i++) Graph.push_back(i, i + 1, min(abs(edges2[i].first-edges2[i+1].first), abs(edges2[i].second-edges2[i+1].second)); | ^ a.cc:107:39: error: expec...
s367649332
p03684
C++
#include<bits/stdc++.h> using namespace std; #define int long long typedef pair<int, int> iPair; struct Graph { int V, E; vector< pair<int, iPair> > edges; Graph(int V, int E) { this->V = V; this->E = E; } void addEdge(int u, int v, int w) { edges.push_back({w...
a.cc: In function 'bool cmp1(long long int, long long int)': a.cc:28:22: error: 'struct data' has no member named 'first' 28 | if(edges2[a].first > edges2[b].first || (edges2[a].second > edges2[b].second && edges2[a].first == edges2[b].first)) return true; | ^~~~~ a.cc:28:40: error...
s712879753
p03684
C++
#include<bits/stdc++.h> using namespace std; #define int long long typedef pair<int, int> iPair; struct Graph { int V, E; vector< pair<int, iPair> > edges; Graph(int V, int E) { this->V = V; this->E = E; } void addEdge(int u, int v, int w) { edges.push_back({w...
a.cc: In function 'bool cmp1(long long int, long long int)': a.cc:28:12: error: 'edges2' was not declared in this scope; did you mean 'edge2'? 28 | if(edges2[a].first > edges2[b].first || (edges2[a].second > edges2[b].second && edges2[a].first == edges2[b].first)) return true; | ^~~~~~ ...
s649432188
p03684
C++
#include<bits/stdc++.h> using namespace std; #define int long long typedef pair<int, int> iPair; struct Graph { int V, E; vector< pair<int, iPair> > edges; Graph(int V, int E) { this->V = V; this->E = E; } void addEdge(int u, int v, int w) { edges.push_back({w...
cc1plus: error: '::main' must return 'int' a.cc: In function 'int main()': a.cc:103:25: error: no match for 'operator+' (operand types are 'std::vector<std::pair<long long int, long long int> >' and 'long long int') 103 | sort(edges2, edges2 + n, cmp1); | ~~~~~~ ^ ~ | ...
s362889829
p03684
C++
#include <bits/stdc++.h> #define int long long #define mod 1000000007 #define lim 100001 using namespace std; struct point { int x,y,id; } c[lim]; struct edge { int u,v,cost; } e[2*lim]; bool cmp1(point a,point b) { return a.x < b.x; } bool cmp2(point a,point b) { return a.y < b.y; } bool cmp_edge(edge a,edge b) { ...
a.cc: In function 'long long int find(long long int)': a.cc:27:24: error: 'p' was not declared in this scope 27 | int find(int x){return p[x] == x ? x : p[x] = find(p[x]);} | ^ a.cc: In function 'int main()': a.cc:34:31: error: 'p' was not declared in this scope 34 | for(int i = 0; ...
s911833614
p03684
C++
#include<bits/stdc++.h> using namespace std; #define fi first #define se second #define mp make_pair #define pb push_back #define int long long typedef vector<int> vi; typedef pair<int,int> ii; typedef vector<ii> vii; typedef vector< pair < int , pair < ii , ii > > > viiiii; map <ii,int> r; map<ii,ii> p; viiiii edge; i...
a.cc: In function 'int main()': a.cc:99:9: error: 'co' was not declared in this scope; did you mean 'cos'? 99 | co | ^~ | cos a.cc:99:11: error: expected '}' at end of input 99 | co | ^ a.cc:72:14: note: to match this '{' 72 | signed main(){ | ...
s464733249
p03684
C++
#include<cstdio> #include<algorithm> using namespace std; long long n,m,i,j,k,cc[500000],a,b,c,s ; long long min(long long x,long long y){ if (x>y) return y; else return x; } long long abs(long long x){ if (x<0) return -x; else return x; } struct p{ long long x,y,z; bool operator < (const p& tt) const{ return x...
a.cc: In function 'int main()': a.cc:49:33: error: call of overloaded 'abs(long long int)' is ambiguous 49 | wow[i].z=min(abs(s1[i+1].x-s1[i].x),abs(s1[i+1].y-s1[i].y)); | ~~~^~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/cstdlib:79, ...
s976412394
p03684
C++
#include<iostream> #include<vector> #include<algorithm> #define int long long using namespace std; const int N=1e5+100; int u[N],n,ans; class edge { public: int f,t,w; edge(int f,int t,int w):f(f),t(t),w(w){} }; class ufind { vector<int> f,r; public: ufind(int n) { f.reserve(N); ...
cc1plus: error: '::main' must return 'int' a.cc: In member function 'long long int ufind::find(long long int)': a.cc:27:15: warning: control reaches end of non-void function [-Wreturn-type] 27 | else x=f[x];
s464888398
p03684
C++
#include <iostream> #include <vector> #include <queue> #include <tuple> using namespace std; using ll = long long; const int MAX = 1e5+1; ll G[MAX][MAX]; int N; ll prim(){ ll ans = 0ll; vector<bool> used(N,false); priority_queue<pair<int,int>, vector<pair<int,int> >, greater<pair<int,int> > > Q; Q.p...
/tmp/cc5UKB2c.o: in function `prim()': a.cc:(.text+0x2a): relocation truncated to fit: R_X86_64_PC32 against symbol `N' defined in .bss section in /tmp/cc5UKB2c.o a.cc:(.text+0x203): relocation truncated to fit: R_X86_64_PC32 against symbol `N' defined in .bss section in /tmp/cc5UKB2c.o /tmp/cc5UKB2c.o: in function `ma...
s530558300
p03684
C++
#include <iostream> #include <vector> #include <queue> #include <tuple> #include <cstdio> #include <cstdlib> using namespace std; using ll = long long; const int MAX = 1e5+1; ll G[MAX][MAX]; int N; ll prim(){ ll ans = 0ll; vector<bool> used(N,false); priority_queue<pair<int,int>, vector<pair<int,int> >, ...
/tmp/cckzbRIK.o: in function `prim()': a.cc:(.text+0x2a): relocation truncated to fit: R_X86_64_PC32 against symbol `N' defined in .bss section in /tmp/cckzbRIK.o a.cc:(.text+0x203): relocation truncated to fit: R_X86_64_PC32 against symbol `N' defined in .bss section in /tmp/cckzbRIK.o /tmp/cckzbRIK.o: in function `ma...
s085198684
p03684
C++
/************************************************* ************************************************* ************************************************* *** _________________ | | | /*** *** | | | | / *** *** | | | | / *** *** |...
a.cc:159:8: error: ISO C++ forbids declaration of 'unite' with no type [-fpermissive] 159 | inline unite(int u,int v) | ^~~~~
s193810605
p03684
C++
#include <bits/stdc++.h> using namespace std; long long ans; int n,fa[100003],r[100003]; pair<int,int> a[100003],x[100003],y[100003]; priority_queue <pair<int,pair<int,int> > > q; int find_fa(int x){ if(fa[x]==x) return x; return fa[x]=find_fa(fa[x]); } void uni(int x,int y){ x=find_fa(x); y=find_fa(y); if (r[x]<r...
a.cc: In function 'int main()': a.cc:24:27: error: 'struct std::pair<int, int>' has no member named 'fi' 24 | cin>>a[i].fi>>a[i].second; | ^~ a.cc:25:28: error: 'struct std::pair<int, int>' has no member named 'fi' 25 | x[i]={a[i].fi,i}; | ...
s086711520
p03684
C++
#include <bits/stdc++.h> using namespace std; typedef long long int LLI; typedef pair<int, int> Pair; typedef pair<int, Pair> Edge; int N; LLI ans; int par[114514]; int rank[114514]; vector<Pair> xs; vector<Pair> ys; vector<Edge> es; int find(int v) { if (par[v] == v) return v; return par[v] = find(par[v]); } i...
a.cc: In function 'void unite(int, int)': a.cc:29:7: error: reference to 'rank' is ambiguous 29 | if (rank[u] > rank[v]) par[v] = u; | ^~~~ In file included from /usr/include/c++/14/bits/stl_pair.h:60, from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/...
s709113589
p03684
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define MAX 100001 int x[MAX], y[MAX]; int main(void) { int N, xmin = int(1e9), xmax = 0, ymin = int(1e9), ymax = 0; scanf("%d", &N); for(int i = 0; i < N; i++) { scanf("%d%d", x+i, y+i); xmin = min(xmin, x[i]); x...
a.cc: In function 'int main()': a.cc:17:16: error: 'man' was not declared in this scope; did you mean 'tan'? 17 | ymax = man(ymax, y[i]); | ^~~ | tan
s746031122
p03684
C++
#include <iostream> #include <vector> #include <queue> #include <utility> using namespace std; const int MAX = 100000; const int WHITE = 0; const int BLACK = 1; const int GRAY = 2; const int INFTY = (int) 1 << 21; typedef pair<int,int> t_pi; int n; int list[MAX][MAX]; int d[MAX], color[MAX], p[MAX]; t_pi pos[MAX]; ...
/tmp/ccvgGfCX.o: in function `prim()': a.cc:(.text+0x68): relocation truncated to fit: R_X86_64_PC32 against symbol `color' defined in .bss section in /tmp/ccvgGfCX.o a.cc:(.text+0x83): relocation truncated to fit: R_X86_64_PC32 against symbol `p' defined in .bss section in /tmp/ccvgGfCX.o a.cc:(.text+0x9e): relocation...
s586982734
p03684
C++
#include<bits/stdc++.h> using namespace std; #define MAX_N 300000 #define MAX_E 300000 typedef pair<int,int> P; int par[MAX_N]; int rank[MAX_N]; void init(int n){ for(int i=0;i<n;i++){ par[i]=i; rank[i]=0; } } int find(int x){ if(par[x]==x)return x; else return par[x]=find(par[x]); } void unite(int...
a.cc: In function 'void init(int)': a.cc:13:5: error: reference to 'rank' is ambiguous 13 | rank[i]=0; | ^~~~ In file included from /usr/include/c++/14/bits/stl_pair.h:60, from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60, ...
s391725196
p03684
C++
#include <iostream> #include <vector> #include <map> using namespace std; using ll = long long; struct V { int index; ll x, y; }; struct E { int v, u; ll cost; }; struct UnionFind { vector<int> data; UnionFind(int size) : data(size, -1) { } bool unionSet(int x, int y) { x = root(x); y = root(y); ...
a.cc: In function 'int main()': a.cc:47:3: error: 'sort' was not declared in this scope; did you mean 'short'? 47 | sort(vs.begin(), vs.end(), [](const V &a, const V &b) { | ^~~~ | short
s295876111
p03684
C++
#include <iostream> #include <algorithm> #include <cmath> #include <cstring> #include <cstdio> #include <map> #include <stack> #include <queue> #include <set> #include <cstdlib> #include <stack> #include <vector> #define INF 0x3f3f3f3f #define MOD 1000000009 # define FOR(i,a,n) for(register int i=a; i<=n; ++i) # define...
a.cc: In function 'int main()': a.cc:42:9: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 42 | FOR(i,1,n) | ^ a.cc:15:38: note: in definition of macro 'FOR' 15 | # define FOR(i,a,n) for(register int i=a; i<=n; ++i) | ^...
s466468155
p03684
C++
#include<iostream> #include<cstdio> #include<cmath> #include<cstring> #include<iomanip> #include<algorithm> using namespace std; #define inf 1<<29 #define nu 1000005 #define maxnum 100005 #define num 30 int n; struct Md { int v,u,flag; }M[maxnum],C[maxnum]; struct Node { int x,y,z; }dis[nu]; bool cmp(Md a,Md ...
a.cc: In function 'int main()': a.cc:82:20: error: 'flag' was not declared in this scope; did you mean 'fl'? 82 | sort(dis+1,dis+flag+1,cmp1); | ^~~~ | fl
s526253464
p03684
C++
#include<iostream> #include<cstdio> #include<cmath> #include<cstring> #include<iomanip> #include<algorithm> using namespace std; #define inf 1<<29 #define nu 1000005 #define maxnum 100005 #define num 30 int n; struct Md { int v,u,flag; }M[maxnum],C[maxnum]; struct Node { int x,y,z; }dis[nu]; bool cmp(Md a,Md ...
a.cc: In function 'int main()': a.cc:77:7: error: expected '(' before 'change' 77 | change(); | ^~~~~~ | ( a.cc:78:11: error: could not convert 'std::sort<Md*, bool (*)(Md, Md)>((((Md*)(& C)) + 12), (((Md*)(& C)) + ((((sizetype)n) + 1) * 12)), cmp0)' from 'void' to 'bool' 78 | ...
s209485122
p03684
C++
#include "bits/stdc++.h" #include <unordered_set> using namespace std; #define DEBUG(x) cout<<#x<<": "<<x<<endl; #define DEBUG_VEC(v) cout<<#v<<":";for(int i=0;i<v.size();i++) cout<<" "<<v[i]; cout<<endl typedef long long ll; #define vi vector<int> #define vl vector<ll> #define vii vector< vector<int> > #define vll v...
a.cc: In function 'void init()': a.cc:69:8: error: 'i' was not declared in this scope 69 | for (i = 0; i < n - 1; i++) { | ^ a.cc:73:53: error: 'y2' was not declared in this scope; did you mean 'x2'? 73 | M[r1].push_back(make_pair(min(abs(x2 - x1), abs(y2 - y1)), r2)); | ...
s016534636
p03684
C++
#include <iostream> #include <vector> #include <map> #include <queue> using namespace std; typedef pair< int, int > iP; typedef pair< iP, int > iiP; #define PREV(i, s) ((i - 1 + s) % s) #define NEXT(i, s) ((i + 1) % s) vector< iP > pp; int prim(vector< vector< int > > &g) { int ret = 0; int s = g.size(); ...
a.cc: In function 'int main()': a.cc:48:5: error: 'sort' was not declared in this scope; did you mean 'short'? 48 | sort(g1.begin(), g1.end()); | ^~~~ | short
s510522094
p03684
C
/* cat <<EOF >mistaken-paste */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdbool.h> #include <math.h> #define BIG 2000000007 #define MOD 1000000007 typedef unsigned long long ull; typedef signed long long sll; #define N_MAX 200000 #define M_MAX 100000 typedef struct { int a; int b...
main.c: In function 'uf_find': main.c:290:24: error: 'return' with a value, in function returning void [-Wreturn-mismatch] 290 | return x; | ^ main.c:288:6: note: declared here 288 | void uf_find(int x){ | ^~~~~~~ main.c:292:34: error: void value not ignored a...
s246432648
p03684
C++
#include <bits/stdc++.h> using namespace std; typedef pair<int,int> P; int n; P x[100001]; P y[100001]; int p[100001]; int rank[100001]; void init(int n) { for(int i = 0; i < n; i++) { p[i] = i; rank[i] = 0; } } int Find(int x) { return p[x] == x ? x : (p[x] = Find(p[x])); } void Union(int x, int y) ...
a.cc: In function 'void init(int)': a.cc:15:5: error: reference to 'rank' is ambiguous 15 | rank[i] = 0; | ^~~~ In file included from /usr/include/c++/14/bits/stl_pair.h:60, from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60, ...
s603102471
p03684
C++
#include <bits/stdc++.h> using namespace std; typedef pair<int,int> P; int n; P x[100001]; P y[100001]; int p[100001]; int rank[100001]; void init(int n) { for(int i = 0; i < n; i++) { p[i] = i; rank[i] = 0; } } int Find(int x) { return p[x] == x ? x : (p[x] = Find(p[x])); } void Union(int x, int y) ...
a.cc: In function 'void init(int)': a.cc:15:5: error: reference to 'rank' is ambiguous 15 | rank[i] = 0; | ^~~~ In file included from /usr/include/c++/14/bits/stl_pair.h:60, from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60, ...
s623112763
p03684
C++
#include <iostream> #include <vector> #include <queue> #define INF 2000000000 using namespace std; int main(){ int n; cin >> n; vector<pair<int,int> > px,py; //adjacent list vector<pair<int,int> > G[n+1]; for(int i=1;i<=n;i++){ int x,y; cin >> x >> y; px.push_back(make_pair(x,i)); py.push_back(...
a.cc: In function 'int main()': a.cc:19:3: error: 'sort' was not declared in this scope; did you mean 'short'? 19 | sort(px.begin(),px.end()); | ^~~~ | short
s787415084
p03684
C++
#include <bits/stdc++.h> using namespace std; #define MAX_N 100010 struct point {int id, x, y;}; struct edge {int u, v, w;}; int n; point p[MAX_N]; edge edgeset[2 * MAX_N]; int pa[MAX_N]; int rank[MAX_N]; void init(void) { memset(pa, 0, sizeof(pa)); memset(rank, 0, sizeof(rank)); for (int i = 0; i < n;...
a.cc: In function 'void init()': a.cc:19:12: error: reference to 'rank' is ambiguous 19 | memset(rank, 0, sizeof(rank)); | ^~~~ In file included from /usr/include/c++/14/bits/stl_pair.h:60, from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/1...
s800402362
p03684
C++
#include<cstdio> #include<iostream> #include<cmath> #include<algorithm> #include<string> #include<cstring> #include<cctype> #include<queue> #include<stack> #include<map> #include<set> #include<iomanip> #include<cstdlib> #include<ctime> #include<list> #define ull unsigned long long #define ll long long #define pii pai...
a.cc: In function 'void fInit(int)': a.cc:35:17: error: reference to 'rank' is ambiguous 35 | rank[i]=0; | ^~~~ In file included from /usr/include/c++/14/bits/move.h:37, from /usr/include/c++/14/bits/exception_ptr.h:41, from /usr/include/c++/14/...
s511315432
p03684
C++
#include<cstdio> #include<iostream> #include<cmath> #include<algorithm> #include<string> #include<cstring> #include<cctype> #include<queue> #include<stack> #include<map> #include<set> #include<iomanip> #include<cstdlib> #include<ctime> #include<list> #define ull unsigned long long #define ll long long #define pii pai...
a.cc: In function 'void fInit(int)': a.cc:35:17: error: reference to 'rank' is ambiguous 35 | rank[i]=0; | ^~~~ In file included from /usr/include/c++/14/bits/move.h:37, from /usr/include/c++/14/bits/exception_ptr.h:41, from /usr/include/c++/14/...
s348549774
p03684
C++
#include <iostream> #include <set> #include <cstdio> #include <cstdlib> #include <cstring> #include <algorithm> using namespace std; #define mp make_pair const int maxn = 100005; int px[maxn],py[maxn],f[maxn]; pair<int,int> sx[maxn],sy[maxn]; int fnd(int x){ if (f[x]==x)return x; return f[x]=fnd(f[x]); } int n...
a.cc: In function 'int main()': a.cc:54:47: error: invalid declarator before 'cur' 54 | auto pair<int,pair<int,int> > cur= *(st.begin()); | ^~~ a.cc:55:26: error: 'cur' was not declared in this scope 55 | st.erase(cur); | ...
s720227977
p03684
C++
#include <bits/stdc++.h> using namespace std; #define mp make_pair const int maxn = 100005; int px[maxn],py[maxn],f[maxn]; pair<int,int> sx[maxn],sy[maxn]; int fnd(int x){ if (f[x]==x)return x; return f[x]=fnd(f[x]); } int n; int dist(int u,int v){ return min(abs(px[u]-px[v]),abs(py[u]-py[v])); } int unit(i...
a.cc: In function 'int main()': a.cc:49:47: error: invalid declarator before 'cur' 49 | auto pair<int,pair<int,int> > cur= *(st.begin()); | ^~~ a.cc:50:26: error: 'cur' was not declared in this scope 50 | st.erase(cur); | ...
s488749387
p03684
C++
#include <bits/stdc++.h> using namespace std; #define mp make_pair const int maxn = 100005; int px[maxn],py[maxn],f[maxn]; pair<int,int> sx[maxn],sy[maxn]; int fnd(int x){ if (f[x]==x)return x; return f[x]=fnd(f[x]); } int n; int dist(int u,int v){ return min(abs(px[u]-px[v]),abs(py[u]-py[v])); } int unit(i...
a.cc: In function 'int main()': a.cc:49:47: error: invalid declarator before 'cur' 49 | auto pair<int,pair<int,int> > cur= *(st.begin()); | ^~~ a.cc:50:26: error: 'cur' was not declared in this scope 50 | st.erase(cur); | ...
s073657044
p03684
C++
asdadadasdasdasdasdadadasdasdasd asdadadasdasdasd asdadadasdasdasd asdadadasdasdasd
a.cc:2:1: error: 'asdadadasdasdasdasdadadasdasdasd' does not name a type 2 | asdadadasdasdasdasdadadasdasdasd | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
s621927878
p03684
C++
#include<cstdio> #include<cstdlib> #include<cmath> #include<iostream> #include<string> #include<stack> #include<queue> #include<vector> #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++) #define all(c)...
/tmp/ccH7p88f.o: in function `prim()': a.cc:(.text+0x11): relocation truncated to fit: R_X86_64_PC32 against symbol `V' defined in .bss section in /tmp/ccH7p88f.o a.cc:(.text+0x22): relocation truncated to fit: R_X86_64_PC32 against symbol `mincost' defined in .bss section in /tmp/ccH7p88f.o a.cc:(.text+0x37): relocati...
s739024991
p03684
C++
#include<cstdio> #include<cstdlib> #include<cmath> #include<iostream> #include<string> #include<stack> #include<queue> #include<vector> #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++) #define all(c)...
/tmp/ccPnO4lF.o: in function `prim()': a.cc:(.text+0x11): relocation truncated to fit: R_X86_64_PC32 against symbol `V' defined in .bss section in /tmp/ccPnO4lF.o a.cc:(.text+0x22): relocation truncated to fit: R_X86_64_PC32 against symbol `mincost' defined in .bss section in /tmp/ccPnO4lF.o a.cc:(.text+0x37): relocati...
s872785421
p03684
C++
#include<cstdio> #include<cstdlib> #include<cmath> #include<iostream> #include<string> #include<stack> #include<queue> #include<vector> #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++) #define all(c)...
/tmp/ccarWuqy.o: in function `prim()': a.cc:(.text+0x11): relocation truncated to fit: R_X86_64_PC32 against symbol `V' defined in .bss section in /tmp/ccarWuqy.o a.cc:(.text+0x22): relocation truncated to fit: R_X86_64_PC32 against symbol `mincost' defined in .bss section in /tmp/ccarWuqy.o a.cc:(.text+0x37): relocati...
s863179008
p03684
C++
#include <algorithm> #include <cstdio> #include <cstdlib> #include <utility> using namespace std; #define MAX_N 100000+10 #define MAX_E 4*(100000+10) int par[MAX_N]; int rank[MAX_N]; void init_union_find(int n) { for (int i = 0; i < n; i++) { par[i] = i; rank[i] = 0; } } int find_union_find(int x){ if ...
a.cc: In function 'void init_union_find(int)': a.cc:15:5: error: reference to 'rank' is ambiguous 15 | rank[i] = 0; | ^~~~ In file included from /usr/include/c++/14/bits/stl_pair.h:60, from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:...
s933465851
p03684
C++
class Edge: def __init__(self, u, v, cost): self.u = u self.v = v self.cost = cost # self.n = n class Coordinate: def __init__(self, x, y, n): self.x = x self.y = y self.n = n def __repr__(self): return repr((self.x, self.y)) # union find。...
a.cc:6:11: error: invalid preprocessing directive #self 6 | # self.n = n | ^~~~ a.cc:19:3: error: invalid preprocessing directive #union 19 | # union find。初期化 | ^~~~~ a.cc:19:9: error: extended character 。 is not valid in an identifier 19 | # union find。初期化 | ^ a....
s013588953
p03684
C++
#include <iostream> #include <vector> #include <algorithm> #include <cstdio> #include <cmath> #include <map> using namespace std; typedef long long ll; struct edge {int u,v,cost;}; int par[100001],Rank[100001]; edge es[200002]; int N; bool comp(const edge& e1,const edge& e2){ return e1.cost<e2.cost; } void init_unio...
a.cc: In function 'void init_union_find(int)': a.cc:20:10: error: redeclaration of 'auto i' 20 | rank[i]=0; | ^ a.cc:18:11: note: 'int i' previously declared here 18 | for(int i=0;i<n;i++){ | ^ a.cc:20:13: error: class template argument deduction failed: 20 | rank[i]=0;...
s162901908
p03684
C++
#include <iostream> #include <vector> #include <algorithm> #include <cstdio> #include <cmath> #include <map> using namespace std; typedef long long ll; struct edge {int u,v,cost;}; int par[100001],rank[100001]; edge es[200002]; int N; bool comp(const edge& e1,const edge& e2){ return e1.cost<e2.cost; } void init_unio...
a.cc: In function 'void init_union_find(int)': a.cc:20:5: error: reference to 'rank' is ambiguous 20 | rank[i]=0; | ^~~~ In file included from /usr/include/c++/14/bits/move.h:37, from /usr/include/c++/14/bits/exception_ptr.h:41, from /usr/include/c++/14/exception:166, ...
s361251261
p03684
Java
import java.util.*; public class Main { static ArrayList<Edge>[] graph; static int vNum; public static void main(String[] args) { Scanner sc = new Scanner(System.in); vNum = sc.nextInt(); Vertice[] V = new Vertice[vNum]; graph = new ArrayList[vNum]; for(int i = 0; i < vNum; i++) { grap...
Main.java:66: error: Edge is not abstract and does not override abstract method compareTo(Object) in Comparable static class Edge implements Comparable { ^ Main.java:74: error: method does not override or implement a method from a supertype @Override ^ Note: Main.java uses unchecked or unsafe operati...
s389736305
p03684
C++
#include <iostream> #include <vector> #include <cmath> using namespace std; struct union_find { const int root_v = -1; vector<int> d; union_find(int n) : d(n, root_v) {} int root(int i) { return d[i] == root_v ? i : root(d[i]); } bool is_connect(int i, int j) { return root(i) == root(j); } ...
a.cc: In function 'int main()': a.cc:52:3: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 52 | sort(cs.begin(), cs.end(), [](city r, city l){ return r.x < l.x;}); | ^~~~ | sqrt
s086583291
p03684
C++
#include <iostream> #include <sstream> #include <cstdio> #include <cmath> #include <cctype> #include <cstring> #include <algorithm> #include <numeric> #include <functional> #include <string> #include <vector> #include <deque> #include <stack> #include <queue> #include <list> #include <map> #include <set> #include <util...
a.cc: In lambda function: a.cc:176:20: error: 'INT_MAX' was not declared in this scope 176 | return INT_MAX; | ^~~~~~~ a.cc:30:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 29 | #include <cassert> +++ |+#include <...
s583481413
p03684
C
#include<bits/stdc++.h> using namespace std; #define m make_pair #define I int #define t first #define u second pair<I,I>x[1<<17],y[1<<17];I i,n,p[1<<17],s; pair<I,pair<I,I> > G[2<<17]; I f(I a){return p[a]-a?p[a]=f(p[a]):a;} main() { for(cin>>n;i++<n;x[i].u=y[i].u=p[i]=i)cin>>x[i].t>>y[i].t; sort(x+1,x+n+1),sort(y+1...
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory 1 | #include<bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s213796222
p03684
C++
#include<iostream> #include<cstdio> #include<cmath> #include<vector> #include<algorithm> using namespace std; struct edge { int u,v,cost; }; int n; int x[10010] int y[10010]; int par[11010] int rank[10010]; vector<edge> ki; long long ans; void init_union_find(int n) { for(int i = 0;i < n;i++) { par[i] = i; ...
a.cc:17:1: error: expected initializer before 'int' 17 | int y[10010]; | ^~~ a.cc:19:1: error: expected initializer before 'int' 19 | int rank[10010]; | ^~~ a.cc: In function 'void init_union_find(int)': a.cc:27:17: error: 'par' was not declared in this scope; did you mean '__pstl::execution::v1::par'...
s540352037
p03684
C++
#include<iostream> #include<cstdio> #include<cmath> #include<vector> #include<algorithm> using namespace std; struct edge { int u,v,cost; }; int n; int x[10010],y[10010]; static int par[11010],rank[10010]; vector<edge> ki; long long ans; void init_union_find(int n) { for(int i = 0;i < n;i++) { par[i] = i; r...
a.cc: In function 'void init_union_find(int)': a.cc:26:17: error: reference to 'rank' is ambiguous 26 | rank[i] = 0; | ^~~~ In file included from /usr/include/c++/14/bits/move.h:37, from /usr/include/c++/14/bits/exception_ptr.h:41, from /usr/inc...
s168870912
p03684
C++
#include<iostream> #include<cstdio> #include<cmath> #include<vector> #include<algorithm> using namespace std; struct edge { int u,v,cost; }; int n; int x[10010],y[10010]; int par[11010],rank[10010]; vector<edge> ki; long long ans; void init_union_find(int n) { for(int i = 0;i < n;i++) { par[i] = i; rank[i] ...
a.cc: In function 'void init_union_find(int)': a.cc:26:17: error: reference to 'rank' is ambiguous 26 | rank[i] = 0; | ^~~~ In file included from /usr/include/c++/14/bits/move.h:37, from /usr/include/c++/14/bits/exception_ptr.h:41, from /usr/inc...
s778124505
p03684
C++
#include<iostream> #include<cstdio> #include<cmath> #include<vector> #include<algorithm> using namespace std; struct edge { int u,v,cost; }; int n; int x[10010],y[10010]; int par[11010],rank[10010]; vector<edge> ki; long long ans; void init_union_find(int n) { for(int i = 0;i < n;i++) { par[i] = i; rank[i] ...
a.cc: In function 'void init_union_find(int)': a.cc:26:17: error: reference to 'rank' is ambiguous 26 | rank[i] = 0; | ^~~~ In file included from /usr/include/c++/14/bits/move.h:37, from /usr/include/c++/14/bits/exception_ptr.h:41, from /usr/inc...
s738976178
p03684
C
#include <iostream> #include <iomanip> #include <algorithm> #include <vector> #include <string> #include <queue> #include <stack> #include <set> #include <map> #include <cstdlib> #include <climits> using namespace std; typedef unsigned long long ull; typedef long long ll; ull N; struct UnionFind { vector<int> par...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s619328976
p03684
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; struct edge{int from, to, cost; edge (int f, int t, int c) : from(f),to(t),cost(c) {} }; int N; typedef pair<int,int> P; bool operator < (const edge& a, const edge& b){ return a.cost < b.cost; } vector<P>x,y; vector<edge> e; int p[100001]; int ra...
a.cc: In function 'void init(int)': a.cc:22:5: error: reference to 'rank' is ambiguous 22 | rank[i] = 0; | ^~~~ In file included from /usr/include/c++/14/bits/stl_pair.h:60, from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60, ...
s303106778
p03684
C++
#include <cstdio> #include <cstring> #include <cstdlib> #include <vector> #include <queue> #include <iostream> #include <cmath> #include <algorithm> #include <map> #include <cmath> using namespace std; const int maxn=100000+5; typedef long long ll; struct point{int x,y,id;}; point p[maxn]; int n; struct edge{int from,...
a.cc: In function 'int main()': a.cc:75:16: error: 'vis' was not declared in this scope 75 | memset(vis,0,sizeof(vis)); | ^~~
s647626319
p03684
Java
import java.io.OutputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.Arrays; import java.util.StringTokenizer; import java.io.IOException; import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.ArrayList; import java.io.InputStream;...
Main.java:38: error: incompatible types: int[] cannot be converted to int id = new int[n + 2]; ^ Main.java:39: error: incompatible types: int[] cannot be converted to int sz = new int[n + 2]; ^ Main.java:41: error: no suitable method found for fill(int,int) ...
s010812079
p03684
Java
import java.io.OutputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.Arrays; import java.util.StringTokenizer; import java.io.IOException; import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.ArrayList; import java.io.InputStream;...
Main.java:38: error: incompatible types: int[] cannot be converted to int id = new int[n + 2]; ^ Main.java:39: error: incompatible types: int[] cannot be converted to int sz = new int[n + 2]; ^ Main.java:41: error: no suitable method found for fill(int,int) ...
s087833646
p03684
C
#include<stdio.h> #include<string.h> #include<stdlib.h> #define inf 1145141919 #define llinf 1145141919810364364 #define mod 1000000007 int max(int a,int b){if(a>b){return a;}return b;} int min(int a,int b){if(a<b){return a;}return b;} int round(int a,int b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;} int ceil(int a...
main.c:10:5: warning: conflicting types for built-in function 'round'; expected 'double(double)' [-Wbuiltin-declaration-mismatch] 10 | int round(int a,int b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;} | ^~~~~ main.c:4:1: note: 'round' is declared in header '<math.h>' 3 | #include<stdlib.h> +++ |+#...
s665313455
p03684
C++
#include <bits/stdc++.h> using namespace std; typedef long long LL; #define M 1000000007 #define N 100005 int u[N*N],v[N*N],p[N],r[N*N],w[N*N],n,m,i,j,k=0; struct zb{ int x, y,id,prx,pry; }a[N]; int cmp(const int i, const int j){return w[i]<w[j];} int cmp1(struct zb i, struct zb j){return i.x<j.x;} int cmp2(struct...
a.cc:6:8: warning: integer overflow in expression of type 'int' results in '1411065433' [-Woverflow] 6 | int u[N*N],v[N*N],p[N],r[N*N],w[N*N],n,m,i,j,k=0; | ^ a.cc:6:8: error: size of array 'u' exceeds maximum object size '9223372036854775807' a.cc:6:15: warning: integer overflow in expression of type ...
s662905164
p03684
C++
#include <cstdio> #include <iostream> #include <cmath> #include <algorithm> #include <vector> #include <map> using namespace std; #define MAX_V 120000 #define MAX_E 220000 typedef pair<int, int> P; int par[MAX_V]; int rank[MAX_V]; // n要素で初期化 void init(int n){ for(int i = 0; i < n; i++){ par[i] = i; rank[i] = ...
a.cc: In function 'void init(int)': a.cc:22:17: error: reference to 'rank' is ambiguous 22 | rank[i] = 0; | ^~~~ In file included from /usr/include/c++/14/bits/move.h:37, from /usr/include/c++/14/bits/exception_ptr.h:41, from /usr/include/c++/14...
s725180650
p03684
C++
#include <algorithm> #include <cfloat> #include <climits> #include <cstring> #include <cmath> #include <deque> #include <functional> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> # ifdef __GNUC__ # if __cplus...
a.cc: In function 'int main()': a.cc:65:9: error: 'xs' was not declared in this scope 65 | xs.clear(); | ^~ a.cc:66:9: error: 'ys' was not declared in this scope; did you mean 'yn'? 66 | ys.clear(); | ^~ | yn
s044214285
p03684
C++
#include<bits/stdc++.h> using namespace std; #define int long long #define r(i,n) for(int i=0;i<n;i++) #define MAX 100001 struct edge{int u,v,cost;}; pair<int,int>a[MAX]; int par[MAX]; int rank[MAX]; void init(int n){ r(i,n){ par[i]=i; rank[i]=0; } } int find(int x){ if(par[x]==x){ return x; }else{ ...
a.cc: In function 'void init(long long int)': a.cc:13:5: error: reference to 'rank' is ambiguous 13 | rank[i]=0; | ^~~~ In file included from /usr/include/c++/14/bits/stl_pair.h:60, from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60,...
s624968157
p03684
C++
#include <iostream> #include <queue> #include <map> #include <list> #include <vector> #include <string> #include <stack> #include <limits> #include <climits> #include <cassert> #include <fstream> #include <cstring> #include <cmath> #include <bitset> #include <iomanip> #include <algorithm> #include <functional> #include...
a.cc: In function 'void solve()': a.cc:138:13: error: expected primary-expression before 'long' 138 | #define int long long | ^~~~ a.cc:202:28: note: in expansion of macro 'int' 202 | q.push(MP( int(P[i + 1].first.first - P[i].first.first), MP( P[i].second, P[i+1].second ) )); ...
s839326184
p03684
C++
#include <iostream> #include <cstring> #include <cmath> #include <vector> #include <queue> //#include <bits/stdc++.h> using namespace std; typedef long long LL; typedef unsigned long long ULL; typedef pair<int, int> PI; typedef pair< PI, int> PII; #define pb push_back #define Key_value ch[ch[root][1]][0] #define lson l...
a.cc: In function 'LL solve()': a.cc:96:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 96 | sort(p,p+n); | ^~~~ | sqrt a.cc:99:14: error: 'unique' was not declared in this scope 99 | pn = unique(b,b+n) - b; | ^~~~~~ a.cc:112:5: ...
s655189383
p03684
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for (int (i)=(0);(i)<(int)(n);++(i)) using ll = long long; const int MAXV = 100010; const int INF = 1e8; int cost[MAXV][MAXV]; int mincost[MAXV]; bool used[MAXV]; int V; ll prim() { for (int i=0; i<V; ++i) { mincost[i] = INF; used[i] ...
/tmp/ccTzEEHY.o: in function `prim()': a.cc:(.text+0x21): relocation truncated to fit: R_X86_64_PC32 against symbol `mincost' defined in .bss section in /tmp/ccTzEEHY.o a.cc:(.text+0x34): relocation truncated to fit: R_X86_64_PC32 against symbol `used' defined in .bss section in /tmp/ccTzEEHY.o a.cc:(.text+0x42): reloc...
s824608431
p03684
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for (int (i)=(0);(i)<(int)(n);++(i)) using ll = long long; const int MAXV = 100010; const int INF = 1e8; int cost[MAXV][MAXV]; int mincost[MAXV]; bool used[MAXV]; int V; ll prim() { for (int i=0; i<V; ++i) { mincost[i] = INF; used[i] ...
/tmp/cccN8ir6.o: in function `prim()': a.cc:(.text+0x21): relocation truncated to fit: R_X86_64_PC32 against symbol `mincost' defined in .bss section in /tmp/cccN8ir6.o a.cc:(.text+0x34): relocation truncated to fit: R_X86_64_PC32 against symbol `used' defined in .bss section in /tmp/cccN8ir6.o a.cc:(.text+0x42): reloc...
s543862927
p03684
C++
#include <bits/stdc++.h> using namespace std; #define int int64_t #define x first #define y second typedef pair <int, int> pi; const int N = 1e5 + 10; int n, u, v, v2, u2, ans, l, r, pa[N], sz[N]; vector <int> g[N]; pi p[N]; vector <pi> xx, yy; struct edge { int u, v, w; }; bool operator < (edge a, edge b) { return a....
a.cc: In function 'void make_graph()': a.cc:50:16: error: no matching function for call to 'max(int64_t, long long int)' 50 | l = max(i - 3, 0ll), r = min(i + 3, n); | ~~~^~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu...
s598255479
p03684
C++
#include<bits/stdc++.h> using namespace std; typedef long long LL; const LL maxn=100500,inf=LONG_LONG_MAX; LL x[maxn],y[maxn],Map[maxn][maxn],vis[maxn],ans,n,d[maxn]; struct node { LL v,len;//v代表当前顶点,w代表v到答案集合的最小距离 friend bool operator <(node a,node b) { return a.len>b.len; } }; LL prim() { ...
/tmp/ccTmBal4.o: in function `prim()': a.cc:(.text+0x3b): relocation truncated to fit: R_X86_64_PC32 against symbol `ans' defined in .bss section in /tmp/ccTmBal4.o a.cc:(.text+0x4d): relocation truncated to fit: R_X86_64_PC32 against symbol `vis' defined in .bss section in /tmp/ccTmBal4.o a.cc:(.text+0x5e): relocation...
s584568661
p03684
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for (int (i)=(0);(i)<(int)(n);++(i)) using ll = long long; struct UnionFind { static const int Max = 100010; int par[Max]; int rank[Max]; void init(int n) { for (int i = 0; i < n; ++i) { par[i] = i; rank[i] ...
/tmp/ccK28nWJ.o: in function `kruskal()': a.cc:(.text+0x31): relocation truncated to fit: R_X86_64_PC32 against symbol `E' defined in .bss section in /tmp/ccK28nWJ.o a.cc:(.text+0x63): relocation truncated to fit: R_X86_64_PC32 against symbol `V' defined in .bss section in /tmp/ccK28nWJ.o a.cc:(.text+0x107): relocation...
s516440091
p03684
C++
#include<cstdio> #include<algorithm> #include<cmath> using namespace std; typedef long long ll; const int MAXN = 100010; int n, en, fa[MAXN]; struct Point { int x, y, id; }P[MAXN]; struct Edge { int from, to, w; Edge(int from = 0, int to = 0, int w = 0) : from(from), to(to), w(w) {} bool operator < (const Edge &rh...
a.cc: In function 'int read()': a.cc:36:16: error: 'isdigit' was not declared in this scope 36 | for(; !isdigit(ch); ch = getchar()) if(ch=='-') f=-1; | ^~~~~~~ a.cc:37:15: error: 'isdigit' was not declared in this scope 37 | for(; isdigit(ch); ch = getchar()) x = (x<<1)+(x<<3...
s085570527
p03684
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; typede...
a.cc: In function 'void init()': a.cc:31:17: error: reference to 'rank' is ambiguous 31 | rank[i]=0; | ^~~~ In file included from /usr/include/c++/14/bits/stl_pair.h:60, from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/v...
s470080710
p03684
C++
#include<iostream> #include<algorithm> #include<vector> using namespace std; vector<pair<int,pair<int,int> > >G; int parent[1<<17],rank[1<<17]; pair<int,int>x[1<<17],y[1<<17]; int find(int a) { return a!=parent[a]?parent[a]=find(parent[a]):a; } int unite(int a,int b) { int pa=find(a),pb=find(b); if(rank[pa]<rank[pb]...
a.cc: In function 'int unite(int, int)': a.cc:15:12: error: reference to 'rank' is ambiguous 15 | if(rank[pa]<rank[pb]) | ^~~~ In file included from /usr/include/c++/14/bits/move.h:37, from /usr/include/c++/14/bits/exception_ptr.h:41, from /usr/include/c++/1...
s581793612
p03684
C++
#include <iostream> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include<queue> #include <string> #define N 250000 #define MOD 1000000007 using namespace std; int cas; int n,m; struct ds{int x,y,i;}d[N]; bool cmpx(ds d1,ds d2){return d1.x<d2.x;} bool cmpy(ds d1,ds d2){return d1.y<d2.y;} stru...
a.cc: In function 'int main()': a.cc:40:5: error: 'sort' was not declared in this scope; did you mean 'short'? 40 | sort(d+1,d+n+1,cmpx); | ^~~~ | short
s592265330
p03684
C++
3 1 5 3 9 7 8 6 8 3 4 9 12 19 18 1 13 5 7 6
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 3 | ^
s226092801
p03685
C++
#include <iostream> #include <vector> #include <map> #include <stack> using namespace std; int main(){ int R, C, N; cin >> R >> C >> N; vector<int> x1(N), y1(N), x2(N), y2(N); for (int i = 0; i < N; i++){ cin >> x1[i] >> y1[i] >> x2[i] >> y2[i]; } vector<pair<int, int>> pos; for (int i = 0; i < N; i++){ int ...
a.cc: In function 'int main()': a.cc:40:9: error: 'sort' was not declared in this scope; did you mean 'short'? 40 | sort(pos.begin(), pos.end()); | ^~~~ | short
s637239789
p03685
C++
#include <iostream> #include <vector> #include <map> #include <stack> using namespace std; int main(){ int R, C, N; cin >> R >> C >> N; vector<int> x1(N), y1(N), x2(N), y2(N); for (int i = 0; i < N; i++){ cin >> x1[i] >> y1[i] >> x2[i] >> y2[i]; } map<int, int> pos; for (int i = 0; i < N; i++){ int p = -1; ...
a.cc: In function 'int main()': a.cc:39:25: error: 'assert' was not declared in this scope 39 | assert(!pos.count(p)); | ^~~~~~ a.cc:5:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>' 4 | #include <st...
s602605664
p03685
C++
#include <iostream> #include <vector> #include <map> #include <stack> #include <cassert> using namespace std; int main(){ int R, C, N; cin >> R >> C >> N; vector<int> x1(N), y1(N), x2(N), y2(N); for (int i = 0; i < N; i++){ cin >> x1[i] >> y1[i] >> x2[i] >> y2[i]; } map<int, int> pos; for (int i = 0; i < N; i+...
a.cc: In function 'int main()': a.cc:47:22: error: cannot convert 'std::pair<const int, int>' to 'int' in initialization 47 | for (int x : pos){ | ^~~ a.cc:48:31: error: request for member 'second' in 'x', which is of non-class type 'int' 48 | P.push_back(x.secon...
s462584022
p03685
C++
#pragma GCC optimize("Ofast") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #pragma GCC optimize("unroll-loops") #include<bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; #define DEBUG #ifdef ...
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::_Rb_tree<std::pair<long long int, long long int>,...
s144769012
p03685
C++
#include <iostream> #include <vector> #include <map> #include <stack> using namespace std; int main(){ int R, C, N; cin >> R >> C >> N; vector<int> x1(N), y1(N), x2(N), y2(N); for (int i = 0; i < N; i++){ cin >> x1[i] >> y1[i] >> x2[i] >> y2[i]; } map<int, int> pos; for (int i = 0; i < N; i++){ int p = -1; ...
a.cc: In function 'int main()': a.cc:60:17: error: 'assert' was not declared in this scope 60 | assert(false); | ^~~~~~ a.cc:5:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>' 4 | #include <stack> +++ |+#include <c...
s174656578
p03685
C++
#include <bits/stdc++.h> using namespace std; int r,c; int sd(pair<int,int> a){ int x,y; tie(x,y) = a; if(x==0) return 0; if(y==c) return 1; if(x==r) return 2; if(y==0) return 3; return -1; } struct cmpar{ bool operator()(const pair<pair<int,int>,int>&...
a.cc:29:2: error: 'cmpar bcmp' redeclared as different kind of entity 29 | }bcmp; | ^~~~ 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, from a.cc:1: /usr/inclu...
s725868870
p03685
C++
#include <bits/stdc++.h> using namespace std; int r,c; int sd(pair<int,int> a){ int x,y; tie(x,y) = a; if(x==0) return 0; if(y==c) return 1; if(x==r) return 2; if(y==0) return 3; return -1; } bool bcmp(const pair<pair<int,int>,int>& a, const pair<pair<int,...
a.cc: In function 'int main()': a.cc:42:9: error: no matching function for call to 'sort(std::vector<std::pair<std::pair<int, int>, int> >::iterator, std::vector<std::pair<std::pair<int, int>, int> >::iterator, <unresolved overloaded function type>)' 42 | sort(xvec.begin(),xvec.end(),bcmp); | ~~~~^~~~~...
s140218160
p03685
C++
#include <bits/stdc++.h> using namespace std; int r,c; int sd(pair<int,int> a){ int x,y; tie(x,y) = a; if(x==0) return 0; if(y==c) return 1; if(x==r) return 2; if(y==0) return 3; return -1; } bool bcmp(pair<pair<int,int>,int> a, pair<pair<int,int>,int> b){...
a.cc: In function 'int main()': a.cc:42:9: error: no matching function for call to 'sort(std::vector<std::pair<std::pair<int, int>, int> >::iterator, std::vector<std::pair<std::pair<int, int>, int> >::iterator, <unresolved overloaded function type>)' 42 | sort(xvec.begin(),xvec.end(),bcmp); | ~~~~^~~~~...
s536975476
p03685
C++
#include<bits/stdc++.h> #define lld long long int #define ld long double #define mod 1000000007 #define modd 998244353 #define all(v) v.begin(),v.end() #define rep(i,a,b) for(lld i=a;i<=b;i++) #define repr(i,a,b) for(lld i=a;i>=b;i--) #define ar array #define pb push_back #define mp make_pair #define ios ios_base::sync...
a.cc: In function 'int main()': a.cc:60:53: error: lvalue required as left operand of assignment 60 | if (((x==0||x==r)&&(y==0||y==r))&&((a==0||a=r)&&(b==0||b==r))){ | ~~~~^~~
s590875545
p03685
C++
#include <bits/stdc++.h> //#include <boost/multiprecision/cpp_int.hpp> #pragma GCC optimize("O3") #define REP(i,n) for(int i=0;i<n;i++) #define REPP(i,n) for(int i=1;i<=n;i++) #define ALL(obj) (obj).begin(), (obj).end() #define EPS (1e-9) #define INF (1e17) #define PI (acos(-1)) //const double PI = acos(-1); //const do...
In file included from /usr/include/c++/14/bits/stl_algobase.h:71, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::_...
s899195769
p03685
C++
#include <bits/stdc++.h> //#include <boost/multiprecision/cpp_int.hpp> #pragma GCC optimize("O3") #define REP(i,n) for(int i=0;i<n;i++) #define REPP(i,n) for(int i=1;i<=n;i++) #define ALL(obj) (obj).begin(), (obj).end() #define EPS (1e-9) #define INF (1e17) #define PI (acos(-1)) //const double PI = acos(-1); //const do...
a.cc: In function 'int main()': a.cc:100:24: error: request for member 'second' in 'p.std::pair<std::pair<int, int>, int>::second', which is of non-class type 'int' 100 | if(now == p.second.second){ | ^~~~~~ a.cc:103:24: error: request for member 'second' in 'p.std::pair<std::pair<int...
s122535355
p03685
C++
#include <bits/stdc++.h> #include "../lib/lazysegmenttree/lazy_segtree_add_sum.hpp" using namespace std; #define SZ(x) (int)(x.size()) using ll = long long; using ld = long double; using P = pair<int, int>; using vi = vector<int>; using vvi = vector<vector<int>>; using vll = vector<ll>; using vvll = vector<vector<ll...
a.cc:2:10: fatal error: ../lib/lazysegmenttree/lazy_segtree_add_sum.hpp: No such file or directory 2 | #include "../lib/lazysegmenttree/lazy_segtree_add_sum.hpp" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated.
s851492362
p03685
C++
#define _USE_MATH_DEFINES #include <cstdio> #include <cstdlib> #include <algorithm> #include <vector> #include <cstring> #include <queue> #include <set> #include <map> #include <stack> #include <functional> #include <cassert> #include <cmath> #include <string> using namespace std; //template #define rep(i,a,b) for(int...
a.cc:25:17: error: 'INT_MAX' was not declared in this scope 25 | const int inf = INT_MAX / 2; const ll INF = LLONG_MAX / 2; | ^~~~~~~ a.cc:15:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 14 | #include <string> +++ |+#include <...
s702224666
p03685
C++
to be coded
a.cc:1:1: error: 'to' does not name a type; did you mean 'auto'? 1 | to be coded | ^~ | auto
s132853159
p03685
C++
#include <iostream> #include <algorithm> #include <vector> #include <queue> #include <string> #include <stack> using ll = long long; #define onWall(x, y) (min({x, r-x, y, c-y}) == 0) using namespace std; using P = pair<int, int>; #define fi first #define se second int main() { int r, c, n; cin >> r >> c >>...
a.cc: In function 'int main()': a.cc:40:9: error: 'assert' was not declared in this scope 40 | assert(w < 10000000); | ^~~~~~ a.cc:7:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>' 6 | #include <stack> +++ |+#include <cassert> ...
s987902866
p03685
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> P; typedef vector<int> VI; template<class T> bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; } template<class T> bool chmin(T &a, const T &b) { if (a>b) { a=b; return 1; } return 0; } #define _overload3(_1,_...
a.cc: In function 'int main()': a.cc:17:3: error: 'longdouble' was not declared in this scope; did you mean 'double'? 17 | longdouble r,c;int n;cin>>r>>c>>n; | ^~~~~~~~~~ | double a.cc:17:29: error: 'r' was not declared in this scope 17 | longdouble r,c;int n;cin>>r>>c>>n; | ...
s342989596
p03685
C++
#include <bits/stdc++.h> using namespace std; struct ios { static const int IN_LEN = 1 << 18 | 1; char buf[IN_LEN], *s, *t; inline char gc() { return (s == t) && (t = (s = buf) + fread(buf, 1, IN_LEN, stdin)), s == t ? 0 : (*s++); } template <typename _tp> inline ios & operator >> (_tp&x) { static char ch; ch...
a.cc:46:2: error: stray '#' in program 46 | }#include <bits/stdc++.h> | ^ a.cc:46:3: error: 'include' does not name a type 46 | }#include <bits/stdc++.h> | ^~~~~~~ a.cc:49:8: error: redefinition of 'struct ios' 49 | struct ios { | ^~~ a.cc:4:8: note: previous definition of 'struct i...
s735764981
p03685
C++
#include <bits/stdc++.h> using namespace std; struct ios { static const int IN_LEN = 1 << 18 | 1; char buf[IN_LEN], *s, *t; inline char gc() { return (s == t) && (t = (s = buf) + fread(buf, 1, IN_LEN, stdin)), s == t ? 0 : (*s++); } template <typename _tp> inline ios & operator >> (_tp&x) { static char ch; ch...
a.cc:46:2: error: stray '#' in program 46 | }#include <bits/stdc++.h> | ^ a.cc:46:3: error: 'include' does not name a type 46 | }#include <bits/stdc++.h> | ^~~~~~~ a.cc:49:8: error: redefinition of 'struct ios' 49 | struct ios { | ^~~ a.cc:4:8: note: previous definition of 'struct i...
s343607322
p03685
C++
#include "pch.h" #include<iostream> #include<vector> #include<set> #include<queue> #include<map> #include<algorithm> #include<cstring> #include<string> #include<cassert> #include<cmath> #include<climits> #include<iomanip> #include<stack> using namespace std; #define MOD 1000000007 #define REP(i,n) for(int (i)=0;(i)<(...
a.cc:1:10: fatal error: pch.h: No such file or directory 1 | #include "pch.h" | ^~~~~~~ compilation terminated.
s600637147
p03685
C++
#include<bits/stdc++.h> using namespace std; int main(){ int r,c,n; cin>>r>>c>>n; map<int,int> vec; auto id=[&](int x,int y){ if(x==0) return y+1; if(y==c) return c+2+x; if(x==r) return c+2+r+1+c-y; if(y==0) return c+2+r+1+c+1+r-x; return 0; }; for(int i...
a.cc: In function 'int main()': a.cc:29:13: error: no match for 'operator!=' (operand types are 'std::pair<const int, int>' and 'int') 29 | if(i!=-1){ | ~^~~~ | | | | | int | std::pair<const int, int> In file included from /usr/include/c++...
s804948645
p03685
C++
#ifndef Local #pragma GCC optimize ("O3") #pragma GCC optimize ("unroll-loops") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #pragma comment(linker, "/STACK:1024000000,1024000000") #endif #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; usin...
a.cc: In function 'bool noIntersection(const std::vector<std::array<Point, 2> >&)': a.cc:217:58: error: no match for 'operator<=' (operand types are 'const std::array<Point, 2>::value_type' {aka 'const Point'} and 'const std::array<Point, 2>::value_type' {aka 'const Point'}) 217 | events.emplace_back(segments[i][...
s293914971
p03685
C++
#ifndef Local #pragma GCC optimize ("O3") #pragma GCC optimize ("unroll-loops") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #pragma comment(linker, "/STACK:1024000000,1024000000") #endif #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; usin...
a.cc: In function 'int main(int, char**)': a.cc:279:20: error: no match for 'operator+' (operand types are 'Segment' {aka 'std::array<Point, 2>'} and 'int') 279 | sort(seg , seg + 2); | ~~~ ^ ~ | | | | | int | Segment {aka...
s765423366
p03685
C++
#include <bits/stdc++.h> using namespace std; int H, W, N; bool check(int r, int c) { return r == 0 || r == H || c == 0 || c == W; } int calc(int r, int c) { if (r == 0) return c; if (c == W) return W + r; if (r == H) return 2 * W + H - c; if (c == 0) return 2 * (H + W) - r; return -1; } bool solve() {...
a.cc: In function 'bool solve()': a.cc:36:12: error: no match for 'operator==' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'std::pair<int, int>'} and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'}) 36 | if (v[...
s907783791
p03685
C++
#include <bits/stdc++.h> using namespace std; int H, W, N; bool check(int r, int c) { return r == 0 || r == H || c == 0 || c == W; } bool solve() { cin >> H >> W >> N; vector<pair<int, int>> v; for (int i = 0; i < N; i++) { int r1, c1; int r2, c2; cin >> r1 >> c1 >> r2 >> c2; if (!check(r1, ...
a.cc: In function 'bool solve()': a.cc:21:20: error: 'calc' was not declared in this scope 21 | v.emplace_back(calc(r1, c1), i); | ^~~~ a.cc:27:12: error: no match for 'operator==' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::...
s770462053
p03685
C++
#include "bits/stdc++.h" #define _overload3(_1,_2,_3,name,...) name #define _rep(i,n) repi(i,0,n) #define repi(i,a,b) for(int i=int(a),i##_len=(b);i<i##_len;++i) #define BUGAVOID(x) x #define rep(...) BUGAVOID(_overload3(__VA_ARGS__,repi,_rep,_rep)(__VA_ARGS__)) #define sz(c) (int)(c.size()) #define all(c) c.begin(),c....
a.cc: In function 'int main()': a.cc:71:31: error: expected '}' at end of input 71 | write(ans ? "YES" : "NO"); | ^ a.cc:25:12: note: to match this '{' 25 | int main() { | ^
s414301777
p03685
C++
v#include <bits/stdc++.h> typedef long long ll; typedef long double ld; const int INF = 1e9, MOD = 1e9 + 7, ohara = 1e6 + 10; const ll LINF = 1e18; using namespace std; #define rep(i, n) for (int(i) = 0; (i) < (int)(n); (i)++) #define rrep(i, a, b) for (int i = (a); i < (b); i++) #define rrrep(i, a, b) for (int i = (a...
a.cc:1:2: error: stray '#' in program 1 | v#include <bits/stdc++.h> | ^ a.cc:1:1: error: 'v' does not name a type 1 | v#include <bits/stdc++.h> | ^ a.cc:5:7: error: 'll' does not name a type; did you mean 'ld'? 5 | const ll LINF = 1e18; | ^~ | ld a.cc:20:1: error: 'll' d...
s448236281
p03685
C++
#include <bits/stdc++.h> typedef long long ll; typedef long double ld; const int INF = 1e9, MOD = 1e9 + 7, ohara = 1e6 + 10; const ll LINF = 1e18; using namespace std; #define rep(i, n) for (int(i) = 0; (i) < (int)(n); (i)++) #define rrep(i, a, b) for (int i = (a); i < (b); i++) #define rrrep(i, a, b) for (int i = (a)...
a.cc: In function 'int main()': a.cc:250:128: error: 'dat' was not declared in this scope; did you mean 'dat4'? 250 | if ((splimx1 <= dat2[i] && dat2[i] <= splimx2 && dat1[i] == 0) || (splimx1 <= dat4[i] && dat4[i] <= splimx2 && dat[3] == 0)) | ...
s749582068
p03685
C++
#include <bits/stdc++.h> using namespace std; template <class T> using V = vector<T>; template <class T> using VV = V<V<T>>; template <class T> using VVV = V<VV<T>>; template <class S, class T> using P = pair<S, T>; template <class S, class T, class U> using TP = tuple<S, T, U>; using ll = long long; using ull = unsi...
a.cc:1230:4: error: stray '`' in program 1230 | }`y | ^ a.cc: In function 'void Solve()': a.cc:1230:5: error: 'y' was not declared in this scope 1230 | }`y | ^
s661182974
p03685
Java
import java.io.*; import java.math.*; import java.security.*; import java.text.*; public class Main { // Complete the minimumNumber function below. static int minimumNumber(int n, String password) { // Return the minimum number of characters to make the password strong return 1; } private sta...
Main.java:14: error: cannot find symbol private static final Scanner scanner = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:14: error: cannot find symbol private static final Scanner scanner = new Scanner(System.in); ...