# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
161703 | jovan_b | 구경하기 (JOI13_watching) | C++17 | 264 ms | 16220 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
int n, p, q;
int event[2005];
int dp[2005][2005];
bool check(int w){
int small = 0, large = 0;
for(int i=1; i<=n; i++){
while(event[i]-event[small+1] >= w) small++;
while(event[i]-event[large+1] >= 2*w) large++;
for(int j=0; j<=p; j++){
dp[i][j] = n+5;
if(j) dp[i][j] = min(dp[i][j], dp[small][j-1]);
dp[i][j] = min(dp[i][j], dp[large][j] + 1);
}
}
//if(w == 3) cout << dp[n][p] << " " << q << endl;
return dp[n][p] <= q;
}
int main(){
ios_base::sync_with_stdio(false), cin.tie(0);
cout.precision(10);
cout << fixed;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |