QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#313301 | #8142. Elevator | PetroTarnavskyi# | WA | 1ms | 3524kb | C++20 | 909b | 2024-01-24 17:19:32 | 2024-01-24 17:19:32 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for(int i = (a); i < (b); i++)
#define RFOR(i, a, b) for(int i = (a) - 1; i >= (b); i--)
#define SZ(a) int(a.size())
#define ALL(a) a.begin(), a.end()
#define PB push_back
#define MP make_pair
#define F first
#define S second
typedef long long LL;
typedef vector<int> VI;
typedef pair<int, int> PII;
typedef double db;
void solve()
{
int n, k;
cin >> n >> k;
set<int> s;
FOR (i, 0, n)
{
int a;
cin >> a;
s.insert(a);
}
FOR (t, 0, 2)
{
int j = k;
int p = t;
while (j)
{
if (!s.count(p))
{
s.insert(p);
j--;
}
p += 2;
}
}
int ans = 0;
while (s.count(ans))
ans++;
cout << (ans & 1 ? "Bob\n" : "Alice\n");
}
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
int t;
cin >> t;
while (t--)
{
solve();
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 1ms
memory: 3524kb
input:
6 20 3 8 12 6 9 9
output:
Bob Alice Alice Alice Alice Alice
result:
wrong answer 1st lines differ - expected: '0', found: 'Bob'