Submission #134109

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
1341092019-07-22 05:38:38imeimi2000Popeala (CEOI16_popeala)C++17
100 / 100
1044 ms16632 KiB
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
typedef long long llong;
const llong inf = 1e18;
int n, t, s;
int P[20001];
llong dp[51][20001];
struct dq {
int bt, tp;
llong val[20001];
int idx[20001];
void init() {
bt = tp = 0;
}
void push(int i, llong v) {
while (bt < tp && val[tp - 1] > v) --tp;
val[tp] = v;
idx[tp] = i;
++tp;
}
void pop(int i) {
if (bt < tp && idx[bt] == i) ++bt;
}
llong get() const {
if (bt < tp) return val[bt];
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

popeala.cpp: In function 'int main()':
popeala.cpp:46:46: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
     for (int i = 1; i <= n; ++i) cin >> R[i] + 1;
                                         ~~~~~^~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...