QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#225303 | #6812. Draw a triangle | ucup-team059# | WA | 14ms | 3680kb | C++20 | 630b | 2023-10-24 14:10:41 | 2023-10-24 14:10:41 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
void solve() {
int ax, bx, ay, by;
cin >> ax >> ay >> bx >> by;
if (ax == bx) {
cout << ax + 1 << " " << ay << "\n";
} else if (ay == by) {
cout << ax << " " << ay + 1 << "\n";
} else {
if (abs(ax - bx) < abs(ay - by)) {
cout << ax << " " << ay + 1 << "\n";
} else {
cout << ax + 1 << " " << ay << "\n";
}
}
return;
}
int32_t main() {
ios::sync_with_stdio(false), cin.tie(nullptr);
int TC;
for (cin >> TC; TC; TC--)
solve();
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3680kb
input:
3 1 0 1 4 0 1 0 9 0 0 2 2
output:
2 0 1 1 1 0
result:
ok T=3 (3 test cases)
Test #2:
score: -100
Wrong Answer
time: 14ms
memory: 3612kb
input:
50000 66620473 -33485015 66620223 -33485265 43307886 98029243 43307636 98028994 -88895230 -3180782 -88895480 -3181030 -90319745 20018595 -90319995 20018348 -56783257 84789686 -56783507 84789440 -81798038 90629147 -81798288 90628902 98942945 -939146 98942695 -939390 -42532151 -57203475 -42532401 -572...
output:
66620474 -33485015 43307887 98029243 -88895229 -3180782 -90319744 20018595 -56783256 84789686 -81798037 90629147 98942946 -939146 -42532150 -57203475 53500208 -30665605 27115055 46989134 -2657411 26865463 40614183 17923420 -47649903 96037711 92954296 -64534918 86508866 -51415166 -82017699 17392574 7...
result:
wrong answer wa on query #2 (test case 2)