結果

問題 No.3036 Nauclhlt型文字列
ユーザー 北杜七星
提出日時 2025-02-28 21:30:13
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 4 ms / 2,000 ms
コード長 521 bytes
コンパイル時間 3,642 ms
コンパイル使用メモリ 316,264 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2025-02-28 21:30:28
合計ジャッジ時間 3,932 ms
ジャッジサーバーID
(参考情報)
judge6 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (ll)(n); i++)
#define all(a) (a).begin(), (a).end()
using ll = long long;
const int INF32 = 2e9;
const ll INF64 = 4e18;

int main() {
    int N;
    string S;
    cin >> N >> S;
    if(N%2){
        cout << "No" << endl;
        return 0;
    }
    cout << "Yes" << endl;
    string P="", Q="";
    rep(i,N){
        if(!(i%2))P+=S[i];
        else Q+=S[i];
    }
    cout << P << " " << Q << endl;
    return 0;
}
0