Submission #57739087
Source Code Expand
/*
Author : Hocky Yudhiono
Saturday, September 14, 2024 PM08:02:25
*/
#include "bits/stdc++.h"
using namespace std;
typedef long long LL;
typedef vector<int> vi;
typedef vector<LL> vl;
typedef vector<vi> vvi;
typedef vector<vl> vvl;
typedef pair<int, int> PII;
typedef pair<int, int> pii;
typedef pair<LL, LL> PLL;
typedef pair<LL, LL> pll;
typedef long double ld;
#define rep(i, a, b) for(int i = a; i < (b); ++i)
#define trav(a, x) for(auto& a : x)
#define all(x) begin(x), end(x)
#define sz(x) (int)(x).size()
#define popf pop_front
#define pf push_front
#define popb pop_back
#define pb push_back
#define fi first
#define se second
const double EPS = 1e-9;
const int INFMEM = 63;
// Do dir^1 to get reverse direction
const int dx[8] = {0,0,1,-1,1,-1,1,-1};
const int dy[8] = {1,-1,0,0,1,-1,-1,1};
const char dch[4] = {'R','L','D','U'};
// Do (dir + 2)%4 to get reverse direction
// const int dx[8] = {-1,0,1,0,-1,1,1,-1};
// const int dy[8] = {0,1,0,-1,1,1,-1,-1};
// const char dch[4] = {'U','R','D','L'};
const double PI = 3.141592653589793;
inline void fasterios(){
cin.tie(0)->sync_with_stdio(0);
cin.exceptions(cin.failbit);
}
#define endl '\n'
const int MOD = 1000000007;
// const int MOD = 998244353;
int main(){
fasterios();
LL m, n; cin >> m >> n;
set <LL> taroed;
for(int i = 1;i <= n;i++){
LL family;
char gender; cin >> family >> gender;
if(gender == 'F' || taroed.count(family)) {
cout << "No" << endl;
} else {
taroed.insert(family);
cout << "Yes" << endl;
}
}
}
Submission Info
Submission Time |
|
Task |
B - Taro |
User |
hocky |
Language |
C++ 20 (gcc 12.2) |
Score |
200 |
Code Size |
1604 Byte |
Status |
AC |
Exec Time |
1 ms |
Memory |
3604 KiB |
Judge Result
Set Name |
Sample |
All |
Score / Max Score |
0 / 0 |
200 / 200 |
Status |
|
|
Set Name |
Test Cases |
Sample |
00_sample_01.txt, 00_sample_02.txt |
All |
00_sample_01.txt, 00_sample_02.txt, 01_test_01.txt, 01_test_02.txt, 01_test_03.txt, 01_test_04.txt, 01_test_05.txt, 01_test_06.txt, 01_test_07.txt, 01_test_08.txt, 01_test_09.txt, 01_test_10.txt, 01_test_11.txt, 01_test_12.txt, 01_test_13.txt, 01_test_14.txt |
Case Name |
Status |
Exec Time |
Memory |
00_sample_01.txt |
AC |
1 ms |
3412 KiB |
00_sample_02.txt |
AC |
1 ms |
3456 KiB |
01_test_01.txt |
AC |
1 ms |
3392 KiB |
01_test_02.txt |
AC |
1 ms |
3428 KiB |
01_test_03.txt |
AC |
1 ms |
3468 KiB |
01_test_04.txt |
AC |
1 ms |
3472 KiB |
01_test_05.txt |
AC |
1 ms |
3412 KiB |
01_test_06.txt |
AC |
1 ms |
3464 KiB |
01_test_07.txt |
AC |
1 ms |
3600 KiB |
01_test_08.txt |
AC |
1 ms |
3432 KiB |
01_test_09.txt |
AC |
1 ms |
3484 KiB |
01_test_10.txt |
AC |
1 ms |
3604 KiB |
01_test_11.txt |
AC |
1 ms |
3420 KiB |
01_test_12.txt |
AC |
1 ms |
3512 KiB |
01_test_13.txt |
AC |
1 ms |
3464 KiB |
01_test_14.txt |
AC |
1 ms |
3476 KiB |