結果
問題 |
No.632 穴埋め門松列
|
ユーザー |
|
提出日時 | 2018-04-22 14:28:31 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 574 bytes |
コンパイル時間 | 724 ms |
コンパイル使用メモリ | 66,552 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-27 05:38:16 |
合計ジャッジ時間 | 1,097 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 |
ソースコード
#include<iostream> #include<algorithm> using namespace std; int main(){ int one[3], four[3]; char c; for(int i = 0; i < 3; i++){ cin >> c; if(c == '?'){ one[i] = 1; four[i] = 4; }else{ int x = (int)(c-'0'); one[i] = x; four[i] = x; } } // one check if((one[1]-one[0])*(one[1]-one[2]) > 0){ cout << "1"; } // four check if((four[1]-four[0])*(four[1]-four[2]) > 0){ cout << "4"; } cout << endl; return 0; }