QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#526311 | #8774. Manhattan Walk | megumi# | WA | 0ms | 3532kb | C++14 | 585b | 2024-08-21 13:17:12 | 2024-08-21 13:17:12 |
Judging History
answer
#include <algorithm>
#include <bits/stdc++.h>
using namespace std;
#define int long long
const int mod = 998244353;
inline int read() {
int x = 0, f = 1;
char c = getchar();
while (c < '0' || c > '9')
f = (c == '-') ? -1 : 1, c = getchar();
while (c >= '0' && c <= '9')
x = x * 10 + c - 48, c = getchar();
return f * x;
}
signed main() {
int n = read(), p = read(), ans = 0;
for (int i = 1; i <= n; i++) {
int x = read();
if (p / x <= ans)
cout << i - 1, exit(0);
ans += x;
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3532kb
input:
2 3 8
output:
0
result:
wrong answer 1st numbers differ - expected: '2.8750000', found: '0.0000000', error = '1.0000000'