submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s676152058 | p00216 | C++ | File Edit Options Buffers Tools C++ Help
#include<iostream>
#include<string>
#include<cmath>
#include<vector>
#include<stack>
#include<queue>
#include<algorithm>
#include<complex>
using namespace std ;
typedef vector<int> vi ;
typedef vector<vi> vvi ;
typ... | a.cc:1:1: error: 'File' does not name a type
1 | File Edit Options Buffers Tools C++ Help
| ^~~~
In file included from /usr/include/c++/14/iosfwd:42,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
... |
s596716598 | p00216 | C++ | def water_charges(w):
progressive_rate = {
(float('inf'),30):160,
(30,20):140,
(20,10):125,
(10, 0):0}
charge = basic_charge = 1150
for (upper, lower), rate in progressive_rate.items():
usage = min(w, upper) - lower
if 0 < usage:
cha... | a.cc:3:12: warning: multi-character character constant [-Wmultichar]
3 | (float('inf'),30):160,
| ^~~~~
a.cc:1:1: error: 'def' does not name a type
1 | def water_charges(w):
| ^~~
a.cc:8:5: error: 'charge' does not name a type; did you mean 'char'?
8 | charge = basic_charge = ... |
s200987772 | p00216 | C++ | #include<iostream>
#include<cmath>
#include<algorithm>
#include<string>
using namespace std;
int w,sum;
string str;
int main(){
while(1){
cin>>>w;
if(w==-1){break;}
if(w<=10){cout<<4280-1150<<endl;}
else if(w<=20){cout<<4280-(1150+(w-10)*125)<<endl;}
else if(w<=30){cout<<4280-(1150+1250+(w-20)*140)<<endl;}... | a.cc: In function 'int main()':
a.cc:12:22: error: expected primary-expression before '>' token
12 | cin>>>w;
| ^
|
s680628843 | p00216 | C++ | #include<iostream>
using namespace std;
int getCost(int w){
int cost = 1150; // ?¬¬?????????
for (int i = 11; i <= w; i++ ){
if ( i <= 20 ) cost += 125; // ?¬¬?????????
else if ( 30 < i ) cost += 160; // ?¬¬?????????
else cost += 140; // ?¬¬?????????
}
return cost; | a.cc: In function 'int getCost(int)':
a.cc:10:14: error: expected '}' at end of input
10 | return cost;
| ^
a.cc:3:19: note: to match this '{'
3 | int getCost(int w){
| ^
|
s409891443 | p00216 | C++ | import java.util.Scanner;
public class P01{
public P01(){
Scanner scan = new Scanner(System.in)
for(int w; scan.hasNextInt() && w >= 0;){
System.out.println( 4280-getCost(w));
}
}
public int getCost(int w){
int cost = 1150; // ?¬¬?????????
for (int i = 11; i <= w; i++ ){
if ( i <= 20 ) cost += 125; // ?¬¬?????????... | 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:2:1: error: expected unqualified-id before 'public'
2 | public class P01{
| ^~~~~~
|
s703649262 | p00216 | C++ | #include<iostream>
using namespace std;
int getCost(int w){
int cost = 1150; // ?¬¬?????????
for (int i = 11; i <= w; i++ ){
if ( i <= 20 ) cost += 125; // ?¬¬?????????
else if ( 30 < i ) cost += 160; // ?¬¬?????????
else cost += 140; // ?¬¬?????????
}
return cost; | a.cc: In function 'int getCost(int)':
a.cc:10:14: error: expected '}' at end of input
10 | return cost;
| ^
a.cc:3:19: note: to match this '{'
3 | int getCost(int w){
| ^
|
s394180124 | p00216 | C++ | #include<iostream>
using namespace std;
int getCost(int w){
int cost = 1150; // ?¬¬?????????
for (int i = 11; i <= w; i++ ){
if ( i <= 20 ) cost += 125; // ?¬¬?????????
else if ( 30 < i ) cost += 160; // ?¬¬?????????
else cost += 140; // ?¬¬?????????
}
return cost; | a.cc: In function 'int getCost(int)':
a.cc:10:14: error: expected '}' at end of input
10 | return cost;
| ^
a.cc:3:19: note: to match this '{'
3 | int getCost(int w){
| ^
|
s677413004 | p00216 | C++ | #include<iostream>
using namespace std;
int getCost(int w){
int cost = 1150; // ?¬¬?????????
for (int i = 11; i <= w; i++ ){
if ( i <= 20 ) cost += 125; // ?¬¬?????????
else if ( 30 < i ) cost += 160; // ?¬¬?????????
else cost += 140; // ?¬¬?????????
}
return cost; | a.cc: In function 'int getCost(int)':
a.cc:10:14: error: expected '}' at end of input
10 | return cost;
| ^
a.cc:3:19: note: to match this '{'
3 | int getCost(int w){
| ^
|
s332941718 | p00216 | C++ | #include<iostream>
using namespace std;
int getCost(int w){
int cost = 1150; // ?¬¬?????????
for (int i = 11; i <= w; i++ ){
if ( i <= 20 ) cost += 125; // ?¬¬?????????
else if ( 30 < i ) cost += 160; // ?¬¬?????????
else cost += 140; // ?¬¬?????????
}
return cost; | a.cc: In function 'int getCost(int)':
a.cc:10:14: error: expected '}' at end of input
10 | return cost;
| ^
a.cc:3:19: note: to match this '{'
3 | int getCost(int w){
| ^
|
s357886137 | p00216 | C++ | import java.util.Scanner;
public class P01{
public P01(){
Scanner scan = new Scanner(System.in)
for(int w; scan.hasNextInt() && w >= 0;){
System.out.println( 4280-getCost(w));
}
}
public int getCost(int w){
int cost = 1150; // ?¬¬?????????
for (int i = 11; i <= w; i++ ){
if ( i <= 20 ) cost += 125; // ?¬¬?????????... | 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:2:1: error: expected unqualified-id before 'public'
2 | public class P01{
| ^~~~~~
|
s621898635 | p00216 | C++ | import java.util.Scanner;
public class P01{
public P01(){
Scanner scan = new Scanner(System.in)
for(int w; scan.hasNextInt() && w >= 0;){
System.out.println( 4280-getCost(w));
}
}
public int getCost(int w){
int cost = 1150; // ?¬¬?????????
for (int i = 11; i <= w; i++ ){
if ( i <= 20 ) cost += 125; // ?¬¬?????????... | 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:2:1: error: expected unqualified-id before 'public'
2 | public class P01{
| ^~~~~~
|
s967901379 | p00216 | C++ | import java.util.Scanner;
public class P01{
public P01(){
Scanner scan = new Scanner(System.in)
for(int w; scan.hasNextInt() && w >= 0;){
System.out.println( 4280-getCost(w));
}
}
public int getCost(int w){
int cost = 1150; // ?¬¬?????????
for (int i = 11; i <= w; i++ ){
if ( i <= 20 ) cost += 125; // ?¬¬?????????... | 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:2:1: error: expected unqualified-id before 'public'
2 | public class P01{
| ^~~~~~
|
s481323639 | p00216 | C++ | #include<stdio.h>
int main(void)
{
int n,t,i,k,j,g,s;
while(1) {
scanf("%d",&t);
if(t==-1) break;
if(10>=t){
y=4280-1150;
printf("%d\n",y);
}
if(t>10&&t<20){
n=t-10;
i=4280-(n*125+1150);
printf("%d\n",i);
}
if(t>20&&t<30){
k=t-20;
j=4280-((k*140)+2400);
printf("%d\n",j);
}
... | a.cc: In function 'int main()':
a.cc:9:25: error: 'y' was not declared in this scope
9 | y=4280-1150;
| ^
|
s283929221 | p00216 | C++ | #include<iostream>
using namespace std;
int getCost(int w){
int cost = 1150;
for (int i = 11; i <= w; i++ ){
if ( i <= 20 ) cost += 125;
else if ( 30 < i ) cost += 160;
else cost += 140;
}
return cost; | a.cc: In function 'int getCost(int)':
a.cc:10:13: error: expected '}' at end of input
10 | return cost;
| ^
a.cc:3:19: note: to match this '{'
3 | int getCost(int w){
| ^
|
s976795019 | p00216 | C++ | main(n){for(;scanf("%d",&n)+n;printf("%d\n",(n<11?626:n<21?886-n*25:n<31?936-n*28:1056-n*32)*5));} | a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token
1 | main(n){for(;scanf("%d",&n)+n;printf("%d\n",(n<11?626:n<21?886-n*25:n<31?936-n*28:1056-n*32)*5));}
| ^
|
s402002485 | p00216 | C++ | #include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include... | a.cc:25:12: error: 'n' was not declared in this scope; did you mean 'yn'?
25 | int kakaku(n){
| ^
| yn
a.cc: In function 'int main()':
a.cc:41:20: error: return-statement with no value, in function returning 'int' [-fpermissive]
41 | if(sui==-1)return ;
| ... |
s203136366 | p00216 | C++ | #include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include... | a.cc: In function 'int kakaku(int)':
a.cc:30:14: error: expected ';' before 'if'
30 | n-=10
| ^
| ;
31 | if(n>0)value+=15*n;
| ~~
a.cc: In function 'int main()':
a.cc:41:20: error: return-statement with no value, in function returning 'int' [... |
s054292635 | p00216 | C++ | #include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include... | a.cc: In function 'int main()':
a.cc:41:20: error: return-statement with no value, in function returning 'int' [-fpermissive]
41 | if(sui==-1)return ;
| ^~~~~~
|
s559135128 | p00216 | C++ | clude <iostream>
using namespace std;
int main()
{
int n;
while(cin >> n && (n >=0)) {
int sum = 1150;
if(n > 10 && n <= 20)
sum += (n - 10) * 125;
if(n > 20 && n <= 30)
sum += 10 * 125 + (n - 20) * 140;
if(n > 30)
sum += 10 * 125 + 10 * 140 ... | a.cc:1:1: error: 'clude' does not name a type
1 | clude <iostream>
| ^~~~~
a.cc: In function 'int main()':
a.cc:7:11: error: 'cin' was not declared in this scope
7 | while(cin >> n && (n >=0)) {
| ^~~
a.cc:15:9: error: 'cout' was not declared in this scope
15 | cout << 4280... |
s550554921 | p00216 | C++ | main(){int w,s;for(;s=1150,scanf("%d",&w),~w;printf("%d\n",4280-s))w<11?0:w<21?s+=w*125-1250:w<31?s+=140*w-1550:s+=w*160-2150;} | a.cc:1:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
1 | main(){int w,s;for(;s=1150,scanf("%d",&w),~w;printf("%d\n",4280-s))w<11?0:w<21?s+=w*125-1250:w<31?s+=140*w-1550:s+=w*160-2150;}
| ^~~~
a.cc: In function 'int main()':
a.cc:1:28: error: 'scanf' was not declared in this sc... |
s868783049 | p00216 | C++ | #include<iostream>
using namespace std;
int main(){
int n, bill;
while(cin>>n,~n){
bill = 1150;
n-=10;
if(n<0)n=0;
if(n>10){bill += 125*10; n -= 10;}
else{bill += 125*n; n = 0;}
if(n>10){bill += 140*10; n -= 10;}
else{bill += 140*n; n = 0;}
bill += 160*n;
cout<<4280bill<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:17:7: error: unable to find numeric literal operator 'operator""bill'
17 | cout<<4280bill<<endl;
| ^~~~~~~~
|
s427963386 | p00216 | C++ | main(){
int w, p;
while(scanf("%d", &w), w+1){
p = 3130;
if(w > 30)p -= 2650 + (w-30) * 160;
else if(w > 20)p -= 1250 + (w-20) * 140;
else if(w > 10)p -= (w-10) * 125;
printf("%d\n", p);
}
} | 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:15: error: 'scanf' was not declared in this scope
3 | while(scanf("%d", &w), w+1){
| ^~~~~
a.cc:8:17: error: 'printf' was not declared... |
s117448686 | p00216 | C++ | #include<iostream>
#include<cstdio>
using namespace std;
int main(void)
{
while(1){
int rate;
cin >> rate;
if(rate == -1) break;
else{
if(rate==0){
rate==0;
}
else{
rate-=10;
}
while(1){
if(rate >=0 && rate < 10){
rate*=125;
b... | a.cc: In function 'int main()':
a.cc:39:2: error: expected '}' at end of input
39 | }
| ^
a.cc:6:1: note: to match this '{'
6 | {
| ^
|
s775117649 | p00217 | Java | class Pair
{
int num;
int walk;
Pair(int num, int walk)
{
this.num = num;
this.walk = walk;
}
}
public class Main
{
public static void main(String[] args)
{
Scanner stdIn = new Scanner(System.in);
while(stdIn.hasNext())
{
int n = stdIn.nextInt();
if(n == 0)
{
break;
}
List<Pair> ... | Main.java:16: error: cannot find symbol
Scanner stdIn = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:16: error: cannot find symbol
Scanner stdIn = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:24: error: cannot fi... |
s739368191 | p00217 | Java | import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner stdIn = new Scanner(System.in);
int n,p,d1,d2,maxp,maxv;
while(stdIn.hasNextInt()){
n = stdIn.nextInt();
if(n == 0) break;
maxp = maxv = 0;
for(int i = 0;i < n;i++){
p = stdIn.nextInt();
d1 = std... | Main.java:20: error: no suitable method found for printf(int,int)
System.out.printf(maxp,maxv);
^
method PrintStream.printf(String,Object...) is not applicable
(argument mismatch; int cannot be converted to String)
method PrintStream.printf(Locale,String,Object...) is not applicable
... |
s882798358 | p00217 | C | #include<stdio.h>
int main(void){
int n,p,best,No,i,d1[1000],d2[1000];
scanf("%d %d %d %d",&n,&p,&d1[0],&d2[0]);
best=d1[0]+d2[0];
No=p;
for(i=1;i<n;i++){
scanf("%d %d %d",&p,&d1[i],&d2[i]);
if(best<d1[i]+d2[i]){
best=d1[i]+d2[i];
No=p;
}
printf("%d %d\n",No,best);
return... | main.c: In function 'main':
main.c:15:1: error: expected declaration or statement at end of input
15 | }
| ^
|
s493757178 | p00217 | C | #include<stdio.h>
int main(void){
int n,p,best,No,sum,i,d1[1000],d2[1000];
scanf("%d %d %d %d",&n,&p,&d1[0],&d2[0]);
best=d1[0]+d2[0];
No=p;
for(i=1;i<n;i++){
scanf("%d %d %d",&p,&d1[i],&d2[i]);
sum=d1[i]+d2[i];
if(best<sum){
best=sum;
No=p;
}
printf("%d %d\n",No,best)... | main.c: In function 'main':
main.c:16:1: error: expected declaration or statement at end of input
16 | }
| ^
|
s171654641 | p00217 | C | #include<stdio.h>
int P[10001][2]={0};
void reset(int x[][]);
int main(){
int n,max=0,save;
int c,d1,d2;
while(scanf("%d",&n)!=EOF){
if(n==0) {break;}
for(c=0;c<n;c++){
scanf("%d %d %d",&P[c][0],&d1,&d2);
P[c][1]=d1+d2;
}
for(c=0;c<n;c++){
if(P[c][1]>max){max=P[c][1];save=c;}
}
... | main.c:5:16: error: array type has incomplete element type 'int[]'
5 | void reset(int x[][]);
| ^
main.c:5:16: note: declaration of 'x' as multidimensional array must have bounds for all dimensions except the first
|
s470458126 | p00217 | C | m;
main(n,p,d,e,b)
{
for(;;)
{
scanf("%d",&n);
if(!n)exit(0);
for(;n--;m=0)
{
scanf("%d%d%d",&p,&d,&e);
if(m<d+e)
m=d+e,b=p;
}
printf("%d %d\n",b,m);
} | main.c:1:1: warning: data definition has no type or storage class
1 | m;
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'm' [-Wimplicit-int]
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
2 | main(n,p,d,e,b)
| ^~~~
main.c: In function 'main':
main.c:2:1: error: ty... |
s473616688 | p00217 | C | #include<stdio.h>
int main(void)
{
int n;
int p,d1,d2,MAX=0;
1<=n && n<=10000;
1<=p && p<=10000;
0<=d1 && d1<=5000;
0<=d2 && d2<=5000;
d=d1+d2;
scanf("%d",&n);
while(n!=0) {
for(i=1;i<=n;i++) {
printf("Dataを入力してください\n");
scanf("%d %d %d",&p,&d1,&d2);
if((d1+d2) > MAX) {
(d1+d2)=MAX;
}
}
p... | main.c: In function 'main':
main.c:10:9: error: 'd' undeclared (first use in this function); did you mean 'd2'?
10 | d=d1+d2;
| ^
| d2
main.c:10:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:21: error: 'i' undeclared (first use... |
s475583426 | p00217 | C | #include<stdio.h>
int main(void)
{
int n;
int p,d1,d2,d,MAX=0;
1<=n && n<=10000;
1<=p && p<=10000;
0<=d1 && d1<=5000;
0<=d2 && d2<=5000;
d=d1+d2;
scanf("%d",&n);
while(n!=0) {
for(i=1;i<=n;i++) {
printf("Dataを入力してください\n");
scanf("%d %d %d",&p,&d1,&d2);
if((d1+d2) > MAX) {
(d1+d2)=MAX;
}
}
... | main.c: In function 'main':
main.c:13:21: error: 'i' undeclared (first use in this function)
13 | for(i=1;i<=n;i++) {
| ^
main.c:13:21: note: each undeclared identifier is reported only once for each function it appears in
main.c:17:40: error: lvalue required as left operand... |
s830797613 | p00217 | C++ | #include <algorithm>
#include <functional>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <string>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <vector>
#include <list>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <bitset>
#include <cl... | a.cc: In function 'void solve()':
a.cc:37:5: error: reference to 'data' is ambiguous
37 | data.clear();
| ^~~~
In file included from /usr/include/c++/14/unordered_map:42,
from /usr/include/c++/14/functional:63,
from a.cc:2:
/usr/include/c++/14/bits/range_access.h:344:5... |
s035223838 | p00217 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <map>
using namespace std;
int main() {
int n;
while (cin >> n, n) {
vector<pair<int,int> > v;
int p, d1, d2;
for (int i=0; i<n; ++i) {
cin >> p >> d1 >> d2;
v.push_back(make_pa... | a.cc: In function 'int main()':
a.cc:18:19: error: 'i' was not declared in this scope
18 | cout << v[i].second << " " << -v[i].first << endl;
| ^
|
s956601818 | p00217 | C++ | #include<iostream>
#include<algorithm>
#include<functional>
using namespace std;
int main(){
int n;
while(cin>>n,n){
int ans=0,most=-1,tmp,t1,t2;
for(int i=0;i<n;i++){
cin>>tmp>>t1>>t2;
if(most<t1+t2){
most=t1+t2;
ans=tmp;
}
}
cout<<ans<<" "<<most<<endl;
}
return INT_MIN;
} | a.cc: In function 'int main()':
a.cc:18:16: error: 'INT_MIN' was not declared in this scope
18 | return INT_MIN;
| ^~~~~~~
a.cc:4:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
3 | #include<functional>
+++ |+#include <cl... |
s475160243 | p00217 | C++ | #include<stdio.h>
int main(){
int x,y,z,N,p;
int max=0.sum=0;
while(1){
scanf("%d",&N);if(N==0)break;
for(int i=0;i<N;i++){
scanf("%d %d %d",&p,&x,&y);
if(max<x+y){max=x+y;sum=p;}
}
printf("%d %d\n",sum,max);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:6:9: error: unable to find numeric literal operator 'operator""sum'
6 | int max=0.sum=0;
| ^~~~~
a.cc:12:21: error: 'sum' was not declared in this scope
12 | if(max<x+y){max=x+y;sum=p;}
| ^~~
a.cc:14:18: error: 'sum' was not declared in... |
s307478860 | p00217 | C++ | #include<iostream>
#include<vector>
using namespace std;
struct patient{
int p, d, dd;
bool operator<(const patient &p)const{
return d + dd < p.d + p.dd;
}
bool operator>(const patient &p)const{
return d + dd > p.d + p.dd;
}
};
int main(int argc, char *argv[]){
int n;
while(std::cin >> n, n){
... | a.cc: In function 'int main(int, char**)':
a.cc:24:5: error: 'sort' was not declared in this scope; did you mean 'short'?
24 | sort(vp.begin(), vp.end(), greater<patient>());
| ^~~~
| short
|
s348175402 | p00217 | C++ | #include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
template<class T>
using Table = vector<vector<T>>;
const ld eps=1e-9;
//// < "D:\D_Download\Visual Studio 2015\Projects\programing_contest_c++\Debug\a.txt"
int main() {
w... | a.cc: In function 'int main()':
a.cc:27:35: error: 'amx' was not declared in this scope; did you mean 'amax'?
27 | cout << id<< " "<<amx<< endl;
| ^~~
| amax
|
s355859805 | p00217 | C++ | #include<iostream>
using namespace std;
int main(){
//??????????????§????????°????????????????????????????????? = ????????????
while(true){
int n;
cin >> n;
if (n == 0) break;
int max_p = 0, max_d = 0;
for (int i = 0; i < n; i++) {
int p, d1, d2;
cin >>p >> d1 >> d2;
if (max_d <= d1 + d2) {
... | a.cc: In function 'int main()':
a.cc:25:18: error: expected '}' at end of input
25 | return 0;
| ^
a.cc:5:11: note: to match this '{'
5 | int main(){
| ^
|
s352355684 | p00217 | C++ | #inclue<stdio.h>
int main(void)
{
int n,max,i,p[10000],d1,d2,d[10000],x;
while(1){
max=0;
scanf("%d",&n);
if(n==0)break;
for(i=0;i<n;i++){
scanf("%d %d %d",&p[i],&d1,&d2);
d[i]=d1+d2;
}
for(i=0;i<n;i++){
if(max<d[i]){
max=d[i];
x=p[i];
}
}
printf("%d %d\n",x,max);
}
return 0;
} | a.cc:1:2: error: invalid preprocessing directive #inclue; did you mean #include?
1 | #inclue<stdio.h>
| ^~~~~~
| include
a.cc: In function 'int main()':
a.cc:7:17: error: 'scanf' was not declared in this scope
7 | scanf("%d",&n);
| ^~~~~
a.cc:19:17: error: 'pr... |
s075418017 | p00217 | C++ | #include<iostream>
using namespace std;
int main(){
int n;
while(cin>>n,n){
int maxi=-INF;
int ans=0;
for(int i=0; i<n;i++){
int a,b,c; cin>a>>b>>c;
if(maxi<b+c){
maxi=b+c;
ans=a}
}
cout<<ans<<" "<<maxi<<endl;
}
} | a.cc: In function 'int main()':
a.cc:9:19: error: 'INF' was not declared in this scope
9 | int maxi=-INF;
| ^~~
a.cc:12:23: error: no match for 'operator>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int')
12 | int a,b,c; cin>a>>b>>c;
| ... |
s929368802 | p00217 | C++ | #include <cstdio>
#include <iostream>
#include <string>
using namespace std;
class Point{
public:
int n,walk;
Point(int n = 0,int walk = 0):n(n),walk(walk){}
bool operator < (const Point &s) const{ return walk > s.walk;}
};
int main(){
int i,j,n;
while(1){
Point p[10000];
cin >> n;
if(n == 0) br... | a.cc: In function 'int main()':
a.cc:24:5: error: 'sort' was not declared in this scope; did you mean 'short'?
24 | sort(p,p+n);
| ^~~~
| short
|
s824204180 | p00217 | C++ | #include<iostream>
using namespace std;
int main(){
int n,p,d1,d2,maxp,maaxv;
while(1){
cin >> n
if(n == 0) break;
maxp = maxv = 0;
while(n --){
cin >> p >> d1 >> d2;
if(maxv < d1+d2){
maxp = p;
maxv = d1+d2;
}
cout>> maxp >> maxv;
}
} | a.cc: In function 'int main()':
a.cc:6:25: error: expected ';' before 'if'
6 | cin >> n
| ^
| ;
7 | if(n == 0) break;
| ~~
a.cc:8:24: error: 'maxv' was not declared in this scope; did you mea... |
s729557288 | p00217 | C++ | #include<iostream>
using namespace std;
int main(){
int n,p,d1,d2,maxp,maxv;
while(1){
cin >> n
if(n == 0) break;
maxp = maxv = 0;
while(n --){
cin >> p >> d1 >> d2;
if(maxv < d1+d2){
maxp = p;
maxv = d1+d2;
}
cout>> maxp >> maxv;
}
} | a.cc: In function 'int main()':
a.cc:6:25: error: expected ';' before 'if'
6 | cin >> n
| ^
| ;
7 | if(n == 0) break;
| ~~
a.cc:15:21: error: no match for 'operator>>' (operand types are 'std... |
s381532854 | p00217 | C++ | #include<iostream>
using namespace std;
int main(){
int n,p,d1,d2,maxp,maxv;
while(1){
cin >> n
if(n == 0) break;
maxp = maxv = 0;
while(n --){
cin >> p >> d1 >> d2;
if(maxv < d1+d2){
maxp = p;
maxv = d1+d2;
}
cout<< maxp << maxv;
}
} | a.cc: In function 'int main()':
a.cc:6:25: error: expected ';' before 'if'
6 | cin >> n
| ^
| ;
7 | if(n == 0) break;
| ~~
a.cc:17:2: error: expected '}' at end of input
17 | }
| ^
... |
s457270939 | p00217 | C++ | #include<iostream>
using namespace std;
int main(){
int n,p,d1,d2,maxp,maxv;
while(1){
cin >> n
if(n == 0) break;
maxp = maxv = 0;
while(n --){
cin >> p >> d1 >> d2;
if(maxv < d1+d2){
maxp = p;
maxv = d1+d2;
}
}
cout<< maxp << maxv;
}
} | a.cc: In function 'int main()':
a.cc:6:25: error: expected ';' before 'if'
6 | cin >> n
| ^
| ;
7 | if(n == 0) break;
| ~~
|
s218799668 | p00217 | C++ |
using namespace std;
int main(){
int n,p,d1,d2,maxp,maxv;
while(1){
cin >> n;
if(n == 0) break;
maxp = maxv = 0;
while(n --){
cin >> p >> d1 >> d2;
if(maxv < d1+d2){
maxp = p;
maxv = d1+d2;
}
}
cout<< maxp << maxv;
}
} | a.cc: In function 'int main()':
a.cc:6:17: error: 'cin' was not declared in this scope
6 | cin >> n;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 |
a.cc:16:17: err... |
s242272947 | p00217 | C++ | #include<iostream>
using namespace std;
int main(){
int n,p,d1,d2,maxp,maxv;
while(1){
cin >> n;
if(n == 0) break;
maxp = maxv = -1;
while(n --){
cin >> p >> d1 >> d2;
if(maxv < d1+d2){
maxp = p;
maxv = d1+d2;
}
}
cout<< maxp << << maxv;
}
} | a.cc: In function 'int main()':
a.cc:16:32: error: expected primary-expression before '<<' token
16 | cout<< maxp << << maxv;
| ^~
|
s669310666 | p00218 | Java |
import java.util.Scanner;
public class main {
Scanner sc = new Scanner(System.in);
int pm,pe,pj;
double avg1,avg2;
int nin;
public void sei(){
nin = sc.nextInt();
while(!(nin==0)){
for(int i = 1;i<=nin;i++){
pm = sc.nextInt();
pe = sc.nextInt();
pj = sc.nextInt();
if((pm==100)||(pe==100)||(pj==1... | Main.java:3: error: class main is public, should be declared in a file named main.java
public class main {
^
1 error
|
s770414066 | p00218 | Java | package aizu;
import java.util.Scanner;
public class ao {
Scanner sc = new Scanner(System.in);
int pm,pe,pj;
double avg1,avg2;
int nin;
public void sei(){
nin = sc.nextInt();
while(!(nin==0)){
for(int i = 1;i<=nin;i++){
pm = sc.nextInt();
pe = sc.nextInt();
pj = sc.nextInt();
if((pm==100)||(pe==1... | Main.java:3: error: class ao is public, should be declared in a file named ao.java
public class ao {
^
1 error
|
s582807279 | p00218 | Java | package aizu;
import java.util.Scanner;
public static void main(String[] args) {
public class ao {
Scanner sc = new Scanner(System.in);
int pm,pe,pj;
double avg1,avg2;
int nin;
public void sei(){
nin = sc.nextInt();
while(!(nin==0)){
for(int i = 1;i<=nin;i++){
pm = sc.nextInt();
pe = sc.nextInt();
p... | Main.java:3: 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:4: error: illegal start of expression
public class ao {
^
Main.java:1: error: unnamed class should not have package... |
s752065994 | p00218 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner stdIn = new Scanner(System.in);
int n,pm,pe,pj;
while(stdIn.hasNextInt()){
n = stdIn.nextInt();
for(int i = 0;i < n;i++){
pm = stdIn.nextInt();
pe = stdIn.nextInt();
pj = stdIn.nextInt();
if(pm == 100 || pe =... | Main.java:25: error: reached end of file while parsing
}
^
1 error
|
s183999931 | p00218 | C | #include<iostream>
using namespace std;
int main(){
int a,a1,a2,a3,i,sum=0,avg=0;
while(1){
cin>>a;
if(a==0) break;
for(i=0;i<a;i++){
cin>>a1>>a2>>a3;
sum=a1+a2+a3;
avg=sum/3;
if(a1==100||a2==100||a3==100||avg>=80||(a1+a2)/2>=90||avg>=50&&a1>=80&&a2>=80||avg>=70&&a1>=80||avg>=70&&a2>=80)
cout<<'... | main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s570145670 | p00218 | C | #include <stdio.h>
int sum[7];
int main(void)
{
int i, j, n;
int m, e, j;
float ave;
while (scanf("%d", &n), n != 0){
for (j = 0; j < n; j++){
scanf("%d %d %d", &m, &e, &j);
ave = (m + e + j) / 3.0;
if (m == 100 || e == 100 || j == 100){
printf("A\n");
}
else if ((m + e) / 2.0 >= 90){
... | main.c: In function 'main':
main.c:7:19: error: redeclaration of 'j' with no linkage
7 | int m, e, j;
| ^
main.c:6:16: note: previous declaration of 'j' with type 'int'
6 | int i, j, n;
| ^
main.c:20:25: error: expected '}' before 'else'
20 | ... |
s917180346 | p00218 | C | #include <stdio.h>
int sum[7];
int main(void)
{
int i, _j, n;
int m, e, j;
float ave;
while (scanf("%d", &n), n != 0){
for (_j = 0; _j < n; _j++){
scanf("%d %d %d", &m, &e, &j);
ave = (m + e + j) / 3.0;
if (m == 100 || e == 100 || j == 100){
printf("A\n");
}
else if ((m + e) / 2.0 >= 90)... | main.c: In function 'main':
main.c:27:59: error: lvalue required as left operand of assignment
27 | else if (ave >= 50 && (m >= 80||e = 80)){
| ^
|
s010937821 | p00218 | C | #include<stdio.h>
int main(void){
int n;
int i;
int mat,eng,jpn;
while(scanf("%d",&n)){
if(n == 0){
break;
}
for(i = 0;i < n;i++){
scanf("%d %d %d",&mat,&eng,&jpn);
if(mat == 100 || eng == 100 || jpn == 100 || (mat + eng) / 2 >= 90 || (eng + mat + jpn) / 3 >= 80){
printf("A\n");
}
else if((... | main.c: In function 'main':
main.c:15:40: error: 'rng' undeclared (first use in this function); did you mean 'eng'?
15 | else if((mat + rng + jpn) / 3 >= 70 || ((mat + eng + jpn) / 3 >= 50 && (mat >= 80 || eng >= 80))){
| ^~~
| ... |
s705357398 | p00218 | C | #include<stdio.h>
int main()
{
int ;
scanf("%d",&n);
while(n!=0){
for(i=0;i<n;i++){
scanf("%d %d %d",&pm,&pe,&pj);
if(pm==100||pj==100||pe==100||(pe+pm)/2>=90||(pe+pm+pj)/3>=80){
printf("A\n");
}
else if((pe+pm+pj)/3>=70)
printf("B\n");
else if((pe+pm+pj)/3>=50){
if(pm>=80||pe>=80){
... | main.c: In function 'main':
main.c:4:9: warning: useless type name in empty declaration
4 | int ;
| ^~~
main.c:5:21: error: 'n' undeclared (first use in this function)
5 | scanf("%d",&n);
| ^
main.c:5:21: note: each undeclared identifier is reported only o... |
s403426191 | p00218 | C | #include<stdio.h>
int main(void)
{
int i,a,b[10001],c[10001],d[10001];
while(1){
scanf("%d",&a);
if(a==0) break;
for(i=0;i<a;i++){
scanf("%d %d %d",&b[i],&c[i],&d[i]);
}
for(i=0;i<a;i++){
if(b==100||c==100||d==100){
printf("A\n");
}
else if((b+c)/2>=90){
printf("A\n");
}
else if((b+c+d)/3>=80){
print... | main.c: In function 'main':
main.c:12:13: warning: comparison between pointer and integer
12 | if(b==100||c==100||d==100){
| ^~
main.c:12:21: warning: comparison between pointer and integer
12 | if(b==100||c==100||d==100){
| ^~
main.c:12:29: warning: com... |
s153869547 | p00218 | C | #include<stdio.h>
int main(void)
{
int n, i, pm, pe, pj,b[10000];
char a[3];
while (1)
{
scanf_s("%d", &n);
if (n == 0)break;
for (i = 0;i < n;i++)
{
scanf_s("%d %d %d", &pm, &pe, &pj);
if (pm == 100 || pe == 100 || pj == 100)
{
printf("A\n");
}
else if ((pm + pe) / 2 >= 90)
{
pri... | main.c: In function 'main':
main.c:9:17: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
9 | scanf_s("%d", &n);
| ^~~~~~~
| scanf
|
s411688409 | p00218 | C | #include<stdio.h>
int main(void)
{
int n, i, pm, pe, pj;
while (1)
{
scanf_s("%d", &n);
if (n == 0)break;
for (i = 0;i < n;i++)
{
scanf("%d %d %d", &pm, &pe, &pj);
if (pm == 100 || pe == 100 || pj == 100)
{
printf("A\n");
}
else if ((pm + pe) / 2 >= 90)
{
printf("A\n");
}
els... | main.c: In function 'main':
main.c:8:17: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
8 | scanf_s("%d", &n);
| ^~~~~~~
| scanf
|
s944253573 | p00218 | C | #include<stdio.h>
int main(void)
{
int n, i, pm, pe, pj;
while (1)
{
scanf_s("%d", &n);
if (n == 0)break;
for (i = 0;i < n;i++)
{
scanf("%d %d %d", &pm, &pe, &pj);
if (pm == 100 || pe == 100 || pj == 100)
{
printf("A\n");
}
else if ((pm + pe) / 2 >= 90)
{
printf("A\n");
}
els... | main.c: In function 'main':
main.c:8:17: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
8 | scanf_s("%d", &n);
| ^~~~~~~
| scanf
|
s086593541 | p00218 | C | #include<stdio.h>
int main(void)
{
int n, i, pm, pe, pj;
while (1)
{
scanf_s("%d", &n);
if (n == 0)break;
for (i = 0;i < n;i++)
{
scanf_s("%d %d %d", &pm, &pe, &pj);
if (pm == 100 || pe == 100 || pj == 100)
{
printf("A\n");
}
else if ((pm + pe) / 2 >= 90)
{
printf("A\n");
}
... | main.c: In function 'main':
main.c:9:17: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
9 | scanf_s("%d", &n);
| ^~~~~~~
| scanf
|
s384927813 | p00218 | C | #include<stdio.h>
int main(void) {
int n=0, pm, pe, pj,i=0;
while (1) {
scanf_s("%d", &n);
if (n == 0) break;
for (i = 0;i < n;i++) {
scanf_s("%d %d %d", &pm, &pe, &pj);
if (pm == 100 || pe == 100 || pj == 100) {
printf("A\n");
}
else if ((pm + pe) / 2 >= 90) {
printf("A\n");
}
else if... | main.c: In function 'main':
main.c:5:17: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
5 | scanf_s("%d", &n);
| ^~~~~~~
| scanf
|
s095046818 | p00218 | C | #include<stdio.h>
int main(void) {
int n=0, pm, pe, pj,i=0;
while (1) {
scanf_s("%d", &n);
if (n == 0) break;
for (i = 0;i < n;i++) {
scanf_s("%d %d %d", &pm, &pe, &pj);
if (pm == 100 || pe == 100 || pj == 100) {
printf("A\n");
}
else if ((pm + pe) / 2 >= 90) {
printf("A\n");
}
else if... | main.c: In function 'main':
main.c:5:17: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
5 | scanf_s("%d", &n);
| ^~~~~~~
| scanf
|
s355033283 | p00218 | C | #include<stdio.h>
int main(void){
int n,pm,pe,pj,i;
while(1){
scanf("%d",&n);
if(n==0) break;
for(i=0;i<n;i++){
scanf("%d %d %d",&pm,&pe,&pj);
if(pm==100 || pe==100 || pj==100){
printf("A\n");
}else if(((pm+pe)/2)>=90){
printf("A\n");
}else if(((pm+pe+pj)/3)>=80){
printf("A\n");
}else... | main.c: In function 'main':
main.c:24:9: error: expected declaration or statement at end of input
24 | return 0;
| ^~~~~~
|
s921669815 | p00218 | C | #include<stdio.h>
int main(void){
int n,pm,pe,pj,i;
while(1){
scanf("%d",&n);
if(n==0) break;
for(i=0;i<n;i++){
scanf("%d %d %d",&pm,&pe,&pj);
if(pm==100 || pe==100 || pj==100){
printf("A\n");
}else if(((pm+pe)/2)>=90){
printf("A\n");
}else if(((pm+pe+pj)/3)>=80){
printf("A\n");
}else... | main.c: In function 'main':
main.c:24:9: error: expected declaration or statement at end of input
24 | return 0;
| ^~~~~~
|
s930183483 | p00218 | C | #include<stdio.h>
int main(void){
int n,pm,pe,pj,i;
while(1){
scanf("%d",&n);
if(n==0) break;
for(i=0;i<n;i++){
scanf("%d %d %d",&pm,&pe,&pj);
if(pm==100 || pe==100 || pj==100){
printf("A\n");
}else if(((pm+pe)/2)>=90){
printf("A\n");
}else if(((pm+pe+pj)/3)>=80){
printf("A\n");
}else... | main.c: In function 'main':
main.c:24:9: error: expected declaration or statement at end of input
24 | return 0;
| ^~~~~~
|
s479564204 | p00218 | C | #include<string.h>
#define P(type,x) fprintf(stdout,"%"#type"\n",x)
int main() {
int n;
int m, e, j;
while (~fscanf(stdin, "%d", &n), n != 0){
while (n--) {
fscanf(stdin, "%d%d%d", &m, &e, &j);
if (m == 100 || e == 100 || j == 100 || (m + e) / 2 >= 90.0 || (m + e + j) / 3 >= 80.0) puts("A");
else if ((m +... | main.c: In function 'main':
main.c:6:17: error: implicit declaration of function 'fscanf' [-Wimplicit-function-declaration]
6 | while (~fscanf(stdin, "%d", &n), n != 0){
| ^~~~~~
main.c:2:1: note: include '<stdio.h>' or provide a declaration of 'fscanf'
1 | #include<string.h>
+++... |
s075174725 | p00218 | C | #include <stdio.h>
int main()
{
int i, n, pm, pe, pj;
float a2, a3;
scanf("%d", &n);
for (i=1; i<=n; i++) {
scanf("%d %d %d", &pm, &pe, &pj);
a2 = (pm + pe)/2;
a3 = (pm + pe + pj)/3;
if (pm==100 || pe==100 || pj==100 || a2>=90 || a3>=80) printf("A\n");
else if (a3>=70 || (a3>=50 && (pm>=80 || pe>=80... | main.c: In function 'main':
main.c:17:64: error: expected ')' before 'printf'
17 | else if (a3>=70 || (a3>=50 && (pm>=80 || pe>=80)) printf("B\n");
| ~ ^~~~~~~~~~~
| )
mai... |
s778549449 | p00218 | C | #include <stdio.h>
int main()
{
int i, n, pm, pe, pj;
float a2, a3;
scanf("%d", &n);
for (i=1; i<=n; i++) {
scanf("%d %d %d", &pm, &pe, &pj);
a2 = (pm + pe)/2;
a3 = (pm + pe + pj)/3;
if (pm==100 || pe==100 || pj==100 || a2>=90 || a3>=80) printf("A\n");
else if (a3>=70 || (a3>=50 && (pm>=80 || pe>=80... | main.c: In function 'main':
main.c:17:64: error: expected ')' before 'printf'
17 | else if (a3>=70 || (a3>=50 && (pm>=80 || pe>=80)) printf("B\n");
| ~ ^~~~~~~~~~~
| )
mai... |
s571613988 | p00218 | C++ | #include<stdio.h>
void dividing_student(int a, int b, int c);
void finish();
int main(void)
{
int n;/*nはデータの個数*/
scanf("%d", &n);
for( int i = 0; i <= n; ++i){
if (i < n){
int pm ,pe, pj; /*左から数学、英語、国語の点数*/
scanf("%d %d %d", &pm, &pe, &pj);
dividing_student( pm,... | a.cc: In function 'void finish()':
a.cc:44:16: error: return-statement with a value, in function returning 'void' [-fpermissive]
44 | return 0;
| ^
|
s760374545 | p00218 | C++ | #include <stdio.h>
void judge(int pm, int pe, int pj);
int main(void)
{
int dataset;
int pm, pe, pj;
while (1){
scanf("%d", &dataset);
if (dataset == 0){
break;
} else {
while (dataset--){
scanf("%d %d %d", &pm, &pe, &pj);
ju... | a.cc: In function 'void judge(int, int, int)':
a.cc:28:5: error: multiple types in one declaration
28 | char class;
| ^~~~
a.cc:28:10: error: declaration does not declare anything [-fpermissive]
28 | char class;
| ^~~~~
a.cc:28:5: error: expected primary-expression before 'char'
... |
s867555466 | p00218 | C++ | #include <stdio.h>
void judge(int pm, int pe, int pj);
int main(void)
{
int dataset;
int pm, pe, pj;
while (1){
scanf("%d", &dataset);
if (dataset == 0){
break;
} else {
while (dataset--){
scanf("%d %d %d", &pm, &pe, &pj);
ju... | a.cc: In function 'void judge(int, int, int)':
a.cc:28:5: error: multiple types in one declaration
28 | char class;
| ^~~~
a.cc:28:10: error: declaration does not declare anything [-fpermissive]
28 | char class;
| ^~~~~
a.cc:28:5: error: expected primary-expression before 'char'
... |
s897152338 | p00218 | C++ | #include <stdio.h>
void judge(int pm, int pe, int pj);
int main(void)
{
int dataset;
int pm, pe, pj;
while (1){
scanf("%d", &dataset);
if (dataset == 0){
break;
} else {
while (dataset--){
scanf("%d %d %d", &pm, &pe, &pj);
ju... | a.cc: In function 'void judge(int, int, int)':
a.cc:29:5: error: multiple types in one declaration
29 | char class;
| ^~~~
a.cc:29:10: error: declaration does not declare anything [-fpermissive]
29 | char class;
| ^~~~~
a.cc:29:5: error: expected primary-expression before 'char'
... |
s260928732 | p00218 | C++ | #include <stdio.h>
void judge(int pm, int pe, int pj);
int main(void)
{
int dataset;
int pm, pe, pj;
while (1){
scanf("%d", &dataset);
if (dataset == 0){
break;
} else {
while (dataset--){
scanf("%d %d %d", &pm, &pe, &pj);
ju... | a.cc: In function 'void judge(int, int, int)':
a.cc:27:5: error: multiple types in one declaration
27 | char class;
| ^~~~
a.cc:27:10: error: declaration does not declare anything [-fpermissive]
27 | char class;
| ^~~~~
a.cc:27:5: error: expected primary-expression before 'char'
... |
s996455128 | p00218 | C++ | #include <stdio.h>
void judge(int pm, int pe, int pj)
{
int sum = pm + pe + pj;
char class;
if (pm == 100 || pe == 100 || pj == 100){
class = 'A';
} else if (pm + pe >= 180){
class = 'A';
} else if (sum >= 240){
class = 'A';
} else if (sum >= 210){
class = 'B';
... | a.cc: In function 'void judge(int, int, int)':
a.cc:6:5: error: multiple types in one declaration
6 | char class;
| ^~~~
a.cc:6:10: error: declaration does not declare anything [-fpermissive]
6 | char class;
| ^~~~~
a.cc:6:5: error: expected primary-expression before 'char'
... |
s062934217 | p00218 | C++ | #include <stdio.h>
void judge(int pm, int pe, int pj)
{
char class;
if (pm == 100 || pe == 100 || pj == 100){
class = 'A';
} else if (pm + pe >= 180){
class = 'A';
} else if (pm + pe + pj >= 240){
class = 'A';
} else if (pm + pe + pj >= 210){
class = 'B';
} else... | a.cc: In function 'void judge(int, int, int)':
a.cc:5:5: error: multiple types in one declaration
5 | char class;
| ^~~~
a.cc:5:10: error: declaration does not declare anything [-fpermissive]
5 | char class;
| ^~~~~
a.cc:5:5: error: expected primary-expression before 'char'
... |
s653680203 | p00218 | C++ | #include <stdio.h>
void judge(int pm, int pe, int pj)
{
char class;
if(pm == 100 || pe == 100 || pj == 100){
class='A';
}else if(pm + pe >= 180){
class='A';
}else if(pm + pe + pj >= 240){
class='A';
}else if(pm + pe + pj >= 210){
class='B';
}else if(pm + pe + pj >... | a.cc: In function 'void judge(int, int, int)':
a.cc:4:5: error: multiple types in one declaration
4 | char class;
| ^~~~
a.cc:4:10: error: declaration does not declare anything [-fpermissive]
4 | char class;
| ^~~~~
a.cc:4:5: error: expected primary-expression before 'char'
... |
s126685106 | p00218 | C++ | #include <stdio.h>
void judge(int pm, int pe, int pj);
int main(void)
{
int dataset;
int pm, pe, pj;
while (1){
scanf("%d", &dataset);
if (dataset == 0){
break;
} else {
while (dataset--){
scanf("%d %d %d", &pm, &pe, &pj);
ju... | a.cc: In function 'void judge(int, int, int)':
a.cc:28:5: error: multiple types in one declaration
28 | char class;
| ^~~~
a.cc:28:10: error: declaration does not declare anything [-fpermissive]
28 | char class;
| ^~~~~
a.cc:28:5: error: expected primary-expression before 'char'
... |
s021080730 | p00218 | C++ | #include <stdio.h>
char divide(int math, int english, int japanese);
char class;
int main(void)
{
int dataset;
int math, english, japanese;
while (1){
scanf("%d", &dataset);
if (dataset == 0){
break;
} else {
while (dataset--){
scanf("%d %d ... | a.cc:4:11: error: expected identifier before ';' token
4 | char class;
| ^
a.cc:4:1: error: multiple types in one declaration
4 | char class;
| ^~~~
a.cc:4:11: error: declaration does not declare anything [-fpermissive]
4 | char class;
| ^
a.cc: In function 'int main()'... |
s903225821 | p00218 | C++ | #include <stdio.h>
char divide(int math, int english, int japanese);
char class;
int main(void)
{
int dataset;
int math, english, japanese;
while (1){
scanf("%d", &dataset);
if (dataset == 0){
break;
} else {
while (dataset--){
scanf("%d %d ... | a.cc:4:11: error: expected identifier before ';' token
4 | char class;
| ^
a.cc:4:1: error: multiple types in one declaration
4 | char class;
| ^~~~
a.cc:4:11: error: declaration does not declare anything [-fpermissive]
4 | char class;
| ^
a.cc: In function 'int main()'... |
s351896227 | p00218 | C++ | #include <stdio.h>
char divide(int math, int english, int japanese);
char class;
int main(void)
{
int dataset;
int math, english, japanese;
while (1){
scanf("%d", &dataset);
if (dataset == 0){
break;
} else {
while (dataset--){
scanf("%d %d ... | a.cc:4:11: error: expected identifier before ';' token
4 | char class;
| ^
a.cc:4:1: error: multiple types in one declaration
4 | char class;
| ^~~~
a.cc:4:11: error: declaration does not declare anything [-fpermissive]
4 | char class;
| ^
a.cc: In function 'int main()'... |
s648186673 | p00218 | C++ | #include<stdio.h>
void dividing(int pm, int pe, int pj);
int main(void)
{
int n, pm, pe, pj;
int i;
while (1) {
scanf("%d", &n);
if (n == 0) {
break;
} else {
while (i < n) {
scanf("%d %d %d", &pm, &pe, &pj);
dividing(pm, pe, pj);
i++;
}
}
}
return 0;
}
void dividing(int pm, int... | a.cc: In function 'void dividing(int, int, int)':
a.cc:42:4: error: expected '}' at end of input
42 | }
| ^
a.cc:25:1: note: to match this '{'
25 | {
| ^
|
s651737502 | p00218 | C++ | #include <stdio.h>
int classjudge(int pm,int pe,int pj){
int class;
if(pm == 100 || pe== 100 || pj== 100)class=0;
else if(pm + pe >= 180)class=0;
else if(pm + pe + pj >= 240)class=0;
else if(pm + pe + pj >= 210)class=1;
else if((pm + pe + pj >= 150) && (pm >= 80 || pe >= 80))class=1;
else c... | a.cc: In function 'int classjudge(int, int, int)':
a.cc:4:5: error: multiple types in one declaration
4 | int class;
| ^~~
a.cc:4:9: error: declaration does not declare anything [-fpermissive]
4 | int class;
| ^~~~~
a.cc:4:5: error: expected primary-expression before 'int'
4 ... |
s923904567 | p00218 | C++ | #include <stdio.h>
int classjudge(int pm,int pe,int pj){
int class;
if(pm == 100 || pe== 100 || pj== 100){
class=0;
}
else if(pm + pe >= 180){
class=0;
}
else if(pm + pe + pj >= 240){
class=0;
}
else if(pm + pe + pj >= 210){
class=1;
}
else if((pm... | a.cc: In function 'int classjudge(int, int, int)':
a.cc:4:5: error: multiple types in one declaration
4 | int class;
| ^~~
a.cc:4:9: error: declaration does not declare anything [-fpermissive]
4 | int class;
| ^~~~~
a.cc:4:5: error: expected primary-expression before 'int'
4 ... |
s797075409 | p00218 | C++ | #include <stdio.h>
#include <stdbool.h>
char dividing(int pm, int pe, int pj);
int main(void)
{
int ninnzuu;
int pm[1000], pe[1000], pj[1000];
char class[1000];
while(true) {
scanf("%d", &ninnzuu);
if(ninnzuu == 0) {
break;
}
for(int i = 0; i < ninnzuu; i++) {
scanf("%d %d %d", &pm[i], &pe[i], &pj[i... | a.cc: In function 'int main()':
a.cc:10:9: error: two or more data types in declaration of 'structured binding'
10 | char class[1000];
| ^~~~
a.cc:10:19: error: empty structured binding declaration
10 | char class[1000];
| ^
a.cc:10:9: error: expected primary-... |
s572212843 | p00218 | C++ | #include <stdio.h>
#include <stdbool.h>
int grading(int x, int y, int z, char rank)
{
int sum2 = x + y;
int sum3 = x + y + z;
if(x == 100 || y == 100 || z == 100){
rank = 'A';
}else if(sum2 >= 180){
rank = 'A';
}else if(sum3 >= 240){
rank = 'A';
}else if(sum3... | a.cc: In function 'int grading(int, int, int, char)':
a.cc:21:1: warning: no return statement in function returning non-void [-Wreturn-type]
21 | }
| ^
a.cc: In function 'int main()':
a.cc:30:12: error: 'n' was not declared in this scope; did you mean 'en'?
30 | if(n == 0){
| ^
... |
s891105060 | p00218 | C++ | #include <stdio.h>
float mean2(int x, int y)
{
return (float)(x + y) / 2.0;
}
float mean3(int x, int y, int z)
{
return (floag)(x + y + z) / 3.0;
}
char grading(int p_math, int p_eng, int p_jpn)
{
if ( p_math == 100 || p_eng == 100 || p_jpn == 100) {
return 'A';
} else if (mean2(p_math, p_jpn... | a.cc: In function 'float mean3(int, int, int)':
a.cc:10:13: error: 'floag' was not declared in this scope; did you mean 'float'?
10 | return (floag)(x + y + z) / 3.0;
| ^~~~~
| float
a.cc: In function 'char grading(int, int, int)':
a.cc:22:19: error: expected ';' before '}' to... |
s415612373 | p00218 | C++ | #include <stdio.h>
int class(int pm, int pe, int pj);
int main(void)
{
int n, pm, pe, pj;
scanf("%d", &n);
for (int i = 0;i < n;i ++){
scanf("%d %d %d", &pm, &pe, &pj);
if (class(pm, pe, pj) == 1){
printf("A\n");
} else if (class(pm, pe, pj) == 2){
printf("B\n");
} else {
printf("C\... | a.cc:2:10: error: expected identifier before '(' token
2 | int class(int pm, int pe, int pj);
| ^
a.cc:2:11: error: expected unqualified-id before 'int'
2 | int class(int pm, int pe, int pj);
| ^~~
a.cc:2:11: error: expected ')' before 'int'
2 | int class(int pm, int pe, int p... |
s588694664 | p00218 | C++ | #include <stdio.h>
char class(int pm, int pe, int pj);
int main(void)
{
int n, pm, pe, pj;
scanf("%d", &n);
for (int i = 0;i < n;i ++){
scanf("%d %d %d", &pm, &pe, &pj);
printf("%c\n", class(pm, pe, pj));
}
return 0;
}
char class(int pm, int pe, int pj)
{
int ave = (pm + pe + pj) / 3;
i... | a.cc:2:11: error: expected identifier before '(' token
2 | char class(int pm, int pe, int pj);
| ^
a.cc:2:12: error: expected unqualified-id before 'int'
2 | char class(int pm, int pe, int pj);
| ^~~
a.cc:2:12: error: expected ')' before 'int'
2 | char class(int pm, int pe, ... |
s615186176 | p00218 | C++ | #include <cstdio>
#include <stdio.h>
#include <iostream>
#include <iomanip>
#include <string>
#include <vector>
using namespace std;
int main(){
int n;
while(cin >> n){
int t[3],tt[2];
string ans[n];
for(int i = 1;n >= i;i++){
for(int ii = 1;3 >= ii;ii++){
cin >> t[1] >> t[2] >> t[3];
tt[1] = ( t[1] + t... | a.cc: In function 'int main()':
a.cc:31:29: error: 'i' was not declared in this scope
31 | cout << ans[i] << endl;
| ^
a.cc:33:2: error: expected '}' at end of input
33 | }
| ^
a.cc:9:11: note: to match this '{'
9 | int main(){
| ^
|
s961470784 | p00218 | C++ | #include <cstdio>
#include <stdio.h>
#include <iostream>
#include <iomanip>
#include <string>
#include <vector>
using namespace std;
int main(){
int n;
while(cin >> n){
int t[3],tt[2];
string ans[n];
for(int i = 1;n >= i;i++){
for(int ii = 1;3 >= ii;ii++){
cin >> t[1] >> t[2] >> t[3];
tt[1] = ( t[1] + t... | a.cc: In function 'int main()':
a.cc:33:2: error: expected '}' at end of input
33 | }
| ^
a.cc:9:11: note: to match this '{'
9 | int main(){
| ^
|
s191492293 | p00218 | C++ | #include <iostream>
using namespace std;
int main(){
int n,pj,pm,pe;
while(1){
cin>>n
if(n==0) break;
for(int i=1;i<=n;i++){
cin>>pm>>pe>>pj;
if(pm==100||pe==100||pm==100){
cout<<"A"<<endl;
}else if((pm+pe)/2>=90){
cout<<"A"<<endl;
}else if((pm+pe+pj)/3>=80){
cout<<"A"<<endl;
}else i... | a.cc: In function 'int main()':
a.cc:6:23: error: expected ';' before 'if'
6 | cin>>n
| ^
| ;
7 | if(n==0) break;
| ~~
a.cc:19:55: error: expected primary-expression before '>' token
19 | ... |
s503691462 | p00218 | C++ | #include <iostream>
using namespace std;
int main(){
int n,pj,pm,pe;
while(1){
cin>>n
if(n==0) break;
for(int i=1;i<=n;i++){
cin>>pm>>pe>>pj;
if(pm==100||pe==100||pj==100){
cout<<"A"<<endl;
}else if((pm+pe)/2>=90){
cout<<"A"<<endl;
}else if((pm+pe+pj)/3>=80){
cout<<"A"<<endl;
}else i... | a.cc: In function 'int main()':
a.cc:6:23: error: expected ';' before 'if'
6 | cin>>n
| ^
| ;
7 | if(n==0) break;
| ~~
a.cc:19:55: error: expected primary-expression before '>' token
19 | ... |
s735952331 | p00218 | C++ | #include <iostream>
using namespace std;
int main(){
int n,pj,pm,pe;
while(1){
cin>>n;
if(n==0) break;
for(int i<=1;i<=n;i++){
cin>>pm>>pe>>pj;
if(pm==100||pj==100||pe==100){
cout<<"A"<<endl;
}else if((pm+pe)/2>=90){
cout<<"A"<<endl;
}else if(pm/3+pe/3+pj/3>=80){
cout<<"A"<<endl;
}els... | a.cc: In function 'int main()':
a.cc:8:26: error: expected ';' before '<=' token
8 | for(int i<=1;i<=n;i++){
| ^~
| ;
a.cc:8:26: error: expected primary-expression before '<=' token
8 | for(int i<=1;i<=n;i++){
| ... |
s526946352 | p00218 | C++ | #include <iostream>
using namespace std;
int main(){
int n,pj,pm,pe;
while(1){
cin>>n;
if(n==0) break;
for(int i<=1;i<=n;i++){
cin>>pm>>pe>>pj;
if(pm==100||pj==100||pe==100){
cout<<"A"<<endl;
}else if((pm+pe)/2>=90){
cout<<"A"<<endl;
}else if(pm/3+pe/3+pj/3>=80){
cout<<"A"<<endl;
}els... | a.cc: In function 'int main()':
a.cc:8:26: error: expected ';' before '<=' token
8 | for(int i<=1;i<=n;i++){
| ^~
| ;
a.cc:8:26: error: expected primary-expression before '<=' token
8 | for(int i<=1;i<=n;i++){
| ... |
s348758468 | p00218 | C++ | #include <iostream>
using namespace std;
int main(){
int n,pj,pm,pe;
while(1){
cin>>n;
if(n==0) break;
for(int i<=1;i<=n;i++){
cin>>pm>>pe>>pj;
if(pm==100||pj==100||pe==100){
cout<<"A"<<endl;
}else if((pm+pe)/2>=90){
cout<<"A"<<endl;
}else if((pm+pe+pj)/3>=80){
cout<<"A"<<endl;
}else ... | a.cc: In function 'int main()':
a.cc:8:26: error: expected ';' before '<=' token
8 | for(int i<=1;i<=n;i++){
| ^~
| ;
a.cc:8:26: error: expected primary-expression before '<=' token
8 | for(int i<=1;i<=n;i++){
| ... |
s259713685 | p00218 | C++ | #include <iostream>
using namespace std;
int main(){
int n,pj,pm,pe;
while(1){
cin>>n;
if(n==0) break;
for(int i<=1;i<=n;i++){
cin>>pm>>pe>>pj;
if(pm==100||pj==100||pe==100){
cout<<"A"<<endl;
}else if((pm+pe)/2>=90){
cout<<"A"<<endl;
}else if((pm+pe+pj)/3>=80){
cout<<"A"<<endl;
}else ... | a.cc: In function 'int main()':
a.cc:8:26: error: expected ';' before '<=' token
8 | for(int i<=1;i<=n;i++){
| ^~
| ;
a.cc:8:26: error: expected primary-expression before '<=' token
8 | for(int i<=1;i<=n;i++){
| ... |
s946085239 | p00218 | C++ | #include <iostream>
using namespace std;
int main(){
int n,pj,pm,pe;
while(n){
cin>>n;
for(int i<=1;i<=n;i++){
cin>>pm>>pe>>pj;
if(pm==100||pj==100||pe==100){
cout<<"A"<<endl;
}else if((pm+pe)/2>=90){
cout<<"A"<<endl;
}else if((pm+pe+pj)/3>=80){
cout<<"A"<<endl;
}else if((pm+pe+pj)/3>=7... | a.cc: In function 'int main()':
a.cc:7:26: error: expected ';' before '<=' token
7 | for(int i<=1;i<=n;i++){
| ^~
| ;
a.cc:7:26: error: expected primary-expression before '<=' token
7 | for(int i<=1;i<=n;i++){
| ... |
s311399171 | p00218 | C++ | #include <iostream>
char detClass(int pm, int pe, int pj)
{
mean = (pm + pe + pj)/3;
if((pm == 100) | (pe == 100) | (pj == 100)) {
return 'A';
} else if( (pm + pe)/2 >= 90) {
return 'A';
} else if( mean >= 80) {
return 'A';
} else if( mean >= 70) {
return 'B';
} else if( (mean >= 50) && ((pm >= 80) | (pe... | a.cc: In function 'char detClass(int, int, int)':
a.cc:5:9: error: 'mean' was not declared in this scope
5 | mean = (pm + pe + pj)/3;
| ^~~~
a.cc:19:1: warning: control reaches end of non-void function [-Wreturn-type]
19 | }
| ^
|
s335706542 | p00218 | C++ | #include<<iostream>
#include<algorithm>
using namespace std;
char hyakuten(int *students[][3],int n){
for(int i=0;i<3;i++){
if(students[n][i]==100)return 'A';
}
if((students[n][0]+students[n][1])/2>=90)return 'A';
if((students[n][0]+students[n][1]+students[n][2])/3>=80)return 'A';
if((students[n][0]+studen... | a.cc:1:9: fatal error: <iostream: No such file or directory
1 | #include<<iostream>
| ^~~~~~~~~~~
compilation terminated.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.