結果

問題 No.632 穴埋め門松列
ユーザー ミドリムシミドリムシ
提出日時 2018-01-19 21:38:42
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 577 bytes
コンパイル時間 454 ms
コンパイル使用メモリ 67,272 KB
実行使用メモリ 4,500 KB
最終ジャッジ日時 2023-08-26 00:13:19
合計ジャッジ時間 1,039 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 2 ms
4,376 KB
testcase_04 AC 1 ms
4,376 KB
testcase_05 AC 1 ms
4,500 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <algorithm>
using namespace std;

int main(){
    string c[3];
    for(int i = 0; i < 3; i++){
        cin >> c[i];
    }
    int array_14[2] = {1, 4};
    for(int i = 0; i < 2; i++){
        int new_c[3];
        for(int j = 0; j < 3; j++){
            if(c[j] == "?"){
                new_c[j] = array_14[i];
            }else{
                new_c[j] = stoi(c[j]);
            }
        }
        if(max(new_c[0], new_c[2]) < new_c[1] || min(new_c[0], new_c[2]) > new_c[1]){
            cout << array_14[i];
        }
    }
    cout << endl;
}
0