submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s364326053
p01125
C++
#include <iostream> #define N 21 using namespace std; ?? int main(){ ????int n,m,x,y,rx,ry,l,cnt,d[N][N]; ????char c; ????while(1){ ????????for(int i=0;i<N;i++) ????????????for(int j=0;j<N;j++) d[i][j]=0; ????????cin>>n; ????????if(!n) break; ????????for(int i=0;i<n;i++) cin>>x>>y,d[N-y-1][x]=1; ????????cin>>m; ???????...
a.cc:4:1: error: expected unqualified-id before '?' token 4 | ?? | ^
s853656225
p01125
C++
#include <iostream> #define N 21 using namespace std; ?? int main(){ ????int n,m,x,y,rx,ry,l,cnt,d[N][N]; ????char c; ????while(1){ ????????for(int i=0;i<N;i++) ????????????for(int j=0;j<N;j++) d[i][j]=0; ????????cin>>n; ????????if(!n) break; ????????for(int i=0;i<n;i++) cin>>x>>y,d[N-y-1][x]=1; ????????cin>>m; ???????...
a.cc:4:1: error: expected unqualified-id before '?' token 4 | ?? | ^
s876827200
p01125
C++
#include <iostream> #include <algorithm> #include <cstdio> #include <cmath> #include <string> #include <cctype> #include <stack> #include <queue> #include <vector> #include <cstdlib> #include <list> using namespace std; #define REP(i,b) for (int i=0;i<(b);i++) #define FORj(j,a,b) for (int j=(a);j<=(b);j++) int main(v...
a.cc: In function 'int main()': a.cc:28:25: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 28 | scanf_s("%d %d", &a, &b); | ^~~~~~~ | scanf a.cc:32:17: error: 'scanf_s' was not declared in this scope; did you ...
s129450115
p01125
C++
#include <iostream> #include <vector> using namespace std; struct Point { int x_, y_; Point() : x_(0), y_(0){} Point(const int &x, const int &y) : x_(x), y_(y){} Point(const Point &pt) { x_ = pt.x_; y_ = pt.y_; } void setPoint(const int &x, const int &y) { x_ =...
a.cc: In function 'int main()': a.cc:78:30: error: 'w' was not declared in this scope 78 | jewel_map[h][w] = false; | ^
s366846408
p01125
C++
include <iostream> #include <vector> int main() { int numGems = 0;; std::cin >> numGems; const int gridSize = 21; std::vector<bool> gems(gridSize * gridSize, false); int gemPointX = 0; int gemPointY = 0; if (numGems == 0) { std::cerr << "NO" << std::endl; return 0; } for (int i = 0; i < numGems; 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/vector:62, from a.cc:2: /usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu...
s319550964
p01125
C++
#include<iostream> #include<string> #include<cmath> #include<queue> #include<vector> #include<bits//stdc++.h> #include<functional> using namespace std; int main() { int n; while(cin>>n&&n!=0){ for(int i=0;i<=20;i++){ for(int j=0;j<=20;j++) a[i][j]=false; } int c,d; for(int i=0;i<n;i++){ cin>>c>>d; a[...
a.cc: In function 'int main()': a.cc:13:48: error: 'a' was not declared in this scope 13 | for(int j=0;j<=20;j++) a[i][j]=false; | ^ a.cc:18:25: error: 'a' was not declared in this scope 18 | a[c][d]=true; |...
s399680693
p01125
C++
#include<iostream> #include<string> #include<cmath> #include<queue> #include<vector> #include<bits//stdc++.h> #include<functional> using namespace std; int main() { int n; while(cin>>n&&n!=0){ for(int i=0;i<=20;i++){ for(int j=0;j<=20;j++) a[i][j]=false; } int c,d; for(int i=0;i<n;i++){ cin>>c>>d; a[...
a.cc: In function 'int main()': a.cc:13:48: error: 'a' was not declared in this scope 13 | for(int j=0;j<=20;j++) a[i][j]=false; | ^ a.cc:18:25: error: 'a' was not declared in this scope 18 | a[c][d]=true; |...
s879115991
p01125
C++
#include <bits/stdc++.h> #include <boost/functional/hash.hpp> #define DEBUG(x) cout<<#x<<": "<<x<<endl; #define DEBUGM(xs) cout<<#xs<<": ";REP(_i,(int)xs.size())cout<<xs[_i]<<", ";cout<<endl; #define REP(i, n) for(int i = 0; i < n; ++i) #define REPR(i, n) for(int i = n; i >= 0; --i) #define FOR(i, m, n) for(int i = m; ...
a.cc:2:10: fatal error: boost/functional/hash.hpp: No such file or directory 2 | #include <boost/functional/hash.hpp> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated.
s156323128
p01125
C++
// // main.cpp // AOJ-2000 // // Created by Kenta Kodera on 2017/06/18. // Copyright ?? 2017??´ Kenta Kodera. All rights reserved. // #include <iostream> #include <stdio.h> #include <algorithm> #include <vector> #include <queue> #include <numeric> #include <string> #include <string.h> #include <map> #include <set>...
a.cc: In function 'int main()': a.cc:53:24: error: no matching function for call to 'find(std::vector<std::pair<int, int> >::iterator, std::vector<std::pair<int, int> >::iterator, <brace-enclosed initializer list>)' 53 | auto itr = find(jewely.begin(), jewely.end(), {nx, ny}); | ~~~~...
s869285116
p01125
C++
#include<iostream> //??°??¢(0??§???????????????1??§??????) int place[21][21]={}; //??????????????°??¨??????????????° int N,M; //??????????????? int mass; char dir[10]; int main() { while (true) { //????????? for (int i = 0; i < 21; i++) { for (int j = 0; j < 21; j++) { place[i][j] = 0; } } //????...
a.cc: In function 'int main()': a.cc:32:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 32 | scanf_s("%d",&M); | ^~~~~~~ | scanf
s635775639
p01125
C++
#include <iostream> using namespace std; int main() { char dir; //direction int x,y,j,k; int dist; //distance int xy[21][21]; while (cin >> j && j){ memset(xy,0,sizeof(xy)); for(int...
a.cc: In function 'int main()': a.cc:10:7: error: 'memset' was not declared in this scope 10 | memset(xy,0,sizeof(xy)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ |+#include <cstring> ...
s184197465
p01125
C++
#include<iostream> using namespace std; bool map[21][21]; int main() { while (1) { int n; cin >> n; if (n == 0) break; memset(map, 0, sizeof(map)); for (int i = 0; i < n; ++i) { int x, y; cin >> x >> y; map[x][y] = true; } ...
a.cc: In function 'int main()': a.cc:13:9: error: 'memset' was not declared in this scope 13 | memset(map, 0, sizeof(map)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> +++ |+#include <cs...
s902125280
p01125
C++
#include<iostream> using namespace std; bool map[21][21]; int main() { while (1) { int n; cin >> n; if (n == 0) break; memset(map, 0, sizeof(map)); for (int i = 0; i < n; ++i) { int x, y; cin >> x >> y; map[x][y] = true; } ...
a.cc: In function 'int main()': a.cc:13:9: error: 'memset' was not declared in this scope 13 | memset(map, 0, sizeof(map)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> +++ |+#include <cs...
s186452767
p01125
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
s909383673
p01125
C++
#include <iostream> #include <vector> #include <map> #define F(a, b) for (int j = a; j < b; j++) using namespace std; typedef pair<int, int> mypair; int main(void) { int n, m; while (1) { cin >> n; if (n == 0) break; vector<vector<int> > t(21, vector<int>(21, 0)); mypair p; int c = 0; int x, y; for ...
a.cc: In function 'int main()': a.cc:26:21: error: 'mypair' {aka 'struct std::pair<int, int>'} has no member named 'first\U0000ff1d10' 26 | now.first=10; | ^~~~~~~~~
s564579648
p01125
C++
#include <iostream> #include <vector> #include <map> #define F(a, b) for (int j = a; j < b; j++) using namespace std; typedef pair<int, int> mypair; int main(void) { int n, m; while (1) { cin >> n; if (n == 0) break; int t[21][21]={} //vector<vector<int> > t(21, vector<int>(21, 0)); mypair p; int c =...
a.cc: In function 'int main()': a.cc:16:38: error: expected initializer before '\U0000ff1d\U0000ff5b\U0000ff5d' 16 | int t[21][21]={} | ^~~~~~ a.cc:24:25: error: 't' was not declared in this scope 24 | t[x][y] = 1; | ...
s812301924
p01125
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
s613674051
p01125
C++
#include<bits/stdc++.h> using namespace std; int main(){ int i, j, k; int q, w; int tempx, tempy, temp2, count; int N, M; char temp1; while(1){ q = 10; w = 10; count = 0; int a[30][30] = {}; cin>>N; if(N == 0) break; for(i = 0; i < N; i++){ cin>>tempx>>tempy; a[tempx][tempy...
a.cc: In function 'int main()': a.cc:71:2: error: expected '}' at end of input 71 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s268412553
p01125
C++
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> int main() { int x = 10, y = 10, i, j; int n, X[10], Y[10], N, vn[10],flag; char dir[10]; //宝石個数n、移動回数N while (1) { flag = 0; scanf_s("%d", &n); if (n == 0) { break; } for (i = 0; i < n; i++) { scanf_s("%d %d", &X[i], &Y[i]); } scanf("%...
a.cc: In function 'int main()': a.cc:10:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 10 | scanf_s("%d", &n); | ^~~~~~~ | scanf
s846484304
p01125
C++
//#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> int main() { int x = 10, y = 10, i, j; int n, X[10], Y[10], N, vn[10],flag; char dir[10]; //宝石個数n、移動回数N while (1) { flag = 0; scanf_s("%d", &n); if (n == 0) { break; } for (i = 0; i < n; i++) { scanf_s("%d %d", &X[i], &Y[i]); } scanf(...
a.cc: In function 'int main()': a.cc:10:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 10 | scanf_s("%d", &n); | ^~~~~~~ | scanf
s673119110
p01125
C++
//#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> int main() { int x = 10, y = 10, i, j; int n, X[10], Y[10], N, vn[10],flag; char dir[10]; //宝石個数n、移動回数N while (1) { flag = 0; scanf("%d", &n); if (n == 0) { break; } for (i = 0; i < n; i++) { scanf_s("%d %d", &X[i], &Y[i]); } scanf("%...
a.cc: In function 'int main()': a.cc:16:25: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 16 | scanf_s("%d %d", &X[i], &Y[i]); | ^~~~~~~ | scanf
s121431472
p01125
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
s808455017
p01125
C++
#include <iostream> using namespace std; int f[21][21]; int main() { int n; while (cin >> n, n) { memset(f, 0, sizeof(f)); for (int i=0; i<n; i++) { int x, y; cin >> x >> y; f[y][x] = 1; } int x=10, y=10; int cnt = 0; int m; cin >> m; for (int i=0; i<m; i++) {...
a.cc: In function 'int main()': a.cc:10:5: error: 'memset' was not declared in this scope 10 | memset(f, 0, sizeof(f)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ |+#include <cstring> ...
s184406118
p01125
C++
#include <iostream> using namespace std; int f[21][21]; int main() { int n; while (cin >> n, n) { memset(f, 0, sizeof(f)); for (int i=0; i<n; i++) { int x, y; cin >> x >> y; f[y][x] = 1; } int x=10, y=10; int cnt = 0; int m; cin >> m; for (int i=0; i<m; i++) {...
a.cc: In function 'int main()': a.cc:10:5: error: 'memset' was not declared in this scope 10 | memset(f, 0, sizeof(f)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ |+#include <cstring> ...
s409394856
p01125
C++
#include <iostream> using namespace std; int f[21][21]; int main() { int n; while (cin >> n, n) { memset(f, 0, sizeof(f)); for (int i = 0; i<n; i++) { int x, y; cin >> x >> y; f[y][x] = 1; } int x = 10, y = 10; int m; cin >> m; for (int i = 0; i<m; i++) { char dir; int step; cin ...
a.cc: In function 'int main()': a.cc:10:17: error: 'memset' was not declared in this scope 10 | memset(f, 0, sizeof(f)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ ...
s949339259
p01125
C++
#include <iostream> using namespace std; int f[21][21]; int main() { int n; while (cin >> n, n) { memset(f, 0, sizeof(f)); for (int i = 0; i<n; i++) { int x, y; cin >> x >> y; f[y][x] = 1; } int x = 10, y = 10; int m; cin >> m; for (int i = 0; i<m; i++) { char dir; int step; cin ...
a.cc: In function 'int main()': a.cc:10:17: error: 'memset' was not declared in this scope 10 | memset(f, 0, sizeof(f)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ ...
s114564353
p01125
C++
#include<iostream> using namespace std; int main() { int a[21][21] = {}; int n; int x, y; while (cin >> n&&n != 0) { for (int i = 0; i < n; i++) { cin >> y >> x; a[y][x] = 1; } int m; x = 10, y = 10; int count = 0; int num; char c; cin>>m; for (m--) { cin >> c >> num; for (int i = 0; i...
a.cc: In function 'int main()': a.cc:18:25: error: expected ';' before ')' token 18 | for (m--) { | ^ | ; a.cc:32:17: error: expected primary-expression before 'if' 32 | if (count == n)cout << "YES" << endl; | ...
s667380136
p01125
C++
#include<iostream> #include<iomanip> #include<cstdlib> #include<math.h> #include<algorithm> #include<string> #include<vector> #include<list> #include<queue> #include<stack> #include<set> #include<map> #define REP(i, N) for(ll i = 0; i < N; ++i) #define ALL(a) (a).begin(),(a).end() #define pb push_back #define INF 10000...
a.cc:101:6: error: stray '#' in program 101 | Case # Verdict CPU Time Memory In Out Case Name | ^ a.cc:102:6: error: stray '#' in program 102 | Case #1 : Accepted 00:00 3076 30428 961 judge_data | ^ a.cc:106:13: error: stray '#' in program 106 | Judge Input ...
s855515479
p01125
C++
#pragma warning( disable : 4996 ) #include <stdio.h> #include <map> #include <vector> typedef unsigned int DWORD; //DWORD //2次元ベクトルクラス class Vector2{ public: Vector2(){ x = y = 0; } Vector2( int _x , int _y ){ x = _x; y = _y; } int x; int y; Vector2 operator +( Vector2 &_Arg ){ Vector2 ret; ...
a.cc: In member function 'DWORD World::GetItemsPosToPos(Vector2, Vector2)': a.cc:164:36: error: cannot bind non-const lvalue reference of type 'Vector2&' to an rvalue of type 'Vector2' 164 | while( _MoveVec != Vector2( 0 , 0 ) ){ | ^~~~~~~~~~~~~~~~ a.cc:68:36: ...
s739836630
p01125
C++
#pragma warning( disable : 4996 ) #include <stdio.h> #include <map> #include <vector> typedef unsigned int DWORD; //DWORD //2次元ベクトルクラス class Vector2{ public: Vector2(){ x = y = 0; } Vector2( int _x , int _y ){ x = _x; y = _y; } int x; int y; Vector2 operator +( Vector2 &_Arg ){ Vector2 ret; ...
a.cc: In function 'int main()': a.cc:252:56: error: 'MoveVec' was not declared in this scope 252 | w.GetItemsPosToPos( Position , MoveVec ); | ^~~~~~~
s221851252
p01125
C++
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 2 | ^
s653396519
p01125
C++
2 10 11 11 12 2 N 2 E 1 2 10 11 11 12 2 N 2 W 1 3 0 15 5 10 5 15 5 W 10 S 10 N 20 E 10 S 10 0
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 2 | ^
s293471283
p01125
C++
while 1: find = False r_pos = [9,9] n = int(raw_input()) if n == 0: break planet = [[0 for j in xrange(20)] for i in xrange(20)] for i in xrange(n): x,y = map(int, raw_input().split()) planet[y-1][x-1] = 1 m = int(raw_input()) for i in xrange(m): d,l = raw_input()...
a.cc:18:14: error: invalid preprocessing directive #print 18 | #print r_pos | ^~~~~ a.cc:23:14: error: invalid preprocessing directive #print 23 | #print r_pos | ^~~~~ a.cc:28:14: error: invalid preprocessing directive #print 28 | #print...
s397605358
p01125
C++
#include <iostream> #include <cstdio> #include <cstdlib> #include <algorithm> #include <vector> #include <complex> using namespace std; #define REP(i, a, b) for (int i = (a); i < (b); i++) #define rep(i, n) REP(i, 0, n) #define MAX 21 int brd[MAX][MAX]; int N; int dx[] = { 0, 0, 1, -1 }; // N S E W int dy[] = { 1, ...
a.cc: In function 'int main()': a.cc:28:17: error: 'memset' was not declared in this scope 28 | memset(brd, 0, sizeof(brd)); | ^~~~~~ a.cc:7:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 6 | #include <complex> +...
s531932616
p01125
C++
#include<iostream> using namespace std; int n,m; const char vec[4]={'N','E','W','S'}; const int dx[4]={ 0 , 1 ,-1 , 0 }; const int dy[4]={ 1 , 0 , 0 , -1}; int gx[20],gy[20]; char v; int vn; int main() { while(cin>>n,n) { for(int i=0;i<n;i++) { cin>>gx[i]>>gy[i]; } cin>>m; int sx=10,sy=10,gnum=0; ...
a.cc: In function 'int main()': a.cc:22:32: error: 'memset' was not declared in this scope 22 | bool flag[20]; memset(flag,false,sizeof flag); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring...
s195018383
p01125
C++
import java.util.Scanner; public class Main { public static void main(String[] args){ int[][] field = new int[21][21]; Scanner sc = new Scanner(System.in); while(true){ int nowx = 10; int nowy = 10; for(int i=0;i<21;i++){ for(int j=0;j<21;j++){ field[i][j] = 0; } } int n = sc.nextInt(...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Scanner; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: expected unqualified-id before 'public' 2 | public class Main { | ^~~~~~
s794775367
p01125
C++
#include<stdio.h> int main(void) { int n,i,m,j,k,robo,robox,roboy,sum; char news; robox=10; roboy=10; for(;;) { scanf("%d",&n); if(n==0){break;} int x[n],y[n],xy[n]; for(i=0;i<n;i++){xy[i]=0;} sum=0; for(i=0;i<n;i++){scanf("%d %d",&x[i],&y[i]);} scanf("%d",&m); ...
a.cc: In function 'int main()': a.cc:25:40: error: expected ';' before '}' token 25 | if(news=='E'){robox=robox+1} | ^ | ; a.cc:26:68: error: expected ';' before '}' token 26 | for(j=0;j<n;j++){if(x[j...
s392072696
p01125
C++
#include<stdio.h> int main(void) { int n,i,m,j,k,robo,robox,roboy,sum; char news; robox=10; roboy=10; for(;;) { scanf("%d",&n); if(n==0){break;} int x[n],y[n],xy[n]; for(i=0;i<n;i++){xy[i]=0;} sum=0; for(i=0;i<n;i++){scanf("%d %d",&x[i],&y[i]);} scanf("%d",&m); ...
a.cc: In function 'int main()': a.cc:40:2: error: expected '}' at end of input 40 | } | ^ a.cc:3:1: note: to match this '{' 3 | { | ^
s818951382
p01125
C++
#include<stdio.h> int main(void) { int n,i,m,j,k,robo,robox,roboy,sum; char news; robox=10; roboy=10; for(;;) { scanf("%d",&n); if(n==0){break;} int x[n],y[n],xy[n]; for(i=0;i<n;i++){xy[i]=0;} sum=0; for(i=0;i<n;i++){scanf("%d %d",&x[i],&y[i]);} scanf("%d",&m); ...
a.cc: In function 'int main()': a.cc:33:2: error: expected '}' at end of input 33 | } | ^ a.cc:3:1: note: to match this '{' 3 | { | ^
s744992666
p01125
C++
#include <iostream> #include <algorithm> #include <vector> #include <queue> #include <cstring> #include <string> #include <cstdlib> #include <cstdio> using namespace std; int d[4][2]={{0,1},{1,0},{0,-1},{-1,0}}; char dc[4] = "NESW"; char Map[25][25]; main(){ int x,y,n,m,i,j; while(cin >> n, n){ int sx, sy; for...
a.cc:13:14: error: initializer-string for 'char [4]' is too long [-fpermissive] 13 | char dc[4] = "NESW"; | ^~~~~~ a.cc:16:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 16 | main(){ | ^~~~
s634306070
p01125
C++
#include <iostream> #include <algorithm> using namespace std; int grid[21][21]; void init(){ int nowx = 10,nowy = 10; for(int i = 0 ; i <= 20 ; i++ ){ for(int j = 0 ; j <= 20 ; j++ ){ grid[j][i] = 0; } } } void serch(int a,int b,int f){ if(a > b)swap(a,b); cout << a << ' ' << b << endl; if(...
a.cc: In function 'void serch(int, int, int)': a.cc:19:40: error: 'nowx' was not declared in this scope 19 | for(int i = a ; i <= b ; i++ )grid[nowx][i] = 0; | ^~~~ a.cc:21:43: error: 'nowy' was not declared in this scope 21 | for(int i = a ; i <= b ; i++ )grid...
s403577743
p01125
C++
#include <iostream> using namespace std; int main() { int N; while (cin >> N && N != 0) { int dia[21][21]; memset(dia, 0, sizeof dia); int x, y; for (int i=0; i<N; ++i) { cin >> x >> y; dia[y][x] = 1; } int trace[21][21]; memset(t...
a.cc: In function 'int main()': a.cc:7:9: error: 'memset' was not declared in this scope 7 | memset(dia, 0, sizeof dia); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ |+#include <cst...
s066449536
p01125
C++
#include <iostream> #include <memory> using namespace std; int main() { int N; while (cin >> N && N != 0) { int gems[21][21]; // 宝石の位置を記録する配列 memset(gems, 0, sizeof gems); int x, y; for (int i=0; i<N; ++i) { cin >> x >> y; gems[y][x] = 1; } ...
a.cc: In function 'int main()': a.cc:8:9: error: 'memset' was not declared in this scope 8 | memset(gems, 0, sizeof gems); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <memory> +++ |+#include <cst...
s807064270
p01125
C++
include <iostream> using namespace std; int N, M, cnt = 0; int Map[21][21]; struct Position{ int x; int y; }robot; void initMap(void){ int i, j; for(i = 0; i < 21; i++){ for(j = 0; j < 21; j++){ Map[i][j] = 0; } } } void setGems(int x, int y){ Map[x][y] = 1; } int main(){ int x, y, step; char dir; ...
a.cc:1:1: error: 'include' does not name a type 1 | include <iostream> | ^~~~~~~ a.cc: In function 'int main()': a.cc:32:17: error: 'cin' was not declared in this scope 32 | cin >> N; | ^~~ a.cc:79:25: error: 'cout' was not declared in this scope 79 | ...
s229984203
p01126
Java
import java.util.ArrayList; import java.util.List; /** * @author ando * */ public class P2001 { public static void main(String[] args) { int now = 1; List<Line> l = new ArrayList<>(); for(String line : args[0].split("\n")) l.add(new Line(line.split(" "))); l.remove(0); java.util.Collections.sort(l); ...
Main.java:8: error: class P2001 is public, should be declared in a file named P2001.java public class P2001 { ^ Main.java:22: error: class Line is public, should be declared in a file named Line.java public class Line implements Comparable<Line> { ^ 2 errors
s127470711
p01126
Java
import java.util.ArrayList; import java.util.List; public class Line implements Comparable<Line> { int hight; int left; int right; public Line(String[] lines) { hight = Integer.valueOf(lines[0]); left = Integer.valueOf(lines[1]); right = Integer.valueOf(lines[2]); } public int transit(int now) { if(n...
Main.java:4: error: class Line is public, should be declared in a file named Line.java public class Line implements Comparable<Line> { ^ Main.java:29: error: class P2001 is public, should be declared in a file named P2001.java public class P2001 { ^ 2 errors
s665583851
p01126
Java
import java.util.ArrayList; import java.util.List; public class Line implements Comparable<Line> { int hight; int left; int right; public Line(String[] lines) { hight = Integer.valueOf(lines[0]); left = Integer.valueOf(lines[1]); right = Integer.valueOf(lines[2]); } public int transit(int now) { if(n...
Main.java:4: error: class Line is public, should be declared in a file named Line.java public class Line implements Comparable<Line> { ^ Main.java:29: error: class P2001 is public, should be declared in a file named P2001.java public class P2001 { ^ 2 errors
s986599004
p01126
Java
import java.util.ArrayList; import java.util.List; public class Main { public static void main(String[] args) { int now = 1; int h = -1; List<Line> l = new ArrayList<Line>(); for(String line : args)) { l.add(new Line(line.split("\\s"))); } l.remove(0); java.util.Collections.sort(l); for(Line ll : l...
Main.java:9: error: illegal start of expression for(String line : args)) { ^ 1 error
s615488674
p01126
Java
import java.io.IOException; import java.nio.ByteBuffer; import java.nio.channels.Channels; import java.nio.channels.ReadableByteChannel; public class Main { public static void main(String[] args) throws IOException { ReadableByteChannel in = Channels.newChannel(System.in); ByteBuffer buf = ByteBuffer.allocate(10...
Main.java:48: error: reached end of file while parsing } ^ 1 error
s880232080
p01126
Java
import java.io.InputStream; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.InputMismatchException; import java.util.NoSuchElementException; import java.math.BigInteger; public class Main{ static PrintWriter out...
Main.java:23: error: cannot find symbol for(int i=0;i<n;i++) ps[i]=i; ^ symbol: variable ps location: class Main 1 error
s688536831
p01126
Java
import java.io.*; import java.util.*; public class Main { public static void main(String[] args) throws IOException { BufferedReader sc = new BufferedReader(new InputStreamReader(System.in)); while (true) { String line = sc.readLine(); String[] lineAry = line.split(" "); int n = Integer.parseInt(lineAry...
Main.java:12: error: ';' expected int m = Integer.parseInt(lineAry[1]) ^ 1 error
s377863754
p01126
Java
import java.util.Scanner; public class amida { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = Integer.parseInt(sc.next()); // ??? int m = Integer.parseInt(sc.next()); // ?¨?????????° int a = Integer.parseInt(sc.next()); // ??????????????? int maxY = 0; int[][] map ...
Main.java:3: error: class amida is public, should be declared in a file named amida.java public class amida { ^ 1 error
s280808000
p01126
Java
import java.util.Scanner; public class Amida { public static void main(String[] args){ Scanner sc = new Scanner(System.in); while(true){ int n = sc.nextInt(); int m = sc.nextInt(); int a = sc.nextInt(); int h[] = new int[m]; int p[] = new int[m]; int q[] = new int[m]; int max...
Main.java:4: error: class Amida is public, should be declared in a file named Amida.java public class Amida { ^ 1 error
s803127984
p01126
Java
import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.*; public class Main{ static int N, D, money; static int[] prices; private static int solve(){ int answer = 0; if (prices[0] * 2 > money) return 0; if (prices[prices.length - 1] + prices[prices.length - 2] <= m...
Main.java:36: error: cannot find symbol } catch(IOException e){} ^ symbol: class IOException location: class Main 1 error
s304169496
p01126
C
#include <iostream> #include <cstdio> using namespace std; int main() { int n, m, a; int line[1024][128] = {0}; while (1){ cin >> n >> m >> a; if (!n && !m && !a){ break; } for (int i = 0; i < m; i++){ int h, p, q; cin >> h >> p >> q; line[h][p] = q; line[h][q] = p; } for ...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s243513040
p01126
C
#include <stdio.h> #include <stdlib.h> int cmp(const void *a,const void *b){ return *(struct data)b.h-*(struct data)a.h; } int main(void) { int i=0,tmp,d[101]; int n,m,a; struct data{ int h,p,q; }b[1000]; while(scanf("%d%d%d",&n,&m,&a),n){ for(i=0;i<m;i++){ scanf("%d%d%d",&b[i].h,&b[i].p,&...
main.c: In function 'cmp': main.c:5:25: error: request for member 'h' in something not a structure or union 5 | return *(struct data)b.h-*(struct data)a.h; | ^ main.c:5:43: error: request for member 'h' in something not a structure or union 5 | return *(struct data)b.h-*(struct...
s384748071
p01126
C
#include <stdio.h> #include <stdlib.h> struct data{ int h,p,q; }b[1000]; int cmp(const void *a,const void *b){ return *(struct data)b.h-*(struct data)a.h; } int main(void) { int i=0,tmp,d[101]; int n,m,a; while(scanf("%d%d%d",&n,&m,&a),n){ for(i=0;i<m;i++){ scanf("%d%d%d",&b[i].h,&b[i].p,...
main.c: In function 'cmp': main.c:9:25: error: request for member 'h' in something not a structure or union 9 | return *(struct data)b.h-*(struct data)a.h; | ^ main.c:9:43: error: request for member 'h' in something not a structure or union 9 | return *(struct data)b.h-*(struct...
s660621458
p01126
C
#include <stdio.h> #include <stdlib.h> struct data{ int h,p,q; }b[1000]; int cmp(const void *a,const void *b){ return (*(struct data)b).h-(*(struct data)a).h; } int main(void) { int i=0,tmp,d[101]; int n,m,a; while(scanf("%d%d%d",&n,&m,&a),n){ for(i=0;i<m;i++){ scanf("%d%d%d",&b[i].h,&b[i...
main.c: In function 'cmp': main.c:9:20: error: conversion to non-scalar type requested 9 | return (*(struct data)b).h-(*(struct data)a).h; | ^~~~ main.c:9:40: error: conversion to non-scalar type requested 9 | return (*(struct data)b).h-(*(struct data)a).h; | ...
s538104987
p01126
C
#include <stdio.h> #include <stdlib.h> struct data{ int h,p,q; }b[1000]; int cmp(const void *a,const void *b){ return (struct data *)b.h-(struct data *)a.h; } int main(void) { int i=0,tmp,d[101]; int n,m,a; while(scanf("%d%d%d",&n,&m,&a),n){ for(i=0;i<m;i++){ scanf("%d%d%d",&b[i].h,&b[i].p,&b[i...
main.c: In function 'cmp': main.c:9:26: error: request for member 'h' in something not a structure or union 9 | return (struct data *)b.h-(struct data *)a.h; | ^ main.c:9:45: error: request for member 'h' in something not a structure or union 9 | return (struct data *)b.h-(str...
s920856845
p01126
C
#include <stdio.h> #include <stdlib.h> struct data{ int h,p,q; }b[1000]; int cmp(const void *a,const void *b){ return (struct data *)b->h-(struct data *)a->h; } int main(void) { int i=0,tmp,d[101]; int n,m,a; while(scanf("%d%d%d",&n,&m,&a),n){ for(i=0;i<m;i++){ scanf("%d%d%d",&b[i].h,&b[i].p,&b...
main.c: In function 'cmp': main.c:9:26: warning: dereferencing 'void *' pointer 9 | return (struct data *)b->h-(struct data *)a->h; | ^~ main.c:9:26: error: request for member 'h' in something not a structure or union main.c:9:46: warning: dereferencing 'void *' pointer 9 | re...
s759798344
p01126
C
#include <stdio.h> #define HEIGHT_MAX 1000 #define N_MAX 100 int main(int argc, char **argv) { char input line[14]; int n, m, line_a; int height, line_p, line_q; int i, j; int roof; int map[N_MAX][HEIGHT_MAX]; while( 1 ){ roof = 0; for( i = 0; i < 100; i++){ for( j = 0; j < 1000; j++) map[i][j] =...
main.c: In function 'main': main.c:11:25: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'line' 11 | char input line[14]; | ^~~~ main.c:11:25: error: 'line' undeclared (first use in this function) main.c:11:25: note: each undeclared identifier is reported on...
s492036754
p01126
C++
#include <bits/stdc++.h> using namespace std; #define FOR( i, m, n ) for( int (i) = (m); (i) < (n); (i)++ ) #define REP( i, n ) FOR( i, 0, n ) #define ALL( a ) (a).begin(), (a).end() struct HL { int h; int p; int q; }; int main() { while( 1 ) { int n, m, a; cin >> n >> m >> a; if( n ...
a.cc: In function 'int main()': a.cc:41:35: error: expected '}' at end of input 41 | cout << a << endl; | ^ a.cc:15:20: note: to match this '{' 15 | while( 1 ) { | ^ a.cc:41:35: error: expected '}' at end of input 41 | ...
s240849994
p01126
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
s143674240
p01126
C++
#include <iostream> #include <cstdio> using namespace std; int line[1024][128]; int main() { int n, m, a; while (1){ cin >> n >> m >> a; if (!n && !m && !a){ break; } memset(line, 0, sizeof(line)); for (int i = 0; i < m; i++){ int h, p, q; cin >> h >> p >> q; line[h][p] = q; ...
a.cc: In function 'int main()': a.cc:19:17: error: 'memset' was not declared in this scope 19 | memset(line, 0, sizeof(line)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <cstdio> ...
s240474232
p01126
C++
#include <iostream> #include <vector> using namespace std; int main(void) { int n, m, a, h, p, q, i; vector<vector<int> > bar; cin >> n >> m >> a; for (i = 0; i < m; i++) { cin >> h >> p >> q; vector<int> b; b.push_back(h); b.push_back(p); b.push_back(q); bar.push_back(b...
a.cc: In function 'int main()': a.cc:17:5: error: 'sort' was not declared in this scope; did you mean 'short'? 17 | sort(bar.begin(), bar.end()); | ^~~~ | short
s734694330
p01126
C++
#include <iostream> #include <vector> #include <cstdio> using namespace std; vector <int> ami[100][100]; int hi[1000]; int n,m,a,mh; int kuji(int x,int h) { //cout << "start kuji()"<<endl; int t; int fl = 0; int i; // cout << "h = "<< h << endl; // cout << "x = " << x << endl; mh = -1; fl == 0; i...
a.cc:89:1: error: 'n' does not name a type 89 | n;i++) | ^ a.cc:89:3: error: 'i' does not name a type 89 | n;i++) | ^ a.cc:90:19: error: 'j' does not name a type 90 | for(int j=0;j<n;j++) | ^ a.cc:90:23: error: 'j' does not name a type 90 | for(int j=0;j<n;j...
s866939755
p01126
C++
#include <iostream> #include <vector> #include <cstdio> using namespace std; vector <int> ami[100][100]; int hi[1000]; int n,m,a,mh; int kuji(int x,int h) { //cout << "start kuji()"<<endl; int t; int fl = 0; int i; // cout << "h = "<< h << endl; // cout << "x = " << x << endl; mh = -1; fl == 0; i...
a.cc:87:1: error: expected unqualified-id before '[' token 87 | [j].clear(); | ^ a.cc:89:3: error: expected declaration before '}' token 89 | } | ^ a.cc:91:3: error: expected unqualified-id before 'return' 91 | return 0; | ^~~~~~ a.cc:93:1: error: expected declaration before '}' token...
s896705307
p01126
C++
#include<iostream> #include<vector> using namespace std; int main(){ int n,m,a,h,p,q; while(cin>>n>>m>>a,n){ vector<pair<int, int> > v; vector<vector<pair<int,int> > > vec; for(int i=0;i<n+2;i++)vec.push_back(v); for(int i=0;i<m;i++){ cin>>h>>p>>q; ...
a.cc: In function 'int main()': a.cc:18:13: error: 'sort' was not declared in this scope; did you mean 'short'? 18 | sort(vec[i].begin(),vec[i].end()); | ^~~~ | short
s292180101
p01126
C++
#include <stdio.h> #include <tchar.h> #include<iostream> using namespace std; int main() { int n, m, a; while (cin >> n >> m >> a && n != 0 && m != 0 && a != 0) { int line[1000 + 10][100 + 10] = {}; int h, p, q; for (int i = 0; i < m; i++) { cin >> h >> p >> q; line[m - h + 1][p] = 1; line[m - h + ...
a.cc:2:10: fatal error: tchar.h: No such file or directory 2 | #include <tchar.h> | ^~~~~~~~~ compilation terminated.
s898687933
p01126
C++
#include<algorithm> using namespace std; int x[1180][118][118],n,m,p,a,b,c; int main(){ while(true){ memset(x,0,sizeof(x)); cin>>n>>m>>p;if(!n){break;} for(int i=0;i<m;i++){ cin>>a>>b>>c; x[a][b][c]=1;x[a][c][b]=1; } for(int i=1000;i>0;i--){ for(int j=1;j<=n;j++){ if(x[i][p][j]==1){ p=j; ...
a.cc: In function 'int main()': a.cc:6:17: error: 'memset' was not declared in this scope 6 | memset(x,0,sizeof(x)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<algorithm> +++ |+#...
s620693890
p01126
C++
#include "bits/stdc++.h" #include<unordered_map> #pragma warning(disable:4996) using namespace std; const int My_Inf=2147483647; const long long int My_LInf=9223372036854775807; struct aa { int h; int p; int q; }; int main() { int N, M, A; cin >> N >> > M >> A; vector<aa>aas; for (int i = 0; i < M; ++i) { int ...
a.cc: In function 'int main()': a.cc:14:34: error: expected primary-expression before '>' token 14 | int N, M, A; cin >> N >> > M >> A; | ^
s201352708
p01126
C++
int main(){ int n,m,a; while(cin>>n>>m>>a){ if(n==0) break; int ys[3][m],hmax; for(int i=0;i<m;i++){ cin>>ys[0][i]>>ys[1][i]>>ys[2][i]; hmax=max(hmax,ys[0][i]); } for(int i=hmax;i>0;i--){ for(int j=0;j<m;j++){ if(ys[0][j]==i){ if(ys[1][j]==a){ a=ys[2][j]; goto end; } ...
a.cc: In function 'int main()': a.cc:3:15: error: 'cin' was not declared in this scope 3 | while(cin>>n>>m>>a){ | ^~~ a.cc:8:30: error: 'max' was not declared in this scope; did you mean 'hmax'? 8 | hmax=max(hmax,ys[0][i]); | ...
s894780102
p01126
C++
currentPlace = [] array = [] height = 0 start = 0 abs_len = 0 def get_input(): array = [] N = [] while True: try: str1,str2,str3 = input().split() int1,int2,int3 = int(str1),int(str2),int(str3) if int1 == 0 and int2 == 0 and int3 == 0: break ...
a.cc:20:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes 20 | if __name__ == '__main__': | ^~~~~~~~~~ a.cc:22:6: error: invalid preprocessing directive #print 22 | #print(array) | ^~~~~ a.cc:24:10: error: invalid preprocessing directive #prin...
s263419695
p01126
C++
#include <iostream> using namespace std; int main(){ while(1){ int n,m,a; cin >> n >> m >> a; if(n==0&&m==0&&a==0) break; int i=0; pair<int, pair<int,int> > line[1001]; for(i=0;i<m;i++){ int h,p,q; cin >> h >> p >> q; line[i] = make_pair(h, make_pair(p,q)); } sort(line,line+m,greater<pair<int, ...
a.cc: In function 'int main()': a.cc:21:9: error: 'sort' was not declared in this scope; did you mean 'short'? 21 | sort(line,line+m,greater<pair<int, pair<int,int> > >()); | ^~~~ | short
s395949259
p01126
C++
#include <iostream> using namespace std; int main(){ while(1){ int n,m,a; cin >> n >> m >> a; if(n==0&&m==0&&a==0) break; int i=0; pair<int, pair<int,int> > line[1001]; for(i=0;i<m;i++){ int h,p,q; cin >> h >> p >> q; line[i] = make_pair(h, make_pair(p,q)); } sort(line,line+m,greater<pair<int, ...
a.cc: In function 'int main()': a.cc:21:9: error: 'sort' was not declared in this scope; did you mean 'short'? 21 | sort(line,line+m,greater<pair<int, pair<int,int> > >()); | ^~~~ | short
s301846171
p01126
C++
#include <iostream> using namespace std; int main(){ while(1){ int n,m,a; cin >> n >> m >> a; if(n==0&&m==0&&a==0) break; int i=0; pair<int, pair<int,int> > line[1001]; for(i=0;i<m;i++){ int h,p,q; cin >> h >> p >> q; line[i] = make_pair(h, make_pair(p,q)); } sort(line,line+m,greater<pair<int, ...
a.cc: In function 'int main()': a.cc:21:9: error: 'sort' was not declared in this scope; did you mean 'short'? 21 | sort(line,line+m,greater<pair<int, pair<int,int> > >()); | ^~~~ | short
s696952982
p01126
C++
#include <iostream> using namespace std; int main(){ while(1){ int n,m,a; cin >> n >> m >> a; if(n==0&&m==0&&a==0) break; int i=0; pair<int, pair<int,int> > line[1001]; for(i=0;i<m;i++){ int h,p,q; cin >> h >> p >> q; line[i] = make_pair(h, make_pair(p,q)); } sort(line,line+m,greater<pair<int, ...
a.cc: In function 'int main()': a.cc:21:9: error: 'sort' was not declared in this scope; did you mean 'short'? 21 | sort(line,line+m,greater<pair<int, pair<int,int> > >()); | ^~~~ | short
s821833749
p01126
C++
#include<queue> #include<map> using namespace std; int main(){ while(1){ int n,m,a,ans,max=0; priority_queue<pair<int,pair<int,int > > > b; cin>>n>>m>>a; if(n+m+a==0)break; for(int i=0;i<m;i++){ int h,p,q; cin>>h>>p>>q; b.push(make_pair(h,make_pair(p,q))); if(h>max)max=h; ...
a.cc: In function 'int main()': a.cc:8:5: error: 'cin' was not declared in this scope 8 | cin>>n>>m>>a; | ^~~ a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 2 | #include<map> +++ |+#include <iostream> 3 | using namespace...
s481380947
p01126
C++
#include <iostream> #include <cstdio> using namespace std; int main() { int field[1111][111]; while (true) { int n, m, a; scanf("%d %d %d",&n,&m,&a); if (n==0 && m==0 && a==0) { break; } memset(field,0,sizeof(field)); int st=0; for (int i=0; i...
a.cc: In function 'int main()': a.cc:13:9: error: 'memset' was not declared in this scope 13 | memset(field,0,sizeof(field)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <cstdio> +++ |+#include <c...
s182927645
p01126
C++
#include<bits/stdc++.h> using namespace std; #define REP(i,n) for(int i=0;i<(n);i++) #define ALL(v) (v).begin(),(v).end() #define pb push_back typedef long long ll; typedef pair<int,int> P; template<typename A,typename B> inline void chmin(A &a,B b){if(a>b) a=b;} template<typename A,typename B> inline void chmax(A &a...
a.cc: In function 'int main()': a.cc:19:12: error: 'n' was not declared in this scope; did you mean 'yn'? 19 | while(cin>>n>>m>>a,n|m|a) | ^ | yn a.cc:19:15: error: 'm' was not declared in this scope; did you mean 'tm'? 19 | while(cin>>n>>m>>a,n|m|a) | ^ ...
s518365703
p01126
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; struct lines { int h; //横線の高さ int p, q; //横線に繋がる縦線の番号 ...
a.cc:10:17: error: stray '#' in program 10 | bool operator<#(const lines &left) const { | ^ In file included from /usr/include/c++/14/string:49, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, f...
s043117191
p01126
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; struct lines { int h; //横線の高さ int p, q; //横線に繋がる縦線の番号 ...
In file included from /usr/include/c++/14/string:49, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/includ...
s242383794
p01126
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; struct lines { int h; //横線の高さ int p, q; //横線に繋がる縦線の番号 ...
In file included from /usr/include/c++/14/string:49, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/includ...
s283100855
p01126
C++
Last login: Sun Mar 18 21:58:19 on ttys000 Risa-no-MacBook:~ Risa$ cd Desktop/code/ Risa-no-MacBook:code Risa$ mkdir 2001 Risa-no-MacBook:code Risa$ cd 2001.cpp -bash: cd: 2001.cpp: No such file or directory Risa-no-MacBook:code Risa$ cd 2001 Risa-no-MacBook:2001 Risa$ emacs 2001.cpp Risa-no-MacBook:2001 Risa$ g++ -o 2...
a.cc:21:46: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes 21 | 2001.cpp:17:12: error: member reference type 'lines' is not a pointer; did you mean to use '.'? | ^~~~~~~ a.cc:25:40: warning: multi-character literal with 5 characters...
s904636591
p01126
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
s421564104
p01126
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
s755685393
p01126
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
s241829223
p01126
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
s361707614
p01126
C++
#include<bits/stdc++.h> using namespace std; #define inf 1e9 #define ll long long #define ull unsigned long long #define M 1000000007 #define P pair<int,int> #define PLL pair<ll,ll> #define FOR(i,m,n) for(int i=m;i<n;i++) #define RFOR(i,m,n) for(int i=m;i>=n;i--) #define rep(i,n) FOR(i,0,n) #define rrep(i,n) RFOR(i,n,0...
a.cc: In function 'void search(int, int, int)': a.cc:26:10: error: 'h' was not declared in this scope 26 | rrep(i,h){ | ^ a.cc:10:31: note: in definition of macro 'RFOR' 10 | #define RFOR(i,m,n) for(int i=m;i>=n;i--) | ^ a.cc:26:3: note: in expansion of macro '...
s134851536
p01126
C++
import java.io.IOException; import java.util.Scanner; public class Main { public static void main(String[] args) throws NumberFormatException, IOException{ // インプットデータ取得 Scanner sc = new Scanner(System.in); while(true) { int n_tatesen = sc.nextInt();//2 int m_yokosen = sc.nextInt();/...
a.cc:4:1: error: 'import' does not name a type 4 | import java.io.IOException; | ^~~~~~ a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:5:1: error: 'import' does not name a type 5 | import java.util.Scanner; | ^~~~~~ a.cc:5:1: note: C++20 'import' only available with '-fmodule...
s624785149
p01126
C++
#include<bits/stdc++.h> #define rep(i,n) for(int i=0; i<n; i++) using namespace std; typedef pair<int,int> P; int main(){ int n,m,a; while(cin >> n >> m >> a,n){ a--; int h,p,q;   vector<P> v[1000]; rep(i,m){ cin >> h >> p >> q; v[h-1].push_back(P(p-1,q-1)); } rep(i,1000){ int...
a.cc:11:1: error: extended character   is not valid in an identifier 11 |   vector<P> v[1000]; | ^ a.cc:11:1: error: extended character   is not valid in an identifier a.cc: In function 'int main()': a.cc:11:1: error: '\U00003000\U00003000vector' was not declared in this scope 11 |   vector<P> v[1000]; ...
s451349286
p01126
C++
#include <iostream> #include <stdio.h> using namespace std; struct HL{ int h,p,q; }hl[1001]; int main(){ int n, m ,a; while(1){ memset( hl , 0 , sizeof(hl) ); cin >> n >> m >> a; if(n==0 && m==0 && a==0) break; for(int i=0 ; i<m ; i++){ cin >> hl[i].h >> hl[i].p >> hl[i].q; } for(int h=1000 ; h...
a.cc: In function 'int main()': a.cc:14:17: error: 'memset' was not declared in this scope 14 | memset( hl , 0 , sizeof(hl) ); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> ...
s444696060
p01126
C++
/* * 2001.cpp * * Created on: 2012/06/24 * Author: shimomire */ #include <iostream> #include<string> #include <complex> #include<list> #include<float.h> #include <functional> #include <vector> #include <map> #include <hash_map.h> #include <queue> using namespace std; #define REP(i,b,n) for(int i=b;i<n;i++) ...
a.cc:15:10: fatal error: hash_map.h: No such file or directory 15 | #include <hash_map.h> | ^~~~~~~~~~~~ compilation terminated.
s466923665
p01126
C++
#include<iostream> #include<algorithm> using namespace std; class Line{ public: int h,p,q; friend istream& operator>>(istream &in,Line &a){ in>>a.h>>a.p>>a.q; return in; } }; bool greater(Line a,Line b){ return b.h<a.h; } int main(){ int n,m,a; Line line[1000]; while(cin>>n>>m>>a,n|m|a){ for(int i=0;i<m;i...
a.cc: In function 'int main()': a.cc:21:34: error: reference to 'greater' is ambiguous 21 | sort(line,line+m,greater); | ^~~~~~~ In file included from /usr/include/c++/14/string:49, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s174291902
p01126
C++
#include<iostream> #include<vector> using namespace std; struct Line{ int h,p,q; Line(){} Line(int h,int p,int q):h(h),p(p),q(q){} bool operator <(Line x)const{return h>x.h;} }; int main(){ int n,m,a; while(cin>>n>>m>>a,n|m|a){ vector<Line> line; for(int i=0;i<m;i++){ int h,p,q; cin>>h>>p>>q; line.p...
a.cc: In function 'int main()': a.cc:20:17: error: 'sort' was not declared in this scope; did you mean 'short'? 20 | sort(line.begin(),line.end()); | ^~~~ | short
s410550477
p01126
C++
#include <iostream> using namespace std; int main(){ while( 1 ){ int n, m, a; int lottery[1001][101]; memset( lottery, 0, sizeof(lottery) ); cin >> n >> m >> a; if( n == 0 ) break; while( m-- > 0 ){ int h, p, q; cin >> h >> p >> q; lottery[1000-h][p] = q; lottery[1000-h][q] = p; } for( int ...
a.cc: In function 'int main()': a.cc:7:17: error: 'memset' was not declared in this scope 7 | memset( lottery, 0, sizeof(lottery) ); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <ios...
s880908867
p01126
C++
#include <iostream> #include <algorithm> using namespace std; int main(){ while( 1 ){ int n, m, a; int lottery[1001][101]; memset( lottery, 0, sizeof(lottery) ); cin >> n >> m >> a; if( n == 0 ) break; while( m-- > 0 ){ int h, p, q; cin >> h >> p >> q; lottery[1000-h][p] = q; lottery[1000-h][q]...
a.cc: In function 'int main()': a.cc:8:17: error: 'memset' was not declared in this scope 8 | memset( lottery, 0, sizeof(lottery) ); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <alg...
s612495182
p01126
C++
#include <iostream> #include <algorithm> #include <vector> #define rep(i, n) for (int i = 0; i < n; ++i) #define X first #define Y second using namespace std; typedef pair<int, int> PII; typedef pair<int, PII> P; typedef vector<P> VP; int main ( void ) { int n, m, a while (cin >> n >> m >> a, n|m|a) { VP li...
a.cc: In function 'int main()': a.cc:18:3: error: expected initializer before 'while' 18 | while (cin >> n >> m >> a, n|m|a) { | ^~~~~
s784689685
p01126
C++
#include <iostream> #include <algorithm> #include <vector> #define rep(i, n) for (int i = 0; i < n; ++i) #define X first #define Y second using namespace std; typedef pair<int, int> PII; typedef pair<int, PII> P; typedef vector<P> VP; int main ( void ) { int n, m, a; while (cin >> n >> m >> a, n|m|a) { VP l...
a.cc: In function 'int main()': a.cc:20:32: error: no match for 'operator=' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, std::pair<int, int> > >, std::pair<int, std::pair<int, int> > >::value_type' {aka 'std::pair<int, std::pair<int, int> >'} and 'int') 20 | rep (i, n) { result[i] ...
s171939960
p01126
C++
import java.util.ArrayList; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); ArrayList<Integer> ans = new ArrayList<Integer>(); while(true){ int n = sc.nextInt(); int m = sc.nextInt(); int a = sc.nextInt(); if(n==0 && m=...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.ArrayList; | ^~~~~~ 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.util.Scanner; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodule...