Submission #10132429
Source Code Expand
Copy
#include <bits/stdc++.h>
#define eb emplace_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define forn(i, n) for (int i = 0; i < (int)(n); ++i)
#define for1(i, n) for (int i = 1; i <= (int)(n); ++i)
#define ford(i, a, b) for (int i = (int)(a); i >= (int)b; --i)
#define fore(i, a, b) for (int i = (int)(a); i <= (int)(b); ++i)
#define rep(i, l, r) for (int i = (l); i <= (r); i++)
#define per(i, r, l) for (int i = (r); i >= (l); i--)
#define ms(x, y) memset(x, y, sizeof(x))
using namespace std;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpi;
typedef vector<vi> vvi;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef double ld;
template<class T> bool uin(T &a, T b) { return a > b ? (a = b, true) : false; }
template<class T> bool uax(T &a, T b) { return a < b ? (a = b, true) : false; }
int n, x;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.precision(10);
cout << fixed;
#ifdef LOCAL_DEFINE
freopen("in", "r", stdin);
#endif
cin >> n;
bool ok = true;
forn(i, n) {
cin >> x;
if (x % 2 == 0) {
if (x % 3 != 0 && x % 5 != 0) ok = false;
}
}
cout << (ok ? "APPROVED" : "DENIED") << '\n';
#ifdef LOCAL_DEFINE
cerr << "Time elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " s.\n";
#endif
return 0;
}
Submission Info
Submission Time |
|
Task |
B - Papers, Please |
User |
maxzzy8 |
Language |
C++14 (GCC 5.4.1) |
Score |
200 |
Code Size |
1555 Byte |
Status |
AC |
Exec Time |
1 ms |
Memory |
256 KB |
Judge Result
Set Name |
Sample |
Subtask1 |
Score / Max Score |
0 / 0 |
200 / 200 |
Status |
|
|
Set Name |
Test Cases |
Sample |
sample_01.txt, sample_02.txt |
Subtask1 |
sample_01.txt, sample_02.txt, sub1_01.txt, sub1_02.txt, sub1_03.txt, sub1_04.txt, sub1_05.txt, sub1_06.txt, sub1_07.txt, sub1_08.txt, sub1_09.txt, sub1_10.txt, sub1_11.txt, sub1_12.txt, sub1_13.txt, sub1_14.txt, sub1_15.txt, sub1_16.txt, sub1_17.txt, sub1_18.txt |
Case Name |
Status |
Exec Time |
Memory |
sample_01.txt |
AC |
1 ms |
256 KB |
sample_02.txt |
AC |
1 ms |
256 KB |
sub1_01.txt |
AC |
1 ms |
256 KB |
sub1_02.txt |
AC |
1 ms |
256 KB |
sub1_03.txt |
AC |
1 ms |
256 KB |
sub1_04.txt |
AC |
1 ms |
256 KB |
sub1_05.txt |
AC |
1 ms |
256 KB |
sub1_06.txt |
AC |
1 ms |
256 KB |
sub1_07.txt |
AC |
1 ms |
256 KB |
sub1_08.txt |
AC |
1 ms |
256 KB |
sub1_09.txt |
AC |
1 ms |
256 KB |
sub1_10.txt |
AC |
1 ms |
256 KB |
sub1_11.txt |
AC |
1 ms |
256 KB |
sub1_12.txt |
AC |
1 ms |
256 KB |
sub1_13.txt |
AC |
1 ms |
256 KB |
sub1_14.txt |
AC |
1 ms |
256 KB |
sub1_15.txt |
AC |
1 ms |
256 KB |
sub1_16.txt |
AC |
1 ms |
256 KB |
sub1_17.txt |
AC |
1 ms |
256 KB |
sub1_18.txt |
AC |
1 ms |
256 KB |