Submission #572460

#TimeUsernameProblemLanguageResultExecution timeMemory
572460jamezzzBroken Device 2 (JOI22_device2)C++17
80 / 100
82 ms3568 KiB
#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 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...