submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s332888229
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, ...
s432992486
p04003
C++
//Written by Zhu Zeqi //Come on,baby //Hack,please #include<cmath> #include<math.h> #include<ctype.h> #include<algorithm> #include<bitset> #include<cassert> #include<cctype> #include<cerrno> #include<cfloat> #include<ciso646> #include<climits> #include<clocale> #include<complex> #include<csetjmp> #include<csignal> #inc...
a.cc:66:1: error: 'vector' does not name a type 66 | vector<int> g[100005]; | ^~~~~~ a.cc:67:1: error: 'map' does not name a type 67 | map<int,int> d[100005]; | ^~~ a.cc:68:1: error: 'map' does not name a type 68 | map<int,vector<int> > ve[100005]; | ^~~ a.cc: In function 'int main()': a.cc:7...
s465734723
p04003
C++
//Written by Zhu Zeqi //Come on,baby //Hack,please #include<cmath> #include<math.h> #include<ctype.h> #include<algorithm> #include<bitset> #include<cassert> #include<cctype> #include<cerrno> #include<cfloat> #include<ciso646> #include<climits> #include<clocale> #include<complex> #include<csetjmp> #include<csignal> #inc...
a.cc:69:13: error: expected unqualified-id before numeric constant 69 | #define INF 1000000000 | ^~~~~~~~~~ a.cc:158:11: note: in expansion of macro 'INF' 158 | const int INF=1e9+7; | ^~~
s096657037
p04003
C++
#include <iostream> #include <algorithm> #include <cmath> #include <stdio.h> #include <stdlib.h> #include <vector> #include <map> #include <queue> #include <set> #include <string> #include <string.h> #include <stack> #define Endl endl #define mp make_pair #define rep(N) for(int i=0;i<N;i++) #define repj(N) for(int j=0;...
a.cc:32:1: error: 'unordered_map' does not name a type 32 | unordered_map <pii,int> dist; | ^~~~~~~~~~~~~ a.cc: In function 'int main()': a.cc:60:36: error: 'dist' was not declared in this scope 60 | if(dist.find(mp(vec[x][i].first,c))==dist.end() || dist[mp(vec[x][i].first,c...
s439379411
p04003
C++
#include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <vector> #include <unordered_map> #include <queue> #define inf 0x3F3F3F3F using namespace std; struct Node { mutable int x,c,cost; operator int&()const{return cost;} }; priority_queue<Node,vector<Node>,greater<Node> >q; unordered_m...
a.cc: In function 'int main()': a.cc:61:55: error: request for member 'second' in 'd[n].std::unordered_map<int, int>::operator[](i)', which is of non-class type 'std::unordered_map<int, int>::mapped_type' {aka 'int'} 61 | for(i=0;i<d[n].size();++i)ans=min(ans,d[n][i].second); | ...
s919707659
p04003
C++
#include <map> #include <queue> #include <vector> #include <cstdio> #include <cstring> #include <algorithm> using namespace std; const int maxn = 2e6 + 5; queue <int> que; int n, m, dis[maxn]; vector <int> g[maxn], all[maxn]; unordered_map <int, vector <int> > g1[maxn]; int main() { scanf("%d%d", &n, &m); for (int...
a.cc:14:1: error: 'unordered_map' does not name a type 14 | unordered_map <int, vector <int> > g1[maxn]; | ^~~~~~~~~~~~~ a.cc: In function 'int main()': a.cc:22:17: error: 'g1' was not declared in this scope; did you mean 'g'? 22 | g1[u][c].push_back(v); | ^~ | ...
s143029046
p04003
C++
#include<iostream> #include<cstdio> #include<vector> #include<queue> #include<cstring> #define pb push_back #define mp make_pair #define pii pair<int,int> #define inf 1e9+7 using namespace std; int n,m,dist[300005],hash[300005]={}; vector<pii > g[100005],gg[300005];//first:val vector<int> col[200005]; priority_queue<pi...
a.cc: In function 'void dfs(int, int, int)': a.cc:16:9: error: reference to 'hash' is ambiguous 16 | hash[s]=col; | ^~~~ In file included from /usr/include/c++/14/string_view:50, from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:5...
s581816695
p04003
C++
#include<bits/stdc++.h> #define pb push_back #define mp make_pair #define pii pair<int,int> #define inf 1e9+7 using namespace std; int n,m,dist[300005],hash[300005]={}; vector<pii > g[100005],gg[300005];//first:val vector<int> col[200005]; priority_queue<pii >q; void dfs(int s,int col,int now){ hash[s]=col; gg[s].pb(...
a.cc: In function 'void dfs(int, int, int)': a.cc:12:9: error: reference to 'hash' is ambiguous 12 | hash[s]=col; | ^~~~ In file included from /usr/include/c++/14/string_view:50, from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:5...
s076795113
p04003
C++
#include<bits/stdc++.h> #define pb push_back #define mp make_pair #define pii pair<int,int> #define inf 1e9+7 using namespace std; int n,m,dist[300005],hash[300005]={}; vector<pii > g[100005],gg[300005];//first:val vector<int> col[200005]; priority_queue<pii >q; void dfs(int s,int col,int now){ hash[s]=col; gg[s].pb(...
a.cc: In function 'void dfs(int, int, int)': a.cc:12:9: error: reference to 'hash' is ambiguous 12 | hash[s]=col; | ^~~~ In file included from /usr/include/c++/14/string_view:50, from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:5...
s262924082
p04003
C++
#include <iostream> #include <algorithm> #include <math.h> #include <string.h> #include <cstdio> #include <vector> #include <set> #include <cassert> #include <cstdlib> #include <complex> #include <cctype> #include <cmath> #include <ctime> #include <deque> #include <queue> #include <stack> #include <map> #include <set> ...
a.cc: In function 'int main(int, char**)': a.cc:157:22: error: 'FUCK' was not declared in this scope 157 | fill(dis,dis+FUCK,-2); | ^~~~
s314251401
p04003
C++
#include <iostream> #include <algorithm> #include <math.h> #include <string.h> #include <cstdio> #include <vector> #include <set> #include <cassert> #include <cstdlib> #include <complex> #include <cctype> #include <cmath> #include <ctime> #include <deque> #include <queue> #include <stack> #include <map> #include <set> ...
a.cc:79:26: error: size of array 'nei' is not an integral constant-expression 79 | map<int,vector<int>> nei[FUCK]; | ^~~~ a.cc:81:9: error: size of array 'col' is not an integral constant-expression 81 | int col[FUCK]; | ^~~~ a.cc:84:16: error: size of array 'on' is no...
s805952196
p04003
C++
#include <iostream> #include <vector> #include <map> #include <unordered_map> #include <queue> #include <set> using namespace std; typedef long long ll; typedef pair<int, int> P; vector<P> edge2[100010]; vector<int> edge[400010]; unordered_map<P, int> mp; queue<int> que; int cost[400010]; int index; queue<int> que2...
a.cc:15: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> >]' 15 ...
s467263254
p04003
C++
#include <iostream> #include <vector> #include <queue> #include <utility> #include <map> #define mp make_pair #define pb push_back using namespace std; int n, m, p[300000], q[300000], c[300000], ans[300000], nodeans[300000], expanded[300000]; vector< vector<int> > graph(300000); map< pair<int, int>, int> m1; vector< ve...
a.cc: In function 'int main()': a.cc:30:17: error: 'sort' was not declared in this scope; did you mean 'short'? 30 | sort(c_edge[i].begin(), c_edge[i].end()); | ^~~~ | short
s376935064
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 ti3 tuple<int,int,int> int MOD=1000000000+7; int INF=1e6; using namespace std; string alphabet("abcdefghijklmnopqrstuvwxyz"); main(){ int n,m,visited[...
a.cc:13:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 13 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:35:43: error: request for member 'first' in 'v[a].std::queue<std::pair<int, int> >::front().std::pair<int, int>::second', which is of non-class type 'int' 35 | ...
s588890129
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 ti3 tuple<int,int,int> int MOD=1000000000+7; int INF=1e6; using namespace std; string alphabet("abcdefghijklmnopqrstuvwxyz"); main(){ int n,m,visited[...
a.cc:13:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 13 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:35:43: error: request for member 'first' in 'v[a].std::queue<std::pair<int, int> >::front().std::pair<int, int>::second', which is of non-class type 'int' 35 | ...
s867281715
p04003
C++
#include<bits/stdc++.h> #define INF 0x7fffffff #define ll long long #define P pair<int,int> #define MP(a,b) make_pair(a,b) using namespace std; P q[100005]; int n,m,dis[100005],head,tail,t,h[100005]; struct E{int v,c,next;}g[400005]; void ins(int u,int v,int c){g[++t].v=v,g[t].c=c,g[t].next=h[u],h[u]=t;} inline int rea...
a.cc: In function 'int main()': a.cc:35:47: error: expected primary-expression before ']' token 35 | printf("%d",dis[n]==1061109567?-1:dis[]); | ^
s138036328
p04003
C++
#include<bits/stdc++.h> #define MAXN 1000010 #define MAXM 1000010 #define INF 0x3f3f3f3f #define LL long long using namespace std; int read() { int res=0; char ch=getchar(); while(ch<'0' || ch>'9') ch=getchar(); while(ch>='0' && ch<='9') { res=res*10+ch-'0'; ch=getchar(); } return res; } struct Edge { int ...
a.cc: In function 'void dijkstra(int)': a.cc:58:29: error: expected ';' before ')' token 58 | for(int i=1;i<=n+cnt) dis[i]=INF,vis[i]=0; | ^ | ;
s610330504
p04003
C++
https://docs.google.com/spreadsheets/d/1NMzLiCHgiEkSukTvFjiH0vxunr4-XT1XRAihKIleq3g/htmlview?sle=true#
a.cc:1:1: error: 'https' does not name a type 1 | https://docs.google.com/spreadsheets/d/1NMzLiCHgiEkSukTvFjiH0vxunr4-XT1XRAihKIleq3g/htmlview?sle=true# | ^~~~~
s254338939
p04003
C++
#include<cstdio> #include<cstring> #include<string> #include<algorithm> #include<iostream> #include<cmath> #include<cstdlib> #include<queue> #include<vector> #define pa pair<int,int> using namespace std; const int MAXN=1000010; int dis[MAXN]; vector <pa> g[MAXN]; vector <int> new_g[MAXN],all[MAXN]; int visit[MAXN],p...
a.cc: In function 'int main()': a.cc:54:31: error: 'x' was not declared in this scope 54 | new_g[x].push_back(newn); | ^
s143750687
p04003
C++
#include<cstdio> #include<cstring> #include<string> #include<algorithm> #include<iostream> #include<cmath> #include<cstdlib> #include<queue> #include<vector> #define pa pair<int,int> using namespace std; const int MAXN=1000010; int dis[MAXN]; vector <pa> g[MAXN]; vector <int> new_g[MAXN],all[MAXN]; int visit[MAXN],p...
a.cc: In function 'int main()': a.cc:54:31: error: 'x' was not declared in this scope 54 | new_g[x].push_back(newn); | ^
s774205093
p04003
C++
# include <bits/stdc++.h> # define x first # define y second # define mp make_pair // everything go according to my plan # define pb push_back # define sz(a) (int)(a.size()) # define vec vector // shimkenttin kyzdary, dzyn, dzyn, dzyn... # define y1 Y_U_NO_y1 # define left Y_U_NO_left # define r...
a.cc: In member function 'void graph::add1_edge(int, int, int)': a.cc:72:14: error: return-statement with a value, in function returning 'void' [-fpermissive] 72 | return 0; | ^
s735358574
p04003
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...
a.cc: In function 'void dijk(LL)': a.cc:75:24: warning: overflow in conversion from 'long long int' to 'int' changes value from '9223372036854775807' to '-1' [-Woverflow] 75 | d[i] = INF; | ^~~ a.cc:86:36: error: no matching function for call to 'min(int&, LL)' 86 | ...
s970026550
p04003
C++
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.util.HashSet; import java.util.LinkedList; import java.util.Queue; import java.util.Set; import java.util.StringTokenizer; public class Main { static BufferedReader in; static PrintWr...
a.cc:1:1: error: 'import' does not name a type 1 | import java.io.BufferedReader; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.io.IOException; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fm...
s648719161
p04003
C++
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.util.HashSet; import java.util.LinkedList; import java.util.Queue; import java.util.Set; import java.util.StringTokenizer; public class Main { static BufferedReader in; static PrintWr...
a.cc:20:9: error: stray '@' in program 20 | @SuppressWarnings("unchecked") | ^ a.cc:1:1: error: 'import' does not name a type 1 | import java.io.BufferedReader; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type ...
s953384033
p04003
C++
// see https://github.com/LumaKernel/vimfiles/tree/master/snippets/cp-cpp/temp.snip /// --- .lumrc Template {{{ /// // #define DEBUG // #define assert(...) #include <bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; using ld = long double; using P = tuple<int, int>; using P3 = t...
a.cc: In function 'int main()': a.cc:129:3: error: 'dist2' was not declared in this scope; did you mean 'dist'? 129 | dist2[0] = 0; | ^~~~~ | dist
s429049707
p04003
C++
#include <iostream> #include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <algorithm> #include <array> #include <vector> #include <utility> #include <bitset> #include <queue> #include <unordered_map> #include <unordered_set> using namespace std; typedef long long ll; typedef pair<ll, ll> p...
a.cc: In function 'int main()': a.cc:92:32: error: operands to '?:' have different types 'const char*' and 'std::unordered_map<long long int, long long int>::mapped_type' {aka 'long long int'} 92 | cout << (dist[N][0] == INF ? "-1" : dist[N][0]) << endl;
s937766338
p04003
C++
/* cat <<EOF >mistaken-paste */ #pragma GCC diagnostic ignored "-Wincompatible-pointer-types" #include <stdio.h> #include <stdint.h> #include <stdlib.h> #include <string.h> #include <stdbool.h> #include <math.h> #define BIG 2000000007 #define VERYBIG 200000000000007LL #define MOD 1000000007 typedef uint64_t ull; ty...
a.cc:5:32: warning: option '-Wincompatible-pointer-types' is valid for C/ObjC but not for C++ [-Wpragmas] 5 | #pragma GCC diagnostic ignored "-Wincompatible-pointer-types" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc: In function 'ull solve()': a.cc:363:25: error: 'clock' was not decla...
s189601693
p04003
C++
#include <bits/stdc++.h> #define LL long long #define VI vector<int> #define VB vector<bool> #define VL vector<long long> #define FOR(i,a,b) for(int i= (a); i<((int)b); ++i) #define RFOR(i,a) for(int i=(a); i >= 0; --i) #define FOE(i,a) for(auto i : a) #define ALL(c) (c).begin(), (c).end() #define RALL(c) (c).rbegin()...
a.cc: In function 'int solve(int, int, const std::vector<int>&, std::vector<int>&, std::vector<int>&)': a.cc:79:59: error: use of deleted function 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map() [with _Key = std::pair<int, int>; _Tp = std::vector<std::pair<int, int>, std::allocator<std::pair<int, ...
s515322738
p04003
C++
#include <iostream> #include <vector> #include <map> #include <queue> using namespace std; int main(){ cin.tie(0); ios::sync_with_stdio(false); int N, M; cin >> N >> M; vector<vector<pair<int, int>>> G(N); map<pair<int, int>, bool> vis; for(int i=0; i<M; i++){ int p, q, c; cin >> ...
a.cc: In function 'int main()': a.cc:43:13: error: 'cnt' was not declared in this scope; did you mean 'int'? 43 | cerr << cnt << endl; | ^~~ | int
s477785531
p04003
C++
#include <iostream> #include <vector> #include <map> #include <queue> using namespace std; int main(){ cin.tie(0); ios::sync_with_stdio(false); int N, M; cin >> N >> M; vector<vector<pair<int, int>>> G(N); map<pair<int, int>, bool> vis; for(int i=0; i<M; i++){ int p, q, c; cin >> ...
a.cc: In function 'int main()': a.cc:37:16: error: no match for 'operator[]' (operand types are 'std::map<std::pair<int, int>, bool>' and 'std::tuple<int, int>') 37 | vis[make_tuple(tt, cc)] = true; | ^ In file included from /usr/include/c++/14/map:63, from a.cc:3: /...
s012488798
p04003
C++
#include <iostream> #include <string> #include <algorithm> #include <vector> #include <cmath> #include <queue> #include <map> #include <unordered_map> #include <set> #include <bitset> #include <functional> using namespace std; typedef long long ll; vector<pair<int, int>> edg[100003]; set<int> used[100003]; priority_...
a.cc:39:7: error: extended character   is not valid in an identifier 39 |  if (used[t].count(c) == 1) continue; | ^ a.cc: In function 'int main()': a.cc:39:7: error: '\U00003000if' was not declared in this scope 39 |  if (used[t].count(c) == 1) continue; | ^~~~
s346689188
p04003
C++
#include <iostream> #include <string> #include <algorithm> #include <vector> #include <cmath> #include <queue> #include <map> #include <unordered_map> #include <set> #include <bitset> #include <functional> using namespace std; typedef long long ll; vector<pair<int, int>> edg[100003]; unordered_map<pair<int, int>, bo...
a.cc:18:37: error: use of deleted function 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map() [with _Key = std::pair<int, int>; _Tp = bool; _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>, bool> >]' 1...
s468684919
p04003
C++
# include <iostream> # include <algorithm> # include <vector> # include <string> # include <set> # include <map> # include <cmath> # include <iomanip> # include <functional> # include <tuple> # include <utility> # include <stack> # include <queue> # include <list> # include <bitset> # include <complex> # include <chron...
/tmp/ccPdKQTx.o: in function `DIUX(long long)': a.cc:(.text+0x2e): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/ccPdKQTx.o a.cc:(.text+0x5f): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/ccPdKQTx.o a.cc:(.text+0xb6): reloc...
s420347117
p04003
Java
import java.io.*; import java.util.*; import java.math.*; // import java.awt.Point; public class Main { InputStream is; PrintWriter out; String INPUT = ""; long MOD = 1_000_000_007; int inf = Integer.MAX_VALUE; void solve(){ int n = ni(); int m = ni(); Dijkstra dijks...
Main.java:17: error: ')' or ',' expected Dijkstra dijkstra = new Dijkstra((2*m+n+10); ^ 1 error
s203672704
p04003
C++
#include <algorithm> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <ctime> #include <iostream> #include <sstream> #include <functional> #include <map> #include <string> #include <cstring> #include <vector> #include <queue> #include <stack> #include <deque> #include <set> #include <li...
a.cc: In function 'int main()': a.cc:59:33: error: 'e' was not declared in this scope 59 | int w = e[p.fst].count(x.snd)!=1; | ^
s578184328
p04003
C++
#include <bits/stdc++.h>   using namespace std;   #define INF 1001000100010001000 #define MOD 1000000007 #define EPS 1e-10 #define int long long #define rep(i, N) for (int i = 0; i < N; i++) #define Rep(i, N) for (int i = 1; i < N; i++) #define For(i, a, b) for (int i = (a); i < (b); i++) #define pb push_back #define e...
a.cc:2:1: error: extended character   is not valid in an identifier 2 |   | ^ a.cc:4:1: error: extended character   is not valid in an identifier 4 |   | ^ a.cc:31:1: error: extended character   is not valid in an identifier 31 |   | ^ a.cc:35:1: error: extended character   is not valid in ...
s984197356
p04003
C++
#include <algorithm> #include <cstdio> #include <iostream> #include <map> #include <cmath> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> #include <stdlib.h> #include <stdio.h> #include <bitset> #include <cstring> #include <deque> using namespace std; #define FOR...
a.cc: In function 'int main()': a.cc:59:7: error: 'elseif' was not declared in this scope 59 | elseif(d[a] >= dd + 1) Q.push(PP(P(dd + 1, a), P(now, b))); | ^~~~~~
s780020039
p04003
C++
#include<bits/stdc++.h> using namespace std; #define mp make_pair #define pb push_back #define f first #define s second typedef pair<int,int> pii; int n,m; vector<pii> edge[200200]; vector<int> col[1001000]; vector<int> ned[500500]; int colour[200200],x[200200],l[200200]; int dist[500500]; int main(){ scanf("&d &d",...
a.cc: In function 'int main()': a.cc:75:32: error: invalid operands of types 'int*' and 'int' to binary 'operator/' 75 | printf("%d\n", &dist[n]/2); | ~~~~~~~~^~ | | | | int* int
s921650784
p04003
C++
#include <bits/stdc++.h> #define _overload(_1,_2,_3,name,...) name #define _rep(i,n) _range(i,0,n) #define _range(i,a,b) for(int i=(int)(a);i<(int)(b);++i) #define rep(...) _overload(__VA_ARGS__,_range,_rep,)(__VA_ARGS__) #define _rrep(i,n) _rrange(i,n,0) #define _rrange(i,a,b) for(int i=(int)(a)-1;i>=(int)(b);--i)...
a.cc: In function 'int main()': a.cc:70:40: 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:...
s328015336
p04003
C++
#include <bits/stdc++.h> #define _overload(_1,_2,_3,name,...) name #define _rep(i,n) _range(i,0,n) #define _range(i,a,b) for(int i=(int)(a);i<(int)(b);++i) #define rep(...) _overload(__VA_ARGS__,_range,_rep,)(__VA_ARGS__) #define _rrep(i,n) _rrange(i,n,0) #define _rrange(i,a,b) for(int i=(int)(a)-1;i>=(int)(b);--i)...
a.cc: In function 'int main()': a.cc:70:5: error: 'unorderd_map' was not declared in this scope 70 | unorderd_map<pair<int, int>, int> p2i; | ^~~~~~~~~~~~ a.cc:70:32: error: expected primary-expression before ',' token 70 | unorderd_map<pair<int, int>, int> p2i; | ...
s282538766
p04003
C++
//A,Elebereth Gilthoniel mantae! //For Temeria! #include<iostream> #include<algorithm> #include<cmath> #include<string> #include<vector> #include<set> #include<cstdio> #include<map> #include<stack> #include<queue> #include<cstring> using namespace std; const long long maxn=2e6+1e5; vector<pair<long long,long long> > v...
a.cc: In function 'int main()': a.cc:46:52: error: no matching function for call to 'max(long long int, int)' 46 | for(long long i=max(bark[t]-10,0);i<v[t].size();i++) | ~~~^~~~~~~~~~~~~~ In file included from /usr/include/c++/14/s...
s537656045
p04003
C++
#include <bits/stdc++.h> using namespace std; #define iinf 2000000000 #define linf 1000000000000000000 #define ulinf 10000000000000000000ull #define MOD 1000000007 #define lson(v) ((v)<<1) #define rson(v) (((v)<<1)^1) #define mpr make_pair typedef long long LL; typedef unsigned long long ULL; typedef unsigned long UL; ...
a.cc:21:25: error: ISO C++ forbids declaration of 'UMIN' with no type [-fpermissive] 21 | template < typename T > UMIN(T &a,T b){if(b<a) a=b;} | ^~~~ a.cc: In function 'int UMIN(T&, T)': a.cc:21:52: warning: no return statement in function returning non-void [-Wreturn-type] 21 | temp...
s718957603
p04003
C++
#include<ctime> #include<iostream> #include<algorithm> #include<cstdio> #include<cstdlib> #include<cmath> #include<cstring> #include<cassert> #include<string> #include<sstream> #include<fstream> #include<deque> #include<queue> #include<vector> #include<map> #include<list> #include<stack> #include<set> #include<bitset...
a.cc:69:32: error: 'std::vector<int> index [2000005]' redeclared as different kind of entity 69 | vector<int>col[maxn],index[maxn]; | ^ In file included from /usr/include/string.h:462, from /usr/include/c++/14/cstring:43, from a.cc:7: /usr/includ...
s645564096
p04003
C++
#include<iostream> #include<vector> #include<algorithm> #include<queue> #include<cstdio> using namespace std; queue<pair<int,int> >q; int n,m,nn; vector<pair<int,int> >v[100010]; vector<int>nv[300010]; bool vis[300010]; int cur[100010]; vector<int>col[1000010]; vector<int>res; void dfs(int x,int c) { vis[x]=true; res...
a.cc: In function 'int main()': a.cc:66:9: error: 'memset' was not declared in this scope 66 | memset(vis,false,sizeof(vis)); | ^~~~~~ a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 5 | #include<cstdio> +++ |+#include <cs...
s012267174
p04003
C++
#include<iostream> #include<algorithm> #include<vector> #include<queue> #define lol(i,n) for(int i=0;i<n;i++) #define mod 1000000007 typedef long long ll; using namespace std; #include<map> typedef pair<int,int> P; //vector<vector<P> >v;//辺リスト(v[i]には辺が詰まっている vector<P> v[500010]; unordered_map<int,int> u[100010];//頂点リ...
a.cc:15:1: error: 'unordered_map' does not name a type 15 | unordered_map<int,int> u[100010];//頂点リスト(u[頂点][路線]==vでの番号) | ^~~~~~~~~~~~~ a.cc: In function 'int main()': a.cc:29:17: error: 'u' was not declared in this scope 29 | u[i][-1]=vsize; | ^ a.cc:36:28: error: 'u' w...
s389653251
p04003
C++
#include<iostream> #include<algorithm> #include<vector> #include<queue> #define lol(i,n) for(int i=0;i<n;i++) #define mod 1000000007 typedef long long ll; using namespace std; #include<map> typedef pair<int,int> P; //vector<vector<P> >v;//辺リスト(v[i]には辺が詰まっている vector<P> v[500010]; unordered_map<int,int> u[100010];//頂点リ...
a.cc:15:1: error: 'unordered_map' does not name a type 15 | unordered_map<int,int> u[100010];//頂点リスト(u[頂点][路線]==vでの番号) | ^~~~~~~~~~~~~ a.cc: In function 'int main()': a.cc:29:17: error: 'u' was not declared in this scope 29 | u[i][-1]=vsize; | ^ a.cc:36:28: error: 'u' w...
s636201353
p04003
C++
#include<bits/stdc++.h> #define int long long #define fi first #define se second #define PB push_back using namespace std; typedef pair<int, int> P1; typedef pair<int, pair<int, int> > P2; static const int INF = 1ll<<60; static const int dx[] = { 1, -1, 0, 0, }; static const int dy[] = { 0, 0, 1, -1 }; static const int...
a.cc:17:33: 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 = std::vector<std::pair<long long int, std::pair<long long int, long long int> > >; _Hash = std::hash<std::pair<long long int, long long int> >; _Pre...
s728532427
p04003
C++
#include<iostream> #include<cstdio> #include<vector> #include<queue> using namespace std; int n,m,x,y,z,dist[111111]; vector<pair<int,int> > g[111111]; queue<pair<int,int> > q; int main() { scanf("%d%d",&n,&m); for (int i=1;i<=m;i++) { scanf("%d%d%d",&x,&y,&z); g[x].push_back(make_pair(y,z)); g[y].push_back(ma...
a.cc: In function 'int main()': a.cc:22:21: error: expected unqualified-id before '=' token 22 | int =g[1][i].first,val=g[1][i].second; | ^ a.cc:23:22: error: 'to' was not declared in this scope; did you mean 'tm'? 23 | dist[to]=1; | ...
s484759289
p04003
C++
#pragma region include #include <iostream> #include <iomanip> #include <stdio.h> #include <sstream> #include <algorithm> #include <cmath> #include <complex> #include <string> #include <cstring> #include <vector> #include <tuple> #include <bitset> #include <queue> #include <complex> #include <set> #include <map> #inc...
a.cc:50:16: error: 'edge_base' was not declared in this scope 50 | vector< vector<edge_base> > gra; | ^~~~~~~~~ a.cc:50:25: error: template argument 1 is invalid 50 | vector< vector<edge_base> > gra; | ^ a.cc:50:25: error: template argument 2 is invalid a.cc:50:2...
s889229551
p04003
C++
#include <iostream> #include <queue> #include <vector> #include <functional> using ll=long long int; constexpr int MAX_N=(int)1e5, constexpr ll INF=(ll)1e9; struct edge{ int to,com; edge()=default; edge(int _t,int _c) : to(_t),com(_c) {} }; struct Node{ int v,com; ll cost; Node()=defa...
a.cc:10:1: error: expected unqualified-id before 'constexpr' 10 | constexpr ll INF=(ll)1e9; | ^~~~~~~~~ a.cc: In function 'll dijkstra(int, int)': a.cc:51:14: error: 'INF' was not declared in this scope 51 | d[i]=INF; | ^~~
s701794584
p04003
C++
#include <iostream> #include <queue> #include <vector> #include <functional> using ll=long long int; constexpr int MAX_N=(int)1e5, constexpr ll INF=(ll)1e9; struct edge{ int to,com; edge()=default; edge(int _t,int _c) : to(_t),com(_c) {} }; struct Node{ int v,com; ll cost; Node()=defa...
a.cc:10:1: error: expected unqualified-id before 'constexpr' 10 | constexpr ll INF=(ll)1e9; | ^~~~~~~~~ a.cc: In function 'll dijkstra(int, int)': a.cc:50:21: error: 'INF' was not declared in this scope 50 | std::fill(d,d+n,INF); | ^~~
s305450517
p04003
C++
#pragma GCC optimize "O3" #pragma GCC target "avx" #include <stdio.h> #include <string.h> #include <iostream> #include <string> #include <algorithm> #include <vector> #include <map> #include <unordered_set> #include <unordered_map> #include <queue> #include <functional> using namespace std; typedef long long ll; typede...
a.cc:39:15: error: 'uint64_t' was not declared in this scope 39 | unordered_map<uint64_t> dist; | ^~~~~~~~ a.cc:14:1: note: 'uint64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>' 13 | #include <functional> +++ |+#include <cstdint> 14 | using n...
s942964439
p04003
C++
#pragma GCC optimize "O3" #pragma GCC target "avx" #include <stdio.h> #include <string.h> #include <iostream> #include <string> #include <algorithm> #include <vector> #include <map> #include <unordered_set> #include <unordered_map> #include <queue> #include <functional> using namespace std; typedef long long ll; typede...
a.cc:39:15: error: 'uint64_t' was not declared in this scope 39 | unordered_map<uint64_t> dist; | ^~~~~~~~ a.cc:14:1: note: 'uint64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>' 13 | #include <functional> +++ |+#include <cstdint> 14 | using n...
s919216310
p04003
C++
// Header Files {{{ #include <cstdio> #include <cstdlib> #include <cmath> #include <climits> #include <cfloat> #include <map> #include <unordered_map> #include <utility> #include <set> #include <iostream> #include <memory> #include <string> #include <vector> #include <algorithm> #include <functional> #include <sstream>...
a.cc:508:7: error: explicit specialization of 'template<class _Tp> struct std::hash' outside its namespace must use a nested-name-specifier [-fpermissive] 508 | class hash<PLL> { | ^~~~~~~~~
s276035787
p04003
C++
#include <bits/stdc++.h> using namespace std; #define REP(i,n) for(ll i=0; i<(ll)(n); i++) #define FOR(i,n,m) for (ll i=n; i<(ll)(m); i++) #define pb push_back #define INF 1000000007LL #define all(a) (a).begin(),(a).end() typedef long long ll; typedef pair<ll, pair<int,int> > p; int dy[4]={-1,1,0,0}; int dx[4]={0,0,...
a.cc:21:42: error: use of deleted function 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map() [with _Key = std::pair<int, int>; _Tp = std::vector<std::pair<long long int, std::pair<int, int> > >; _Hash = std::hash<std::pair<int, int> >; _Pred = std::equal_to<std::pair<int, int> >; _Alloc = std::alloc...
s258391321
p04003
C++
#include <bits/stdc++.h> using namespace std; #define REP(i,n) for(ll i=0; i<(ll)(n); i++) #define FOR(i,n,m) for (ll i=n; i<(ll)(m); i++) #define pb push_back #define INF 1000000007LL #define all(a) (a).begin(),(a).end() typedef long long ll; typedef pair<ll, pair<int,int> > p; int dy[4]={-1,1,0,0}; int dx[4]={0,0,...
a.cc:21:45: error: use of deleted function 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map() [with _Key = std::pair<int, int>; _Tp = std::vector<edge>; _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>, s...
s322344932
p04003
C++
#include <iostream> #include <cstdio> #include <algorithm> #include <queue> #include <map> #define MAX_V 600000 #define LL long long using namespace std; const int INF = 1000000000; struct edge { int to, cost; }; typedef pair<int, int> P; int V; vector<edge> G[MAX_V]; int d[MAX_V]; void dijkstra(int s){ prior...
a.cc: In function 'void f(P, P, int)': a.cc:45:30: error: no match for 'operator[]' (operand types are 'std::map<std::pair<int, int>, int>' and 'int') 45 | e->to = m[y]; e->cost = m[c]; | ^ In file included from /usr/include/c++/14/map:63, from a.cc:6: /usr/inc...
s828932388
p04003
C++
using System; using System.Collections.Generic; using System.Linq; struct Z2 { public int x, y; public Z2(int x, int y){ this.x = x; this.y = y; } } struct Z3 { public int x; public Z2 z; public Z3(int x, Z2 z){ this.x = x; this.z = z; } } public class A { int N,M; Dictionary<Z2,List<Z2>> edges; ...
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:2:7: error: expected nested-name-specifier before 'System' 2 | using System.Collections.Generic; | ^~~~~~ a.cc:3:7: error: expected nested-name-specifier before 'System' 3 | using System.L...
s853204528
p04003
C++
using System; using System.Collections.Generic; using System.Linq;   struct Z2 { public int x, y; public Z2(int x, int y){ this.x = x; this.y = y; } } struct Z3 { public int x, y, z; public Z3(int x, int y, int z){ this.x = x; this.y = y; this.z = z; } }   public class A { int MAX_N = 100008; int N,M; Li...
a.cc:4:1: error: extended character   is not valid in an identifier 4 |   | ^ a.cc:17:1: error: extended character   is not valid in an identifier 17 |   | ^ a.cc:86:1: error: extended character   is not valid in an identifier 86 |   | ^ a.cc:1:7: error: expected nested-name-specifier before...
s609168465
p04003
C++
using System; using System.Collections.Generic; using System.Linq;  struct Z2 { public int x, y; public Z2(int x, int y){ this.x = x; this.y = y; } }   public class A { int MAX_N = 100008; int MAX_M = 200008; int INF = 2000000; int N,M; List<Z2>[] edges; public A(){ edges = new List<Z2>[MAX_N]; ...
a.cc:4:1: error: extended character   is not valid in an identifier 4 |  struct Z2 { | ^ a.cc:10:1: error: extended character   is not valid in an identifier 10 |   | ^ a.cc:85:1: error: extended character   is not valid in an identifier 85 |   | ^ a.cc:1:7: error: expected nested-name-speci...
s190658966
p04003
C++
#include <iostream> #include <vector> #include <set> #include <algorithm> #include <map> #include <queue> #define mp make_pair #define pb push_back #define ppb pop_back #define fi first #define se second using namespace std; typedef pair<int, int> pii; typedef vector<int> vi; typedef vector<pii> vpi; typedef vector<...
/tmp/ccgQGI9M.o: in function `main': a.cc:(.text+0x9f): relocation truncated to fit: R_X86_64_PC32 against `.bss' a.cc:(.text+0xaf): relocation truncated to fit: R_X86_64_PC32 against `.bss' a.cc:(.text+0x10b): relocation truncated to fit: R_X86_64_PC32 against `.bss' collect2: error: ld returned 1 exit status
s970652921
p04003
C++
#include <bits/stdc++.h> using namespace std; typedef pair<int,int> P; int nextInt() { int x; scanf("%d", &x); return x; } const int MAX_N = 100000 + 10; map<P, vector<int> > g; vector<P> es[MAX_N]; struct State { int pos; int pc; int cost; State(int a, int b, int c) : pos(a), pc(b), cost(c) {} }; int ...
a.cc: In function 'int main()': a.cc:26:10: error: 'L' was not declared in this scope 26 | vector<L> vl; | ^ a.cc:26:11: error: template argument 1 is invalid 26 | vector<L> vl; | ^ a.cc:26:11: error: template argument 2 is invalid a.cc:47:15: error: redeclaration of 'const int ...
s491730212
p04003
C++
#include <iostream> #include <vector> #include <set> #include <unordered_set> #include <iterator> #include <map> #include <unordered_map> #include <queue> using namespace std; #define Inf 1073741789 int N, M, V; int* us, vs, xs; unordered_set<int> dead; // vector<vector<int> > es; vector<int>* es; // const int Inf = 1...
a.cc: In function 'int main()': a.cc:50:14: error: invalid conversion from 'int*' to 'int' [-fpermissive] 50 | vs = new int[M]; | ^~~~~~~~~~ | | | int* a.cc:51:14: error: invalid conversion from 'int*' to 'int' [-fpermissive] 51 | xs = new i...
s199232145
p04003
C++
#include <iostream> #include <vector> #include <array> #include <map> #include <queue> int main() { std::cin.tie(0); std::ios_base::sync_with_stdio(false); for(int N,M; std::cin >> N >> M; ) { typedef std::pair<int,int> G; std::vector<std::vector<int>> g(N,std::vector<int>()); typed...
a.cc: In function 'int main()': a.cc:30:18: error: 'sort' is not a member of 'std'; did you mean 'qsort'? 30 | std::sort(pqc.rbegin(),pqc.rend()); | ^~~~ | qsort
s379701987
p04003
C++
#include <bits/stdc++.h> using namespace std; #ifdef DEBUG #define debug(...) printf(__VA_ARGS__) #else #define debug(...) (void)0 #endif #define mp make_pair #define pb push_back #define LL long long #define pii pair<int,in...
a.cc: In function 'int main()': a.cc:75:32: error: 'class std::queue<state>' has no member named 'top'; did you mean 'pop'? 75 | state tp = que.top(); que.pop(); | ^~~ | pop
s976203495
p04003
C++
#include<iostream> #include<iomanip> #include<map> #include<unordered_map> #include<set> #include<unordered_set> #include<vector> #include<array> #include<string> #include<stack> #include<queue> #include<algorithm> #include<cassert> #include<functional> #include<random> #define int int64_t #define REP(i, a, b) for (int...
a.cc: In member function 'std::vector<long int> key_Dijkstra<T>::Dijkstra(T, int64_t)': a.cc:90:33: error: 'edge_vec' was not declared in this scope 90 | vector<int>cost(edge_vec.size(), INF); | ^~~~~~~~
s679132294
p04003
C++
#include <bits/stdc++.h> #include <X11/Intrinsic.h> #include <iostream> #include <string> #include <cstdio> #include <cmath> #include <cstring> #include <ctime> #include <iostream> #include <algorithm> #include <set> #include <vector> #include <tuple> #include <sstream> #include <typeinfo> #include <fstream> #include <...
a.cc:2:10: fatal error: X11/Intrinsic.h: No such file or directory 2 | #include <X11/Intrinsic.h> | ^~~~~~~~~~~~~~~~~ compilation terminated.
s619333597
p04003
C++
#include <iostream> #include <sstream> #include <cstdio> #include <cstdlib> #include <cmath> #include <ctime> #include <cstring> #include <string> #include <vector> #include <stack> #include <queue> #include <deque> #include <map> #include <set> #include <bitset> #include <numeric> #include <utility> #include <iomanip>...
a.cc:40:25: 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> >]' 40 ...
s372084022
p04003
C++
#include <iostream> #include <sstream> #include <cstdio> #include <cstdlib> #include <cmath> #include <ctime> #include <cstring> #include <string> #include <vector> #include <stack> #include <queue> #include <deque> #include <map> #include <set> #include <bitset> #include <numeric> #include <utility> #include <iomanip>...
a.cc:40:25: 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> >]' 40 ...
s610598643
p04003
C++
#include<iostream> #include<iomanip> #include<algorithm> #include<vector> #include<string> #include<map> #include<cmath> #include<queue> #include<functional> #include<climits> #include<tuple> #include<utility> #include<cassert> #include<stack> using namespace std; //define #define ALL(a) a.begin(),a.end() #define REP...
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...
s507951139
p04003
C++
/* * src.cpp * * Created on: 2016/09/11 * Author: joi */ #include <bits/stdc++.h> using namespace std; #define FOR(i,a,b) for(int i=(a);i<(b);i++) #define REP(i,a) FOR(i,0,a) typedef long long ll; typedef pair<int,int> P; const int MAX_N=1e5,INF=1e8; struct edge{ int to,type; }; struct S{ int v,type...
a.cc: In function 'void dijkstra()': a.cc:46:23: error: invalid cast from type 'std::vector<edge>' to type 'int' 46 | REP(i,(int)G[p.v]){ | ^~~~~~~~~~~ a.cc:12:37: note: in definition of macro 'FOR' 12 | #define FOR(i,a,b) for(int i=(a);i<(b);i++) | ...
s056092195
p04003
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using vi = vector<int>; using vvi = vector<vi>; using vb = vector<bool>; using vvb = vector<vb>; using vl = vector<ll>; using vvl = vector<vl>; using vd = vector<double>; using vvd = vector<vd>; #define REP(i,n) for(ll...
In file included from /usr/include/c++/14/algorithm:61, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterato...
s677196075
p04003
C++
#include<iostream> #include<vector> #include<string> #include<algorithm> #include<math.h> #include<map> #include<iterator> #include<set> #include<queue> #define rep(i,n) for(int i = 0; i < n; i++) using namespace std; int main(){ int N,M; cin >> N >> M; vector<set<int>> st2ln(N+1); vector<set<int>> adj(M+1); s...
a.cc: In function 'int main()': a.cc:42:22: error: conflicting declaration 'auto itr' 42 | auto itr = st2ln[q].find(c); | ^~~ a.cc:29:22: note: previous declaration as 'std::_Rb_tree_const_iterator<int> itr' 29 | auto itr = st2ln[p].find(c); | ...
s176089547
p04003
C++
#include<iostream> #include<vector> #include<string> #include<algorithm> #include<math.h> #include<map> #include<iterator> #include<set> #include<queue> #define rep(i,n) for(int i = 0; i < n; i++) using namespace std; int main(){ int N,M; cin >> N >> M; vector<set<int>> st2ln(N+1); vector<set<int>> adj(M+1); s...
a.cc: In function 'int main()': a.cc:42:22: error: conflicting declaration 'auto itr' 42 | auto itr = st2ln[q].find(c); | ^~~ a.cc:29:22: note: previous declaration as 'std::_Rb_tree_const_iterator<int> itr' 29 | auto itr = st2ln[p].find(c); | ...
s720944874
p04003
C++
#include<iostream> #include<iomanip> #include<map> #include<unordered_set> #include<set> #include<vector> #include<array> #include<string> #include<stack> #include<queue> #include<algorithm> #include<cassert> #include<functional> #include<random> #define int int32_t #define REP(i, a, b) for (int32_t i = (int32_t)(a); i...
In file included from /usr/include/c++/14/bits/hashtable.h:35, from /usr/include/c++/14/bits/unordered_set.h:33, from /usr/include/c++/14/unordered_set:41, from a.cc:4: /usr/include/c++/14/bits/hashtable_policy.h: In instantiation of 'std::__detail::_Hash_code_base<_Ke...
s871406031
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 rep2(i,a,b) for (int i=(a);i<(b);i++) #define rrep(i,n) for (int i=(n)-1;i>=0;i--) #define all(a) (a).begin(),(a).end() #define rall(a) (a).rbegin(),(a).rend() #define pri...
a.cc: In function 'long long int dijkstra(const Graph&, long long int, long long int)': a.cc:53:29: error: no matching function for call to 'std::set<std::tuple<long long int, long long int, long long int, long long int> >::count(std::tuple<long long int, long long int, long long int>)' 53 | if (st.c...
s866706290
p04003
C++
#include<iostream> #include<iomanip> #include<map> #include<unordered_map> #include<set> #include<vector> #include<array> #include<string> #include<stack> #include<queue> #include<algorithm> #include<cassert> #include<functional> #include<random> #define int int32_t #define REP(i, a, b) for (int32_t i = (int32_t)(a); i...
a.cc: In function 'int main()': a.cc:61:38: error: invalid types 'std::array<int, 2>::value_type {aka int}[int32_t {aka int}]' for array subscript 61 | if (next[pos][i][0] == 99999999)continue; | ^
s549218235
p04003
C++
#include <bits/stdc++.h> using namespace std; #define FORE(i, a) for (auto i = a.begin(); i != a.end(); ++i) #define REPU(i, a, b) for (int i = (a); i < (b); ++i) #define REPD(i, a, b) for (int i = (a); i > (b); --i) #define MEM(a, x) memset(a, x, sizeof(a)) #define ALL(a) a.begin(), a.end() #define UNIQUE(a) a.erase(...
a.cc:46:1: error: 'unorederd_map' does not name a type 46 | unorederd_map<int, bool> colors[N]; | ^~~~~~~~~~~~~ a.cc: In function 'void dijkstra(int, int)': a.cc:73:33: error: 'colors' was not declared in this scope 73 | colors[e.to].clear(); | ...
s477819343
p04003
C++
#define PB push_back #define SZ(x) (int)x.size() #define MP make_pair #define F first #define S second using namespace std; typedef pair<int,int> pii; typedef pair<pii,int> piii; const int maxn=1e5+5; struct Edge {int from,to,type;}; vector<Edge> edges; vector<int> G[maxn]; map<int,int> d[maxn]; int done[maxn],Mind[max...
a.cc:7:9: error: 'pair' does not name a type 7 | typedef pair<int,int> pii; | ^~~~ a.cc:8:9: error: 'pair' does not name a type 8 | typedef pair<pii,int> piii; | ^~~~ a.cc:11:1: error: 'vector' does not name a type 11 | vector<Edge> edges; | ^~~~~~ a.cc:12:1: error: 'vector'...
s954717397
p04003
C++
//by tzupengwang™ #include<set> #include<algorithm> #include<cstdio> #include<queue> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int,int> ii; int n , m ; ii edg[ 400005 ] ; int cpy[ 400005 ] ; vector< int > v[ 100005 ] ; set< int > st[ 100005 ] ; int dis[ 400005 ] ; void init() { ...
a.cc: In function 'void process()': a.cc:36:3: error: 'memset' was not declared in this scope 36 | memset( dis , -1 , sizeof dis ) ; | ^~~~~~ a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 5 | #include<queue> +++ |+#include <cstring>...
s306912024
p04003
C++
#include <queue> #include <vector> using namespace std; bool seen[500005]; int N, M; vector<int> adj[200005]; vector<pair<int,int>> e; int bfs() { deque<pair<int, int>> q; q.push_back({0,0}); while(!q.empty()) { pair<int, int> cur = q.front(); q.pop_front(); int eID = cur.first; ...
a.cc: In function 'int main()': a.cc:47:5: error: 'cin' was not declared in this scope 47 | cin >> N >> M; | ^~~ a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 1 | #include <queue> +++ |+#include <iostream> 2 | #include <...
s108774194
p04003
C++
#include <iostream> #include <fstream> #include <cstdio> #include <cmath> #include <vector> #include <cstring> #include <string> #include <set> #include <map> #include <stack> #include <queue> #include <algorithm> using namespace std; #define REP(i,n) for(int i=0; i<n; ++i) #define FOR(i,a,b) for(int i=a; i<=b; ++i) ...
a.cc: In function 'int main()': a.cc:49:38: error: template argument 1 is invalid 49 | priority_queue<tuple,vector<tuple>,greater<tuple> > pq; | ^ a.cc:49:38: error: template argument 2 is invalid a.cc:49:53: error: template argument 1 is invalid 49 | priority_qu...
s974290132
p04003
C++
#include <bits/stdc++.h> #define FOR(i,a,b) for(LL i=(a);i<(LL)(b);i++) #define REP(i,b) FOR(i,0,b) #define ALL(c) c.begin(),c.end() #define PB push_back #define FF first #define SS second #define cat //cout << __LINE__ << endl; using namespace std; typedef long long LL; typedef double ld; typedef LL ut; typedef vector...
a.cc: In function 'int main()': a.cc:45:33: error: no match for 'operator<' (operand types are 'VI' {aka 'std::vector<long long int>'} and 'LL' {aka 'long long int'}) 45 | if(miniumed[now]<dist) continue; | ~~~~~~~~~~~~~^~~~~ | | | |...
s504095482
p04003
C++
#include <bits/stdc++.h> #define FOR(i,a,b) for(LL i=(a);i<(LL)(b);i++) #define REP(i,b) FOR(i,0,b) #define ALL(c) c.begin(),c.end() #define PB push_back #define FF first #define SS second #define cat //cout << __LINE__ << endl; using namespace std; typedef long long LL; typedef double ld; typedef LL ut; typedef vector...
a.cc: In function 'int main()': a.cc:45:32: error: could not convert 'miniumed[now]' from 'VI' {aka 'std::vector<long long int>'} to 'bool' 45 | if(miniumed[now]) continue; | ~~~~~~~~~~~~^ | | | VI {aka...
s220694491
p04003
C++
#include <stdio.h> #include <bits/stdc++.h> using namespace std; typedef long long ll; #define pii pair<int,int> #define pll pair<ll,ll> #define pdd pair<double,double> #define FILL(a,x) memset(a,x,sizeof(a)) #define foreach( gg,ii ) for( typeof(gg.begin()) ii=gg.begin();ii!=gg.end();ii++) #define mp make_pair #define ...
a.cc:23:26: 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> >]' 23 ...
s914965174
p04003
C++
#include<stdio.h> #include<algorithm> #include<map> #include<set> #include<vector> #include<queue> using namespace std; int n,m; map<int,vector<int> > e[111111]; int len[111111]; bool trans[111111]; map<int,set<int> > a[111111]; int q[111111],op,cl; int main(){ memset(len,-1,sizeof(len)); scanf("%d%d",&n,&m); while...
a.cc: In function 'int main()': a.cc:16:9: error: 'memset' was not declared in this scope 16 | memset(len,-1,sizeof(len)); | ^~~~~~ a.cc:7:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 6 | #include<queue> +++ |+#include <cstrin...
s071934241
p04003
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<ll> vl; typedef pair<int,int> pii; typedef pair<ll,ll> pll; typedef int _loop_int; #define REP(i,n) for(_loop_int i=0;i<(_loop_int)(n);++i) #define FOR(i,a,b) for(_loop_int i=(_loop_int)(a);i<(_loop_int)(b);++i...
a.cc: In function 'int main()': a.cc:73:11: error: 'class std::priority_queue<std::pair<int, std::pair<int, int> > >' has no member named 'clear' 73 | Q.clear(); | ^~~~~
s355611996
p04004
C++
4 2 2
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 4 2 2 | ^
s426078804
p04004
C++
#define LOCAL #include <map> #include <unordered_map> #include <unordered_set> #include <set> #include <vector> #include <numeric> #include <algorithm> #include <iostream> #include <string> #include <cstring> #include <sstream> #include <functional> #include <queue> #include <deque> #include <stack> using namespace s...
a.cc: In function 'int Choose(int, int)': a.cc:73:5: error: 'assert' was not declared in this scope 73 | assert(k <= n); | ^~~~~~ a.cc:18:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>' 17 | #include <stack> +++ |+#include <cassert> 18...
s858178252
p04004
C++
#include <bits/stdc++.h> using namespace std ; const int mod = 1e9 + 7 ; const int N = 900010 ; #define ll long long int n , m , k ; ll fac[ N ] , ifac[ N ] , p[ N ] ; ll mul( ll x , ll y ) { return ( 1ll * x * y ) % mod ; } ll add( ll x , ll y ) { return ( x + y ) % mod ; } ll power( ll a , ll b ) { in...
a.cc:53:1: error: '\U00006ee1\U00005206\U0000505a\U00006cd5' does not name a type 53 | 满分做法 | ^~~~~~~~
s215145590
p04004
C++
#include<bits/stdc++.h> #define N 300005 #define mod 1000000007 #define ll long long using namespace std; ll up,n,m,k; ll ans=0,fac[N*3],ifac[N*3],mul[N*3]; inline ll calc(int a,int b){return fac[a]*ifac[b]%mod*ifac[a-b]%mod;} inline ll ksm(ll x,int p){ ll ret=1; while(p){ if(p&1)ret=ret*x%mod; x=x*x%mod,p>>=1; ...
a.cc:32:1: error: expected unqualified-id before '--' token 32 | --------------------- | ^~
s984304477
p04004
C++
考虑后面的求和部分。它显然分成三段。形式分别是∑Mi=0CiM;∑ki=0CkM;∑ki=tCkM 如果我们知道M=i-1时的总和,要推到M=i时的总和。根据杨辉三角公式,第一种情况直接乘2,第二种是乘2再减掉Cki−1,第三种是乘2减掉Cki−1和Ct−1i−1 复杂度是线性的 #include <cstdio> #include <cstring> #include <algorithm> using namespace std; const int N=9e5+5,mo=1e9+7; typedef long long LL; int n,m,K,ans,Fac[N],Inv[N],p[N]; int C(i...
a.cc:2:1: error: extended character 。 is not valid in an identifier 2 | 考虑后面的求和部分。它显然分成三段。形式分别是∑Mi=0CiM;∑ki=0CkM;∑ki=tCkM | ^ a.cc:2:1: error: extended character 。 is not valid in an identifier a.cc:2:1: error: extended character ∑ is not valid in an identifier a.cc:2:51: error: extended character ∑ is not va...
s576977533
p04004
C++
#include <bits/stdc++.h> #define endl '\n' using namespace std; template<class T, class T2> inline void chkmax(T &x, const T2 &y) { if(x < y) x = y; } template<class T, class T2> inline void chkmin(T &x, const T2 &y) { if(x > y) x = y; } const int MAXN = (1 << 21); const int mod = (int)1e9 + 7; const double PI = acos(...
a.cc:453:1: error: 'v' does not name a type; did you mean 'vi'? 453 | v | ^ | vi
s206346547
p04004
C++
#include<iostream> #include<algorithm> #include<vector> using namespace std; #define fi(a,b) for(int i=a;i<b;++i) typedef long long ll; /////////////////// int const N = 3e3 + 41; int const MOD = 1e9 + 7; int n, m, k; int f[N], invf[N]; int th[N]; int ans; void add(int &a, int b){ a += b; while(a >= MOD) a -= MO...
a.cc: In function 'void solve()': a.cc:76:9: error: 'memset' was not declared in this scope 76 | memset(dg, 255, sizeof(dg)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include<vector> +++ |+#include <cs...
s634534403
p04004
C++
#include<bits/stdc++.h> using namespace std; int N, M, K, v[600009]; const int mod = 1e9 + 7; int add (int x, int y) {int ans = x + y; if (ans >= mod) ans -= mod; return ans;} int subtract (int x, int y) {if (x >= y) return x - y; return x - y + mod;} int mul (int x, int y) {return 1LL * x * y % mod;} void adto (int...
a.cc: In function 'int main()': a.cc:31:1: error: expected primary-expression before '/' token 31 | /freopen ("input", "r", stdin); | ^
s985454942
p04004
C++
あせfvf
a.cc:1:1: error: '\U00003042\U0000305bfvf' does not name a type 1 | あせfvf | ^~~~~~~
s699575780
p04004
Java
#include<bits/stdc++.h> using namespace std; long long FACT[1000000]; long long IFACT[1000000]; static int MOD = 1000000007; static int mod = MOD; int modPow(long a, long b) { if(b == 0) return 1 % MOD; if(b == 1) return (int) (a % MOD); if(b % 2 == 0) { long ret = modPow(a % MOD,b / 2) % MOD; return (int)((r...
Main.java:1: error: illegal character: '#' #include<bits/stdc++.h> ^ Main.java:1: error: class, interface, enum, or record expected #include<bits/stdc++.h> ^ Main.java:4: error: class, interface, enum, or record expected long long FACT[1000000]; ^ Main.java:5: error: class, interface, enum, or record expected l...
s490275929
p04004
Java
import java.awt.geom.Point2D; import java.io.*; import java.math.*; import java.util.*; import java.util.Map.*; public class Main { public static long C(int n, int r) { if(n < 0 || r < 0 || r > n)return 0; if(r > n / 2)r = n - r; return FACT[n]*IFACT[n-r]%mod*IFACT[r]%mod; } long extGcd() static lo...
Main.java:17: error: ';' expected long extGcd() ^ 1 error
s259343305
p04004
Java
import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.Arrays; import java.util.InputMismatchException; public class D3 { static InputStream is; static PrintWriter out; static String INPUT = ""; static void solve() { int n = ni...
Main.java:8: error: class D3 is public, should be declared in a file named D3.java public class D3 { ^ 1 error
s129480197
p04004
C++
#include <bits/stdc++.h> using namespace std; double PI=3.141592653589793; complex <double> dftn[2100007]; complex <double> dfts[2100007]; complex <double> a1[2100007]; complex <double> b1[2100007]; complex <double> a2[2100007]; complex <double> b2[2100007]; double cosi[2100007]; complex <double> omega[2100007]; i...
a.cc: In function 'std::vector<long long int> fft_dokladne(std::vector<long long int>&, std::vector<long long int>&)': a.cc:137:41: error: 'mod' was not declared in this scope; did you mean 'modf'? 137 | ret[i]+=(llround(dftn[i].real()/n1)%mod)*((M*M)%1000000007); | ^...