結果
| 問題 |
No.91 赤、緑、青の石
|
| ユーザー |
dgd1724
|
| 提出日時 | 2016-10-27 07:15:38 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 598 bytes |
| コンパイル時間 | 1,695 ms |
| コンパイル使用メモリ | 161,644 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-24 03:58:58 |
| 合計ジャッジ時間 | 2,979 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 20 WA * 8 |
ソースコード
#include <bits/stdc++.h>
//const static double de_PI = 3.14159265358979323846;
//const static int de_MOD = 1000000007;
//const static int de_MAX = 999999999;
//const static int de_MIN = -999999999;
int main(void) {
//std::ifstream in("123.txt"); std::cin.rdbuf(in.rdbuf());
std::vector<int> A(3);
std::cin >> A[0] >> A[1] >> A[2];
int ans = 0;
while (1) {
std::sort(A.begin(), A.end());
ans += A[0];
for (int i = 2; i >= 0; i--) { A[i] -= A[0]; }
if (A[2] <= 2) { break; }
while (A[2] > 2 && A[2] >= A[1]) {
A[2] -= 2;
A[0]++;
}
}
std::cout << ans << std::endl;
}
dgd1724