Precreation contest files

This commit is contained in:
2026-02-11 11:28:23 +07:00
parent 0a8ea477bb
commit cb9f7cab30
134 changed files with 1848 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
void solve() {
int n, j, k;
cin >> n >> j >> k;
vector<int> a(n);
for (auto &i : a)
cin >> i;
if (a[j - 1] == *max_element(a.begin(), a.end())) {
cout << "YES\n";
return;
}
if (k >= 2)
cout << "YES\n";
else
cout << "NO\n";
}
int main() {
int t;
cin >> t;
while (t--)
solve();
}