# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
541769 | AdamGS | Let's Win the Election (JOI22_ho_t3) | C++17 | 1650 ms | 4408 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define rep(a, b) for(int a = 0; a < (b); ++a)
#define st first
#define nd second
#define pb push_back
#define all(a) a.begin(), a.end()
const int LIM=507;
const ld INF=1e9+7;
pair<int,int>T[LIM];
ld dp[LIM][LIM];
int n, k;
ld solve(int m) {
rep(i, n+1) rep(j, k+1) dp[i][j]=INF;
dp[0][0]=0;
for(int i=1; i<=n; ++i) {
for(int j=0; j<=i; ++j) {
int l=min(i-j, m);
if(j) {
ld x=T[i-1].nd; x/=m+1;
dp[i][j]=min(dp[i][j], dp[i-1][j-1]+x);
}
if(j<i) {
ld x=T[i-1].st; x/=l;
dp[i][j]=min(dp[i][j], dp[i-1][j]+x);
if(i-j>m) {
dp[i][j]=min(dp[i][j], dp[i-1][j]);
}
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |