QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#428050 | #8777. Passport Stamps | ucup-team3548# | WA | 0ms | 3524kb | C++17 | 429b | 2024-06-01 17:10:53 | 2024-06-01 17:10:54 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
using ll = __int128_t;
int main() {
int n, p;
cin >> n >> p;
ll pre = 0;
int ans = 0;
for (int i = 1; i <= n; ++i) {
long long _c; cin >> _c;
ll c = _c;
if (p - (pre + (c - 1) * (i - 1)) >= c) {
ans = i;
} else {
break;
}
pre += c;
}
cout << ans;
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3508kb
input:
5 15 1 2 3 4 5
output:
3
result:
ok single line: '3'
Test #2:
score: -100
Wrong Answer
time: 0ms
memory: 3524kb
input:
100000 559309580160692839 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
100000
result:
wrong answer 1st lines differ - expected: '84437', found: '100000'