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

int main(){
	int t,n;
	int aka[5]={0};
	int i;
	for(i=0;i<4;i++){
		cin>>t>>n;
		if(t==1){
			aka[i]=6000*n;
		}
		else if(t==2){
			aka[i]=4000*n;
		}
		else if(t==3){
			aka[i]=3000*n;
		}
		else{
			aka[i]=2000*n;
		}
	}
	for(i=0;i<4;i++){
		cout<<aka[i]<<endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:17: error: 'cin' was not declared in this scope
    6 |                 cin>>t>>n;
      |                 ^~~
a.cc:21:17: error: 'cout' was not declared in this scope
   21 |                 cout<<aka[i]<<endl;
      |                 ^~~~
a.cc:21:31: error: 'endl' was not declared in this scope
   21 |                 cout<<aka[i]<<endl;
      |                               ^~~~
Language: C++

#include <iostream>
using namespace std;
int main(){
	int a,b;
	for (int A=0;A<4;A++){
		cin>>a>>b;
		if (a==1)cout<<6000*b<<endl;
		if (a==2)cout<<4000*b<<endl;
		if (a==3)cout<<1000*b<<endl;
		else cout<<2000*b<<endl;
	}
	return 0:
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: expected ';' before ':' token
   12 |         return 0:
      |                 ^
      |                 ;
a.cc:12:17: error: expected primary-expression before ':' token
Language: C++

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

int main(){
   int a,b,c;
   for(int i =0;i<4;i++){
      cin >> a>>b;
       if (a == 1) {
       c = 6000*b;
       cout << c<<endl;
       } else if (a == 2) {
       c = 4000*b;
       cout <<c<<endl;
       } else if (a ==3) {
       c = 3000*b;
       cout <<c<<endl; 
       } else if (a ==4) {
       c = 2000*b;
       cout <<c<<endl; 
       }
}


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

#include <iosream>
using namespace std;

int A[4],B[4],C[4];

int main(){
  cin >>A[0]>>B[0]>>A[1]>>B[1]>>A[2]>>B[2]>>A[3]>>B[3];
  for(int i = 0; i < 4; i++){
    if(A[i]==1){
      C[i]=6000*B[i];
    }else if(A[i]==2){
      C[i]=4000*B[i];
    }else if(A[i]==3){
      C[i]=3000*B[i];
    }else{
      C[i]=2000*B[i];
  }
  cout << C[0] <<C[1] <<C[2] <<C[3];
}

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

#include <iosream>
using namespace std;

int A[4],B[4],C[4];

int main(){
  cin >>A[0]>>B[0]>>A[1]>>B[1]>>A[2]>>B[2]>>A[3]>>B[3];
  for(int i = 0; i < 4; i++){
    if(A[i]==1){
      C[i]=6000*B[i];
    }else if(A[i]==2){
      C[i]=4000*B[i];
    }else if(A[i]==3){
      C[i]=3000*B[i];
    }else{
      C[i]=2000*B[i];
    }
  }
  cout <<C[0]<<endl<<C[1]<<endl<<C[2]<<endl<<C[3]<endl;
}

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

#include<stdio.h>

int main(void){
	int i,t,n;
	for(i=0;i<4;i++){
		scanf("%d %d",&t,&n);
		switch(t){
		case 1:
			printf("%d\n",n*6000);
			break;
		case 2:
			printf("%d\n",n*4000);
			break;
		case 3:
			printf("%d\n",n*3000);
			break;
		case 4:
			printf("%d\n",n*2000);
			break;
		}
	return 0;
}

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

using System;
class Program
{
    static void Main()
    {
        for (int i = 0; i < 4; i++)
        {
            int[] tickets = { 6000, 4000, 3000, 2000 };
            var strs = Console.ReadLine().Split(' ');
            Console.WriteLine(tickets[int.Parse(strs[0]) - 1] * int.Parse(strs[1]));
        }
    }
}

Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:13:2: error: expected ';' after class definition
   13 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Program::Main()':
a.cc:8:16: error: structured binding declaration cannot have type 'int'
    8 |             int[] tickets = { 6000, 4000, 3000, 2000 };
      |                ^~
a.cc:8:16: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:8:16: error: empty structured binding declaration
a.cc:8:19: error: expected initializer before 'tickets'
    8 |             int[] tickets = { 6000, 4000, 3000, 2000 };
      |                   ^~~~~~~
a.cc:9:13: error: 'var' was not declared in this scope
    9 |             var strs = Console.ReadLine().Split(' ');
      |             ^~~
a.cc:10:13: error: 'Console' was not declared in this scope
   10 |             Console.WriteLine(tickets[int.Parse(strs[0]) - 1] * int.Parse(strs[1]));
      |             ^~~~~~~
a.cc:10:31: error: 'tickets' was not declared in this scope
   10 |             Console.WriteLine(tickets[int.Parse(strs[0]) - 1] * int.Parse(strs[1]));
      |                               ^~~~~~~
a.cc:10:39: error: expected primary-expression before 'int'
   10 |             Console.WriteLine(tickets[int.Parse(strs[0]) - 1] * int.Parse(strs[1]));
      |                                       ^~~
a.cc:10:39: error: expected ']' before 'int'
Language: C++

using System;
class Program
{
    static void Main()
    {
        for (int i = 0; i < 4; i++)
        {
            int[] tickets = new int[]{ 6000, 4000, 3000, 2000 };
            string[] strs = Console.ReadLine().Split(' ');
            Console.WriteLine(tickets[int.Parse(strs[0]) - 1] * int.Parse(strs[1]));
        }
    }
}

Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:13:2: error: expected ';' after class definition
   13 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Program::Main()':
a.cc:8:16: error: structured binding declaration cannot have type 'int'
    8 |             int[] tickets = new int[]{ 6000, 4000, 3000, 2000 };
      |                ^~
a.cc:8:16: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:8:16: error: empty structured binding declaration
a.cc:8:19: error: expected initializer before 'tickets'
    8 |             int[] tickets = new int[]{ 6000, 4000, 3000, 2000 };
      |                   ^~~~~~~
a.cc:9:13: error: 'string' was not declared in this scope
    9 |             string[] strs = Console.ReadLine().Split(' ');
      |             ^~~~~~
a.cc:9:20: error: expected primary-expression before ']' token
    9 |             string[] strs = Console.ReadLine().Split(' ');
      |                    ^
a.cc:10:13: error: 'Console' was not declared in this scope
   10 |             Console.WriteLine(tickets[int.Parse(strs[0]) - 1] * int.Parse(strs[1]));
      |             ^~~~~~~
a.cc:10:31: error: 'tickets' was not declared in this scope
   10 |             Console.WriteLine(tickets[int.Parse(strs[0]) - 1] * int.Parse(strs[1]));
      |                               ^~~~~~~
a.cc:10:39: error: expected primary-expression before 'int'
   10 |             Console.WriteLine(tickets[int.Parse(strs[0]) - 1] * int.Parse(strs[1]));
      |                                       ^~~
a.cc:10:39: error: expected ']' before 'int'
Language: C++

using System;
class Program
{
    static void Main()
    {
        for (int i = 0; i < 4; i++)
        {
            int[] tickets = { 6000, 4000, 3000, 2000 };
            string[] strs = Console.ReadLine().Split(' ');
            Console.WriteLine(tickets[Int32.Parse(strs[0]) - 1] * Int32.Parse(strs[1]));
        }
    }
}

Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:13:2: error: expected ';' after class definition
   13 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Program::Main()':
a.cc:8:16: error: structured binding declaration cannot have type 'int'
    8 |             int[] tickets = { 6000, 4000, 3000, 2000 };
      |                ^~
a.cc:8:16: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:8:16: error: empty structured binding declaration
a.cc:8:19: error: expected initializer before 'tickets'
    8 |             int[] tickets = { 6000, 4000, 3000, 2000 };
      |                   ^~~~~~~
a.cc:9:13: error: 'string' was not declared in this scope
    9 |             string[] strs = Console.ReadLine().Split(' ');
      |             ^~~~~~
a.cc:9:20: error: expected primary-expression before ']' token
    9 |             string[] strs = Console.ReadLine().Split(' ');
      |                    ^
a.cc:10:13: error: 'Console' was not declared in this scope
   10 |             Console.WriteLine(tickets[Int32.Parse(strs[0]) - 1] * Int32.Parse(strs[1]));
      |             ^~~~~~~
a.cc:10:31: error: 'tickets' was not declared in this scope
   10 |             Console.WriteLine(tickets[Int32.Parse(strs[0]) - 1] * Int32.Parse(strs[1]));
      |                               ^~~~~~~
a.cc:10:39: error: 'Int32' was not declared in this scope
   10 |             Console.WriteLine(tickets[Int32.Parse(strs[0]) - 1] * Int32.Parse(strs[1]));
      |                                       ^~~~~
a.cc:10:51: error: 'strs' was not declared in this scope
   10 |             Console.WriteLine(tickets[Int32.Parse(strs[0]) - 1] * Int32.Parse(strs[1]));
      |                                                   ^~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
	int a,b;
	for(int i=0;i<4;i++)
		cin>>a>>b;
		if(a==1)
		cout<<b*6000<<endl;
		if(a==2)
		cout<<b*4000<<endl;;
		if(a==3)
		cout<<b*3000<<endl;
		if(a==4)
		cout<<b*2000<<endl;
	}
	return 0;
}

Compiler output:
a.cc:16:9: error: expected unqualified-id before 'return'
   16 |         return 0;
      |         ^~~~~~
a.cc:17:1: error: expected declaration before '}' token
   17 | }
      | ^
Language: Java

class Main{

    public void solve(){
        Scanner sc = new Scanner(System.in);
        int nissu, nyuumai, pumai;
        double nyuuryou, puryou, total;
        nissu = sc.nextInt();
        int num = 1;
       while(num <= nissu){
    	   nyuuryou = sc.nextInt();
    	   puryou = sc.nextInt();
    	   nyuumai = sc.nextInt();
    	   pumai = sc.nextInt();

    	   if(nyuumai >= 5 && pumai >= 2){
    		   nyuuryou = nyuuryou - nyuuryou * 0.2;
    		   puryou = puryou - puryou * 0.2;
    	   }


    	   total = (nyuuryou * nyuumai) + (puryou * pumai);
    	   System.out.println((int)total);
    	   num += 1;



       }

    }

    public static void main(String[] args){
        Main obj = new Main();
        obj.solve();
    }
}

Compiler output:
Main.java:4: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:4: 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 Main{
        public void solve();
        Scanner sc = new Scanner(System.in);
        int n,x,y,b,p,kin;
        n = sc.nextInt();
        x = sc.nextInt();
        y = sc.nextInt();
        b = sc.nextInt();
        p = sc.nextInt();
        kin = (x*b)+(y*p);
        if(x=>5 && y=>2){
            System.out.println(kin*0.8);
        }else{
            System.out.println(kin);
        }
public static void main(String[]args){
    Main obj = new Main();
    obj.solve();
}
    }

Compiler output:
Main.java:6: error: <identifier> expected
        n = sc.nextInt();
         ^
Main.java:7: error: <identifier> expected
        x = sc.nextInt();
         ^
Main.java:8: error: <identifier> expected
        y = sc.nextInt();
         ^
Main.java:9: error: <identifier> expected
        b = sc.nextInt();
         ^
Main.java:10: error: <identifier> expected
        p = sc.nextInt();
         ^
Main.java:11: error: <identifier> expected
        kin = (x*b)+(y*p);
           ^
Main.java:12: error: illegal start of type
        if(x=>5 && y=>2){
        ^
Main.java:12: error: <identifier> expected
        if(x=>5 && y=>2){
            ^
Main.java:12: error: illegal start of expression
        if(x=>5 && y=>2){
             ^
Main.java:12: error: illegal start of expression
        if(x=>5 && y=>2){
                     ^
Main.java:12: error: ';' expected
        if(x=>5 && y=>2){
                       ^
Main.java:14: error: illegal start of type
        }else{
         ^
12 errors
Language: Java

//2701 青木沙采 問２
import java.util.Scanner;
public class Q0277{
	
	public void soleve(){
		Scanner sc = new Scanner(System.in);
		int ninzu,k;
		int ban;
		for(int i=1;i<=4;i++){
			ban = sc.nextInt();
			if(ban == 1){
				k = 6000;
			}else if(ban == 2){
				k = 4000;
			}else if(ban == 3){
				k = 3000;
			}else{
				k = 2000;
			}
			ninzu = sc.nextInt();
			int uriage = k * ninzu;
			System.out.println(uriage);
		}
	}
	public static void main(String[] args){
		Q0277 obj = new Q0277();
		obj.soleve();
	}
}

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

import java.util.Scanner;
public class huro{
	 public void solve(){
	 	int n,x,y,b,p,go,wgo;
		Scanner sc = new Scanner(System.in);
		n = sc.nextInt();
		for(int i=1;i<=n;i++){
			x = sc.nextInt();
			y = sc.nextInt();
		    b = sc.nextInt();
		    p = sc.nextInt();
		    go = x*b+y*p;
			if(b<=5){
				b=5;
			}
		    if(p<=2){
				p=2;
		    }
			wgo =(x*b+y*p)/10*8;
			if(go<wgo){
				System.out.println(go);
			}else{
		    	System.out.println(wgo);
			}
		}
	 }
    public static void main(String[] args){
        huro obj = new huro();
        obj.solve();
    }
}

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

import java.util.*;
 
public class Main {
 
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
         
        while(true){
            int m = sc.nextInt();
            if(m==0) break;
            int cnt = 0;
            boolean flag = false;
            for(int i=0;i<n;i++){
                int p = sc.nextInt();
                if(p>0) cnt++;
                if(p>1) flag = true;
            }
            if(!flag) System.out.println("NA");
            else System.out.println(cnt+1);
        }
    }
}

Compiler output:
Main.java:13: error: cannot find symbol
            for(int i=0;i<n;i++){
                          ^
  symbol:   variable n
  location: class Main
1 error
Language: Java

import java.util.Scanner;
public class Main{
	public static void main(String[]args){
		Scanner sc =new Scanner(System.in);
		int Ni =sc.nextInt();
		int[] A = new int[Ni];
		for(int n = 1;n <= Ni; n++){
			int Nr = sc.nextInt();
			int Pr = sc.nextInt();
			int Nm = sc.nextInt();
			int Pm = sc.nextInt();
		}
		if(Nm >= 5 && Pm >= 2){
			A[n] = (Nr * Nm / 10 * 8) + (Pr * Pm / 10 * 8);
		}else{
			A[n] = Nr * Nm + Pr * Pm;
		}		
		for(int i = 1; i <= Ni; i++){
			System.out.println(A[i]);
		}
	}
}

Compiler output:
Main.java:13: error: cannot find symbol
		if(Nm >= 5 && Pm >= 2){
		   ^
  symbol:   variable Nm
  location: class Main
Main.java:13: error: cannot find symbol
		if(Nm >= 5 && Pm >= 2){
		              ^
  symbol:   variable Pm
  location: class Main
Main.java:14: error: cannot find symbol
			A[n] = (Nr * Nm / 10 * 8) + (Pr * Pm / 10 * 8);
			  ^
  symbol:   variable n
  location: class Main
Main.java:14: error: cannot find symbol
			A[n] = (Nr * Nm / 10 * 8) + (Pr * Pm / 10 * 8);
			        ^
  symbol:   variable Nr
  location: class Main
Main.java:14: error: cannot find symbol
			A[n] = (Nr * Nm / 10 * 8) + (Pr * Pm / 10 * 8);
			             ^
  symbol:   variable Nm
  location: class Main
Main.java:14: error: cannot find symbol
			A[n] = (Nr * Nm / 10 * 8) + (Pr * Pm / 10 * 8);
			                             ^
  symbol:   variable Pr
  location: class Main
Main.java:14: error: cannot find symbol
			A[n] = (Nr * Nm / 10 * 8) + (Pr * Pm / 10 * 8);
			                                  ^
  symbol:   variable Pm
  location: class Main
Main.java:16: error: cannot find symbol
			A[n] = Nr * Nm + Pr * Pm;
			  ^
  symbol:   variable n
  location: class Main
Main.java:16: error: cannot find symbol
			A[n] = Nr * Nm + Pr * Pm;
			       ^
  symbol:   variable Nr
  location: class Main
Main.java:16: error: cannot find symbol
			A[n] = Nr * Nm + Pr * Pm;
			            ^
  symbol:   variable Nm
  location: class Main
Main.java:16: error: cannot find symbol
			A[n] = Nr * Nm + Pr * Pm;
			                 ^
  symbol:   variable Pr
  location: class Main
Main.java:16: error: cannot find symbol
			A[n] = Nr * Nm + Pr * Pm;
			                      ^
  symbol:   variable Pm
  location: class Main
12 errors
Language: Java

import java.util.Scanner;

public class mainA{
	int a,kin,wari;
	public void solve(){
		Scanner sc=new Scanner(System.in);
		
		int n=sc.nextInt();
		
		for(int i=0;i<n;i++){
			int x=sc.nextInt();
			int y=sc.nextInt();
			int b=sc.nextInt();
			int p=sc.nextInt();
			
			kin=x*b+y*p;
			
			if(b>=5 && p>=2){
				wari=kin*4/5;
			}else if(b<5){
					b=5;
					}else if(p<2){
						p=2;
					}
					wari=(x*b+y*p)*4/5;
					if(kin>wari){
						kin=wari;
					}
					System.out.println(kin);
					}
	}
					public static void main(String[] args){
						mainA obj = new mainA();
						obj.solve();
					}
}

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

import java.util.Scanner;
public class Main2_278{
	
    public void solve(){
		Scanner sc=new Scanner(System.in);
		int niti,nyuryo,puluryo,nyumai,pulumai,nyukei,pulukei,goukei;
		niti=sc.nextInt();
		for(int i=0; i<niti; i++){
		nyuryo=sc.nextInt();
		puluryo=sc.nextInt();
		nyumai=sc.nextInt();
		pulumai=sc.nextInt();
		nyukei=nyuryo*nyumai;
		pulukei=puluryo*pulumai;
		goukei=nyukei+pulukei;
		if(nyumai>=5 && pulumai>=2 ){
			goukei=goukei*4/5;
			System.out.println(goukei);
	}else {
		System.out.println(goukei);
	}
}
}
      public static void main(String[] args){
      Main2_278 obj = new  Main2_278(); 
      obj.solve();      
  }
}

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

	public void solve(){
		Scanner sc =new Scanner(System.in);
		
		int stok,syurui;
		int a = 0;
		int hairetsu[];
		syurui = sc.nextInt();
		hairetsu = new int[syurui];
		
		for(int b = 0; b<syurui; b++){
			stok =sc.nextInt();
			hairetsu[a] = stok;
			a+=1;
		}
		for(int p=0;p<syurui;p++){
			if(hairetsu[p] == 0){
				System.out.print("N#A");
			}else if(syurui ==1){
				System.out.print(2);
			}else{
			System.out.print(syurui+1);
			}
		}
 }
	public static void main(String[] args){
		Main1 obj = new Main1();
		obj.solve();
	}
}

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
	public void solve(){
	       ^
  (use --enable-preview to enable unnamed classes)
Main.java:29: error: class, interface, enum, or record expected
}
^
2 errors
Language: Java

import java.util.*;

public class mon2{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int x = 0;
		int y = 0;
		int z = 0;
		for(int i=1;i<=4;i++){
			 x = scan.nextInt();
			 z = scan.nextInt();
			 if(x == 1){
			 	y = z * 6000;
			 }else
			 if(x == 2){
			 	y = z * 4000;
			 }else
			 if(x == 3){
			 	y = z * 3000;
			 }else
			 if(x == 4){
			 	y = z * 2000;
			 }
			 System.out.println(y);
		}
	}
}

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

import java.util.*;
		
public class Main{
	public static void main(String[] args){
			Scanner scan = new Scanner(System.in);
			int N = 0;
			int x = 0;
			int y = 0;
			int b = 0;
			int p = 0;
			int f;
			int a = 99999;
			N = scan.nextInt();
			for(int i=0;i<N;i++){
				x = scan.nextInt();
				y = scan.nextInt();
				b = scan.nextInt();
				p = scan.nextInt();
				f = x * b + y * p;	//通常の値段
				if(b >= 5 && p >= 2){
					a = f * 0.8;
				}else
				if(b >= 5 && p < 2){	//b>5を判定
					a = f * 0.8;
				}else
				if(b < 5 && p >= 2){	//p>2を判定
					a = f * 0.8;
				}else{
					System.out.println(f);
				}
				
				if(f > a){
					System.out.println(a);
				}else{
					System.out.println(f);
				}
			}
	}
}

Compiler output:
Main.java:21: error: incompatible types: possible lossy conversion from double to int
					a = f * 0.8;
					      ^
Main.java:24: error: incompatible types: possible lossy conversion from double to int
					a = f * 0.8;
					      ^
Main.java:27: error: incompatible types: possible lossy conversion from double to int
					a = f * 0.8;
					      ^
3 errors
Language: C

#include<stdio.h>
int main(void)
{
	int N,x,y,p,i,w,r,n,g;
	scanf("%d",&N);
	for(i=1;i<=N;i++){
		scanf("%d %d %d %d",&x,&y,&b,&p);
		W=x*b;
		r=y*p;
		n=w+r;
		if(x==5&&y==2){
			g=n*0.2;
			n=n-g;
		}
	}	
	printf("%d\n",n);
	return 0
}	

Compiler output:
main.c: In function 'main':
main.c:7:44: error: 'b' undeclared (first use in this function)
    7 |                 scanf("%d %d %d %d",&x,&y,&b,&p);
      |                                            ^
main.c:7:44: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:17: error: 'W' undeclared (first use in this function)
    8 |                 W=x*b;
      |                 ^
main.c:17:17: error: expected ';' before '}' token
   17 |         return 0
      |                 ^
      |                 ;
   18 | }
      | ~
Language: C

#include<stdio.h>
int main(void)
{
	int N,x,y,p,i,w,r,n,g;
	scanf("%d",&N);
	for(i=1;i<=N;i++){
		scanf("%d %d %d %d",&x,&y,&b,&p);
		W=x*b;
		r=y*p;
		n=w+r;
		if((x<=5)&&(y<=2)){
			g=n*0.2;
			n=n-g;
		}
	}	
	printf("%d\n",n);
	return 0
}	

Compiler output:
main.c: In function 'main':
main.c:7:44: error: 'b' undeclared (first use in this function)
    7 |                 scanf("%d %d %d %d",&x,&y,&b,&p);
      |                                            ^
main.c:7:44: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:17: error: 'W' undeclared (first use in this function)
    8 |                 W=x*b;
      |                 ^
main.c:17:17: error: expected ';' before '}' token
   17 |         return 0
      |                 ^
      |                 ;
   18 | }
      | ~
Language: C

#include<stdio.h>
int f(int fa,int fb,int fc,int fd){
    if(fc>=5&&fd>=2)return (fa*fc+fb*fd)*;
    return fa*fc+fb*fd;
}
int main(void){
    int i,j,k,N,x,y,b,p,ans,ANS;
    scanf("%d",&N);
    for(i=0;i<N;i++){
        scanf("%d %d %d %d",&x,&y,&b,&p);
        ANS=f(x,y,b,p);
        for(j=b;j<=b+5;j++){
            for(k=p;k<=p+2;k++){
                ans=f(x,y,j,k);
                if(ans<ANS)ANS=ans;
            }
        }
        printf("%d\n",ANS);
    }
    return 0;
}

Compiler output:
main.c: In function 'f':
main.c:3:42: error: expected expression before ';' token
    3 |     if(fc>=5&&fd>=2)return (fa*fc+fb*fd)*;
      |                                          ^
Language: C

#include<stdio.h>
int main(void)
{
		int n,i,j,x,y,b,p,a[365];
		scanf("%d",&n);
		for(i=0;i<n;i++){
			scanf("%d %d %d %d",&x,&y,&b,&p);
			if(5>=b&&2<=p){
					a[i]=(x*b+y*p)*0.8;
					}
			else{
					a[i]=(x*b+y*p);
					}
				}	
			for(j=0;j<n;j++){
					printf("%d\n",a[j];
					}
			return 0;
}			

Compiler output:
main.c: In function 'main':
main.c:16:59: error: expected ')' before ';' token
   16 |                                         printf("%d\n",a[j];
      |                                               ~           ^
      |                                                           )
main.c:16:60: error: expected ';' before '}' token
   16 |                                         printf("%d\n",a[j];
      |                                                            ^
      |                                                            ;
   17 |                                         }
      |                                         ~
Language: C

#include<stdio.h>
int main(void){
     int n,x,y,b,p,i;
     scanf("%d",&n);
     for(i=0;i<n;i++){
          scanf("%d %d %d %d",&x,&y,&b,&p);
          if(b>=5 && p>=2)printf("%d\n",0.8*(b*x+p*y))
          else printf("%d\n",x+y);
     }
     return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:55: error: expected ';' before 'else'
    7 |           if(b>=5 && p>=2)printf("%d\n",0.8*(b*x+p*y))
      |                                                       ^
      |                                                       ;
    8 |           else printf("%d\n",x+y);
      |           ~~~~
Language: C

#include<stdio.h>
int main(void){
     int n,x,y,b,p,i;
     scanf("%d",&n);
     for(i=0;i<n;i++){
          scanf("%d %d %d %d",&x,&y,&b,&p);
          if(b>=5 && p>=2)printf("%d\n",0.8*(b*x+p*y))
          else printf("%d\n",b*x+p*y);
     }
     return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:55: error: expected ';' before 'else'
    7 |           if(b>=5 && p>=2)printf("%d\n",0.8*(b*x+p*y))
      |                                                       ^
      |                                                       ;
    8 |           else printf("%d\n",b*x+p*y);
      |           ~~~~
Language: C

#include<stdio.h>
int main(void)
{
	int f,g,n,x,y,b,p,i;
	scanf("%d",&n);
	for(i=0;i<n;i++){
	scanf("%d %d %d %d",&x,&y,&b,&p);
	if(x>=5&&y>=2){
	f=(x*b+y*p)*0.8;
	g=x*b+y*p;
	if(f<g)
	printf("%d\n",g);
	else
	printf("%d\n",f);
	}
	else{
	g=x*b+y*p;
	printf("%d\n",g);}
	return 0;
}

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

#include<stdio.h>
int main(){
int i,j,N,x,y,b,p,an,ano,ans[365];


scanf("%d",&N);
for(i=0;i<N;i++){
	scanf("%d %d %d %d",&x,&y,&b,&p);
	
	b = x*b ;
	p  = y*p;
	an = p+b;
	if(x>=5 && y>= 2){
		an = an * 0.8;
	}
	else if(x>=5){
		ano = (x*b + y*2) * 0.8;
		if(ano < an)
			an = ano;
	}
	else if(y>=2){
		ano = (x*5 + y*p) * 0.8;
		if(ano < an)
			an = ano;
	}
	else{
		ano = (x*5 + y*2) * 0.8;
		if(ano < an)
			an = ano;
	
	ans[i] = an;
	}

	for(i=0;i<N;i++){
		printf("%d\n",ans[i]);
	}

return 0;
}

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

#include<stdio.h>
int main(void){
     int n,x,y,b,p,i;
     scanf("%d",&n);
     for(i=0:i<n;i++){
          scanf("%d %d %d %d",x,y,b,p);
          if(x>=5 && y>=2)printf("%d\n",0.8*b*x+0.8*p*y);
          else printf("%d\n",x*b+y*p);
     }
     return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:13: error: expected ';' before ':' token
    5 |      for(i=0:i<n;i++){
      |             ^
      |             ;
main.c:5:21: error: expected ';' before ')' token
    5 |      for(i=0:i<n;i++){
      |                     ^
      |                     ;
Language: C

#include<stdio.h>
int main(void){
     int n,x,y,b,p,i;
     scanf("%d",&n);
     for(i=0:i<n;i++){
          scanf("%d %d %d %d",&x,&y,&b,&p);
          if(x>=5 && y>=2)printf("%d\n",0.8*b*x+0.8*p*y);
          else printf("%d\n",x*b+y*p);
     }
     return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:13: error: expected ';' before ':' token
    5 |      for(i=0:i<n;i++){
      |             ^
      |             ;
main.c:5:21: error: expected ';' before ')' token
    5 |      for(i=0:i<n;i++){
      |                     ^
      |                     ;
Language: C

#include<stdio.h>
int main(void){
     int n,x,y,b,p,i,q,w,e,r;
     scanf("%d",&n);
     for(i=0;i<n;i++){
          scanf("%d %d %d %d",&x,&y,&b,&p);
          q=x*b;
          w=y*p;
          e=q+w;
          r=e*8/10
          if(x>=5 && y>=2)printf("%d\n",r);
          else printf("%d\n",e);
     }
     return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:19: error: expected ';' before 'if'
   10 |           r=e*8/10
      |                   ^
      |                   ;
   11 |           if(x>=5 && y>=2)printf("%d\n",r);
      |           ~~       
main.c:12:11: error: 'else' without a previous 'if'
   12 |           else printf("%d\n",e);
      |           ^~~~
Language: C

include<stdio.h>
int main(void){
     int n,x,y,b,p,i,b1=999999,p1=999999;
     scanf("%d",&n);
     for(i=0;i<n;i++){
          scanf("%d %d %d %d",&x,&y,&b,&p);
          if(x==0){
               b1=5*b+y*p;
               if(x*b+y*p>b1)printf("%d\n",b1);
          }
          if(y==0)p1=x*b+2*p;
               if(x*b+y*p>p1)printf("%d\n",p1);
          if(x>=5 && y>=2)printf("%d\n",0.8*(b*x+p*y));
          else printf("%d\n",x*b+y*p);
     }
     return 0;
}

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

#include<stdio.h>
int main(void)
{
	float f[366],g,n,x,y,b,p,i;
	scanf("%f",&n);
	for(i=0;i<n;i++){
	scanf("%f %f %f %f",&x,&y,&b,&p);
	if(x>=5&&y>=2){
	f[i]=(x*b+y*p)*0.8;
	g=x*b+y*p;
	if(f[i]>g)
	f[i]=g;
	else
	printf("%f\n",f);
	}
	else{
	f[i]=x*b+y*p;
	}
	}
	for(i=0;i!=n;i++)
	printf("%d\n",f[i]);
	return 0;
}

//memo:aa

Compiler output:
main.c: In function 'main':
main.c:9:10: error: array subscript is not an integer
    9 |         f[i]=(x*b+y*p)*0.8;
      |          ^
main.c:11:13: error: array subscript is not an integer
   11 |         if(f[i]>g)
      |             ^
main.c:12:10: error: array subscript is not an integer
   12 |         f[i]=g;
      |          ^
main.c:17:10: error: array subscript is not an integer
   17 |         f[i]=x*b+y*p;
      |          ^
main.c:21:24: error: array subscript is not an integer
   21 |         printf("%d\n",f[i]);
      |                        ^
Language: C

#include<stdio.h>
int main(void)
{
	float f[366],g,n,x,y,b,p,i;
	scanf("%f",&n);
	for(i=0;i<n;i++){
	scanf("%f %f %f %f",&x,&y,&b,&p);
	if(x>=5&&y>=2){
	f[i]=(x*b+y*p)*0.8;
	g=x*b+y*p;
	if(f[i]>g)
	f[i]=g;
	else
	printf("%f\n",f);
	}
	else{
	f[i]=x*b+y*p;
	}
	}
	for(i=0;i!=n;i++)
	printf("%f\n",f[i]);
	return 0;
}

//memo:aa

Compiler output:
main.c: In function 'main':
main.c:9:10: error: array subscript is not an integer
    9 |         f[i]=(x*b+y*p)*0.8;
      |          ^
main.c:11:13: error: array subscript is not an integer
   11 |         if(f[i]>g)
      |             ^
main.c:12:10: error: array subscript is not an integer
   12 |         f[i]=g;
      |          ^
main.c:17:10: error: array subscript is not an integer
   17 |         f[i]=x*b+y*p;
      |          ^
main.c:21:24: error: array subscript is not an integer
   21 |         printf("%f\n",f[i]);
      |                        ^
Language: C

		}
		if(b>=5&&sw==0){
			m=x*b+y*2;
			printf("%d ",m);
			m=m*0.8;
			sw=1;
			printf("%d ",m);
			if(m<d)
				d=m;
		}
		if(p>=2&&sw==0){
			m=x*5+y*p;
			m=m*0.8;
			sw=1;
			if(m<d)
				d=m;		
		}
		if(sw==0){
			m=x*5+y*2;
			m=m*0.8;
			if(m<d)
				d=m;
		}
		printf("%d\n",d);	
	}
	return 0;
}

Compiler output:
main.c:1:17: error: expected identifier or '(' before '}' token
    1 |                 }
      |                 ^
main.c:2:17: error: expected identifier or '(' before 'if'
    2 |                 if(b>=5&&sw==0){
      |                 ^~
main.c:11:17: error: expected identifier or '(' before 'if'
   11 |                 if(p>=2&&sw==0){
      |                 ^~
main.c:18:17: error: expected identifier or '(' before 'if'
   18 |                 if(sw==0){
      |                 ^~
main.c:24:24: error: expected declaration specifiers or '...' before string constant
   24 |                 printf("%d\n",d);
      |                        ^~~~~~
main.c:24:31: error: unknown type name 'd'
   24 |                 printf("%d\n",d);
      |                               ^
main.c:25:9: error: expected identifier or '(' before '}' token
   25 |         }
      |         ^
main.c:26:9: error: expected identifier or '(' before 'return'
   26 |         return 0;
      |         ^~~~~~
main.c:27:1: error: expected identifier or '(' before '}' token
   27 | }
      | ^
Language: C

#include<stdio.h>
int main(void)
{
	float f[366],g,n,x,y,b,p,i;
	scanf("%f",&n);
	for(i=0;i<n;i++){
	scanf("%f %f %f %f",&x,&y,&b,&p);
	if(x>=5&&y>=2){
	f[i]=(x*b+y*p)*0.8;
	g=x*b+y*p;
	if(f[i]>g)
	f[i]=g;
	}
	else{
	f[i]=x*b+y*p;
	}
	}
	for(i=0;i!=n;i++)
	printf("%f\n",f[i]);
	return 0;
}

//memo:aa

Compiler output:
main.c: In function 'main':
main.c:9:10: error: array subscript is not an integer
    9 |         f[i]=(x*b+y*p)*0.8;
      |          ^
main.c:11:13: error: array subscript is not an integer
   11 |         if(f[i]>g)
      |             ^
main.c:12:10: error: array subscript is not an integer
   12 |         f[i]=g;
      |          ^
main.c:15:10: error: array subscript is not an integer
   15 |         f[i]=x*b+y*p;
      |          ^
main.c:19:24: error: array subscript is not an integer
   19 |         printf("%f\n",f[i]);
      |                        ^
Language: C

#include<stdio.h>
int main()
{
	int n,x,y,b,p,m,d[365],sw,i;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d %d %d %d",&x,&y,&b,&p);
		sw=0;
		d[i]=x*b+y*p;
		if(b>=5&&p>=2){
			d[i]*=0.8;
			sw=1;
		}
		if(b>=5&&sw==0){
			m=x*b+y*2;
			m=m*0.8;
			sw=1;		
			if(m<d[i])
				d[i]=m;
		}
		if(p>=2&&sw==0){
			m=x*5+y*p;
			m=m*0.8;
			sw=1;
			if(m<d[i])
				d[i]=m;		
		}
		if(sw==0){
			m=x*5+y*2;
			m=m*0.8;
			if(m<d[i])
				d[i]=m;
		}	
	}
	for(i=0;i<n;i++){
	printf("%d\n",d[i]);
	return 0;
}

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

#include<stdio.h>
int main()
{
	int n,x,y,b,p,m,d[365],sw,i;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d %d %d %d",&x,&y,&b,&p);
		sw=0;
		d[i]=x*b+y*p;
		if(b>=5&&p>=2){
			d[i]=d[i]*0.8;
			sw=1;
		}
		if(b>=5&&sw==0){
			m=x*b+y*2;
			m=m*0.8;
			sw=1;		
			if(m<d[i])
				d[i]=m;
		}
		if(p>=2&&sw==0){
			m=x*5+y*p;
			m=m*0.8;
			sw=1;
			if(m<d[i])
				d[i]=m;		
		}
		if(sw==0){
			m=x*5+y*2;
			m=m*0.8;
			if(m<d[i])
				d[i]=m;
		}	
	}
	for(i=0;i<n;i++){
		printf("%d\n",d[i]);
	return 0;
}

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

#include <stdio.h>

int main(void)
{
	int i,n,x,y,b,p;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d%d%d%d",&x,&y,&b,&p);
		if(b>=5&&p>=2){
			printf("%d\n",(x*b)*0.8+(y*p)*0.8);
		}else{
			prijntf("%d\n",(x*b)+(y*p));
		}
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:25: error: implicit declaration of function 'prijntf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   12 |                         prijntf("%d\n",(x*b)+(y*p));
      |                         ^~~~~~~
      |                         printf
Language: C

#include<stdio.h>
int main (void){
double n,y,x,b,p,i=0,a[n],c= 0,d= 0;
scanf("%d",&n);
for(i = 0;i <= n-1;i++) {
scanf("%d",&x);
scanf("%d",&y);
scanf("%d",&b);
scanf("%d",&p);
c = x * b;
d = y * p;
if(b == 0) {
	b = 5;}
if(p == 0){
	p = 2;}
if (c + d>=(x*b+y*2)*0.8){
	if (c + d>=(x*b+y*2)*0.8){
		a[i]=(x*b+y*2)*0.8;}}
else if (c + d>=(x*5+y*p)*0.8){
	if(c + d>=(x*5+y*p)*0.8){
		a[i]=(x*5+y*p)*0.8;}
	}
else {
a[i] = c + d;}
}

for(i=0;i<=n-1;i++){
printf("%d\n",a[i#include<stdio.h>
int main (void){
int n,y,x,b,p,i,j,a[n],c,d,e,m;
scanf("%d",&n);
for(i = 0;i <= n-1;i++) {
scanf("%d",&x);
scanf("%d",&y);
scanf("%d",&b);
scanf("%d",&p);
c = x * b;
d = y * p;
if(b == 0) {
	b = 5;}
if(p == 0){
	p = 2;}
if (c + d>=(x*b+y*2)*0.8){
	if (c + d>=(x*b+y*2)*0.8){
		a[i]=(x*b+y*2)*0.8;}}
else if (c + d>=(x*5+y*p)*0.8){
	if(c + d>=(x*5+y*p)*0.8){
		a[i]=(x*5+y*p)*0.8;}
	}
else {
a[i] = c + d;}
}

for(i=1;i<=n;i++){
printf("%d\n",a[i]);}
return 0;
}]);}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:3:22: error: size of array 'a' has non-integer type
    3 | double n,y,x,b,p,i=0,a[n],c= 0,d= 0;
      |                      ^
main.c:18:18: error: array subscript is not an integer
   18 |                 a[i]=(x*b+y*2)*0.8;}}
      |                  ^
main.c:21:18: error: array subscript is not an integer
   21 |                 a[i]=(x*5+y*p)*0.8;}
      |                  ^
main.c:24:2: error: array subscript is not an integer
   24 | a[i] = c + d;}
      |  ^
main.c:28:18: error: stray '#' in program
   28 | printf("%d\n",a[i#include<stdio.h>
      |                  ^
main.c:28:16: error: array subscript is not an integer
   28 | printf("%d\n",a[i#include<stdio.h>
      |                ^
main.c:28:18: error: expected ']' before 'include'
   28 | printf("%d\n",a[i#include<stdio.h>
      |                  ^~~~~~~~
      |                  ]
Language: C++

#include <cstdio>
#include <algorithm>

using namespace std;

int main()
{
    int n;
    scanf( "%d\n", &n );
    while( n > 0 )
    {
        double x, y, b, p, ret;
        scanf( "%lf %lf %lf %lf\n", &x, &y, &b, &p );
        ret = x * b + y * p;
        if( 5 <= b && 2 <= p )
        {
            printf( "%.0lf\n", 80 * ret / 100 );
        } 
        else if( 5 <= b && p < 2)
        {
            double comp1 = (b * x + 2.0 * y) * 80 / 100; 
            printf( "%.0lf\n", min( comp1, ret ) );
        }
        else if( 2 <= p && b < 5)
        {
            double comp2 = (5.0 * x + p * y) * 80 / 100; 
            printf( "%.0lf\n", min( comp2, ret ) );
        }
        else
        {
            double comp3 = (5.0 * x + 2.0 * y) * 80 / 100; 
            printf( "%.0lf\n", min( comp3, ret ) );
        }
        n--;
    }
    return 0;
}
            printf( "%.0lf\n", ret );
        }
        n--;
    }
    return 0;
}


Compiler output:
a.cc:38:19: error: expected constructor, destructor, or type conversion before '(' token
   38 |             printf( "%.0lf\n", ret );
      |                   ^
a.cc:39:9: error: expected declaration before '}' token
   39 |         }
      |         ^
a.cc:40:9: error: 'n' does not name a type
   40 |         n--;
      |         ^
a.cc:41:5: error: expected declaration before '}' token
   41 |     }
      |     ^
a.cc:42:5: error: expected unqualified-id before 'return'
   42 |     return 0;
      |     ^~~~~~
a.cc:43:1: error: expected declaration before '}' token
   43 | }
      | ^
Language: C++

import java.util.Scanner;
 
public class Main{
    public void solve(){
        Scanner sc = new Scanner(System.in);
         
        int n = sc.nextInt();
         
        for(int i=0;i<n;i++){
            int x = sc.nextInt();
            int y = sc.nextInt();
            int b = sc.nextInt();
            int p = sc.nextInt();
             
            int kin = x*b + y*p;
             
            if(b>=5 && p>=2){
                kin = (x*b + y*p)*4/5;
            }else{
                if(b<5){
                b=5;
                }
                if(p<2){
                p=2;
                }
                int wari = (x*b + y*p)*4/5;
                 
                if(kin>wari){
                    kin = wari;
                }
            }
            System.out.println(kin);
        }
    }
     
    public static void main(String[]args){
        Main obj = new Main();
        obj.solve();
    }
}

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

#include<stdio.h>
int main(void)
{
	int i,n;
	int x,y,b,p;
	int xb,yp,xbyp,xbyp2,xbyp3,xbyp4;
	int b2,p2,xb2,yp2;
	scanf("%d",&n);
	
		
		
	for(i=1;i<=n;i++){
		scanf("%d %d %d %d",&x,&y,&b,&p);
			
		if(b>=5 && p>=2){
			xbyp2=(xb+yp)*8/10;
		}
		
			xb=x*b;
			yp=y*p;
			xbyp=xb+yp;
		}
		if(b<5){
			b=5;
		}
		if(p<2){
			p=2;
		}
		
		xb2=x*b;
		yp2=y*p;
		xbyp3=(xb2+yp2)*8/10;
		
		
		
		
		if(xbyp3<xbyp){
			printf("%d\n",xbyp3);
		}
		else if(xbyp<xbyp3){
			printf("%d\n",xbyp);
		}
		else if(xbyp2<xbyp){
			printf("%d\n",xbyp2);
		}
		
	}
		return 0;
}
	

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

#include<stdio.h>
int main(){
int i,a,b,c,d,n,e;
	scanf("%d",&n);
	for(i=0;i<n;i++){
	scanf("%d %d %d %d",&a,&b,&c,&d);
	e=a*c+b*d;
	if(d<2&&c<5){
		if((a*5+b*2)*0.8<e) e=(a*5+b*2)*0.8; 
	}
	else if(c<5){
		if((a*5+b*d)*0.8<e) e=(a*5+b*d)*0.8; 
	}
	else if(d<2){
		if((a*c+b*2)*0.8<e) e=(a*c+b*2)*0.8; 
	}
	else
		e=(a*c+b*d)*0.8; 
	}
	printf("%d\n",e);
	}
	return 0;
}

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

#include<stdio.h>
int main(void){
     int n,x,y,b,p,i;
     scanf("%d",&n);
     for(i=0;i<n;i++){
          scanf("%d %d %d %d",&x,&y,&b,&p);
          if(b>=5 && p>=2)printf("%d\n",x*0.8+y*0.8)
          else printf("%d\n",x+y);
     }
     return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:53: error: expected ';' before 'else'
    7 |           if(b>=5 && p>=2)printf("%d\n",x*0.8+y*0.8)
      |                                                     ^
      |                                                     ;
    8 |           else printf("%d\n",x+y);
      |           ~~~~
Language: C++

#include<stdio.h>
int main(void)
{
	int f,N,i,x[365],y[365],b[365],p[365];
	scanf("%d",&N);
	for(i=0;i<=N;i++){
	scanf("%d %d %d %d",&x[i],&y[i],&b[i],&p[i]);
	if((x>=5)&&(y>=2))
	f=(x*b+y*p)*0.8;
	else
	f=x*b+y*p;
	}
	printf("%d\n",f);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |         if((x>=5)&&(y>=2))
      |             ~^~~
a.cc:8:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |         if((x>=5)&&(y>=2))
      |                     ~^~~
a.cc:9:13: error: invalid operands of types 'int [365]' and 'int [365]' to binary 'operator*'
    9 |         f=(x*b+y*p)*0.8;
      |            ~^~
      |            | |
      |            | int [365]
      |            int [365]
a.cc:9:17: error: invalid operands of types 'int [365]' and 'int [365]' to binary 'operator*'
    9 |         f=(x*b+y*p)*0.8;
      |                ~^~
      |                | |
      |                | int [365]
      |                int [365]
a.cc:11:12: error: invalid operands of types 'int [365]' and 'int [365]' to binary 'operator*'
   11 |         f=x*b+y*p;
      |           ~^~
      |           | |
      |           | int [365]
      |           int [365]
a.cc:11:16: error: invalid operands of types 'int [365]' and 'int [365]' to binary 'operator*'
   11 |         f=x*b+y*p;
      |               ~^~
      |               | |
      |               | int [365]
      |               int [365]
Language: C++

#include<stdio.h>
int main(void)
{
	int f,N,i,x[365],y[365],b[365],p[365];
	scanf("%d",&N);
	for(i=0;i<=N;i++){
	scanf("%d %d %d %d",&x[i],&y[i],&b[i],&p[i]);
	if((x>=5)&&(y>=2)){
	f=(x*b+y*p)*0.8;}
	else{
	f=x*b+y*p;}
	printf("%d\n",f);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |         if((x>=5)&&(y>=2)){
      |             ~^~~
a.cc:8:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |         if((x>=5)&&(y>=2)){
      |                     ~^~~
a.cc:9:13: error: invalid operands of types 'int [365]' and 'int [365]' to binary 'operator*'
    9 |         f=(x*b+y*p)*0.8;}
      |            ~^~
      |            | |
      |            | int [365]
      |            int [365]
a.cc:9:17: error: invalid operands of types 'int [365]' and 'int [365]' to binary 'operator*'
    9 |         f=(x*b+y*p)*0.8;}
      |                ~^~
      |                | |
      |                | int [365]
      |                int [365]
a.cc:11:12: error: invalid operands of types 'int [365]' and 'int [365]' to binary 'operator*'
   11 |         f=x*b+y*p;}
      |           ~^~
      |           | |
      |           | int [365]
      |           int [365]
a.cc:11:16: error: invalid operands of types 'int [365]' and 'int [365]' to binary 'operator*'
   11 |         f=x*b+y*p;}
      |               ~^~
      |               | |
      |               | int [365]
      |               int [365]
Language: C++

#include<iostream>
using namespace std;
int main(){
int i,j,N,x,y,b,p,an,ano,ans[365];
cin >> N;
for(i=0;i<N;i++){
	cin >> x >> y >> b >> p;
	an = x*b + y*p;
	if(x>=5 && y>= 2){
		an = an * 0.8;
	}
	else if(x>=5){
		ano = (x*b + y*2) * 0.8;
		if(ano < an)
			an = ano;
	}
	else if(y>=2){
		ano = (x*5 + y*p) * 0.8;
		if(ano < an)
			an = ano;
	}
	for(i=0;i<N;i++){
		cout << ans[i] << endl;
	}
return 0;
}

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

#include<stdio.h>
int main(void)
{
	float f[366],g,n,x,y,b,p,i;
	scanf("%f",&n);
	for(i=0;i<n;i++){
	scanf("%f %f %f %f",&x,&y,&b,&p);
	if(x>=5&&y>=2){
	f[i]=(x*b+y*p)*0.8;
	g=x*b+y*p;
	if(f[i]>g)
	f[i]=g;
	else
	printf("%f\n",f);
	}
	else{
	f[i]=x*b+y*p;
	}
	}
	for(i=0;i!=n;i++)
	printf("%d\n",f[i]);
	return 0;
}

//memo:aa

Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: invalid types 'float [366][float]' for array subscript
    9 |         f[i]=(x*b+y*p)*0.8;
      |          ^
a.cc:11:13: error: invalid types 'float [366][float]' for array subscript
   11 |         if(f[i]>g)
      |             ^
a.cc:12:10: error: invalid types 'float [366][float]' for array subscript
   12 |         f[i]=g;
      |          ^
a.cc:17:10: error: invalid types 'float [366][float]' for array subscript
   17 |         f[i]=x*b+y*p;
      |          ^
a.cc:21:24: error: invalid types 'float [366][float]' for array subscript
   21 |         printf("%d\n",f[i]);
      |                        ^
Language: C++

#include<iostream>
using namespace std;
int main(){
//	int UBW;
	int N,pro, ans[365],x[365], y[365], b[365], p[365];
	cin >> N;
	for (int i = 0; i < N; i++){
		cin >> x[i] >> y[i] >> b[i] >> p[i];
		ans[i] = (x[i] * b[i] + y[i] * p[i]);
	}
	for (int i = 0; i < N; i++){
		if (b[i] > 4 && p[i] > 1){
			pro = (x[i] * b[i] + y[i] * p[i]) *  0.8;
			if (ans[i] > pro)	ans[i] = pro;
		}
		else if (b[i] > 4){
			pro = (x[i] * b[i] + y[i] * 2) * 0.8;
			if (ans[i] > pro)	ans[i] = pro;
		}
		else if (p[i] > 1){
			pro = (x[i] * 5 + y[i] * p[i]) * 0.8;
			if (ans[i] > pro)	ans[i] = pro;
		}
		else{
			pro = (x[i] * 5 + y[i] * 2) *  0.8;
			if (ans[i] > pro)	ans[i] = pro;
		}
	}
	for (int i = 0; i < N; i++)	cout << ans[i] << endl;
	
	cin >> UBW;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:16: error: 'UBW' was not declared in this scope
   31 |         cin >> UBW;
      |                ^~~