QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#390841#8549. The GamepopeCompile Error//C++171.1kb2024-04-15 22:58:112024-04-15 22:58:12

Judging History

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

  • [2024-04-15 22:58:12]
  • 评测
  • [2024-04-15 22:58:11]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;

#define rep(i,a,b) for(int i = a; i<(b); ++i)
#define all(x) begin(x),end(x)
#define sz(x) (int)(x).size()
using ll = long long;
using pii = pair<int, int>;
using vi = vector<int>;

#define trav(a, x) for(auto& a : x)
#define f first
#define s second
#define pb push_back
const char nl = '\n';

#ifdef DBG
void dbg_out() { cerr << nl; }
template <typename Head, typename... Tail>
void dbg_out(Head H, Tail... T) {
    cerr << ' ' << H;
    dbg_out(T...);
}
#define dbg(...) dbg_out(__VA_ARGS__);
#else
#define dbg(...)
#endif

mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
set<int> s;
int main() {
    cin.tie(0)->sync_with_stdio(0);
    int t; cin >> t;
    int a[t];
    for(int i = 0; i<t; i++){
cin >> a[i];
}
    while (t--) {
        int n = a[i];
        rep(i, 0, 2*n) {
            int x; cin >> x;
            s.insert(x);
        }
        dbg(n, sz(s));
        if (sz(s) <= n) cout << "Qingyu" << nl;
        else cout << "Kevin" << nl;
    }
}

Details

answer.code: In function ‘int main()’:
answer.code:39:19: error: ‘i’ was not declared in this scope
   39 |         int n = a[i];
      |                   ^