criyle/codenet-compile-errors huggingface dataset:
Language: 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;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:20: error: expected primary-expression before '<' token
   10 |         if(B>=0&&B=<X){
      |                    ^
Language: 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;
}

Compiler output:
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){
      |                    ^
Language: 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("dangerous")
	}
	return 0;
}


Compiler output:
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 |         }
      |         ^
Language: 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.out.println("　賞味期限の3日前に買ってきた");
                System.out.println("　買ってから2日後に食べた");
                System.out.print("input:");
                Scanner sc = new Scanner(System.in);
                int d = sc.nextInt();
                int a = sc.nextInt();
                int b = sc.nextInt();
                sc.close();

                if(a >= b){
                        System.out.println("delicious");
                }else if(a >= b - d){
                        System.out.println("safe");
                }else{
                        System.out.println("dangerous");
                }
        }

}

Compiler output:
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'
??????????????????????????????");
       ^
Main.java:7: error: not a statement
??????????????????????????????");
^
Main.java:7: error: unclosed string literal
??????????????????????????????");
                              ^
Main.java:7: error: not a statement
??????????????????????????????");
        ^
Main.java:9: error: unclosed string literal
                System.out.println("??????5?????????????
                                   ^
Main.java:10: error: unclosed string literal
??");
  ^
Main.java:10: error: not a statement
??");
^
9 errors
Language: 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")
        }
    
    }
}

Compiler output:
main.c: In function 'main':
main.c:13:38: error: expected ';' before '}' token
   13 |                 printf("delicious\n")
      |                                      ^
      |                                      ;
   14 |         }
      |         ~
Language: 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");
}


Compiler output:
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(){
      |              ^
Language: 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")

Compiler output:
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())
      | ^
Language: 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")
	}
}


Compiler output:
a.cc:1:1: error: 'package' does not name a type
    1 | package main
      | ^~~~~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
#include<iostream>
(ｿ^▽^)ﾅ
(ｿ^▽^)ﾅ🕙

Compiler output:
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:5:4: error: '\U000025bd' was not declared in this scope
    5 | (ｿ^▽^)ﾅ
      |    ^
a.cc:5:6: error: expected primary-expression before ')' token
    5 | (ｿ^▽^)ﾅ
      |      ^
a.cc:6:10: error: expected '}' at end of input
    6 | (ｿ^▽^)ﾅ🕙
      |          ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: 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;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:20: error: 'c' was not declared in this scope
    8 |   cin >> a >> b >> c;
      |                    ^
Language: 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;
}


Compiler output:
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");
      |     ~~~~
Language: 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;
}


Compiler output:
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
Language: 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;
}

Compiler output:
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>%d%d%d<U+201D>, &x, &a, &b);
      |                     ^~~~~~~~
main.c:6:22: error: stray '\342' in program
    6 | if (-a+b <= 0)printf(<U+201D>delicious\n<U+201D>);
      |                      ^~~~~~~~
main.c:6:32: error: stray '\' in program
    6 | if (-a+b <= 0)printf(”delicious\n”);
      |                                ^
main.c:6:23: error: 'delicious' undeclared (first use in this function)
    6 | if (-a+b <= 0)printf(”delicious\n”);
      |                       ^~~~~~~~~
main.c:6:23: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:32: error: expected ')' before 'n'
    6 | if (-a+b <= 0)printf(”delicious\n”);
      |                     ~          ^~
      |                                )
main.c:6:34: error: stray '\342' in program
    6 | if (-a+b <= 0)printf(<U+201D>delicious\n<U+201D>);
      |                                         ^~~~~~~~
main.c:7:26: error: stray '\342' in program
    7 | else if(-a+b <= x)printf(<U+201D>safe\n<U+201D>);
      |                          ^~~~~~~~
main.c:7:31: error: stray '\' in program
    7 | else if(-a+b <= x)printf(”safe\n”);
      |                               ^
main.c:7:27: error: 'safe' undeclared (first use in this function)
    7 | else if(-a+b <= x)printf(”safe\n”);
      |                           ^~~~
main.c:7:31: error: expected ')' before 'n'
    7 | else if(-a+b <= x)printf(”safe\n”);
      |                         ~     ^~
      |                               )
main.c:7:33: error: stray '\342' in program
    7 | else if(-a+b <= x)printf(<U+201D>safe\n<U+201D>);
      |                                        ^~~~~~~~
main.c:8:14: error: stray '\342' in program
    8 | else printf (<U+201D>dangerous\n<U+201D>);
      |              ^~~~~~~~
main.c:8:24: error: stray '\' in program
    8 | else printf (”dangerous\n”);
      |                        ^
