submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s459780041
p01126
C++
#include<iostream> #include<algorithm> using namespace std; int n, m, a; int h[1000], p[1000], q[1000]; int now_a; pair<int, pair<int, int>> data[100]; int main(){ while (1) { //Input cin >> n >> m >> a; now_a = a; if (n+m+a==0) break; for (int i = 0; i < m; i++) { cin >> h[i] >> p[i] >> q[i]; dat...
a.cc: In function 'int main()': a.cc:21:25: error: reference to 'data' is ambiguous 21 | data[i] = make_pair(-h[i], make_pair(p[i], q[i])); | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bits/locale_classes.h...
s148593024
p01126
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...
s466606059
p01127
C
#include <iostream> #include <map> #include <set> #include <algorithm> #include <vector> using namespace std; const int N = 50; class State{ public: int mx, my, Mx, My; State() {} State(int mx, int my, int Mx, int My) : mx(mx), my(my), Mx(Mx), My(My) {} }; int h, w, col, mx, my, Mx, My, A[7], dy[] = {-1, 0, 1...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s082648800
p01127
C++
#include<iostream> #include<vector> #include<algorithm> #include<map> using namespace std; int main(int argc, char *argv[]){ int n, w, h; pair<int, int> p[7][4]; cin >> n; for (int r = 0; r < n; r++) { map<char, int> matrial; cin >> h >> w; char grid[h][w]; for (int i = 0; i < h; i++) { ...
a.cc: In function 'int main(int, char**)': a.cc:86:10: error: expected 'while' before numeric constant 86 | return 0; | ^ a.cc:86:10: error: expected '(' before numeric constant 86 | return 0; | ^ | ( a.cc:86:11: error: expected ')' before ';' token 86 | retur...
s332553040
p01127
C++
#include <iostream> #include <vector> #include <string> using namespace std; vector<string> v; bool ngchars[256]; bool check(int y, int x, int Y, int X, char C) { bool out; bool in; Y++; X++; for(int i = y; i < Y; i++) { for(int j = x; j < X; j++) { if(ngchars[v[i][j]]) { return false; } } } retur...
a.cc: In function 'int main()': a.cc:61:17: error: 'sort' was not declared in this scope; did you mean 'short'? 61 | sort(cs.begin(), cs.end()); | ^~~~ | short a.cc:62:26: error: 'unique' was not declared in this scope 62 | cs.erase(uniqu...
s919492876
p01127
C++
#include <iostream> #include <set> #include <map> #define REP(i, a, n) for(int i = ((int) a); i < ((int) n); i++) using namespace std; struct rect { int ly, ry, lx, rx; }; int T, H, W; char S[55][55]; int main(void) { cin >> T; while(T--) { cin >> H >> W; REP(i, 0, H) cin >> S[i]; set<char> st; ...
a.cc: In function 'int main()': a.cc:49:13: error: 'next_permutation' was not declared in this scope 49 | } while(next_permutation(a, a + st.size())); | ^~~~~~~~~~~~~~~~
s612339508
p01127
C++
#include <stdio.h> #include <cmath> #include <algorithm> #include <cfloat> #include <stack> #include <queue> #include <vector> #include <string> #include <iostream> typedef long long int ll; typedef unsigned long long int ull; #define BIG_NUM 2000000000 #define MOD 1000000007 #define EPS 0.000000001 using namespace std...
a.cc: In function 'void func()': a.cc:98:38: error: expected unqualified-id before '=' token 98 | rank = Q.front().work[i]; | ^ a.cc:116:65: error: expected unqualified-id before '>' token 116 | ...
s865803474
p01127
C++
#include<stdio.h> struct make { char str; int posi,start[2]; int high,wide,JUDGE;//JUDGE==1で長方形,==0で長方形以外,==2で未定 struct make *front; }; int main() { int N,H,W,count,COUNT,judge,no_rect,NO_RECT; char img[1000][51],RECT[8]; struct make M[8]; int s1,s2,num; scanf("%d",&N);//データの個数 for(int a=0;a<N;a++) { ...
a.cc: In function 'int main()': a.cc:142:2: error: expected '}' at end of input 142 | } | ^ a.cc:13:1: note: to match this '{' 13 | { | ^
s306293790
p01127
C++
#include <iostream> #include <cstdio> #include <vector> using namespace std; struct node { vector<char> v; int mx, my, Mx, My; node(vector<char v>, int mx, int my, int Mx, int My): v(v), mx(mx), my(mx), Mx(Mx), My(My) {} }; map<char, node> G; int field[50 + 2][50 + 2]; int main() { int numberOfInput; ...
a.cc:10:21: error: template argument 1 is invalid 10 | node(vector<char v>, int mx, int my, int Mx, int My): | ^ a.cc:10:21: error: template argument 2 is invalid a.cc:14:1: error: 'map' does not name a type 14 | map<char, node> G; | ^~~ a.cc: In function 'int main()': a.cc:32:11...
s838990131
p01127
C++
#include <iostream> #include <memory> #include <memory.h> #include <cmath> #include <fstream> #include <cmath> #include <numeric> #include <vector> #include <stack> #include <string> #include <queue> #include <sstream> #include <cstdlib> #include <cstdio> #include <map> #include <iomanip> #include <list> #include <ccty...
/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
s284548248
p01127
C++
#include <iostream> #include <memory> #include <memory.h> #include <cmath> #include <fstream> #include <cmath> #include <numeric> #include <vector> #include <stack> #include <string> #include <queue> #include <sstream> #include <cstdlib> #include <cstdio> #include <map> #include <iomanip> #include <list> #include <ccty...
/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
s402003244
p01127
C++
#include <iostream> #include <memory> #include <memory.h> #include <cmath> #include <fstream> #include <cmath> #include <numeric> #include <vector> #include <stack> #include <string> #include <queue> #include <sstream> #include <cstdlib> #include <cstdio> #include <map> #include <iomanip> #include <list> #include <ccty...
/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
s405195694
p01127
C++
#include <iostream> #include <memory> #include <memory.h> #include <cmath> #include <fstream> #include <cmath> #include <numeric> #include <vector> #include <stack> #include <string> #include <queue> #include <sstream> #include <cstdlib> #include <cstdio> #include <map> #include <iomanip> #include <list> #include <ccty...
/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
s475601580
p01127
C++
if(A[z]==-1){ int a=49,b=0,c=0,d=49; for(int i=0;i<H;i++){ for(int j=0;j<W;j++){ if(t[i][j]==ch){ a=min(a,i); b=max(b,j); c=max(c,i); d=min(d,j); } } } A[z]=a; B[z]=b; C[z]=c; D[z]=d; }
a.cc:1:1: error: expected unqualified-id before 'if' 1 | if(A[z]==-1){ | ^~
s662887398
p01127
C++
#include <cstdio> #include <iostream> #include <vector> #include <stack> #include <queue> #include <string> #include <map> #define rep(i,n) for(int i=0; i<n; ++i) using namespace std; int N, n; int H,W; char m[50][50]; bool used[26]; int U[26],D[26],L[26],R[26]; bool check(char ch){ int z = ch-'A'; for(int i=U...
a.cc: In function 'int main()': a.cc:76:43: error: invalid operands of types 'const char [5]' and '<unresolved overloaded function type>' to binary 'operator<<' 76 | cout <<flag ? "SUSPICIOUS" : "SAFE" << endl; | ~~~~~~~^~~~~~~
s627575644
p01128
Java
import java.util.*; import java.awt.geom.Line2D; public class Main{ int n; int xa,ya,xb,yb; int xs,ys,xt,yt,o,l; Line2D a,b; Intersection[] inter; class Intersection{ double dist; int owner,height; public Intersection(double dist,int owner,int height){ this.dist = dist; this.owner...
Main.java:53: error: ';' expected int ans = Math.min(countGate(0),countGate(1)) ^ 1 error
s343387558
p01128
C++
#include <cassert> #include <algorithm> #include <iostream> #include <complex> #include <tuple> #include <vector> using namespace std; const double EPS = 1e-10; template<class T> bool eq(const T& a, const T& b) {return abs(a - b) < EPS;} typedef complex<double> point; double cross(const point& a, const point& b) { r...
a.cc: In function 'bool intersectSS(const line&, const line&)': a.cc:31:21: error: no match for 'operator[]' (operand types are 'const line' {aka 'const std::array<std::complex<double>, 2>'} and 'int') 31 | return ccw(s[0],s[1],t[0])*ccw(s[0],s[1],t[1]) <= 0 && | ^ a.cc:31:26: error...
s947634581
p01128
C++
#include <bits/stdc++.h> using namespace std; #define FOR(i,k,n) for(int i = (k); i < (n); i++) #define REP(i,n) FOR(i,0,n) #define ALL(a) begin(a),end(a) #define MS(m,v) memset(m,v,sizeof(m)) #define D10 fixed<<setprecision(10) typedef vector<int> vi; typedef vector<string> vs; typedef pair<int, int> P; typedef long ...
a.cc: In function 'int main()': a.cc:131:9: error: jump to label 'end' 131 | end:; | ^~~ a.cc:121:41: note: from here 121 | if (v.size() == 0) goto end; | ^~~ a.cc:122:21: note: crosses initialization of 'int tmp' 122 | ...
s493425051
p01128
C++
#include <cstdio> #include <iostream> #include <vector> #include <map> #include <set> #include <string> #include <cstring> #include <sstream> #include <algorithm> #include <functional> #include <queue> #include <stack> #include <cmath> #include <iomanip> #include <list> #include <tuple> #include <bitset> #include <ciso...
a.cc: In function 'int main()': a.cc:103:39: error: 'class std::complex<double>' has no member named '_Val' 103 | t.first.first._Val[0] = sx; | ^~~~ a.cc:104:39: error: 'class std::complex<double>' has no member named '_Val' 104 | ...
s189180010
p01128
C++
#include <cstdio> #include <iostream> #include <vector> #include <map> #include <set> #include <string> #include <cstring> #include <sstream> #include <algorithm> #include <functional> #include <queue> #include <stack> #include <cmath> #include <iomanip> #include <list> #include <tuple> #include <bitset> #include <ciso...
a.cc: In function 'int main()': a.cc:103:39: error: 'class std::complex<double>' has no member named '_Val' 103 | t.first.first._Val[0] = sx; | ^~~~ a.cc:104:39: error: 'class std::complex<double>' has no member named '_Val' 104 | ...
s551622519
p01128
C++
homono
a.cc:1:1: error: 'homono' does not name a type 1 | homono | ^~~~~~
s263978575
p01128
C++
fow
a.cc:1:1: error: 'fow' does not name a type 1 | fow | ^~~
s960576555
p01128
C++
#include <iostream> #include <string> #include <vector> #include <cstring> #include <climits> #include <algorithm> #include <map> using namespace std; int crs(double x1, double y1, double x2, double y2) { double z = x1*y2-y1*x2; return (0 < z ? 1 : (z < 0 ? -1 : 0)); } bool intersect(double x1, double y1, do...
a.cc: In function 'int main()': a.cc:50:25: error: 'fabs' was not declared in this scope; did you mean 'labs'? 50 | bool vertical = fabs(xa-xb) < fabs(ya-yb); | ^~~~ | labs
s805429038
p01128
C++
#include <iostream> #include <utility> #include <algorithm> #include <vector> #include <iterator> #include <limits> using namespace std; typedef pair<double, double> point; typedef pair<double, double> line; typedef struct { double x, y; } pt; typedef pair<pt, pt> seg; seg mkseg(double ax, double ay, double bx...
a.cc:52:10: error: declaration of 'line <unnamed struct>::line' changes meaning of 'line' [-Wchanges-meaning] 52 | line line; | ^~~~ a.cc:52:5: note: used here to mean 'typedef struct std::pair<double, double> line' 52 | line line; | ^~~~ a.cc:11:30: note: declared here 11 | ty...
s103339504
p01128
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0;i<n;++i) bool comp(Point a,Point b) {return (a.x==b.x ? a.y<b.y : a.x<b.x);} struct Point{double high,x,y;}; bool Intersection(Point p1,Point p2,Point p3,Point p4,Point *ret){ double d = (p2.x-p1.x)*(p4.y-p3.y)-(p2.y-p1.y)*(p4.x-p3.x); ...
a.cc:5:11: error: 'Point' was not declared in this scope 5 | bool comp(Point a,Point b) {return (a.x==b.x ? a.y<b.y : a.x<b.x);} | ^~~~~ a.cc:5:19: error: 'Point' was not declared in this scope 5 | bool comp(Point a,Point b) {return (a.x==b.x ? a.y<b.y : a.x<b.x);} | ^~~~...
s347097545
p01128
C++
#include <iostream> #include <vector> #include <cmath> #define REP(i, a, n) for(int i = (a); i < (n); i++) using namespace std; typedef pair<double, int> pdi; struct point { double x, y; }; struct line { point p, q; }; int T, N, O[110], L[110]; line A, S[110]; bool intersect(line l1, line l2) { double ax = l1.p.x,...
a.cc: In function 'int main()': a.cc:53:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 53 | sort(E.begin(), E.end()); | ^~~~ | sqrt
s164134503
p01128
C++
#include <iostream> #include <complex> #include <vector> #include <utility> #define X real() #define Y imag() #define EPS (1e-10) using namespace std; typedef complex<double> P; typedef pair<P,P> L; namespace std{ bool operator<(const P& a, const P& b){ return a.X != b.X ? a.X < b.X : a.Y < b.Y; } } double do...
a.cc: In function 'int main()': a.cc:62:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 62 | sort(cp.begin(),cp.end()); | ^~~~ | sqrt
s676730964
p01128
C++
#include<iostream> #include<vector> using namespace std; class Road { public: Road(int _xs, int _ys, int _xt, int _yt, bool _l) { xs = _xs; ys = _ys; xt = _xt; yt = _yt; l = _l; } int xs, ys, xt, yt; //l : true??§?????¶ bool l; }; //https://qiita.com...
a.cc: In function 'int main()': a.cc:77:9: error: 'sort' was not declared in this scope; did you mean 'short'? 77 | sort(crossPoints.begin(), crossPoints.end()); | ^~~~ | short
s349364406
p01128
C++
#include<iostream> #include<vector> using namespace std; class Road { public: Road(int _xs, int _ys, int _xt, int _yt, bool _l) { xs = _xs; ys = _ys; xt = _xt; yt = _yt; l = _l; } int xs, ys, xt, yt; //l : true??§?????¶ bool l; }; //https://qiita.com...
a.cc: In function 'int main()': a.cc:77:9: error: 'sort' was not declared in this scope; did you mean 'short'? 77 | sort(crossPoints.begin(), crossPoints.end()); | ^~~~ | short
s899686736
p01128
C++
#include<iostream> #include<algorithm> #include<vector> #include<string> #include<utility> #include<complex> #include<assert.h> #define REP(i,n) for(int i = 0;i < (n);i++) #define pb push_back using namespace std; typedef long long ll; const double EPS = 1e-8; const double INF = 1e12; typedef complex<double> P; namespa...
a.cc: In function 'int main()': a.cc:126:9: error: 'cnt' was not declared in this scope; did you mean 'int'? 126 | cnt++; | ^~~ | int a.cc:132:9: error: 'cnt' was not declared in this scope; did you mean 'int'? 132 | cnt++; | ^~~ | int a.cc:153...
s183112083
p01128
C++
#include<complex> #include<vector> #include<iostream> #include<stack> #include<cmath> #define FRONT 0x01 #define RIGHT 0x02 #define BACK 0x04 #define LEFT 0x08 #define OVER 0x10 #define CIRCLE_SAME 0x01 #define CIRCLE_CONTAIN 0x02 #define CIRCLE_NO_CROSS 0x04 #define CIRCLE_ONE_CROSS 0x08 #define CIRCLE_ONE_INSIDE_CR...
a.cc: In function 'int minimumExits(int, const point&, int, const point&, const std::vector<Line>&)': a.cc:217:3: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 217 | sort(vexit.begin(),vexit.end()); | ^~~~ | sqrt
s215544374
p01128
C++
/** * Railroad Conflict (Problem D, Practice Contest for Japan Domestic, 2006-06-18) * by Kenji Inoue, 2007-01-07 **/ #include <iostream> #include <vector> #include <complex> using namespace std; typedef complex<double> P; #define EPS (1e-9) double cross(P a, P b) { return (a.real() * b.imag() - a.imag() * ...
a.cc: In function 'int main()': a.cc:42:9: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'double') 42 | cin >> a.real() >> a.imag(); | ~~~ ^~ ~~~~~~~~ | | | | | double | std::istream {aka std::...
s922031223
p01128
C++
#include<iostream> #include<complex> #include<cmath> #include<vector> #define X real() #define Y imag() using namespace std; typedef complex<double>P; typedef vector<P>POL; const double INF = 1e12; namespace std{ bool operator < (const P&a, const P& b){ return real(a) != real(b) ? real(a) < real(b) : imag(a)...
a.cc: In function 'void input()': a.cc:71:7: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'double') 71 | cin >> p1.X >> p1.Y >> p2.X >> p2.Y; | ~~~ ^~ | | | std::istream {aka std::basic_istream<char>} In file included from /usr/incl...
s033551009
p01128
C++
#include <iostream> #include <vector> #include <algorithm> #include <complex> using namespace std; typedef complex<double> Point; struct Segment{ Point p1, p2; }; class C{ public: Point p; int o, l; double d; C(){} C(Point p, int o, int l, double d): p(p), o(o), l(l), d(d) {} bool operator < (const C& s...
a.cc: In function 'Point getCrossPoint(Segment, Segment)': a.cc:64:3: error: 'assert' was not declared in this scope 64 | assert(isIntersect(s1, s2)); | ^~~~~~ a.cc:5:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>' 4 | #include <complex> +++...
s439325431
p01129
C++
#include <iostream> #include <cstring> #include <queue> #include <algorithm> using namespace std; const int arrive = 0; const int burnout = 1; const int burning = 2; const int gfloor = 3; const int dy[2] = {1, -1}; class Elevator { public: int dev, cap, v, ts; double pos, stime; Elevator() {} Elevator(double ...
a.cc: In function 'void simulate(std::priority_queue<Event>&)': a.cc:170:49: error: cannot bind non-const lvalue reference of type 'Elevator&' to an rvalue of type 'Elevator' 170 | q.push(changeObj(arrived(e), e.bpos, nt)); | ~~~~~~~^~~ a.cc:75:27...
s479182554
p01130
Java
import java.io.IOException; import java.util.Scanner; public class Water { public static void main(String[] args) throws IOException{ while(true){ int num=0; int[] cc= new int[5]; int n, m, s, g1, g2; Scanner sc = new Scanner(System.in); while(num<5){ cc[num]=sc.nextInt(); num++; } ...
Main.java:4: error: class Water is public, should be declared in a file named Water.java public class Water { ^ 1 error
s324454625
p01130
Java
import java.io.IOException; import java.util.Scanner; public class Water { public static void main(String[] args) throws IOException{ while(true){ int num=0; int[] cc= new int[5]; int n, m, s, g1, g2; Scanner sc = new Scanner(System.in); while(num<5){ cc[num]=sc.nextInt(); num++; } ...
Main.java:4: error: class Water is public, should be declared in a file named Water.java public class Water { ^ 1 error
s670695326
p01130
Java
import java.io.IOException; import java.util.Scanner; public class Water { public static void main(String[] args) throws IOException{ while(true){ int num=0; int[] cc= new int[5]; int n, m, s, g1, g2; Scanner sc = new Scanner(System.in); while(num<5){ cc[num]=sc.nextInt(); num++; } ...
Main.java:4: error: class Water is public, should be declared in a file named Water.java public class Water { ^ 1 error
s649330118
p01130
Java
import java.util.Scanner; public class WaterPipeConstruction { public static void main(String[] args){ Scanner sc = new Scanner(System.in); while(true){ int n = sc.nextInt(); int m = sc.nextInt(); int s = sc.nextInt(); int g1 = sc.nextInt(); int g2 = sc.nextInt(); if(n == 0 && m...
Main.java:4: error: class WaterPipeConstruction is public, should be declared in a file named WaterPipeConstruction.java public class WaterPipeConstruction { ^ 1 error
s762054668
p01130
Java
import java.util.Scanner; public class Water_Pipe { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int m = sc.nextInt(); int start = sc.nextInt(); start = start - 1; int goal1 = sc.nextInt(); goal1 = goal1 - 1; int goal2 = sc.nextInt(); goal2 = g...
Main.java:3: error: class Water_Pipe is public, should be declared in a file named Water_Pipe.java public class Water_Pipe { ^ 1 error
s347341583
p01130
C++
#include <iostream> #include <algorithm> using namespace std; int G[100][100]; int n; int solve(int s,int g1,int g2){ for(int k=0;k<n;++k) for(int i=0;i<n;++i) for(int j=0;j<n;++j) G[i][j] = min(G[i][j],G[i][k]+G[k][j]); int ret = INF; for(int t=0;t<n;++t) ret = min(ret,G[s][t]+G[t][g1]+G[t][g2])...
a.cc: In function 'int solve(int, int, int)': a.cc:13:13: error: 'INF' was not declared in this scope 13 | int ret = INF; | ^~~
s078848258
p01130
C++
#include <algorithm> #include <cmath> #include <climits> #include <cstdio> #include <cstdlib> #include <cstring> #include <fstream> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> #include <cassert> #include <func...
a.cc:48:1: error: abstract declarator '<unnamed struct>' used as declaration 48 | }; | ^
s563624478
p01130
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef long double ld; typedef pair<ll, ll> P; #define EACH(i,a) for (auto& i : a) #define FOR(i,a,b) for (ll i=(a);i<(b);i++) #define RFOR(i,a,b) for (ll i=(b)-1;i>=(a);i--) #define REP(i,n) for (ll i=0;i<(n);i++) #...
a.cc: In function 'int main()': a.cc:66:38: error: no matching function for call to 'min(ll&, int&)' 66 | m[a][b] = min(m[a][b], c); | ~~~^~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linu...
s328450112
p01130
C++
#include <iostream> #include <map> #include <utility> #include <vector> #include <queue> using namespace std; typedef struct { int from, to; int cost; } edge; int main() { while (true) { int b_goal[2]; int n_bases, n_roads, b_start; cin >> n_bases >> n_roads >> b_start >> b_goal[0...
a.cc: In function 'int main()': a.cc:35:34: error: 'INT_MAX' was not declared in this scope 35 | cost_from_start[b] = INT_MAX; | ^~~~~~~ a.cc:6:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 5 | #incl...
s389369283
p01130
C++
#include<iostream> #include<algorithm> #include<vector> #include<queue> #include <functional> #define INF 1000000 using namespace std; typedef long long ll; struct edge { int to, cost; }; typedef pair<ll, int> P; int V; vector<edge> G[1010]; ll d[105]; ll dijkstra(int s,int g) { priority_queue<P, vector<P>,greater<...
a.cc: In function 'll dijkstra(int, int)': a.cc:27:42: error: invalid use of member function 'std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = edge; _Alloc = std::allocator<edge>; size_type = long unsigned int]' (did you forget the '()' ?) 27 | for (int i = 0; i ...
s685263887
p01130
C++
#include <iostream> #include <utility> #include <vector> #include <queue> #include <functional> #include <cassert> using namespace std; const int INF = 1e9 + 10; class Dijkstra { #define MAX_V 101 typedef pair<int, int> P; private: struct Edge { int to, cost; Edge(int to, int cost): to(to), cost(cost) ...
a.cc: In member function 'std::vector<int> Dijkstra::GetPath(int)': a.cc:70:5: error: 'reverse' was not declared in this scope 70 | reverse(path.begin(), path.end()); | ^~~~~~~
s965985089
p01130
C++
#include<bits/stdc++.h> #define r(i,n) for(int i=0;i<n;i++) #define INF 1e7 using namespace std; int main(){ int n,m,x,y,z,q,w,e; while(cin>>n>>m>>x>>y>>z,n++){ int dp[n][n]={}; r(i,n)r(j,n)if(i!=j)dp[i][j]=INF; r(i,m){ cin>>q>>w>>e; dp[q][w]]=e; } r(o,n)r(i,n)r(j,n)dp[i][j]=min(dp[i...
a.cc: In function 'int main()': a.cc:12:15: error: expected ';' before ']' token 12 | dp[q][w]]=e; | ^ | ;
s817843290
p01130
C++
#include<iostream> using namespace std; int main() { int n,m,s,g1,g2,a,b,cost,mi; int map[101][101]; while(1){ cin>>n>>m>>s>>g1>>g2; if(n==0 && m==0 && s==0 && g1==0 && g2==0)break; for(int i=0;i<n+1;i++){ for(int j=0;j<n+1;j++){ if(i==j)map[i][j]=0; else map[i][j]=1000000; } } for(int i=0;i<m;i++){ cin>>a>>b>>cost; ma...
a.cc:1:20: warning: extra tokens at end of #include directive 1 | #include<iostream> using namespace std; int main() { int n,m,s,g1,g2,a,b,cost,mi; int map[101][101]; while(1){ cin>>n>>m>>s>>g1>>g2; if(n==0 && m==0 && s==0 && g1==0 && g2==0)break; for(int i=0;i<n+1;i++){ for(int j=0;j<n+1;j++){ if(i==j)map[i][j]=0;...
s181118267
p01130
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
s609062321
p01130
C++
#include<iostream> using namespace std; #define MAX (1<<21) int d[121][121]; void reset(int n){ for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ d[i][j]=MAX; } d[i][i]=0; } } void warshall_floyd(int n){ for(int k=1;k<n;k++){ for(int i=1;i<n;i++){ for(int j=1;j<n;j++){ //if (d[i][...
a.cc:27:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 27 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:39:15: error: 'INT_MAX' was not declared in this scope 39 | int min = INT_MAX; | ^~~~~~~ a.cc:2:1: note: 'INT_MAX' is defined in header '<cl...
s893445315
p01130
C++
#include <vector> #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 <cstring> #include <c...
a.cc: In function 'int main()': a.cc:59:28: error: 'A' was not declared in this scope 59 | REP(j, n) {A | ^
s357736659
p01130
C++
#include <cstdio> using namespace std; #define MAX_N 101 #define INF (1<<28) int n, m, s, g1, g2; int graph[MAX_N][MAX_N]; int main() { while (scanf("%d %d %d %d %d", &n, &m, &s, &g1, &g2), n || m || s || g1 || g2) { for (int i = 0; i <= n; i++) for (int j = 0; j <= n; j++) graph[i][j] = INF; for...
a.cc: In function 'int main()': a.cc:21:35: error: 'min' was not declared in this scope; did you mean 'main'? 21 | graph[i][j] = min(graph[i][j], graph[i][k] + graph[k][j]); | ^~~ | main a.cc:28:24: error: 'min' was n...
s965851450
p01130
C++
#include <cstdio> #include <algorithm> #define INF 999999999 using namespace std; int n, d[101][101]; void warshall_floyd(void){ for( int k = 1; k <= n; k++ ) for( int i = 1; i <= n; i++ ) for( int j = 1; j <= n; j++ ){ d[i][j] = min(d[i][j], d[i][k] + d[k][j]); } } int main(void){ int m,...
a.cc: In function 'int main()': a.cc:23:11: error: 'cin' was not declared in this scope 23 | while(cin >> n >> m >> s >> g1 >> g2 ){ | ^~~ a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 2 | #include <algorithm> +++ |+#i...
s344313570
p01131
Java
import java.io.IOException; import java.util.Scanner; public class KeitaiMessage { public static void main(String[] args) throws IOException { Scanner sc = new Scanner(System.in); String raw; char ch[] = new char[1024]; int times = sc.nextInt(); sc.nextLine(); for (int i = 0; i < times; i++...
Main.java:4: error: class KeitaiMessage is public, should be declared in a file named KeitaiMessage.java public class KeitaiMessage { ^ 1 error
s536884806
p01131
Java
import java.io.IOException; import java.util.Scanner; public class KeitaiMessage { public static void main(String[] args) throws IOException { Scanner sc = new Scanner(System.in); String raw; char ch[] = new char[1025]; int times = sc.nextInt(); sc.nextLine(); for (int i = 0; i < times; i++...
Main.java:4: error: class KeitaiMessage is public, should be declared in a file named KeitaiMessage.java public class KeitaiMessage { ^ 1 error
s410305620
p01131
Java
import java.io.*; class CharAt { public static void main(String[] args) throws IOException { String[][] strButton = { {".",",","!","?"," "},{"a","b","c"},{"d","e","f"},{"g","h","i"},{"j","k","l"},{"m","n","o"},{"p","q","r","s"},{"t","u","v"},{"w","x","y","z"} }; BufferedReader br = new BufferedRea...
Main.java:63: error: incompatible types: unexpected return value return 0; ^ 1 error
s202219138
p01131
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String [][] letters = {{" "},{" ",".",",","!","?"},{"c","a","b"},{"f","d","e"},{"i","g","h"},{"l","j","k"},{"o","m","n"},{"s","p","q","r"},{"v","t","u"},{"z","w","x","y"},{" ","A","...
Main.java:24: error: reached end of file while parsing } ^ 1 error
s571347480
p01131
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { char[][] data = { { '.', ',', '!', '?', ' ' }, { 'a', 'b', 'c' }, { 'd', 'e', 'f' }, { 'g', 'h', 'i' }, { 'j', 'k', 'l' }, { 'm', 'n', 'o' }, { 'p', 'q', 'r', 's' }, { 't', 'u', 'v' }, { 'w', 'x', 'y', 'z' } }; Sc...
Main.java:3: error: illegal character: '\u3000' public class?Main { ^ 1 error
s022538913
p01131
Java
import java.util.Scanner; public class icpc2006 { public static void main(String[] args) { Scanner scan = new Scanner(System.in); while (true) { int test; test = scan.nextInt(); String push; int onepush; String word; int samepushnumber; char preword = ' '; String[] result = new String[10...
Main.java:3: error: class icpc2006 is public, should be declared in a file named icpc2006.java public class icpc2006 { ^ 1 error
s553436357
p01131
Java
import java.util.Scanner; public class icpc2006 { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int test; test = scan.nextInt(); String push; int onepush; String word; int samepushnumber; char preword = ' '; String[] result = new String[100]; for (int i = 0; i ...
Main.java:3: error: class icpc2006 is public, should be declared in a file named icpc2006.java public class icpc2006 { ^ 1 error
s755388583
p01131
C
#include <stdio.h> #include <stdlib.h> int main(){ int max; int count=0; char c[1025]; int i,j; char key[10][5]={ {0}, {'.',',','!','?',' '}, {'a','b','c'}, {'d','e','f'}, {'g','h','i'}, {'j','k','l'}, {'m','n','o'}, {'p','q','r','s'}, {'t','u','v'}, {'w','x','y','z'}, }; int count; int cou...
main.c: In function 'main': main.c:21:13: error: redeclaration of 'count' with no linkage 21 | int count; | ^~~~~ main.c:6:13: note: previous definition of 'count' with type 'int' 6 | int count=0; | ^~~~~ main.c:29:17: error: implicit declaration of function 'g...
s709590160
p01131
C
include<stdio.h> #include<string.h> #include<stdlib.h> int main() { char s[9][5]={".,!? ","abc","def","ghi","jkl","mno","pqrs","tuv","wxyz"}; char answer[76],enter[1025]; int n,i,j,k,l,r,flag; scanf("%d",&n); for(i=0;i<n;i++) { scanf("%s",enter); for(j=0;j<76;j++) answer[j]='\0'; flag=0; k=0; l=0;...
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include<stdio.h> | ^ In file included from main.c:2: /usr/include/string.h:44:22: error: unknown type name 'size_t' 44 | size_t __n) __THROW __nonnull ((1, 2)); | ...
s733584076
p01131
C
from itertools import cycle as c n=int(input()) for _ in range(n): tt=input() l=[] t="" for (i,j) in enumerate(tt): ct=int(j) if ct==0 or i==0: if i!=0: l.extend([t]) t="" kk=[c([".",",","!","?"," "]), c(["a","b","c...
main.c:1:1: error: unknown type name 'from' 1 | from itertools import cycle as c | ^~~~ main.c:1:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'import' 1 | from itertools import cycle as c | ^~~~~~ main.c:1:16: error: unknown type name 'import'
s667546231
p01131
C
#include<stdio.h> #include<stdlib.h> #define MAXSIZE 1024 #define MAXLENGTH 76 int main(void) { int i,j,c; int n; char *a,*b; scanf("%d ",&n); for(i=0;i<n;i++) { a = (char *)malloc(sizeof(char)*MAXLENGTH); b = (char *)malloc(sizeof(char)*MAXSIZE); gets(a); j = 0; while(1...
main.c: In function 'main': main.c:18:7: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 18 | gets(a); | ^~~~ | fgets
s401024778
p01131
C
#include<stdio.h> #include<stdlib.h> #define MAXSIZE 1024 #define MAXLENGTH 76 int main(void) { int i,j,c; int n; char *a; scanf("%d ",&n); for(i=0;i<n;i++) { a = (char *)malloc(sizeof(char)*MAXLENGTH); gets(a); j = 0; while(1) { if(a[j]=='\0')break; c = 0; while(1) ...
main.c: In function 'main': main.c:17:7: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 17 | gets(a); | ^~~~ | fgets
s201158918
p01131
C++
#include <iostream> using namespace std; int X; char s[1050]; string b[9] = {".,!? ","abc","def","ghi","jkl","mno","pqrs","tuv","wxyz"}; int main(){ cin >> X; while(X){ cin >> s; int i = 0; char pre; int n; for(i = 0; i < strlen(s); i++){ n = 1; pre = s[i]; if(pr...
a.cc: In function 'int main()': a.cc:22:20: error: 'strlen' was not declared in this scope 22 | for(i = 0; i < strlen(s); i++){ | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ |+...
s118589083
p01131
C++
#include <stdio.h> #include <string.h> #include <math.h> #include <stdlib.h> #include <limits.h> int main() { int i,j,k; int n,m; int a[10]={0}; //押された回数 int b[10]={0,4,3,3,3,3,3,4,3,4}; //割り算 int c; //押されたボタン char d[5][10]={ {'0','?','c','f','i','l','o','s','v','z'}, {'0','.','a','d','g','j','m','p','t','w...
a.cc: In function 'int main()': a.cc:20:9: error: expected '}' before '{' token 20 | {'0',' ','0','0','0','0','0','0','0','0'}}; | ^ a.cc:15:23: note: to match this '{' 15 | char d[5][10]={ | ^ a.cc:20:9: error: expected ',' or ';' before '{' token 20 |...
s513803699
p01131
C++
5 20 220 222220 44033055505550666011011111090666077705550301110 000555555550000330000444000080000200004440000
a.cc:5:1: warning: integer constant is too large for its type 5 | 44033055505550666011011111090666077705550301110 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:6:1: error: invalid digit "8" in octal constant 6 | 000555555550000330000444000080000200004440000 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...
s958418971
p01131
C++
#include <iostream> #include <string> using namespace std; int main(){ char moji[10][6]; strcpy(moji[1],".,!? "); strcpy(moji[2] ,"abc "); strcpy(moji[3], "def "); strcpy(moji[4],"ghi "); strcpy(moji[5],"jkl "); strcpy(moji[6],"mno "); strcpy(moji[7],"pqrs "); strcpy(moji[8],"tuv "); strcpy(moji[9],"wxyz ");...
a.cc: In function 'int main()': a.cc:8:9: error: 'strcpy' was not declared in this scope 8 | strcpy(moji[1],".,!? "); | ^~~~~~ a.cc:2:1: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ |+#include <cstrin...
s214128299
p01131
C++
#include <iostream> #include <string> using namespace std; void main(){ char list[][6]={ {" "}, {".,!? "}, {"abc "}, {"def "}, {"ghi "}, {"jkl "}, {"mno "}, {"pqrs "}, {"tuv "}, {"wxyz "} }; int m[10] = {1,5,3,3,3,3,3,4,3,4}; int count,n,i,buf; string str; cin >> n; while(n--){ cin >> str;...
a.cc:6:1: error: '::main' must return 'int' 6 | void main(){ | ^~~~
s198914984
p01131
C++
#include<iostream> using namespace std; const char button[10][6] = { {}, {'.',',','!','?',' '}, {'a','b','c'}, {'d', 'e', 'f'}, {'g', 'h', 'i'}, {'j', 'k', 'l'}, {'m', 'n', 'o'}, {'p', 'q', 'r', 's'}, {'t', 'u', 'v'}, {'w', 'x', 'y', 'z',}}; const...
a.cc: In function 'int main()': a.cc:22:27: error: 'strlen' was not declared in this scope 22 | int len = strlen(line); | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream...
s555666574
p01131
C++
#include<iostream> #include<stdlib.h> using namespace std; const char button[10][6] = { {}, {'.',',','!','?',' '}, {'a','b','c'}, {'d', 'e', 'f'}, {'g', 'h', 'i'}, {'j', 'k', 'l'}, {'m', 'n', 'o'}, {'p', 'q', 'r', 's'}, {'t', 'u', 'v'}, {'w', 'x',...
a.cc: In function 'int main()': a.cc:23:27: error: 'strlen' was not declared in this scope 23 | int len = strlen(line); | ^~~~~~ a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<stdlib.h...
s760467283
p01131
C++
#include<iostream> #include<vector> #include<algorithm> #include<cstdio> #include<cmath> #include<queue> #include<stack> #include<map> #include<set> using namespace std; typedef long long ll; typedef pair<int,int> pii; typedef pair<pii,int> piii; typedef pair<ll,ll> pll; #define reps(i,f,n) for(int i = int(f); i <= ...
a.cc:29:22: error: initializer-string for 'char [5]' is too long [-fpermissive] 29 | char str[12][5] ={"",".,!? ","abc","def","ghi","jkl","mno","pqrs","tuv","wxyz"}; | ^~~~~~~
s152397062
p01131
C++
# 2006.cc #include <iostream> #include <string> using namespace std; string chars[] = { ?? "", ?? ".,!? ", ?? "abc", ?? "def", ?? "ghi", ?? "jkl", ?? "mno", ?? "pqrs", ?? "tuv", ?? "wxyz", }; int main() { ?? int nnn; ?? cin >> nnn; ?? for (int iii = 0; iii < nnn; ++iii) { ?? ?? string input; ?? ?? cin >> input; ?? ...
a.cc:1:3: error: "2006.cc" after # is not a positive integer 1 | # 2006.cc | ^~~~~~~ a.cc:9:1: error: expected primary-expression before '?' token 9 | ?? "", | ^ a.cc:9:2: error: expected primary-expression before '?' token 9 | ?? "", | ^ a.cc:10:1: error: expected primary-expression be...
s044713958
p01131
C++
#include <iostream> #include <string> using namespace std; string chars[] = { ?? "", ?? ".,!? ", ?? "abc", ?? "def", ?? "ghi", ?? "jkl", ?? "mno", ?? "pqrs", ?? "tuv", ?? "wxyz", }; int main() { ?? int nnn; ?? cin >> nnn; ?? for (int iii = 0; iii < nnn; ++iii) { ?? ?? string input; ?? ?? cin >> input; ?? ?? int prev...
a.cc:7:1: error: expected primary-expression before '?' token 7 | ?? "", | ^ a.cc:7:2: error: expected primary-expression before '?' token 7 | ?? "", | ^ a.cc:8:1: error: expected primary-expression before '?' token 8 | ?? ".,!? ", | ^ a.cc:8:2: error: expected primary-expression before '...
s986977978
p01131
C++
#include<iostream> #include<cstdio> #include<cstring> using namespace std; int main(){ char m[9][5]={{'.',',','!','?',' '}, {'a','b','c','1','1'}, {'d','e','f','1','1'}, {'g','h','i','1','1'}, {'j','k','l','1','1'}, {'m','n','o','1','1'}, {'p','q','r','s','1'}, {'t','u','v','1','1'}, {'w','x','y','z'...
a.cc:55:5: error: redefinition of 'int main()' 55 | int main(){ | ^~~~ a.cc:6:5: note: 'int main()' previously defined here 6 | int main(){ | ^~~~
s802455238
p01131
C++
#include<iostream> #include<cstdio> #include<cstring> using namespace std; int main(){ char m[9][5]={{'.',',','!','?',' '}, {'a','b','c','1','1'}, {'d','e','f','1','1'}, {'g','h','i','1','1'}, {'j','k','l','1','1'}, {'m','n','o','1','1'}, {'p','q','r','s','1'}, {'t','u','v','1','1'}, {'w','x','y','z'...
a.cc:55:5: error: redefinition of 'int main()' 55 | int main(){ | ^~~~ a.cc:6:5: note: 'int main()' previously defined here 6 | int main(){ | ^~~~
s977356100
p01131
C++
#include <string> using namespace std; int main(int argc, char *argv[]) { string map[10] = {"", ".,!? ", "abc", "def", "ghi", "jkl", "mno", "pqrs", "tuv", "wxyz"}; string line; int n, cnt, num; cin >> n; for (int i = 0; i < n; ++i) { cin >> line; cnt = 0; for (int j ...
a.cc: In function 'int main(int, char**)': a.cc:10:5: error: 'cin' was not declared in this scope 10 | cin >> n; | ^~~ a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 1 | #include <string> +++ |+#include <iostream> 2 | usi...
s411704241
p01131
C++
#include <iostream> #include <string> using namespace std; int main(){ string a,b; while (cin>>a){ int la=a.size(); int c=0; for(int i=0;i<la;i++){ if(a[i]=="0"){ if(b=="1"){ c=c%5; if(c==1) cout<<"."; if(c==2) cout<<","; if(c==3) cout<<"!"; if(c==4) cout<<"?"; if(c==0) cout...
a.cc: In function 'int main()': a.cc:10:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 10 | if(a[i]=="0"){
s623087683
p01131
C++
#include <iostream> #include <string> using namespace std; int main(){ string a,b; while (cin>>a){ if(a=='0') break; int la=a.size(); int c=0; for(int i=0;i<la;i++){ if(a[i]=='0'){ if(b=='1'){ c=c%5; if(c==1) cout<<'.'; if(c==2) cout<<','; if(c==3) cout<<'!'; if(c==4) cout<<'?'...
a.cc: In function 'int main()': a.cc:7:21: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 7 | if(a=='0') break; | ~^~~~~ | | | | | char | ...
s829660931
p01131
C++
#include <iostream> #include <vector> #include <string> using namespace std; vector<vector<char> > data; string parse(string msg){ string res = ""; int state = 0; int time = 0; for(auto c : msg){ if(c == '0'){ if(time % data[state-1].size() == 0){ res += data[state-1][data[state-1].size() -...
a.cc: In function 'std::string parse(std::string)': a.cc:15:17: error: reference to 'data' is ambiguous 15 | if(time % data[state-1].size() == 0){ | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s564682859
p01131
C++
#include <iostream> using namespace std; int main(void){ char code[][5] = { {0,0,0,0,0}, {'.',',','!','?',' '}, {97,98,99,0,0}, {100,101,102,0,0}, {103,104,105,0,0}, {106,107,108,0,0}, {109,110,111,0,0}, {112,113,114,115,0}, {116,117,118,0,0}, ...
a.cc: In function 'int main()': a.cc:24:17: error: 'str' was not declared in this scope; did you mean 'std'? 24 | if (str[j] == '0') { | ^~~ | std
s364887464
p01131
C++
#include<bits/stdc++.h> using namespace std; int main(){ char a[9][5]={{'.',',','!','?',' '},{'a','b','c'},{'d','e','f'},{'g','h','i'},{'j','k','l'},{'m','n','o'},{'p','q','r','s'},{'t','u','v'},{'w','x','y','z'}}; int n,c=0,d=0; string s; cin>>n; for(int i=0;i<n;i++){ cin>>s;d=c=0; for(int j=0;j<s.size();j++...
a.cc: In function 'int main()': a.cc:19:33: error: 'else' without a previous 'if' 19 | else c++; | ^~~~
s948299311
p01131
C++
#include<iostream> #include<string.h> #include<string> #include<cstdio> #include<algorithm> #include<stack> #include<queue> #include<vector> #include<cmath> #include<utility> #include<set> #define ll long long int #define ld long double #define INF 1000000000 #define EPS 0.0000000001 #define rep(i,n) for(i=0;i<n;i++) u...
a.cc: In function 'int main()': a.cc:42:7: error: 'a' was not declared in this scope 42 | a=str[j-1]-'0'; | ^
s520757395
p01131
C++
#include <bits/stdc++.h> using namespace std; int main() { int n; string s; char ss[9][6]={".,!? ", "abc", "def", "ghi", "jkl", "mno", "pqrs", "tuv", "wxyz"}; cin>>n; while(n--&&cin>>s){ int l=s.size(); int p=-1; for(int i=0;i<l;++i) { if(p<0){ if(s[i]!='0') { p=(s[i]-'1')*10; } }else{ if(s[i]=='0'){ cout<<ss[p/10][p%1...
a.cc: In function 'int main()': a.cc:26:2: error: expected primary-expression before '?' token 26 | }?? | ^ a.cc:26:3: error: expected primary-expression before '?' token 26 | }?? | ^ a.cc:27:1: error: expected primary-expression before '}' token 27 | } | ^ a.cc:26:4: error: expected ':' b...
s856592682
p01131
C++
#include <iostream> using namespace std; int main(void){ const char character[][] = {{}, {'.', ',', '!', '?', ' '}, {'a', 'b', 'c'}, {'d', 'e', 'f'}, {'g', 'h', 'i'}, {'j', 'k', 'l'}, {'m', 'n', 'o'}, {'p', 'q', 'r', 's'}, {'t', 'u', 'v'}, {'w', 'x', 'y', 'z'}} int...
a.cc: In function 'int main()': a.cc:5:16: error: declaration of 'character' as multidimensional array must have bounds for all dimensions except the first 5 | const char character[][] = {{}, | ^~~~~~~~~ a.cc:19:24: error: 'n' was not declared in this scope 19 | for(int i = 0; i < n;...
s020426955
p01131
C++
a
a.cc:1:1: error: 'a' does not name a type 1 | a | ^
s886270787
p01131
C++
a
a.cc:1:1: error: 'a' does not name a type 1 | a | ^
s081565393
p01131
C++
#include<string> using namespace std; string search(int n[]) { if (n[0]) { if (n[0]%5 == 1) { n[0] = 0; return "."; } else if (n[0]%5 == 2) { n[0] = 0; return ","; } else if (n[0]%5 == 3) { n[0] = 0; return "!"; } else if(n[0]%5==4) { n[0] = 0; return "?"; } else { n[0] = 0...
a.cc: In function 'int main()': a.cc:152:9: error: 'cin' was not declared in this scope 152 | cin >> i; | ^~~ a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 1 | #include<string> +++ |+#include <iostream> 2 | using ...
s911758241
p01131
C++
#include<iostream> #include<cstring> using namespace std; int main(){ int n,temp,sum,box[]={1,5,3,3,3,3,3,4,3,4}; char s[1030]; char tab[10][5]={" ",".,!? ","abc","def","ghi","jkl","mno","pqrs","tuv","wxyz"}; cin>>n; while(n--){ cin>>s; sum=0; for(int i=0;i<(int)strlen(s);i++){ if(s[i]=='0'){ if(sum!=...
a.cc: In function 'int main()': a.cc:7:30: error: initializer-string for 'char [5]' is too long [-fpermissive] 7 | char tab[10][5]={" ",".,!? ","abc","def","ghi","jkl","mno","pqrs","tuv","wxyz"}; | ^~~~~~~
s120203521
p01131
C++
#include<iostream> using namespace std; int main(){int m,i;char s[1030];char t[20][6]={" ",".,!? ","abc","def","ghi","jkl","mno","pqrs","tuv","wxyz"};cin>>m;while(cin>>s){for(i=m=0;s[i]!='\0';i++)if(s[i]=='0'){if(m)cout<<t[s[i-1]-'0'][(m-1)%strlen(t[s[i-1]-'0'])];m=0;}else m++;cout<<endl;}return 0;}
a.cc: In function 'int main()': a.cc:3:202: error: 'strlen' was not declared in this scope 3 | int main(){int m,i;char s[1030];char t[20][6]={" ",".,!? ","abc","def","ghi","jkl","mno","pqrs","tuv","wxyz"};cin>>m;while(cin>>s){for(i=m=0;s[i]!='\0';i++)if(s[i]=='0'){if(m)cout<<t[s[i-1]-'0'][(m-1)%strlen(t[s[i-1]-'0']...
s790704799
p01131
C++
#include <iostream> #include <string> using namespace std; int main(){ int n; cin<<n; for(int i=0;i<N;i++){ string key[]={".,!?, ","abc","def","ghi","jkl","mno","pqrs","tuv","wxyz"}; } return 0; }
a.cc: In function 'int main()': a.cc:6:12: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 6 | cin<<n; | ~~~^~~ | | | | | int | std::istream {aka std::basic_istream<char>} a.cc:6:12: ...
s379217862
p01131
C++
#include <iostream> #include <string> #include <cstdlib> #include <sstream> using namespace std; int main(){ int N; cin >> N; for(int i=0;i<N;i++){ string key[]={".,!?, ","abc","def","ghi","jkl","mno","pqrs","tuv","wxyz"}; string input; cin>>input; stringstream b(input); int num=0,count=0; while(){ ch...
a.cc: In function 'int main()': a.cc:15:23: error: expected primary-expression before ')' token 15 | while(){ | ^ a.cc:18:40: error: invalid conversion from 'char' to 'const char*' [-fpermissive] 18 | int input=atoi(c); | ...
s979302491
p01131
C++
#include <iostream> #include <string> #include <cstdlib> #include <sstream> using namespace std; int main(){ int N; cin >> N; for(int i=0;i<N;i++){ string key[]={".,!?, ","abc","def","ghi","jkl","mno","pqrs","tuv","wxyz"}; string input; cin>>input; stringstream b(input); int num=0,count=0; while(1){ c...
a.cc: In function 'int main()': a.cc:18:40: error: invalid conversion from 'char' to 'const char*' [-fpermissive] 18 | int input=atoi(c); | ^ | | | char In fi...
s068686826
p01131
C++
null
a.cc:1:1: error: 'null' does not name a type 1 | null | ^~~~
s569147808
p01131
C++
#include<iostream> #include<algorithm> #include<string> #include<cstdio> using namespace std; char const mozi1[]={'.',',','!','?',' '},mozi2[]={'a','b','c'},mozi3[]={'d','e','f'},mozi4[]={'g','h','i'},mozi5[]={'j','k','l'},mozi6[]={'m','n','o'},mozi7[]={'p','q','r','s'},mozi8[]={'t','u','v'},mozi9[]={'w','x','y','z'};...
a.cc: In function 'void henkan(char*)': a.cc:26:20: error: 'strlen' was not declared in this scope 26 | int length=strlen(keitai); | ^~~~~~ a.cc:5:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include<cstdio> ++...
s449134482
p01131
C++
#include<iostream> #include<algorithm> #include<string> #include<cstdio> using namespace std; char const mozi1[]={'.',',','!','?',' '},mozi2[]={'a','b','c'},mozi3[]={'d','e','f'},mozi4[]={'g','h','i'},mozi5[]={'j','k','l'},mozi6[]={'m','n','o'},mozi7[]={'p','q','r','s'},mozi8[]={'t','u','v'},mozi9[]={'w','x','y','z'};...
a.cc: In function 'void henkan(char*)': a.cc:26:20: error: 'strlen' was not declared in this scope 26 | int length=strlen(keitai); | ^~~~~~ a.cc:5:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include<cstdio> ++...
s012275947
p01131
C++
#include<iostream> #include<algorithm> #include<string> #include<cstdio> using namespace std; char const mozi1[]={'.',',','!','?',' '},mozi2[]={'a','b','c'},mozi3[]={'d','e','f'},mozi4[]={'g','h','i'},mozi5[]={'j','k','l'},mozi6[]={'m','n','o'},mozi7[]={'p','q','r','s'},mozi8[]={'t','u','v'},mozi9[]={'w','x','y','z'};...
a.cc: In function 'void henkan(char*)': a.cc:26:20: error: 'strlen' was not declared in this scope 26 | int length=strlen(keitai); | ^~~~~~ a.cc:5:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include<cstdio> ++...
s058962659
p01131
C++
#include<iostream> #include<algorithm> #include<string> using namespace std; char const mozi1[]={'.',',','!','?',' '},mozi2[]={'a','b','c'},mozi3[]={'d','e','f'},mozi4[]={'g','h','i'},mozi5[]={'j','k','l'},mozi6[]={'m','n','o'},mozi7[]={'p','q','r','s'},mozi8[]={'t','u','v'},mozi9[]={'w','x','y','z'}; void henkan(char...
a.cc: In function 'void henkan(char*)': a.cc:25:20: error: 'strlen' was not declared in this scope 25 | int length=strlen(keitai); | ^~~~~~ a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<algorithm> ...
s005279168
p01131
C++
#include<iostream> #include<algorithm> #include<string> using namespace std; char const mozi1[]={'.',',','!','?',' '},mozi2[]={'a','b','c'},mozi3[]={'d','e','f'},mozi4[]={'g','h','i'},mozi5[]={'j','k','l'},mozi6[]={'m','n','o'},mozi7[]={'p','q','r','s'},mozi8[]={'t','u','v'},mozi9[]={'w','x','y','z'}; void henkan(char...
a.cc: In function 'void henkan(char*)': a.cc:25:20: error: 'strlen' was not declared in this scope 25 | int length=strlen(keitai); | ^~~~~~ a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<algorithm> ...