結果
| 問題 | No.3036 Nauclhlt型文字列 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-07-09 16:56:25 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| + 453µs | |
| コード長 | 599 bytes |
| 記録 | |
| コンパイル時間 | 2,535 ms |
| コンパイル使用メモリ | 331,592 KB |
| 実行使用メモリ | 7,600 KB |
| 最終ジャッジ日時 | 2026-07-13 02:22:49 |
| 合計ジャッジ時間 | 3,275 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 15 |
ソースコード
#include <bits/stdc++.h>
#define fastio \
ios_base::sync_with_stdio(false); \
cin.tie(NULL)
#define endl "\n"
using namespace std;
int main()
{
fastio;
int n; cin >> n;
string s; cin >> s;
if (n % 2 != 0) {
cout << "No" << endl;
return 0;
} else {
string sA, sB;
for (int i = 0; i < s.length(); i++) {
if (i % 2 == 0) {
sB += s[i];
} else {
sA += s[i];
}
}
cout << "Yes" << endl << sB << " " << sA << endl;
}
return 0;
}