QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#60971#3525. Move & Meetabdelrahman001#WA 3ms3420kbC++20729b2022-11-08 23:25:112022-11-08 23:25:13

Judging History

This is the latest submission verdict.

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2022-11-08 23:25:13]
  • Judged
  • Verdict: WA
  • Time: 3ms
  • Memory: 3420kb
  • [2022-11-08 23:25:11]
  • Submitted

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(abs(x - a) + abs(y - b) > d1 + d2)
		return cout << "impossible", 0;
    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;
}


详细

Test #1:

score: 100
Accepted
time: 2ms
memory: 3308kb

input:

-1 -2 0
1 2 6

output:

-1 -2

result:

ok 

Test #2:

score: 0
Accepted
time: 2ms
memory: 3304kb

input:

1 -2 5
-3 3 8

output:

1 -1

result:

ok 

Test #3:

score: 0
Accepted
time: 1ms
memory: 3420kb

input:

0 -1000000000000 0
0 -1000000000000 0

output:

0 -1000000000000

result:

ok 

Test #4:

score: 0
Accepted
time: 2ms
memory: 3332kb

input:

-5 -426 932111
83 -870 478692

output:

impossible

result:

ok 

Test #5:

score: 0
Accepted
time: 1ms
memory: 3304kb

input:

4 5 6
4 -2 1

output:

4 -1

result:

ok 

Test #6:

score: 0
Accepted
time: 2ms
memory: 3240kb

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: 2ms
memory: 3324kb

input:

-237700907237 445576550446 594610055595
681973265681 -171560526172 843757392844

output:

impossible

result:

ok 

Test #9:

score: 0
Accepted
time: 1ms
memory: 3364kb

input:

-537351556538 -807721987807 690465417691
287415372288 977794499977 17905823179

output:

impossible

result:

ok 

Test #10:

score: 0
Accepted
time: 2ms
memory: 3240kb

input:

30 40 100000
-120 1 100

output:

impossible

result:

ok 

Test #11:

score: 0
Accepted
time: 3ms
memory: 3392kb

input:

267127854709 343405973674 26161892148
381294549365 370274347369 145141827064

output:

impossible

result:

ok 

Test #12:

score: 0
Accepted
time: 2ms
memory: 3304kb

input:

-31878165543 682414817093 568347503685
70100797810 257224740065 112811330402

output:

-31878165543 268057107114

result:

ok 

Test #13:

score: -100
Wrong Answer
time: 2ms
memory: 3392kb

input:

387193259973 268407387361 274058113004
486675093266 437040007372 635497639980

output:

387193259973 -98975799315

result:

wrong answer WA: bad coordinates