Submission #72574681
Source Code Expand
#include <bits/stdc++.h>
using namespace std;
#define For(i, a, b) for(int i = (a); i < (b); i++)
#define rep(i, n) For(i, 0, n)
#define rFor(i, a, b) for(int i = (a); i >= (b); i--)
#define ALL(v) (v).begin(), (v).end()
#define rALL(v) (v).rbegin(), (v).rend()
#define SZ(v) ((int)(v).size())
using lint = long long;
using ld = long double;
const int INF = 2000000000;
const lint LINF = 1000000000000000000;
// 真上から反時計回り
const int di[] = {-1, 0, 1, 0};
const int dj[] = {0, -1, 0, 1};
const int di8[] = {-1, -1, 0, 1, 1, 1, 0, -1};
const int dj8[] = {0, -1, -1, -1, 0, 1, 1, 1};
struct SetupIo {
SetupIo() {
ios::sync_with_stdio(false); cin.tie(nullptr);
cout << fixed << setprecision(15);
cerr << fixed << setprecision(15);
}
} setupio;
namespace tatsumr {
template <class T>
bool chmin(T &a, const T &b) {
return a > b ? a = b, 1 : 0;
}
template <class T>
bool chmax(T &a, const T &b) {
return a < b ? a = b, 1 : 0;
}
template <class T>
T mypow(T a, T b) {
T res = 1;
while (b) {
if (b & 1) { res *= a; }
a *= a; b >>= 1;
}
return res;
}
template <class T>
T modpow(T a, T b, T mod) {
T res = 1;
while (b) {
if (b & 1) { res = (res * a) % mod; }
a = (a * a) % mod; b >>= 1;
}
return res;
}
} // namespace tatsumr
using namespace tatsumr;
int main() {
int N;
string S;
cin >> N >> S;
rep(i, N) {
if (S[i] == 'F') cout << 'G';
else if (S[i] == 'G') cout << 'F';
else cout << S[i];
}
cout << "\n";
}
Submission Info
| Submission Time |
|
| Task |
B - EGF置換 |
| User |
guild2026_104 |
| Language |
C++23 (GCC 15.2.0) |
| Score |
100 |
| Code Size |
1653 Byte |
| Status |
AC |
| Exec Time |
1 ms |
| Memory |
3716 KiB |
Judge Result
| Set Name |
Sample |
All |
| Score / Max Score |
0 / 0 |
100 / 100 |
| Status |
|
|
| Set Name |
Test Cases |
| Sample |
00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt |
| All |
00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_00.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt, 01_random_11.txt, 01_random_12.txt, 01_random_13.txt, 01_random_14.txt, 01_random_15.txt, 01_random_16.txt, 01_random_17.txt |
| Case Name |
Status |
Exec Time |
Memory |
| 00_sample_00.txt |
AC |
1 ms |
3568 KiB |
| 00_sample_01.txt |
AC |
1 ms |
3684 KiB |
| 00_sample_02.txt |
AC |
1 ms |
3460 KiB |
| 01_random_00.txt |
AC |
1 ms |
3588 KiB |
| 01_random_01.txt |
AC |
1 ms |
3628 KiB |
| 01_random_02.txt |
AC |
1 ms |
3548 KiB |
| 01_random_03.txt |
AC |
1 ms |
3572 KiB |
| 01_random_04.txt |
AC |
1 ms |
3588 KiB |
| 01_random_05.txt |
AC |
1 ms |
3576 KiB |
| 01_random_06.txt |
AC |
1 ms |
3556 KiB |
| 01_random_07.txt |
AC |
1 ms |
3568 KiB |
| 01_random_08.txt |
AC |
1 ms |
3672 KiB |
| 01_random_09.txt |
AC |
1 ms |
3568 KiB |
| 01_random_10.txt |
AC |
1 ms |
3576 KiB |
| 01_random_11.txt |
AC |
1 ms |
3716 KiB |
| 01_random_12.txt |
AC |
1 ms |
3700 KiB |
| 01_random_13.txt |
AC |
1 ms |
3700 KiB |
| 01_random_14.txt |
AC |
1 ms |
3612 KiB |
| 01_random_15.txt |
AC |
1 ms |
3628 KiB |
| 01_random_16.txt |
AC |
1 ms |
3652 KiB |
| 01_random_17.txt |
AC |
1 ms |
3576 KiB |