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 <utility>
#include <vector>
#include<iostream>
using namespace std;
namespace {
int variable_example = 0;
}
int Declare() {
variable_example++;
return 180;
}
std::pair<std::vector<int>, std::vector<int> > Anna(long long A) {
//cerr<<A<<"\n";
vector<int> v1;
vector<int> v2;
for(int i=0;i<60;i++){
if((1LL<<i)&A){
v1.push_back(1);
v1.push_back(1);
v1.push_back(1);
}else{
v1.push_back(0);
v1.push_back(0);
v1.push_back(0);
}
v2.push_back(i&1);
v2.push_back((i^1)&1);
v2.push_back(i&1);
}
return {v1,v2};
}
#include "Bruno.h"
#include <utility>
#include <vector>
#include<iostream>
#define ll long long
using namespace std;
namespace {
int variable_example = 0;
}
long long Bruno(std::vector<int> u) {
ll it=1,z=0,j=0,wyn=0;
for(auto i:u){
// cerr<<i<<" ";
if(i==0) z++; else j++;
if(z>=j+3){
z-=3;
it<<=1;
// cerr<<" nowe zero ";
}
if(j>=z+2){
j-=3;
wyn|=it;
it<<=1;
// cerr<<" nowe jeden ";
}
}
//cerr<<wyn<<"\n";
return wyn;
}
Compilation message (stderr)
Bruno.cpp:9:5: warning: '{anonymous}::variable_example' defined but not used [-Wunused-variable]
9 | int variable_example = 0;
| ^~~~~~~~~~~~~~~~
# | 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... |