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

#include<iostream>
using namespace std;
int main()
{
    // 整数の入力
    int a;
    cin >> a;
  	cout << "Christmas";
  	for (int i=0;i<(25-a);i++){
      cout << " Eve"
    }
  	cout << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:21: error: expected ';' before '}' token
   10 |       cout << " Eve"
      |                     ^
      |                     ;
   11 |     }
      |     ~
Language: C++

#include<iostream>
using namespace std;
int main()
{
    // 整数の入力
    int a;
    cin >> a;
  	cout << "Christmas";
  	for (i=0;i<(25-a);i++){
      cout << " Eve"
    }
  	cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: 'i' was not declared in this scope
    9 |         for (i=0;i<(25-a);i++){
      |              ^
a.cc:10:21: error: expected ';' before '}' token
   10 |       cout << " Eve"
      |                     ^
      |                     ;
   11 |     }
      |     ~
Language: C++

#include<iostream>
using namespace std;

int mai(){
  int d;cin>>d;
  if(d==22)cout<<"Christmas Eve Eve Eve"<<endl;
  if(d==23)cout<<"Christmas Eve Eve"<<endl;
  if(d==24)cout<<"Christmas Eve"<<endl;
  if(d==25)cout<<"Christmas"<<endl;
  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: Java

import java.util.InputMismatchException;
import java.util.Scanner;

/*
 * 問題文
 *とある世界では、今日は 12 月 D 日です。
 *
 *D=25 なら Christmas, D=24 なら Christmas Eve, D=23 なら Christmas Eve Eve,
 *D=22 なら Christmas Eve Eve Eve と出力するプログラムを作ってください。
 *
 *制約
 *22≤D≤25
 *D は整数である。
 */

public class Q1 {

	public static void main(String[] args) {
		try {
			Scanner scanner = new Scanner(System.in);
			System.out.print("Input > ");
			int x = scanner.nextInt();

			int i = 25 - x;

			System.out.print("Christmas");

			for (; i > 0; i--) {
				System.out.print(" Eve");
			}

			System.out.println();
			scanner.close();
		} catch (InputMismatchException e) {
			System.out.println("整数を入力してください。");
		}
	}

}


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

public class Q1 {

	public static void main(String[] args) {
		try {
			Scanner scanner = new Scanner(System.in);
			System.out.print("Input > ");
			int x = scanner.nextInt();

			int i = 25 - x;

			System.out.print("Christmas");

			for (; i > 0; i--) {
				System.out.print(" Eve");
			}

			System.out.println();
			scanner.close();
		} catch (InputMismatchException e) {
			System.out.println("整数を入力してください。");
		}
	}

}


Compiler output:
Main.java:1: error: class Q1 is public, should be declared in a file named Q1.java
public class Q1 {
       ^
Main.java:5: error: cannot find symbol
			Scanner scanner = new Scanner(System.in);
			^
  symbol:   class Scanner
  location: class Q1
Main.java:5: error: cannot find symbol
			Scanner scanner = new Scanner(System.in);
			                      ^
  symbol:   class Scanner
  location: class Q1
Main.java:19: error: cannot find symbol
		} catch (InputMismatchException e) {
		         ^
  symbol:   class InputMismatchException
  location: class Q1
4 errors
Language: C++

n=int(input())
if n=25:
  print('Christmas')
elif n=24:
  print('Christmas Eve')
elif n=23:
  print('Christmas Eve Eve')
elif n=22:
  print('Christmas Eve Eve Eve')

Compiler output:
a.cc:3:9: warning: multi-character literal with 9 characters exceeds 'int' size of 4 bytes
    3 |   print('Christmas')
      |         ^~~~~~~~~~~
a.cc:5:9: warning: multi-character literal with 13 characters exceeds 'int' size of 4 bytes
    5 |   print('Christmas Eve')
      |         ^~~~~~~~~~~~~~~
a.cc:7:9: warning: multi-character literal with 17 characters exceeds 'int' size of 4 bytes
    7 |   print('Christmas Eve Eve')
      |         ^~~~~~~~~~~~~~~~~~~
a.cc:9:9: warning: multi-character literal with 21 characters exceeds 'int' size of 4 bytes
    9 |   print('Christmas Eve Eve Eve')
      |         ^~~~~~~~~~~~~~~~~~~~~~~
a.cc:1:1: error: 'n' does not name a type
    1 | n=int(input())
      | ^
Language: C++

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

int main(){
	int n;
	cin>>n;
	if(n==25){
		cout<<"Christmas";
	}
	else if(n==24){
		cout<<"Christmas Eve";
	}
	else if(n==23){
		cout<<"Christmas Eve Eve";
	}
	else
		cout<<"Christmas Eve Eve Eve";
	}
	return 0;
}


Compiler output:
a.cc:19:9: error: expected unqualified-id before 'return'
   19 |         return 0;
      |         ^~~~~~
a.cc:20:1: error: expected declaration before '}' token
   20 | }
      | ^
Language: C++

#include <iostream>
using namespace std;

int main() {
  int d;
  cin >> d;
  cout << "Christmas";
  for (int eveI = 0; eveI <= 25 - d; ++eveI;) cout << " Eve";
  cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:44: error: expected ')' before ';' token
    8 |   for (int eveI = 0; eveI <= 25 - d; ++eveI;) cout << " Eve";
      |       ~                                    ^
      |                                            )
a.cc:8:45: error: expected primary-expression before ')' token
    8 |   for (int eveI = 0; eveI <= 25 - d; ++eveI;) cout << " Eve";
      |                                             ^
Language: Java

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        // System.out.println("input a number: ");
        int d = sc.nextInt();
        float[] price = new float[d];
        int maxIndx = 0;
        for (int i = 0; i < d; i++) {
            price[i] = sc.nextFloat();
            if (price[maxIndx] < price[i]) {
                maxIndx = i;
            }
        }

        float sum = 0;

        for (int i = 0; i < price.length; i++) {
            sum += price[i];
        }

        sum -= price[maxIndx] / 2.0;
        System.out.println(sum);
    }
}

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

