submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s073288134
p00045
C
#include<stdio.h> int main(void){ int price=0; int number=0; int psum=0,nsum=0,count=0; while(scanf("%d,%d",&price,&number)!=EOF){ psum += price*number; nsum += number; count++; } printf("%d\n",psum); double = nsum/count; if((nsum*10%)5>=5){nsum++;} printf("%d\n",nsum); return 0; }
main.c: In function 'main': main.c:12:10: error: expected identifier or '(' before '=' token 12 | double = nsum/count; | ^ main.c:13:15: error: expected expression before ')' token 13 | if((nsum*10%)5>=5){nsum++;} | ^
s473815884
p00045
C
#include <stdio.h> #include <math.h> int main(){ int mono=0,kane=0,tmono,tkane,t=0; while(0<=scanf("%d,%d",&tkane,&tmono)){ mono+=tmono; kane+=(tmono*tkane); if(tmono!=0) t++; } printf("%d\n%d\n",kane,int(((double)mono)/((double)t)+0.5)); return 0; }
main.c: In function 'main': main.c:14:24: error: expected expression before 'int' 14 | printf("%d\n%d\n",kane,int(((double)mono)/((double)t)+0.5)); return 0; | ^~~
s033755627
p00045
C
#include <stdio.h> #include <math.h> int main(){ int mono=0,kane=0,tmono,tkane,t=0; while(0<=scanf("%d,%d",&tkane,&tmono)){ mono+=tmono; kane+=(tmono*tkane); if(tmono!=0) t++; } printf("%d\n%d\n",kane,int(((double)mono)/((double)t)+0.5)); return 0; }
main.c: In function 'main': main.c:14:24: error: expected expression before 'int' 14 | printf("%d\n%d\n",kane,int(((double)mono)/((double)t)+0.5)); | ^~~
s169763452
p00045
C
include<stdio.h> a[100],b[100],s,c;int main(){ int i,j,as=0; for(i=0;scanf("%d,%d",&a[i],&b[i])!=EOF;i++){ s+=a[i]*b[i];as+=b[i];c++; } printf("%d\n%d\n",s,(int)((double)((double)as/(double)c)+0.5));exit(0); }
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include<stdio.h> | ^ main.c: In function 'main': main.c:4:17: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 4 | for(i=0;scanf("%d,%d",&a[i],&b[i])!=EOF;i++){ | ...
s139949233
p00045
C
#include<stdio.h> int main() { int sum = 0 , ave = 0 , count; while ( scanf("%d,%d",&m,&n),m != EOF ) { sum += m * n; count++; } ave = (int)(( sum / count ) +0.5); printf("%d\n%d\n",sum,ave); return 0; }
main.c: In function 'main': main.c:5:32: error: 'm' undeclared (first use in this function) 5 | while ( scanf("%d,%d",&m,&n),m != EOF ) { | ^ main.c:5:32: note: each undeclared identifier is reported only once for each function it appears in main.c:5:35: error: 'n' undec...
s617517758
p00045
C
main(){ int t[99]; int r[99]; int sum=0; int i=0; double n=0; while(scanf("%d,%d",&t[i],&r[i])!=EOF){ sum=sum+t[i]*r[i]; n=n+r[i++]; } printf("%d\n%.0f\n",sum,round(n/i)); }
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main(){ | ^~~~ main.c: In function 'main': main.c:8:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 8 | while(scanf("%d,%d",&t[i],&r[i])!=EOF){ | ^~~~~ main.c:1:1: note: include '<std...
s886128553
p00045
C
int main(){int t[99];int r[99];int sum=0;int i=0;double n=0;while(scanf("%d,%d",&t[i],&r[i])!=EOF){sum=sum+t[i]*r[i];n=n+r[i++];}printf("%d\n%.0f\n",sum,round(n/i));return 0;}
main.c: In function 'main': main.c:1:67: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 1 | int main(){int t[99];int r[99];int sum=0;int i=0;double n=0;while(scanf("%d,%d",&t[i],&r[i])!=EOF){sum=sum+t[i]*r[i];n=n+r[i++];}printf("%d\n%.0f\n",sum,round(n/i));return 0;} | ...
s150051149
p00045
C
#include<stdio.h> int main(){ int a,b,sum=0,nsum=0,n for(n=0;;n++){ if(scanf("%d,%d",a,b) == EOF){break;} sum+=a*b; nsum+=b; } printf("%d\n%d\n",sum,nsum/n); }
main.c: In function 'main': main.c:4:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'for' 4 | for(n=0;;n++){ | ^~~ main.c:4:18: error: 'n' undeclared (first use in this function) 4 | for(n=0;;n++){ | ^ main.c:4:18: note: each undeclared ide...
s956237121
p00045
C
#include<stdio.h> int main(){ int a,b,sum=0,nsum=0,n for(n=0;;n++){ if(scanf("%d,%d",a,b) == EOF){break;} sum+=a*b; nsum+=b; } printf("%d\n%d\n",sum,nsum/n); return 0; }
main.c: In function 'main': main.c:4:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'for' 4 | for(n=0;;n++){ | ^~~ main.c:4:18: error: 'n' undeclared (first use in this function) 4 | for(n=0;;n++){ | ^ main.c:4:18: note: each undeclared ide...
s385698436
p00045
C
#define _CRT_SECURE_NO_WARNINGS #define _USE_MATH_DEFINES #include<stdio.h> #include<math.h> #include<string.h> #include<stdlib.h> #include<stdarg.h> #include<malloc.h> int round(double x) { if(x>=0) x = floor(x + 0.5); else x = -1.0 * floor(fabs(x) + 0.5); return (int)x; } int main() { int a, b, sum=0, ave=...
main.c:11:5: error: conflicting types for 'round'; have 'int(double)' 11 | int round(double x) | ^~~~~ In file included from /usr/include/features.h:523, from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33, from /usr/include/stdio.h:28, from mai...
s504770549
p00045
C
#define _CRT_SECURE_NO_WARNINGS #define _USE_MATH_DEFINES #include<stdio.h> #include<math.h> #include<string.h> #include<stdlib.h> #include<stdarg.h> #include<malloc.h> int round(double x) { if(x>=0) x = floor(x + 0.5); else x = -1.0 * floor(fabs(x) + 0.5); return (int)x; } int main() { int a, b, sum=0, ave=...
main.c:11:5: error: conflicting types for 'round'; have 'int(double)' 11 | int round(double x) | ^~~~~ In file included from /usr/include/features.h:523, from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33, from /usr/include/stdio.h:28, from mai...
s667322995
p00045
C
#define _CRT_SECURE_NO_WARNINGS #define _USE_MATH_DEFINES #include<stdio.h> #include<math.h> #include<string.h> #include<stdlib.h> #include<stdarg.h> #include<malloc.h> int round(double x) { if(x>=0) x = floor(x + 0.5); else x = -1.0 * floor(fabs(x) + 0.5); return x; } int main() { int a, b, sum=0, ave=0, n...
main.c:11:5: error: conflicting types for 'round'; have 'int(double)' 11 | int round(double x) | ^~~~~ In file included from /usr/include/features.h:523, from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33, from /usr/include/stdio.h:28, from mai...
s762559522
p00045
C
#define _CRT_SECURE_NO_WARNINGS #define _USE_MATH_DEFINES #include<stdio.h> #include<math.h> #include<string.h> #include<stdlib.h> #include<stdarg.h> #include<malloc.h> int round(double x); int main() { int a, b, sum=0, ave=0, n=0; while(scanf("%d,%d", &a, &b) != EOF){ sum += a * b; ave += b; n++; } ave ...
main.c:11:5: error: conflicting types for 'round'; have 'int(double)' 11 | int round(double x); | ^~~~~ In file included from /usr/include/features.h:523, from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33, from /usr/include/stdio.h:28, from ma...
s999511073
p00045
C
#define _CRT_SECURE_NO_WARNINGS #define _USE_MATH_DEFINES #include<stdio.h> #include<math.h> #include<string.h> #include<stdlib.h> #include<stdarg.h> #include<malloc.h> int round(double x); int main() { int a, b, sum=0, ave=0, n=0; while(scanf("%d,%d", &a, &b) != EOF){ sum += a * b; ave += b; n++; } ave ...
main.c:11:5: error: conflicting types for 'round'; have 'int(double)' 11 | int round(double x); | ^~~~~ In file included from /usr/include/features.h:523, from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33, from /usr/include/stdio.h:28, from ma...
s580753710
p00045
C
s,n,i;main(x,y){fesetround(FE_TONEAREST);for(;~scanf("%d,%d",&x,&y)?s+=x*y:!printf("%d\n%.f\n",s,nearbyint(1.*n/i));i++)n+=y;}////
main.c:1:1: warning: data definition has no type or storage class 1 | s,n,i;main(x,y){fesetround(FE_TONEAREST);for(;~scanf("%d,%d",&x,&y)?s+=x*y:!printf("%d\n%.f\n",s,nearbyint(1.*n/i));i++)n+=y;}//// | ^ main.c:1:1: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int] main.c:1:3: error: type ...
s105195043
p00045
C
#include<stdio.h> int main(){ int x,y,a,b,count; x=0; y=0; count=0; while(scanf("%d,%d",&a,&b)=EOF){ x=x+a*b; y+=b; count++; } y=y/count+0.5; printf("%d\n%d\n",x,y); return 0; }
main.c: In function 'main': main.c:7:35: error: lvalue required as left operand of assignment 7 | while(scanf("%d,%d",&a,&b)=EOF){ | ^
s306392951
p00045
C
#include<stdio.h> int main(void){ int g=0,c=0,a,b; char z; while(scanf("%d %c %d",&a,&z,&b)!=EOF){ g+=a*b;c+=a; } printf("%d\n%d\n",g,(int)((1.0*g/c+0.5)); return 0; }
main.c: In function 'main': main.c:9:43: error: expected ')' before ';' token 9 | printf("%d\n%d\n",g,(int)((1.0*g/c+0.5)); | ~ ^ | ) main.c:10:12: error: expected ';' before '}' token 10 | return 0; | ...
s662734583
p00045
C++
#include<cstdio> using namespace std; int main() { int m, n; int ans = 0, cnt = 0; double a = 0; while (scanf("%d,%d", &m, &n) != EOF) { ans += m*n; a += n; cnt++; } a = a / cnt + 0.5; printf("%d\n%d\n", ans, (int)a);
a.cc: In function 'int main()': a.cc:14:41: error: expected '}' at end of input 14 | printf("%d\n%d\n", ans, (int)a); | ^ a.cc:4:1: note: to match this '{' 4 | { | ^
s667363684
p00045
C++
#include<iostream> using namespace std; int main(){ int x = 0, y = 0, s = 0, sy = 0, a = 0, i = 0; while(cin >> x >> y){ s = s + x * y; sy = sy + y; a = sy / i++; a+=0.5; a=int(a) } return 0; }
a.cc: In function 'int main()': a.cc:13:9: error: expected ';' before '}' token 13 | a=int(a) | ^ | ; 14 | } | ~
s040947346
p00045
C++
#include<iostream> using namespace std; int main(){ int x = 0, y = 0, s = 0, sy = 0, a = 0, i = 0; while(cin >> x >> y){ s = s + x * y; sy = sy + y; a = sy / i++; a+=0.5; a=int(a) } return 0; }
a.cc: In function 'int main()': a.cc:13:9: error: expected ';' before '}' token 13 | a=int(a) | ^ | ; 14 | } | ~
s223634493
p00045
C++
#include<iostream> #include<stdio.h> using namespace std; int main(){ int x = 0, y = 0, s = 0, a = 0; double sy = 0 , i = 0; while(scanf("%d,%d",&x,&y)+1){ s = s + x * y; sy = sy + y; i++; } a=int(sy / i + 0.5); cout >> s >> endl >> a >> endl; return 0; }
a.cc: In function 'int main()': a.cc:17:6: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int') 17 | cout >> s >> endl >> a >> endl; | ~~~~ ^~ ~ | | | | | int | std::ostream {aka std::basic_ostream<char>} a.cc:17:6: note: c...
s427858862
p00045
C++
#include<iostream> using namespace std; int main(void) { char c; int a, b, sum, ave, i; sum = ave = i = 0; while (cin >> a >> c >> b) { sum += a*b; ave += b; i++ } cout << sum << endl; cout << (int)(((double)ave / i) + 0.5) << endl; }
a.cc: In function 'int main()': a.cc:11:20: error: expected ';' before '}' token 11 | i++ | ^ | ; 12 | } | ~
s805241157
p00045
C++
#include <iostream> #include <cstdio> using namespace std; int main() { int one, all, i; double many, heikin; all = 0; i = 0; while(cin >> one >> "," >> many){ all += one * many; heikin += many; i++; printf("%d\n%.f\n", all, (heikin / i + 0.5)); } return 0; }
a.cc: In function 'int main()': a.cc:15:26: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'const char [2]') 15 | while(cin >> one >> "," >> many){ | ~~~~~~~~~~ ^~ ~~~ | | ...
s871400227
p00045
C++
#include <iostream> #include <cstdio> #include <cmarh> using namespace std; int main() { int a, b, sum = 0, i = 0, c = 0; while (scanf("%d,%d", &a, &b) != EOF){ sum += a * b; i++; c += b; } cout << sum << endl << round(c / i) << endl; return (0); }
a.cc:3:10: fatal error: cmarh: No such file or directory 3 | #include <cmarh> | ^~~~~~~ compilation terminated.
s191903157
p00045
C++
#include <iostream> #include <cstdio> using namespace std; int main(void){ // Here your code ! int n,d,sum=0,D=0,cout=0; char c; while(cin>>n>>c>>d){ sum+=(n*d); D=D+d; cout++; } D=(double)D/cout+0.5; cout << sum << "\n" << D << endl; }
a.cc: In function 'int main()': a.cc:17:14: error: invalid operands of types 'int' and 'const char [2]' to binary 'operator<<' 17 | cout << sum << "\n" << D << endl; | ~~~~~~~~~~~ ^~ ~~~~ | | | | int const char [2]
s664046121
p00045
C++
#include <iostream> #include <cstdio> using namespace std; int main(void){ // Here your code ! int n,d,sum=0,D=0,cout=0; char c; while(cin>>n>>c>>d){ sum+=(n*d); D=D+d; cout++; } D=(double)D/cout+0.5; cout << sum << "\n" << D << endl; }
a.cc: In function 'int main()': a.cc:17:14: error: invalid operands of types 'int' and 'const char [2]' to binary 'operator<<' 17 | cout << sum << "\n" << D << endl; | ~~~~~~~~~~~ ^~ ~~~~ | | | | int const char [2]
s828150496
p00045
C++
//#define scanf_s scanf //#define gets_s gets #include <stdio.h> #include <string> #include <iostream> #include <math.h> using namespace std; #define MAX 101 #define MIN -100001 #define ABC 26 int main(void) { double ave; int sum = 0, sum2 = 0, cou = 0, a, b; while (scanf_s("%d,%d", &a, &b) != EOF) { if (a == b ...
a.cc: In function 'int main()': a.cc:16:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 16 | while (scanf_s("%d,%d", &a, &b) != EOF) { | ^~~~~~~ | scanf
s946313134
p00045
C++
//#define scanf_s scanf //#define gets_s gets #include <stdio.h> #include <string> #include <iostream> #include <math.h> using namespace std; #define MAX 101 #define MIN -100001 #define ABC 26 int main(void) { double ave; int sum = 0, sum2 = 0, cou = 0, a, b; while (1) { if (scanf_s("%d,%d", &a, &b) == EOF) { ...
a.cc: In function 'int main()': a.cc:17:21: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 17 | if (scanf_s("%d,%d", &a, &b) == EOF) { | ^~~~~~~ | scanf
s175312748
p00045
C++
#include<iostream> #include<cmath> using namespace std; int main(){[ int price, mount; char c; int sum_price, sum_mount ,cnt; while(cin >> price >> c >> mount){ sum_price += price * mount; sum_mount += mount; cnt++; } double average = round( sum_mount / cnt ); cout << sum_price << '?\n' << average << '?\n'...
a.cc:14:30: warning: multi-character character constant [-Wmultichar] 14 | cout << sum_price << '?\n' << average << '?\n'; | ^~~~~ a.cc:14:50: warning: multi-character character constant [-Wmultichar] 14 | cout << sum_price << '?\n' << average << '?\n'; | ...
s341398664
p00045
C++
#include<iostream> #include<cmath> using namespace std; int main() { int price, mount; char c; int sum_price, sum_mount ,cnt; while(cin >> price >> c >> mount){ sum_price += price * mount; sum_mount += mount; cnt++; } int average = sum_mount / cnt; cout << sum_price << endl cout << average << endl; }
a.cc: In function 'int main()': a.cc:14:34: error: expected ';' before 'cout' 14 | cout << sum_price << endl | ^ | ; 15 | cout << average << endl; | ~~~~
s202177631
p00045
C++
#include <stdio.h> int main(void){ int sum=0; double mean=0; int x,y; int i=0; while(scanf("%d,%d",&x,&y)!=EOF){ sum+=x*y; mean+=y; i++; } printf("%d\n%d\n",sum,(int)(mean/(double)(i)+0.5));
a.cc: In function 'int main()': a.cc:13:52: error: expected '}' at end of input 13 | printf("%d\n%d\n",sum,(int)(mean/(double)(i)+0.5)); | ^ a.cc:3:15: note: to match this '{' 3 | int main(void){ | ^
s189823133
p00045
C++
#include<iostream> #include<stdio.h> using namespace std; int main() { int price, num,total_price=0,total_num=0,avarage,i=0; while (scanf("%d,%d", &price, &num)!=EOF) { total_price = total_price + price*num; total_num = total_num + num; i++; } avarage = round(total_num / i); cout << total_price << endl << a...
a.cc: In function 'int main()': a.cc:12:19: error: 'round' was not declared in this scope 12 | avarage = round(total_num / i); | ^~~~~
s588773315
p00045
C++
import sys s=[list(map(int,e.split(',')))for e in sys.stdin] print(sum(a*n for a,n in s)) print(int([sum(x)for x in zip(*s)][1]/len(s)+.5))
a.cc:1:1: error: 'import' does not name a type 1 | import sys | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
s597878188
p00045
C++
#include <iostream> #include<stdio.h> using namespace std; int main() { double p, q; double price = 0, quantity = 0, amount = 0; while (scanf_s("%lf,%lf", &p, &q) != EOF) { price += (p * q); quantity += q; amount++; } cout << (int)price << endl; cout << (int)(quantity / amount + 0.5) << endl; return 0;...
a.cc: In function 'int main()': a.cc:10:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 10 | while (scanf_s("%lf,%lf", &p, &q) != EOF) { | ^~~~~~~ | scanf
s011126522
p00045
C++
long p,c,t,z,n;main(){for(;~scanf("%ld,%dl\n",&p,&c);t+=p*c,z+=c,n++);printf("%ld\n%ld\n",t,lround(1.0*z/n));}
a.cc:1:16: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 1 | long p,c,t,z,n;main(){for(;~scanf("%ld,%dl\n",&p,&c);t+=p*c,z+=c,n++);printf("%ld\n%ld\n",t,lround(1.0*z/n));} | ^~~~ a.cc: In function 'int main()': a.cc:1:29: error: 'scanf' was not declared in this sco...
s685704876
p00045
C++
#include <cstdio> using namespace std; int main() { int amt=0,qut=0,cnt=0,a,b; while (scanf("%d,%d",&a,&b)!=EOF) { amt += a*b; qut += b; cnt++; } int res = qut/cnt; double dec = qut/cnt-n; if (dec/0.1>=5) res++; printf("%d\n%d\n",amt,res); }
a.cc: In function 'int main()': a.cc:11:30: error: 'n' was not declared in this scope 11 | double dec = qut/cnt-n; | ^
s955588343
p00045
C++
int i,n,m,t,v; int main(){ for(;~scanf("%d,%d",&n,&m);i++) t+=n*m,v+=m; printf("%d\n%d\n",t,(int)(v/(double)i+0.5)); return 0; }
a.cc: In function 'int main()': a.cc:3:15: error: 'scanf' was not declared in this scope 3 | for(;~scanf("%d,%d",&n,&m);i++) | ^~~~~ a.cc:5:9: error: 'printf' was not declared in this scope 5 | printf("%d\n%d\n",t,(int)(v/(double)i+0.5)); | ^~~~~~ a.cc:1:1: note...
s154272256
p00045
C++
#include <cstdio> int main(){ int m, n; int total = 0, num = 0, row = 0; while( scanf("%d,%d\n", &m, &n) != EOF ){ total += m * n; //”Ì”„‹àŠz‚̍‡Œv‚ɉÁŽZ num += n; //”Ì”„‚̐”—ʂ̐”‚ɉÁŽZ row++; //“ü—͂̍s”‚𑝂₷ } int ans = (int)(ave / (double)row + 0.5); /...
a.cc: In function 'int main()': a.cc:11:21: error: 'ave' was not declared in this scope 11 | int ans = (int)(ave / (double)row + 0.5); //”Ì”„”—ʂ̕½‹Ï(ŽlŽÌŒÜ“ü‚·‚é) | ^~~
s739060095
p00045
C++
#include<cstdio> 2 using namespace std; 3 4 int main(){ 5 int a,b; 6 int total=0,num=0,row=0; 7 8 while(scanf("%d,%d",&a,&b)!=EOF){ 9 total=total+a*b; 10 num=num+a; 11 row++; 12 } 13 int ans=(int)(num/(double)row+0.5); 14 printf("%d\n%d\n",to...
a.cc:2:3: error: expected unqualified-id before numeric constant 2 | 2 using namespace std; | ^ a.cc:3:3: error: expected unqualified-id before numeric constant 3 | 3 | ^
s057006894
p00045
C++
#include <string> #include <cstdio> #include <cstring> #include <vector> #include <queue> #include <set> #include <utility> #include <algorithm> #include <numeric> #include <iostream> using namespace std; template<class T> T gcd(T a, T b) { return b ? gcd(b, a % b) : a; } int main() { int a,b,c = 0,d = 0,n = 0; whi...
a.cc: In function 'int main()': a.cc:19:34: error: 'floor' was not declared in this scope 19 | printf("%d\n%d\n",c,(int)floor((double)d/n + 0.5)); | ^~~~~
s508922013
p00045
C++
#include <iostream> using namespace std; /** Problem0045 : Sum and Average **/ int main() { unsigned inputNum=0, soldNum=0, value=0; unsigned tValue=0, tNum=0, out; char camma; while (cin >> tValue >> camma >> tNum) { inputNum++; soldNum += tNum; value += tValue*tNum; } out = (round)((double)soldNum/in...
a.cc: In function 'int main()': a.cc:17:16: error: 'round' was not declared in this scope 17 | out = (round)((double)soldNum/inputNum); | ^~~~~
s363891401
p00045
C++
int main() { int x,y; int sum,i; int tmp; char c; sum=i=0; tmp=0; while(cin>>x>>c>>y){ sum+=x*y; tmp+=y; i++; } cout<<sum<<endl; cout<<(int)(1.0*tmp/i+0.5)<<endl; return 0; }
a.cc: In function 'int main()': a.cc:10:15: error: 'cin' was not declared in this scope 10 | while(cin>>x>>c>>y){ | ^~~ a.cc:16:9: error: 'cout' was not declared in this scope 16 | cout<<sum<<endl; | ^~~~ a.cc:16:20: error: 'endl' was not declared in this scope ...
s098907998
p00046
Java
package test; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class AOJ0046 { public static void main(String[] args) throws IOException { BufferedReader read = new BufferedReader(new InputStreamReader(System.in)); double now_read,max=Integer.MIN_VALUE,min=Inte...
Main.java:7: error: class AOJ0046 is public, should be declared in a file named AOJ0046.java public class AOJ0046 { ^ 1 error
s122219621
p00046
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args){ BufferedReader read = new BufferedReader(new InputStreamReader(System.in)); double now_read,max=Integer.MIN_VALUE,min=Integer.MAX_VALUE; String line = ""; w...
Main.java:12: error: unreported exception IOException; must be caught or declared to be thrown line = read.readLine(); ^ 1 error
s098958012
p00046
Java
package aoj; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; public class main { public static void main(String[] args){ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String tes = null; ArrayList<Double> al = ...
Main.java:8: error: class main is public, should be declared in a file named main.java public class main { ^ Note: Main.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 1 error
s481811998
p00046
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; public class main { public static void main(String[] args){ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String tes = null; ArrayList<Double> al = new ArrayList(...
Main.java:6: error: class main is public, should be declared in a file named main.java public class main { ^ Note: Main.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 1 error
s869388913
p00046
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; public class main { public static void main(String[] args){ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String tes = null; ArrayList<Double> al = new ArrayList(...
Main.java:6: error: class main is public, should be declared in a file named main.java public class main { ^ Note: Main.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 1 error
s908616532
p00046
Java
package aoj; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; public class Main { public static void main(String[] args){ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String tes = null; List<Double> al = new A...
Main.java:13: error: cannot find symbol List<Double> al = new ArrayList(); ^ symbol: class List location: class Main 1 error
s268086193
p00046
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; public class Main { public static void main(String[] args){ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String tes = null; List<Double> al = new ArrayList<Doubl...
Main.java:11: error: cannot find symbol List<Double> al = new ArrayList<Double>(); ^ symbol: class List location: class Main 1 error
s437878528
p00046
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; public class Main { public static void main(String[] args){ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String tes = null; List<Double> a...
Main.java:44: error: unreachable statement for(int i=0;i<al.size();i++){ ^ 1 error
s970229078
p00046
Java
import java.io.*; class Main{ public static void main(String[] args) throws IOException{ BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); String line=""; double height; double max=Double.parseDouble(br.readLine); double min=max; while((line=br.readLine())!=null){ height=Double.parseDouble(line);...
Main.java:8: error: cannot find symbol double max=Double.parseDouble(br.readLine); ^ symbol: variable readLine location: variable br of type BufferedReader 1 error
s236018115
p00046
Java
import java.io.InputStreamReader; import java.io.BufferedReader; import java.io.IOException; public class Main { public static void main(String args[] ) throws IOException { BufferedReader br; br = InputFile.load(); Float f = Float.parseFloat(br.readLine()); float high = f, low = f; String line; ...
Main.java:8: error: cannot find symbol br = InputFile.load(); ^ symbol: variable InputFile location: class Main 1 error
s694441487
p00046
Java
import java.util.Scanner; import java.util.*; import java.util.ArrayList; public class Differential { public static void main(String[] args){ Scanner sc = new Scanner(System.in); List<Double> list = new ArrayList<>(); while(sc.hasNext()){ double x = sc.nextDouble(); list.add(x); } Double max = list.get(0...
Main.java:6: error: class Differential is public, should be declared in a file named Differential.java public class Differential { ^ 1 error
s369892448
p00046
Java
public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); List<Double> list = new ArrayList<>(); while(sc.hasNext()){ double x = sc.nextDouble(); list.add(x); } Double max = list.get(0); Double min = list.get(0); for (int i = 1; i < list.size(); i++){ Double v ...
Main.java:3: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:3: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:4: error: cannot find symbol List<...
s177819183
p00046
Java
mport java.util.Collections; import java.util.LinkedList; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner s = new Scanner(System.in); LinkedList<Double> list = new LinkedList<Double>(); while(s.hasNext()){ list.add(s.nextDouble()); } Collections.sort(list);...
Main.java:1: error: class, interface, enum, or record expected mport java.util.Collections; ^ Main.java:2: error: class, interface, enum, or record expected import java.util.LinkedList; ^ Main.java:3: error: class, interface, enum, or record expected import java.util.Scanner; ^ 3 errors
s480648338
p00046
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; public class AOJ_0046 { public static void main(String[] args) throws NumberFormatException, IOException { BufferedReader input = new BufferedReader(new InputStreamReader(System.in)); A...
Main.java:6: error: class AOJ_0046 is public, should be declared in a file named AOJ_0046.java public class AOJ_0046 ^ 1 error
s700062871
p00046
Java
public class Main { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc = new Scanner(System.in); double tall,max,min; tall = max = min = sc.nextDouble(); while(sc.hasNextDouble()){ tall = sc.nextDouble(); if(max < tall) max = tall;...
Main.java:8: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:8: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s539884920
p00046
Java
import java.util.Scanner; class Main { public static void main(String args[]) { Scanner scan=new Scanner(System.in); float high=0,low=0,x,ans; int i=0; while(scan.hasNext()) { x=scan.nextFloat(); if(i==0) { low=x; } if(high<x)high=low; if(low>x)low=x; ans=high-low; i+...
Main.java:23: error: variable ans might not have been initialized System.out.println(ans); ^ 1 error
s871617200
p00046
Java
public class Differential { public static void main(String[] args) throws NumberFormatException, IOException { List<Double> hList = new ArrayList<Double>(); BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); for (int i = 0; i < 5; i++) { double h = Double.parseDouble(br.readLine()); ...
Main.java:1: error: class Differential is public, should be declared in a file named Differential.java public class Differential { ^ Main.java:3: error: cannot find symbol public static void main(String[] args) throws NumberFormatException, IOException { ...
s277320920
p00046
Java
import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { private static double x; private static double max; private static double min; private static String val; public static void main(String args[]) throws Exception { BufferedReader br = new BufferedReade...
Main.java:14: error: cannot find symbol if(i==0){ ^ symbol: variable i location: class Main 1 error
s514878814
p00046
C
#include <stdio.h> int main(void) { double high,max,min,d; scanf("%f",&high); max = high; min = high; while(scanf("%f",&high) != EOF){{ if(max<high){ max = high; }else if(min>high){ min = high; } } d = max - min; printf("%.1f",d); return 0; }
main.c: In function 'main': main.c:21:1: error: expected declaration or statement at end of input 21 | } | ^
s781177595
p00046
C
#define _USE_MATH_DEFINES #include<stdio.h> int main() { double max, min,d; scanf_s("%lf", &d); max = min = d; while (~scanf_s("%lf", &d)) { if (d > max)max = d; else if (d < min) min = d; } printf_s("%lf\n", max - min); return 0; }
main.c: In function 'main': main.c:5:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 5 | scanf_s("%lf", &d); | ^~~~~~~ | scanf main.c:11:9: error: implicit declaration of function 'printf_s'; did you mean 'printf'? [-W...
s237452748
p00046
C
#define _CRT_SECURE_NO_WARNINGS #define _USE_MATH_DEFINES #include<stdio.h> int main() { double max, min,d; scanf("%lf", &d); max = min = d; while (~scanf_s("%lf", &d)) { if (d > max)max = d; else if (d < min) min = d; } printf("%lf\n", max - min); return 0; }
main.c: In function 'main': main.c:8:17: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 8 | while (~scanf_s("%lf", &d)) { | ^~~~~~~ | scanf
s499954958
p00046
C
#include <stdio.h> int main(void) { double max; double min; double height; min=0; max=0 int i; for(i=0;i>=50;i++){ if(height>max)max=height; if(height>min)min=height; } printf("%.1f\n",max-min); return 0; }
main.c: In function 'main': main.c:9:14: error: expected ';' before 'int' 9 | max=0 | ^ | ; 10 | int i; | ~~~ main.c:11:13: error: 'i' undeclared (first use in this function) 11 | for(i=0;i>=50;i++){ | ^ main.c:11...
s854596757
p00046
C
#include<stdio.h> int main(void){ double h[1000], Max, Min; int i = 1; scanf("%lf", &h[0]); Max = Min = h[0]; while ( scanf(%lf", &h[i] ) != EOF ) { if ( h[i] <= Max ) Max = h[i]; if ( h[i] >= Min ) Min = h[i]; i++; } printf("%.1lf", Max - Min); return 0; }
main.c: In function 'main': main.c:7:18: error: expected expression before '%' token 7 | while ( scanf(%lf", &h[i] ) != EOF ) { | ^ main.c:7:21: warning: missing terminating " character 7 | while ( scanf(%lf", &h[i] ) != EOF ) { | ^ main.c:7:21: error: miss...
s384204346
p00046
C
#include <stdio.h> int main(void) { int i,j; double max=0,min=0,a[50]; for(i=0;i<n;i++) scanf("%lf",&a[i]); for(i=0;i<n;i++) if(max<a[i]) min=max=a[i]; for(i=0;i<n;i++) if(min>a[i]) min=a[i]; printf("%.1f",max-min); return 0; }
main.c: In function 'main': main.c:8:19: error: 'n' undeclared (first use in this function) 8 | for(i=0;i<n;i++) scanf("%lf",&a[i]); | ^ main.c:8:19: note: each undeclared identifier is reported only once for each function it appears in
s963513564
p00046
C
#include <stdio.h> main(){ double a,max=0,min=10000; while(scanf("%lf",&a) !=EOF){ if(max<a) max=a; else if(min>a) min=a } printf("%g",max-min); return 0; }
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int] 2 | main(){ | ^~~~ main.c: In function 'main': main.c:6:25: error: expected ';' before '}' token 6 | else if(min>a) min=a | ^ | ; 7 | } | ~
s397927533
p00046
C
float x,n=1e9,h;main(){for(;~scanf("%f",&h);n=n>h?h:n)x=x<h?h:x;exit(printf("%f\n",max-min));}
main.c:1:17: error: return type defaults to 'int' [-Wimplicit-int] 1 | float x,n=1e9,h;main(){for(;~scanf("%f",&h);n=n>h?h:n)x=x<h?h:x;exit(printf("%f\n",max-min));} | ^~~~ main.c: In function 'main': main.c:1:30: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration...
s990274973
p00046
C
#include<stdio.h> int main(void){ double a; double max; double min; max = 0.0; min = DBL_MAX; while(scanf("%lf ",&a)!=EOF){ if(max < a)max = a; if(min > a)min = a; } printf("%.1lf\n",max - min); return 0; }
main.c: In function 'main': main.c:9:9: error: 'DBL_MAX' undeclared (first use in this function) 9 | min = DBL_MAX; | ^~~~~~~ main.c:2:1: note: 'DBL_MAX' is defined in header '<float.h>'; this is probably fixable by adding '#include <float.h>' 1 | #include<stdio.h> +++ |+#include <float.h> ...
s289209522
p00046
C
#include <stdio.h> int main(int argc,char* argv[]){ double tmp; double max=-1.0,min = 999999999.0; while(scanf("%lf",&tmp) != EOF){ if(tmp > max){ max = tmp; } if(tmp < min){ min = tmp; } } printf("%.1lf\n",max-min); } printf("%.1lf\n",max-min); }
main.c:22:10: error: expected declaration specifiers or '...' before string constant 22 | printf("%.1lf\n",max-min); | ^~~~~~~~~ main.c:22:20: error: unknown type name 'max' 22 | printf("%.1lf\n",max-min); | ^~~ main.c:24:1: error: expected identifier or '(' before '}' ...
s624393793
p00046
C
k="%f\n";float a,y,x=k;main(){for(;~scanf(k,&a);y=a>y?a:y)x=a<x?a:x;a=!printf(k,y-x);}
main.c:1:1: warning: data definition has no type or storage class 1 | k="%f\n";float a,y,x=k;main(){for(;~scanf(k,&a);y=a>y?a:y)x=a<x?a:x;a=!printf(k,y-x);} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'k' [-Wimplicit-int] main.c:1:3: error: initialization of 'int' from 'char *' makes integ...
s090753243
p00046
C
main(){float q=0,r=10000,a;while(scanf("%lf",&a)!=EOF){if(max<a){max=a; }if(min>a){min=a;}}printf("%f\n",max-min);return 0;}
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main(){float q=0,r=10000,a;while(scanf("%lf",&a)!=EOF){if(max<a){max=a; }if(min>a){min=a;}}printf("%f\n",max-min);return 0;} | ^~~~ main.c: In function 'main': main.c:1:34: error: implicit declaration of function 'scanf' [-Wimplicit-functio...
s165552905
p00046
C
float q=0,r=10000,a;int main(){while(scanf("%lf",&a)!=EOF){if(max<a){max=a;}if(min>a){min=a;}}printf("%f\n",max-min);return 0;}
main.c: In function 'main': main.c:1:38: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 1 | float q=0,r=10000,a;int main(){while(scanf("%lf",&a)!=EOF){if(max<a){max=a;}if(min>a){min=a;}}printf("%f\n",max-min);return 0;} | ^~~~~ main.c:1:1...
s927616306
p00046
C
#include<stdio.h> int main(void){ double t,ans,max,min; int i; max=-1.0; min=-1.0; while((scanf("%lf",&t))!=EOF){ if(t>max || max<0)max=t; if(tminmax || max<0)max=t; } printf("%lf\n",max-min); return 0; }
main.c: In function 'main': main.c:12:20: error: 'tminmax' undeclared (first use in this function) 12 | if(tminmax || max<0)max=t; | ^~~~~~~ main.c:12:20: note: each undeclared identifier is reported only once for each function it appears in
s245109554
p00046
C
#include<stdio.h> int main(void){ double h,l,i,j; printf("%lf%lf",&h,&l); if(h<l){ d=h; h=l; l=d; } while(scanf("%lf",&i)!=EOF){ if(h<i){ d=h; h=i; i=d; } if(l>i){ d=l; l=i; i=d; ...
main.c: In function 'main': main.c:6:9: error: 'd' undeclared (first use in this function) 6 | d=h; | ^ main.c:6:9: note: each undeclared identifier is reported only once for each function it appears in
s203855943
p00046
C++
#include<iostream> using namespace std; int main() { long float syo, dai, c; dai = -1; syo = 1999999; while (cin >> c) { if (dai <= c) { dai = c; } if (syo >= c) { syo = c; } } cout << dai - syo << endl; }
a.cc: In function 'int main()': a.cc:4:9: error: 'long' specified with 'float' 4 | long float syo, dai, c; | ^~~~ a.cc:4:9: error: 'long' specified with 'float' a.cc:4:9: error: 'long' specified with 'float'
s608708980
p00046
C++
#include<iostream> using namespace std; int main() { long float syo, dai, c; dai = -1; syo = 1999999; while (cin >> c) { if (dai <= c) { dai = c; } if (syo >= c) { syo = c; } } cout << dai - syo << endl; }
a.cc: In function 'int main()': a.cc:4:9: error: 'long' specified with 'float' 4 | long float syo, dai, c; | ^~~~ a.cc:4:9: error: 'long' specified with 'float' a.cc:4:9: error: 'long' specified with 'float'
s757098210
p00046
C++
#include <iostream> #include <vector> int main() { double input; std::vector<double> height; while (std::cin >> input) { height.push_back(input); } std::sort(height.begin(), height.end()); std::cout << *(height.end()-1) - *(height.begin()) << std::endl; }
a.cc: In function 'int main()': a.cc:10:14: error: 'sort' is not a member of 'std'; did you mean 'qsort'? 10 | std::sort(height.begin(), height.end()); | ^~~~ | qsort
s370489750
p00046
C++
#include <iostream> #include <vector> int main() { double input; std::vector<double> height; while (std::cin >> input) { height.push_back(input); } sort(height.begin(), height.end()); std::cout << *(height.end()-1) - *(height.begin()) << std::endl; }
a.cc: In function 'int main()': a.cc:10:9: error: 'sort' was not declared in this scope; did you mean 'short'? 10 | sort(height.begin(), height.end()); | ^~~~ | short
s586852676
p00046
C++
#include<iostream> #include<cmath> using namespace std; int main(){ double mountain[1111],ans; int i=0; while(cin >> mountain[i]){ i++; } sort(mountain,mountain+i); ans = mountain[i-1] - mountain[0]; cout << ans << endl; }
a.cc: In function 'int main()': a.cc:11:3: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 11 | sort(mountain,mountain+i); | ^~~~ | sqrt
s807692956
p00046
C++
#include<iostream> #include<cmath> using namespace std; int main(){ double mountain[1111],ans; int i=0; while(cin >> mountain[i]){ i++; } sort(mountain,mountain+i); ans = mountain[i-1] - mountain[0]; cout << ans << endl; }
a.cc: In function 'int main()': a.cc:11:3: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 11 | sort(mountain,mountain+i); | ^~~~ | sqrt
s921817817
p00046
C++
#include <cstdio> #include <cmath> using namespace std; double m,h,l; int main() { while(~scanf("%lf",&m) { h=max(m,h); l=min(m,l); } printf("%f\n",fabs(h-l)); return 0; }
a.cc: In function 'int main()': a.cc:7:27: error: expected ')' before '{' token 7 | while(~scanf("%lf",&m) { | ~ ^~ | )
s195739835
p00046
C++
#include <cstdio> #include <cstdlib> #include <cmath> using namespace std; double m,h,l; int main() { while(~scanf("%lf",&m) { h=max(m,h); l=min(m,l); } printf("%f\n",fabs(h-l)); return 0; }
a.cc: In function 'int main()': a.cc:8:27: error: expected ')' before '{' token 8 | while(~scanf("%lf",&m) { | ~ ^~ | )
s039576150
p00046
C++
#include <cstdio> #include <cmath> #include <climits> #include <algorithm> using namespace std; double m,h,l; int main() { while(~scanf("%lf",&m)) { h=max(m,h); l=min(m,INT_MAX); } printf("%f\n",fabs(h-l)); return 0; }
a.cc: In function 'int main()': a.cc:14:14: error: no matching function for call to 'min(double&, int)' 14 | l=min(m,INT_MAX); | ~~~^~~~~~~~~~~ In file included from /usr/include/c++/14/bits/specfun.h:43, from /usr/include/c++/14/cmath:3906, from a.cc:2: /usr...
s282228525
p00046
C++
3776.0 1819.0 645.2 2004.1 1208.6
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 3776.0 | ^~~~~~
s257297632
p00046
C++
#include <iostream> #include <cstdio> using namespace std; #define rep2(x,from,to) for(int x = (from); x < (to); ++(x)) #define rep(x,to) rep2(x,0,to) int main() { double h; double highest = 0; double lowest = INT_MAX; while(cin >> h) { if(highest < h) highest = h; if(lowest > h) lowest = h; } cout << highe...
a.cc: In function 'int main()': a.cc:11:25: error: 'INT_MAX' was not declared in this scope 11 | double lowest = INT_MAX; | ^~~~~~~ a.cc:3:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 2 | #include <cstdio> +++...
s932812298
p00046
C++
#include <iostream> #include <algorithm> using namespace std; int main(void) { ios::sync_with_stdio(false); double max = 114514810, min = -1; double h; while(cin >> h) { max = max(max, h); min = min(min, h); } cout << max - min << endl; return 0; }
a.cc: In function 'int main()': a.cc:12:18: error: 'max' cannot be used as a function 12 | max = max(max, h); | ~~~^~~~~~~~ a.cc:13:18: error: 'min' cannot be used as a function 13 | min = min(min, h); | ~~~^~~~~~~~
s208570468
p00046
C++
#include <cstdio> int main() { double n, h = 0.0, l = 999999999.0; int i = 5; while (i--){ scanf("%f", &n); h = max(h, n); l = min(l, n); } printf("%.1f\n", h - l); }
a.cc: In function 'int main()': a.cc:10:9: error: 'max' was not declared in this scope 10 | h = max(h, n); | ^~~ a.cc:11:9: error: 'min' was not declared in this scope; did you mean 'main'? 11 | l = min(l, n); | ^~~ | main
s043064835
p00046
C++
#include <cstdio> using namespace std; int main() { double n, h = 0.0, l = 999999.0; while (scanf("%lf", &n)){ h = max(h, n); l = min(l, n); } printf("%.1lf\n", h - l); }
a.cc: In function 'int main()': a.cc:10:9: error: 'max' was not declared in this scope 10 | h = max(h, n); | ^~~ a.cc:11:9: error: 'min' was not declared in this scope; did you mean 'main'? 11 | l = min(l, n); | ^~~ | main
s476356295
p00046
C++
#include <bits/stdc++.h> using namespace std; #define FOR(i, a, b) for (int i = (a); i < (b); i++) #define REP(i, n) for (int i = 0; i < (n); i++) int main() { int i; vector<double> a; for (i = 0; cin >> a[i]; i++); sort(a, a + i); cout << a[i - 1] - a[0] << endl; }
a.cc: In function 'int main()': a.cc:12:13: error: no match for 'operator+' (operand types are 'std::vector<double>' and 'int') 12 | sort(a, a + i); | ~ ^ ~ | | | | | int | std::vector<double> In file included from /usr/include/c++/14/bits/stl_alg...
s796779354
p00046
C++
#define _CRT_SECURE_NO_WARNINGS 1 #include <iostream> #include <string> #include <vector> #include <algorithm> #include <cstdlib> #include <cstdio> #include <cstring> #include <cstdlib> #include <queue> #include <climits> #include <map> #include <stack> using namespace std; #define M_PI 3.141592 #define toRad 2.0*M_PI/...
a.cc: In function 'int main()': a.cc:26:14: error: 'DBL_MIN' was not declared in this scope 26 | ma = DBL_MIN; mi = DBL_MAX; | ^~~~~~~ a.cc:14:1: note: 'DBL_MIN' is defined in header '<cfloat>'; this is probably fixable by adding '#include <cfloat>' 13 | #include <stack> +++ |+#includ...
s008762461
p00046
C++
#include <iostream> #include <cstdio> #include <vector> #include <list> #include <algorithm> #include <cmath> #include <stack> #include <map> using namespace std; #define REP(i,n) for(int (i)=0; (i)<(n); (i)++) #define FOR(i,a,b) for(int (i)=(a); (i)<(b); (i)++) #define PUSH(n,v) for(int i=0; i<(n); i++) {int j; cin >...
a.cc: In function 'int main()': a.cc:17:22: error: 'INT_MIN' was not declared in this scope 17 | double highest = INT_MIN; | ^~~~~~~ a.cc:9:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 8 | #include <map> +++ |+#inclu...
s053180686
p00046
C++
#include <iostream> #include <cstdio> #include <vector> #include <list> #include <algorithm> #include <cmath> #include <stack> #include <map> using namespace std; #define REP(i,n) for(int (i)=0; (i)<(n); (i)++) #define FOR(i,a,b) for(int (i)=(a); (i)<(b); (i)++) #define PUSH(n,v) for(int i=0; i<(n); i++) {int j; cin >...
a.cc: In function 'int main()': a.cc:17:22: error: 'INT_MIN' was not declared in this scope 17 | double highest = INT_MIN; | ^~~~~~~ a.cc:9:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 8 | #include <map> +++ |+#inclu...
s069525365
p00046
C++
#include <iostream> #include <cstdio> #include <vector> #include <list> #include <algorithm> #include <cmath> #include <stack> #include <map> using namespace std; #define REP(i,n) for(int (i)=0; (i)<(n); (i)++) #define FOR(i,a,b) for(int (i)=(a); (i)<(b); (i)++) #define PUSH(n,v) for(int i=0; i<(n); i++) {int j; cin >...
a.cc: In function 'int main()': a.cc:17:22: error: 'INT_MIN' was not declared in this scope 17 | double highest = INT_MIN; | ^~~~~~~ a.cc:9:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 8 | #include <map> +++ |+#inclu...
s694604399
p00046
C++
#include<iostream> using namespace std; int main(){ double h, min = 0.0, max = 0.0; while(cin >> h){ if( h > max ) max = h; else if( h < min ) min = h; } cout << fixed << setprecision(1) << max - min << endl; }
a.cc: In function 'int main()': a.cc:9:26: error: 'setprecision' was not declared in this scope 9 | cout << fixed << setprecision(1) << max - min << endl; | ^~~~~~~~~~~~ a.cc:2:1: note: 'std::setprecision' is defined in header '<iomanip>'; this is probably fixable by adding '#...
s141176196
p00046
C++
#include<bits/stdc++.h> using namespace std; int main(){ double h; vector<double>vh; vector<double>::iterator pvh=vh.begin(); while(cin>>h){ vh.push_back(h); } sort(vh.begin(),vh.end()); double a,b,c; double a=*pvh; pvh=vh.end(); double b=*pvh; double c=b-a; cout<<c<<endl; return 0; }
a.cc: In function 'int main()': a.cc:13:24: error: redeclaration of 'double a' 13 | double a=*pvh; | ^ a.cc:12:24: note: 'double a' previously declared here 12 | double a,b,c; | ^ a.cc:15:24: error: redeclaration of 'double ...
s845928066
p00046
C++
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication26 { class Program { static void Main(string[] args) { double b, c; c=0;b=1<<29; string line; while((line=Console.ReadLine())!=null)...
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:2:7: error: expected nested-name-specifier before 'System' 2 | using System.Collections.Generic; | ^~~~~~ a.cc:3:7: error: expected nested-name-specifier before 'System' 3 | using System.L...
s169022669
p00046
C++
#include<iostream> #include<cstdio> using namespace std; int main() { double heights[50]; int i = 0; while(cin >> heights[i]) { i++; } double min_f = *min_element(heights, heights + i); double max_f = *max_element(heights, heights + i); printf("%.6lf\n", max_f - min_f); return 0; }
a.cc: In function 'int main()': a.cc:14:19: error: 'min_element' was not declared in this scope 14 | double min_f = *min_element(heights, heights + i); | ^~~~~~~~~~~ a.cc:15:19: error: 'max_element' was not declared in this scope 15 | double max_f = *max_element(heights, heights + i); ...
s735161786
p00046
C++
#include <iostream> #include <fstream> #include <cstdio> #include <cmath> #include <vector> #include <cstring> #include <string> #include <set> #include <map> #include <stack> #include <queue> #include <algorithm> using namespace std; #define REP(i,n) for(int i=0; i<n; ++i) #define FOR(i,a,b) for(int i=a; i<=b; ++i) ...
a.cc: In function 'int main()': a.cc:32:22: error: 'ma' was not declared in this scope; did you mean 'mi'? 32 | double mi = 1e9; ma = 0; | ^~ | mi
s456208398
p00046
C++
#include <iostream> using namespace std float a; float min = 1000000; float max = 0; int main(){ while(cin >> a){ if(a < min) min = a; if(a > max) max = a; count++; } cout << max - min << endl; }
a.cc:2:20: error: expected ';' before 'float' 2 | using namespace std | ^ | ; 3 | 4 | float a; | ~~~~~ a.cc: In function 'int main()': a.cc:10:16: error: reference to 'min' is ambiguous 10 | if(a < min) min = a; | ...