提出 #72683838


ソースコード 拡げる

#include <bits/stdc++.h>
using namespace std;

constexpr int N = 1e6+10;

int main() {
int n;
    cin>>n;
    int now=0;
    bool flag=0;
    while(n--) {
        int x;
        cin>>x;
        if(x==1) now++;
        else if(x==2) now--;
        else flag^=1;
        if(now<0) now=0;
        if(now>=3&&flag) cout<<"Yes\n";
        else cout<<"No\n";
    }
}

提出情報

提出日時
問題 B - Music Player
ユーザ zhishengie
言語 C++23 (GCC 15.2.0)
得点 200
コード長 380 Byte
結果 AC
実行時間 82 ms
メモリ 3584 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 200 / 200
結果
AC × 1
AC × 20
セット名 テストケース
Sample sample00.txt
All sample00.txt, testcase00.txt, testcase01.txt, testcase02.txt, testcase03.txt, testcase04.txt, testcase05.txt, testcase06.txt, testcase07.txt, testcase08.txt, testcase09.txt, testcase10.txt, testcase11.txt, testcase12.txt, testcase13.txt, testcase14.txt, testcase15.txt, testcase16.txt, testcase17.txt, testcase18.txt
ケース名 結果 実行時間 メモリ
sample00.txt AC 1 ms 3416 KiB
testcase00.txt AC 25 ms 3384 KiB
testcase01.txt AC 20 ms 3376 KiB
testcase02.txt AC 53 ms 3584 KiB
testcase03.txt AC 81 ms 3524 KiB
testcase04.txt AC 82 ms 3524 KiB
testcase05.txt AC 82 ms 3524 KiB
testcase06.txt AC 34 ms 3512 KiB
testcase07.txt AC 80 ms 3552 KiB
testcase08.txt AC 64 ms 3524 KiB
testcase09.txt AC 80 ms 3552 KiB
testcase10.txt AC 32 ms 3552 KiB
testcase11.txt AC 81 ms 3584 KiB
testcase12.txt AC 65 ms 3508 KiB
testcase13.txt AC 82 ms 3376 KiB
testcase14.txt AC 21 ms 3336 KiB
testcase15.txt AC 81 ms 3484 KiB
testcase16.txt AC 79 ms 3524 KiB
testcase17.txt AC 80 ms 3552 KiB
testcase18.txt AC 80 ms 3384 KiB