This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "Anna.h"
#include <bits/stdc++.h>
using namespace std;
int Declare() {
    return 180;
}
pair<vector<int>, vector<int> > Anna(long long x) {
    vector<int> a, b;
    int alt = 1;
    int last = 1;
    for (int i = 0; i < 60; i++) {
        int c = x >> i & 1;
        int num = c == last ? 2 : 3;
        last = c;
        while (num--) {
            a.push_back(c);
            b.push_back(alt);
            alt ^= 1;
        }
    }
    return make_pair(a, b);
}
#include "Bruno.h"
#include <bits/stdc++.h>
using namespace std;
long long Bruno(vector<int> u) {
    long long x = 0;
    int sum = 0;
    int mag = 0;
    for (int b : u) {
        sum += b == 0 ? -1 : +1;
        if (sum == -2) {
            x += 0LL << mag;
            mag++;
            sum = 0;
        }
        if (sum == +2) {
            x += 1LL << mag;
            mag++;
            sum = 0;
        }
    }
    return x;
}
| # | Verdict | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict | Execution time | Memory | Grader output | 
|---|
| Fetching results... |