QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#627640#8145. GameXSatonCompile Error//C++201.3kb2024-10-10 16:34:412024-10-10 16:34:43

Judging History

你现在查看的是最新测评结果

  • [2024-10-10 16:34:43]
  • 评测
  • [2024-10-10 16:34:41]
  • 提交

answer

///by Saton.
#include<bits/stdc++.h>
#define PI acos(-1)
#define fi first
#define se second 
#define sz(a) ((int)a.size())
#define all(a) a.begin(), a.end()
#define int long long
#define ll __int128
#define DD double double
#define LD long double
#define rep(i,a,b) for(int i = (a);i <= (b);i ++)
#define lep(i,a,b) for(int i = (a);i >= (b);i --)
#define FLUSH fflush(stdout)
using namespace std;
typedef pair<int,int> PII;
const int N = 1e6 + 10,mod = 998244353;
int n,m,k;
int a[N];

void solve() {
    cin >> n >> k;
    rep(i,0,n+2*k) a[i] = 0;
    rep(i,1,n) {
        int x;
        cin >> x;
        a[x] = 1;
    }
    for(int i = 0,j = k;j > 0;i ++) {
        if(i%2 && !a[i]) {
            a[i] = 1;
            j --;
        }
    }
    for(int i = 0,j = k;j > 0;i ++) {
        if(i%2==0 && !a[i]) {
            a[i] = 1;
            j --;
        }
    }    
    int mex = 0;
    while(a[mex]) mex ++;
    
    // cout << mex << '\n';
    cout << (mex%2==0 ? "Alice" : "Bob") << '\n';
} 

signed main() {
    ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
    int T;
    cin >> T;
    while(T --) {
        solve();
    }
    // solve();
       
    return 0;
}  
/*   /\_/\
*   (= ._.)
*   / >  \>
*/*/

详细

answer.code:62:4: error: expected unqualified-id before ‘/’ token
   62 | */*/
      |    ^