Language: C++

#include<iostream>
#include<algorithm>
#include<ctime>
#include<vector>
#include<string>
#include<cmath>
#include<map>
#include<iomanip>
#include<numeric>
#include<queue>
#include<deque>
#include<cfloat>
#include<functional>
#include<tuple>
#include<math.h>
#include<bitset>
#include<stack>
#include<set>
#include<random>
#include<stdlib.h>
#define rip(i,n) for(int i=0;i<n;i++)
#define Rip(i,n) for(int i=1;i<=n;i++)
#define RIP(i,a,b) for(int i=a;i<b;i++)
#define all(V) V.begin(),V.end()
#define sec  setprecision;
#define _CRT_SECURE_NO_WARNINGS
#pragma target("avx")
#pragma optimize("O3")
#pragma optimize("unroll-loops");
constexpr double eps = 1e-9;
constexpr double pi = 3.141592653589793238462643383279;
using namespace std;
using ll = long long;
using ld = long double;
using Pair = pair<ll, ll>;
using Graph = vector<vector<int>>;
const int MAX = 510000;
const int MOD = 1000000007;
long long fac[MAX], finv[MAX], inv[MAX];
// テーブルを作る前処理
void COMinit() {
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (int i = 2; i < MAX; i++){
        fac[i] = fac[i - 1] * i % MOD;
        inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
        finv[i] = finv[i - 1] * inv[i] % MOD;
    }
}
// 二項係数計算
long long COM(int n, int k){
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}
bool isOK(ll index, ll key,vector<ll>a) {
    if (a[index] >= key) return true;
    else return false;
}
// 汎用的な二分探索のテンプレ
ll binary_search(ll key) {
    ll left = -1; //「index = 0」が条件を満たすこともあるので、初期値は -1
    ll right = (ll)a.size(); // 「index = a.size()-1」が条件を満たさないこともあるので、初期値は a.size()
    /* どんな二分探索でもここの書き方を変えずにできる！ */
    while (right - left > 1) {
        ll mid = left + (right - left) / 2;
        if (isOK(mid, key)) right = mid;
        else left = mid;
    }
    /* left は条件を満たさない最大の値、right は条件を満たす最小の値になっている */
    return right;
}
ll gcd(ll a, ll b)
{if (a % b == 0)return(b);
else return(gcd(b, a % b));}
ll lcm(ll a, ll b)
{return a * b / gcd(a, b);}
ll pow(ll a,ll b){
	ll ans=0;
	if(b==0)return(1);
	if(b==1)return(a);
	if(n%2==0)return(pow(a*a,b));
	else return(pow(a*b-1)*a);
}
ll modpow(ll x, ll n, ll mod) {
	x %= mod;
	if (n == 0)
		return 1;
	if (n % 2 == 0)
		return (pow((x * x) % mod, n / 2, mod) % mod);
	else
		return (x * pow(x, n - 1, mod) % mod);
}
ll sum(vector<ll>a){
    int k=a.size();
    ll ans=0;
    rip(i,k)ans+=a[i];
    return(ans);
}
// 深さ優先探索
int N,M;
vector<bool> seen;
void dfs(const Graph &G, int v) {
    cin>>N>>M;
     // グラフ入力受取 (ここでは無向グラフを想定)
    Graph G(N);
    for (int i = 0; i < M; ++i) {
        int a, b;
        cin >> a >> b;
        G[a].push_back(b);
        G[b].push_back(a);
    }
    // 頂点 0 をスタートとした探索
    seen.assign(N, false); // 全頂点を「未訪問」に初期化
    dfs(G, 0);
    seen[v] = true; // v を訪問済にする
    // v から行ける各頂点 next_v について
    for (auto next_v : G[v]) { 
        if (seen[next_v]) continue; // next_v が探索済だったらスルー
        dfs(G, next_v); // 再帰的に探索
    }
}
vector<ll>bfs(ll n,ll m,Graph G(n)){
    // グラフ入力受取 (ここでは無向グラフを想定)
    //Graph G(N);
    //for (int i = 0; i < M; ++i) {
      //  int a, b;
        //cin >> a >> b;
        //G[a].push_back(b);
        //G[b].push_back(a);
    //}
    // BFS のためのデータ構造
    vector<int> dist(N, -1); // 全頂点を「未訪問」に初期化
    queue<int> que;
    // 初期条件 (頂点 0 を初期ノードとする)
    dist[0] = 0;
    que.push(0); // 0 を橙色頂点にする
    //今回は出発点を0とする
    // BFS 開始 (キューが空になるまで探索を行う)
    while (!que.empty()) {
        int v = que.front(); // キューから先頭頂点を取り出す
        que.pop();

        // v から辿れる頂点をすべて調べる
        for (int nv : G[v]) {
            if (dist[nv] != -1) continue; // すでに発見済みの頂点は探索しない

            // 新たな白色頂点 nv について距離情報を更新してキューに追加する
            dist[nv] = dist[v] + 1;
            que.push(nv);
        }
    }
   return(dist);
}
signed main(){
 	int n;cin>>n;
  	vector<int>a(n);
  	rip(i,n)cin>>a[i];
  	rip(i,n){
      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 'll binary_search(ll)':
a.cc:64:20: error: 'a' was not declared in this scope
   64 |     ll right = (ll)a.size(); // 「index = a.size()-1」が条件を満たさないこともあるので、初期値は a.size()
      |                    ^
a.cc:68:17: error: too few arguments to function 'bool isOK(ll, ll, std::vector<long long int>)'
   68 |         if (isOK(mid, key)) right = mid;
      |             ~~~~^~~~~~~~~~
a.cc:57:6: note: declared here
   57 | bool isOK(ll index, ll key,vector<ll>a) {
      |      ^~~~
a.cc: In function 'll pow(ll, ll)':
a.cc:83:12: error: 'n' was not declared in this scope
   83 |         if(n%2==0)return(pow(a*a,b));
      |            ^
a.cc:84:24: error: no matching function for call to 'pow(ll)'
   84 |         else return(pow(a*b-1)*a);
      |                     ~~~^~~~~~~
In file included from a.cc:6:
/usr/include/c++/14/cmath:1074:5: note: candidate: 'template<class _Tp, class _Up> constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type std::pow(_Tp, _Up)'
 1074 |     pow(_Tp __x, _Up __y)
      |     ^~~
/usr/include/c++/14/cmath:1074:5: note:   candidate expects 2 arguments, 1 provided
In file included from /usr/include/features.h:523,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/c++config.h:683,
                 from /usr/include/c++/14/bits/requires_hosted.h:31,
                 from /usr/include/c++/14/iostream:38,
                 from a.cc:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:173:1: note: candidate: 'double pow(double, double)'
  173 | __MATHCALL_VEC (pow,, (_Mdouble_ __x, _Mdouble_ __y));
      | ^~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:173:1: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/cmath:380:3: note: candidate: 'constexpr long double std::pow(long double, long double)'
  380 |   pow(long double __x, long double __y)
      |   ^~~
/usr/include/c++/14/cmath:380:3: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/cmath:376:3: note: candidate: 'constexpr float std::pow(float, float)'
  376 |   pow(float __x, float __y)
      |   ^~~
/usr/include/c++/14/cmath:376:3: note:   candidate expects 2 arguments, 1 provided
a.cc:79:4: note: candidate: 'll pow(ll, ll)'
   79 | ll pow(ll a,ll b){
      |    ^~~
a.cc:79:4: note:   candidate expects 2 arguments, 1 provided
a.cc: In function 'll modpow(ll, ll, ll)':
a.cc:91:28: error: no matching function for call to 'pow(ll, ll, ll&)'
   91 |                 return (pow((x * x) % mod, n / 2, mod) % mod);
      |                         ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/cmath:1074:5: note: candidate: 'template<class _Tp, class _Up> constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type std::pow(_Tp, _Up)'
 1074 |     pow(_Tp __x, _Up __y)
      |     ^~~
/usr/include/c++/14/cmath:1074:5: note:   candidate expects 2 arguments, 3 provided
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:173:1: note: candidate: 'double pow(double, double)'
  173 | __MATHCALL_VEC (pow,, (_Mdouble_ __x, _Mdouble_ __y));
      | ^~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:173:1: note:   candidate expects 2 arguments, 3 provided
/usr/include/c++/14/cmath:380:3: note: candidate: 'constexpr long double std::pow(long double, long double)'
  380 |   pow(long double __x, long double __y)
      |   ^~~
/usr/include/c++/14/cmath:380:3: note:   candidate expects 2 arguments, 3 provided
/usr/include/c++/14/cmath:376:3: note: candidate: 'constexpr float std::pow(float, float)'
  376 |   pow(float __x, float __y)
      |   ^~~
/usr/include/c++/14/cmath:376:3: note:   candidate expects 2 arguments, 3 provided
a.cc:79:4: note: candidate: 'll pow(ll, ll)'
   79 | ll pow(ll a,ll b){
      |    ^~~
a.cc:79:4: note:   candidate expects 2 arguments, 3 provided
a.cc:93:32: error: no matching function for call to 'pow(ll&, ll, ll&)'
   93 |                 return (x * pow(x, n - 1, mod) % mod);
      |                             ~~~^~~~~~~~~~~~~~~
/usr/include/c++/14/cmath:1074:5: note: candidate: 'template<class _Tp, class _Up> constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type std::pow(_Tp, _Up)'
 1074 |     pow(_Tp __x, _Up __y)
      |     ^~~
/usr/include/c++/14/cmath:1074:5: note:   candidate expects 2 arguments, 3 provided
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:173:1: note: candidate: 'double pow(double, double)'
  173 | __MATHCALL_VEC (pow,, (_Mdouble_ __x, _Mdouble_ __y));
      | ^~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:173:1: note:   candidate expects 2 arguments, 3 provided
/usr/include/c++/14/cmath:380:3: note: candidate: 'constexpr long double std::pow(long double, long double)'
  380 |   pow(long double __x, long double __y)
      |   ^~~
/usr/include/c++/14/cmath:380:3: note:   candidate expects 2 arguments, 3 provided
/usr/include/c++/14/cmath:376:3: note: candidate: 'constexpr float std::pow(float, float)'
  376 |   pow(float __x, float __y)
      |   ^~~
/usr/include/c++/14/cmath:376:3: note:   candidate expects 2 arguments, 3 provided
a.cc:79:4: note: candidate: 'll pow(ll, ll)'
   79 | ll pow(ll a,ll b){
      |    ^~~
a.cc:79:4: note:   candidate expects 2 arguments, 3 provided
a.cc: In function 'void dfs(const Graph&, int)':
a.cc:107:11: error: declaration of 'Graph G' shadows a parameter
  107 |     Graph G(N);
      |           ^
a.cc:104:23: note: 'const Graph& G' previously declared here
  104 | void dfs(const Graph &G, int v) {
      |          ~~~~~~~~~~~~~^
a.cc: At global scope:
a.cc:124:32: error: expected ',' or '...' before '(' token
  124 | vector<ll>bfs(ll n,ll m,Graph G(n)){
      |                                ^
a.cc: In function 'std::vector<long long int> bfs(ll, ll, Graph)':
a.cc:154:15: error: could not convert 'dist' from 'vector<int>' to 'vector<long long int>'
  154 |    return(dist);
      |               ^
      |               |
      |               vector<int>