# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
115242 | minhtung0404 | 조교 (CEOI16_popeala) | C++17 | 1313 ms | 7160 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
const int N = 55;
const int inf = 2e9 + 7;
using namespace std;
int n, t, s, sc[20005], dp[N][20005], cur[20005];
string a[N];
deque <int> mq[N];
void Insert(int id, int i, int j){
while (mq[id].size() && dp[i][mq[id].back()] >= dp[i][j]) mq[id].pop_back();
mq[id].push_back(j);
}
void Erase(int id, int i, int j){
if (mq[id].size() && mq[id].front() == j) mq[id].pop_front();
}
int main(){
ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
cin >> n >> t >> s;
for (int i = 1; i <= t; i++) cin >> sc[i], sc[i] += sc[i-1];
for (int i = 1; i <= n; i++) cin >> a[i], a[i] = '.' + a[i];
for (int i = 0; i < N; i++) for (int j = 0; j < 20005; j++) dp[i][j] = inf;
dp[0][0] = 0;
for (int sub = 1; sub <= s; sub++){
for (int j = 0; j <= n; j++) mq[j].clear();
Insert(n, sub-1, 0); cur[0] = n;
for (int test = 1; test <= t; test++){
for (int peo = 1; peo <= n; peo++){
# | 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... |