# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
549711 | cpp219 | Let's Win the Election (JOI22_ho_t3) | C++17 | 692 ms | 3916 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
#define ll long long
#define ld long double
#define fs first
#define sc second
#define debug(y) cout<<y,exit(0)
using namespace std;
typedef pair<ll,ll> LL;
const ll N = 500 + 9;
const ll inf = 1e18 + 7;
ld ans = inf*1.0,dp[N][N];
ll n,k,collab;
LL a[N];
bool lf(LL x,LL y){
return x.sc < y.sc;
}
ld cal(ll mid){
for (ll i = 1;i <= n;i++)
for (ll j = 0;j <= i;j++){
dp[i][j] = inf;
if (i - j - 1 >= mid) dp[i][j] = dp[i - 1][j];
else dp[i][j] = dp[i - 1][j] + (ld)a[i].sc/((ld)i - j);
if (j) dp[i][j] = min(dp[i][j],dp[i - 1][j - 1] + (ld)a[i].fs/((ld)mid + 1));
}
ld tmp = inf;
for (ll i = k - mid;i <= n;i++)
if (n - i >= mid) tmp = min(tmp,dp[n][i]);
컴파일 시 표준 에러 (stderr) 메시지
# | 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... |