結果
問題 |
No.91 赤、緑、青の石
|
ユーザー |
![]() |
提出日時 | 2016-03-30 11:37:11 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 211 ms / 5,000 ms |
コード長 | 282 bytes |
コンパイル時間 | 567 ms |
コンパイル使用メモリ | 63,112 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-24 06:57:21 |
合計ジャッジ時間 | 3,569 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 28 |
ソースコード
#include <iostream> #include <algorithm> using namespace std; int main(){ int rgb[3]; cin >> rgb[0] >> rgb[1] >> rgb[2]; while(true){ stable_sort(rgb,rgb + 3); if(rgb[0] + 3 > rgb[2]) break; rgb[0]++; rgb[2] -= 2; } cout << rgb[0] << endl; }