#include "Anna.h"
#include <bits/stdc++.h>
typedef long long ll;
namespace {
int variable_example = 0;
}
int Declare() {
  variable_example++;
  return 180;
}
std::pair<std::vector<int>, std::vector<int> > Anna(ll A) {
  //Encode 
  int L = 60;
  std::vector<int> X;
  std::vector<int> Y;
  for(int i = 0; i < 3*L; i++){
    X.push_back((i+1)%2);
  }
  // std::cerr << "Anna:\n";
  for(ll bt = (1LL<<(L-1)); bt > 0; bt >>=1){
    // std::cerr << ((bt & A) > 0) << ' ';
    Y.push_back((bt & A)>0);
    Y.push_back((bt & A)>0);
    Y.push_back((bt & A)>0);
  }
  // std::cerr << '\n';
  return make_pair(X, Y);
}
// int main(){
//   ll A;
//   std::cin >> A;
//   auto a = Anna(A);
//   for(int it = 0; it < 2; it++){
//     for(int i : a.first) std::cout << i << ' ';
//     std::cout<<'\n';
//     swap(a.first, a.second);
//   }
// }
#include "Bruno.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
namespace {
  int cur = 0;
  int variable_example = 0;
  vector<int> res;
  queue<int> q;
  int req[2] = {-2, 3};
}
long long Bruno(std::vector<int> u) {
  int cur = 0;
  vector<int> res;
  for(int i = 0; i < u.size(); i++){
    cur += 2*u[i]-1;
    //cerr << u[i] << ' ' << cur << ' ';
    if(cur <= req[0] /*+ !(i&1)*/){
      //cerr << "Z ";
      res.push_back(0);
      cur+=3;
    }
    if(cur >= req[1] /*+ !(i&1)*/){
      //cerr << "J ";
      res.push_back(1);
      cur-=3;
    }
    //cerr << '\n';
  }  
  // cerr << '\n';
  // for(int i : res){
  //   cerr << i << ' ';
  // }
  // cerr << '\n';
  ll r = 0;
  for(int bt = 0; bt < res.size(); bt++){
    r |= ll(res[res.size()-1-bt])<<bt;
  }
  // cerr << r << '\n';
  res.clear();
  while(q.size()) q.pop();
  cur=0;
  return r;
}
| # | 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... |