QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#60970 | #3525. Move & Meet | abdelrahman001# | WA | 2ms | 3428kb | C++20 | 651b | 2022-11-08 23:19:22 | 2022-11-08 23:19:24 |
Judging History
answer
#pragma GCC optimize ("O3")
#pragma GCC optimize ("unroll-loops")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
typedef long long ll;
typedef long double ld;
using namespace std;
const int N = 1e5 + 5;
ll x, y, d1, a, b, d2;
int main() {
ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
cin >> x >> y >> d1 >> a >> b >> d2;
if(((x + y + d1) & 1) != ((a + b + d2) & 1))
return cout << "impossible", 0;
if(x < a) {
d2 -= a - x;
} else {
d2 -= x - a;
}
if(y < b) {
b -= d2;
} else {
b += d2;
}
cout << x << " " << b;
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3304kb
input:
-1 -2 0 1 2 6
output:
-1 -2
result:
ok
Test #2:
score: 0
Accepted
time: 1ms
memory: 3304kb
input:
1 -2 5 -3 3 8
output:
1 -1
result:
ok
Test #3:
score: 0
Accepted
time: 2ms
memory: 3428kb
input:
0 -1000000000000 0 0 -1000000000000 0
output:
0 -1000000000000
result:
ok
Test #4:
score: 0
Accepted
time: 0ms
memory: 3360kb
input:
-5 -426 932111 83 -870 478692
output:
impossible
result:
ok
Test #5:
score: 0
Accepted
time: 2ms
memory: 3324kb
input:
4 5 6 4 -2 1
output:
4 -1
result:
ok
Test #6:
score: 0
Accepted
time: 0ms
memory: 3308kb
input:
0 0 2 2 2 2
output:
0 2
result:
ok
Test #7:
score: 0
Accepted
time: 2ms
memory: 3392kb
input:
0 0 1000000000000 5 19923 186
output:
0 19742
result:
ok
Test #8:
score: 0
Accepted
time: 0ms
memory: 3424kb
input:
-237700907237 445576550446 594610055595 681973265681 -171560526172 843757392844
output:
impossible
result:
ok
Test #9:
score: -100
Wrong Answer
time: 0ms
memory: 3344kb
input:
-537351556538 -807721987807 690465417691 287415372288 977794499977 17905823179
output:
-537351556538 1784655605624
result:
wrong answer WA: supposed to be impossible, team says otherwise