submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s007591935
p01660
C++
#include <bits/stdc++.h> using namespace std; int main(){ int m,s,g,d; vector<int> a(7); cin>>m>>a[1]>>a[2]>>a[3]>>a[4]>>a[5]>>a[6]>>s>>g; vector<int> n(1+m); for(int i=1; i<=m; i++) cin>>n[i]; for(;;){ cin>>d; int f = s+d+n[s+d]; int b = s-d+n[s-d]; if(f > b && f > s){ cout<<1; s = f; }else if(b...
a.cc: In function 'int main()': a.cc:17:28: error: no match for 'operator>' (operand types are 'int' and 'std::vector<int>') 17 | }else if(b > n){ | ~ ^ ~ | | | | int std::vector<int> In file included from ...
s373400100
p01660
C++
#include<cstdio> #include<vector> #include<cstring> #include<queue> #include<cassert> #define rep(i,n) for(int i=0;i<(int)(n);i++) using namespace std; int m,a[6],s,g,n[330]; int d[330]; vector<int> G[330]; int main(){ scanf("%d",&m); rep(i,6)scanf("%d",a+i); scanf("%d%d",&s,&g); s--; g--; rep(i,m)scanf("%d",...
a.cc: In function 'int main()': a.cc:69:2: error: expected '}' at end of input 69 | } | ^ a.cc:48:14: note: to match this '{' 48 | while(true){ | ^ a.cc:69:2: error: expected '}' at end of input 69 | } | ^ a.cc:13:11: note: to match this '{' 13 | int main(){ | ...
s579857446
p01660
C++
#define _USE_MATH_DEFINES #define INF 0x3f3f3f3f #include <iostream> #include <cstdio> #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> #i...
a.cc:88:1: error: stray '\' in program 88 | \s{8}int dx1 = s.pos + dice[i]; | ^ a.cc:89:1: error: stray '\' in program 89 | \s{8}int dx2 = s.pos - dice[i]; | ^ a.cc:91:1: error: stray '\' in program 91 | \s{8}if(1 <= dx1 && dx1 <= total_cells){ | ^ a.cc:92:1: error: stray '\' in program 92...
s969371106
p01660
C++
#define _USE_MATH_DEFINES #define INF 0x3f3f3f3f #include <iostream> #include <cstdio> #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> #i...
a.cc:88:1: error: stray '\' in program 88 | \s\s\s\sint dx1 = s.pos + dice[i]; | ^ a.cc:88:3: error: stray '\' in program 88 | \s\s\s\sint dx1 = s.pos + dice[i]; | ^ a.cc:88:5: error: stray '\' in program 88 | \s\s\s\sint dx1 = s.pos + dice[i]; | ^ a.cc:88:7: error: stray '\' in program...
s108672490
p01661
C++
#include <cstdlib> #include <cmath> #include <climits> #include <cfloat> #include <map> #include <set> #include <iostream> #include <string> #include <vector> #include <algorithm> #include <sstream> #include <complex> #include <stack> #include <queue> #include <cstdio> #include <cstring> #include <iterator> #include <b...
a.cc: In function 'void mainmain()': a.cc:272:9: error: 'aa' was not declared in this scope 272 | aa | ^~ a.cc:275:17: error: 'ans' was not declared in this scope; did you mean 'abs'? 275 | ans=max(ans,dp[i]); | ^~~ | abs a.cc:277:15:...
s668271764
p01662
C++
n = 40 k = 5 print n a = [[] for i in range(n)] for i in range(n): for j in range(n): if i == j: a[i].append("N") continue if i < k: if j >= k: a[i].append("Y") else: a[i].append("Y") else: if j >= k: a[i].append("N") else: a[i].appen...
a.cc:1:1: error: 'n' does not name a type 1 | n = 40 | ^
s528251689
p01667
C
#include<iostream> #include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> #include<algorithm> #include<string> #include<iomanip> #pragma comment(linker, "/STACK:1024000000,1024000000") #include<vector> #include<set> #include<map> #include<queue> #include<list> using namespace std; typedef long long LL; t...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s895294252
p01667
C++
#include <map> #include <cmath> #include <queue> #include <cstdio> #include <string> #include <vector> #include <cstring> #include <iostream> #include <algorithm> using namespace std; const int maxn = 1e5+7; vector<int> V[maxn], W[maxn], ind[maxn]; int n, m, x, y, z, f[maxn], head[maxn], sonson[maxn], dep[maxn], Q[maxn...
a.cc: In function 'void split()': a.cc:52:9: error: reference to 'size' is ambiguous 52 | size[x] = 1; | ^~~~ In file included from /usr/include/c++/14/map:65, from a.cc:1: /usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned i...
s410939064
p01667
C++
#include <vector> #include <iostream> #include <set> #include <cstdio> #include <queue> #include <cstdio> #include <cstdlib> #include <cassert> #include <ctime> #include <algorithm> #include <tuple> #include <algorithm> #include <limits> #include <map> using namespace std; typedef long long ll; typedef pair<int, int>...
a.cc: In function 'int scc()': a.cc:51:5: error: 'memset' was not declared in this scope 51 | memset(used, 0, sizeof(used)); | ^~~~~~ a.cc:15:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 14 | #include <map> +++ |+#include <cstring> ...
s090047899
p01670
C++
#include<iostream> #include<bitset> #include<vector> #include<numeric> #include<algorithm> using namespace std; typedef bitset<300000> BS; BS ref; BS is[3000]; vector<int> idx; int a[32345],b[32345]; int rec(const BS &bs,int nth,int r){ if(r<0)return r; if(bs==ref)return r; while((is[idx[nth]]&~bs).none()){ ...
a.cc: In function 'int rec(const BS&, int, int)': a.cc:18:10: error: reference to 'ref' is ambiguous 18 | if(bs==ref)return r; | ^~~ In file included from /usr/include/c++/14/string:52, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits...
s732496013
p01671
C++
#include<stdio.h> #include<algorithm> #include<vector> #include<set> #include<map> #include<stack> using namespace std; vector<int> g[110000]; int UF[110000]; int FIND(int a){ if(UF[a]<0)return a; return UF[a]=FIND(UF[a]); } void UNION(int a,int b){ a=FIND(a);b=FIND(b);if(a==b)return;UF[a]+=UF[b];UF[b]=a; } pair<int...
a.cc: Assembler messages: a.cc:89: Error: no such instruction: `move esp_new,%rsp'
s643928681
p01671
C++
#include<stdio.h> #include<algorithm> #include<vector> #include<set> #include<map> #include<stack> using namespace std; vector<int> g[110000]; int UF[110000]; int FIND(int a){ if(UF[a]<0)return a; return UF[a]=FIND(UF[a]); } void UNION(int a,int b){ a=FIND(a);b=FIND(b);if(a==b)return;UF[a]+=UF[b];UF[b]=a; } pair<int...
a.cc: Assembler messages: a.cc:89: Error: no such instruction: `move esp_new,%rsp'
s888012163
p01671
C++
#include <bits/stdc++.h> #define N 100011 #define MAX_V 100010 #define MAX_LOG_V 20 #define INF (1e9) using namespace std; vector<int> G[MAX_V]; int root; int parent[MAX_LOG_V][MAX_V]; int depth[MAX_V]; void dfs(int v,int p,int d){ parent[0][v]=p; depth[v]=d; for(int i=0;i<G[v].size();i++) if(G[v][i] != p)dfs(G...
a.cc: In function 'PQ dfs()': a.cc:101:3: error: expected ';' before 'if' 101 | if(pos[dep])ans[M[P(pos[dep],pre[dep])]] = res.top().first; | ^~
s765151437
p01672
C++
#include <iostream> #include <cstdio> #include <cstdlib> #include <cmath> #include <cstring> #include <vector> #include <algorithm> #include <set> #include <queue> #include <map> #include <climits> #include <complex> #include <numeric> using namespace std; #define REP(i,n) for(int i=0; i<(int)(n); i++) #define RREP(i...
a.cc: In function 'int main()': a.cc:119:17: error: no match for 'operator-=' (operand types are 'll' {aka 'long long int'} and '__gnu_cxx::__alloc_traits<std::allocator<std::complex<double> >, std::complex<double> >::value_type' {aka 'std::complex<double>'}) 119 | num -= g[i][j];
s752796336
p01672
C++
#include <bits/stdc++.h> #define rep(i,n) for(int i=0;i<(int)(n);i++) #define rep1(i,n) for(int i=1;i<=(int)(n);i++) #define all(c) c.begin(),c.end() #define pb push_back #define fs first #define sc second #define show(x) cout << #x << " = " << x << endl #define chmin(x,y) x=min(x,y) #define chmax(x,y) x=max(x,y) using...
a.cc:49:8: error: ISO C++ forbids declaration of 'fix' with no type [-fpermissive] 49 | inline fix(P x){ | ^~~
s850292420
p01672
C++
#include "bits/stdc++.h" using namespace std; using ld = double; const ld eps = 1e-9; /* テゥツォツ佚ゥツ?淌」ツδ陛」ツδシテ」ツδェテ」ツつィテ・ツ、ツ嘉ヲツ渉?FFT テ」ツδゥテ」ツつ、テ」ツδ姪」ツδゥテ」ツδェ nテヲツャツ。テ・ツ、ツ堙ゥツ??・ツシツ夙(x) = \sum_{i=0}^n a_i x^i , h(x) = \sum_{i=0}^n b_i x^i テ」ツ?ォテ」ツ?、テ」ツ??」ツ?ヲテッツシツ? f(x) = (g*h)(x) = \sum_{k=0}^{2n} \sum_{i=0}^{k} a_i b_{k-...
a.cc: In function 'void fft(std::vector<std::complex<double> >&, int, bool)': a.cc:48:25: error: no match for 'operator/' (operand types are 'long double' and 'comp' {aka 'std::complex<double>'}) 48 | if (is_inv) zeta = 1.0l / zeta; | ~~~~ ^ ~~~~ | | | | ...
s030372908
p01672
C++
#include "bits/stdc++.h" using namespace std; using ld = long double; const ld eps = 1e-9; /* テゥツォツ佚ゥツ?淌」ツδ陛」ツδシテ」ツδェテ」ツつィテ・ツ、ツ嘉ヲツ渉?FFT テ」ツδゥテ」ツつ、テ」ツδ姪」ツδゥテ」ツδェ nテヲツャツ。テ・ツ、ツ堙ゥツ??・ツシツ夙(x) = \sum_{i=0}^n a_i x^i , h(x) = \sum_{i=0}^n b_i x^i テ」ツ?ォテ」ツ?、テ」ツ??」ツ?ヲテッツシツ? f(x) = (g*h)(x) = \sum_{k=0}^{2n} \sum_{i=0}^{k} a_i ...
a.cc: In function 'void fft(std::vector<std::complex<long double> >&, int, bool)': a.cc:48:24: error: no match for 'operator/' (operand types are 'double' and 'comp' {aka 'std::complex<long double>'}) 48 | if (is_inv) zeta = 1.0 / zeta; | ~~~ ^ ~~~~ | | | |...
s593149187
p01672
C++
#include "bits/stdc++.h" using namespace std; using ld = float; const ld eps = 1e-9; /* ?????????????????¨?????? FFT ??????????????? n?¬??????????g(x) = \sum_{i=0}^n a_i x^i , h(x) = \sum_{i=0}^n b_i x^i ??????????????? f(x) = (g*h)(x) = \sum_{k=0}^{2n} \sum_{i=0}^{k} a_i b_{k-i} x^k ???O(n log n)??§?±?????????? ????...
a.cc: In function 'void fft(std::vector<std::complex<float> >&, int, bool)': a.cc:48:24: error: no match for 'operator/' (operand types are 'double' and 'comp' {aka 'std::complex<float>'}) 48 | if (is_inv) zeta = 1.0 / zeta; | ~~~ ^ ~~~~ | | | | ...
s268088780
p01674
Java
import java.util.ArrayList; import java.util.Arrays; import java.util.Scanner; public class Rings { public static void main(String[] args) { Scanner sc = new Scanner(System.in); double[] c1 = new double[3];// center double[] v11 = new double[3]; double[] v12 = new double[3]; double[] c2 = new double[3]; d...
Main.java:5: error: class Rings is public, should be declared in a file named Rings.java public class Rings { ^ 1 error
s701332533
p01674
Java
import java.util.ArrayList; import java.util.Arrays; import java.util.Scanner; public class Rings { public static void main(String[] args) { Scanner sc = new Scanner(System.in); double[] c1 = new double[3];// center double[] v11 = new double[3]; double[] v12 = new double[3]; double[] c2 = new double[3]; d...
Main.java:5: error: class Rings is public, should be declared in a file named Rings.java public class Rings { ^ 1 error
s471476868
p01674
C++
#include<bits/stdc++.h> using namespace std; double eps = 1e-8, PI = acos(-1); double Sqrt(double x){ return (x<0?0:sqrt(x)); } bool eq(double a, double b){ return (-eps<a-b&&a-b<eps); } struct Point{ double x,y,z; Point (double a=0,double b=0,double c=0): x(a),y(b),z(c) {} Point operator + (const Point &...
a.cc: In function 'std::string solve()': a.cc:137:33: error: 'Circle' was not declared in this scope 137 | vector<Point> A=getCrossPoint(Circle(s.p,1),u); | ^~~~~~
s538151784
p01675
C++
#include <bits/stdc++.h> using namespace std; using int64 = long long; const int mod = 1e9 + 7; const int64 infll = (1LL << 62) - 1; const int inf = (1 << 30) - 1; struct IoSetup { IoSetup() { cin.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(10); cerr << fixed << setpre...
a.cc: In function 'int main()': a.cc:382:58: error: conversion from 'pi (*)(pi, int)' {aka 'std::pair<long long int, int> (*)(std::pair<long long int, int>, int)'} to 'std::pair<long long int, int> (*)(std::pair<long long int, int>, long long int)' in a converted constant expression 382 | using PRBT= PersistentRedB...
s449005113
p01675
C++
#include <bits/stdc++.h> using namespace std; using int64 = long long; const int mod = 1e9 + 7; const int64 infll = (1LL << 62) - 1; const int inf = (1 << 30) - 1; struct IoSetup { IoSetup() { cin.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(10); cerr << fixed << setpre...
a.cc: In function 'int main()': a.cc:390:60: error: conversion from 'int (*)(int64, int64)' {aka 'int (*)(long long int, long long int)'} to 'long long int (*)(long long int, long long int)' in a converted constant expression 390 | using PRBT= PersistentRedBlackTree< pi, int64, F, G, H >; | ...
s226625851
p01676
C++
#include <bits/stdc++.h> #define int long long #define N 1000 using namespace std; const int INF = 1LL<<55; const int mod = (1e9)+7; const double EPS = 1e-8; const double PI = 6.0 * asin(0.5); template<class T> T Max(T &a,T b){return a=max(a,b);} template<class T> T Min(T &a,T b){return a=min(a,b);} #define rank Asdfi...
a.cc:79:11: error: redefinition of 'const long long int INF' 79 | const int INF = 1LL<<55; | ^~~ a.cc:5:11: note: 'const long long int INF' previously defined here 5 | const int INF = 1LL<<55; | ^~~ a.cc:80:11: error: redefinition of 'const long long int mod' 80 | const int mod...
s972994751
p01677
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
s488084119
p01677
C++
#include <iostream> #include <vector> #include <string> #include <cstdlib> #define INF -2000000000 using namespace std; vector <int> s; int check(int x){ for(int i=1;i<s.size()-1;i++){ int ima = s[i],nx = s[i+1],mae = s[i-1]; if(ima == INF) ima = x; if(nx == INF) nx = x; if(mae == INF) mae = x; ...
a.cc: In function 'int main()': a.cc:45:29: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*' 45 | else s.push_back(atoi(str)); | ^~~ | | | std::string {aka std::__c...
s917067047
p01677
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 'std::string solve(std::string*, int)': a.cc:74:54: error: too many arguments to function 'int StrToInt(std::string)' 74 | if(i % 2 == 0 && max(StrToInt(a[i - 1], StrToInt(a[i + 1]))) >= a[i]) return "none"; | ~~~~~~~~^~~~~~...
s078766640
p01677
C++
#include<iostream> #include<string> #include<cstdlib> using namespace std; int stoi(string s){ return atoi(s.c_str()); } int main(){ for(int N;cin>>N,N;){ string s[1234]; for(int i=0;i<N;i++){ cin>>s[i]; } bool f=false; int lt=1e9+9,ht=-1e9+9; for(int i=0;i<N-1;i++){ if(s[i][0...
a.cc: In function 'int main()': a.cc:25:27: error: call of overloaded 'stoi(std::string&)' is ambiguous 25 | lt=min(lt,stoi(s[i+1])); | ~~~~^~~~~~~~ a.cc:7:5: note: candidate: 'int stoi(std::string)' 7 | int stoi(string s){ | ^~~~ In file included from /usr/inclu...
s911674525
p01677
C++
#include<bits/stdc++.h> using namespace std; typedef pair<int,int>pint; typedef vector<int>vint; #define pb push_back #define mp make_pair #define rep(i,n) for(int i=0;i<(n);i++) template<class T,class U>void chmin(T &t,U f){if(t>f)t=f;} template<class T,class U>void chmax(T &t,U f){if(t<f)t=f;} #define int long long ...
cc1plus: error: '::main' must return 'int'
s571470809
p01677
C++
#include <iostream> #include <string> #define INF 2000000000 #define N 1002 using namespace std; void Bynary_Search(int,int); int Judge(int); string str[N]; int n,data[N]; int main(){ while(1){ cin>>n; if(!n) break; data[0]=INF; if(n%2) data[n+1]=INF; else data[n+1]=-INF; for(int i=1;i<=n;i++...
a.cc: In function 'int main()': a.cc:15:5: error: reference to 'data' is ambiguous 15 | data[0]=INF; | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, ...
s506447203
p01677
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:51:29: error: call of overloaded 'stoi(std::string&)' is ambiguous 51 | else a[i] = stoi(s); | ~~~~^~~ a.cc:29:5: note: candidate: 'int stoi(std::string)' 29 | int stoi(string s){ | ^~~~ In file included from /usr/include/c++...
s285750208
p01677
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:51:29: error: call of overloaded 'stoi(std::string&)' is ambiguous 51 | else a[i] = stoi(s); | ~~~~^~~ a.cc:29:5: note: candidate: 'int stoi(std::string)' 29 | int stoi(string s){ | ^~~~ In file included from /usr/include/c++...
s692229344
p01677
C++
#include <cstdio> #include <cstring> #include <string> #include <cmath> #include <cassert> #include <iostream> #include <algorithm> #include <stack> #include <queue> #include <vector> #include <set> #include <map> #include <bitset> #include <functional> #include <numeric> using namespace std; #define repl(i,a,b) for(i...
a.cc: In function 'int solve(std::vector<int>&)': a.cc:51:41: error: expected '}' at end of input 51 | if(n%2==1) ub = min(ub, vec[n-2]-1); | ^ a.cc:50:20: note: to match this '{' 50 | if(vec[n-1]==INF){ | ^ a.cc:51:41: error: expected '...
s152204430
p01677
C++
#include <cstdio> #include <cstring> #include <string> #include <cmath> #include <cassert> #include <iostream> #include <algorithm> #include <stack> #include <queue> #include <vector> #include <set> #include <map> #include <bitset> #include <functional> #include <numeric> using namespace std; #define repl(i,a,b) for(i...
a.cc: In function 'int solve(std::vector<int>&)': a.cc:49:24: error: 'mix' was not declared in this scope 49 | if(vec[0]==INF) ub = mix(lb, vec[1]-1); | ^~~
s294811103
p01677
C++
#include "bits/stdc++.h" using namespace std; //#define int long long #define DBG 1 #define dump(o) if(DBG){cerr<<#o<<" "<<(o)<<endl;} #define dumpc(o) if(DBG){cerr<<#o; for(auto &e:(o))cerr<<" "<<e;cerr<<endl;} #define rep(i,a,b) for(int i=(a);i<(b);i++) #define rrep(i,a,b) for(int i=(b)-1;i>=(a);i--) #define all(c) ...
a.cc: In function 'int main()': a.cc:48:17: error: jump to label 'NONE' 48 | NONE: | ^~~~ a.cc:19:38: note: from here 19 | goto NONE; | ^~~~ a.cc:29:31: note: crosses initialization of 'int r' 2...
s318296148
p01677
C++
#include <iostream> #include <string> #include <queue> #include <stack> #include <algorithm> #include <list> #include <vector> #include <complex> #include <utility> #include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <climits> #include <bitset> #include <ctime> #include <map> #include <uno...
a.cc: In function 'void solve(int)': a.cc:99:56: error: expected primary-expression before '>' token 99 | if (i && a[i - 1] != MOD) ng |= (a[i] => a[i - 1]); | ^ a.cc:100:65: error: expected primary-expression before '>' token 100 | ...
s983700603
p01677
C++
#include<iostream> #include<vector> #include<string> #include<algorithm> #include<map> #include<set> #include<utility> #include<cmath> #include<cstring> #include<queue> #include<stack> #include<cstdio> #include<sstream> #include<iomanip> #include<assert.h> #define loop(i,a,b) for(int i=a;i<b;i++) #define rep(i,a) loo...
a.cc: In function 'int main()': a.cc:54:47: error: no matching function for call to 'to_string(std::string&)' 54 | else in[i+1]=to_string(s); | ~~~~~~~~~^~~ In file included from /usr/include/c++/14/string:54, from /usr/include/c++/1...
s554561125
p01677
C++
#include <cstdint> #include <iostream> #include <string> #include <vector> using namespace std; bool is_valid(vector<string> signals) { for (uint32_t i = 0; i < signals.size() - 1; i++) { if (signals[i] == "x" && signals[i + 1] == "x") { return false; } if (signals[i] != "x" && signals[i + 1] != "...
a.cc: In function 'int32_t main()': a.cc:52:26: error: no matching function for call to 'min(int64_t&, long long int)' 52 | x_min = min(x_min, stoll(signals[i - 1]) - 1); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, ...
s627620470
p01678
C++
#include<iostream> #include<string> using namespace std; #define mod 1000000007 string A, B, C; long long dp[60][3]; int main() { while (true) { cin >> A; if (A == "0")break; cin >> B >> C; for (int i = 0; i < 180; i++)dp[i / 3][i % 3] = 0; reverse(A.begin(), A.end()); int A1 = A.size(); reverse(B.begin(), B...
a.cc: In function 'int main()': a.cc:11:17: error: 'reverse' was not declared in this scope 11 | reverse(A.begin(), A.end()); int A1 = A.size(); | ^~~~~~~
s148280308
p01678
C++
#include<iostream> #include<string> using namespace std; #define mod 1000000007 string A, B, C; long long dp[60][3]; int main() { while (true) { cin >> A; if (A == "0")break; cin >> B >> C; for (int i = 0; i < 180; i++)dp[i / 3][i % 3] = 0; reverse(A.begin(), A.end()); int A1 = A.size(); reverse(B.begin(), B...
a.cc: In function 'int main()': a.cc:11:17: error: 'reverse' was not declared in this scope 11 | reverse(A.begin(), A.end()); int A1 = A.size(); | ^~~~~~~
s735329261
p01678
C++
#include <iostream> #include <string> using namespace std; typedef long long ll; const ll MOD = (ll)1e9 + 7; string A, B, C; ll solve1() { if (A[0] == '?' && B[0] == '?') { int cnt = 0; if (C[0] == '?') { for (size_t i = 1; i < 10; i++) { for (size_t j = 1; j < 10; j++)...
a.cc: In function 'int main()': a.cc:55:9: error: 'reverse' was not declared in this scope 55 | reverse(A.begin(), A.end()); | ^~~~~~~
s972307091
p01678
C++
#include <iostream> #include <cmath> #include <string> #include <cassert> using namespace std; #define all(c) begin(c), end(c) const int MOD = 1e9 + 7; string A, B, C; int a[55], b[55], c[55]; int main() { while (cin >> A >> B >> C && A != "0") { reverse(all(A)); reverse(all(B)); reverse(...
a.cc: In function 'int main()': a.cc:15:9: error: 'reverse' was not declared in this scope 15 | reverse(all(A)); | ^~~~~~~
s949826855
p01678
C++
#include <iostream> #include <string> using namespace std; typedef long long ll; const ll MOD = ll(1e9 + 7); string A, B, C; int N; ll dp[51][2][2]; int main(){ while(cin >> A, A != "0"){ cin >> B >> C; reverse(A.begin(), A.end()); reverse(B.begin(), B.end()); reverse(C.begin(), C...
a.cc: In function 'int main()': a.cc:15:9: error: 'reverse' was not declared in this scope 15 | reverse(A.begin(), A.end()); | ^~~~~~~ a.cc:20:9: error: 'memset' was not declared in this scope 20 | memset(dp, 0, sizeof dp); | ^~~~~~ a.cc:2:1: note: 'memset' is defined i...
s961590997
p01678
C++
#include <iostream> #include <string> #include <cctype> #include <cstring> using namespace std; typedef long long ll; const ll MOD = ll(1e9 + 7); string A, B, C; int N; ll dp[51][2][2]; int main(){ while(cin >> A, A != "0"){ cin >> B >> C; reverse(A.begin(), A.end()); reverse(B.begin(), B....
a.cc: In function 'int main()': a.cc:16:9: error: 'reverse' was not declared in this scope 16 | reverse(A.begin(), A.end()); | ^~~~~~~
s531615236
p01678
C++
#include <bits/stdc++.h> #define rep(i,n) for(int i=0;i<n;i++) using namespace std; const int INF=INT_MAX,MOD=1e9+7; dfs(int r,int q){ int A; int B; int C; int sono; int kazu=0; if(q==n){ if(r!=1) count++; } if(q==n-1){ kazu=1; for(int i1= kazu; i1<9; i1++){ for(int i2= kazu; i2<9; i2++){ for(int ...
a.cc:8:1: error: ISO C++ forbids declaration of 'dfs' with no type [-fpermissive] 8 | dfs(int r,int q){ | ^~~ a.cc: In function 'int dfs(int, int)': a.cc:14:15: error: 'n' was not declared in this scope 14 | if(q==n){ | ^ a.cc:16:22: error: no post-increment operator for type ...
s414528623
p01678
C++
#include <bits/stdc++.h> #define rep(i,n) for(int i=0;i<n;i++) using namespace std; const int INF=INT_MAX,MOD=1e9+7; void dfs(int r,int q){ int A; int B; int C; int sono; int kazu=0; if(q==n){ if(r!=1) count++; } if(q==n-1){ kazu=1; for(int i1= kazu; i1<9; i1++){ for(int i2= kazu; i2<9; i2++){ for...
a.cc: In function 'void dfs(int, int)': a.cc:14:15: error: 'n' was not declared in this scope 14 | if(q==n){ | ^ a.cc:16:22: error: no post-increment operator for type 16 | count++; | ^~ a.cc:19:15: error: 'n' was not declared in this scope ...
s172234062
p01679
C++
#include <map> #include <set> #include <queue> #include <stack> #include <cctype> #include <unordered_map> #include <unordered_set> using namespace std; #define REP2(i, m, n) for (int i = (int)(m); i < (int)(n); i++) #define REP(i, n) REP2(i, 0, n) #define ALL(S) (S).begin(), (S).end() typedef long long ll; int main...
a.cc: In function 'int main()': a.cc:17:3: error: 'ios' has not been declared 17 | ios::sync_with_stdio(false); | ^~~ a.cc:23:10: error: 'cin' was not declared in this scope 23 | while (cin >> n >> m >> l >> s >> t && n ){ | ^~~ a.cc:9:1: note: 'std::cin' is defined in header '<iostream...
s996280890
p01679
C++
#include<bits/stdc++.h> #define inf 1e9 using namespace std; typedef pair<int,int> ii; vector< vector<int> > g; vector< vector<int> > adj; vector<ii> v1; int re,n,m,l,s,dp[1<<19][20]; int f(int i1,int t,int xz){ if(dp[i1][xz]!=-1) return dp[i1][xz]; else if(xz==0) return 0; else{ num++; if(t-v1[xz].second<0){ ...
a.cc: In function 'int f(int, int, int)': a.cc:14:5: error: 'num' was not declared in this scope; did you mean 'enum'? 14 | num++; | ^~~ | enum
s149798523
p01679
C++
#include<iostream> #include<queue> using namespace std; struct edge{ int v,c; }; struct S{ int v,t,b; bool operator<(S s)const{ return t>s.t; } }; bool u[323][1<<16]; int main(){ for(int n,m,l,s,t;cin>>n>>m>>l>>s>>t,n|m|l|s|t;){ vector<edge> G[323]; for(int i=0;i<m;i++){ int a,b,c; ...
a.cc: In function 'int main()': a.cc:44:20: error: use of an operand of type 'bool' in 'operator++' is forbidden in C++17 44 | if(u[c.v][c.b]++)continue; | ~~~~~~~~~~^
s562320699
p01680
C++
#include<iostream> #include<map> #define rep(i,n) for(int i=0;i<n;i++) using namespace std; typedef long long ll; const ll mod = 1000000007; ll pow(ll a, ll n){ ll res = 1; while(n){ if(n&1)(res *= a) %= mod; (a *= a) %= mod; n>>=1; } return res; } int n,m,a,b; int main(){ cin.tie(0); std::ios...
a.cc: In function 'int main()': a.cc:24:20: error: 'g' was not declared in this scope 24 | ll ans = pow(2,g.size()); | ^
s695039859
p01680
C++
#include<iostream> #include<map> #define rep(i,n) for(int i=0;i<n;i++) using namespace std; typedef long long ll; const ll mod = 1000000007; int uf[100100], r[100100]; void init(int n){ rep(i,n)uf[i] = i, r[i] = 0; } int find(int a){ if(uf[a] == a)return a; return uf[a] = find(uf[a]); } void unite(int a,i...
a.cc: In function 'int main()': a.cc:58:4: error: expected '}' at end of input 58 | } | ^ a.cc:40:11: note: to match this '{' 40 | int main(){ | ^
s771748805
p01680
C++
#include<iostream> #include<map> #define rep(i,n) for(int i=0;i<n;i++) using namespace std; typedef long long ll; const ll mod = 1000000007; int uf[100100], r[100100]; void init(int n){ rep(i,n)uf[i] = i, r[i] = 0; } int find(int a){ if(uf[a] == a)return a; return uf[a] = find(uf[a]); } void unite(int a,i...
a.cc: In function 'int main()': a.cc:58:4: error: expected '}' at end of input 58 | } | ^ a.cc:40:11: note: to match this '{' 40 | int main(){ | ^
s767383199
p01680
C++
#include <bits/stdc++.h> #define GET_BIT(n, i) (((n) & (1 << ((i)-1))) >> ((i)-1)) // i start from 1 #define SET_BIT(n, i) ((n) | (1 << ((i)-1))) #define CLR_BIT(n, i) ((n) & ~(1 << ((i)-1))) #define SHOW_A(x) {cout << #x << " = " << x << endl;} #define SHOW_B(x, y) {cout << #x << " = " << x << ", " << #y << " = " << ...
a.cc:20:16: error: 'bool link [100005]' redeclared as different kind of entity 20 | bool link[MAX_N]; | ^ In file included from /usr/include/x86_64-linux-gnu/bits/sigstksz.h:24, from /usr/include/signal.h:328, from /usr/include/c++/14/csignal:42, ...
s056274880
p01680
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:84:21: error: 'mod_pow' was not declared in this scope 84 | cout << mod_pow(2,n) << endl; | ^~~~~~~
s852409371
p01680
C++
#include <bits/stdc++.h> using namespace std; #define MAX 100001 #define MOD 1000000007 typedef long long ll; int par[MAX],rank[MAX]; void init(int N){ for(int i = 0 ; i < N ; i++){ par[i] = i; rank[i] = 0; } } int find(int x){ if(par[x] == x){ return x; } return par[x] = find(par[x]); ...
a.cc: In function 'void init(int)': a.cc:14:9: error: reference to 'rank' is ambiguous 14 | rank[i] = 0; | ^~~~ In file included from /usr/include/c++/14/bits/stl_pair.h:60, from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60,...
s779045717
p01681
C++
#include<bits/stdc++.h> using namespace std; typedef complex<double> P; namespace std{ bool operator < ( const P &a, const P &b ){ return (a.real()==b.real()?a.imag()<b.imag():a.real()<b.real()); } }; struct S{ P p,q; S(P p=P(0,0),P q=P(0,0)):p(p),q(q){} }; double eps=1e-8; bool eq(double a,doub...
a.cc:193:8: error: redefinition of 'bool std::operator<(const P&, const P&)' 193 | bool operator < ( const P &a, const P &b ){ | ^~~~~~~~ a.cc:6:8: note: 'bool std::operator<(const P&, const P&)' previously defined here 6 | bool operator < ( const P &a, const P &b ){ | ^~~~~~~~ a.cc:...
s249442836
p01682
C++
#include<iostream> #include<vector> #include<cstdlib> #include<sstream> #define mod 1000000007 using namespace std; typedef long long ll; string f1(string a){ ll x=(ll)atoi(a.c_str()); x=(x*x)%mod; ostringstream os; os<<x; return os.str(); } string f2(string a,string b){ ll x=atoi(a.c_str()),y=atoi(b.c_s...
a.cc: In function 'int main()': a.cc:88:5: error: 'reverse' was not declared in this scope 88 | reverse(b.begin(),b.end()); | ^~~~~~~
s447183091
p01682
C++
#include "bits/stdc++.h" using namespace std; typedef long long ll; typedef pair<int,int> pii; #define rep(i,n) for(ll i=0;i<(ll)(n);i++) #define all(a) (a).begin(),(a).end() #define pb push_back #define INF (1e9+1) //#define INF (1LL<<59) #define int ll const ll MOD = 1e9+7; typedef string::const_iterator state; st...
a.cc: In function 'll number(state&)': a.cc:30:11: error: 'isnumber' was not declared in this scope; did you mean 'number'? 30 | while(isnumber(*end)){ | ^~~~~~~~ | number a.cc: In function 'll term(state&)': a.cc:50:14: error: 'isnumber' was not declared in this scope; did you me...
s058899160
p01682
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
s582943250
p01682
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
s326863944
p01683
C++
#include <bits/stdc++.h> #define rep(i,n) for(int i=0; i<(int)(n); ++i) using namespace std; typedef pair<int, int> p; int main(){ int n; while(cin >> n && n > 0){ if(n == 1){ cout << 0 << endl; continue; } if(n == 2) { int p1, t1, p2, t2; ...
a.cc: In function 'int main()': a.cc:29:31: error: 'p' cannot be used as a function 29 | pv.push_back(p(p, t - 2)); | ~^~~~~~~~~~ a.cc:63:44: error: 'llong_max' was not declared in this scope 63 | vector<long long> next(2 * n1, llong_max); | ...
s529549604
p01684
C++
#include <iostream> #include <iomanip> #include <cmath> using namespace std; typedef long double ld; const ld pi=3.1415926535897932384626, eps=1e-9; int main(){ cout << setprecision(9); while(true){ ld w,h,a,b,ab,a_c,b_c; cin >> w >> h >> a >> b >> ab; if(w<eps) break; a_c=a;b_c=b; if(a>b) swap(a,b); ld r...
a.cc:47:2: error: expected declaration before '}' token 47 | }} | ^
s291423367
p01684
C++
#include <cstdio> #include <cmath> #include <cstring> #include <cstdlib> #include <climits> #include <ctime> #include <queue> #include <stack> #include <algorithm> #include <list> #include <vector> #include <set> #include <map> #include <iostream> #include <deque> #include <complex> #include <string> #include <iomanip>...
a.cc: In function 'int main()': a.cc:58:15: error: lvalue required as left operand of assignment 58 | #define Y imag() | ^ a.cc:255:27: note: in expansion of macro 'Y' 255 | ca.X = ca.Y = ca.r; | ^ a.cc:57:15: error: lvalue required as left operan...
s666228505
p01684
C++
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 #include <bits/stdc++.h> #define _overload(_1,_2,_3,name,...) name #def...
a.cc:2:1: error: expected unqualified-id before numeric constant 2 | 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:87: /usr/...
s715901679
p01687
C
long a,v;main(){for(;v=a=v>>8|getchar()+1L<<56;v&72&&printf(a==0x5a564f4f4a454242?v=0,"AIZUNYAN":"%c",v-1))qsort(&a,8,1,strcmp);}
main.c:1:10: error: return type defaults to 'int' [-Wimplicit-int] 1 | long a,v;main(){for(;v=a=v>>8|getchar()+1L<<56;v&72&&printf(a==0x5a564f4f4a454242?v=0,"AIZUNYAN":"%c",v-1))qsort(&a,8,1,strcmp);} | ^~~~ main.c: In function 'main': main.c:1:31: error: implicit declaration of function 'getchar' [-...
s988479631
p01687
C++
#include<iostream> #include<algorithm> #include<string> #define loop(i,a,b) for(int i=a;i<b;i++) #define rep(i,a) loop(i,0,a) using namespace std; int main(){ int a,ii,d,u,n,y; char ind[1010]; getline(cin,ind); // rep(i,ind.size())cout<<i<<" "<<ind[i]; if(7<ind.size()){ rep(i,ind.size()-7){ a=ii=d=u=n=y=0;...
a.cc: In function 'int main()': a.cc:13:16: error: no matching function for call to 'getline(std::istream&, char [1010])' 13 | getline(cin,ind); | ~~~~~~~^~~~~~~~~ In file included from /usr/include/c++/14/string:55, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s643916592
p01687
C++
#include<iostream> #include<algorithm> #include<string> #define loop(i,a,b) for(int i=a;i<b;i++) #define rep(i,a) loop(i,0,a) using namespace std; int main(){ int a,ii,d,u,n,y; char ind[1010]; getline(cin,ind); // rep(i,ind.size())cout<<i<<" "<<ind[i]; if(7<ind.size()){ rep(i,ind.size()-7){ a=ii=d=u=n=y=0;...
a.cc: In function 'int main()': a.cc:13:16: error: no matching function for call to 'getline(std::istream&, char [1010])' 13 | getline(cin,ind); | ~~~~~~~^~~~~~~~~ In file included from /usr/include/c++/14/string:55, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s484872988
p01687
C++
#include<iostream> #include<algorithm> #include<string> #define loop(i,a,b) for(int i=a;i<b;i++) #define rep(i,a) loop(i,0,a) using namespace std; int main(){ int a,ii,d,u,n,y; char ind[1010]; getline(cin,ind); // rep(i,ind.size())cout<<i<<" "<<ind[i]; if(7<ind.size()){ rep(i,ind.size()-7){ a=ii=d=u=n=y=0;...
a.cc: In function 'int main()': a.cc:13:16: error: no matching function for call to 'getline(std::istream&, char [1010])' 13 | getline(cin,ind); | ~~~~~~~^~~~~~~~~ In file included from /usr/include/c++/14/string:55, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s396326850
p01687
C++
#include<bits/stdc++.h> #define REP(i,s,n) for(int i=s;i<n;i++) #define rep(i,n) REP(i,0,n) using namespace std; const int LEN = 8; const string correctWord = "AIZUNYAN"; int main(){ set<string> S; string wrongWord = "AIDUNYAN"; sort(wrongWord.begin(),wrongWord.end()); do { S.insert(wrongWord); } whil...
a.cc: In function 'int main()': a.cc:22:10: error: cannot resolve overloaded function 'find' based on conversion to type 'bool' 22 | if( !find && i + LEN - 1 < text.size() ) { | ^~~~ a.cc:22:10: error: in argument to unary !
s612577722
p01687
C++
#include <iostream> #include <string> #include <algorithm> constexpr const char* azunyan = "AIDUNYAN"; std::string substr(const std::string& str, int x, int y){ if(x < 0) x = 0; if(x > y) return ""; if(y >= str.size()) y = str.size() - 1; return str.substr(x, y - x + 1); } bool check(const std::string& str){ i...
a.cc: In function 'bool check(const std::string&)': a.cc:24:16: error: 'cnt' was not declared in this scope; did you mean 'int'? 24 | return cnt == 2 && cnt_n == 2; | ^~~ | int
s876638860
p01687
C++
Last login: Tue Dec 6 23:57:37 on ttys003 wakabayashirika-no-MacBook-Pro:~ wakabayashirika$ pwd /Users/wakabayashirika wakabayashirika-no-MacBook-Pro:~ wakabayashirika$ ls Applications Downloads Music class Desktop Library Pictures play Documents Movies Public rippro wakabayashirika-no-MacBook-Pro:~ wakabayashiri...
a.cc:8:60: error: stray '@' in program 8 | wakabayashirika-no-MacBook-Pro:~ wakabayashirika$ cd Deskto@ | ^ a.cc:9:18: error: stray '@' in program 9 | -bash: cd: Deskto@: No such file or directory | ^ a.cc:12:51: error: exte...
s581329361
p01687
C++
#include <iostream> #include <string> #include <map> using namespace std; int main() { string d; cin >> d; string A = "AIZUNYAN"; string dA = "AIDUNYAN"; int alen = (int)A.size(); map<char, int> azu; for (int i=0; i<alen; i++) { map[dA[i]]++; } int len = (int)d.size(); for (int i = 0; i<len-alen; i++) ...
a.cc: In function 'int main()': a.cc:17:23: error: expected ']' before '[' token 17 | map[dA[i]]++; | ^ | ] a.cc:17:27: error: expected initializer before '++' token 17 | map[dA[i]]++; | ^~ a.cc...
s209330101
p01688
C++
#include <iostream> #include <string> #include <vector> using namespace std; void process(vector<int> &dp) { int N; cin >> N; while(N--) { string s; int v; cin >> s >> v; if(s == "D" || s == "DD") { const int cost = s.size(); for(int i = (int)dp.size...
a.cc: In function 'bool solve()': a.cc:33:14: error: 'max_element' was not declared in this scope 33 | cout << *max_element(begin(dp), end(dp)) << endl; | ^~~~~~~~~~~
s730601252
p01688
C++
#include <iostream> #include <algorithm> #include <string> #include <vector> using namespace std; int rep = 0; bool list[2^20][20]; void rec(int n){ for (int i = 0; i < 20; ++i){ list[n][i] = true; rec(n + 1); } } int main() { int D; cin >> D; int x; cin >> x; vector<int> permutation; for (int i...
a.cc:8:12: warning: result of '2^20' is 22; did you mean '1 << 20' (1048576)? [-Wxor-used-as-pow] 8 | bool list[2^20][20]; | ^ | -- | 1<< a.cc:8:11: note: you can silence this warning by using a hexadecimal constant (0x2 rather than 2) 8 | bool list[2^20][20]; ...
s757227788
p01688
C++
#include <string> #include <iostream> #include <algorithm> using namespace std; int d, n, m, x, y, z, p[50], q[50]; string s: int main() { cin >> d >> n; for(int i = 0; i < n; i++) { cin >> s >> z; if(s == "D") p[x++] = z; } sort(p, p + x); cin >> m; for(int i = 0; i < m; i++) { cin >> s >> z; if(s == "DD...
a.cc:5:45: error: expected initializer before ':' token 5 | int d, n, m, x, y, z, p[50], q[50]; string s: | ^
s176250939
p01688
C++
#include <iostream> #include <vector> #include <string> #include <algorithm> using namespace std; int ans = 0; vector<string> a(25); vector<int> p(25); int D, x, y; void dfs(int now, int d, int point) { if (now >= x+y || d >= D) { ans = max(ans, point); return; } bool usable = false; if (now < x) { if (a[...
a.cc: In function 'void dfs(int, int, int)': a.cc:21:27: error: no match for 'operator==' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'std::__cxx11::basic_string<char>'} and 'char') 21 | if (a[no...
s863565148
p01688
C++
#include <iostream> #include <vector> #include <string> #include <algorithm> using namespace std; int ans = 0; vector<string> a; vector<int> p; int D, x, y; void dfs(int now, int d, int point) { if (now >= x+y || d >= D) { ans = max(ans, point); return; } bool usable1 = false; bool usable2 = false; if (now...
a.cc:33:11: error: expected unqualified-id before 'else' 33 | } else { | ^~~~ a.cc:36:1: error: expected declaration before '}' token 36 | } | ^
s094393226
p01688
C++
#include <iostream> #include <cstdio> #include <string> #include <vector> #include <algorithm> using namespace std; #define loop(n) for(int lp=0; lp<(n); lp++) #define ascent(i, a, b) for(int (i)=(a); (i)<(b); (i)++) #define descent(i, a, b) for(int (i)=(a); (i)<(b); (i)--) int main() { int D, x, y; vector<int>...
a.cc: In function 'int main()': a.cc:86:19: error: expected primary-expression before '>' token 86 | else if(ptmp => pp[j]) { | ^
s976057559
p01689
C++
#include <iostream> #include <algorithm> #include <vector> #include <queue> #include <string> #include <map> #define rep(i, n) for(int i = 0; i < n; i++) #define ALL(T) (T).begin(), (T).end() using namespace std; typedef vector<int> vi; typedef pair<int,int> pii; int h,w,d,n; const int inf=1; char b[55][55]; int ...
a.cc: In function 'int main()': a.cc:74:25: error: 'A' was not declared in this scope 74 | if(s!=d)A | ^
s735099531
p01690
C++
#include <iostream> #include <vector> #include <algorithm> #include <utility> using namespace std; #define vital first #define cal second #define happy first #define N 100001 int main(){ int S, T, U, N, O, D; cin >> S >> T >> U >> N >> O >> D; vector<pair<int, int> > train(T); vector<pair<int, int> > donut(N); v...
a.cc: In function 'int main()': a.cc:11:11: error: expected unqualified-id before numeric constant 11 | #define N 100001 | ^~~~~~ a.cc:14:22: note: in expansion of macro 'N' 14 | int S, T, U, N, O, D; cin >> S >> T >> U >> N >> O >> D; | ^ a.cc:14:50: error: no m...
s370310998
p01691
C++
#include <bits/stdc++.h> #define REP(i,n) for(int i=0; i<(int)(n); ++i) using namespace std; #include "../geometry.h" int main(){ const double W = 50; const double H = 94; int N, D; cin >> N >> D; vector<C> c(N); REP(i, N){ double x, y, r; cin >> x >> y >> r; c[i] = {{x...
a.cc:6:10: fatal error: ../geometry.h: No such file or directory 6 | #include "../geometry.h" | ^~~~~~~~~~~~~~~ compilation terminated.
s104409467
p01693
Java
#include <iostream> #include <queue> #include <vector> #include <cstdio> #include <algorithm> using namespace std; #define all(c) (c).begin(), (c).end() #define loop(i,a,b) for(int i=(a);i<int(b);i++) #define rep(i,b) loop(i,0,b) typedef int Capacity; typedef int Cost; struct MCF { struct Edge { int dst; ...
Main.java:1: error: illegal character: '#' #include <iostream> ^ Main.java:2: error: illegal character: '#' #include <queue> ^ Main.java:3: error: illegal character: '#' #include <vector> ^ Main.java:4: error: illegal character: '#' #include <cstdio> ^ Main.java:5: error: illegal character: '#' #include <algorithm> ^ M...
s135649203
p01694
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.BigDecimal; import java.math.BigInteger; public cl...
Main.java:25: error: incompatible types: int cannot be converted to String String s=ir.nextInt(); ^ 1 error
s318458821
p01694
Java
public class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); while (true) { int n = sc.nextInt(); if (n == 0) { break; } char[] upOrDown = new char[n]; for (int i = 0; i < n; i++) { upOrDown[i] = sc.next().charAt(1); } int count = 0; for (int i...
Main.java:3: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:3: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s600316108
p01694
Java
class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); while(true){ int n = sc.nextInt(); int count = 0; if(n == 0){ break; } Str...
Main.java:4: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:4: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s154556871
p01694
Java
import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class Main1 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int ans = 0; while (true) { int n = sc.nextInt(); if (n == 0) { break; } List<String> step = new ArrayList<>(); fo...
Main.java:5: error: class Main1 is public, should be declared in a file named Main1.java public class Main1 { ^ 1 error
s933082137
p01694
Java
import sun.jvm.hotspot.utilities.StreamMonitor; import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.Scanner; import java.util.stream.Stream; public class Main { public enum pattern { lu, //左足を踏み台に上げる ru, //右足を踏み台に上げる ld, //左足を踏み台に下げる rd, //右足を踏み台に下げる ...
Main.java:1: error: package sun.jvm.hotspot.utilities is not visible import sun.jvm.hotspot.utilities.StreamMonitor; ^ (package sun.jvm.hotspot.utilities is declared in module jdk.hotspot.agent, which is not in the module graph) 1 error
s638788983
p01694
Java
public class Main { public enum pattern { lu, //左足を踏み台に上げる ru, //右足を踏み台に上げる ld, //左足を踏み台に下げる rd, //右足を踏み台に下げる ; } static Scanner scan = new Scanner(System.in); public static void main(String[] args) throws Exception { BufferedReader br = new BufferedRead...
Main.java:10: error: cannot find symbol static Scanner scan = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:10: error: cannot find symbol static Scanner scan = new Scanner(System.in); ^ symbol: class Scanner location: class Ma...
s070324920
p01694
C
#include <stdio.h> int main() { int n; int i; int cnt; char s[100][3]; int a[100]; while(scanf("%d",&n),n){ for(i = 0;i < n;i++){ scanf("%s",s[i]); } cnt = 0; for(i = 0;i < n;i++){ switch(s[i][0]){ case 'l': if(s[i][1] == 'u'){ a[i] = 0; }else if(s[i][1] == 'd'){ a[i]...
main.c: In function 'main': main.c:42:1: error: expected declaration or statement at end of input 42 | } | ^
s326389264
p01694
C
#include <stdio.h> int main() { int n; int i; int cnt; char s[100][3]; int a[100]; while(scanf("%d",&n),n){ for(i = 0;i < n;i++){ scanf("%s",s[i]); } cnt = 0; for(i = 0;i < n;i++){ switch(s[i][0]){ case 'l': if(s[i][1] == 'u'){ a[i] = 0; }else if(s[i][1] == 'd'){ a[i]...
main.c: In function 'main': main.c:42:1: error: expected declaration or statement at end of input 42 | } | ^
s867681151
p01694
C
#include <stdio.h> int main() { int n; int i; int cnt; char s[100][3]; int a[100]; while(scanf("%d",&n),n){ for(i = 0;i < n;i++){ scanf("%s",s[i]); } cnt = 0; for(i = 0;i < n;i++){ switch(s[i][0]){ case 'l': if(s[i][1] == 'u'){ a[i] = 0; }else if(s[i][1] == 'd'){ a[i]...
main.c: In function 'main': main.c:41:1: error: expected declaration or statement at end of input 41 | } | ^
s040375998
p01694
C++
#include <algorithm> #include <bitset> #include <complex> #include <deque> #include <exception> #include <fstream> #include <functional> #include <iomanip> #include <ios> #include <iosfwd> #include <iostream> #include <istream> #include <iterator> #include <limits> #include <list> #include <locale> #include <map> #incl...
/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
s272060317
p01694
C++
char s[9];a,b[9],c;main(n){for(;scanf("%d",&n),n;printf("%d\n",c),a=b[0]=b[1]=c=0)for(;n--;){scanf("%s",s);b[s[0]/109]=s[1]&1;if(b[0]==b[1]&&a-b[0])c++,a=b[0];}}
a.cc:1:11: error: 'a' does not name a type 1 | char s[9];a,b[9],c;main(n){for(;scanf("%d",&n),n;printf("%d\n",c),a=b[0]=b[1]=c=0)for(;n--;){scanf("%s",s);b[s[0]/109]=s[1]&1;if(b[0]==b[1]&&a-b[0])c++,a=b[0];}} | ^ a.cc:1:24: error: expected constructor, destructor, or type conversion before '(' token...
s078987942
p01694
C++
cin>>bef;num--;
a.cc:2:3: error: 'cin' does not name a type 2 | cin>>bef;num--; | ^~~ a.cc:2:12: error: 'num' does not name a type; did you mean 'enum'? 2 | cin>>bef;num--; | ^~~ | enum
s039538426
p01694
C++
#include <iostream> #include <string> #include <vector> using namespace std; vector<string> action; int N; int ans; int main(void){ while(ture){ cin >> N; if(N == 0) break; ans = 0; action.clear(); for(int i = 0; i < N; i++){ string tmp; cin >> tmp; action.push_back(tmp); }...
a.cc: In function 'int main()': a.cc:11:9: error: 'ture' was not declared in this scope 11 | while(ture){ | ^~~~
s195322822
p01694
C++
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.BigDecimal; import java.math.BigInteger; public cl...
a.cc:1:1: error: 'import' does not name a type 1 | import java.io.InputStream; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.io.IOException; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodu...
s066261218
p01694
C++
#include<iostream> using namespace std; int main(){ int n,count; char ch[201]; while(cin>>n){ if(n==0)break; n=2*n; count=0; for(int i=0;i<n;i++) cin>>ch[i]; for(int i=0;i+3<n;i+=4) if((ch[i]!=ch[i+2])count++; cout<<count<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:16:26: error: expected ';' before 'count' 16 | if((ch[i]!=ch[i+2])count++; | ^~~~~ | ; a.cc:17:22: error: expected ')' before ';' token 17 | cout<<count<<endl; | ^ | ...
s843829826
p01694
C++
#include <iostream> #include <string> using namespace std; int main(){ int i,n,a; string asi; while(1){ cin>>n; if(n==0) break; else { for(i=0;i<n;i++){ cin>>asi[i]; } a=0; asi[100]="ii"; for(i=0;i<n;i++){ if(asi[i]=="lu"){ if(asi[i+1]=="ru"){ a++; ...
a.cc: In function 'int main()': a.cc:15:16: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive] 15 | asi[100]="ii"; | ^~~~ | | | const char* a.cc:18:20: err...
s543428128
p01694
C++
#include<iostream> #include<queue> #include<string> #include<stack> #include<cstdio> #include<algorithm> using namespace std; int main(void) {int i=0,j,k; int counter[MAX]; char str[MAX][MAX]; while{ scanf("%d",&num[i]); scanf("%s",str[i][]); if(num[i] == 0) break; i++; } for(j=0;j<i;j...
a.cc: In function 'int main()': a.cc:12:15: error: 'MAX' was not declared in this scope 12 | int counter[MAX]; | ^~~ a.cc:15:8: error: expected '(' before '{' token 15 | while{ | ^ | ( a.cc:15:8: error: expected primary-expression before '{' token a.cc:15:8: error...
s468250412
p01694
C++
include<iostream> #include<queue> #include<string> #include<stack> #include<cstdio> #include<algorithm> using namespace std; int main(void) { char a[2][3]; int n; int i; int j=0; while(1) { cin>>n; j=0; a[0][0]=a[1][0]=0; if(n==0) return 0; for(i=0;i<n;i++) ...
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/deque:62, from /usr/include/c++/14/queue:62, from a.cc:2: /usr/include/c++/14/ext/type_t...