QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#752288#8132. Freshman's Dreamucup-team3646WA 0ms3576kbC++201.1kb2024-11-15 23:53:192024-11-15 23:53:20

Judging History

你现在查看的是最新测评结果

  • [2024-11-15 23:53:20]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3576kb
  • [2024-11-15 23:53:19]
  • 提交

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();
}

Details

Tip: Click on the bar to expand more detailed information

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