QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#656823 | #6812. Draw a triangle | potential | WA | 18ms | 3672kb | C++20 | 1.2kb | 2024-10-19 13:45:12 | 2024-10-19 13:45:15 |
Judging History
answer
# include <bits/stdc++.h>
using namespace std;
# define IOS ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
# define int long long
# define lowbit(x) (x & (-x))
# define fi first
# define se second
# define all(x) x.begin(), x.end()
// # define endl '\n'
inline int Read();
typedef pair<int, int> PII;
const int INF = 0x3f3f3f3f;
const int MOD = 998244353;
const int N = 1e6 + 10;
map <int, int> mp;
vector <int> v;
void Solve(){
int x, y, a, b;
cin >> x >> y >> a >> b;
int xx = abs(x - a);
int yy = abs(y - b);
if(xx == 0){
cout << x - 1 <<" " << y <<"\n";
return;
}
if(yy == 0){
cout << x <<" " << y + 1 <<"\n";
return;
}
if(xx <= yy){
cout << x - 1 <<" " << y <<"\n";
}else{
cout << x <<" " << y + 1 <<"\n";
}
}
signed main(){
IOS;
int T = 1;
cin >> T;
while (T--)
Solve();
return 0;
}
inline int Read(){
int x = 0, f = 1; char c = getchar();
while (c < '0' || c > '9'){ if (c == '-') f = -1; c = getchar();}
while (c >= '0' && c <= '9') x = x * 10 + c - '0', c = getchar();
return x * f;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3672kb
input:
3 1 0 1 4 0 1 0 9 0 0 2 2
output:
0 0 -1 1 -1 0
result:
ok T=3 (3 test cases)
Test #2:
score: -100
Wrong Answer
time: 18ms
memory: 3600kb
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:
66620472 -33485015 43307886 98029244 -88895230 -3180781 -90319745 20018596 -56783257 84789687 -81798038 90629148 98942945 -939145 -42532151 -57203474 53500207 -30665604 27115054 46989135 -2657412 26865464 40614182 17923421 -47649904 96037712 92954295 -64534917 86508865 -51415165 -82017700 17392575 7...
result:
wrong answer wa on query #2 (test case 2)