QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#292514 | #7120. Soccer | hypeskynick | Compile Error | / | / | C++14 | 697b | 2023-12-28 06:42:34 | 2024-04-28 08:08:41 |
Judging History
你现在查看的是最新测评结果
- [2024-04-28 08:08:41]
- 管理员手动重测本题所有提交记录
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2023-12-28 06:42:35]
- 评测
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2023-12-28 06:42:34]
- 提交
answer
#include <iostream>
int biggest_stadium(int N, std::vector<std::vector<int>> C)
{
int X = -1, Y = -1;
bool run = true;
for (int i = 0; i < N && run; ++i)
{
for (int j = 0; j < N && run; ++j)
{
if (1 == C[i][j])
{
X = i;
Y = j;
run = false;
}
}
}
if (X == -1)
{
return N * N;
}
int ans = 0;
auto check = [&](int x, int y)
{
ans = std::max(ans, (x + y) * N - x * y);
};
check(X, Y);
check(N - 1 - X, Y);
check(N - 1 - X, N - 1 - Y);
check(X, N - 1 - Y);
return ans;
}
详细
answer.code:2:33: error: ‘std::vector’ has not been declared 2 | int biggest_stadium(int N, std::vector<std::vector<int>> C) | ^~~~~~ answer.code:2:39: error: expected ‘,’ or ‘...’ before ‘<’ token 2 | int biggest_stadium(int N, std::vector<std::vector<int>> C) | ^ answer.code: In function ‘int biggest_stadium(int, int)’: answer.code:10:22: error: ‘C’ was not declared in this scope 10 | if (1 == C[i][j]) | ^