QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#465919 | #7277. Bring Down the | shiomusubi496 | 0 | 375ms | 3712kb | C++14 | 869b | 2024-07-07 13:45:26 | 2024-07-07 13:45:26 |
Judging History
answer
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define rep2(i, a, b) for (int i = (int)(a); i < (int)(b); ++i)
#define rrep(i, n) for (int i = (int)(n) - 1; i >= 0; --i)
#define rrep2(i, a, b) for (int i = (int)(b) - 1; i >= (int)(a); --i)
#define all(v) begin(v), end(v)
using namespace std;
using ll = long long;
template<class T, class U> bool chmin(T& a, const U& b) { return a > b ? a = b, true : false; }
template<class T, class U> bool chmax(T& a, const U& b) { return a < b ? a = b, true : false; }
int main() {
ll S; cin >> S;
int Q; cin >> Q;
rep (_, Q) {
ll cH, fH, cG, fG; cin >> cH >> fH >> cG >> fG;
while (cH && cG) {
cG = max(cG - cH, 0ll);
cH = max(cH - cG, 0ll);
}
if (cH) puts("YES");
else puts("NO");
}
}
详细
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3636kb
input:
17 2 42 1 33 1 42 1 33 7
output:
YES YES
result:
wrong answer expected NO, found YES [2nd token]
Subtask #2:
score: 0
Skipped
Dependency #1:
0%
Subtask #3:
score: 0
Wrong Answer
Test #28:
score: 0
Wrong Answer
time: 375ms
memory: 3712kb
input:
1 250000 554333015044 833858497873 833858497874 554333015044 655160857180 306396306924 306396306917 655160857187 374728598365 176680698490 176680698490 374728598365 764650258714 835600427315 835600427309 764650258720 521594231110 318048536486 318048536482 521594231115 273627794040 449769302710 10899...
output:
YES YES YES YES YES YES YES NO YES YES YES YES YES YES YES NO YES YES YES YES YES YES NO YES YES NO NO NO YES YES YES YES YES NO NO YES YES YES YES YES NO YES YES YES NO YES NO YES YES YES YES YES YES YES YES YES NO YES YES NO YES YES NO NO YES YES NO YES YES NO YES NO YES YES YES YES YES YES YES YE...
result:
wrong answer expected NO, found YES [1st token]
Subtask #4:
score: 0
Skipped
Dependency #2:
0%
Subtask #5:
score: 0
Skipped
Dependency #3:
0%
Subtask #6:
score: 0
Skipped
Dependency #1:
0%
Subtask #7:
score: 0
Skipped
Dependency #1:
0%