提出 #67928640


ソースコード 拡げる

#include <bits/stdc++.h>
using ll = long long;

const int N = 3e5;

void solve() {
    std::string s;
    std::cin >> s;
    bool b = true;
    int n = s.size();
    for (int i = 0; i < n; i++) {
        if (b && s[i] != '#') {
            s[i] = 'o';
            b = false;
        } else if (s[i] == '#') {
            b = true;
        }
    }
    std::cout << s;
}

int main() {
    std::ios::sync_with_stdio(false), std::cout.tie(nullptr), std::cin.tie(nullptr);
    int t;
    t = 1;
    while (t--) {
        solve();
    }
    return 0;
}

提出情報

提出日時
問題 B - 1D Akari
ユーザ mellowsky
言語 C++ 20 (gcc 12.2)
得点 250
コード長 575 Byte
結果 AC
実行時間 1 ms
メモリ 3628 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 250 / 250
結果
AC × 4
AC × 21
セット名 テストケース
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, 02_random_08.txt, 02_random_09.txt
ケース名 結果 実行時間 メモリ
00_sample_00.txt AC 1 ms 3500 KiB
00_sample_01.txt AC 1 ms 3484 KiB
00_sample_02.txt AC 1 ms 3372 KiB
00_sample_03.txt AC 1 ms 3492 KiB
01_handmade_00.txt AC 1 ms 3428 KiB
01_handmade_01.txt AC 1 ms 3392 KiB
01_handmade_02.txt AC 1 ms 3492 KiB
01_handmade_03.txt AC 1 ms 3568 KiB
01_handmade_04.txt AC 1 ms 3504 KiB
01_handmade_05.txt AC 1 ms 3420 KiB
01_handmade_06.txt AC 1 ms 3424 KiB
02_random_00.txt AC 1 ms 3628 KiB
02_random_01.txt AC 1 ms 3624 KiB
02_random_02.txt AC 1 ms 3484 KiB
02_random_03.txt AC 1 ms 3480 KiB
02_random_04.txt AC 1 ms 3564 KiB
02_random_05.txt AC 1 ms 3368 KiB
02_random_06.txt AC 1 ms 3392 KiB
02_random_07.txt AC 1 ms 3500 KiB
02_random_08.txt AC 1 ms 3620 KiB
02_random_09.txt AC 1 ms 3504 KiB