main.c:8:15: error: 'dangerous' undeclared (first use in this function)
    8 | else printf (”dangerous\n”);
      |               ^~~~~~~~~
main.c:8:24: error: expected ')' before 'n'
    8 | else printf (”dangerous\n”);
      |             ~          ^~
      |                        )
main.c:8:26: error: stray '\342' in program
    8 | else printf (<U+201D>dangerous\n<U+201D>);
      |                                 ^~~~~~~~
Language: 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;
}

Compiler output:
main.c:1:9: fatal error: stdio .h: No such file or directory
    1 | #include<stdio .h>
      |         ^~~~~~~~~~
compilation terminated.
Language: 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”);
}

Compiler output:
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.
Language: 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;
  }

Compiler output:
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;;
      |   ^~~~
Language: 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;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:29: error: expected primary-expression before '=' token
   11 |                 if (b - a < =x+1){
      |                             ^
Language: 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;
}

Compiler output:
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 standard input
      |                  ^~~
a.cc:6:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |     cout << "delicious" << endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:6:28: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 |     cout << "delicious" << endl;
      |                            ^~~~
      |                            std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:9:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |     cout << "safe" << endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:9:23: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    9 |     cout << "safe" << endl;
      |                       ^~~~
      |                       std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:12:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 |     cout << "dangerous" << endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:12:28: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   12 |     cout << "dangerous" << endl;
      |                            ^~~~
      |                            std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: 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"


Compiler output:
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'
Language: 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 BufferedReader(inp);




		try {

			str = br.readLine();

			d = Integer.parseInt(str);

			while(d < min){

				System.out.println("1以上の整数を入力してください");

				str = br.readLine();

				d = Integer.parseInt(str);

			}

			str = br.readLine();

			A = Integer.parseInt(str);

			while(max < A){

				System.out.println("10^9以下の整数を入力してください");

				str = br.readLine();

				A = Integer.parseInt(str);

			}

			str = br.readLine();

			B = Integer.parseInt(str);

			while(max < A){

				System.out.println("10^9以下の整数を入力してください");

				str = br.readLine();

				B = Integer.parseInt(str);

			}

			Mon3 mon3 = new Mon3();

			mon3.method(d,A,B);




		} catch (Exception e) {

			System.out.println("数字以外の入力がありました");

			e.printStackTrace();

		}




	}




	void method(int d,int A,int B){

		int deadLine;

		deadLine = -A+B;

		if(deadLine <= 0){

			System.out.println("delicious");

		}

		if(0 < deadLine && deadLine <=d ){

			System.out.println("Safe");

		}

		if(d < deadLine  ){

			System.out.println("dangerous");

		}

	}

}

Compiler output:
Main.java:11: error: class Mon3 is public, should be declared in a file named Mon3.java
public class Mon3 {
       ^
1 error
Language: 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";
   }
?>

Compiler output:
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
    5 |    $a = $pieces[1];
      |    ^~
a.cc:6:4: error: '$b' does not name a type
    6 |    $b = $pieces[2];
      |    ^~
a.cc:8:4: error: expected unqualified-id before 'if'
    8 |    if($a >= $b){
      |    ^~
a.cc:10:5: error: expected unqualified-id before 'else'
   10 |    }else if($b - $a <= $d){
      |     ^~~~
a.cc:12:5: error: expected unqualified-id before 'else'
   12 |    }else{
      |     ^~~~
a.cc:15:1: error: expected unqualified-id before '?' token
   15 | ?>
      | ^
Language: 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]);
        int b = Integer.parseInt(lineArray[2]);

        if (b <= a) {
            System.out.println("delicious");
        } else if (b <= a + d) {
            System.out.println("safe");
        } else if (b > a + d) {
            System.out.println("dangerous");
        }
    }

Compiler output:
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
Language: 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]);
        int b = Integer.parseInt(lineArray[2]);

        if (b <= a) {
            System.out.println("delicious");
        } else if (b <= a + d) {
            System.out.println("safe");
        } else if (b > a + d) {
            System.out.println("dangerous");
        }
    }

Compiler output:
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
Language: 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) {
            System.out.println("delicious");
        } else if (b <= a + d) {
            System.out.println("safe");
        } else if (b > a + d) {
            System.out.println("dangerous");
        }
    

Compiler output:
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, interface, enum, or record expected
        } else if (b <= a + d) {
        ^
Main.java:12: error: class, interface, enum, or record expected
        } else if (b > a + d) {
        ^
Main.java:14: error: class, interface, enum, or record expected
        }
        ^
