submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s346994106
p00773
C++
#include<iostream> using namespace std; int tax(int x,int y); int tax(int x,int y,int a){ int a=a*(100+y)/(100+x); return a; } int main() { while(1){ cin>>x>>y>>a; if(x==0&&y==0&&a==0){ break; } cout<<tax(x,y,a)<<endl; } return 0; }
a.cc: In function 'int tax(int, int, int)': a.cc:7:9: error: declaration of 'int a' shadows a parameter 7 | int a=a*(100+y)/(100+x); | ^ a.cc:6:25: note: 'int a' previously declared here 6 | int tax(int x,int y,int a){ | ~~~~^ a.cc: In function 'int main()': a.cc:13:1...
s330567142
p00773
C++
#include "practice2.hpp" #include<iostream> using namespace std; int tax(int x,int y,int a); int tax(int x,int y,int a){ int b=a*(100+y)/(100+x); return b; } int main() { while(1){ int x,y,a; cin>>x>>y>>a; if(x==0&&y==0&&a==0){ break; } cout<<tax(x,y,a)<...
a.cc:2:10: fatal error: practice2.hpp: No such file or directory 2 | #include "practice2.hpp" | ^~~~~~~~~~~~~~~ compilation terminated.
s814728794
p00773
C++
#include <iostream> using namespace std; int max(int a,int b){ if(a>b) return a; else return b; } int x,y; int tax(int n){ int p = 0; for(int i = 1 ; i < 1000 ; i++){ if(i*(100+x)/100 == n){ p = i; break; } } return p*(100+y)/100; } int ...
a.cc: In function 'int main()': a.cc:28:21: error: 'max' cannot be used as a function 28 | max =max(max,tax(i)+tax(s-i)); | ~~~^~~~~~~~~~~~~~~~~~~~~
s788482793
p00773
C++
#include <iostream> using namespace std; int a,t; int tax(a,t){ int p; p = a*(100+t)/100; return p; } int main(){ int x,y,s; int m = 0; while (cin >> x >> y >> s && s>0){ for (int i=1; i<s; ++i){ for (int j=1; j<s; ++j){ if (tax(i,x) + tax(j,x) == s){ m = max(m, tax(i,y) ...
a.cc:6:12: error: expression list treated as compound expression in initializer [-fpermissive] 6 | int tax(a,t){ | ^ a.cc:6:13: error: expected ',' or ';' before '{' token 6 | int tax(a,t){ | ^ a.cc: In function 'int main()': a.cc:18:26: error: 'tax' cannot be used as a functi...
s262584538
p00773
C++
#include <algorithm> #include <iostream> using namespace std; int main(){ double x,y; int s; while(cin >> x >> y >> s){ if(x == 0 && y == 0 && s == 0)break; x /= 100.0;y /= 100.0; x += 1.0,y += 1.0; int ans = 0; for(int a = 1;a < s;a++){ for(int b = 1;b < s;b++){ if(a * x + b * x == s){ ans...
a.cc: In function 'int main()': a.cc:18:50: error: no matching function for call to 'max(double, int&)' 18 | ans = max(a * y + b * y,ans); | ~~~^~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, ...
s170984918
p00773
C++
#include <iostream> #include <algorithm> using namespace std; inline int deTax(int rate, int yen){ return yen * 100 / (100 + rate); } inline int enTax(int rate, int yen){ return yen * (100 + rate) / 100; } ??? int main(){ while(1){ int x, y, s; cin >> x >> y >> s; if(!x && !y && !s) break; ??? int ma...
a.cc:11:1: error: expected unqualified-id before '?' token 11 | ??? | ^
s145096659
p00773
C++
#include <iostream> #include <algorithm> using namespace std; inline int deTax(int rate, int yen){ return yen * 100 / (100 + rate); } inline int enTax(int rate, int yen){ return yen * (100 + rate) / 100; } int main(){ while(1){ int x, y, s; cin >> x >> y >> s; if(!x && !y && !s) break; int maximum ...
a.cc: In function 'int main()': a.cc:27:13: error: 'MAX' was not declared in this scope 27 | cout << MAX << endl; | ^~~
s307638366
p00773
C++
#include<iostream> #include<algorithm> using namespace std; int main(){ int x,y,s; while(cin<<x<<y<<s&&x&&y&&s){ int p1,p2,maxx,maxy=0,maxz; for(p1=1;p1<s;p1++){ for(p2=p1;p2<s;p2++){ maxx=p1*(100+x)/100+p2*(100+x)/100; if(maxx==s){ maxz=p1*(100+y)/100+p2*(100+y)/100; ...
a.cc: In function 'int main()': a.cc:6:18: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 6 | while(cin<<x<<y<<s&&x&&y&&s){ | ~~~^~~ | | | | | int | std::istr...
s777295755
p00773
C++
#include<iostream> using namespace std; int main(){ int S; cin >> S; int maximum = 0; for (int i=1; i<S; ++i) for (int j=i; j<S; ++j) if (tax(X,i)+tax(X,j) == S) maximum = max(maximum, tax(Y,i)+tax(Y,j)); return 0; }
a.cc: In function 'int main()': a.cc:9:9: error: 'X' was not declared in this scope 9 | if (tax(X,i)+tax(X,j) == S) | ^ a.cc:9:5: error: 'tax' was not declared in this scope 9 | if (tax(X,i)+tax(X,j) == S) | ^~~ a.cc:10:40: error: 'Y' was not declared in this scope 10 | ma...
s739069221
p00773
C++
#include <iostream> using namespace std; int main(){ while(true){ int X,Y,S; cin >> X >> Y >> S; if(X == 0 && Y == 0 && S == 0)break; int maximum = 0; for (int i=1; i<S; ++i) for (int j=i; j<S; ++j) if (tax(X,i)+tax(X,j) == S) maximum = max(maximum, tax(Y,i)+tax(Y,j)); cout << maximum; } return 0; }
a.cc: In function 'int main()': a.cc:11:5: error: 'tax' was not declared in this scope 11 | if (tax(X,i)+tax(X,j) == S) | ^~~
s226516824
p00773
C++
#include <iostream> #include <algorithm> using namespace std; int main() { int x, y, s; while (cin >> x >> y >> s, x || y || s) { int ans = 0; for (int i = 1; i < s; i++) { int a = i * (100 + x) / 100; int b = ceil((s - a) * 100 / (100 + x)); if (b > 0 && a + (b * (100 + x) / 100) == s) { ans ...
a.cc: In function 'int main()': a.cc:13:33: error: 'ceil' was not declared in this scope 13 | int b = ceil((s - a) * 100 / (100 + x)); | ^~~~
s794476283
p00773
C++
#include<iostream> #include<algorithm> using namespace std; #define REP(i,n) for(int i = 0;i < n;i++) int main() { int x,y,s; while(cin >> x >> y >> s,x|y|s) { int ans = 0; for(int i = 1;i < s;i++) { for(int j = 1;j < s ;j++) { int a = i*(100.d + x)/100d; int b = j*(100.d + x)/100.d; if(a...
a.cc: In function 'int main()': a.cc:18:55: error: unable to find numeric literal operator 'operator""d' 18 | int a = i*(100.d + x)/100d; | ^~~~
s051944716
p00773
C++
#include<algorithm> #include<vector> using namespace std; vector<int> ans; int x,y,s; int main(){ while(1){ cin >> x >> y >> s; if(x + y + s == 0) break; int mx = 0; for(int i = 1; i < s;i++){ for(int j = s-1;j >= 1;j--){ if((i*(100+x)/100 + j*(100+x)/100) == s){ int sum = i*(100+y)/100 + j*(100...
a.cc: In function 'int main()': a.cc:11:17: error: 'cin' was not declared in this scope 11 | cin >> x >> y >> s; | ^~~ a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 2 | #include<vector> +++ |+#include...
s473011360
p00773
C++
#include<algorithm> #include<vector> using namespace std; vector<int> ans; int x,y,s; int main(){ while(1){ cin >> x >> y >> s; if(x + y + s == 0) break; int mx = 0; for(int i = 1; i < s;i++){ for(int j = s-1;j >= 1;j--){ if((i*(100+x)/100 + j*(100+x)/100) == s){ int sum = i*(100+y)/100 + j*(100...
a.cc: In function 'int main()': a.cc:11:17: error: 'cin' was not declared in this scope 11 | cin >> x >> y >> s; | ^~~ a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 2 | #include<vector> +++ |+#include...
s193233391
p00773
C++
#include <iostream> using namespace std; int main(){ int x,y,s; while(cin >> x >> y >> s && x){ int ans=0; for(int i=1;i<s;i++){ for(int j=1;j<s;j++){ if(i*(100+x)/100+j*(100+x)/100==s){ if(i*(100+y)/100+j*(100+y)/100>ans){ ans=100+y)/100+j*(100+y)/100; } } } } cout << ans << endl } }
a.cc: In function 'int main()': a.cc:11:10: error: expected ';' before ')' token 11 | ans=100+y)/100+j*(100+y)/100; | ^ | ; a.cc:16:20: error: expected ';' before '}' token 16 | cout << ans << endl | ^ | ; 17 | } | ~ ...
s136621504
p00773
C++
#include<iostream> using namespace std; double tax(int price, int rate) { return price*(1+0.01*rate) } int main() { int x, y, s; int maximum = 0; cin >> x >> y >> s; for (int i = 1; i < s; ++i) { for (int j = i; j < s; ++j) { if (tax(i, x) + tax(j, x) == s) { if(maximum<tax(i,y)+tax(j,y)) maximum =...
a.cc: In function 'double tax(int, int)': a.cc:5:35: error: expected ';' before '}' token 5 | return price*(1+0.01*rate) | ^ | ; 6 | } | ~
s857702009
p00773
C++
#include<iostream> using namespace std; double tax(int price, int rate) { return price*(1 + 0.01*rate); } int main() { while (true) { int x, y, s; int maximum = 0; cin >> x >> y >> s; if (x == 0 && y = 0 && s == 0) break; for (int i = 1; i < s; ++i) { for (int j = i; j < s; ++j) { if (tax(i, x) + t...
a.cc: In function 'int main()': a.cc:13:28: error: lvalue required as left operand of assignment 13 | if (x == 0 && y = 0 && s == 0) break; | ~~~~~~~^~~~
s053723435
p00773
C++
#include<iostream> using namespace std; int main(){ int x,y,s; cin >> x >> y >> s; int f = 0 for(int i=0;i<s/2;i++){ int a = i*100/(100 + x); if (a*(100+x)/100 != i){ a += 1; } int b = (s-i)*100/(100 + x); if (b*(100+x)/100 != i){ b += 1; } int k = (a*(100+y)/100) + (b*(...
a.cc: In function 'int main()': a.cc:8:3: error: expected ',' or ';' before 'for' 8 | for(int i=0;i<s/2;i++){ | ^~~ a.cc:8:15: error: 'i' was not declared in this scope 8 | for(int i=0;i<s/2;i++){ | ^ a.cc:22:13: error: expected '}' at end of input 22 | cout << f; | ...
s782037018
p00773
C++
#include<iostream> using namespace std; int main(){ int x,y,s; cin >> x >> y >> s; int f = 0 for(int i=0;i<s/2;i++){ int a = i*100/(100 + x); if (a*(100+x)/100 != i){ a += 1; } int b = (s-i)*100/(100 + x); if (b*(100+x)/100 != i){ b += 1; } int k = (a*(100+y)/100) + (b*(...
a.cc: In function 'int main()': a.cc:8:3: error: expected ',' or ';' before 'for' 8 | for(int i=0;i<s/2;i++){ | ^~~ a.cc:8:15: error: 'i' was not declared in this scope 8 | for(int i=0;i<s/2;i++){ | ^
s435404845
p00773
C++
cin >> x >> y >> s; if(x < 100 && x > 0 && y < 100 && y > 0 && s < 1000 && s > 0){ int f = 0; for(int i=1;i<s-1;i++){ int a = i*100/(100 + x); while(int(a*(100+x)/100) <= i){ a += 1; } a -= 1; int b = (s-i)*100/(100 + x); while(int(b*(100+x)/100) <= s-i){ b += 1; } ...
a.cc:1:1: error: 'cin' does not name a type 1 | cin >> x >> y >> s; | ^~~ a.cc:2:3: error: expected unqualified-id before 'if' 2 | if(x < 100 && x > 0 && y < 100 && y > 0 && s < 1000 && s > 0){ | ^~
s172517513
p00773
C++
#include<iostream> using namespace std; int main(){ int x,y,s; s = 1 while(x != 0 || y!=0 || s != 0){ cin >> x >> y >> s; if(x < 100 && x > 0 && y < 100 && y > 0 && s < 1000 && s > 0){ int f = 0; for(int i=1;i<s-1;i++){ int a = i*100/(100 + x); while(int(a*(100+x)/100) <= i){ a += 1; } ...
a.cc: In function 'int main()': a.cc:6:8: error: expected ';' before 'while' 6 | s = 1 | ^ | ; 7 | while(x != 0 || y!=0 || s != 0){ | ~~~~~
s199775767
p00773
C++
#if ???????????????????\??????¨??¨????????????????????£???????????????????????? ??????????????????????????¨??????????????????????????????????????????????????°????????????????????????????????????????????????????????£????????????????????§?????? ?????????????????????????????´???????????????????????\????????????????´???´??...
a.cc:1:4: error: #if with no expression 1 | #if | ^ a.cc:2:51: error: extended character £ is not valid in an identifier 2 | ???????????????????\??????¨??¨????????????????????£???????????????????????? | ^ a.cc:3:78: error: extended character ° is ...
s017995998
p00773
C++
int main () { while (true) { int before; int after; int sum; cin >> before >> after >> sum; if (before == 0 && after == 0 && sum == 0) { break; } int min = ceil(100.0/after); // ?????????????????§?????????????°???? int before_raw_1; // ??§?¨????????????? int before_1; // ?...
a.cc: In function 'int main()': a.cc:6:5: error: 'cin' was not declared in this scope 6 | cin >> before >> after >> sum; | ^~~ a.cc:12:15: error: 'ceil' was not declared in this scope 12 | int min = ceil(100.0/after); // ?????????????????§?????????????°???? | ^~~~ a.cc:23:36...
s535667403
p00773
C++
#include <iostream> #include <algorithm> using namespace std; int main() { while(1){ int x,y,s; cin>>x>>y>>s; if(x==0 && y==0 && s==0) break; int tmax = -1; for(int i=0; i<=s-1; i++){ int ax = i*(100+x)/100; int ay = a*(100+y)/100; for(int j=0; j<=s-1; j++){ in...
a.cc: In function 'int main()': a.cc:18:16: error: 'a' was not declared in this scope; did you mean 'ay'? 18 | int ay = a*(100+y)/100; | ^ | ay
s449192245
p00773
C++
#include<iostream> #include<algorithm> using namespace std; int main(){ while(1){ int x,y,s; cin>>x>y>>s; if(x==0&&y==0&&s==0) break; int tmax=-1; for(int a=1;a<s-1;a++){ int ax=a*(100+x)/100; int ay=a*(100+y)/100; for(int b=0;b<s-1;b++){ int bx=b*(100+x)/100; int by=b*(100+y)/100; ...
a.cc: In function 'int main()': a.cc:8:23: error: no match for 'operator>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int') 8 | cin>>x>y>>s; | ~~~~~~^~~~~ | | | | | ...
s904478121
p00773
C++
#include <iostream> #include <algorithm> using namespace std; int main(){ while(true){ int x,y,s; cin>>x>>y>>s; if(x==0&&y==0&&s==0){ break; } int tmax=-1; for(int a=1;a<=s-1;a++){ int ax = a*(100+x)/100; int ay = a*(100+y)/100; for(int b=1;b<=s-1;b++){ int bx=...
a.cc: In function 'int main()': a.cc:20:28: error: 'by' was not declared in this scope; did you mean 'bx'? 20 | tmax=max(tmax,ay+by); | ^~ | bx
s435628013
p00773
C++
#include<iostream> #include<algorithm> using namespace std; int main(){ while(1){ int x,y,s; cin>>x>y>>s; if(x==0&&y==0&&s==0) break; int tmax=-1; for(int a=1;a<s-1;a++){ int ax=a*(100+x)/100; int ay=a*(100+y)/100; for(int b=1;b<s-1;b++){ int bx=b*(100+x)/100; int by=b*(100+y)/100; ...
a.cc: In function 'int main()': a.cc:8:23: error: no match for 'operator>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int') 8 | cin>>x>y>>s; | ~~~~~~^~~~~ | | | | | ...
s704913027
p00773
C++
#include <iostream> #include <algorithm> using namespace std; int main() { while(true){ int x,y,s; cin>>x>>y>>s; if(x==0&&y==0&&s==0) break; int tmax =-1; for(int a=1;i<=s-1;a++){ int ax=a*(100+x)/100; int ay=a*(100+y)/100; for(int b=1; b<=s-1; b++){ int bx=b*(10...
a.cc: In function 'int main()': a.cc:16:17: error: 'i' was not declared in this scope 16 | for(int a=1;i<=s-1;a++){ | ^ a.cc:32:11: error: 'n' was not declared in this scope 32 | cout<<n<<endl; | ^
s753770922
p00773
C++
#include <iostream> using namespace std; int main(){ while (true) { int x,y,s; cin>>x>>y>>s; int tmax=-1; for (int a=0;a<s-1;a++){ int ax=a*(100+x)/50; int ay=a*(100+y)/50; for(int b=1;b<s-1;b++){ int bx =b*(100+x)/100; int by =b*(100+y)/100; if(ax+bx==s){ tamx=max(tmax,ay+by); ...
a.cc: In function 'int main()': a.cc:20:41: error: 'tamx' was not declared in this scope; did you mean 'tmax'? 20 | tamx=max(tmax,ay+by); | ^~~~ | tmax
s924410919
p00773
C++
#include <iostream> #include <algorithm> using namespace std; int main() { while(true){ int x,y,s; cin>>x>>y>>s; if(x==0&&y==0&&s==0) break; int tmax =-1; for(int a=1;a<=s-1;a++){ int ax=a*(100+x)/100; int ay=a*(100+y)/100; for(int b=1; b<=s-1; b++){ int bx=b*(10...
a.cc: In function 'int main()': a.cc:32:11: error: 'n' was not declared in this scope 32 | cout<<n<<endl; | ^
s823110614
p00773
C++
#include <iostream> using namespace std; int chtax(int a,int x,int y){ int cda = a * (100 / (100 + x)) * ((100 + y) / 100);//抜いて入れる return cda; } int main(){ int x,y,s; cin >>x>>y>>s; //xの税率で最大の組をもとめる。 int chenum = 0; for(int i = 1;i < s;i++){ for(int j = 1;i < s; j++){ i...
a.cc: In function 'int main()': a.cc:24:14: error: expected '}' at end of input 24 | return 0; | ^ a.cc:7:11: note: to match this '{' 7 | int main(){ | ^
s261749159
p00773
C++
#include<C:\bits\stdc++.h> using namespace std; int main(){ int t,s,ans=0,subj,subk,x=0,y=0,suba,subs,subsum; double a,sum,j,k,b,c; while(1){ t=0; cin>>x>>y>>s; a=((double)s/(100.00+x)*100.00)+1.8; cout<<a<<endl; suba=a; cout<<suba<<endl; ...
a.cc:1:9: fatal error: C:\bits\stdc++.h: No such file or directory 1 | #include<C:\bits\stdc++.h> | ^~~~~~~~~~~~~~~~~~ compilation terminated.
s459935608
p00773
C++
#include<bits/stdc++.h> using namespace std; int main(){ int t,s,ans=0,subj,subk,x=0,y=0,suba,subs,subsum; double a,sum,j,k,b,c; while(1){ t=0; cin>>x>>y>>s; a=(s/(100.00+x)*100.00); cout<<a<<endl; suba=a; cout<<suba<<endl; for(int i=1;i<...
a.cc: In function 'int main()': a.cc:21:46: error: invalid type argument of unary '*' (have 'double') 21 | j=(double)suba-(double)i+(double)*0.1; | ^~~~
s005479584
p00773
C++
#include<iostream> #include<algorithm> using namespace std; int main(){ while(1){ long int x,y,z,ans=0; cin >> x >> y >> z; if(!x&&!y&&!z) break; for(long int i=0;i<z;i++){ for(long int j=0;j<z;j++){ if(long int(i*(100+x)/100)+long int(j*(100+x)/100)==z) ans = max(ans,long int(i*(100+y)/100)+long i...
a.cc: In function 'int main()': a.cc:11:36: error: expected primary-expression before 'long' 11 | if(long int(i*(100+x)/100)+long int(j*(100+x)/100)==z) | ^~~~ a.cc:11:36: error: expected ')' before 'long' 11 | ...
s586001693
p00773
C++
#include <iostream>using namespace std;int cut(double val){ //切り捨て int newval,a,b; a = val; if(val >= a) b = a+1; else{ b = a; a = b-1; } if(a < val < b) newval = a; else newval = val; return newval;}int main() { int th1,th2,x,y,thb1,thb2,tha1,tha2; //原価,税率,旧,新価格 double s,m; while(1){ cin >> x >> y >> s; if(x=...
a.cc:1:26: warning: extra tokens at end of #include directive 1 | #include <iostream>using namespace std;int cut(double val){ //切り捨て | ^~~~~~~~~ a.cc:1:10: fatal error: iostream>usin: No such file or directory 1 | #include <iostream>using namespace std;int cut(double val){ /...
s377975969
p00773
C++
#include <iostream> using namespace std; ​ int cut(double val){ //切り捨て int newval,a,b; a = val; if(val >= a) b = a+1; else{ b = a; a = b-1; } if(a < val < b) newval = a; else newval = val; return newval; } ​ ​ ​ int main() { int th1,th2,x,y,thb1,thb2,tha1,tha2; //原価,税率,旧,新価格 double s,m; while(1){ ...
a.cc:3:1: error: '\U0000200b' does not name a type 3 | ​ | a.cc:16:1: error: '\U0000200b' does not name a type 16 | ​ |
s444419727
p00773
C++
include <iostream> #include <algorithm> using namespace std; int main(){ int x,y,s; int a,b,maxSum; while(true){ cin >> x >> y >> s; if(x == 0 && y == 0 && s == 0) break; maxSum = -1; for(int i = 1; i <= s; i++){ for(int j = 1; j <= s-i; j++){ if((i*(100+x)/100)+ (j*(100+x)/100) != s...
a.cc:1:1: error: 'include' does not name a type 1 | include <iostream> | ^~~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/algorithm:60, from a.cc:2: /usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __...
s909696016
p00773
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
s965346434
p00774
Java
#include <iostream> #include <stdio.h> #include <stdlib.h> using namespace std; int jera(int H,int **C) { for(int i=0;i<H;i++){ if(C[i][0]==C[i][1]){ if(C[i][1]==C[i][2]){ if(C[i][2]==C[i][3]){ if(C[i][3]==C[i][4]){ C[i][0] =C[i][1] =C[i][2] =C[i][3] =C[i][4] =0; }...
Main.java:1: error: illegal character: '#' #include <iostream> ^ Main.java:2: error: illegal character: '#' #include <stdio.h> ^ Main.java:3: error: illegal character: '#' #include <stdlib.h> ^ Main.java:6: error: unnamed classes are a preview feature and are disabled by default. int jera(int H,int **C) ^ (use --enab...
s492904168
p00774
Java
public class Main { static int H; static int[][] stone=new int[11][6]; static int search() { int len; int point=0; for(int row=0; row<H; row++) { for(int col=0; col<=2; col++) { for(len=1; col+len<=4; len++) { if(stone[row][col]!=stone[row][col+len]) { break; } } if(len<=2) { ...
Main.java:39: error: cannot find symbol try(Scanner sc = new Scanner(System.in)){ ^ symbol: class Scanner location: class Main Main.java:39: error: cannot find symbol try(Scanner sc = new Scanner(System.in)){ ^ symbol: class Scanner location: class Main 2 errors
s877490810
p00774
C
#include <stdio.h> #define NUM 10 void drop(int puz[][5], int i, int j){ int k; for(k=i; k>0; k--) puz[k][j]=puz[k-1][j] puz[0][j]=0; } int main(void){ replay: int score=0; int tscore=0; int count=0; int h, i; int puz[NUM][5]={0}; while(1){ scanf("%d", &h); if(h==0) break; for(i=0; i<h; i++){ for...
main.c: In function 'drop': main.c:9:22: error: expected ';' before 'puz' 9 | puz[k][j]=puz[k-1][j] | ^ | ; 10 | 11 | puz[0][j]=0; | ~~~ main.c: In function 'main': main.c:43:6: error: 'j' undeclared (first use in this function) ...
s352274284
p00774
C
include<stdio.h> int main(void){ int h,i,j,k,x; int n=0; int count; int point[256] = {0}; int stone[15][5]={0}; while(1){ scanf("%d", &h); //高さの入力 if(h == 0){ break; } for(i=0;i<h;i++){ for(j=0;j<5;j++){ s...
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include<stdio.h> | ^
s587078339
p00774
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <utility> using namespace std; #define rep(i,n) for(int i=0; i<n; i++) int h, point; int f[11][6]; bool check() { bool res = false; for(int y=h-1; y>=0; y--) { for(int x=2; x<5; x++) { if(f[y][x]!=0 && f[y][x-2]==f[y][x] && ...
a.cc: In function 'int main()': a.cc:51:17: error: 'memset' was not declared in this scope 51 | memset( f, 0, sizeof(f) ); | ^~~~~~ a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 5 | #include <utility> +++...
s874301370
p00774
C++
import java.util.Scanner; public class Main { /** * @param args */ public static void main(String[] args) { Scanner sc=new Scanner(System.in); while(true){ int h = sc.nextInt(); if(h==0)break; int[][] f = new int[h][5]; for (int i = 0; ...
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:3:1: error: expected unqualified-id before 'public' 3 | public class Main { | ^~~~~~
s705505531
p00774
C++
#include <cstdio> #include <algorithm> #include <vector> using namespace std; const int dx[]={0,1,0,-1,1,-1,-1,1}; const int dy[]={-1,0,1,0,1,1,-1,-1}; const int INF = 1<<30; const double EPS = 1e-15; #define PB push_back #define mk make_pair #define fi first #define se second #define ll long long #define reps(i,j,k) f...
a.cc: In function 'int main()': a.cc:80:17: error: 'memset' was not declared in this scope 80 | memset(stage,-1,sizeof(stage)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <vector> ...
s901390453
p00774
C++
//莉頑律縺ョ謌先棡*AOJ0027*AOJ0028 #include<iostream> #include<string> #include<vector> #include<cstdio> #include<sstream> #include<algorithm> #include<cmath> #include<map> using namespace std; int stoi(string x){stringstream ss;ss<<x;int tmp;ss>>tmp;return tmp;} string itos(int x){stringstream ss;ss<<x;return ss.str();} int...
a.cc: In function 'int main()': a.cc:39:32: error: 'i' was not declared in this scope; did you mean 'ti'? 39 | int ti=i; | ^ | ti a.cc: At global scope: a.cc:51:9: error: expected unqualified-id before 'return' 51 | ...
s032200896
p00774
C++
//莉頑律縺ョ謌先棡*AOJ0027*AOJ0028 #include<iostream> #include<string> #include<vector> #include<cstdio> #include<sstream> #include<algorithm> #include<cmath> #include<map> using namespace std; int stoi(string x){stringstream ss;ss<<x;int tmp;ss>>tmp;return tmp;} string itos(int x){stringstream ss;ss<<x;return ss.str();} int...
a.cc: In function 'int main()': a.cc:40:32: error: 'i' was not declared in this scope; did you mean 'ti'? 40 | int ti=i; | ^ | ti a.cc: At global scope: a.cc:54:9: error: expected unqualified-id before 'return' 54 | ...
s248851647
p00774
C++
//莉頑律縺ョ謌先棡*AOJ0027*AOJ0028 #include<iostream> #include<string> #include<vector> #include<cstdio> #include<sstream> #include<algorithm> #include<cmath> #include<map> using namespace std; int stoi(string x){stringstream ss;ss<<x;int tmp;ss>>tmp;return tmp;} string itos(int x){stringstream ss;ss<<x;return ss.str();} int...
a.cc: In function 'int main()': a.cc:42:32: error: 'i' was not declared in this scope; did you mean 'ti'? 42 | int ti=i; | ^ | ti a.cc: At global scope: a.cc:56:9: error: expected unqualified-id before 'return' 56 | ...
s575661975
p00774
C++
//莉頑律縺ョ謌先棡*AOJ0027*AOJ0028 #include<iostream> #include<string> #include<vector> #include<cstdio> #include<sstream> #include<algorithm> #include<cmath> #include<map> using namespace std; int stoi(string x){stringstream ss;ss<<x;int tmp;ss>>tmp;return tmp;} string itos(int x){stringstream ss;ss<<x;return ss.str();} int...
a.cc: In function 'int main()': a.cc:42:32: error: 'i' was not declared in this scope; did you mean 'ti'? 42 | int ti=i; | ^ | ti a.cc: At global scope: a.cc:56:9: error: expected unqualified-id before 'return' 56 | ...
s576795039
p00774
C++
//莉頑律縺ョ謌先棡*AOJ0027*AOJ0028 #include<iostream> #include<string> #include<vector> #include<cstdio> #include<sstream> #include<algorithm> #include<cmath> #include<map> using namespace std; int stoi(string x){stringstream ss;ss<<x;int tmp;ss>>tmp;return tmp;} string itos(int x){stringstream ss;ss<<x;return ss.str();} int...
a.cc: In function 'int main()': a.cc:42:32: error: 'i' was not declared in this scope; did you mean 'ti'? 42 | int ti=i; | ^ | ti a.cc: At global scope: a.cc:56:9: error: expected unqualified-id before 'return' 56 | ...
s184784442
p00774
C++
#include<iostream> #include<string> #include<vector> #include<cstdio> #include<sstream> #include<algorithm> #include<cmath> #include<map> using namespace std; int stoi(string x){stringstream ss;ss<<x;int tmp;ss>>tmp;return tmp;} string itos(int x){stringstream ss;ss<<x;return ss.str();} int main(){ int h,ans=0; whi...
a.cc: In function 'int main()': a.cc:39:32: error: 'i' was not declared in this scope; did you mean 'ti'? 39 | int ti=i; | ^ | ti a.cc: At global scope: a.cc:53:9: error: expected unqualified-id before 'return' 53 | ...
s162159158
p00774
C++
#include <iostream> #include <map> #include <vector> using namespace std; int clear(vector<array<int, 5>>& m) { int sum = 0; auto e = m.end(); for(auto& arr: m){ int cnt = 1, v = arr[0], ip = 0; int maxcnt = 0, maxv = 0, maxi = 0; for(int i = 1; i < 5; ++i){ cout << cn...
a.cc: In function 'int clear(std::vector<std::array<int, 5> >&)': a.cc:13:29: error: no match for 'operator[]' (operand types are 'std::array<int, 5>' and 'int') 13 | int cnt = 1, v = arr[0], ip = 0; | ^ a.cc:17:19: error: no match for 'operator[]' (operand types are 'std::a...
s348291728
p00774
C++
#include <iostream> #include <map> #include <vector> using namespace std; int clear(vector<array<int, 5>>& m) { int sum = 0; auto e = m.end(); for(auto& arr: m){ int cnt = 1, v = arr[0], ip = 0; int maxcnt = 0, maxv = 0, maxi = 0; for(int i = 1; i < 5; ++i){ cout << cn...
a.cc: In function 'int clear(std::vector<std::array<int, 5> >&)': a.cc:13:29: error: no match for 'operator[]' (operand types are 'std::array<int, 5>' and 'int') 13 | int cnt = 1, v = arr[0], ip = 0; | ^ a.cc:17:19: error: no match for 'operator[]' (operand types are 'std::a...
s058429821
p00774
C++
#ifndef _GLIBCXX_NO_ASSERT #include <cassert> #endif #include <cctype> #include <cerrno> #include <cfloat> #include <ciso646> #include <climits> #include <clocale> #include <cmath> #include <csetjmp> #include <csignal> #include <cstdarg> #include <cstddef> #include <cstdio> #include <cstdlib> #include <cstring> #includ...
a.cc:89:1: error: '::main' must return 'int' 89 | size_t main() | ^~~~~~
s705365170
p00774
C++
1 6 9 9 9 9 5 5 9 5 5 9 5 5 6 9 9 4 6 3 6 9 3 3 2 9 9 2 2 1 1 1 10 3 5 6 5 6 2 2 2 8 3 6 2 5 9 2 7 7 7 6 1 4 6 6 4 9 8 9 1 1 8 5 6 1 8 1 6 8 2 1 2 9 6 3 3 5 5 3 8 8 8 5 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 3 2 2 8 7 4 6 5 7 7 7 8 8 9 9 9 0
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 1 | ^
s204579465
p00774
C++
0+1193.cpp #include<iostream> #include<vector> using namespace std; vector<vector<int> > matrix; int main(){ int H; while(scanf("%d",&H) && H){ v...
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 0+1193.cpp | ^ In file included from /usr/include/c++/14/iosfwd:42, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, ...
s399883732
p00774
C++
#include<iostream> #include<vector> using namespace std; vector<vector<int> > matrix; int main(){ int H; while(scanf("%d",&H) && H){ vector<int> temp(5,0); matrix.push_back(temp); for (int i = 0; i < H; i++) { vector<int> temp(5,0); for (int j = 0; j < 5; j++) ...
a.cc: In function 'int main()': a.cc:39:31: error: 'i' was not declared in this scope 39 | if(matrix[i][j]!=-1 && | ^ a.cc:50:35: error: 'i' was not declared in this scope 50 | if(matrix[i][j]==num){ | ...
s299587633
p00774
C++
include<iostream> #include<map> #include<vector> #include<algorithm> #include<cmath> #include<climits> #include<ctime> #include<cstring> #include<stack> #include<queue> #include<sstream> #include<string> #define ALL(v) (v).begin(),(v).end() #define REP(i,p,n) for(int i=p;i<(int)(n);++i) #define rep(i,n) REP(i,0,n) #d...
a.cc:1:1: error: 'include' does not name a type 1 | include<iostream> | ^~~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/bits/stl_tree.h:63, from /usr/include/c++/14/map:62, from a.cc:2: /usr/include/c++/14/ex...
s350158344
p00774
C++
#include <iostream> #include <algorithm> using namespace std; int main() { while(1){ int H; cin >> H; if(H == 0) break; int p[H][5]; int ans = 0; for(int i = 0; i < H; i++) for(int j = 0; j < 5; j++) cin >> p[i][j]; bool flag = true; while(flag){ flag = false; ...
a.cc: In function 'int main()': a.cc:71:4: error: expected '}' at end of input 71 | } | ^ a.cc:6:1: note: to match this '{' 6 | { | ^
s052063729
p00774
C++
hogehoge
a.cc:1:1: error: 'hogehoge' does not name a type 1 | hogehoge | ^~~~~~~~
s645438086
p00774
C++
#include <cstdio> #include <vector> int disappear(std::vector<std::vector<int> > &p) { size_t W=p.size(), H=p[0].size(); std::vector<std::vector<int> > to_erase(W, std::vector<int>(H)); int diff=0; for (size_t i=0; i<H; ++i) { int l=2, r=3; if (p[2][i] == 0) continue; while (l > 0) { if (p[...
a.cc: In function 'int disappear(std::vector<std::vector<int> >&)': a.cc:47:10: error: 'reverse' is not a member of 'std' 47 | std::reverse(tmp.begin(), tmp.end()); | ^~~~~~~
s631390430
p00774
C++
#include <iostream> using namespace std; #define H 10 int map[10][5]; int calc_and_remove() { int res = [&]{ int res = 0; for(int i = 0; i < H; i++) { for(int j = 0; j < 5; j++) { int left = j; int right = left; int prev = map[i][left]; while(right < 5 && map[i][righ...
a.cc: In function 'int main()': a.cc:52:5: error: 'memset' was not declared in this scope 52 | memset(map, 0, H*5*sizeof(int)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ |+#include <cstri...
s719649559
p00774
C++
#include <iostream> using namespace std; #define H 10 int map[10][5]; int calc_and_remove() { int res = [&]{ int res = 0; for(int i = 0; i < H; i++) { for(int j = 0; j < 5; j++) { int left = j; int right = left; int prev = map[i][left]; while(right < 5 && map[i][righ...
a.cc: In function 'int main()': a.cc:52:5: error: 'memset' was not declared in this scope 52 | memset(map, 0, H*5*sizeof(int)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ |+#include <cstri...
s949917304
p00774
C++
#define rep(v,s,e) for(int v=s,v<e,v++) #define rep_sub(v,s,e) for(int v=s,e<=v,v--) #include <algorithm> #include <array> #include <iostream> #include <utility> #include <vector> using namespace std; using Line = array<char, 5>; using Puzzle = vector<Line>; void newline() {cout << endl;} template <typename T> void pu...
a.cc: In function 'void drop()': a.cc:31:36: error: expected unqualified-id before numeric constant 31 | rep_sub(column, puzzle.size()-1, 0) | ^ a.cc:2:36: note: in definition of macro 'rep_sub' 2 | #define rep_sub(v,s,e) for(int v=s,e<=v,v--) | ...
s407968561
p00774
C++
// chain_disappears_puzzle.cpp // 2017/11/03 #include "stdafx.h" #include <iostream> using namespace std; //?¶???????????????°???????????????????????¢??° stone_erase int stone_erase(int i, int *target) { if (i == 0) { if (target[i + 2] == target[i + 3] && target[i + 3] == target[i + 4]) { //1????????????5???????...
a.cc:5:10: fatal error: stdafx.h: No such file or directory 5 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s248767998
p00774
C++
#include<iostream> using namespace std; int main(){ while(true){ int H; cin>>H; if(H==0) break; int S[10][5]; for(int y=0;y<h;y++){ for(int x=0;x<5;x++){ cin>>S[y][x]; int sco=0; while(true){ bool flg =false; for(int y=0;y<H;y++){ int m=S[y][2]; if(m==0) conti...
a.cc: In function 'int main()': a.cc:13:31: error: 'h' was not declared in this scope 13 | for(int y=0;y<h;y++){ | ^ a.cc:77:10: error: expected '}' at end of input 77 | } | ^ a.cc:13:37: note: to match this '{' 13 | for...
s222356116
p00774
C++
#include<iostream> using namespace std; int main(){ while(true){ int H; cin>>H; if(H==0) break; int S[10][5]; for(int y=0;y<H;y++){ for(int x=0;x<5;x++){ cin>>S[y][x]; int sco=0; while(true){ bool flg =false; for(int y=0;y<H;y++){ int m=S[y][2]; if(m==0) conti...
a.cc: In function 'int main()': a.cc:77:10: error: expected '}' at end of input 77 | } | ^ a.cc:13:37: note: to match this '{' 13 | for(int y=0;y<H;y++){ | ^ a.cc:77:10: error: expected '}' at end of input 77 | } | ...
s251973365
p00774
C++
#include<iostream> using namespace std; int main(){ while(1){ int H; cin>>H; if(H==0) break; int S[10][5]; for(int y=0;y<H;y++) for(int x=0;x<5;x++) cin>>S[y][xa]; int sco=0; while(1){ bool flg=false; for(int y=0;y<H;y++){ int m=S[y][2]; if(m==0) continue; if(S...
a.cc: In function 'int main()': a.cc:15:43: error: 'xa' was not declared in this scope; did you mean 'x'? 15 | cin>>S[y][xa]; | ^~ | x
s934176070
p00774
C++
#include <iostream> using namespace std; int main() { while(true){ int H; cin>>H; if(H==0) break; int S[10][5]; for(int y=0; y<H;y++) for(int x=0;xA<5;x++) cin>>S[y][x]; int sco=0; while(true){ boolflg=false; for(int y=0;y<H;y++){ int m=S[y][2]; ...
a.cc: In function 'int main()': a.cc:15:17: error: 'xA' was not declared in this scope; did you mean 'x'? 15 | for(int x=0;xA<5;x++) | ^~ | x a.cc:21:7: error: 'boolflg' was not declared in this scope; did you mean 'bool'? 21 | boolflg=false; | ^~~...
s671351154
p00774
C++
#include <iostream> using namespace std; int main() { while(true){ int H; cin>>H; if(H==0) break; int S[10][5]; for(int y=0; y<H;y++) for(int x=0;xA<5;x++) cin>>S[y][x]; int sco=0; while(true){ bool flg=false; for(int y=0;y<H;y++){ int m=S[y][2]; ...
a.cc: In function 'int main()': a.cc:15:17: error: 'xA' was not declared in this scope; did you mean 'x'? 15 | for(int x=0;xA<5;x++) | ^~ | x a.cc:49:9: error: 'flg' was not declared in this scope 49 | if(!flg) | ^~~ a.cc:65:11: error: 'sco' was no...
s143782443
p00774
C++
#include<iostream> using namespace std; int main(){ while(true){ int H; cin >> H; if(H==0) break; int S[H][5]; //盤面 for(int y=0; y<H; y++){ for(int x=0; x<5; x++){ cin >> S[y][x]; } } int sco = 0; //スコア while(ture){ bool flag = false; //消滅 for(int y=0; y<H; y++){ int ...
a.cc: In function 'int main()': a.cc:20:9: error: 'ture' was not declared in this scope 20 | while(ture){ | ^~~~
s579530891
p00774
C++
#include<bits/stdc++.h> using namespace std; #include "../dump.hpp" #define rep(i,n) for(int i=0,i##_cond=(n);i<i##_cond;++i) #define FOR(i,a,b) for(int i=(a),i##_cond=(b);i<i##_cond;++i) int main(){ while(1){ int h; cin >> h; if(h == 0) break; vector<deque<int>> stone(5, deque<int>(h)); rep(j, h)...
a.cc:4:10: fatal error: ../dump.hpp: No such file or directory 4 | #include "../dump.hpp" | ^~~~~~~~~~~~~ compilation terminated.
s298915318
p00775
Java
import java.io.*; import java.util.*; import java.lang.ArrayIndexOutOfBoundsException; import java.math.*; class Main { static Scanner sc = new Scanner(new InputStreamReader(System.in)); public static void main(String[] args) throws Exception { while(true) { int r = sc.nextInt(); int n = sc.nextInt(); if...
Main.java:19: error: <identifier> expected static double solve(int r, int n) throws { ^ 1 error
s834809483
p00775
C++
#include "bits/stdc++.h" using namespace std; int N,M,K,L,R,H,W; const long long int MOD=1000000007; int main(){ long double radius; vector<long double>ans; cout<<setprecision(20); while(cin>>radius>>N,r>0.5){ vector<int>l(100); vector<int>r(100); for(int i=0;i<N;i++){ cin>>L>>R>>K; r[L+50]=max(...
a.cc: In function 'int main()': a.cc:16:30: error: 'r' was not declared in this scope 16 | while(cin>>radius>>N,r>0.5){ | ^
s802158565
p00775
C++
#include "bits/stdc++.h" using namespace std; int N,M,K,L,R,H,W; const long long int MOD=1000000007; int main(){ long double radius; vector<long double>ans; cout<<setprecision(20); while(cin>>radius>>N,r>0.5){ vector<int>l(100); vector<int>r(100); for(int i=0;i<N;i++){ cin>>L>>R>>K; r[L+50]=max(...
a.cc: In function 'int main()': a.cc:16:30: error: 'r' was not declared in this scope 16 | while(cin>>radius>>N,r>0.5){ | ^
s021251732
p00775
C++
#include <cstdlib> #include <iostream> #include <unordered_map> using namespace std; #define REP(i, a, b) for(int i = (a); i < int(b); ++i) #define rep(i, n) REP(i, 0, n) template<class T> inline void chmax(T &a, const T &b) { if(a < b) a = b; } template<class T> inline void chmin(T &a, const T &b) { if(a > b) a = b;...
a.cc: In function 'int main()': a.cc:35:42: error: 'sqrt' was not declared in this scope 35 | const double y = sqrt(r * r - x * x); | ^~~~
s707609247
p00775
C++
#include <bits/stdc++.h> using namespace std; inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;} template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();} template<class T> inline T sqr(T x) {return x*x;} typedef vector<int> vi; typedef vector<vi> vvi; typed...
a.cc: In function 'int main()': a.cc:68:37: error: no matching function for call to 'max(double&, int)' 68 | cout << fixed << max(cmin,0) << endl; | ~~~^~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-lin...
s312573000
p00775
C++
import java.io.*; import java.util.*; import java.lang.ArrayIndexOutOfBoundsException; import java.math.*; class Main { static Scanner sc = new Scanner(new InputStreamReader(System.in)); public static void main(String[] args) throws Exception { try{ while(true) { int r = sc.nextInt(); int n = sc.nextIn...
a.cc:116:9: error: stray '@' in program 116 | @Override | ^ a.cc:1:1: error: 'import' does not name a type 1 | import java.io.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.util.*; |...
s690031513
p00775
C++
#include <bits/stdc++.h> using namespace std; const double pi = 2 * acos(0.0); const double eps = 1e-10; #define INF (1<<29) #define REP(i,a,b) for(int i=(a); i<(b);++i) #define rep(i,n) REP(i,0,n) typedef long long ll; typedef unsigned long long ull; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef i...
a.cc: In function 'int main()': a.cc:45:29: error: no matching function for call to 'max(int&, std::map<int, double>::mapped_type&)' 45 | height[j][j+1] = max(h, height[j][j+1]); | ~~~^~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, f...
s857105665
p00775
C++
#include <iostream> #include <cmath> #include <map> using namespace std; int r,n,L,R,h,i,x;int main(){while(cin>>r>>n,r){map<int,int> A,B;for(i=0;i<n;i++){cin>>L>>R>>h;for(x=L;x<=R;x++){if(x!=R)A[x]=max(A[x],h);if(x!=L)B[x]=max(B[x],h);}}float res=99;for(i=-r;i<=r-1;i++){res=min(res,min(r-sqrt(r*r-i*i)+A[i],r-sqrt(r*r-...
a.cc: In function 'int main()': a.cc:5:207: error: no matching function for call to 'min(float&, const double&)' 5 | int r,n,L,R,h,i,x;int main(){while(cin>>r>>n,r){map<int,int> A,B;for(i=0;i<n;i++){cin>>L>>R>>h;for(x=L;x<=R;x++){if(x!=R)A[x]=max(A[x],h);if(x!=L)B[x]=max(B[x],h);}}float res=99;for(i=-r;i<=r-1;i++){...
s398509742
p00775
C++
#include <iostream> #include <cmath> using namespace std; double r; double calc(int x, int h){ return h-sqrt(pow(r,2)-pow(x,2))+r; } int main(){ int n; int map[50]; while(cin>>r>>n,r!=0){ fill(map, map+50,0); int xl,xr,h; for(int i=0;i<n;i++){ cin>>xl>>xr>>h; ...
a.cc: In function 'int main()': a.cc:25:20: error: no matching function for call to 'min(<brace-enclosed initializer list>)' 25 | ans=min({ans,calc(x,map[25+x-1]),calc(x,map[25+x])}); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string...
s011230779
p00775
C++
#include <iostream> #include <cstdio> #include <cmath> using namespace std; int main(){ int n, r, h, V[41], xl, xr; double ans; while(cin >> r >> n, r){ for(int i = 0; i < 41; ++i) V[i] = 0; ans = 20.0; for(int i = 0; i < n; ++i){ cin >> xl >> xr >> h; for(int j = xl; j < xr; ++j){ if(j...
a.cc:33:5: error: redefinition of 'int main()' 33 | int main(){ | ^~~~ a.cc:6:5: note: 'int main()' previously defined here 6 | int main(){ | ^~~~
s679440364
p00775
C++
#include<iostream> #include<algorithm> using namespace std; double w[2][44]; double s[44]; int r; int n; int x1, x2, h; double nkr; double a[3]; main(){ while (cin >> r >> n, r || n){ nkr = -1; for (int i = 0; i<2; i++)for (int j = 0; j<44; j++) w[i][j] = 0; for (int i = 0; i<n; i++){ cin >> x1 >> x2 >> h; ...
a.cc:12:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 12 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:31:37: error: 'sqrt' was not declared in this scope 31 | s[i + 20] = sqrt(r*r - i*i) - r; | ^~~~
s981865869
p00775
C++
#include <iostream> #include <vector> #include <cstring> #include <cmath> #include <algorithm> #undef max #undef min bool field[41][22] = {false}; bool field2[20][22] = { false }; constexpr int SUN_OFFSET_X = 20; int main() { int r, n; while (std::cin >> r >> n && (r || n)) { std::memset(field, false, sizeof(bool)...
a.cc: In function 'int main()': a.cc:61:70: error: 'INT_MAX' was not declared in this scope 61 | if (tmp > 0) dy = std::min(dy == 0 ? INT_MAX : dy, tmp); | ^~~~~~~ a.cc:6:1: note: 'INT_MAX' is defined in header...
s964619521
p00776
Java
#include <bits/stdc++.h> using namespace std; #define rep(i,x,y) for(int i=(x);i<(y);++i) #define debug(x) #x << "=" << (x) #ifdef DEBUG #define _GLIBCXX_DEBUG #define dump(x) std::cerr << debug(x) << " (L:" << __LINE__ << ")" << std::endl #else #define dump(x) #endif typedef long long int ll; typedef pair<int,int> ...
Main.java:1: error: illegal character: '#' #include <bits/stdc++.h> ^ Main.java:1: error: class, interface, enum, or record expected #include <bits/stdc++.h> ^ Main.java:4: error: illegal character: '#' #define rep(i,x,y) for(int i=(x);i<(y);++i) ^ Main.java:4: error: class, interface, enum, or record expected...
s212625655
p00776
C++
#include <bits/stdc++.h> using namespace std; #define max(a,b) ((a)>(b)?(a):(b)) #define min(a,b) ((a)<(b)?(a):(b)) #define abs(a) max((a),-(a)) #define rep(i,n) for(int i=0;i<(int)(n);i++) #define repe(i,n) rep(i,(n)+1) #define per(i,n) for(int i=(int)(n)-1;i>=0;i--) #define pere(i,n) rep(i,(n)+1) #define all(x) (x)....
a.cc: In function 'int main()': a.cc:65:12: error: 'abcdefghijklmnopqrst' was not declared in this scope 65 | }abcdefghijklmnopqrst | ^~~~~~~~~~~~~~~~~~~~
s613024453
p00776
C++
#include<iostream> #include<utility> #include<string> #include<set> using namespace std; int cnt; set<string> ans; int rec(string s,int pos,bool u[26]){ if(pos==s.length()){ ans.insert(s); return 0; } bool used[26]; for(int i=0;i<26;i++) used[i]=u[i]; if(s[pos]=='a'){ used[0]=true; rec(s,pos...
a.cc: In function 'int main()': a.cc:50:5: error: 'memset' was not declared in this scope 50 | memset(used,0,sizeof(used)); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include<set> +++ |+#include <cstring> 5 ...
s196972178
p00776
C++
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <sstream> #include <cstring> #include <cstdio> #include <cstdlib> #include <cmath> #include <queue> #include <stack> #include <map> #include <set> #include <numeric> #include <cctype> #include <tuple> #include <array> #include <climit...
a.cc: In function 'int main()': a.cc:75:17: error: jump to label 'nxt' 75 | nxt:; | ^~~ a.cc:63:46: note: from here 63 | goto nxt; | ^~~ a.cc:67:29: note: crosses initialization of ...
s850479731
p00776
C++
#include <vector>#include <iostream>using namespace std;vector<string> a;bool ap[30];string s;int S;void dfs(int n,char c,string now){if(n==s.size()){S++;a.push_back(now);return ;} int C=c-'a';if(ap[C]==true || c=='a'){bool bac=ap[C];ap[C]=true;dfs(n+1,s[n+1],now+c);ap[C]=bac;}if(ap[C+1]==false && c!='z'){bool bac=a...
a.cc:1:18: warning: extra tokens at end of #include directive 1 | #include <vector>#include <iostream>using namespace std;vector<string> a;bool ap[30];string s;int S;void dfs(int n,char c,string now){if(n==s.size()){S++;a.push_back(now);return ;} int C=c-'a';if(ap[C]==true || c=='a'){bool bac=ap[C];ap[C]=true;df...
s796107131
p00776
C++
enw abc abcdefghijklmnopqrst z a aa aaa b z zz zzz aaaaaaaaaaaaaaaaaaaa bcdefghijklmnopqrsta zyxwvutsrqponmlkjihg yxwvutsrqponmlkjihgf azazazazazazazazazaz aabbcczzaabbcczzaabb qjvjv xfsync lcqv atgxedc fnxlkbqp ugfk krdwvclsl whnhw zaza lpbhx rms rstu tcagwo dbrujnxm qw sythbqv hyp moqrncvpewshg cmxrnjhqwfyetpdk earqx...
a.cc:1:1: error: 'enw' does not name a type 1 | enw | ^~~
s013161815
p00776
C++
#include <iostream> #include <vector> #include <string> #define REP(i,a,b) for (int i = (a); i < (int)(b); i++) #define rep(i,a) REP(i,0,a) using namespace std; vector<string> ans; void search(string s, char c) { if (c == 'a') { ans.push_back(s); return; } rep(i, s.size()) { ...
a.cc: In function 'int main()': a.cc:39:9: error: 'sort' was not declared in this scope; did you mean 'short'? 39 | sort(ans.begin(), ans.end()); | ^~~~ | short a.cc:40:19: error: 'unique' was not declared in this scope 40 | ans.erase(unique(ans.begin(), ans.end()), ans...
s626715234
p00776
C++
#include <iostream> #include <vector> #include <string> #define REP(i,a,b) for (int i = (a); i < (int)(b); i++) #define rep(i,a) REP(i,0,a) using namespace std; vector<string> ans; void search(string s, char c) { if (c == 'a') { ans.push_back(s); return; } rep(i, s.size()) { ...
a.cc: In function 'int main()': a.cc:39:9: error: 'sort' was not declared in this scope; did you mean 'short'? 39 | sort(ans.begin(), ans.end()); | ^~~~ | short a.cc:40:19: error: 'unique' was not declared in this scope 40 | ans.erase(unique(ans.begin(), ans.end()), ans...
s305356791
p00776
C++
#include <iostream> #include <vector> #include <numeric> #include <climits> #include <cstdlib> #include <functional> #include <iostream> #include <queue> #include <vector> #include <algorithm> #include <map> #include <set> #define ALL(v) (v).begin(),(v).end() #define REP(i,p,n) for(int i=p;i<(int)(n);++i) #define re...
a.cc: In function 'int main()': a.cc:73:43: error: expected ';' before 'vector' 73 | }else{ javascript:void(0) | ^ | ; 74 | vector<string> vec(ans.begin(),ans.end()); | ...
s550926862
p00776
C++
#include <iostream> #include <algorithm> #include <vector> #include <set> using namespace std; int n; bool conv(char s[30],char t[30]){ bool used[26]={}; for(int i=0;i<n;++i){ int c = s[i]-'a'; if(!used[c] && c){ used[c]=true; if(s[i]-1!=t[i]) return false; } else if(s[i]!=t[i]) return f...
a.cc: In function 'int main()': a.cc:23:7: error: 'strlen' was not declared in this scope 23 | n=strlen(s); | ^~~~~~ a.cc:5:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include <set> +++ |+#include <cstring> 5 | using names...
s653948843
p00776
C++
#include<cstdio> #include<string> #include<iostream> #include<vector> #include<algorithm> #include<cstring> #include<cstdlib> using namespace std; vector<string> res; int flag[50],flag2[50],flag3[50],len; string str; void Enc(int x){ if(x==-1){ for(int i=0;i<26;i++)if(flag[i]>=1 && flag3[i]==0)return; res.pus...
/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
s966682953
p00776
C++
#include <bits/stdc++.h> using namespace std; #define FOR(i,s,e) for((i)=(s);(i)<(int)(e);(i)++) #define REP(i,e) FOR(i,0,e) #define all(o) (o).begin(), (o).end() #define psb(x) push_back(x) #define mp(x,y) make_pair((x),(y)) typedef long long ll; typedef pair<int, int> PII; const double EPS = 1e-10; int n; strin...
a.cc: In function 'int main()': a.cc:49:20: error: no matching function for call to 'std::vector<std::__cxx11::basic_string<char> >::erase(int)' 49 | res.erase(5); | ~~~~~~~~~^~~ In file included from /usr/include/c++/14/vector:66, from /usr/include/c++/14/functional:64, ...
s221984060
p00776
C++
#include <bits/stdc++.h> using namespace std; #define FOR(i,s,e) for((i)=(s);(i)<(int)(e);(i)++) #define REP(i,e) FOR(i,0,e) #define all(o) (o).begin(), (o).end() #define psb(x) push_back(x) #define mp(x,y) make_pair((x),(y)) typedef long long ll; typedef pair<int, int> PII; const double EPS = 1e-10; int n; strin...
a.cc: In function 'int main()': a.cc:49:20: error: no matching function for call to 'std::vector<std::__cxx11::basic_string<char> >::erase(int)' 49 | res.erase(5); | ~~~~~~~~~^~~ In file included from /usr/include/c++/14/vector:66, from /usr/include/c++/14/functional:64, ...
s519384716
p00776
C++
#include <iostream> #include <string> #include <cstring> #include <cstdio> #include <cstdlib> #include <vector> #include <iomanip> #include <cmath> #include <set> #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define REP(i,n) FOR(i,0,n) using namespace std; string s; vector<string> ans; void rec(int idx, vector<bool> s...
a.cc: In function 'int main()': a.cc:38:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 38 | sort(ans.begin(), ans.end()); | ^~~~ | sqrt
s967734436
p00776
C++
#include <bits/stdc++.h> using namespace std; typedef ostringstream OSS; typedef istringstream ISS; typedef long long LL; typedef pair<int, int> PII; typedef vector<int> VI; typedef vector<VI> VVI; typedef vector<LL> VLL; typedef vector<VLL> VVLL; typedef vector<double> VD; typedef vector<VD> VVD; typedef vector<str...
a.cc: In function 'void dfs(std::string&, int, int, bool)': a.cc:72:16: error: 'pos' was not declared in this scope; did you mean 'pow'? 72 | ns[pos]++; | ^~~ | pow
s213474694
p00776
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; typedef vector<string> V; class Solver { private: void search(string &line, bool has_used[], V &candidates, unsigned cur = 0) { char c = line[min(cur, line.length() - 1)]; if (cur == ...
a.cc: In member function 'void Solver::search(std::string&, bool*, V&, unsigned int)': a.cc:13:30: error: no matching function for call to 'min(unsigned int&, std::__cxx11::basic_string<char>::size_type)' 13 | char c = line[min(cur, line.length() - 1)]; | ~~~^~~~~~~~~~~~~~...