Precreation contest files
This commit is contained in:
BIN
Codeforces/CodeforcesRound1034(Div3)/ABlackboardGame/cpp.out
Executable file
BIN
Codeforces/CodeforcesRound1034(Div3)/ABlackboardGame/cpp.out
Executable file
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
5
|
||||
2
|
||||
4
|
||||
5
|
||||
7
|
||||
100
|
||||
@@ -0,0 +1,5 @@
|
||||
Alice
|
||||
Bob
|
||||
Alice
|
||||
Alice
|
||||
Bob
|
||||
@@ -0,0 +1,16 @@
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main() {
|
||||
int t;
|
||||
cin >> t;
|
||||
while (t--) {
|
||||
int n;
|
||||
cin >> n;
|
||||
if (!(n & ((1 << 2) - 1)))
|
||||
cout << "Bob\n";
|
||||
else
|
||||
cout << "Alice\n";
|
||||
}
|
||||
}
|
||||
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();
|
||||
}
|
||||
BIN
Codeforces/CodeforcesRound1034(Div3)/CPrefixMinandSuffixMax/cpp.out
Executable file
BIN
Codeforces/CodeforcesRound1034(Div3)/CPrefixMinandSuffixMax/cpp.out
Executable file
Binary file not shown.
@@ -0,0 +1,7 @@
|
||||
3
|
||||
6
|
||||
1 3 5 4 7 2
|
||||
4
|
||||
13 10 12 20
|
||||
7
|
||||
1 2 3 4 5 6 7
|
||||
@@ -0,0 +1,3 @@
|
||||
100011
|
||||
1101
|
||||
1000001
|
||||
@@ -0,0 +1,40 @@
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
|
||||
using namespace std;
|
||||
|
||||
void min_maxer(vector<int> &_a, vector<int> &pre, vector<int> &stu,
|
||||
vector<bool> &map) {
|
||||
int n = _a.size();
|
||||
map[0] = true;
|
||||
map[n - 1] = true;
|
||||
|
||||
for (int i = 1; i < n; i++) {
|
||||
if (_a[i] < _a[i - 1])
|
||||
map[i] = true;
|
||||
if (_a[n - i - 1] < _a[n - i - 2])
|
||||
map[i] = true;
|
||||
}
|
||||
}
|
||||
|
||||
void solve() {
|
||||
int n;
|
||||
cin >> n;
|
||||
vector<int> a(n);
|
||||
for (auto &i : a)
|
||||
cin >> i;
|
||||
|
||||
vector<int> min_prefix(n), max_stufix(n);
|
||||
vector<bool> map(n);
|
||||
min_maxer(a, min_prefix, max_stufix, map);
|
||||
for (auto i : map)
|
||||
cout << i;
|
||||
cout << "\n";
|
||||
}
|
||||
|
||||
int main() {
|
||||
int t;
|
||||
cin >> t;
|
||||
while (t--)
|
||||
solve();
|
||||
}
|
||||
11
Codeforces/CodeforcesRound1034(Div3)/EMEXCount/input1
Normal file
11
Codeforces/CodeforcesRound1034(Div3)/EMEXCount/input1
Normal file
@@ -0,0 +1,11 @@
|
||||
5
|
||||
5
|
||||
1 0 0 1 2
|
||||
6
|
||||
3 2 0 4 5 1
|
||||
6
|
||||
1 2 0 1 3 2
|
||||
4
|
||||
0 3 4 1
|
||||
5
|
||||
0 0 0 0 0
|
||||
5
Codeforces/CodeforcesRound1034(Div3)/EMEXCount/output1
Normal file
5
Codeforces/CodeforcesRound1034(Div3)/EMEXCount/output1
Normal file
@@ -0,0 +1,5 @@
|
||||
1 2 4 3 2 1
|
||||
1 6 5 4 3 2 1
|
||||
1 3 5 4 3 2 1
|
||||
1 3 3 2 1
|
||||
1 1 1 1 1 1
|
||||
31
Codeforces/CodeforcesRound1034(Div3)/EMEXCount/solution.cpp
Normal file
31
Codeforces/CodeforcesRound1034(Div3)/EMEXCount/solution.cpp
Normal file
@@ -0,0 +1,31 @@
|
||||
#include "iostream"
|
||||
#include <map>
|
||||
|
||||
using namespace std;
|
||||
|
||||
void solve() {
|
||||
int n, x;
|
||||
cin >> n;
|
||||
map<int, int> hash_map;
|
||||
|
||||
for (int i = 0; i < n; i++) {
|
||||
cin >> x;
|
||||
if (hash_map.count(x) == 0)
|
||||
hash_map[x] = 1;
|
||||
else
|
||||
hash_map[x]++;
|
||||
}
|
||||
|
||||
for (int k = 0; k <= n; k++) {
|
||||
int cur_mex = 0;
|
||||
for (auto &i : hash_map) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int main() {
|
||||
int t;
|
||||
cin >> t;
|
||||
while (t--)
|
||||
solve();
|
||||
}
|
||||
Reference in New Issue
Block a user