結果
問題 | No.632 穴埋め門松列 |
ユーザー | donkorin_ |
提出日時 | 2018-09-25 16:23:29 |
言語 | C++14 (gcc 12.3.0 + boost 1.83.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 1,129 bytes |
コンパイル時間 | 1,569 ms |
コンパイル使用メモリ | 162,164 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-04-15 06:50:08 |
合計ジャッジ時間 | 2,106 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
6,816 KB |
testcase_01 | AC | 2 ms
6,816 KB |
testcase_02 | AC | 2 ms
6,944 KB |
testcase_03 | AC | 2 ms
6,944 KB |
testcase_04 | AC | 2 ms
6,940 KB |
testcase_05 | AC | 1 ms
6,944 KB |
ソースコード
#include <bits/stdc++.h> #define rep(i,a,b) for(int i=a;i<(b);++i) #define erep(i,a,b) for(int i=a;i<=(int)(b);++i) #define per(i,a,b) for(int i=(a);i>(b);--i) #define eper(i,a,b) for(int i=(a);i>=b;--i) #define pb push_back #define mp make_pair #define INF 100100100100 #define MOD 1000000007 #define all(x) (x).begin(),(x).end() #define vii vector<int> #define vll vector<long long> using namespace std; typedef long long ll; typedef pair<int,int> Pii; template<class T>bool chmax(T &a, const T &b) { if (a<b) { a = b; return 1; } return 0; } template<class T>bool chmin(T &a, const T &b) { if (b<a) { a = b; return 1; } return 0; } int dy[]={0, 0, 1, -1}; int dx[]={1, -1, 0, 0}; int gcd(int a,int b){return b?gcd(b,a%b):a;} int lcm(int a,int b){return a/gcd(a, b)*b;} char c[3]; int main() { cin.tie(0); ios::sync_with_stdio(false); rep(i, 0, 3) cin >> c[i]; if (c[0] == '?') { if (c[1] == '2') cout << "4"; else cout << "1"; } else if (c[1] == '?') { cout << "14"; } else { if (c[0] == '2') cout << "1"; else cout << "4"; } cout << "\n"; return 0; }