submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s432437150
p04002
C++
#define _CRT_SECURE_NO_WARNINGS // #pragma warning(disable:4996) #include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <vector> #include <string> #include <queue> #include <functional> #include <sstream> #include <cmath> #include <set> #include <map> #include <stack> using namespace std...
/tmp/ccaGq04O.o: in function `main': a.cc:(.text+0x59): relocation truncated to fit: R_X86_64_PC32 against symbol `sum' defined in .bss section in /tmp/ccaGq04O.o a.cc:(.text+0x153): relocation truncated to fit: R_X86_64_PC32 against symbol `sum' defined in .bss section in /tmp/ccaGq04O.o a.cc:(.text+0x16c): relocation...
s167693932
p04002
C
<?php class Scanner { private $arr = []; private $count = 0; private $pointer = 0; public function next() { if($this->pointer >= $this->count) { $str = trim(fgets(STDIN)); $this->arr = explode(' ', $str); $this->count = count($this->arr); $this->po...
main.c:1:1: error: expected identifier or '(' before '<' token 1 | <?php | ^ main.c:28:1: error: unknown type name 'function'; did you mean 'union'? 28 | function check($y, $x) { | ^~~~~~~~ | union main.c: In function 'check': main.c:28:10: error: type of '$y' defaults to 'int' [-Wimplicit-int]...
s445882094
p04002
C++
#include <iostream> #include <map> #include <set> #include <algorithm> #include <cstdio> #define LL long long using namespace std; LL h, w, n; LL re[10]; set< pair<int ,int> > st; void f(int a, int b) { int num[3][3]; memset(num, -1, sizeof(num)); for(int i = 0; i < 3; ++i) for(int j = 0; j < 3; ++j)...
a.cc: In function 'void f(int, int)': a.cc:15:5: error: 'memset' was not declared in this scope 15 | memset(num, -1, sizeof(num)); | ^~~~~~ a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 5 | #include <cstdio> +++ |+#include <cstr...
s521493974
p04002
C++
#include<bits/stdc++.h> #include <unordered_map> using namespace std; pair<int,int> xy; unordered_map<pair<int,int>,int> board; int painted(int x,int y){ if(board[make_pair(x,y)]) return 1; return 0; } int howmany(int x,int y){ int ans=0; for(int i=x-1;i<=x+1;i++){ for(int j=y-1;j<=y+1;j++){ if(painted(i,j)) ...
a.cc:5:34: error: use of deleted function 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map() [with _Key = std::pair<int, int>; _Tp = int; _Hash = std::hash<std::pair<int, int> >; _Pred = std::equal_to<std::pair<int, int> >; _Alloc = std::allocator<std::pair<const std::pair<int, int>, int> >]' 5 |...
s844961405
p04002
C++
#include <iostream> #include <sstream> #include <algorithm> #include <string> #include <array> #include <vector> #include <map> #include <set> #include <queue> #include <deque> #include <stack> #include <memory> #include <complex> #include <numeric> #include <cstdio> #include <iomanip> #define REP(i,m,n) for(int i=int...
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...
s334384172
p04002
Java
import java.util.Arrays; import java.util.HashMap; import java.util.Map; import java.util.Scanner; public class MainB { MyScanner sc = new MyScanner(); Scanner sc2 = new Scanner(System.in); long start = System.currentTimeMillis(); long fin = System.currentTimeMillis(); final int MOD = 1000000007; int[] dx = { 1,...
Main.java:6: error: class MainB is public, should be declared in a file named MainB.java public class MainB { ^ 1 error
s221400957
p04003
C++
#include "atcoder/all" #include <algorithm> #include <bitset> #include <cmath> #include <complex> #include <cstring> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <regex> #include <set> #include <stack> #include <string> #include <vector> const int M...
a.cc:1:10: fatal error: atcoder/all: No such file or directory 1 | #include "atcoder/all" | ^~~~~~~~~~~~~ compilation terminated.
s267458895
p04003
C++
#include "atcoder/all" #include <algorithm> #include <bitset> #include <cmath> #include <complex> #include <cstring> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <regex> #include <set> #include <stack> #include <string> #include <vector> const int M...
a.cc:1:10: fatal error: atcoder/all: No such file or directory 1 | #include "atcoder/all" | ^~~~~~~~~~~~~ compilation terminated.
s869080515
p04003
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n, m; cin >> n >> m; vector<vector<pair<int, int> > >edge(n + 3); vector<vector<int> >rails(n + 3); for(int i = 1; i <= m; i++){ int u, v, c; cin >> u >> v >> c; edge[u].push_back({c, v}); edge[v].push_back(...
a.cc: In function 'int main()': a.cc:67:5: error: 'else' without a previous 'if' 67 | else{ | ^~~~
s893224629
p04003
C++
#pragma GCC optimize("Ofast") #pragma GCC optimize("unroll-loops") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #include<bits/stdc++.h> using namespace std; const int N=1e5+5; struct Edge{ int t,nxt,w; }e[N<<2]; int cnt,head[N]; inline void add(int u,int v,int w){ e[++cnt].nxt=head[u]...
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:4: /usr/include/c++/14/bits/allocator.h: In destructor 'std::_Rb_tree<int, int, std::_Identity<int>, std::less...
s039845906
p04003
Java
import java.io.DataInputStream; import java.io.FileInputStream; import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.LinkedList; import java.util.Queue; public class Main { public static void main(String[] args) throws IOException { MyScanner sc = new MyScanner(); int...
Main.java:84: error: cannot find symbol BufferedReader br; ^ symbol: class BufferedReader location: class MyScanner Main.java:85: error: cannot find symbol StringTokenizer st; ^ symbol: class StringTokenizer location: class MyScanner Main.java:88: error: cannot find symbol br = new Buffere...
s695559406
p04003
Java
import java.io.DataInputStream; import java.io.FileInputStream; import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.LinkedList; import java.util.Queue; public class Main { public static void main(String[] args) throws IOException { MyScanner sc = new MyScanner(); int...
Main.java:84: error: cannot find symbol BufferedReader br; ^ symbol: class BufferedReader location: class MyScanner Main.java:85: error: cannot find symbol StringTokenizer st; ^ symbol: class StringTokenizer location: class MyScanner Main.java:88: error: cannot find symbol br = new Buffere...
s557023962
p04003
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Comparator; import java.util.HashMap; import java.util.PriorityQueue; import java.util.Scanner; import java.util.StringTokenizer; public class Main { public static void main(String...
Main.java:93: error: cannot find symbol private DataInputStream din; ^ symbol: class DataInputStream location: class Reader Main.java:99: error: cannot find symbol din = new DataInputStream(System.in); ^ symbol: class DataInputStream location: clas...
s525389240
p04003
C++
1
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 1 | ^
s316518663
p04003
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> pii; typedef tuple<int,int,int> piii; const int INF=1000000000; #define endl "\n" #define pb(a) push_back(a) #define m0(x) memset(x,0,sizeof(x)) #define print(x) cout<<x<<endl; #define pe(x) cout<<x<<" "; #define lb(v,n) lower_bou...
a.cc: In function 'int main()': a.cc:61:54: error: expected ';' before 'if' 61 | temp2=make_tuple(get<1>(temp),t.first,t.second) | ^ | ; 62 | 63 | if (dist[t.first]>curr or (dist[t...
s707278249
p04003
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> pii; typedef tuple<int,int,int> piii; const int INF=10000000; int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int N, M; cin >> N >> M; vector<int> dist(N+1,INF); dist[1]=0; vector<v...
a.cc: In function 'int main()': a.cc:41:5: error: 'curr' was not declared in this scope 41 | curr=get<0>(temp); // distance | ^~~~
s618087577
p04003
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> pii; typedef tuple<int,int,int> piii; const int INF=10000000; int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int N, M; cin >> N >> M; vector<int> dist(N+1,INF); dist[1]=0; vector<ve...
a.cc: In function 'int main()': a.cc:42:30: error: 'piii' {aka 'class std::tuple<int, int, int>'} has no member named 'node' 42 | for (int i=0; i<adj[temp.node].size(); i++){ | ^~~~ a.cc:44:7: error: 'curr' was not declared in this scope 44 | curr=get<0>(temp); |...
s033885922
p04003
C++
#include<bits/stdc++.h> using namespace std; const int MAXN=1e5+6; int n,m,ans=(int)1e9; vector<pair<int,int> >g[MAXN]; unordered_map<pair<int,int>,int>mp; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); cin>>n>>m; for(int i=0;i<m;i++) { int p,q,c; c...
a.cc:6:33: error: use of deleted function 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map() [with _Key = std::pair<int, int>; _Tp = int; _Hash = std::hash<std::pair<int, int> >; _Pred = std::equal_to<std::pair<int, int> >; _Alloc = std::allocator<std::pair<const std::pair<int, int>, int> >]' 6 |...
s132691521
p04003
C++
#include<bits/stdc++.h> using namespace std; const int MAXN=1e5+6; int n,m,ans=(int)1e9; vector<pair<int,int> >g[MAXN]; map<pair<int,int>,int>mp; int main() { cin>>n>>m; for(int i=0;i<m;i++) { int p,q,c; cin>>p>>q>>c; g[p].push_back({q,c}); g[q].push_back({p,c}); } mp...
a.cc: In function 'int main()': a.cc:38:8: error: 'as' was not declared in this scope; did you mean 'ans'? 38 | if(as==1000000000) | ^~ | ans
s284226337
p04003
C++
//#pragma GCC optimize("Ofast") #include<iostream> #include<string> #include<algorithm> #include<vector> #include<queue> #include<map> #include<math.h> #include<iomanip> #include<set> #include<numeric> #include<cstring> #include<cstdio> #include<functional> #include<bitset> #include<limits.h> #include<cassert> #include...
a.cc:50:23: error: 'unordered_set' does not name a type 50 | struct Ver { ll dist; unordered_set<int>company; };//頂点に、始点からの距離と最後に使った会社を持たせる | ^~~~~~~~~~~~~ a.cc: In function 'void dijkstra(int)': a.cc:81:34: error: 'struct Ver' has no member named 'company' 81 | ...
s350814660
p04003
C++
#include<bits/stdc++.h> using namespace std; const int N = 1e5+5; vector<pair<int,int>> g[N]; bool vis[N]; int ans = N; int n,m; void dfs(int x, int c,int prev){ vis[x] = true; if(x == n-1){ ans = min(ans,c); return ; } for(auto to : g[x]){ if(vis[to.first]) continue; if(prev!=to.secon...
a.cc: In function 'int main()': a.cc:37:19: error: expected ';' before '}' token 37 | else cout<<ans | ^ | ; 38 | } | ~
s109080176
p04003
C++
#include <bits\stdc++.h> using namespace std; typedef pair<int, int> pi; int inf=1e9; int n, m; map<pi, int> mp; pi po[500000]; int d[500000]; priority_queue<pi> pq; bool operator < (pi a, pi b) { return a.first>b.first; } vector<int> g[500000]; vector<int> g1[500000]; int cnt=0, ans=inf; void dij() { for (int i=0; ...
a.cc:1:10: fatal error: bits\stdc++.h: No such file or directory 1 | #include <bits\stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s015439040
p04003
C++
#include "debug.h" #include <string.h> #include <limits.h> #include <map> #include <set> #include <vector> #include <algorithm> using namespace std; #define MAXN 100000 template<class T> struct gufs { map<T,T> f; map<T,int> c; T find(T v) { T r, u; for(r=v; f.find(r) != f.end(); r=f[r]); for(u=v; u!=r; ) { ...
a.cc:1:10: fatal error: debug.h: No such file or directory 1 | #include "debug.h" | ^~~~~~~~~ compilation terminated.
s242298879
p04003
C++
/// /** * @Samaritan */ #include<bits/stdc++.h> using namespace std; typedef long long LL; #define pb emplace_back #define fi first #define se second #define PII pair<int, int> #define PLL pair<LL, LL> #define PLI pair<LL, int> LL quick_pow (LL a, LL b, LL mod) { LL ans = 1, base = a; while (b) { if...
a.cc: In function 'void work(int)': a.cc:62:11: error: no matching function for call to 'std::priority_queue<std::pair<int, int> >::push(node)' 62 | p.push(node(0, 1)); | ~~~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/14/queue:66, from /usr/include/x86_64-linux-gnu/c++/14/bi...
s974960198
p04003
C++
/// /** * @Samaritan */ #include<bits/stdc++.h> using namespace std; typedef long long LL; #define pb emplace_back #define fi first #define se second #define PII pair<int, int> #define PLL pair<LL, LL> #define PLI pair<LL, int> LL quick_pow (LL a, LL b, LL mod) { LL ans = 1, base = a; while (b) { if...
a.cc: In function 'void work(int)': a.cc:113:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 113 | int main() { | ^~ a.cc:113:9: note: remove parentheses to default-initialize a variable 113 | int main() { | ^~ | -- a.cc:113:9: no...
s386031017
p04003
C++
using namespace std; int n, m, x, y, c, cnt; int d[500020]; vector<pair<int, int> > a[500020]; map<int, int> g[100020]; deque<int> q; int get(int x, int y) { if (g[x].count(y)) { return g[x][y]; } return g[x][y] = ++cnt; } void add(int x, int y, int z) { a[x].push_back(make_pair(y, z)); a[y].push_back(make_pair(...
a.cc:4:1: error: 'vector' does not name a type 4 | vector<pair<int, int> > a[500020]; | ^~~~~~ a.cc:5:1: error: 'map' does not name a type 5 | map<int, int> g[100020]; | ^~~ a.cc:6:1: error: 'deque' does not name a type 6 | deque<int> q; | ^~~~~ a.cc: In function 'int get(int, int)': a.cc:...
s653871320
p04003
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:60:16: error: 'p' was not declared in this scope 60 | cin >> p[i] >> q[i] >> c[i]; | ^ a.cc:60:24: error: 'q' was not declared in this scope 60 | cin >> p[i] >> q[i] >> c[i]; | ^ a.cc:60:32: error: 'c' was not...
s145233217
p04003
C++
#include <queue> #include <vector> #include <cstdio> #include <iostream> using namespace std; const int N = 1e6; int n, m; int tot = 0, tag = 0, cnt = 0; int vis[N], b[N], fa[N], num[N], Link[N], dis[N]; struct node { int x, y; }; struct edge { int y, next, v; } e[N*2]; vector < node > a[N]; int read(void) { int ...
a.cc: In function 'int Dijkstra()': a.cc:67:9: error: 'memset' was not declared in this scope 67 | memset(vis,0,sizeof vis); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include <iostream> +++ |+#include <...
s504179906
p04003
C
#include <bits/stdc++.h> #define rep(i,n) for(int i = 0; i < (n); ++i) #define rrep(i,n) for(int i = 1; i <= (n); ++i) #define drep(i,n) for(int i = (n)-1; i >= 0; --i) #define srep(i,s,t) for (int i = s; i < t; ++i) using namespace std; typedef long long int ll; typedef pair<int,int> P; typedef vector<int> vi; typedef...
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory 1 | #include <bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s214929980
p04003
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define all(x) (x).begin(),(x).end() const int mod=1000000007,MAX=600005,INF=1<<30; vector<pair<int,int>> S[MAX]; vector<int> dis(MAX); void dijkstra(int u){ dis[u]=0; priority_queue<pair<int,int>,vector<pair<int,int>>,greater<pair<int,int>>>...
a.cc: In function 'int main()': a.cc:35:39: error: use of deleted function 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map() [with _Key = std::pair<int, int>; _Tp = int; _Hash = std::hash<std::pair<int, int> >; _Pred = std::equal_to<std::pair<int, int> >; _Alloc = std::allocator<std::pair<const std:...
s330742881
p04003
C++
#include <bits/stdc++.h> using namespace std ; const int N = 1e5 +10 ; const int inf = 1 << 30 ; struct st{int p,b,c;}; bool operator < (st a,st b){return a.c>b.c;} inline int read(){ char c;int f=1 ; while ((c=getchar())<'0' || c>'9') if (c=='-') f=-1 ; int res=c-'0' ; while ((c=getchar())>='0' && c<='...
a.cc: In function 'int main()': a.cc:29:15: error: 'p' was not declared in this scope 29 | if (d[p.p][p.b]!=p.c){ | ^ a.cc:32:15: error: 'p' was not declared in this scope 32 | if (d[p.p].find(0)==d[p.p].end() || d[p.p][0]>p.c){ | ^ a.cc:34:19: error: no mat...
s276999990
p04003
C++
#include <bits/stdc++.h> using namespace std ; const int N = 1e5 +10 ; const int inf = 1 << 30 ; struct st{int p,b,c;}; bool operator < (st a,st b){return a.c>b.c;} inline int read(){ char c;int f=1 ; while ((c=getchar())<'0' || c>'9') if (c=='-') f=-1 ; int res=c-'0' ; while ((c=getchar())>='0' && c<='...
a.cc: In function 'int main()': a.cc:29:15: error: 'p' was not declared in this scope 29 | if (d[p.p][p.b]!=p.c){ | ^ a.cc:32:15: error: 'p' was not declared in this scope 32 | if (d[p.p].find(0)==d[p.p].end() || d[p.p][0]>p.c){ | ^ a.cc:34:19: error: no mat...
s046019770
p04003
C++
#include<bits/stdc++.h> using namespace std; #define ALL(a) (a).begin(),(a).end() #define ALLR(a) (a).rbegin(),(a).rend() #define spa << " " << #define lfs <<fixed<<setprecision(10)<< #define test cout<<"test"<<endl; #define fi first #define se second #define MP make_pair #define PB push_back #define EB emplace_bac...
a.cc: In function 'int main()': a.cc:96:25: error: no match for 'operator=' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<std::unordered_set<int> >, std::unordered_set<int> >::value_type' {aka 'std::unordered_set<int>'} and 'std::set<int>') 96 | st[g[x.v][i].t]=tmp; | ...
s387170416
p04003
C++
#include <bits/stdc++.h> using namespace std; #define pp pair<int,int> #define rep(i,n) for(int (i)=0;(i)<(n);(i)++) #define ll long long #define all(a) (a).begin(),(a).end() ll MOD=1000000007; ll mod=998244353; int inf=1000001000; ll INF=10000000000000000; int main(){ int m,n; cin >> n >> m; vector<vecto...
a.cc: In function 'int main()': a.cc:18:26: error: template argument 1 is invalid 18 | vector<int> d(n+1,inf); | ^ a.cc:18:26: error: template argument 2 is invalid a.cc:19:5: error: 'd' was not declared in this scope 19 | d.at(1)=0; | ^
s999566331
p04003
C++
#include<bits/stdc++.h> using namespace std; #define int long long #ifdef LOCAL_DEBUG #include "LOCAL_DEBUG.hpp" #endif const int N = 200001 * 2 + N; struct edge{ int to,cost; }; vector< edge > G[N]; void dikstra(int s,int t){ typedef pair<int, int> P; const int INF = 1 << 30; priority_queue<P,vector<P>,gre...
a.cc:11:18: error: size of array 'G' is not an integral constant-expression 11 | vector< edge > G[N]; | ^
s691619447
p04003
C++
#include <bits/stdc++.h> using namespace std; typedef long long int lli; typedef pair<int, int> ii; typedef vector<int> vi; #define mkpr make_pair const int N = 1e5 + 5; const int M = 2e5 + 5; int n, m; vector<vector<ii>> edgeList(M); vector<bool> vis(N, false); vector<bool> inStack(N, false); vector<bool> groupVis...
a.cc: In function 'int main()': a.cc:72:56: error: no matching function for call to 'upper_bound(int&, std::vector<std::pair<int, int> >::iterator, std::pair<int, int>)' 72 | int ender = upper_bound(starter, companyProperty.end(), mkpr(u, N)) - companyProperty.begin(); | ...
s378770171
p04003
C++
#include <bits/stdc++.h> using namespace std; #define f first #define s second #define pb push_back #define reset(a,b) memset(a,b,sizeof a); #define ALL(x) x.begin(),x.end() #define debug(x) cout<<#x<<" = "<<(x)<<endl #define sz(x) (int)(x.size()) #define lt(x) (int)(x.length()) #define MOD 1000000007 #define mx 10000...
a.cc: In function 'int main()': a.cc:71:25: error: expected ';' before 'int' 71 | int cost = 0; | ^~~ a.cc:72:97: error: 'cost' was not declared in this scope; did you mean 'cosl'? 72 | if(dist[getindeks(i.s, i.f)] == -1 || dist[getinde...
s400993560
p04003
C++
#include<bits/stdc++.h> //ios::sync_with_stdio(false); //cin.tie(0); using namespace std; typedef long long ll; typedef pair<int,int> pii; typedef pair<pii,int> ppii; typedef pair<int,pii> pipi; typedef pair<ll,ll> pll; typedef pair<pll,ll> ppll; typedef pair<ll,pll> plpl; typedef tuple<ll,ll,ll> tl; ll mod=1000000007;...
a.cc: In function 'int main()': a.cc:44:25: error: use of deleted function 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map() [with _Key = std::pair<long long int, long long int>; _Tp = long long int; _Hash = std::hash<std::pair<long long int, long long int> >; _Pred = std::equal_to<std::pair<long lo...
s457411023
p04003
C++
/*************************初中生代码=********************************************************************************/ #include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <queue> #include <string> #include <vector> #define pa pair<int, int> using nam...
a.cc:151:5: error: conflicting declaration 'int dis [2200005]' 151 | int dis[MAXN+5]; | ^~~ a.cc:18:5: note: previous declaration as 'int dis [1000010]' 18 | int dis[MAXN]; | ^~~ a.cc:175:5: error: redefinition of 'int main()' 175 | int main(){ | ^~~~ a.cc:23:5: note: 'int main()' p...
s778612498
p04003
C++
//#pragma GCC optimize("Ofast") #include<iostream> #include<string> #include<algorithm> #include<vector> #include<queue> #include<map> #include<math.h> #include<iomanip> #include<set> #include<numeric> #include<cstring> #include<cstdio> #include<functional> #include<bitset> #include<limits.h> #include<cassert> #include...
a.cc: In function 'void dijkstra(int)': a.cc:76:33: error: expected unqualified-id before 'int' 76 | for (int i = 0, int n=G[v].size(); i < n; i++) { | ^~~ a.cc:76:32: error: expected ';' before 'int' 76 | for (int i = 0, int n=G[v].size(); i <...
s778192413
p04003
C++
#include<bits/stdc++.h> #define N 500005 #define M 500005 using namespace std; inline int read(){ int ans=0; char ch=getchar(); while(!isdigit(ch))ch=getchar(); while(isdigit(ch))ans=(ans<<3)+(ans<<1)+(ch^48),ch=getchar(); return ans; } int n,m,first[N],cnt=0,d[N]; bool vis[N]; struct edge{int v,nex...
a.cc: In function 'int main()': a.cc:40:9: error: 'addedge' was not declared in this scope; did you mean 'edge'? 40 | addedge(x,y,z);addedge(y,x,z); | ^~~~~~~ | edge a.cc:42:12: error: 'dis' was not declared in this scope; did you mean 'vis'? 42 | memset(dis,0x3f,sizeof(dis...
s327777228
p04003
C++
#include<bits/stdc++.h> #define N 500005 #define M 500005 using namespace std; inline int read(){ int ans=0; char ch=getchar(); while(!isdigit(ch))ch=getchar(); while(isdigit(ch))ans=(ans<<3)+(ans<<1)+(ch^48),ch=getchar(); return ans; } int n,m,first[N],cnt=0,d[N]; bool vis[N]; struct edge{int v,nex...
a.cc: In function 'int main()': a.cc:39:9: error: 'addedge' was not declared in this scope; did you mean 'edge'? 39 | addedge(x,y,z);addedge(y,x,z); | ^~~~~~~ | edge a.cc:41:12: error: 'dis' was not declared in this scope; did you mean 'vis'? 41 | memset(dis,0x3f,sizeof(dis...
s199363106
p04003
C++
#include<bits/stdc++.h> #include<set> #include<queue> #define INF 0x3f3f3f3f using namespace std; inline int read(){ int w=0,f=1; char ch=getchar(); while(ch<'0'||ch>'9'){ if(ch=='-')f=-1; ch=getchar(); } while(ch>='0'&&ch<='9'){ w=(w<<3)+(w<<1)+ch-48; ch=getchar(); ...
a.cc:35:23: error: expected initializer before '<' token 35 | inline bool operation < (Node x,Node y){ | ^ In file included from /usr/include/c++/14/string:49, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,...
s285910942
p04003
C++
#include<bits/stdc++.h> #include<set> #include<queue> #define INF 0x3f3f3f3f using namespace std; inline int read(){ int w=0,f=1; char ch=getchar(); while(ch<'0'||ch>'9'){ if(ch=='-')f=-1; ch=getchar(); } while(ch>='0'&&ch<='9'){ w=(w<<3)+(w<<1)+ch-48; ch=getchar(); ...
a.cc:35:23: error: expected initializer before '>' token 35 | inline bool operation > (Node x,Node y){ | ^ In file included from /usr/include/c++/14/string:49, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,...
s564533216
p04003
C++
#include <vector> #include <iostream> #include <cmath> #include <map> #include <algorithm> #include <fstream> #include <unistd.h> #include <string> #include <numeric> #include <queue> #include <deque> #include <sstream> #include <iomanip> #include <set> using namespace std; typedef long long ll; typedef vector<int> vi;...
a.cc: In function 'int main()': a.cc:84:27: error: expected primary-expression before '<' token 84 | if(dist[cur_ver] =< cur_cost) continue; | ^
s768548257
p04003
C++
#include <vector> #include <iostream> #include <cmath> #include <map> #include <algorithm> #include <fstream> #include <unistd.h> #include <string> #include <numeric> #include <queue> #include <deque> #include <sstream> #include <iomanip> #include <set> using namespace std; typedef long long ll; typedef vector<int> vi;...
a.cc: In function 'int main()': a.cc:80:24: error: expression list treated as compound expression in initializer [-fpermissive] 80 | bool visit(N, false); | ^ a.cc:84:17: error: invalid types 'bool[ll {aka long long int}]' for array subscript 84 | if(visit[cur_ver]) contin...
s690462637
p04003
C++
#include<iostream> #include<string> #include<cstdio> #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<unordered_map> #incl...
a.cc:42:19: error: declaration does not declare anything [-fpermissive] 42 | typedef long long int; | ^~~
s622466930
p04003
C++
#include <bits/stdc++.h> using namespace std; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int N, M; cin>>N>>M; struct Line { int t,c; }; vector<Line> graph[N]; for (int i = 0; i < M; i++) { int p,q,c; cin>>p>>q>>c; p--,q--; graph[p].push_back({q...
In file included from /usr/include/c++/14/string:49, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52, from a.cc:1: /usr/include/c++/14/bits/stl_function.h: In instantiation of 'constexpr bool std::greater<_Tp>::operator()(...
s913715016
p04003
C++
#include <bits/stdc++.h> using namespace std; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int N, M; cin>>N>>M; struct Line { int t,c,i; }; vector<Line> graph[N]; for (int i = 0; i < M; i++) { int p,q,c; cin>>p>>q>>c; p--,q--; graph[p].push_back(...
a.cc: In lambda function: a.cc:24:13: error: 'q' was not declared in this scope 24 | if (q.s == N-1) { | ^ a.cc:28:33: error: 'q' was not declared in this scope 28 | for (auto& line : graph[q.s]) { | ^
s153076923
p04003
C++
#include <bits/stdc++.h> #define rep(i, a, b) for(ll i = ll(a); i < ll(b); i++) #define rer(i, a, b) for(ll i = ll(a) - 1; i >= ll(b); i--) #define sz(v) (int)(v).size() #define pb push_back #define sc second #define fr first #define sor(v) sort(v.begin(),v.end()) #define rev(s) reverse(s.begin(),s.end()) #define lb(ve...
a.cc:26:23: error: use of deleted function 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map() [with _Key = std::pair<int, int>; _Tp = int; _Hash = std::hash<std::pair<int, int> >; _Pred = std::equal_to<std::pair<int, int> >; _Alloc = std::allocator<std::pair<const std::pair<int, int>, int> >]' 26 ...
s330014705
p04003
C++
#include <bits/stdc++.h> using namespace std; #define pb push_back #define sz(x) ((int)x.size()) #define sqr(x) ((x)*(x)) #define mem(a) memset(a,0,sizeof(a)) #define all(x) x.begin(),x.end() typedef vector<int> vi; typedef pair<int, int> pii; typedef long long ll; const int mn = 5e5 + 5; const int mod = 1e9 + 7; s...
a.cc:22:8: error: explicit specialization of 'template<class _Tp> struct std::hash' outside its namespace must use a nested-name-specifier [-fpermissive] 22 | struct hash<pii> { | ^~~~~~~~~
s593764799
p04003
C++
#include<iostream> #include<cstdio> #include<cstdlib> #include<string> #include<cstring> #include<cmath> #include<ctime> #include<algorithm> #include<utility> #include<stack> #include<queue> #include<vector> #include<set> #include<map> #define EPS 1e-9 #define PI acos(-1.0) #define INF 0x3f3f3f3f #define LL long long c...
a.cc: In function 'int SPFA(int, int)': a.cc:49:21: error: 'class std::queue<Edge>' has no member named 'top'; did you mean 'pop'? 49 | Edge temp=Q.top(); | ^~~ | pop
s148838260
p04003
C++
#include<iostream> #include<cstdio> #include<cstdlib> #include<string> #include<cstring> #include<cmath> #include<ctime> #include<algorithm> #include<utility> #include<stack> #include<queue> #include<vector> #include<set> #include<map> #define EPS 1e-9 #define PI acos(-1.0) #define INF 0x3f3f3f3f #define LL long long c...
a.cc: In function 'void SPFA(int, int)': a.cc:63:22: error: return-statement with a value, in function returning 'void' [-fpermissive] 63 | return dis[e]/2; | ~~~~~~^~ a.cc:64:12: error: return-statement with a value, in function returning 'void' [-fpermissive] 64 | return -1; ...
s787293877
p04003
C++
#include<iostream> #include<cstdio> #include<cstdlib> #include<string> #include<cstring> #include<cmath> #include<ctime> #include<algorithm> #include<utility> #include<stack> #include<queue> #include<vector> #include<set> #include<map> #define EPS 1e-9 #define PI acos(-1.0) #define INF 0x3f3f3f3f #define LL long long c...
a.cc: In member function 'bool Edge::operator<(const Edge&) const': a.cc:31:5: warning: no return statement in function returning non-void [-Wreturn-type] 31 | } | ^ a.cc: In function 'int SPFA(int, int)': a.cc:50:21: error: 'class std::priority_queue<Edge>' has no member named 'front' 50 | ...
s133166355
p04003
C++
#include<bits/stdc++.h> using namespace std; #define int long long #define rep(i, n) for(int (i)=0; (i)<(n); (i)++) #define pb push_back #define mp make_pair main(){ int N, M; cin >> N >> M; vector<pair<int, int>> edge[100000]; rep(i, m){ int A, B, C; cin >> A >> B >> C; edge[A-1].pb(mp(B-1, C)); edge[B-1]...
a.cc:8:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 8 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:12:16: error: 'm' was not declared in this scope 12 | rep(i, m){ | ^ a.cc:4:39: note: in definition of macro 'rep' 4 | #define rep(i...
s287998411
p04003
C++
#include<iostream> #include<string> #include<algorithm> #include<vector> #include<queue> #include<map> #include<math.h> #include<iomanip> #include<set> #include<numeric> #include<cstring> #include<cstdio> #include<functional> #include<bitset> #include<limits.h> #include<cassert> #include <fstream> #include <time.h> #in...
a.cc:19:10: fatal error: atltime.h: No such file or directory 19 | #include <atltime.h> | ^~~~~~~~~~~ compilation terminated.
s127557809
p04003
C++
#include<iostream> #include<string> #include<algorithm> #include<vector> #include<queue> #include<map> #include<math.h> #include<iomanip> #include<set> #include<numeric> #include<cstring> #include<cstdio> #include<functional> #include<bitset> #include<limits.h> #include<cassert> #include <fstream> #include <time.h> #in...
a.cc:19:10: fatal error: atltime.h: No such file or directory 19 | #include <atltime.h> | ^~~~~~~~~~~ compilation terminated.
s228610522
p04003
C++
8 11 1 3 1 1 4 2 2 3 1 2 5 1 3 4 3 3 6 3 3 7 3 4 8 4 5 6 1 6 7 5 7 8 5
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 8 11 | ^
s965551551
p04003
C++
#include <bits/stdc++.h> #pragma GCC diagnostic ignored "-Wsign-compare" #pragma GCC diagnostic ignored "-Wsign-conversion" #define NDEBUG #define SHOW(...) static_cast<void>(0) //!===========================================================!// //! dP dP dP !// //! 88 ...
a.cc: In function 'int main()': a.cc:154:54: error: 'K' was not declared in this scope 154 | std::cout << (ans == INF<int> ? -1 : (ans + 1) * K) << std::endl; | ^
s548725717
p04003
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; import java.util.List; import java.util.Queue; import java.util.Set; import java.util.StringTokenizer; /** * Created ...
Main.java:16: error: class C061 is public, should be declared in a file named C061.java public class C061 { ^ 1 error
s783379160
p04003
C++
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 #include<stdio.h> #include<algorithm> #include<string.h> #include<vector> #include<queue> using namespace std; vector<pair<int,int> > g[110000]; v...
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 1 | ^ In file included from /usr/include/c++/14/cstdlib:79, from /usr/include/c++/14/bits/stl_algo.h:71, from /usr/include/c++/14/algorithm:61, from a.cc:63: /usr/include/stdlib.h:98:8: erro...
s050436529
p04003
C++
#include <algorithm> #include <iostream> #include <iomanip> #include <cstring> #include <string> #include <vector> #include <queue> #include <cmath> #include <stack> #include <set> #include <map> typedef long long ll; typedef unsigned int uint; using namespace std; int N, M, inf=a#include <algorithm> #include <iostrea...
a.cc:16:16: error: stray '#' in program 16 | int N, M, inf=a#include <algorithm> | ^ a.cc:16:15: error: 'a' was not declared in this scope 16 | int N, M, inf=a#include <algorithm> | ^ a.cc:31:5: error: redefinition of 'int N' 31 | int N, M, inf=1e9; | ^ a.cc:1...
s704113614
p04003
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0;i<(int)(n);i++) #define repe(i,n) rep(i,(n)+1) #define per(i,n) for(int i=(int)(n)-1;i>=0;i--) #define pere(i,n) rep(i,(n)+1) #define all(x) (x).begin(),(x).end() #define SP <<" "<< #define MOD 1000000007 #define IINF 1000000000 #define LINF 10...
a.cc: In function 'int main()': a.cc:30:31: error: 'a' was not declared in this scope 30 | pair<int,pair<int,int>> now;a | ^ a.cc:31:27: error: expected primary-expression before ')' token 31 | bfs.push_back({0,{-1,0}}); | ^
s656455728
p04003
C++
#include<bits/stdc++.h> using namespace std; using int = int64_t; using P = pair<int, int>; const int INF = 1e9; template<typename T> class Dijk{ private: int n; vector<vector<pair<int, T>>> v; public: T INF; Dijk(const vector<vector<pair<int, T>>> &v, T INF){ ...
a.cc:3:7: error: expected nested-name-specifier before 'int' 3 | using int = int64_t; | ^~~
s967969255
p04003
C
//set many funcs template //Ver.20181228 #include<stdio.h> #include<string.h> #include<stdlib.h> #include<stdbool.h> #include<time.h> #define inf 1072114514 #define llinf 4154118101919364364 #define mod 1000000007 #define pi 3.1415926535897932384 int max(int a,int b){if(a>b){return a;}return b;} int min(int a,int b){i...
main.c:16:5: warning: conflicting types for built-in function 'round'; expected 'double(double)' [-Wbuiltin-declaration-mismatch] 16 | int round(int a,int b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;} | ^~~~~ main.c:8:1: note: 'round' is declared in header '<math.h>' 7 | #include<time.h> +++ |+#in...
s876943665
p04003
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 'void dijkstra(ll)': a.cc:71:20: error: expected ')' before numeric constant 71 | fill(dist, dist 2*ohara, LINF); | ~ ^~ | )
s202552129
p04003
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:179:2: error: expected '}' at end of input 179 | } | ^ a.cc:94:1: note: to match this '{' 94 | { | ^
s030685550
p04003
C++
#include<bits/stdc++.h> #define INF 1e9 #define llINF 1e18 #define MOD 1000000007 #define pb push_back #define mp make_pair #define F first #define S second #define ll long long #define vi vector<ll> #define vvi vector<vi> #define substr(s,f,t) (s.substr(f-1,t-f+1)) #define ALL(a) (a).begin(),(a).end() #define Yes(hog...
a.cc: In function 'int main()': a.cc:60:8: error: no match for 'operator[]' (operand types are 'std::map<std::pair<long long int, long long int>, long long int>' and 'int') 60 | if(MP[(1,-1)]==0){ | ^ In file included from /usr/include/c++/14/map:63, from /usr/include/x86_64-linux-gnu...
s295611008
p04003
C++
#include <bits/stdc++.h> #define typeof(x) __typeof__(x) #define int long long int #define double long double #define mod(x) ((x % MOD) + MOD) % MOD #define REP(i,a,b) for(int i=(a);i<(b);++i) #define RREP(i,a,b) for(int i=(b)-1;i>=(a);--i) #define ALL(c) (c).begin(),(c).end() #define RALL(c) (c).rbegin(),(c).rend() #d...
a.cc: In function 'int main()': a.cc:127:26: error: cannot convert 'std::set<long long int>::iterator' {aka 'std::_Rb_tree<long long int, long long int, std::_Identity<long long int>, std::less<long long int>, std::allocator<long long int> >::const_iterator'} to 'long long int' 127 | add_edge1(G, i, c); ...
s564035359
p04003
C++
#include<iostream> #include<vector> #include<algorithm> #include<utility> #include<string> #include<cmath> #include<cstring> #include<queue> #include<map> #include<climits> #include<queue> #include<set> #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...
a.cc: In function 'int main()': a.cc:84:22: error: 'setprecision' was not declared in this scope 84 | cout << fixed << setprecision(10); | ^~~~~~~~~~~~ a.cc:13:1: note: 'std::setprecision' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iomanip>' 12 |...
s445872449
p04003
C++
#include <iostream> #include <stdio.h> #include <cstring> using namespace std; const int Maxn = 1e5; const int INF = 0x3f3f3f3f; struct Edge { int to,cost; Edge(int a,int b){to=a,cost=b;} }; vector<Edge> G[8*Maxn+5]; void AddEdge(int u,int v,int w) { G[u].push_back(Edge(v,w)); G[v].push_back(Edge(u,w));...
a.cc:11:1: error: 'vector' does not name a type 11 | vector<Edge> G[8*Maxn+5]; | ^~~~~~ a.cc: In function 'void AddEdge(int, int, int)': a.cc:13:5: error: 'G' was not declared in this scope 13 | G[u].push_back(Edge(v,w)); | ^ a.cc: In function 'void SPFA(int)': a.cc:22:5: error: 'queue' was no...
s377859235
p04003
C++
#include<bits/stdc++.h> #define MX 1000005 #define INF 1000000005 using namespace std; typedef long long int ll; typedef pair <int,int> P; vector<int> sad[12312313] struct UF { int par[MX],rank[MX]; void init(int n) { for(int i=0;i<n;i++) { par[i]=i; rank[i]=0; } } void rem(int i) { par[i]=i; r...
a.cc:8:1: error: expected initializer before 'struct' 8 | struct UF | ^~~~~~ a.cc:50:1: error: 'UF' does not name a type 50 | UF uf; | ^~ a.cc: In function 'int main()': a.cc:74:25: error: 'uf' was not declared in this scope 74 | uf.rem(p.first); | ...
s671501367
p04003
C++
#include<bits/stdc++.h> #define MX 1000005 #define INF 1000000005 using namespace std; typedef long long int ll; typedef pair <int,int> P; struct UF { int par[MX],rank[MX]; void init(int n) { for(int i=0;i<n;i++) { par[i]=i; rank[i]=0; } } void rem(int i) { par[i]=i; rank[i]=0; } int find(in...
a.cc: In function 'int main()': a.cc:94:37: error: redeclaration of 'int r' 94 | int r=uf.find(p.second); | ^ a.cc:88:37: note: 'int r' previously declared here 88 | int r=uf.find(p.first); | ...
s361219349
p04003
C++
#include<bits/stdc++.h> #define MX 1000005 #define INF 1000000005 using namespace std; typedef long long int ll; typedef pair <int,int> P; struct UF { int par[MX],rank[MX]; void init(int n) { for(int i=0;i<n;i++) { par[i]=i; rank[i]=0; } } void rem(int i) { par[i]=i; rank[i]=0; } int find(in...
a.cc: In member function 'bool UF::same(int, int)': a.cc:47:23: error: 'sum' was not declared in this scope 47 | cout<<sum(par,par+10,0); | ^~~
s247183951
p04003
C++
#include <bits/stdc++.h> using namespace std; const int INF = 0x3f3f3f3f; struct Node{ int to, dis; Node(int _to, int _dis){to = _to, dis = _dis;} bool operator < (const Node &A) const{ return dis > A.dis; } }; vector <Node> g[100010]; vector <Node> from[200010]; int n, m, tot; int dis[200010][2]; priority_que...
a.cc: In function 'void make_new(int, int, int)': a.cc:43:13: error: reference to 'hash' is ambiguous 43 | if (hash[x][c]) return ; | ^~~~ In file included from /usr/include/c++/14/string_view:50, from /usr/include/c++/14/bits/basic_string.h:47, from /usr/i...
s700533038
p04003
C++
#include "bits/stdc++.h" #define ll long long #define rep2(i,a,b) for(int i=a;i<=b;++i) #define rep(i,n) for(int i=0;i<n;i++) #define pii pair<int,int> #define tii tuple<int,int,int> #define pq priority_queue<int> #define pqg priority_queue<int,vector<int>,greater<int>> #define pb push_back #define edge(v,a,b) v[a].pb(...
a.cc:39:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 39 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:42:28: error: use of deleted function 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map() [with _Key = std::pair<int, int>; _Tp = int; _Hash = std::h...
s210581878
p04003
C++
#pragma comment(linker, "/stack:200000000") #pragma GCC optimize("Ofast") #pragma GCC optimize(3) #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #pragma GCC target("sse3","sse2","sse") #pragma GCC target("avx","sse4","sse4.1","sse4.2","ssse3") #pragma GCC target("f16c") #pragma GCC optimi...
a.cc:9:30: warning: '-fwhole-program' is not an option that controls warnings [-Wpragmas] 9 | #pragma GCC diagnostic error "-fwhole-program" | ^~~~~~~~~~~~~~~~~ a.cc:10:30: warning: '-fcse-skip-blocks' is not an option that controls warnings [-Wpragmas] 10 | #pragma GCC diagnos...
s447924823
p04003
C++
#include "bits/stdc++.h" #define ll long long #define rep2(i,a,b) for(int i=a;i<=b;++i) #define rep(i,n) for(int i=0;i<n;i++) #define pii pair<int,int> #define tii tuple<int,int,int> #define pq priority_queue<int> #define pqg priority_queue<int,vector<int>,greater<int>> #define pb push_back #define edge(v,a,b) v[a].pb(...
a.cc:39:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 39 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:47:41: error: redeclaration of 'int aa' 47 | int a=m[{p,c}],b=m[{q,c}],aa,bb,aa=m[{p,0}],bb=m[{q,0}]; | ^~ a.c...
s687227654
p04003
C++
#include<bits/stdc++.h> using namespace std; inline int read(){ int w=0,f=1; char ch=getchar(); while(ch<'0'||ch>'9'){ if(ch=='-') f=-1; ch=getchar(); } while(ch>='0'&&ch<='9'){ w=(w<<3)+(w<<1)+ch-48; ch=getchar(); } return w*f; } struct node{ int u,dis; ...
a.cc: In function 'int main()': a.cc:97:30: error: 'x' was not declared in this scope 97 | if(n==100000&&m==200000&&x==41614&&y==59523&&z==5){ | ^ a.cc:97:40: error: 'y' was not declared in this scope 97 | if(n==100000&&m==200000&&x==41614&&y==59523&&z==5){ | ...
s118413332
p04003
C++
#include <bits/stdc++.h> using namespace std; #define IL inline IL int read() { char ch = getchar(); int u = 0, f = 1; while (!isdigit(ch)) { if (ch == '-') f = -1; ch = getchar(); } while (isdigit(ch)) { u = (u << 1) + (u << 3) + ch - 48; ch = getchar(); } return u * f; } const int maxn = 5e5 + 10; int dis[max...
a.cc: In function 'int main()': a.cc:28:1: error: 'c' was not declared in this scope 28 | c if (flag[u]) continue; | ^
s633061852
p04003
C++
#include<bits/stdc++.h> #define ll long long #define mp make_pair #define pb push_back #define pii pair<int,int> #define A first #define B second #define db double #define lowbit(p) (p&(-p)) using namespace std; void read(int &x){ x=0; char c=getchar(); int p=1; for (;c<48;c=getchar())if (c=='-')p=-1; for (;c>47;c=g...
a.cc:92:2: error: stray '#' in program 92 | }#include<bits/stdc++.h> | ^ a.cc:128:9: warning: "M" redefined 128 | #define M 200005 | ^ a.cc:37:9: note: this is the location of the previous definition 37 | #define M 100005 | ^ a.cc:92:3: error: 'include' does not name a type ...
s288197860
p04003
C++
#include<bits/stdc++.h> using namespace std; #define pb push_back #define ll long long #define ull unsigned long long #define F first #define S second #define eps 1e-6 #define mp make_pair const long long INF=1e18+2; const int MX=100005; int N, M, k; ll arr[MX]; map<int, int> D[MX]; set<pair<int, pair<int,int> > > st; ...
a.cc: In function 'int main()': a.cc:31:9: error: redeclaration of 'int c' 31 | int c=3*1e5; | ^ a.cc:29:9: note: 'int c' previously declared here 29 | int c=123123; | ^
s525691930
p04003
C++
#include<bits/stdc++.h> using namespace std; #define pb push_back #define ll long long #define ull unsigned long long #define F first #define S second #define eps 1e-6 #define mp make_pair const long long INF=1e18+2; const int MX=100005; int N, M, k; ll arr[MX]; map<int, int> D[MX]; set<pair<int, pair<int,int> > > st; ...
a.cc: In function 'int main()': a.cc:31:9: error: redeclaration of 'int c' 31 | int c=3*1e5; | ^ a.cc:29:9: note: 'int c' previously declared here 29 | int c=123123; | ^
s819463617
p04003
C++
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef pair<int, int> pii; const int INF = (int) 1e9; #define MP make_pair template <typename T> class dijkstra { public: struct edge { T to; ll cost; }; typedef pair<ll, T> P; unordered_map<T, vector<edge> > E; ...
a.cc: In function 'int main()': a.cc:48:19: error: use of deleted function 'dijkstra<std::pair<int, int> >::dijkstra()' 48 | dijkstra<pii> ds; | ^~ a.cc:8:29: note: 'dijkstra<std::pair<int, int> >::dijkstra()' is implicitly deleted because the default definition would be ill-formed: 8...
s907191342
p04003
C++
#include <bits/stdc++.h> using namespace std; using ll = long long int; #define REP(i, N) for (int i = 0; i < (N); ++i) #define scanInt(x) int x; scanf("%d", &(x)); getchar(); #define scanLLInt(x) ll x; scanf("%lld", &(x)); getchar(); #define scanVecInt(A, N) vector<int> A(N); REP(i, N){scanf("%d", &(A[i])); getchar...
a.cc: In function 'int main()': a.cc:25:9: error: 'edges2' was not declared in this scope; did you mean 'edges1'? 25 | edges2[pi][ci].emplace(qi); | ^~~~~~ | edges1 a.cc:27:9: error: 'company' was not declared in this scope 27 | company.emplace(ci); | ^~~~...
s098475004
p04003
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; const int N=1e5+456,M=4e5+325,inf=1e9+7; int n,m,cnt; int head[N],dis[N],vis[N]; struct node { int next,to,color; } edge[M]; struct jxj { int pre,c,val; bool operator<(const jxj &a) const { return val<a.val; } }; unordered_m...
a.cc: In function 'int main()': a.cc:88:22: error: expected ')' before ';' token 88 | (n=read(),m=read(); | ~ ^ | )
s755878208
p04003
C++
通信1603焦茜敬 11:18:30 #include<bits/stdc++.h> using namespace std; typedef long long ll; const int N=1e5+456,M=4e5+325,inf=1e9+7; int n,m,cnt; int head[N],dis[N],vis[N]; struct node { int next,to,color; } edge[M]; struct jxj { int pre,c,val; bool operator<(const jxj &a) const { return val<a.val;...
a.cc:3:1: error: '\U0000901a\U00004fe11603\U00007126\U0000831c\U0000656c' does not name a type 3 | 通信1603焦茜敬 11:18:30 | ^~~~~~~~~~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/...
s229262768
p04003
C++
#include <bits/stdc++.h> #define inf 0x3f3f3f3f using namespace std; const int maxn = 4e5 + 100; using ll = long long; const int M = 1e9 + 7; vector<pair<int,int> >v1[maxn], v3[maxn], v2[maxn]; int tot = 0; int vis[maxn]; void dij(int st,int en) { static int dis[maxn]; for(int i = 0;i <= tot; ++i) dis[i] = inf,...
a.cc: In function 'int main()': a.cc:79:8: error: 'mx' was not declared in this scope; did you mean 'm'? 79 | mx = max(mx,tot); | ^~ | m
s588650702
p04003
C++
#include <bits/stdc++.h> #define MAXN 1000000 #define MOD 1000000007 #define INF 0x3f3f3f3f using namespace std; typedef long long ll; typedef pair<int,int> p; int n; int tot; int par[NAXN]; int id[MAXN]; bool used[MAXN]; vector<p>c[MAXN]; vector<int>v[MAXN]; struct node { int idd,step; }; void init() { for(int...
a.cc:10:9: error: 'NAXN' was not declared in this scope; did you mean 'MAXN'? 10 | int par[NAXN]; | ^~~~ | MAXN a.cc: In function 'void init()': a.cc:23:9: error: 'par' was not declared in this scope; did you mean '__pstl::execution::v1::par'? 23 | par[i]=i; | ^~~...
s465582315
p04003
C++
//做法1 #include<iostream> #include<cstdio> #include<cstring> #include<string> #include<algorithm> #include<cctype> #include<cmath> #include<cstdlib> #include<queue> #include<ctime> #include<vector> #include<set> #include<map> #include<stack> using namespace std; #define sp cout<<"----------------------------------------...
a.cc:103:8: error: redefinition of 'struct node' 103 | struct node { | ^~~~ a.cc:18:8: note: previous definition of 'struct node' 18 | struct node { | ^~~~ a.cc:107:22: error: conflicting declaration 'std::map<int, std::vector<int> > e [100100]' 107 | map<int,vector<int> >e[100100]; ...
s942660756
p04003
C++
#include<bits/stdc++.h> using namespace std; const int maxn = 400010; const int inf = 0x3f3f3f3f; int n,m,tol,head[maxm]; struct edge { int to,cost,next; }es[maxm]; void addedge( int u , int v , int w ) { es[tol].to = v; es[tol].cost = w; es[tol].next = head[u]; head[u] = tol++; } struct node { ...
a.cc:6:18: error: 'maxm' was not declared in this scope; did you mean 'maxn'? 6 | int n,m,tol,head[maxm]; | ^~~~ | maxn a.cc:10:5: error: 'maxm' was not declared in this scope; did you mean 'maxn'? 10 | }es[maxm]; | ^~~~ | maxn a.cc: In function '...
s626442573
p04003
C++
#include<cstdio> #include<cstring> #include<algorithm> #include<vector> #include<queue> #define MAXN 500000 #define INF 0x3FFFFFFF using namespace std; struct edge { int u,v,w; edge(){}; edge(int _u,int _v,int _w):u(_u),v(_v),w(_w){}; }; struct state { int u,dist; state(){}; state(int _u,int _dist):u(_u),dist(_di...
a.cc:90:8: error: ISO C++ forbids declaration of 'read' with no type [-fpermissive] 90 | inline read() | ^~~~ a.cc: In function 'int Dijkstra(int)': a.cc:89:1: warning: control reaches end of non-void function [-Wreturn-type] 89 | } | ^
s186332567
p04003
C++
#include<iostream> #include<cstdio> #include<vector> #include<queue> #include<cstring> using namespace std; int pa[111111],id[111111],cnt,rank[111111]; bool used[111111]; int n,m,x,y,z; vector<pair<int,int> > g[1111111]; vector<int> gra[1111111]; void Init(int i) { pa[i]=i; used[i]=0; id[i]=-1; rank[i]=1; } int ro...
a.cc: In function 'void Init(int)': a.cc:17:9: error: reference to 'rank' is ambiguous 17 | rank[i]=1; | ^~~~ 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, ...
s462657074
p04003
C++
#include<bits/stdc++.h> using namespace std; vector<pair<int,int> > nei[1000005]; vector<int> cit[1000005]; vector<int>comp; int col[1000005]; bool vis[1000005]; vector<int>newnei[1000005]; int dp[1000005]; int poi[1000005]; queue<int> q; //无需跑最短路,直接写bfs,用queue int main() { int n,m; cin>>n...
a.cc:88:3: error: stray '#' in program 88 | }#include<bits/stdc++.h> | ^ a.cc:88:4: error: 'include' does not name a type 88 | }#include<bits/stdc++.h> | ^~~~~~~ a.cc:90:24: error: redefinition of 'std::vector<std::pair<int, int> > nei [1000005]' 90 | vector<pair<int,int> > nei[1000005]; ...
s692893508
p04003
C++
#include <bits/stdc++.h> using namespace std; const int N = 1e5 + 5; const int inf = 2e9; int n, m; vector<int> adj[N], col[N], imp[N]; vector<int> f[N]; int main() { ios_base::sync_with_stdio(false); cin >> n >> m; for (int i = 1; i <= m; ++i) { int u, v, c; cin >> u >> v >> c; col[u].push_back(c), col[v].pu...
a.cc: In function 'int main()': a.cc:32:53: error: cannot convert 'std::basic_ostream<char>' to 'int' in return 32 | if (u == n) return cout << f[u][id] << '\n'; | ~~~~~~~~~~~~~~~~~^~~~~~~ | | | ...
s546913171
p04003
C++
#include <bits/stdc++.h> #include <time.h> #include <tr1/unordered_map> #include <tr1/unordered_set> #include <unordered_map> using namespace std::tr1; using namespace std; /* cau troi cho Garena nhap de con Bach */ #define FSYNC ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0) #define fi first #define se second #d...
a.cc:40:1: error: reference to 'unordered_map' is ambiguous 40 | unordered_map<ii,int> lead; | ^~~~~~~~~~~~~ In file included from /usr/include/c++/14/unordered_map:41, from /usr/include/c++/14/functional:63, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53, ...
s296137589
p04003
C++
/* ID:njbxgub1 PROB:Shuke's Subway Trip LANG:C++ */ /* _ooOoo_ o8888888o 88" . "88 (| -_- |) O\ = /O ____/`---'\____ .' \\| |// `. / \\||| : |||// \ / _||||| -:- |||...
a.cc: In function 'int main()': a.cc:268:50: error: conversion from 'std::unordered_map<int, int>::iterator' {aka 'std::__detail::_Insert_base<int, std::pair<const int, int>, std::allocator<std::pair<const int, int> >, std::__detail::_Select1st, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std...
s482823032
p04003
C++
#include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <vector> #include <unordered_map> #include <deque> #define inf 0x3F3F3F3F using namespace std; struct Node { int x,c; }; deque<Node>q; unordered_map<int,vector<int> >e[100005]; unordered_map<int,int>d[100005]; vector<int>g[100005]; ...
a.cc: In function 'int main()': a.cc:50:35: error: invalid use of member function 'std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = int; _Alloc = std::allocator<int>; size_type = long unsigned int]' (did you forget the '()' ?) 50 | for(i=0;i<e[x][c].size;++i) ...
s173786988
p04003
C++
#include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <vector> #include <unordered_map> #include <deque> #define inf 0x3F3F3F3F using namespace std; struct Node { int x,c; }; deque<Node>q; unordered_map<int,vector<int> >e[100005]; unordered_map<int,int>d[100005]; int main(void) { int ...
a.cc: In function 'int main()': a.cc:26:17: error: 'g' was not declared in this scope 26 | g[x].push_back(c); | ^ a.cc:39:35: error: 'g' was not declared in this scope 39 | for(i=1;i<g[x].size();++i) | ^ a.cc:49:...
s905716066
p04003
C++
#include<bits/stdc++.h> using namespace std; #define MAX 1000005 #define pb push_back #define mp make_pair typedef pair<int,int> pi; int N, M, a, b, c, par[MAX], rank[MAX], step[MAX], mx=-1, id[MAX]; vector<pi> jie[MAX]; vector<int> shua[MAX]; bool vis[MAX]; inline int find(int x) { if(x==par[x]) return x; retur...
a.cc: In function 'void inint(int)': a.cc:22:9: error: reference to 'rank' is ambiguous 22 | rank[x]=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, ...