submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s185226237
p01601
C++
#include<cstdio> #include<iostream> #include<algorithm> #include<cstring> #include<vector> #define INF 999999 using namespace std; int J(int x){ int LONG,plas=0,flg=0; char num[100]; if(x<10)return 1; itoa(x,num,10); LONG=strlen(num); if(LONG%2==0)plas=2; for(int i=0;i<(LONG-1+plas)/2;i++){ ...
a.cc: In function 'int J(int)': a.cc:12:5: error: 'itoa' was not declared in this scope 12 | itoa(x,num,10); | ^~~~
s684258753
p01601
C++
#include<cstdio> #include<stdlib.h> #include<iostream> #include<algorithm> #include<cstring> #include<vector> #define INF 999999 using namespace std; int J(int x){ int LONG,plas=0,flg=0; char num[100]; if(x<10)return 1; itoa(x,num,10); LONG=strlen(num); if(LONG%2==0)plas=2; for(int i=0;i<(LO...
a.cc: In function 'int J(int)': a.cc:13:5: error: 'itoa' was not declared in this scope 13 | itoa(x,num,10); | ^~~~
s200787705
p01601
C++
#include <iostream> #include <cstdio> #include <cstdlib> using namespace std; int main(){ char tmp[7],tmp2[7]; int sta,sta1; char num[7]; cin >> sta; sta1 = sta; while(1){ sprintf(num,"%d",sta); sprintf(num,"%d",sta1); if(strlen(num) == 1) break; strcpy(tmp,num); strcpy(tmp2,num); f...
a.cc: In function 'int main()': a.cc:15:8: error: 'strlen' was not declared in this scope 15 | if(strlen(num) == 1) break; | ^~~~~~ a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <cstdlib> +++ |+#include <cstring>...
s784642802
p01601
C++
#include <iostream> #include <cstdio> #include <cstdlib> #include <algorithm> using namespace std; int main(){ char tmp[7],tmp2[7]; int sta,sta1; char num[7]; cin >> sta; sta1 = sta; while(1){ sprintf(num,"%d",sta); sprintf(num,"%d",sta1); if(strlen(num) == 1) break; strcpy(tmp,num); st...
a.cc: In function 'int main()': a.cc:16:8: error: 'strlen' was not declared in this scope 16 | if(strlen(num) == 1) break; | ^~~~~~ a.cc:5:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include <algorithm> +++ |+#include <cstrin...
s489758777
p01602
C
#include<iostream> using namespace std; int main(void){ int n, x, s = 0; char p[1000]; cin >> n; for(int i=0; i<n; i++){ cin >> p[i] >> x; if(p[i] == '('){ s += x; } else { s -= x; } if(s < 0){ cout << "NO" << endl; break; } } if(s == 0){ cout << "YES"...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s379979737
p01602
C++
#include <stdio.h> int main() { char c; int n, c, v = 0; scanf("%d", &n); for(int i = 0; i < n; i++) { scanf("%c %d", &c, &d); v += (c == ')' ? 1 : -1) * d; } printf("%s\n", v == 0 ? "YES" : "NO"); return 0; }
a.cc: In function 'int main()': a.cc:5:20: error: conflicting declaration 'int c' 5 | char c; int n, c, v = 0; | ^ a.cc:5:10: note: previous declaration as 'char c' 5 | char c; int n, c, v = 0; | ^ a.cc:11:29: error: 'd' was not declared in this scope 11 | ...
s354975594
p01602
C++
#include <iostream> #include <vector> #define rep(i,n) for(int i= 0; i<n;i++) #define loop(i,f,n) for(int i = f; i<n; i++) #define MAX 1000000 using namespace std; int main(){ int n,num = 0; vector<int>stac(MAX,0); cin >> n; int tuki = 0; int r; int cc = 0; bool checking = true; rep(i,n) { int temp; cha...
a.cc: In function 'int main()': a.cc:56:26: error: expected '}' at end of input 56 | return 0; | ^ a.cc:8:11: note: to match this '{' 8 | int main(){ | ^
s788185829
p01602
C++
include<iostream> #include<algorithm> ...
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/algorithm:60, from a.cc:2: /usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __g...
s692969441
p01602
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
s054260588
p01602
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
s426049108
p01602
C++
include<iostream> #include<map> #include<cstdio> #include<cstring> #include<string> #include<algorithm> #include<cstdlib> using namespace std; int main(){ long long cnt=0; int n,x,flg; char p; short a=0; cin >> n; for(int i=0;i<n;i++){ cin >> p >> x; if(p=='(')cnt+=x; else cnt-=x; if(cnt<...
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/bits/stl_tree.h:63, from /usr/include/c++/14/map:62, from a.cc:2: /usr/include/c++/14/ex...
s041516784
p01603
C++
#include<bits/stdc++.h> using namespace std; typedef struct{ int next,t,m,v; }road; int main(){ int n,t; cin>>n>>t; vector<vector<road> > g(n+1); for(int i=0;i<n-1;i++){ int a,b,t2,m,v; cin>>a>>b>>t2>>m>>v; g[a].push_back((road){b,t2,m,v}); g[b].push_back((road){a,t2,m,v}); } //cout<<g[1][0].next<<g[1][0].t<<endl; vect...
a.cc: In function 'int main()': a.cc:17:56: error: no matching function for call to 'std::vector<std::vector<int> >::vector(int, int)' 17 | vector<vector<int> > dp(n+1,vector<vector<int> >(t+1,-1)); | ^ In file included from /usr/include/c++/14/vector:66, ...
s340337840
p01604
C++
#include <cstdlib> #include <iostream> #include <map> #include <queue> #include <string> #include <utility> #include <vector> using namespace std; struct edge { int to, cost; edge(int t, int c):to(t), cost(c) {} }; vector<vector<edge> > es; typedef pair<int, int> P; int dijkstra(int s, int g) { priority_queue<P, ...
a.cc: In function 'int dijkstra(int, int)': a.cc:20:30: error: 'INT_MAX' was not declared in this scope 20 | vector<int> d(g + 1, INT_MAX); | ^~~~~~~ a.cc:7:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 6 | ...
s423398076
p01605
C++
#include <iostream> #include <map> #include <cstring> #include <vector> #include <cmath> #include <cstdio> #include <algorithm> using namespace std; string S; long long Q,A,B; struct NODE{ char c; vector<NODE*> ch; }; #define INF (1e18+10000) NODE* alp[128] = {}; map<NODE*,long long> hash; long long add(long lon...
a.cc: In function 'long long int size(NODE*)': a.cc:28:13: error: reference to 'hash' is ambiguous 28 | if( hash.count(r) ) return hash[r]; | ^~~~ In file included from /usr/include/c++/14/string_view:50, from /usr/include/c++/14/bits/basic_string.h:47, fro...
s719523881
p01607
C++
#include <cmath> #include <iostream> #include <complex> #include <utility> #include <vector> using namespace std; using P = complex<double>; using L = pair<P,P>; using C = pair<P,double>; using Poly = vector<P>; #define X real() #define Y imag() const double EPS = 1e-7, pi = acos(-1.0); double dot(P a, P b){ return a....
a.cc:102:2: error: #error "true" 102 | #error "true" | ^~~~~
s910582344
p01609
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
s665688700
p01609
C++
#include <cstdio> #include <cmath> #include <vector> #include <algorithm> using namespace std; #define INTERVAL 1048576 #define EPS 1e-9 int W,H,N; int yama[101][3]; double xint[101][2]; double quad(double x,int nyama) { double a=yama[nyama][0]; double p=yama[nyama][1]; double q=yama[nyama][2]; return a*(x-p)*...
a.cc: In function 'double integrates(int, int)': a.cc:85:54: error: expected ';' before '}' token 85 | return 1.0/2.0/INTERVAL*(cir(a,nyama)+cir(b,nyama)) | ^ | ; 86 | } | ~ ...
s818021494
p01609
C++
#include <iostream> #include<iomanip> #include<cmath> #include<vector> #include<algorithm> using namespace std; #define rep(i,n) for(int i=0;i<(n);i++) inline double f(double a,double p,double q,double x){ return a*(x-p)*(x-p)+q; } inline double f(double a, double p, double x){ return sqrt(1.0 + 4.0*a*a*x*x...
a.cc: In function 'int main()': a.cc:73:18: error: expected primary-expression before ')' token 73 | rep(j, n)){ | ^
s636666352
p01609
C++
#include <iostream> #include<iomanip> #include<cmath> #include<vector> #include<algorithm> ​ using namespace std; ​ double f(double a,double p,double q,double x){ return a*(x-p)*(x-p)+q; } ​ double f(double a, double p, double x){ return sqrt(1.0 + 4.0*a*a*x*x - 8.0*a*a*p*x + 4.0*a*a*p*p); } double s(double a, do...
a.cc:6:1: error: '\U0000200b' does not name a type 6 | ​ | a.cc:8:1: error: '\U0000200b' does not name a type 8 | ​ | a.cc:13:1: error: '\U0000200b' does not name a type 13 | ​ | a.cc: In function 'double s(double, double, double, double)': a.cc:22:10: error: 'f' was not declared in t...
s989339912
p01612
C++
#include <cstdlib> #include <iostream> #include <queue> #include <utility> #include <vector> using namespace std; template<class T> inline void chmax(T& a, const T& b) { if(b > a) a = b; } void calc_dp(vector<int>& dp, vector<int>& degree, const vector<vector<int> >& edge) { const int n = dp.size(); queue<int> que;...
a.cc: In function 'int main()': a.cc:61:23: error: 'max_element' was not declared in this scope 61 | int length = *max_element(dp_source.begin(), dp_source.end()); | ^~~~~~~~~~~
s012388239
p01612
C++
import std.stdio; import std.conv; import std.array; import std.algorithm; const bool DEBUG = true; class Node { string name; Node[] parents; Node[] children; static Node birth, end; static this() { birth = new Node; end = new Node; } private this() {} this(string n...
a.cc:31:5: error: stray '@' in program 31 | @property int fromBirth() { | ^ a.cc:41:5: error: stray '@' in program 41 | @property int toEnd() { | ^ a.cc:1:1: error: 'import' does not name a type 1 | import std.stdio; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with...
s597254810
p01613
C++
#include <iostream> #include <cstdio> #include <vector> #include <queue> #include <utility> #include <tuple> using namespace std; using Graph = vector< vector<int> >; void read_field(vector<char> &board, Graph &G) { int N, M; cin >> N >> M; board.resize(N); G.resize(N); for(int i=0; i<N; i++) { cin >> bo...
a.cc: In function 'int main()': a.cc:64:25: error: no matching function for call to 'max(int)' 64 | if(rec[u1][u2] > max(N1 + N2)) { | ~~~^~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s983029084
p01613
C++
#include <cmath> #include <cstdlib> #include <iostream> using namespace std; template<class T> inline void chmin(T& a, T b) { if(b < a) a = b; } inline int dist(int a, int b, int w) { return abs(a % w - b % w) + abs(a / w - b / w); } int main() { cin.tie(false); ios::sync_with_stdio(false); int n, a, b, c, d; ...
a.cc: In function 'int main()': a.cc:13:16: error: no matching function for call to 'std::basic_istream<char>::tie(bool)' 13 | cin.tie(false); | ~~~~~~~^~~~~~~ In file included from /usr/include/c++/14/ios:46, from /usr/include/c++/14/ostream:40, from /usr/incl...
s249082336
p01613
C++
#include <cstdlib> #include <iostream> using namespace std; int dist(int x1, int x2, int y1, int y2) { return abs(x1 - x2) + abs(y1 - y2); } int main() { int n, a, b, c, d; cin >> n; cin >> a >> b >> c >> d; int res = 500; for (int i = 1; i <= n; i++) { res = min(res, dist(a % i, b % ...
a.cc: In function 'int main()': a.cc:16:85: error: 'dm' was not declared in this scope; did you mean 'd'? 16 | res = min(res, dist(a % i, b % i, a / i, b / i) + dist(c % i, d % i, c / i, dm / i)); | ^~ | ...
s748521976
p01614
C
#include <stdio.h> #define MAX_PHRASES 393 #define MAX_MELODIES 393 #define MAX_LENGTH 394 typedef struct { int minimum; int maximum; int point; } phrase_t; typedef struct { int score; } melody_t; int phrase_num; phrase_t phrases[MAX_PHRASES]; int score_mem[MAX_LENGTH][MAX_LENGTH]; int get_max_score(int lengt...
main.c: In function 'main': main.c:86:49: error: too many arguments to function 'get_max_score' 86 | if((melodies[i].score = get_max_score(melody_length, 0, 0)) == 0) { | ^~~~~~~~~~~~~ main.c:22:5: note: declared here 22 | int get_max_s...
s293616046
p01614
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
s109924351
p01614
C++
#include <iostream> #include <vector> using namespace std; int n; int lo[400], hi[400], score[400]; int dp[1000]; void calcDP(){ memset(dp, -1, sizeof(dp)); dp[0] = 0; for(int i = 0; i < 393; i++){ if(dp[i] == -1) continue; for(int j = 0; j < n; j++){ for(int k = lo[j]; k <= hi[j]; k++){ ...
a.cc: In function 'void calcDP()': a.cc:10:3: error: 'memset' was not declared in this scope 10 | 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 <vector> +++ |+#include <cstring> ...
s552367018
p01614
C++
1;2c#include <iostream> #include <cstdio> #include <cstring> #include <cstdlib> #include <cmath> #include <vector> #include <string> #include <map> #include <queue> #include <stack> #include <algorithm> #define rep(i,j) REP((i), 0, (j)) #define REP(i,j,k) for(int i=(j);(i)<(k);++i) #define between(a,x,b) ((a)<=(x)&&(x...
a.cc:1:5: error: stray '#' in program 1 | 1;2c#include <iostream> | ^ a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 1;2c#include <iostream> | ^ a.cc:1:3: error: expected unqualified-id before numeric constant 1 | 1;2c#include <iostream> | ^~ In file included fr...
s447655120
p01614
C++
#include<iostream> #include<set> #define rep(i,n) for(int i=0;i<(n);i++) using namespace std; class Phrase { public: int s,l,p; Phrase(int s,int l,int p) { this->s = s; this->l = l; this->p = p; } Phrase() { s=l=p=0; } }; int n; Phrase phra[400]; int m; int w...
a.cc: In function 'int main()': a.cc:39:22: error: 'j' was not declared in this scope 39 | for(int k=0;k<400;k+=j) { | ^
s309179659
p01614
C++
#include<iostream> #include<set> #define rep(i,n) for(int i=0;i<(n);i++) using namespace std; class Phrase { public: int s,l,p; Phrase(int s,int l,int p) { this->s = s; this->l = l; this->p = p; } Phrase() { s=l=p=0; } }; int n; Phrase phra[400]; int m; int w...
a.cc:67:1: error: 'tt' does not name a type; did you mean 'tm'? 67 | tt | ^~ | tm
s696472147
p01615
C
#include <cstdio> #include <map> using namespace std; typedef map<int,int>mii; int d[999],n,m,a,b,i,x; map<int,mii>z; int D(int c){ if(d[c]>=0)return d[c]; int i=0,x=0,y; mii::iterator it=z[c].begin(); for(;it!=z[c].end();it++){ y=D(it->first)+it->second; if(x<y)x=y; } return d[n]=x; } main(){ for(scanf("%d%...
main.c:1:10: fatal error: cstdio: No such file or directory 1 | #include <cstdio> | ^~~~~~~~ compilation terminated.
s461259472
p01615
C++
//============================================================================ // Name : aoj2503.cpp // Author : afterCmidday // Version : // Copyright : Your copyright notice // Description : Hello World in C++, Ansi-style //============================================================================...
a.cc: In function 'int main()': a.cc:18:9: error: 'memset' was not declared in this scope 18 | memset(cost,-1,sizeof(cost)); | ^~~~~~ a.cc:12:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 11 | #include <cstdlib> +++ |+#include <...
s328430709
p01615
C++
#include<algorithm> #include<vector> #include<cstring> #include<queue> using namespace std; vector<pair<int, int> > edge[401]; int dp[401]; int n; int main() { int m; for(;cin>>n>>m;) { // node[i][0]=in,[1]=max int node[n+1][2]; vector<pair<int,int> > edge[n+1]; memset(node,0,sizeof(n...
a.cc: In function 'int main()': a.cc:14:8: error: 'cin' was not declared in this scope 14 | for(;cin>>n>>m;) | ^~~ a.cc:5:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 4 | #include<queue> +++ |+#include <iostream> 5 | using na...
s726670533
p01615
C++
#include <iostream> #include <algorithm> #include <queue> #include <vector> #include <utility> #include <cassert> #include <functional> using namespace std; &#160; #define DEBUG(x) // cerr << #x << " = " << x << endl &#160; struct Edge { &#160;&#160;&#160;&#160;int to, cost; &#160;&#160;&#160;&#160;Edge(int t, int c) :...
a.cc:9:2: error: stray '#' in program 9 | &#160; | ^ a.cc:11:2: error: stray '#' in program 11 | &#160; | ^ a.cc:13:2: error: stray '#' in program 13 | &#160;&#160;&#160;&#160;int to, cost; | ^ a.cc:13:8: error: stray '#' in program 13 | &#160;&#160;&#160;&#160;int to, cost; | ...
s145319916
p01615
C++
#include <iostream> #include <algorithm> #include <queue> #include <vector> #include <utility> #include <cassert> #include <functional> using namespace std; &#160; #define DEBUG(x) // cerr << #x << " = " << x << endl &#160; struct Edge { &#160;&#160;&#160;&#160;int to, cost; &#160;&#160;&#160;&#160;Edge(int t, int c) :...
a.cc:9:2: error: stray '#' in program 9 | &#160; | ^ a.cc:11:2: error: stray '#' in program 11 | &#160; | ^ a.cc:13:2: error: stray '#' in program 13 | &#160;&#160;&#160;&#160;int to, cost; | ^ a.cc:13:8: error: stray '#' in program 13 | &#160;&#160;&#160;&#160;int to, cost; | ...
s990397424
p01615
C++
#include <iostream> #include <algorithm> #include <queue> #include <vector> #include <utility> #include <cassert> #include <functional> using namespace std; &#160; #define DEBUG(x) // cerr << #x << " = " << x << endl &#160; struct Edge { &#160;&#160;&#160;&#160;int to, cost; &#160;&#160;&#160;&#160;Edge(int t, int c) :...
a.cc:9:2: error: stray '#' in program 9 | &#160; | ^ a.cc:11:2: error: stray '#' in program 11 | &#160; | ^ a.cc:13:2: error: stray '#' in program 13 | &#160;&#160;&#160;&#160;int to, cost; | ^ a.cc:13:8: error: stray '#' in program 13 | &#160;&#160;&#160;&#160;int to, cost; | ...
s713228288
p01615
C++
#include <iostream> #include <algorithm> #include <queue> #include <vector> #include <utility> #include <cassert> #include <functional> using namespace std; &#160; #define DEBUG(x) // cerr << #x << " = " << x << endl &#160; struct Edge { int to, cost; Edge(int t, int c) : to(t), cost(c) {} }; &#160; typedef pai...
a.cc:9:2: error: stray '#' in program 9 | &#160; | ^ a.cc:11:2: error: stray '#' in program 11 | &#160; | ^ a.cc:16:2: error: stray '#' in program 16 | &#160; | ^ a.cc:18:2: error: stray '#' in program 18 | &#160; | ^ a.cc:26:10: error: stray '#' in program 26 | &#160...
s601040623
p01615
C++
#include<algorithm> #include<vector> #define INF 100000000 using namespace std; int graph[400][400],n,dp[400]; bool visit[400]; vector<int>L; void Tsort(int v){ visit[v]=true; for(int i=0;i<n;i++) if(graph[v][i]>0 && !visit[i])Tsort(i); L.push_back(v); } int main(void){ int m,a,b,c; cin >> n >> m; ...
a.cc: In function 'int main()': a.cc:23:3: error: 'cin' was not declared in this scope 23 | cin >> n >> m; | ^~~ a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 2 | #include<vector> +++ |+#include <iostream> 3 | a.cc:38:3: er...
s292999880
p01615
C++
#include <iostream> #include <vector> #include <algorithm> #include <cstring> using namespace std; typedef vector<int> vi; #define loop(i,a,b) for(int i=a; i<(int)(b); i++) #define rep(i,n) loop(i,0,n) #define all(c) (c).begin(), (c).end() int n,m; struct edge { int v,cost; }; vector<vector<edge> > G; int tord[40...
In file included from /usr/include/c++/14/algorithm:61, from a.cc:3: /usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<const edge*, vector<edge> >; _Comp...
s892642420
p01615
C++
#include <iostream> #include <vector> #include <algorithm> #include <cstring> using namespace std; typedef vector<int> vi; #define loop(i,a,b) for(int i=a; i<(int)(b); i++) #define rep(i,n) loop(i,0,n) #define all(c) (c).begin(), (c).end() int n,m; struct edge { int v,cost; }; vector<vector<edge> > G; int tord[40...
In file included from /usr/include/c++/14/algorithm:61, from a.cc:3: /usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<const edge*, vector<edge> >; _Comp...
s158717498
p01615
C++
#include <iostream> #include <vector> #include <algorithm> #include <cstring> using namespace std; typedef vector<int> vi; #define loop(i,a,b) for(int i=a; i<(int)(b); i++) #define rep(i,n) loop(i,0,n) #define all(c) (c).begin(), (c).end() int n,m; struct edge { int v,cost; }; vector<vector<edge> > G; int tord[40...
In file included from /usr/include/c++/14/algorithm:61, from a.cc:3: /usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<const edge*, vector<edge> >; _Comp...
s745302646
p01615
C++
#include <iostream> #include <vector> #include <algorithm> #include <cstring> using namespace std; typedef vector<int> vi; #define loop(i,a,b) for(int i=a; i<(int)(b); i++) #define rep(i,n) loop(i,0,n) #define all(c) (c).begin(), (c).end() int n,m; struct edge { int v,cost; edge(const edge &){} edge(int v,i...
In file included from /usr/include/c++/14/algorithm:61, from a.cc:3: /usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<const edge*, vector<edge> >; _Comp...
s190709558
p01615
C++
#include <iostream> #include <vector> #include <algorithm> #include <cstring> using namespace std; typedef vector<int> vi; #define loop(i,a,b) for(int i=a; i<(int)(b); i++) #define rep(i,n) loop(i,0,n) #define all(c) (c).begin(), (c).end() int n,m; struct edge { int v,cost; edge(const edge &){} edge(int v,i...
In file included from /usr/include/c++/14/algorithm:61, from a.cc:3: /usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<const edge*, vector<edge> >; _Comp...
s575731104
p01615
C++
using namespace std; static const int MAX = 500; class E{ public: int t, c; E(){} E(int t, int c):t(t), c(c){} }; int N; vector<E> G[MAX]; int dp[MAX]; int dfs(int u){ if ( dp[u] != -1 ) return dp[u]; int maxv = 0; for ( int i = 0; i < G[u].size(); i++ ){ maxv = max(maxv, dfs(G[u][i].t) + G[u][i].c);...
a.cc:12:1: error: 'vector' does not name a type 12 | vector<E> G[MAX]; | ^~~~~~ a.cc: In function 'int dfs(int)': a.cc:18:24: error: 'G' was not declared in this scope 18 | for ( int i = 0; i < G[u].size(); i++ ){ | ^ a.cc:19:12: error: 'max' was not declared in this scope; di...
s536370009
p01615
C++
&#65279;&#65279;&#65279;&#65279;&#65279;&#65279;&#65279;#include <iostream> #include <cstdio> #include <cstring> #include <cstdlib> #include <cmath> #include <vector> #include <string> #include <map> #include <queue> #include <stack> #include <algorithm> #define rep(i,j) REP((i), 0, (j)) #define REP(i,j,k) for(int i=(...
a.cc:1:2: error: stray '#' in program 1 | &#65279;&#65279;&#65279;&#65279;&#65279;&#65279;&#65279;#include <iostream> | ^ a.cc:1:10: error: stray '#' in program 1 | &#65279;&#65279;&#65279;&#65279;&#65279;&#65279;&#65279;#include <iostream> | ^ a.cc:1:18: error: stray '#' in program 1 ...
s387632725
p01615
C++
&#65279;&#65279;&#65279;&#65279;&#65279;&#65279;&#65279;#include <iostream> #include <cstdio> #include <cstring> #include <cstdlib> #include <cmath> #include <vector> #include <string> #include <map> #include <queue> #include <stack> #include <algorithm> #define rep(i,j) REP((i), 0, (j)) #define REP(i,j,k) for(int i=(...
a.cc:1:2: error: stray '#' in program 1 | &#65279;&#65279;&#65279;&#65279;&#65279;&#65279;&#65279;#include <iostream> | ^ a.cc:1:10: error: stray '#' in program 1 | &#65279;&#65279;&#65279;&#65279;&#65279;&#65279;&#65279;#include <iostream> | ^ a.cc:1:18: error: stray '#' in program 1 ...
s556869927
p01616
C++
#include <cstdio> #include <cstdint> #include <cassert> #include <cctype> #include <algorithm> #include <vector> #include <string> #include <map> std::vector<std::string> preprocess(const std::string &s, std::string &t) { int last='^'; t.clear(); std::vector<std::string> res; for (size_t i=0; i<s.length(); ++i...
a.cc:121:123: error: stray '`' in program 121 | D: D.cpp:70: Cond parse(const string&, size_t&, const std::vector<std::__cxx11::basic_string<char> >&, size_t): Assertion `s[i] == ')'' failed. | ...
s422272653
p01616
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
s981360820
p01616
C++
#include <cstdio> #include <cstdint> #include <cstring> #include <cassert> #include <cctype> #include <algorithm> #include <vector> #include <string> #include <map> //#define fprintf(...) void(0) std::vector<std::string> preprocess(const std::string &s, std::string &t) { t.clear(); std::vector<std::string> res; ...
a.cc: In function 'int main()': a.cc:198:49: error: expected ')' before ';' token 198 | add_edge(vars[lits[0]], NOT+vars[lits[0]]); | ^ | ) a.cc:197:15: note: to match this '(' 197 | add_edge(a, ...
s092211867
p01616
C++
#include <iostream> #include <string> #include <map> #include <cctype> #include <vector> using namespace std; #define DEBUG(x) cerr << #x << " = " << x << endl #define CALL(f) // cerr << f << ": *it = " << *it << endl #define REP(i,n) for(int i = 0; i < (int)n; ++i) #define FOR(it,c) for(__typeof((c).begin()) it = (c...
a.cc: In member function 'int Graph::scc()': a.cc:128:9: error: 'reverse' was not declared in this scope 128 | reverse(vs.begin(), vs.end()); | ^~~~~~~
s511826470
p01616
C++
#include <iostream> #include <string> #include <map> #include <cctype> #include <vector> #include <algorithm> #include <cstdlib> using namespace std; #define DEBUG(x) // cerr << #x << " = " << x << endl #define CALL(f) // cerr << f << ": *it = " << *it << endl #define REP(i,n) for(int i = 0; i < (int)n; ++i) #define ...
a.cc: In function 'int main()': a.cc:145:14: error: 'struct restype' has no member named 'left'; did you mean 'left_id'? 145 | if(r.left >= 2*M || r.right >= 2*M) while(true); | ^~~~ | left_id a.cc:145:31: error: 'struct restype' has no member named 'right'; did you mean ...
s215672183
p01617
C++
#include <cstdlib> #include <iostream> #include <vector> using namespace std; #define REP(i, a, b) for(int i = (a); i < int(b); ++i) #define rep(i, n) REP(i, 0, n) template<class T> inline void chmax(T &a, const T &b) { if(a < b) a = b; } typedef vector<vector<int>> graph; // SCC Strongly Connected Component 強連結成分分...
a.cc: In member function 'void SCC::construct()': a.cc:85:25: error: 'sort' was not declared in this scope; did you mean 'short'? 85 | sort(es.begin(), es.end()); | ^~~~ | short a.cc:86:34: error: 'unique' was not declared in this sc...
s055255125
p01617
C++
#include <iostream> #include <vector> #include <queue> using namespace std; vector<char> tag[2]; vector< vector<int> > e[2]; struct Node { unsigned char a, b; }; int v[100][100]; int main() { fill(&v[0][0], &v[0][0]+100*100, -1); for (int t = 0; t < 2; ++t) { int N, M; cin >> N >> M; tag[t].resize(N); fo...
a.cc: In function 'int main()': a.cc:34:28: warning: narrowing conversion of 'a' from 'int' to 'unsigned char' [-Wnarrowing] 34 | Q[0].push({a, b}); | ^ a.cc:34:31: warning: narrowing conversion of 'b' from 'int' to 'unsigned char' [-Wnarrowing] 34 | ...
s022443766
p01617
C++
#include <iostream> #include <vector> using namespace std; vector<char> tag[2]; vector< vector<int> > e[2]; int v[100][100]; bool f[100][100] = {0}; bool dp(int a, int b, int score) { if (tag[0][a] == tag[1][b]) ++score; if (score <= v[a][b]) return; if (f[a][b]) return true; v[a][b] = score; f[a][b] = true;...
a.cc: In function 'bool dp(int, int, int)': a.cc:15:31: error: return-statement with no value, in function returning 'bool' [-fpermissive] 15 | if (score <= v[a][b]) return; | ^~~~~~
s797270132
p01617
C++
#include<iostream> #include<vector> #include<algorithm> #include <iterator> #include<queue> #include <string> #include <numeric> #include<stack> using namespace std; #define rep(i,n) for(int i=0;i<(n);i++) #define all(v) v.begin(),v.end() struct Node{ int id; int alpha; vector<int> ToCole; }; vector<char> AlphaCole...
a.cc: In function 'int GetAns(std::vector<std::vector<int> >, std::vector<std::vector<int> >&, int, int, int)': a.cc:64:48: error: 'i' was not declared in this scope 64 | if (IsSelected[i][j] != -1){ | ^ a.cc:75:51: error: 'j' was n...
s752997902
p01617
C++
#include<stdio.h> #include <iostream> #include <math.h> #include <numeric> #include <vector> #include <map> #include <functional> #include <stdio.h> #include <array> #include <algorithm> #include <string> #include <string.h> #include <assert.h> #include <stdio.h> #include <queue> #include<iomanip> #include<bitset> #inc...
a.cc: In function 'int main()': a.cc:204:50: error: cannot bind non-const lvalue reference of type 'std::vector<Used>&' to an rvalue of type 'std::vector<Used>' 204 | ans=max(ans,getans(i, j, vector<Used>(),0)); | ^~~~~~~~~~~~~~ a.cc:144:4...
s596682534
p01617
C++
#include <iostream> #include <cstdio> #include <vector> #include <queue> #include <utility> #include <tuple> using namespace std; using Graph = vector< vector<int> >; void read_field(vector<char> &board, Graph &G) { int N, M; cin >> N >> M; board.resize(N); G.resize(N); for(int i=0; i<N; i++) { cin >> bo...
a.cc:135:1: error: expected unqualified-id before numeric constant 135 | 0 1 1 1 | ^
s916681573
p01617
C++
#include <iostream> #include <cstdio> #include <vector> #include <queue> #include <utility> #include <tuple> using namespace std; using Graph = vector< vector<int> >; void read_field(vector<char> &board, Graph &G) { int N, M; cin >> N >> M; board.resize(N); G.resize(N); for(int i=0; i<N; i++) { cin >> bo...
a.cc:147:1: error: expected unqualified-id before numeric constant 147 | 0 1 1 1 | ^
s724940230
p01617
C++
#include <iostream> #include <cstdio> #include <vector> #include <queue> #include <utility> #include <tuple> using namespace std; using Graph = vector< vector<int> >; void read_field(vector<char> &board, Graph &G) { int N, M; cin >> N >> M; board.resize(N); G.resize(N); for(int i=0; i<N; i++) { cin >> bo...
a.cc: In function 'int main()': a.cc:63:8: error: 'cost' was not declared in this scope; did you mean 'const'? 63 | if(cost < rec[u1][u2]) continue; | ^~~~ | const
s104125605
p01617
C++
#include <cassert> #include <cstdlib> #include <iostream> #include <string> #include <vector> using namespace std; template<class T> inline void chmax(T& a, T b) { if(b > a) a = b; } const int A = 0, M = 1, INF = 0xfffffff; int V; vector<int> point; vector<int> cpoint; vector<vector<int> > G; vector<vector<int> > r...
a.cc: In function 'void rdfs(int, int)': a.cc:50:11: error: reference to 'size' is ambiguous 50 | ++size[k]; | ^~~~ 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....
s931704034
p01617
C++
#include <cstdlib> #include <iostream> #include <string> #include <vector> using namespace std; template<class T> inline void chmax(T& a, T b) { if(b > a) a = b; } const int A = 0, M = 1, INF = 0xfffffff; int num[2], n[2], m[2]; vector<int> cmp[2]; vector<string> characters[2]; vector<string> c(2); vector<vector<int...
a.cc: In function 'int main()': a.cc:102:16: error: no matching function for call to 'std::basic_istream<char>::tie(bool)' 102 | cin.tie(false); | ~~~~~~~^~~~~~~ In file included from /usr/include/c++/14/ios:46, from /usr/include/c++/14/ostream:40, from /usr/inc...
s080096637
p01619
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int m = sc.nextInt(); int p = 1000000 if(m==1){ System.out.println(((int)(Math.pow(2, n)))%p); } else{ ...
Main.java:7: error: ';' expected int p = 1000000 ^ 1 error
s660461306
p01619
C++
#include <iostream> #include<string> #include<vector> #include<algorithm> using namespace std; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<vvi> vvvi; typedef long long ll; #define mod 1000000 int main() { int n, m; cin >> n >> m; ll rui[101]; int r = 1; for (int i = 0; i < 101; i++)rui[i] = r, ...
a.cc: In function 'int main()': a.cc:21:17: error: 'memset' was not declared in this scope 21 | memset(dp, 0, sizeof(dp)); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include<algorithm> ++...
s388787436
p01619
C++
#include <iostream> #include <vector> #include <algorithm> #include <cstring> #include <cstdlib> #include <fstream> using namespace std; typedef long long ll; int H,W; int dp[110][5][110]; const int mod=1000000; int dfs(int cy,int cx,int cdepth){ if(dp[cy][cx][cdepth]>=0)return dp[cy][cx][cdepth]; ll res=...
a.cc:75:6: error: stray '#' in program 75 | Case #24: | ^ a.cc:75:1: error: 'Case' does not name a type 75 | Case #24: | ^~~~
s245916447
p01620
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.InputMismatchException; import java.util.NoSuchElementException; import java.math.BigInteger; public class Main{ static PrintWriter out...
Main.java:28: error: cannot find symbol out.println(Strng.valueOf(s)); ^ symbol: variable Strng location: class Main 1 error
s681158814
p01620
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.InputMismatchException; import java.util.NoSuchElementException; import java.math.BigInteger; public class Main{ static PrintWriter out...
Main.java:25: error: char cannot be dereferenced if(s[i].isLowerCase()) t=s[i]-'a'; ^ Main.java:29: error: char cannot be dereferenced if(s[i].isLowerCase()) s[i]=(char)('a'+t); ^ 2 errors
s326432501
p01620
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.InputMismatchException; import java.util.NoSuchElementException; import java.math.BigInteger; public class Main{ static PrintWriter out...
Main.java:25: error: cannot find symbol if(isLowerCase(s[i])) t=s[i]-'a'; ^ symbol: method isLowerCase(char) location: class Main Main.java:29: error: cannot find symbol if(isLowerCase(s[i])) s[i]=(char)('a'+t); ^ symbol: method isLowerCase(char) location: class Main 2 errors
s153668685
p01620
C
#include<stdio.h> #include<String.h> int main() { int n,i,key[100],lenS,keyi=0,j,m=0; char S[100],an[100][100]; while(1){ scanf("%d",&n); if(n==0)break; for(i=0;i<n;i++){ scanf("%d",&key[i]); } scanf("%s",S); lenS=strlen(S); for(i=0;i<lenS;i++){ for(j=0;j<key[keyi];j++){ ...
main.c:2:9: fatal error: String.h: No such file or directory 2 | #include<String.h> | ^~~~~~~~~~ compilation terminated.
s059914278
p01620
C
#include<stdio.h> #include<String.h> int main() { int n,i,key[100],lenS,keyi=0,j,m=0; char S[1000],an[100][100]; while(1){ scanf("%d",&n); if(n==0)break; for(i=0;i<n;i++){ scanf("%d",&key[i]); } scanf("%s",S); lenS=strlen(S); for(i=0;i<lenS;i++){ for(j=0;j<key[keyi];j++){ ...
main.c:2:9: fatal error: String.h: No such file or directory 2 | #include<String.h> | ^~~~~~~~~~ compilation terminated.
s450650540
p01620
C
#include<stdio.h> #include<String.h> int main() { int n,i,key[100],lenS,keyi=0,j,m=0; char S[100][100]; while(1){ scanf("%d",&n); if(n==0)break; for(i=0;i<n;i++){ scanf("%d",&key[i]); } scanf("%s",S[m]); lenS=strlen(S[m]); for(i=0;i<lenS;i++){ for(j=0;j<key[keyi];j++){ ...
main.c:2:9: fatal error: String.h: No such file or directory 2 | #include<String.h> | ^~~~~~~~~~ compilation terminated.
s724105119
p01620
C
#include <stdio.h> #include <stdlib.h> int main(void) { int n,i,j; int *key; char code[100],str[100]; scanf("%d",&n); key=(int *)calloc(n,sizeof(int)); for(i=0;i<n;i++)scanf("%d",&key[i]); scanf("%s",code); i=0; while(1){ if(code[i]='\0'){ str[i]=code[i]; break; } (int)str[i]=(int)code[i]-key[(n+...
main.c: In function 'main': main.c:20:28: error: lvalue required as left operand of assignment 20 | (int)str[i]=(int)code[i]-key[(n+1)%(i+1)]; | ^
s349245486
p01620
C
#include <stdio.h> #include <string.h> void main() { int i; int n; int k[52]; char buf[100],ans[100]; unsigned int buf_length; //initialize for(i=0;i<100;i++){ buf[i] = '\n'; ans[i] = '\n'; } while(1){ scanf("%d",&n); if(n == 0) break; for(i=0;i<n;i++) scanf("%d",k[i]); scanf("%s",buf); buf_lengt...
main.c: In function 'main': main.c:23:34: error: 'str' undeclared (first use in this function) 23 | ans[i] = str[i] - (char)k[i%n]; | ^~~ main.c:23:34: note: each undeclared identifier is reported only once for each function it appears in
s659124549
p01620
C++
#! /usr/bin/env python # -*- coding: utf-8 -*- import os import sys import itertools import math from collections import Counter, defaultdict class Main(object): def __init__(self): self.chars = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', ...
a.cc:1:2: error: invalid preprocessing directive #! 1 | #! /usr/bin/env python | ^ a.cc:2:3: error: invalid preprocessing directive #- 2 | # -*- coding: utf-8 -*- | ^ a.cc:16:9: error: empty character constant 16 | ''' | ^~ a.cc:16:11: warning: missing terminating ' chara...
s301639695
p01620
C++
#include<bits/stdc++.h> using namespace std; char list[52]; char Decoding(char c,int key){ int num; if(c >= 'A' && c <= 'Z'){ num=c-65; }else{ num=c-71; } num=(num+51*key)%52; return list[num]; } int main(){ string str; int n; int key[52]; for(int i=0 ; i+65 <= 90 ; i++)list...
a.cc: In function 'char Decoding(char, int)': a.cc:18:10: error: reference to 'list' is ambiguous 18 | return list[num]; | ^~~~ 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:1: /usr/include/...
s908639895
p01620
C++
#include<bits/stdc++.h> using namespace std; char list[52]; char Decoding(char c,int key){ int num; if(c >= 'A' && c <= 'Z'){ num=c-65; }else{ num=c-71; } num=(num+51*key)%52; return list[num]; } int main(){ string str; int n; int key[100]; for(int i=0 ; i+65 <= 90 ; i++...
a.cc: In function 'char Decoding(char, int)': a.cc:18:10: error: reference to 'list' is ambiguous 18 | return list[num]; | ^~~~ 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:1: /usr/include/...
s636104978
p01620
C++
#include <vector> #include <iostream> #include <utility> #include <algorithm> #include <string> #include <deque> #include <queue> #include <tuple> #include <queue> #include <functional> #include <cmath> #include <iomanip> #include <map> #include <set> #include <numeric> #include <unordered_map> #include <unordered_set>...
a.cc: In function 'int main()': a.cc:47:24: error: 'strlen' was not declared in this scope 47 | int hoge_size=(int)strlen(hoge); | ^~~~~~ a.cc:23:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 22 | #include <stack> +++...
s979498628
p01620
C++
#include <iostream> #include <algorithm> #include <vector> #include <string> using namespace std; int main(){ int n; string s; while(cin >> n, n){ vector<int> key(n); for(int i = 0; i < n; i++){ int tmp; cin >> tmp; k[i] = tmp % 52; } cin >> s; for(int i = 0; i < s.size(); i++){ int tmp = ...
a.cc: In function 'int main()': a.cc:16:25: error: 'k' was not declared in this scope 16 | k[i] = tmp % 52; | ^
s737385691
p01620
C++
// King's Inspection #include <iostream> #include <cstring> #include <vector> #include <cstdio> using namespace std; int main() { int n; int now=0; int k[102]; string station; string ans; string alpha = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; while(1) { // Input...
a.cc: In function 'int main()': a.cc:28:9: error: 'ansNum' was not declared in this scope 28 | ansNum = 0; | ^~~~~~ a.cc:32:16: error: no matching function for call to 'getline(std::basic_istream<char>&)' 32 | getline(cin>>station); | ~~~~~~~^~~~~~~~~~~~~~ In file inclu...
s382443209
p01620
C++
#include <cstdio> #include <iostream> #include <vector> #include <algorithm> #include <cmath> #include <complex> #include <map> #include <set> using namespace std; int S,N,T; string wkd,time; int P,M; map<string,int> m; int wkdNum; int timeInfo; bool isChange(int sweek,int stime){ bool change=false; if(wkdNum==...
a.cc:14:12: error: 'std::string time' redeclared as different kind of entity 14 | string wkd,time; | ^~~~ 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-linux-gnu/c++/14/bit...
s847228664
p01620
C++
#include<iostream> using namespace std; int main(){ int *k,count; char *s; while(1){ int n,i; s=new char[100]; cin>>n; if(n==0)break; count=1 k= new int[n+1]; for(i=1;i<=n;i++)cin>>k[i]; cin>>s; for(i=0;s[i]!=0;i++){ s[i]-=k[count>n?count=0:count++]; if(s[i]<'A')s[i]='z'-('A'-s[i]); } ...
a.cc: In function 'int main()': a.cc:11:10: error: expected ';' before 'k' 11 | count=1 | ^ | ; 12 | k= new int[n+1]; | ~
s470792104
p01620
C++
#include<iostream> using namespace std; int main(){ int *ki; char *s; while(1){ int n; s=new char[100]; cin>>n; if(n==0)break; k= new int[n+1]; for(i=1;i<=n;i++)cin>>k[i]; cin>>s; for(i=0;s[i]!=0;i++){ s[i]-=k[i%n+1]; if(s[i]<'A')s[i]-='A'-'z'-1; else if(s[i]>'Z' && s[i]<'a')s[i]-=6; }...
a.cc: In function 'int main()': a.cc:11:3: error: 'k' was not declared in this scope 11 | k= new int[n+1]; | ^ a.cc:12:7: error: 'i' was not declared in this scope 12 | for(i=1;i<=n;i++)cin>>k[i]; | ^ a.cc:14:7: error: 'i' was not declared in this scope 14 | for(i=0;s[i]!=0;i++){ ...
s883087765
p01620
C++
#include <queue> #include <algorithm> #include <cmath> #include <set> #include <map> #include <string> using namespace std; int n; int key[1000]; string str; char x[60]; int main(){ while(1){ cin >> n; if(n == 0) break; for(int i= 0; i < n ; i++) cin >> key[i]; cin >> str; for(int...
a.cc: In function 'int main()': a.cc:19:5: error: 'cin' was not declared in this scope 19 | cin >> n; | ^~~ a.cc:7:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 6 | #include <string> +++ |+#include <iostream> 7 | using namespac...
s637588654
p01620
C++
#include <queue> #include <algorithm> #include <cmath> #include <set> #include <map> #include <string> using namespace std; int n; int key[1000]; string str; char x[60]; int main(){ while(1){ cin >> n; if(n == 0) break; for(int i= 0; i < n ; i++) cin >> key[i]; cin >> str; for(int...
a.cc: In function 'int main()': a.cc:19:5: error: 'cin' was not declared in this scope 19 | cin >> n; | ^~~ a.cc:7:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 6 | #include <string> +++ |+#include <iostream> 7 | using namespac...
s054274125
p01620
C++
#include <iostream> #include <stack> #include <queue> #include <algorithm> #include <cmath> #include <set> #include <map> #include <string> using namespace std; int n; int key[1000]; string str; char x[60]; int main(){ while(1){ cin >> n; if(n == 0) break; for(int i= 0; i < n ; i++) cin >>...
a.cc: In function 'int main()': a.cc:55:2: error: expected ';' before '}' token 55 | 5 } | ^ ~ | ;
s796955081
p01621
Java
import java.io.BufferedReader; import java.io.InputStreamReader; public class kadai14_1 { public static void main(String args[] ) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); while(true){ String line = br.readLine(); line =...
Main.java:5: error: class kadai14_1 is public, should be declared in a file named kadai14_1.java public class kadai14_1 { ^ 1 error
s212196543
p01621
Java
import static java.lang.System.*; import java.lang.reflect.Array; import java.util.*; public class B { void run(){ while(true){ int s=sc.nextInt(),n=sc.nextInt(), t = sc.nextInt(); String week = sc.next(), time = sc.next(); int p = sc.nextInt(), m = sc.nextInt(); if(s==0 && n==0 && t == 0)return; ...
Main.java:75: error: as of release 9, '_' is a keyword, and may not be used as an identifier public static void main(String[]_){ ^ 1 error
s953693814
p01621
Java
import static java.lang.System.*; import java.util.*; public class B { void run(){ while(true){ int s=sc.nextInt(),n=sc.nextInt(), t = sc.nextInt(); String week = sc.next(), time = sc.next(); int p = sc.nextInt(), m = sc.nextInt(); if(s==0 && n==0 && t == 0)return; int count = 0; int w = ...
Main.java:74: error: as of release 9, '_' is a keyword, and may not be used as an identifier public static void main(String[]_){ ^ 1 error
s320371862
p01621
Java
gimport java.util.HashMap; import java.util.Map; import java.util.Scanner; public class Main { Scanner sc = new Scanner(System.in); int s; int n; int t; String weekday; String time; Map<String, Integer> wmap = new HashMap<String, Integer>(); int p; int m; final int WEEK = 60 * 24 * 7; final int DAY = 60 *...
Main.java:1: error: class, interface, enum, or record expected gimport java.util.HashMap; ^ Main.java:2: error: class, interface, enum, or record expected import java.util.Map; ^ Main.java:3: error: class, interface, enum, or record expected import java.util.Scanner; ^ 3 errors
s769915951
p01621
C++
#include<cstdio> #include<algorithm> #include<iostream> #include<cstring> #include<cstdlib> #include<queue> #include<cmath> #define rep(i,a,b) for(int (i)=(a);(i)<(b);(i)++) #define min_(a,b) ((a)<(b)?(a):(b)) using namespace std; #define DAY 1440 #define WEEK 10080 #define HALF 720 int s, n, t, m; double p; char wee...
a.cc:18:26: error: 'char time [20]' redeclared as different kind of entity 18 | char weekday[20], time[20]; | ^ 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-...
s491545211
p01621
C++
#include<iostream> #include<vector> #include<string> using namespace std; int main(){ while (true){ int s, n, t, p, m; string wd, dt; int ret=0; cin >> s >> n >> t >> wd >> dt >> p >> m; if (s == 0 && wd == "None"){ break; } if (wd == "All" && dt == "All"){ ret = n*m; } else{ int time = 0...
a.cc: In function 'int main()': a.cc:81:34: error: 'pow' was not declared in this scope 81 | double ans = 1 - pow(a1, ret); | ^~~
s499012163
p01621
C++
#include <iostream> #include <cstring> using namespace std; int main(){ int s, n, t, p, m; char weekday[10]={0}, time_[10] = {0}; while(1){ cin >> s >> n >> t >> weekday >> time_ >> p >> m; if(s == 0 && n == 0 && t == 0 && !strcmp(weekday, "None") && !strcmp(time_, "None") && p == 0 && m == 0){ break; }...
a.cc: In function 'int main()': a.cc:24:44: error: expected ';' before '}' token 24 | b++ | ^ | ; 25 | } | ...
s707754812
p01621
C++
#ifndef _WIN32 #include<iostream> #endif #include<cmath> #include<iomanip> #include<algorithm> #include<vector> #include<string> using namespace std; typedef long long LL; #define FOR(i,bg,ed) for(int i = (bg);i<(ed);i++) #define REP(i,n) FOR(i,0,n) struct cww { cww() { ios::sync_with_stdio(false); cin.tie(0); ...
a.cc: In function 'void init()': a.cc:45:21: error: reference to 'tm' is ambiguous 45 | if (tm == "All" || tm == "Night") { | ^~ In file included from /usr/include/time.h:39, from /usr/include/pthread.h:23, from /usr/include/x86_64-linux-gnu...
s816500185
p01621
C++
#include <iostream> #include <algorithm> #include <string> #include <map> #include <cstdio> #include <cmath> using namespace std; string str_week[] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "All" }; map<string, int> W; int s, n, t, p, m; string week, sTime; // 時間を進める(分単位) void addTime ( int &hh, int &mm, ...
a.cc: In function 'int main()': a.cc:71:52: error: expected ';' before 'for' 71 | prob = pow((p - 1.0)/ (double)p, n) | ^ | ; 72 | for (int i = 0; i < 7; ++i) { |...
s693824497
p01621
C++
#include<iostream> #include<vector> #include<string> #include<stdio.h> using namespace std; string daylist[] = {"Sun","Mon","Tue","Wed","Thu","Fri","Sat"}; string timelist[] = {"Day","Night"}; int s,n,t,p,m; string weekday,time; double solve(int sweek,int stime){ double ans = 1; for(int i=0;i<m;i++){ bool flag = ...
a.cc:10:16: error: 'std::string time' redeclared as different kind of entity 10 | string weekday,time; | ^~~~ 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-linux-gnu/c+...
s072410651
p01621
C++
#include<iostream> #include<vector> #include<string> #include<stdio.h> using namespace std; string daylist[7] = {"Sun","Mon","Tue","Wed","Thu","Fri","Sat"}; string timelist[2] = {"Day","Night"}; int s,n,t,p,m; string weekday,time; double solve(int sweek,int stime){ double ans = 1; for(int i=0;i<m;i++){ bool flag ...
a.cc:10:16: error: 'std::string time' redeclared as different kind of entity 10 | string weekday,time; | ^~~~ 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-linux-gnu/c+...
s528445202
p01621
C++
#include<iostream> #include<stdio.h> #include<algorithm> #include<string> using namespace std; //s n t weekday time p m int main(){ int s,t,m; double n,p; string weekday,time; while(1){ cin >> s >> n >> t >> weekday >> time >> p >> m; if(s == 0){break;} int egg = 0; if(weekday == "All"){ if(time == "All...
a.cc: In function 'int main()': a.cc:52:37: error: 'pow' was not declared in this scope 52 | printf("%.10f\n", 1-pow((1-1/p),n*egg)); | ^~~
s067989448
p01621
C++
#include <vector> #include <list> #include <map> #include <set> #include <stack> #include <queue> #include <deque> #include <algorithm> #include <utility> #include <functional> #include <sstream> #include <iostream> #include <cstdio> #include <cmath> #include <cstdlib> #include <cctype> #include <string> #include <cstr...
a.cc: In function 'int main()': a.cc:122:17: error: 'ULL' was not declared in this scope; did you mean 'ALL'? 122 | ULL max_count = 0; | ^~~ | ALL a.cc:127:44: error: expected ';' before 'change_cnt' 127 | ULL change...
s263623732
p01621
C++
#include <iostream> #include <algorithm> #include <cstdio> using namespace std; const int M = 7 * 24 * 60; int s, n, t, p, m, lt, rt; string weekday, time, data[7] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}; double my_pow(double a, int b){ double res = 1.0; for(int i=0;i<b;i++) res *= a; return res; ...
a.cc:10:17: error: 'std::string time' redeclared as different kind of entity 10 | string weekday, time, data[7] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}; | ^~~~ In file included from /usr/include/pthread.h:23, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-defau...
s686898141
p01621
C++
#include <iostream> #include <algorithm> #include <vector> #include <queue> #include <cstring> #include <cmath> #include <string> #include <cstdio> #include <cstdlib> using namespace std; int s,n,t,p,m; int blockw; int blockt; int minute[10081]; string wd,tim; double check(int start){ int i, j; int suc=0; for(i=0...
a.cc: In function 'double check(int)': a.cc:22:33: error: expected ')' before ';' token 22 | for(i=0;i<m;i++,start+=t;){ | ~ ^ | ) a.cc:22:34: error: expected primary-expression before ')' token 22 | for(i=0;i<m;i++,start+=t...
s072179843
p01621
C++
#include <iostream> #include <cstdio> #include <string> #include <math.h> using namespace std; int main (int argc, char* argv[]){ while (true) { int s,n,t,p,m,cnt_max; string week_input,time_input; cin >> s >> n >> t >> week_input >> time_input >> p >> m; if ( s == 0 ) break; int week = 0; ...
a.cc: In function 'int main(int, char**)': a.cc:41:46: error: expected ';' before 'if' 41 | time = time % 60*24*7 | ^ | ; 42 | if ( week_input != "All" ) { | ...