submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s426515117
p00134
C++
#include <iostream> #include <algorithm> #include <cassert> #include <cctype> #include <complex> #include <cstdio> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; int n,m; __int64 s; int main(){ cin>>n; for(int i=0;i<n;i++){c...
a.cc:17:1: error: '__int64' does not name a type; did you mean '__int64_t'? 17 | __int64 s; | ^~~~~~~ | __int64_t a.cc: In function 'int main()': a.cc:21:37: error: 's' was not declared in this scope 21 | for(int i=0;i<n;i++){cin>>m;s+=m;} | ^ a.cc:22:...
s715508646
p00134
C++
#include <iostream> #include <algorithm> #include <cassert> #include <cctype> #include <complex> #include <cstdio> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; int n,m; __int64 s=0; int main(){ cin>>n; for(int i=0;i<n;i++)...
a.cc:17:1: error: '__int64' does not name a type; did you mean '__int64_t'? 17 | __int64 s=0; | ^~~~~~~ | __int64_t a.cc: In function 'int main()': a.cc:21:37: error: 's' was not declared in this scope 21 | for(int i=0;i<n;i++){cin>>m;s+=m;} | ^ a.cc:2...
s790520008
p00134
C++
#include <iostream> #include <algorithm> #include <cassert> #include <cctype> #include <complex> #include <cstdio> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; //typedef long long ll; typedef __int64 ll; int n,w[10000]; int ...
a.cc:17:9: error: '__int64' does not name a type; did you mean '__int64_t'? 17 | typedef __int64 ll; | ^~~~~~~ | __int64_t a.cc: In function 'int main()': a.cc:25:17: error: 'll' was not declared in this scope 25 | ll ans=0; | ^~ a.cc:26:37: error:...
s686609231
p00134
C++
using namespace std;long long n,a,v;main(){for(cin>>n;cin>>a;)v+=a;cout<<v/n<<endl;return 0;}
a.cc:1:37: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 1 | using namespace std;long long n,a,v;main(){for(cin>>n;cin>>a;)v+=a;cout<<v/n<<endl;return 0;} | ^~~~ a.cc: In function 'int main()': a.cc:1:48: error: 'cin' was not declared in this s...
s153610712
p00134
C++
#include<iostream> using namespace std;long long n,a,v;main(){for(cin>>n;cin>>a;)v+=a;cout<<v/n<<endl;return;}
a.cc:2:37: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | using namespace std;long long n,a,v;main(){for(cin>>n;cin>>a;)v+=a;cout<<v/n<<endl;return;} | ^~~~ a.cc: In function 'int main()': a.cc:2:84: error: return-statement with no value, in...
s528082690
p00134
C++
import java.util.*; public class Main { public static void main(String[] args) { Scanner s = new Scanner(System.in); int N = s.nextInt(); long sum = 0; for(int i = 0; i < N; ++i) { sum += (long)s.nextInt(); } System.out.println(sum/N); } }
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: expected unqualified-id before 'public' 3 | public class Main { | ^~~~~~
s972343232
p00134
C++
#import<iostream> int main(){long long int i,a,n,s=0;cin>>n;for(i=n;i--;s+=a)cin>>a;cout<<s/n<<endl;}
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 1 | #import<iostream> | ^~~~~~ a.cc: In function 'int main()': a.cc:2:36: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 2 | int main(){long long int i,a,n,s=0;cin>>n;for(i=n;i--;s+=a)cin>>a;cout<<s/n<<endl;} ...
s219386156
p00134
C++
#import<iostream> int main(){long long int i,a,n,s=0;std::cin>>n;for(i=n;i--;s+=a)cin>>a;std::cout<<s/n<<"\n";}
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 1 | #import<iostream> | ^~~~~~ a.cc: In function 'int main()': a.cc:2:65: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 2 | int main(){long long int i,a,n,s=0;std::cin>>n;for(i=n;i--;s+=a)cin>>a;std::cout<<s/n...
s324866369
p00134
C++
int main(){long long int i,a,n,s=0;scanf("%lld",&n);for(i=n;i--;s+=a)scanf("%lld",&a);printf("%d\n",s/n);}
a.cc: In function 'int main()': a.cc:1:36: error: 'scanf' was not declared in this scope 1 | int main(){long long int i,a,n,s=0;scanf("%lld",&n);for(i=n;i--;s+=a)scanf("%lld",&a);printf("%d\n",s/n);} | ^~~~~ a.cc:1:87: error: 'printf' was not declared in this scope 1 | i...
s022237477
p00134
C++
int main(){long long int i,a,n,s=0;scanf("%lld",&n);for(i=n;i--;s+=a)scanf("%lld",&a);printf("%lld\n",s/n);}
a.cc: In function 'int main()': a.cc:1:36: error: 'scanf' was not declared in this scope 1 | int main(){long long int i,a,n,s=0;scanf("%lld",&n);for(i=n;i--;s+=a)scanf("%lld",&a);printf("%lld\n",s/n);} | ^~~~~ a.cc:1:87: error: 'printf' was not declared in this scope 1 |...
s831931086
p00134
C++
#include<iostream> using namespace std; int main(){ int n; int a,sum; cin>>n; for(int i=1;i<=n;i==){ cin>>a; sum=+a; } cout<<sum/n; }
a.cc: In function 'int main()': a.cc:7:21: error: expected primary-expression before ')' token 7 | for(int i=1;i<=n;i==){ | ^
s354035545
p00134
C++
include<iostream> #include<cstdio> #include<math.h> using namespace std; int main(){ long long s=0; int i,j,n; cin >> n; for(i=0;i<n;i++){ cin >> j; s+=j; } cout << s/n << endl; return 0; }
a.cc:1:1: error: 'include' does not name a type 1 | include<iostream> | ^~~~~~~ In file included from /usr/include/c++/14/cmath:45, from /usr/include/c++/14/math.h:36, from a.cc:3: /usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu_cxx::__is_null...
s295701084
p00134
C++
sum = 0; gets.to_i.times do sum += gets.to_i end puts sum
a.cc:1:1: error: 'sum' does not name a type 1 | sum = 0; | ^~~ a.cc:2:1: error: 'gets' does not name a type 2 | gets.to_i.times do | ^~~~
s352631206
p00134
C++
#include <iostream> using namespace std; int main(){ int n; cin >> n; long long ave = 0; long long a; for(int i = 0 ; i < n ; i++ ){ cin >> a; ave += a; } cout << (int)(ave/m) << endl; return 0; }
a.cc: In function 'int main()': a.cc:12:21: error: 'm' was not declared in this scope 12 | cout << (int)(ave/m) << endl; | ^
s496656411
p00135
Java
import java.util.Scanner; public class mm { public static void main(String[] args) { Scanner sc=new Scanner(System.in); int n=sc.nextInt(); String ans[]=new String[n]; for(int i=0;i<n;i++){ String s=sc.next(); String ss[]=s.split(":"); int h=Integer.parseInt(ss[0]); int m=Integer.parseInt(ss[1]...
Main.java:3: error: class mm is public, should be declared in a file named mm.java public class mm { ^ 1 error
s689065192
p00135
Java
import java.util.*; public class Main { static Scanner sc = new Scanner(System.in); static int n; public static void main(String[] args) { read(); } static boolean read(){ if(!sc.hasNext())return false; n = sc.nextInt(); for(int i = 0; i < n; i++){ String[] line = new String[2]; line = sc.next().spli...
Main.java:32: error: reached end of file while parsing } ^ 1 error
s189447319
p00135
Java
import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n = Integer.parseInt(sc.nextLine()); for(int i = 0; i < n; i++){ String[] strs = sc.nextLine().split(":"); int hour = Integer.parseInt(strs[0]); int min = Integer.parse...
Main.java:32: error: reached end of file while parsing } ^ 1 error
s493925644
p00135
C
#include<stdio.h> int main(void) { int i,n,x,y,temp; scanf("%d",&n); for(i=1;i<=n;i++) { scanf("%d:%d",&x,&y); x=x*5; if(x<y) { temp=x; x=y; y=temp; } if(0<=(x-y) && (x-y)<5) { printf("alert\n"); } else if( else if(15<=(x-y) && (x-y)<=30) { printf("safe\n"); } else { printf("war...
main.c: In function 'main': main.c:18:17: error: expected expression before 'else' 18 | else if(15<=(x-y) && (x-y)<=30) { | ^~~~ main.c:24:9: error: expected expression before '}' token 24 | } | ^
s126585241
p00135
C
#include <stdio.h> #include <math.h> int main() { int N, I; double h, m, a; scanf("%d", &N); for(I = 0; I < N; ++ I) { scanf("%lf:%lf", &h, &m); h = 30 * h + m / 2; m = 6 * m; a = fabs((a < 0)? (a - 180) % 360 + 180: (a + 180) % 360 - 180); if(a < 30) printf("alert\n"); else if(a < 90) printf("warning\n...
main.c: In function 'main': main.c:11:45: error: invalid operands to binary % (have 'double' and 'int') 11 | a = fabs((a < 0)? (a - 180) % 360 + 180: (a + 180) % 360 - 180); | ~~~~~~~~~ ^ | | | ...
s995972142
p00135
C
#inclde <stdio.h> int main(void) { int datamax; int datanum; int hour,min; int kakudo; scanf("%d",&datamax); for(datanum=0;datanum<datamax;datanum++) { scanf("%d:%d",&hour,&min); kakudo=hour*360/12*2; kakudo+=min; kakudo-=min*360/60*2; if(kakudo<0)kakudo=-kakudo; if(kakudo<30*2)puts("alert"); else ...
main.c:1:2: error: invalid preprocessing directive #inclde; did you mean #include? 1 | #inclde <stdio.h> | ^~~~~~ | include main.c: In function 'main': main.c:8:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 8 | scanf("%d",&datamax); | ^~...
s169313191
p00135
C
#include <stdio.h> #include <math.h> #define gosa 1e-9; int main () { int n , i , h , m; scanf("%d",&n); for ( i = 0; i < n; i++ ) { double tan = 0.0 , chou =0.0 , is; scanf("%d:%d",&h,&m); tan = ( 30 * h ) + (double)( m / 12 ); chou = 6 * m; is = fabs(tan-chou); if ( is+gosa < 30.00 ) printf("aler...
main.c: In function 'main': main.c:4:18: error: expected ')' before ';' token 4 | #define gosa 1e-9; | ^ main.c:15:25: note: in expansion of macro 'gosa' 15 | if ( is+gosa < 30.00 ) | ^~~~ main.c:15:20: note: to match this '(' 15 | ...
s951758557
p00135
C
#include <stdio.h> #include <math.h> int main(void) { double angle[12] = {0, 30, 60, 90, 120, 150, 180, 210, 240, 270, 300, 330}; double h, m, ang; int n; scanf("%d", &n); while (n-- != 0){ scanf("%lf%*c%lf", &h, &m); h = angle[h] + m / 2; m *= 6; ang = fabs(h - m) >= 180 ? fabs(360.0 - fabs(h -...
main.c: In function 'main': main.c:15:26: error: array subscript is not an integer 15 | h = angle[h] + m / 2; | ^
s609676258
p00135
C
main(n,h,m,d){ scanf("%d",&n); for(;n--;){ scanf("%d:%d",&h,&m); double s=h*30+m/2,l=m*6,t,d; if(l<s) t=s,s=l,l=t; d=l-s; d=(s-l+360<d)?s-l+360:d; (d<30)? puts("alert") : (d<90)? puts("warning"); : puts("safe"); } }
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main(n,h,m,d){ | ^~~~ main.c: In function 'main': main.c:1:1: error: type of 'n' defaults to 'int' [-Wimplicit-int] main.c:1:1: error: type of 'h' defaults to 'int' [-Wimplicit-int] main.c:1:1: error: type of 'm' defaults to 'int' [-Wimplic...
s569547018
p00135
C++
#include<iostream> #include<cmath> using namespace std; int main(void){ int n; cin>> n ; for(int i = 0 ; i < n ; i++){ int a,b; char c; cin>>a>>c>>b; // cout<<a<<" "<<b<<endl; double A =(double)a*30+b*0.5; double B =(double)b*6; double judge = abs(A-B)%180; // if(180<judge)judge = 360.0 - judge;...
a.cc: In function 'int main()': a.cc:17:40: error: invalid operands of types 'double' and 'int' to binary 'operator%' 17 | double judge = abs(A-B)%180; | ~~~~~~~~^~~~ | | | | | ...
s992648555
p00135
C++
main(n){double a,b;char m[3][8]={"alert","warning","safe"};for(scanf("%d",&n);n--;scanf("%lf:%lf",&a,&b),a=a+b/60-b/5,a=a>6?12-a:a,printf("%s\n",m[(a>=1)+(a>=3)]));}
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token 1 | main(n){double a,b;char m[3][8]={"alert","warning","safe"};for(scanf("%d",&n);n--;scanf("%lf:%lf",&a,&b),a=a+b/60-b/5,a=a>6?12-a:a,printf("%s\n",m[(a>=1)+(a>=3)]));} | ^
s712452970
p00135
C++
// AOJ 0135 (http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0135) #include<cstdio> #include<cstdlib> #include<algorithm> #define rep(i,a) for(int i=0;i<(a);++i) int h; int main() { scanf( "%d", &h ); rep( i, h ) { int hh, mm; scanf( "%d:%d", &hh, &mm ); double diff = fabs(hh*30+mm/2.0-mm*6); dif...
a.cc: In function 'int main()': a.cc:17:31: error: 'fabs' was not declared in this scope; did you mean 'labs'? 17 | double diff = fabs(hh*30+mm/2.0-mm*6); | ^~~~ | labs
s146477473
p00135
C++
4 02:15 06:01 11:55 10:40
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 4 | ^
s870108891
p00135
C++
#include <iostream> #include <string> #include <cmath> using namespace std; string func(int s, int l){ int a = l * 6; int b = s * 30 + l / 2; int s = abs(a - b); if(s > 180)s = 360 - s; if(30 <= s){ if(90 <= s)return "safe"; return "warning"; }else return "alert"; cout << a << " " << b; return "a"; } int...
a.cc: In function 'std::string func(int, int)': a.cc:9:13: error: declaration of 'int s' shadows a parameter 9 | int s = abs(a - b); | ^ a.cc:6:17: note: 'int s' previously declared here 6 | string func(int s, int l){ | ~~~~^
s851482746
p00135
C++
#include <iostream> #include <string> #include <cmath> using namespace std; string func(int M, int H){ /*double a = l * 6; double b = s * 30.0 + l / 2.0; int m = abs(a - b); if(180 < m)m = 360 - m; if(0 <= m && m < 30)return "alert"; if(90 <= m && m <= 180)return "safe"; return "waring"; if(m > 180)m = 360 - m...
a.cc:32:1: error: expected declaration before '}' token 32 | } | ^
s377056447
p00135
C++
#include <iostream> #include <cstdio> #include <cmath> #include <string> using namespace std; string func(int s, int l){ double h = s*30.0 + l/2.0, m = l*6; int ang = abs(h - m); if(ang > 180) ang = 360 - ang; if(0 <= ang && ang < 30) { return "alert"; } else if(90 <= ang && ang <= 180...
a.cc: In function 'int main()': a.cc:24:29: error: 'c' was not declared in this scope 24 | cin >> s >> c >> l; | ^
s516516632
p00135
C++
#include <cstdio> #define abs(x) ((x) < 0 ? -(x) : (x)) #define rep(i, n) for(int i = 0; i < (n); ++i) int main() { int n; scanf("%d", &n); rep(i, n) { int h, m; scanf("%d:%d", &h, &m); int ah = h * 60 + m; if (ah >= 360) ah -= 360; int am = 12 * m; if (am >= 360) am -= 360; int diff = abs(ah - am) if (0 <=...
a.cc: In function 'int main()': a.cc:12:17: error: expected ',' or ';' before 'if' 12 | if (0 <= diff && diff < 60) puts("alert"); | ^~ a.cc:13:17: error: 'else' without a previous 'if' 13 | else if (180 <= diff && diff <= 360) puts("safe"); | ...
s528500377
p00135
C++
#include <cstdio> int main(){ int n,h,m; scanf("%d",&n); for(;n--;){ scanf("%d:%d",&h,&m); double s=h*30+m/2.,l=m*6,t,d; l<s?t=l,l=s,s=t:0; d=s-l+360; l-s<d?d=l-s:0; d<30? puts("alert"); : d<90? puts("warning") : puts("safe"); } }
a.cc: In function 'int main()': a.cc:12:38: error: expected ':' before ';' token 12 | puts("alert"); | ^ | : a.cc:12:38: error: expected primary-expression before ';' token a.cc:13:17: error: expected primar...
s238891853
p00135
C++
include<iostream> #include<cstdio> #include<cstdlib> #include<cmath> using namespace std; int main(){ int n; double h,m; string s; scanf("%d",&n); for(int i=0;i<n;i++){ cin >> s; int st = s[0] == '0'?1:0; h = (atoi)(s.substr(st,s[0]=='0'?1:2).c_str()); st = s[3] == '0'?4:3; m = (atoi)(s.s...
a.cc:1:1: error: 'include' does not name a type 1 | include<iostream> | ^~~~~~~ In file included from /usr/include/c++/14/cmath:45, from a.cc:4: /usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu_cxx::__is_null_pointer' redeclared as different kind of entity 16...
s237544269
p00135
C++
#include <cstdio> #include <cstring> #include <cmath> using namespace std; int main(){ int n; cin >> n; while(n--){ int h, m; scanf("%d:%d", &h, &m); double H = (double)h * 30 + m*0.5; double M = (double)m * 6; double ans = abs(H-M); if(0 <= ans && ans < 30) cout << "alert" << ...
a.cc: In function 'int main()': a.cc:9:3: error: 'cin' was not declared in this scope 9 | cin >> n; | ^~~ a.cc:5:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 4 | #include <cmath> +++ |+#include <iostream> 5 | using namespace std;...
s671258262
p00135
C++
#include <stdio.h> #include <iostream> #include <stdlib.h> using namespace std; int main() { int n; int hour,minute; char d; double kakuh,kakum,sa; cin >> n; for (int i = 0; i < n; i++) { cin >> hour >> d >> minute; kakuh = 30.0 * hour + minute * 0.5; kakum = 6.0 * minute; sa = fabs(kakuh-kakum); if ...
a.cc: In function 'int main()': a.cc:18:22: error: 'fabs' was not declared in this scope; did you mean 'labs'? 18 | sa = fabs(kakuh-kakum); | ^~~~ | labs
s724210840
p00135
C++
#include <iostream> #include <stdio.h> using namespace std; int main() { int a,b,n; char c; cin >> n; for (;n>0;n--) { scanf("%d%c%d",&a,&c,&b); a*=30; b*=6; b=(b-a+360) % 360; b= b >180 ? 360-b : b; if (b=<30) cout << "alert" << endl; else if (b>=90) cout << "safe" << endl; else cout << "warning" << endl; ...
a.cc: In function 'int main()': a.cc:14:15: error: expected primary-expression before '<' token 14 | if (b=<30) cout << "alert" << endl; else | ^
s849896766
p00135
C++
#include "stdafx.h" #include <iostream> #include <stdio.h> using namespace std; int main() { int n; double a,b,d; char c; cin >> n; for (;n>0;n--) { scanf("%lf%c%lf",&a,&c,&b); a= a>=12 ? a-12 : a; a=a*30+b*0.5; b*=6; if (a>b) { d=a; a=b; b=d;} b-=a; b= b>180 ? 360-b : b; if (b<30) cout << "alert" << endl;...
a.cc:1:10: fatal error: stdafx.h: No such file or directory 1 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s627803919
p00136
Java
freq=Array.new(6, 0) gets.to_i.times { h=gets.to_f case when h<165 freq[0]+=1 when h<170 freq[1]+=1 when h<175 freq[2]+=1 when h<180 freq[3]+=1 when h<185 freq[4]+=1 else freq[5]+=1 end } freq.each_index { |i| puts "#{i+1}:" << '*' * freq[i] }
Main.java:1: error: class, interface, enum, or record expected freq=Array.new(6, 0) ^ 1 error
s021508816
p00136
Java
import java.util.*; public class Main0136{ public static void main(String[] args){ new Main0136().run(); } Scanner sc = new Scanner(System.in); int n; int[] h; void run(){ while(sc.hasNext()){ n = sc.nextInt(); h = new int[6]; for(int i=0; i<n; i++){ double x = sc.nextDouble...
Main.java:2: error: class Main0136 is public, should be declared in a file named Main0136.java public class Main0136{ ^ 1 error
s272333858
p00136
C
#include <stdio.h> int main(void) { int n; double siz; int i, j; int grade[6] = {0}; scanf("%d", &n); for (i = 0; i < n; i++){ scanf("%lf", &siz); if(siz >= 185.0){ grade[5]++; } else if(siz >= 180.0){ grade[4]++; } else if(siz >= 175.0){ grade[3]++; } else if(siz >= 170.0){ grade[...
main.c: In function 'main': main.c:39:17: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration] 39 | print("\n"); | ^~~~~ | printf
s647985165
p00136
C
#include<stdio.h> int main(){ int n,i,j,k,b[6]={0,0,0,0,0,0}; double a[40]; scanf("%d",&n); for(i=0;iN;i++){ scanf("%lf",&a[i]); if(a[i]<165.0) b[0]++; else if(a[i]<170.0) b[1]++; else if(a[i]<175.0) b[2]++; else if(a[i]<180.0) b[3]++; else if([i]<185.0) b[4]++; else b[5]++; } for(j=0;j<6;j++){ printf("%d:",j+1); for(k...
main.c: In function 'main': main.c:6:9: error: 'iN' undeclared (first use in this function); did you mean 'i'? 6 | for(i=0;iN;i++){ | ^~ | i main.c:6:9: note: each undeclared identifier is reported only once for each function it appears in main.c:16:9: error: expected expression before '...
s987507741
p00136
C
#include<stdio.h> int main(){ int n,i,j,k,b[6]={0,0,0,0,0,0}; double a[40]; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%lf",&a[i]); if(a[i]<165.0) b[0]++; else if(a[i]<170.0) b[1]++; else if(a[i]<175.0) b[2]++; else if(a[i]<180.0) b[3]++; else if([i]<185.0) b[4]++; else b[5]++; } for(j=0;j<6;j++){ printf("%d:",j+1); for(...
main.c: In function 'main': main.c:16:9: error: expected expression before '[' token 16 | else if([i]<185.0) | ^
s727604609
p00136
C
#include<stdio.h> int main(){ int n,i,a[6],j; double x; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%lf",&x); if(x<165) a[0]++; else if(165<=x&&170>x) a[1]++; else if(170<=x&&175>x) a[2]++; else if(175<=x&&180>x) a[3]++; else if(180<=x&&185>x) a[4]++; else a[5]++; } for(i=0;i<6;i++){ printf("%d:"i+1); for(j=0;j<a[i];j++) ...
main.c: In function 'main': main.c:21:13: error: expected ')' before 'i' 21 | printf("%d:"i+1); | ~ ^ | ) main.c:26:1: error: expected declaration or statement at end of input 26 | } | ^
s753689026
p00136
C
int main(n,i){int f[9] = {};double a;for(scanf("%d",&n),i=n;scanf("%lf",a),i;--i)a<165?f[1]++:a<170?f[2]++:a<175?f[3]++:a<180?f[4]++:a<185?f[5]++:f[6]++;for(i=1;i<7;puts(""),++i)for(printf("%d:",i),n=0;j<f[i];++n)printf("*");}
main.c: In function 'main': main.c:1:5: error: type of 'n' defaults to 'int' [-Wimplicit-int] 1 | int main(n,i){int f[9] = {};double a;for(scanf("%d",&n),i=n;scanf("%lf",a),i;--i)a<165?f[1]++:a<170?f[2]++:a<175?f[3]++:a<180?f[4]++:a<185?f[5]++:f[6]++;for(i=1;i<7;puts(""),++i)for(printf("%d:",i),n=0;j<f[i];++n)print...
s867581105
p00136
C
#include <stdio.h> #include <string.h> int main(void) { int n; int freq[6]; double height; int i, j; memset(freq, 0, sizeof(freq)); scanf("%d", &n); for (i = 0; i < n; i++){ scanf("%lf", &height); if (height < 165.0){ freq[0]++; } e...
main.c: In function 'main': main.c:24:17: error: array subscript is not an integer 24 | freq[((height - 165.0) / 5.0) + 1]++; | ^
s706687105
p00136
C
h[8],j;main(v){for(;~scanf("%d.%*d",&v);j=1)h[v<165?2:i>184?7:v/5-30]+=j;for(;h[j]--||6/j&&printf("%d:",j++);)putchar(h[j]?42:10);}
main.c:1:1: warning: data definition has no type or storage class 1 | h[8],j;main(v){for(;~scanf("%d.%*d",&v);j=1)h[v<165?2:i>184?7:v/5-30]+=j;for(;h[j]--||6/j&&printf("%d:",j++);)putchar(h[j]?42:10);} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'h' [-Wimplicit-int] main.c:1:6: error: type...
s050080597
p00136
C++
#include <iostream> using namespace std; int main(){ int i, n; double high; int num[6]; memset(num, 0, sizeof(num)); cin >> n; for(i = 0; i < n; i++){ cin >> high; if(high < 165.0){ num[0]++; } else if(high >= 165.0 && high < 170.0){ num[1]++; } else if(high >= 170.0 && high < 175.0){ ...
a.cc: In function 'int main()': a.cc:11:10: error: 'memset' was not declared in this scope 11 | memset(num, 0, sizeof(num)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ |+#include...
s012977898
p00136
C++
#include<stdio.h> int main() { double N; int num[41]={},A,B=0; scanf("%d",&A); for(int i=0;i<A;i++) { scanf("lf",&N); B=N*10; if((int)N<165)num[0]++; else if((int)N>=1650&&(int)N<1700)num[1]++; else if((int)N>=1700&&(int)N<1750)num[2]++; else if((int)N>=1750&&(int)N<1800)num[3]++; else if((int)N>=1800&&(int)N<1850)num...
a.cc:21:9: warning: missing terminating " character 21 | {printf("%d:); | ^ a.cc:21:9: error: missing terminating " character 21 | {printf("%d:); | ^~~~~~ a.cc: In function 'int main()': a.cc:22:1: error: expected primary-expression before 'for' 22 | for(int j=0;j<num[i];j++) ...
s673744202
p00136
C++
int main(n,i){int f[9] = {};double a;for(scanf("%d",&n),i=n;scanf("%lf",a),i;--i)a<165?f[1]++:a<170?f[2]++:a<175?f[3]++:a<180?f[4]++:a<185?f[5]++:f[6]++;for(i=1;i<7;puts(""),++i)for(printf("%d:",i),n=0;n<f[i];++n)printf("*");}
a.cc:1:5: error: cannot declare '::main' to be a global variable 1 | int main(n,i){int f[9] = {};double a;for(scanf("%d",&n),i=n;scanf("%lf",a),i;--i)a<165?f[1]++:a<170?f[2]++:a<175?f[3]++:a<180?f[4]++:a<185?f[5]++:f[6]++;for(i=1;i<7;puts(""),++i)for(printf("%d:",i),n=0;n<f[i];++n)printf("*");} | ^~~~ a.c...
s284594037
p00136
C++
main(){int n,if[9] = {};double a;for(scanf("%d",&n),i=n;scanf("%lf",a),i;--i)a<165?f[1]++:a<170?f[2]++:a<175?f[3]++:a<180?f[4]++:a<185?f[5]++:f[6]++;for(i=1;i<7;puts(""),++i)for(printf("%d:",i),n=0;n<f[i];++n)printf("*");}
a.cc:1:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 1 | main(){int n,if[9] = {};double a;for(scanf("%d",&n),i=n;scanf("%lf",a),i;--i)a<165?f[1]++:a<170?f[2]++:a<175?f[3]++:a<180?f[4]++:a<185?f[5]++:f[6]++;for(i=1;i<7;puts(""),++i)for(printf("%d:",i),n=0;n<f[i];++n)printf("*");} ...
s910743901
p00136
C++
import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String arg[]) { try{ Scanner sc = new Scanner(System.in); int n=sc.nextInt(); double a[] = new double[n]; int b[] = new int[7]; Arrays.fill(b, 0); for(int i=0; i<n; i++) a[i]=sc.nextDouble(); fo...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Arrays; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.util.Scanner; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-t...
s329154482
p00136
C++
#include<iostream> using namesace std; int main(){ int n; int a[1024]; int r[6]={0}; cin>>n; for(int i=0;i<n;i++){ cin>>a[i]; if(a[i]<165)r[0]++; else if(a[i]<170)r[1]++; else if(a[i]<175)r[2]++; else if(a[i]<180)r[3]++; else if(a[i]<185)r[4]++; else r[5]++; } for(int i=0;i<6;i++){ cout<<i+1<<...
a.cc:2:7: error: expected nested-name-specifier before 'namesace' 2 | using namesace std; | ^~~~~~~~ a.cc: In function 'int main()': a.cc:7:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 7 | cin>>n; | ^~~ | std::cin In file included from ...
s427122450
p00137
Java
import java.util.Scanner; public class AOJ0137 { public static void main(String[] args){ Scanner s=new Scanner(System.in); int n=s.nextInt(); for(int i=0;i<n;i++){ int x=s.nextInt(); System.out.println("Case"+(i+1)+":"); for(int j=0;j<10;j++){ x*=x; String str=String.format("%08d",x); x=Inte...
Main.java:2: error: class AOJ0137 is public, should be declared in a file named AOJ0137.java public class AOJ0137 { ^ 1 error
s038761865
p00137
Java
import java.util.Scanner; public class WUPCA { public static void main(String[] args){ Scanner s=new Scanner(System.in); int n=s.nextInt(); for(int i=0;i<n;i++){ int x=s.nextInt(); System.out.println("Case"+(i+1)+":"); for(int j=0;j<10;j++){ x*=x; String str=String.format("%08d",x); x=Intege...
Main.java:2: error: class WUPCA is public, should be declared in a file named WUPCA.java public class WUPCA { ^ 1 error
s574398408
p00137
C
#include <stdio.h> int main(){ int count=0,counter; int a,b,c; int i,j,k; int x,y[8]; int c,cter; scanf("%d",&counter); while(counter>count){ scanf("%d",&x); cter=10; c=0; printf("Case %d:\n",count+1); while(c<cter){ x*=x; x/=100; x%=10000; c++; printf("%d\n",x); } count++; }...
main.c: In function 'main': main.c:8:13: error: redeclaration of 'c' with no linkage 8 | int c,cter; | ^ main.c:5:17: note: previous declaration of 'c' with type 'int' 5 | int a,b,c; | ^
s701626823
p00137
C
#include<cstdio> int main() { int i,n,a,c[10]; scanf("%d",&n); for(i=0;i<n;i++) scanf("%d",&c[i]); for(i=0;i<n;i++) { printf("Case %d:\n",i+1); for(a=0;a<10;a++) { printf("%d\n",c[i]=(c[i]*c[i])/100%10000); } } return 0; }
main.c:1:9: fatal error: cstdio: No such file or directory 1 | #include<cstdio> | ^~~~~~~~ compilation terminated.
s292629428
p00137
C++
main(i,j,n,s){ for(scanf("%d",&n);i<=n;i++){ scanf("%d",&s); printf("Case %d:\n",i); for(j=0;j<10;j++) printf("%d\n",s=(s*s)/100%10000); } exit(0); }
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token 1 | main(i,j,n,s){ | ^
s876110471
p00137
C++
#include "stdio.h" int main(){ int i,j,x; int n,N; scanf("%d\n",&N); char str[9]; for(x=1;x<=N;x++){ scanf("%d\n",&n); printf("Case %d:\n",x); for(i=0;i<10;i++){ sprintf(str,"%08d",n*n); str[6] = 0; n = atoi(str+2); printf("%d\n",n); } } return 0; }
a.cc: In function 'int main()': a.cc:14:29: error: 'atoi' was not declared in this scope 14 | n = atoi(str+2); | ^~~~
s619910198
p00137
C++
include <cstdio> int main() { int n; scanf("%d", &n); for (int dataset = 1; dataset <= n; ++dataset) { int s; scanf("%d", &s); printf("Case %d:\n", dataset); for (int i = 0; i < 10; ++i) { s = s * s; s /= 100; s %= 10000; printf("%d\n", s); } } return 0; }
a.cc:1:1: error: 'include' does not name a type 1 | include <cstdio> | ^~~~~~~
s894975285
p00137
C++
#include <iostream> #include <cstdlib> using namespace std; int main(void){ int n,s; scanf("%d",&n); for(int a=1;a<=n;a++){ scanf("%d",&s); printf("Case %d:\n",a); for(int i=0;i<10;i++){ char ss[8],sss[4]; int rank=0; s=s*s; if(s>=100)rank=1; if(s>=1000)rank=2; if(s>=10000)rank=3; if(s>=...
a.cc: In function 'int main()': a.cc:22:25: error: 'itoa' was not declared in this scope 22 | itoa(s,ss,10); | ^~~~
s532982145
p00137
C++
#include <iostream> #include <cstdlib> #include <cstring> #include <cstdio> using namespace std; int main(void){ int n,s; scanf("%d",&n); for(int a=1;a<=n;a++){ scanf("%d",&s); printf("Case %d:\n",a); for(int i=0;i<10;i++){ char ss[8],sss[4]; int rank=0; s=s*s; if(s>=100)rank=1; if(s>=1000)ra...
a.cc: In function 'int main()': a.cc:25:25: error: 'itoa' was not declared in this scope 25 | itoa(s,ss,10); | ^~~~
s723947797
p00137
C++
#include<vector> #include<map> #include<cstring> using namespace std; #define rep(i,n) for(int i=0;i<n;i++) #define REP(n) rep(i,n) #define all(n) n.begin(),n.end() int main() { int n; cin >> n; rep(k,n) { int r; cout << "Case " << k+1 << ":" << endl; cin >> r; REP(10) ...
a.cc: In function 'int main()': a.cc:12:12: error: 'cin' was not declared in this scope 12 | int n; cin >> n; | ^~~ a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 3 | #include<cstring> +++ |+#include <iostream> 4 |...
s575510365
p00137
C++
import java.util.Scanner; public class Main { public static void main(String arg[]) { Scanner sc = new Scanner(System.in); int n=sc.nextInt(); int ca=1; while(n-->0) { System.out.println("Case "+ca+":"); int x = sc.nextInt(); for(int i=0; i<10; i++) { x*=x; String str = String.valueOf(x...
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 | ^~~~~~
s158667303
p00137
C++
i,t;main(k){for(;t=~scanf("%d",&k);)if(i--)for(printf("Case %d:\n",~i),t=9;printf("%d\n",k=k*k/100%10000),t--;);}
a.cc:1:1: error: 'i' does not name a type 1 | i,t;main(k){for(;t=~scanf("%d",&k);)if(i--)for(printf("Case %d:\n",~i),t=9;printf("%d\n",k=k*k/100%10000),t--;);} | ^ a.cc:1:9: error: expected constructor, destructor, or type conversion before '(' token 1 | i,t;main(k){for(;t=~scanf("%d",&k);)if(i--)for(prin...
s952839921
p00138
Java
import java.util.*; public class Main { int i,runner; String time; Runner timeArray[] = new Runner[24]; int flag[] = new int[timeArray.length]; Runner subArray[] = new Runner[timeArray.length]; void doIt(){ Scanner sc = new Scanner(System.in); for(i = 0; i < timeArray.length; i ++ ){ runner = sc.nextInt(...
Main.java:48: error: reached end of file while parsing } ^ 1 error
s154594728
p00138
Java
import java.lang.reflect.Array; import java.util.*; public class Main { race[] raceArray = new race[8]; race[] raceArrays = new race[6]; void doIt(){ String a, b; int p = 0; Scanner sc = new Scanner(System.in); for(int m = 0; m < 3; m++){ for(int i = 0; i < 8; i++){ a = sc.next(); b = ...
Main.java:36: error: cannot find symbol new AOJ_0138().doIt(); ^ symbol: class AOJ_0138 location: class Main 1 error
s929827559
p00138
Java
import java.lang.reflect.Array; import java.util.*; import SDkadai.SortExample.Person; public class AOJ_0138 { race[] raceArray = new race[8]; race[] raceArrays = new race[6]; void doIt(){ String a, b; int p = 0; Scanner sc = new Scanner(System.in); for(int m = 0; m < 3; m++){ for(int i = 0; ...
Main.java:6: error: class AOJ_0138 is public, should be declared in a file named AOJ_0138.java public class AOJ_0138 { ^ Main.java:4: error: package SDkadai.SortExample does not exist import SDkadai.SortExample.Person; ^ 2 errors
s059090363
p00138
Java
import java.lang.reflect.Array; import java.util.*; public class AOJ_0138 { race[] raceArray = new race[8]; race[] raceArrays = new race[6]; void doIt(){ String a, b; int p = 0; Scanner sc = new Scanner(System.in); for(int m = 0; m < 3; m++){ for(int i = 0; i < 8; i++){ a = sc.next(); ...
Main.java:4: error: class AOJ_0138 is public, should be declared in a file named AOJ_0138.java public class AOJ_0138 { ^ 1 error
s153113172
p00138
Java
import java.util.Arrays; import java.util.Scanner; class Player implements Comparable<Player>{ int num; double time; public Player(int num,double time){ this.num=num; this.time=time; } @Override public String toString(){ return num+" "+time; } @Override public int compareTo(Player p){ return new Doub...
Main.java:1: error: illegal character: '\u0008' import java.util.Arrays; ^ Main.java:1: error: class, interface, enum, or record expected import java.util.Arrays; ^ Main.java:2: error: class, interface, enum, or record expected import java.util.Scanner; ^ 3 errors
s979621087
p00138
Java
import java.util.Arrays; import java.util.Scanner; class Player implements Comparable<Player>{ int num; double time; public Player(int num,double time){ this.num=num; this.time=time; } @Override public String toString(){ return num+" "+time; } @Override public int compareTo(Player p){ return new Doub...
Main.java:1: error: illegal character: '\u0008' import java.util.Arrays; ^ Main.java:1: error: class, interface, enum, or record expected import java.util.Arrays; ^ Main.java:2: error: class, interface, enum, or record expected import java.util.Scanner; ^ 3 errors
s022262235
p00138
Java
import java.util.*; public class Main { void doIt(){ Scanner sc = new Scanner(System.in); Person pa[][] = new Person[3][8]; Person pa1[] = new Person[24]; for(int i = 0;i < 3;i++){ for(int k = 0;k < 8;k++){ pa[i][k] = new Person(sc.nextInt(), sc.nextDouble()); pa1[i * 8 + k] = pa[i][k]; } Arra...
Main.java:36: error: double cannot be dereferenced return time.compareTo(p.time); ^ 1 error
s600623905
p00138
Java
import java.util.Arrays; import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int[] Upper = new int[3]; int[][] t= new int[3][8]; Person[] person = new Person[24]; for(int i=0;i<3;i++){ for(int k=0;k<8;k++){ person[i*8+k] = new person(...
Main.java:12: error: cannot find symbol person[i*8+k] = new person(i,sc.nextInt(),sc.next()); ^ symbol: class person location: class Main Main.java:13: error: incompatible types: Person cannot be converted to int t[i][k] = person[i*8+k]; ^ 2 errors
s984408092
p00138
Java
import java.util.*; class sample { public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); Player[] person = new Player[24]; int[][] rank = new int[3][8]; int[] cnt = new int[3]; for(int i = 0;i < 3;i++){ for(int j...
Main.java:12: error: non-static variable this cannot be referenced from a static context person[i*8+j] = new Player(i,sc.nextInt(),sc.next()); ^ 1 error
s413644589
p00138
Java
import java.util.Arrays; import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); Player[] winner = new Player[6]; Player[][] r = new Player[3][8]; for(int i=0;i<3;i++){ for(int j=0;j<8;j++){r[i][j]=n...
Main.java:36: error: reached end of file while parsing } ^ 1 error
s794368738
p00138
Java
import java.util.Arrays; import java.util.Scanner; public class main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); player player1[] = new player[7]; player player2[] = new player[7]; player player3[] = new player[7]; for(int i=0; i<7; i++)player1[i] = new player(sc.nextI...
Main.java:3: error: class main is public, should be declared in a file named main.java public class main{ ^ Main.java:55: warning: [removal] Double(double) in Double has been deprecated and marked for removal return new Double(record).compareTo(o.record); ^ 1 error 1 warning
s609652330
p00138
Java
import java.util.Arrays; import java.util.Scanner; public class main { public void doIt(){ Scanner sc = new Scanner(System.in); Person [][] personArray = new Person[3][8]; for(int i = 0; i < 3; i++){ for(int j = 0; j < 8; j++){ int number = sc.nextInt(); String time = sc.next(); personArray[i][j]...
Main.java:4: error: class main is public, should be declared in a file named main.java public class main { ^ 1 error
s424119801
p00138
Java
import java.util.Arrays; import java.util.Scanner; public class main { public void doIt(){ Scanner sc = new Scanner(System.in); Person [][] personArray = new Person[3][8]; for(int i = 0; i < 3; i++){ for(int j = 0; j < 8; j++){ int number = sc.nextInt(); String time = sc.next(); personArray[i][j]...
Main.java:4: error: class main is public, should be declared in a file named main.java public class main { ^ 1 error
s515288420
p00138
Java
import java.util.Arrays; import java.util.Scanner; public class main { public void doIt(){ Scanner sc = new Scanner(System.in); Person [][] personArray = new Person[3][8]; for(int i = 0; i < 3; i++){ for(int j = 0; j < 8; j++){ int number = sc.nextInt(); String time = sc.next(); personArray[i][j]...
Main.java:4: error: class main is public, should be declared in a file named main.java public class main { ^ 1 error
s534362749
p00138
Java
public class Main { void doIt(){ Runner[] runner = new Runner[8];//????????\???????????? Runner[] loser = new Runner[18];//?????????3?????\????????\???????????? Scanner sc = new Scanner(System.in); int c = 0;//loser????¨???¶??¨ int num; String time; for(int pare = 0; pare < 3; pare++){ for(int run = 0...
Main.java:5: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:5: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:15: error: cannot find symbol ...
s564394428
p00138
Java
public class Main { void doIt(){ Runner[] runner = new Runner[8];//????????\???????????? Runner[] winner = new Runner[6];//????????????1?????¨???????????\?????? Runner[] loser = new Runner[18];//?????????3?????\????????\???????????? Scanner sc = new Scanner(System.in); int l = 0, w = 0;//loser,winner????¨???...
Main.java:6: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:6: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:16: error: cannot find symbol ...
s358975602
p00138
Java
public class Main { Runner[] runner = new Runner[8];//????????\???????????? Runner[] winner = new Runner[6];//????????????1?????¨???????????\?????? Runner[] loser = new Runner[18];//?????????3?????\????????\???????????? void doIt(){ Scanner sc = new Scanner(System.in); int l = 0, w = 0;//loser,winner????¨???¶??...
Main.java:6: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:6: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:16: error: cannot find symbol ...
s699203755
p00138
Java
import java.util.Arrays; import java.util.Scanner; public class Main { Scanner sc = new Scanner(System.in); Person [][] personArray = new Person[3][8]; Person [] nextwinner = new Person[18]; int k = 0; public void doIt(){ for(int i = 0; i < 3; i++){ for(int j = 0; j < 8; j++){ personArray[i][j] = new Per...
Main.java:34: error: cannot find symbol Main().doIt(); ^ symbol: method Main() location: class Main 1 error
s057103241
p00138
Java
public class Main { Runner[] runner = new Runner[8];//????????\???????????? Runner[] winner = new Runner[6];//????????????1?????¨???????????\?????? Runner[] loser = new Runner[18];//?????????3?????\????????\???????????? void doIt(){ Scanner sc = new Scanner(System.in); int l = 0, w = 0;//loser,winner????¨???¶??...
Main.java:6: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:6: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:16: error: cannot find symbol ...
s052003899
p00138
Java
import java.util.*; public class Main { public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc = new Scanner(System.in); Person[] p = new Person[8]; Person[] nizi = new Person[18]; for(int i= 0; i < 3; i++){ for(int j = 0; j < 8; j++){ int no =...
Main.java:14: error: non-static variable this cannot be referenced from a static context p[j] = new Person(no,result); ^ 1 error
s006039904
p00138
Java
import java.util.*; public class Main { void doIt(){ Scanner sc = new Scanner(System.in); Person pa[] = new Person[24]; int cnt = 0; for(int i = 0;i < 3;i++){ for(int k = 0;k < 8;k++){ pa[i][k] = new Person(sc.nextInt(), sc.nextDouble(), true); } Arrays.sort(pa, i * 8, i * 8 + 7); for(int k = 0...
Main.java:9: error: array required, but Main.Person found pa[i][k] = new Person(sc.nextInt(), sc.nextDouble(), true); ^ Main.java:19: error: cannot find symbol if(pa1[i].flag == true){ ^ symbol: variable pa1 location: class Main 2 errors
s347751863
p00138
Java
def main if true then fh=STDIN else fh=open("in1_0138.txt") end rec=[] while fh.gets do f = $_.chomp.split id=f[0].to_i tm=f[1].to_f rec.push([id, tm]) end ans=[] g1=rec[0..7].sort{|a,b| a[1]<=>b[1]} g2=rec[8..15].sort{|a,b| a[1]<=>b[1]} g3=rec[16..23].sort{|a,b| a[1]<=>b[1]...
Main.java:1: error: class, interface, enum, or record expected def main ^ 1 error
s689026189
p00138
Java
import java.util.*; import static java.lang.Math.*; import static java.lang.System.out; public class Main { Scanner sc = new Scanner(System.in); public static void main(String[] args) { new Main().AOJ0138(); } void AOJ0138(){ // Track and Field Competition Time138[] times1st = new Time138[8]; Time138[] tim...
Main.java:143: error: method does not override or implement a method from a supertype @Override ^ 1 error
s683581588
p00138
Java
import java.util.*; import static java.lang.Math.*; import static java.lang.System.out; public class Main { Scanner sc = new Scanner(System.in); public static void main(String[] args) { new Main().AOJ0138(); } void AOJ0138(){ // Track and Field Competition Time138[] times1st = new Time138[8]; Time138[] tim...
Main.java:142: error: method does not override or implement a method from a supertype @Override ^ 1 error
s959446405
p00138
Java
import java.util.*; public class Main { Scanner s = new Scanner(System.in); void doIt(){ // 自作クラス(Person)オブジェクトの並べ替え Person []personone = new Person[8]; Person []result = new Person[8]; Person []three = new Person[6]; for(int i=0; i<8; i++){ personone[i] = new Person(s.nextInt(), s.nextDouble());...
Main.java:42: error: cannot find symbol new Aizu0138().doIt(); ^ symbol: class Aizu0138 location: class Main 1 error
s513223296
p00138
Java
import java.util.Arrays; import java.util.Scanner; public class AOJ0138 { static class time implements Comparable<time>{ int num; double numtime; public time(int num, double numtime) { this.num = num; this.numtime = numtime; } @Override public int compareTo(time o) { if(o.numtime-numtime < 0) ret...
Main.java:4: error: class AOJ0138 is public, should be declared in a file named AOJ0138.java public class AOJ0138 { ^ 1 error
s310098834
p00138
Java
import java.util.Arrays; import java.util.Scanner; public class AOJ0138 { static class time implements Comparable<time>{ int num; double numtime; public time(int num, double numtime) { this.num = num; this.numtime = numtime; } @Override public int compareTo(time o) { if(o.numtime-numtime < 0) ret...
Main.java:4: error: class AOJ0138 is public, should be declared in a file named AOJ0138.java public class AOJ0138 { ^ 1 error
s708046035
p00138
C
#include<vector> #include<list> #include<algorithm> #include<iostream> #include<string> #include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> using namespace std; int main(){ int h,i,j; int n[24]; double v[24]; for(i=0;i<3;i++) for(j=0;j<8;j++) cin>>n[8*i+j]>>v[8*i+j]; for(i=0;i<3;i++...
main.c:1:9: fatal error: vector: No such file or directory 1 | #include<vector> | ^~~~~~~~ compilation terminated.
s616959624
p00138
C
#define _CRT_SECURE_NO_WARNINGS #define _USE_MATH_DEFINES #include <cfloat> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <iostream> #include <memory> #include <string> #include <algorithm> #include <complex> #include <list> #include <map> #inclu...
main.c:4:10: fatal error: cfloat: No such file or directory 4 | #include <cfloat> | ^~~~~~~~ compilation terminated.
s485308934
p00138
C++
//Name: Track and Field Competition //Level: 1 //Category: やるだけ //Note: /** */ #include <iostream> #include <vector> using namespace std; void calc(vector<pair<double,int>> &v) { sort(begin(v), end(v)); cout << v[0].second << ' ' << v[0].first << endl; cout << v[1].second << ' ' << v[1].first << endl; ...
a.cc: In function 'void calc(std::vector<std::pair<double, int> >&)': a.cc:14:5: error: 'sort' was not declared in this scope; did you mean 'short'? 14 | sort(begin(v), end(v)); | ^~~~ | short
s520810081
p00138
C++
#include<stdio.h> #include<iostream> using namespace std; struct ply{int cl;int nu;int m;int s;int A;}; int main() { ply NUM[4][25],M1,M2,M3,T; for(int ii=0;ii<3;ii++) { for(int i=0;i<8;i++) { NUM[ii][i].cl=ii; scanf("%d %d.%d",&NUM[ii][i].nu,&NUM[ii][i].m,&NUM[ii][i].s); NUM[ii][i].A=100*NUM[ii][i].m+NUM[...
a.cc: In function 'int main()': a.cc:35:4: error: 'M' was not declared in this scope 35 | if(M.s/10>0)cout<<M3.nu<<" "<<M3.m<<"."<<M3.s<<endl; | ^
s084745660
p00138
C++
#include<stdio.h> #include<iostream> using namespace std; struct ply{int cl;int nu;int m;int s;int A;}; int main() { ply NUM[4][25],M1,M2,M3,T; for(int ii=0;ii<3;ii++) { for(int i=0;i<8;i++) { NUM[ii][i].cl=ii; scanf("%d %d.%d",&NUM[ii][i].nu,&NUM[ii][i].m,&NUM[ii][i].s); NUM[ii][i].A=100*NUM[ii][i].m+NUM[...
a.cc: In function 'int main()': a.cc:35:4: error: 'M' was not declared in this scope 35 | if(M.s/10>0)cout<<M3.nu<<" "<<M3.m<<"."<<M3.s<<endl; | ^
s347529155
p00138
C++
import java.util.Arrays; import java.util.Scanner; class Player implements Comparable<Player>{ int num; double time; public Player(int num,double time){ this.num=num; this.time=time; } @Override public String toString(){ return num+" "+time; } @Override public int compareTo(Player p){ return new Doub...
a.cc:11:9: error: stray '@' in program 11 | @Override | ^ a.cc:15:9: error: stray '@' in program 15 | @Override | ^ a.cc:2:1: error: 'import' does not name a type 2 | import java.util.Arrays; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodul...
s493132393
p00138
C++
#include <iostream> #include <functional> #include <vector> #include <cstdio> using namespace std; class Player{ public: int number; double time; Player(){ number = 0; time = 0; } bool operator<( const Player& lhs ) const{ return time < lhs.time; } bool operator>( const Player& lhs ) const{ return ...
a.cc: In function 'int main(int, const char**)': a.cc:46:9: error: 'sort' was not declared in this scope; did you mean 'short'? 46 | sort( race1.begin(), race1.end(), greater<Player>() ); | ^~~~ | short
s608155897
p00138
C++
#include <iostream> #include <map> #include <vector> using namespace std; int main(){ map<double, int> n_t; int race = 3; int num; double t; vector<double> rank, all; while( race-- > 0 ){ for( int i = 0; i < 8; i++ ){ cin >> num >> t; n_t[t] = num; rank.push_back(t); } sort(rank.begin(), rank.end()...
a.cc: In function 'int main()': a.cc:17:17: error: 'sort' was not declared in this scope; did you mean 'short'? 17 | sort(rank.begin(), rank.end()); | ^~~~ | short a.cc:29:9: error: 'sort' was not declared in this scope; did you mean 'short'? 29 | ...
s083541076
p00139
Java
public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); while (n-- > 0) { String snake = sc.next(); if (snake.indexOf('#') > 0 && snake.charAt(0) == '>' && snake.charAt(1) == '\'' && snake.charAt(snake.length() - 1) == '~') ...
Main.java:1: error: unnamed classes are a preview feature and are disabled by default. public static void main(String[] args) { ^ (use --enable-preview to enable unnamed classes) Main.java:20: error: class, interface, enum, or record expected } ^ 2 errors