提出 #72680957


ソースコード 拡げる

# pragma GCC target("avx2")
# pragma GCC optimize("O3")
# pragma GCC optimize("unroll-loops")
//#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using vl=vector<long long>;
using vvl=vector<vector<long long>>;
using vvvl=vector<vector<vector<long long>>>;
using pl=pair<long long,long long>;
using vpl=vector<pair<long long,long long>>;
#define fi first
#define se second
#define all(x) (x).begin(),(x).end()
#define _overload3(_1,_2,_3,name,...) name
#define _rep(i,n) repi(i,0,n)
#define repi(i,a,b) for(long long i=(long long)(a);i<(long long)(b);++i)
#define rep(...) _overload3(__VA_ARGS__,repi,_rep,)(__VA_ARGS__)
#define pb push_back
#define lb lower_bound
#define ub upper_bound
#include <atcoder/all>
using namespace atcoder;

long long modpow(long long a, long long n, long long mo){long long res=1;while(n>0){if(n&1){res=res*a%mo;}a=a*a%mo;n>>=1;}return res;}
long long Pow(long long a, long long n){long long res=1;while(n>0){if(n&1){res=res*a;}a=a*a;n>>=1;}return res;}


const ll MOD=998244353;
const ll INF=(1ll<<60);
int main(){
  ll Q;
  cin>>Q;
  vl A(Q);
  ll vol=0;
  bool lis=false;
  rep(i,Q){
    cin>>A[i];
    if(A[i]==1){
      vol++;
    }
    if(A[i]==2){
      vol=max(0ll,vol-1);
    }
    if(A[i]==3){
      lis=!lis;
    }
    if(lis && vol>=3) cout<<"Yes"<<endl;
    else cout<<"No"<<endl;
  }
  
}

提出情報

提出日時
問題 B - Music Player
ユーザ number_cat
言語 C++23 (GCC 15.2.0)
得点 200
コード長 1423 Byte
結果 AC
実行時間 94 ms
メモリ 4860 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 5 ms 3516 KiB
testcase00.txt AC 29 ms 3724 KiB
testcase01.txt AC 23 ms 3508 KiB
testcase02.txt AC 61 ms 4108 KiB
testcase03.txt AC 93 ms 4748 KiB
testcase04.txt AC 94 ms 4748 KiB
testcase05.txt AC 93 ms 4860 KiB
testcase06.txt AC 38 ms 3824 KiB
testcase07.txt AC 91 ms 4760 KiB
testcase08.txt AC 72 ms 4404 KiB
testcase09.txt AC 91 ms 4832 KiB
testcase10.txt AC 37 ms 3820 KiB
testcase11.txt AC 91 ms 4716 KiB
testcase12.txt AC 74 ms 4500 KiB
testcase13.txt AC 93 ms 4716 KiB
testcase14.txt AC 24 ms 3608 KiB
testcase15.txt AC 94 ms 4748 KiB
testcase16.txt AC 91 ms 4756 KiB
testcase17.txt AC 90 ms 4720 KiB
testcase18.txt AC 90 ms 4748 KiB