submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s994308472 | p03679 | C++ | #incldue<bits/stdc++.h>
using namespace std;
int main(){
int a,b,x;cin>>x>>a>>b;
string s;
if(a>=b) s="delicious";
if(b>a && b<=x+a) s="safe";
if(b>x+a) s="dangerous";
cout<<s<<endl;
} | a.cc:1:2: error: invalid preprocessing directive #incldue; did you mean #include?
1 | #incldue<bits/stdc++.h>
| ^~~~~~~
| include
a.cc: In function 'int main()':
a.cc:4:13: error: 'cin' was not declared in this scope
4 | int a,b,x;cin>>x>>a>>b;
| ^~~
a.cc:1:1: note: 'std::cin' ... |
s093370874 | p03679 | C++ | #include <iostream>
using namspace std;
int main(void){
int X, A, B;
// implements
if(B <= A){
printf("delicious\n");
}
else if(B > (A+X)){
printf("dangerous\n");
}
else{
printf("safe\n");
}
return 0;
}
| a.cc:2:7: error: expected nested-name-specifier before 'namspace'
2 | using namspace std;
| ^~~~~~~~
|
s060919494 | p03679 | Java | import java.util.Scanner;
import java.util.Vector;
class Main{
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
Vector<Integer> v=new Vector<Integer>();
for(int i=0; i<n; i++) {
int z=sc.nextInt();
z--;
v.add(z);
}
int now=0; int c=0;
for(;;) {
... | Main.java:24: error: array required, but Vector<Integer> found
now=v[now];
^
1 error
|
s681814980 | p03679 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int x,a,b;
cin>>x>>a>>b;
if(a>=b) cout<<"delicious"<<endl;
else if (b-a=<x) cout<<"safe"<<endl;
else cout<<"dangerous"<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:16: error: expected primary-expression before '<' token
7 | else if (b-a=<x) cout<<"safe"<<endl;
| ^
|
s927180617 | p03679 | C++ | #include <iostream>
using namespace std;
int main(){
int X,A,B;
cin >> X >> A >> B;
if(A >= B){
cout << "delicious" << endl;
}else if(X >= B-A){
cout << "safe" << endl;
}else{
cout << "dangerous" << endl;
} | a.cc: In function 'int main()':
a.cc:12:6: error: expected '}' at end of input
12 | }
| ^
a.cc:3:15: note: to match this '{'
3 | int main(){
| ^
|
s022618433 | p03679 | C++ | #include <iostream>
using namespace std;
int main(){
int X,A,B;
cin >> X >> A >> B;
if(A >= B){
cout << "delicious" << endl;
}else if(X >= B-A){
cout << "safe" << endl;
}else{
cout << "dangerous" << endl;
} | a.cc: In function 'int main()':
a.cc:12:6: error: expected '}' at end of input
12 | }
| ^
a.cc:3:15: note: to match this '{'
3 | int main(){
| ^
|
s038956550 | p03679 | C++ | #include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<(n);i++)
const int MOD=(int)1e9+7;
using namespace std;
int main(){
int x,a,b;
cin>>x>>a>>b;
if(b-a <= 0) cout<<"delicious"<<endl;
else if(b-a >= x) cout<<"safe"<<endl;
else cout<<"dangerous"
} | a.cc: In function 'int main()':
a.cc:10:27: error: expected ';' before '}' token
10 | else cout<<"dangerous"
| ^
| ;
11 | }
| ~
|
s303154610 | p03679 | C++ | #include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<(n);i++)
const int MOD=(int)1e9+7;
using namespace std;
int main(){
int x,a,b;
cin>>x>>a>>b;
if(b-a <= 0)cout<<"delicious"<<endl;
else if(b-a >= x)cout<<"safe"<<endl;
else cout<<"dangerous"
} | a.cc: In function 'int main()':
a.cc:10:27: error: expected ';' before '}' token
10 | else cout<<"dangerous"
| ^
| ;
11 | }
| ~
|
s636739335 | p03679 | C++ | #include<stdio.h>
int main ( )
{
int x , a , b ;
s c a n f (”%d%d%d ” , &x , &a , &b ) ;
i f (−a + b <= 0 ) p r i n t f ( ”delicious\n ” ) ;
e l s e i f (−a + b <= x ) p r i n t f ( ”safe\n ” ) ;
e l s e p r i n t f ( ”dangerous\n ” ) ;
return 0;
}
| a.cc:5:12: error: extended character ” is not valid in an identifier
5 | s c a n f (”%d%d%d ” , &x , &a , &b ) ;
| ^
a.cc:5:20: error: extended character ” is not valid in an identifier
5 | s c a n f (”%d%d%d ” , &x , &a , &b ) ;
| ^
a.cc:6:6: error: extended character ... |
s833130186 | p03679 | C++ | #i n cl u d e <s t d i o . h>
i n t main ( )
{
i n t x , a , b ;
s c a n f (”%d%d%d ” , &x , &a , &b ) ;
i f (−a + b <= 0 ) p r i n t f ( ”delicious\n ” ) ;
e l s e i f (−a + b <= x ) p r i n t f ( ”safe\n ” ) ;
e l s e p r i n t f ( ”dangerous\n ” ) ;
return 0;
}
| a.cc:1:2: error: invalid preprocessing directive #i; did you mean #if?
1 | #i n cl u d e <s t d i o . h>
| ^
| if
a.cc:5:12: error: extended character ” is not valid in an identifier
5 | s c a n f (”%d%d%d ” , &x , &a , &b ) ;
| ^
a.cc:5:20: error: extended character ” is not vali... |
s991275776 | p03679 | C++ | #i n cl u d e <s t d i o . h>
i n t main ( )
{
i n t x , a , b ;
s c a n f (”%d%d%d ” , &x , &a , &b ) ;
i f (−a + b <= 0 ) p r i n t f ( ” d e l i c i o u s \n ” ) ;
e l s e i f (−a + b <= x ) p r i n t f ( ” s a f e \n ” ) ;
e l s e p r i n t f ( ” d an ge r ou s \n ” ) ;
}
| a.cc:1:2: error: invalid preprocessing directive #i; did you mean #if?
1 | #i n cl u d e <s t d i o . h>
| ^
| if
a.cc:5:12: error: extended character ” is not valid in an identifier
5 | s c a n f (”%d%d%d ” , &x , &a , &b ) ;
| ^
a.cc:5:20: error: extended character ” is not vali... |
s386244611 | p03679 | C++ | #include<iostream>
#include<algorithm>
#include<string>
#include<map>
#include<set>
#include<vector>
#include<string.h>
#include<math.h>
#include<stdio.h>
#include<queue>
#include<utility>
#include<cstdio>
#include<cstring>
#include<new>
#include<new.h>
#include<float.h>
#include<ctype.h>
#include<cfloat>
#include<cmat... | a.cc:15:9: fatal error: new.h: No such file or directory
15 | #include<new.h>
| ^~~~~~~
compilation terminated.
|
s285157190 | p03679 | C++ | cout<<"dangerous"<<endl;
| a.cc:1:17: error: 'cout' does not name a type
1 | cout<<"dangerous"<<endl;
| ^~~~
|
s904982509 | p03679 | C++ | #include <iostream>
using namespace std;
int main(){
int x,a,b;
cin>>x>>a>>b;
if(a>=b){cout<<"delicious"<<endl;}
else if(a<b&&x>=b-a{cout<<"safe"<<endl;}
else{cout<<"dangerous"<<endl;}
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:22: error: expected ';' before '{' token
7 | else if(a<b&&x>=b-a{cout<<"safe"<<endl;}
| ^
| ;
a.cc:8:3: error: expected primary-expression before 'else'
8 | else{cout<<"dangerous"<<endl;}
| ^~~~
a.cc:7:43: e... |
s660550123 | p03679 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int x,a,b;
cin >> x >> a >> b;
if(a>=b){
cout << "delicious" << endl;
}
else if(a<b && b-a<=x){
cout << "safe" << endl;
}
else if(a<b && b-a>x){
cout << "dangerous" << endl;
}
| a.cc: In function 'int main()':
a.cc:14:2: error: expected '}' at end of input
14 | }
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s449518980 | p03679 | C++ | #include <iostream>
using namespace std;
int main(){
int a, b, c;
cin >> a >> b >> c;
if(b >= c){
cout << "delicious" << endl;
}
else{
if(a+b >= c){
cout << "safe"
}
else{
cout << "dangerous" << endl;
}
}
} | a.cc: In function 'int main()':
a.cc:11:39: error: expected ';' before '}' token
11 | cout << "safe"
| ^
| ;
12 | }
| ~
|
s840714020 | p03679 | C | #include <stdio.h>
int main(){
int a,b,x,y;
scanf("%d %d %d",&x,&a,&b);
y=a+x;
if (a=>b)
{
printf("delicious\n");
}else if (a<b)
{
if (y>=b)
{
printf("safe\n");
}else if (y<b)
{
printf("dengerous\n");
}
}
} | main.c: In function 'main':
main.c:6:15: error: expected expression before '>' token
6 | if (a=>b)
| ^
|
s392114101 | p03679 | C++ | #include <bits/stdc++.h>
#include <typeinfo>
#include <cxxabi.h>
#ifdef LOCAL
#include "dbgtoki.hpp"
#define DUMP(i) dump((string)TOSTRING(i), demangle(typeid(i).name()), __LINE__ , i)
DbgTimer D_t;
#define TSTART() D_t.start()
#define TSTOP() D_t.stop()
#else
#define DUMP(i)
#define TSTART()
#define TS... | a.cc: In function 'int main()':
a.cc:37:8: error: 'a' was not declared in this scope
37 | if(a >= b)ans = "delicious";
| ^
a.cc:38:15: error: 'x' was not declared in this scope
38 | else if(a+x < b)ans = "dangerous";
| ^
|
s836342824 | p03679 | C++ | #include <sstream>
#include <iostream>
using namespace std;
int main(){
int x, a, b;
cin >> x >> a >> b;
if (a >=b){
cout << 'delicious' << endl;
} else if(b - a <= x){
cout << 'safe' << endl;
} else{
cout << 'dangerous' << endl;
}
return 0;
] | a.cc:9:13: warning: multi-character literal with 9 characters exceeds 'int' size of 4 bytes
9 | cout << 'delicious' << endl;
| ^~~~~~~~~~~
a.cc:11:13: warning: multi-character character constant [-Wmultichar]
11 | cout << 'safe' << endl;
| ^~~~~~
a.cc:13:13: warning: m... |
s286819652 | p03679 | C++ | #include<iostream>
using namespace std;
int main(){
int X, A, B;
cin >> X >> A >> B;
if(B-A>X){
cout << "dangerous";
}else if(B-A>0){
cout << "safe";
}else{
cout << "delicious";
}
}
~
~ | a.cc:20:1: error: expected class-name before '~' token
20 | ~
| ^
|
s996317166 | p03679 | C++ | #include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <functional>
#include <queue>
#include <set>
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define rep1(i,n) for(int i=1;i<=(int)(n);i++)
using namespace std;
typedef long long int lli;
int main(){
int X,A,B;
cin>>X>>A>>B;
if(B-A... | a.cc: In function 'int main()':
a.cc:18:21: error: expected ';' before 'cout'
18 | else(B-A<=X)cout<<"safe";
| ^~~~
| ;
a.cc:19:9: error: 'else' without a previous 'if'
19 | else cout<<"dangerous";
| ^~~~
|
s049150260 | p03679 | C++ | #include <stdio.h>
int main()
{
int x,a,b;
scanf("%d%d%d",&x,&a,&b);
if(a>=b){
printf("delicious\n");
}
else if(b-a<=x){
printf("safe\n");
}
else{
printf("dangerous\n"):
}
return 0;
} | a.cc: In function 'int main()':
a.cc:14:26: error: expected ';' before ':' token
14 | printf("dangerous\n"):
| ^
| ;
|
s939947638 | p03679 | C++ | #include <bits/stdc++.h>
using namespace std;
//#define int long long
struct Fast {Fast(){std::cin.tie(0);ios::sync_with_stdio(false);}} fast;
/* cpp template {{{ */
/* short */
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define Fi first
#define Se second
#define ALL(v) (v).begin(), (v).end()
... | a.cc: In function 'int main()':
a.cc:84:15: error: expected ';' before 'print'
84 | else (b-a<x) print("safe");
| ^~~~~~
| ;
a.cc:85:3: error: 'else' without a previous 'if'
85 | else print("dangerous");
| ^~~~
|
s398456304 | p03679 | C++ | #include <iostream>
using namespace std;
int main(){
int X, A, B;
cin >> X >> A >> B;
if(A>=B) cout << "delicious" << endl;
if(B>A&&(A+X<=B) cout << "safe" << endl;
else cout << "dangerous" <<endl;
} | a.cc: In function 'int main()':
a.cc:8:25: error: expected ';' before 'cout'
8 | if(B>A&&(A+X<=B) cout << "safe" << endl;
| ^~~~~
| ;
a.cc:9:9: error: expected primary-expression before 'else'
9 | else cout << "dangerous" <<endl;
... |
s455548918 | p03679 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
int x, a, b;
cin >> x >> a >> b;
string ans = "dangerous";
if(b<=a) ans = "delicious";
else if(a<b && b<=a+x) ans = "safe";
cout << ans << endl;
return 0;g
}
| a.cc: In function 'int main()':
a.cc:15:12: error: 'g' was not declared in this scope
15 | return 0;g
| ^
|
s153519996 | p03679 | C | #include <stdio.h>
int abs(int n){
if(n<0){
return -1*n;}else
return n;}
int main(void)
{int N,A,M,B,X,C,x,i,a,b,c,l,r,g,b,m,tmp;
scanf("%d%d%d",&X,&A,&B);
if(B<=A){
printf("delicious");}
else if(B<=A+X){
printf("safe");}
else{
printf("dangerous");}
return 0;
}
| main.c: In function 'main':
main.c:7:34: error: redeclaration of 'b' with no linkage
7 | {int N,A,M,B,X,C,x,i,a,b,c,l,r,g,b,m,tmp;
| ^
main.c:7:24: note: previous declaration of 'b' with type 'int'
7 | {int N,A,M,B,X,C,x,i,a,b,c,l,r,g,b,m,tmp;
| ... |
s404681161 | p03679 | C | #include <stdio.h>
int main(void){
int x,a,b;
scanf("%d %d %d"&x,a,b);
if (b-a<=0){
printf("delicious\n");
}
else if (b-a<x+1){
printf("safe\n");
}
else{
printf("dangerous\n");
}
return 0;
}
| main.c: In function 'main':
main.c:5:19: error: invalid operands to binary & (have 'char *' and 'int')
5 | scanf("%d %d %d"&x,a,b);
| ~~~~~~~~~~^
| |
| char *
|
s386497917 | p03679 | C | #include <stdio.h>
int main(void){
int x,a,b;
scanf("%d %d %d"&x,a,b);
if (b-a<=0){
printf("delicious\n");
else if (b-a<x+1){
printf("safe\n");
}
else{
printf("dangerous\n");
}
return 0;
} | main.c: In function 'main':
main.c:5:19: error: invalid operands to binary & (have 'char *' and 'int')
5 | scanf("%d %d %d"&x,a,b);
| ~~~~~~~~~~^
| |
| char *
main.c:8:3: error: expected '}' before 'else'
8 | else if (b-a<x+1){
| ^~~~
|
s055797694 | p03679 | Java | import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int x = sc.nextInt();
int a = sc.nextInt();
int b = sc.nextInt();
if(b <= a){
System.out.println("delisious");
}else if(b-a <= 0 && b-a <= x){
System.out.printl... | Main.java:15: error: reached end of file while parsing
}
^
1 error
|
s493211041 | p03679 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int x, a, b;
cin >> x >> a >> b;
if(b - a < = x){
cout << "delicious" << endl;
}else if(b - a >= x){
cout << "safe" << endl;
}else{
cout << "dangerous" << endl;
}
} | a.cc: In function 'int main()':
a.cc:7:12: error: expected primary-expression before '=' token
7 | if(b - a < = x){
| ^
|
s191030421 | p03679 | Java | public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int x = sc.nextInt();
int a = sc.nextInt();
int b = sc.nextInt();
if (b <= a) {
System.out.println("delicious");
return;
}
if (b-a <= x) {
... | Main.java:3: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:3: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s812861474 | p03679 | C++ | #include<bits/stdc++.h>
#define rep(i,a,n) for (int i = a;i < n;i++)
using namespace std;
int main() {
int x, a, b; cin >> x >> a >> b;
if (b - a <= 0) {
cout << "delicious" << endl;
} else if (b - a <= x) {
cout << "safe" << endl;
} else {
cout << "dangerous" << endl;
}
} | a.cc:6:17: error: extended character is not valid in an identifier
6 | int x, a, b; cin >> x >> a >> b;
| ^
a.cc: In function 'int main()':
a.cc:6:17: error: '\U00003000cin' was not declared in this scope
6 | int x, a, b; cin >> x >> a >> b;
| ^~~~~
|
s709474497 | p03679 | C++ | #include<stdio.h>
int main(void)
{
int X,A,B,c;
scanf("%d %d %d",&X,&A,&B);
c=A*-1;
if(B>=c&&B<=0){
printf("delicious\n");
}
if(B>=0&&B=<X){
printf("safe\n");
}
if(B>=X+1){
printf("dangerous\n");
}
return 0;
} | a.cc: In function 'int main()':
a.cc:10:20: error: expected primary-expression before '<' token
10 | if(B>=0&&B=<X){
| ^
|
s125318354 | p03679 | C++ | #include<stdio.h>
int main(void)
{
int X,A,B,c,d;
scanf("%d %d %d",&X,&A,&B);
c=A*-1;
d=c+B;
if(d=<0){
printf("delicious\n");
}
if(d>=0&&d=<X){
printf("safe\n");
}
if(d>=X+1){
printf("dangerous\n");
}
return 0;
} | a.cc: In function 'int main()':
a.cc:8:14: error: expected primary-expression before '<' token
8 | if(d=<0){
| ^
a.cc:11:20: error: expected primary-expression before '<' token
11 | if(d>=0&&d=<X){
| ^
|
s317817146 | p03679 | C++ | #include <iostream>
#include <string>
#include <cmath>
using namespace std;
#define Rep(i, n) for(int i = 0; i < (int)(n); i++)
#define PrintLn(X) cout << X << endl
int main(void)
{
int x, a, b;
cin >> x >> a >> b;
if(b <= a){
PrintLn("delicious")
}else if(b <= a + x){
PrintLn("safe")
}else{
PrintLn("danger... | a.cc: In function 'int main()':
a.cc:14:9: error: expected ';' before '}' token
14 | }else if(b <= a + x){
| ^
a.cc:16:9: error: expected ';' before '}' token
16 | }else{
| ^
a.cc:18:9: error: expected ';' before '}' token
18 | }
| ^
|
s342602096 | p03679 | Java | mport java.util.Scanner;
public class No3 {
public static void main(String[] args) {
System.out.println("賞味期限の超過許容日数、賞味期限の何日前
に買ってきたか、買ってから何日後に食べたかを入力してください");
System.out.println("例: 5 3 2");
System.out.println("→賞味期限を5日過ぎて食べてもお腹を壊さ
ない");
System.... | Main.java:1: error: class, interface, enum, or record expected
mport java.util.Scanner;
^
Main.java:6: error: unclosed string literal
System.out.println("????????????????????
^
Main.java:7: error: illegal character: '\u3001'
??????????????????????????????");
^
M... |
s209149270 | p03679 | C | #include <stdio.h>
int main()
{
int x,a,b;
while (scanf("%d %d %d",&x,&a,&b)!=EOF)
{
if(b-a>x) printf("dangerous\n");
else
{
if(b-a<=x&&b+a!=x)
printf("safe\n");
else
printf("delicious\n")
}
}
} | main.c: In function 'main':
main.c:13:38: error: expected ';' before '}' token
13 | printf("delicious\n")
| ^
| ;
14 | }
| ~
|
s995449558 | p03679 | C++ | #include <bits/stdc++.h>
using namespace std;
signed main(){
int x,a,b;
scanf("%d%d%d",&x,&a,&b);
if(a-b > x){
puts("dangerous\n");
}
else if(a-b <= x){
puts("delicious\n");
} else {
puts("safe\n");
}
| a.cc: In function 'int main()':
a.cc:14:2: error: expected '}' at end of input
14 | }
| ^
a.cc:4:14: note: to match this '{'
4 | signed main(){
| ^
|
s843319335 | p03679 | C++ | # -*- coding: utf-8 -*-
x, a, b = (int(i) for i in input().split())
if a - b >= 0:
print("delicious")
elif a + x - b >= 0:
print("safe")
else:
print("dangerous") | a.cc:1:3: error: invalid preprocessing directive #-
1 | # -*- coding: utf-8 -*-
| ^
a.cc:3:1: error: 'x' does not name a type
3 | x, a, b = (int(i) for i in input().split())
| ^
|
s210980827 | p03679 | C++ | main(N,A){scanf("%d%d",&N,&A);printf("%d",N*N-A);} | a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token
1 | main(N,A){scanf("%d%d",&N,&A);printf("%d",N*N-A);}
| ^
|
s322563937 | p03679 | C++ | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define REP3(i, m, n) for(int i = m, i##_len=(n);i < i##_len;i++)
#define FORVEC(i, v) for(int i = 0;i < v.size();i++)
#define INF 1000000000
#define pb(a) push_back(... | a.cc: In function 'int main()':
a.cc:18:42: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
18 | cout<<"delicious"<endl;
| ~~~~~~~~~~~~~~~~~^~~~~
In file included from /usr/include/c++/14/... |
s111290983 | p03679 | C++ | package main
import (
"fmt"
)
func main() {
var x, a, b int
fmt.Scan(&x, &a, &b)
if b-a <= 0 {
fmt.Println("delicious")
} else if b-a <= x {
fmt.Println("safe")
} else {
fmt.Println("dangerous")
}
}
| a.cc:1:1: error: 'package' does not name a type
1 | package main
| ^~~~~~~
|
s750187262 | p03679 | C++ | #include<iostream>
using namespace std;
int main(){
#include<iostream>
(ソ^▽^)ナ
(ソ^▽^)ナ🕙 | a.cc:5:4: error: extended character ▽ is not valid in an identifier
5 | (ソ^▽^)ナ
| ^
a.cc:6:4: error: extended character ▽ is not valid in an identifier
6 | (ソ^▽^)ナ🕙
| ^
a.cc: In function 'int main()':
a.cc:5:2: error: '\U0000ff7f' was not declared in this scope
5 | (ソ^▽^)ナ
| ^
a.cc... |
s910604055 | p03679 | C++ | #include <iostream>
using namespace std;
int main()
{
int x,a,b;
cin >> a >> b >> c;
if(a-b<0){
cout << "delicous" << endl;
}else if(a-b>0 || a-b<x){
cout << "safe" << endl;
}else if(a-b>x){
cout << "dangerous" << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:8:20: error: 'c' was not declared in this scope
8 | cin >> a >> b >> c;
| ^
|
s623069821 | p03679 | C++ | #include <cstdio>
int a, b, x;
int main(){
scanf("%d %d %d", &x, &a, &b);
if(b - a <= x) printf("safe\n")
else if(b - a >= x + 1) printf("dangerous\n");
else printf("delicious\n");
return 0;
}
| a.cc: In function 'int main()':
a.cc:8:36: error: expected ';' before 'else'
8 | if(b - a <= x) printf("safe\n")
| ^
| ;
9 | else if(b - a >= x + 1) printf("dangerous\n");
| ~~~~
|
s754552988 | p03679 | C | #include<stdio.h>
int main(void){
int x,a,b;
scanf("%d %d %d",&x,&a,&b);
if(b-a<=0){
printf("delicious\n");
}
else if(b-a<=X){
printf("safe\n");
}
else
{
printf("dangerous\n");
}
return 0;
}
| main.c: In function 'main':
main.c:11:16: error: 'X' undeclared (first use in this function)
11 | else if(b-a<=X){
| ^
main.c:11:16: note: each undeclared identifier is reported only once for each function it appears in
|
s602292093 | p03679 | C | #include<stdio.h>
int main(void)
{
int x,a,b;
scanf(”%d%d%d”, &x, &a, &b);
if (-a+b <= 0)printf(”delicious\n”);
else if(-a+b <= x)printf(”safe\n”);
else printf (”dangerous\n”);
return 0;
} | main.c: In function 'main':
main.c:5:7: error: stray '\342' in program
5 | scanf(<U+201D>%d%d%d<U+201D>, &x, &a, &b);
| ^~~~~~~~
main.c:5:8: error: expected expression before '%' token
5 | scanf(”%d%d%d”, &x, &a, &b);
| ^
main.c:5:14: error: stray '\342' in program
5 | scanf(<U+201D... |
s690405130 | p03679 | C | #include<stdio.h>
int main(void)
{
int x,a,b;
scanf(”%d%d%d”, &x, &a, &b);
if (−a + b <= 0)printf(”delicious\n”);
else if (−a + b <= x)printf(”safe\n”);
else printf (”dangerous\n”);
return 0;
} | main.c: In function 'main':
main.c:5:7: error: stray '\342' in program
5 | scanf(<U+201D>%d%d%d<U+201D>, &x, &a, &b);
| ^~~~~~~~
main.c:5:8: error: expected expression before '%' token
5 | scanf(”%d%d%d”, &x, &a, &b);
| ^
main.c:5:14: error: stray '\342' in program
5 | scanf(<U+201D... |
s650983891 | p03679 | C | #include<stdio .h>
int main(void)
{
int x,a,b;
scanf(”%d%d%d”, &x, &a, &b);
if (−a + b <= 0)printf(”delicious\n”);
else if (−a + b <= x)printf(”safe\n”);
else printf (”dangerous\n”);
return 0;
} | main.c:1:9: fatal error: stdio .h: No such file or directory
1 | #include<stdio .h>
| ^~~~~~~~~~
compilation terminated.
|
s022394689 | p03679 | C | #include<stdio .h> int main()
{
int x,a,b;
scanf(”%d%d%d”, &x, &a, &b);
if (−a + b <= 0)printf(”delicious\n”); else if (−a + b <= x)printf(”safe\n”); else printf (”dangerous\n”);
} | main.c:1:20: warning: extra tokens at end of #include directive
1 | #include<stdio .h> int main()
| ^~~
main.c:1:9: fatal error: stdio .h: No such file or directory
1 | #include<stdio .h> int main()
| ^~~~~~~~~~
compilation terminated.
|
s482961753 | p03679 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int x,a,b;
cin >> x >> a >> b;
if(b <= a) cout << "delicious" << endl;;
else if(b <= a+x) cout << "safe" << endl;;
else cout << "dangerous" << endl;;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:3: error: 'else' without a previous 'if'
9 | else if(b <= a+x) cout << "safe" << endl;;
| ^~~~
a.cc:10:3: error: 'else' without a previous 'if'
10 | else cout << "dangerous" << endl;;
| ^~~~
|
s337414119 | p03679 | C++ | #include<iostream>
using namespace std;
int main(){
int x, a, b;
cin >> x >> a >> b;
if (b <= a){
cout << "delicious" << endl;
return 0;
}
else if (b > a){
if (b - a < =x+1){
cout << "safe" << endl;
}
else{
cout << "dangerous" << endl;
}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:11:29: error: expected primary-expression before '=' token
11 | if (b - a < =x+1){
| ^
|
s317672497 | p03679 | C++ | #include<iostream>
using namespace std;
int main(){
int x, a, b;
cin >> x >> a >> b;
if (b <= a){
cout << "delicious" << endl;
return 0;
}
else if (b > a){
if (b - a < =x+1){
cout << "safe" << endl;
}
else{
cout << "dangerous" << endl;
}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:11:29: error: expected primary-expression before '=' token
11 | if (b - a < =x+1){
| ^
|
s890533734 | p03679 | C++ | #include<iostream>
int main(){
int x,y,z;
cin>>x>>y>>z;
if(z-y>=0){
cout << "delicious" << endl;
}
else if(z-y <= x){
cout << "safe" << endl;
}
else{
cout << "dangerous" << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
4 | cin>>x>>y>>z;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to... |
s671637227 | p03679 | C++ | import Data.List
main = putStrLn . solve . map read . words =<< getLine
solve :: [Int] -> String
solve [x, a, b]
| b - a <= 0 = "delicious"
| b - a <= x = "safe"
| otherwise = "dangerous"
| a.cc:1:1: error: 'import' does not name a type
1 | import Data.List
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
|
s837691075 | p03679 | Java | import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Mon3 {
public static void main(String[] args) {
int d,A,B;
int min = 1;
Double max = Math.pow(10, 9);
String str;
InputStreamReader inp = new InputStreamReader(System.in);
BufferedReader br = new BufferedRead... | Main.java:11: error: class Mon3 is public, should be declared in a file named Mon3.java
public class Mon3 {
^
1 error
|
s334872400 | p03679 | C++ | Ffccv | a.cc:1:1: error: 'Ffccv' does not name a type
1 | Ffccv
| ^~~~~
|
s365760524 | p03679 | C++ | <?php
$stdin = trim(fgets(STDIN));
$pieces = explode(" ", $stdin);
$d = $pieces[0];
$a = $pieces[1];
$b = $pieces[2];
if($a >= $b){
echo "delicious";
}else if($b - $a <= $d){
echo "safe";
}else{
echo "dangerous";
}
?> | a.cc:1:1: error: expected unqualified-id before '<' token
1 | <?php
| ^
a.cc:3:4: error: '$pieces' does not name a type
3 | $pieces = explode(" ", $stdin);
| ^~~~~~~
a.cc:4:4: error: '$d' does not name a type
4 | $d = $pieces[0];
| ^~
a.cc:5:4: error: '$a' does not name a type
... |
s887282068 | p03679 | Java | public static void main(String[] args) throws IOException {
// Here your code !
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String[] lineArray = br.readLine().split(" ", 0);
int d = Integer.parseInt(lineArray[0]);
int a = Integer.parseInt(lineArray[1... | Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args) throws IOException {
^
(use --enable-preview to enable unnamed classes)
1 error
|
s618788179 | p03679 | Java | public static void main(String[] args) throws IOException {
// Here your code !
BufferedReader br = new BufferedReader(new
InputStreamReader(System.in));
String[] lineArray = br.readLine().split(" ", 0);
int d = Integer.parseInt(lineArray[0]);
int a = Integer.parseInt(lineArray[1... | Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args) throws IOException {
^
(use --enable-preview to enable unnamed classes)
1 error
|
s598171527 | p03679 | Java | BufferedReader br = new BufferedReader(new
InputStreamReader(System.in));
String[] lineArray = br.readLine().split(" ", 0);
int d = Integer.parseInt(lineArray[0]);
int a = Integer.parseInt(lineArray[1]);
int b = Integer.parseInt(lineArray[2]);
if (b <= a) {
S... | Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
BufferedReader br = new BufferedReader(new
^
(use --enable-preview to enable unnamed classes)
Main.java:8: error: class, interface, enum, or record expected
if (b <= a) {
^
Main.java:10: error: class... |
s366451999 | p03679 | Java | public static void main(String[] args) throws IOException {
// Here your code !
BufferedReader br = new BufferedReader(new
InputStreamReader(System.in));
String[] lineArray = br.readLine().split(" ", 0);
int d = Integer.parseInt(lineArray[0]);
int a = Integer.parseInt(lineArr... | Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args) throws IOException {
^
(use --enable-preview to enable unnamed classes)
1 error
|
s837436173 | p03679 | C++ | x,a,b = list(map(int, input().split()))
if b - a <= 0:
print("delicious")
elif b - a <= x:
print("safe")
else:
print("dangerous")
| a.cc:1:1: error: 'x' does not name a type
1 | x,a,b = list(map(int, input().split()))
| ^
|
s672328216 | p03679 | C++ | #include <iostream>
using namespace std;
int main(void){
// Here your code !
int x,a,b,z=0;
cin>>x>>a>>b;
if(x+1+a>b){
if(a-b>0){cout<<"delicious"<<endl;}
if else(a-b==0){cout<<"delicious"<<endl;}
else{cout<<"safe"<<endl;}
}
else{c... | a.cc: In function 'int main()':
a.cc:13:12: error: expected '(' before 'else'
13 | if else(a-b==0){cout<<"delicious"<<endl;}
| ^~~~
| (
a.cc:15:13: error: expected '}' before 'else'
15 | else{cout<<"safe"<<endl;}
| ^~~~
a.cc:9:16: note: to ma... |
s982584133 | p03679 | C++ | #include<iostream>
using namespace std;
int main() {
int X , A , B ;
cin >> X >> A >> B ;
if (B<=A) {
cout <<"delicious" ;
}
else if (A<B<=A+X) {
cout <<"safe" ;
}
else {
cout <<"dangerous" ;
}
return 0;
} | a.cc:3:1: error: extended character is not valid in an identifier
3 |
| ^
a.cc:5:1: error: extended character is not valid in an identifier
5 |
| ^
a.cc:7:1: error: extended character is not valid in an identifier
7 |
| ^
a.cc:9:1: error: extended character is not valid in an... |
s564713992 | p03679 | C++ | #include <iostream>
using namespace std;
int main() {
int X,A,B ;
cin >>X>>A>>B ;
if (B<=A) {
cout <<"delicious"<< endl ;
}
if (A<B<=A+X) {
cout <<"safe"<< endl ;
}
if (B>A+X){
cout <<"dangerous"<< endl ;
}
return 0;
} | a.cc:3:1: error: extended character is not valid in an identifier
3 |
| ^
a.cc:5:1: error: extended character is not valid in an identifier
5 |
| ^
a.cc:7:1: error: extended character is not valid in an identifier
7 |
| ^
a.cc:9:1: error: extended character is not valid in an... |
s805385387 | p03679 | C++ | #include <iostream>
using namespace std;
int main() {
int X,A,B ;
cin >>X>>A>>B ;
if (B<=A) {
cout <<"delicious"<< endl ;
}
if (A<B<=A+X) {
cout <<"safe"<< endl ;
}
if (B>A+X){
cout >>"dangerous">> endl ;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:19:6: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [10]')
19 | cout >>"dangerous">> endl ;
| ~~~~ ^~~~~~~~~~~~~
| | |
| | const char [10]
| std::ostream {aka std::basic_ostrea... |
s488570479 | p03679 | C | #include<stdio.h>
int main(){
int X,A,B;
scanf("%d %d %d",X,A,B);
if(A-B>=0){
printf("delicious");
}else if(A-B+X=>0){
printf("safe");
}else{
printf("dangerous");
}
return 0;
} | main.c: In function 'main':
main.c:7:20: error: expected expression before '>' token
7 | }else if(A-B+X=>0){
| ^
|
s329482184 | p03679 | C | #include<stdio.h>
int main(){
long int X,A,B;
scanf("%d %d %d",&X,&A,&B);
if(A-B>=0){
printf("delicious");
}else if(A-B+X=>0){
printf("safe");
}else{
printf("dangerous");
}
return 0;
} | main.c: In function 'main':
main.c:7:20: error: expected expression before '>' token
7 | }else if(A-B+X=>0){
| ^
|
s786880390 | p03679 | C | #include<stdio.h>
int main(){
long int X,A,B;
scanf("%d %d %d",X,A,B);
if(A-B>=0){
printf("delicious");
}else if(A-B+X=>0){
printf("safe");
}else{
printf("dangerous");
}
return 0;
} | main.c: In function 'main':
main.c:7:20: error: expected expression before '>' token
7 | }else if(A-B+X=>0){
| ^
|
s803614662 | p03679 | C++ | #include <stdio.h>
int main(void)
{
int a[3];
char zy[100];
scanf("%d %d %d",&a[0],&a[1],&a[2]);
if(a[2]-a[1]<1){
strcpy(zy,"delicious");
}else if(a[2]-a[1]-a[0]<1){
strcpy(zy,"safe");
}else{
strcpy(zy,"dengerous");
}
printf("%s\n",zy);
} | a.cc: In function 'int main()':
a.cc:9:17: error: 'strcpy' was not declared in this scope
9 | strcpy(zy,"delicious");
| ^~~~~~
a.cc:2:1: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <stdio.h>
+++ |+#... |
s776108129 | p03679 | C++ | #include <stdio.h>
int main(void)
{
int a[3];
char zy[100];
scanf("%d %d %d",&a[0],&a[1],&a[2]);
if(a[2]-a[1]<1){
strcpy(zy,"delicious");
}else if(a[2]-[1]-[0]<1){
strcpy(zy,"safe");
}else{
strcpy(zy,"dengerous");
}
printf("%s\n",zy);
} | a.cc: In function 'int main()':
a.cc:9:17: error: 'strcpy' was not declared in this scope
9 | strcpy(zy,"delicious");
| ^~~~~~
a.cc:2:1: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <stdio.h>
+++ |+#... |
s844734871 | p03679 | C++ | #include <stdio.h>
int main(void)
{
int a[3];
char zy;
scanf("%d %d %d",&a[0],&a[1],&a[2]);
if(a[2]-a[1]<1){
zy =("delicious");
}else if(a[2]-[1]-[0]<1){
zy =("safe");
}else{
zy =("dengerous");
}
printf("%d\n",zy);
} | a.cc: In function 'int main()':
a.cc:9:22: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
9 | zy =("delicious");
| ~^~~~~~~~~~~~
| |
| const char*
a.cc:10:24: error: expected identifier before nume... |
s782122652 | p03679 | C | #include<stdio.h>
int main()
{
int x,a,b;
scanf("%d %d %d",&x,&a,&b);
if((a-b)>=0){
printf("delicious\n");
}else if((a+x)<=0){
printf("safe\n");
}else{
printf("dangerous\n");
}
// 出力
printf("%d %s\n",a+b+c,s);
return 0;
} | main.c: In function 'main':
main.c:16:26: error: 'c' undeclared (first use in this function)
16 | printf("%d %s\n",a+b+c,s);
| ^
main.c:16:26: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:28: error: 's' undeclared (first use in th... |
s034929764 | p03679 | C | #include<stdio.h>
int main()
{
int x,a,b;
scanf("%d %d %d",&x,&a,&b);
if((a-b)>=0){
printf("delicious\n");
}else if((a+x)=<0){
printf("safe\n");
}else{
printf("dangerous\n");
}
// 出力
printf("%d %s\n",a+b+c,s);
return 0;
} | main.c: In function 'main':
main.c:9:20: error: expected expression before '<' token
9 | }else if((a+x)=<0){
| ^
main.c:16:26: error: 'c' undeclared (first use in this function)
16 | printf("%d %s\n",a+b+c,s);
| ^
main.c:16:26: note: each undeclared... |
s076906114 | p03679 | C++ | using namespace std;
int32_t main()
{
int32_t x, a, b;
cin >> x >> a >> b;
if (b <= a)
cout << "delicious" << endl;
else if (b <= (a + x))
cout << "dangerous" << endl;
else
cout << "safe" << endl;
return 0;
}
| a.cc:3:1: error: 'int32_t' does not name a type
3 | int32_t main()
| ^~~~~~~
a.cc:1:1: note: 'int32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
+++ |+#include <cstdint>
1 | using namespace std;
|
s627046539 | p03679 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int[] a = new int[n];
for (int i = 0; i<n; i++ ) {
a[i] = sc.nextInt();
}
int b = 1;
int c = 0;
int d = 0; //回数カウンター
//押されたボタ... | Main.java:12: error: illegal character: '\u3000'
int d = 0;?//???????
^
Main.java:16: error: illegal character: '\u3000'
d += 1;??//??????
^
Main.java:16: error: illegal character: '\u3000'
d += 1;??//??????
^
3 errors
|
s463587223 | p03679 | C++ | #include <stdio.h>
int main(void){
int a;
int b;
int x;
int c;
scanf("%d%d%d",&x,&a,&b);
c = b-a;
if(x>c){
printf("dangerous");
}else if(c<=0){
printf("delicious);
}else{
printf("safe");
}
} | a.cc:17:11: warning: missing terminating " character
17 | printf("delicious);
| ^
a.cc:17:11: error: missing terminating " character
17 | printf("delicious);
| ^~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:18:3: error: expected primary-expression before '}' token
18 | ... |
s174959158 | p03679 | C | #include<stdio . h>
int main ()
{
int x , a , b ;
scanf ("%d%d%d" , &x , &a , &b ) ;
i f ( -a+b<= 0)printf("delicious\n");
else if (-a+b<=x)printf("safe\n");
else printf ("dangerous\n");
} | main.c:1:9: fatal error: stdio . h: No such file or directory
1 | #include<stdio . h>
| ^~~~~~~~~~~
compilation terminated.
|
s259052107 | p03679 | C++ | #include <iostream>
using namespace std;
int main()
{
int X,A,B;
cin>>X>>A>>B;
if(X< B-A ){ cout << "dangerous";
else if (B-A>0) cout <<"safe";
else cout << "delicious";
}
return 0;
} | a.cc: In function 'int main()':
a.cc:10:8: error: expected '}' before 'else'
10 | else if (B-A>0) cout <<"safe";
| ^~~~
a.cc:9:13: note: to match this '{'
9 | if(X< B-A ){ cout << "dangerous";
| ^
a.cc: At global scope:
a.cc:14:9: error: expected unqualified-id before 'retu... |
s174110122 | p03679 | C++ | #include <iostream>
using namespace std;
int main()
{
int X,A,B;
cin>>X>>A>>B;
if(X< B-A ) cout << "dangerous";
elseif(B-A>0) cout <<"safe";
else cout << "delicious";
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:1: error: 'elseif' was not declared in this scope
10 | elseif(B-A>0) cout <<"safe";
| ^~~~~~
a.cc:11:2: error: 'else' without a previous 'if'
11 | else cout << "delicious";
| ^~~~
|
s671168659 | p03679 | C++ | #include <iostream>
using namespace std;
int main()
{
int X,A,B;
cin>>X>>A>>B;
if(X< B-A ) cout << "dangerous";
elseif(B-A>0) cout "safe";
else cout << "delicious";
return 0;
} | a.cc: In function 'int main()':
a.cc:10:1: error: 'elseif' was not declared in this scope
10 | elseif(B-A>0) cout "safe";
| ^~~~~~
a.cc:11:2: error: 'else' without a previous 'if'
11 | else cout << "delicious";
| ^~~~
|
s714903993 | p03679 | C++ | #include <iostream>
using namespace std;
int main()
{
int X,A,B;
cin>>X>>A>>B;
if(X< B-A ) cout << "dangerous";
elseif(B-A>0) cout "safe"
else cout << "delicious";
return 0;
} | a.cc: In function 'int main()':
a.cc:10:1: error: 'elseif' was not declared in this scope
10 | elseif(B-A>0) cout "safe"
| ^~~~~~
|
s058763736 | p03679 | C++ | a,b,c = map(int, input().split())
print('delicious' if c-b<=0 else 'safe' if 0<c-b<=a else 'dangerous')
| a.cc:2:7: warning: multi-character literal with 9 characters exceeds 'int' size of 4 bytes
2 | print('delicious' if c-b<=0 else 'safe' if 0<c-b<=a else 'dangerous')
| ^~~~~~~~~~~
a.cc:2:34: warning: multi-character character constant [-Wmultichar]
2 | print('delicious' if c-b<=0 else 'safe' if 0<c-b... |
s535215199 | p03679 | C++ | #include<iostream>
using namespace std;
int main(){
int X, A, B;
cin >> X;
cin >> A;
cin >> B;
if(A + B < X) cout << "delicious" << endl;
if(A + B >= X && A + B < X + 1) cout << "safe" << endl;
if(A + B >= X + 1)
} | a.cc: In function 'int main()':
a.cc:15:1: error: expected primary-expression before '}' token
15 | }
| ^
|
s046535289 | p03679 | C | #include <stdio.h>
int main(){
int X, A, B;
scanf("%d", &X);
scanf("%d", &A);
scanf("%d", &B);
int c = X +1 +A;
if(B <= A){
printf("delicious\n");
}else if(B <= c){
printf("safe\n");
}else(c <= B){
printf("dangerous\n");
}
} | main.c: In function 'main':
main.c:12:22: error: expected ';' before '{' token
12 | }else(c <= B){
| ^
| ;
|
s011858568 | p03679 | C | #include<stdio.h>
int main(){
int X,A,B;
scanf("%d %d %d",&X,&A,&B);
if(X>=A && A>=B)printf("delicious\n");
else if(B>=X && X>A)printf("safe\n");
else(B>A && A>=X)printf("dngerous\n");
return 0;
} | main.c: In function 'main':
main.c:11:18: error: expected ';' before 'printf'
11 | else(B>A && A>=X)printf("dngerous\n");
| ^~~~~~
| ;
|
s899619171 | p03679 | C | #include<stdio.h>
int main(){
int X,A,B;
scanf("%d %d %d",&X,&A,&B);
if(X>=A && A>=B)printf("delicious\n");
else if(B>=X && X>A)printf("safe\n");
else(B>A && A>=X)printf("dngerous\n");
return 0;
} | main.c: In function 'main':
main.c:11:18: error: expected ';' before 'printf'
11 | else(B>A && A>=X)printf("dngerous\n");
| ^~~~~~
| ;
|
s705006880 | p03679 | C++ | #include<stdio.h>
int main(){
int X,A,B;
scanf("%d %d %d",&X,&A,&B);
if(X>=A && A>=B)printf("delicious\n");
else if(B>=X && X>A)printf("safe\n");
else(B>A && A>=X)printf("dngerous\n");
return 0;
} | a.cc: In function 'int main()':
a.cc:11:18: error: expected ';' before 'printf'
11 | else(B>A && A>=X)printf("dngerous\n");
| ^~~~~~
| ;
|
s224414068 | p03679 | C | /*
高橋君は胃が強いので、賞味期限を X 日まで過ぎた食品を食べてもお腹を壊しません。 賞味期限を X+1 日以上過ぎた食品を食べると、お腹を壊します。
また、賞味期限を過ぎずに食べると、おいしく感じます。そうでない場合、おいしく感じません。
高橋君は、賞味期限の A 日前に食品を買ってきて、買ってから B 日後に食べました。
高橋君が食品をおいしく感じた場合 delicious を、おいしくは感じなかったがお腹は壊さなかった場合 safe を、お腹を壊した場合 dangerous を出力するプログラムを作成してください。
*/
#include<stdio . h>
int main () {
int x ,... | main.c:11:9: fatal error: stdio . h: No such file or directory
11 | #include<stdio . h>
| ^~~~~~~~~~~
compilation terminated.
|
s550105251 | p03679 | Java | public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
int x = sc.nextInt(); //賞味期限+x+1日でお腹を壊す
int a = sc.nextInt(); //賞味期限のa日前に買った
int b = sc.nextInt(); //買ってからb日後に食べた
if(b - a > 0){
//賞味期限内に食べた
System.out.println("del... | Main.java:5: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:5: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s780093257 | p03679 | C++ |
#include<iostream>
#include<Cstring>
using namespace std;
int main() {
int N;
int j = 0;
int b = 1;
int c[100000];
int d = 0;
int a[100000];
cin >> N;
for (int i = 1;i <= N;i++) {
cin >> a[i];
}
while (b != 2 && j<N) {
for (int k = 0;k <= j;k++) {
if (c[k] == b) d = 1;
}
c[j] = b;
if (d == 1)... | a.cc:3:9: fatal error: Cstring: No such file or directory
3 | #include<Cstring>
| ^~~~~~~~~
compilation terminated.
|
s719175271 | p03679 | C++ | #include<iostream>
#include<Cstring>
using namespace std;
int main(){
int N;
int j=0;
int b=1;
int c[100000];
int d=0;
int a[100000];
cin>>N;
for(int i=1;i<=N;i++){
cin>>a[i];
}
while(b!=2&&j<N){
c[j]=b;
for(int k=0;k<=j;k++){
if(c[k]==b) d=1;
}
if(d==1) break;
else {
j++;
b=a[b];
}
}
... | a.cc:2:9: fatal error: Cstring: No such file or directory
2 | #include<Cstring>
| ^~~~~~~~~
compilation terminated.
|
s979900001 | p03679 | C++ | #include <iostream>
#include <vector>
using namespace std;
class Edge {
public:
int from;
int to;
int cost;
Edge(int from, int to, int const): from{from}, to{to}, cost{cost} {}
bool operator<(const Edge& other) {
return this->cost < other.cost;
}
bool operator>(const Edge& other) {... | a.cc: In function 'int kruskal(int, std::vector<Edge>&)':
a.cc:58:5: error: 'sort' was not declared in this scope; did you mean 'short'?
58 | sort(edges.begin(), edges.end());
| ^~~~
| short
a.cc: In function 'int main()':
a.cc:80:5: error: 'sort' was not declared in this scope; did you mean ... |
s537588398 | p03679 | C++ | int main () {
int x, a , b;
scanf("%d%d%d", &x, &a, &b);
if (b - a <= 0) {
printf("delicious\n");
} else if (b - a > x) {
printf("dangerous\n");
} else {
printf("safe\n");
}
return 0;
} | a.cc: In function 'int main()':
a.cc:5:9: error: 'scanf' was not declared in this scope
5 | scanf("%d%d%d", &x, &a, &b);
| ^~~~~
a.cc:8:17: error: 'printf' was not declared in this scope
8 | printf("delicious\n");
| ^~~~~~
a.cc:1:1: note: 'printf' is d... |
s353835467 | p03679 | C++ | #include <iostream>
using namespace std;
int main(){
int X,A,B;
cin >> X >> A >> b;
if(A > B)
cout << "delicious\n";
else if(A+X < B)
cout << "dangerous\n";
else
cout << "safe\n";
}
| a.cc: In function 'int main()':
a.cc:8:26: error: 'b' was not declared in this scope
8 | cin >> X >> A >> b;
| ^
|
s606554464 | p03679 | Java | import java.io.*;
import java.util.*;
public class Solution{
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int x = scan.nextInt();
int a = scan.nextInt();
int b = scan.nextInt();
scan.close();
if... | Main.java:4: error: class Solution is public, should be declared in a file named Solution.java
public class Solution{
^
1 error
|
s574600163 | p03679 | Java | import java.io.*
import java.util.*
public class Solution{
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int x = scan.nextInt();
int a = scan.nextInt();
int b = scan.nextInt();
scan.close();
if(a>=b){
System.out.println("delicious... | Main.java:1: error: ';' expected
import java.io.*
^
Main.java:2: error: ';' expected
import java.util.*
^
2 errors
|
s141310249 | p03679 | Java | public class Main {
public static void main(String[] args) {
@SuppressWarnings("resource")
Scanner scan = new Scanner(System.in);
int X = scan.nextInt();
int A = scan.nextInt();
int B = scan.nextInt();
int delicious = B - A;//(賞味期限を過ぎた日数)
if(X+1 < A){
System.out.println("dangerous");
} else if... | Main.java:5: error: cannot find symbol
Scanner scan = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:5: error: cannot find symbol
Scanner scan = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s458218849 | p03679 | Java | public class Main {
public static void main(String[] args) {
@SuppressWarnings("resource")
Scanner scan = new Scanner(System.in);
int X = scan.nextInt();
int A = scan.nextInt();
int B = scan.nextInt();
int delicious = B - A;//(賞味期限を過ぎた日数)
if(X+1 < A){
System.out.println("dangerous");
} else if... | Main.java:5: error: cannot find symbol
Scanner scan = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:5: error: cannot find symbol
Scanner scan = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.