# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
909481 | MinhAnhnd | Coreputer (IOI23_coreputer) | C++17 | 1 ms | 344 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "coreputer.h"
#include <bits/stdc++.h>
using namespace std;
std::vector<int> cut(int N, std::vector<int> m){
while(!m.empty()&&(*(m.rbegin())>=N)){
m.pop_back();
}
return m;
}
std::vector<int> malfunctioning_cores(int N) {
vector<int> a;
vector<int> larger;
vector<int> smaller;
vector<int> b;
for (int i = 0;i<=N-1;i++){
b.push_back(0);
}
for (int i = 0;i<=min(7,N-1);i++){
a.push_back(i);
}
int half = run_diagnostic(a);
int state = abs(half);
a.clear();
if (half == 1){
for (int i = 0;i<=min(7,N-1);i++){
larger.push_back(i);
}
} else{
for (int i = 8;i<=min(15,N-1);i++){
larger.push_back(i);
}
}
int fourth = run_diagnostic(cut(N,vector<int>(larger.begin(), larger.begin()+4)));
int eight;
int onesix;
int pos;
for (int i = 0;i<=N-1;i++){
b.push_back(0);
}
return b;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |