結果
| 問題 |
No.3036 Nauclhlt型文字列
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-02-28 21:44:52 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 3,194 bytes |
| コンパイル時間 | 1,586 ms |
| コンパイル使用メモリ | 165,824 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2025-02-28 21:45:12 |
| 合計ジャッジ時間 | 2,378 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 15 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pll;
typedef pair<string, string> pss;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<pll> vpl;
double EPS = 1e-9;
int INF = 1000000005;
long long INFF = 1000000000000000005LL;
double PI = acos(-1.0);
int dirx[8] = {-1, 0, 0, 1, -1, -1, 1, 1};
int diry[8] = {0, 1, -1, 0, -1, 1, -1, 1};
#define REP(i, a, b) for (ll i = a; i <= b; i++)
#define sqr(x) ((ll)(x) * (x))
#define reset(a, b) memset(a, b, sizeof(a))
#define ff first
#define ss second
#define mkp make_pair
#define pb push_back
#define all(v) v.begin(), v.end()
#define len(v) (ll) v.size()
#define srt(v) sort(v.begin(), v.end())
#define rsrt(v) sort(v.rbegin(), v.rend())
#define rvrs(v) reverse(v.begin(), v.end())
#define PERMUTE next_permutation
#define sc1(a) scanf("%lld", &a)
#define sc2(a, b) scanf("%lld %lld", &a, &b)
#define sc3(a, b, c) scanf("%lld %lld%lld", &a, &b, &c)
#define sc4(a, b, c, d) scanf("%lld %lld %lld %lld", &a, &b, &c, &d)
#define yes printf("YES\n")
#define no printf("NO\n")
#define pf1(a) printf("%lld", a)
#define pf2(a, b) printf("%lld %lld", a, b)
#define case(a) printf("Case %lld: ", a)
#define ses printf("\n")
#define CC(x) cout << "Case #" << ++x << ":";
#define LL_INF (1LL << 62)
#define INF (1 << 30)
#define SetBit(x, k) (x |= (1LL << k))
#define ClearBit(x, k) (x &= ~(1LL << k))
#define CheckBit(x, k) ((x >> k) & 1)
void substring(string s, int i, string cur)
{
if (i == s.size())
{
cout << cur << endl;
return;
}
substring(s, i + 1, cur + s[i]);
substring(s, i + 1, cur);
}
ll ch2digit(char s)
{
char charvalue = s;
ll number = (int(charvalue) + 0);
return number - 97;
}
long long Sqrt(long long x)
{
long long l = 1, r = 1e9, ans = 0;
while (l <= r)
{
long long mid = (l + r) >> 1;
if (mid * mid <= x)
{
ans = mid;
l = mid + 1;
}
else
{
r = mid - 1;
}
}
return ans;
}
void permutaion(string s, int l, int r)
{
if (l == r)
{
cout << s << endl;
return;
}
for (int i = l; i <= r; i++)
{
swap(s[l], s[i]);
permutaion(s, l + 1, r);
swap(s[l], s[i]);
}
}
bool pallindrome(string s, int l, int r)
{
if (l >= r)
return true;
if (s[l] != s[r])
return false;
return pallindrome(s, l + 1, r - 1);
}
char int2char(int N)
{
return char(N);
}
void numToBinRepresentation(ll n)
{
for (ll i = 15; i >= 0; --i)
{
// ll x = ((n>>i)&1);
cout << ((n >> i) & 1);
}
cout << endl;
}
void solve()
{
int n, k;
// cin >> n >> k;
cin>>n;
string s;
cin >> s;
if(n&1)
{
cout<<"No"<<endl;
return;
}
string s1 , s2;
for(int i = 0; i < n; i+=2)
{
s1 += s[i];
}
for(int i = 1; i < n; i+=2)
{
s2 += s[i];
}
cout<<"Yes"<<endl;
cout<<s1<<" "<<s2<<endl;
}
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(0);
ll t = 1;
// cin >> t;
while (t--)
{
solve();
}
}