QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#577483#9308. World CupFakeDuckCompile Error//C++20925b2024-09-20 11:49:042024-09-20 11:49:05

Judging History

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

  • [2024-09-20 11:49:05]
  • 评测
  • [2024-09-20 11:49:04]
  • 提交

answer

#include <bits/stdc++.h>
using ll = long long;

void solve()
{
    std::vector<std::pair<int, int>> a(32);
    for (int i = 0; i < 32; i++)
    {
        std::cin >> a[i].first;
        a[i].second = i;
    }
    std::sort(a.begin(), a.end());
    for (int i = 0; i < 32; i++)
    {
        if (a[i].second == 0)
        {
            if (i < 1)
                std::cout << 1 << '\n';
            else if (i < 5)
                std::cout << 2 << '\n';
            else if (i < 19)
                std::cout << 4 << '\n';
            else if (i < 28)
                std::cout << 8 << '\n';
            else if (i < 30)
                std::cout << 16 << '\n';
            else
                std::cout << 32 << '\n';
        }
    }
}
int mian()
{
    std::ios::sync_with_stdio(0);
    std::cin.tie(0);

    int t;
    std::cin >> t;
    while (t--)
    {
        solve();
    }
}

Details

answer.code: In function ‘int mian()’:
answer.code:43:1: warning: no return statement in function returning non-void [-Wreturn-type]
   43 | }
      | ^
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x24): undefined reference to `main'
collect2: error: ld returned 1 exit status