5 errors
Language: 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]);
        int b = Integer.parseInt(lineArray[2]);

        if (b <= a) {
            System.out.println("delicious");
        } else if (b <= a + d) {
            System.out.println("safe");
        } else if (b > a + d) {
            System.out.println("dangerous");
        }
    }

Compiler output:
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
Language: C++

x,a,b = list(map(int, input().split()))
if b - a <= 0:
    print("delicious")
elif b - a <= x:
    print("safe")
else:
    print("dangerous")


Compiler output:
a.cc:1:1: error: 'x' does not name a type
    1 | x,a,b = list(map(int, input().split()))
      | ^
Language: 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{cout<<"dangerous"<<endl;}
    
    }


Compiler output:
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 match this '{'
    9 |     if(x+1+a>b){
      |                ^
a.cc: At global scope:
a.cc:17:5: error: expected unqualified-id before 'else'
   17 |     else{cout<<"dangerous"<<endl;}
      |     ^~~~
a.cc:19:5: error: expected declaration before '}' token
   19 |     }
      |     ^
Language: 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;
}

Compiler output:
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 identifier
    9 |  
      | ^
a.cc:13:1: error: extended character   is not valid in an identifier
   13 |  
      | ^
a.cc:17:1: error: extended character   is not valid in an identifier
   17 |  
      | ^
a.cc:21:1: error: extended character   is not valid in an identifier
   21 |  
      | ^
a.cc:3:1: error: '\U000000a0' does not name a type
    3 |  
      | ^
Language: 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;
}

Compiler output:
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 identifier
    9 |  
      | ^
a.cc:13:1: error: extended character   is not valid in an identifier
   13 |  
      | ^
a.cc:17:1: error: extended character   is not valid in an identifier
   17 |  
      | ^
a.cc:21:1: error: extended character   is not valid in an identifier
   21 |  
      | ^
a.cc:3:1: error: '\U000000a0' does not name a type
    3 |  
      | ^
Language: 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;
}

Compiler output:
main.c: In function 'main':
main.c:7:20: error: expected expression before '>' token
    7 |     }else if(A-B+X=>0){
      |                    ^
Language: 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;
}

Compiler output:
main.c: In function 'main':
main.c:7:20: error: expected expression before '>' token
    7 |     }else if(A-B+X=>0){
      |                    ^
Language: 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;
}

Compiler output:
main.c: In function 'main':
main.c:7:20: error: expected expression before '>' token
    7 |     }else if(A-B+X=>0){
      |                    ^
Language: 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);
}

Compiler output:
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>
  +++ |+#include <cstring>
    2 | 
a.cc:11:17: error: 'strcpy' was not declared in this scope
   11 |                 strcpy(zy,"safe");
      |                 ^~~~~~
a.cc:11:17: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:13:17: error: 'strcpy' was not declared in this scope
   13 |                 strcpy(zy,"dengerous");
      |                 ^~~~~~
a.cc:13:17: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: 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);
}

Compiler output:
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>
  +++ |+#include <cstring>
    2 | 
a.cc:10:24: error: expected identifier before numeric constant
   10 |         }else if(a[2]-[1]-[0]<1){
      |                        ^
a.cc: In lambda function:
a.cc:10:26: error: expected '{' before '-' token
   10 |         }else if(a[2]-[1]-[0]<1){
      |                          ^
a.cc: In function 'int main()':
a.cc:10:22: error: no match for 'operator-' (operand types are 'int' and 'main()::<lambda()>')
   10 |         }else if(a[2]-[1]-[0]<1){
      |                  ~~~~^~~~
      |                     | |
      |                     | main()::<lambda()>
      |                     int
a.cc:10:28: error: expected identifier before numeric constant
   10 |         }else if(a[2]-[1]-[0]<1){
      |                            ^
a.cc:10:31: error: expected identifier before numeric constant
   10 |         }else if(a[2]-[1]-[0]<1){
      |                               ^
a.cc:10:31: error: expected '>' before numeric constant
a.cc: In lambda function:
a.cc:10:32: error: expected '{' before ')' token
   10 |         }else if(a[2]-[1]-[0]<1){
      |                                ^
a.cc: In function 'int main()':
a.cc:11:17: error: 'strcpy' was not declared in this scope
   11 |                 strcpy(zy,"safe");
      |                 ^~~~~~
a.cc:11:17: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:13:17: error: 'strcpy' was not declared in this scope
   13 |                 strcpy(zy,"dengerous");
      |                 ^~~~~~
a.cc:13:17: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: 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);
}

