criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <unordered_map>
#include <utility>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <cstdio>
#include <math.h>
#include <stdio.h>
#include <deque>

using namespace std;

#define REP(i,n,m) for( long long int i = (n); i < (m); i++ )
#define REV(v) for (auto itr = v.rbegin(); itr != v.rend(); itr++)
#define ll long long
#define ALL(a) (a).begin(), (a).end()
#define SORT(v) sort( ALL(v) );
#define LAST(v) v[v.size()-1]
#define ZERO(a) memset(a,0,sizeof(a));
#define MINUS(a) memset(a,-1,sizeof(a));
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define pi pair<int, int>
#define MP make_pair
#define PB push_back
#define EB emplace_back
#define IIN(a) int a; cin >> a;
#define LIN(a) ll a; cin >> a;
#define SIN(a) string a; cin >> a;
#define VL(v,n) vector<ll> v(n);
#define Read_VL(v,n) vector<ll> v(n);REP(i,0,n)cin>>v[i];
#define sumV(v,n) Vl(acm,n) REP(i,0,n) acm[i] = v[i] + ( i == 0 ? 0 : acm[i - 1]);
#define EPS (1e-10)
#define INF 1000000000000LL

void YN(bool b){cout<<(b?"YES":"NO")<<"\n";}
void Yn(bool b){cout<<(b?"Yes":"No")<<"\n";}
void yn(bool b){cout<<(b?"yes":"no")<<"\n";}

template<class S>S max(vector<S>&a){return *max_element(all(a));}
template<class S>S min(vector<S>&a){return *min_element(all(a));}

template<class T>void puta(T&&t){cout<<t<<"\n";}
template<class H,class...T>void puta(H&&h,T&&...t){cout<<h<<' ';puta(t...);}


signed main() {
    ios_base::sync_with_stdio(0); cin.tie(0);

    LIN(n)
    if( n == 1 ){
      puta( "Hello World" );
      return 0;
    }else{
      puta( a + b );
      return 0;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:65:13: error: 'a' was not declared in this scope
   65 |       puta( a + b );
      |             ^
a.cc:65:17: error: 'b' was not declared in this scope
   65 |       puta( a + b );
      |                 ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main()
{
  int N;
  cin >> N;
  if (N == 1) string ans = "Hello World";
  else
  {
    int A, B;
    cin >> A >> B;
    int ans = A + B;
  }
  
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   16 |   cout << ans << endl;
      |           ^~~
      |           abs
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define REP(i,N) for(i=0;i<N;i++)
typedef long long ll;
typedef pair<int, int> P;
typedef struct{
  int first;
  int second;
  int third;
}T;

//昇順
bool comp_Se(&T l, &T r){
  return l.second < r.second;
}

int main(void){
  int N;
  cin >> N;
  if(N==1) cout << "Hello World" <<endl;
  else{
    int A,B;
    cin >> A >> B;
    cout << A+B << endl;
  }
  return 0;
}

Compiler output:
a.cc:13:17: error: expected primary-expression before 'l'
   13 | bool comp_Se(&T l, &T r){
      |                 ^
a.cc:13:23: error: expected primary-expression before 'r'
   13 | bool comp_Se(&T l, &T r){
      |                       ^
a.cc:13:24: error: expression list treated as compound expression in initializer [-fpermissive]
   13 | bool comp_Se(&T l, &T r){
      |                        ^
Language: C++

#include <bits/stdc++.h>
using namespace std;


int n, a b;
int main() { 
  scanf("%d %d", &n);
  if (n == 1) {
    cout << "Hello World";
  } else {
    scanf("%d\n%d", &a, &b); 
    cout << a + b;
  }

  return 0;
} 


Compiler output:
a.cc:5:10: error: expected initializer before 'b'
    5 | int n, a b;
      |          ^
a.cc: In function 'int main()':
a.cc:11:22: error: 'a' was not declared in this scope
   11 |     scanf("%d\n%d", &a, &b);
      |                      ^
a.cc:11:26: error: 'b' was not declared in this scope
   11 |     scanf("%d\n%d", &a, &b);
      |                          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;


int n, a b;
int main() { 
  scanf("%d %d", &n);
  if (n == 1) {
    cout << "Hello World"
  } else {
    scanf("%d\n%d", &a, &b); 
    cout << a + b;
  }

  return 0;
} 

Compiler output:
a.cc:5:10: error: expected initializer before 'b'
    5 | int n, a b;
      |          ^
a.cc: In function 'int main()':
a.cc:9:26: error: expected ';' before '}' token
    9 |     cout << "Hello World"
      |                          ^
      |                          ;
   10 |   } else {
      |   ~                       
a.cc:11:22: error: 'a' was not declared in this scope
   11 |     scanf("%d\n%d", &a, &b);
      |                      ^
a.cc:11:26: error: 'b' was not declared in this scope
   11 |     scanf("%d\n%d", &a, &b);
      |                          ^
Language: C++

#include <iostream>

int main(){
	int N;
  	cin >> N;
  	if(N == 1) cout << "Hello World" << endl;
  	else{
      	int A, B;
      	cin >> A >> B;
      	cout << A + B << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |         cin >> N;
      |         ^~~
      |         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:20: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |         if(N == 1) cout << "Hello World" << 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:45: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 |         if(N == 1) cout << "Hello World" << 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:10:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |         cout << A + B << 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:10:26: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   10 |         cout << A + B << endl;
      |                          ^~~~
      |                          std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
  int i,a,b;
  cin >> i;
  if(i == 1) cout << "Hello World" << endl;
  else{
    cin >> a >> b;
    cout << a + b << endl;
  }
  return 0
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:11: error: expected ';' before '}' token
   12 |   return 0
      |           ^
      |           ;
   13 | }
      | ~
Language: C++

#include <iostream>
using namespace std;
int main() {
  int nenrei,A,B;
  cin >> nenrei;
  if (nenrei == 1){
    cout << "Hello World" <<"\n";
  }else {
    cin >> A >> B;
    cout << A+B <<"\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:2: error: expected '}' at end of input
   11 | }
      |  ^
a.cc:3:12: note: to match this '{'
    3 | int main() {
      |            ^
Language: C++

import sys
N = int(input())
a = [list(map(int, input().split())) for l in range(N)]

if N == 1:
    print(a[0], a[1], a[2])

if len(a) == a[2].count(0):
    print(5050 - sum(a[0]), 5050 - sum(a[1]), 1)

for i in range (101):
    for j in range (101):
        H = []
        for k in range (N):
            if a[k][2] != 0:
                H.append(a[k][2] + abs(a[k][0] - i) + abs(a[k][1] - j))
                #print(H)
        if len(H) == H.count(H[0]):
            print(i, j, H[0])
            sys.exit()


Compiler output:
a.cc:17:18: error: invalid preprocessing directive #print
   17 |                 #print(H)
      |                  ^~~~~
a.cc:1:1: error: 'import' does not name a type
    1 | import sys
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include <iostream>

int main(){
	int x,A,B
	std::cin >> x;
	if(x==1){
		std::cout << "Hello World" << std::endl;
	}else{
		std::cin >> A >> B;
		std::cout << A+B << std::endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: expected initializer before 'std'
    5 |         std::cin >> x;
      |         ^~~
a.cc:9:34: error: 'B' was not declared in this scope
    9 |                 std::cin >> A >> B;
      |                                  ^
Language: C++

#include<bits/stdc++.h>
using namespace std;

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

    if(x == 1)
        cout << "Hello World" << endl;;
    else{
        int a,b;
        cin >> a >> b;
        cout << a + b << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'else' without a previous 'if'
   11 |     else{
      |     ^~~~
Language: C++

#include <iostream>
using namespace std;

int main() {
int N;
if(N==1){
cout<<"Hello World"<<endl;
}
else{
int A,B;
cin>>A>>B;
cout<<A+B<<endl;
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:2: error: expected '}' at end of input
   14 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <iostream>
using namespace std;

int main() {
int N;
if(N==1){
cout<<"Hello World"<<endl;
}
else{
int A,B;
cin>>A>>B;
cout<<A+B<<endl;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:13:2: error: expected '}' at end of input
   13 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <vector>
#include <cassert>
#include <iostream>
#include <string>
using namespace std;
 
int main(){
  int a;
  cin>>a;
  if(a==1){
    cout<<"Hello World"<<endl;
  }
  else{
    int A,B;
    cin>>A>>B;
    cout<<A+B<<endl;
  }
  

Compiler output:
a.cc: In function 'int main()':
a.cc:17:4: error: expected '}' at end of input
   17 |   }
      |    ^
a.cc:7:11: note: to match this '{'
    7 | int main(){
      |           ^
Language: C

#include <stdio.h>

int main(void)
{
    int num;
    int a,b;
    scanf("%d",&num);
    if (num==1)
    {
        printf("Hello World");
    }
    else
    {
        scanf("%d",&a);
        scanf("%d",&b);
        printf("&d",a+b)

    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:25: error: expected ';' before '}' token
   16 |         printf("&d",a+b)
      |                         ^
      |                         ;
   17 | 
   18 |     }
      |     ~
Language: C++

#include <bits/std++.h>
using namespace std;

int main() {
  int n;
  cin >> n;
  
  if (n == 1) {
    cout << "Hello World" << endl;
    return 0;
  } else if (n == 2) {
    int a,b;
    cin >> a >> b;
    
    cout << a + b << endl;
    return 0;
  }
  
  return -1;
}

Compiler output:
a.cc:1:10: fatal error: bits/std++.h: No such file or directory
    1 | #include <bits/std++.h>
      |          ^~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <cmath>
#include <set>
#include <algorithm>
#include <array>
#include <complex>
#include <string>
#include <utility>
#include <map>
#include <queue>
#include <list>
#include <functional>
#include <numeric>
#include <stack>
#include <tuple>

using namespace std;
int dx[4] = { -1,0,1,0 };
int dy[4] = { 0,1,0,-1 };
const int INF = 100000000;
const long long LINF = 1000000000000000000;
const int MOD = (int)1e9 + 7;
const double EPS = 1e-6;
using pii = std::pair<int, int>;
using pLL = std::pair<long long, long long>;
using ll = long long;
#define SORT(v) std::sort(v.begin(), v.end())

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	int n;
	cin >> n;
	if (n == 1) {
		cout << "Hello World" << endl;
		return 0;
	}
	else {
		int a, b;
		cin >> a >> b;
		cout << a+b" << endl;
		return 0;
	}
	return 0;
}

Compiler output:
a.cc:43:28: warning: missing terminating " character
   43 |                 cout << a+b" << endl;
      |                            ^
a.cc:43:28: error: missing terminating " character
   43 |                 cout << a+b" << endl;
      |                            ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:43:28: error: expected ';' before 'return'
   43 |                 cout << a+b" << endl;
      |                            ^
      |                            ;
   44 |                 return 0;
      |                 ~~~~~~
Language: C++

#include <iostream>

int ProgrammingEducation(void) {
	int N;
	std::cin >> N;
	if (N == 1) {
		std::cout << "Hello World";
	} else {
		int A, B;
		std::cin >> A >> B;
		std::cout << A + B;
	}
	return 0;
}

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include <bits/stdc++.h>
#include <cstdio>

using namespace std;
int main ()
{
    int N,A,B;
    cin >> N;
    switch(N){
        case 1:
        cout << "Hello World" << endl;
        break;
        case 2:
        cin >> A >> b;
        cout << A+B <<endl;
        break;
        default:
        break;
    }
    return 0;
}












Compiler output:
a.cc: In function 'int main()':
a.cc:14:21: error: 'b' was not declared in this scope
   14 |         cin >> A >> b;
      |                     ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int N,A,B;
  cin >> N >> A >> B;
  if (N == 1) {
    cout << "Hallo,World" << endl;
  }
  if (N == 2) {
    cout << A + B << endl;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:12:4: error: expected '}' at end of input
   12 |   }
      |    ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;


int main()
{
	int n,a,b;
	cin >> n >> a >> b;
	cout <<(n == 1 ? "Hello World" : a+b ) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:24: error: operands to '?:' have different types 'const char*' and 'int'
   10 |         cout <<(n == 1 ? "Hello World" : a+b ) << endl;
      |                 ~~~~~~~^~~~~~~~~~~~~~~~~~~~~
Language: Java

import java.util.Scanner;

public class Main(){
  public static void main(String[] arg){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int a = sc.nextInt();
    int b = sc.nextInt();
    System.out.println(n==1 ? "Hello World" : a+b);
  }
}

Compiler output:
Main.java:3: error: '{' expected
public class Main(){
                 ^
1 error
Language: C++

#include "pch.h"
#include <iostream>
#include <algorithm>
#include <tuple>
//#include <string>
#include <vector>
#define rep(i,n) for(int i=0;i<n;i++)
#define ll long long
using namespace std;




int main(){
	int N;

	cin >> N;
	if (N == 1) {
		cout << "Hello World" <<endl;
	}

	if (N == 2) {
		int A, B;
		cin >> A >> B;
		cout << A + B << endl;
	}




	return 0;
}

Compiler output:
a.cc:1:10: fatal error: pch.h: No such file or directory
    1 | #include "pch.h"
      |          ^~~~~~~
compilation terminated.
Language: C++

#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <stdio.h>

using namespace std;

int main() {
        int num, a, b, ans;

	scanf ("%d", &num);
  
if (num == 1) printf ("Hello World");
else {
scanf ("%d\n%d", &a, &b);
ans = a + b;
printf (ans);
}

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:9: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   16 | printf (ans);
      |         ^~~
      |         |
      |         int
In file included from /usr/include/c++/14/cstdio:42,
                 from /usr/include/c++/14/ext/string_conversions.h:45,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:2:
/usr/include/stdio.h:363:43: note:   initializing argument 1 of 'int printf(const char*, ...)'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Language: C++

#include<iostream>
using namespace std;
int main(void){
int n;
  cin>>n;
  if(n==1){
    cout<<"Hello World"<<endl;
  }
  else{
    int a,b;
    cin>>a>>b;
    cout<<a+b<<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:2: error: expected '}' at end of input
   14 | }
      |  ^
a.cc:3:15: note: to match this '{'
    3 | int main(void){
      |               ^
Language: Java

import java.util.Scanner;

public class Hello {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
		if (n == 1) {
		    System.out.println("Hello World");
		} else {
		    int x = Integer.parseInt(sc.next());
		    int y = Integer.parseInt(sc.next());
		    System.out.println(x + y);
		}
    }
}

Compiler output:
Main.java:3: error: class Hello is public, should be declared in a file named Hello.java
public class Hello {
       ^
1 error
Language: C++

def main():
    n = int(input())
    if n == 1:
        print('Hello World')
    else:
        a = int(input())
        b = int(input())
        print(a + b)
    
if __name__ == '__main__':
    main()


Compiler output:
a.cc:4:15: warning: multi-character literal with 11 characters exceeds 'int' size of 4 bytes
    4 |         print('Hello World')
      |               ^~~~~~~~~~~~~
a.cc:10:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   10 | if __name__ == '__main__':
      |                ^~~~~~~~~~
a.cc:1:1: error: 'def' does not name a type
    1 | def main():
      | ^~~
Language: Java

import java.util.Scanner;

public class Problem1A {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner in = new Scanner(System.in);
		
		int age = in.nextInt();
		int a,b;
		if(age == 1) {
			System.out.println("Hello World");
		} else if(age == 2) {
			a = in.nextInt();
			b = in.nextInt();
			System.out.println(a+b);
		}
	}

}


Compiler output:
Main.java:3: error: class Problem1A is public, should be declared in a file named Problem1A.java
public class Problem1A {
       ^
1 error
Language: Java

import java.util.Scanner;

public class Solution {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner in = new Scanner(System.in);
		
		int age = in.nextInt();
		int a,b;
		if(age == 1) {
			System.out.println("Hello World");
		} else if(age == 2) {
			a = in.nextInt();
			b = in.nextInt();
			System.out.println(a+b);
		}
	}

}


Compiler output:
Main.java:3: error: class Solution is public, should be declared in a file named Solution.java
public class Solution {
       ^
1 error
Language: Java

import java.util.Scanner;

public class Problem1A {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner in = new Scanner(System.in);
		
		int age = in.nextInt();
		int a,b;
		if(age == 1) {
			System.out.println("Hello World");
		} else if(age == 2) {
			a = in.nextInt();
			b = in.nextInt();
			System.out.println(a+b);
		}
	}

}

Compiler output:
Main.java:3: error: class Problem1A is public, should be declared in a file named Problem1A.java
public class Problem1A {
       ^
1 error
Language: C++

#include <iostream>
using namespace std;

int main(){

	// Comparators: ==, !=, >, >=, <, <=
	// Logical operators; && (and), || (or), !(not)
	int a,b;
	int logical1 = a > 5; 
	int logical2 = b <= 10;
	int logical3 = a != b;

	cout << "AND operator: " << logical1 && logical2 << endl;
	cout << "OR operator: " << logical1 || logical2 << endl;
	cout << "NOT operator: " << !logical3 << endl;

	int x;
	cin >> x;

	// Example : Calculating the absolute value of x
	// N.B. : There is a function that does that, but we are learning so...
	if(x > 0){
		cout << "Absolute value: " << x << endl; 
	}
	else{
		cout << "Absolute value: " << -x << endl;
	}

	// Checking if y is divisible by 3, by 2, by both or none
	int y;
	cin >> y;
	if(y % 2 == 0 && y % 3 == 0){
		cout << y << " is divisible by both 2 and 3" << endl;
	}
	else if(y % 2 == 0){
		cout << y << " is divisible by 2" << endl;
	}
	else if(y % 3 == 0){
		cout << y << " is divisible by 3" << endl;
	}
	else{
		cout << y << " is divisible by neither 2 or 3" << endl;
	}

	return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:58: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   13 |         cout << "AND operator: " << logical1 && logical2 << endl;
      |                                                 ~~~~~~~~~^~~~~~~
a.cc:14:57: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   14 |         cout << "OR operator: " << logical1 || logical2 << endl;
      |                                                ~~~~~~~~~^~~~~~~
Language: Java


import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = Integer.parseInt(scan.next());
		int[] x = new int[N];
		int[] y = new int[N];
		long[] h = new long[N];
		for (int i = 0; i < N; i++) {
			x[i] = Integer.parseInt(scan.next());
			y[i] = Integer.parseInt(scan.next());
			h[i] = Integer.parseInt(scan.next());
		}
		int Cx = -1;
		int Cy = -1;
		long candidateH;
		boolean find = true;
		int candidateIndex = 0;
		while (h[candidateIndex] == 0) {
			candidateIndex++;
		}

		for (int i = 0; i <= 100; i++) {
			Cx = i;
			for (int j = 0; j <= 100; j++) {
				Cy = j;
				find = true;
				candidateH = h[candidateIndex] + Math.abs(Cx - x[candidateIndex]) + Math.abs(Cy - y[candidateIndex]);
				for (int k = 0; k < N; k++) {
						if (h[k] != Math.max(candidateH - Math.abs(Cx - x[k]) - Math.abs(Cy - y[k]), 0)) {
							break;
						}
					}
				}
				if (find) {
					System.out.println(Cx + " " + Cy + " " + candidateH);
					return;
				}
			}
		}
	}
}


Compiler output:
Main.java:44: error: class, interface, enum, or record expected
}
^
1 error
Language: C++

#include <iostream>
using namespace std;

int main()
{
	int N = 0, M = 0,G=0;

	cin >> N >>M;
	for (int i = sqrt(M); i >=0 ; i--) {
		if (M % i == 0) {
			int q = M/i;
			if (q >= N) {
				G = i;
				break;
		}
			
		}
	}

    cout << G <<endl; 
	return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:22: error: 'sqrt' was not declared in this scope
    9 |         for (int i = sqrt(M); i >=0 ; i--) {
      |                      ^~~~
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <cmath>
using namespace std;
 

int main()
{
  int i;
  cin >> i;
  if(i == 1)
  {
    cout << "Hello World";
    return 0;
  }

  int a, b;
  cin >> a >> b;
  int  c = a + b;

  cout c;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:7: error: expected ';' before 'c'
   22 |   cout c;
      |       ^~
      |       ;
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <cmath>
using namespace std;
 

int main()
{
  int i;
  cin >> i;
  if(i == 1)
  {
    cout << "Hello World";
    return 0;
  }

  int a, b;
  cin >> a >> b;

  cout a + b;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:7: error: expected ';' before 'a'
   21 |   cout a + b;
      |       ^~
      |       ;
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <cmath>
using namespace std;
 

int main()
{
  int i;
  cin >> i;
  if(i == 1)
  {
    cout << "Hello World";
    return 0;
  }

  int a, b;
  cin >> a >> b;

  count a + b;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:8: error: expected ';' before 'a'
   21 |   count a + b;
      |        ^~
      |        ;
a.cc:21:14: error: statement cannot resolve address of overloaded function
   21 |   count a + b;
      |              ^
Language: C++

#include <iostream>
using namespace std;

int main(){
  int a,b,c;
  cin>>a>>b>>c;
  if(a==1){cout<<"Hello World"<<'\n';

  else{cout<<b+c<<'\n';}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected '}' before 'else'
    9 |   else{cout<<b+c<<'\n';}
      |   ^~~~
a.cc:7:11: note: to match this '{'
    7 |   if(a==1){cout<<"Hello World"<<'\n';
      |           ^
Language: C++

#include <iostream>
using namespace std;

int main(){
  int a,b,c;
  cin>>a>>b>>c;
  if(a==1){cout<<"Hello World"<<'\n';

  else{cout<<b+c<<'\n'}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected '}' before 'else'
    9 |   else{cout<<b+c<<'\n'}
      |   ^~~~
a.cc:7:11: note: to match this '{'
    7 |   if(a==1){cout<<"Hello World"<<'\n';
      |           ^
a.cc:9:23: error: expected ';' before '}' token
    9 |   else{cout<<b+c<<'\n'}
      |                       ^
      |                       ;
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int old;
  cin >> x ;
  
  if ( old == 1 ) {
    cout << "Hello World" ;
  }
  
  else if ( old == 2 ) {
    int a,b;
    cin >> a >>b;
    cout << a+b;
  }
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: 'x' was not declared in this scope
    6 |   cin >> x ;
      |          ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  int N,A,B;
  
  cin >> N;
  if(N=1){
  cout << "Hello World" <<endl;
  }
  else(N=2){
  cin >> A;
    cin >> B;
    cout << A+B <<endl;
  }
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: expected ';' before '{' token
   10 |   else(N=2){
      |            ^
      |            ;
Language: C

#include <stdio.h>
int main(){
    int N,A,B,C;
    scanf("%d¥n", &N);
    if(N==1){
    printf("Hello World");
    }
    if(N==2){
    scanf("%d¥n", &A);
    scanf("%d¥n", &B);
    C = A + B;
    printf("%d", C);
    }

Compiler output:
main.c: In function 'main':
main.c:13:5: error: expected declaration or statement at end of input
   13 |     }
      |     ^
Language: C

#include <stdio.h>
int main(){
    int N,A,B,C;
    scanf("%d¥n", &N);
    if(N==1){
    printf("Hello World");
    }
    if(N==2){
    scanf("%d¥n", &A);
    scanf("%d¥n", &B);
    c = A + B;
    printf("%d", C);
    }

Compiler output:
main.c: In function 'main':
main.c:11:5: error: 'c' undeclared (first use in this function)
   11 |     c = A + B;
      |     ^
main.c:11:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:5: error: expected declaration or statement at end of input
   13 |     }
      |     ^
Language: C++

#include <iostreasm>

using namespace std;

int main(){
  int N, a, b;
  cin >> N;
  if (N == 2){
	cin >> a >> b;
  }
  if (N == 1){
	cout << "Hello World" << endl;
  }
  else{
    cout << a + b << endl;
  }
    
  return 0;
}
  
    
   


Compiler output:
a.cc:1:10: fatal error: iostreasm: No such file or directory
    1 | #include <iostreasm>
      |          ^~~~~~~~~~~
compilation terminated.
Language: C++

#include <iostreasm>
int main(){
  int N, a, b;
  cin >> N;
  if (N == 2){
	cin >> a >> b;
  }
  if (N == 1){
	cout << "Hello World" << endl;
  }
  else{
    cout << a + b << endl;
  }
    
  return 0;
}
  
    
   

Compiler output:
a.cc:1:10: fatal error: iostreasm: No such file or directory
    1 | #include <iostreasm>
      |          ^~~~~~~~~~~
compilation terminated.
Language: C++

// Programming Education

#include <iostream>
#include <cmath>
#include <vector>
#include <algorithm>
#include <string>

using namespace std;

int main() {
    int n;
    if (n == 1) {
        cout << "Hello World" << endl;
        return 0
    }

    int a, b;
    cin >> a >> b;
    cout << a + b << endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:17: error: expected ';' before '}' token
   15 |         return 0
      |                 ^
      |                 ;
   16 |     }
      |     ~
Language: C++

#include <iostraem>
using namespace std;

int main(){
int n;
  cin >> n;
  if(n==1){
    cout << "Hello World" << endl;
  }
  if(n==2){
int a,b;
    cin >> a >> b;
    cout << a+b << endl;
  }
}

Compiler output:
a.cc:1:10: fatal error: iostraem: No such file or directory
    1 | #include <iostraem>
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

include <iostream>
using namespace std;
int main(){
int n;
cin >>n;
if (n==1){
cout << "Hello World";
}
else{
int x,y;
cin>>x,y;
cout<<x+y;

}
return 0;
}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:1: error: 'cin' was not declared in this scope
    5 | cin >>n;
      | ^~~
a.cc:7:1: error: 'cout' was not declared in this scope
    7 | cout << "Hello World";
      | ^~~~
a.cc:12:1: error: 'cout' was not declared in this scope
   12 | cout<<x+y;
      | ^~~~
Language: C++

#include <iostream>
using namespace std;
int main()
{
int N;
cin >> N;
if (N==1){
cout<<"Hello World"
}
else {
int x,y;
cin >>x,y;
cout x+y;
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:20: error: expected ';' before '}' token
    8 | cout<<"Hello World"
      |                    ^
      |                    ;
    9 | }
      | ~                   
a.cc:13:5: error: expected ';' before 'x'
   13 | cout x+y;
      |     ^~
      |     ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define R cin>>
#define Z class
#define ll long long
#define ln cout<<'\n'
#define in(a) insert(a)
#define pb(a) push_back(a)
#define pd(a) printf("%.10f\n",a)
#define mem(a) memset(a,0,sizeof(a))
#define all(c) (c).begin(),(c).end()
#define iter(c) __typeof((c).begin())
#define rrep(i,n) for(ll i=(ll)(n)-1;i>=0;i--)
#define REP(i,m,n) for(ll i=(ll)(m);i<(ll)(n);i++)
#define rep(i,n) REP(i,0,n)
#define tr(it,c) for(iter(c) it=(c).begin();it!=(c).end();it++)
template<Z A>void pr(A a){cout<<a;ln;}
template<Z A,Z B>void pr(A a,B b){cout<<a<<' ';pr(b);}
template<Z A,Z B,Z C>void pr(A a,B b,C c){cout<<a<<' ';pr(b,c);}
template<Z A,Z B,Z C,Z D>void pr(A a,B b,C c,D d){cout<<a<<' ';pr(b,c,d);}
template<Z A>void PR(A a,ll n){rep(i,n){if(i)cout<<' ';cout<<a[i];}ln;}
ll check(ll n,ll m,ll x,ll y){return x>=0&&x<n&&y>=0&&y<m;}
const ll MAX=1e9+7,MAXL=1LL<<61,dx[4]={-1,0,1,0},dy[4]={0,1,0,-1};
typedef pair<int,int> P;

void Main() {
  int n;
  R n;
  if(n==1) pr("Hello World");
  else {
    int x,y;
    cin >> x > >y;
    pr(x+y);
  }
}

int main(){ios::sync_with_stdio(0);cin.tie(0);Main();return 0;}


Compiler output:
a.cc: In function 'void Main()':
a.cc:34:16: error: expected primary-expression before '>' token
   34 |     cin >> x > >y;
      |                ^
Language: C++

#include<bits/stdc++.h>

using namespace std;

int main()
{
ll n;cin>>n;
if(n==1) cout<<"Hello World\n";
else {ll a,b;cin>>a>>b;cout<<a+b<<"\n";}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:1: error: 'll' was not declared in this scope
    7 | ll n;cin>>n;
      | ^~
a.cc:7:11: error: 'n' was not declared in this scope; did you mean 'yn'?
    7 | ll n;cin>>n;
      |           ^
      |           yn
a.cc:9:9: error: expected ';' before 'a'
    9 | else {ll a,b;cin>>a>>b;cout<<a+b<<"\n";}
      |         ^~
      |         ;
a.cc:9:19: error: 'a' was not declared in this scope
    9 | else {ll a,b;cin>>a>>b;cout<<a+b<<"\n";}
      |                   ^
a.cc:9:22: error: 'b' was not declared in this scope
    9 | else {ll a,b;cin>>a>>b;cout<<a+b<<"\n";}
      |                      ^
Language: C++

#include<bits/stdc++.h>

using namespace std;

int main()
{
ll n;
if(n==1) cout<<"Hello World\n";
else {ll a,b;cin>>a>>b;cout<<a+b<<"\n";}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:1: error: 'll' was not declared in this scope
    7 | ll n;
      | ^~
a.cc:8:4: error: 'n' was not declared in this scope; did you mean 'yn'?
    8 | if(n==1) cout<<"Hello World\n";
      |    ^
      |    yn
a.cc:9:9: error: expected ';' before 'a'
    9 | else {ll a,b;cin>>a>>b;cout<<a+b<<"\n";}
      |         ^~
      |         ;
a.cc:9:19: error: 'a' was not declared in this scope
    9 | else {ll a,b;cin>>a>>b;cout<<a+b<<"\n";}
      |                   ^
a.cc:9:22: error: 'b' was not declared in this scope
    9 | else {ll a,b;cin>>a>>b;cout<<a+b<<"\n";}
      |                      ^
Language: Java

class Main {
	public static void main(String[] args) {
		Scanner Cf=new Scanner(System.in);
		int FirstInput=Cf.nextInt();
		if(FirstInput==1) {
			System.out.println("Hello World");
		}
		else {
			int A=Cf.nextInt();
			int B=Cf.nextInt();
			System.out.println(A+B);
		}
	}

}

Compiler output:
Main.java:3: error: cannot find symbol
		Scanner Cf=new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
		Scanner Cf=new Scanner(System.in);
		               ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

public class ProgrammingEducation {
	public static void main(String[] args) {
		Scanner Cf=new Scanner(System.in);
		int FirstInput=Cf.nextInt();
		if(FirstInput==1) {
			System.out.println("Hello World");
		}
		else {
			int A=Cf.nextInt();
			int B=Cf.nextInt();
			System.out.println(A+B);
		}
	}

}

Compiler output:
Main.java:1: error: class ProgrammingEducation is public, should be declared in a file named ProgrammingEducation.java
public class ProgrammingEducation {
       ^
Main.java:3: error: cannot find symbol
		Scanner Cf=new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class ProgrammingEducation
Main.java:3: error: cannot find symbol
		Scanner Cf=new Scanner(System.in);
		               ^
  symbol:   class Scanner
  location: class ProgrammingEducation
3 errors
Language: C++

#include <iostream>
using namespace std;

int main(int argc, char **argv)
{
	cin.tie(NULL);

	int type;
	cin >> type:

	if (type == 1)
	{
		cout << "Hello World" << endl;
	}
	else if (type == 2)
	{
		int a, b;
		cin >> a >> b;
		cout << a + b << endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:9:20: error: expected ';' before ':' token
    9 |         cin >> type:
      |                    ^
      |                    ;
a.cc:15:9: error: 'else' without a previous 'if'
   15 |         else if (type == 2)
      |         ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){
    int n;
    cin >> n;
    if(n ==1){
        cout << "Hello World" << endl;
    else {
        int a, b;
        cin >>a>>b;
        cout << a+b << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: expected '}' before 'else'
    9 |     else {
      |     ^~~~
a.cc:7:14: note: to match this '{'
    7 |     if(n ==1){
      |              ^
Language: Java

import java.util.*;

class Main {
    public static void main(String[] args) {
      
        Scanner sc = new Scanner(System.in);
        int x = sc.nextInt();
         
        if(x==1){
           System.out.println("Hello World");
        }else{
        int y = sc.nextInt()
        int z = sc.nextInt()
        System.out.println(y+z);
        }
       
    }
}

Compiler output:
Main.java:12: error: ';' expected
        int y = sc.nextInt()
                            ^
Main.java:13: error: ';' expected
        int z = sc.nextInt()
                            ^
2 errors
Language: C++

import java.util.*;

class Main {
    public static void main(String[] args) {
    	
        Scanner sc = new Scanner(System.in);
        
		int a = sc.nextInt();


    	if(a==1){
    		System.out.println("Hello World");
    	}else{
    		int b = sc.nextInt();
			int c = sc.nextInt();
    		int ans = b+c;
    		 System.out.println(ans);
    	}
      
    }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:11: error: expected ':' before 'static'
    4 |     public static void main(String[] args) {
      |           ^~~~~~~
      |           :
a.cc:4:29: error: 'String' has not been declared
    4 |     public static void main(String[] args) {
      |                             ^~~~~~
a.cc:4:38: error: expected ',' or '...' before 'args'
    4 |     public static void main(String[] args) {
      |                                      ^~~~
a.cc:21:2: error: expected ';' after class definition
   21 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:6:9: error: 'Scanner' was not declared in this scope
    6 |         Scanner sc = new Scanner(System.in);
      |         ^~~~~~~
a.cc:8:25: error: 'sc' was not declared in this scope
    8 |                 int a = sc.nextInt();
      |                         ^~
a.cc:12:17: error: 'System' was not declared in this scope
   12 |                 System.out.println("Hello World");
      |                 ^~~~~~
a.cc:17:18: error: 'System' was not declared in this scope
   17 |                  System.out.println(ans);
      |                  ^~~~~~
Language: C++

n = int(input())
a = int(input())
b = int(input())
result ='Hello World' if n == 1 else a+b
print(result)

Compiler output:
a.cc:4:9: warning: multi-character literal with 11 characters exceeds 'int' size of 4 bytes
    4 | result ='Hello World' if n == 1 else a+b
      |         ^~~~~~~~~~~~~
a.cc:1:1: error: 'n' does not name a type
    1 | n = int(input())
      | ^
Language: C++

#include <i o s t re am>
using namespace s t d ;
const int i n f { int ( 1 e9 ) } ;
int main ( ) {
int N, T; ci n >> N >> T;
int ans { i n f } ;
for ( int i = 0 ; i < N; ++i ) {
int c , t ; ci n >> c >> t ;
i f ( t < T && c < ans ) {
ans = c ;
}
}
i f ( ans == i n f ) {
c ou t << ”TLE” << e n dl ;
}
e l s e {
c ou t << ans << e n dl ;
}
}


Compiler output:
a.cc:1:10: fatal error: i o s t re am: No such file or directory
    1 | #include <i o s t re am>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int N;
  cin >> N;
  if (N == 1) {
    cout << "Hello World" << endl;
  }
  else {
    int A, B;
    cin >> A >> B;
    cout << A + B << endl;
}
 



Compiler output:
a.cc: In function 'int main()':
a.cc:14:2: error: expected '}' at end of input
   14 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C

#inclide<stdio.h>
int main(void){
  int n,a,b;
  scanf("%d",&n);
  if(n==1){
    printf("Hello World\n");
  }
  else{
    scanf("%d%d",&a,&b);
    printf("%d\n",a+b);
  }
  return 0;
}

Compiler output:
main.c:1:2: error: invalid preprocessing directive #inclide; did you mean #include?
    1 | #inclide<stdio.h>
      |  ^~~~~~~
      |  include
main.c: In function 'main':
main.c:4:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    4 |   scanf("%d",&n);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | #inclide<stdio.h>
main.c:4:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    4 |   scanf("%d",&n);
      |   ^~~~~
main.c:4:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:6:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    6 |     printf("Hello World\n");
      |     ^~~~~~
main.c:6:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:6:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:6:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:10:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   10 |     printf("%d\n",a+b);
      |     ^~~~~~
main.c:10:5: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C++

#include <iostream>
using namespace std ;
const int inf { int ( 1e9 ) } ;
int main ( ) {
int N,T; 
cin >> N >> T;
int ans { inf } ;
for ( int i = 0 ; i < N; ++i ) {
int c , t ; cin >> c >> t ;
if ( t < T && c < ans ) {
ans = c ;
}
}
if ( ans == inf ) {
cout << ”TLE” << endl ;
}
else {
cout << ans << endl ;
}
}


Compiler output:
a.cc:15:9: error: extended character ” is not valid in an identifier
   15 | cout << ”TLE” << endl ;
      |         ^
a.cc:15:9: error: extended character ” is not valid in an identifier
a.cc: In function 'int main()':
a.cc:15:9: error: '\U0000201dTLE\U0000201d' was not declared in this scope
   15 | cout << ”TLE” << endl ;
      |         ^~~~~
Language: C++

#include <iostream>
using namespace std ;
const int inf { int ( 1e9 ) } ;
int main ( ) {
int N, T; ci n >> N >> T;
int ans { inf } ;
for ( int i = 0 ; i < N; ++i ) {
int c , t ; cin >> c >> t ;
if ( t < T && c < ans ) {
ans = c ;
}
}
if ( ans == inf ) {
cou t << ”TLE” << endl ;
}
else {
cout << ans << endl ;
}
}


Compiler output:
a.cc:14:10: error: extended character ” is not valid in an identifier
   14 | cou t << ”TLE” << endl ;
      |          ^
a.cc:14:10: error: extended character ” is not valid in an identifier
a.cc: In function 'int main()':
a.cc:5:11: error: 'ci' was not declared in this scope
    5 | int N, T; ci n >> N >> T;
      |           ^~
a.cc:14:1: error: 'cou' was not declared in this scope
   14 | cou t << ”TLE” << endl ;
      | ^~~
Language: C

int main()
{
    int n;
    int t;
    int c[100];
    int ti[100];
    int i;
    int num=100000;
    int a=0;

    scanf("%d", &n);
    scanf("%d", &t);
    for (i = 0; i < n; i++) {
        scanf("%d", &c[i]);
        scanf("%d", &ti[i]);
    }
    for (i = 0; i < n; i++) {
        if (c[i] <= num) {
            num = c[i];
        }
    }

    for (i = 0; i < n; i++) {
        if (ti[i] <= t) {
            a++;
        }
    }
    if (a != 0 ) {
        printf("%d",a);
    }
    else {
        printf("TEL",);
   }
    return 0;
}



Compiler output:
main.c: In function 'main':
main.c:11:5: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   11 |     scanf("%d", &n);
      |     ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main()
main.c:11:5: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   11 |     scanf("%d", &n);
      |     ^~~~~
main.c:11:5: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:29:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   29 |         printf("%d",a);
      |         ^~~~~~
main.c:29:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:29:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:29:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:32:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   32 |         printf("TEL",);
      |         ^~~~~~
main.c:32:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:32:22: error: expected expression before ')' token
   32 |         printf("TEL",);
      |                      ^
Language: C++

#include <iostream>
using namespace std;
 
int main(void) {
int N,T,i,sum1,sum2,ans1,ans2,cc,tt;
int c=1;
int a=0;
int t=500;
cin >> N T \n;
int ci[N];
int ti[N];
int x1[N];
int x2[N];
for (i=1; i<=N; i++) {
ci[i]=c*i;
ti[i]=t*i;
}
for (i=1; i<=N; i++) {
cc=ci[i];
tt=t[i];
cout << cc tt << endl;
}
for (i=1; i<=N; i++) {
sum1=ti[i]-T;
if(sum1<=-1) {
x1[i]=1;
}
}
for (i=1; i<=N; i++) {
sum2=ci[i]-1000;
if(sum2<=-1) {
x2[i]=1;
}
}
for(i=1; i<=N; i++) {
if(x1[i]==0 && x2[i]==0) {
cout << i << endl;
a=i;
}
}
switch(a) {
case 0 : cout << "TLE" << endl; break;
}
return 0;
}

Compiler output:
a.cc:9:12: error: stray '\' in program
    9 | cin >> N T \n;
      |            ^
a.cc: In function 'int main()':
a.cc:9:9: error: expected ';' before 'T'
    9 | cin >> N T \n;
      |         ^~
      |         ;
a.cc:20:5: error: invalid types 'int[int]' for array subscript
   20 | tt=t[i];
      |     ^
a.cc:21:11: error: expected ';' before 'tt'
   21 | cout << cc tt << endl;
      |           ^~~
      |           ;
Language: C++

#include <iostream>
using namespace std;
 
int main(void) {
int N,T,i,sum1,sum2,ans1,ans2,cc,tt;
int c=1;
int a=0;
int t=500;
cin >> N T ;
int ci[N];
int ti[N];
int x1[N];
int x2[N];
for (i=1; i<=N; i++) {
ci[i]=c*i;
ti[i]=t*i;
}
for (i=1; i<=N; i++) {
cc=ci[i];
tt=t[i];
cout << cc tt << endl;
}
for (i=1; i<=N; i++) {
sum1=ti[i]-T;
if(sum1<=-1) {
x1[i]=1;
}
}
for (i=1; i<=N; i++) {
sum2=ci[i]-1000;
if(sum2<=-1) {
x2[i]=1;
}
}
for(i=1; i<=N; i++) {
if(x1[i]==0 && x2[i]==0) {
cout << i << endl;
a=i;
}
}
switch(a) {
case 0 : cout << "TLE" << endl; break;
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: expected ';' before 'T'
    9 | cin >> N T ;
      |         ^~
      |         ;
a.cc:20:5: error: invalid types 'int[int]' for array subscript
   20 | tt=t[i];
      |     ^
a.cc:21:11: error: expected ';' before 'tt'
   21 | cout << cc tt << endl;
      |           ^~~
      |           ;
Language: C++

#include <iostream>
using namespace std;
 
int main(void) {
int N,T,i,sum1,sum2,ans1,ans2;
int c=1;
int a=0;
int t=500;
cin >> N T ;
int ci[N];
int ti[N];
int x1[N];
int x2[N];
for (i=1; i<=N; i++) {
ci[i]=c*i;
ti[i]=t*i;
}
for (i=1; i<=N; i++) {
cout << ci[i] ti[i] << endl;
}
for (i=1; i<=N; i++) {
sum1=ti[i]-T;
if(sum1<=-1) {
x1[i]=1;
}
}
for (i=1; i<=N; i++) {
sum2=ci[i]-1000;
if(sum2<=-1) {
x2[i]=1;
}
}
for(i=1; i<=N; i++) {
if(x1[i]==0 && x2[i]==0) {
cout << i << endl;
a=i;
}
}
switch(a) {
case 0 : cout << "TLE" << endl; break;
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: expected ';' before 'T'
    9 | cin >> N T ;
      |         ^~
      |         ;
a.cc:19:14: error: expected ';' before 'ti'
   19 | cout << ci[i] ti[i] << endl;
      |              ^~~
      |              ;
Language: C++

#include <iostream>
using namespace std;

int main(void) {
int N,T,i,sum1,sum2,ans1,ans2;
int c=1;
int a=0;
int t=500;
int ci[];
int ti[];
int x1[];
int x2[];
cin >> N T ;
for (i=1; i<=N; i++) {
ci[i]=c*i;
ti[i]=t*i;
}
for (i=1; i<=N; i++) {
cout << ci[i] ti[i] << endl;
}
for (i=1; i<=N; i++) {
sum1=ti[i]-T;
if(sum1<=-1) {
x1[i]=1;
}
}
for (i=1; i<=N; i++) {
sum2=ci[i]-1000;
if(sum2<=-1) {
x2[i]=1;
}
}
for(i=1; i<=N; i++) {
if(x1[i]==0 && x2[i]==0) {
cout << i << endl;
a=i;
}
}
switch(a) {
case 0 : cout << "TLE" << endl; break;
}
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: storage size of 'ci' isn't known
    9 | int ci[];
      |     ^~
a.cc:10:5: error: storage size of 'ti' isn't known
   10 | int ti[];
      |     ^~
a.cc:11:5: error: storage size of 'x1' isn't known
   11 | int x1[];
      |     ^~
a.cc:12:5: error: storage size of 'x2' isn't known
   12 | int x2[];
      |     ^~
a.cc:13:9: error: expected ';' before 'T'
   13 | cin >> N T ;
      |         ^~
      |         ;
Language: C++

#include <iostream>
using namespace std;

int main(void) {
	int N, A, B;
	cin >> N;

	if (N == 1) {
		cout << "Hello World" << endl;
	}
	else if (N == 2) {
		cin >> A;
		cin >> B;
		cout << A + B << endl;
		return 0;
	}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:10: error: expected '}' at end of input
   16 |         }
      |          ^
a.cc:4:16: note: to match this '{'
    4 | int main(void) {
      |                ^