# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
478887 | Neacsu_Mihai | Floppy (RMI20_floppy) | C++14 | 89 ms | 14212 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 <iostream>
#include <stack>
#include <vector>
#include "floppy.h"
#define LOGMAX 17 //2 ^ 17 < NMAX, 2 ^ 18 > NMAX
#define NMAX 200000 //doua sute de mii
using namespace std;
int RMQ[LOGMAX + 1][NMAX + 1];
int stanga[NMAX + 1];
int log[NMAX + 1];
void read_array(int subtask_id, const vector<int> &v){
int N = v.size();
int k = 0;
stack <int> st;
string bits;
for(int i = 0; i < N; i++){
while(!st.empty() && v[i] > v[st.top()]){
bits.push_back('0');
st.pop();
}
bits.push_back('1');
st.push(i);
}
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... |