Precreation contest files
This commit is contained in:
BIN
Codeforces/CodeforcesRound1034(Div3)/BTournament/cpp.out
Executable file
BIN
Codeforces/CodeforcesRound1034(Div3)/BTournament/cpp.out
Executable file
Binary file not shown.
7
Codeforces/CodeforcesRound1034(Div3)/BTournament/input1
Normal file
7
Codeforces/CodeforcesRound1034(Div3)/BTournament/input1
Normal file
@@ -0,0 +1,7 @@
|
||||
3
|
||||
5 2 3
|
||||
3 2 4 4 1
|
||||
5 4 1
|
||||
5 3 4 5 2
|
||||
6 1 1
|
||||
1 2 3 4 5 6
|
||||
3
Codeforces/CodeforcesRound1034(Div3)/BTournament/output1
Normal file
3
Codeforces/CodeforcesRound1034(Div3)/BTournament/output1
Normal file
@@ -0,0 +1,3 @@
|
||||
YES
|
||||
YES
|
||||
NO
|
||||
@@ -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();
|
||||
}
|
||||
Reference in New Issue
Block a user