Submission #814873

#TimeUsernameProblemLanguageResultExecution timeMemory
814873konstantysBroken Device 2 (JOI22_device2)C++17
80 / 100
88 ms3720 KiB
#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 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...