結果
| 問題 |
No.91 赤、緑、青の石
|
| コンテスト | |
| ユーザー |
tetsuzuki1115
|
| 提出日時 | 2017-11-01 23:02:51 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 51 ms / 5,000 ms |
| コード長 | 836 bytes |
| コンパイル時間 | 894 ms |
| コンパイル使用メモリ | 83,972 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-24 07:11:04 |
| 合計ジャッジ時間 | 2,311 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 28 |
ソースコード
#include <iostream>
#include <vector>
#include <string>
#include <cstring>
#include <math.h>
#include <cmath>
#include <limits.h>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <functional>
#include <stdio.h>
using namespace std;
long long MOD = 1000000007;
int main() {
vector<long long> a(3);
cin >> a[0] >> a[1] >> a[2];
while ( true ) {
sort( a.begin(), a.end() );
if ( a[2]-a[0] < 3 ) { break; }
a[0]++;
a[2] -= 2;
// long long d = a[2]-a[0];
// a[0] += d / 3;
// a[2] -= (d / 3)*2;
// for ( auto& x : a ) {
// cout << x << " ";
// }
// cout << endl;
}
sort( a.begin(), a.end() );
cout << a[0] << endl;
return 0;
}
tetsuzuki1115