submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s296502385
p01294
C++
#include<cstdio> #include<vector> #include<queue> #include<utility> #include<climits> using namespace std; typedef long long ll; typedef pair<long, pair<int, int> > P; int main(){ int n,d; while(scanf("%d%d", &n, &d) && n){ vector<ll> missile[n]; int m; ll min_ = LLONG_MAX, max_ = 0LL...
a.cc: In function 'int main()': a.cc:55:25: error: 'min_element' was not declared in this scope 55 | min_ = *min_element(v.begin(), v.end()); | ^~~~~~~~~~~ a.cc:58:25: error: 'max_element' was not declared in this scope 58 | max_ = *max_element(v.begin...
s993036170
p01295
Java
public class Main { private void run() { Scanner sc = new Scanner(System.in); for(;;) { long n = sc.nextLong(); int k = sc.nextInt(); if(n+k==0) ...
Main.java:5: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:5: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner locati...
s715135655
p01295
C++
# -*- coding: utf-8 -*- import sys import math while True: a,b = map(int,raw_input().split(' ')) if (a == 0 and b == 0): sys.exit() res = "" for i in range(a,a+b): res += str(i); ans = "" for i in range(a,a+b): ans+=res[i-a] print ans
a.cc:1:3: error: invalid preprocessing directive #- 1 | # -*- coding: utf-8 -*- | ^ a.cc:3:1: error: 'import' does not name a type 3 | import sys | ^~~~~~ a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:12:5: error: 'ans' does not name a type 12 | ans = "" | ...
s278629711
p01295
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: In function 'int main()': a.cc:47:89: error: narrowing conversion of '8888888890' from 'long int' to 'int' [-Wnarrowing] 47 | int border[] = { 1, 10, 190, 2890, 38890, 488890, 5888890, 68888890, 788888890, 8888888890 }; | ...
s040237299
p01295
C++
import java.util.*; import java.math.*; class Main{ public static void main(String[] args){ Solve s = new Solve(); s.solve(); } } class Solve{ Solve(){} Scanner in = new Scanner(System.in); void solve(){ while(in.hasNext()){ int n = in.nextInt(), m = in.nextInt(); if(n == 0 && m == 0) return; ...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*; | ^~~~~~ 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.math.*; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:5:1...
s512919973
p01295
C++
#!/usr/bin/env python from collections import deque import itertools as it import sys sys.setrecursionlimit(1000000) def d_num(num): ret = 0 s = str(num) d = len(s) if d == 1: return num for i in range(d - 1): ret += (i + 1) * 9 * 10 ** i return ret + d * (num - 10 ** (d - 1) ...
a.cc:1:2: error: invalid preprocessing directive #! 1 | #!/usr/bin/env python | ^ a.cc:33:5: error: empty character constant 33 | ''' | ^~ a.cc:33:7: warning: missing terminating ' character 33 | ''' | ^ a.cc:33:7: error: missing terminating ' character a.cc:34:9: error: e...
s043354201
p01296
C++
#include<map> #include<cstdio> #include<vector> #define rep(i,n) for(int i=0;i<(n);i++) using namespace std; const int dx[]={1,0,-1,0},dy[]={0,-1,0,1}; struct Point{ int x,y; bool operator<(const Point &p)const{ return make_pair(x,y)<make_pair(p.x,p.y); } }; typedef pair<Point,Point> Futon; int n,mark[40000]; v...
a.cc: In function 'bool issame(int, int)': a.cc:22:34: error: 'abs' was not declared in this scope 22 | bool issame(int u,int v){ return abs(u-v)==n; } | ^~~
s871879185
p01298
C
// AOJ 2180: Water Tank // 2017.11.03 bal4u@uu #include <stdio.h> #include <stdlib.h> #include <math.h> #define EPS 1e-9 int n, l, s[86402], t[86402], u[86402]; int check(double *v, double a) { int i, x; double e; for (e = *v, x = 0, i = 0; i < n; i++) { e = min(l, e + a*(s[i]-x)); x = s[i]; e = min(l, e +...
main.c: In function 'check': main.c:17:21: error: implicit declaration of function 'min'; did you mean 'fmin'? [-Wimplicit-function-declaration] 17 | e = min(l, e + a*(s[i]-x)); | ^~~ | fmin
s948218769
p01298
C
#include <iostream> #include <iomanip> #include <sstream> #include <cstdio> #include <string> #include <vector> #include <algorithm> #include <complex> #include <cstring> #include <cstdlib> #include <cmath> #include <cassert> #include <climits> #include <queue> #include <set> #include <map> #include <valarray> #include...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s841706308
p01298
C++
#include<bits/stdc++.h> #define MAX 86400 #define inf 1e17 using namespace std; int n; int s[MAX]; double lim; bool ok(double m){ double c=0; for(int i=0;i<MAX;i++){ c-=s[i]; c+=m; c=min(c,lim) if(c<0)return false; } return true; } int main() { while(1){ cin>>n>>lim; if(n+lim==0)bre...
a.cc: In function 'bool ok(double)': a.cc:15:17: error: expected ';' before 'if' 15 | c=min(c,lim) | ^ | ; 16 | if(c<0)return false; | ~~
s031575516
p01298
C++
#include <bits/stdc++.h> using namespace std; #define FOR(i,k,n) for(int i = (int)(k); i < (int)(n); i++) #define REP(i,n) FOR(i,0,n) #define ALL(a) a.begin(), a.end() #define MS(m,v) memset(m,v,sizeof(m)) typedef long long ll; typedef long double ld; typedef vector<int> vi; typedef vector<string> vs; typedef pair<int,...
a.cc: In function 'int main()': a.cc:65:17: error: jump to label 'end' 65 | end:; | ^~~ a.cc:48:46: note: from here 48 | goto end; | ^~~ a.cc:51:28: note: crosses initialization of ...
s530399463
p01298
C++
#include<bits/stdc++.h> using namespace std; using Int = long long; signed main(){ Int n; double l; while(cin>>n>>l,n){ vector<double> s(n),t(n),u(n); for(Int i=0;i<n;i++) cin>>s[i]>>t[i]>>u[i]; auto check2=[&](double x,double y){ y=min(y+x*s[0],l); for(Int i=0;i<n;i++){ y+=(x-u[i])*(t[i]...
a.cc: In lambda function: a.cc:20:14: error: inconsistent types 'int' and 'double' deduced for lambda return type 20 | return y; | ^
s414962027
p01298
C++
#include "bits/stdc++.h" using namespace std; typedef long long ll; typedef pair<int,int> P; const double EPS = 1e-12; const int INF = numeric_limits<int>::max()/2; const int MOD = 1e9+7; vector<double> cap(200000,0); int main(){ cin.tie(0); ios::sync_with_stdio(false); int n; while(cin>>n,n){ ...
a.cc: In function 'int main()': a.cc:29:17: error: 'k' was not declared in this scope 29 | for(k=0;k<50;k++){ | ^
s761041498
p01298
C++
#include<iostream> #include<vector> #include<algorithm> using namespace std; #define REP(i,b,n) for(int i=b;i<n;i++) #define rep(i,n) REP(i,0,n) const double eps = 1e-7; class Info{ public: int s,e,c,time; double consume; Info(){}; Info(int ts,int te,int tc):s(ts),e(te),c(tc){ consume=e-s; consume*=(d...
a.cc: In function 'double solve(std::vector<Info>&, double)': a.cc:48:3: error: 'assert' was not declared in this scope 48 | assert(ret>eps); | ^~~~~~ a.cc:4:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>' 3 | #include<algorithm> +++ |+#incl...
s149356278
p01298
C++
#include<iostream> #include<vector> #include<algorithm> using namespace std; #define REP(i,b,n) for(int i=b;i<n;i++) #define rep(i,n) REP(i,0,n) const double eps = 1e-10; class Info{ public: int s,e,c,time; double consume; Info(){}; Info(int ts,int te,int tc):s(ts),e(te),c(tc){ consume=e-s; consume*=(...
a.cc:52:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 52 | main(){ | ^~~~ a.cc:66:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 66 | main(){ | ^~~~ a.cc:66:1: error: redefinition of 'int main()' a.cc:52:1: note: 'int main()' previously ...
s249397281
p01298
C++
#include <iostream> #include <vector> #include <map> #include <cstdio> using namespace std; int n; double l; vector<Event> ev; bool simulate(double pump) { double tank = l,vol = pump; int t = 0; //first day for(int i=0; i<ev.size(); ++i) { tank = min(tank + vol * (ev[i].time - t), l); ...
a.cc:9:8: error: 'Event' was not declared in this scope 9 | vector<Event> ev; | ^~~~~ a.cc:9:13: error: template argument 1 is invalid 9 | vector<Event> ev; | ^ a.cc:9:13: error: template argument 2 is invalid a.cc: In function 'bool simulate(double)': a.cc:16:23: error: request f...
s555548631
p01299
C++
/* ??????????????¬ */ #include <complex> typedef long double ld; typedef complex<ld> Point; #define REP(i,n) for(int i=0;i<(int)(n);i++) #define ALL(x) (x).begin(),(x).end() const ld pi = acos(-1.0); const ld dtop = pi / 180.; const ld ptod = 1. / dtop; namespace std { bool operator<(const Point &lhs, const Poin...
a.cc:7:9: error: 'complex' does not name a type 7 | typedef complex<ld> Point; | ^~~~~~~ a.cc:17:30: error: 'Point' does not name a type 17 | bool operator<(const Point &lhs, const Point &rhs) { | ^~~~~ a.cc:17:48: error: 'Point' does not name a type 17...
s356678819
p01299
C++
(auto g : goals) { ans = max(ans, g.second); } cout << ans << endl; } return 0; }
a.cc:1:2: error: expected unqualified-id before 'auto' 1 | (auto g : goals) { | ^~~~ a.cc:1:2: error: expected ')' before 'auto' 1 | (auto g : goals) { | ~^~~~ | ) a.cc:4:17: error: 'cout' does not name a type 4 | cout << ans << endl; | ^~~~ a.cc:5:9...
s980966160
p01299
C++
int main() { while (1) { int N; cin >> N; if (!N)break; int sx, sy, tx, ty; cin >> sx >> sy >> tx >> ty; Point start(sx, sy); Point goal(tx, ty); vector<Circle>cs; for (int i = 0; i < N; ++i) { int x, y, r; cin >> x >> y >> r; cs.emplace_back(Point(x, y), r); } vector<pair<Circle, int>>starts, ...
a.cc: In function 'int main()': a.cc:3:24: error: 'cin' was not declared in this scope 3 | int N; cin >> N; | ^~~ a.cc:6:17: error: 'Point' was not declared in this scope; did you mean 'int'? 6 | Point start(sx, sy); | ^~~~~ ...
s532054807
p01300
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import static java.lang.Integer.parseInt; import static java.lang.Long.parseLong; /** * Eleven Lover */ public class Main { static String sub; public static void main(String[] args) throws IOException { BufferedReader...
Main.java:48: error: cannot find symbol P2182.sub = ""; ^ symbol: variable P2182 location: class Main Main.java:50: error: cannot find symbol P2182.sub = mod + sub.substring(i, i + 17); ^ symbol: variable P2182 location: class Main Main.java:52: error: cannot find symbol P2182.sub = mod + ...
s688939551
p01300
C
#include <iostream> #include <iomanip> #include <sstream> #include <cstdio> #include <string> #include <vector> #include <algorithm> #include <complex> #include <cstring> #include <cstdlib> #include <cmath> #include <cassert> #include <climits> #include <queue> #include <set> #include <map> #include <valarray> #include...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s325148200
p01300
C++
#include <algorithm> #include <iostream> #include <string> #include <cassert> #include <cmath> #include <cstdio> #include <cstdlib> #include <deque> #include <iomanip> #include <limits> #include <map> #include <queue> #include <stack> #include <vector> #define FOR(i,k,n) for(int (i) = (k); (i) < (n); ++(i)) #define re...
a.cc: In function 'int main()': a.cc:43:18: error: 'strlen' was not declared in this scope 43 | l = (int)strlen(s); | ^~~~~~ a.cc:14:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 13 | #include <stack> +++ |+#include <cs...
s244344118
p01300
C++
#include <algorithm> #include <iostream> #include <string> #include <cassert> #include <cmath> #include <cstdio> #include <cstdlib> #include <deque> #include <iomanip> #include <limits> #include <map> #include <queue> #include <stack> #include <vector> #define FOR(i,k,n) for(int (i) = (k); (i) < (n); ++(i)) #define re...
a.cc: In function 'int main()': a.cc:43:18: error: 'strlen' was not declared in this scope 43 | l = (int)strlen(s); | ^~~~~~ a.cc:14:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 13 | #include <stack> +++ |+#include <cs...
s402070423
p01300
C++
ddd
a.cc:1:1: error: 'ddd' does not name a type 1 | ddd | ^~~
s923809236
p01300
C++
#define _USE_MATH_DEFINES #include <cstdio> #include <cstdlib> #include <string.h> #include <iostream> #include <cmath> #include <algorithm> #include <vector> #include <queue> #include <stack> #include <map> using namespace std; typedef pair<long long int, long long int> P; long long int INF = 1e18; /* int main(){ ...
a.cc:81:1: error: expected initializer before 'int' 81 | int A, B[11]; | ^~~ a.cc: In function 'int main()': a.cc:90:21: error: 'S' was not declared in this scope 90 | scanf("%s", S); | ^ a.cc:96:13: error: 'B' was not declared in this scope 96 | B[j] = 0; ...
s879588171
p01300
C++
while True: S = raw_input() if S == '0':break m = [1] + [0 for i in range(10)] d = A = 0 e = 1 S = reversed(S) for c in S: d = (d + int(c) * e) % 11 if int(c) != 0:A += m[d] m[d] += 1 e *= -1 print A
a.cc:1:1: error: expected unqualified-id before 'while' 1 | while True: | ^~~~~
s722035613
p01300
C++
#include<stdio.h> #include<string.h> #include<iostream> using namespace std; char buf[100000]; long long cnt[11],i,j,val,ans,s,pos; int main() { * freopen("input.txt","r",stdin); freopen("output.txt","w",stdout); */ while(gets(buf)) { if(buf[0]=='0'&&buf[1]==0) break; memset(cnt,0,sizeof(cnt)); cnt[0]++;...
a.cc: In function 'int main()': a.cc:14:2: error: expected primary-expression before '/' token 14 | */ | ^ a.cc:15:9: error: expected primary-expression before 'while' 15 | while(gets(buf)) | ^~~~~
s970863475
p01301
C++
#include<iostream> #include<vector> #include<set> #include<algorithm> using namespace std; #define REP(i,b,n) for(int i=b;i<n;i++) #define rep(i,n) REP(i,0,n) #define pb push_back const int N = 27; class st{ public: int x,y,z; bool operator<(const st &a)const{ if (x != a.x)return x < a.x; if (y ...
a.cc: In function 'bool solve(int, std::vector<std::vector<st> >*, int, int, int, int, bool (*)[3][3], std::set<int>*)': a.cc:217:15: error: 'cut' was not declared in this scope; did you mean 'cnt'? 217 | if (!dcheck(cut,S[now],h,d,w)){ | ^~~ | cnt a.cc: At global scope: a.cc...
s939072138
p01303
C
#include<stdio.h> int main(){ int x,y,w,h,a,i,j,n,k,l,t; int catx[101],caty[101],nekokazu[101]; for(t=0;t<101;t++){ nekokazu[t]=0; } scanf("%d",&a); for(i=0;i<a;i++){ scanf("%d %d %d %d",&x,&y,&w,&h); scanf("%d",&n); for(j=0;j<n;j++){ scanf("%d %d",&catx[j],&caty[j]); ...
main.c: In function 'main': main.c:28:3: error: expected declaration or statement at end of input 28 | } | ^
s329679933
p01303
C++
#include<iostream> using namespace std; int X,Y,W,H; serch(int x,y){ if(X<=x&&(X+W)>=x&&Y<=y&&(Y+H)>=y)return 1; } int main(){ int N,x,y,count; cin>>X>>Y>>W>>H>>N; for(int i;i=0;i++){ cin>>x>>y; if(serch(x,y)=1)count++; } cout<<count<<"\n"; return 0; }
a.cc:4:13: error: 'y' has not been declared 4 | serch(int x,y){ | ^ a.cc:4:1: error: ISO C++ forbids declaration of 'serch' with no type [-fpermissive] 4 | serch(int x,y){ | ^~~~~ a.cc: In function 'int serch(int, int)': a.cc:5:31: error: 'y' was not declared in this scope 5 | ...
s778887228
p01303
C++
#include<iostream> using namespace std; int X,Y,W,H; int serch(int x,int y){ if(X<=x&&(X+W)>=x&&Y<=y&&(Y+H)>=y)return 1; } int main(){ int n; cin>>n; for(int j=0;j<n;j++){ int N,x,y,count=0; cin>>X>>Y>>W>>H>>N; for(int i=;i<N;i++){ cin>>x>>y; if(serch(x,y)==1)count++; } cout<<count<<"\n"; } return 0; }
a.cc: In function 'int main()': a.cc:13:19: error: expected primary-expression before ';' token 13 | for(int i=;i<N;i++){ | ^ a.cc: In function 'int serch(int, int)': a.cc:6:1: warning: control reaches end of non-void function [-Wreturn-type] 6 | } | ^
s238706525
p01304
Java
import java.util.*; public class main { private static Scanner sc; public static void main(String[] args) { sc = new Scanner(System.in); int a = sc.nextInt(); for (int l=0; l<a; l++){ int gx=sc.nextInt(); int gy=sc.nextInt(); int No [][] = new int [gx+1][gy+1]; int b = sc.nextInt(); for (int k=0;...
Main.java:2: error: class main is public, should be declared in a file named main.java public class main { ^ 1 error
s589939376
p01304
C++
#include<iostream> #if 0 08-182020の方のものを参照。 #endif using namespace std; int a[10000]; int s; int n; int p; int gx,gy; int T[15+10][15+10]; int Verz[15+10][15+10], Horiz[15+10][15+10]; /* pair<int, int> pd; int matatabix[10000],matatabiy[10000]; pair<int, int> matatabi1[10000], matatabi2[10000]; int Verz[10000][100...
a.cc:4:4: error: extended character 。 is not valid in an identifier 4 | 08-182020の方のものを参照。 | ^
s535509425
p01304
C++
#include <bits/stdc++.h> using namespace std; int p; int x1[128], y1[128], x2[128], y2[128]; bool ok(int Y1, int X1, int Y2, int X2) { for (int i = 0; i < p; i++){ if (x1[i] <= X1 && X2 <= x2[i] && y1[i] <= Y1 && Y2 <= y2[i]) return (false); } return (true); } int main() { int T;...
a.cc:6:20: error: 'int y1 [128]' redeclared as different kind of entity 6 | int x1[128], y1[128], x2[128], y2[128]; | ^ In file included from /usr/include/features.h:523, from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39, from /usr/include/x86_...
s828714098
p01304
C++
#include <algorithm> #include <iostream> using namespace std; int main() { int N; cin >> N; while (N>0) { int goalx, goaly; cin >> goalx >> goaly; int T[goaly+1][goalx+1]; int n; cin >> n; while (n>0) { int x1,y1,x2,y2; cin >> x1 >> y1 >> x2 >> y2; if (x1==x2) T[max(y1,y2...
a.cc: In function 'int main()': a.cc:16:41: error: invalid conversion from 'const char*' to 'int' [-fpermissive] 16 | if (x1==x2) T[max(y1,y2)+1][x1+1]="up"; | ^~~~ | | | co...
s494789872
p01304
C++
#include <algorithm> #include <iostream> using namespace std; int main() { int N; cin >> N; //????????????????????° while (N>0) { int goalx, goaly; //?§?????????´????????§?¨? cin >> goalx >> goaly; int T[goaly+1][goalx+1]; //????????????????????° int n; cin >> n; while (n>0) { //??????????...
a.cc:54:9: error: 'a' was not declared in this scope 54 | int max(a,b) { | ^ a.cc:54:11: error: 'b' was not declared in this scope 54 | int max(a,b) { | ^ a.cc:54:12: error: expression list treated as compound expression in initializer [-fpermissive] 54 | int max(a,b) { | ...
s174503157
p01304
C++
#include<iostream> using namespace std; int main(){ int p,i,j,k,l,m,n,gx,gy,dp[17][17],map[17][17][17][17]; int N; cin >> n; for( N = 0; N < n; N++){ for(i = 0; i < 17; i++){ for(j = 0; j < 17; j++){ dp[i][j]=0; for(k = 0; k < 17; k++){ for(l = 0; l < 17; l++){ map[i][j][k][l]=0; }...
a.cc: In function 'int main()': a.cc:52:4: error: expected '}' at end of input 52 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s295183563
p01304
C++
#include <iostream> using namespace std; struct obstacles { bool above; // true if obstacle above bool left; // true if obstacle to the left int value; // no. of ways to get to this box }; int main() { int input; cin >> input; for (int j = 0; j < input; j++) { int goalx, goaly; cin >> goalx...
a.cc: In function 'int main()': a.cc:34:13: error: 'rowi' was not declared in this scope 34 | if (rowi == 0) { | ^~~~
s630702873
p01304
C++
#include<cstdio> #include<iostream> int main(void){ int n,h,w,a[1000][1000],m,p[1000],q[1000]; cin >> n; for(int i=0;i<n;i++){ cin >> h >> w >> m ; for(int j=0;j<m;j++){ cin>> p[j] >> q[j] ; } for(int x=0;x<=h;x++){ for(int y=0;y<=w;y++){ a[x][y]=0; } } a[0][1]=1; for(int x=1;x<=h;x++){...
a.cc: In function 'int main()': a.cc:7:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 7 | cin >> n; | ^~~ | std::cin In file included from a.cc:2: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ...
s310140052
p01304
C++
#include <iostream> using namespace std; int main() { int k; cin >> k; for ( int l = 0; l < k; l++ ) { int gx, gy; cin >> gx >> gy; int a[17][17]; int tate[17][16]; int yoko[16][17]; fill( a[0], a[17], 0 ); fill( tate[0], tate[17], 0 ); fill( yoko[0], yoko[16], 0 ); a[1][1] = 1; int n; cin >> ...
a.cc: In function 'int main()': a.cc:27:23: error: 'i' was not declared in this scope 27 | for ( i = 1; i < 17; i++ ) { | ^ a.cc:28:31: error: 'j' was not declared in this scope 28 | for ( j = 1; j < 17; j++ ) { | ...
s537921497
p01304
C++
#include <iostream> using namespace std; int main() { int k; cin >> k; for ( int l = 0; l < k; l++ ) { int gx, gy; cin >> gx >> gy; int a[17][17]; int tate[17][16]; int yoko[16][17]; fill( a[0], a[17], 0 ); fill( tate[0], tate[17], 0 ); fill( yoko[0], yoko[16], 0 ); a[1][1] = 1; int n; cin >> ...
a.cc: In function 'int main()': a.cc:27:23: error: 'i' was not declared in this scope 27 | for ( i = 1; i < 17; i++ ) { | ^ a.cc:28:31: error: 'j' was not declared in this scope 28 | for ( j = 1; j < 17; j++ ) { | ...
s579819121
p01304
C++
#include <algorithm> #include <iostream> using namespace std; int A[128], n; int main() { while(cin >> n && n >0){ A[0] = 0; A[1] = 1; A[2] = 2; for (int i=3; i<=n+10; ++i) { A[i] = A[i-1]+A[i-2]+A[i-3]; } n = int((A[n]+9/10+364)/365) cout << n <<endl; } }
a.cc: In function 'int main()': a.cc:16:45: error: expected ';' before 'cout' 16 | n = int((A[n]+9/10+364)/365) | ^ | ; 17 | cout << n <<endl; | ~~~~ ...
s078656331
p01304
C++
#include <algorithm> #include <iostream> using namespace std; int A[128], n, a; int main() { while(cin >> n && n >0){ A[0] = 0; A[1] = 1; A[2] = 2; for (int i=3; i<=n+10; ++i) { A[i] = A[i-1]+A[i-2]+A[i-3]; } a = int((A[n]+9/10+364)/365) cout << a <<endl; } }
a.cc: In function 'int main()': a.cc:16:45: error: expected ';' before 'cout' 16 | a = int((A[n]+9/10+364)/365) | ^ | ; 17 | cout << a <<endl; | ~~~~ ...
s558373162
p01304
C++
#include <iostream> #include <cstdio> using namespace std; int I[17][17][17][17]; int dp[17][17]; int main() { int N; cin >> N; for(int times = 0; times < N; times++) { memset(I, 0, sizeof I); memset(dp, 0, sizeof dp); int W, H, p; cin >> W >> H >> p; for(int i = 0; i < p; i++) { i...
a.cc: In function 'int main()': a.cc:14:5: error: 'memset' was not declared in this scope 14 | memset(I, 0, sizeof I); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <cstdio> +++ |+#include <cstring> 3 |...
s900238405
p01304
C++
#include<iostream> #include<cstdlib> using namespace std; int main(){ int n; cin>>n; for(int i=0;i<n;i++){ int X,Y,N,x,y,z,w; cin>>X>>Y>>N; long a[31][31]={}; for(int j=2;j<31;j+=2){ a[j][0]=1; a[0][j]=1; } for(int j=0;j<N;j++){ cin>>x>>y>>z>>w; if(x==0&&z==0){ x=2x; y=2y; z=2z; ...
a.cc:20:35: warning: use of C++23 'make_signed_t<size_t>' integer constant 20 | z=2z; | ^~ a.cc: In function 'int main()': a.cc:18:35: error: unable to find numeric literal operator 'operator""x' 18 | x=2x; ...
s449343133
p01304
C++
#include<iostream> using namespace std; int main(){ int k; cin >> k; for(int i=0;i<k;i++){ int gx,gy; cin >> gx >> gy; int p; cin >> p; int A[16][16][16][16]={}; for (int j=0;j<p;j++){ int a,b,c,d; cin >> a >> b>>c>>d; A[a][b][c][d] = 1; } int B[16][16]={}; B...
a.cc: In function 'int main()': a.cc:49:2: error: expected '}' at end of input 49 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s486481201
p01304
C++
#include <iostream> #include <vector> #include <queue> using namespace std; bool b[16][16][16][16]; int d[16][16]; int main(){ int n,gx,gy,p; cin>>n; while(n--){ memset(b,false,sizeof(b)); memset(d,0,sizeof(d)); cin>>gx>>gy; cin>>p; for(int i=0;i<p;i++){ i...
a.cc: In function 'int main()': a.cc:11:9: error: 'memset' was not declared in this scope 11 | memset(b,false,sizeof(b)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <queue> +++ |+#include <cstrin...
s261709117
p01304
C++
#include <iostream> #include <vector> #include <queue> using namespace std; bool b[16][16][16][16]; int d[16][16]; int main(){ int n,gx,gy,p; cin>>n; while(n--){ memset(b,false,sizeof(b)); memset(d,0,sizeof(d)); cin>>gx>>gy; cin>>p; for(int i=0;i<p;i++){ i...
a.cc: In function 'int main()': a.cc:11:9: error: 'memset' was not declared in this scope 11 | memset(b,false,sizeof(b)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <queue> +++ |+#include <cstrin...
s075202285
p01304
C++
#include <iostream> using namespace std; int main() { int gx,gy; //?§?????????´??? int mata_num; //?????????????????° int x1[100],y1[100],x2[100],y2[100]; //?????????????????§?¨? long long int T; //??????????????? (x, y) ?????°??????????????° int data_num; //???????????????????????° cin >> data_num; ...
a.cc: In function 'int main()': a.cc:46:21: error: 'l' was not declared in this scope 46 | for (int k=1;l<30;k++) { | ^
s558814995
p01304
C++
#include<iostream> #include<algorithm> using namespace std; int dx[]={0,1}; int dy[]={1,0}; int edge[16][16][16][16]={0}; main(){ int te; cin>>te; while(te--){ int gx,gy,p; while(cin>>gx>>gy>>p){ long long dp[gy+1][gx+1]; rep(i,16)rep(k,16)rep(j,16)rep(l,16)edge[i][j][k][l]=0; fill(&dp[0][0],&dp[g...
a.cc:7:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 7 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:14:9: error: 'i' was not declared in this scope 14 | rep(i,16)rep(k,16)rep(j,16)rep(l,16)edge[i][j][k][l]=0; | ^ a.cc:14:5: error: 'rep' was not de...
s521053339
p01304
C++
#include <iostream> #include <algorithm> #include <cstdio> #include <math.h> using namespace std; int gx,gy,p,x1,x2,y1,y2,a[16][16],sw=0,n; int main(){ cin>>n;for(int z=0;z<n;z++){ while(cin>>gx>>gy>>p){ int h[16][16]={0},v[16][16]={0}; for(int i=0;i<p;i++){ cin>>x1>>y1>>x2>>y2; if(x1==x2)v[x1][max(y1,y2)...
a.cc:7:19: error: 'int y1' redeclared as different kind of entity 7 | int gx,gy,p,x1,x2,y1,y2,a[16][16],sw=0,n; | ^~ In file included from /usr/include/features.h:523, from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39, from /usr/include/x86_64-l...
s355975284
p01304
C++
#include <iostream> #include <algorithm> #include <cstdio> #include <math.h> using namespace std; int gx,gy,p,x1,x2,y1,y2,a[16][16],sw=0,n; int main(){ cin>>n;for(int z=0;z<n;z++){ while(cin>>gx>>gy>>p){ int h[16][16]={0},v[16][16]={0}; for(int i=0;i<p;i++){ cin>>x1>>y1>>x2>>y2; if(x1==x2){int M=max(y1,y2...
a.cc:7:19: error: 'int y1' redeclared as different kind of entity 7 | int gx,gy,p,x1,x2,y1,y2,a[16][16],sw=0,n; | ^~ In file included from /usr/include/features.h:523, from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39, from /usr/include/x86_64-l...
s019892374
p01304
C++
#include<iostream> using namespace std; int main(){ int a; cin>>a; for(int b=0;b<a;b++){ int gx,gy; cin>>gx>>gy; int n; cin>>n; int mttb[110][4]; for(int i=0;i<n;i++){ cin>>mttb[i][0]>>mttb[i][1]>>mttb[i][2]>>mttb[i][3]; } int map[20][20]; memset(map,0,sizeof(map)); map[0][0]=1; for(int x=0...
a.cc: In function 'int main()': a.cc:17:17: error: 'memset' was not declared in this scope 17 | 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> +++...
s037596063
p01304
C++
#include<iostream> using namespace std; int main(){ int a; cin>>a; for(int b=0;b<a;b++){ int gx,gy; cin>>gx>>gy; int n; cin>>n; int mttb[110][4]; for(int i=0;i<n;i++){ cin>>mttb[i][0]>>mttb[i][1]>>mttb[i][2]>>mttb[i][3]; } int map[20][20]; memset(map,0,sizeof(map)); map[0][0]=1; for(int x=0...
a.cc: In function 'int main()': a.cc:17:17: error: 'memset' was not declared in this scope 17 | 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> +++...
s566692957
p01304
C++
#include<iostream> using namespace std; int main(void){ int a; cin>>a; for(int b=0;b<a;b++){ int gx,gy; cin>>gx>>gy; int n; cin>>n; int mttb[110][4]; for(int i=0;i<n;i++){ cin>>mttb[i][0]>>mttb[i][1]>>mttb[i][2]>>mttb[i][3]; } int map[20][20]; memset(map,0,sizeof(map)); map[0][0]=1; for(in...
a.cc: In function 'int main()': a.cc:18:17: error: 'memset' was not declared in this scope 18 | memset(map,0,sizeof(map)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<iostream> +++...
s504024576
p01304
C++
#include<iostream> using namespace std; int main(void){ int a; cin>>a; for(int b=0;b<a;b++){ int gx,gy; cin>>gx>>gy; int n; cin>>n; int mttb[110][4]; for(int i=0;i<n;i++){ cin>>mttb[i][0]>>mttb[i][1]>>mttb[i][2]>>mttb[i][3]; } int map[20][20]; memset(map,0,sizeof(map)); map[0][0]=1; for(int...
a.cc: In function 'int main()': a.cc:17:17: error: 'memset' was not declared in this scope 17 | 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> +++...
s604448242
p01304
C++
#include<iostream> using namespace std; int main(void){ int a; cin>>a; for(int b=0;b<a;b++){ int gx,gy; cin>>gx>>gy; int n; cin>>n; int mttb[110][4]; for(int i=0;i<n;i++){ cin>>mttb[i][0]>>mttb[i][1]>>mttb[i][2]>>mttb[i][3]; } int map[20][20]; memset(map,0,sizeof(map)); map[0][0]=1; /*for(...
a.cc: In function 'int main()': a.cc:18:17: error: 'memset' was not declared in this scope 18 | memset(map,0,sizeof(map)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<iostream> +++...
s926648906
p01304
C++
#include<iostream> using namespace std; int main(void){ int a; cin>>a; for(int b=0;b<a;b++){ int gx,gy; cin>>gx>>gy; int n; cin>>n; int mttb[110][4]; for(int i=0;i<n;i++){ cin>>mttb[i][0]>>mttb[i][1]>>mttb[i][2]>>mttb[i][3]; } int map[20][20]; memset(map,0,sizeof(map)); map[0][0]=1; /*for(...
a.cc: In function 'int main()': a.cc:18:17: error: 'memset' was not declared in this scope 18 | memset(map,0,sizeof(map)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<iostream> +++...
s916958176
p01304
C++
// subtle.cpp : ƒƒCƒ“ ƒvƒƒWƒFƒNƒg ƒtƒ@ƒCƒ‹‚Å‚·B #include "stdafx.h" #include <iostream> #include <bitset> #include <algorithm> #include <map> #include <set> #include <cstdio> #include <cmath> #include <cstdlib> #include <cstring> #include <string> #include <vector> #include <numeric> #include <list> #include <sstre...
a.cc:3:10: fatal error: stdafx.h: No such file or directory 3 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s953513560
p01304
C++
#include<iostream> using namespace std; typedef pair<int,int> P; const int MAX = 16; bool Mata[MAX][MAX][MAX][MAX]; P g; int ans; void init(){ ans = 0; memset(Mata,false,sizeof(Mata)); } void solve(int x,int y){ if(x == g.first && y == g.second) ans++; else if(x <= g.first && y <= g.second){ if(!Mata...
a.cc: In function 'void init()': a.cc:13:3: error: 'memset' was not declared in this scope 13 | memset(Mata,false,sizeof(Mata)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> +++ |+#include <cstring> ...
s971455507
p01304
C++
#include <iostream> using namespace std; void solve() { int n; cin >> n; for(int i = 0; i < n; ++i) { int gx, gy, p; bool stage[16][16][16][16]; memset(stage,-1,sizeof(stage)); cin >> gx >> gy >> p; for(int j = 0; j < p; ++j) { int x1,y1,x2,y2; cin >> ...
a.cc: In function 'void solve()': a.cc:14:9: error: 'memset' was not declared in this scope 14 | memset(stage,-1,sizeof(stage)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ |+#inclu...
s855234587
p01304
C++
#include <iostream> #include <stdlib.h> using namespace std; void solve() { int n; cin >> n; for(int i = 0; i < n; ++i) { int gx, gy, p; bool stage[16][16][16][16]; memset(stage,-1,sizeof(stage)); cin >> gx >> gy >> p; for(int j = 0; j < p; ++j) { int x1,...
a.cc: In function 'void solve()': a.cc:15:9: error: 'memset' was not declared in this scope 15 | memset(stage,-1,sizeof(stage)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <stdlib.h> +++ |+#inclu...
s477890834
p01304
C++
// //取り組んだ問題:平安京 //プロ怖い // // #include <iostream> #include <vector> #include <algorithm> #include <map> #include <queue> #include <string> #include <list> #define rep(i,n) for(int i = 0; i < n;i++) #define Rep(i,n) for(int i = 0; i <= n;i++) using namespace std; int main(){ int gx,gy; int x1,y1,x2,y2; in...
a.cc: In function 'int main()': a.cc:51:33: error: expected primary-expression before '==' token 51 | if(map[i][j]&1) == 0) | ^~
s353597899
p01304
C++
#include<iostream> #include<algorithm> #include<vector> using namespace std; int R[30][30]; int S[16][16]; int main() { int s, t; for ( s = 0; s < 30; s++) { for (t = 0; t < 30; t++) { R[s][t]=0; } } int p, q; int N, gx, gy, M, i, j, t, x1, y1, x2, y2; cin >> N; for ( k = 0; k < N; k++) { cin >> ...
a.cc: In function 'int main()': a.cc:21:33: error: redeclaration of 'int t' 21 | int N, gx, gy, M, i, j, t, x1, y1, x2, y2; | ^ a.cc:12:16: note: 'int t' previously declared here 12 | int s, t; | ^ a.cc:23:15: error: 'k' was not declared i...
s481289556
p01305
C++
#include<iostream> using namespace std; int p1[9],p2[9]; #define rep(i,n) for(int i=0;i<(int)n;i++) double ans = 0; long long dp[9][(1 << 9)][200]={0}; void solve(){ rep(j,9){ int state = ( 1 << j); if ( p1[0]>p2[j]){ dp[0][state][p1[0]+p2[j]]+=1; }else { dp[0][state][0]+=1; } ...
a.cc:49:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 49 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:50:6: error: 'te' was not declared in this scope; did you mean 'tm'? 50 | cin>>te; | ^~ | tm
s774048516
p01305
C++
#include<iostream> using namespace std; int p1[9],p2[9]; #define rep(i,n) for(int i=0;i<(int)n;i++) double ans = 0; long long dp[9][(1 << 9)][200]={0}; void solve(){ rep(i,9)rep(j,(1<<9)rep(k,200)dp[i][j][k]=0; rep(j,9){ int state = ( 1 << j); if ( p1[0]>p2[j]){ dp[0][state][p1[0]+p2[j]]+=1; }el...
a.cc:60:2: error: unterminated argument list invoking macro "rep" 60 | } | ^ a.cc: In function 'void solve()': a.cc:10:11: error: 'rep' was not declared in this scope 10 | rep(i,9)rep(j,(1<<9)rep(k,200)dp[i][j][k]=0; | ^~~ a.cc:10:14: error: expected '}' at end of input 10 | rep(i,9)...
s686917422
p01305
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...
a.cc: In function 'int main()': a.cc:38:17: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 38 | sort(ga, ga + 9); | ^~~~ | sqrt a.cc:55:24: error: 'next_permutation' was not declared in this scope 55 | }while(next_perm...
s264587394
p01306
C++
#include<iostream> #include<map> using namespace std; main(){ map<string,int> M; M["yotta"]= 24; M["zetta"]= 21; M["exa"]= 18; M["peta"]= 15; M["tera"]= 12; M["giga"]= 9; M["mega"]= 6; M["kilo"]= 3; M["hecto"]= 2; M["deca"]= 1; M["deci"]= -1; M["centi"]= -2; M["milli"]= -3; M["micro"]= -6;...
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 4 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:55:20: error: no matching function for call to 'find(std::__cxx11::basic_string<char>::iterator, std::__cxx11::basic_string<char>::iterator, char)' 55 | }else if...
s250154286
p01306
C++
#include <iostream> #include <vector> #include <set> #include <map> #include <queue> #include <sstream> #include <algorithm> #include <numeric> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #include <cstdlib> #include <cassert> #define rep(i,n) for(int i=0;i<n;i++) #define rp(i,c) rep(i,(c)....
a.cc: In function 'int main()': a.cc:47:17: error: 'gets' was not declared in this scope; did you mean 'getw'? 47 | gets(in); | ^~~~ | getw
s201136105
p01306
C++
#include <stdio.h> #include <string.h> #include <algorithm> #include <iostream> #include <math.h> #include <assert.h> #include <vector> #include <queue> #include <string> #include <map> #include <set> using namespace std; typedef long long ll; typedef unsigned int uint; typedef unsigned long long ull; static const dou...
a.cc: In function 'int main()': a.cc:59:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 59 | gets(line); | ^~~~ | getw
s583031649
p01307
C++
#include <iostream> #include <algorithm> using namespace std; bool judge(string s) { unsigned sum = accumulate(s.begin(), s.end(), 0, [](char c, unsigned x) -> unsigned { return x +(c - '0'); } ); unsigned count = sum/9; if(sum % 9 == 0) count--; return ( (coun...
a.cc: In function 'bool judge(std::string)': a.cc:7:20: error: 'accumulate' was not declared in this scope 7 | unsigned sum = accumulate(s.begin(), s.end(), 0, | ^~~~~~~~~~
s043015860
p01307
C++
#include <iostream> #include <algorithm> using namespace std; bool judge(string s) { unsigned sum = accumulate(s.begin(), s.end(), 0, [](char c, unsigned x) -> unsigned { return x +(c - '0'); } ); unsigned count = (sum-1)/9; return ( (count + s.size()) % 2 ) == 0; } int main() { ...
a.cc: In function 'bool judge(std::string)': a.cc:7:20: error: 'accumulate' was not declared in this scope 7 | unsigned sum = accumulate(s.begin(), s.end(), 0, | ^~~~~~~~~~
s468814165
p01307
C++
#include<stdio.h> #include<string.h> int main(){ int n; scanf("%d",&n); for(int j=0;j<n;j++){ char pro[1000]; scanf(" %s",pro); int num,; num=strlen(pro); int a[1000]={}; for(int i=0;pro[i]!='\0';i++){ a[i]=pro[i]-'0'; } int ans=0,c...
a.cc: In function 'int main()': a.cc:9:17: error: expected unqualified-id before ';' token 9 | int num,; | ^
s287606667
p01307
C++
#include <iostream> using namespace std; int main() { inr T;cin >> T; for(int t = 0;t <T; t++){ int N; cin >> N; const int p = N/9; const int d = to_string(N).size(); cout << ((g+p-1)%2==0?"Audrey wins.":"Fabre wins.") << endl; } return 0; }
a.cc: In function 'int main()': a.cc:5:1: error: 'inr' was not declared in this scope; did you mean 'int'? 5 | inr T;cin >> T; | ^~~ | int a.cc:5:14: error: 'T' was not declared in this scope 5 | inr T;cin >> T; | ^ a.cc:11:11: error: 'g' was not declared in this scope 11 | cou...
s477467527
p01307
C++
#include <iostream> using namespace std; int main() { inr T;cin >> T; for(int t = 0;t <T; t++){ int N; cin >> N; const int p = N/9; const int d = to_string(N).size(); cout << ((p+d-1)%2==0?"Audrey wins.":"Fabre wins.") << endl; } return 0; }
a.cc: In function 'int main()': a.cc:5:1: error: 'inr' was not declared in this scope; did you mean 'int'? 5 | inr T;cin >> T; | ^~~ | int a.cc:5:14: error: 'T' was not declared in this scope 5 | inr T;cin >> T; | ^
s411573323
p01307
C++
#include <iostream> using namespace std; int main() { int T;cin >> T; for(int t = 0;t <T; t++){ string N;cin>>N; const int d = N.size(); int s = 0; for(const char c:N){s+=c-'0';} s%=9; const int p= s%2==(N.back()-'0')%2); cout << ((p+d-1)%2==0?"Audrey wins.":"Fabre wins.") << endl; } return 0; }
a.cc: In function 'int main()': a.cc:12:35: error: expected ',' or ';' before ')' token 12 | const int p= s%2==(N.back()-'0')%2); | ^
s085816122
p01307
C++
#include<string> #include<iostream> #include<stdlib> using namespace std; int main(){ int n; cin>>n; while(n--){ string s; cin>>s; int cnt=0; while(s.size()!=1){ string t=s.substr(s.size()-2); //cout<<t<<endl; int x=atoi(t.c_str()); //cout<<x<<endl; s=s.substr(0,s.size()-2); //cout<<" "<<x<...
a.cc:3:9: fatal error: stdlib: No such file or directory 3 | #include<stdlib> | ^~~~~~~~ compilation terminated.
s455595959
p01307
C++
#include<string> #include<iostream> #include<cstdlib> using namespace std; int main(){ int n; cin>>n; while(n--){ string s; cin>>s;#include<string> #include<iostream> #include<cstdlib> using namespace std; int main(){ int n; cin>>n; while(n--){ string s; cin>>s; int cnt=0; while(s.size()!=1){ strin...
a.cc:10:24: error: stray '#' in program 10 | cin>>s;#include<string> | ^ a.cc: In function 'int main()': a.cc:10:25: error: 'include' was not declared in this scope 10 | cin>>s;#include<string> | ^~~~~~~ a.cc:10:39: error: ...
s888141930
p01307
C++
#include <iostream> using namespace std; int main(void){ int i, n, b; char a[1010]; for(cin >> n; n; n--, sum = 0, b = 0, f = 0){ for(cin >> a, i = 0; a[i] != '\0'; i++){ b += (int)(a[i] - '0'); if(b > 9) b = b - 9; else f = !f; } if(f) cout << "Audrey wins."<< endl; else cout << "Fabre wins." << en...
a.cc: In function 'int main()': a.cc:6:31: error: 'sum' was not declared in this scope 6 | for(cin >> n; n; n--, sum = 0, b = 0, f = 0){ | ^~~ a.cc:6:47: error: 'f' was not declared in this scope 6 | for(cin >> n; n; n--, sum = 0, b = 0, f = 0){ | ...
s905357091
p01307
C++
#include <iostream> using namespace std; int main(void){ int i, n, b, f; char a[1010]; for(cin >> n; n; n--, , b = 0, f = 0){ for(cin >> a, i = 0; a[i] != '\0'; i++){ b += (int)(a[i] - '0'); if(b > 9) b = b - 9; else f = !f; } if(f) cout << "Audrey wins."<< endl; else cout << "Fabre wins." << endl; ...
a.cc: In function 'int main()': a.cc:6:31: error: expected primary-expression before ',' token 6 | for(cin >> n; n; n--, , b = 0, f = 0){ | ^
s199636021
p01308
C
#include <iostream> #include <iomanip> #include <sstream> #include <cstdio> #include <string> #include <vector> #include <algorithm> #include <complex> #include <cstring> #include <cstdlib> #include <cmath> #include <cassert> #include <climits> #include <queue> #include <set> #include <map> #include <valarray> #include...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s944163639
p01308
C++
#include <iostream> #include <map> using namespace std; const int LIM = 50000; map<string, int> tone; void init(){ tone["C"] = 0; tone["C#"] = 1; tone["D"] = 2; tone["D#"] = 3; tone["E"] = 4; tone["F"] = 5; tone["F#"] = 6; tone["G"] = 7; tone["G#"] = 8; tone["A"] = 9; ...
a.cc: In function 'int main()': a.cc:53:9: error: 'reverse' was not declared in this scope 53 | reverse(stair, stair+N); | ^~~~~~~
s933858157
p01308
C++
l#include <bits/stdc++.h> using namespace std; #define Rep(i, n) for ( int i = 0; i < (n); i++ ) typedef pair<int, int> Pii; #define fr first #define sc second clock_t start; double calcTime2(){ clock_t end = clock(); // 終了時間 return (double)(end - start) / CLOCKS_PER_SEC; } int main() { srand((unsigne...
a.cc:1:2: error: stray '#' in program 1 | l#include <bits/stdc++.h> | ^ a.cc:1:1: error: 'l' does not name a type 1 | l#include <bits/stdc++.h> | ^ a.cc:4:9: error: 'pair' does not name a type 4 | typedef pair<int, int> Pii; | ^~~~ a.cc:9:1: error: 'clock_t' does not name a type ...
s608546817
p01309
C++
#include <cstdio> #include <algorithm> #include <vector> #include <queue> #include <cmath> using namespace std; const int INF = 1<<29; struct state{ int pos; int time; state(){} ~state(){} state(int a, int b): pos(a), time(b) {} }; struct P{ int x, y; P(){} ~P(){} P(int a, int ...
a.cc: In function 'int main()': a.cc:77:6: error: '\U0000ff4e' was not declared in this scope 77 | }n | ^~
s699531269
p01309
C++
#include <iostream> #include <vector> #include <cstring> using namespace std; int time[1000]; int x[1000],y[1000]; int main(void){ int n; cin>>n; while(n--){ int N,X,Y; double sx,sy; cin>>N>>X>>Y>>sx>>sy; for(int i=0;i<N;i++) cin>>x[i]>>y[i]; vector<int> t[N]; for(int i=0;i<N-1;i++){ for(int j=i+...
a.cc:6:14: error: 'int time [1000]' redeclared as different kind of entity 6 | int time[1000]; | ^ In file included from /usr/include/pthread.h:23, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35, from /usr/include/x86_64-linux-gnu/c++/14/bits/gt...
s351543217
p01310
C++
#include<iostream> #include<string> #include<vector> using namespace std; int main() { int N; cin >> N; vector<string> program; for (int i = 0; i < N; i++) { string statement; cin >> statement; program.push_back(statement); } int D[108][108]; for (int i = 0; i < N; i++) { for (j = 0; j <...
a.cc: In function 'int main()': a.cc:18:10: error: 'j' was not declared in this scope 18 | for (j = 0; j < N; j++) { | ^ a.cc:19:7: error: 'd' was not declared in this scope 19 | d[i][j] = (i == j ? <F5><F5>1e5; | ^ a.cc:19:27: error: expected primary-expression before '<' tok...
s949497186
p01314
Java
import java.util.Scanner; public class Sum_of_Consecutive_Integers { static Scanner scan = new Scanner(System.in); public static void main(String[] args) { int N; while((N = scan.nextInt()) != 0){ /*int sum = 0; for(int i=0;i<N+1;i++){ sum += i; ...
Main.java:3: error: class Sum_of_Consecutive_Integers is public, should be declared in a file named Sum_of_Consecutive_Integers.java public class Sum_of_Consecutive_Integers { ^ 1 error
s919200920
p01314
Java
import java.util.Scanner; public class Sum_of_Consecutive_Integers { static Scanner scan = new Scanner(System.in); public static void main(String[] args) { int N; while((N = scan.nextInt()) != 0){ int count = 0; int sum = 0; for(int i=1; i*2<N; i++){ ...
Main.java:3: error: class Sum_of_Consecutive_Integers is public, should be declared in a file named Sum_of_Consecutive_Integers.java public class Sum_of_Consecutive_Integers { ^ 1 error
s490852770
p01314
Java
import java.util.Scanner; public class main{ public static void main(String[] args){ new SumOfConsecutiveIntegers().run(); } public void run() { try { // ?????????????????????????????? Scanner sc = new Scanner(System.in); for(;;){ if(sc.hasNext()){ int inputNumber = sc.nextInt(); if(input...
Main.java:3: error: class main is public, should be declared in a file named main.java public class main{ ^ Main.java:5: error: cannot find symbol new SumOfConsecutiveIntegers().run(); ^ symbol: class SumOfConsecutiveIntegers location: class main 2 errors
s831150882
p01314
Java
package competition; import java.util.Scanner; public class main { public static void main(String[] args){ new main().run(); } public void run() { try { // ?????????????????????????????? Scanner sc = new Scanner(System.in); for(;;){ if(sc.hasNext()){ int inputNumber = sc.nextInt(); if(inp...
Main.java:4: error: class main is public, should be declared in a file named main.java public class main { ^ 1 error
s037553333
p01314
Java
import java.util.Scanner; public class Main { public static void main(String args[]) { Scanner sc = new Scanner(System.in); for (int n = sc.nextInt(); n != 0; n = sc.nextInt();) { int r = 0; for(int j = 2,i = 1,s = 3;j<n;s += (s < n)?++j:-i++) if(s == n) r++; System.out.println(r); } } }
Main.java:6: error: ')' expected for (int n = sc.nextInt(); n != 0; n = sc.nextInt();) { ^ Main.java:6: error: illegal start of expression for (int n = sc.nextInt(); n != 0; n = sc.nextInt();) { ^ 2 errors
s836198475
p01314
Java
public class Main { static int[][] map; static int[] list; static int initnum; static int N; static int count; public static void main(String[] args) { // TODO ????????????????????????????????????????????? Scanner sc = new Scanner(System.in); list= new int[45]; list=getInitlist(); map = new int[46...
Main.java:11: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:11: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s075456122
p01314
Java
ああああああ
Main.java:1: error: reached end of file while parsing ?????? ^ 1 error
s430238667
p01314
Java
public class Main { public static void main(String[] args) throws NumberFormatException, IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String str = br.readLine(); int input = Integer.parseInt(str); while(input != 0) { int count = 0; int sum; for(int i = 1; ...
Main.java:2: error: cannot find symbol public static void main(String[] args) throws NumberFormatException, IOException { ^ symbol: class IOException location: class Main Main.java:4: error: cannot find symbol BufferedReader br = new Buffere...
s182711802
p01314
Java
public class Main { public static void main(String args[]){ Scanner sc = new Scanner(System.in); int a,c=0; while (true){ a = sc.nextInt(); for(int i=0;i<a/2;i++){ if((2*i+1)==a){ c++; } } Sys...
Main.java:3: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:3: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s971004949
p01314
Java
public class Main { public static void main(String args[]){ Scanner sc = new Scanner(System.in); int a; while (true){ int c = 0; a = sc.nextInt(); for(int i=0;i<a;i++){ int sum=0; for(int j=i;j<a;j++) { s...
Main.java:3: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:3: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s958862870
p01314
Java
class Main { public static void main(String args[]){ Scanner sc = new Scanner(System.in); int a; while (true){ int c = 0; a = sc.nextInt(); for(int i=0;i<a;i++){ int sum=0; for(int j=i;j<a;j++) { sum +=j;...
Main.java:3: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:3: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s177745926
p01314
Java
class Main{ public static void main(String[] args){ while (true) { Scanner sc = new Scanner(System.in); // 標準入力読み取り int num = Integer.parseInt(sc.nextLine()); if (num == 0) { break; } // int max; // if (num % 2 == 0) { // max = num / 2; // } else {...
Main.java:8: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:8: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s805849597
p01314
Java
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { static int count = 0; static int input = 0; public static int sum(int x, in...
Main.java:2: error: class, interface, enum, or record expected 3 ^ Main.java:43: error: class, interface, enum, or record expected import java.io.IOException; ^ Main.java:44: error: class, interface, enum, or record expected import java.io.InputStreamReader; ^ 3 errors
s980868015
p01314
Java
import java.util.Scanner; public class Main2 { public static void main(String[] args) { Scanner s = new Scanner(System.in); int count = 0; int ans = 0; while (true) { int num = s.nextInt(); num = num * 2; for (int a = 1; a < num; a++) { for (int i = 2; i + a < num; i++) { ans = (i + a) * (...
Main.java:3: error: class Main2 is public, should be declared in a file named Main2.java public class Main2 { ^ 1 error