結果
| 問題 | No.632 穴埋め門松列 | 
| コンテスト | |
| ユーザー |  ajiruajiru | 
| 提出日時 | 2020-02-06 02:22:12 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 1,000 ms | 
| コード長 | 645 bytes | 
| コンパイル時間 | 690 ms | 
| コンパイル使用メモリ | 68,628 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-09-24 12:11:16 | 
| 合計ジャッジ時間 | 1,201 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 6 | 
ソースコード
#include <iostream>
#include <vector>
using namespace std;
int main(void) {
	vector<int> one(3), four(3);
	char c;
	for (int i = 0; i < 3; ++i) {
		cin >> c;
		if (c == '2')
			one[i] = 2, four[i] = 2;
		else if (c == '3')
			one[i] = 3, four[i] = 3;
		else
			one[i] = 1, four[i] = 4;
	}
	bool ok1 = false, ok4 = false;
	if ((one[1] > one[0] && one[1] > one[2])
		|| (one[1] < one[0] && one[1] < one[2]))
		ok1 = true;
	if ((four[1] > four[0] && four[1] > four[2])
		|| (four[1] < four[0] && four[1] < four[2]))
		ok4 = true;
	if (ok1 && ok4) cout << 14 << endl;
	else if (ok1) cout << 1 << endl;
	else if (ok4) cout << 4 << endl;
	return 0;
}
            
            
            
        