QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#302786 | #5038. City | Ycfhnnd | WA | 0ms | 3588kb | C++20 | 696b | 2024-01-11 12:51:43 | 2024-01-11 12:51:43 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
using i64 = long long;
void solve() {
int n, m;
cin >> n >> m;
i64 ans = 0;
for (int i = 0;i <= n;i ++){
for (int j = 0;j <= m;j ++){
if (i == 0 || j == 0) continue;
int x = i * 2, y = j * 2;
if (x > n || y > m) continue;
if (x == 0 || y == 0) ans += (n - x + 1) * (m - y + 1);
else ans += 2LL * (n - x + 1) * (m - y + 1);
}
}
cout << ans << "\n";
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int T = 1;
// cin >> T;
while (T--) {
solve();
}
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3520kb
input:
1 1
output:
0
result:
ok 1 number(s): "0"
Test #2:
score: -100
Wrong Answer
time: 0ms
memory: 3588kb
input:
2 3
output:
4
result:
wrong answer 1st numbers differ - expected: '14', found: '4'