結果
| 問題 |
No.91 赤、緑、青の石
|
| ユーザー |
tetsuzuki1115
|
| 提出日時 | 2017-11-01 22:59:33 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 783 bytes |
| コンパイル時間 | 1,044 ms |
| コンパイル使用メモリ | 82,480 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-22 14:43:23 |
| 合計ジャッジ時間 | 2,046 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 10 WA * 18 |
ソースコード
#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; }
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