Compiler output:
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 numeric constant
   10 |         }else if(a[2]-[1]-[0]<1){
      |                        ^
a.cc: In lambda function:
a.cc:10:26: error: expected '{' before '-' token
   10 |         }else if(a[2]-[1]-[0]<1){
      |                          ^
a.cc: In function 'int main()':
a.cc:10:22: error: no match for 'operator-' (operand types are 'int' and 'main()::<lambda()>')
   10 |         }else if(a[2]-[1]-[0]<1){
      |                  ~~~~^~~~
      |                     | |
      |                     | main()::<lambda()>
      |                     int
a.cc:10:28: error: expected identifier before numeric constant
   10 |         }else if(a[2]-[1]-[0]<1){
      |                            ^
a.cc:10:31: error: expected identifier before numeric constant
   10 |         }else if(a[2]-[1]-[0]<1){
      |                               ^
a.cc:10:31: error: expected '>' before numeric constant
a.cc: In lambda function:
a.cc:10:32: error: expected '{' before ')' token
   10 |         }else if(a[2]-[1]-[0]<1){
      |                                ^
a.cc: In function 'int main()':
a.cc:11:22: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   11 |                 zy =("safe");
      |                     ~^~~~~~~
      |                      |
      |                      const char*
a.cc:13:22: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   13 |                 zy =("dengerous");
      |                     ~^~~~~~~~~~~~
      |                      |
      |                      const char*
Language: 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;
}

Compiler output:
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 this function)
   16 |     printf("%d %s\n",a+b+c,s);
      |                            ^
Language: 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;
}

Compiler output:
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 identifier is reported only once for each function it appears in
main.c:16:28: error: 's' undeclared (first use in this function)
   16 |     printf("%d %s\n",a+b+c,s);
      |                            ^
Language: 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;
}


Compiler output:
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;
Language: 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;　//回数カウンター
    
    //押されたボタンに0を押すような指示を代入　0ボタンを押したら-1を出力
    while ( b != 2 ) {
      d += 1;　　//回数カウント
      c = b;
      b = a[b-1];
      if ( b == 0 ) {
        System.out.println(-1);
        return;
      }
      a[c-1] = 0;
    }
    System.out.println(d);
  }
}

Compiler output:
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
Language: 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");
  }
}

Compiler output:
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 |   }else{
      |   ^
Language: 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");
}

Compiler output:
main.c:1:9: fatal error: stdio . h: No such file or directory
    1 | #include<stdio . h>
      |         ^~~~~~~~~~~
compilation terminated.
Language: 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;
}

Compiler output:
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 'return'
   14 |         return 0;
      |         ^~~~~~
a.cc:15:1: error: expected declaration before '}' token
   15 | }
      | ^
Language: 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;
}


Compiler output:
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";
      |  ^~~~
Language: 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;
}

Compiler output:
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";
      |  ^~~~
Language: 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;
}

Compiler output:
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"
      | ^~~~~~
Language: C++

a,b,c = map(int, input().split())
print('delicious' if c-b<=0 else 'safe' if 0<c-b<=a else 'dangerous')


Compiler output:
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<=a else 'dangerous')
      |                                  ^~~~~~
a.cc:2:58: 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:1:1: error: 'a' does not name a type
    1 | a,b,c = map(int, input().split())
      | ^
Language: 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)
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:1: error: expected primary-expression before '}' token
   15 | }
      | ^
Language: 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");
	
	}

}

Compiler output:
main.c: In function 'main':
main.c:12:22: error: expected ';' before '{' token
   12 |         }else(c <= B){
      |                      ^
      |                      ;
Language: 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;
}

Compiler output:
main.c: In function 'main':
main.c:11:18: error: expected ';' before 'printf'
   11 | else(B>A && A>=X)printf("dngerous\n");
      |                  ^~~~~~
      |                  ;
Language: 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;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:18: error: expected ';' before 'printf'
   11 | else(B>A && A>=X)printf("dngerous\n");
      |                  ^~~~~~
      |                  ;
Language: C

/*
高橋君は胃が強いので、賞味期限を X 日まで過ぎた食品を食べてもお腹を壊しません。 賞味期限を X+1 日以上過ぎた食品を食べると、お腹を壊します。

また、賞味期限を過ぎずに食べると、おいしく感じます。そうでない場合、おいしく感じません。

高橋君は、賞味期限の A 日前に食品を買ってきて、買ってから B 日後に食べました。

高橋君が食品をおいしく感じた場合 delicious を、おいしくは感じなかったがお腹は壊さなかった場合 safe を、お腹を壊した場合 dangerous を出力するプログラムを作成してください。
*/

