题解(iOS加速版)
2026-02-25 15:48:21
发布于:广东
3阅读
0回复
0点赞
哈哈哈哈哈!(发癫ing)
| 难度 | 4 |
|---|---|
| 复杂度 | 5 |
| 上代码! |
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n;
cin >> n;
while (n--) {
long long score, target, time_limit, run_time;
cin >> score >> target >> time_limit >> run_time;
// Step 1: 规约 score —— 关键:防止 score=0 时死循环(虽题中 target>0,但健壮性!)
while (score > target && score > 0) {
score /= 10;
}
// Step 2: 三级判定(严格优先级!)
if (run_time > time_limit) {
cout << "Time Limit Exceeded\n";
} else if (score < target) {
cout << "Wrong Answer\n";
} else { // score == target (因规约后 score <= target,且不小于,故必等于)
cout << "Accepted\n";
}
}
return 0;
}
//YC:ALPHA-1红右手特遣队
这里空空如也







有帮助,赞一个