結果
問題 |
No.1101 鼻水
|
ユーザー |
|
提出日時 | 2020-07-04 16:03:26 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 320 bytes |
コンパイル時間 | 1,808 ms |
コンパイル使用メモリ | 190,804 KB |
最終ジャッジ日時 | 2025-01-11 15:33:14 |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 |
ソースコード
#include <bits/stdc++.h> #define rep(i,n) for(int i=0;i<(n);i++) using namespace std; using lint=long long; int main(){ lint v,t,p; cin>>v>>t>>p; lint lo=0,hi=LLONG_MAX; while(hi-lo>1){ lint mi=(lo+hi)/2; if(mi<=(mi-2+t)/t+(p+1)*v) lo=mi; else hi=mi; } cout<<lo<<'\n'; return 0; }