結果
問題 | No.91 赤、緑、青の石 |
ユーザー |
![]() |
提出日時 | 2020-03-26 00:38:24 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 33 ms / 5,000 ms |
コード長 | 449 bytes |
コンパイル時間 | 3,878 ms |
コンパイル使用メモリ | 197,340 KB |
最終ジャッジ日時 | 2025-01-09 10:11:57 |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 28 |
ソースコード
#include<bits/stdc++.h> using lint=long long; int main(){ std::cin.tie(nullptr);std::ios_base::sync_with_stdio(false); std::cout.setf(std::ios_base::fixed);std::cout.precision(15); std::vector<lint>a(3); for(lint&x:a)std::cin>>x; while(true){ std::sort(a.begin(),a.end()); if(a.back()-a.front()<3)break; a.front()++; a.back()-=2; } std::cout<<*std::min_element(a.begin(),a.end())<<'\n'; }