Submission #22280373
Source Code Expand
#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rrep(i,a,b) for(int i=a;i>=b;i--)
#define fore(i,a) for(auto &i:a)
#define all(x) (x).begin(),(x).end()
//#pragma GCC optimize ("-O3")
using namespace std;
void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); }
typedef long long ll; const int inf = INT_MAX / 2; const ll infl = 1LL << 60;
template<class T>bool chmax(T& a, const T& b) { if (a < b) { a = b; return 1; } return 0; }
template<class T>bool chmin(T& a, const T& b) { if (b < a) { a = b; return 1; } return 0; }
//---------------------------------------------------------------------------------------------------
/*---------------------------------------------------------------------------------------------------
∧_∧
∧_∧ (´<_` ) Welcome to My Coding Space!
( ´_ゝ`) / ⌒i @hamayanhamayan0
/ \ | |
/ / ̄ ̄ ̄ ̄/ |
__(__ニつ/ _/ .| .|____
\/____/ (u ⊃
---------------------------------------------------------------------------------------------------*/
int N;
string S;
//---------------------------------------------------------------------------------------------------
void _main() {
cin >> N >> S;
string ans = "";
fore(c, S) {
fore(x, ans) if (x == c) x = '#';
ans += c;
}
fore(c, ans) if (c != '#') cout << c;
cout << endl;
}
Submission Info
| Submission Time | |
|---|---|
| Task | B - Overwrite |
| User | hamayanhamayan |
| Language | C++ (GCC 9.2.1) |
| Score | 8 |
| Code Size | 1593 Byte |
| Status | AC |
| Exec Time | 8 ms |
| Memory | 3604 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 8 / 8 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | sample_01.txt, sample_02.txt, sample_03.txt |
| All | hand_01.txt, hand_02.txt, hand_03.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, random_12.txt, random_13.txt, random_14.txt, random_15.txt, random_16.txt, random_17.txt, random_18.txt, random_19.txt, random_20.txt, sample_01.txt, sample_02.txt, sample_03.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| hand_01.txt | AC | 8 ms | 3484 KiB |
| hand_02.txt | AC | 3 ms | 3592 KiB |
| hand_03.txt | AC | 2 ms | 3500 KiB |
| random_01.txt | AC | 2 ms | 3484 KiB |
| random_02.txt | AC | 2 ms | 3544 KiB |
| random_03.txt | AC | 3 ms | 3604 KiB |
| random_04.txt | AC | 2 ms | 3580 KiB |
| random_05.txt | AC | 2 ms | 3588 KiB |
| random_06.txt | AC | 2 ms | 3576 KiB |
| random_07.txt | AC | 2 ms | 3496 KiB |
| random_08.txt | AC | 2 ms | 3572 KiB |
| random_09.txt | AC | 2 ms | 3464 KiB |
| random_10.txt | AC | 2 ms | 3492 KiB |
| random_11.txt | AC | 3 ms | 3516 KiB |
| random_12.txt | AC | 2 ms | 3552 KiB |
| random_13.txt | AC | 3 ms | 3468 KiB |
| random_14.txt | AC | 1 ms | 3428 KiB |
| random_15.txt | AC | 2 ms | 3492 KiB |
| random_16.txt | AC | 6 ms | 3412 KiB |
| random_17.txt | AC | 2 ms | 3424 KiB |
| random_18.txt | AC | 2 ms | 3408 KiB |
| random_19.txt | AC | 2 ms | 3588 KiB |
| random_20.txt | AC | 2 ms | 3572 KiB |
| sample_01.txt | AC | 2 ms | 3464 KiB |
| sample_02.txt | AC | 2 ms | 3468 KiB |
| sample_03.txt | AC | 2 ms | 3572 KiB |