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

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

int main(){
  int n;
  cin >> n;
  vector<int> a(n),b(n);
  cnt=0;
  for(int i=0;i<n;i++){
    cin >> a[i];
    if(a[i]%2==0){
      b[cnt]=a[i];
      cnt++;
    }
  }
  bool can=true;
  for(int i=0;i<cnt;i++){
    if(b[i]%3 > 0 || b[i]%5 > 0){
      can=false;
      break;
    }
  }
  if(!can) cout << "DENIED" << endl;
  else cout << "APPROVED" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'cnt' was not declared in this scope; did you mean 'int'?
    9 |   cnt=0;
      |   ^~~
      |   int
Language: C++

#include<iostream>
using namespace std;
int main(){
  int n;
  cin >> n;
  int a[i];
  for(int i=0;i<n;++i){
    cin >> a[i];
    if(a[i]%2==0){
		if(a[i]%3!=0||a[i]%5!=0){
          cout << "DENIED";
      	  return 0;
        }
    }
  }
  cout << "APPROVED";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'i' was not declared in this scope
    6 |   int a[i];
      |         ^
a.cc:8:12: error: 'a' was not declared in this scope
    8 |     cin >> a[i];
      |            ^
Language: C++

#include<string>
#include<iostream>
#include <algorithm>
#include<vector>
#include<functional>
#include <cstdlib>
#define ll long long
using namespace std;



int main(){
  ll N;
  bool ans=true;
  cin>>N;
  vector<ll> A(N);
  for(int i=0;i<N;i++) cin>>A[i];

  for(int j=0;j<N;j++){
    if(A[j]%2==0){
      if(A[j]%3==0||A[j]%5==0) ans=true;
      else ans=false;
    }
    eles ans=false;
  }

  cout<<(ans ? "APPROVED":"DENIED")<<endl;


 
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:5: error: 'eles' was not declared in this scope
   24 |     eles ans=false;
      |     ^~~~
Language: C++

using System;

namespace ConsoleApp11
{
    class ABC155
    {
        static void Main()
        {
            int N = int.Parse(Console.ReadLine());
            string[] Ai = Console.ReadLine().Trim().Split(' ');
            int c = 0;
            for(int i = 0; i < Ai.Length; i++)
            {
                if (int.Parse(Ai[i]) % 2 == 0)
                {
                    c++;
                    if (int.Parse(Ai[i]) % 3 != 0 && int.Parse(Ai[i]) % 5 != 0)
                    {
                        Console.WriteLine("DENIED");
                        return;
                    }
                }
            }
            if(c > 0)
            {
                Console.WriteLine("APPROVED");
            }
            
        }
    }
}


Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:30:6: error: expected ';' after class definition
   30 |     }
      |      ^
      |      ;
a.cc: In static member function 'static void ConsoleApp11::ABC155::Main()':
a.cc:9:21: error: expected primary-expression before 'int'
    9 |             int N = int.Parse(Console.ReadLine());
      |                     ^~~
a.cc:10:13: error: 'string' was not declared in this scope
   10 |             string[] Ai = Console.ReadLine().Trim().Split(' ');
      |             ^~~~~~
a.cc:10:20: error: expected primary-expression before ']' token
   10 |             string[] Ai = Console.ReadLine().Trim().Split(' ');
      |                    ^
a.cc:12:32: error: 'Ai' was not declared in this scope; did you mean 'i'?
   12 |             for(int i = 0; i < Ai.Length; i++)
      |                                ^~
      |                                i
a.cc:14:24: error: expected unqualified-id before '.' token
   14 |                 if (int.Parse(Ai[i]) % 2 == 0)
      |                        ^
a.cc:17:28: error: expected unqualified-id before '.' token
   17 |                     if (int.Parse(Ai[i]) % 3 != 0 && int.Parse(Ai[i]) % 5 != 0)
      |                            ^
a.cc:19:25: error: 'Console' was not declared in this scope
   19 |                         Console.WriteLine("DENIED");
      |                         ^~~~~~~
a.cc:26:17: error: 'Console' was not declared in this scope
   26 |                 Console.WriteLine("APPROVED");
      |                 ^~~~~~~
Language: C++

#include <bits/stdc++.h>
 using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
 int main(){
   int n,a;
   a=0;
   cin >>n;
   vector<int> d(n);
   rep(i,n){
   cin>>d.at(i);
     if(d.at(i)%2==0){
      if((d.at(i)%3!=0)&&(d.at(i)%5!=0)){
        b++;
      }
     }
   }
   if(b==0)
   cout<<"APPROVED"<<endl;
   else
   cout<<"DENIED"<<endl;
   
}

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

#include<bits/stdc++.h>
using namespace std;
int main(){
    int n;
    cin >> n;
    int a[n];
    for(int i=0;i<n;i++)cin >> a[n];
    bool hu =true;
    for(int i=0;i<n;i++){
        if(a[i]%2==0){
            if(a[i]%3!=0&&a[i]%5=0)hu=false;
        }
    }
    if(hu)cout << "APPROVED" << endl;
    else cout << "DENIED" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:25: error: lvalue required as left operand of assignment
   11 |             if(a[i]%3!=0&&a[i]%5=0)hu=false;
      |                ~~~~~~~~~^~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++) 
typedef vector<int> vi;

int main() {

	int n;
	cin >> n;
	vi a(n);
	rep(i, n) cin >> a[i];

	string s="APPROVED";

	rep(i, n)if(a[i] % 2 == 0 && a[i] % 3 != 0 && a[i] % 5 != 0) s = "DENIED";

	cout << s << endl;


Compiler output:
a.cc: In function 'int main()':
a.cc:17:27: error: expected '}' at end of input
   17 |         cout << s << endl;
      |                           ^
a.cc:6:12: note: to match this '{'
    6 | int main() {
      |            ^
Language: C++

#include<iostream>


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

int A[N];
for(int i=0; i<N; i++){
  std::cin >> A[N];
}

bool bl=false;

for (int i=0; i<N; i++){
  if((A[i]%2)!=0 || ((A[i]%3 != 0)&&(A[i]%5 != 0)){
    if(bl==false){
    std::cout << "DENIED" << "\n";
    bl=true;
    }
  }  
}

if(bl==false){
std::cout << "APPROVED" << "\n";
}

return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:51: error: expected ')' before '{' token
   16 |   if((A[i]%2)!=0 || ((A[i]%3 != 0)&&(A[i]%5 != 0)){
      |     ~                                             ^
      |                                                   )
a.cc:22:1: error: expected primary-expression before '}' token
   22 | }
      | ^
Language: C++

#include<iostream>


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

int A[N];
for(int i=0; i<N; i++){
  std::cin >> A[N];
}

bool bl=false;

for (int i=0; i<N; i++){
  if((A[i]%2)!=0 || ((A[i]%3 != 0)&&(A[i]%5 != 0))){
    if(bl==false){
    std::cout << "DENIED" << "\n";
    bl=true;
    }
  }  
}

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

#incldue <iostream>
#include <vector>
using namespece std;
int main()
{
  int N;
  cin >> N;
  vector<int> A(N);
  for(int i = 0; i < N; i++)
  {
    if(A[i] % 3 != 0 || A[i] % 5 != 0)
    {
      cout << "DENIED";
      return 0;
    }
  }
  cout << "APPROVED";
  return 0;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incldue; did you mean #include?
    1 | #incldue <iostream>
      |  ^~~~~~~
      |  include
a.cc:3:7: error: expected nested-name-specifier before 'namespece'
    3 | using namespece std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin >> N;
      |   ^~~
a.cc:8:3: error: 'vector' was not declared in this scope
    8 |   vector<int> A(N);
      |   ^~~~~~
a.cc:8:3: note: suggested alternatives:
In file included from /usr/include/c++/14/vector:66,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_vector.h:428:11: note:   'std::vector'
  428 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
/usr/include/c++/14/vector:93:13: note:   'std::pmr::vector'
   93 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
a.cc:8:10: error: expected primary-expression before 'int'
    8 |   vector<int> A(N);
      |          ^~~
a.cc:11:8: error: 'A' was not declared in this scope
   11 |     if(A[i] % 3 != 0 || A[i] % 5 != 0)
      |        ^
a.cc:13:7: error: 'cout' was not declared in this scope
   13 |       cout << "DENIED";
      |       ^~~~
a.cc:17:3: error: 'cout' was not declared in this scope
   17 |   cout << "APPROVED";
      |   ^~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<N;i++)
using namespace std;
int main(){
  int N;
  cin >> N;
  int num[N];
  bool ans = true;
  
  rep(i,N){
    cin >> num[i];
  }
  
  rep(i,N){
    if(num[i]%2==0){
      if((num[i]%3!=0)=&&(num[i]%5!=0)){
        ans = false;
      }
    }
  }
  if(ans){
    cout << "APPROVED" << endl;
  }
  else{
    cout << "DENIED" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:26: error: expected identifier before '(' token
   16 |       if((num[i]%3!=0)=&&(num[i]%5!=0)){
      |                          ^
a.cc:16:26: error: expected ')' before '(' token
   16 |       if((num[i]%3!=0)=&&(num[i]%5!=0)){
      |         ~                ^
      |                          )
Language: Java


import java.util.*;



public class Main1 {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int n, i, j;
        n = s.nextInt();
        int[] a = new int[n];
        for (j = 0; j < n; j++) {
            a[j] = s.nextInt();
        }

        int flag = 1;
        for (j = 0; j < n; j++){
            if ((a[j] % 2 == 0)) {
                if (a[j] % 3 == 0 || a[j] % 5 == 0) {
                    flag = 0;
                    break;
                }

            }}
    
        if (flag == 0) {
            System.out.println("DENIED");

        }
        else{
            System.out.println("APPROVED");}
    }
}


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

 #include <stdio.h>
int main (void) { 
  int i;
 int a[100]; 
  for (i = 0; i < n; i++) { 
    scanf("%d", &a[i]); 
  }
 for (i = 0; i < n; i++) { 
   if (a[i] % 2 == 0 && a[i] % 3 != 0 && a[i] % 5 != 0) { 
     puts("DENIED"); 
     return 0; 
   } 
 } 
  puts("APPROVED");
 return 0; 
}


Compiler output:
main.c: In function 'main':
main.c:5:19: error: 'n' undeclared (first use in this function)
    5 |   for (i = 0; i < n; i++) {
      |                   ^
main.c:5:19: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

 #include <stdio.h>
int main (void) { 
  int i;
 int a[100]; 
  for (i = 0; i < n; i++) { 
    scanf("%d", &a[i]); 
  }
 for (i = 0; i < n; i++) { 
   if (a[i] % 2 == 0 && a[i] % 3 != 0 && a[i] % 5 != 0) { 
     puts("DENIED"); 
     return 0; 
   } 
 } 
  puts("APPROVED");
 return 0; 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:19: error: 'n' was not declared in this scope
    5 |   for (i = 0; i < n; i++) {
      |                   ^
a.cc:8:18: error: 'n' was not declared in this scope
    8 |  for (i = 0; i < n; i++) {
      |                  ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main() {
    int N;
    cin>>N;
    for(int i=0; i<N; i++){
        int A;
        cin>>A;
        int count=0;
        if(A%2==0){
            if(A%3==0||A%5==0){
                count+=1;
            }
            count=0;
            cout<<"DENIED"<<endl;
           break;
           }
           count+=1; 
    }
    else if(count==N)
        cout<<"APPROVED"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:5: error: 'else' without a previous 'if'
   22 |     else if(count==N)
      |     ^~~~
a.cc:22:18: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator=='
   22 |     else if(count==N)
      |             ~~~~~^~~
Language: C++

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

int main() {
    int N;
    cin>>N;
    for(int i=0; i<N; i++){
        int A;
        cin>>A;
        int count=0;
        if(A%2==0){
            if(A%3==0||A%5==0){
                count+=1
            }
            count=0;
            cout<<"DENIED"<<endl;
           break;
           }
           count+=1; 
    }
    if(count==N)
        cout<<"APPROVED"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:25: error: expected ';' before '}' token
   13 |                 count+=1
      |                         ^
      |                         ;
   14 |             }
      |             ~            
a.cc:21:13: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator=='
   21 |     if(count==N)
      |        ~~~~~^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  cin >> N;
   vector<int> A(N); 
 
  for (int i = 0; i < N; i++) {
    cin >> A.at(i);
  }
 
  for (int i = 0; i < N; i++) {
    if(A[i]%2==0 && A[i]%3 != 0 && A[i]%5 !=0){
      cout << "DENIED" << endl;
      return 0;
  }
    cout << "APPROVED" <<endl;
 
}

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

#include<iostream>

using namespace std;

int main(){
int n;
  cin>>n;
  const int m=n;
  int a[m];
  for(int i=0;i<m;i++){
  cin>>a[i];
    if((a[i]/2)*2==a[i]){

    if((a[i]/3)*3!=a[i]&&(a[i]/5)*5!=a[i]){
    cout<<"DENIED";
      return 0;
    }

    }

  }3

     cout<<"APPROVED";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:5: error: expected ';' before 'cout'
   21 |   }3
      |     ^
      |     ;
   22 | 
   23 |      cout<<"APPROVED";
      |      ~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
int N;
  cin >> N;
  int num[110];
  for(int i = 0; i < N; i++){
   cin >> num[i]; 
  }
  bool ans = 1;
  for(int i = 0; i < N; i++){
   if(nu[i]m % 2 == 0){
     if(num[i] % 3 != 0 && num[i] % 5 != 0){
       ans = 0;
     }
   }
  }
  if(ans == 0) cout << "No" << endl;
  else cout << "Yes" << endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:7: error: 'nu' was not declared in this scope; did you mean 'num'?
   13 |    if(nu[i]m % 2 == 0){
      |       ^~
      |       num
a.cc:13:12: error: expected ')' before 'm'
   13 |    if(nu[i]m % 2 == 0){
      |      ~     ^
      |            )
Language: Java

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        boolean isOK = true;
        ArrayList<int> list = new ArrayList<int>();
        for(i = 0; i <= n; i++) {
            int checking = sc.nextInt();
            if (!((checking % 3 == 0) || (checking % 5 == 0))) {
                isOK = false;
            }
        }
        if (isOK) {
            System.out.println("APPROVED");
        } else {
            System.out.println("DENIED");
        }
    }
}

Compiler output:
Main.java:8: error: cannot find symbol
        ArrayList<int> list = new ArrayList<int>();
        ^
  symbol:   class ArrayList
  location: class Main
Main.java:8: error: unexpected type
        ArrayList<int> list = new ArrayList<int>();
                  ^
  required: reference
  found:    int
Main.java:8: error: cannot find symbol
        ArrayList<int> list = new ArrayList<int>();
                                  ^
  symbol:   class ArrayList
  location: class Main
Main.java:8: error: unexpected type
        ArrayList<int> list = new ArrayList<int>();
                                            ^
  required: reference
  found:    int
Main.java:9: error: cannot find symbol
        for(i = 0; i <= n; i++) {
            ^
  symbol:   variable i
  location: class Main
Main.java:9: error: cannot find symbol
        for(i = 0; i <= n; i++) {
                   ^
  symbol:   variable i
  location: class Main
Main.java:9: error: cannot find symbol
        for(i = 0; i <= n; i++) {
                           ^
  symbol:   variable i
  location: class Main
7 errors
Language: C

#include<stdio.h>
int main(){
 int n;
 schanf("%d",&n);
 int a{100};
 for(int i=0;i<n;i++){
   scanf("%d",&a{i});
 }
  
  int checked=0;
  for(int i=0;i<n;i++){
  if(a{i}%2==0){
  if(a{i}%3!=0||a{i}%5!=0){
    checked=1;
   }
  }
 }
  
  if(checked==0){
   printf("APPROVED");
  }
  else{
     printf("DENIED");
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:2: error: implicit declaration of function 'schanf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    4 |  schanf("%d",&n);
      |  ^~~~~~
      |  scanf
main.c:5:7: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    5 |  int a{100};
      |       ^
main.c:5:11: error: expected ';' before '}' token
    5 |  int a{100};
      |           ^
      |           ;
main.c:7:16: error: 'a' undeclared (first use in this function)
    7 |    scanf("%d",&a{i});
      |                ^
main.c:7:16: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:17: error: expected ')' before '{' token
    7 |    scanf("%d",&a{i});
      |         ~       ^
      |                 )
main.c:12:7: error: expected ')' before '{' token
   12 |   if(a{i}%2==0){
      |     ~ ^
      |       )
main.c:13:7: error: expected ')' before '{' token
   13 |   if(a{i}%3!=0||a{i}%5!=0){
      |     ~ ^
      |       )
Language: Java

import java.util.Scanner;
class Main{
  Scanner sc = new Scanner(System.in);
  int N = sc.nextInt();
  boolean isCheck = true;
  for(int i = 0; i<N; i++){
    int tmp = sc.nextInt();
    if(tmp%2 == 0){
      if(tmp%3 != 0 || tmp%5 != 0){
        isCheck = false;
      }
    }
  }
  if(isCheck){
    System.out.println("APPROVED");
  }else{
    System.out.println("DENIED");
  }
}


Compiler output:
Main.java:6: error: illegal start of type
  for(int i = 0; i<N; i++){
  ^
Main.java:6: error: > or ',' expected
  for(int i = 0; i<N; i++){
                    ^
Main.java:6: error: <identifier> expected
  for(int i = 0; i<N; i++){
                       ^
Main.java:14: error: illegal start of type
  if(isCheck){
  ^
Main.java:14: error: <identifier> expected
  if(isCheck){
            ^
Main.java:16: error: illegal start of type
  }else{
   ^
6 errors
Language: C++

#include <bits/stdc++.h>

using namespace std;
const int N = 600000;

int n;
string s;
map<string, int> mm;
vector<pair<int, string> > c;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cin >> n;
    for (int i = 0; i < n; i++)
    {
        cin >> a;
        if (a % 2 == 0)
        {
            if (a % 3 == 0 || a % 5 == 0) continue;
            cout << "DENIED";
            return 0;
        }
    }
    cout << "APPROVED";
}


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

/*by freesteed*/
#include <bits/stdc++.h>
using namespace std;
#define rep(i,a,n) for (int i=a;i<n;i++)
#define pb push_back
#define fill(x,c) memset(x,c,sizeof(x))
#define fi first
#define se second
#define sz(A) (int)(A.size())
#define all(x) (x).begin(),(x).end()
#define caset int ___T; cin>>___T; for(int cs=1;cs<=___T;cs++)
#define get_be(c,x) (lower_bound(c.begin(),c.end(),x)-c.begin())
//get_be biger & equal
typedef long long ll;
typedef pair<int,int> PII;
typedef vector<int> VI;
const ll mod=1e9+7;
const ll oo=1e9+10;
const int Max = 1e6+10;
ll powmod(ll a,ll b) {ll res=1;a%=mod; assert(b>=0); for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
//ll a[Max];
ll n;
void solve(){
	cin>>n;
	int t,f=1;
	rep(i,0,n){
		cin>>t;
		if(n%2==0&&(n%3&&n%5))f=0;
	}
	cout<<(f?APPROVED:DINIED);
}
int main() {
	ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
	//caset{
		solve();
	//}
  	return 0;
}





Compiler output:
a.cc: In function 'void solve()':
a.cc:30:18: error: 'APPROVED' was not declared in this scope
   30 |         cout<<(f?APPROVED:DINIED);
      |                  ^~~~~~~~
a.cc:30:27: error: 'DINIED' was not declared in this scope
   30 |         cout<<(f?APPROVED:DINIED);
      |                           ^~~~~~
Language: C++

#include <iostream>
#include <vector>
#include <queue>
using namespace std;
using Graph = vector<vector<int> >;
 
int main(){
  int N; cin >> N;
  vector<int> a;
  string ans = "DENIED";
  for(int i=0; i<N; i++) cin >> a[i];
  for(int i=0; i<N; i++){
    if(a[i]%2==0 or a[i]%3 ==0 or a[i]%5 == 0){
        ans == "APPROVED";
      }
    }
  }
  cout << ans << endl;
}
        

Compiler output:
a.cc: In function 'int main()':
a.cc:14:13: warning: ignoring return value of 'bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*) [with _CharT = char; _Traits = char_traits<char>; _Alloc = allocator<char>]', declared with attribute 'nodiscard' [-Wunused-result]
   14 |         ans == "APPROVED";
      |         ~~~~^~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:3772:5: note: declared here
 3772 |     operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
a.cc: At global scope:
a.cc:18:3: error: 'cout' does not name a type
   18 |   cout << ans << endl;
      |   ^~~~
a.cc:19:1: error: expected declaration before '}' token
   19 | }
      | ^
Language: C

#include<stdio.h>
int main(void){
  int n;
  scanf("%d",&a);
  int a[n],i;
  for(i=0;i<n;i++){
     scanf("%d",&a[i]);
     if(a[i]%2==0){
       if(!(a[i]%3==0||a[i]%5==0)){
         printf("DENIED");
         return 0;
       }
     }
  }
  printf("APPROVED");
  return 0;
}
 

Compiler output:
main.c: In function 'main':
main.c:4:15: error: 'a' undeclared (first use in this function)
    4 |   scanf("%d",&a);
      |               ^
main.c:4:15: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

 
int main(void) { 
    int n;
    int x;
    vector<int> lst(n);
    cin>>n;

    for (int i=0;i<n;i++){
        cin>>x;
        if (x %2==0){
            lst.push_back(x);
        }
    }
    for (int j =0;j<lst.size();j++){
        if (lst.at(j) %3!=0 && lst.at(j) % 5!=0)){
            cout<<"DENIED"<<endl;
            return 0;
        }
    }
    cout<<"APPROVED"<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:49: error: expected primary-expression before ')' token
   19 |         if (lst.at(j) %3!=0 && lst.at(j) % 5!=0)){
      |                                                 ^
Language: C++

#include<iostream>
using namespace std;
int main() {
	int n;
	int count = 0;
	int count2 = 0;
	int data[100];
	cin >> n;
	for (int i = 0; i < n; i++) {
		scanf_s("%d", &data[i]);
	}
	for (int i = 0; i < n; i++) {
		if (data[i] % 2 == 0){
			count++;
		
		if (data[i] % 3 == 0 || data[i] % 5 == 0) {
				count2++;
			}
		}
	}
	if (count == count2) {
		cout << "APPROVED";
	}
	else {
		cout << "DENIED";
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   10 |                 scanf_s("%d", &data[i]);
      |                 ^~~~~~~
      |                 scanf
Language: C++

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

int main()
{
  int n,i,v;
  
  v=1;
  cin>>n;
  for(i=0;i<n;++i)
  {
    cin>>a[i];
    if(a[i]%2==0&&!(a[i]%3==0||a[i]%5==0))
    v=0;  
  }
  
  if(v==1)
  cout<<"APPROVED";
  else
  cout<<"DENIED";  
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:13:10: error: 'a' was not declared in this scope
   13 |     cin>>a[i];
      |          ^
Language: Java

import java.util.Scanner;

class Main {

    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        int N = stdIn.nextInt();

        int[] a = new int[100];

        for (int i = 0; i<N; i++){
            a[i] = stdIn.nextInt();
        }
        
        int flag = 0;
        //int j;
        for (j=0; j<N; j++){
            if (a[j]%2 == 0) {
                if (a[j]%3 != 0 && a[j]%5 != 0){
                    flag = 1;
                    break;
                }
            }
        }

        if (flag == 1)
            System.out.println("DENIED");
        else
            System.out.println("APPROVED");
        
        //System.out.println("j = "+j);
        

    }
}

Compiler output:
Main.java:17: error: cannot find symbol
        for (j=0; j<N; j++){
             ^
  symbol:   variable j
  location: class Main
Main.java:17: error: cannot find symbol
        for (j=0; j<N; j++){
                  ^
  symbol:   variable j
  location: class Main
Main.java:17: error: cannot find symbol
        for (j=0; j<N; j++){
                       ^
  symbol:   variable j
  location: class Main
Main.java:18: error: cannot find symbol
            if (a[j]%2 == 0) {
                  ^
  symbol:   variable j
  location: class Main
Main.java:19: error: cannot find symbol
                if (a[j]%3 != 0 && a[j]%5 != 0){
                      ^
  symbol:   variable j
  location: class Main
Main.java:19: error: cannot find symbol
                if (a[j]%3 != 0 && a[j]%5 != 0){
                                     ^
  symbol:   variable j
  location: class Main
6 errors
Language: Java

import java.util.Scanner;

class Main {

    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        int N = stdIn.nextInt();

        int[] a = new int[1000];

        for (int i = 0; i<N; i++){
            a[i] = stdIn.nextInt();
        }
        
        int flag_even = 0;
        int flag_out = 0;
        for (int j=0; j<N; j++){
            if (a[j]%2 == 0) {
                if (a[j]%3 == 0 || a[j]%5 == 0) {
                    flag_even = 1;
                }else {
                    falg_out = 1;
                    break;
                }
            }
        }

        if (flag_A == 1 && flag_out != 1){
            System.out.println("APPROVED");
        }else{
            System.out.println("DENIED");
        }
    }
}

Compiler output:
Main.java:22: error: cannot find symbol
                    falg_out = 1;
                    ^
  symbol:   variable falg_out
  location: class Main
Main.java:28: error: cannot find symbol
        if (flag_A == 1 && flag_out != 1){
            ^
  symbol:   variable flag_A
  location: class Main
2 errors
Language: C++


#include <bits/stdc++.h>
#define INF 100000000000
#define MOD 1000000007
#define ll long long int
#define REP(i, n) for (int i = 0; i < (int)(n); i++)

using namespace std;



int main(){

  int N; cin>>N;
  int A[1001];
  REP(i,N) cin>>A[i];
  int flag = 1;
  REP(i,N){
    if(A[i] % 2 == 0){
      if(A[i] % 3 != 0 and A[i] % 5 != 0) flag = 0;
      continue;
    }
  }

  auto ans = flag ? "APPROVED" : "DENIED" ;

  cout<< flag ? "APPROVED" : "DENIED"  <<endl;
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:40: error: invalid operands of types 'const char [7]' and '<unresolved overloaded function type>' to binary 'operator<<'
   27 |   cout<< flag ? "APPROVED" : "DENIED"  <<endl;
      |                              ~~~~~~~~~~^~~~~~
Language: C++

#include <iostream>
using namespace std;
int main()
{
  int n;
  cin>>n;
  int element;
  for(int i=0;i<n;i++)
  {
    cin>>element;
    if(element%2==0)
    {
      if(!((element%3==0)||(element%5==0)))
      {
        cout<<<"DENIED";
        return 0;
      }
    }
  }
  cout<<<"APPROVED";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:15: error: expected primary-expression before '<' token
   15 |         cout<<<"DENIED";
      |               ^
a.cc:20:9: error: expected primary-expression before '<' token
   20 |   cout<<<"APPROVED";
      |         ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n; cin>>n;
  bool judge=true;
  rep(i,n){
    int a=0; cin>>a;
    if(a%2==0) if(a%3&&a%5) judge=false;
  }
  (judge)?cout<<"APPROVED"<<endl:cout<<"DENINED"<<endl
      
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:55: error: expected ';' before '}' token
   14 |   (judge)?cout<<"APPROVED"<<endl:cout<<"DENINED"<<endl
      |                                                       ^
      |                                                       ;
   15 | 
   16 | }
      | ~
Language: C

#include <stdio.h>

int main() {
    int n, A, deuRuim = 0;
    scanf("%d", &n);
    int i = 0;
    
    while(i < n) {
        scanf("%d", &A);
        if(A%2 == 0){
            if(A%3 == 0 && A%5 == 0){
                deuRuim = 1
            }
        }
    ++i
    if (deuRuim){
        printf("DENIED\n");
    } else {
        printf("APPROVED\n");
    }

Compiler output:
main.c: In function 'main':
main.c:12:28: error: expected ';' before '}' token
   12 |                 deuRuim = 1
      |                            ^
      |                            ;
   13 |             }
      |             ~               
main.c:15:8: error: expected ';' before 'if'
   15 |     ++i
      |        ^
      |        ;
   16 |     if (deuRuim){
      |     ~~  
main.c:20:5: error: expected declaration or statement at end of input
   20 |     }
      |     ^
main.c:20:5: error: expected declaration or statement at end of input
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
 int N
  int x[];
  bool flag = true;
  cin >> N;
  for(int i=0; i < N;i++){
  cin >> x[i];
  }
  for(int i =0; i < N; i++){
    if(x[i] % 2 == 0){
    if(x[i] % 3 != 0 || x[i] % 5 != 0)
      flag = false;
    }
    
       }
  if(flag == false)
    cout << "DENIED" << endl;
  else
    cout << "APPROVED" << endl;
 
 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected initializer before 'int'
    6 |   int x[];
      |   ^~~
a.cc:8:10: error: 'N' was not declared in this scope
    8 |   cin >> N;
      |          ^
a.cc:10:10: error: 'x' was not declared in this scope
   10 |   cin >> x[i];
      |          ^
a.cc:13:8: error: 'x' was not declared in this scope
   13 |     if(x[i] % 2 == 0){
      |        ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
 int N
  int x[];
  bool flag = true;
  cin >> N;
  for(i=0; i < N;i++){
  cin >> x[i];
  }
  for(i =0; i < N; i++){
    if(x[i] % 2 == 0){
    if(x[i] % 3 != 0 || x[i] % 5 != 0)
      flag = false;
    }
    
       }
  if(flag == false)
    cout << "DENIED" << endl;
  else
    cout << "APPROVED" << endl;


}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected initializer before 'int'
    6 |   int x[];
      |   ^~~
a.cc:8:10: error: 'N' was not declared in this scope
    8 |   cin >> N;
      |          ^
a.cc:9:7: error: 'i' was not declared in this scope
    9 |   for(i=0; i < N;i++){
      |       ^
a.cc:10:10: error: 'x' was not declared in this scope
   10 |   cin >> x[i];
      |          ^
a.cc:12:7: error: 'i' was not declared in this scope
   12 |   for(i =0; i < N; i++){
      |       ^
a.cc:13:8: error: 'x' was not declared in this scope
   13 |     if(x[i] % 2 == 0){
      |        ^
Language: C++


#include <iostream>

using namespace std;

int main(){
    int N;
    cin>> N;
    int a[N];
    for(int i = 0;i < N;i++){
        cin >> a[n];
    }
    for(int i = 0;i < N;i++){
        if(a[i] / 2 == 0){
            if(a[i] / 3 != 0){
                cout << "DENIED" << endl;
                break;
            }else if(a[i] / 5 != 0){
                cout << "DENIED" << endl;
                break;
            }
        }
        if(i == N-1){
            cout << "APPROVED" << endl;
        }
    }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:18: error: 'n' was not declared in this scope
   11 |         cin >> a[n];
      |                  ^
Language: C++


#include <iostream>

using namespace std;

int main(){
    int N;
    cin>> N;
    int a[N];
    for(int i = 0;i < N;i++){
        cin >> a[n];
    }
    for(int i = 0;i < N;i++){
        if(a[i] / 2 == 0){
            if(a[i] / 3 != 0){
                cout << "DENIED" << endl;
                break;
            }else if(a[i] / 5 != 0){
                cout << "DENIED" << endl;
                break;
            }
        }
        if(i == n-1){
            cout << "APPROVED" << endl;
        }
    }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:18: error: 'n' was not declared in this scope
   11 |         cin >> a[n];
      |                  ^
a.cc:23:17: error: 'n' was not declared in this scope
   23 |         if(i == n-1){
      |                 ^
Language: C++


#include <iostream>

using namespace std;

int main(){
    int N;
    cin>> N;
    int a[n];
    for(int i = 0;i < n;i++){
        cin >> a[n];
    }
    for(int i = 0;i < n;i++){
        if(a[i] / 2 == 0){
            if(a[i] / 3 != 0){
                cout << "DENIED" << endl;
                break;
            }else if(a[i] / 5 != 0){
                cout << "DENIED" << endl;
                break;
            }
        }
        if(i == n-1){
            cout << "APPROVED" << endl;
        }
    }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:11: error: 'n' was not declared in this scope
    9 |     int a[n];
      |           ^
a.cc:11:16: error: 'a' was not declared in this scope
   11 |         cin >> a[n];
      |                ^
a.cc:14:12: error: 'a' was not declared in this scope
   14 |         if(a[i] / 2 == 0){
      |            ^
Language: C++

#include <iostream>
#include <iomanip>
#include <vector>
#include <set>
#include <map>
#include <string>
#include <algorithm>
#include <math.h>
typedef long long ll;
using namespace std;
 
int main()
{
	int n;
	cin >> n;
	vector<int> a(n);
	for (int i = 0; i < n; i++) cin >> a[i];
	int i = 0;
	for (i = 0; i < n; i++)
	{
		if (a[i] % 2 == 0)
		{
			if (!((a[i]%3 == 0) || (a[i] % 5 == 0))) break;
		}
	}
 
	cout << ( (i == n) ? "APPROVED" ; "DENIED" ) << endl;

}	

Compiler output:
a.cc: In function 'int main()':
a.cc:27:40: error: expected ':' before ';' token
   27 |         cout << ( (i == n) ? "APPROVED" ; "DENIED" ) << endl;
      |                                        ^~
      |                                        :
a.cc:27:41: error: expected primary-expression before ';' token
   27 |         cout << ( (i == n) ? "APPROVED" ; "DENIED" ) << endl;
      |                                         ^
a.cc:27:40: error: expected ')' before ';' token
   27 |         cout << ( (i == n) ? "APPROVED" ; "DENIED" ) << endl;
      |                 ~                      ^~
      |                                        )
a.cc:27:51: error: expected ';' before ')' token
   27 |         cout << ( (i == n) ? "APPROVED" ; "DENIED" ) << endl;
      |                                                   ^~
      |                                                   ;
Language: C++

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

int main() {
  int A;
  int B = -1;
  cin >> A;
  vector<int> v(A);
  
  for(int i=0;i < A; i++){
    cin >> v[i];
  if(v[i]%2==0){
    if(v[i]%3==0 ||v[i]%5==0){
      cout << "APPROVED" << endl;
    }
    return 0;
    else{
      cout << "DENIED" <<endl;
    }
    return 0;
  }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:5: error: expected '}' before 'else'
   17 |     else{
      |     ^~~~
a.cc:12:16: note: to match this '{'
   12 |   if(v[i]%2==0){
      |                ^
a.cc: At global scope:
a.cc:23:1: error: expected declaration before '}' token
   23 | }
      | ^
Language: C++

#include <cstdio>

void main()
{
  int n;
  int ans;
  int i;
  bool approved = true;

  scanf_s("%d", &n);
  for (i = 0; i < n; i++)
  {
    scanf_s("%d", &ans);
    if (ans % 2 == 0 && ans % 5 != 0 && ans % 3 != 0)
    {
      approved = false;
    }
  }
  if (approved)
  {
    printf("APPROVED");
  }
  else
  {
    printf("DENIED");
  }
}



Compiler output:
a.cc:3:1: error: '::main' must return 'int'
    3 | void main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:10:3: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   10 |   scanf_s("%d", &n);
      |   ^~~~~~~
      |   scanf
Language: C++

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

int main(){
  int n; cin >> n;
  flag f = true;
  for(int i = 0; i < n; i++){
    int a; cin >> a;
  	
  	if(a%2 != 1 && a%3!=0 && a%5!=0) f = false;
  }
  
  if(f) cout << "APPROVED" << endl;
  else cout << "DENIED" << endl;
  
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'flag' was not declared in this scope
    6 |   flag f = true;
      |   ^~~~
a.cc:10:42: error: 'f' was not declared in this scope
   10 |         if(a%2 != 1 && a%3!=0 && a%5!=0) f = false;
      |                                          ^
a.cc:13:6: error: 'f' was not declared in this scope
   13 |   if(f) cout << "APPROVED" << endl;
      |      ^
Language: C++

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

int main(){
  int n; cin >> n;
  frag f = true;
  for(int i = 0; i < n; i++){
    int a; cin >> a;
  	
  	if(a%2 != 1 && a%3!=0 && a%5!=0) f = false;
  }
  
  if(f) cout << "APPROVED" << endl;
  else cout << "DENIED" << endl;
  
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'frag' was not declared in this scope
    6 |   frag f = true;
      |   ^~~~
a.cc:10:42: error: 'f' was not declared in this scope
   10 |         if(a%2 != 1 && a%3!=0 && a%5!=0) f = false;
      |                                          ^
a.cc:13:6: error: 'f' was not declared in this scope
   13 |   if(f) cout << "APPROVED" << endl;
      |      ^
Language: C++

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

int main(){
  int n; cin >> n;
  frag f = true;
  for(int i = 0; i < n; i++){
    int a; cin >> a;
  	
  	if(a%2 == 1 || a%3==0 || a%5==0) f = false;
  }
  
  if(f) cout << "APPROVED" << endl;
  else cout << "DENIED" << endl;
  
  
}

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

import java.util.Scanner;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int[] ints = new int[n];
    boolean bl = true;
    for(int i = 0; i < n; i++){
      ints[i] = sc.nextInt();
      bl &= ((ints[i] % 2 == 1) || (ints[i] % 3 == 0 || ints[i] % 5 == 0);
    }
    if(bl){
      System.out.println("APPROVED");
    }else{
      System.out.println("DENIED");
    }
    
  }
}

Compiler output:
Main.java:10: error: ')' expected
      bl &= ((ints[i] % 2 == 1) || (ints[i] % 3 == 0 || ints[i] % 5 == 0);
                                                                         ^
1 error
Language: Java

import java.util.Scanner;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int[] ints = new int[n];
    boolean bl = true;
    for(int i = 0; i < n; i++){
      ints[i] = sc.nextInt();
      bl &= ((int[i] % 2 == 1) || (int[i] % 3 == 0 || int[i] % 5 == 0);
    }
    if(bl){
      System.out.println("APPROVED");
    }else{
      System.out.println("DENIED");
    }
    
  }
}

Compiler output:
Main.java:10: error: ']' expected
      bl &= ((int[i] % 2 == 1) || (int[i] % 3 == 0 || int[i] % 5 == 0);
                  ^
Main.java:10: error: ';' expected
      bl &= ((int[i] % 2 == 1) || (int[i] % 3 == 0 || int[i] % 5 == 0);
                   ^
Main.java:10: error: ']' expected
      bl &= ((int[i] % 2 == 1) || (int[i] % 3 == 0 || int[i] % 5 == 0);
                                       ^
Main.java:10: error: ';' expected
      bl &= ((int[i] % 2 == 1) || (int[i] % 3 == 0 || int[i] % 5 == 0);
                                        ^
Main.java:10: error: ']' expected
      bl &= ((int[i] % 2 == 1) || (int[i] % 3 == 0 || int[i] % 5 == 0);
                                                          ^
Main.java:10: error: ';' expected
      bl &= ((int[i] % 2 == 1) || (int[i] % 3 == 0 || int[i] % 5 == 0);
                                                           ^
6 errors
Language: C++

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

int main() {
int n;
int a[i];
for(int i=0;i<n;i++){
    cin >> a[i];
}
for(int i=0;i<n;i++){
    if(a[i]%2==0){
        if(a[i]%3==0||a[i]%5==0){continue;}
        else {cout << "DENIED";
        return 0;}
    }
}
cout << "APPROVED";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: 'i' was not declared in this scope
    6 | int a[i];
      |       ^
a.cc:8:12: error: 'a' was not declared in this scope
    8 |     cin >> a[i];
      |            ^
a.cc:11:8: error: 'a' was not declared in this scope
   11 |     if(a[i]%2==0){
      |        ^
Language: C

#include <stdio.h>
 
int main(void)
{
  int i, pe;
  int num[];
  
  scanf("%d", &pe);
  for( i = 0; i < pe; i++ ){
    scanf("%d" , &num[i]);
  }
  
  for( i = 0; i < pe; i++ ){
    if( num[i] % 2 == 0 ){
      if( num[i] % 3 != 0 && num[i] % 5 != 0 ){
        mode = 1;
      }
    }
    
    if( mode = 1 ){
      printf("APPROVED\n");
    } else {
      printf("DENIED\n");
    }
    
    return 0;
  }

Compiler output:
main.c: In function 'main':
main.c:6:7: error: array size missing in 'num'
    6 |   int num[];
      |       ^~~
main.c:16:9: error: 'mode' undeclared (first use in this function)
   16 |         mode = 1;
      |         ^~~~
main.c:16:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:27:3: error: expected declaration or statement at end of input
   27 |   }
      |   ^
Language: C++

#include<bits/stdc++.h>
#define rep(i,n) for(int i=0; i<(n); i++)
using namespace std;
using ll = long long;
const ll INF = 1e9 + 7;
typedef pair<int,int> P;// pair型は２つの値の組を表せる

int main(){
    int N; cin >> N; //書類にN個の整数
    vector <int> A(N);d
    bool ans=true;
    rep(i,N){
        cin >> A[i];
        if (A[i]%2==0){
            if not (A[i]%3==0 || A[i]%5==0) ans=false 
        }
    }
    if (ans) cout << "APPROVED";
    else cout << "DENIED";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:23: error: 'd' was not declared in this scope
   10 |     vector <int> A(N);d
      |                       ^
a.cc:15:16: error: expected '(' before 'not' token
   15 |             if not (A[i]%3==0 || A[i]%5==0) ans=false
      |                ^~~
      |                (
a.cc:18:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   18 |     if (ans) cout << "APPROVED";
      |         ^~~
      |         abs
Language: C++

#include<iostream>
#include<vector>
#include<cstdlib>
#include<cstring>

using namespace std;

namespace Original{
    std::vector<int> createVec( std::string s, int n ){
        const int size = s.size();
        char tmp[size+1];
         strcpy( tmp, s.c_str() );
         std::vector<int> res;
         res.push_back( std::atoi(std::strtok( tmp, " " )) );
         for( int i = n - 1; i != 0; i-- ){
              res.push_back( std::atoi(std::strtok( tmp, "" )) );
         }
    return res;
    }
}

int main( void ){
    int n;
    cin >> n;
    std::string s;
    std::vector<int> vec = createVec( s, n );
    bool allowed = true;
    for( int i = 0; i < vec.size(); i++ ){
         if( vec[i] % 2 == 0 && (vec[i] % 3 != 0 && vec[i] % 5 != 0) ){
             allowed = false;
             break;
         }
    }
    if( allowed ) cout << "APPROVED" << endl;
    else          cout << "DENIED" << endl;
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:28: error: 'createVec' was not declared in this scope; did you mean 'Original::createVec'?
   26 |     std::vector<int> vec = createVec( s, n );
      |                            ^~~~~~~~~
      |                            Original::createVec
a.cc:9:22: note: 'Original::createVec' declared here
    9 |     std::vector<int> createVec( std::string s, int n ){
      |                      ^~~~~~~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
using ll = long long;

int main() {
  int n; cin >> n;
  vector<int> a(n);
  rep(i,n) {
    cin >> a[i]
  }
  bool ans = true;
  rep(i,n) {
    if (a[i]%2==0){
      if (a[i]%3!=0 && a[i]%5!=0) ans = false;
    }
  }
  if (ans) cout << "APPROVED" << endl;
  else cout << "DENIED" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:16: error: expected ';' before '}' token
   10 |     cin >> a[i]
      |                ^
      |                ;
   11 |   }
      |   ~
Language: C++

#include <iostream>

using namespace std;

int main() 
{
  int n, num; cin >> n;
  bool approved = true;
  while(n--)
  {
    if(approved)
    {
      cin >> num;  
      if(num&1 == 0)
         approved = approved && ( ((num %3) == 0)) or ((num % 5) == 0) );
    }
  }
  
  cout << (approved ? "APPROVED" : "DENIED");
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:71: error: expected ';' before ')' token
   15 |          approved = approved && ( ((num %3) == 0)) or ((num % 5) == 0) );
      |                                                                       ^~
      |                                                                       ;
Language: C++

#include <iostream>

using namespace std;

int main() 
{
  int n; cin >> n;
  bool approved = true;
  while(n--)
  {
    if(approved)
    {
      cin >> num;  
      if(num&1 == 0)
         approved = approved && ( (num %3 == 0) or (num % 5 == 0) );
    }
  }
  
  cout << (approved ? "APPROVED" : "DENIED");
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:14: error: 'num' was not declared in this scope; did you mean 'enum'?
   13 |       cin >> num;
      |              ^~~
      |              enum
Language: C++

#include <iostream>
using namespace std;
int a[1010];
int main () {
  int n;
  bool flag = true;
  std::cin >> n;
  for (int i = 0; i < n ; i++ ) {
    std::cin >> a[i];
  }

  for (int i = 0; i < n; i++) {
    if(a[i] % 2 === 0) {
      if(!(a[i] % 3 === 0 || a[i] % 5 === 0)) {
        flag = false;
      }
    }
  }

  if(flag) {
    std::cout << "APPROVED" << '\n';
  } else {
    std::cout << "DENIED" << '\n';
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:19: error: expected primary-expression before '=' token
   13 |     if(a[i] % 2 === 0) {
      |                   ^
a.cc:14:23: error: expected primary-expression before '=' token
   14 |       if(!(a[i] % 3 === 0 || a[i] % 5 === 0)) {
      |                       ^
a.cc:14:41: error: expected primary-expression before '=' token
   14 |       if(!(a[i] % 3 === 0 || a[i] % 5 === 0)) {
      |                                         ^
Language: Java

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        int[] A = new int[N];
        for (int i=0;i<=N;i++){
            A[i]=scan.nextInt();
        }
        int flg = 0;
        for(int i=0;i<N;i++){
            if(A[i]%2 == 0){
                if(A[i]%3 == 0||A[i]%5 == 0){
                }
            }else{
                flg = 1;
                break;
            }
        }
        if(flg == 0){
            System.out.println("APPROVED");
        }else{
            System.out.println("DENIED");
        }
        
        
    }
}

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