QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#325595 | #5591. Fading Wind | thanhha1210 | WA | 0ms | 3656kb | C++17 | 510b | 2024-02-11 17:37:11 | 2024-02-11 17:37:12 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
int main() {
int h, k, v, s, res;
cin >> h >> k >> v >> s;
while (h > 0) {
v+= s;
v-= max(1, v / 10);
if (v >= k)
h++;
if (0 < v < k) {
h--;
if (h == 0)
v = 0;
}
if (v <= 0) {
h = 0;
v = 0;
}
res+= v;
if (s > 0)
s--;
}
cout << res << endl;
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3656kb
input:
1 1 1 1
output:
1299497953
result:
wrong answer 1st lines differ - expected: '1', found: '1299497953'