submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s385112133 | 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: In function 'int main()':
a.cc:10:16: error: reference to 'min' is ambiguous
10 | if(a < min) min = a;
| ^~~
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_b... |
s051854135 | 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;
}
cout << max - min << endl;
}
| a.cc: In function 'int main()':
a.cc:10:16: error: reference to 'min' is ambiguous
10 | if(a < min) min = a;
| ^~~
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_b... |
s369010327 | p00046 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
double n;
vector<double> vec;
while (cin >> n){
vec.push_back();
}
sort(vec.begin(), vec.end());
double ans = vec.back() - vec.front();
cout << fixed << setprecision(3) << ans << endl;
}
| a.cc: In function 'int main()':
a.cc:8:18: error: no matching function for call to 'std::vector<double>::push_back()'
8 | vec.push_back();
| ~~~~~~~~~~~~~^~
In file included from /usr/include/c++/14/vector:66,
from /usr/include/c++/14/functional:64,
from /usr/include/... |
s515777431 | p00046 | C++ | #include<iostream.h>
int main(){double l,m,n=1e5;for(;cin>>l;m<l?m=l:l,n>l?n=l:l);cout<<m-n<<endl;} | a.cc:1:9: fatal error: iostream.h: No such file or directory
1 | #include<iostream.h>
| ^~~~~~~~~~~~
compilation terminated.
|
s469387893 | p00046 | C++ | main(){
double max=0,min=1e9,h;
while(~scanf("%lf",&h)){
if(max<h) max=h;
if(min>h) min=h;
}
printf("%f\n",max-min);
exit(0);
} | a.cc:1:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
1 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:3:16: error: 'scanf' was not declared in this scope
3 | while(~scanf("%lf",&h)){
| ^~~~~
a.cc:7:9: error: 'printf' was not declared in ... |
s818446578 | p00046 | C++ | #include <stdio.h>
#include <vector>
using namespace std;
int main(){
vector<double> h;
double n;
while( scanf("%lf", &n) != EOF ){
h.push_back(n);
}
sort( h.begin() , h.end() );
int i = h.size()-1;
printf("%.1f\n", h[i]-h[0]);
return 0;
} | a.cc: In function 'int main()':
a.cc:12:9: error: 'sort' was not declared in this scope; did you mean 'short'?
12 | sort( h.begin() , h.end() );
| ^~~~
| short
|
s140035051 | p00046 | C++ | #include <iostream>
#include <cstdio>
int main(){
double i=1e+64,a=0,t;
while(std::cin>>t){
if(t<i)i=t;
if(t>a)a=t;
}
printf("%f\n", maxi-mini);
} | a.cc: In function 'int main()':
a.cc:9:24: error: 'maxi' was not declared in this scope
9 | printf("%f\n", maxi-mini);
| ^~~~
a.cc:9:29: error: 'mini' was not declared in this scope
9 | printf("%f\n", maxi-mini);
| ^~~~
|
s858463222 | p00046 | C++ | #include <cstdio>
#include <cstring>
#include <algorithm>
#include <string>
#include <cmath>
#include <stack>
#include <vector>
#include <map>
#include <set>
#include <iostream>
using namespace std;
int main()
{
double ma = DBL_MIN;
double mi = DBL_MAX;
double al;
while (scanf("%lf", &al) != EOF)
{
if (al > ... | a.cc: In function 'int main()':
a.cc:18:21: error: 'DBL_MIN' was not declared in this scope
18 | double ma = DBL_MIN;
| ^~~~~~~
a.cc:11:1: note: 'DBL_MIN' is defined in header '<cfloat>'; this is probably fixable by adding '#include <cfloat>'
10 | #include <iostream>
+++ |+#inc... |
s540236445 | p00046 | C++ | #include <cstdio>
#include <cstring>
#include <algorithm>
#include <string>
#include <cmath>
#include <stack>
#include <vector>
#include <map>
#include <set>
#include <iostream>
#include <climits>
using namespace std;
int main()
{
double ma = DBL_MIN;
double mi = DBL_MAX;
double al;
while (scanf("%lf", &al) != ... | a.cc: In function 'int main()':
a.cc:19:21: error: 'DBL_MIN' was not declared in this scope
19 | double ma = DBL_MIN;
| ^~~~~~~
a.cc:12:1: note: 'DBL_MIN' is defined in header '<cfloat>'; this is probably fixable by adding '#include <cfloat>'
11 | #include <climits>
+++ |+#incl... |
s944374333 | p00046 | C++ | import java.util.*;
public class Main {
static Scanner sc = new Scanner(System.in);
public static void main(String args[]) {
ArrayList<Double> al = new ArrayList<Double>();
while(sc.hasNext()) {
al.add(sc.nextDouble());
}
System.out.println(Collections.max(al) - Collections.min(al));
}
} | 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 {
| ^~~~~~
|
s855627101 | p00046 | C++ | #include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
int main(){
double xmax=0,xmin=INT_MAX,ans,n[100000];
int i=0;
while(cin >> n[i]){
xmax=max(xmax,n[i]);
xmin=min(xmin,n[i]);
i++;
}
cout << xmax-xmin << endl;
} | a.cc: In function 'int main()':
a.cc:7:22: error: 'INT_MAX' was not declared in this scope
7 | double xmax=0,xmin=INT_MAX,ans,n[100000];
| ^~~~~~~
a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
3 | #include<algorit... |
s597258394 | p00046 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main(){
vector<double> height;
double tmp;
while(cin >> tmp){
height.push_back(tmp);
}
sort(height.begin(), height.end());
double min;
double max;
min = height[0];
max = height[height.size()-1];
cout << ... | a.cc: In function 'int main()':
a.cc:13:5: error: 'sort' was not declared in this scope; did you mean 'short'?
13 | sort(height.begin(), height.end());
| ^~~~
| short
|
s713563996 | p00046 | C++ | #include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
using namespace std;
double abs( double n )
{
if ( n < 0 )
{
... | a.cc: In function 'int main()':
a.cc:43:20: error: call of overloaded 'abs(double)' is ambiguous
43 | cout << abs( *height.begin() - *height.rbegin() ) << endl;
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/cstdlib:79,
from /usr/i... |
s727101329 | p00046 | C++ | #include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
using namespace std;
double abs( double n )
{
if ( n < 0 )
{
... | a.cc: In function 'int main()':
a.cc:43:20: error: call of overloaded 'abs(double)' is ambiguous
43 | cout << abs( *height.begin() - *height.rbegin() ) << endl;
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/cstdlib:79,
from /usr/i... |
s672641443 | p00046 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
//0046
int main(){
double h;
vector<double> height;
while(cin >> h){
if(cin.eof())break;
height.push_back(h);
}
sort(height.begin(),height.end());
double diff = height[height.back()] - height[height.front()];
cout << diff << ... | a.cc: In function 'int main()':
a.cc:19:30: error: expected '}' at end of input
19 | cout << diff << endl;
| ^
a.cc:8:11: note: to match this '{'
8 | int main(){
| ^
|
s707106935 | p00046 | C++ | #include <iostream>
using namespace std;
int main(int argc, char **argv)
{
double max, min, tmp;
cin >> max;
min = max;
while(cin >> tmp){
if(max < tmp){
max = tmp;
} else (tmp < min){
min = tmp;
}
}
cout << (double)(max - min... | a.cc: In function 'int main(int, char**)':
a.cc:15:27: error: expected ';' before '{' token
15 | } else (tmp < min){
| ^
| ;
|
s021991278 | p00046 | C++ | #include <iostream>
using namespace std;
int main(int argc, char **argv)
{
double max, min, tmp;
cin >> max;
min = max;
while(cin >> tmp){
if(max < tmp){
max = tmp;
} elseif (tmp < min){
min = tmp;
}
}
cout << (double)(max - m... | a.cc: In function 'int main(int, char**)':
a.cc:15:11: error: 'elseif' was not declared in this scope
15 | } elseif (tmp < min){
| ^~~~~~
|
s872172023 | p00046 | C++ | int main(){
double a,tans,hans;
cin >> a;
tans = a;
hans = a;
while(cin>>a){
if(tans>a) tans = a;
if(hans<a) hans = a;
}
cout << hans - tans << endl;
} | a.cc: In function 'int main()':
a.cc:3:3: error: 'cin' was not declared in this scope
3 | cin >> a;
| ^~~
a.cc:10:3: error: 'cout' was not declared in this scope
10 | cout << hans - tans << endl;
| ^~~~
a.cc:10:26: error: 'endl' was not declared in this scope
10 | cout << hans - tans << ... |
s706334134 | p00046 | C++ | #include<iostream>using namespace std;int main(){double a,tans,hans;cin >> a;tans = a; hans = a;while(cin>>a) if(tans>a) tans = a; if(hans<a) hans = a;cout << hans - tans << endl;} | a.cc:1:25: warning: extra tokens at end of #include directive
1 | #include<iostream>using namespace std;int main(){double a,tans,hans;cin >> a;tans = a; hans = a;while(cin>>a) if(tans>a) tans = a; if(hans<a) hans = a;cout << hans - tans << endl;}
| ^~~~~~~~~
a.cc:1:9: fatal error: iost... |
s993410446 | p00046 | C++ | #include<iostream>using namespace std;int main(){double a,tans,hans;cin >> a;tans = a; hans = a;while(cin>>a) if(tans>a) tans = a; if(hans<a) hans = a;cout << hans - tans << endl;} | a.cc:1:25: warning: extra tokens at end of #include directive
1 | #include<iostream>using namespace std;int main(){double a,tans,hans;cin >> a;tans = a; hans = a;while(cin>>a) if(tans>a) tans = a; if(hans<a) hans = a;cout << hans - tans << endl;}
| ^~~~~~~~~
a.cc:1:9: fatal error: iost... |
s146806752 | p00046 | C++ | #include<iostream> using namespace std;int main(){double a,tans,hans;cin >> a;tans = a; hans = a;while(cin>>a) if(tans>a) tans = a; if(hans<a) hans = a;cout << hans - tans << endl;} | a.cc:1:20: warning: extra tokens at end of #include directive
1 | #include<iostream> using namespace std;int main(){double a,tans,hans;cin >> a;tans = a; hans = a;while(cin>>a) if(tans>a) tans = a; if(hans<a) hans = a;cout << hans - tans << endl;}
| ^~~~~
/usr/bin/ld: /usr/lib/gcc/x86_64-li... |
s074524364 | p00046 | C++ | #include <iostream>
#include <algorithm>
#include <queue>
#include <stack>
#include <cmath>
#include <cstdio>
#include <cFloat>
using namespace std;
int main() {
double height = 0, maxNum=0.0, minNum=DBL_MAX;
while(cin>>height){
if(cin.eof()) break;
maxNum = max(maxNum, height);
minNum = min(minNum, height);
... | a.cc:7:10: fatal error: cFloat: No such file or directory
7 | #include <cFloat>
| ^~~~~~~~
compilation terminated.
|
s311235518 | p00046 | C++ | #include <iostream>
#include <algorithm>
#include <queue>
#include <stack>
#include <cmath>
#include <cstdio>
using namespace std;
int main() {
double height = 0, maxNum=0.0, minNum=DBL_MAX;
while(cin>>height){
if(cin.eof()) break;
maxNum = max(maxNum, height);
minNum = min(minNum, height);
}
printf("%.1f\n... | a.cc: In function 'int main()':
a.cc:11:47: error: 'DBL_MAX' was not declared in this scope
11 | double height = 0, maxNum=0.0, minNum=DBL_MAX;
| ^~~~~~~
a.cc:7:1: note: 'DBL_MAX' is defined in header '<cfloat>'; this is probably fixable by adding '#include... |
s521141598 | p00046 | C++ | a#include<iostream>
#include<algorithm>
using namespace std;
int main(){
double x;
cin >> x;
double minimum = x, maximum = x;
while(cin >> x){
minimum = min(minimum, x);
maximum = max(maximum, x);
}
cout << maximum - maximum << endl;
return 0;
} | a.cc:1:2: error: stray '#' in program
1 | a#include<iostream>
| ^
a.cc:1:1: error: 'a' does not name a type
1 | a#include<iostream>
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
from /usr/include/c++/14/algorithm:60,
from a.cc:2:
/usr/includ... |
s576885856 | p00046 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
#include <cstdio>
using namespace std;
int main(){
vector<float> v;
float input;
while(cin >> input){
v.push_back(input);
sort(v.begin(), v.end());
float ans;
vector<float>::iterator ite;
ite = v.end();
ans = *(ite-1) - v.at(0);
}
printf("%... | a.cc: In function 'int main()':
a.cc:19:26: error: 'ans' was not declared in this scope; did you mean 'abs'?
19 | printf("%.1f\n", ans);
| ^~~
| abs
|
s296994287 | p00047 | Java | import java.io.*;
class Main{
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line="";
int[] ball={1,0,0};
while((line=br.readLine())!=null){
char[] c=line.toCharArray();
reverse(c[0],c[2],ball);
}
for(int i=0;i<ball.length;i++){... | Main.java:14: error: ')' or ',' expected
System.out.println(String.valueOf((char)('A'+1));
^
1 error
|
s617362490 | p00047 | Java | import java.io.*;
class Main{
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line="";
int[] ball={1,0,0};
while((line=br.readLine())!=null){
char[] c=line.toCharArray();
reverse(c[0],c[2],ball);
}
for(int i=0;i<ball.length;i++){... | Main.java:21: error: illegal start of expression
private static void reverse(char c1,char c2,final int[] ball){
^
1 error
|
s592313617 | p00047 | Java | package field;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
public class Field {
public static void main(String[] args) {
Map<String, Integer> toIndex = new HashMap<>();
toIndex.put("A", 0);
toIndex.put("B", ... | Main.java:9: error: class Field is public, should be declared in a file named Field.java
public class Field {
^
1 error
|
s869747112 | p00047 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
public class Main {
public static void main(String[] args) {
try {
BufferedReader questionreader = new BufferedReader(new InputStreamReader(System.in));
PrintWriter answerwriter = new ... | Main.java:32: error: cannot find symbol
} catch (FileNotFoundException e) {
^
symbol: class FileNotFoundException
location: class Main
1 error
|
s015300017 | p00047 | Java | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
public class Main {
public static void main(String[... | Main.java:25: error: cannot find symbol
while (questionreader.ready()) {
^
symbol: variable questionreader
location: class Main
Main.java:26: error: cannot find symbol
if ("".equals(question = questionreader.readLine())) break;
^
symbol: variable questionreader
... |
s915376305 | p00047 | Java | package volume00.set0040;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class P0047 {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line = "";
char current = 'A... | Main.java:7: error: class P0047 is public, should be declared in a file named P0047.java
public class P0047 {
^
1 error
|
s091106562 | p00047 | C | #include <stdio.h>
??
int main() {
????????char cup = 'A';
????????char a, b;
????????while (scanf("%c,%c", &a, &b) != EOF) {
????????????????if (a == cup) {
????????????????????????cup = b;
????????????????}
????????????????else if (b == cup) {
????????????????????????cup = a;
????????????????}
????????}
????????print... | main.c:2:1: error: expected identifier or '(' before '?' token
2 | ??
| ^
|
s776394368 | p00047 | C | #include <stdio.h>
??
int main() {
????????char cup = 'A';
????????char a, b;
????????while (scanf("%c,%c", &a, &b) != EOF) {
????????????????if (a == cup) {
????????????????????????cup = b;
????????????????}
????????????????else if (b == cup) {
????????????????????????cup = a;
????????????????}
????????}
????????print... | main.c:2:1: error: expected identifier or '(' before '?' token
2 | ??
| ^
|
s519580290 | p00047 | C | main(b,a){for(b=65;read(0,a,4);)b=b-*a?b-a[2]?b:*a:a[2];exit(!puts(&b));} | main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
1 | main(b,a){for(b=65;read(0,a,4);)b=b-*a?b-a[2]?b:*a:a[2];exit(!puts(&b));}
| ^~~~
main.c: In function 'main':
main.c:1:1: error: type of 'b' defaults to 'int' [-Wimplicit-int]
main.c:1:1: error: type of 'a' defaults to 'int' [-Wimplicit-int]... |
s648142352 | p00047 | C | p;main(s,a,b){for(;~scanf("%X,%X",&a,&b);p=(p<=s?s-p%3:p)s=a+b-20;p=!printf("%c\n",65+p);} | main.c:1:1: warning: data definition has no type or storage class
1 | p;main(s,a,b){for(;~scanf("%X,%X",&a,&b);p=(p<=s?s-p%3:p)s=a+b-20;p=!printf("%c\n",65+p);}
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'p' [-Wimplicit-int]
main.c:1:3: error: return type defaults to 'int' [-Wimplicit-int... |
s796938833 | p00047 | C | #include<stdio.h>
int change(char s){
if(s=='A')return 0;
if(s=='B')return 1;
if(s=='C')return 2;
return -1;
}
main(){
int cup[3]={1,0,0};
char x,y;
int tmp;
while(~scanf("%c,%c",&x,&y)){
tmp=cup[change(x)];
cup[change(x)]=cup[change(y)];
cup[change(y)]=tmxp;
}
if(cup[0])printf("A\n");
... | main.c:8:1: error: return type defaults to 'int' [-Wimplicit-int]
8 | main(){
| ^~~~
main.c: In function 'main':
main.c:15:20: error: 'tmxp' undeclared (first use in this function); did you mean 'tmp'?
15 | cup[change(y)]=tmxp;
| ^~~~
| tmp
main.c:15:20... |
s280067124 | p00047 | C | include <stdio.h>
#include <stdbool.h>
#define conv(c) (int)(c-'A')
void swap(bool *cup1, bool *cup2)
{
bool tmp = *cup1;
*cup1 = *cup2;
*cup2 = tmp;
}
int main()
{
char input_cup[10];
bool cups[3] = {true, false, false};
// while(~scanf("%c,%c", &cup1, &cup2))
while(fgets(input_cup, sizeof in/sizeof ... | main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include <stdio.h>
| ^
main.c: In function 'main':
main.c:19:9: error: implicit declaration of function 'fgets' [-Wimplicit-function-declaration]
19 | while(fgets(input_cup, sizeof in/sizeof in[0], stdin))
... |
s191204808 | p00047 | C | #include <stdio.h>
#include <stdbool.h>
#define conv(c) (int)(c-'A')
void swap(bool *cup1, bool *cup2)
{
bool tmp = *cup1;
*cup1 = *cup2;
*cup2 = tmp;
}
int main()
{
char input_cup[10];
bool cups[3] = {true, false, false};
// while(~scanf("%c,%c", &cup1, &cup2))
while(fgets(input_cup, sizeof in/sizeof... | main.c: In function 'main':
main.c:19:33: error: 'in' undeclared (first use in this function); did you mean 'int'?
19 | while(fgets(input_cup, sizeof in/sizeof in[0], stdin)!=NULL)
| ^~
| int
main.c:19:33: note: each undeclared identifier ... |
s700665667 | p00047 | C | #include <stdio.h>
#include <stdbool.h>
#define conv(c) (int)(c-'A')
void swap(bool *cup1, bool *cup2)
{
bool tmp = *cup1;
*cup1 = *cup2;
*cup2 = tmp;
}
int main()
{
char input_cup[10];
bool cups[3] = {true, false, false};
// while(~scanf("%c,%c", &cup1, &cup2))
while(fgets(input_cup, sizeof input_cup... | main.c: In function 'main':
main.c:20:21: error: 'cup1' undeclared (first use in this function); did you mean 'cups'?
20 | swap(&cups[conv(cup1)], &cups[conv(cup2)]);
| ^~~~
main.c:4:23: note: in definition of macro 'conv'
4 | #define conv(c) (int)(c-'A')
| ... |
s085042829 | p00047 | C | #include <stdio.h>
#include <math.h>
int main(){
char x[1], y[1];
int a[3], z, i, j;
a[0] = 1;
a[1] = a[2] = 0;
while(scanf("%s,%s", &x[0], &y[0]) != EOF){
if(x[0] == 'A') i = 0;
if(x[0] == 'B') i = 1;
if(x[0] == 'C') i = 2;
if(y[0] == 'A') j = 0;
if(y[0] == 'B') j = 1;
if(y[0] == 'C') j = 2;
z = a[... | main.c: In function 'main':
main.c:20:38: error: 'A' undeclared (first use in this function)
20 | if(a[0] == 1) printf("%s\n", A);
| ^
main.c:20:38: note: each undeclared identifier is reported only once for each function it appears in
main.c:21:38: error: 'B' undec... |
s475210331 | p00047 | C++ | #include<iostream>
#include<ios>
using namespace std;
char c='A'm\,a,b;
main()
{
while(~scanf("%c,%c\n",&a,&b))
{
if(a==c)c=b;
}
printf("%c\n",c);
}
| a.cc:4:12: error: stray '\' in program
4 | char c='A'm\,a,b;
| ^
a.cc:4:8: error: unable to find character literal operator 'operator""m' with 'char' argument
4 | char c='A'm\,a,b;
| ^~~~
a.cc:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
5 | ... |
s785076260 | p00047 | C++ | #include<iostream>
using namespace std;
int main(){
int a=1,b=0,c=0,tmp;
char x,y;
while(cin>>x>>y){
if(x=="A"){
if(y=="B"){
tmp = a;
a = b;
b = tmp;
}else{
tmp = a;
a = c;
c = t... | a.cc: In function 'int main()':
a.cc:9:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
9 | if(x=="A"){
| ~^~~~~
a.cc:10:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
10 | if(y=="B"){
| ~^... |
s994916406 | p00047 | C++ | #include<iostream>
#include<string>
using namespace std;
int main() {
int A = 1;
int B = 0;
int C = 0;
while(true){
string s;
cin >> s;
if (s[0]=='A'){
if(s[2]=='B'){
int tmp;
tmp = B;
B = A;
A = tmp;
... | a.cc: In function 'int main()':
a.cc:61:14: error: 'c' was not declared in this scope
61 | else if (c==1){
| ^
|
s023927650 | p00047 | C++ | #include<iostream>
using namespace std;
int main(){
int A,B,C,x,y,s,t,u;
A=1,B=2,C=3;
while(cin>>x","y){
if((x==A && y==B)||(x==B && y==A)){
s=A;
A=B;
B=z;
}else if((x==B && y==C)||(x==C && y==B)){
t=B;
B=C;
C=t;
}else if((x==C && y==A)||(x==A && y==C)){
u=C;
C=A;
A=u;
}
}
if(A... | a.cc: In function 'int main()':
a.cc:8:21: error: expected ')' before user-defined string literal
8 | while(cin>>x","y){
| ~ ^~~~
| )
a.cc:8:21: error: unable to find string literal operator 'operator""y' with 'const char [2]', 'long unsigned int' arguments
... |
s648216939 | p00047 | C++ | #include<iostream>
#include<string>
using namespace std;
int main() {
int A = 1;
int B = 0;
int C = 0;
string s;
while(cin >> s){
if (s[0]=='A'){
if(s[2]=='B'){
int tmp;
tmp = B;
B = A;
A = tmp;
}
e... | a.cc: In function 'int main()':
a.cc:60:14: error: 'c' was not declared in this scope
60 | else if (c==1){
| ^
|
s060269405 | p00047 | C++ | #include<iostream>
#include<string>
using namespace std;
int main() {
int A = 1;
int B = 0;
int C = 0;
string s;
while(cin >> s){
if (s[0]=='A'){
if(s[2]=='B'){
int tmp;
tmp = B;
B = A;
A = tmp;
}
e... | a.cc: In function 'int main()':
a.cc:60:14: error: 'c' was not declared in this scope
60 | else if (c==1){
| ^
|
s018284878 | p00047 | C++ | #include<iostream>
using namespace std;
int main(){
char x,y,z;
int i,n;
for(i=0;i<=n;++i){
cin >> x >> y;
if (x==A){
z=x;
} else if(y==A){
z=y;
} else {
z=z;
}
} cout << z << endl;
return 0;}
| a.cc: In function 'int main()':
a.cc:9:10: error: 'A' was not declared in this scope
9 | if (x==A){
| ^
|
s174611703 | p00047 | C++ | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
| |
s691641143 | p00047 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
int A,B,C,s,t,u;
string x;
A=1,B=2,C=3;
while(cin>>x){
if((x==(A,B))||(x==(B,A))){
s=A;
A=B;
B=z;
}else if((x==(C,B))||(x==(B,C))){
t=B;
B=C;
C=t;
}else if((x==(A,C))||(x==(C,A))){
u=C;
C=A;
A=u;
}
}
if(A==1)... | a.cc: In function 'int main()':
a.cc:11:22: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int')
11 | if((x==(A,B))||(x==(B,A))){
| ~^~~~~~~
| | |
| | i... |
s972706265 | p00047 | C++ | B,C
A,C
C,B
A,B
C,B | a.cc:1:1: error: 'B' does not name a type
1 | B,C
| ^
|
s040868730 | p00047 | C++ | #include<stdio.h>
int main(){
char x,y,T=A,tmp;
while(scanf("%c,%c",&x,&y)!=EOF{
if(x==T)T=y;
else if(y==T)T=x;
}
printf("%c\n",T);
return 0;
} | a.cc: In function 'int main()':
a.cc:4:12: error: 'A' was not declared in this scope
4 | char x,y,T=A,tmp;
| ^
a.cc:5:32: error: expected ')' before '{' token
5 | while(scanf("%c,%c",&x,&y)!=EOF{
| ~ ^
|
s044741645 | p00047 | C++ | #include<iostream>
#include<algorithm>
#include<cstdio>
using namespace std;
int main(){
int a,b;
char cup1,cup2,abc[2][3]={{'A','B','C'},{'1','0','0'}};
while(scanf("%c,%c",&cup1,&cup2)!EOF){
for(int i=0;i<3;i++){
if(abc[0][i]==cup1) a=i;
if(abc[0][i]==cup2) b=i;
}
... | a.cc: In function 'int main()':
a.cc:8:37: error: expected ')' before '!' token
8 | while(scanf("%c,%c",&cup1,&cup2)!EOF){
| ~ ^
| )
a.cc:8:41: error: expected ';' before ')' token
8 | while(scanf("%c,%c",&cup1,&cup2)!EOF)... |
s774625827 | p00047 | C++ | #include<iostream>
#include<algorithm>
#include<cstdio>
using namespace std;
int main(){
int cup[3] = {1};
int x, y;
while (scanf(" %d,%d", &x, &y) != EOF)
{
swap(cup[a - 'A'], cup[b - 'A']);
}
for (int i = 0; i < 3; i++)
{
if (cup[i] > 0)
{
printf("%c\n",... | a.cc: In function 'int main()':
a.cc:10:18: error: 'a' was not declared in this scope
10 | swap(cup[a - 'A'], cup[b - 'A']);
| ^
a.cc:10:32: error: 'b' was not declared in this scope
10 | swap(cup[a - 'A'], cup[b - 'A']);
| ^
|
s510459249 | p00047 | C++ | #include <iostream>
using namespace std;
int main(){
int i, j, tmp, a[3]={1, 0, 0};
char s1, s2, kanma;
while(1){
cin>>s1>>kanma>>s2;
if(cin.eof())break;
if(s1=='A'||s2=='A'){
i=0;
if(s1=='B'||s2=='B')
j=1;
else
j=2;
}
else if(s1=='B'||s2=='B'){
i=1;
if(s1=='C'||s2=='C')
j... | a.cc: In function 'int main()':
a.cc:47:18: error: expected '}' at end of input
47 | return 0;
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s865501603 | p00047 | C++ | #include<iostream>
#include<algorithm>
#include<string>
using namespace std;
int main()
{
char x, y;
string str;
int posi = 1;
while (cin >> str) {
x = str[0];
y = str[2];
(char)x = min((int)x, (int)y);
(char)y = max((int)x, (int)y);
if (posi == 1) {
if (x == 'A' && y == 'B')posi = 2;
else if (x =... | a.cc: In function 'int main()':
a.cc:14:17: error: lvalue required as left operand of assignment
14 | (char)x = min((int)x, (int)y);
| ^~~~~~~
a.cc:15:17: error: lvalue required as left operand of assignment
15 | (char)y = max((int)x, (int)y);
| ... |
s838106099 | p00047 | C++ | #include<iostream>
#include<algorithm>
#include<string>
using namespace std;
int main()
{
char x, y;
string str;
int posi = 1;
while (cin >> str) {
x = str[0];
y = str[2];
(char)x = min((int)x, (int)y);
//(char)y = max((int)x, (int)y);
if (posi == 1) {
if (x == 'A' && y == 'B')posi = 2;
else if ... | a.cc: In function 'int main()':
a.cc:14:17: error: lvalue required as left operand of assignment
14 | (char)x = min((int)x, (int)y);
| ^~~~~~~
|
s470665155 | p00047 | C++ | #include<iostream>
#include<algorithm>
#include<map>
using namespace std;
int main(){
map<char, int> cup;
cup['A'] = 1;
cup['B'] = 0;
cup['C'] = 0;
char c1, c2, delim;
while( cin >> c1 >> delim >> c2 ){
swap(cup['c1'] , cup['c2']);
}
if( cup['A'] = 1) cout << A << '?\n';
if( cup['B'] = 1) cout << B << '?\n';... | a.cc:12:26: warning: multi-character character constant [-Wmultichar]
12 | swap(cup['c1'] , cup['c2']);
| ^~~~
a.cc:12:38: warning: multi-character character constant [-Wmultichar]
12 | swap(cup['c1'] , cup['c2']);
| ... |
s433587058 | p00047 | C++ | #include<iostream>
#include<algorithm>
#include<map>
using namespace std;
int main(){
map<char, int> cup;
cup['A'] = 1;
cup['B'] = 0;
cup['C'] = 0;
char c1, c2, delim;
while( cin >> c1 >> delim >> c2 ){
swap(cup['c1'] , cup['c2']);
}
if( cup['A'] == 1) cout << A << '?\n';
if( cup['B'] == 1) cout << B << '?\n... | a.cc:12:26: warning: multi-character character constant [-Wmultichar]
12 | swap(cup['c1'] , cup['c2']);
| ^~~~
a.cc:12:38: warning: multi-character character constant [-Wmultichar]
12 | swap(cup['c1'] , cup['c2']);
| ... |
s110163560 | p00047 | C++ | #include<iostream>
#include<algorithm>
#include<string>
#include<map>
using namespace std;
int main(){
map<string, int> cup;
cup["A"] = 1;
cup["B"] = 0;
cup["C"] = 0;
char c1, c2, delim;
while( cin >> c1 >> delim >> c2 ){
swap(cup["c1"] , cup["c2"]);
}
if(cup["A"] == 1) cout << A << '?\n';
if(cup["B"] == 1) ... | a.cc:15:40: warning: multi-character character constant [-Wmultichar]
15 | if(cup["A"] == 1) cout << A << '?\n';
| ^~~~~
a.cc:16:40: warning: multi-character character constant [-Wmultichar]
16 | if(cup["B"] == 1) cout << B << '?\n';
| ... |
s361323907 | p00047 | C++ | #include<iostream>
#include<algorithm>
#include<string>
#include<map>
using namespace std;
int main(){
map<string, int> cup;
cup["A"] = 1;
cup["B"] = 0;
cup["C"] = 0;
char c1, c2, delim;
while( cin >> c1 >> delim >> c2 ){
swap(cup["c1"] , cup["c2"]);
}
if(cup["A"] == 1) cout << A << '?\n';
if(cup["B"] == 1) ... | a.cc:15:40: warning: multi-character character constant [-Wmultichar]
15 | if(cup["A"] == 1) cout << A << '?\n';
| ^~~~~
a.cc:16:40: warning: multi-character character constant [-Wmultichar]
16 | if(cup["B"] == 1) cout << B << '?\n';
| ... |
s372217765 | p00047 | C++ | #include<iostream>
#include<algorithm>
#include<string>
#include<map>
using namespace std;
int main(){
map<string, int> cup;
cup["A"] = 1;
cup["B"] = 0;
cup["C"] = 0;
string c1, c2;
char delim;
while( cin >> c1 >> delim >> c2 ){
swap(cup["c1"] , cup["c2"]);
}
if(cup["A"] == 1) cout << A << '?\n';
if(cup["B"... | a.cc:16:40: warning: multi-character character constant [-Wmultichar]
16 | if(cup["A"] == 1) cout << A << '?\n';
| ^~~~~
a.cc:17:40: warning: multi-character character constant [-Wmultichar]
17 | if(cup["B"] == 1) cout << B << '?\n';
| ... |
s574786518 | p00047 | C++ | #include<iostream>
#include<algorithm>
#include<string>
#include<map>
using namespace std;
int main(){
map<string, int> cup;
cup["A"] = 1;
cup["B"] = 0;
cup["C"] = 0;
char c1, c2, delim;
while( cin >> c1 >> delim >> c2 ){
swap(cup['c1'] , cup['c2']);
}
if(cup["A"] == 1) cout << "A" << '?\n';
if(cup["B"] == 1... | a.cc:13:26: warning: multi-character character constant [-Wmultichar]
13 | swap(cup['c1'] , cup['c2']);
| ^~~~
a.cc:13:38: warning: multi-character character constant [-Wmultichar]
13 | swap(cup['c1'] , cup['c2']);
| ... |
s890591172 | p00047 | C++ | #include<iostream>
#include<algorithm>
#include<string>
#include<map>
using namespace std;
int main(){
map<string, int> cup;
cup["A"] = 1;
cup["B"] = 0;
cup["C"] = 0;
char c1, c2, delim;
while( cin >> c1 >> delim >> c2 ){
swap(cup["c1"] , cup["c2"]);
}
cout << cup.at(1) << endl;
} | a.cc: In function 'int main()':
a.cc:15:23: error: no matching function for call to 'std::map<std::__cxx11::basic_string<char>, int>::at(int)'
15 | cout << cup.at(1) << endl;
| ~~~~~~^~~
In file included from /usr/include/c++/14/map:63,
from a.cc:4:
/usr/include/c++/14/... |
s425483181 | p00047 | C++ | #include<iostream>
using namespace std;
int main(){
char c1, c2, delim, ball = 'A';
while(cin >> c1 >> delim >> c2){
if(ball == c1) ball == c2;
else if(ball == c2) ball == c1;
}
cout << ans << endl;
} | a.cc: In function 'int main()':
a.cc:9:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
9 | cout << ans << endl;
| ^~~
| abs
|
s330280335 | p00047 | C++ | import sys
def convert(s):
x = 0
if s == "A":
x = 0
elif s == "B":
x = 1
elif s == "C":
x = 2
return x
def main():
A = [0 for i in range(3)]
A[0] = 1
for line in sys.stdin:
B = line.split(",")
B[0] = convert(B[0])
B[1] = B[1].replace("\n... | 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'
|
s044481936 | p00047 | C++ | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
| |
s140036570 | p00047 | C++ | #include<iostream>
#include<string>
using namespace std;
int main()
{
int cup[3] = {1,0,0};
string cupa("A");
string cupb("B");
string cupc("C");
string swapping;
int a = 0;
int b = 100;
while (cin >> swapping){
int temp;
if(swapping[0] == cupa && swapping[2] == cupb || swapping[0] == cu... | a.cc: In function 'int main()':
a.cc:19:20: error: no match for 'operator==' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
19 | if(swapping[0] == cupa && swapping[2] == cupb || swapping[0] == cupb &&... |
s996942165 | p00047 | C++ | #include<iostream>
#include<string>
using namespace std;
int main()
{
int cup[3] = {1,0,0};
string cupab("A,B");
string cupba("B,A");
string cupac("A,C");
string cupca("C,A");
string cupbc("B,C");
string cupcb("C,B");
string swapping;
while (cin >> swapping){
int temp;
if(swapping == cupab... | a.cc:48:2: error: stray '#' in program
48 | }#include<iostream>
| ^
a.cc:48:3: error: 'include' does not name a type
48 | }#include<iostream>
| ^~~~~~~
a.cc:53:5: error: redefinition of 'int main()'
53 | int main()
| ^~~~
a.cc:6:5: note: 'int main()' previously defined here
6 | int... |
s145780911 | p00047 | C++ | #include<bits/stdc++.h>
using namespace std;
#define all(vec) vec.begin(),vec.end()
typedef long long int ll;
typedef pair<int,int> P;
const ll MOD=1000000007;
const ll INF=1000000010;
const ll LINF=4000000000000000010LL;
const int MAX=310;
const double EPS=1e-9;
int dx[4]={0,1,0,-1};
int dy[4]={1,0,-1,0};
int main(){
... | a.cc: In function 'int main()':
a.cc:18:9: error: 'nt' was not declared in this scope; did you mean 'int'?
18 | nt aa,bb;
| ^~
| int
a.cc:20:13: error: 'aa' was not declared in this scope; did you mean 'a'?
20 | aa=0;
| ^~
| a
a.c... |
s710863202 | p00047 | C++ | B,C
A,C
C,B
A,B
C,B | a.cc:1:1: error: 'B' does not name a type
1 | B,C
| ^
|
s776875210 | p00047 | C++ | #include <iostream>
using namespace std;
int main(){
int a[3]={1,0,0},b;char c[3];
while(cin>>c){
b=a[(c[0]-'A')];
a[c[0]-'A']=a[(c[2]-'A')];
a[(c[2]-'A')]=b;
}
for(b=0;i<3;i++)if(a[i])cout<<(char)('A'+i)<<endl;
} | a.cc: In function 'int main()':
a.cc:10:11: error: 'i' was not declared in this scope
10 | for(b=0;i<3;i++)if(a[i])cout<<(char)('A'+i)<<endl;
| ^
|
s360630100 | p00047 | C++ | #include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main(){
char k;
string a="A",b="B",c="C"
int i,j,A=1,B=0,C=0;
while(cin>>i>>k>>j){
if((i =='A' && j=='B')||(i=='B' && j=='A')) swap(A,B);
if((i =='B' && j=='C')||(i=='C' && j=='B')) swap(B,C);
if((i =='A' && j=='C')||(i=='C' && j... | a.cc: In function 'int main()':
a.cc:8:9: error: expected ',' or ';' before 'int'
8 | int i,j,A=1,B=0,C=0;
| ^~~
a.cc:9:20: error: 'i' was not declared in this scope
9 | while(cin>>i>>k>>j){
| ^
a.cc:9:26: error: 'j' was not declared in this scope
9 | ... |
s622920588 | p00047 | C++ | #include <iostream>
using namespace std;
int main()
{
char c[5];
char n[] = "A";
while(cin>>c){
if(c[0]==n[0]) n[0] = c[2];
else if( c[2] == n[0] ) n[0] = c[0];
}
putchar(n[0]);
putcharendl);
return 0;
} | a.cc: In function 'int main()':
a.cc:12:5: error: 'putcharendl' was not declared in this scope; did you mean 'putchar'?
12 | putcharendl);
| ^~~~~~~~~~~
| putchar
|
s727282004 | p00047 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
int a[3];
int main()
{
a[0] = 1;
char c1,c2;
while(cin >> c1){
cin.ignore();
cin >> c2;
swap(a[c1 - 'A'],a[c2 - 'A']);
}
}
for(int i = 0; i < 3; ++i){
if(a[i])cout << (char)('A' + i) << endl;
}
} | a.cc:17:9: error: expected unqualified-id before 'for'
17 | for(int i = 0; i < 3; ++i){
| ^~~
a.cc:17:24: error: 'i' does not name a type
17 | for(int i = 0; i < 3; ++i){
| ^
a.cc:17:31: error: expected unqualified-id before '++' token
17 | for... |
s239297678 | p00047 | C++ | #include<iostream>
using namespace std;
int main(){
string str;
ch n,m;
int a=1,b=0,c=0,d;
while(cin>>str){
n=str[0];m=str[2];
if(n=='A'&&m=='B'){
d=a;a=b;b=d;
}else if(n=='A'&&m=='C'){
d=a;a=c;c=d;
}else if(n=='B'&&m=='A'){
d=b;b=a;a=d;
}else if(n=='B'&&m=='C'){
d=b;b=c;c=d;
}else if(n=='C'... | a.cc: In function 'int main()':
a.cc:5:9: error: 'ch' was not declared in this scope
5 | ch n,m;
| ^~
a.cc:8:17: error: 'n' was not declared in this scope
8 | n=str[0];m=str[2];
| ^
a.cc:8:26: error: 'm' was not declared in this scope
8 | ... |
s724979731 | p00047 | C++ | using namespace std;
int main(){
bool existBall[3] = { 1, 0, 0 };
bool tm;
char a, b;
string s;
while (getline(cin, s), s != "\0"){
a = s[0];
b = s[2];
tm = existBall[b - 'A'];
existBall[b - 'A'] = existBall[a - 'A'];
existBall[a - 'A'] = tm;
}
s = "";
for (int i = 0; i < 3;++i)
if (existBal... | a.cc: In function 'int main()':
a.cc:8:9: error: 'string' was not declared in this scope
8 | string s;
| ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
+++ |+#include <string>
1 | using namespace std;
a.cc:10:2... |
s899849912 | p00048 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(sc.hasNext()){
double x = sc.nextDouble();
System.out.println(x<=48.00?"light fly":x<=51.00?"fly":x<=54.00?"bantam":x<=57.00?"feather":
... | Main.java:11: error: : expected
x<=75.00?"light middle":x<=81.00?"middle":x<=91.00?"light heavy":x>=91.00?"heavy");
^
1 error
|
s592690079 | p00048 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(sc.hasNext()){
double x = sc.nextDouble();
System.out.println(x<=48.00?"light fly":x<=51.00?"fly":x<=54.00?"bantam":x<=57.00?"feather":
... | Main.java:11: error: : expected
x<=75.00?"light middle":x<=81.00?"middle":x<=91.00?"light heavy":x>=91.00?"heavy");
^
1 error
|
s441750758 | p00048 | Java | import java.io.*;
class Main{
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new ImputStreamReader(System.in));
String line="";
double weight;
while((line=br.readLine())!=null){
weight=Double.parseDouble(line);
classOfBoxing(weight);
}
}
private static void classOfBoxin... | Main.java:48: error: reached end of file while parsing
}
^
1 error
|
s475399505 | p00048 | Java | import java.io.*;
class Main{
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new ImputStreamReader(System.in));
String line="";
double weight;
while((line=br.readLine())!=null){
weight=Double.parseDouble(line);
classOfBoxing(weight);
}
}
private static void classOfBoxin... | Main.java:5: error: cannot find symbol
BufferedReader br=new BufferedReader(new ImputStreamReader(System.in));
^
symbol: class ImputStreamReader
location: class Main
1 error
|
s201629817 | p00048 | Java | import java.io.*;
class Main{
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line="";
float weight;
while((line=br.readLine())!=null){
weight=Float.parseFloat(line);
classOfBoxing(weight);
}
}
private static void classOfBoxing(f... | Main.java:15: error: incompatible types: possible lossy conversion from double to float
w=Math.ceil(w);
^
1 error
|
s267343257 | p00048 | Java | import java.io.*;
class Main{
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line="";
float weight;
while((line=br.readLine())!=null){
weight=Float.parseFloat(line);
classOfBoxing(weight);
}
}
private static void classOfBoxing(f... | Main.java:15: error: incompatible types: possible lossy conversion from double to float
w=Math.ceil((double)w);
^
1 error
|
s707263782 | p00048 | Java | import java.io.*;
class Main{
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line="";
d weioubleght;
while((line=br.readLine())!=null){
weight=Double.parseDouble(line);
classOfBoxing(weight);
}
}
private static void classOfBoxin... | Main.java:7: error: cannot find symbol
d weioubleght;
^
symbol: class d
location: class Main
Main.java:9: error: cannot find symbol
weight=Double.parseDouble(line);
^
symbol: variable weight
location: class Main
Main.java:10: error: cannot find symbol
classOfBoxing(weight);
^
symbol: varia... |
s832280614 | p00048 | Java | import java.io.*;
class Main{
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line="";
doubl weight;
while((line=br.readLine())!=null){
weight=Double.parseDouble(line);
classOfBoxing(weight);
}
}
private static void classOfBoxing... | Main.java:7: error: cannot find symbol
doubl weight;
^
symbol: class doubl
location: class Main
1 error
|
s481614471 | p00048 | 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 weight;
while((line=br.readLine())!=null){
weight=Double.parseDouble(line);
classOfBoxing(weight);
}
}
private static void classOfBoxin... | Main.java:27: error: ')' expected
else if((n>57.00 &&n<=60.00){
^
1 error
|
s628015081 | p00048 | 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 weight;
while((line=br.readLine())!=null){
weight=Double.parseDouble(line);
classOfBoxing(weight);
}
}
private static void classOfBoxin... | Main.java:24: error: cannot find symbol
p.println("feather");
^
symbol: variable p
location: class Main
1 error
|
s437001749 | p00048 | Java | import java.util.Scanner;
public enum Main{
LF("light fly"), FL("fly"), BT("bantam"), FE("feather"), LG("light"), LW("light welter"),
WT("welter"), LM("light middle"), MI("middle"), LH("light heavy"), HV("heavy");
private String s;
private BoxingClass(String str) { this.s = str;}
public String toString() { ret... | Main.java:8: error: invalid method declaration; return type required
private BoxingClass(String str) { this.s = str;}
^
1 error
|
s569919183 | p00048 | Java | import java.util.*;public class Main {Scanner sc = new Scanner(System.in);void p(String s){System.out.println(s);}void run(){for(;sc.hasNextDouble();){double d =sc.nextDouble();if(d<=48)p("light fly");else if(d<=51)p("fly");else if(d<=54)p("bantam");else if(d<=57)p("feather");else if(d<=60)p("light");else if(d<=51){p("... | Main.java:1: error: 'else' without 'if'
import java.util.*;public class Main {Scanner sc = new Scanner(System.in);void p(String s){System.out.println(s);}void run(){for(;sc.hasNextDouble();){double d =sc.nextDouble();if(d<=48)p("light fly");else if(d<=51)p("fly");else if(d<=54)p("bantam");else if(d<=57)p("feather");els... |
s678713854 | p00048 | Java | import java.io.*;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws IOException {
String str;
Double wgt;
Scanner in = new Scanner(System.in);
// BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
while ( in.hasNext() ) {
wgt = in.nextDouble... | Main.java:32: error: variable index might not have been initialized
return date[index];
^
1 error
|
s649274562 | p00048 | Java | import java.io.*;
public class Main{
public static void main(String[] args){
BufferedReader reader =new BufferedReader(new InputStreamReader(System.in));
String s;
double n;
try{
while((s=reader.readLine()) !=null){
n=Double.parseDouble(s);
if(n<=48.00){
System.out.println("lightfly");
}
if(... | Main.java:26: error: cannot find symbol
if(n>81.00 &&N<=91.00){System.out.println("light heavy");
^
symbol: variable N
location: class Main
1 error
|
s347525406 | p00048 | Java | import java.io.*;
public class Main{
public static void main(String[] args){
BufferedReader reader =new BufferedReader(new InputStreamReader(System.in));
String s;
double n;
try{
while((s=reader.readLine()) !=null){
n=Double.parseDouble(s);
if(n<=48.00){
System.out.println("lightfly");
}
if(... | Main.java:26: error: cannot find symbol
if(n>81.00 &&N<=91.00){System.out.println("light heavy");
^
symbol: variable N
location: class Main
1 error
|
s882558209 | p00048 | Java | import java.io.*;
public class Main{
public static void main(String[] args){
BufferedReader reader =new BufferedReader(new InputStreamReader(System.in));
String s;
double n;
try{
while((s=reader.readLine()) !=null){
n=Double.parseDouble(s);
if(n<=48.00){
System.out.println("lightfly");
}
if(... | Main.java:26: error: cannot find symbol
if(n>81.00 &&N<=91.00){System.out.println("light heavy");
^
symbol: variable N
location: class Main
1 error
|
s250114650 | p00048 | C | #include<stdio.h>
int main(){
double a;
while(1){
scanf("%lfn", &a);
if(a<=48.00){printf("light fly\n");}
else ifif(a>48.00 && a<=51.00){printf("fly\n");}
else ifif(a>51.00 && a<=54.00){printf("bantam\n");}
else ifif(a>54.00 && a<=57.00){printf("feather\n");}
else ifif(a>57.00 && a<=60.00){pr... | main.c: In function 'main':
main.c:11:8: error: implicit declaration of function 'ifif' [-Wimplicit-function-declaration]
11 | else ifif(a>48.00 && a<=51.00){printf("fly\n");}
| ^~~~
main.c:11:33: error: expected ';' before '{' token
11 | else ifif(a>48.00 && a<=51.00){printf("fly\n");}
| ... |
s891602380 | p00048 | C | #include <stdio.h>
int main(void)
{
double w;
while (scanf("%lf", &w) != EOF){
if (w > 91.00){
printf("heavy\n");
}
else if (w > 81.00){
printf("light heavy\n");
}
else if (w > 75.00){
printf("middle\n");
}
... | main.c: In function 'main':
main.c:43:5: error: expected declaration or statement at end of input
43 | return (0);
| ^~~~~~
|
s244242766 | p00048 | C | include <stdio.h>
int main(void){
double num;
for(;scanf("%lf",&num);){
if(num <= 48.00)
printf("light fly\n");
else if(num <= 51.00)
printf("fly\n");
else if(num <= 54.00)
printf("bantam\n");
else if(num <= 57.00)
printf("feather\... | main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include <stdio.h>
| ^
|
s375232028 | p00048 | C | #include <stdio.h>
int main(void)
{
double kg;
while(scanf("%lf",&kg)!=EOF){
if(kg<=48.00){
kai[nin]="light fly";
}else if(kg<=51.00){printf("fly");
}else if(kg<=54.00){printf("bantam");
}else if(kg<=57.00){printf("feather");
}else if(kg<=60.00){printf("light");
}else if(kg<=64.00){printf("light welte... | main.c: In function 'main':
main.c:9:17: error: 'kai' undeclared (first use in this function)
9 | kai[nin]="light fly";
| ^~~
main.c:9:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:21: error: 'nin' undeclared (first use in t... |
s005889686 | p00048 | C | #include <stdio.h>
int main(void)
{
double kg;
while(scanf("%lf",&kg)!=EOF){
if(kg<=48.00){
kai[nin]="light fly";
}else if(kg<=51.00){printf("fly");
}else if(kg<=54.00){printf("bantam");
}else if(kg<=57.00){printf("feather");
}else if(kg<=60.00){printf("light");
}else if(kg<=64.00){printf("light welte... | main.c: In function 'main':
main.c:9:17: error: 'kai' undeclared (first use in this function)
9 | kai[nin]="light fly";
| ^~~
main.c:9:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:21: error: 'nin' undeclared (first use in t... |
s835387502 | p00048 | C | #include <stdio.h>
int main(void)
{
double kg;
while(scanf("%lf",&kg)!=EOF){
if(kg<=48.00){
kai[nin]="light fly";
}else if(kg<=51.00){printf("fly");
}else if(kg<=54.00){printf("bantam");
}else if(kg<=57.00){printf("feather");
}else if(kg<=60.00){printf("light");
}else if(kg<=64.00){printf("light welter... | main.c: In function 'main':
main.c:8:17: error: 'kai' undeclared (first use in this function)
8 | kai[nin]="light fly";
| ^~~
main.c:8:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:21: error: 'nin' undeclared (first use in t... |
s342607400 | p00048 | C | #include <stdio.h>
main(){
double a;
while(scanf("%d",&a) !=EOF){
if(a<=48) printf("light fly");
else if(a>48&&a<=51) printf("fly");
else if(a>51&&a<=54) printf("bantam");
else if(a>54&&a<=57) printf("frather");
else if(a>57&&a<=60) printf("light");
else if(a>60&&a<=64) printf("light welter"... | main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
2 | main(){
| ^~~~
main.c: In function 'main':
main.c:18:1: error: expected declaration or statement at end of input
18 | }
| ^
|
s388867990 | p00048 | C | main(x){float a;for(;~scanf("%f",&a);)x=a-.1,puts(x<48?"light fly":x<51?"fly":x<54?"bantam":x<57?"feather":x<60?"light":x<64?"light welter":x<69?"welter":x<75?"light middle":x<81?"middle":x<91?"light heavy":"heavy");exit(0):} | main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
1 | main(x){float a;for(;~scanf("%f",&a);)x=a-.1,puts(x<48?"light fly":x<51?"fly":x<54?"bantam":x<57?"feather":x<60?"light":x<64?"light welter":x<69?"welter":x<75?"light middle":x<81?"middle":x<91?"light heavy":"heavy");exit(0):}
| ^~~~
main.c:... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.