submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s754739583 | p03682 | C++ | #include<bits/stdc++.h>
using namespace std;
#define int long long
#define ar array
#define vt vector
#define pb push_back
#define all(c) (c).begin(), (c).end()
#define sz(x) (int)(x).size()
#define F_OR(i, a, b, s) for (int i=(a); (s)>0?i<(b):i>(b); i+=(s))
#define F_OR1(e) F_OR(i, 0, e, 1)
#define F_OR2(i, e) F_OR... | a.cc:149:13: error: 'long long int link [100000]' redeclared as different kind of entity
149 | int link[mxN], size[mxN];
| ^
In file included from /usr/include/x86_64-linux-gnu/bits/sigstksz.h:24,
from /usr/include/signal.h:328,
from /usr/include/c++/14/csignal:42,
... |
s456217947 | p03682 | C++ | #include<bits/stdc++.h>
#include<unordered_set>
#include<unordered_map>
#include <algorithm>
#include <iostream>
#include <string>
#include <cmath>
using namespace std;
#define ll long long
#define rep(i,n) for (ll i = 0; i < (n); i++)
#define FOR(i,a,b) for(ll i=(a);i<(b);i++)
#define FORR(i,a,b)for(ll i=(a);i<=(b);i... | a.cc: In function 'int main()':
a.cc:71:18: error: 'class std::set<long long int>' has no member named 'lowerbound'; did you mean 'lower_bound'?
71 | auto itr=s.lowerbound(p[i].S);
| ^~~~~~~~~~
| lower_bound
|
s720938263 | p03682 | C++ | /**
* author: FromDihPout
* created: 2020-08-01
**/
#include <bits/stdc++.h>
using namespace std;
int find(int node, vector<int> &link) {
while (link[node] != node) {
node = link[node];
}
return node;
}
bool same(int node1, int node2, vector<int> &link) {
return find(node1, link) ==... | a.cc: In function 'int main()':
a.cc:49:28: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 'f'
49 | edges[i] = {x[i+1].f - x[i].f, {x[i].s, x[i+1].s}};
| ^
a.cc:... |
s222599338 | p03682 | C++ | #include<cstdio>
#include<cstdlib>
#include<cmath>
#include<algorithm>
#include<vector>
#include<set>
#include<queue>
#include<iostream>
#include<map>
#include<string>
#define INF 100093100
using namespace std;
vector<tuple<int,int,int>> road;
int x[100005],y[100005],n,root[100005],size[100005],dix,diy,q,w,e,ans=0,fini... | a.cc: In function 'void unite(int, int)':
a.cc:27:8: error: reference to 'size' is ambiguous
27 | if(size[b]>size[a])
| ^~~~
In file included from /usr/include/c++/14/vector:69,
from a.cc:5:
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, lo... |
s520634692 | p03682 | C++ | #include<cstdio>
#include<cstdlib>
#include<cmath>
#include<algorithm>
#include<vector>
#include<set>
#include<queue>
#include<iostream>
#include<map>
#include<string>
#define INF 100093100
using namespace std;
vector<tuple<int,int,int>> road;
int x[100005],y[100005],n,root[100005],size[100005],dix,diy,q,w,e,ans=0,fini... | a.cc: In function 'void unite(int, int)':
a.cc:27:8: error: reference to 'size' is ambiguous
27 | if(size[b]>size[a])
| ^~~~
In file included from /usr/include/c++/14/vector:69,
from a.cc:5:
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, lo... |
s196076628 | p03682 | C++ | #include <bits/stdc++.h>
typedef long long int ll;
using namespace std;
typedef pair<ll, ll> P;
struct edge
{
ll from, end, cost
};
ll prim(vector<bool> &visit, vector<vector<P>> &E)
{
ll total_cost = 0;
priority_queue<P, vector<P>, greater<P>> S;
visit[0] = 1;
ll num0 = 0;
ll cost0 = INFN... | a.cc:10:19: error: expected ';' at end of member declaration
10 | ll from, end, cost
| ^~~~
| ;
a.cc: In function 'll prim(std::vector<bool>&, std::vector<std::vector<std::pair<long long int, long long int> > >&)':
a.cc:21:16: error: 'INFNITY' was not declared ... |
s687018272 | p03682 | C++ |
// Problem : D - Built?
// Contest : AtCoder - AtCoder Beginner Contest 065
// URL : https://atcoder.jp/contests/abc065/tasks/arc076_b
// Memory Limit : 256 MB
// Time Limit : 2000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)
//#pragma GCC optimize("Ofast")
//#pragma GCC optimize ("unroll-loops")... | a.cc: In function 'void init_dsu(long long int)':
a.cc:60:14: error: reference to 'size' is ambiguous
60 | incd(size,n+1);
| ^~~~
a.cc:27:19: note: in definition of macro 'incd'
27 | #define incd(v,n) v.resize(n)
| ^
In file included from /usr/include/c++/14/stri... |
s265295083 | p03682 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;
#define f first
#define s second
#define sz(x) (int)x.size()
#define all(x) begin(x), end(x)
#define rall(x) rbegin(x), rend(x)
#define pb push_back
#d... | a.cc: In function 'll Kruskal()':
a.cc:11:11: error: 'second' was not declared in this scope
11 | #define s second
| ^~~~~~
a.cc:47:35: note: in expansion of macro 's'
47 | int u,v,w; tie(w,u,v) = x;s
| ^
a.cc: In function 'int main()':
a.cc:82:23: e... |
s663469887 | p03682 | Java | import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.NoSuchElementException;
import java.util.Objects;
impo... | Main.java:27: error: cannot find symbol
static StringManager sm = new StringManager(" ");
^
symbol: class StringManager
location: class Main
Main.java:1681: error: cannot find symbol
public MultiSet Factrization(int e) {
^
symbol: class MultiSet
location: class Mathplus
Main.java:27: error... |
s449560456 | p03682 | C++ | /*temp*/
//
//
//
//
//#undef _DEBUG
//#pragma GCC optimize("Ofast")
//不動小数点の計算高速化
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
//#include <boost/multiprecision/cpp_int.hpp>
#ifdef _DEBUG
#include "template.h"
#else
#if __cplusplus >= 201703L
/*Atcoderでしか使えない(c++17 && このテンプレートが使えるならA... | a.cc:17:10: fatal error: boost/sort/pdqsort/pdqsort.hpp: No such file or directory
17 | #include <boost/sort/pdqsort/pdqsort.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
|
s296704754 | p03682 | C++ | /*temp*/
//
//
//
//
//#undef _DEBUG
//#pragma GCC optimize("Ofast")
//不動小数点の計算高速化
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
//#include <boost/multiprecision/cpp_int.hpp>
#ifdef _DEBUG
#include "template.h"
#else
#if __cplusplus >= 201703L
/*Atcoderでしか使えない(c++17 && このテンプレートが使えるならA... | a.cc:17:10: fatal error: boost/sort/pdqsort/pdqsort.hpp: No such file or directory
17 | #include <boost/sort/pdqsort/pdqsort.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
|
s490027876 | p03682 | C++ | a | a.cc:1:1: error: 'a' does not name a type
1 | a
| ^
|
s649224842 | p03682 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
struct Node {
int id;
int x;
int y;
};
struct Edge {
int from;
int to;
int distance;
bool operator<(const Edge &e) const { return distance < e.distance; }
};
int cmpx(Node a, Node b) { return a.x < b.x; }
int cmpy(Node a, Node b) { r... | a.cc: In constructor 'UnionFind::UnionFind(int)':
a.cc:27:48: error: 'i' was not declared in this scope
27 | UnionFind(int N) : par(N), sizes(N, 1) { rep(i, N) par[i] = i; }
| ^
a.cc:27:44: error: 'rep' was not declared in this scope
27 | UnionFind(int N) :... |
s478721690 | p03682 | C++ | int prim(vector<vector<edge>>& G){
int V(G.size());
int res = 0;
//Pi_i first: 距離 second: 頂点
priority_queue<Pi_i, vector<Pi_i>, greater<Pi_i>> que;
VI d(V, INF);
d[0] = 0;
que.push(MP(0, 0));
while(!que.empty()){
Pi_i p = que.top(); que.pop();
int v = p.second;
i... | a.cc:1:10: error: 'vector' was not declared in this scope
1 | int prim(vector<vector<edge>>& G){
| ^~~~~~
a.cc:1:17: error: 'vector' was not declared in this scope
1 | int prim(vector<vector<edge>>& G){
| ^~~~~~
a.cc:1:24: error: 'edge' was not declared in this scope
1 |... |
s592526431 | p03682 | C++ | #include <bits/stdc++.h>
using namespace std;
struct union_find
{
vector<long long> par; //親の番号
vector<long long> rank; //木の深さ(根のランクは0)
vector<long long> siz; //要素xが根なら木の頂点数を格納する
//初期化子リストを用いた初期化
union_find(long long N) : par(N), rank(N), siz(N)
{
for (long long i = 0; i < N; i++)
... | a.cc:90:9: error: 'll' does not name a type
90 | typedef ll long long;
| ^~
a.cc: In function 'int main()':
a.cc:93:5: error: 'll' was not declared in this scope
93 | ll N;
| ^~
a.cc:94:12: error: 'N' was not declared in this scope
94 | cin >> N;
| ^
a.cc:96:25:... |
s824755107 | p03682 | C++ | #include<bits/stdc++.h>
using namespace std;
#define fs first
#define sc second
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define ALL(A) A.begin(),A.end()
#define RALL(A) A.rbegin(),A.rend()
typedef long long ll;
typedef pair<ll,ll> P;
const ll mod=1000000007;
const ll LINF=1LL<<60;
const int IN... | a.cc: In function 'int main()':
a.cc:87:17: error: 'cost' was not declared in this scope; did you mean 'cosl'?
87 | cost[a[i].sc][a[i + 1].sc] = abs(a[i].fs - a[i + 1].fs);
| ^~~~
| cosl
a.cc:95:17: error: 'cost' was not declared in this scope; did you mean... |
s935088943 | p03682 | C++ | #include<bits/stdc++.h>
using namespace std;
#define fs first
#define sc second
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define ALL(A) A.begin(),A.end()
#define RALL(A) A.rbegin(),A.rend()
typedef long long ll;
typedef pair<ll,ll> P;
const ll mod=1000000007;
const ll LINF=1LL<<60;
const int IN... | a.cc:71:1: error: '::main' must return 'int'
71 | ll main(){
| ^~
|
s088508243 | p03682 | C++ | お手上げ | a.cc:1:1: error: '\U0000304a\U0000624b\U00004e0a\U00003052' does not name a type
1 | お手上げ
| ^~~~~~~~
|
s346311858 | p03682 | C++ | #ifdef BUILT_LOCAL
#include "niklib.h"
#endif
#include <iostream>
#include <utility>
#include <vector>
#include <stack>
#include <queue>
#include <algorithm>
#include <string>
#include <cstdio>
#include <map>
#include <set>
#include <list>
using namespace std;
typedef struct {
int x, y;
} pos_t;
typedef struc... | a.cc: In function 'int main()':
a.cc:62:22: error: 'this' cannot be captured by reference
62 | auto pushnext = [&this](pos_t *pp) {
| ^
a.cc: In lambda function:
a.cc:63:31: error: 'px' is not captured
63 | auto rx = lower_bound(px, px + n, pp, cpx);
| ... |
s891528123 | p03682 | C++ | #ifdef BUILT_LOCAL
#include "niklib.h"
#endif
#include <iostream>
#include <utility>
#include <vector>
#include <stack>
#include <queue>
#include <algorithm>
#include <string>
#include <cstdio>
#include <map>
#include <set>
#include <list>
using namespace std;
typedef struct {
int x, y;
} pos_t;
typedef struc... | a.cc: In function 'int main()':
a.cc:62:41: error: request for member 'b' in 'p', which is of pointer type 'pos_t*' (maybe you meant to use '->' ?)
62 | auto rx = lower_bound(px, px + n, p.b, cpx);
| ^
a.cc:63:41: error: request for member 'b' in 'p', which is of poi... |
s529321613 | p03682 | C++ | 1 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 1
| ^
|
s278570444 | p03682 | C++ | #include <iostream>
#include <string>
#include <algorithm>
#include <functional>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <cstdio>
#include <cmath>
#include <tuple>
#include <iomanip>
#include <numeric>
#include <unordered_map>
#include <sstream>
#in... | In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/c++allocator.h:33,
from /usr/include/c++/14/bits/allocator.h:46,
from /usr/include/c++/14/string:43,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_ba... |
s932973671 | p03682 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long;
const int N = 200000+5;
struct Edge{
int x,y;
int dis;
Edge(int x,int y,int dis):x(x),y(y),dis(dis){}
bool operator <(const Edge &rhs)const{
return dis<rhs.dis;
}
}edge[N];
int tot;
struct Node{
int x,y;
}node[N];
int fathe... | a.cc:3:14: error: declaration does not declare anything [-fpermissive]
3 | typedef long long;
| ^~~~
a.cc:12:8: error: no matching function for call to 'Edge::Edge()'
12 | }edge[N];
| ^
a.cc:8:5: note: candidate: 'Edge::Edge(int, int, int)'
8 | Edge(int x,int y,int dis):x(... |
s282808604 | p03682 | C++ | #include <bits/stdc++.h>
#define TYPE(c) remove_reference_t<decltype(c)>
#define REP(i, n) for(TYPE(n) i = 0; i < n; i++)
#define FOR(v, c) for(TYPE(c.begin()) v = c.begin(); v != c.end(); v++)
#define ALL(c) c.begin(), c.end()
#define SORT(c) sort(ALL(c))
#define RSORT(c) sort(ALL(c), greater<TYPE(c)::value_t... | a.cc: In function 'int main()':
a.cc:229:9: error: 'class Graph' has no member named 'setCostToAllVertex'; did you mean 'setCostToAllVertices'?
229 | mst.setCostToAllVertex(0);
| ^~~~~~~~~~~~~~~~~~
| setCostToAllVertices
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/c... |
s592557171 | p03682 | C++ | ///....DH....///
#include <bits/stdc++.h>
#define task "Built"
#define fi(a) freopen(a, "r", stdin)
#define fo(a) freopen(a, "w", stdout)
#define pii pair<int, int>
#define ft first
#define sd second
#define mp ... | In file included from /usr/include/c++/14/cmath:47,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:114,
from a.cc:2:
a.cc:34:42: error: expected unqualified-id before numeric constant
34 | /** PI **/ const double M_PI = 3.14159265358979323846;
| ... |
s605947323 | p03682 | C++ | ///....DH....///
#include <bits/stdc++.h>
#define task "Built"
#define fi(a) freopen(a, "r", stdin)
#define fo(a) freopen(a, "w", stdout)
#define pii pair<int, int>
#define ft first
#define sd second
#define mp ... | In file included from /usr/include/c++/14/cmath:47,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:114,
from a.cc:2:
a.cc:34:42: error: expected unqualified-id before numeric constant
34 | /** PI **/ const double M_PI = 3.14159265358979323846;
| ... |
s550458613 | p03682 | C++ | ///....DH....///
#include <bits/stdc++.h>
#define task "Built"
#define fi(a) freopen(a, "r", stdin)
#define fo(a) freopen(a, "w", stdout)
#define pii pair<int, int>
#define ft first
#define sd second
#define mp ... | In file included from /usr/include/c++/14/cmath:47,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:114,
from a.cc:2:
a.cc:34:42: error: expected unqualified-id before numeric constant
34 | /** PI **/ const double M_PI = 3.14159265358979323846;
| ... |
s532717668 | p03682 | C++ | use std::io::*;
use std::str::FromStr;
use std::clone::Clone;
fn read<T: FromStr>() -> T {
let stdin = stdin();
let stdin = stdin.lock();
let token: String = stdin
.bytes()
.map(|c| c.expect("failed to read char") as char)
.skip_while(|c| c.is_whitespace())
.take_while(|c| !... | a.cc:26:18: error: too many decimal points in number
26 | for i in 0..n {
| ^~~~
a.cc:70:2: error: invalid preprocessing directive #[
70 | #[derive(Clone)]
| ^
a.cc:77:2: error: invalid preprocessing directive #[
77 | #[derive(Clone)]
| ^
a.cc:91:14: error: too many... |
s945132671 | p03682 | C++ | #include <iostream>
#include <cstdio>
#include <string>
#include <algorithm>
#include <utility>
#include <cmath>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <numeric>
#define rep(i, n) for(int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
const ll mod = 1000000007;
class U... | a.cc: In function 'int main()':
a.cc:93:41: error: expected ';' before ')' token
93 | for(int i = 0; i+1 < ids.size(), i++) {
| ^
| ;
a.cc:101:41: error: expected ';' before ')' token
101 | for(int i = 0; i+1 < ids.... |
s254091009 | p03682 | C++ | #include<iostream>
#include<string>
#include<cstdio>
#include<cstring>
#include<vector>
#include<cmath>
#include<algorithm>
#include<functional>
#include<iomanip>
#include<queue>
#include<deque>
#include<ciso646>
#include<random>
#include<map>
#include<set>
#include<complex>
#include<bitset>
#include<stack>
#include<un... | a.cc: In function 'void solve()':
a.cc:43:12: error: request for member 'first' in 'e.std::pair<long long int, std::pair<long long int, long long int> >::first', which is of non-class type 'long long int'
43 | #define fr first
| ^~~~~
a.cc:121:24: note: in expansion of macro 'fr'
121 | ll ... |
s098091066 | p03682 | C++ | #include <bits/stdc++.h>
using namespace std;
template <typename T>
class Graph
{
public:
struct Edge
{
long long to;
T distance;
Edge(const long long t, const T d)
{
this->to = t;
this->distance = d;
}
bool operator<(const Edge &e) const
... | a.cc:43:9: error: ISO C++ forbids declaration of 'UnionFind' with no type [-fpermissive]
43 | UnionFind(long long N)
| ^~~~~~~~~
a.cc: In member function 'int Graph<T>::SimpleUnionFind::UnionFind(long long int)':
a.cc:46:9: warning: no return statement in function returning non-void [-Wreturn-t... |
s634592178 | p03682 | C++ | # include <iostream>
# include <vector>
typedef long long ll;
using namespace std;
struct UnionFind {
vector<int> parent;
UnionFind(int n) : parent(n) {
for (int i = 0; i < n; i++) parent[i] = i;
}
int root(int n) {
if (parent[n] == n) return n;
return parent[n] = root(parent[... | a.cc: In function 'int main()':
a.cc:36:5: error: 'sort' was not declared in this scope; did you mean 'short'?
36 | sort(xBased.begin(), xBased.end());
| ^~~~
| short
|
s676515736 | p03682 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
using pii = pair<int, int>;
#define rep(i,n) for(int i=0;i<(n);++i)
#define in(v) cin>>v;
#define out(v) cout<<v<<"\n"
// union-find
const int MAX_N = 1e5+1;
int parent[MAX_N];
int root(int x) {
if (parent[x] == x)
return x;
return parent[x] = roo... | a.cc: In function 'int main()':
a.cc:53:3: error: 'll' was not declared in this scope
53 | ll ans = 0;
| ^~
a.cc:64:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
64 | ans += cost1;
| ^~~
| abs
a.cc:69:9: error: 'ans' was not declared in this scop... |
s150016667 | p03682 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
const long long MAXN = 1e5+5;
vector<pair<pair<long long,long long>,long long>> polong longs;
vector<pair<pair<long long,long long>,long long>> polong longs2;
vector<pair<long long,pair<long long,long long>>> edges;
long long par[MAXN];
lon... | a.cc:6:58: error: expected initializer before 'longs'
6 | vector<pair<pair<long long,long long>,long long>> polong longs;
| ^~~~~
a.cc:7:58: error: expected initializer before 'longs2'
7 | vector<pair<pair<long long,long long>,long long>> polong lon... |
s003453484 | p03682 | C++ | #include <bits/stdc++.h>
#define REP(i, n) for(decltype(n) i = 0; i < n; i++)
#define ALL(c) c.begin(), c.end()
#define SORT(c) std::sort(ALL(c))
#define RSORT(c) std::sort(ALL(c), std::greater<decltype(c)::value_type>())
using namespace std;
using ll = long long;
const int MOD = (int)1e9 + 7;
const int INF = ... | a.cc:262:2: error: expected '}' at end of input
262 | }
| ^
a.cc:16:19: note: to match this '{'
16 | class CommonGraph {
| ^
a.cc: In constructor 'CommonGraph::CommonGraph(const int&, const Edge::Type&)':
a.cc:46:9: error: class 'CommonGraph' does not have any field named 'vertex_'
... |
s776538566 | p03682 | C++ | #include<iostream>
using namespace std;
int main(
{
return 0;
} | a.cc:5:5: error: cannot declare '::main' to be a global variable
5 | int main(
| ^~~~
a.cc:7:1: error: expected primary-expression before 'return'
7 | return 0;
| ^~~~~~
a.cc:7:1: error: expected '}' before 'return'
a.cc:6:1: note: to match this '{'
6 | {
| ^
a.cc:6:2: error: expected ... |
s174446663 | p03682 | C++ | //おまじない
#include <iostream>
#include<iomanip>
#include <algorithm>
#include <vector>
#include <string>
#include <utility>
#include <queue>
#define INF 1e9+7
#define rep(i,n) for(int i=0;i<n;i++)
#define NO cout<<"NO"<<endl;
#define YES cout << "YES"<<endl;
#define No cout << "No"<<endl;
#define Yes cout << "Yes"<<endl;... | In file included from /usr/include/c++/14/vector:66,
from a.cc:5:
/usr/include/c++/14/bits/stl_vector.h: In instantiation of 'struct std::_Vector_base<long long int, std::pair<long long int, int> >':
/usr/include/c++/14/bits/stl_vector.h:428:11: required from 'class std::vector<long long int, std::pa... |
s887584179 | p03682 | C++ | #include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<n;i++)
#define REPP(i,n) for(int i=1;i<=n;i++)
const double PI = acos(-1);
const double EPS = 1e-15;
long long INF=(long long)1E17;
#define i_7 (long long)(1E9+7)
long mod(long a){
long long c=a%i_7;
if(c>=0)return c;
return c+i_7;
}
using namespace st... | a.cc: In function 'void init(int)':
a.cc:21:9: error: reference to 'rank' is ambiguous
21 | 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,
... |
s901499326 | p03682 | C++ | #include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<iomanip>
#include<math.h>
#include<complex>
#include<queue>
#include<deque>
#include<stack>
#include<map>
#include<set>
#include<bitset>
using namespace std;
#define REP(i,m,n) for(int i=(int)m ; i < (int) (n) ; ++i )
#define rep(i,n) REP... | a.cc: In function 'int main()':
a.cc:94:23: error: expected '}' at end of input
94 | cout << ans << endl;
| ^
a.cc:76:11: note: to match this '{'
76 | int main(){
| ^
|
s960562051 | p03682 | C++ | #include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<iomanip>
#include<math.h>
#include<complex>
#include<queue>
#include<deque>
#include<stack>
#include<map>
#include<set>
#include<bitset>
using namespace std;
#define REP(i,m,n) for(int i=(int)m ; i < (int) (n) ; ++i )
#define rep(i,n) REP... | a.cc: In function 'int main()':
a.cc:93:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
93 | cout << ans << endl;
| ^~~
| abs
|
s180704595 | p03682 | C++ | #include <algorithm>
#include <iostream>
#include <numeric>
#include <vector>
using namespace std;
struct UnionFind() {
vector<int> par;
UnionFind(itn n) : par(n, -1) {}
int root(int x) {
if(par[x] < 0)
return 0;
else
return par[x] = root(par[x]);
}
int issam... | a.cc:7:18: error: expected unqualified-id before ')' token
7 | struct UnionFind() {
| ^
a.cc: In function 'int main()':
a.cc:38:5: error: 'vecto' was not declared in this scope
38 | vecto<Edge> edges;
| ^~~~~
a.cc:38:15: error: expected primary-expression before '>' token
... |
s010943646 | p03682 | C++ | #include <bits/stdc++.h>
#define REP(i, n) for(ll i = 0; i < (ll)n; i++)
#define FOR(i, a, b) for(ll i = (a); i < (ll)b; i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define INF 1000000000000000
using namespace std;
typedef long long ll;
typedef double db;
typedef string str;
typedef pair<ll, ll> p;
constexpr int M... | /tmp/cc134FFr.o: in function `prim()':
a.cc:(.text+0xaf): relocation truncated to fit: R_X86_64_PC32 against symbol `mincost' defined in .bss section in /tmp/cc134FFr.o
a.cc:(.text+0xc9): relocation truncated to fit: R_X86_64_PC32 against symbol `used' defined in .bss section in /tmp/cc134FFr.o
a.cc:(.text+0xd7): reloc... |
s763388602 | p03682 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
int n; // 要素数
cin >> n;
int* x = new int[n];
int* y = new int[n];
int* q = new int[n] {0}; // 道が出来たか
for (int i = 0; i < n; i++)
{
cin >> x[i] >> y[i];
}
int money = 0;
int index = 0;
... | a.cc: In function 'int main()':
a.cc:33:59: error: 'fabsl' was not declared in this scope
33 | long road = fminl(fabsl(x[i] - x[j]), fabsl(y[i] - y[j]));
| ^~~~~
a.cc:33:53: error: 'fminl' was not declared in this... |
s565997787 | p03682 | C++ | #include<cstdio>
#include<iostream>
#include<cmath>
#include<algorithm>
typedef long long ll;
const ll INF=1E9+10;
const ll MAXN=1e5+10;
using namespace std;
int par[2*MAXN];
struct NODE{
ll len,a,b;
}node[2*MAXN];
struct NO{
ll sit,order;
}x[MAXN],y[MAXN];
ll rank[MAXN];
bool cmp1(NO i,NO j){
return i.sit<j... | a.cc: In function 'void init(int)':
a.cc:33:17: error: reference to 'rank' is ambiguous
33 | rank[i]=i;//最开始第i个顶点的集合是他自己
| ^~~~
In file included from /usr/include/c++/14/bits/move.h:37,
from /usr/include/c++/14/bits/exception_ptr.h:41,
from /usr... |
s400530149 | p03682 | C++ | #include <iostream>
#include <vector>
using namespace std;
typedef long long ll;
const int MAXN = 100010;
int n;
struct location {
ll x, y;
int pos;
};
struct edge {
int from, to;
ll cost;
};
location loc[MAXN];
bool xcompare(location a, location b) {
return a.x < b.x;
}
bool ycompare(location a, locatio... | a.cc: In function 'void init()':
a.cc:40:7: error: reference to 'size' is ambiguous
40 | size[i] = 1;
| ^~~~
In file included from /usr/include/c++/14/string:53,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
... |
s079274367 | p03682 | C++ | #include <bits/stdc++.h>
#define FOR(i, a, b) for(int i=(a); i<(b); i++)
#define REP(i, n) FOR(i, 0, n)
#define all(x) (x).begin(), (x).end()
#define bit(x) (1L << (x))
using ll = long long;
using namespace std;
template<typename T>
vector<T> make_v(size_t a,T b){return vector<T>(a,b);}
template<typename... Ts>
auto... | a.cc: In function 'int main()':
a.cc:84:18: error: expected ';' before 'vector'
84 | int n; cin >> n vector<node> p(n), q(n);
| ^ ~~~~~~
| ;
a.cc:87:5: error: 'p' was not declared in this scope
87 | p[i] = {i, x, y};
| ^
a.cc:88:5: error: 'q' was not ... |
s161620103 | p03682 | C++ | #include <iostream>
#include <vector>
#include <numeric>
using namespace std;
struct UnionFind {
vector<int> par;
UnionFind(int n) : par(n, -1) { }
int root(int x) {
if (par[x] < 0) return x;
else return par[x] = root(par[x]);
}
bool issame(int x, int y) {
return root(x) == ... | a.cc: In function 'int main()':
a.cc:38:5: error: 'sort' was not declared in this scope; did you mean 'short'?
38 | sort(ids.begin(), ids.end(), [&](int i, int j) { return x[i] < x[j]; });
| ^~~~
| short
|
s261099675 | p03682 | C | N = input()
data = [map(int,raw_input().split()) for i in range(N)]
def hoge(x,y):
return x[1]-y[1]
data.sort()
for i in range(1,N-1):
data[i].append(min(data[i+1][0]-data[i][0],data[i][0]-data[i-1][0]))
data[0].append(data[1][0]-data[0][0])
data[N-1].append(data[N-1][0]-data[N-2][0])
data.sort(hoge)
for ... | main.c:1:1: warning: data definition has no type or storage class
1 | N = input()
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'N' [-Wimplicit-int]
main.c:1:5: error: implicit declaration of function 'input' [-Wimplicit-function-declaration]
1 | N = input()
| ^~~~~
main.c:1:5:... |
s144695254 | p03682 | C++ | #pragma GCC optimize ("O3")
#include <iostream>
#include <cstddef>
#include <numeric>
#include <algorithm>
#include <vector>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <queue>
using namespace std;
using QWORD = unsigned long long;
using SQWORD = long long;
using DWORD = unsi... | a.cc: In function 'DWORD add_neighbor_dist(std::vector<std::pair<unsigned int, unsigned int> >, DWORD*, DWORD, pqDistInfo&)':
a.cc:157:1: warning: no return statement in function returning non-void [-Wreturn-type]
157 | }
| ^
a.cc: In function 'int main()':
a.cc:229:20: error: 'dwTotalCost' was not declared in ... |
s597839202 | p03682 | C++ | #pragma GCC optimize ("O3")
#include <iostream>
#include <cstddef>
#include <numeric>
#include <algorithm>
#include <vector>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <queue>
using namespace std;
using QWORD = unsigned long long;
using SQWORD = long long;
using DWORD = unsi... | a.cc: In function 'DWORD add_neighbor_dist(std::vector<std::pair<unsigned int, unsigned int> >, DWORD*, DWORD, pqDistInfo&)':
a.cc:157:1: warning: no return statement in function returning non-void [-Wreturn-type]
157 | }
| ^
a.cc: In function 'int main()':
a.cc:229:20: error: 'dwTotalCost' was not declared in ... |
s136168899 | p03682 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <cstdlib>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <map>
#include <stack>
#include <queue>
#include <set>
#include <cstring>
using namespace std;
// ascending order
#define vsort(v) sort(v.begin(), v.end())
// descending order
#de... | a.cc:32:35: warning: overflow in conversion from 'double' to 'int' changes value from '4.99995e+9' to '2147483647' [-Woverflow]
32 | const int MAX_E = 1e5 * (1e5 - 1) / 2;
| ~~~~~~~~~~~~~~~~^~~
a.cc:40:9: error: size of array 'es' exceeds maximum object size '9223372036854775807'
40 | edge... |
s868689327 | p03682 | C++ | //
// abc065d.cpp
//
//
// Created by Yoshida Satoshi on 2018/11/09.
//
#include <stdio.h>
#include <iostream>
#include <queue>
#include <algorithm>
#include <cmath>
#include <vector>
#define MAX 100005
using namespace std;
typedef long long ll;
struct Path
{
int from,to,cost;
bool operator<(const P... | a.cc:70:2: error: expected ';' after struct definition
70 | }
| ^
| ;
|
s767033355 | p03682 | C++ | //
// abc065d.cpp
//
//
// Created by Yoshida Satoshi on 2018/11/09.
//
#include <stdio.h>
#include <iostream>
#include <queue>
#include <algorithm>
#include <cmath>
#include <vector>
#define MAX 100005
using namespace std;
typedef long long ll;
struct Path
{
int from,to,cost;
bool operator<(const P... | a.cc:70:2: error: expected ';' after struct definition
70 | }
| ^
| ;
a.cc: In function 'int main()':
a.cc:103:13: error: 'cnt' was not declared in this scope; did you mean 'int'?
103 | cnt++;
| ^~~
| int
|
s686600576 | p03682 | C++ | //
// abc065d.cpp
//
//
// Created by Yoshida Satoshi on 2018/11/09.
//
#include <stdio.h>
#include <iostream>
#include <queue>
#include <algorithm>
#include <cmath>
#include <vector>
#define MAX 100005
using namespace std;
typedef long long ll;
struct Path
{
int from,to,cost;
bool operator<(const P... | a.cc: In function 'int main()':
a.cc:84:17: error: 'v' was not declared in this scope
84 | if(cnt==v-1) break;
| ^
|
s279814593 | p03682 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for(int i = 0; i < (n); i++)
#define rep1(i, n) for(int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce(x) cerr << (x) << "\n"
#define cesp(x) cerr << (x) << " "
#define Would
#defi... | a.cc: In function 'int main()':
a.cc:59:59: error: no matching function for call to 'min(ll&, int&)'
59 | edanagasa[itr.first] = min(edanagasa[itr.first], itr.second.second);
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In... |
s008616229 | p03682 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
#include<cctype>
#include<utility>
#include<string>
#include<cmath>
#include <numeric>
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= ... | a.cc: In function 'void init(int)':
a.cc:48:9: error: reference to 'rank' is ambiguous
48 | rank[i] = 0;/*各ノード自体の高さは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/e... |
s711619603 | p03682 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
#include<cctype>
#include<utility>
#include<string>
#include<cmath>
#include <numeric>
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= ... | a.cc: In function 'void init(ll)':
a.cc:48:9: error: reference to 'rank' is ambiguous
48 | rank[i] = 0;/*各ノード自体の高さは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/ex... |
s159274764 | p03682 | C++ | #include <bits/stdc++.h>
// statics
using namespace std;
using int64 = int_fast64_t;
using PAIR = pair<int, int>;
constexpr int INF = 1 << 30;
constexpr int64 LINF = 1LL << 60;
constexpr int MOD = 1e9 + 7;
constexpr int MAX_N = 1e5 + 1;
// init/input
#define int int64
#define INIT ios::sync_with_stdio(false);cin.tie(0... | a.cc: In function 'int main()':
a.cc:97:21: error: 'p' was not declared in this scope
97 | tie(p, tmp, from) = y[i];
| ^
a.cc:97:24: error: 'tmp' was not declared in this scope; did you mean 'tm'?
97 | tie(p, tmp, from) = y[i];
| ... |
s247978935 | p03682 | C++ | #include <iostream>
#include <vector>
using namespace std;
int *par, *ranks;
int N;
struct P {int n, x, y;};
struct PATH {int v1, v2, cost;};
void init()
{
for (int i = 0; i < N; i++) {
par[i] = i;
ranks[i] = 0;
}
}
int find(int x)
{
if (par[x] == x) return x;
return par[x] = find(par[x]);
}
void un... | a.cc: In function 'int main()':
a.cc:67:3: error: 'sort' was not declared in this scope; did you mean 'short'?
67 | sort(p, p + N, comp_x);
| ^~~~
| short
|
s574669199 | p03682 | C++ | #include <algorithm>
#include <vector>
#include <unordered_map>
#include <unordered_set>
#include <queue>
#include <functional>
#include <climits>
#include <iostream>
namespace std {
template <>
class hash<std::pair<int, int>> {
public:
size_t operator()(const std::pair<int, int>& x) const {
... | a.cc: In function 'int main()':
a.cc:213:14: error: expected '}' at end of input
213 | return 0;
| ^
a.cc:111:1: note: to match this '{'
111 | {
| ^
|
s680268192 | p03682 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
#define REP(i, n) for(int i=0; i<(n); ++i)
#define FOR(i, a, b) for(int i=(a); i<(b); ++i)
#define FORR(i, a, b) for... | a.cc:37:17: error: 'edge' does not name a type
37 | bool comp(const edge& e1, const edge& e2){
| ^~~~
a.cc:37:33: error: 'edge' does not name a type
37 | bool comp(const edge& e1, const edge& e2){
| ^~~~
a.cc: In function 'bool comp(const int&, const int... |
s124258122 | p03682 | C++ | #include <bits/stdc++.h>
#define ll long long
#define met(a,0) memset(a,0,sizeof(a))
#define inf 0x3f3f3f3f
using namespace std;
const int mod=1e9+7;
const int N=1e5+10;
int book[N];
void init()
{
for(int i=1; i<=n; i++)
book[i]=i;
}
int getfa(int x)
{
if(book[x]!=x)
book[x]=getfa(book[x]);
... | a.cc:3:15: error: expected parameter name, found "0"
3 | #define met(a,0) memset(a,0,sizeof(a))
| ^
a.cc: In function 'void init()':
a.cc:11:21: error: 'n' was not declared in this scope
11 | for(int i=1; i<=n; i++)
| ^
a.cc: In function 'int main()':
a.cc:53:25:... |
s989492590 | p03682 | Java | static ArrayList<Edge> edges = new ArrayList<>();
public static void addEdge(int f, int t, long c)
{
edges.add(new Edge(f, t, c));
}
static class Edge implements Comparable<Edge>
{
int f;
int t;
long toCost;
Edge(int f, int to, long cost)
{
... | Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
static ArrayList<Edge> edges = new ArrayList<>();
^
(use --enable-preview to enable unnamed classes)
1 error
|
s880292529 | p03682 | C++ | #include <cstdio>
#include <cstdlib>
#include <vector>
#include <algorithm>
#include <iostream>
#include <queue>
#include <functional>
using namespace std;
typedef long long ll;
ll min(ll a, ll b){
if(a<b){return a;}
else{return b;}
}
ll x[100005];
ll y[100005];
typedef pair<ll,int> pii;
bool used[100005];
int N... | a.cc: In function 'll prim()':
a.cc:27:5: error: 'memset' was not declared in this scope
27 | memset(used, 0, sizeof(used));
| ^~~~~~
a.cc:8:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
7 | #include <functional>
+++ |+#include <cstrin... |
s566155194 | p03682 | C++ | #include "bits/stdc++.h"
using namespace std;
#define MOD 1000000007
#define INF 1<<50LL
#define FOR(i,a,b) for(long long i=(a);i<(b);i++)
#define RFOR(i,a,b) for(long long i = (b-1);i>=a;i--)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) RFOR(i,0,n)
#define ITR(itr,mp) for(auto itr = (mp).begin(); itr != (mp).end(); ... | a.cc: In function 'int unit(int, int)':
a.cc:62:1: warning: no return statement in function returning non-void [-Wreturn-type]
62 | }
| ^
a.cc: In function 'int main()':
a.cc:79:25: warning: narrowing conversion of 'i' from 'long long int' to 'int' [-Wnarrowing]
79 | node.push_back({x,y,i});
| ... |
s837195504 | p03682 | C++ | #include<iostream>
#include<queue>
using namespace std;
using pii = pair<int, int>;
const int mxn = 100010;
struct edge{int from, to, cost;};
bool comp(edge a, edge b) {
return a.cost < b.cost;
}
vector<edge> es;
int par[mxn];
void init_unionfind(int n){
fill(par, par + n, -1);
}
int root(int x) {
re... | a.cc: In function 'int main()':
a.cc:49:5: error: 'sort' was not declared in this scope; did you mean 'short'?
49 | sort(xs.begin(), xs.end());
| ^~~~
| short
|
s513366385 | p03682 | C++ | #include <iostream>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <vector>
#include <numeric> // accumulate(v.begin(), v.end(), 0)
using namespace std;
#define ll long long
#define MAX_N 100000
int par[MAX_N]; // 親の番号
int rank[MAX_N];
// n要素で初期化
void init(int n){
for(int i=0; i<n; i++){
pa... | a.cc: In function 'void init(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,
... |
s041124546 | p03682 | 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 p... | a.cc: In function 'int main()':
a.cc:103:28: error: no matching function for call to 'Graph::Graph(int&, std::vector<std::pair<long long int, int> >&, std::vector<std::pair<long long int, int> >&)'
103 | Graph g = Graph(n, x, y);
| ^
a.cc:68:5: note: candidate: 'Graph::Graph(int, ... |
s415168162 | p03682 | C++ | #include <iostream>
#include <string>
#include <vector>
// #include <unordered_map>
#include <algorithm>
#include <sstream>
#include <queue>
#include <deque>
#include <bitset>
#include <iterator>
#include <list>
#include <stack>
#include <map>
#include <set>
#include <functional>
#include <numeric>
#include <utility>
#... | a.cc:82:10: fatal error: union_find.cpp: No such file or directory
82 | #include "union_find.cpp"
| ^~~~~~~~~~~~~~~~
compilation terminated.
|
s511628331 | p03682 | C++ | #include <iostream>
#include <string>
#include <vector>
// #include <unordered_map>
#include <algorithm>
#include <sstream>
#include <queue>
#include <deque>
#include <bitset>
#include <iterator>
#include <list>
#include <stack>
#include <map>
#include <set>
#include <functional>
#include <numeric>
#include <utility>
#... | a.cc:49:10: fatal error: union_find.cpp: No such file or directory
49 | #include "union_find.cpp"
| ^~~~~~~~~~~~~~~~
compilation terminated.
|
s763148577 | p03682 | C++ | sort(ALL(x));
sort(ALL(y));
REP(i, N - 1) {
// x
int tmp1, tmp2, from, to, cost;
tie(tmp1, tmp2, from) = x[i];
tie(tmp2, cost, to) = x[i + 1];
e.emplace_back(Edge(from, to, abs(tmp2 - tmp1)));
}
REP(i, N) {
// y
int tmp1, tmp2, from, to, cost;
tie(tmp1, tmp2, from) = y[i];
... | a.cc:1:7: error: expected constructor, destructor, or type conversion before '(' token
1 | sort(ALL(x));
| ^
a.cc:2:7: error: expected constructor, destructor, or type conversion before '(' token
2 | sort(ALL(y));
| ^
a.cc:4:6: error: expected constructor, destructor, or type convers... |
s893106946 | p03682 | C++ | # include <iostream>
# include <algorithm>
#include <array>
# include <cassert>
#include <cctype>
#include <climits>
#include <numeric>
# include <vector>
# include <string>
# include <set>
# include <map>
# include <cmath>
# include <iomanip>
# include <functional>
# include <tuple>
# include <utility>
# include <stac... | In file included from /usr/include/c++/14/bits/stl_algobase.h:71,
from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from... |
s566888748 | p03682 | C++ | #include <cstdio>
#include <vector>
#include <stack>
#include <iostream>
#include <string>
#include <map>
#include <queue>
#include <cassert>
#include <tuple>
using namespace std;
typedef long long ll;
const ll INF = 1e15;
using Weight = ll;
class Edge {
public:
int s, d;
Weight w;
Edge() : s(0), d(0), w(0) {}
E... | a.cc: In function 'int main()':
a.cc:69:9: error: 'sort' was not declared in this scope; did you mean 'short'?
69 | sort(xv.begin(), xv.end());
| ^~~~
| short
|
s371764499 | p03682 | C++ | #include <iostream>
#include <queue>
#include <vector>
#include <utility>
#include <algorithm>
#include <cmath>
#define INF (LLONG_MAX>>2)
using namespace std;
typedef long long ll;
class edge{
public:
int to;
int weight;
edge(int to, int weight){
this->to = to;
this->weight = weight;
}
};
ll minimum... | a.cc: In function 'll minimumSpannTree(int, std::vector<edge>*)':
a.cc:7:14: error: 'LLONG_MAX' was not declared in this scope
7 | #define INF (LLONG_MAX>>2)
| ^~~~~~~~~
a.cc:63:17: note: in expansion of macro 'INF'
63 | minDis[i] = INF;
| ^~~
a.cc:7:1: note: 'LLONG_M... |
s554938717 | p03682 | C++ | #include <iostream>
#include<cstdlib>
#include<queue>
#include<set>
#include<vector>
#include<string>
#include<algorithm>
#include<stack>
#include<map>
#include<cstdio>
using namespace std;
#define rep(i,a) for(int i=0;i<a;i++)
#define mp make_pair
#define pb push_back
#define ll __int64
//#define ll long long
#define... | a.cc:16:12: error: '__int64' does not name a type; did you mean '__int64_t'?
16 | #define ll __int64
| ^~~~~~~
a.cc:21:1: note: in expansion of macro 'll'
21 | ll x[110000],y[110000];
| ^~
a.cc:16:12: error: '__int64' was not declared in this scope; did you mean '__int64_t'?
16 | #define... |
s620612603 | p03682 | C++ | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
#define INF (1<<30)
#define INFLL (1ll<<60)
typedef pair<ll, int> PLI;
typedef pair<int, int> P;
typedef pair<ll, P> E;
#define cost first
#define from second.first
#define to second.second
#define MOD (1000000007ll)
#define l_ength size
void mul_mod(... | a.cc: In function 'void ufinit(int)':
a.cc:27:17: error: reference to 'rank' is ambiguous
27 | 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... |
s851106145 | p03682 | C++ | #include<cstdio>
#include<algorithm>
using namespace std;
typedef long long ll;
typedef pair<ll, int> P;
struct edge{ int u, v; ll cost; };
bool cmp(const edge& e1, const edge& e2){
return e1.cost < e2.cost;
}
int par[100000], rank[100000];
int find(int x){
if(par[x] == x) return x;
return par[x] = find(par[x]... | a.cc: In function 'void unite(int, int)':
a.cc:25:12: error: reference to 'rank' is ambiguous
25 | if(rank[x] < rank[y]) par[x] = y;
| ^~~~
In file included from /usr/include/c++/14/bits/stl_pair.h:60,
from /usr/include/c++/14/bits/stl_algobase.h:64,
from /u... |
s267141370 | p03682 | C++ |
#include<bits/stdc++.h>
using namespace std;
struct edge{
int u, v, cost;
};
struct node{
int x, y, id;
};
int pare[100000];
int trank[100000];
bool xcomp(node& x, node& y){
return x.x<y.x;
}
bool ycomp(node& x, node& y){
return x.y<y.y;
}
bool ccomp(edge& x, edge& y){
retu... | a.cc: In function 'int main()':
a.cc:60:21: error: expected ';' before 'n'
60 | node n;
| ^~
| ;
a.cc:61:17: error: 'n' was not declared in this scope
61 | n.x=x;n.y=y;n.id=i;
| ^
a.cc:68:21: error: expected ... |
s449610567 | p03682 | C++ | #include<bits/stdc++.h>
using namespace std;
struct edge{
int u, v, cost;
};
struct node{
int x, y, id;
};
int pare[100000];
int trank[100000];
bool xcomp(node& x, node& y){
return x.x<y.x;
}
bool ycomp(node& x, node& y){
return x.y<y.y;
}
bool ccomp(node& x, node& y){
retur... | a.cc: In function 'bool ccomp(node&, node&)':
a.cc:23:18: error: 'struct node' has no member named 'cost'
23 | return x.cost<y.cost;
| ^~~~
a.cc:23:25: error: 'struct node' has no member named 'cost'
23 | return x.cost<y.cost;
| ^~~~
a.cc: In fu... |
s992966165 | p03682 | C++ | #include<bits/stdc++.h>
using namespace std;
struct edge{
int u, v, cost;
};
struct node{
int x, y, id;
};
int pare[100000];
int trank[100000];
bool xcomp(node& x, node& y){
return x.x<y.x;
}
bool ycomp(node& x, node& y){
return x.y<y.y;
}
bool ccomp(node& x, node& y){
retur... | a.cc: In function 'bool ccomp(node&, node&)':
a.cc:23:18: error: 'struct node' has no member named 'cost'
23 | return x.cost<y.cost;
| ^~~~
a.cc:23:25: error: 'struct node' has no member named 'cost'
23 | return x.cost<y.cost;
| ^~~~
a.cc: In fu... |
s246724300 | p03682 | C++ | #include "Union_Find.h"
bool UnionFindTree::Is_valid_index(int index) {
return index >= 0 && index < whole_size_m;
}
int UnionFindTree::Root_of_rec(int index) {
if (parent_p_m[index] == index) {
return index;
} else {
return parent_p_m[index] = Root_of_rec(parent_p_m[index]);
}
}
UnionFindTree::UnionFindTree... | a.cc:1:10: fatal error: Union_Find.h: No such file or directory
1 | #include "Union_Find.h"
| ^~~~~~~~~~~~~~
compilation terminated.
|
s692300553 | p03682 | C++ | #include<bits/stdc++.h>
using namespace std;
const int MAX_N = 100001;
struct edge {int u,v,cost;};
typedef struct edge edge;
vector<edge> es;
bool comp(const edge& e1,const edge& e2){
return e1.cost<e2.cost;
}
bool comp1(pair<int,int> p1,pair<int,int> p2){
return p1.first<p2.first;
}
bool comp2(pair<int,int> p1... | a.cc: In function 'void init(int)':
a.cc:24:5: error: reference to 'rank' is ambiguous
24 | 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,
... |
s524811344 | p03682 | C++ | #include <iostream>
#include <vector>
#include <numeric>
using namespace std;
class Edge {
public:
int from;
int to;
int cost;
Edge(int from, int to, int cost): from{from}, to{to}, cost{cost} {}
bool operator<(const Edge& other) const {
return this->cost < other.cost;
}
bool opera... | a.cc: In function 'int kruskal(int, std::vector<Edge>&)':
a.cc:61:5: error: 'sort' was not declared in this scope; did you mean 'short'?
61 | sort(edges.begin(), edges.end());
| ^~~~
| short
a.cc: In function 'int main()':
a.cc:85:5: error: 'sort' was not declared in this scope; did you mean ... |
s490533664 | p03682 | C++ | #include <climits>
#include <iostream>
#include <string.h>
#include <algorithm>
using namespace std;
#define MAX_X_Y 1000000000
#define MAX_N 100000
class Node
{
public:
int x, y, index, cost = MAX_X_Y;;
bool used = false;
};
int A[MAX_N][MAX_N] = {};
Node *nodes = new Node[MAX_N];
int prim(in... | /tmp/ccCtRh7A.o: in function `prim(int)':
a.cc:(.text+0x11): relocation truncated to fit: R_X86_64_PC32 against symbol `nodes' defined in .bss section in /tmp/ccCtRh7A.o
a.cc:(.text+0x36): relocation truncated to fit: R_X86_64_PC32 against symbol `nodes' defined in .bss section in /tmp/ccCtRh7A.o
a.cc:(.text+0x5c): rel... |
s752739979 | p03682 | C++ | #include <climits>
#include <iostream>
#include <string.h>
#include <algorithm>
using namespace std;
#define MAX_X_Y 1000000000
#define MAX_N 100000
class Node
{
public:
int x, y, index, cost = MAX_X_Y;;
bool used = false;
};
int n;
int A[MAX_N][MAX_N] = {};
Node *nodes = new Node[MAX_N];
int ... | /tmp/ccEpedsU.o: in function `prim()':
a.cc:(.text+0xe): relocation truncated to fit: R_X86_64_PC32 against symbol `nodes' defined in .bss section in /tmp/ccEpedsU.o
a.cc:(.text+0x33): relocation truncated to fit: R_X86_64_PC32 against symbol `nodes' defined in .bss section in /tmp/ccEpedsU.o
a.cc:(.text+0x59): relocat... |
s676140436 | p03682 | C++ | #include <climits>
#include <iostream>
#include <string.h>
#include <algorithm>
using namespace std;
#define MAX_N 100000
class Node
{
public:
int x, y, index, cost = INT_MAX;;
bool used = false;
};
int n;
int A[MAX_N][MAX_N] = {};
Node *nodes = new Node[MAX_N];
int prim()
{
int i, u, v, min... | /tmp/ccIgo44U.o: in function `prim()':
a.cc:(.text+0xe): relocation truncated to fit: R_X86_64_PC32 against symbol `nodes' defined in .bss section in /tmp/ccIgo44U.o
a.cc:(.text+0x33): relocation truncated to fit: R_X86_64_PC32 against symbol `nodes' defined in .bss section in /tmp/ccIgo44U.o
a.cc:(.text+0x59): relocat... |
s404440444 | p03682 | C++ | #include <iostream>
#include <string.h>
#include <algorithm>
using namespace std;
#define MAX_N 100000
class Node
{
public:
int x, y, index, cost = INT_MAX;;
bool used = false;
};
int n;
int A[MAX_N][MAX_N] = {};
Node *nodes = new Node[MAX_N];
int prim()
{
int i, u, v, minv, sum = 0;
nod... | a.cc:11:33: error: 'INT_MAX' was not declared in this scope
11 | int x, y, index, cost = INT_MAX;;
| ^~~~~~~
a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
3 | #include <algorithm>
+++ |+#include ... |
s801595684 | p03682 | C++ | // http://abc065.contest.atcoder.jp/tasks/arc076_b
#include <algorithm>
#include <cstdio>
#include <cstdlib>
class UnionFind {
int n;
int * parent;
int * depth;
public:
UnionFind (int n) {
this->n = n;
parent = new int[n];
depth = new int[n];
for (int i = 0; i < n; ++i) {
parent[i] = i;
depth[i] = 1... | a.cc: In function 'int main()':
a.cc:55:14: error: 'vector' is not a member of 'std'
55 | std::vector<Town> towns(n);
| ^~~~~~
a.cc:6:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
5 | #include <cstdlib>
+++ |+#include <... |
s499699558 | p03682 | C++ | #include<iostream>
#include<vector>
#include<utility>
#include<algorithm>
using namespace std;
typedef long long ll;
int par[100000];
int rank[100000];
int n;
void init(int k){
for(int i = 0; i < k; ++i){
par[i] = i;
rank[i] = 0;
}
}
int find(int x){
if(par[x] == x){
return x;
}else{
return par[x] = find... | a.cc: In function 'void init(int)':
a.cc:15:17: error: reference to 'rank' is ambiguous
15 | 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... |
s368880217 | p03682 | C++ | #include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
// UnionFind木
// 素集合データ構造というデータ構造です
// いくつかの対象が集合に分類されている状況で
// 2つの要素が同じ集合にいるのか、それとも違う集合にいるのか
// ということを効率的に調べる機能があります
class UnionFind {
private:
std::vector<int> parent; // あるデータの親
std::vector<int> sizes; // あるデータが属する木のサイズ
public:
/... | a.cc:83:1: error: expected unqualified-id before 'public'
83 | public Graph {
| ^~~~~~
a.cc: In function 'int main()':
a.cc:160:3: error: 'Graph' was not declared in this scope; did you mean 'isgraph'?
160 | Graph g( N );
| ^~~~~
| isgraph
a.cc:165:5: error: 'g' was not declared in this sco... |
s861290167 | p03682 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
typedef long long LL;
struct X{
int id;
LL x;
LL y;
X(){
id=0;
x=0;
y=0;
}
X(int _id,LL _x,LL _y){
id=_id;
x=_x;
y=_y;
}
LL getCost(X &x1){
LL X1=x-x1.x;
if (X1<0){
X1=-X1;
}
LL Y1=y-x1.y;
if (Y1<0){
Y1=-... | a.cc: In function 'int main(int, char**)':
a.cc:165:39: error: 'edge' was not declared in this scope
165 | graph.edges.push_back(edge);
| ^~~~
|
s186623957 | p03682 | C++ | #include<iostream>
#include<cstring>
#include<math.h>
#include<stdlib.h>
#include<cstring>
#include<cstdio>
#include<utility>
#include<algorithm>
#include<map>
#include<stack>
#include<queue>
using namespace std;
typedef long long ll;
const int Max = 2*1e5+5;
const int mod = 1e9+7;
const int Hash = 10000;
const int INF... | a.cc: In function 'int main()':
a.cc:58:20: error: expected ';' before 'for'
58 | scanf("%d", &n)
| ^
| ;
59 | for(int i=0; i<n; i++)
| ~~~
a.cc:59:18: error: 'i' was not declared in this scope
59 | for(int i=0; i<n; i++)
... |
s145700838 | p03682 | C++ | #include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <queue>
#include <cmath>
#include <cstring>
#include <set>
using namespace std;
const int maxn = 1e5 + 5;
struct Node {
int x, y, id;
}node[maxn];
struct Edge {
int u, v, val;
bool operator <(const Edge& rhs) const... | a.cc: In function 'int main(int, const char**)':
a.cc:84:14: error: expected '}' at end of input
84 | return 0;
| ^
a.cc:51:40: note: to match this '{'
51 | int main(int argc, char const *argv[]) {
| ^
|
s331595795 | p03682 | C++ | #include <iostream>
#include <vector>
#include <queue>
#include <set>
using namespace std;
struct point
{
int id;
int x;
int y;
};
struct edge
{
int src;
int dst;
int cost;
bool operator<(const edge &other) const
{
return other.cost < cost;
}
};
int main()
{
int N;
cin >> N;
vector<point> p(N);
for... | a.cc: In function 'int main()':
a.cc:40:9: error: 'sort' was not declared in this scope; did you mean 'short'?
40 | sort(p.begin(), p.end(), [](auto &a, auto &b) {return a.x < b.x; });
| ^~~~
| short
|
s569678973 | p03682 | C++ | #include<bits/stdc++.h>
using namespace std;
const int M=100010;
struct Edge
{
int u,v,c;
bool operator < (const Edge &b) const {return c<b.c;}
}e[M<<1];
struct Point
{
int x,y,id;
}a[M];
bool cmp1(Point a,Point b)
{
return a.x<b.x;
}
bool cmp2(Point a,Point b)
{
return a.y<b.y;
}
ll ans;
int n,tot;
int f[M]... | a.cc:27:1: error: 'll' does not name a type
27 | ll ans;
| ^~
a.cc: In function 'int main()':
a.cc:52:25: error: 'ans' was not declared in this scope; did you mean 'abs'?
52 | ans+=e[i].c,f[getf(u)]=getf(v);
| ^~~
| abs
a.cc... |
s775131710 | p03682 | C++ | #include <iostream>
#include <iomanip>
#include <array>
#include <vector>
#include <algorithm>
#include <stack>
#include <queue>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <tuple>
#include <string>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <climits>
#i... | a.cc: In function 'int main()':
a.cc:100:15: error: 'xidff' was not declared in this scope; did you mean 'xdiff'?
100 | if (fx == xidff.size() && fy == ydiff.size()) {
| ^~~~~
| xdiff
|
s861054099 | p03682 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#define ll long long
using namespace std;
ll N;
vector <ll> x;
vector <ll> y;
int main(){
ll inp;
ll result =0;
ll a;
cin >> N;
for(int i=0;i<N;i++){
cin >> inp;
x.push_back(inp);
cin >> inp;
y.... | a.cc:41:3: error: 'cout' does not name a type
41 | cout << result << endl;
| ^~~~
a.cc:42:3: error: expected unqualified-id before 'return'
42 | return 0;
| ^~~~~~
a.cc:44:1: error: expected declaration before '}' token
44 | }
| ^
|
s019340985 | p03682 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
int N;
cin >> N;
vector<int> xs(N, 0);
vector<int> ys(N, 0);
for (int i = 0; i < N; i++) {
cin >> xs[i] >> ys[i];
}
vector<int> connected;
connected.push_back(0);
vector<int> visited(N, 0);
visited[0] = 1;
int cos... | a.cc: In function 'int main()':
a.cc:21:32: error: 'INT_MAX' was not declared in this scope
21 | int min_cost = INT_MAX;
| ^~~~~~~
a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
3 | #include ... |
s887191243 | p03682 | Java | import java.util.*;
import java.math.*;
import java.io.*;
class Main{
public static InputReader sc;
public static PrintWriter out;
public static final long MOD = (long)1e9 + 7L;
public static void main(String[] args){
sc=new InputReader(System.in);
out=new PrintWriter(System.out);
int n=sc.... | Main.java:12: error: package Luck does not exist
ArrayList<Pair> l=new ArrayList<Luck.Pair>();
^
1 error
|
s069492500 | p03682 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <numeric>
#include <utility>
#include <sys/time.h>
#include <cmath>
using namespace std;
struct UnionFind {
vector<int> par;
vector<int> sizes;
UnionFind(int n) : par(n), sizes(n, 1) {
for (int i = 0; i < n; i++... | a.cc: In function 'void solve(int, std::vector<std::pair<int, std::pair<int, int> > >)':
a.cc:56:9: error: no matching function for call to 'sort(<unresolved overloaded function type>, <unresolved overloaded function type>, bool (&)(std::pair<int, std::pair<int, int> >, std::pair<int, std::pair<int, int> >))'
56 | ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.