Submission #921558

#TimeUsernameProblemLanguageResultExecution timeMemory
921558Darren0724Shopping (JOI21_shopping)C++17
1 / 100
49 ms4516 KiB
#include "Anna.h" #include <bits/stdc++.h> using namespace std; namespace { int n, l, r; int cnt=0; const int INF=1e9; vector<int> v; } // namespace void InitA(int N, int L, int R) { n = N; l = L; r = R; v.resize(n); } void ReceiveA(bool x) { int x1=x; int p=cnt/10; int p1=cnt%10; v[p]+=(x1<<p1); cnt++; } int Answer() { int ans=l; for(int i=l+1;i<=r;i++){ ans=(v[ans]<v[i]?ans:i); } return ans; }
#include "Bruno.h" #include <bits/stdc++.h> using namespace std; namespace { int n; vector<int> v(1000000); int count; } // namespace void InitB(int N, vector<int> P) { v=P; n=N; for(int i=0;i<N;i++){ for(int j=0;j<10;j++){ SendB((v[i]>>j)&1); } } } void ReceiveB(bool y) { }

Compilation message (stderr)

Bruno.cpp:9:5: warning: '{anonymous}::count' defined but not used [-Wunused-variable]
    9 | int count;
      |     ^~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...