submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s365140966
p01370
C++
#include <iostream> #include <queue> #include <utility> #define MAX 60 using namespace std; typedef pair<int,int> P; int stage[MAX+1][MAX+1]; int d[MAX+1][MAX+1]; int dx[6] = {0,1,0,-1,1,-1}; int dy[6] = {1,0,-1,0,1,-1}; void clear(){ for(int i = 0;i < MAX+1;i++){ for(int j = 0;j < MAX+1;j++){ d[i][j] = 0; ...
a.cc: In function 'int main()': a.cc:40:30: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 40 | for(int i=0;i<s;i++){ | ~^~
s830015820
p01370
C++
#include <iostream> #include <queue> #include <utility> #define MAX 60 using namespace std; typedef pair<int,int> P; int stage[MAX+1][MAX+1]; int d[MAX+1][MAX+1]; int dx[6] = {0,1,0,-1,1,-1}; int dy[6] = {1,0,-1,0,1,-1}; void clear(){ for(int i = 0;i < MAX+1;i++){ for(int j = 0;j < MAX+1;j++){ d[i][j] = 0; ...
a.cc: In function 'int main()': a.cc:43:30: error: expected ';' before 'cin' 43 | }while(i<n-1) | ^ | ; 44 | cin >> sX >> sY; | ~~~
s293595563
p01370
C++
#include<bits/stdc++.h> using namespace std; //define #define ALL(a) a.begin(),a.end() #define REP(i,n) for(int i=0;i<n;i++) #define RREP(i,n) for(int i=n-1;i>=0;i--) #define debug(x) if(1) cout<<#x<<":"<<x<<endl; #define DEBUG(x) if(1) cout<<#x<<":"<<x<<endl; #define ll long long //constant const int MOD=1000000007;...
a.cc:54:2: error: extended character   is not valid in an identifier 54 |      if(!ob[nx][ny]&&!iscan[nx][ny]) | ^ a.cc:54:2: error: extended character   is not valid in an identifier a.cc:54:2: error: extended character   is not valid in an identifier a.cc:54:2: error: extended character   is not valid in a...
s015847571
p01370
C++
#include<bits/stdc++.h> using namespace std; //define #define ALL(a) a.begin(),a.end() #define REP(i,n) for(int i=0;i<n;i++) #define RREP(i,n) for(int i=n-1;i>=0;i--) #define debug(x) if(1) cout<<#x<<":"<<x<<endl; #define DEBUG(x) if(1) cout<<#x<<":"<<x<<endl; #define ll long long //constant const int MOD=1000000007;...
a.cc:54:2: error: extended character   is not valid in an identifier 54 |      if(!ob[nx][ny]&&!iscan[nx][ny]) | ^ a.cc:54:2: error: extended character   is not valid in an identifier a.cc:54:2: error: extended character   is not valid in an identifier a.cc:54:2: error: extended character   is not valid in a...
s307873376
p01370
C++
#include<bits/stdc++.h> using namespace std; //define #define ALL(a) a.begin(),a.end() #define REP(i,n) for(int i=0;i<n;i++) #define RREP(i,n) for(int i=n-1;i>=0;i--) #define debug(x) if(1) cout<<#x<<":"<<x<<endl; #define DEBUG(x) if(1) cout<<#x<<":"<<x<<endl; #define ll long long //constant const int MOD=1000000007;...
a.cc:54:2: error: extended character   is not valid in an identifier 54 |     if(!ob[nx][ny]&&!iscan[nx][ny]) | ^ a.cc:54:2: error: extended character   is not valid in an identifier a.cc:54:2: error: extended character   is not valid in an identifier a.cc:54:2: error: extended character   is not valid in an...
s051756983
p01370
C++
#include<bits/stdc++.h> using namespace std; //define #define ALL(a) a.begin(),a.end() #define REP(i,n) for(int i=0;i<n;i++) #define RREP(i,n) for(int i=n-1;i>=0;i--) #define debug(x) if(1) cout<<#x<<":"<<x<<endl; #define DEBUG(x) if(1) cout<<#x<<":"<<x<<endl; #define ll long long //constant const int MOD=1000000007;...
a.cc:54:2: error: extended character   is not valid in an identifier 54 |     if(!ob[nx][ny]&&!iscan[nx][ny]) | ^ a.cc:54:2: error: extended character   is not valid in an identifier a.cc:54:2: error: extended character   is not valid in an identifier a.cc:54:2: error: extended character   is not valid in an...
s114167963
p01370
C++
#include<bits/stdc++.h> using namespace std; int dx[6]={1,1,0,0,-1,-1}; int dy[6]={1,0,1,-1,0,-1}; bool isrange(int x,int y){ return 0<=x && x<=60 && 0<=y && y<=60; } int main() { int t,n; while(cin>>t>>n,t){ vector<vector<int>> ob(61,vector<int>(61,0)); for(int i=0;i<n;i++){ i...
a.cc: In function 'int main()': a.cc:56:25: error: expected '}' at end of input 56 | cout<<cnt<<endl; | ^ a.cc:13:23: note: to match this '{' 13 | while(cin>>t>>n,t){ | ^ a.cc:56:25: error: expected '}' at end of input 56 | cout<<cnt...
s806509719
p01370
C++
#include<iostream> #include<queue> #include<vector> #include<utility> #include<algorithm> #define REP(i,n) for(int i=0;i<n;i++) int vec1[]={0,1,-1,1,-1,0}; int vec2[]={1,1,0,0,-1,-1}; int t,n; int table[200][200]; typedef pair<int,int> pii; typedef pair<int,pii> piii; queue<piii> q1; int ans; int solve(int y,int...
a.cc:15:9: error: 'pair' does not name a type 15 | typedef pair<int,int> pii; | ^~~~ a.cc:16:9: error: 'pair' does not name a type 16 | typedef pair<int,pii> piii; | ^~~~ a.cc:17:1: error: 'queue' does not name a type 17 | queue<piii> q1; | ^~~~~ a.cc: In function 'int solve(i...
s466626483
p01370
C++
#include<iostream> #include<queue> #include<vector> #include<utility> #include<algorithm> using namespace std; #define REP(i,n) for(int i=0;i<n;i++) int vec1[]={0,1,-1,1,-1,0}; int vec2[]={1,1,0,0,-1,-1}; int t,n; int table[200][200]; typedef pair<int,int> pii; typedef pair<int,pii> piii; queue<piii> q1; int ans;...
a.cc: In function 'int main()': a.cc:47:43: error: expected ';' before 'for' 47 | fill_n(table[0],200*200,0) | ^ | ; a.cc:48:21: error: 'i' was not declared in this scope 48 | REP(i,n){ ...
s207018130
p01370
C++
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 #include<bits/stdc++.h> using namespace std; #define REP(i,n) for(int i = 0; i < (n) ;i++) int vec1[] = {0,1,-1,1,-1,0}; int vec2[] = {1,1,0,0,-1,-1}; int t,n; int t...
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 1 | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:54: /usr/...
s333463527
p01370
C++
#include <iostream> #include <vector> #include <queue> using namespace std; vector<int> ox; //障害物のx座標 vector<int> oy; //障害物のy座標 class State{ public: int x,y,cost; State(){} State(int _x,int _y,int _cost){ x = _x; y = _y; cost = _cost; } }; int Breadth_First_Search(int t, int n, int sx, int sy) { ...
a.cc: In function 'int Breadth_First_Search(int, int, int, int)': a.cc:27:3: error: 'memset' was not declared in this scope 27 | memset(closed,0,sizeof(closed)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <que...
s417315540
p01370
C++
#include <iostream> #include <vector> #include <queue> using namespace std; vector<int> ox; //障害物のx座標 vector<int> oy; //障害物のy座標 class State{ public: int x,y,cost; State(){} State(int _x,int _y,int _cost){ x = _x; y = _y; cost = _cost; } }; int Breadth_First_Search(int t, int n, int sx, int sy) { ...
a.cc: In function 'int Breadth_First_Search(int, int, int, int)': a.cc:27:3: error: 'memset' was not declared in this scope 27 | memset(closed,0,sizeof(closed)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <que...
s729611105
p01370
C++
#include <iostream> #include <vector> #include <queue> using namespace std; vector<int> ox; //障害物のx座標 vector<int> oy; //障害物のy座標 class State{ public: int x, y, cost; State(){} State(int _x,int _y,int _cost){ x = _x; y = _y; cost = _cost; } }; int Breadth_First_Search(int t, int n, int sx, int sy) ...
a.cc: In function 'int Breadth_First_Search(int, int, int, int)': a.cc:27:3: error: 'memset' was not declared in this scope 27 | memset(closed,0,sizeof(closed)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <que...
s454882831
p01370
C++
#include <iostream> #include <vector> #include <queue> #include <string.h> using namespace std; class State{ public: int x,y,cost; State(){} State(int _x,int _y,int _cost){ x = _x; y = _y; cost = _cost; } }; int n,m; int sx,sy; bool t[1000][1000]; bool closed[1000][1000]; int dx[] = {0,1,1,0,-1,-...
a.cc: In function 'int main()': a.cc:53:9: error: 'i' was not declared in this scope 53 | for(i = 0; i < m; i++){ | ^
s489118510
p01370
C++
#include "iostream" #include "random" #include "ctime" #include "chrono" #include "string" #include "bitset" #include "algorithm" #include "map" #include "queue" #include "list" using namespace std; int main() { int dir_y[] = { 1,1,0,-1,-1,0 }; int dir_x[] = { 0,1,1,0,-1,-1 }; int N, K; list<int>ret; cin >> N...
a.cc: In function 'int main()': a.cc:23:60: error: 'INT_MAX' was not declared in this scope 23 | vector<vector<int>>v(100, vector<int>(100, INT_MAX)); | ^~~~~~~ a.cc:11:1: note: 'INT_MAX' is defined in header '<climits>'; this is probab...
s137918827
p01370
C++
#include <iostream> #include <cstdlib> #include <cstdio> #include <vector> #include <algorithm> #include <set> #include <cstring> #include <cmath> #include <queue> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define REP(i, k, n) for (int i = (int)(k); i < (int)(n); i++) #define rrep(i, n)...
a.cc: In function 'void bfs(int, int, int)': a.cc:46:19: error: 't' was not declared in this scope; did you mean 'qt'? 46 | u[y+35][x+35]=t; | ^ | qt
s548203440
p01370
C++
#include <iostream> #include <cstdlib> #include <cstdio> #include <vector> #include <algorithm> #include <set> #include <cstring> #include <cmath> #include <queue> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define REP(i, k, n) for (int i = (int)(k); i < (int)(n); i++) #define rrep(i, n)...
a.cc: In function 'int main()': a.cc:38:29: error: 'ban' was not declared in this scope; did you mean 'tan'? 38 | rep(i,200)rep(j,200)ban[i][j]=bfs[i][j]=0; | ^~~ | tan a.cc:38:39: error: 'bfs' was not declared in this scope; did you mean 'f...
s998363755
p01370
C++
#include<iostream> #include<queue> using namespace std; int main(){ int x,y; int dx[] = {1,0,1,-1,0,-1}; int dy[] = {0,1,1,0,-1,-1}; int map[200][200]; int t,n,ans; queue<int> qx,qy; while(1){ cin >> t >> n; if(!t && !n)break; memset(map,0,sizeof(map)); for(int i=0;i<n;i++){ cin >...
a.cc: In function 'int main()': a.cc:17:5: error: 'memset' was not declared in this scope 17 | memset(map,0,sizeof(map)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<queue> +++ |+#include <cstring> 3 ...
s874703220
p01370
C++
#define _USE_MATH_DEFINES #define INF 0x3f3f3f3f #include <cstdio> #include <iostream> #include <sstream> #include <cmath> #include <cstdlib> #include <algorithm> #include <queue> #include <stack> #include <limits> #include <map> #include <string> #include <cstring> #include <set> #include <deque> #include <bitset> #in...
a.cc: In function 'int main()': a.cc:106:3: error: jump to label 'last' 106 | last:; | ^~~~ a.cc:80:39: note: from here 80 | && stage[P(sx,sy)] == -1) goto last; | ^~~~ a.cc:82:42: note: crosses initialization of 'std::priority_queue<State, std::vect...
s962934736
p01370
C++
#include <iostream> #include <queue> #include <vector> #include <algorithm> #include <functional> #include <utility> #include <set> using namespace std; typedef pair<int,int> pii; typedef pair<pii,int> piii; int dx[]={0,1,1,0,-1,-1}; int dy[]={1,1,0,-1,-1,0}; int main() { int t,n; while(cin>>t>>n,t!=0){ vector<pii>...
a.cc: In function 'int main()': a.cc:33:48: error: no matching function for call to 'std::set<std::pair<int, int> >::find(int, int)' 33 | if(visited.find(fr.first.first+dx[i],fr.first.second+dy[i])==visited.end()&&jama.find(fr.first.first+dx[i],fr.first.second+dy[i])==jama.end())q.pus...
s014671183
p01370
C++
#include <iostream> #include <queue> #include <vector> #include <algorithm> #include <functional> #include <utility> #include <set> using namespace std; typedef pair<int,int> pii; typedef pair<pii,int> piii; int dx[]={0,1,1,0,-1,-1}; int dy[]={1,1,0,-1,-1,0}; int main() { int t,n; while(cin>>t>>n,t!=0){ vector<pii...
a.cc: In function 'int main()': a.cc:35:75: error: 'class std::vector<std::pair<int, int> >' has no member named 'find' 35 | if(visited.find(cur)==visited.end()&&jama.find(cur)==jama.end())q.push(piii(cur,fr.second+1)); | ...
s431784354
p01370
C++
#include <iostream> #include <queue> #include <vector> #include <algorithm> #include <functional> #include <utility> #include <set> using namespace std; typedef pair<int,int> pii; typedef pair<pii,int> piii; int dx[]={0,1,1,0,-1,-1}; int dy[]={1,1,0,-1,-1,0}; int main() { int t,n; while(cin>>t>>n,t!=0){ vector<pii...
a.cc: In function 'int main()': a.cc:33:39: error: no matching function for call to 'std::set<std::pair<int, int> >::insert(piii&)' 33 | visited.insert(fr); | ~~~~~~~~~~~~~~^~~~ In file included from /usr/include/c++/14/set:63, from a.cc:8: /usr/...
s738060135
p01370
C++
#include <iostream> #include <queue> #include <vector> #include <algorithm> #include <functional> #include <utility> #include <set> using namespace std; typedef pair<int,int> pii; typedef pair<pii,int> piii; int dx[]={0,1,1,0,-1,-1}; int dy[]={1,1,0,-1,-1,0}; int main() { int t,n; while(cin>>t>>n,t!=0){ vector<pii>...
a.cc: In function 'int main()': a.cc:32:39: error: no matching function for call to 'std::set<std::pair<int, int> >::insert(piii&)' 32 | visited.insert(fr); | ~~~~~~~~~~~~~~^~~~ In file included from /usr/include/c++/14/set:63, from a.cc:7: /usr/...
s093794344
p01370
C++
#include <cstring> #include <queue> using namespace std; const int dx[] = {0, 1, 1, 0, -1, -1}; const int dy[] = {1, 1, 0, -1, -1, 0}; const int base = 50; class state { public: int x, y, t; state(int a, int b, int c) { x = a; y = b; t = c; } }; int main() { int t, n; while (cin >> t >> n, t || n) ...
a.cc: In function 'int main()': a.cc:20:12: error: 'cin' was not declared in this scope 20 | while (cin >> t >> n, t || n) { | ^~~ a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 2 | #include <queue> +++ |+#include <ios...
s787153459
p01370
C++
#include <iostream> #include <cstdlib> #include <cstdio> #include <cstring> #include <cmath> #include <stack> #include <queue> #include <cctype> #include <complex> #include <vector> #include <set> #include <map> #include <algorithm> #include <functional> #include <cassert> #include <iomanip> using namespace std; #de...
a.cc: In function 'bool solve()': a.cc:49:31: error: expected primary-expression before ')' token 49 | for(int i=0;i<100;i<++) for(int j=0;j<100;j++) a[i][j] = -1; | ^ a.cc:56:12: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<c...
s516082546
p01370
C++
#include <iostream> #include <cstdio> #include <vector> #include <array> using namespace std; typedef std::array<bool, 63> Line; typedef std::array<Line, 63> Table; Table table; // [X][Y] std::array< std::array<int, 63>, 63> standed; // [X][Y] int current_x; int current_y; int g_count; int g_turn; int g_current_tur...
a.cc: In function 'int main()': a.cc:57:17: error: 'for_each' was not declared in this scope 57 | for_each(table.begin(), table.end(), [](Line & line) { | ^~~~~~~~
s127699351
p01370
C++
#include <iostream> #include <cstdio> #include <vector> #include <array> #include <algorithm> using namespace std; #define SIZE 130 bool table[SIZE][SIZE]; int standed[SIZE][SIZE]; int current_x; int current_y; int g_count; int g_turn; int g_current_turn; int g_dx[] = { 0, 1, 1, 0, -1, -1 }; int g_dy[] = { 1, 1, 0,...
a.cc: In function 'int main()': a.cc:57:17: error: 'memset' was not declared in this scope 57 | memset(table, false, sizeof(table)); | ^~~~~~ a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 5 | #include <algo...
s491430029
p01371
C++
#include <iostream> #include <vector> #include <unordered_set> using namespace std; int main() { while(true) { int n; cin >> n; if(n == 0) break; vector<vector<int>> costs; for(int i = 0; i < n; i++) { vector<int> cost; for(int j = 0; j <= n; j++) { ...
a.cc: In function 'int main()': a.cc:21:33: error: 'INT_MAX' was not declared in this scope 21 | vector<int> ans(1 << n, INT_MAX); | ^~~~~~~ a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 3 | #inclu...
s649153166
p01371
C++
#include <iostream> #include <algorithm> #define MAX_ 17 #define IF 1600010 #define lengthof(x) (sizeof(x) / sizeof(*(x))) using namespace std; int main(int argc, char const *argv[]) { int n; unsigned int data[MAX_][MAX_]; unsigned int dp[1<<(MAX_-1)][MAX_]; unsigned int min_; while(1){ cin>>n; if(n==0) b...
a.cc: In function 'int main(int, const char**)': a.cc:49:79: error: expected primary-expression before '==' token 49 | if((i2>>i5)&1)==1) { | ^~
s303120049
p01371
C++
#include <iostream> #include <algorithm> #define REP(i,a,b) for (int i = (a); i < (b); i++) #define rep(i,a) REP(i,0,a) using namespace std; const int INF = 1 << 28; int sp, N; int t[16][17]; int dp[1 << 16][16]; int rec(int S, int v) { if (dp[S][v] > 0) return dp[S][v]; if (S == (1 << N) - 1 && v == sp) retu...
a.cc: In function 'int main()': a.cc:34:13: error: 'memset' was not declared in this scope 34 | memset(dp, -1, sizeof(dp)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <algorithm> +++ |+#i...
s525484970
p01371
C++
#include <iostream> #include <algorithm> #include <stdio.h> #define REP(i,a,b) for (int i = (a); i < (b); i++) #define rep(i,a) REP(i,0,a) using namespace std; const int INF = 1 << 28; int sp, N; int t[16][17]; int dp[1 << 16][16]; int rec(int S, int v) { if (dp[S][v] > 0) return dp[S][v]; if (S == (1 << N) -...
a.cc: In function 'int main()': a.cc:35:13: error: 'memset' was not declared in this scope 35 | memset(dp, -1, sizeof(dp)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <algorithm> +++ |+#i...
s677327110
p01371
C++
#include <iostream> #include <algorithm> #include <string> #include <stdio.h> #define REP(i,a,b) for (int i = (a); i < (b); i++) #define rep(i,a) REP(i,0,a) using namespace std; const int INF = 1 << 28; int sp, N; int t[16][17]; int dp[1 << 16][16]; int rec(int S, int v) { if (dp[S][v] > 0) return dp[S][v]; i...
a.cc: In function 'int main()': a.cc:36:13: error: 'memset' was not declared in this scope 36 | memset(dp, -1, sizeof(dp)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <algorithm> +++ |+#i...
s939967706
p01371
C++
#include <iostream> #include <iomanip> #include <cassert> #include <cstdlib> #include <cstdio> #include <cstring> #include <cmath> #include <cctype> #include <stack> #include <queue> #include <complex> #include <vector> #include <set> #include <map> #include <algorithm> using namespace std; #define all(x) begin(x), e...
a.cc: In function 'bool solve()': a.cc:72:11: error: cannot bind non-const lvalue reference of type 'std::vector<int>&' to an rvalue of type 'std::vector<int>' 72 | f(vector<int>(), n, a); | ^~~~~~~~~~~~~ a.cc:46:21: note: initializing argument 1 of 'void f(std::vector<int>&, int&, std::vec...
s600853820
p01371
C++
#include <iostream> #include <iomanip> #include <cassert> #include <cstdlib> #include <cstdio> #include <cstring> #include <cmath> #include <cctype> #include <stack> #include <queue> #include <complex> #include <vector> #include <set> #include <map> #include <algorithm> using namespace std; #define all(x) begin(x), e...
a.cc: In function 'bool solve()': a.cc:72:11: error: cannot bind non-const lvalue reference of type 'std::vector<int>&' to an rvalue of type 'std::vector<int>' 72 | f(vector<int>(), n, a); | ^~~~~~~~~~~~~ a.cc:46:21: note: initializing argument 1 of 'void f(std::vector<int>&, int&, std::vec...
s168023094
p01371
C++
#include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> #include<ct> #include<cctype> #include<climits> #include<iostream> #include<string> #include<vector> #include<map> #include<list> #include<queue> #include<deque> #include<algorithm> #include<numeric> #include<utility> #include<complex> #include<memory...
a.cc:5:9: fatal error: ct: No such file or directory 5 | #include<ct> | ^~~~ compilation terminated.
s133152119
p01371
C++
#include <iostream> #include <algorithm> using namespace std; int tbl[20][20]; int cleartbl[1<<16][16]; int memo[1<<16]; int n; int dist(int b){ if(b==0) return 0; if(memo[b]) return memo[b]; int ret = 1<<28; for(int i=0;i<n;++i) if((b>>i)&1) ret = min(ret,dist(b-(1<<i))+cleartbl[b-(1<<i)][i]); retu...
a.cc: In function 'int solve()': a.cc:26:3: error: 'memset' was not declared in this scope 26 | memset(memo,0,sizeof(memo)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <algorithm> +++ |+#include <cstring> ...
s279749618
p01371
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main(){ int N; while(true){ cin >> N; if(N == 0){ break; } int time[N][N+1]; for(int i = 0; i < N; ++i){ for(int j = 0; j < N+1; ++j){ cin >> time[i][j]; } } int min_time[N][1<<N]; ...
a.cc: In function 'int main()': a.cc:50:17: error: 'j' was not declared in this scope 50 | if(((b>>j)&1)==1){ | ^
s691498270
p01371
C++
homo
a.cc:1:1: error: 'homo' does not name a type 1 | homo | ^~~~
s838980613
p01371
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 <iomanip> #include <stack> using namespace std; #de...
a.cc: In function 'int solve(int, int, bool*, int (*)[17], int)': a.cc:29:9: error: 'memcpy' was not declared in this scope 29 | memcpy(c2, c, n); | ^~~~~~ a.cc:17:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 16 | #include <stack...
s757117633
p01371
C++
#include <bits/stdc++.h> using namespace std; typedef pair<long long int, long long int> PLL; int main() { int N; while( cin >> N, N ) { vector<vector<long long int>>D( N, vector<long long int>( N + 1 ) ); for( size_t i = 0; i < N; i++ ) { for( size_t j = 0; j < N + 1; j++ ) { cin >> D[i][j]; } } ...
a.cc: In function 'int main()': a.cc:26:25: error: 'MLL' was not declared in this scope; did you mean 'PLL'? 26 | MLL[now.second] = now.first; | ^~~ | PLL
s895214626
p01371
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> using namespace std; int main() { i...
a.cc: In function 'int main()': a.cc:29:9: error: 'memset' was not declared in this scope 29 | memset(result, 100000000, (int)pow(2, n)); | ^~~~~~ a.cc:16:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 15 | #include <list> +++ |+...
s037701020
p01371
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> using namespace std; ...
a.cc: In function 'int main()': a.cc:30:21: error: conflicting declaration 'std::vector<int> result' 30 | vector<int> result(1 << n, 100000000); | ^~~~~~ a.cc:29:13: note: previous declaration as 'int result [65540]' 29 | int result[65540]; | ^~~~~~
s392270567
p01371
C++
#include<iostream> using namespace std; int n; int m[20][20]={{}}; int inf = 10000000; int dp[(1<<16)][16]; int k; int rec(int s,int v){ if(dp[s][v]>=0) return dp[s][v]; if(s == (1<<(n+1))-1 && v == 0) return dp[s][v] = 0; int res = inf; for(int u=0;u<=n;u++){ if(!(s>>u&1)){ int cost = m[u][0]; ...
a.cc: In function 'int main()': a.cc:44:5: error: 'memset' was not declared in this scope 44 | memset(dp,-1,sizeof(dp)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> +++ |+#include <cstring> ...
s207007611
p01371
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:29:21: error: no match for 'operator&' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'bool') 29 | while (cin >> n & n > 0){ | ~~~~~~~~ ^ ~~~~~ | | | | | ...
s954402556
p01371
C++
#include <bits/stdc++.h> #define r(i,n) for(int i=0;i<n;i++) using namespace std; int p[16]={2,3,5,7,11,13,17,23,29,31,37,41,43,47,53,59}; int a[16][17],n; bool map[16][200000]; long long ans; void dfs(int depth,int x,int c){ if(map[depth][x])return; map[depth][x]=true; if(x>=ans)return; if(x>=190000)return; ...
a.cc: In function 'void dfs(int, int, int)': a.cc:9:6: error: reference to 'map' is ambiguous 9 | if(map[depth][x])return; | ^~~ In file included from /usr/include/c++/14/map:63, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152, from a.cc:1: /usr/include/c++...
s109164006
p01371
C++
#include <iostream> #include <sstream> #include <vector> #include <algorithm> using namespace std; int main(int argc, char *argv[]) { while (true) { int n; cin >> n; if (!n) { break; } int z[16]; int cost[16][16]; for (int i = 0; i < n; ++i) { cin >> z[i]; for (int j = 0; j < n; ++j) { cin...
a.cc: In function 'int main(int, char**)': a.cc:24:17: error: 'memset' was not declared in this scope 24 | memset(dp, 0x3f, sizeof(dp)); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include <...
s419541029
p01371
C++
//8:10 #include <iostream> #include <string> #include <map> #include <vector> #include <algorithm> #include <queue> #include <stack> #include <cstdio> #include <cmath> using namespace std; #define REP(i,k,n) for(int i=k;i<n;i++) #define rep(i,n) for(int i=0;i<n;i++) #define INF 1<<30 #define mp make_pair #define pb p...
a.cc: In function 'int main()': a.cc:66:9: error: 'memset' was not declared in this scope 66 | memset(dp,0,sizeof(dp)); | ^~~~~~ a.cc:11:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 10 | #include <cmath> +++ |+#include <cstring...
s708976953
p01371
C++
#include<bits/stdc++.h> #define INF 1e9 #define llINF 1e18 #define MOD 1e9+7 #define pb push_back #define mp make_pair #define F first #define S second #define ll long long using namespace std; void Bits (int a){ string s=""; while(a>0){ char c='0'+a%2; a/=2; s+=c; } reverse(s.begin(),s.end()); ...
a.cc: In function 'int main()': a.cc:51:16: error: invalid types 'int[int]' for array subscript 51 | memo[i][j]=INF; | ^
s704333202
p01371
C++
#include <bits/stdc++.h> using namespace std; int n; long long int dis[20][20]; long long int dp[1 << 16]; long long int inf = 100000 * 16 + 1; int main() { while(true) { scanf(" %d",&n); if(n == 0){ break; } for (int i = 0; i < n; i++) { for (int j = 0;...
a.cc:62:16: warning: missing terminating " character 62 | printf("%lld\n)dp[all]); | ^ a.cc:62:16: error: missing terminating " character 62 | printf("%lld\n)dp[all]); | ^~~~~~~~~~~~~~~~~ a.cc: In function 'int main()': a.cc:64:5: error: expected primary-e...
s495882422
p01371
C++
#include <iostream> using namespace std; inline int pow2(int x){ return ( 1 << x ); } int main(){ int n; int dp[65536]; while( cin >> n , n ){ //ツ渉可甘コツ可サ int t[20][20] = {0}; for(int i=0 ; i < pow2(n) ; i++ ){ dp[i] = INT_MAX; } for(int j=0 ; j < n ; j++ ){ for(int i=0 ; i < n+1 ; i++ ){ c...
a.cc: In function 'int main()': a.cc:16:33: error: 'INT_MAX' was not declared in this scope 16 | dp[i] = INT_MAX; | ^~~~~~~ a.cc:2:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 1 | #includ...
s222117362
p01371
C++
#include <iostream> #include <vector> using namespace std; const int INF = 10000000; void solve(){ int n; while(cin >> n && n != 0){ // i”Ԃ̃_ƒ“ƒWƒ‡ƒ“‚Íj”Ԃ̃AƒCƒeƒ€‚ðŽg‚¤‚±‚Ƃɂæ‚Á‚Äscore[i][j]•b‚Å‰ð‚­‚±‚Æ‚ª‰Â”\ int score[17][17]; for(int i = 0; i < n; i++){ for(int j = 0; j <= n; j++){ cin >> scor...
a.cc: In function 'void solve()': a.cc:16:40: error: 'score' was not declared in this scope 16 | cin >> score[i][j]; | ^~~~~ a.cc:26:38: error: 'score' was not declared in this scope 26 | dp[1 << i] = score[i][0];...
s194281569
p01371
C++
#include <iostream> #include <vector> using namespace std; const int INF = 10000000; // ‚ ‚é‰ð“šó‘Ô‚Åà‚¯‚éÅ¬ŽžŠÔ int dp[1 << 16]; int n; void solve(){ while(cin >> n && n != 0){ // i”Ԃ̃_ƒ“ƒWƒ‡ƒ“‚Íj”Ԃ̃AƒCƒeƒ€‚ðŽg‚¤‚±‚Ƃɂæ‚Á‚Äscore[i][j]•b‚Å‰ð‚­‚±‚Æ‚ª‰Â”\ int score[17][17]; for(int i = 0; i < n; i++...
a.cc: In function 'void solve()': a.cc:20:40: error: 'score' was not declared in this scope 20 | cin >> score[i][j]; | ^~~~~ a.cc:28:38: error: 'score' was not declared in this scope 28 | dp[1 << i] = score[i][0];...
s039138724
p01371
C++
#include <iostream> #include <vector> using namespace std; const int INF = 10000000; // ‚ ‚é‰ð“šó‘Ô‚Åà‚¯‚éÅ¬ŽžŠÔ int dp[1 << 16]; int n; void solve(){ while(cin >> n && n != 0){ // i”Ԃ̃_ƒ“ƒWƒ‡ƒ“‚Íj”Ԃ̃AƒCƒeƒ€‚ðŽg‚¤‚±‚Ƃɂæ‚Á‚Äscore[i][j]•b‚Å‰ð‚­‚±‚Æ‚ª‰Â”\ int score[17][17]; for(int i = 0; i < n; i++...
a.cc: In function 'void solve()': a.cc:20:40: error: 'score' was not declared in this scope 20 | cin >> score[i][j]; | ^~~~~ a.cc:28:38: error: 'score' was not declared in this scope 28 | dp[1 << i] = score[i][0];...
s939367016
p01371
C++
#include <iostream> #include <vector> using namespace std; const int INF = 10000000; // ‚ ‚é‰ð“šó‘Ô‚Åà‚¯‚éÅ¬ŽžŠÔ int dp[1 << 16]; int n; void solve(){ while(cin >> n && n != 0){ // i”Ԃ̃_ƒ“ƒWƒ‡ƒ“‚Íj”Ԃ̃AƒCƒeƒ€‚ðŽg‚¤‚±‚Ƃɂæ‚Á‚Äscore[i][j]•b‚Å‰ð‚­‚±‚Æ‚ª‰Â”\ int score[17][17]; for(int i = 0; i < n; i++...
a.cc: In function 'void solve()': a.cc:20:40: error: 'score' was not declared in this scope 20 | cin >> score[i][j]; | ^~~~~ a.cc:28:38: error: 'score' was not declared in this scope 28 | dp[1 << i] = score[i][0];...
s920424059
p01371
C++
#include <iostream> #include <vector> using namespace std; const int INF = 10000000; // ‚ ‚é‰ð“šó‘Ô‚Åà‚¯‚éÅ¬ŽžŠÔ int dp[1 << 16]; int n; void solve(){ while(cin >> n && n != 0){ // i”Ԃ̃_ƒ“ƒWƒ‡ƒ“‚Íj”Ԃ̃AƒCƒeƒ€‚ðŽg‚¤‚±‚Ƃɂæ‚Á‚Äscore[i][j]•b‚Å‰ð‚­‚±‚Æ‚ª‰Â”\ int score[17][17]; for(int i = 0; i < n; i++...
a.cc: In function 'void solve()': a.cc:20:40: error: 'score' was not declared in this scope 20 | cin >> score[i][j]; | ^~~~~
s884746965
p01371
C++
#include <iostream> #include <vector> using namespace std; const int INF = 10000000; // ‚ ‚é‰ð“šó‘Ô‚Åà‚¯‚éÅ¬ŽžŠÔ int dp[1 << 16]; int n; void solve(){ while(cin >> n && n != 0){ // i”Ԃ̃_ƒ“ƒWƒ‡ƒ“‚Íj”Ԃ̃AƒCƒeƒ€‚ðŽg‚¤‚±‚Ƃɂæ‚Á‚Äscore[i][j]•b‚Å‰ð‚­‚±‚Æ‚ª‰Â”\ int score[17][17]; //for(int i = 0; i < n; i...
a.cc: In function 'void solve()': a.cc:28:38: error: 'score' was not declared in this scope 28 | dp[1 << i] = score[i][0]; | ^~~~~ a.cc:39:69: error: 'score' was not declared in this scope 39 | ...
s058248175
p01371
C++
#include <iostream> #include <vector> using namespace std; const int INF = 10000000; // ‚ ‚é‰ð“šó‘Ô‚Åà‚¯‚éÅ¬ŽžŠÔ int dp[1 << 16]; int n; void solve(){ while(cin >> n && n != 0){ // i”Ԃ̃_ƒ“ƒWƒ‡ƒ“‚Íj”Ԃ̃AƒCƒeƒ€‚ðŽg‚¤‚±‚Ƃɂæ‚Á‚Äscore[i][j]•b‚Å‰ð‚­‚±‚Æ‚ª‰Â”\ int score[17][17]; //for(int i = 0; i < n; i...
a.cc: In function 'void solve()': a.cc:39:69: error: 'score' was not declared in this scope 39 | sc = min(sc,score[j][i+1]); | ^~~~~
s320187026
p01371
C++
#include <iostream> #include <vector> using namespace std; const int INF = 10000000; // ‚ ‚é‰ð“šó‘Ô‚Åà‚¯‚éÅ¬ŽžŠÔ int dp[1 << 16]; int n; void solve(){ while(cin >> n && n != 0){ // i”Ԃ̃_ƒ“ƒWƒ‡ƒ“‚Íj”Ԃ̃AƒCƒeƒ€‚ðŽg‚¤‚±‚Ƃɂæ‚Á‚Äscore[i][j]•b‚Å‰ð‚­‚±‚Æ‚ª‰Â”\ int score[17][17]; for(int i = 0; i < n; i++...
a.cc: In function 'void solve()': a.cc:20:40: error: 'score' was not declared in this scope 20 | cin >> score[i][j]; | ^~~~~ a.cc:28:38: error: 'score' was not declared in this scope 28 | dp[1 << i] = score[i][0];...
s993997504
p01371
C++
#include <iostream> #include <vector> using namespace std; const int INF = 10000000; // ‚ ‚é‰ð“šó‘Ô‚Åà‚¯‚éÅ¬ŽžŠÔ int dp[1 << 16]; int n; void solve(){ while(cin >> n && n != 0){ // i”Ԃ̃_ƒ“ƒWƒ‡ƒ“‚Íj”Ԃ̃AƒCƒeƒ€‚ðŽg‚¤‚±‚Ƃɂæ‚Á‚Äscore[i][j]•b‚Å‰ð‚­‚±‚Æ‚ª‰Â”\ int score[17][17]; for(int i = 0; i < n; i++...
a.cc: In function 'void solve()': a.cc:20:40: error: 'score' was not declared in this scope 20 | cin >> score[i][j]; | ^~~~~
s663915548
p01371
C++
#include <iostream> #include <vector> using namespace std; const int INF = 10000000; // ‚ ‚é‰ð“šó‘Ô‚Åà‚¯‚éÅ¬ŽžŠÔ int dp[1 << 16]; int n; void solve(){ while(cin >> n && n != 0){ // i”Ԃ̃_ƒ“ƒWƒ‡ƒ“‚Íj”Ԃ̃AƒCƒeƒ€‚ðŽg‚¤‚±‚Ƃɂæ‚Á‚Äscore[i][j]•b‚Å‰ð‚­‚±‚Æ‚ª‰Â”\ int scores[17][17]; for(int i = 0; i < n; i+...
a.cc: In function 'void solve()': a.cc:20:40: error: 'scores' was not declared in this scope 20 | cin >> scores[i][j]; | ^~~~~~ a.cc:28:38: error: 'scores' was not declared in this scope 28 | dp[1 << i] = scores[i...
s830069575
p01371
C++
#include <iostream> #include <vector> using namespace std; const int INF = 10000000; // ‚ ‚é‰ð“šó‘Ô‚Åà‚¯‚éÅ¬ŽžŠÔ int dp[1 << 16]; int n; void solve(){ int scores[17][17]; while(cin >> n && n != 0){ // i”Ԃ̃_ƒ“ƒWƒ‡ƒ“‚Íj”Ԃ̃AƒCƒeƒ€‚ðŽg‚¤‚±‚Ƃɂæ‚Á‚Äscore[i][j]•b‚Å‰ð‚­‚±‚Æ‚ª‰Â”\ for(int i = 0; i < n; i++...
a.cc: In function 'void solve()': a.cc:20:47: error: 'i' was not declared in this scope 20 | cin >> scores[i][j]; | ^ a.cc: At global scope: a.cc:51:1: error: expected declaration before '}' token 51 | } | ^
s065335850
p01371
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; const int INF = 10000000; void solve(){ // ‚ ‚é‰ð“šó‘Ô‚Åà‚¯‚éÅ¬ŽžŠÔ int dp[1 << 16]; int n; int scores[17][17]; while(cin >> n && n != 0){ // i”Ԃ̃_ƒ“ƒWƒ‡ƒ“‚Íj”Ԃ̃AƒCƒeƒ€‚ðŽg‚¤‚±‚Ƃɂæ‚Á‚Äscore[i][j]•b‚Å‰ð‚­‚±‚Æ‚ª‰Â”\ fo...
a.cc: In function 'void solve()': a.cc:20:47: error: 'i' was not declared in this scope 20 | cin >> scores[i][j]; | ^ a.cc: At global scope: a.cc:51:1: error: expected declaration before '}' token 51 | } | ^
s241645650
p01371
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; const int INF = 2000000000; void solve(){ // ‚ ‚é‰ð“šó‘Ô‚Åà‚¯‚éÅ¬ŽžŠÔ int n; while(cin >> n && n != 0){ int dp[1 << 16]; int scores[17][17]; // i”Ԃ̃_ƒ“ƒWƒ‡ƒ“‚Íj”Ԃ̃AƒCƒeƒ€‚ðŽg‚¤‚±‚Ƃɂæ‚Á‚Äscore[i][j]•b‚Å‰ð‚­‚±‚Æ‚ª‰Â”\ ...
a.cc: In function 'void solve()': a.cc:20:47: error: 'i' was not declared in this scope 20 | cin >> scores[i][j]; | ^ a.cc:24:22: error: 'dp' was not declared in this scope 24 | fill(dp,dp+(1<<16),INF); | ...
s713047840
p01371
C++
#include <iostream> #include <iostream> Last login: Mon Jun 20 16:42:00 on ttys005 cosmos08:~ s1113093$ mkdir aoj cosmos08:~ s1113093$ cd aoj cosmos08:aoj s1113093$ vi 2018.cpp cosmos08:aoj s1113093$ g++ 2018.cpp 2018.cpp:2: error: expected nested-name-specifier before 'namespce' 2018.cpp:2: error: 'namespce' has not b...
a.cc:8:58: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes 8 | 2018.cpp:2: error: expected nested-name-specifier before 'namespce' | ^~~~~~~~~~ a.cc:9:20: warning: multi-character literal with 8 characters exceeds 'int' ...
s609547808
p01371
C++
#include <iostream> #include <iostream> Last login: Mon Jun 20 16:42:00 on ttys005 cosmos08:~ s1113093$ mkdir aoj cosmos08:~ s1113093$ cd aoj cosmos08:aoj s1113093$ vi 2018.cpp cosmos08:aoj s1113093$ g++ 2018.cpp 2018.cpp:2: error: expected nested-name-specifier before 'namespce' 2018.cpp:2: error: 'namespce' has not b...
a.cc:8:58: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes 8 | 2018.cpp:2: error: expected nested-name-specifier before 'namespce' | ^~~~~~~~~~ a.cc:9:20: warning: multi-character literal with 8 characters exceeds 'int' ...
s369988842
p01371
C++
#include<iostream> #include<string> #include<algorithm> #include<cstring> using namespace std; #define MAX_N 16 #define INF 200000 #define REP(i,n) for(int i=0;i<n;i++) #define rep(n) REP(i,n) int time[MAX_N][MAX_N+1]; int n; int dp[ 1<< MAX_N]; //bool clear[MAX_N]; int solve(int clear) { if(dp[clear]!=0) return dp...
a.cc:11:24: error: 'int time [16][17]' redeclared as different kind of entity 11 | int time[MAX_N][MAX_N+1]; | ^ In file included from /usr/include/pthread.h:23, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35, from /usr/include/x86_64-l...
s082153217
p01371
C++
#include<iostream> #include<string> #include<algorithm> #include<cstring> using namespace std; #define MAX_N 16 #define INF 200000 #define REP(i,n) for(int i=0;i<n;i++) #define rep(n) REP(i,n) int time[MAX_N][MAX_N+1]; int n; int dp[ 1<< MAX_N]; int solve(int clear) { if(dp[clear]!=0) return dp[clear]; if(clear =...
a.cc:11:24: error: 'int time [16][17]' redeclared as different kind of entity 11 | int time[MAX_N][MAX_N+1]; | ^ In file included from /usr/include/pthread.h:23, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35, from /usr/include/x86_64-l...
s847058616
p01371
C++
100 100 60 60 70 70 70 90 100 50 100 55 45 45 55 44 100 50 60 100 51 50 55 30 100 70 10 20 1 10 10 40 200 90 10 30 10 10 10 30 150 200 12 1 11 11 1 30 10000 1200 1100 1100 1200 1200 1090 1 0
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 100 100 60 60 70 70 70 90 | ^~~
s469428480
p01371
C++
#include <iostream> #include <algorithm> using namespace std; int dp[1<<17][17]; int INF = 1<<28; int ts[17][17]; int n; int tsp(int S, int v) { if (dp[S][v] >= 0) { return dp[S][v]; } int min = ts[v][0]; for (int i = 1; i <= n; i++) { if (i == v) ...
a.cc: In function 'int main()': a.cc:46:21: error: 'memset' was not declared in this scope 46 | memset(dp[j],-1,sizeof(dp[j])); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <a...
s548877258
p01371
C++
#include <cstdlib> #include <cstring> #include <iostream> #include <vector> using namespace std; template<class T> inline void chmin(T& a, const T& b) { if(b < a) a = b; } int n; vector<vector<int> > t; int memo[(1 << 16)]; int dfs(int cleared) { if(cleared == (1 << n) - 1) return 0; if(memo[cleared] != -1) r...
a.cc: In function 'int dfs(int)': a.cc:20:19: error: 'INT_MAX' was not declared in this scope 20 | int res = INT_MAX; | ^~~~~~~ a.cc:5:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 4 | #include <vector> +++ |+#includ...
s138800577
p01371
C++
#include <iostream> #include <vector> #include <algorithm> #include <stack> #include <cstring> #include <queue> #define rep(i,n) for(int i = 0; i < (n); i++) #define all(v) (v).begin(), (v).end() #define MP make_pair using namespace std; typedef vector<int> vi; typedef pair<int, int> P; int n; int stage[16][17]; int...
a.cc:20:14: error: 'int random [16]' redeclared as different kind of entity 20 | int random[16]; | ^ In file included from /usr/include/c++/14/cstdlib:79, from /usr/include/c++/14/ext/string_conversions.h:43, from /usr/include/c++/14/bits/basic_string.h:4154, ...
s821968809
p01371
C++
#include <iostream> #include <algorithm> using namespace std; #define MAX (1<<16) #define INF (INT_MAX/4) int dp[MAX+1]; int t[16][17]; int main() { int n; while(cin >> n && n) { for(int i=0; i<n; i++) for(int j=0; j<n+1; j++) cin >> t[i][j]; fill(dp, dp+(1<<n), INF); dp[0] = 0; ...
a.cc: In function 'int main()': a.cc:7:14: error: 'INT_MAX' was not declared in this scope 7 | #define INF (INT_MAX/4) | ^~~~~~~ a.cc:20:25: note: in expansion of macro 'INF' 20 | fill(dp, dp+(1<<n), INF); | ^~~ a.cc:3:1: note: 'INT_MAX' is defined in header '...
s896105655
p01372
C++
// // Created by 拓真 on 2018/07/05. // #include "bits/stdc++.h" using namespace std; typedef string::const_iterator State; class ParseError{}; void consume(State &begin,char expected){ if(*begin==expected){ begin++; }else{ cerr<<"Expected "<<expected<<"but got"<<*begin<<endl; cerr<<"Res...
a.cc: In function 'std::set<int> expression(State&)': a.cc:103:12: error: no match for 'operator[]' (operand types are 'std::set<int>' and 'std::vector<int>') 103 | par[vec] | ^ a.cc:105:21: warning: ignoring return value of 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::begin(...
s437410581
p01372
C++
#include <iostream> #include <string> #include <set> using namespace std; const int N = 200; bool ok[N][N]; set<int> dp[N][N]; string s; set<int> calc(int l, int r){ if (ok[l][r]) return dp[l][r]; ok[l][r] = 1; auto &res = dp[l][r]; int nest = 0; bool ope = false; for (int i = l; i < r; ++i){ if (s[i] == ...
a.cc: In function 'int main()': a.cc:48:17: error: 'memset' was not declared in this scope 48 | memset(ok, 0, sizeof(ok)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <set> +++ |+#...
s153158681
p01372
C++
//////////////////////////////////////// /// tu3 pro-con template /// //////////////////////////////////////// #include <cassert> #include <cstdio> #include <cstring> #include <cmath> #include <iostream> #include <sstream> #include <algorithm> #include <numeric> #include <functional> #include <vector> #incl...
a.cc: In function 'std::set<int> eval(const std::string&, int, int)': a.cc:183:16: error: 'memo' was not declared in this scope 183 | return memo[0][n]; | ^~~~
s576497779
p01372
C++
#include <iostream> #include <set> #include <sstream> using namespace std; set<int> m1[201][201]; bool m2[201][201]; int stoi(string s) { stringstream ss; ss << s; int ret; ss >> ret; return ret; } string str; set<int> dp(int l, int r) { if (m2[l][r]) return m1[l][r]; if (m2[l][r]) return m1[l][r]; int ...
a.cc: In function 'std::set<int> dp(int, int)': a.cc:38:25: error: call of overloaded 'stoi(std::__cxx11::basic_string<char>)' is ambiguous 38 | else res.insert(stoi(str.substr(l, r-l))); | ~~~~^~~~~~~~~~~~~~~~~~~~ a.cc:10:5: note: candidate: 'int stoi(std::string)' 10 | int stoi(str...
s543403073
p01372
C++
#include <iostream> #include <set> #include <sstream> using namespace std; set<int> m1[201][201]; bool m2[201][201]; int stoi(string s) { stringstream ss; ss << s; int ret; ss >> ret; return ret; } string str; set<int> dp(int l, int r) { if (m2[l][r]) return m1[l][r]; if (m2[l][r]) return m1[l][r]; int ...
a.cc: In function 'std::set<int> dp(int, int)': a.cc:38:25: error: call of overloaded 'stoi(std::__cxx11::basic_string<char>)' is ambiguous 38 | else res.insert(stoi(str.substr(l, r-l))); | ~~~~^~~~~~~~~~~~~~~~~~~~ a.cc:10:5: note: candidate: 'int stoi(std::string)' 10 | int stoi(str...
s076973434
p01372
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: In function 'void solve()': a.cc:85:79: error: increment of read-only variable 'cnt' 85 | for(const auto ch:str) if(ch=='+' or ch=='-' or ch=='*' or ch=='/') ++cnt; | ^~~
s290183082
p01372
C++
#include <iostream> #include <vector> #include <string> #include <cctype> #include <set> #include <tuple> using namespace std; typedef string::const_iterator State; class ParseError {}; enum Operator { add, sub, mul, divi, fac, integer }; struct Node{ int num; Operator op; vector<Node> children; Node...
a.cc: In function 'std::set<int> dfs(Node&)': a.cc:148:12: error: 'next_permutation' was not declared in this scope 148 | }while(next_permutation(I.begin(),I.end())); | ^~~~~~~~~~~~~~~~
s810068767
p01372
C++
#include<iostream> #include<set> #include<vector> #include<algorithm> using namespace std; bool digit(char c){ if( c - '0'< 0 || c-'0' > 9)return false; return true; } int stoi(string s){ int res,tmp; res = 0; tmp = 1; for(int i=s.size()-1;i>=0;i--){ res += (s[i]-'0') * tmp; tmp *= 10; } retu...
a.cc: In function 'std::set<int> cal(std::set<int>, std::set<int>, char)': a.cc:28:21: error: invalid use of member function 'bool std::set<_Key, _Compare, _Alloc>::empty() const [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>]' (did you forget the '()' ?) 28 | if(a.empty() || b.empty)ret...
s847816598
p01372
C++
#include <iostream> #include <set> #include <vector> using namespace std; #define MP make_pair typedef pair<int, int> PII; const int SIZE = 15; char line[SIZE], t[SIZE]; set<int> memo[SIZE][SIZE]; set<PII> used; void eval(int const l, int const r) { set<int>& ret = memo[l][r]; if(l == r) return; if...
a.cc: In function 'void eval(int, int)': a.cc:28:3: error: 'strncpy' was not declared in this scope 28 | strncpy(t, line+l, r-l); t[r-l+1] = 0; | ^~~~~~~ a.cc:4:1: note: 'strncpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <vector> +++ |+#in...
s116482629
p01373
Java
import java.util.ArrayList; import java.util.Arrays; import java.util.Scanner; public class Divide_the_Cake { public static void main(String[] args) { new Divide_the_Cake().solver(); } void solver() { Scanner sc = new Scanner(System.in); while (true) { int w = sc.nextInt(), h = sc.nextInt(), n = sc.nextIn...
Main.java:5: error: class Divide_the_Cake is public, should be declared in a file named Divide_the_Cake.java public class Divide_the_Cake { ^ 1 error
s966418400
p01373
Java
import java.util.ArrayList; import java.util.Arrays; import java.util.Scanner; public class Divide_the_Cake { public static void main(String[] args) { new Divide_the_Cake().solver(); } double EPS = 1e-11; void solver() { Scanner sc = new Scanner(System.in); while (true) { double w = sc.nextDouble(), h =...
Main.java:5: error: class Divide_the_Cake is public, should be declared in a file named Divide_the_Cake.java public class Divide_the_Cake { ^ 1 error
s129241084
p01373
C++
#include <bits/stdc++.h> #define REP(i,n) for(int i=0; i<(int)(n); ++i) using namespace std; int W, H, N; double x[210]; double y[210]; long double f(double h) { vector<double> v; REP(i, 2*N) { if(x[i] != 0) { double dy = (y[i] - h) / x[i]; double p = h + dy * W; i...
a.cc: In function 'int main()': a.cc:50:44: error: invalid conversion from 'long double (*)(double)' to 'double (*)(double)' [-fpermissive] 50 | printf("%.12f\n", simpson(0, H, N, f)/H); | ^ | | | ...
s036047553
p01373
C++
#include<stdio.h> #include<algorithm> #include<math.h> #include<vector> using namespace std; double x[210]; double y[210]; double ABS(double a){return max(a,-a);} double EPS=1e-9; double PI=acos(-1.0); double th[210]; int main(){ int w,h,a; while(scanf("%d%d%d",&w,&h,&a),a){ for(int i=0;i<2*a;i++)scanf("%lf%lf",x+i...
a.cc: In function 'int main()': a.cc:46:10: error: expected '}' at end of input 46 | } | ^ a.cc:12:11: note: to match this '{' 12 | int main(){ | ^
s728643905
p01373
C++
#include<iostream> using namespace std; int main() { int count = 0; int num = 1; while(num != 0) { cin >> num; ????????????????????????if(num == 0)break; for (int i = 1; i < 501; i++) { for (int j = 1; j < 502; j++) { if (i < j && (i + j)*(j - i + 1) == num * 2) count++; } } co...
a.cc: In function 'int main()': a.cc:8:1: error: expected primary-expression before '?' token 8 | ????????????????????????if(num == 0)break; | ^ a.cc:8:2: error: expected primary-expression before '?' token 8 | ????????????????????????if(num == 0)break; | ^ a.cc:8:3: error: expected primary-express...
s190698429
p01373
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 show(x) std::cerr << debug(x) << " (L:" << __LINE__ << ")" << std::endl #else #define show(x) #endif typedef long long int ll; typedef pair<int,int> ...
a.cc: In function 'void solve(int, int, int)': a.cc:143:88: error: 's' was not declared in this scope 143 | sum+=(min((long double)h,ys2[n])-max((long double)0,ys2[n-1]))*(ys[i+1]-ys[i]);s | ^
s576787090
p01373
C++
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <complex> #include <cstdio> #include <cstdlib> #include <cmath> #include <cstring> #include <ctime> #include <fstream> #include <iomanip> #include <iostream> #include <limits> #include <map> #include <numeric> #include <queue> #include...
a.cc: In function 'int main()': a.cc:61:17: error: 'prinf' was not declared in this scope; did you mean 'printf'? 61 | prinf("%.10lf\n", res / H / W); | ^~~~~ | printf a.cc:63:9: error: return-statement with no value, in function returning 'int' [-fpermissi...
s517415804
p01373
C++
#define pb push_back #define rep(i,n) for(int i=0;i<(n);i++) using namespace std; const double EPS=1e-11; int main(){ for(int W,H,n;scanf("%d%d%d",&W,&H,&n),W;){ n*=2; int x[200],y[200]; rep(i,n) scanf("%d%d",x+i,y+i); vector<double> y1; y1.pb(0); y1.pb(...
a.cc: In function 'int main()': a.cc:9:19: error: 'scanf' was not declared in this scope 9 | for(int W,H,n;scanf("%d%d%d",&W,&H,&n),W;){ | ^~~~~ a.cc:14:9: error: 'vector' was not declared in this scope 14 | vector<double> y1; | ^~~~~~ a.cc:1:1: note: 'std::vecto...
s426122580
p01373
C++
#define pb push_back #define rep(i,n) for(int i=0;i<(n);i++) using namespace std; const double EPS=1e-11; int main(){ for(int W,H,n;scanf("%d%d%d",&W,&H,&n),W;){ n*=2; int x[200],y[200]; rep(i,n) scanf("%d%d",x+i,y+i); vector<double> y1; y1.pb(0); y1.pb(...
a.cc: In function 'int main()': a.cc:9:19: error: 'scanf' was not declared in this scope 9 | for(int W,H,n;scanf("%d%d%d",&W,&H,&n),W;){ | ^~~~~ a.cc:14:9: error: 'vector' was not declared in this scope 14 | vector<double> y1; | ^~~~~~ a.cc:1:1: note: 'std::vecto...
s247569450
p01374
Java
import java.io.ByteArrayInputStream; 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.Queue; public class Main { static InputStream is; static PrintWriter out; static String INPUT =...
Main.java:229: error: method does not override or implement a method from a supertype @Override ^ 1 error
s236362884
p01374
Java
import java.io.ByteArrayInputStream; 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.Queue; public class Main { static InputStream is; static PrintWriter out; static String INPUT =...
Main.java:229: error: method does not override or implement a method from a supertype @Override ^ 1 error
s227735734
p01374
Java
import java.io.ByteArrayInputStream; 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.Queue; public class Main { static InputStream is; static PrintWriter out; static String INPUT =...
Main.java:229: error: method does not override or implement a method from a supertype @Override ^ 1 error
s892568766
p01374
Java
import java.io.ByteArrayInputStream; 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.HashMap; import java.util.List; import java.util.Queue; public class Main { static InputStream is...
Main.java:109: error: illegal character: '\' out.println(a\\ns); ^ Main.java:109: error: illegal character: '\' out.println(a\\ns); ^ Main.java:109: error: not a statement out.println(a\\ns); ^ Main.java:109: error: ';' expected out.println(a\\ns); ...
s255921091
p01374
Java
import java.io.ByteArrayInputStream; 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.HashMap; import java.util.List; import java.util.Queue; public class Main { static InputStream is...
Main.java:109: error: illegal character: '\' out.println(a\\ns); ^ Main.java:109: error: illegal character: '\' out.println(a\\ns); ^ Main.java:109: error: not a statement out.println(a\\ns); ^ Main.java:109: error: ';' expected out.println(a\\ns); ...
s190016542
p01374
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 main()': a.cc:115:37: error: 'add' was not declared in this scope; did you mean 'fadd'? 115 | rep(i,ps) rep(j,ws) add(ans,a[M%21][i][j]); | ^~~ | fadd
s135730261
p01374
C++
#include<bits/stdc++.h> using namespace std; struct TrieNode { int nxt[27]; int exist; // ???????????\????????????¨?????????????????????°????????¨? vector< int > accept; // ???????????????id TrieNode() : exist(0) { memset(nxt, -1, sizeof(nxt)); } }; struct Trie { vector< TrieNode > nodes; int r...
a.cc: In function 'int main()': a.cc:161:24: error: expected ';' before '}' token 161 | g[u].push_back(v) | ^ | ; 162 | } | ~
s094246704
p01376
Java
import java.util.*; public class main { static Scanner kbd = new Scanner(System.in); public static void main(String[] args){ while(kbd.hasNext()){ int m = kbd.nextInt(); int n = kbd.nextInt(); if(m!=0 && n!=0){ int c; int max=0; for(int i=0; i<m; i++){ c=0; for(int j=0; j<n; j++){ ...
Main.java:2: error: class main is public, should be declared in a file named main.java public class main { ^ 1 error
s614816290
p01376
C
#include <stdio.h> int main(void) { int i, j, m, n, a, max=0; int m[21]={0}; scanf("%d%d",&m,&n); for(i=0;i<m;i++) { for(j=0;j<n;j++){ scanf("%d",&a); m[i]+=a; } if(max<m[i]) max=m[i]; } printf("%d\n",max); return(0); }
main.c: In function 'main': main.c:4:5: error: conflicting types for 'm'; have 'int[21]' 4 | int m[21]={0}; | ^ main.c:3:11: note: previous declaration of 'm' with type 'int' 3 | int i, j, m, n, a, max=0; | ^
s706275631
p01376
C
int tmp=0; scanf("%d %d",&m,&n); for(j=0;j<m;j++){ for(i=0;i<n;i++){ scanf("%d ",&str[i][j]); } } for(j=0;j<m;j++){ for(i=0;i<n;i++){ tmp += str[i][j]; } if(tmp>max) max = tmp; tmp = 0; } printf("%d\n",max); return 0; }
main.c:3:15: error: expected declaration specifiers or '...' before string constant 3 | scanf("%d %d",&m,&n); | ^~~~~~~ main.c:3:23: error: expected declaration specifiers or '...' before '&' token 3 | scanf("%d %d",&m,&n); | ^ main.c:3:26: error: ...