QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#325928 | #5590. Exponent Exchange | anpans# | WA | 0ms | 3596kb | C++14 | 427b | 2024-02-12 04:39:24 | 2024-02-12 04:39:24 |
Judging History
answer
#include <iostream>
#include <vector>
#include <algorithm>
#include <cstdio>
using namespace std;
int b, p, x;
int main() {
cin >> b >> p;
int min = 0;
while (p-- > 0) {
cin >> x;
if (p == 0) {
if (x > b / 2) min += b - x;
} else
if (x > (b - 1) / 2) min += b - 1 - x;
else min += x;
}
cout << min / 2 +1 << endl;
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3596kb
input:
10 5 4 2 7 8 6
output:
7
result:
ok single line: '7'
Test #2:
score: -100
Wrong Answer
time: 0ms
memory: 3472kb
input:
2 100 1 1 1 1 0 0 1 1 1 0 1 1 1 0 0 1 0 0 1 0 0 1 1 1 0 1 1 0 1 1 1 1 0 1 0 0 1 0 1 0 1 0 1 0 1 0 1 0 0 1 0 1 0 1 0 1 1 0 1 0 0 1 1 0 1 0 0 0 1 0 1 0 1 0 0 1 1 0 0 0 0 1 0 1 1 1 1 0 1 1 0 1 1 0 0 0 0 1 1 1
output:
1
result:
wrong answer 1st lines differ - expected: '19', found: '1'