# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
22976 | Bruteforceman | 구경하기 (JOI13_watching) | C++11 | 296 ms | 21332 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
int N, P, Q;
int a[2222];
int big[2222];
int tiny[2222];
int search(int b, int e, int val) {
if(b == e) {
return b;
}
int m = (b + e) >> 1;
if(val < a[m]) return search(b, m, val);
else return search(m + 1, e, val);
}
const int inf = 1e8;
int dp[2222][2222];
bool good(int w) {
for(int i = 1; i <= N; i++) {
tiny[i] = search(1, N, a[i] - w) - 1;
big[i] = search(1, N, a[i] - w - w) - 1;
}
for(int i = 1; i <= N; i++) {
for(int j = 0; j <= P; j++) {
dp[i][j] = inf;
if(j) dp[i][j] = min(dp[i][j], dp[tiny[i]][j - 1]);
dp[i][j] = min(dp[i][j], dp[big[i]][j] + 1);
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |