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 A){
vector<int> a,b;
for(int i=0;i<180;++i)a.push_back(1-i%2);
for(int i=0;i<60;++i){
for(int j=0;j<3;++j){
b.push_back((A&(1ll<<i))!=0);
}
}
return make_pair(a,b);
}
#include "Bruno.h"
#include <bits/stdc++.h>
using namespace std;
long long Bruno(vector<int> u){
int cur=0;long long pw=1,ans=0;
for(int i=0;i<u.size();++i){
if(u[i]==1)++cur;
else --cur;
if(cur==3)ans+=pw,pw*=2,cur-=3;
if(cur==-2)pw*=2,cur+=3;
}
return ans;
}
Compilation message (stderr)
Bruno.cpp: In function 'long long int Bruno(std::vector<int>)':
Bruno.cpp:7:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
7 | for(int i=0;i<u.size();++i){
| ~^~~~~~~~~
# | 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... |