結果
| 問題 |
No.3036 Nauclhlt型文字列
|
| コンテスト | |
| ユーザー |
ruase_
|
| 提出日時 | 2025-08-15 10:51:21 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 86 ms / 2,000 ms |
| コード長 | 459 bytes |
| コンパイル時間 | 951 ms |
| コンパイル使用メモリ | 104,184 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2025-08-15 10:51:24 |
| 合計ジャッジ時間 | 2,528 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 15 |
ソースコード
# include <iostream>
# include <iomanip>
# include <algorithm>
using namespace std;
int main()
{
int n;
string s;
cin >> n >> s;
string ans1 = "", ans2 = "";
if (n%2 == 0) {
cout << "Yes" << endl;
for (int i = 0; i < s.length()/2 ; i++) {
ans1 = ans1 + s[i*2];
ans2 = ans2 + s[i*2 + 1];
}
cout << ans1 << " " << ans2 << endl;
}else {
cout << "No" << endl;
}
}
ruase_