Please sign in first.
Submission #30247609
Source Code Expand
#include <bits/stdc++.h>
using namespace std;
#define rep(i, a, b) for (int i = (a); i <= (b); ++i)
#define rrep(i, a, b) for (int i = (a); i >= (b); --i)
#define PB push_back
#define ar2 array<int, 2>
typedef long long LL;
// typedef __int128 LLL;
const LL P = 998244353;
const int INF = 1e5 + 5;
const int N = 3e5 + 5;
mt19937 rng(time(0));
int n, a[N];
bool f[1 << 20];
int main() {
ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
cin >> n;
a[0] = -1;
rep(i, 1, n) cin >> a[i];
/*int ma = 10;
rep(mask, 1, (1 << ma) - 1) {
if (mask + 1 & -(mask + 1))
f[mask] = true;
int k = 0;
while (mask >= (1 << k))
k++;
k--;
f[mask] = true;
rep(j, 0, k - 1) if (!(mask >> j & 1)) {
int mask1 = mask - (1 << k) + (1 << j);
if (f[mask1])
f[mask] = false;
}
if (f[mask]) {
rep(j, 0, ma - 1) if (mask >> j & 1) cerr << j << " ";
cerr << endl;
}
}*/
cout << (a[n - 1] == a[n] - 1 && n % 2 == a[n - 1] % 2 ? "Bob" : "Alice");
return 0;
}
Submission Info
| Submission Time | |
|---|---|
| Task | C - Distinct Numbers |
| User | TrivialMan |
| Language | C++ (GCC 9.2.1) |
| Score | 600 |
| Code Size | 1183 Byte |
| Status | AC |
| Exec Time | 37 ms |
| Memory | 4816 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 600 / 600 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | 00-sample-001.txt, 00-sample-002.txt |
| All | 00-sample-001.txt, 00-sample-002.txt, 01-001.txt, 01-002.txt, 01-003.txt, 01-004.txt, 01-005.txt, 01-006.txt, 01-007.txt, 01-008.txt, 01-009.txt, 01-010.txt, 01-011.txt, 01-012.txt, 01-013.txt, 01-014.txt, 01-015.txt, 01-016.txt, 01-017.txt, 01-018.txt, 01-019.txt, 01-020.txt, 01-021.txt, 01-022.txt, 01-023.txt, 01-024.txt, 01-025.txt, 01-026.txt, 01-027.txt, 01-028.txt, 01-029.txt, 01-030.txt, 01-031.txt, 01-032.txt, 01-033.txt, 01-034.txt, 01-035.txt, 01-036.txt, 01-037.txt, 01-038.txt, 01-039.txt, 01-040.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 00-sample-001.txt | AC | 6 ms | 3492 KiB |
| 00-sample-002.txt | AC | 2 ms | 3540 KiB |
| 01-001.txt | AC | 2 ms | 3608 KiB |
| 01-002.txt | AC | 3 ms | 3512 KiB |
| 01-003.txt | AC | 2 ms | 3564 KiB |
| 01-004.txt | AC | 17 ms | 3940 KiB |
| 01-005.txt | AC | 27 ms | 4332 KiB |
| 01-006.txt | AC | 20 ms | 4296 KiB |
| 01-007.txt | AC | 28 ms | 4664 KiB |
| 01-008.txt | AC | 20 ms | 4192 KiB |
| 01-009.txt | AC | 19 ms | 4120 KiB |
| 01-010.txt | AC | 26 ms | 4492 KiB |
| 01-011.txt | AC | 3 ms | 3560 KiB |
| 01-012.txt | AC | 19 ms | 3936 KiB |
| 01-013.txt | AC | 28 ms | 4440 KiB |
| 01-014.txt | AC | 4 ms | 3668 KiB |
| 01-015.txt | AC | 34 ms | 4536 KiB |
| 01-016.txt | AC | 34 ms | 4748 KiB |
| 01-017.txt | AC | 5 ms | 3664 KiB |
| 01-018.txt | AC | 9 ms | 3816 KiB |
| 01-019.txt | AC | 23 ms | 4412 KiB |
| 01-020.txt | AC | 12 ms | 3844 KiB |
| 01-021.txt | AC | 17 ms | 4060 KiB |
| 01-022.txt | AC | 37 ms | 4644 KiB |
| 01-023.txt | AC | 34 ms | 4756 KiB |
| 01-024.txt | AC | 33 ms | 4656 KiB |
| 01-025.txt | AC | 33 ms | 4660 KiB |
| 01-026.txt | AC | 35 ms | 4756 KiB |
| 01-027.txt | AC | 31 ms | 4788 KiB |
| 01-028.txt | AC | 28 ms | 4784 KiB |
| 01-029.txt | AC | 34 ms | 4812 KiB |
| 01-030.txt | AC | 30 ms | 4704 KiB |
| 01-031.txt | AC | 33 ms | 4788 KiB |
| 01-032.txt | AC | 32 ms | 4700 KiB |
| 01-033.txt | AC | 34 ms | 4784 KiB |
| 01-034.txt | AC | 34 ms | 4812 KiB |
| 01-035.txt | AC | 33 ms | 4704 KiB |
| 01-036.txt | AC | 34 ms | 4816 KiB |
| 01-037.txt | AC | 34 ms | 4732 KiB |
| 01-038.txt | AC | 35 ms | 4700 KiB |
| 01-039.txt | AC | 27 ms | 4732 KiB |
| 01-040.txt | AC | 34 ms | 4644 KiB |