submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s196640598
p00743
C++
#include<iostream> #include<cmath> #include<queue> #include<vector> #define INF 1e10 #define EPS 1e-10 using namespace std; struct edge{ int to,limit; double dist; }; vector<edge> G[100]; double d[40][100]; bool used[40][100]; typedef pair<int,int> pii; //to,speed typedef pair<double,pii> P;//cost,to,speed double ...
a.cc: In function 'double dikstra(int, int)': a.cc:24:3: error: 'memset' was not declared in this scope 24 | memset(used,0,sizeof(used)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include<queue> +++ |+#include <cst...
s886540974
p00743
C++
#include<iostream> #include<cmath> #include<queue> #include<vector> #include<cstdio> #define INF 1e10 #define EPS 1e-10 using namespace std; struct edge{ int to,limit; double dist; }; vector<edge> G[100]; double d[40][100]; bool used[40][100]; typedef pair<int,int> pii; //to,speed typedef pair<double,pii> P;//cost,...
a.cc: In function 'double dikstra(int, int)': a.cc:25:3: error: 'memset' was not declared in this scope 25 | memset(used,0,sizeof(used)); | ^~~~~~ a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 5 | #include<cstdio> +++ |+#include <cs...
s871494963
p00743
C++
#include<bits/std.h++> #define INF 1e10 #define EPS 1e-10 using namespace std; struct edge{ int to,limit; double dist; }; vector<edge> G[100]; double d[40][100]; bool used[40][100]; typedef pair<int,int> pii; //to,speed typedef pair<double,pii> P;//cost,to,speed double dikstra(int s,int g){ int ds[3]={-1,0,1}; ...
a.cc:1:9: fatal error: bits/std.h++: No such file or directory 1 | #include<bits/std.h++> | ^~~~~~~~~~~~~~ compilation terminated.
s800058930
p00743
C++
#include <cstdio> #include <cstring> #include <queue> #include <vector> #include <algorithm> using namespace std; int visited[31][31][31]; int d[31]; typedef struct edge { int to, cost, limit; edge(int x, int y, int z): to(x), cost(y), limit(z) {} } Edge; typedef struct status { int from, to, speed; ...
a.cc: In function 'int main()': a.cc:41:16: error: invalid conversion from 'int' to 'void*' [-fpermissive] 41 | memset(d, 0, sizeof(d)); | ^ | | | int In file included from /usr/include/c++/14/cstring:43, from a.cc:2: /usr/includ...
s537715737
p00743
C++
#include <cstdio> #include <cstring> #include <vector> #include <queue> #include <algorithm> using namespace std; const int INFINITY_HAHA = 999999; typedef struct edge { int to, limit; double dist; edge(int x, double y, int z): to(x), dist(y), limit(z) {} } Edge; typedef struct status { int from, now...
a.cc:79:40: error: stray '#' in program 79 | for(int z = -1; z <= 1;#include <cstdio> | ^ a.cc: In function 'int main()': a.cc:79:41: error: 'include' was not declared in this scope 79 | for(int z = -1; z <= 1;#include <cstdio> | ...
s916133128
p00743
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,x,y) for(int i=(x);i<(y);++i) #define debug(x) #x << "=" << (x) #ifdef DEBUG #define _GLIBCXX_DEBUG #define dump(x) std::cerr << debug(x) << " (L:" << __LINE__ << ")" << std::endl #else #define dump(x) #endif typedef long long int ll; typedef pair<int,int> ...
a.cc:104:11: error: redefinition of 'const int inf' 104 | const int inf=1<<30; | ^~~ a.cc:18:11: note: 'const int inf' previously defined here 18 | const int inf=1<<30; | ^~~ a.cc:105:21: error: redefinition of 'const long long int infll' 105 | const long long int infll=1LL<<58; ...
s172632319
p00743
C++
#include <vector> #include <iostream> #include <utility> #include <algorithm> #include <string> #include <deque> #include <tuple> #include <queue> #include <functional> #include <cmath> #include <iomanip> using namespace std; typedef long long ll; double cut[32][32][32]; pair<int,int> way[32][32]; int main() { int n, ...
a.cc: In function 'int main()': a.cc:21:84: error: expected ')' before ';' token 21 | fill((pair<int,int>*)way, (pair<int,int>*)way + 1024,make_pair(0,0); | ~ ^ | ...
s228491113
p00743
C++
#include <cstdio> #include <iostream> #include <cmath> #include <ctype.h> #include <string> #include <sstream> #include <iostream> #include <algorithm> #include <cstdlib> #include <map> #include <queue> #include <utility> #include <vector> #include <set> #include <list> #include <cstring> #include <stack> using na...
a.cc:91:2: error: stray '#' in program 91 | }#include <cstdio> | ^ a.cc:91:3: error: 'include' does not name a type 91 | }#include <cstdio> | ^~~~~~~ a.cc:113:5: error: redefinition of 'int n' 113 | int n, m, s, g; | ^ a.cc:23:5: note: 'int n' previously declared here 23 | int n, m, ...
s911601077
p00743
C++
//#define DEBUG #include <bits/stdc++.h> using namespace std; /*{{{*/ //template #define REP(i,n) for(int i=0;i<n;i++) #define rep(i,n) for(int i=0;i<n;i++) #define INF 1<<29 #define LINF LLONG_MAX/3 #define MP make_pair #define PB push_back #define EB emplace_back #define ALL(v) (v).begin(),(v).end() #define all(v) A...
a.cc: In function 'void solve(int, int)': a.cc:88:20: error: 'nseed' was not declared in this scope; did you mean 'nspeed'? 88 | if(nseed<=0 or nspeed>c) continue; | ^~~~~ | nspeed
s152915391
p00743
C++
#include <iostream> #include <queue> #include <vector> using namespace std; class Node { public: int pre; int now; int vel; double time; Node(int p, int n, int v, double t) { pre = p; now = n; vel = v; time = t; } bool operator<(const Node &n) const { return time > n.time; } }; i...
In file included from /usr/include/c++/14/string:49, 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 /usr/include/c++/14/ostream:40, from /usr/includ...
s366299288
p00743
C++
=#include <iostream> #include <vector> #include <queue> #include <cstdio> #define REP(i, a, n) for(int i = (a); i <= (n); i++) #define INF 100000000.0 using namespace std; struct state { int n, v, l; double t; }; int N, M, S, G; vector<int> T[301], D[301], C[301]; int vd[3] = { -1, 0, 1 }; double dp[31][51]; class Co...
a.cc:1:2: error: stray '#' in program 1 | =#include <iostream> | ^ a.cc:1:1: error: expected unqualified-id before '=' token 1 | =#include <iostream> | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/vector:62, from a.cc...
s538070089
p00743
C++
#include<iostream> #include<iomanip> #include<math.h> #include<algorithm> #include<string> #include<vector> #include<queue> #include<stack> #include<set> #include<map> #define REP(i, N) for(ll i = 0; i < N; ++i) #define FOR(i, a, b) for(ll i = a; i < b; ++i) #define ALL(a) (a).begin(),(a).end() #define pb push_back #de...
a.cc: In function 'int main()': a.cc:44:32: error: expected ';' before ']' token 44 | d[0][i]][1] = 0; | ^ | ; a.cc:44:31: warning: ignoring return value of 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>:...
s566253671
p00743
C++
#include <bits/stdc++.h> #define r(i,n) for(int i=0;i<n;i++) #define se second #define fi first using namespace std; typedef pair<pair<int,int>,int>P; struct edge{int to,lim;double dist;}; int n,m,st,go,a1,a2,a4; double d[31][31],a3; int dx[]={-1,0,1}; edge e; vector<edge> v[31]; int main(){ while(cin>>n>>m,n){ r...
a.cc: In function 'int main()': a.cc:30:13: error: 'class std::priority_queue<std::pair<std::pair<int, int>, int> >' has no member named 'front' 30 | P p=q.front();q.pop(); | ^~~~~
s975905699
p00743
C++
#include <bits/stdc++.h> #include <functional> #define r(i,n) for(int i=0;i<n;i++) #define se second #define fi first using namespace std; struct ed{int a,b;}; typedef pair<int,ed> P; struct edge{int to,lim;double dist;}; int n,m,st,go,a1,a3,a2,a4; double d[31][31]; int dx[]={-1,0,1}; vector<edge> v[31]; int main(){ ...
a.cc: In lambda function: a.cc:27:75: error: expected primary-expression before '.' token 27 | priority_queue<P,vector<P>, function<bool(P,P)>>q([](P a,P b){return P.fi<P.se}); | ^ a.cc:27:80: error: expected primary-expression befor...
s216364058
p00743
C++
s
a.cc:1:1: error: 's' does not name a type 1 | s | ^
s944669062
p00743
C++
#include"bits/stdc++.h" using namespace std; using ll = long long; int n, m; int s, g; struct Edge { int to, dist, c; Edge(int to, int dist, int c) { this->to = to; this->dist = dist; this->c = c; } }; struct Elem { int d, p, v; Elem(int d, int p, int v) { this->...
a.cc: In function 'void dijkstra(int, int)': a.cc:38:15: error: invalid conversion from 'const char*' to 'int' [-fpermissive] 38 | memset(d, "0x3f", sizeof(d)); | ^~~~~~ | | | const char* In file included from /usr/include/c++/14/cstring:43, ...
s513516868
p00743
C++
#include<cstdio> #include<queue> #define rep(i,n) for(int i=0;i<n;i++) #define INF 1e9 using namespace std; double cost[30][30][31]; int d[30][30],c[30][30],v[30][30][31]; class S{ double cc;int c,p,v; S(double cc,int c,int p,int v):cc(cc),c(c),p(p),v(v){} bool operator<(const S &a)const{ return cc>a.cc; } }; int...
a.cc: In function 'int main()': a.cc:24:54: error: 'S::S(double, int, int, int)' is private within this context 24 | priority_queue<S> F; F.push(S(0,s,s,0)); cost[s][s][0]=0; | ^ a.cc:9:9: note: declared private here 9 | S(double ...
s864544785
p00743
C++
#include <iostream> #include <queue> using namespace std; double memo[32][32]; //[vol][vertex] = time int N,M,S,G; struct e { int d,c; }edge[32][32]; void solve(int vertex,int vol,int befor,double cost,int cnt) { if(cost > memo[1][G])return; //printf("%d,%d,%d,%lf,%d\n",vertex,vol,befor,cost,cnt); int v; for(i...
a.cc: In function 'int main()': a.cc:49:17: error: 'memset' was not declared in this scope 49 | memset(edge,0,sizeof(edge)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <queue> +++...
s647056428
p00743
C++
#include <iostream> #include <stdlib.h> #include <queue> using namespace std; double memo[32][32]; //[vol][vertex] = time int N,M,S,G; struct e { int d,c; }edge[32][32]; void solve(int vertex,int vol,int befor,double cost,int cnt) { if(cost > memo[1][G])return; //printf("%d,%d,%d,%lf,%d\n",vertex,vol,befor,cost,cn...
a.cc: In function 'int main()': a.cc:50:17: error: 'memset' was not declared in this scope 50 | memset(edge,0,sizeof(edge)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <queue> +++...
s178465087
p00743
C++
#include <iostream> #include <queue> #define EPS (1.0e-9) #define LT(x, y) ((x) - (y) <= -EPS) // x < y #define INF (1<<19) using namespace std; typedef struct DisLim { int d, c; // dist, limit v DisLim() {} DisLim(int d, int c) : d(d),c(c) {} } DisLim; int N,M; int S,G; // start, goal DisLim F[31][31]; double dist...
a.cc:61:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 61 | main() { | ^~~~ a.cc: In function 'int main()': a.cc:64:4: error: 'memset' was not declared in this scope 64 | memset(visited,0,sizeof(visited)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<c...
s871950907
p00743
C++
#include <iostream> #include <queue> #include <stdlib.h> #define EPS (1.0e-9) #define LT(x, y) ((x) - (y) <= -EPS) // x < y #define INF (1<<19) using namespace std; typedef struct DisLim { int d, c; // dist, limit v DisLim() {} DisLim(int d, int c) : d(d),c(c) {} } DisLim; int N,M; int S,G; // start, goal DisLim F[3...
a.cc:62:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 62 | main() { | ^~~~ a.cc: In function 'int main()': a.cc:65:4: error: 'memset' was not declared in this scope 65 | memset(visited,0,sizeof(visited)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<c...
s929596768
p00743
C++
#include <iostream> #include <queue> #include <stdlib.h> #define EPS (1.0e-9) #define LT(x, y) ((x) - (y) <= -EPS) // x < y #define INF (1<<19) using namespace std; typedef struct DisLim { int d, c; // dist, limit v DisLim() {} DisLim(int d, int c) : d(d),c(c) {} } DisLim; int N,M; int S,G; // start, goal DisLim F[3...
a.cc:63:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 63 | main() { | ^~~~ a.cc: In function 'int main()': a.cc:66:4: error: 'memset' was not declared in this scope 66 | memset(visited,0,sizeof(visited)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<c...
s234132121
p00743
C++
#include <iostream> #include <vector> #include <queue> using namespace std; typedef vector< vector<int> > graph; class Node{ public: int p, v, prev; double cost; Node(int p, int v, int prev, double cost) : p(p), v(v), prev(prev), cost(cost) {} bool operator < (const Node &nd) const { return cost > nd.cost; } }; ...
a.cc: In function 'int main()': a.cc:25:17: error: 'memset' was not declared in this scope 25 | memset(visit, false, sizeof(visit)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <queu...
s166295783
p00743
C++
#include <iostream> #include <sstream> #include <iomanip> #include <cmath> #include <string> #include <vector> #include <list> #include <queue> #include <stack> #include <set> #include <map> #include <bitset> #include <algorithm> using namespace std; class data { public: int p, q, c; data(int p0, int q0, int c...
a.cc: In function 'void solve(int, int, int, std::vector<std::vector<int> >, std::vector<std::vector<int> >)': a.cc:49:96: error: 'DBL_MAX' was not declared in this scope 49 | vector<vector<vector<double> > > time(n, vector<vector<double> >(n, vector<double>(31, DBL_MAX))); | ...
s541201160
p00743
C++
#include <iostream> #include <sstream> #include <iomanip> #include <cmath> #include <climits> #include <string> #include <vector> #include <list> #include <queue> #include <stack> #include <set> #include <map> #include <bitset> #include <algorithm> using namespace std; class data { public: int p, q, c; data(in...
a.cc: In function 'void solve(int, int, int, std::vector<std::vector<int> >, std::vector<std::vector<int> >)': a.cc:50:96: error: 'DBL_MAX' was not declared in this scope 50 | vector<vector<vector<double> > > time(n, vector<vector<double> >(n, vector<double>(31, DBL_MAX))); | ...
s157289396
p00743
C++
// 2009‘“à—\‘ID —£ŽU“I‘¬“x #include <iostream> #include <vector> #include <queue> using namespace std; typedef vector< vector<int> > graph; class Node{ public: // p : Œ»ÝˆÊ’u // v : Œ»Ý‚̃Xƒs[ƒh // prev : ‘O‚É‚¢‚½ŠX”ԍ† // cost : ‚±‚±‚܂ł̋——£ int p, v, prev; double cost; Node(int p, int v, int prev, doub...
a.cc: In function 'int main()': a.cc:34:17: error: 'memset' was not declared in this scope 34 | memset(visit, false, sizeof(visit)); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include <queu...
s357355854
p00743
C++
#include <iostream> #include <map> #include <queue> #include <cmath> #include <cstdio> using namespace std; const double eps = 1e-12; const double inf = (double)(1<<24); const int size = 31; int n, m; class Node { public: double t; int v, town, p; bool operator == ( const Node right ) const { return t == ri...
a.cc:34:8: error: reference to 'size' is ambiguous 34 | bool P[size][size]; // path | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/inc...
s146558942
p00743
C++
#include<iostream> #include<vector> #include<queue> using namespace std; struct edge{ int cost,limit; edge(int c,int l){ cost=c;limit=l; } }; #define INF 1000000 struct Node{ int now,speed,before; double time; Node(int n,int s,double t,int bef){ now=n;speed=s;time=t;before=bef; } }; bool operator < (Node...
a.cc:77:8: error: redefinition of 'struct edge' 77 | struct edge{ | ^~~~ a.cc:6:8: note: previous definition of 'struct edge' 6 | struct edge{ | ^~~~ a.cc:86:8: error: redefinition of 'struct Node' 86 | struct Node{ | ^~~~ a.cc:15:8: note: previous definition of 'struct ...
s994479193
p00743
C++
#include<iostream> #include<vector> #include<queue> using namespace std; struct edge{ int cost,limit; edge(int c,int l){ cost=c;limit=l; } }; #define INF 1000000 struct Node{ int now,speed,before; double time; Node(int n,int s,double t,int bef){ now=n;speed=s;time=t;before=bef; } }; bool operator < (Node...
a.cc: In function 'void solve()': a.cc:40:9: error: 'memset' was not declared in this scope 40 | memset(Ans,-1,sizeof(Ans)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include<queue> +++ |+#include <cstr...
s805722435
p00743
C++
#include<iostream> using namespace std; int main() { int n,m; while(cin>>n>>m){ while(true) } return 0; }
a.cc: In function 'int main()': a.cc:9:1: error: expected primary-expression before '}' token 9 | } | ^
s016187583
p00743
C++
#include <iostream> #include <queue> #include <cstring> #include <cstdio> using namespace std; struct NODE{ int from,to,speed; double cost; NODE(int from,int to,int speed,double cost) : from(from) , to(to) , speed(speed) , cost(cost) { } }; bool operator < (const NODE &a,const NODE &b){ return a.cost > b.cost; } ...
a.cc:57:2: error: stray '#' in program 57 | }#include <iostream> | ^ a.cc:57:3: error: 'include' does not name a type 57 | }#include <iostream> | ^~~~~~~ a.cc:63:8: error: redefinition of 'struct NODE' 63 | struct NODE{ | ^~~~ a.cc:7:8: note: previous definition of 'struct NODE' ...
s781067970
p00743
C++
#include<iostream> #include<queue> #include<vector> #include<cmath> #include<cstdio> #include<map> #define F first #define S second #define EPS 1e-10 #define INF 1<<29 using namespace std; typedef pair<int,int> P; typedef pair<P,int> PP; typedef pair<double,int> dP; typedef pair<P,dP> PPP; int main(){ while(true...
a.cc: In function 'int main()': a.cc:22:20: error: 'n' was not declared in this scope; did you mean 'yn'? 22 | scanf("%d %d",&n,&m); | ^ | yn a.cc:22:23: error: 'm' was not declared in this scope; did you mean 'tm'? 22 | scanf("%d %d",&n,&m); | ...
s908596997
p00743
C++
#include <vector> #include <list> #include <map> #include <set> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <queue> #include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <cst...
a.cc: In function 'int main()': a.cc:81:23: error: no matching function for call to 'std::priority_queue<std::pair<double, std::pair<int, std::pair<int, int> > >, std::vector<std::pair<double, std::pair<int, std::pair<int, int> > > >, std::greater<std::pair<double, std::pair<int, std::pair<int, int> > > > >::push(std::...
s505364170
p00743
C++
#include<iostream> #include<cstdio> #include<cstdlib> #include<set> #define INF 100000.0 using namespace std; struct S{ int town; int from; int v; double cost; void set(int a,int b,int c,double d){ town=a;from=b;v=c;cost=d; } inline bool operator<(const S &a)const{ return this->cost<a.cost; } }; double dp[3...
a.cc: In function 'int main()': a.cc:32:17: error: 'memset' was not declared in this scope 32 | memset(d,-1,sizeof(d)); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include<set> +++ |+#incl...
s070990092
p00743
C++
#include <iostream> #include <vector> #include <queue> #include <climits> using namespace std; typedef vector<int> VI; typedef vector<VI> VVI; typedef vector<VVI> VVVI; typedef vector<double> VD; typedef vector<VD> VVD; typedef vector<VVD> VVVD; /* Dijstra 頂点を拡張して属性を持たせる ノード番号・直前の道・速度 := 時間 終点の速度 1の状態から min_elemen...
a.cc: In function 'int main()': a.cc:80:48: error: 'DBL_MAX' was not declared in this scope 80 | VVVD dist( n, VVD( n, VD( 101, DBL_MAX ) ) ); | ^~~~~~~ a.cc:46:1: note: 'DBL_MAX' is defined in header '<cfloat>'; this is probably fixable by adding ...
s865820781
p00743
C++
#include<stdio.h> #include<queue> #include<algorithm> using namespace std; double ijk[30][31][31]; int v[30][31][31]; int g[30][30]; int lim[30][30]; int main(){ int a,b; while(scanf("%d%d",&a,&b),a){ int S,T; scanf("%d%d",&S,&T); S--;T--; for(int i=0;i<a;i++) for(int j=0;j<a;j++) g[i][j]=-1; for(int...
a.cc: In function 'int main()': a.cc:34:42: error: 'const __gnu_cxx::__alloc_traits<std::allocator<std::pair<double, std::pair<std::pair<int, int>, int> > >, std::pair<double, std::pair<std::pair<int, int>, int> > >::value_type' {aka 'const struct std::pair<double, std::pair<std::pair<int, int>, int> >'} has no member ...
s517175315
p00743
C++
#include<stdio.h> #include<queue> #include<algorithm> using namespace std; double ijk[30][31][31]; int v[30][31][31]; int g[30][30]; int lim[30][30]; int main(){ int a,b; while(scanf("%d%d",&a,&b),a){ int S,T; scanf("%d%d",&S,&T); S--;T--; for(int i=0;i<a;i++) for(int j=0;j<a;j++) g[i][j]=-1; for(int...
a.cc: In function 'int main()': a.cc:34:42: error: 'const __gnu_cxx::__alloc_traits<std::allocator<std::pair<double, std::pair<std::pair<int, int>, int> > >, std::pair<double, std::pair<std::pair<int, int>, int> > >::value_type' {aka 'const struct std::pair<double, std::pair<std::pair<int, int>, int> >'} has no member ...
s726869054
p00743
C++
#include<iostream> #include<cstdio> #include<vector> #include<set> #include<string> #include<map> #include<cmath> #include<queue> #define P pair<int ,int> using namespace std; int spd[3] = {1, 0, -1}; struct E { int dst, cost, lim; E(int d, int c, int l) { dst = d; cost = c; lim = l; } }; struct N { int po...
a.cc: In function 'int main()': a.cc:48:17: error: 'memset' was not declared in this scope 48 | memset(f, 0, sizeof(f)); | ^~~~~~ a.cc:9:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 8 | #include<queue> +++ |+#i...
s790227986
p00744
Java
import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Arrays; import java.util.NoSuchElementException; public class AOJ1163 { private static long gcd(long a, long b) { return b == 0 ? a : gcd(b, a % b); } ...
Main.java:9: error: class AOJ1163 is public, should be declared in a file named AOJ1163.java public class AOJ1163 { ^ 1 error
s015246222
p00744
C
#include <iostream> #include <vector> #include <cstdlib> #define SIZE 1000 using namespace std; int m, n, b[501], r[501]; int match[SIZE]; bool used[SIZE]; vector<int> G[SIZE]; bool dfs(int v){ used[v]=1; for(int i=0; i<G[v].size(); i++){ int u=G[v][i], w=match[u]; if(w<0||!used[w]&&dfs(w)){ match[v]=u, mat...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s916280792
p00744
C
#include <iostream> #include <vector> #include <cstring> #define SIZE 1000 using namespace std; int m, n, b[501], r[501]; int match[SIZE]; bool used[SIZE]; vector<int> G[SIZE]; bool dfs(int v){ used[v]=1; for(int i=0; i<G[v].size(); i++){ int u=G[v][i], w=match[u]; if(w<0||!used[w]&&dfs(w)){ match[v]=u, mat...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s719807452
p00744
C++
#include <iostream> #include <vector> #define SIZE 1000 using namespace std; int m, n, b[501], r[501]; int match[SIZE]; bool used[SIZE]; vector<int> G[SIZE]; bool dfs(int v){ used[v]=1; for(int i=0; i<G[v].size(); i++){ int u=G[v][i], w=match[u]; if(w<0||!used[w]&&dfs(w)){ match[v]=u, match[u]=v; return ...
a.cc: In function 'void solve()': a.cc:26:9: error: 'memset' was not declared in this scope 26 | memset(match, -1, sizeof(match)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <vector> +++ |+#inclu...
s868879059
p00744
C++
#include <iostream> #include <vector> #include <cstdlib> #define SIZE 1000 using namespace std; int m, n, b[501], r[501]; int match[SIZE]; bool used[SIZE]; vector<int> G[SIZE]; bool dfs(int v){ used[v]=1; for(int i=0; i<G[v].size(); i++){ int u=G[v][i], w=match[u]; if(w<0||!used[w]&&dfs(w)){ match[v]=u, mat...
a.cc: In function 'void solve()': a.cc:27:9: error: 'memset' was not declared in this scope 27 | memset(match, -1, sizeof(match)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <cstdlib> +++ |+#incl...
s133668905
p00744
C++
#include<cstdio> #include<iostream> #include<vector> #include<queue> #include<functional> #define rep(i,a,b) for(int (i)=(a);(i)<(b);(i)++) #define MaxCards 1000 using namespace std; int b,r,V; int blue[MaxCards],red[MaxCards]; vector<int> G[MaxCards]; int match[MaxCards]; // マッチングのペア bool used[MaxCards]; // DFSですでに調べた...
a.cc: In function 'int bipartite_matching()': a.cc:39:5: error: 'memset' was not declared in this scope 39 | memset(match, -1, sizeof(match)); | ^~~~~~ a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 5 | #include<functional> +++ |...
s346431069
p00744
C++
#include<cstdio> #include<iostream> #include<vector> #include<queue> #include<functional> #define rep(i,a,b) for(int (i)=(a);(i)<(b);(i)++) #define MaxCards 1000 using namespace std; int b,r,V; int blue[MaxCards],red[MaxCards]; vector<int> G[MaxCards]; int match[MaxCards]; bool used[MaxCards]; void add_edge(int u, ...
a.cc: In function 'int bipartite_matching()': a.cc:38:5: error: 'memset' was not declared in this scope 38 | memset(match, -1, sizeof(match)); | ^~~~~~ a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 5 | #include<functional> +++ |...
s742824483
p00744
C++
from collections import deque inf = 100000000000000000 def bfs(graph, s, t): V = len(graph) q = deque([(s, -1, -1)]) prev = [(-1, -1)] * V visited = [False] * V while len(q) > 0: (v, p, e) = q.popleft() if visited[v]: continue visited[v] = True prev[v] =...
a.cc:18:18: warning: multi-character character constant [-Wmultichar] 18 | if e['cap'] > 0: | ^~~~~ a.cc:19:29: warning: multi-character character constant [-Wmultichar] 19 | q.append((e['to'], v, i)) | ^~~~ a.cc:29:29: warning: ...
s645327303
p00744
C++
#include <iostream> #include <cstdio> #include <vector> #include <queue> #include <cmath> #include <algorithm> #include <functional> using namespace std; #define rep(i,n) for(int i=0;i<(n);++i) #define rep1(i,n) for(int i=1;i<=(n);++i) #define all(c) (c).begin(),(c).end() #define pb push_back #define fs first #define s...
a.cc: In function 'int nibu()': a.cc:44:9: error: 'memset' was not declared in this scope 44 | memset(match,-1,sizeof(match)); | ^~~~~~ a.cc:8:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 7 | #include <functional> +++ |+#inclu...
s053520933
p00744
C++
#include<iostream> #include<vector> #define INF 999999 #define MAX_V 10000 using namespace std; typedef struct edge{ int to,cap,rev; }edge; int val[MAX_V]; vector<edge> G[MAX_V]; bool used[MAX_V]; bool gcd(int a,int b){ int r=a%b; while(r>0){ a=b; b=r; r=a%b; } if(b!=1)return true; else retur...
a.cc: In function 'void makeG(int, int)': a.cc:27:3: error: 'memset' was not declared in this scope 27 | memset(G,0,sizeof(G)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<vector> +++ |+#include <cstring> ...
s270303659
p00744
C++
#include <cstdio> #include <vector> using namespace std; const int INF=1000; struct edge{ int to,cap,rev; }; vector<edge> graph[1010]; bool used[1010]; void add_edge(int from,int to,int cap){ graph[from].push_back((edge){to,cap,static_cast<int>(graph[to].size())}); graph[to].push_back((edge){from,0,static_...
a.cc: In function 'int main()': a.cc:60:20: error: '__gcd' was not declared in this scope; did you mean '__gid_t'? 60 | if(__gcd(b[i],r[j])>1) add_edge(i,j+m,1); | ^~~~~ | __gid_t
s119585965
p00744
C++
#include <vector> #include <queue> #include <algorithm> #include <iostream> namespace boost {template <class T>struct integer_iterator {T a;bool operator != (integer_iterator const & it) const { return a != it.a; }T operator * () const { return a; }integer_iterator & operator ++ () { ++ a; return *this; }integer_iterat...
a.cc:7:1: error: expected unqualified-id before 'namespace' 7 | namespace boost {namespace math {template <typename T>T gcd(T a, T b) {if (b <= a) std::swap(a,b);while (a) {T a0 = a;a = b % a0;b = a0;}return b;}template <typename T>T lcm(T a, T b) {return (a * b) / gcd(a,b);}}} | ^~~~~~~~~ a.cc:10:7: error: e...
s373417659
p00744
C++
#include <iostream> #include <cstdio> #include <vector> #define MAX_V 500*500+1 #define INF 501 using namespace std; struct edge{int to,cap,rev;}; vector<edge> G[MAX_V]; bool used[MAX_V]; void add_edge(int from,int to,int cap){ G[from].push_back((edge){to,cap,G[to].size()}); G[to].push_back((edge){from,0,G[fr...
a.cc: In function 'void add_edge(int, int, int)': a.cc:17:45: warning: narrowing conversion of 'G[to].std::vector<edge>::size()' from 'std::vector<edge>::size_type' {aka 'long unsigned int'} to 'int' [-Wnarrowing] 17 | G[from].push_back((edge){to,cap,G[to].size()}); | ~~~~~~...
s483111222
p00744
C++
#include<iostream> #include<cstring> #include<vector> using namespace std; //Class. vector<int> list[100000]; int N, M, E; int match[100000]; bool used[100000]; int x[10000], y[10000]; bool DFS(int V) { used[V] = true; for (int i = 0; i < list[V].size(); i++) { int u = list[V][i]; int w = match[u]; if (w < 0 ||...
a.cc: In function 'int main()': a.cc:49:29: error: '__gcd' was not declared in this scope 49 | if (__gcd(N, M) != 1) { | ^~~~~
s522221610
p00744
C++
#include<bits/stdc++.h> using namespace std; vector<int>list[1000];int N,M,E,i,jmatch[1000],x[1000],y[1000];bool used[1000]; bool DFS(int V){ used[V]=true; for(i=0;i<list[V].size();i++){ int u=list[V][i],w=match[u]; if(w<0||!used[w]&&DFS(w)){ match[V]=u; match[u]=V; return 1; } } return 0; } int SM()...
a.cc: In function 'bool DFS(int)': a.cc:6:19: error: reference to 'list' is ambiguous 6 | for(i=0;i<list[V].size();i++){ | ^~~~ In file included from /usr/include/c++/14/list:65, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:150, from a.cc:...
s106549310
p00744
C++
#include<bits/stdc++.h> using namespace std; vector<int>L[1000];int N,M,E,i,jmatch[1000],x[1000],y[1000];bool used[1000]; bool DFS(int V){ used[V]=true; for(i=0;i<L[V].size();i++){ int u=L[V][i],w=match[u]; if(w<0||!used[w]&&DFS(w)){ match[V]=u; match[u]=V; return 1; } } return 0; } int SM(){ int r=...
a.cc: In function 'bool DFS(int)': a.cc:7:33: error: 'match' was not declared in this scope; did you mean 'jmatch'? 7 | int u=L[V][i],w=match[u]; | ^~~~~ | jmatch a.cc: In function 'int SM()': a.cc:18:16: error: 'match' was ...
s011125563
p00744
C++
#include<iostream> #include<vector> using namespace std; int gcd(int x,int y){ if(x % y == 0){ return y; } return gcd(y,x%y); } bool match(int x){ if(x == -1){ return 1; } for(int i = 0;i < n;i++){ if(c[x][i] == 1 && v[i] == 0){ v[i] = 1; if(mat...
a.cc: In function 'bool match(int)': a.cc:17:23: error: 'n' was not declared in this scope 17 | for(int i = 0;i < n;i++){ | ^ a.cc:18:12: error: 'c' was not declared in this scope 18 | if(c[x][i] == 1 && v[i] == 0){ | ^ a.cc:18:28: error: 'v' was not declar...
s420732871
p00744
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; #define rep(i,n) for(int i = 0;i < n;i++) #define clr(n) memset(n,0,sizeof(n)); const int INF = 1e9; int gcd(int a, int b) { return b ? gcd(b, a%b) : a; } struct edge { int to, cap, rev; }; vector<edge> G[1001]; bool used[1001]; void...
a.cc: In function 'int max_flow(int, int)': a.cc:8:17: error: 'memset' was not declared in this scope 8 | #define clr(n) memset(n,0,sizeof(n)); | ^~~~~~ a.cc:50:17: note: in expansion of macro 'clr' 50 | clr(used); | ^~~ a.cc:4:1: note: 'memset' is def...
s473346611
p00744
C++
#include <cstdio> #include <cstdlib> #include <iostream> #include <cstring> #include <algorithm> #include <vector> #include <cmath> #include <map> #include <set> #define X first #define Y second using namespace std; struct link{ int dest; link *ne; link(int n=0){ dest=n; ne=NULL; } }; int gcd(int a,int b){ ...
a.cc:78:2: error: stray '#' in program 78 | &#171; Back | ^ a.cc:78:3: error: expected unqualified-id before numeric constant 78 | &#171; Back | ^~~ a.cc:78:8: error: 'Back' does not name a type 78 | &#171; Back | ^~~~
s989902912
p00744
C++
#include <iostream> #include <vector> #include <queue> using namespace std; #define reep(i,a,b) for(int i=(a);i<(b);i++) #define rep(i,n) reep((i),0,(n)) typedef vector<int> vint; template<class V> class MaxFlow_dinic{ public: struct edge{int to,reve;V cap;}; static const int MV = 1100; vector<edge> E[MV]; int...
a.cc: In member function 'void MaxFlow_dinic<V>::bfs(int)': a.cc:25:17: error: there are no arguments to 'memset' that depend on a template parameter, so a declaration of 'memset' must be available [-fpermissive] 25 | memset(lev,0xff,sizeof(lev)); | ^~~~~~ a.cc:25:17: note: (if ...
s450739098
p00744
C++
#include <stdio.h> #include <algorithm> #include <vector> #include <queue> #include <functional> using namespace std; #define inf 1000000007 #define rep(i, n) for(int i = 0; i < n; i++) typedef long long ll; class path { public: int t; ll c; int p; }; class dinic { public: int n; vector<path> p; vector...
a.cc: In member function 'll dinic::dfs(int, int, ll)': a.cc:75:17: error: no matching function for call to 'dinic::dfs(int&, const long long int&)' 75 | ll w = dfs(p[x].t, min(mi - all, p[x].c)); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:68:6: note: candidate: 'll dinic::dfs(int, int, ll)' ...
s043227459
p00744
C++
#include <iostream> #include <vector> using namespace std; using ll = long long; /** * ?????¨?????§??????????????° * * O(EV) */ template<int V> struct BitMatching { vector<int> G[2*V]; int match[2*V]; bool used[2*V]; /// ????????? void init() { for (int i = 0; i < 2*V; i++) { ...
a.cc: In instantiation of 'int BitMatching<V>::exec() [with int V = 520]': a.cc:84:24: required from here 84 | cout << bm.exec() << endl; | ~~~~~~~^~ a.cc:44:15: error: 'memset' was not declared in this scope 44 | memset(match, -1, sizeof(match)); | ~~~~~~^~~~...
s628610815
p00744
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; int V; vector<int> G[1010]; int match[1010]; bool used[1010]; void add_edge(int u, int v) { G[u].push_back(v); G[v].push_back(u); } bool dfs(int v) { used[v] = true; for (int i = 0; i < G[v].size(); i++) { int u = G[v][i]; int w...
a.cc: In function 'int bipartite_matching()': a.cc:33:9: error: 'memset' was not declared in this scope 33 | memset(match, -1, sizeof(match)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <algorithm>...
s078497206
p00744
C++
#include <iostream> #include <vector> #include <algorithm> #include <string> using namespace std; int V; vector<int> G[1010]; int match[1010]; bool used[1010]; void add_edge(int u, int v) { G[u].push_back(v); G[v].push_back(u); } bool dfs(int v) { used[v] = true; for (int i = 0; i < G[v].size(); i++) { int u ...
a.cc: In function 'int bipartite_matching()': a.cc:34:9: error: 'memset' was not declared in this scope 34 | memset(match, -1, sizeof(match)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <algorithm>...
s078354225
p00744
C++
include<iostream> #include<vector> #include<string.h> using namespace std; #define REP(i, n) for(int i=0; i<n; i++) int INF = 10e8; int m, n; int b[501]; int r[501]; vector<int> bd[501]; vector<int> rd[501]; struct edge{ int to, cap, rev; }; bool used[501]; vector<edge> g[501]; int s, t; void add_edge(int fr...
a.cc:1:1: error: 'include' does not name a type 1 | include<iostream> | ^~~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/vector:62, from a.cc:2: /usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu_...
s475335757
p00744
C++
#include <iostream> #include <vector> #include <cassert> using namespace std; using ll = long long; template <typename T> constexpr T INF = numeric_limits<T>::max() / 100; class Flow { public: using T = ll; struct Edge { Edge(const int from_, const int to_, const int reverse_, const T capacity_, bool ...
a.cc:8:19: error: 'numeric_limits' was not declared in this scope 8 | constexpr T INF = numeric_limits<T>::max() / 100; | ^~~~~~~~~~~~~~ a.cc:8:35: error: expected primary-expression before '>' token 8 | constexpr T INF = numeric_limits<T>::max() / 100; | ...
s067707031
p00744
C++
#include <iostream> #include <vector> #include <cassert> using namespace std; using ll = long long; constexpr ll INF = numeric_limits<ll>::max() / 100; class Flow { public: using T = ll; struct Edge { Edge(const int from_, const int to_, const int reverse_, const T capacity_, bool is_reverse = false) ...
a.cc:7:20: error: 'numeric_limits' was not declared in this scope 7 | constexpr ll INF = numeric_limits<ll>::max() / 100; | ^~~~~~~~~~~~~~ a.cc:7:37: error: expected primary-expression before '>' token 7 | constexpr ll INF = numeric_limits<ll>::max() / 100; | ...
s520347200
p00744
C++
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s148933245
p00744
C++
#include <bits/stdc++.h> using namespace std; // MEMO // // O(VE) // THE BEGINNING OF THE LIBRARY. struct BipartiteMatching { using UnWeightedGraph=vector< vector<int> >; int n; UnWeightedGraph G; vector<int> match,used; BipartiteMatching() {} BipartiteMatching(int sz):n(sz),G(sz),match(sz),used(sz) {} voi...
a.cc: In function 'int gcd(int, int)': a.cc:52:26: error: expected ';' before 'int' 52 | if(a<b) swap(a,b) | ^ | ; 53 | int r; | ~~~ a.cc:55:17: error: 'r' was not declared in this scope 55 | ...
s054659726
p00744
C++
#include <bits/stdc++.h> using namespace std; // MEMO // // O(VE) // THE BEGINNING OF THE LIBRARY. struct BipartiteMatching { using UnWeightedGraph=vector< vector<int> >; int n; UnWeightedGraph G; vector<int> match,used; BipartiteMatching() {} BipartiteMatching(int sz):n(sz),G(sz),match(sz),used(sz) {} voi...
a.cc: In function 'int gcd(int, int)': a.cc:52:26: error: expected ';' before 'int' 52 | if(a<b) swap(a,b) | ^ | ; 53 | int r; | ~~~ a.cc:55:17: error: 'r' was not declared in this scope 55 | ...
s842369890
p00744
C++
#pragma GCC optimize ("O3") #pragma GCC target ("avx") #include "bits/stdc++.h" using namespace std; using ll = long long int; #define debug(v) {printf("L%d %s > ",__LINE__,#v);cout<<(v)<<endl;} #define debugv(v) {printf("L%d %s > ",__LINE__,#v);for(auto e:(v)){cout<<e<<" ";}cout<<endl;} #define debuga(m,w) {printf...
a.cc: In function 'int main()': a.cc:228:23: error: 'v_s' was not declared in this scope; did you mean 'vs'? 228 | g.connect(v_s,i,1); | ^~~ | vs a.cc:230:23: error: 'v_t' was not declared in this scope; did you mean 'vt'? 230 | g.conne...
s240914185
p00744
C++
#include <iostream> #include <cstdio> #include <vector> #include <queue> #include <string> #include <cmath> #include <algorithm> using namespace std; #define pb push_back #define mp make_pair #define ff first #define ss second typedef long long ll; typedef vector<ll> vi; typedef vector<vi> vvi; const int MAX_P = 10...
a.cc: In member function 'void MF::add_edge(int, int, int)': a.cc:38:49: warning: narrowing conversion of '((MF*)this)->MF::G[to].std::vector<edge>::size()' from 'std::vector<edge>::size_type' {aka 'long unsigned int'} to 'int' [-Wnarrowing] 38 | G[from].push_back((edge){to, cap, G[to].size()}); | ...
s989570574
p00744
C++
#include<cstdio> using namespace std; int MAX_V = 1000; class twoMatching { private: vector<int> G[MAX_V]; int match[MAX_V]; bool used[MAX_V]; int V; public: twoMatching(int v) { V = v; } void add_edge(int u, int v) { G[u].push_back(v); G[v].push_back(u); } bool dfs(int v) { used[v]...
a.cc:8:3: error: 'vector' does not name a type 8 | vector<int> G[MAX_V]; | ^~~~~~ a.cc:9:13: error: size of array 'match' is not an integral constant-expression 9 | int match[MAX_V]; | ^~~~~ a.cc:10:13: error: size of array 'used' is not an integral constant-expression 10 | bo...
s415237614
p00744
C++
#include<iostream> #include<string> #include<cstdio> #include<vector> #include<cmath> #include<algorithm> #include<functional> #include<iomanip> #include<queue> #include<ciso646> #include<random> #include<map> #include<set> #include<complex> using namespace std; typedef long long ll; const ll MOD = 998244353; const ll ...
a.cc: In function 'int max_flow(int, int)': a.cc:65:17: error: 'memset' was not declared in this scope 65 | memset(used, 0, sizeof(used)); | ^~~~~~ a.cc:15:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 14 | #includ...
s312849235
p00744
C++
#include<iostream> #include<vector> #define rep(i,n) for(int i=0;i<n;i++) using namespace std; int m,n,b[500],r[500],p[1000],v[1000]; vector<vector<int> >e; bool match(int s){ if(s<0)return 1; rep(i,e[s].size())if(!v[e[s][i]]){ v[e[s][i]]=1; if(match(p[e[s][i]]))return p[s]=e[s][i],p[e[s][i]]=s,1; } return 0; }...
a.cc: In function 'int main()': a.cc:20:36: error: '__gcd' was not declared in this scope 20 | rep(i,m)rep(j,n)if(__gcd(b[i],r[j])>1)e[i].push_back(m+j),e[m+j].push_back(i); | ^~~~~
s892683488
p00744
C++
#include <iostream> #include "../lib/define.h" #include "../lib/graph.h" #define MAXMN 500 #define Int long long int B[MAXMN]; int R[MAXMN]; Int gcd(Int a, Int b) { return b != 0 ? gcd(b, a % b) : a; } bool augment(const Graph& g, int u, vector<int>& matchTo, vector<bool>& visited) { if (u < 0) return tr...
a.cc:2:10: fatal error: ../lib/define.h: No such file or directory 2 | #include "../lib/define.h" | ^~~~~~~~~~~~~~~~~ compilation terminated.
s631121627
p00744
C++
#include <iostream> #include <vector> using namespace std; #define vec vector #define pb push_back #define FOR(i,c) for(__typeof((c).begin())i=(c).begin() i!=(c).end();++i) #define REP(i,n) for(int i=0; i<(int)(n); i++) //typedef long long Int; typedef int Weight; struct Edge { int src, dst; Weight weight; Edg...
a.cc: In function 'bool augment(const Graph&, int, std::vector<int>&, std::vector<bool>&)': a.cc:39:7: error: expected ';' before 'e' 39 | FOR(e, g[u]) if (!visited[e->dst]) { | ^ a.cc:8:57: note: in definition of macro 'FOR' 8 | #define FOR(i,c) for(__typeof((c).begin())i=(c).begin() i!=(c).end();...
s667911317
p00744
C++
#include <iostream> #include <vector> using namespace std; #define vec vector #define pb push_back #define FOR(i,c) for(__typeof((c).begin())i=(c).begin() i!=(c).end();++i) #define REP(i,n) for(int i=0; i<(int)(n); i++) //typedef long long Int; typedef int Weight; struct Edge { int src, dst; Weight weight; Edg...
a.cc: In function 'bool augment(const Graph&, int, std::vector<int>&, std::vector<bool>&)': a.cc:39:7: error: expected ';' before 'e' 39 | FOR(e, g[u]) if (!visited[e->dst]) { | ^ a.cc:8:57: note: in definition of macro 'FOR' 8 | #define FOR(i,c) for(__typeof((c).begin())i=(c).begin() i!=(c).end();...
s427760336
p00744
C++
#include <stdio.h> #include <string.h> #include <algorithm> #include <iostream> #include <math.h> #include <queue> #include <vector> #include <map> using namespace std; typedef long long ll; static const double EPS = 1e-9; static const double PI = acos(-1.0); #define REP(i, n) for (int i = 0; i < (int)(n); i++) #defi...
a.cc: In function 'int main()': a.cc:184:71: error: expected ')' before ';' token 184 | assert(MaxFlow(g, SOURCE(), DEST() == maxFlow(g, SOURCE(), DEST()); | ~ ^ | ...
s436035034
p00744
C++
#include <stdio.h> #include <string.h> #include <algorithm> #include <iostream> #include <math.h> #include <queue> #include <vector> #include <map> using namespace std; typedef long long ll; static const double EPS = 1e-9; static const double PI = acos(-1.0); #define REP(i, n) for (int i = 0; i < (int)(n); i++) #defi...
a.cc: In function 'int main()': a.cc:184:72: error: expected ')' before ';' token 184 | assert(MaxFlow(g, SOURCE(), DEST() == maxFlow(g, SOURCE(), DEST())); | ~ ^ | ...
s700845164
p00744
C++
#include <stdio.h> #include <string.h> #include <algorithm> #include <iostream> #include <math.h> #include <queue> #include <vector> #include <map> using namespace std; typedef long long ll; static const double EPS = 1e-9; static const double PI = acos(-1.0); #define REP(i, n) for (int i = 0; i < (int)(n); i++) #defi...
a.cc: In function 'int main()': a.cc:184:5: error: 'assert' was not declared in this scope 184 | assert(MaxFlow(g, SOURCE(), DEST()) == maxFlow(g, SOURCE(), DEST())); | ^~~~~~ a.cc:9:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>' 8 | #incl...
s487419822
p00744
C++
#include <iostream> #include <vector> #include <cmath> #define INF 1000000000 #define MAX_V 1000 #define MAX 10000000 using namespace std; int V; vector<int> G[MAX_V]; int match[MAX_V]; bool used[MAX_V]; bool prime[MAX+1]; void eratos(){ int n=MAX; for(int i=0;i<=n;i++) prime[i]=false; for(int i=3;i<=n;i+=2) p...
a.cc: In function 'int bipartite_matching()': a.cc:49:3: error: 'memset' was not declared in this scope 49 | memset(match, -1, sizeof(match)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <cmath> +++ |+#includ...
s416725523
p00744
C++
#include<iostream> #define INF 10000000 #include<algorithm> #include<cmath> #include<vector> #define MAX_V 1003 #define MAX_N 501 #define MAX_M 501 using namespace std; struct edge{ int to,cap,rev; }; bool used[MAX_V]; bool can[MAX_N][MAX_M]; vector<edge> G[MAX_V]; void add_edge(int from,int to,int cap){ edge pre; p...
a.cc: In function 'int max_flow(int, int)': a.cc:43:17: error: 'memset' was not declared in this scope 43 | memset(used,0,sizeof(used)); | ^~~~~~ a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 5 | #include<v...
s490876333
p00744
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; const int MAX_V = 10000; const int INF = 100000000; // ’¸“_” int V; // ƒOƒ‰ƒt‚ÌƒŠƒXƒg•\Œ» vector<int> G[MAX_V]; // ƒ}ƒbƒ`ƒ“ƒO‚̃yƒA int match[MAX_V]; // dfs‚Å‚·‚łɒ²‚ׂ½‚©‚Ç‚¤‚©‚̃tƒ‰ƒO static bool used[MAX_V]; // u‚Æv‚ðŒ‹‚Ô•Ó‚ðƒOƒ‰ƒt...
a.cc: In function 'int bipartite_matching()': a.cc:42:9: error: 'memset' was not declared in this scope 42 | memset(match,-1,sizeof(match)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <algorithm> ...
s487564234
p00744
C++
// Hopcroft-Karp Algorithm // O(|E| * |V|^(1/2)) // http://en.wikipedia.org/wiki/Hopcroft%E2%80%93Karp_algorithm // aoj 1163 #include <vector> #include <queue> #include <iostream> using namespace std; int NIL; const int inf = 1<<29; typedef vector<int> vi; typedef vector<vector<int> > Graph; bool bfs(const Graph &g...
a.cc: In function 'int hopcroft_karp(Graph&, int)': a.cc:57:13: error: 'n' was not declared in this scope 57 | vi pair(n+1, NIL), dist(n+1, 0); | ^ a.cc:62:20: error: 'v' was not declared in this scope 62 | if(v == NIL || dfs(i,graph,dist,pair)) ret++; | ...
s646053278
p00744
C++
// Hopcroft-Karp Algorithm // O(|E| * |V|^(1/2)) // http://en.wikipedia.org/wiki/Hopcroft%E2%80%93Karp_algorithm // aoj 1163 #include <vector> #include <queue> #include <iostream> using namespace std; int NIL; const int inf = 1<<29; typedef vector<int> vi; typedef vector<vector<int> > Graph; bool bfs(const Graph &g...
a.cc: In function 'int hopcroft_karp(Graph&, int)': a.cc:68:20: error: 'v' was not declared in this scope 68 | if(v == NIL || dfs(i,graph,dist,pair)) ret++; | ^
s829905497
p00744
C++
#include <iostream> #include <algorithm> #include <vector> using namespace std; const int INF = 1<<28; struct E { int to, cost, cap, rev; E(int to, int cost, int cap, int rev) : to(to), cost(cost), cap(cap), rev(rev) {} E() {} }; typedef vector<vector<E> > G; void addEdgeF(int from, int to, int cost, int ...
a.cc: In function 'int maxFlow(int, int, G)': a.cc:43:5: error: 'memset' was not declared in this scope 43 | memset(used, 0, sizeof(used)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <vector> +++ |+#incl...
s920591854
p00744
C++
#include <stdio.h> #include <vector> using namespace std; typedef struct{ int t; int c; int r; } edge; vector<edge> g[502]; void add_edge(int from,int to,int cap){ edge e1 = {to,cap,g[to].size()}; g[from].push_back(e1); edge e2 = {from,0,g[from].size() - 1}; g[to].push_back(e2); } int gcd(int x,int y){ if...
a.cc: In function 'void add_edge(int, int, int)': a.cc:15:37: warning: narrowing conversion of 'g[to].std::vector<edge>::size()' from 'std::vector<edge>::size_type' {aka 'long unsigned int'} to 'int' [-Wnarrowing] 15 | edge e1 = {to,cap,g[to].size()}; | ~~~~~~~~~~^~ a.cc:17:42...
s885888315
p00744
C++
#define _GLIBCXX_DEBUG #include <iostream> #include <vector> using namespace std; #define REP(i,n) for(int i=0;i<(int)n;++i) #define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i) #define ALL(c) (c).begin(), (c).end() typedef int Weight; struct Edge { int src, dst; Weight weight; Edge(int sr...
a.cc: In function 'int main()': a.cc:64:14: error: '__gcd' was not declared in this scope 64 | if(__gcd(blue[i], red[j]) > 1) { | ^~~~~
s198744897
p00744
C++
from fractions import gcd V = 1003 G = [] visited = [] match = [] def add_edge(u,v): G[u].append(v) G[v].append(u) def dfs(v): visited[v] = True for u in G[v]: w = match[u] if w < 0 or not visited[w] and dfs(w): match[v] = u match[u] = v return True...
a.cc:1:1: error: 'from' does not name a type 1 | from fractions import gcd | ^~~~
s383291176
p00744
C++
#include<iostream> #include<algorithm> #include<vector> using namespace std; int V; vector<int> G[2000]; int match[2000]; bool used[2000]; void add_edge(int u,int v){ G[u].push_back(v); G[v].push_back(u); } bool dfs(int v){ used[v]=true; for(int i=0;i<(int)G[v].size();i++){ int u=G[v][i],w=match[u]; ...
a.cc: In function 'int bipartite_matching()': a.cc:33:3: error: 'memset' was not declared in this scope 33 | memset(match,-1,sizeof(match)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include<vector> +++ |+#include ...
s738553464
p00746
Java
import java.io.InputStream; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.HashMap; import java.util.InputMismatchException; import java.util.NoSuchElementException; import java.math.BigDecimal; import java.math....
Main.java:22: error: cannot find symbol map.put(0,new Pair(0,-1)); ^ symbol: variable map location: class Main Main.java:23: error: cannot find symbol map.put(1,new Pair(-1,0)); ^ symbol: variable map location: class Main Main.java:24: error: cannot find symbol map.put(2,new Pair(0,1)); ^ symbol: ...
s774866242
p00746
Java
import java.util.*; public class main { /** * @param args */ public static void main(String[] args) { Scanner in = new Scanner(System.in); while(in.hasNext()){ int n = in.nextInt(); if(n == 0) break; int xmax=0,xmin=0,ymax=0,ymin=0; ArrayList<Integer> x = new ArrayList<Integer>(); ArrayList<I...
Main.java:3: error: class main is public, should be declared in a file named main.java public class main { ^ 1 error
s658898575
p00746
Java
import java.util.*; public class main { /** * @param args */ public static void main(String[] args) { Scanner in = new Scanner(System.in); while(in.hasNext()){ int n = in.nextInt(); if(n == 0) break; int xmax=0,xmin=0,ymax=0,ymin=0; ArrayList<Integer> x = new ArrayList<Integer>(); ArrayList<I...
Main.java:3: error: class main is public, should be declared in a file named main.java public class main { ^ 1 error
s133615820
p00746
Java
import java.awt.Point; import java.io.InputStream; import java.util.LinkedList; import java.util.Scanner; public class A { /** * @param args */ public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ InputStream in = System.in; Scanner scanner = new Scanner(in); LinkedList<String> ans = new Lin...
Main.java:6: error: class A is public, should be declared in a file named A.java public class A { ^ 1 error
s687621194
p00746
Java
class Main { public static void main(String args[]) { new Main().run(); } Scanner in = new Scanner(System.in); int[] vx = {-1, 0, 1, 0}; int[] vy = {0, 1, 0, -1}; public void run() { while (true) { int n = in.nextInt(); if (n == 0) break; int[] x = new int[n]; int[] y = new int[n]; x[0] = y[0] = 0; int minX = 0, mi...
Main.java:33: error: reached end of file while parsing } ^ 1 error
s589565849
p00746
Java
class Main { public static void main(String args[]) { new Main().run(); } Scanner in = new Scanner(System.in); int[] vx = {-1, 0, 1, 0}; int[] vy = {0, 1, 0, -1}; public void run() { while (true) { int n = in.nextInt(); if (n == 0) break; int[] x = new int[n]; int[] y = new int[n]; x[0] = y[0] = 0; int minX = 0, mi...
Main.java:6: error: cannot find symbol Scanner in = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:6: error: cannot find symbol Scanner in = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s074859848
p00746
C
#include<stdio.h> int main() { int i,j,k,N,wmax,hmax,count,flag; int d[200]={0},n[200]={0}; int board[401][401]; while(scanf("%d",&N),N){ count=0; for(i=0;i<401;i++){ for(j=0;j<401;j++){ board[i][j]=-1; } } board[200][200]=0; for(i=1;i<N;i++){ scanf("%d%d"...
main.c: In function 'main': main.c:46:5: error: 'wmin' undeclared (first use in this function) 46 | wmin=401; | ^~~~ main.c:46:5: note: each undeclared identifier is reported only once for each function it appears in
s849943050
p00746
C
#include<stdio.h> int main(void){ int i, j, a, b, n, tate, yoko, s[400][400], t[200], y[200]; scanf("%d", &n); while(n!=0){ for(i=0;i<400;i++){ for(j=0;j<400;j++){ s[i][j]=0; } if(i<200){ t[i]=0; y[i]=0; } } t[0]=200; y[0]=200; s[200][200]=1; for...
main.c:62:3: error: expected identifier or '(' before 'return' 62 | return 0; | ^~~~~~ main.c:63:1: error: expected identifier or '(' before '}' token 63 | } | ^
s916353609
p00746
C
#include <stdio.h> #define LEFT 0 #define BOTTOM 1 #define RIGHT 2 #define TOP 3 typedef struct { int n, d; int x, y; } s_square; int main() { int n, x_min, y_min, x_max, y_max; s_square square[200]; square[0] = {0}; //Œ´“_‚ð‰Šú‰» int i; while(1) { scanf("%d", &n); if(n == 0) { break; ...
main.c: In function 'main': main.c:16:15: error: expected expression before '{' token 16 | square[0] = {0}; //Œ´“_‚ð‰Šú‰» | ^ main.c:31:20: error: expected ':' or '...' before '{' token 31 | case(LEFT) { | ^ main.c:32:38: error: '(s_square *)&square' is a p...
s456923703
p00746
C
#include <stdio.h> int x[400][400]={}; int a=200,b=200,n,i,j,k,c,d,w=0,h=0; x[a][b]=1; int main(){ while(1){ scanf("%d",&n); for(i=1;i<=n;i++){ scanf("%d%d",&c,&d); for(j=-n;j<n;j++){ for(k=-n;k<n;k++){ if(x[a+j][b+k]==c+1){ if(d==0) x[a-1+j][b+k]=i+1; if(d==1) x[a+j][b-1+k]=i+1; if(d==2) x[a+1+j][b+k]=i+1; if(d==3) x[...
main.c:3:4: error: stray '\343' in program 3 | int<U+3000>a=200,b=200,n,i,j,k,c,d,w=0,h=0; | ^~~~~~~~ main.c:4:1: warning: data definition has no type or storage class 4 | x[a][b]=1; | ^ main.c:4:1: error: type defaults to 'int' in declaration of 'x' [-Wimplicit-int] main.c:4:1: error: variably m...
s973306988
p00746
C
#include <stdio.h> int main(){ while(1){ int x[400][400]={}; int a=200,b=200,n,i,j,k,c,d,w=0,h=0; x[a][b]=1; scanf("%d",&n); if(n==0) break;0 for(i=1;i<n;i++){ scanf("%d%d",&c,&d); for(j=-n;j<n;j++){ for(k=-n;k<n;k++){ if(x[a+j][b+k]==c+1){ if(d==0) x[a-1+...
main.c: In function 'main': main.c:7:51: error: expected ';' before 'for' 7 | scanf("%d",&n); if(n==0) break;0 | ^ | ; 8 | for(i=1;i<n;i++){ | ...