結果
| 問題 |
No.3197 Frequency Counter
|
| コンテスト | |
| ユーザー |
Cafe1942
|
| 提出日時 | 2025-07-11 21:27:39 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 297 ms / 2,000 ms |
| コード長 | 1,046 bytes |
| コンパイル時間 | 1,151 ms |
| コンパイル使用メモリ | 117,096 KB |
| 実行使用メモリ | 12,928 KB |
| 最終ジャッジ日時 | 2025-07-11 21:27:50 |
| 合計ジャッジ時間 | 3,617 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 21 |
ソースコード
#include <iostream>
#include <iomanip>//小数点出力用
//cout << fixed << setprecision(10) << ans;
#include <cmath>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <unordered_map>
using ll = long long;
using namespace std;
#define modPHash (ll)((1LL<<61)-1)
#define modP (ll)998244353
bool chkrng0idx(int pos, int sup) { return (0 <= pos && pos < sup); }
int clk4(int num) { return (num - 2) * (num % 2); }
void yn(bool tf) { cout << (tf ? "Yes\n" : "No\n"); }
int main() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
int N;
cin >> N;
map<int, int>M;
while (N--) {
int X;
cin >> X;
if (M.find(X) == M.end()) {
M[X] = 1;
}
else {
M[X]++;
}
}
int Q;
cin >> Q;
while (Q--) {
int X;
cin >> X;
int K;
cin >> K;
if (M.find(X) == M.end()) {
yn(0);
}
else {
yn(M[X] >= K);
}
}
}
Cafe1942