Submission #72574670
Source Code Expand
#include <bits/stdc++.h>
using namespace std;
// #include <atcoder/all>
// using namespace atcoder;
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define INF 1001001001
#define INFF 1001001001001001001
using ll = long long;
using ull = unsigned long long;
using ld = long double;
using i128 = __int128_t;
using vi = vector<int>;
using vvi = vector<vi>;
using vl = vector<ll>;
using vvl = vector<vl>;
using vs = vector<string>;
using vvs = vector<vs>;
using vc = vector<char>;
using vvc = vector<vc>;
using vb = vector<bool>;
using vvb = vector<vb>;
using vd = vector<double>;
using vvd = vector<vd>;
template <typename T> inline bool chmin(T &a,T b){if(a>b){a=b;return true;} return false;}
template <typename T> inline bool chmax(T &a,T b){if(a<b){a=b;return true;} return false;}
int main()
{
cin.tie(nullptr);
ios_base::sync_with_stdio(false);
int n;
string s;
cin >> n >> s;
for (int i = 0; i < n; i++)
{
if (s[i] == 'F')
{
s[i] = 'G';
}
else if (s[i] == 'G')
{
s[i] = 'F';
}
}
cout << s << endl;
return (0);
}
Submission Info
| Submission Time | |
|---|---|
| Task | B - EGF置換 |
| User | guild2026_103 |
| Language | C++23 (GCC 15.2.0) |
| Score | 100 |
| Code Size | 1129 Byte |
| Status | AC |
| Exec Time | 1 ms |
| Memory | 3680 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 | 3604 KiB |
| 00_sample_01.txt | AC | 1 ms | 3596 KiB |
| 00_sample_02.txt | AC | 1 ms | 3644 KiB |
| 01_random_00.txt | AC | 1 ms | 3604 KiB |
| 01_random_01.txt | AC | 1 ms | 3588 KiB |
| 01_random_02.txt | AC | 1 ms | 3680 KiB |
| 01_random_03.txt | AC | 1 ms | 3604 KiB |
| 01_random_04.txt | AC | 1 ms | 3636 KiB |
| 01_random_05.txt | AC | 1 ms | 3656 KiB |
| 01_random_06.txt | AC | 1 ms | 3632 KiB |
| 01_random_07.txt | AC | 1 ms | 3660 KiB |
| 01_random_08.txt | AC | 1 ms | 3636 KiB |
| 01_random_09.txt | AC | 1 ms | 3596 KiB |
| 01_random_10.txt | AC | 1 ms | 3656 KiB |
| 01_random_11.txt | AC | 1 ms | 3604 KiB |
| 01_random_12.txt | AC | 1 ms | 3604 KiB |
| 01_random_13.txt | AC | 1 ms | 3512 KiB |
| 01_random_14.txt | AC | 1 ms | 3572 KiB |
| 01_random_15.txt | AC | 1 ms | 3512 KiB |
| 01_random_16.txt | AC | 1 ms | 3600 KiB |
| 01_random_17.txt | AC | 1 ms | 3576 KiB |