Submission #866573

#TimeUsernameProblemLanguageResultExecution timeMemory
866573willychanBroken Device 2 (JOI22_device2)C++17
80 / 100
75 ms4032 KiB
#include "Anna.h" #include <utility> #include <vector> using namespace std; namespace { } int Declare() { return 180; } std::pair<std::vector<int>, std::vector<int> > Anna(long long A) { vector<int> X; vector<int> Y; for(int i=0;i<60;i++){ for(int k=0;k<3;k++){ if((A>>i)&1) X.push_back(1); else X.push_back(0); } } for(int i=1;i<=180;i++){ if(i&1) Y.push_back(1); else Y.push_back(0); } return make_pair(X, Y); }
#include "Bruno.h" #include <utility> #include <vector> #include<iostream> using namespace std; long long Bruno(std::vector<int> u) { int a = 0; vector<int> ans; ans.push_back(0); long long A = 0; long long p = 1; for(auto i : u){ if(i==0) a--; else a++; if(a==3){//mod 3 ==0 A+=p; p<<=1; a-=3; } if(a==-2){//mod 3 == 1 p<<=1; a+=3; } } return A; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...