結果
問題 | No.632 穴埋め門松列 |
ユーザー |
|
提出日時 | 2019-09-02 13:55:25 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 430 bytes |
コンパイル時間 | 1,438 ms |
コンパイル使用メモリ | 162,960 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-15 06:41:49 |
合計ジャッジ時間 | 1,848 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 |
ソースコード
#include<bits/stdc++.h> using namespace std; int main(){ vector<int> a(3),b={1,4}; for(int i=0;i<3;++i){ char c; cin>>c; a[i]=c-'0'; } int ind=find(a.begin(),a.end(),15)-a.begin(); string ans; for(int i=0;i<2;++i){ a[ind]=b[i]; auto mn=minmax_element(a.begin(),a.end()); if(a[1]==*mn.first||a[1]==*mn.second)ans+=to_string(b[i]); } cout<<ans<<endl; }