Submission #1208431

#TimeUsernameProblemLanguageResultExecution timeMemory
1208431siewjhBroken Device 2 (JOI22_device2)C++20
0 / 100
44 ms3944 KiB
#include "Anna.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; namespace { int variable_example = 0; } int Declare() { return 300; } pair<vector<int>, vector<int>> Anna(ll A) { vector<int> X, Y; for (int i = 0; i < 60; i++){ int v = (A & (1ll << i)) != 0; for (int k = 0; k < 5; k++) X.push_back(v); } for (int i = 0; i < 300; i++) Y.push_back(i & 1); return {X, Y}; }
#include "Bruno.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; namespace { int variable_example = 0; } ll Bruno(vector<int> u) { vector<int> rem; for (int i = 0, alt = 0; i < 600; i++){ if (alt < 300){ if (u[i] == alt & 1) alt++; else rem.push_back(u[i]); } else rem.push_back(u[i]); } int st = 0, v = rem[0]; ll ans = 0, bit = 0; for (int i = 0; i < 300; i++){ if (i == 299 || rem[i + 1] != v){ int sz = i - st + 1; int amt = (sz + 2) / 5; for (int k = 0; k < amt; k++, bit++) ans += v * (1ll << bit); st = i + 1; v = rem[i + 1]; } } }

Compilation message (stderr)

# 2번째 컴파일 단계

Bruno.cpp: In function 'll Bruno(std::vector<int>)':
Bruno.cpp:31:1: warning: no return statement in function returning non-void [-Wreturn-type]
   31 | }
      | ^
#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...