結果
| 問題 |
No.632 穴埋め門松列
|
| コンテスト | |
| ユーザー |
newlife171128
|
| 提出日時 | 2018-02-15 19:57:30 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 1,058 bytes |
| コンパイル時間 | 1,491 ms |
| コンパイル使用メモリ | 163,328 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-27 20:44:26 |
| 合計ジャッジ時間 | 2,278 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 |
ソースコード
#include <bits/stdc++.h>
#include "bits/stdc++.h"
#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <string>
#include <sstream>
#include <cmath>
#include <stack>
#include <queue>
#include <cctype>
#include <stdio.h>
#include <map>
#include <unordered_map>
#include <string.h>
#include <utility>
typedef long long ll;
const int INF = 1e8;
#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
using namespace std;
typedef pair<int, int> P;
int string_to_int(string s) {
stringstream ss;
ss << s;
int tmp = 0;
ss >> tmp;
return tmp;
}
string int_to_string(int x){
stringstream ss;
ss<<x;
return ss.str();
}
int a[3];
int b[3];
int main() {
string tmp;
for (int i = 0; i < 3; i++) {
cin >> tmp;
if (tmp != "?") {
int num = string_to_int(tmp);
a[i] = num;
b[i] = num;
}else {
a[i] = 1;
b[i] =4;
}
}
string ans ="";
if(a[0]<a[1]&& a[1]>a[2] || a[0]>a[1]&& a[1]<a[2]){
ans ="1";
}
if (b[0]<b[1] && b[1]>b[2] || b[0]>b[1] && b[1]<b[2]) {
ans +="4";
}
cout<<ans<<endl;
return 0;
}
newlife171128