# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
398476 | model_code | The short shank; Redemption (BOI21_prison) | C++17 | 632 ms | 213652 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;
typedef pair<int,int> pii;
int main()
{
int N, D, T; scanf("%d %d %d", &N, &D, &T);
int last_rebel = -1;
int num_rebels = 0;
vector<int> inactive(N, -1);
vector<int> times(N);
vector<int> next;
stack<pii> S;
for(int i = 0; i < N; ++i)
{
int t; scanf("%d", &t);
times[i] = t;
last_rebel = max(last_rebel, i + T - t);
if(not S.empty()) S.top().second = max(S.top().second, i + T - t);
if(t > T and last_rebel >= i)
{
int last_rebel_internal = -1;
++num_rebels;
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |