submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s053220220
p00548
C++
16 4 12 3 10 13 10 19 9 12 16 11 2 19 9 13 2 13 19
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 16 4 12 | ^~
s376301393
p00548
C++
#include <stdio.h> #include <cmath> #include <algorithm> #include <cfloat> #include <stack> #include <queue> #include <vector> #include <string> #include <iostream> typedef long long int ll; typedef unsigned long long int ull; #define BIG_NUM 2000000000 #define MOD 1000000007 #define EPS 0.000000001 using namespace std...
a.cc: In function 'll recursive(int, int)': a.cc:106:31: error: invalid types 'll* {aka long long int*}[std::ios_base&(std::ios_base&)]' for array subscript 106 | if(memo2[left][right] != -1){ | ^ a.cc:107:42: error: invalid types 'll* {aka long long int*}[std::ios_...
s667107530
p00549
C++
#include <iostream> #include <cstdio> #include <algorithm> #include <vector> #include <map> #include <set> #include <queue> #include <stack> #include <functional> using namespace std; #define rep(i,a,n) for(int i = a; n > i; i++) #define REP(i,n) rep(i,0,n) #define MP(a,b) make_pair(a,b) #define ALL(a) (a).begin(),(a...
a.cc:20:13: error: '::main' must return 'int' 20 | #define int ll | ^~ a.cc:21:1: note: in expansion of macro 'int' 21 | int main(){ | ^~~
s912281909
p00550
C++
#include "bits/stdc++.h" #include<unordered_map> #include<unordered_set> #pragma warning(disable:4996) using namespace std; using ld = long double; template<class T> using Table = vector<vector<T>>; const ld eps=1e-9; //// < "D:\D_Download\Visual Studio 2015\Projects\programing_contest_c++\Debug\a.txt" > "D:\D_Downloa...
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/c++allocator.h:33, from /usr/include/c++/14/bits/allocator.h:46, from /usr/include/c++/14/string:43, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc...
s692747539
p00550
C++
#include<bits/stdc++.h> int n, m, q, a[210000], b[210000], c, dist[110000], T[110000], cnt, U[110000]; vector<pair<int, int> >x[110000], y[110000]; bool used[210000]; int main() { scanf("%d%d%d", &n, &m, &q); for (int i = 0; i < m; i++) { scanf("%d%d", &a[i], &b[i]); x[a[i]].push_back(make_pair(b[i], i)); x[b[i...
a.cc:3:1: error: 'vector' does not name a type 3 | vector<pair<int, int> >x[110000], y[110000]; bool used[210000]; | ^~~~~~ a.cc: In function 'int main()': a.cc:8:17: error: 'x' was not declared in this scope 8 | x[a[i]].push_back(make_pair(b[i], i)); | ^ a.cc:8:35: e...
s046441316
p00550
C++
#include<iostream> #include<functional> #include<queue> #include<vector> #include<algorithm> using namespace std; #pragma warning(disable:4996) int n, m, q, a[1 << 18], b[1 << 18], c[1 << 18], d[1 << 18], e[1 << 18], dist[1 << 18]; vector<pair<int, int>>x[1 << 18], y[1 << 18]; int main() { scanf("%d%d%d", &n, &m, &q);...
a.cc: In function 'int main()': a.cc:36:28: error: 'class std::queue<std::pair<int, int> >' has no member named 'top'; did you mean 'pop'? 36 | int a1 = Q.top().first, a2 = Q.top().second; Q.pop(); | ^~~ | pop a.cc:37:39: error: 'a2' w...
s174773706
p00550
C++
//------------------------------------------- //- Train Fare - //- - //- autumn_eel niha katemasen! - //------------------------------------------- void reader(int *x) { int k = getchar_unlocked(); *x = k - '0'; while (true) { k = ...
a.cc: In function 'void reader(int*)': a.cc:10:17: error: 'getchar_unlocked' was not declared in this scope 10 | int k = getchar_unlocked(); *x = k - '0'; | ^~~~~~~~~~~~~~~~ a.cc: In function 'void writeln(int)': a.cc:24:21: error: 'putchar_unlocked' was not declared in this scope 24...
s056544761
p00550
C++
#include <bits/stdc++.h> using namespace std; #define mygc(c) (c)=getchar_unlocked() #define mypc(c) putchar_unlocked(c) #define ll long long #define ull unsigned ll void reader(int *x) { int k, m = 0; *x = 0; for (;;) { mygc(k); if (k == '-') { m = 1; break; }if ('0' <= k&&k <= '9') { *x = k - '0'; break; } }for (;;)...
a.cc: In function 'void writerArr(T*, int)': a.cc:24:88: error: there are no arguments to 'rep' that depend on a template parameter, so a declaration of 'rep' must be available [-fpermissive] 24 | template<class T> void writerArr(T x[], int n) { int i; if (!n) { mypc('\n'); return; }rep(i, n - 1)writer(x[i], ' '); w...
s401134904
p00550
C++
#include <bits/stdc++.h> #define rep(i,n)for(int i=0;i<n;i++) using namespace std; void reader(int *x) { int k = getchar_unlocked(); *x = k - '0'; while (true) { k = getchar_unlocked(); if (k < '0') break; *x = ((*x) << 1) + ((*x) << 3) + k - '0'; } } inline void writeln(int x) { int s = 0; char f[7]; while...
a.cc: In function 'int main()': a.cc:79:18: error: 'writerln' was not declared in this scope; did you mean 'writeln'? 79 | rep(i, q)writerln(ans[i]); | ^~~~~~~~ | writeln
s578891367
p00550
C++
#include <stdio.h> #include<vector> #include<deque> using namespace std; #define mygc(c) (c)=getchar_unlocked() #define mypc(c) putchar_unlocked(c) void reader(int& x) { int k, m = 0; x = 0; for (;;) { mygc(k); if (k == '-') { m = 1; break; }if ('0' <= k&&k <= '9') { x = k - '0'; break; } }for (;;) { mygc(k); if (k<'0...
a.cc: In function 'int main()': a.cc:40:9: error: 'memset' was not declared in this scope 40 | memset(d, -1, sizeof(d)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include<deque> +++ |+#include <cstring>...
s649017475
p00550
C++
#include<iostream> #include<vector> #include<algorithm> #include<queue> #include<functional> #define PAIR pair<int,int> using namespace std; class road { public: int from, to; bool use; road() :use(true) { } }; class town { public: int fast; bool used, said; vector<road*> road; int num; town():used(false),num...
a.cc:20:23: error: declaration of 'std::vector<road*> town::road' changes meaning of 'road' [-Wchanges-meaning] 20 | vector<road*> road; | ^~~~ a.cc:20:16: note: used here to mean 'class road' 20 | vector<road*> road; | ^~~~ a.cc:8:7: note: declared...
s895901330
p00550
C++
#include<iostream> #include<cstdio> #include<string> #include<set> #include<vector> #include<algorithm> #include<functional> #include<queue> #define p pair<int,int> using namespace std; p d[100000]; vector<int>rinsetu[100000]; int mincost[100000]; set<int>k[100000]; int l[100000]; int main() { memset(mincost, -1, siz...
a.cc: In function 'int main()': a.cc:18:9: error: 'memset' was not declared in this scope 18 | memset(mincost, -1, sizeof(mincost)); | ^~~~~~ a.cc:9:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 8 | #include<queue> +++ |+#inclu...
s422855770
p00550
C++
#include<iostream> #include<cstdio> #include<string> #include<set> #include<vector> #include<algorithm> #include<functional> #include<queue> #define p pair<int,int> using namespace std; p d[200000]; vector<int>rinsetu[100000]; int mincost[100000]; set<int>k[100000]; int l[100000]; int main() { memset(mincost, -1, siz...
a.cc: In function 'int main()': a.cc:18:9: error: 'memset' was not declared in this scope 18 | memset(mincost, -1, sizeof(mincost)); | ^~~~~~ a.cc:9:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 8 | #include<queue> +++ |+#inclu...
s366236001
p00550
C++
#include<bits/stdc++.h> using namespace std; struct Edge{ int to,cost; }; struct Node{ int num,val; bool operator<(const Node &r)const{ return val > r.val; } }; priority_queue<Node> que; int main(){ int n,m,q; int u[200005]; int v[200005]; vector<Edge> edge[100005]; vector<Edge> test[100005];...
a.cc:97:1: error: expected declaration before '}' token 97 | } | ^
s435295519
p00550
C++
#include <cstdio> #include <algorithm> #include <vector> #include <queue> #include <set> using ll = long long; using namespace std; using pll = pair<ll, ll>; #define In_(x) scanf("%lld",&x) ll n, m, q; ll u[200000], v[200000]; vector<pll>graph[100000]; ll dist[100000]; ll parnum[100000]; bool alive[100000]; set<ll>a...
a.cc:21:1: error: '::main' must return 'int' 21 | ll main() | ^~
s126270750
p00551
C++
* 2016-ho-t4.cpp * * Created on: 2017/02/09 * Author: joi */ #include<cstdio> #include<cstring> int main(void){ int a[200][200]; char b[100]; int n,k; scanf("%d %d",&n,&k); scanf("%s",b); for(int i=0;i<200;i++){ for(int j=0;j<200;j++){ a[i][j]=0; } } int x,y; int ans; x=100; y=100; a[100][1...
a.cc:3:25: error: invalid digit "9" in octal constant 3 | * Created on: 2017/02/09 | ^~ a.cc:1:3: error: expected unqualified-id before numeric constant 1 | * 2016-ho-t4.cpp | ^~~~
s713989577
p00551
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair < ll , ll > Pi; typedef pair < Pi , Pi > PPi; typedef pair < ll , Pi > Ti; const ll LLINF = 1LL << 60; const int INF = (1 << 30) - 1; char ch[] = "NESW"; ll dy[] = {-1, 0, 1, 0}; ll dx[] = {0, 1, 0, -1}; ll llabs(ll n) { return (n < 0 ?...
a.cc: In function 'int main()': a.cc:46:21: error: cannot convert 'Pi*' {aka 'std::pair<long long int, long long int>*'} to 'll*' {aka 'long long int*'} in initialization 46 | ll *a = route, *b = route + N + 1; | ^~~~~ | | | Pi...
s462093284
p00551
C++
k=int(input().split()[1]) x=y=0 a={(0,0)} for s in input(): if'E'==s:x+=1 if'N'==s:y+=1 if'W'==s:x-=1 if'S'==s:y-=1 a|={(x,y)} b=set(a) b|={(u+x*i,v+y*i)for u,v in a for i in range(1,k)} print(sum(1 for x,y in b if{(x,y),(x+1,y),(x,y+1),(x+1,y+1)}<b))
a.cc:1:1: error: 'k' does not name a type 1 | k=int(input().split()[1]) | ^ a.cc:4:1: error: expected unqualified-id before 'for' 4 | for s in input(): | ^~~ a.cc:10:1: error: 'b' does not name a type 10 | b=set(a) | ^ a.cc:12:6: error: expected constructor, destructor, or type conversion b...
s133515501
p00553
C
#include <stdio.h> int main(void) { int a[5]; int time; int i; for (i = 0; i <= 4; i++) { scanf_s("%d", &a[i]); } if (a[0] <= 0) { time = a[2] * (0 - a[0]) + a[3] + a[4] * a[1]; } else { time = a[4] * (a[1] - a[0]); } printf("%d", time); return 0; }
main.c: In function 'main': main.c:10:17: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 10 | scanf_s("%d", &a[i]); | ^~~~~~~ | scanf
s336676651
p00553
C
#include<stdio.h> #include<iostream> using namespace std; int main(void) { int a, b, c, d, e, ans; scanf("%d%d%d%d%d", &a, &b, &c, &d, &e); ans = b*e; if (a < 0) ans += -1 * a*c + d; else if (a == 0) ans += d; printf("%d\n", ans); return 0; }
main.c:2:9: fatal error: iostream: No such file or directory 2 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s270794278
p00553
C
#include<stdio.h> #include<iostream> using namespace std; int main(void) { int a, b, c, d, e, ans; scanf("%d%d%d%d%d", &a, &b, &c, &d, &e); if (a < 0) ans = b*e + -1 * a*c + d; else if (a == 0) ans = b*e + d; else ans = (b - a)*e; printf("%d\n", ans); return 0; }
main.c:2:9: fatal error: iostream: No such file or directory 2 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s193167066
p00553
C
#include<stdio.h> #include<iostream> using namespace std; int main(void) { int a, b, c, d, e,ondo,f; scanf("%d %d %d %d %d", &a, &b, &c, &d, &e); if (a > 0) { f = b - a; ondo=f*e; } else if (a < 0) { ondo = -a*c + d + b*e; } else if (a == 0) { ondo = d + b*e; } printf("%d\n", ondo); return 0; }
main.c:2:9: fatal error: iostream: No such file or directory 2 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s290561562
p00553
C++
square1001?¨±?????????
a.cc:1:12: error: extended character ± is not valid in an identifier 1 | square1001?¨±????????? | ^ a.cc:1:1: error: 'square1001' does not name a type 1 | square1001?¨±????????? | ^~~~~~~~~~
s836132454
p00553
C++
#include <iostream> #include <string> #include <algorithm> #include <stack> #include <queue> #include <set> #include <vector> using namespace std; int a; int b; int c; int d; int e; int f; int time; int main(){ cin >> a; cin >> b; cin >> c; cin >> d; cin >> e; if (a < 0){ time += (0 - a)*c; a = 0; } if (a ...
a.cc:16:5: error: 'int time' redeclared as different kind of entity 16 | int time; | ^~~~ In file included from /usr/include/pthread.h:23, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr.h:157, ...
s574223324
p00553
C++
#include <iostream> using namespace std; int a; int b; int c; int d; int e; int f; int time; int main(){ cin >> a; cin >> b; cin >> c; cin >> d; cin >> e; if (a < 0){ time += (0 - a)*c; a = 0; } if (a == 0){ time += d; f = 1; } if (a >= 0){ time += (b - a)*e; } cout << time << endl; ret...
a.cc:10:5: error: 'int time' redeclared as different kind of entity 10 | int time; | ^~~~ In file included from /usr/include/pthread.h:23, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr.h:157, ...
s929453401
p00553
C++
#include <iostream> using namespace std; int a; int b; int c; int d; int e; int f; int time; int main(){ cin >> a; cin >> b; cin >> c; cin >> d; cin >> e; if (a < 0){ time += (0 - a)*c; a = 0; } if (a == 0){ time += d; f = 1; } if (a >= 0){ time += (b - a)*e; } cout << time << endl; return ...
a.cc:10:5: error: 'int time' redeclared as different kind of entity 10 | int time; | ^~~~ In file included from /usr/include/pthread.h:23, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr.h:157, ...
s264064308
p00553
C++
#include<bits/stdc++.h> using namespace std; int a[100000000}; int main(){ memset(a,-1,sizeof(-1)); }
a.cc:4:16: error: expected ']' before '}' token 4 | int a[100000000}; | ^ | ] a.cc:4:16: error: expected declaration before '}' token a.cc: In function 'int main()': a.cc:6:12: error: 'a' was not declared in this scope 6 | memset(a,-1,sizeof(-1)); | ...
s009943908
p00553
C++
GNU nano 2.5.3 ????????????: JOI20161.c #include<iostream> using namespace std; int main() { int a,b,c,d,e,w,m,v; cin>>a>>b>>c>>d>>e; if(a<0) { w=-a*c; m=d; v=b*e; } else if(a==0) { ...
a.cc:1:12: error: too many decimal points in number 1 | GNU nano 2.5.3 ????????????: JOI20161.c | ^~~~~ a.cc:1:3: error: 'GNU' does not name a type 1 | GNU nano 2.5.3 ????????????: JOI20161.c | ^~~ In file included from /usr/include/c++/14/iosfwd:42, from /usr...
s093816734
p00553
C++
GNU nano 2.5.3 ????????????: JOI20161.c #include<iostream> using namespace std; int main() { int a,b,c,d,e,w,m,v; cin>>a>>b>>c>>d>>e; if(a<0) { w=-a*c; m=d; v=b*e...
a.cc:1:12: error: too many decimal points in number 1 | GNU nano 2.5.3 ????????????: JOI20161.c | ^~~~~ a.cc:1:3: error: 'GNU' does not name a type 1 | GNU nano 2.5.3 ????????????: JOI20161.c | ^~~ In file included from /usr/include/c++/14...
s976351641
p00553
C++
GNU nano 2.5.3 ????????????: JOI20161.c #include<iostream> using namespace std; int main() { int a,b,c,d,e,w,m,v; cin>>a>>b>>c>>d>>e; if(a<=0) { w=-a*c; m=d; v=b*...
a.cc:1:12: error: too many decimal points in number 1 | GNU nano 2.5.3 ????????????: JOI20161.c | ^~~~~ a.cc:1:3: error: 'GNU' does not name a type 1 | GNU nano 2.5.3 ????????????: JOI20161.c | ^~~ In file included from /usr/include/c++/14...
s493748640
p00553
C++
GNU nano 2.5.3 ????????????: JOI20161.c #include<iostream> using namespace std; int main() { int a,b,c,d,e,w,m,v; cin>>a>>b>>c>>d>>e; if(a<=0) { w=-a*c; m=d; v=b*...
a.cc:1:12: error: too many decimal points in number 1 | GNU nano 2.5.3 ????????????: JOI20161.c | ^~~~~ a.cc:18:21: error: stray '#' in program 18 | m=d;#include<iostream> | ^ a.cc:1:3: error: 'GNU' does not name a type 1 | ...
s784996390
p00553
C++
#include <iostream> using namespace std; int msin(void) { int a,b,c,d,e,f,g,h,i; cin>>a>>b>>c>>d>>e; f=0; if (a<0) { for (;;) { a++; f=f+c; if (a==b) { cout<<f<<endl; return 0; } if (a<=0) { break; } } } if (a==0) { f=f+c; } if (a>0) { a++; f=f+d; if (a==b) ...
/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
s810041614
p00553
C++
#include <iostream> using namespace std; int msin(void) { int a,b,c,d,e,f,g,h,i; cin>>a>>b>>c>>d>>e; f=0; if (a<0) { for (;;) { a++; f=f+c; if (a==0) { f=f+d; } if (a==b) { cout<<f<<endl; return 0; } if (a==0) { break; } } } if (a>0) { a++; f=f+d; if...
/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
s255476334
p00553
C++
#include <iostream> #include <stdio.h> #include <string> #include <string.h> using namespace std; int main (void) { long n,a,b,x,y,z,p,q,r; cin >> n >> a >> x >> y >> z; if (n < 0) { p = 0; p = x * (0 - n); q = 0; q = y; r = 0; r = z * a; cout << p + q + r << endl; } else if (n == 0) { ...
a.cc:44:1: error: expected declaration before '}' token 44 | } | ^
s933993251
p00554
C
#include<stdio.h> int main(void) { int i,j,temp,m,n,c,a[1001],h=0; scanf("%d %d",&n,&m); for(i=1;i<m+1;i++){ scanf("%d %d",&a[i],&m); } for(i=0;i<m;i++){ for(j=m-1;j>i;j--){ if(a[i]>a[j]){ temp=a[i]; a[i]=a[j]; a[j]=temp; } } } j=0; for(i=0;i<m;i++){ if(m-1<=j){ break; } if(a[j...
main.c: In function 'main': main.c:28:17: error: 'else' without a previous 'if' 28 | else if(a[i]<=m-1){ | ^~~~
s594113592
p00554
C
#include<stdio.h> int main(void){ int n=0,m=0,a=0,b=0,c=0,sum=0,max=0; scanf("%d %d"&n,&m); for(int i=0;i<m;i++){ scanf("%d %d"&a,&b); c=n-a; if(c>0){ sum+=c; } if(c>max){ max=c; } } printf("%d\n",sum-max); return 0; }
main.c: In function 'main': main.c:4:22: error: invalid operands to binary & (have 'char *' and 'int') 4 | scanf("%d %d"&n,&m); | ~~~~~~~^ | | | char * main.c:6:30: error: invalid operands to binary & (have 'char *' and 'int') 6 | ...
s979607843
p00554
C
#include<stdio.h> int n, m; //????????? int a, b, c; //???????????????????????????????????? int i; int sum, max; int main() { scanf_s("%d %d", &n, &m); for (i = 0; i < M; i++) { scanf_s("%d %d", &a, &b); c = N - a; if (c>0) { sum += c; } else if(c>=max){ max = c; } } printf("%d\n", sum - max)...
main.c: In function 'main': main.c:11:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 11 | scanf_s("%d %d", &n, &m); | ^~~~~~~ | scanf main.c:13:25: error: 'M' undeclared (first use in this function) 13 | for...
s031362039
p00554
C
#include<stdio.h> int n, m; //????????? int a, b, c; //???????????????????????????????????? int i; int sum, max; int main() { scanf("%d %d", &n, &m); for (i = 0; i < M; i++) { scanf("%d %d", &a, &b); c = N - a; if (c>0) { sum += c; } else if(c>=max){ max = c; } } printf("%d\n", sum - max); ...
main.c: In function 'main': main.c:13:25: error: 'M' undeclared (first use in this function) 13 | for (i = 0; i < M; i++) { | ^ main.c:13:25: note: each undeclared identifier is reported only once for each function it appears in main.c:15:21: error: 'N' undeclared (first use in ...
s161976678
p00554
C++
#include<iostream> #include<string> #include<cstdio> #include<vector> #include<cstdlib> using namespace std; int main() { int n, m, now = 0, g = 0, mo = 0, p[1005][2], s[1005] = {0}; cin >> n >> m; for (int i = 0; i < m; i++ ) { int a, b; cin >> a >> b; p[i][0] = a; p[i][1] = b; if (a >= b) { g++; } ...
a.cc:39:9: error: expected unqualified-id before 'for' 39 | for (int i = 0; i < m; i++) { | ^~~ a.cc:39:25: error: 'i' does not name a type 39 | for (int i = 0; i < m; i++) { | ^ a.cc:39:32: error: 'i' does not name a type 39 | for (int i = 0;...
s466984128
p00554
C++
#include<stdio.h> int main(void){ int n=0,m=0,a=0,b=0,c=0,sum=0,max=0; scanf("%d %d"&n,&m); for(int i=0;i<m;i++){ scanf("%d %d"&a,&b); c=n-a; if(c>0){ sum+=c; } if(c>max){ max=c; } } printf("%d\n",sum-max); return 0; }
a.cc: In function 'int main()': a.cc:4:22: error: invalid operands of types 'const char [6]' and 'int' to binary 'operator&' 4 | scanf("%d %d"&n,&m); | ~~~~~~~^~ | | | | | int | const char [6] a.cc:6:30: error: inval...
s733575605
p00554
C++
#include <iostream> using namespace std; int main(void) { int N,M,a,b,c[1000]={0},d,e,f,g; cin>>N>>M; for (a=0;a<M;a++) { cin>>b>>d; c[a]=b; } sort(c,c+1000); for (a=999;a>=0;a--) { if (c[a]>=N/2) { e++; if (e>=M-1) { break; } } } cout<<e<<endl; return 0; }
a.cc: In function 'int main()': a.cc:12:9: error: 'sort' was not declared in this scope; did you mean 'short'? 12 | sort(c,c+1000); | ^~~~ | short
s954748857
p00554
C++
#include <iostream> #include <stdio.h> #include <string> #include <string.h> using namespace std; int main (void) { int n,m,a[100],b[100],cou,x; cin >> n >> m; cou = 0; x = 200; for (int i = 0; i < m; i++) { cin >> a[i] >> b[i]; if (a[i] >= b[i]) { cou++; } } if (cou >= m - 1) { cout << '0'...
a.cc: In function 'int main()': a.cc:38:10: error: expected primary-expression before '?' token 38 | }??? | ^ a.cc:38:11: error: expected primary-expression before '?' token 38 | }??? | ^ a.cc:38:12: error: expected primary-expression before '?' token 38 | ...
s931854642
p00554
C++
#include <iostream> #include <stdio.h> #include <string> #include <string.h> using namespace std; int main (void) { int n,m,a[100],b[100],cou,x; cin >> n >> m; cou = 0; x = 200; for (int i = 0; i < m; i++) { cin >> a[i] >> b[i]; if (a[i] >= b[i]) { cou++; } } if (cou >= m - 1) { cout << '0'...
a.cc: In function 'int main()': a.cc:38:10: error: expected primary-expression before '?' token 38 | }??? | ^ a.cc:38:11: error: expected primary-expression before '?' token 38 | }??? | ^ a.cc:38:12: error: expected primary-expression before '?' token 38 | ...
s499956233
p00554
C++
#include <iostream> using namespace std; int main(){ int n,m,x,y,z; cin >> n >> m; x = 0; y = 0; z = 0; for(int i=0;i<m;i++){ int a,b; cin >> a >> b; if( a < n ){ y = n-a; x = x+y z = max( z , y ); } } cout << x-z << endl; return 0; }
a.cc: In function 'int main()': a.cc:16:32: error: expected ';' before 'z' 16 | x = x+y | ^ | ; 17 | z = max( z , y ); | ~
s026678824
p00554
C++
#include <bits/stdc++.h> using namespace std; int main(){ int N,M; cin >> N >> M; int A[1000],B[1000]; for(int i = 0; i < M; i++){ cin >> A[i] >> B[i]; } list<int> l; int count = 0; for(int i = 0; i < M; i++){ if(A[i] >= B[i]) count++; if(A[i] < B[i]) l.push_back(B[i] - A[i]); } } ...
a.cc:20:3: error: 'l' does not name a type 20 | l.sort(); | ^ a.cc:23:3: error: expected unqualified-id before 'while' 23 | while(count < M - 1){ | ^~~~~ a.cc:28:3: error: 'cout' does not name a type 28 | cout << ans << endl; | ^~~~ a.cc:30:3: error: expected unqualified-id before...
s709350553
p00554
C++
#include<iostream> #include<algorithm> #include<string> #include<vector> using namespace std; int main() { //合計時間 int N, M; cin >> N >> M; int a; vector<int> A; int b=0; for (int i = 0; i < 2*M; i+=2) { cin >> a; if (a < N) { A.push_back(a); break; } b++; } int sum = 0; if (b < M - 1) { sort...
a.cc: In function 'int main()': a.cc:26:21: error: no matching function for call to 'sort(<unresolved overloaded function type>, <unresolved overloaded function type>)' 26 | sort(A.begin, A.end); | ~~~~^~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:61, ...
s536452620
p00554
C++
#include<iostream> #include<algorithm> #include<string> #include<vector> using namespace std; int main() { //合計時間 int N, M; cin >> N >> M; int a; vector<int> A; int b=0; for (int i = 0; i < 2*M; i+=2) { cin >> a; if (a < N) { A.push_back(a); break; } b++; } int sum = 0; if (b < M - 1) { sort...
a.cc: In function 'int main()': a.cc:26:21: error: no matching function for call to 'sort(<unresolved overloaded function type>, <unresolved overloaded function type>)' 26 | sort(A.begin, A.end); | ~~~~^~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:61, ...
s944689077
p00554
C++
#include<iostream> #include<algorithm> #include<string> #include<vector> using namespace std; int main() { //合計時間 int N, M; cin >> N >> M; int a; int A[5000]; int b = 0; int x = 0; for (int i = 0; i < 2 * M; i++) { cin >> a; if (a < N) { A[x]=a; x++; break; } b++; cin >> a; } int sum = 0;...
a.cc: In function 'int main()': a.cc:29:24: error: request for member 'begin' in 'A', which is of non-class type 'int [5000]' 29 | sort(A.begin(), A.end()); | ^~~~~ a.cc:29:35: error: request for member 'end' in 'A', which is of non-class type 'int [5000]' 29 | ...
s333632191
p00554
C++
#include <algorithm> #include <cstdio> #include <iostream> #include <map> #include <cmath> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> #include <stdlib.h> #include <stdio.h> #include <bitset> #include <cstring> #include <deque> #include <iomanip> #include <lim...
a.cc: In function 'int main()': a.cc:35:14: error: cannot convert 'P' {aka 'std::pair<int, int>'} to '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} in assignment 35 | v[i] = P(a, b); | ^~~~~~~ | | | P {aka std::pair<int, in...
s030686153
p00555
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
s885099322
p00555
C++
#include <cstdio> #include <cstdlib> #include <cmath> #include <climits> #include <cfloat> #include <map> #include <utility> #include <set> #include <iostream> #include <memory> #include <string> #include <vector> #include <algorithm> #include <functional> #include <sstream> #include <complex> #include <stack> #includ...
a.cc: In function 'int main()': a.cc:29:9: error: 'memset' was not declared in this scope 29 | memset(board, 0xff, sizeof(board)); | ^~~~~~ a.cc:20:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 19 | #include <queue> +++ |+#inclu...
s190304119
p00555
C++
#include<iostream> #include<cstdio> #include<cstring> using namespace std; void main() { int i, j, m, n, d, c, cnt = 0; int b[100][100]; char a[100][101] = { -1 }; cin >> n >> m >> d; for (i = 0; i < n; i++) { for (j = 0; j < m; j++) { cin >> a[i][j]; if (a[i][j] == '#') { b[i][j] = 1; } else { ...
a.cc:5:1: error: '::main' must return 'int' 5 | void main() | ^~~~
s629576786
p00555
C++
#include<iostream> #include<cstdio> #include<cstring> using namespace std; void main() { int i, j, m, n, d, c, cnt = 0; int b[100][100]; char a[100][101] = { -1 }; cin >> n >> m >> d; for (i = 0; i < n; i++) { for (j = 0; j < m; j++) { cin >> a[i][j]; if (a[i][j] == '#') { b[i][j] = 1; } else { ...
a.cc:5:1: error: '::main' must return 'int' 5 | void main() | ^~~~
s011292877
p00555
C++
int main() { int n, m, d; cin >> n >> m >> d; vector<string> map; string s; for (int i = 0; i < n; i++) { cin >> s; map.emplace_back(s); } int ans = 0; for (int i = 0; i < n; i++) { for (int j = 0; j <= m - d + 1; j++) { int count = 0; for (int o = 0; o < d; o++) { if (map[i][j + o] == '.')coun...
a.cc: In function 'int main()': a.cc:4:9: error: 'cin' was not declared in this scope 4 | cin >> n >> m >> d; | ^~~ a.cc:5:9: error: 'vector' was not declared in this scope 5 | vector<string> map; | ^~~~~~ a.cc:5:16: error: 'string' was not declared in this scope ...
s077933984
p00555
C++
#include <iostream> using namespace std; int main(){ int n,m,d; cin >> n >> m >> d; int kaijou[100][100]; char c; for(int i=0;i<n;i++){ for(int j=0;j<m;j++){ cin >> c; if(c=='.'){ kaijou[i][j]=1; }else if(c=='#'){ kaijou[i][j]=0; } } } int ans=0; int nag...
a.cc: In function 'int main()': a.cc:28:45: error: expected ';' before 'nagasa' 28 | ans+=(nagasa-d+1>0)?(nagasa-d+1>0):0 | ^ | ; 29 | nagasa=0; | ~~~~~~ ...
s119994753
p00556
C++
//Plush Toys #include <iostream> #include <algorithm> #include <vector> #include <numeric> using namespace std; int A[100000], B[21] = {}; int N, M; int getCost(vector<int> v) { int cnt = 0; int i = 0; for(auto j : v) { int k = B[j]; while(k > 0) { if(A[i++] != j) cnt++; ...
a.cc: In function 'int main()': a.cc:37:16: error: 'INT_MAX' was not declared in this scope 37 | int cost = INT_MAX; | ^~~~~~~ a.cc:6:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 5 | #include <numeric> +++ |+#include <clim...
s451480728
p00556
C++
#include<iostream> #include<string> #include<cstdio> #include<algorithm> #include<functional> #include<unordered_map> using namespace std; int ruisekiwa[100001][20]; int main() { memset(ruisekiwa, 0, sizeof(ruisekiwa)); int a, b; cin >> a >> b; int c[20]{}; for (int d = 0; d < a; d++) { int e; scanf("%d", &e)...
a.cc: In function 'int main()': a.cc:11:9: error: 'memset' was not declared in this scope 11 | memset(ruisekiwa, 0, sizeof(ruisekiwa)); | ^~~~~~ a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 5 | #include<functional> +++ ...
s293641602
p00556
C++
#include <cstdio> #include <cstdlib> #include <cmath> #include <climits> #include <cfloat> #include <map> #include <utility> #include <set> #include <iostream> #include <memory> #include <string> #include <vector> #include <algorithm> #include <functional> #include <sstream> #include <complex> #include <stack> #includ...
a.cc: In function 'int main()': a.cc:49:9: error: 'memset' was not declared in this scope 49 | memset(memo, 0xff, sizeof(memo)); | ^~~~~~ a.cc:20:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 19 | #include <queue> +++ |+#include...
s701484813
p00556
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> pii; typedef pair<ll,int> plli; typedef pair<int,pii> pipii; typedef vector<int> vi; typedef vector<ll> vll; typedef vector<vi> vvi; typedef vector<vvi> vvvi; typedef vector<pii> vpii; #define int long long #define rep(i,n) for ...
a.cc: In function 'int main()': a.cc:57:23: error: expected ';' before 'long' 57 | r += l | ^ | ; a.cc:59:53: error: 'change' was not declared in this scope 59 | dp[i] = min(dp[i], dp[i ^ (1<<j)] + change); | ...
s048422959
p00556
C++
7 2 1 2 2 2 1 2 1
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 7 2 | ^
s672589024
p00557
C++
#include<iostream> #include<string> #include<cstdio> #include<algorithm> #include<functional> #include<queue> #include<unordered_map> #include<unordered_set> #define p pair<int,int> #define P pair<int,p> using namespace std; int hyoukou[1002][1002]; int x[4] = { -1,0,0,1 }, y[4] = { 0,-1,1,0 }; int main() { unordere...
a.cc: In function 'int main()': a.cc:17:17: error: 'memset' was not declared in this scope 17 | memset(hyoukou, 1, sizeof(hyoukou)); | ^~~~~~ a.cc:9:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 8 | #include<unord...
s725916237
p00557
C++
#include<iostream> #include<map> #include<string> #include<vector> #include<algorithm> #include<queue> #include<unordered_set> #define P pair<int,int> using namespace std; int h[1000000]; int ANS = 0; int a, b, c[1002][1002], x[4] = { -1,0,0,1 }, y[4] = { 0,-1,1,0 }; P d[1000000]; int main() { memset(h, -1, sizeof(h)...
a.cc: In function 'int main()': a.cc:16:9: error: 'memset' was not declared in this scope 16 | memset(h, -1, sizeof(h)); | ^~~~~~ a.cc:8:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 7 | #include<unordered_set> +++ |+#include <...
s365194313
p00557
C++
#include <iostream> #define rep(i,n) for(int i=0;i<n;i++) int m[1020][1020],ma[1001][1001],qw,a,b,e,f; int v[4]={-1,0,1,0},t[4]={0,-1,0,1}; using namespace std; int dfs(int x,int y){ if(qw>=2)goto L; if(m1[y][x]>0)return 0; int s=0,c=0; rep(i,4){ if(0>x+v[i]||b<=x+v[i]||0>y+t[i]||a<=y+t[i])continue; if(...
a.cc: In function 'int dfs(int, int)': a.cc:8:6: error: 'm1' was not declared in this scope; did you mean 'ma'? 8 | if(m1[y][x]>0)return 0; | ^~ | ma a.cc:17:8: error: 'm1' was not declared in this scope; did you mean 'ma'? 17 | if(0>m1[y][x]){ | ^~ | ma a.cc:2...
s265551547
p00557
C++
#include <iostream> #define rep(i,n) for(int i=0;i<n;i++) int m[1020][1020],m1[1001][1001],qw,a,b,e,f; int v[4]={-1,0,1,0},t[4]={0,-1,0,1}; using namespace std; int dfs(int x,int y){ if(qw>=2)goto L; if(m1[y][x]>0)return 0; int s=0,c=0; rep(i,4){ if(0>x+v[i]||b<=x+v[i]||0>y+t[i]||a<=y+t[i])continue; if(...
a.cc: In function 'int dfs(int, int)': a.cc:7:17: error: label 'L' used but not defined 7 | if(qw>=2)goto L; | ^ a.cc: In function 'int main()': a.cc:36:10: error: 'wq' was not declared in this scope; did you mean 'qw'? 36 | L:if(wq){ | ^~ | qw
s168727654
p00557
C++
#include <iostream> #define rep(i,n) for(int i=0;i<n;i++) int m[1020][1020],qw,a,b,e,f; int v[4]={-1,0,1,0},t[4]={0,-1,0,1}; using namespace std; int dfs(int x,int y){ if(qw>=2)return 1; if(m1[y][x]>0)return 0; int s=0,c=0; rep(i,4){ if(0>x+v[i]||b<=x+v[i]||0>y+t[i]||a<=y+t[i])continue; if(m[y][x+v[i]]<...
a.cc: In function 'int dfs(int, int)': a.cc:8:6: error: 'm1' was not declared in this scope; did you mean 'm'? 8 | if(m1[y][x]>0)return 0; | ^~ | m
s691329543
p00557
C++
#include <iostream> #include <stack> #define UNDEF -1 #define IS_RD -2 #define INF 1073741824 using namespace std; int M[1001][1001],H,W; int dp[1001][1001]; stack<int> callX; stack<int> callY; int getM(int x,int y) { if(x >= 0 && y >= 0 && x < W && y < H) { return M[x][y]; } else { return INF; } } void ...
a.cc: In function 'int main()': a.cc:155:28: error: 'dfs' was not declared in this scope 155 | if(dfs(x,y) == IS_RD) | ^~~
s979364334
p00558
C++
#include<cstdio> #include<iostream> #include<string> #include<vector> #include<algorithm> #include<set> #include<list> #include<map> #include<unordered_map> #include<unordered_set> #include<functional> #include<queue> #define P pair<int,int>//cost to using namespace std; int d[10000]; vector<P>rinsetu[10000]; struct r...
a.cc: In function 'int main()': a.cc:36:9: error: 'memset' was not declared in this scope 36 | memset(mincost, 0x3f, sizeof(mincost)); | ^~~~~~ a.cc:13:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 12 | #include<queue> +++ |+#in...
s245379171
p00558
C++
#include<cstdio> #include<iostream> #include<string> #include<vector> #include<algorithm> #include<set> #include<list> #include<map> #include<unordered_map> #include<unordered_set> #include<functional> #include<queue> #define int long long #define P pair<int,int>//cost to using namespace std; int d[10000]; vector<P>ri...
cc1plus: error: '::main' must return 'int' a.cc: In function 'int main()': a.cc:39:82: error: 'LLONG_MAX' was not declared in this scope 39 | mincost[x][0][y] = mincost[x][1][y] = mincost[x][2][y] = LLONG_MAX / 3; | ...
s219646345
p00558
C++
#include<bits/stdc++.h> #define int long long #define P pair<int,int>//cost to using namespace std; int d[10000]; vector<P>rinsetu[10000]; struct room { int now, cost, state, keika; }; bool operator <(room a, room b) { return a.cost > b.cost; } int mincost[10000][3][201];//??¨?±????????????????????????? int main() {...
cc1plus: error: '::main' must return 'int'
s260073038
p00558
C++
#include<cstdio> #include<iostream> #include<string> #include<vector> #include<algorithm> #include<set> #include<list> #include<map> #include<unordered_map> #include<unordered_set> #include<functional> #include<queue> #define P pair<int,int>//cost to using namespace std; int d[10000]; vector<P>rinsetu[10000]; struct r...
a.cc: In function 'int main()': a.cc:36:9: error: 'memset' was not declared in this scope 36 | memset(mincost, 0x3f, sizeof(mincost)); | ^~~~~~ a.cc:13:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 12 | #include<queue> +++ |+#in...
s104339213
p00558
C++
#include<cstdio> #include<iostream> #include<string> #include<vector> #include<algorithm> #include<set> #include<list> #include<map> #include<unordered_map> #include<unordered_set> #include<functional> #include<queue> #define P pair<int,int>//cost to using namespace std; int d[10010]; vector<P>rinsetu[10010]; struct r...
a.cc: In function 'int main()': a.cc:36:9: error: 'memset' was not declared in this scope 36 | memset(mincost, 0x3f, sizeof(mincost)); | ^~~~~~ a.cc:13:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 12 | #include<queue> +++ |+#in...
s031979105
p00558
C++
#include<cstdio> #include<iostream> #include<string> #include<vector> #include<algorithm> #include<set> #include<list> #include<map> #include<unordered_map> #include<unordered_set> #include<functional> #include<queue> #include<stdlib.h> #pragma warning(disable:4996) #define P pair<int,int>//cost to using namespace std;...
a.cc: In function 'int main()': a.cc:38:9: error: 'memset' was not declared in this scope 38 | memset(mincost,0x3f, sizeof(mincost)); | ^~~~~~ a.cc:14:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 13 | #include<stdlib.h> +++ |+#...
s210305130
p00559
C++
int n, q, s, t; LL a[200100]; LL ans; LL calc(LL lll) { if (lll > 0) { return -lll * s; } else { return -lll * t; } } int main() { cin >> n >> q >> s >> t; LL prev = 0; LL in; for (int i = 0; i <= n; i++) { cin >> in; a[i] = in - prev; ans += calc(a[i]); prev = in; } LL l, r, x; for (int i = 0;...
a.cc:2:1: error: 'LL' does not name a type 2 | LL a[200100]; | ^~ a.cc:3:1: error: 'LL' does not name a type 3 | LL ans; | ^~ a.cc:5:1: error: 'LL' does not name a type 5 | LL calc(LL lll) { | ^~ a.cc: In function 'int main()': a.cc:14:9: error: 'cin' was not declared in this scope 14 |...
s801285961
p00560
C++
#include <cstdio> #include <vector> #include <functional> using namespace std; long long int n, m, k, a, b, c, t; vector<long long int> s; long long int ans; typedef pair<long long int, long long int> P; vector<P> v; vector<long long int> w; long long int func(long long int x, long long int y, long long int z){ if(y...
a.cc: In function 'int main()': a.cc:50:9: error: 'sort' was not declared in this scope; did you mean 'short'? 50 | sort(w.begin(), w.end(), greater<long long int>()); | ^~~~ | short
s467875014
p00564
Java
import java.io.IOException; import java.util.Scanner; public class test { public static void main(String[] args)throws IOException{ Scanner scanner = new Scanner(System.in); int N = scanner.nextInt(); int A = scanner.nextInt(); int B = scanner.nextInt(); int C = scanner.nextInt(); int D = scanner.nextInt()...
Main.java:3: error: class test is public, should be declared in a file named test.java public class test { ^ 1 error
s457393614
p00564
Java
public class Pencils{ public static void main(String[] args){ if(args.length == 5){ int N = Integer.valueOf(args[0]); int A = Integer.valueOf(args[1]); int B = Integer.valueOf(args[2]); int C = Integer.valueOf(args[3]); int D = Integer.valueOf(a...
Main.java:1: error: class Pencils is public, should be declared in a file named Pencils.java public class Pencils{ ^ 1 error
s285509120
p00564
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; class Main{ public static void main(String[] args) { BufferedReader bfr=new BufferedReader(new InputStreamReader(System.in)); String str=""; StringTokenizer stk; int[] k1=new int[5];...
Main.java:15: error: 'try' without 'catch', 'finally' or resource declarations try{ ^ Main.java:56: error: 'catch' without 'try' }catch(IOException e) { ^ Main.java:59: error: 'catch' without 'try' catch(NumberFormatException ee) { ^ Main.java:63: error: 'catch' without 'try' catch(NullPointerExce...
s663786670
p00564
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; class Main{ public static void main(String[] args) { BufferedReader bfr=new BufferedReader(new InputStreamReader(System.in)); String str=""; StringTokenizer stk; int[] k1=new int[5];...
Main.java:65: error: cannot find symbol sougaku_2[jj]=jj*k1[4]+set1_kosu*k1[2]; ^ symbol: variable sougaku_2 location: class Main Main.java:66: error: cannot find symbol if(saiyasune_2>sougaku_2[jj]) { ^ symbol: variable sougaku_2 location: class Main Main.java:67: error: ...
s236324670
p00564
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; class Main{ public static void main(String[] args) { BufferedReader bfr=new BufferedReader(new InputStreamReader(System.in)); String str=""; StringTokenizer stk; int[] k1=new int[5];...
Main.java:15: error: 'try' without 'catch', 'finally' or resource declarations try{ ^ Main.java:74: error: 'catch' without 'try' catch(IOException e) { ^ Main.java:77: error: 'catch' without 'try' catch(NumberFormatException ee) { ^ Main.java:81: error: 'catch' without 'try' catch(NullPointerExce...
s073060864
p00564
Java
import java.util.Scanner; class PenSet{ int number; int value; PenSet(int x,int y){ number = x; value = y; } } public class Pencils{ public static void main(String[] args){ int val,num,setNum,i,j,min=0; Scanner s...
Main.java:13: error: class Pencils is public, should be declared in a file named Pencils.java public class Pencils{ ^ 1 error
s354615092
p00564
Java
import java.util.Scanner; class PenSet{ int number; int value; PenSet(int x,int y){ number = x; value = y; } } public class Pencils{ public static void main(String[] args){ int val,num,setNum,i,j,min=0; Scanner s...
Main.java:13: error: class Pencils is public, should be declared in a file named Pencils.java public class Pencils{ ^ 1 error
s329988727
p00564
Java
steamsass's
Main.java:1: error: unclosed character literal steamsass's ^ 1 error
s697923866
p00564
C
#include <stdio.h> int main(void) { int N,A,B,C,D,price_X,price_Y,mod; scanf( "%d %d %d %d %d" , &N,&A,&B,&C,&D ); mod=( N%A != 0 ) price_X=(N/A+mod)*B; mod=( N%C != 0 ) price_Y=(N/C+mod)*D; if( price_X < price_Y ){ printf("%d\n" , price_X); }else{ printf("%d\n" , price_Y); } ...
main.c: In function 'main': main.c:6:20: error: expected ';' before 'price_X' 6 | mod=( N%A != 0 ) | ^ | ; 7 | price_X=(N/A+mod)*B; | ~~~~~~~ main.c:8:20: error: expected ';' before 'price_Y' 8 | mod=( N%C != 0 ) | ...
s901467302
p00564
C
#include <stdio.h> #defin AB (N/A+( N%A != 0 ))*B #defin CD (N/C+( N%C != 0 ))*D int main(void) { int N,A,B,C,D; scanf( "%d %d %d %d %d" , &N,&A,&B,&C,&D ); printf("%d\n" , ((N/A+( N%A != 0 ))*B<(N/C+( N%C != 0 ))*D)*(N/A+( N%A != 0 ))*B+((N/A+( N%A != 0 ))*B>=(N/C+( N%C != 0 ))*D)*(N/C+( N%C != 0 ))*D); ...
main.c:2:2: error: invalid preprocessing directive #defin; did you mean #define? 2 | #defin AB (N/A+( N%A != 0 ))*B | ^~~~~ | define main.c:3:2: error: invalid preprocessing directive #defin; did you mean #define? 3 | #defin CD (N/C+( N%C != 0 ))*D | ^~~~~ | define
s746566772
p00564
C
#include<iostream> using namespace std; // ?? int main(){ int n, a, b, c, d; cin >> n >> a >> b >> c >> d; int x = (n/a)*b + (n%a>0?1:0)*b; int y = (n/c)*d + (n%c>0?1:0)*d; if ( x > y ) cout << x << endl; else cout << y << endl; return 0; }
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s035232950
p00564
C++
// http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0641 #include<iostream> using namespace std; //標準名前空間を使用 int main(){ /変数を読み込む int N , A , B ,C ,D ; int Xset , Yset , Xprice , Yprice; // セットXで揃えた場合のの必要セット数(Xset)を求める Xset = N / A + 1 ; // セットXで揃えた場合の合計金額を求める Xprice = Xset * B...
a.cc: In function 'int main()': a.cc:9:5: error: expected primary-expression before '/' token 9 | /変数を読み込む | ^ a.cc:9:6: error: '\U00005909\U00006570\U00003092\U00008aad\U0000307f\U00008fbc\U00003080' was not declared in this scope 9 | /変数を読み込む | ^~~~~~~~~~~~~~ a.cc:14:12: error: 'N...
s312357916
p00564
C++
// http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0641 #include<iostream> using namespace std; //標準名前空間を使用 int main(){ //変数を読み込む int N , A , B ,C ,D ; int Xset , Yset , Xprice , Yprice; // セットXで揃えた場合の必要セット数(Xset)を求める Xset = N / A + 1 ; // セットXで揃えた場合の合計金額を求める Xprice = Xset * B...
a.cc: In function 'int main()': a.cc:28:5: error: 'out' was not declared in this scope 28 | out << Yprice ; //そうでない場合、Ypriceを出力 | ^~~
s032387837
p00564
C++
#include<string.h> int main(void) { int n,x,y,a,b,c,d; scanf("%d",&n); scanf("%d",&a); scanf("%d",&b); scanf("%d",&c); scanf("%d",&d); x=n/a*b; y=n/c*d; if(n%a>0){ x=x+b; } if(n%c>0){ y=y+d; } if(x<y){ printf("%d\n",x); } else{ printf("%d\n",y); } return 0; }
a.cc: In function 'int main()': a.cc:5:9: error: 'scanf' was not declared in this scope 5 | scanf("%d",&n); | ^~~~~ a.cc:19:17: error: 'printf' was not declared in this scope 19 | printf("%d\n",x); | ^~~~~~ a.cc:2:1: note: 'printf' is defined in header ...
s007687287
p00564
C++
#include <iostream> using namespace std; int N,A,B,C,D int X_SET,Y_SET,X_SUM,Y_SUM; int main(){ cin>>N>>A>>B>>C>>D; X_SET = N/A; if(N%A>0)X_SET=X_SET+1; Y_SET=N/C; if(N%C>0)Y_SET+1; X_SUM=B*X_SET; Y_SUM=D*Y_SET; if(X_SUM<Y_SUM)cout<<X_SUM<<endl; else cout<<Y_SUM<<endl; return0; }
a.cc:6:1: error: expected initializer before 'int' 6 | int X_SET,Y_SET,X_SUM,Y_SUM; | ^~~ a.cc: In function 'int main()': a.cc:8:18: error: 'D' was not declared in this scope 8 | cin>>N>>A>>B>>C>>D; | ^ a.cc:9:1: error: 'X_SET' was not declared in this scope; did you mean 'FD_SET'? ...
s056490944
p00564
C++
#include <iostream> using namespace std; int main(void){ int n,a,b,c,d; int x,y; cin >> n,a,b,c,d; x=n/a; if(x!=1) x++; x=x*c; y=n/b; if(y!=1) y++; y=y*d; if(x<y){ count << x; }else{ count << y; } return 0; }
a.cc: In function 'int main()': a.cc:17:6: error: 'count' was not declared in this scope 17 | count << x; | ^~~~~ a.cc:19:6: error: 'count' was not declared in this scope 19 | count << y; | ^~~~~
s756361718
p00564
C++
#include<iostream> #include<algorithm> #include<vector> using namespace std; int kai(int n) { if (n == 0) { return 1; } else { return n * kai(n - 1); } } int he(int a, int b) { return a * 3 + b; } int main() { int n = 9; vector<vector<int>> hyo(n,vector<int> (n)); vector<vector<int>> qhyo; int uni = -1; v...
a.cc: In function 'int main()': a.cc:112:43: error: expected ';' before '}' token 112 | }2 | ^ | ; 113 | } | ~...
s880207537
p00564
C++
#include<bits/stdc++.h> using namespace std; int main(){ int N,A,B,C,D; cin >> N >> A >> B >> C >> D; int AN = N/A+1; if(N%A==0)NA--; int CN = N/C+1; if(N%C==0)NC--; cout << min(AN*B,CN*D) << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:15: error: 'NA' was not declared in this scope; did you mean 'AN'? 7 | if(N%A==0)NA--; | ^~ | AN a.cc:9:15: error: 'NC' was not declared in this scope; did you mean 'CN'? 9 | if(N%C==0)NC--; | ^~ | ...
s391739668
p00564
C++
#include<bits/stdc++.h> using namespace std; int main() { int N,A,B,C,D,E,F; cin >> N >> A >> B >> C >> D; E = (N/A)*B; F = (N/C)*D; if(E>0&&F>0){ if(A>C && B>D){ cout<< E <<endl; } if(A>C && B<D){ cout<< E <<endl; } if(A<C && B<D){ cout<< F << endl; } if(A<C && B>D){ ...
a.cc: In function 'int main()': a.cc:23:3: error: expected '}' at end of input 23 | } | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s681089529
p00564
C++
#included<bits/stdc++.h> int main(){ int N,A,B,C,D; double x,y; scanf("%d%d%d%d%d",&N,&A,&B,&C,&D); x=N/A; y=N/C; x=ceil(x); y=ceil(y); if (B*x <= D*y) {printf(B*x); else{printf(D*y);} return 0; }
a.cc:1:2: error: invalid preprocessing directive #included; did you mean #include? 1 | #included<bits/stdc++.h> | ^~~~~~~~ | include a.cc: In function 'int main()': a.cc:5:5: error: 'scanf' was not declared in this scope 5 | scanf("%d%d%d%d%d",&N,&A,&B,&C,&D); | ^~~~~ a.cc:8:7: error...
s117293131
p00564
C++
#include<stdio.h> #include<math.h> int main(void){ int N,A,B,C,D; scanf("%d%d%d%d%d",&N,&A,&B,&C,&D); double x=ceil(N/A); double y=ceil(N/C); if (B*x <= D*y) {printf(B*x); else{printf(D*y);} return 0; }
a.cc: In function 'int main()': a.cc:9:10: error: cannot convert 'double' to 'const char*' 9 | {printf(B*x); | ~^~ | | | double In file included from a.cc:1: /usr/include/stdio.h:363:43: note: initializing argument 1 of 'int printf(const char*, ...)' 363 | extern int ...
s662471901
p00564
C++
#include<sbits/stdc++.h> #include<math.h> int main(void){ int N,A,B,C,D; scanf("%d%d%d%d%d",&N,&A,&B,&C,&D); double x=ceil(N/A); double y=ceil(N/C); if (B*x <= D*y) {printf(B*x); else{printf(D*y);} return 0; }
a.cc:1:9: fatal error: sbits/stdc++.h: No such file or directory 1 | #include<sbits/stdc++.h> | ^~~~~~~~~~~~~~~~ compilation terminated.
s952271261
p00564
C++
#include<sbits/stdc++.h> #include<math.h> int main(void){ int N,A,B,C,D; scanf("%d%d%d%d%d",&N,&A,&B,&C,&D); double x=ceil(N/A); double y=ceil(N/C); if (B*x <= D*y) {printf("B*x\n");} else{printf("D*y\n");} return 0; }
a.cc:1:9: fatal error: sbits/stdc++.h: No such file or directory 1 | #include<sbits/stdc++.h> | ^~~~~~~~~~~~~~~~ compilation terminated.
s218042625
p00564
C++
import java.util.Scanner; class PenSet{ int number; int value; PenSet(int x,int y){ number = x; value = y; } } class Pencils{ public static void main(String[] args){ int val,num,setNum,i,j,min=0; Scanner scn = ne...
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:11:2: error: expected ';' after class definition 11 | } | ^ | ; a.cc:14:15: error: expected ':' before 'static' 14 | public s...
s092740686
p00564
C++
#include<iostream> using namespace std; int main() { int n, a, b, c, d,x,y; cin n >> a >> b >> c >> d; if (n%a > 0) { x = (n / a + 1)*b; } else { x = (n / a)*b; } if (n%c > 0) { y = (n / c + 1)*d; } else { y = (n / c)*d; } cout >> min(x, y) >> endl; return 0; }
a.cc: In function 'int main()': a.cc:6:12: error: expected ';' before 'n' 6 | cin n >> a >> b >> c >> d; | ^ ~ | ; a.cc:19:14: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const int') 19 | cout >> min(x...
s179212884
p00564
C++
#include<iostream> using namespace std; int main() { int n, a, b, c, d,x,y; cin n >> a >> b >> c >> d; if (n%a > 0) { x = (n / a + 1)*b; } else { x = (n / a)*b; } if (n%c > 0) { y = (n / c + 1)*d; } else { y = (n / c)*d; } cout << min(x, y) << endl; return 0; }
a.cc: In function 'int main()': a.cc:6:12: error: expected ';' before 'n' 6 | cin n >> a >> b >> c >> d; | ^ ~ | ;