ログインしてください。
提出 #51027594
ソースコード 拡げる
#include <iostream>
using namespace std;
using ll = long long;
#define REP_(i, a_, b_, a, b, ...) \
for (int i = (a), lim##i = (b); i < lim##i; i++)
#define REP(i, ...) REP_(i, __VA_ARGS__, __VA_ARGS__, 0, __VA_ARGS__)
#define all(v) v.begin(), v.end()
int main() {
string s;
cin >> s;
string ans = "";
bool add = true;
REP(i, s.size()) {
if (s[i] == '|') {
add = !add;
continue;
}
if (add) {
ans += s[i];
}
}
cout << ans << endl;
}
提出情報
| 提出日時 | |
|---|---|
| 問題 | A - Spoiler |
| ユーザ | noyan |
| 言語 | C++ 23 (gcc 12.2) |
| 得点 | 150 |
| コード長 | 485 Byte |
| 結果 | AC |
| 実行時間 | 1 ms |
| メモリ | 3664 KiB |
ジャッジ結果
| セット名 | Sample | All | ||||
|---|---|---|---|---|---|---|
| 得点 / 配点 | 0 / 0 | 150 / 150 | ||||
| 結果 |
|
|
| セット名 | テストケース |
|---|---|
| Sample | sample_01.txt, sample_02.txt, sample_03.txt |
| All | 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, sample_01.txt, sample_02.txt, sample_03.txt |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| random_01.txt | AC | 1 ms | 3592 KiB |
| random_02.txt | AC | 1 ms | 3468 KiB |
| random_03.txt | AC | 1 ms | 3476 KiB |
| random_04.txt | AC | 1 ms | 3484 KiB |
| random_05.txt | AC | 1 ms | 3596 KiB |
| random_06.txt | AC | 1 ms | 3436 KiB |
| random_07.txt | AC | 1 ms | 3600 KiB |
| random_08.txt | AC | 1 ms | 3468 KiB |
| random_09.txt | AC | 1 ms | 3476 KiB |
| random_10.txt | AC | 1 ms | 3540 KiB |
| random_11.txt | AC | 1 ms | 3516 KiB |
| sample_01.txt | AC | 1 ms | 3588 KiB |
| sample_02.txt | AC | 1 ms | 3632 KiB |
| sample_03.txt | AC | 1 ms | 3664 KiB |