結果

問題 No.3019 YNeos
ユーザー tobbie
提出日時 2025-04-12 17:34:13
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 1,000 ms
コード長 505 bytes
コンパイル時間 2,405 ms
コンパイル使用メモリ 195,176 KB
実行使用メモリ 7,844 KB
最終ジャッジ日時 2025-04-12 17:34:18
合計ジャッジ時間 4,299 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 41
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

#define rep(i, n) for (int i = 0; i < (int)n; i++)

int main() {
  string x, y;
  cin >> x;
  cin >> y;
  string s = "";
  int n = (int)x.size() + (int)y.size();
  rep(i, n) {
    if (i % 2 == 0) {
      if (i / 2 > (int)x.size() - 1) {
	cout << "?" << endl;
	return 0;
      }
      s += x[i / 2];
    } else {
      if (i / 2 > (int)y.size() - 1) {
	cout << "?" << endl;
	return 0;
      }
      s += y[i / 2];
    }
  }
  cout << s << endl;
  return 0;
}
0