Submission #643080

#TimeUsernameProblemLanguageResultExecution timeMemory
643080cologneBroken Device 2 (JOI22_device2)C++17
10 / 100
732 ms524288 KiB
#include "Anna.h" #include <bits/stdc++.h> using namespace std; int Declare() { return 2000; } pair<vector<int>, vector<int>> Anna(long long A) { --A; for (int i = 1; i <= 2000; i++) { if (A >= 2 * i + 1) A -= 2 * i + 1; else { vector<int> L(2 * i, 0); fill(L.begin(), L.begin() + A, 1); return {vector<int>(L.begin(), L.begin() + i), vector<int>(L.begin() + i, L.end())}; } } }
#include "Bruno.h" #include <bits/stdc++.h> using namespace std; long long Bruno(vector<int> u) { int ans = 1; for (int i = 1; i < (int)u.size() / 2; i++) ans += 2 * i + 1; for (int x : u) ans += x; return ans; }

Compilation message (stderr)

Anna.cpp: In function 'std::pair<std::vector<int>, std::vector<int> > Anna(long long int)':
Anna.cpp:25:1: warning: control reaches end of non-void function [-Wreturn-type]
   25 | }
      | ^
#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...