# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
494365 | jasen_penchev | Floppy (RMI20_floppy) | C++14 | 0 ms | 0 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "floppy.h"
#include <iostream>
#include <utility>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#define endl '\n'
using namespace std;
const int MAXN = 40000;
int deg[MAXN + 5];
int tsort[MAXN + 5];
vector<int> G[MAXN + 5];
pair<int, int> tree[4 * MAXN + 5];
void save_to_floppy(const string &bits);
void read_array(int subtask_id, const vector<int> &v)
{
int n = v.size();
string bits = "";
stack<int> st;
for (int i = 0; i < n; ++ i)
{
while (st.size() and v[st.top()] < v[i])
{
bits += '1';
st.pop();