結果
| 問題 |
No.3036 Nauclhlt型文字列
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-03-02 11:19:21 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 445 bytes |
| コンパイル時間 | 1,248 ms |
| コンパイル使用メモリ | 80,812 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2025-03-02 11:19:24 |
| 合計ジャッジ時間 | 1,966 ms |
|
ジャッジサーバーID (参考情報) |
judge6 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 15 |
ソースコード
#include <iostream>
#include <cstdint>
#include <array>
using namespace std;
int main()
{
cin.tie(nullptr);
ios::sync_with_stdio(false);
uint32_t N, i;
string S;
cin >> N;
S.reserve(N), cin >> S;
if (N & 1)
{
cout << "No\n";
return 0;
}
cout << "Yes\n";
array<string, 2> T;
T[0].reserve(N >> 1), T[1].reserve(N >> 1);
for (i = 0; i != N; ++i)
T[i & 1].push_back(S[i]);
cout << T[0] << ' ' << T[1] << '\n';
return 0;
}