結果
問題 |
No.3036 Nauclhlt型文字列
|
ユーザー |
![]() |
提出日時 | 2025-02-28 21:25:01 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 832 bytes |
コンパイル時間 | 823 ms |
コンパイル使用メモリ | 106,652 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2025-02-28 21:25:03 |
合計ジャッジ時間 | 1,504 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 15 |
ソースコード
#include <iostream> #include <iomanip> #include <cassert> #include <vector> #include <algorithm> #include <utility> #include <numeric> // #include "Src/Utility/BinarySearch.hpp" // #include "Src/Sequence/CompressedSequence.hpp" // #include "Src/Sequence/RunLengthEncoding.hpp" // using namespace zawa; // #include "atcoder/modint" // using mint = atcoder::modint998244353; int N; std::string S; int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); std::cout.tie(nullptr); std::cin >> N >> S; if (S.size() % 2) { std::cout << "No\n"; } else { std::string X, Y; for (int i = 0 ; i < (int)S.size() ; i++) { if (i % 2 == 0) X += S[i]; else Y += S[i]; } std::cout << "Yes\n"; std::cout << X << ' ' << Y << '\n'; } }