提出 #39413532


ソースコード 拡げる

#include <bits/stdc++.h>
using namespace std;
#define ll long long
/*--------------CHARAN YADAV------------------------*/
int main() {
      ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    
      ll n,q;
      cin>>n>>q;
      map<ll,ll>mp;
      for(ll i=1;i<=n;i++)
      {
          mp[i]=0;
      }
      
      while(q--)
      {
          ll a,b;
          cin>>a>>b;
          if(a==1)
          {
              mp[b]++;
          }
          else if(a==2)
          {
              mp[b]++;
              mp[b]++;
          }
          else if(a==3)
          {
              if(mp[b]<2)
              cout<<"No"<<"\n";
              else
              cout<<"Yes"<<"\n";
          }
          
      }
     
     
    
    return 0;
}

提出情報

提出日時
問題 B - Yellow and Red Card
ユーザ Charan06
言語 C++ (GCC 9.2.1)
得点 200
コード長 815 Byte
結果 AC
実行時間 7 ms
メモリ 3548 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 200 / 200
結果
AC × 1
AC × 17
セット名 テストケース
Sample 00_sample_00.txt
All 00_sample_00.txt, 01_corner_00.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, 03_n_min_00.txt, 03_n_min_01.txt, 03_n_min_02.txt, 04_no_exit_00.txt, 04_no_exit_01.txt
ケース名 結果 実行時間 メモリ
00_sample_00.txt AC 7 ms 3544 KiB
01_corner_00.txt AC 2 ms 3544 KiB
02_random_00.txt AC 2 ms 3448 KiB
02_random_01.txt AC 2 ms 3392 KiB
02_random_02.txt AC 2 ms 3392 KiB
02_random_03.txt AC 2 ms 3464 KiB
02_random_04.txt AC 2 ms 3508 KiB
02_random_05.txt AC 2 ms 3516 KiB
02_random_06.txt AC 2 ms 3548 KiB
02_random_07.txt AC 2 ms 3448 KiB
02_random_08.txt AC 2 ms 3548 KiB
02_random_09.txt AC 2 ms 3436 KiB
03_n_min_00.txt AC 2 ms 3544 KiB
03_n_min_01.txt AC 2 ms 3536 KiB
03_n_min_02.txt AC 2 ms 3492 KiB
04_no_exit_00.txt AC 2 ms 3468 KiB
04_no_exit_01.txt AC 4 ms 3540 KiB