QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#597666 | #4276. Balls and Holes | cyx | Compile Error | / | / | C++20 | 1.0kb | 2024-09-28 18:22:19 | 2024-09-28 18:22:19 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
int n;
int ans;
vector<int> v[5020];
int main()
{
cin >> n;
for (int i = 1; i <= n; i++)
{
int k;
cin >> k;
while (k--)
{
int x;
cin >> x;
v[i].push_back(x);
}
sort(v[i].begin(), v[i].end());
}
for (int i = 1; i <= n; i++)
{
for (int j = i + 1; j <= n; j++)
{
int x = 0, y = 0;
bool cnt[v[j].size()] = {};
int t = 0;
bool ok = 0;
while (x < v[i].size() && y < v[j].size())
{
if (v[i][x] <= v[j][y])
{
if (!cnt[y])
t++;
cnt[y]++;
x++;
}
else
{
y++;
}
}
ans += t & 1;
}
}
cout << ans << endl;
return 0;
}
詳細信息
answer.code: In function ‘int main()’: answer.code:35:26: error: use of an operand of type ‘bool’ in ‘operator++’ is forbidden in C++17 35 | cnt[y]++; | ~~~~~^