結果
| 問題 |
No.1101 鼻水
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-07-14 13:32:05 |
| 言語 | C++17(clang) (17.0.6 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,249 bytes |
| コンパイル時間 | 2,026 ms |
| コンパイル使用メモリ | 162,124 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-11-30 19:12:45 |
| 合計ジャッジ時間 | 2,952 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 WA * 12 |
ソースコード
#pragma region
#pragma GCC target("avx2")
#pragma GCC optimize("03")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
using namespace std; typedef long double ld; typedef long long ll;
typedef unsigned long long ull;
#define endl "\n"
#define MP make_pair
#define FOR(i,a,b) for(int i=(a);i<=(b);i++)
#define FORR(x,arr) for(auto& x:arr)
#define PII pair<int, int>
#define PLL pair<ll, ll>
#define VPII vector<PII>
#define VPLL vector<PLL>
#define FI first
#define SE second
#define ALL(x) (x).begin(), (x).end()
constexpr int INF=1<<30; constexpr ll LINF=1LL<<60; constexpr ll mod=1e9+7; constexpr int NIL = -1;
template<class T>inline bool chmax(T &a, const T &b) { if (a<b) { a = b; return 1; } return 0; }
template<class T>inline bool chmin(T &a, const T &b) { if (b<a) { a = b; return 1; } return 0; }
#pragma endregion
//-------------------
int main(){
cin.tie(0); ios::sync_with_stdio(false); //cout << fixed << setprecision(15);
ll v,t,p; cin >> v >> t >> p;
ll ans = v*(p+1);
ll cur = v*(p+1);
ans++;
ll cnt = 0;
for(int i=32; i>=0; i--) {
ll tmp = cnt + (1LL<<i);
if(cur + tmp >= t*tmp) cnt = tmp;
}
// cout << cnt << endl;
cout << ans+cnt << endl;
return 0;
}