#include<stdio . h>

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("safe\n");
   else 
   printf("dangerous\n");
   
   }

Compiler output:
main.c:11:9: fatal error: stdio . h: No such file or directory
   11 | #include<stdio . h>
      |         ^~~~~~~~~~~
compilation terminated.
Language: 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("delicious");
		}else if(b - a <= x){
			//お腹は壊さない
			System.out.println("safe");
		}else{
			System.out.println("dangerous");
		}	
	}
}

Compiler output:
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
Language: 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) break;
		else {
			j++;
			b = a[b];
		}
	}
	if (d == 0 && j<=N) cout << j << endl;
	else cout << "-1" << endl;
}

Compiler output:
a.cc:3:9: fatal error: Cstring: No such file or directory
    3 | #include<Cstring>
      |         ^~~~~~~~~
compilation terminated.
Language: 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];
		}
	} 
	if(d==0&&j<N) cout<<j<<endl;
	else cout<<"-1"<<endl;
}

Compiler output:
a.cc:2:9: fatal error: Cstring: No such file or directory
    2 | #include<Cstring>
      |         ^~~~~~~~~
compilation terminated.
Language: 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) {
        return this->cost > other.cost;
    }
};

class UnionFindTree {
public:
    vector<int> parent;

    UnionFindTree(int size) {
        parent.resize((unsigned long) (size + 1));
    }

    bool isSameSet(int x, int y) {
        return findRoot(x) == findRoot(y);
    }

    void unionSet(int x, int y) {
        int xRoot { findRoot(x) };
        int yRoot { findRoot(y) };
        if (xRoot == yRoot) { return; }

        parent[xRoot] = yRoot;
    }

    int getNumberOfSet() {
        int n = 0;
        for (int i = 0; parent.size(); ++i) {
            if (parent[i] == i) { n++; }
        }
        return n;
    }

private:
    int findRoot(int x) {
        if (parent[x] == x) {
            return x;
        }
        return parent[x] = findRoot(parent[x]);
    }
};

int kruskal(int v, vector<Edge>& edges) {
    sort(edges.begin(), edges.end());
    UnionFindTree uf(v);
    int res { 0 };
    for (auto& e : edges) {
        if (!uf.isSameSet(e.from, e.to));
        res += e.cost;
    }
    return res;
}

int main() {
    int N;
    cin >> N;

    vector<pair<int, int>> xList((unsigned long) N);
    vector<pair<int, int>> yList((unsigned long) N);
    for (int i { 0 }; i < N; ++i) {
        int x, y;
        cin >> x >> y;
        xList[i] = { x, i };
        yList[i] = { y, i };
    }
    sort(xList.begin(), xList.end());
    sort(yList.begin(), yList.end());

    vector<Edge> edges;
    for (int i { 1 }; i < N; ++i) {
        edges.push_back(Edge(xList[i - 1].second, xList[i].second, abs(xList[i - 1].first - xList[i].first)));
        edges.push_back(Edge(xList[i].second, xList[i + 1].second, abs(xList[i].first - xList[i + 1].first)));
        edges.push_back(Edge(yList[i - 1].second, yList[i].second, abs(yList[i - 1].first - yList[i].first)));
        edges.push_back(Edge(yList[i].second, yList[i + 1].second, abs(yList[i].first - yList[i + 1].first)));
    }

    cout << kruskal(N, edges) << endl;
    return 0;
}


Compiler output:
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 'short'?
   80 |     sort(xList.begin(), xList.end());
      |     ^~~~
      |     short
Language: 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;

}

Compiler output:
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 defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main () {
a.cc:10:17: error: 'printf' was not declared in this scope
   10 |                 printf("dangerous\n");
      |                 ^~~~~~
a.cc:10:17: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:12:17: error: 'printf' was not declared in this scope
   12 |                 printf("safe\n");
      |                 ^~~~~~
a.cc:12:17: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: 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";
	
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:26: error: 'b' was not declared in this scope
    8 |         cin >> X >> A >> b;
      |                          ^
Language: 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");
           }else if(b-a>=x){
              System.out.println("safe");
           }else{
               System.out.println("dangerous");
           }
       }
    }

Compiler output:
Main.java:4: error: class Solution is public, should be declared in a file named Solution.java
    public class Solution{
           ^
1 error
Language: 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");
       }else if(b-a>=x){
          System.out.println("safe");
       }else{
           System.out.println("dangerous");
       }
   }
}

Compiler output:
Main.java:1: error: ';' expected
import java.io.*
                ^
Main.java:2: error: ';' expected
import java.util.*
                  ^
2 errors