結果
| 問題 | 
                            No.920 あかあお
                             | 
                    
| コンテスト | |
| ユーザー | 
                             ajiruajiru
                         | 
                    
| 提出日時 | 2019-12-05 07:45:38 | 
| 言語 | C++14  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 2 ms / 2,000 ms | 
| コード長 | 289 bytes | 
| コンパイル時間 | 548 ms | 
| コンパイル使用メモリ | 62,464 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-12-16 05:25:45 | 
| 合計ジャッジ時間 | 1,324 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 11 | 
ソースコード
#include <iostream>
using namespace std;
int main(void) {
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	int x, y, z, ans = 0;
	cin >> x >> y >> z;
	ans += min(x, y);
	x -= ans;
	y -= ans;
	if (x < y) swap(x, y);
	ans += min(x, z);
	z -= min(x, z);
	ans += z / 2;
	cout << ans;
	return 0;
}
            
            
            
        
            
ajiruajiru