QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#567199#9308. World CupLnianCompile Error//C++201.2kb2024-09-16 09:56:422024-09-16 09:56:43

Judging History

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

  • [2024-09-16 09:56:43]
  • 评测
  • [2024-09-16 09:56:42]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;

using i64 = long long;
using i128 = __int128;
using ull = unsigned long long;
#define pll pair<ll, ll>
#define pii pair<int, int>
#define vi vector<int>
#define fir(i, a, b) for (int i = a; i <= b; i++)
#define pqi priority_queue<int> // 优先队列

#define all(x) x.begin(), x.end()
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define int long long
signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);

    int t;
    cin >> t;
    while (t--)
    {
        vector<int> a(32);
        for (int i = 0; i < 32; i++)
        {
            cin >> a[i];
        }
        sort(all(a));

        int res = 1;
        for (int i = 1; i < 32; i++)
        {
            if (a[0] > a[i])
                res++;
        }

        if (p <= 2)
            cout << 32 << "\n";
        else if (p <= 6)
            cout << 16 << "\n";
        else if (p <= 13)
            cout << 8 << "\n";
        else if (p <= 27)
            cout << 4 << "\n";
        else if (p <= 31)
            cout << 2 << "\n";
        else
            cout << 1 << "\n";
    }
    return 0;
}

Details

answer.code: In function ‘int main()’:
answer.code:43:13: error: ‘p’ was not declared in this scope
   43 |         if (p <= 2)
      |             ^