# HIIT Open 2016

 Start: 2016-05-28 11:00:00 End: 2016-05-28 16:00:00

CSES - HIIT Open 2016 - Results
History
2016-05-28 15:58:05
2016-05-28 15:54:52
2016-05-28 15:50:38
2016-05-28 15:49:47
 Task: Fixed points Sender: Game of Nolife Submission time: 2016-05-28 15:58:05 Language: C++ Status: READY Result: WRONG ANSWER

## Test results

 test verdict time (s) #1 WRONG ANSWER 0.93 / 2.00 details

## Code

```#include <bits/stdc++.h>
#define F first
#define S second
#define X real()
#define Y imag()
using namespace std;
typedef unsigned long long ll;
typedef long double ld;

ll go(ll x, ll a, ll b, ll i) {
if (i == 64) {
if (((a*x)^b) == x) {
return x;
} else {
return 0;
}
}
if ((((a*x)^b)&((1<<i)-1)) == (x&((1<<i)-1))) {
ll y = go(x, a, b, i + 1);
if (y > 0) {
return y;
} else {
y = go(x + (1 << i), a, b, i + 1);
if (y > 0) {
return y;
} else {
return 0;
}
}
}
return 0;
}

int main(){
ios_base::sync_with_stdio(0);
cin.tie(0);
int t;
cin >> t;
for (int tc = 0; tc < t; tc++) {
ll a, b;
cin >> a >> b;
if (b == 0) {
cout << "0\n";
} else {
ll x = go(0, a, b, 0);
if (x == 0) {
cout << "-\n";
} else {
cout << x << "\n";
}
}
}
}```

## Test details

### Test 1

```100000 12865169357617740396 294321893... 831904078916359713 11466315592... 6921592336775223078 9122334070... 11783514864392029648 731086206... 16038473086596104392 399772886... 11220436795761414158 183636224... 9831208666940590924 6199653141... 3008006406588978734 8542342758... 8806276471340559996 1759810962... 14858934906749697779 623252486... 8887947201929630416 1304485523... 1064862187779621711 1614629992... 175385380115342380 11467901965... 9904210650663368099 2753434509... 7467992903201134853 2563754046... 17012398567278112765 297384557... 2330668681791045455 1083545194... 1289338035848410484 1432702261... 6336351106292187034 1512844704... ...```
```5903494652862419412 - 13008184152928659765 9415006529485574473 16201136572240455608 4275758200857590923 15980002737330675438 122276335941320026 16599195303334207475 - 8258022697473447401 - 16072581248587124502 - - - - 10470899042856771225 11683963684866055538 - ...```
```- - - - - - - - - - - - - - - - - - - - ...```