結果
問題 |
No.2416 vs Slime
|
ユーザー |
|
提出日時 | 2024-07-03 19:20:18 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 519 bytes |
コンパイル時間 | 739 ms |
コンパイル使用メモリ | 98,804 KB |
最終ジャッジ日時 | 2025-02-22 01:54:33 |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 1 |
other | AC * 18 WA * 19 |
ソースコード
#include <iostream> #include <map> #include <functional> using namespace std; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); long long H, A, temp; int ans = 0; map<long long, int, greater<long long>> slimes; cin >> H >> A; slimes.emplace(H, 1); for (ans = 0; !slimes.empty(); ++ans) { temp = slimes.begin()->first / A; if (temp != 0) slimes[temp] += 2; slimes.erase(slimes.begin()); } cout << ans << '\n'; return 0; }