# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
401696 | rama_pang | Floppy (RMI20_floppy) | C++17 | 143 ms | 11156 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 <bits/stdc++.h>
using namespace std;
#include "floppy.h"
void read_array(int subtask_id, const vector<int> &v) {
string save;
vector<int> st;
for (int i = 0; i < int(v.size()); i++) {
while (!st.empty() && v[st.back()] <= v[i]) {
st.pop_back();
save.push_back('0');
}
st.emplace_back(i);
save.push_back('1');
}
while (!st.empty()) {
st.pop_back();
save.push_back('0');
}
assert(save.size() == 2 * v.size());
return save_to_floppy(save);
}
vector<int> solve_queries(int subtask_id, int N,
const string &bits,
const vector<int> &a, const vector<int> &b) {
assert(bits.size() == 2 * N);
vector<int> st;
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... |