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

using System;

class Program
{
    static void Main(string[] args)
    {
        int n, k, x, y,res = 0;
        n = int.Parse(Console.ReadLine());
        k = int.Parse(Console.ReadLine());
        x = int.Parse(Console.ReadLine());
        y = int.Parse(Console.ReadLine());
        for (int i = 0; i < n; i++)
        {
            res += x;
        }
        if (n - k > 0)
        {
            for (int i = 0; i < n - k; i++)
            {
                res += y;
            }
        }
        Console.WriteLine(res);
    }
}


Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:5:22: error: 'string' has not been declared
    5 |     static void Main(string[] args)
      |                      ^~~~~~
a.cc:5:31: error: expected ',' or '...' before 'args'
    5 |     static void Main(string[] args)
      |                               ^~~~
a.cc:25:2: error: expected ';' after class definition
   25 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Program::Main(int*)':
a.cc:8:13: error: expected primary-expression before 'int'
    8 |         n = int.Parse(Console.ReadLine());
      |             ^~~
a.cc:9:13: error: expected primary-expression before 'int'
    9 |         k = int.Parse(Console.ReadLine());
      |             ^~~
a.cc:10:13: error: expected primary-expression before 'int'
   10 |         x = int.Parse(Console.ReadLine());
      |             ^~~
a.cc:11:13: error: expected primary-expression before 'int'
   11 |         y = int.Parse(Console.ReadLine());
      |             ^~~
a.cc:23:9: error: 'Console' was not declared in this scope
   23 |         Console.WriteLine(res);
      |         ^~~~~~~
Language: Java

class Main{
     public static void main(String[] a){
Scanner in = new Scanner(System.in);
int n = in.nextInt();
int k = in.nextInt();
int x = in.nextInt();
int y = in.nextInt();
int ans = k*x+(n-k)*y;
System.out.println(ans);
     }
}

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


public class Main {

   public static void main(String args[]) {

    Scanner scan = new Scanner(System.in);

     String l = scan.next();
	 String m =scan.next();     
	 String n = scan.next(); 
     String o = scan.next();     
    
    int N = Integer.parseInt(l);//5
    int K = Integer.parseInt(m);//3
    int X = Integer.parseInt(n);//10000
    int Y = Integer.parseInt(o);//9000

    
          	   	 System.out.println(N*X-(X-Y)*(N-K));   
   }
   }
   

Compiler output:
Main.java:6: error: cannot find symbol
    Scanner scan = new Scanner(System.in);
    ^
  symbol:   class Scanner
  location: class Main
Main.java:6: error: cannot find symbol
    Scanner scan = new Scanner(System.in);
                       ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

import java.io.*;
import java.util.Scanner;

public class Main {

   public static void main(String args[]) {

    Scanner scan = new Scanner(System.in);

     String l = scan.next();
	 String m =scan.next();     
	 String n = scan.next(); 
     String o = scan.next();     
    
    int N = Integer.parseInt(l);//5
    int K = Integer.parseInt(m);//3
    int X = Integer.parseInt(n);//10000
    int Y = Integer.parseInt(o);//9000

    
          	   	 System.out.println(N*X-(X-Y)*(N-K));   
   }
   }

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.io.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.util.Scanner;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: expected unqualified-id before 'public'
    4 | public class Main {
      | ^~~~~~
Language: C

#include<stdio.h>
#include<iostream>
using namespace std;
int main() {
	int i = 0, t = 0, j = 0;
	char a[100], b[27] = { 0 };

	scanf_s("%s", a,sizeof(a)/sizeof(a[0]));

	//cout << "h" << endl;
	for (j = 0; j < 26; j++) {
		for (i = 0; i < 100; i++) {
			//cout << i << " " << a[j] << endl;
			if (j == a[i] - 'a')
				b[j] = b[j] + 1;
		}
	}
	for (j = 0; j < 26; j++) {
		if (b[j] % 2 == 1) {
			t++;

		}
	}
	if (t == 0) {
		printf("Yes\n");

	}
	else {
		printf("No\n");

	}
}

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

#include<stdio.h>
int main() {
	int n, k, x, y, z;

	scanf_s("%d%d%d%d",&n,&k,&x,&y);

	if (n > k) {
		z = x*k + y*(n - k);
	}
	else {
		z = x*n;

	}

	printf("%d",z);

}


Compiler output:
main.c: In function 'main':
main.c:5:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    5 |         scanf_s("%d%d%d%d",&n,&k,&x,&y);
      |         ^~~~~~~
      |         scanf
Language: C++

#include <cstdio>
#include <cstdint>

using namespace std;

int main()
{
	int32_t n, k, x, y;
	int32_t payment;
	
	scanf_s("%d\n%d\n%d\n%d\n", n, k, x, y);

	payment = n >= k ? k * x : n * x;
	payment += n >= k ? (n - k) * y : 0;

	printf("%d\n", payment);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   11 |         scanf_s("%d\n%d\n%d\n%d\n", n, k, x, y);
      |         ^~~~~~~
      |         scanf
Language: C

#include <stdio.h>

int main(void)
{
int N,K,X,Y,;

scanf("%d",&N);
scanf("%d",&K);
scanf("%d",&X);
scanf("%d",&Y);

if (K>N){
printf("%d\n", N*X);
}
else{
printf("%d\n", K*X+(N-K)*Y);
}

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:13: error: expected identifier or '(' before ';' token
    5 | int N,K,X,Y,;
      |             ^
Language: C

#include <stdio.h>

int main(void)
{
int N,K,X,Y,;

scanf("%d",&N);
scanf("%d",&K);
scanf("%d",&X);
scanf("%d",&Y);

if (K>N){
printf("%d\n", K*X);
}
else{
printf("%d\n", K*X+(N-K)*Y);
}

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:13: error: expected identifier or '(' before ';' token
    5 | int N,K,X,Y,;
      |             ^
Language: Java

import java.util.Scanner;

class Test {
	public static void main(String args[]) {
		Scanner scanner = new Scanner(System.in);
       		String[] strStdIn = new String[4];
		while (scanner.hasNextLine()) {
			int i = 0;
			strStdIn[i] = scanner.nextLine();
			i++;

			if (s.length() == 0) {
				break;
			}
		}

		int totalLiving = Integer.parseInt(strStdIn[0]);
		int initialLiving = Integer.parseInt(strStdIn[1]);
		int initialCost = Integer.parseInt(strStdIn[2]);
		int latterCost = Integer.parseInt(strStdIn[3]);
		
		int initialLivingDate = totalLiving - initialLiving + 1;
		int latterLivingDate = totalLiving - initialLivingDate -1;

		int totalCost = initialCost * initialLivingDate + latterCost * latterLivingDate;

		String returnString = Integer.toString(totalCost);

        	System.out.println(totalCost);
    }
}

Compiler output:
Main.java:12: error: cannot find symbol
			if (s.length() == 0) {
			    ^
  symbol:   variable s
  location: class Test
1 error
Language: Java

import java.util.Scanner;

class Test {
	public static void main(String args[]) {
		Scanner scanner = new Scanner(System.in);
       		String[] strStdIn = new String[4];
		while (scanner.hasNextLine()) {
			int i = 0;
			strStdIn[i] = scanner.nextLine();
			i++;

			if (s.length() == 0) {
				break;
		}

		int totalLiving = Integer.parseInt(strStdIn[0]);
		int initialLiving = Integer.parseInt(strStdIn[1]);
		int initialCost = Integer.parseInt(strStdIn[2]);
		int latterCost = Integer.parseInt(strStdIn[3]);
		
		int initialLivingDate = totalLiving - initialLiving + 1;
		int latterLivingDate = totalLiving - initialLivingDate -1;

		int totalCost = initialCost * initialLivingDate + latterCost * latterLivingDate;

		String returnString = Integer.toString(totalCost);

        	System.out.println(totalCost);
    }
}

Compiler output:
Main.java:30: error: reached end of file while parsing
}
 ^
1 error
Language: Java

import java.io.*;

class Test {
	public static void main(String args[]) {
        	BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
       		String[] strStdIn = new String[4];
        	for (int i=0; i < 4; i++) {
			strStdIn[i] = in.readLine();
        	}

		int totalLiving = Integer.parseInt(strStdIn[0]);
		int initialLiving = Integer.parseInt(strStdIn[1]);
		int initialCost = Integer.parseInt(strStdIn[2]);
		int latterCost = Integer.parseInt(strStdIn[3]);
		
		int initialLivingDate = totalLiving - initialLiving + 1;
		int latterLivingDate = totalLiving - initialLivingDate -1;

		int totalCost = initialCost * initialLivingDate + latterCost * latterLivingDate;

		String returnString = Integer.toString(totalCost);

        	System.out.println(totalCost);
    }
}

Compiler output:
Main.java:8: error: unreported exception IOException; must be caught or declared to be thrown
			strStdIn[i] = in.readLine();
			                         ^
1 error
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
  int al[26]={0};
  int aa[2]={0};
  char w[101];
  cin>>w;
  int len=strlen(w);
  for(int i=0;i<len;i++){
    int j=w[i]-'a';
    al[j]++;
  }
  for(int i=0;i<26;i++){
    if(al[i]!=0&&al[i]%2==0){
      aa[0]++;
    }else if(al[i]!=0&&al[i]%2!=0){
      aa[1]++;
    }
  }
  if(aa[1]==0){
    cout<<"Yes"<<endl;
  }else if(aa[1]!=0){
    cout<<"No"<<endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:11: error: 'strlen' was not declared in this scope
    9 |   int len=strlen(w);
      |           ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | #include<string>
Language: C++

#include<iostream>
using namespace std;
int main(){
  int al[26]={0};
  int aa[2]={0};
  char w[101];
  cin>>w;
  int len=strlen(w);
  for(int i=0;i<len;i++){
    int j=w[i]-'a';
    al[j]++;
  }
  for(int i=0;i<26;i++){
    if(al[i]!=0&&al[i]%2==0){
      aa[0]++;
    }else if(al[i]!=0&&al[i]%2!=0){
      aa[1]++;
    }
  }
  if(aa[1]==0){
    cout<<"Yes"<<endl;
  }else if(aa[1]!=0){
    cout<<"No"<<endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: 'strlen' was not declared in this scope
    8 |   int len=strlen(w);
      |           ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | using namespace std;
Language: C++

#include<stdio.h>
int main()
{
	int N,K,X,Y;
	long long int sum;
	scanf("%d""%d""%d""%d",&N,&K,&X,&Y)
	
	if(N>K)	printf("%lld\n",sum=K*X+(N-K)*Y);
	else if(N<=K) printf("%lld\n",sum=N*X);
	return 0;
	}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:44: error: expected ';' before 'if'
    6 |         scanf("%d""%d""%d""%d",&N,&K,&X,&Y)
      |                                            ^
      |                                            ;
    7 | 
    8 |         if(N>K) printf("%lld\n",sum=K*X+(N-K)*Y);
      |         ~~                                  
a.cc:9:9: error: 'else' without a previous 'if'
    9 |         else if(N<=K) printf("%lld\n",sum=N*X);
      |         ^~~~
Language: C

#include<stdio.h>
#define MIN(A,B) ((A) < (B) ? (A) : (B))

int main(void){
     int i,j;
    long long n,k,x,y,ans;
  scanf("%lld %lld %lld %lld",&n,&k,&x,&y);
 ans = x * MIN(n,k);
 if(n > k)12.   ans += y * (n - k);
 printf("%lld\n",ans);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:14: error: expected ';' before 'ans'
    9 |  if(n > k)12.   ans += y * (n - k);
      |              ^  ~~~
      |              ;
Language: C

include<stdio.h>
#define MIN(A,B) ((A) < (B) ? (A) : (B))

int main(void){
     int i,j;
    long long n,k,x,y,ans;
  scanf("%lld %lld %lld %lld",&n,&k,&x,&y);
 ans = x * MIN(n,k);
 if(n > k)
    ans += y * (n - k);
 printf("%lld\n",ans);
  return 0;
}

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
Language: C

#include<stdio.h>
#define MIN(A,B) ((A) < (B) ? (A) : (B))

int main(void){
     int i,j;
    long long n,k,x,y,ans;
  scanf("%d %d %d %d",&n,&k,&x,&y);
 ans = x * MIN(n,k);
 if(n > k)12.   ans += y * (n - k);
 printf("%lld\n",ans);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:14: error: expected ';' before 'ans'
    9 |  if(n > k)12.   ans += y * (n - k);
      |              ^  ~~~
      |              ;
Language: C

#include<stdio.h>
#define MIN(A<B) ((A) < (B) ? (A) : (B))


int main(void){
     int i,j
      long long n,k,x,y,ans;

     scanf("%d %d %d %d",&n,&k,&x,&y);
    ans = x * MIN(n,k);
    if(n > k)
   ans += y * (n - k);
    printf("%lld\n",ans);
     return 0;
}

Compiler output:
main.c:2:14: error: expected ',' or ')', found "<"
    2 | #define MIN(A<B) ((A) < (B) ? (A) : (B))
      |              ^
main.c: In function 'main':
main.c:7:7: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'long'
    7 |       long long n,k,x,y,ans;
      |       ^~~~
main.c:9:27: error: 'n' undeclared (first use in this function)
    9 |      scanf("%d %d %d %d",&n,&k,&x,&y);
      |                           ^
main.c:9:27: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:30: error: 'k' undeclared (first use in this function)
    9 |      scanf("%d %d %d %d",&n,&k,&x,&y);
      |                              ^
main.c:9:33: error: 'x' undeclared (first use in this function)
    9 |      scanf("%d %d %d %d",&n,&k,&x,&y);
      |                                 ^
main.c:9:36: error: 'y' undeclared (first use in this function)
    9 |      scanf("%d %d %d %d",&n,&k,&x,&y);
      |                                    ^
main.c:10:5: error: 'ans' undeclared (first use in this function)
   10 |     ans = x * MIN(n,k);
      |     ^~~
main.c:10:15: error: implicit declaration of function 'MIN' [-Wimplicit-function-declaration]
   10 |     ans = x * MIN(n,k);
      |               ^~~
Language: C

#include<stdio.h>

int main(void){
        int n,k,x,y;
        int sum = 0;

        scanf("%d", &n);
        scanf("%d", &k);
        scanf("%d", &x);
        scanf("%d", &y);

        sum = k * x;

        while(k++ < n)
                sum += y;


        printf("%d\n", sum);

        return 0;
}
~             

Compiler output:
main.c:22:1: error: expected identifier or '(' before '~' token
   22 | ~
      | ^
Language: C

#include <stdio.h>

int main(void){
	int n, k, x, y, cost;
	
	scanf("%d\n%d\n%d\n%d", &n, &k, &x, &y);
	
	if(n > k){
		cost = k*x+(n-k)y;
	} else{
		cost = n*x;
	}
	
	printf("%d\n", cost);
	
	return 0;
}	


Compiler output:
main.c: In function 'main':
main.c:9:33: error: expected ';' before 'y'
    9 |                 cost = k*x+(n-k)y;
      |                                 ^
      |                                 ;
Language: C++

#include <stdio.h>

int main(){
 int n, k, x, y;
 scanf("%d %d %d %d", &n, &k, &x, &y);
 if(n-k) sum=k*x+(n-k)*y;
 else sum=k*x;
 printf("%d\n", sum);
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: 'sum' was not declared in this scope
    6 |  if(n-k) sum=k*x+(n-k)*y;
      |          ^~~
a.cc:7:7: error: 'sum' was not declared in this scope
    7 |  else sum=k*x;
      |       ^~~
a.cc:8:17: error: 'sum' was not declared in this scope
    8 |  printf("%d\n", sum);
      |                 ^~~
Language: C++

n = int(input())
k = int(input())
x = int(input())
y = int(input())

if n <= k :
    print(x*n)
else :
    ans = k*x+(n-k)*y
    print(int(ans))


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

#include <stdio.h>

int main()
{
	int n,k,x,y;
	scanf("%d",&n);
	scanf("%d",&k);
	scanf("%d",&x);
	scanf("%d",&y);
	int gokei=0;
	int i=0;
	if(n<k){
		gokei=k*x;
	}else{	
		i=n-k;
		gokei=k*x+i*y;
	}
	
	printf("%d",golei);
        return 0;
}

Compiler output:
main.c: In function 'main':
main.c:19:21: error: 'golei' undeclared (first use in this function); did you mean 'gokei'?
   19 |         printf("%d",golei);
      |                     ^~~~~
      |                     gokei
main.c:19:21: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main()
{
	int n,k,x,y;
	scanf("%d",&n);
	scanf("%d",&k);
	scanf("%d",&x);
	scanf("%d",&y);
	int gokei=0;
	int i=0;
	if(n<k){
		i=0;
	}else{	
		i=n-k;
	}
	gokei=i*y+k*x;
	printf("%d",golei);
        return 0;
}

Compiler output:
main.c: In function 'main':
main.c:18:21: error: 'golei' undeclared (first use in this function); did you mean 'gokei'?
   18 |         printf("%d",golei);
      |                     ^~~~~
      |                     gokei
main.c:18:21: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main()
{
	int n,k,x,y;
	scanf("%d",&n);
	scanf("%d",&k);
	scanf("%d",&x);
	scanf("%d",&y);
	int gokei=0;
	int i=n-k;
	gokei=i*y+k*x;
	printf("%d",golei);
        return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:21: error: 'golei' undeclared (first use in this function); did you mean 'gokei'?
   13 |         printf("%d",golei);
      |                     ^~~~~
      |                     gokei
main.c:13:21: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <stdio.h>

int N , K, X , Y ;
int S;




int main(void) {
	
    scanf("%s",N);
    scanf("%s",K);
    scanf("%s",X);
    scanf("%s",Y);

    int S = N*X + (N-K)*Y ; 

    printf("%d",S)


	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:18:19: error: expected ';' before 'return'
   18 |     printf("%d",S)
      |                   ^
      |                   ;
......
   21 |         return 0;
      |         ~~~~~~
Language: C++

#include <stdio.h>

int N , K, X , Y ;
int S;




int main(void) {
	
    scanf("%d",N);
    scanf("%d",K);
    scanf("%d",X);
    scanf("%d",Y);

    int S = N*X + (N-K)*Y ; 

    printf("%d",S)


	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:19: error: expected ';' before 'return'
   18 |     printf("%d",S)
      |                   ^
      |                   ;
......
   21 |         return 0;
      |         ~~~~~~
Language: C++

#include <iostream>
using namespace std;

int Main()
{
	int N,K,X,Y;
	cin>>N;
	cin>>K;
	cin>>X;
	cin>>Y;
	int res1 = K * X;
	int res2 = (N-K) * Y;
	cout<<res1+res2<<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: C++

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.nextLine());
		int k = Integer.parseInt(sc.nextLine());
		int x = Integer.parseInt(sc.nextLine());
		int y = Integer.parseInt(sc.nextLine());
		int fee = (n-k) > 0? x * k + y * (n-k) : x * k;
		System.out.println(fee);
	}

}


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Main {
      | ^~~~~~
Language: C++

lines = $stdin.read.split(?\n).map(&:to_i)
n = lines[0]
k = lines[1]
x = lines[2]
y = lines[3]

if  k >= n {
puts k*x
}  else {
 puts k*x + y(n-k)
}




puts 

Compiler output:
a.cc:1:28: error: stray '\' in program
    1 | lines = $stdin.read.split(?\n).map(&:to_i)
      |                            ^
a.cc:1:1: error: 'lines' does not name a type
    1 | lines = $stdin.read.split(?\n).map(&:to_i)
      | ^~~~~
a.cc:9:4: error: expected unqualified-id before 'else'
    9 | }  else {
      |    ^~~~
a.cc:16:1: error: 'puts' does not name a type
   16 | puts
      | ^~~~
Language: C

#include<stdio.h>

int main() {

	int N, K, X, Y, Total;

	scanf_s("%d", &N);
	scanf_s("%d", &K);
	scanf_s("%d", &X);
	scanf_s("%d", &Y);

	if (N <= K) {
		Total = N*X;
	}
	else {
		Total = K*X + (N - K)*Y;
	}

	printf_s("%d\n", Total);

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    7 |         scanf_s("%d", &N);
      |         ^~~~~~~
      |         scanf
main.c:19:9: error: implicit declaration of function 'printf_s'; did you mean 'printf'? [-Wimplicit-function-declaration]
   19 |         printf_s("%d\n", Total);
      |         ^~~~~~~~
      |         printf
Language: C++

N = input()
K = input()
X = input()
Y = input()

ix = min(K, N)
iy = max(0, N-K)

payment = ix * X + iy * Y
print payment#, ix, iy


Compiler output:
a.cc:10:14: error: stray '#' in program
   10 | print payment#, ix, iy
      |              ^
a.cc:1:1: error: 'N' does not name a type
    1 | N = input()
      | ^
Language: C++

#include <string>
#include <iostream>

using namespace std;

int main ()
{
	int N , K , X , Y ,a;
	cin >>N >> K >> X >> Y;
	a = K * X + (N - K) * Y;
	cout << a <<endl;


Compiler output:
a.cc: In function 'int main()':
a.cc:11:26: error: expected '}' at end of input
   11 |         cout << a <<endl;
      |                          ^
a.cc:7:1: note: to match this '{'
    7 | {
      | ^
Language: C++

#include <iostream>
using namespace std;

int main() {
    cin >> N;
    cin >> K;
    cin >> X;
    cin >> Y;
    if (K-N>0) {
        cout << N*X + (K-N)*Y << endl;
    } else {
        cout << N*X << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:12: error: 'N' was not declared in this scope
    5 |     cin >> N;
      |            ^
a.cc:6:12: error: 'K' was not declared in this scope
    6 |     cin >> K;
      |            ^
a.cc:7:12: error: 'X' was not declared in this scope
    7 |     cin >> X;
      |            ^
a.cc:8:12: error: 'Y' was not declared in this scope
    8 |     cin >> Y;
      |            ^
Language: Java

import java.util.Scanner;

public class Solution{
     public static void main(String[] args){
          Scanner in = new Scanner(System.in);
         int n = in.nextInt();
         int k = in.nextInt();
        int x = in.nextInt();
        int y = in.nextInt();
       
      int ret = 0;
   for(int i = 0; i<n ; i++){
    if(k<n){
    ret = ret+x;
}else{
    ret = ret+y;
}

}
System.out.println(ret);
}
}

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: C++

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

int main() {
  int n,m,x,y;
  cin >> n >> m >> x >> y;
  cout << min(n,m)*x+max(0,n-m)*y << endl
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:42: error: expected ';' before 'return'
    7 |   cout << min(n,m)*x+max(0,n-m)*y << endl
      |                                          ^
      |                                          ;
    8 |   return 0;
      |   ~~~~~~
Language: Java

import java.util.*;

public class taskA {

        public static void main(String[] args) {
                Scanner sc = new Scanner(System.in);
                int totalNights, numFirst, numSubsequent;
                int priceFirst, priceSubsequent;

                totalNights = sc.nextInt();
                numFirst = sc.nextInt();
                numSubsequent = totalNights - numFirst;
                priceFirst = sc.nextInt();
                priceSubsequent = sc.nextInt();
                if (totalNights < numFirst) {
                        numFirst = totalNights;
                        numSubsequent = 0;
                }

                System.out.println(numFirst*priceFirst + numSubsequent*priceSubsequent);

        }

Compiler output:
Main.java:22: error: reached end of file while parsing
        }
         ^
1 error
Language: Java

import java.util.Scanner;

public Class FeeCalculator(){
public static void main (String [] args){
Scanner in = new Scanner(System.in);
int N = in.nextInt();
int K = in.nextInt();
int X = in.nextInt();
int Y = in.nextInt();

int total = K*X + (N-K)*Y;
System.out.println(total);
}
}





Compiler output:
Main.java:3: error: unnamed classes are a preview feature and are disabled by default.
public Class FeeCalculator(){
       ^
  (use --enable-preview to enable unnamed classes)
Main.java:4: error: illegal start of expression
public static void main (String [] args){
^
Main.java:14: error: class, interface, enum, or record expected
}
^
3 errors
Language: C++

#include <iostream>
 
using namespace std;
 
int main() {
   int N,K,X,Y;
   cin >> N;
   cin >> K;
   cin >> X;
   cin >> Y;
   if(N < K) {
     cout << N*X << endl;
     return 0;
   }
   int result = K*X + (N-K)*Y;
   cout << result << endl;
   return 0;
}

Compiler output:
a.cc:2:1: error: extended character   is not valid in an identifier
    2 |  
      | ^
a.cc:4:1: error: extended character   is not valid in an identifier
    4 |  
      | ^
a.cc:2:1: error: '\U000000a0' does not name a type
    2 |  
      | ^
a.cc:4:1: error: '\U000000a0' does not name a type
    4 |  
      | ^
Language: C++

#include <iostream>
 
using namespace std;
 
int main(){
 int N;
 int K;
 int X;
 int Y;
 int sum =0;
 
cin  >>N >> K >> X >> Y;
 
for(int i=1; i<=N; i++){
 if(i <=K){
  sum +=X;
}
else {
 sum +=Y;
}
 
}
return 0;
 

Compiler output:
a.cc: In function 'int main()':
a.cc:23:10: error: expected '}' at end of input
   23 | return 0;
      |          ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

#include <iostream>

using namespace std;

int main(){
 int N;
 int K;
 int X;
 int Y;
 int sum =0;

cin  >>N >> K >> X >> Y;

for(int i=1; i<=N; i++){
 if(i < =K){
  sum +=X;
}
else {
 sum +=Y;
}
 
}
return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:9: error: expected primary-expression before '=' token
   15 |  if(i < =K){
      |         ^
Language: Java

package A;

import java.util.Scanner;

public class Test {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		scan = new Scanner(System.in);
		int K = scan.nextInt();
		scan = new Scanner(System.in);
		int X = scan.nextInt();
		scan = new Scanner(System.in);
		int Y = scan.nextInt();
		
		int Hi = N - K;
		int Yen;
		
		if (Hi > 0){
			Yen = K * X;
			Yen = Yen + (Hi * Y);
			System.out.println(Yen);
		}
		else{
			Yen = N * X;
			System.out.println(Yen);
		}
	}

}


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

package sample;

import java.util.Scanner;

public class A {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		scan = new Scanner(System.in);
		int K = scan.nextInt();
		scan = new Scanner(System.in);
		int X = scan.nextInt();
		scan = new Scanner(System.in);
		int Y = scan.nextInt();
		
		int Hi = N - K;
		int Yen;
		
		if (Hi > 0){
			Yen = K * X;
			Yen = Yen + (Hi * Y);
			System.out.println(Yen);
		}
		else{
			Yen = N * X;
			System.out.println(Yen);
		}
	}

}


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

package sample;

import java.util.Scanner;

public class ABC {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		scan = new Scanner(System.in);
		int K = scan.nextInt();
		scan = new Scanner(System.in);
		int X = scan.nextInt();
		scan = new Scanner(System.in);
		int Y = scan.nextInt();
		
		int Hi = N - K;
		int Yen;
		
		if (Hi > 0){
			Yen = K * X;
			Yen = Yen + (Hi * Y);
			System.out.println(Yen);
		}
		else{
			Yen = N * X;
			System.out.println(Yen);
		}
	}

}


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

public class toi1 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		int n_day = Integer.parseInt(args[0]);
		int k_day = Integer.parseInt(args[1]);
		int x_yen = Integer.parseInt(args[2]);
		int y_yen = Integer.parseInt(args[3]);
		int sum = 0;

		for (int i = 1; i <= n_day; i++) {
			if (i < k_day) {
				sum = sum + y_yen;
			}
			if (i >= k_day) {
				sum = sum + x_yen;
			}
		}
		System.out.println(sum);
	}
}


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

#include <string>
#include <sstream>
#include <iostream>
#include <vector>

using namespace std;

int main() {

	vector <char> _vec;
	int total [26] = {0};
	string s = "";

	cin >> s;

	for (char& c : s) {

		for (int i=0; i<_vec.size(); i++) {

			if(c!=_vec(i) {
			_vec.push(c)
			}
			total(i) = total(i)+1;
		}
	}
	
	
	for (int x : total){
		if(x%2!=0){
			cout <<	"No"
			break;
		}
	}
	
	cout << "Yes";

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:35: error: no match for call to '(std::vector<char>) (int&)'
   20 |                         if(c!=_vec(i) {
      |                               ~~~~^~~
a.cc:23:30: error: 'total' cannot be used as a function
   23 |                         total(i) = total(i)+1;
      |                         ~~~~~^~~
a.cc:23:41: error: 'total' cannot be used as a function
   23 |                         total(i) = total(i)+1;
      |                                    ~~~~~^~~
a.cc:23:46: error: expected ')' before ';' token
   23 |                         total(i) = total(i)+1;
      |                                              ^
      |                                              )
a.cc:20:27: note: to match this '('
   20 |                         if(c!=_vec(i) {
      |                           ^
a.cc:30:37: error: expected ';' before 'break'
   30 |                         cout << "No"
      |                                     ^
      |                                     ;
   31 |                         break;
      |                         ~~~~~
Language: Java

package sample;

import java.util.Scanner;

public class sample {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		scan = new Scanner(System.in);
		int K = scan.nextInt();
		scan = new Scanner(System.in);
		int X = scan.nextInt();
		scan = new Scanner(System.in);
		int Y = scan.nextInt();
		
		int Hi = N - K;
		int Yen;
		
		if (Hi > 0){
			Yen = K * X;
			Yen = Yen + (Hi * Y);
			System.out.println(Yen);
		}
		else{
			Yen = N * X;
			System.out.println(Yen);
		}
	}

}


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

package A;

import java.util.Scanner;

public class sample {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		scan = new Scanner(System.in);
		int K = scan.nextInt();
		scan = new Scanner(System.in);
		int X = scan.nextInt();
		scan = new Scanner(System.in);
		int Y = scan.nextInt();
		
		int Hi = N - K;
		int Yen;
		
		if (Hi > 0){
			Yen = K * X;
			Yen = Yen + (Hi * Y);
			System.out.println(Yen);
		}
		else{
			Yen = N * X;
			System.out.println(Yen);
		}
	}

}


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

package A;

import java.util.Scanner;

public class A {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		scan = new Scanner(System.in);
		int K = scan.nextInt();
		scan = new Scanner(System.in);
		int X = scan.nextInt();
		scan = new Scanner(System.in);
		int Y = scan.nextInt();
		
		int Hi = N - K;
		int Yen;
		
		if (Hi > 0){
			Yen = K * X;
			Yen = Yen + (Hi * Y);
			System.out.println(Yen);
		}
		else{
			Yen = N * X;
			System.out.println(Yen);
		}
	}

}

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

#include<iostream>
#include<string>

 using namespace std;
 
int main(){
string s;
cin>>s;
int char[26]={0};
for(int i=0;i<s.len;i++){
if(char[s[i]-97]==0)
char[s[i]-97]=1;
else char[s[i]-97]=0;
}
 
for(int i=0;i<n;i++){
if (char[i]=='1'){cout<<"No";return 0;}
}
cout<<"Yes";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: expected identifier before numeric constant
    9 | int char[26]={0};
      |          ^~
a.cc:9:10: error: expected ']' before numeric constant
    9 | int char[26]={0};
      |          ^~
      |          ]
a.cc:9:1: error: two or more data types in declaration of 'structured binding'
    9 | int char[26]={0};
      | ^~~
a.cc:9:9: error: empty structured binding declaration
    9 | int char[26]={0};
      |         ^
a.cc:10:17: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'len'
   10 | for(int i=0;i<s.len;i++){
      |                 ^~~
a.cc:11:8: error: expected unqualified-id before '[' token
   11 | if(char[s[i]-97]==0)
      |        ^
a.cc:12:7: error: expected ']' before '[' token
   12 | char[s[i]-97]=1;
      |       ^
      |       ]
a.cc:12:5: error: structured binding declaration cannot have type 'char'
   12 | char[s[i]-97]=1;
      |     ^
a.cc:12:5: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:12:5: error: cannot decompose non-array non-class type 'int'
a.cc:13:12: error: expected ']' before '[' token
   13 | else char[s[i]-97]=0;
      |            ^
      |            ]
a.cc:13:10: error: structured binding declaration cannot have type 'char'
   13 | else char[s[i]-97]=0;
      |          ^
a.cc:13:10: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:13:10: error: cannot decompose non-array non-class type 'int'
a.cc:16:15: error: 'n' was not declared in this scope
   16 | for(int i=0;i<n;i++){
      |               ^
a.cc:17:9: error: expected unqualified-id before '[' token
   17 | if (char[i]=='1'){cout<<"No";return 0;}
      |         ^
Language: C

#include<stdio.h>
#include <string.h>
#include <stdlib.h>
int main()
{

        int n;
        int k;
        int x;
        int y;
        int sum1;
        int i;


	// 個数のの入力
        sum1 = 0;
        scanf("%d %d %d %d",&n,&k,&x,&y);

        for (i = 0;i < n; i++) {
          if (i < k ) {
           sum1 = sum1 + x;
          }
          else
           sum1 = sum1 + y;
          }  
        } 

	printf("%d\n",sum1);

        
	return 0;
}

Compiler output:
main.c:28:16: error: expected declaration specifiers or '...' before string constant
   28 |         printf("%d\n",sum1);
      |                ^~~~~~
main.c:28:23: error: unknown type name 'sum1'
   28 |         printf("%d\n",sum1);
      |                       ^~~~
main.c:31:9: error: expected identifier or '(' before 'return'
   31 |         return 0;
      |         ^~~~~~
main.c:32:1: error: expected identifier or '(' before '}' token
   32 | }
      | ^
Language: C++

N = int(input())
K = int(input())
X = int(input())
Y = int(input())
if N > K:
    print(X * K + Y * (N-K))
else:
    print(X * N)


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

#include<stdio.h>
#include <string.h>
#include <stdlib.h>
int main()
{

        int n;
        int k;
        int x;
        int y;
        int sum1;
        int i;


	// 個数のの入力
        sum = 0;
        scanf("%d %d %d %d",&n,&k,&x,&y);

        for (i = 0;i < n; i++) {
          if (i < k ) {
           sum1 = sum1 + x;
          }
          else
           sum1 = sum1 + y;
          }  
        } 

	printf("%d\n",sum1);

        
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:9: error: 'sum' undeclared (first use in this function); did you mean 'sum1'?
   16 |         sum = 0;
      |         ^~~
      |         sum1
main.c:16:9: note: each undeclared identifier is reported only once for each function it appears in
main.c: At top level:
main.c:28:16: error: expected declaration specifiers or '...' before string constant
   28 |         printf("%d\n",sum1);
      |                ^~~~~~
main.c:28:23: error: unknown type name 'sum1'
   28 |         printf("%d\n",sum1);
      |                       ^~~~
main.c:31:9: error: expected identifier or '(' before 'return'
   31 |         return 0;
      |         ^~~~~~
main.c:32:1: error: expected identifier or '(' before '}' token
   32 | }
      | ^
Language: C

#include<stdio.h>
#include <string.h>
#include <stdlib.h>
int main()
{

        int n;
        int k;
        int x;
        int y;
        int sum;
        int i;


	// 個数のの入力
        sum = 0;
        scanf("%d %d %d %d",&n,&k,&x,&y);

        for (i = 0;i < n; i++) {
          if (i < k ) {
           sum = sum + x;
          }
          else
           sum = sum + y;
          }  
        } 

	printf("%d|n",sum);

        
	return 0;
}

Compiler output:
main.c:28:16: error: expected declaration specifiers or '...' before string constant
   28 |         printf("%d|n",sum);
      |                ^~~~~~
main.c:28:23: error: unknown type name 'sum'
   28 |         printf("%d|n",sum);
      |                       ^~~
main.c:31:9: error: expected identifier or '(' before 'return'
   31 |         return 0;
      |         ^~~~~~
main.c:32:1: error: expected identifier or '(' before '}' token
   32 | }
      | ^
Language: C

#include<stdio.h>
#include <string.h>
#include <stdlib.h>
int main()
{

        int n;
        int k;
        int x;
        int y;
        int sum;
        int i;


	// 個数のの入力
        sum = 0;
        scanf("%d %d %d %d",&n,&k,&x,&y);

        for (i = 0,i < n, i++) {
          if (i < k ) {
           sum = sum + x;
          }
          else
           sum = sum + y;
          }  
        } 

	printf("%d|n",sum);

        
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:19:30: error: expected ';' before ')' token
   19 |         for (i = 0,i < n, i++) {
      |                              ^
      |                              ;
main.c:19:30: error: expected expression before ')' token
main.c: At top level:
main.c:28:16: error: expected declaration specifiers or '...' before string constant
   28 |         printf("%d|n",sum);
      |                ^~~~~~
main.c:28:23: error: unknown type name 'sum'
   28 |         printf("%d|n",sum);
      |                       ^~~
main.c:31:9: error: expected identifier or '(' before 'return'
   31 |         return 0;
      |         ^~~~~~
main.c:32:1: error: expected identifier or '(' before '}' token
   32 | }
      | ^
Language: C

#include<stdio.h>
#include <string.h>
#include <stdlib.h>
int main()
{

        int n;
        int k;
        int x;
        int y;
        int sum;
        int i;


	// 個数のの入力
        sum = 0;
        scanf("%d %d %d %d",&n,&k,&x,&y);

        for (i = 0,i < n, i++) {
          if (i < k ) {
           sum = sum + x;
          }
          else
           sum = sum + y;
          }  
        } 

	printf("%d",sum);

        
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:19:30: error: expected ';' before ')' token
   19 |         for (i = 0,i < n, i++) {
      |                              ^
      |                              ;
main.c:19:30: error: expected expression before ')' token
main.c: At top level:
main.c:28:16: error: expected declaration specifiers or '...' before string constant
   28 |         printf("%d",sum);
      |                ^~~~
main.c:28:21: error: unknown type name 'sum'
   28 |         printf("%d",sum);
      |                     ^~~
main.c:31:9: error: expected identifier or '(' before 'return'
   31 |         return 0;
      |         ^~~~~~
main.c:32:1: error: expected identifier or '(' before '}' token
   32 | }
      | ^
Language: C

#include<stdio.h>
#include <string.h>
#include <stdlib.h>
int main()
{

        int n;
        int k;
        int x;
        int y;
        int sum;
        int i;


	// 個数のの入力
        sum = 0;
        scanf("%d %d %d %d",&n,&k,&x,&y);

        for (i = 0,i < n, i++) {
          if (i < k ) {
           sum = sum + x;
          }
          else
           sum = sum + y;
          }  
        } 

        
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:19:30: error: expected ';' before ')' token
   19 |         for (i = 0,i < n, i++) {
      |                              ^
      |                              ;
main.c:19:30: error: expected expression before ')' token
main.c: At top level:
main.c:29:9: error: expected identifier or '(' before 'return'
   29 |         return 0;
      |         ^~~~~~
main.c:30:1: error: expected identifier or '(' before '}' token
   30 | }
      | ^
Language: C

#include<stdio.h>
#include <string.h>
#include <stdlib.h>
int main()
{

        int n;
        int k;
        int x;
        int y;
        int sum;
        int i;


	// 個数のの入力
        sum = 0;
        scanf("%d %d %d %d",&n,&k,&x,&y);

        for (i = 0,i < n, i;;) {
          if (i < k ) {
           sum = sum + x;
          }
          else
           sum = sum + y;
          }  
        } 

        
	return 0;
}

Compiler output:
main.c:29:9: error: expected identifier or '(' before 'return'
   29 |         return 0;
      |         ^~~~~~
main.c:30:1: error: expected identifier or '(' before '}' token
   30 | }
      | ^
Language: C++

#include<cstdio>                                                                                                                                                        
  2 #include<functional>
  3 #include<algorithm>
  4 using namespace std;
  5 
  6 int main(){
  7 
  8   int x,y,n,k,ans=0;
  9   scanf("%d", &n);
 10 //  printf("%d",n);
 11   scanf("%d", &k);
 12 //  printf("%d",k);
 13   scanf("%d", &x);
 14 //  printf("%d",x);
 15   scanf("%d", &y);
 16 //  printf("%d",y);
 17 
 18   if(n>k){
 19     ans=k*x;
 20     ans+=((n-k)*y);
 21     printf("%d",ans);
 22     return 0;
 23   }
 24   ans=(n*x);
 25   printf("%d",ans);
 26   return 0;
 27 }

Compiler output:
a.cc:2:5: error: stray '#' in program
    2 |   2 #include<functional>
      |     ^
a.cc:3:5: error: stray '#' in program
    3 |   3 #include<algorithm>
      |     ^
a.cc:2:3: error: expected unqualified-id before numeric constant
    2 |   2 #include<functional>
      |   ^
a.cc:5:3: error: expected unqualified-id before numeric constant
    5 |   5
      |   ^
Language: C++

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

int main() {
	int n, k, x, y;
	scanf("%d %d %d %d", &n, &k, &x, &y);
	int ans = k * x;
	ans = min(n, k) * x
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:28: error: expected ';' before 'return'
    8 |         ans = min(n, k) * x
      |                            ^
      |                            ;
    9 | 
   10 |         return 0;
      |         ~~~~~~
Language: Java

/* Filename: ABC044A.java
 * Author: Mushiyo
 */

import java.util.Scanner;

public class ABC044A {

	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);

		while (input.hasNext()) {
			int N = input.nextInt();
			int K = input.nextInt();
			int X = input.nextInt();
			int Y = input.nextInt();
			
			if(N <= K){
				System.out.println(N * X);
			} else {
				System.out.println(K * X + (N - K) * Y);
			}
		}
	}

}


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

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



int main() {
  string w;
  cin >> w;

  sort(w.begin(), w.end())
 for (int i = 0; i < N; i++){
   if(ｗ.at(i)=ｗ.at(i+1)){
     int k=0; k++;
   }
   if(k%==0){cout<<"Yes"<<endl;}
   cout<<"No"<<endl;
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:10:27: error: expected ';' before 'for'
   10 |   sort(w.begin(), w.end())
      |                           ^
      |                           ;
   11 |  for (int i = 0; i < N; i++){
      |  ~~~                       
a.cc:11:18: error: 'i' was not declared in this scope
   11 |  for (int i = 0; i < N; i++){
      |                  ^
a.cc:11:22: error: 'N' was not declared in this scope
   11 |  for (int i = 0; i < N; i++){
      |                      ^
a.cc:17:3: error: expected '}' at end of input
   17 |  }
      |   ^
a.cc:6:12: note: to match this '{'
    6 | int main() {
      |            ^
Language: C++

/*https://atcoder.jp/contests/abc044/tasks/abc044_b*/
#include<bits/stdc++.h>
using namespace std;
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
#ifndef ONLINE_JUDGE
	// for getting input from input.txt
	freopen("input.txt", "r", stdin);
	// for writing output to output.txt
	freopen("output.txt", "w", stdout);
#endif
	string w;
	cin >> w;
	for (int i = 0; i < w.size(); i++)
	{
		int count = 0;
		for (int j = 0; j <hthth w.size(); j++)
		{
			if (w[i] == w[j])
				count++;
		}
		if (count % 2 != 0)
		{
			cout << "No";
			return 0;
		}
	}
	cout << "Yes";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:36: error: 'hthth' was not declared in this scope
   19 |                 for (int j = 0; j <hthth w.size(); j++)
      |                                    ^~~~~
a.cc:19:41: error: expected ';' before 'w'
   19 |                 for (int j = 0; j <hthth w.size(); j++)
      |                                         ^~
      |                                         ;
a.cc:19:48: warning: ignoring return value of 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]', declared with attribute 'nodiscard' [-Wunused-result]
   19 |                 for (int j = 0; j <hthth w.size(); j++)
      |                                          ~~~~~~^~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:2:
/usr/include/c++/14/bits/basic_string.h:1076:7: note: declared here
 1076 |       size() const _GLIBCXX_NOEXCEPT
      |       ^~~~
a.cc:19:50: error: expected ')' before ';' token
   19 |                 for (int j = 0; j <hthth w.size(); j++)
      |                     ~                            ^
      |                                                  )
a.cc:19:52: error: 'j' was not declared in this scope
   19 |                 for (int j = 0; j <hthth w.size(); j++)
      |                                                    ^
Language: C++

#include <bits/stdc++.h>
#define pb push_back
#define speed ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define ll long long
#define fr first
#define sc second
using namespace std;
ll ar[26] ;
int main()
{
    ///freopen("input.txt" , "r" , stdin );
    ///freopen("output.txt", "w" , stdout );
    ///Murtazoev_2007
    speed ;
    ///Autor of the greatest code :: Ahmadjon Murtazoev
    string al = "abcdefghijklmnopqrstuvwxyz" ;
    string str ;
    cin >> str ;
    ll a = str.size() ;
    for (ll i = 0 ; i<26 ; i ++ )
    {
        for (ll j = 0 ; j<a ; j ++ )
        {
            if (s[j] == al[i])
            {
                ar[i] ++ ;
            }
        }
    }
    for (ll i = 0 ; i<26 ; i ++ )
    {
        if (ar[i]%2 != 0)
        {
            cout << "No" << endl ;
            return 0 ;
        }
    }
    cout << "Yes" << endl ;
    return 0 ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:17: error: 's' was not declared in this scope
   24 |             if (s[j] == al[i])
      |                 ^