QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#60969 | #3525. Move & Meet | abdelrahman001# | WA | 2ms | 3304kb | C++20 | 647b | 2022-11-08 23:18:25 | 2022-11-08 23:18:27 |
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) % 2 != (a + b + d2) % 2)
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: 0
Wrong Answer
time: 2ms
memory: 3304kb
input:
-1 -2 0 1 2 6
output:
impossible
result:
wrong output format Expected integer, but "impossible" found