結果
| 問題 |
No.67 よくある棒を切る問題 (1)
|
| コンテスト | |
| ユーザー |
vwxyz
|
| 提出日時 | 2022-06-21 03:16:24 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 540 bytes |
| コンパイル時間 | 3,402 ms |
| コンパイル使用メモリ | 276,984 KB |
| 実行使用メモリ | 17,600 KB |
| 最終ジャッジ日時 | 2025-03-03 12:00:00 |
| 合計ジャッジ時間 | 15,951 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | TLE * 1 -- * 29 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#include <stdio.h>
int main(){
int N;cin>>N;
vector<int> L(N);
for(int i=0;i<N;i++){
cin>>L[i];
}
long long K;cin>>K;
double ok,ng,eps;
ok=1.0e-9;ng=1.0e10;
eps=1.0e-9;
while(abs(ok-ng)>eps){
double mid=(ok+ng)/2;
long long cnt=0;
for(int l:L){
cnt+=floor(l/mid);
}
if(cnt>=K){
ok=mid;
}
else{
ng=mid;
}
}
cout<<setprecision(9)<<ok<<endl;
}
vwxyz