import java.util.Scanner;

public class ChrismasEve {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        // System.out.println("input a number: ");
        int d = sc.nextInt();

        String result = "Chrismas";
        for (int i = 24; i >= d; i--) {
            result += " Eve";
        }
        System.out.println(result);
    }
}

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

#include<bits/stdc++.h>
using namespace std;
typedef	long long ll;
#define all(v) ((v).begin()),((v).end())
#define clr(v,val) memset(v,val,sizeof v)
#define watch(x) cout << (#x) << " is " << (x) << endl
#define endl "\n"
void fast(){
	std::ios_base::sync_with_stdio(0); cin.tie(NULL);
}
const int N = 1e5 + 20;
/***You***Can***Do***It***/
int main()
{
	file();
	fast();

	int d;
	cin >> d;

	map<int, string>mp;
	mp[25] = "Christmas";
	mp[24] = "Christmas Eve";
	mp[23] = "Christmas Eve Eve";
	mp[24] = "Christmas Eve Eve Eve";
	cout << mp[d] << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:15:9: error: 'file' was not declared in this scope
   15 |         file();
      |         ^~~~
Language: C++

d = int(input())
  
if d == 22:
    print("Christmas Eve Eve Eve")
elif d == 23:
    print("Christmas Eve Eve")
elif d == 24:
    print("Christmas Eve")
elif d == 25:
    print("Christmas")

Compiler output:
a.cc:1:1: error: 'd' does not name a type
    1 | d = int(input())
      | ^
Language: C

#include<cstdio>
int main(){
	int D;
	scanf("%d ", &D);
	if(D == 25) 
		printf("Christmas\n");
	if(D == 24) 
		printf("Christmas Eve\n");
	if(D == 23) 
		printf("Christmas Eve Eve\n");
	if(D == 22) 
		printf("Christmas Eve Eve Eve\n");
}

Compiler output:
main.c:1:9: fatal error: cstdio: No such file or directory
    1 | #include<cstdio>
      |         ^~~~~~~~
compilation terminated.
Language: C++

#import<cstdio>
main(){
    int N;
    cin >> N;
    for(printf("Christmas");++N < 26; printf(" Eve"));
    puts("");
}


Compiler output:
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import<cstdio>
      |  ^~~~~~
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:4:5: error: 'cin' was not declared in this scope
    4 |     cin >> N;
      |     ^~~
Language: C++

#include <iostream>

using namespace std;

int main()
{
    int d;
    scanf("%d",%d);
    if(d == 25)
    {
        printf("Christmas\n");
        return 0;
    }
    if(d == 24)
    {
        printf("Christmas Eve\n");
        return 0;
    }
        if(d == 23)
    {
        printf("Christmas Eve Eve\n");
        return 0;
    }
        if(d == 22)
    {
        printf("Christmas Eve Eve Eve\n");
        return 0;
    }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: expected primary-expression before '%' token
    8 |     scanf("%d",%d);
      |                ^
Language: C++

#include <stdio.h>
using namespace std;

int main() {
  int n;
  unsigned long long x,y;
  scanf("%d %llu",&n,&x);
  int a[n+1];
  unsigned long long p[n+1];
  a[0]=1;p[0]=1;
  for(int i=1;i<n+1;i++){
    a[i] = a[i-1]*2 + 3;
    p[i] = p[i-1]*2 + 1;
  }
  y = f(n,x);
  printf("%llu",y);
}
unsigned long long f(int n,unsigned long long x){
  if(x == 0){
    return 0;
  }else if(x <=1 + a[n-1]){
    return f(n-1,x-1);
  }else{
    return p[n-1]+1+f(n-1,x-2-a[n-1]);
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:7: error: 'f' was not declared in this scope
   15 |   y = f(n,x);
      |       ^
a.cc: In function 'long long unsigned int f(int, long long unsigned int)':
a.cc:21:20: error: 'a' was not declared in this scope
   21 |   }else if(x <=1 + a[n-1]){
      |                    ^
a.cc:24:12: error: 'p' was not declared in this scope
   24 |     return p[n-1]+1+f(n-1,x-2-a[n-1]);
      |            ^
Language: C++

#include<iostream>main(){int D,i=0;std::cin>>D;std::cout<<"Christmas";while(D++<25)std::cout<<"Eve";}

Compiler output:
a.cc:1:23: warning: extra tokens at end of #include directive
    1 | #include<iostream>main(){int D,i=0;std::cin>>D;std::cout<<"Christmas";while(D++<25)std::cout<<"Eve";}
      |                       ^
a.cc:1:9: fatal error: iostream>mai: No such file or directory
    1 | #include<iostream>main(){int D,i=0;std::cin>>D;std::cout<<"Christmas";while(D++<25)std::cout<<"Eve";}
      |         ^~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
main(){int D,i=0;std::cin>>D;if(25-D>3)break;std::cout<<"Christmas";for(;i++<25-D)std::cout<<"Eve";}

Compiler output:
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | main(){int D,i=0;std::cin>>D;if(25-D>3)break;std::cout<<"Christmas";for(;i++<25-D)std::cout<<"Eve";}
      | ^~~~
a.cc: In function 'int main()':
a.cc:2:40: error: break statement not within loop or switch
    2 | main(){int D,i=0;std::cin>>D;if(25-D>3)break;std::cout<<"Christmas";for(;i++<25-D)std::cout<<"Eve";}
      |                                        ^~~~~
a.cc:2:82: error: expected ';' before ')' token
    2 | main(){int D,i=0;std::cin>>D;if(25-D>3)break;std::cout<<"Christmas";for(;i++<25-D)std::cout<<"Eve";}
      |                                                                                  ^
      |                                                                                  ;
Language: C++

#include <iostream>
main(){int D,i=0;std::cin>>D;if(25-D<3)break;std::cout<<"Christmas";for(;i++<25-D)std::cout<<"Eve";}

Compiler output:
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | main(){int D,i=0;std::cin>>D;if(25-D<3)break;std::cout<<"Christmas";for(;i++<25-D)std::cout<<"Eve";}
      | ^~~~
a.cc: In function 'int main()':
a.cc:2:40: error: break statement not within loop or switch
    2 | main(){int D,i=0;std::cin>>D;if(25-D<3)break;std::cout<<"Christmas";for(;i++<25-D)std::cout<<"Eve";}
      |                                        ^~~~~
a.cc:2:82: error: expected ';' before ')' token
    2 | main(){int D,i=0;std::cin>>D;if(25-D<3)break;std::cout<<"Christmas";for(;i++<25-D)std::cout<<"Eve";}
      |                                                                                  ^
      |                                                                                  ;
Language: C++

#include <iostream>
int main(){int D;std::cin>>D;if(25-D<4)break;std::cout<<"Christmas";for(i=0;i++<25-D)std::cout<<"Eve";}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:40: error: break statement not within loop or switch
    2 | int main(){int D;std::cin>>D;if(25-D<4)break;std::cout<<"Christmas";for(i=0;i++<25-D)std::cout<<"Eve";}
      |                                        ^~~~~
a.cc:2:73: error: 'i' was not declared in this scope
    2 | int main(){int D;std::cin>>D;if(25-D<4)break;std::cout<<"Christmas";for(i=0;i++<25-D)std::cout<<"Eve";}
      |                                                                         ^
a.cc:2:85: error: expected ';' before ')' token
    2 | int main(){int D;std::cin>>D;if(25-D<4)break;std::cout<<"Christmas";for(i=0;i++<25-D)std::cout<<"Eve";}
      |                                                                                     ^
      |                                                                                     ;
Language: C++

#include <stdio.h>
#include <stdlib.h>

int main()
{
    int d;
   scanf("%d",&d)
    
        if(d==25) printf("Christmas\n");
        else if(d==24) printf("Christmas Eve\n");
        else if(d==23) printf("Christmas Eve Eve\n");
        else if(d==22) printf("Christmas Eve Eve Eve\n");
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:18: error: expected ';' before 'if'
    7 |    scanf("%d",&d)
      |                  ^
      |                  ;
    8 | 
    9 |         if(d==25) printf("Christmas\n");
      |         ~~        
a.cc:10:9: error: 'else' without a previous 'if'
   10 |         else if(d==24) printf("Christmas Eve\n");
      |         ^~~~
Language: C++

#include <iostream>
main(){int D;std::cin>>D;if(25-D<3)break;std::cout<<"Christmas";for(i=0;i++<25-D)std::cout<<"Eve";}

Compiler output:
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | main(){int D;std::cin>>D;if(25-D<3)break;std::cout<<"Christmas";for(i=0;i++<25-D)std::cout<<"Eve";}
      | ^~~~
a.cc: In function 'int main()':
a.cc:2:36: error: break statement not within loop or switch
    2 | main(){int D;std::cin>>D;if(25-D<3)break;std::cout<<"Christmas";for(i=0;i++<25-D)std::cout<<"Eve";}
      |                                    ^~~~~
a.cc:2:69: error: 'i' was not declared in this scope
    2 | main(){int D;std::cin>>D;if(25-D<3)break;std::cout<<"Christmas";for(i=0;i++<25-D)std::cout<<"Eve";}
      |                                                                     ^
a.cc:2:81: error: expected ';' before ')' token
    2 | main(){int D;std::cin>>D;if(25-D<3)break;std::cout<<"Christmas";for(i=0;i++<25-D)std::cout<<"Eve";}
      |                                                                                 ^
      |                                                                                 ;
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; (i) < (n); ++ (i))
#define loop(i,a,n) for (int i = (a); (i) < (n); ++ (i))
#define ll long long
#define ld long double
#define EPS 0.0000000001
#define INF 1e9
#define MOD 0
#define int long long
//#define int ll
using namespace std;
typedef vector<int> vi;
 
signed main(){
    int N,X;
    cin.tie(0);
    ios::sync_with_stdio(false);
    cin >> N >> X;
    vector<int> niku(N+1),dpketa(N+1),p(N+1);
    rep(i,N+1) {
        if(i==0) dpketa[i] = 1;
        else {
            dpketa[i] = 3 + 2*dpketa[i-1];
        }
    }
    rep(i,N+1)
    {
        if(i==0) {
            niku[i] = 1;
        } else {
            niku[i] = 1 + 2*niku[i-1];
        }
    }
    int count = 0;
    int pp,sa = X;
    for(pp=N;pp>=0;pp--) {
    if(pp > 1) {
        if(sa == dpketa[pp]) {
            count += niku[pp];
            break;
        } else if(sa > (dpketa[pp-1]+2)) {
            count += niku[pp-1] + 1;
            sa -= dpketa[pp-1] + 2;
        } else if(sa ==(dpketa[pp-1]+2)) {
            count += niku[pp-1] + 1;
            break;
        } else if(sa > 1) {
            sa -= 1;
        } else if(sa == 1) {
            break;
        }
    } else if(pp == 1){
        switch(sa) {
            case 1: break;
            case 2: count++;
            case 3: count++;
            case 4: 
                count++;
                break;
            default: 
        }
        break;
    } else if(pp == 0 && sa == 1) {
        count++;
        break;
    } else break;
    }
    cout << count << endl;
    return 0; 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:61:9: error: expected primary-expression before '}' token
   61 |         }
      |         ^
Language: C++

+++++++++[>+++++++<-]>++++.<+++++++++[>++++<-]>+.<+++++++++[>+<-]>+.<+++++++++[>-<-]>.<+++++++++[>+<-]>+.+.-------.<+++++++++[>-<-]>---.<+++++++++[>++<-]>.,,>++++++++[<------>-]+++++<[>-<-]>[>+++++++++[>+++<-]>+++++.<+++++++++[>++++<-]>+.<+++++++++[>+++++<-]>++++.<+++++++++[>-<-]>--------.[-]<<-]

Compiler output:
a.cc:1:1: error: expected unqualified-id before '++' token
    1 | +++++++++[>+++++++<-]>++++.<+++++++++[>++++<-]>+.<+++++++++[>+<-]>+.<+++++++++[>-<-]>.<+++++++++[>+<-]>+.+.-------.<+++++++++[>-<-]>---.<+++++++++[>++<-]>.,,>++++++++[<------>-]+++++<[>-<-]>[>+++++++++[>+++<-]>+++++.<+++++++++[>++++<-]>+.<+++++++++[>+++++<-]>++++.<+++++++++[>-<-]>--------.[-]<<-]
      | ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(  )
{
int dl;
cin>>d;
if(d==25)
cout<<"Christmas"<<endl;
else if(d==24)
cout<<"Christmas Eva"<<endl;
else if(d==23)
cout<<"Christmas Eva Eva"<<endl;
else if(d==22)
cout<<"Christmas Eva Eva Eva"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:6: error: 'd' was not declared in this scope; did you mean 'dl'?
    6 | cin>>d;
      |      ^
      |      dl
Language: C

#include<stdio.h>
int main(void){
  int D;
  scanf("%d",D);
  if(D==22){
    printf("Christmas Eve Eve Eve");
  }
  if(D==23){
    printf("Christmas Eve Eve");
  }
  if(D==24){
    printf("Christmas Eve");
  }
  if(D==25){
    printf("Christmas");
  }
  else(){
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:8: error: expected expression before ')' token
   17 |   else(){
      |        ^
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <list>
#include <random>
#include <iomanip>
#include <map>

using namespace std;

typedef long long ll;

int N, X;
string hum;
string humb(int L) {
    hum = "P";
    for (int i = 0; i < L; i++)
    hum = "B" + hum;
    return hum;
}

int main() {
    cin >> N >> X;
    
    string hum = humb(N);
    string rhum = humb(N);
    reverse(rhum.begin(), rhum.end());
    hum = hum + "P" + rhum;
    int ans = 0;
    for (int i = 0; i < X; i++) {
        if (hum.at(i) == "P") ans++;
    }
    
    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:32:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   32 |         if (hum.at(i) == "P") ans++;
      |             ~~~~~~~~~~^~~~~~
Language: C++

#include <iostream>
#include <vector> 
#include <queue>
#include <limits.h>
using namespace std;

int main(){
int N,K;
vector<int> V;
cin >> N >> K;
for (int i=0;i<N;i++)
{
int a;
cin >> a;
V.push_back(a);
}

sort(V.begin(),V.end());
queue<int> Q;
int min = INT_MAX;
for(int i=0;i<K;i++)
{
if(K+i-1>=N)
break;
if(V[i]+V[i+K-1]<min)
min=V[i]+V[i+k-1];
}
cout << min << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:1: error: 'sort' was not declared in this scope; did you mean 'short'?
   18 | sort(V.begin(),V.end());
      | ^~~~
      | short
a.cc:26:14: error: 'k' was not declared in this scope
   26 | min=V[i]+V[i+k-1];
      |              ^
Language: C++

#include <iostream>
using namespace std;
int n;
int main(){
cin >> n;
cout << "Christmas ";
for(int i=0; n+i<25; ++i)
cout << "Eve ";
cour << "\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:1: error: 'cour' was not declared in this scope
    9 | cour << "\n";
      | ^~~~
Language: Java

import java.util.*;

public class Main{
  public static void (String[] args){
    Scanner scan = new Scanner(System.in);
    ArrayList<Integer> list = new ArrayList<Integer>();
	int all = scan.nextInt();
    int extraction  = scan.nextInt();
    int b=0;
    for(int i = 0; i<all;i++){
      b=scan.nextInt();
      list.add(b);
    }
    Collections.sort(list);
    int ans=214748364;
    for(int i = 0;i<(all-extraction);i++){
      if(ans>list.get(i+extraction-1)-list.get(i)) ans = list.get(i+extraction-1)-list.get(i);
    }
    System.out.println(ans);
}
}


Compiler output:
Main.java:4: error: <identifier> expected
  public static void (String[] args){
                    ^
1 error
Language: C++

#include<algorithm>
#include <cstdio>
#include<vector>


using namespace std;

int main(){
    int n,k;
    int tmp;
    int min = 1000000000;
    cin >> n >> k;
    vector<int> data;
    for (int i = 0; i < n; i++){
        scanf("%d", &tmp);
        data.push_back(tmp);
    }
    sort(data.begin(),data.end(),greater<int>());
    for (int i = 0; i < data.size() - k + 1; i++){
        if (min > data[i]-data[i+k-1]){
            min = data[i]-data[i+k-1];
        }
    }
    cout << min << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: 'cin' was not declared in this scope
   12 |     cin >> n >> k;
      |     ^~~
a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    3 | #include<vector>
  +++ |+#include <iostream>
    4 | 
a.cc:24:5: error: 'cout' was not declared in this scope
   24 |     cout << min << endl;
      |     ^~~~
a.cc:24:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:24:20: error: 'endl' was not declared in this scope
   24 |     cout << min << endl;
      |                    ^~~~
a.cc:4:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    3 | #include<vector>
  +++ |+#include <ostream>
    4 |
Language: C++

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

int main() {
  int n;
  cin >> n;
  vector<int> p;
  for (int i = 0; i < n; i++) {
    scanf("%d", &p[n]);
  }

sort(a, a + N, greater<int>());

  int ans = 0;

  p.at(n - 1) = p.at(n-1) / 2;

  for(int i = 0; i < n; i++) {
    ans += p.at(i);
  }

  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:6: error: 'a' was not declared in this scope
   14 | sort(a, a + N, greater<int>());
      |      ^
a.cc:14:13: error: 'N' was not declared in this scope
   14 | sort(a, a + N, greater<int>());
      |             ^
Language: C++

#include<iostream>
using anmespace std;

int main(){
	int d;
	while(cin>>d){
		if(d==25)cout<<"Christmas\n";
		else if(d==24)cout<<"Christmas Eve\n";
		else if(d==23)cout<<"Christmas Eve Eve\n";
		else cout<<"Christmas Eve Eve Eve\n";
	}
} 

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'anmespace'
    2 | using anmespace std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:15: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |         while(cin>>d){
      |               ^~~
      |               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:7:26: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |                 if(d==25)cout<<"Christmas\n";
      |                          ^~~~
      |                          std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:8:31: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |                 else if(d==24)cout<<"Christmas Eve\n";
      |                               ^~~~
      |                               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:31: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |                 else if(d==23)cout<<"Christmas Eve Eve\n";
      |                               ^~~~
      |                               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:22: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |                 else cout<<"Christmas Eve Eve Eve\n";
      |                      ^~~~
      |                      std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include <iostream>
using namespace std;
int main() {
	int d;
	cin >> d;
	
	if (d == 25) {
		cout << "Christmas" << endl;
	}
	else if (d == 24) {
		cout << "Christmas  Eve" << endl;
	}
	else if (d == 23) {
		cout << "Christmas  Eve Eve" << endl;
	}
	else if(d == 22){
cout<<"Christmas  Eve Eve" <<endl;
	
	return 0;
}

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

#include <iostream>
#include<algorithm>
using namespace std;
int main()
{
int a,d[a]={},i,v,z=0;
cin>>a;
8.8.	cin>>d[a];
9.9.	for(i=1;i<=a;i++){
10.10.		v=z+d[i];
11.11.	}
12.12.	int N;
13.13.	N=max({d[a]});
14.14.	int ans;
15.15.	ans=v-N/2;
16.16.	cout<<ans<<endl;
17.17.}


Compiler output:
a.cc:8:1: error: too many decimal points in number
    8 | 8.8.    cin>>d[a];
      | ^~~~
a.cc:9:1: error: too many decimal points in number
    9 | 9.9.    for(i=1;i<=a;i++){
      | ^~~~
a.cc:10:1: error: too many decimal points in number
   10 | 10.10.          v=z+d[i];
      | ^~~~~~
a.cc:11:1: error: too many decimal points in number
   11 | 11.11.  }
      | ^~~~~~
a.cc:12:1: error: too many decimal points in number
   12 | 12.12.  int N;
      | ^~~~~~
a.cc:13:1: error: too many decimal points in number
   13 | 13.13.  N=max({d[a]});
      | ^~~~~~
a.cc:14:1: error: too many decimal points in number
   14 | 14.14.  int ans;
      | ^~~~~~
a.cc:15:1: error: too many decimal points in number
   15 | 15.15.  ans=v-N/2;
      | ^~~~~~
a.cc:16:1: error: too many decimal points in number
   16 | 16.16.  cout<<ans<<endl;
      | ^~~~~~
a.cc:17:1: error: too many decimal points in number
   17 | 17.17.}
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:9:25: error: expected ';' before ')' token
    9 | 9.9.    for(i=1;i<=a;i++){
      |                         ^
      |                         ;
a.cc:13:21: error: expected primary-expression before ')' token
   13 | 13.13.  N=max({d[a]});
      |                     ^
Language: C++

main = do 
    n <- readLn :: IO Int
    {-}
    let day = case n of 
        25 -> "Christmas"
        24 -> "Christmas Eve"
        23 -> "Christmas Eve Eve"
        22 -> "Christmas Eve Eve Eve"
    putStrLn str
    -}
    putStrLn $ getAns n 

getAns :: Int -> String
getAns n 
    | n==22 = "Christmas Eve Eve Eve"
    | n==23 = "Christmas Eve Eve"
    | n==24 = "Christmas Eve"
    | n==25 = "Christmas"


    -- なぜ上のcase文が通らない

Compiler output:
a.cc:1:1: error: 'main' does not name a type
    1 | main = do
      | ^~~~
a.cc:4:5: error: 'let' does not name a type
    4 |     let day = case n of
      |     ^~~
a.cc:10:6: error: expected declaration before '}' token
   10 |     -}
      |      ^
a.cc:11:5: error: 'putStrLn' does not name a type
   11 |     putStrLn $ getAns n
      |     ^~~~~~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
    int d;
    cin >> d;
     
     if (d=25)
      cout << "Christmas" ;
     else (d=24)
      cout << "Chiristmas " << "Eve" ;
     else (d=23)
      cout << "Chiristma " << "Eve " << "Eve" ;
     else (d=22)
      cout << "Chiristma " << "Eve " << "Eve " << "Eve" ;

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: expected ';' before 'cout'
    9 |      else (d=24)
      |                 ^
      |                 ;
   10 |       cout << "Chiristmas " << "Eve" ;
      |       ~~~~       
a.cc:11:6: error: 'else' without a previous 'if'
   11 |      else (d=23)
      |      ^~~~
a.cc:11:17: error: expected ';' before 'cout'
   11 |      else (d=23)
      |                 ^
      |                 ;
   12 |       cout << "Chiristma " << "Eve " << "Eve" ;
      |       ~~~~       
a.cc:13:6: error: 'else' without a previous 'if'
   13 |      else (d=22)
      |      ^~~~
a.cc:13:17: error: expected ';' before 'cout'
   13 |      else (d=22)
      |                 ^
      |                 ;
   14 |       cout << "Chiristma " << "Eve " << "Eve " << "Eve" ;
      |       ~~~~
Language: C++

D=input()

if D=='25':
    print('Christmas')
elif D=='24':
    print('Christmas Eve')
elif D=='23':
    print('Christmas Eve Eve')
elif D=='22':
    print('Christmas Eve Eve Eve')

Compiler output:
a.cc:3:7: warning: multi-character character constant [-Wmultichar]
    3 | if D=='25':
      |       ^~~~
a.cc:4:11: warning: multi-character literal with 9 characters exceeds 'int' size of 4 bytes
    4 |     print('Christmas')
      |           ^~~~~~~~~~~
a.cc:5:9: warning: multi-character character constant [-Wmultichar]
    5 | elif D=='24':
      |         ^~~~
a.cc:6:11: warning: multi-character literal with 13 characters exceeds 'int' size of 4 bytes
    6 |     print('Christmas Eve')
      |           ^~~~~~~~~~~~~~~
a.cc:7:9: warning: multi-character character constant [-Wmultichar]
    7 | elif D=='23':
      |         ^~~~
a.cc:8:11: warning: multi-character literal with 17 characters exceeds 'int' size of 4 bytes
    8 |     print('Christmas Eve Eve')
      |           ^~~~~~~~~~~~~~~~~~~
a.cc:9:9: warning: multi-character character constant [-Wmultichar]
    9 | elif D=='22':
      |         ^~~~
a.cc:10:11: warning: multi-character literal with 21 characters exceeds 'int' size of 4 bytes
   10 |     print('Christmas Eve Eve Eve')
      |           ^~~~~~~~~~~~~~~~~~~~~~~
a.cc:1:1: error: 'D' does not name a type
    1 | D=input()
      | ^
Language: C

#include <stdio.h>

int main(void){
    int n;
    scanf("%d", &n);
	
  	if (n==25){
    printf("Christmas");
    }if(n==22){
      printf("Christmas Eve Eve Eve");
    }if(n==23){
printf("Christmas Eve Eve");
}if(n==24){
printf("Christmas Eve#include <stdio.h>

int main(void){
    int n;
    scanf("%d", &n);
	
  	if (n==25){
    printf("Christmas");
    }if(n==22){
      printf("Christmas Eve Eve Eve");
    }if(n==23){
printf("Christmas Eve Eve");
}if(n==24){
printf("Christmas Eve#include <stdio.h>

int main(void){
    int n;
    scanf("%d", &n);
	
  	if (n==25){
    printf("Christmas");
    }if(n==22){
      printf("Christmas Eve Eve Eve");
    }if(n==23){
printf("Christmas Eve Eve");
}if(n==24){
printf("Christmas Eve");
}
    return 0;
}
);
}
    return 0;
}
);
}
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:8: warning: missing terminating " character
   14 | printf("Christmas Eve#include <stdio.h>
      |        ^
main.c:14:8: error: missing terminating " character
   14 | printf("Christmas Eve#include <stdio.h>
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.c:16:1: error: expected expression before 'int'
   16 | int main(void){
      | ^~~
main.c:27:8: warning: missing terminating " character
   27 | printf("Christmas Eve#include <stdio.h>
      |        ^
main.c:27:8: error: missing terminating " character
   27 | printf("Christmas Eve#include <stdio.h>
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: Java

d=int(input())
if d == 25:
    print('Christmas')
if d == 24:
    print('Christmas Eve')
if d == 23:
    print('Christmas Eve Eve')
if d == 22:
    print('Christmas Eve Eve Eve')

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
d=int(input())
^
Main.java:3: error: unclosed character literal
    print('Christmas')
          ^
Main.java:3: error: unclosed character literal
    print('Christmas')
                    ^
Main.java:5: error: unclosed character literal
    print('Christmas Eve')
          ^
Main.java:5: error: unclosed character literal
    print('Christmas Eve')
                        ^
Main.java:7: error: unclosed character literal
    print('Christmas Eve Eve')
          ^
Main.java:7: error: unclosed character literal
    print('Christmas Eve Eve')
                            ^
Main.java:9: error: unclosed character literal
    print('Christmas Eve Eve Eve')
          ^
Main.java:9: error: unclosed character literal
    print('Christmas Eve Eve Eve')
                                ^
9 errors
Language: C++

#include<iostream>
using namespace std;
int main(){
    int d;
    cin >> d;
     
     if (d=25)
     cout << "Christmas" ;
     else (d=24)
     cout << "Chiristmas " << "Eve" ;
     else (d=23)
     cout << "Chiristma " << "Eve " << "Eve" ;
     else (d=22)
     cout << "Chiristma " << "Eve " << "Eve " << "Eve" ;

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: expected ';' before 'cout'
    9 |      else (d=24)
      |                 ^
      |                 ;
   10 |      cout << "Chiristmas " << "Eve" ;
      |      ~~~~        
a.cc:11:6: error: 'else' without a previous 'if'
   11 |      else (d=23)
      |      ^~~~
a.cc:11:17: error: expected ';' before 'cout'
   11 |      else (d=23)
      |                 ^
      |                 ;
   12 |      cout << "Chiristma " << "Eve " << "Eve" ;
      |      ~~~~        
a.cc:13:6: error: 'else' without a previous 'if'
   13 |      else (d=22)
      |      ^~~~
a.cc:13:17: error: expected ';' before 'cout'
   13 |      else (d=22)
      |                 ^
      |                 ;
   14 |      cout << "Chiristma " << "Eve " << "Eve " << "Eve" ;
      |      ~~~~
Language: C++

N = input()

if(N = 25) : 
	print("Christmas")
if(N = 24) : 
	print("Christmas Eve")
if(N = 23) : 
	print("Christmas Eve Eve")
if(N = 22) : 
	print("Christmas Eve Eve Eve")



Compiler output:
a.cc:1:1: error: 'N' does not name a type
    1 | N = input()
      | ^
Language: C

#include <stdio.h>

int main(void){
    int n;
    scanf("%d", &n);
	
  	if (n==25){
    printf("Christmas");
    }if(n==22){
      printf("Christmas Eve Eve Eve");
    }if(n==23){
printf("Christmas Eve Eve");
}if(n==24){
printf("Christmas Eve“);
}
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:14:8: warning: missing terminating " character
   14 | printf("Christmas Eve“);
      |        ^
main.c:14:8: error: missing terminating " character
   14 | printf("Christmas Eve“);
      |        ^~~~~~~~~~~~~~~~~
main.c:15:1: error: expected expression before '}' token
   15 | }
      | ^
main.c:14:8: error: expected ';' before '}' token
   14 | printf("Christmas Eve“);
      |        ^
      |        ;
   15 | }
      | ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
//string e = " Eve";
int n;


int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    cin >> n;
 cout<< "Christmas";
  REP(i,25 - n){
    cout << " Eve" ;
  }
  cout<<endl;
} 

Compiler output:
a.cc:10:1: error: extended character   is not valid in an identifier
   10 |     cin.tie(0);
      | ^
a.cc:10:1: error: extended character   is not valid in an identifier
a.cc:10:1: error: extended character   is not valid in an identifier
a.cc:10:1: error: extended character   is not valid in an identifier
a.cc: In function 'int main()':
a.cc:10:1: error: '\U000000a0\U000000a0\U000000a0\U000000a0cin' was not declared in this scope
   10 |     cin.tie(0);
      | ^~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
string e = " Eve";
int n;


int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    cin >> n;
 cout<< "Christmas";
  REP(i,25 - n){
    cout << e ;
  }
  cout<<endl;
} 

Compiler output:
a.cc:10:1: error: extended character   is not valid in an identifier
   10 |     cin.tie(0);
      | ^
a.cc:10:1: error: extended character   is not valid in an identifier
a.cc:10:1: error: extended character   is not valid in an identifier
a.cc:10:1: error: extended character   is not valid in an identifier
a.cc: In function 'int main()':
a.cc:10:1: error: '\U000000a0\U000000a0\U000000a0\U000000a0cin' was not declared in this scope
   10 |     cin.tie(0);
      | ^~~~~~~
Language: C

#include <stdio.h>

int main(void){
    int n;
    scanf("%d", &n);
	
  	if (n==25){
    printf("Christmas");
    }if(n==22){
      printf("Christmas Eve Eve Eve“);
    }if(n==23){
printf("Christmas Eve Eve“);
}if(n==24){
printf("Christmas Eve“);
}
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:10:14: warning: missing terminating " character
   10 |       printf("Christmas Eve Eve Eve“);
      |              ^
main.c:10:14: error: missing terminating " character
   10 |       printf("Christmas Eve Eve Eve“);
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~
main.c:11:5: error: expected expression before '}' token
   11 |     }if(n==23){
      |     ^
main.c:10:14: error: expected ';' before '}' token
   10 |       printf("Christmas Eve Eve Eve“);
      |              ^
      |              ;
   11 |     }if(n==23){
      |     ~         
main.c:12:8: warning: missing terminating " character
   12 | printf("Christmas Eve Eve“);
      |        ^
main.c:12:8: error: missing terminating " character
   12 | printf("Christmas Eve Eve“);
      |        ^~~~~~~~~~~~~~~~~~~~~
main.c:13:1: error: expected expression before '}' token
   13 | }if(n==24){
      | ^
main.c:12:8: error: expected ';' before '}' token
   12 | printf("Christmas Eve Eve“);
      |        ^
      |        ;
   13 | }if(n==24){
      | ~       
main.c:14:8: warning: missing terminating " character
   14 | printf("Christmas Eve“);
      |        ^
main.c:14:8: error: missing terminating " character
   14 | printf("Christmas Eve“);
      |        ^~~~~~~~~~~~~~~~~
main.c:15:1: error: expected expression before '}' token
   15 | }
      | ^
main.c:14:8: error: expected ';' before '}' token
   14 | printf("Christmas Eve“);
      |        ^
      |        ;
   15 | }
      | ~
Language: C++

#include <iostream>
using namespace std;
int main(){
int d;
cin>>d;
if(d == 25){
cout<<"Christmas"<<endl;
}else if(d == 24){
cout<<"Christmas  Eve"<<endl;
}else{
cout<<"Christmas  Eve Eve"<<endl;
return 0;
}

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

#include <bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
string e = ' Eve';
int n;


int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    cin >> n;
 cout<< "Christmas";
  REP(i,25 - n){
    cout << e ;
  }
  cout<<endl;
} 

Compiler output:
a.cc:5:12: warning: multi-character character constant [-Wmultichar]
    5 | string e = ' Eve';
      |            ^~~~~~
a.cc:10:1: error: extended character   is not valid in an identifier
   10 |     cin.tie(0);
      | ^
a.cc:10:1: error: extended character   is not valid in an identifier
a.cc:10:1: error: extended character   is not valid in an identifier
a.cc:10:1: error: extended character   is not valid in an identifier
a.cc:5:12: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    5 | string e = ' Eve';
      |            ^~~~~~
a.cc: In function 'int main()':
a.cc:10:1: error: '\U000000a0\U000000a0\U000000a0\U000000a0cin' was not declared in this scope
   10 |     cin.tie(0);
      | ^~~~~~~
Language: C

#include <stdio.h>

int main()
{
    int i;
    scanf("%d",&i);
    printf("Christmas");
    for(int j=25-i;j>0;j--){
        printf(" Eve");
    }
    return 0;


Compiler output:
main.c: In function 'main':
main.c:11:5: error: expected declaration or statement at end of input
   11 |     return 0;
      |     ^~~~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
    int d;
    cin >> d;
     
     if ( d=25 )
     cout << "Christmas" << endl;
     else ( d=24 )
     cout << "Chiristmas Eve" << endl;
     else ( d=23 )
     cout << "Chiristma Eve Eve" << endl;
     else ( d=22 )
     cout << "Chiristma Eve Eve Eve" << endl;

     return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:19: error: expected ';' before 'cout'
    9 |      else ( d=24 )
      |                   ^
      |                   ;
   10 |      cout << "Chiristmas Eve" << endl;
      |      ~~~~          
a.cc:11:6: error: 'else' without a previous 'if'
   11 |      else ( d=23 )
      |      ^~~~
a.cc:11:19: error: expected ';' before 'cout'
   11 |      else ( d=23 )
      |                   ^
      |                   ;
   12 |      cout << "Chiristma Eve Eve" << endl;
      |      ~~~~          
a.cc:13:6: error: 'else' without a previous 'if'
   13 |      else ( d=22 )
      |      ^~~~
a.cc:13:19: error: expected ';' before 'cout'
   13 |      else ( d=22 )
      |                   ^
      |                   ;
   14 |      cout << "Chiristma Eve Eve Eve" << endl;
      |      ~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ff first
#define ss second
#define mp make_pair
#define pb push_back
#define nl '\n'
#define INF 2147483647
#define si(i) scanf("%d", &i)
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;

int n, k, ans;
vi hgt;

int main(){
    cin >> n >> k;
    for( int i = 0 ; i < n ; i++ ){
        int ct; cin >> ct;
        hgt.pb(ct);
    }
    sort(hgt.begin(), hgt.end());
    for( int i = 0 ; i < n - k ; i++ ){
        ans = ma( v[i + k - 1] - v[i]);
    }
    cout << ans << nl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:19: error: 'v' was not declared in this scope
   25 |         ans = ma( v[i + k - 1] - v[i]);
      |                   ^
a.cc:25:15: error: 'ma' was not declared in this scope; did you mean 'fma'?
   25 |         ans = ma( v[i + k - 1] - v[i]);
      |               ^~
      |               fma
Language: C++

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

int main()
{
    int n;
    cin>>n;
    if(n==25) cout<<"Christmas";
    else if(n==24) cout<<"Christmas Eve";
    else if(n==23) cout<<"Christmas Eve Eve";
    else cout<<"Christmas Eve Eve Eve"
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:39: error: expected ';' before 'return'
   11 |     else cout<<"Christmas Eve Eve Eve"
      |                                       ^
      |                                       ;
   12 |     return 0;
      |     ~~~~~~
Language: C++

#include <iostream>
#include <numeric>
#include <vector>
using namespace std;

int main(void) {
  int N, tmp;
  cin >> N;
  vector<int> p;
  for (int i = 0; i < N; i++) {
    cin >> tmp;
    p.push_back(tmp);
  }

  int max = *max_element(p.begin(), p.end());
  int sum = accumulate(p.begin(), p.end(), 0);

  cout << sum - (max / 2) << endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:14: error: 'max_element' was not declared in this scope
   15 |   int max = *max_element(p.begin(), p.end());
      |              ^~~~~~~~~~~
Language: C++

#include <iostream>
using namespace std;
int main(){
int d;
cin>>d;
if(d == 25){
cout<<"Christmas"<<endl;
}else if(d == 24){
cout<<"Christmas  Eve"<<endl;
}else{
cout<<"Christmas  Eve Eve"<<endl;
rerurn 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:1: error: 'rerurn' was not declared in this scope
   12 | rerurn 0;
      | ^~~~~~
a.cc:13:2: error: expected '}' at end of input
   13 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C

#include <stdio.h>
#include <stdlib.h>

int main()
{
    int n;
    scanf("%d",&n);
    if(n==25)
        printf("Christmas Eve")
        if(n==24)
            printf("Christmas Eve Eve")
            if(n==23)
                printf("Christmas Eve Eve Eve")
                if(n==22)
                    printf("Christmas Eve Eve Eve Eve")
                    return 0;

                }


Compiler output:
main.c: In function 'main':
main.c:9:32: error: expected ';' before 'if'
    9 |         printf("Christmas Eve")
      |                                ^
      |                                ;
   10 |         if(n==24)
      |         ~~
Language: C

#include<stdio.h>

int main_a()
{
	int d;
	
	scanf("%d", &d);

	switch (d)
	{
	case 22:
		printf("%s", "Christmas Eve Eve Eve");
		break;
	case 23:
		printf("%s", "Christmas Eve Eve");
		break;
	case 24:
		printf("%s", "Christmas Eve");
		break;
	case 25:
		printf("%s", "Christmas");
		break;
	default:
		break;
	}
	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 <stdio.h>

int main()
{
    int i;
    scanf("%d",&i);
    printf("Christmas");
    for(int j=25-i;j>0;j--){
        print(" Eve");
    }
    return 0;

}

Compiler output:
main.c: In function 'main':
main.c:9:9: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
    9 |         print(" Eve");
      |         ^~~~~
      |         printf
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
    int a;
    cin>>a:
    if(a==24){
        cout<<"Christmas Eve"<<endl;
    }else if(a==25){
       cout<<"Christmas"<<endl;
    }else if(a==23){
       cout<<"Christmas Eve Eve"<<endl;
   }else if(a==22){
      cout<<"Christmas Eve Eve Eve"<<endl;
   }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:11: error: expected ';' before ':' token
    5 |     cin>>a:
      |           ^
      |           ;
a.cc:8:6: error: 'else' without a previous 'if'
    8 |     }else if(a==25){
      |      ^~~~
Language: C

#include <stdio.h>

int main()
{
    int i;
    scanf("%d",&i);
    printf("Christmas")
    for(int j=25-i;j>0;j--){
        print(" Eve");
    }
    return 0;

}

Compiler output:
main.c: In function 'main':
main.c:7:24: error: expected ';' before 'for'
    7 |     printf("Christmas")
      |                        ^
      |                        ;
    8 |     for(int j=25-i;j>0;j--){
      |     ~~~