QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#752288 | #8132. Freshman's Dream | ucup-team3646 | WA | 0ms | 3576kb | C++20 | 1.1kb | 2024-11-15 23:53:19 | 2024-11-15 23:53:20 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (ll i = 0; i < n; i++)
#define rep2(i, l, r) for (ll i = l; i < r; i++)
using vi = vector<int>;
using vvi = vector<vi>;
using vll = vector<ll>;
/* ---- */
#define all(A) A.begin(), A.end()
#define elif else if
using pii = pair<ll, ll>;
bool chmin(auto &a, const auto &b) { return a > b ? a = b, 1 : 0; }
bool chmax(auto &a, const auto &b) { return a < b ? a = b, 1 : 0; }
struct IOSetup {
IOSetup() {
cin.tie(0);
ios::sync_with_stdio(0);
}
} iosetup;
template <class T>
void print(vector<T> a) {
for (auto x : a) cerr << x << ' ';
cerr << endl;
}
void print(auto x) { cerr << x << endl; }
template <class Head, class... Tail>
void print(Head &&head, Tail &&...tail) {
cerr << head << ' ';
print(forward<Tail>(tail)...);
}
void solve(){
ll n;
cin>>n;
if(n&1)cout<<-1<<endl;
else{
ll a=n/2;
ll b=n^a;
cout<<a<<" "<<b<<endl;
}
}
int main(){
int T;
cin>>T;
rep(i,T)solve();
}
詳細信息
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3576kb
input:
5 2 3 6 10 18
output:
1 3 -1 3 5 5 15 9 27
result:
wrong answer sides not equal