QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#154392 | #7120. Soccer | skip2004# | 0 | 0ms | 4064kb | C++17 | 1.4kb | 2023-08-31 17:24:37 | 2024-04-28 06:33:54 |
Judging History
answer
#include "soccer.h"
#include <cassert>
#include <cstdio>
#include <algorithm>
#include <vector>
const int N = 2005;
int up[N][N], down[N][N];
void clear(int x) {
for(int i = 0;i < N;++i)
for(int j = 0;j < N;++j) {
up[i][j] = 0;
down[i][j] = 0;
}
}
int dp[N];
struct rmq {
std::vector<int> st[12];
rmq(const std::vector<int> & v) {
st[0] = v;
for(int i = 1;(1 << i) - 1 < (int) v.size();++i) {
st[i].resize(v.size() - (1 << i) + 1);
for(int j = 0;j + (1 << i) - 1 < (int) v.size();++j) {
st[i][j] = std::min(st[i - 1][j], st[i - 1][j + (1 << (i - 1))]);
}
}
}
int qry(int l, int r) {
const int lg = std::__lg(r - l + 1);
return std::min(st[lg][l], st[lg][r - (1 << lg) + 1]);
}
};
int biggest_stadium(int N, std::vector<std::vector<int>> F) {
int px = 0, py = 0;
for(int i = 0;i < N;++i)
for(int j = 0;j < N;++j)
if(F[i][j]) px = i, py = j;
return N * N - std::min(px + 1, N - px) * std::min(py + 1, N - py);
}
#ifdef zqj
int main() {
freopen("1.in", "r", stdin);
int N;
assert(1 == scanf("%d", &N));
std::vector<std::vector<int>> F(N, std::vector<int>(N));
for (int i = 0; i < N; i++)
{
for (int j = 0; j < N; j++)
{
assert(1 == scanf("%d", &F[i][j]));
}
}
fclose(stdin);
int res = biggest_stadium(N, F);
printf("%d\n", res);
fclose(stdout);
return 0;
}
#endif
详细
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 4044kb
input:
R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L 1 0
output:
xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0 OK 0
result:
wrong answer wrong
Subtask #2:
score: 0
Wrong Answer
Test #10:
score: 2
Acceptable Answer
time: 0ms
memory: 3760kb
input:
R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L 3 0 0 0 0 1 0 0 1 1
output:
xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0 OK 8
result:
points 0.250 partial
Test #11:
score: 2
Acceptable Answer
time: 0ms
memory: 3768kb
input:
R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L 3 0 0 0 0 1 1 0 0 1
output:
xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0 OK 8
result:
points 0.250 partial
Test #12:
score: 2
Acceptable Answer
time: 0ms
memory: 4064kb
input:
R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L 3 0 0 1 0 0 0 1 1 0
output:
xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0 OK 7
result:
points 0.250 partial
Test #13:
score: 2
Acceptable Answer
time: 0ms
memory: 3788kb
input:
R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L 3 1 0 0 1 0 1 0 0 1
output:
xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0 OK 8
result:
points 0.250 partial
Test #14:
score: 2
Acceptable Answer
time: 0ms
memory: 4048kb
input:
R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L 3 0 0 1 0 0 0 1 0 0
output:
xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0 OK 8
result:
points 0.250 partial
Test #15:
score: 8
Accepted
time: 0ms
memory: 3764kb
input:
R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L 3 0 0 1 0 0 1 0 0 0
output:
xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0 OK 7
result:
ok ok
Test #16:
score: 0
Wrong Answer
time: 0ms
memory: 3788kb
input:
R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L 3 0 0 0 0 0 0 0 0 0
output:
xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0 OK 8
result:
wrong answer wrong
Subtask #3:
score: 0
Skipped
Dependency #2:
0%
Subtask #4:
score: 0
Skipped
Dependency #3:
0%
Subtask #5:
score: 0
Skipped
Dependency #4:
0%
Subtask #6:
score: 0
Skipped
Dependency #1:
0%