Submission #60717980
Source Code Expand
Copy
#include <bits/stdc++.h>#include<ext/pb_ds/assoc_container.hpp>#include<ext/pb_ds/tree_policy.hpp>#include <ext/rope>using namespace __gnu_pbds;using namespace std;#define pb push_back#define rep(i,x,y) for(register int i=x;i<=y;i++)#define rep1(i,x,y) for(register int i=x;i>=y;--i)#define int long long#define fire signed#define il inlinetemplate<class T> il void print(T x) {if(x<0) printf("-"),x=-x;if (x > 9) print(x / 10);putchar(x % 10 + '0');}template<class T> il void in(T &x) {x = 0; char ch = getchar();int f = 1;while (ch < '0' || ch > '9') {if(ch=='-') f = -1; ch = getchar(); }
#include <bits/stdc++.h> #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/tree_policy.hpp> #include <ext/rope> using namespace __gnu_pbds; using namespace std; #define pb push_back #define rep(i,x,y) for(register int i=x;i<=y;i++) #define rep1(i,x,y) for(register int i=x;i>=y;--i) #define int long long #define fire signed #define il inline template<class T> il void print(T x) { if(x<0) printf("-"),x=-x; if (x > 9) print(x / 10); putchar(x % 10 + '0'); } template<class T> il void in(T &x) { x = 0; char ch = getchar(); int f = 1; while (ch < '0' || ch > '9') {if(ch=='-') f = -1; ch = getchar(); } while (ch >= '0' && ch <= '9') { x = (x << 3) + (x << 1) + (ch ^ 48); ch = getchar(); } x *= f; } int T=1; string s; int n; char c,d; void solve() { in(n); cin>>c>>d>>s; for(auto to:s) { if(to!=c) cout<<d; else cout<<to; } } fire main() { while(T--) { solve(); } return false; }
Submission Info
Submission Time | |
---|---|
Task | A - aaaadaa |
User | zhy091206 |
Language | C++ 20 (gcc 12.2) |
Score | 100 |
Code Size | 969 Byte |
Status | AC |
Exec Time | 1 ms |
Memory | 3564 KB |
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, 00_sample_03.txt |
All | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 01_handmade_00.txt, 01_handmade_01.txt, 01_handmade_02.txt, 01_handmade_03.txt, 01_handmade_04.txt, 01_handmade_05.txt, 01_handmade_06.txt, 02_random_00.txt, 02_random_01.txt, 02_random_02.txt, 02_random_03.txt, 02_random_04.txt, 02_random_05.txt, 02_random_06.txt, 02_random_07.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_sample_00.txt | AC | 1 ms | 3432 KB |
00_sample_01.txt | AC | 1 ms | 3364 KB |
00_sample_02.txt | AC | 1 ms | 3564 KB |
00_sample_03.txt | AC | 1 ms | 3500 KB |
01_handmade_00.txt | AC | 1 ms | 3480 KB |
01_handmade_01.txt | AC | 1 ms | 3500 KB |
01_handmade_02.txt | AC | 1 ms | 3432 KB |
01_handmade_03.txt | AC | 1 ms | 3500 KB |
01_handmade_04.txt | AC | 1 ms | 3440 KB |
01_handmade_05.txt | AC | 1 ms | 3560 KB |
01_handmade_06.txt | AC | 1 ms | 3448 KB |
02_random_00.txt | AC | 1 ms | 3432 KB |
02_random_01.txt | AC | 1 ms | 3448 KB |
02_random_02.txt | AC | 1 ms | 3460 KB |
02_random_03.txt | AC | 1 ms | 3452 KB |
02_random_04.txt | AC | 1 ms | 3436 KB |
02_random_05.txt | AC | 1 ms | 3448 KB |
02_random_06.txt | AC | 1 ms | 3484 KB |
02_random_07.txt | AC | 1 ms | 3500 KB |