# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1281229 | tunademayo | Marathon Race 2 (JOI24_ho_t3) | C++20 | 0 ms | 0 KiB |
#include<bits/stdc++.h>
using namespace std;
#define ll long long
const bool Multitest = 0;
const int N = 5e5 + 10, M = 800;
int a[N]; vector<int> pos;
void work()
{
cin >> n >> m;
for(int i = 1 ; i <= m ; i++)
{
int x; cin >> x;
a[x]++;
}
for(int i = 1 ; i <= m ; i++)
{
if(a[i]) pos.push_back(i);
}
cin >> q;
while(q--)
{
int l, r, t; cin >> l >> r >> t;
if(b.size() > M)
{
cout << "No" << '\n';
return;
}
cout << "Yes" << '\n';
}
}
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(0); cout.tie(0);
if(fopen("boardgame.inp", "r"))
{
freopen("boardgame.inp", "r", stdin);
freopen("boardgame.out", "w", stdout);
}
int q = 1;
if(Multitest) cin >> q;
while(q--) work();
}