QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#577483 | #9308. World Cup | FakeDuck | Compile Error | / | / | C++20 | 925b | 2024-09-20 11:49:04 | 2024-09-20 11:49:05 |
Judging History
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();
}
}
详细
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