QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#226633#6812. Draw a triangle326173163qqom#WA 19ms3756kbC++20602b2023-10-26 11:41:262023-10-26 11:41:27

Judging History

你现在查看的是最新测评结果

  • [2023-10-26 11:41:27]
  • 评测
  • 测评结果:WA
  • 用时:19ms
  • 内存:3756kb
  • [2023-10-26 11:41:26]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
int main() {
    int T;
    scanf("%d", &T);
    while(T--) {
        int ax, ay, bx, by;
        scanf("%d%d%d%d", &ax, &ay, &bx, &by);
        if (ax == bx) {
            cout << ax + 1<< ' ' << ay << '\n';
            continue; 
        }
        if (ay == by) {
            cout << ax << ' ' << ay + 1 << '\n';
            continue;
        }
        if (abs(ax - bx) > abs(ay - by)) {
            cout << ax + 1 << ' ' << ay << '\n';
        }
        else {
            cout << ax << ' ' << ay + 1 << '\n';   
        }
    }
}

詳細信息

Test #1:

score: 100
Accepted
time: 0ms
memory: 3756kb

input:

3
1 0 1 4
0 1 0 9
0 0 2 2

output:

2 0
1 1
0 1

result:

ok T=3 (3 test cases)

Test #2:

score: -100
Wrong Answer
time: 19ms
memory: 3684kb

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:

66620473 -33485014
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)