feat(codeforces): more div3 as
This commit is contained in:
parent
5dac8c409f
commit
20f847575d
40 changed files with 523 additions and 0 deletions
17
codeforces/966/.clang-format
Normal file
17
codeforces/966/.clang-format
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
BasedOnStyle: LLVM
|
||||
IndentWidth: 4
|
||||
UseTab: Never
|
||||
|
||||
AllowShortIfStatementsOnASingleLine: Never
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: None
|
||||
AllowShortLambdasOnASingleLine: None
|
||||
AllowShortBlocksOnASingleLine: Never
|
||||
AllowShortEnumsOnASingleLine: false
|
||||
AllowShortCaseExpressionOnASingleLine: false
|
||||
|
||||
BreakBeforeBraces: Attach
|
||||
ColumnLimit: 100
|
||||
AlignAfterOpenBracket: Align
|
||||
BinPackArguments: false
|
||||
BinPackParameters: false
|
||||
68
codeforces/966/a.cc
Normal file
68
codeforces/966/a.cc
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
#include <bits/stdc++.h> // {{{
|
||||
|
||||
#include <version>
|
||||
#ifdef __cpp_lib_ranges_enumerate
|
||||
#include <ranges>
|
||||
namespace rv = std::views;
|
||||
namespace rs = std::ranges;
|
||||
#endif
|
||||
|
||||
#pragma GCC optimize("O2,unroll-loops")
|
||||
#pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")
|
||||
|
||||
using namespace std;
|
||||
|
||||
using i16 = int16_t;
|
||||
using u16 = uint16_t;
|
||||
using i32 = int32_t;
|
||||
using u32 = uint32_t;
|
||||
using i64 = int64_t;
|
||||
using u64 = uint64_t;
|
||||
using f64 = double;
|
||||
using f128 = long double;
|
||||
|
||||
#if __cplusplus >= 202002L
|
||||
template <typename T>
|
||||
constexpr T MIN = std::numeric_limits<T>::min();
|
||||
|
||||
template <typename T>
|
||||
constexpr T MAX = std::numeric_limits<T>::max();
|
||||
#endif
|
||||
|
||||
#ifdef LOCAL
|
||||
#define db(...) std::print(__VA_ARGS__)
|
||||
#define dbln(...) std::println(__VA_ARGS__)
|
||||
#else
|
||||
#define db(...)
|
||||
#define dbln(...)
|
||||
#endif
|
||||
// }}}
|
||||
|
||||
void solve() {
|
||||
string s;
|
||||
cin >> s;
|
||||
|
||||
if (s.size() >= 3 && s.substr(0, 2) == "10" && stoi(s.substr(2, s.size())) >= 2 && s[2] != '0') {
|
||||
println("YES");
|
||||
} else {
|
||||
println("NO");
|
||||
}
|
||||
}
|
||||
|
||||
int main() { // {{{
|
||||
std::cin.exceptions(std::cin.failbit);
|
||||
#ifdef LOCAL
|
||||
std::cerr.rdbuf(std::cout.rdbuf());
|
||||
std::cout.setf(std::ios::unitbuf);
|
||||
std::cerr.setf(std::ios::unitbuf);
|
||||
#else
|
||||
std::cin.tie(nullptr)->sync_with_stdio(false);
|
||||
#endif
|
||||
u32 tc = 1;
|
||||
std::cin >> tc;
|
||||
for (u32 t = 0; t < tc; ++t) {
|
||||
solve();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
// }}}
|
||||
8
codeforces/966/io/2000a.1.cpin
Normal file
8
codeforces/966/io/2000a.1.cpin
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
7
|
||||
100
|
||||
1010
|
||||
101
|
||||
105
|
||||
2033
|
||||
1019
|
||||
1002
|
||||
7
codeforces/966/io/2000a.1.cpout
Normal file
7
codeforces/966/io/2000a.1.cpout
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
NO
|
||||
YES
|
||||
NO
|
||||
YES
|
||||
NO
|
||||
YES
|
||||
NO
|
||||
9
codeforces/966/io/2000b.1.cpin
Normal file
9
codeforces/966/io/2000b.1.cpin
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
4
|
||||
5
|
||||
5 4 2 1 3
|
||||
3
|
||||
2 3 1
|
||||
4
|
||||
2 3 1 4
|
||||
5
|
||||
1 2 3 5 4
|
||||
4
codeforces/966/io/2000b.1.cpout
Normal file
4
codeforces/966/io/2000b.1.cpout
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
NO
|
||||
YES
|
||||
YES
|
||||
NO
|
||||
19
codeforces/966/io/2000c.1.cpin
Normal file
19
codeforces/966/io/2000c.1.cpin
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
3
|
||||
5
|
||||
3 5 2 1 3
|
||||
2
|
||||
abfda
|
||||
afbfa
|
||||
2
|
||||
1 2
|
||||
3
|
||||
ab
|
||||
abc
|
||||
aa
|
||||
4
|
||||
5 -3 5 -3
|
||||
4
|
||||
aaaa
|
||||
bcbc
|
||||
aba
|
||||
cbcb
|
||||
9
codeforces/966/io/2000c.1.cpout
Normal file
9
codeforces/966/io/2000c.1.cpout
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
YES
|
||||
NO
|
||||
YES
|
||||
NO
|
||||
NO
|
||||
NO
|
||||
YES
|
||||
NO
|
||||
YES
|
||||
13
codeforces/966/io/2000d.1.cpin
Normal file
13
codeforces/966/io/2000d.1.cpin
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
4
|
||||
6
|
||||
3 5 1 4 3 2
|
||||
LRLLLR
|
||||
2
|
||||
2 8
|
||||
LR
|
||||
2
|
||||
3 9
|
||||
RL
|
||||
5
|
||||
1 2 3 4 5
|
||||
LRLRR
|
||||
4
codeforces/966/io/2000d.1.cpout
Normal file
4
codeforces/966/io/2000d.1.cpout
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
18
|
||||
10
|
||||
0
|
||||
22
|
||||
16
codeforces/966/io/2000e.1.cpin
Normal file
16
codeforces/966/io/2000e.1.cpin
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
5
|
||||
3 4 2
|
||||
9
|
||||
1 1 1 1 1 1 1 1 1
|
||||
2 1 1
|
||||
2
|
||||
5 7
|
||||
20 15 7
|
||||
9
|
||||
4 1 4 5 6 1 1000000000 898 777
|
||||
1984 1 1
|
||||
4
|
||||
5 4 1499 2004
|
||||
9 5 5
|
||||
6
|
||||
6 7 14 16 16 6
|
||||
5
codeforces/966/io/2000e.1.cpout
Normal file
5
codeforces/966/io/2000e.1.cpout
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
21
|
||||
12
|
||||
49000083104
|
||||
3512
|
||||
319
|
||||
27
codeforces/966/io/2000f.1.cpin
Normal file
27
codeforces/966/io/2000f.1.cpin
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
7
|
||||
1 4
|
||||
6 3
|
||||
1 5
|
||||
4 4
|
||||
5 10
|
||||
1 1
|
||||
1 1
|
||||
1 1
|
||||
1 1
|
||||
1 1
|
||||
2 100
|
||||
1 2
|
||||
5 6
|
||||
3 11
|
||||
2 2
|
||||
3 3
|
||||
4 4
|
||||
3 25
|
||||
9 2
|
||||
4 3
|
||||
8 10
|
||||
4 18
|
||||
5 4
|
||||
8 5
|
||||
8 3
|
||||
6 2
|
||||
7
codeforces/966/io/2000f.1.cpout
Normal file
7
codeforces/966/io/2000f.1.cpout
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
12
|
||||
14
|
||||
5
|
||||
-1
|
||||
17
|
||||
80
|
||||
35
|
||||
36
codeforces/966/io/2000g.1.cpin
Normal file
36
codeforces/966/io/2000g.1.cpin
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
7
|
||||
5 5
|
||||
100 20 80
|
||||
1 5 30 100
|
||||
1 2 20 50
|
||||
2 3 20 50
|
||||
3 4 20 50
|
||||
4 5 20 50
|
||||
2 1
|
||||
100 50 60
|
||||
1 2 55 110
|
||||
4 4
|
||||
100 40 60
|
||||
1 2 30 100
|
||||
2 4 30 100
|
||||
1 3 20 50
|
||||
3 4 20 50
|
||||
3 3
|
||||
100 80 90
|
||||
1 2 1 10
|
||||
2 3 10 50
|
||||
1 3 20 21
|
||||
3 2
|
||||
58 55 57
|
||||
2 1 1 3
|
||||
2 3 3 4
|
||||
2 1
|
||||
12 9 10
|
||||
2 1 6 10
|
||||
5 5
|
||||
8 5 6
|
||||
2 1 1 8
|
||||
2 3 4 8
|
||||
4 2 2 4
|
||||
5 3 3 4
|
||||
4 5 2 6
|
||||
7
codeforces/966/io/2000g.1.cpout
Normal file
7
codeforces/966/io/2000g.1.cpout
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
0
|
||||
-1
|
||||
60
|
||||
80
|
||||
53
|
||||
3
|
||||
2
|
||||
44
codeforces/966/io/2000h.1.cpin
Normal file
44
codeforces/966/io/2000h.1.cpin
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
3
|
||||
5
|
||||
1 2 5 905 2000000
|
||||
15
|
||||
- 2
|
||||
? 2
|
||||
? 1
|
||||
- 1
|
||||
? 1
|
||||
+ 4
|
||||
+ 2
|
||||
? 2
|
||||
+ 6
|
||||
- 4
|
||||
+ 7
|
||||
? 2
|
||||
? 3
|
||||
? 4
|
||||
? 2000000
|
||||
5
|
||||
3 4 5 6 8
|
||||
9
|
||||
? 5
|
||||
- 5
|
||||
? 5
|
||||
+ 1
|
||||
? 2
|
||||
- 6
|
||||
- 8
|
||||
+ 6
|
||||
? 5
|
||||
5
|
||||
6 7 8 9 10
|
||||
10
|
||||
? 5
|
||||
- 6
|
||||
? 4
|
||||
- 10
|
||||
+ 5
|
||||
- 8
|
||||
+ 3
|
||||
+ 2
|
||||
- 3
|
||||
+ 10
|
||||
3
codeforces/966/io/2000h.1.cpout
Normal file
3
codeforces/966/io/2000h.1.cpout
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
2 2 1 6 3 8 8 2000001
|
||||
9 9 9 7
|
||||
1 1
|
||||
17
codeforces/988/.clang-format
Normal file
17
codeforces/988/.clang-format
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
BasedOnStyle: LLVM
|
||||
IndentWidth: 4
|
||||
UseTab: Never
|
||||
|
||||
AllowShortIfStatementsOnASingleLine: Never
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: None
|
||||
AllowShortLambdasOnASingleLine: None
|
||||
AllowShortBlocksOnASingleLine: Never
|
||||
AllowShortEnumsOnASingleLine: false
|
||||
AllowShortCaseExpressionOnASingleLine: false
|
||||
|
||||
BreakBeforeBraces: Attach
|
||||
ColumnLimit: 100
|
||||
AlignAfterOpenBracket: Align
|
||||
BinPackArguments: false
|
||||
BinPackParameters: false
|
||||
71
codeforces/988/a.cc
Normal file
71
codeforces/988/a.cc
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
#include <bits/stdc++.h> // {{{
|
||||
|
||||
#include <version>
|
||||
#ifdef __cpp_lib_ranges_enumerate
|
||||
#include <ranges>
|
||||
namespace rv = std::views;
|
||||
namespace rs = std::ranges;
|
||||
#endif
|
||||
|
||||
#pragma GCC optimize("O2,unroll-loops")
|
||||
#pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")
|
||||
|
||||
using namespace std;
|
||||
|
||||
using i16 = int16_t;
|
||||
using u16 = uint16_t;
|
||||
using i32 = int32_t;
|
||||
using u32 = uint32_t;
|
||||
using i64 = int64_t;
|
||||
using u64 = uint64_t;
|
||||
using f64 = double;
|
||||
using f128 = long double;
|
||||
|
||||
#if __cplusplus >= 202002L
|
||||
template <typename T> constexpr T MIN = std::numeric_limits<T>::min();
|
||||
|
||||
template <typename T> constexpr T MAX = std::numeric_limits<T>::max();
|
||||
#endif
|
||||
|
||||
#ifdef LOCAL
|
||||
#define db(...) std::print(__VA_ARGS__)
|
||||
#define dbln(...) std::println(__VA_ARGS__)
|
||||
#else
|
||||
#define db(...)
|
||||
#define dbln(...)
|
||||
#endif
|
||||
// }}}
|
||||
|
||||
vector<u32> f(21);
|
||||
void solve() {
|
||||
u32 n;
|
||||
cin >> n;
|
||||
f.assign(f.size(), 0);
|
||||
u32 a;
|
||||
for (u32 i = 0; i < n; ++i) {
|
||||
cin >> a;
|
||||
++f[a];
|
||||
}
|
||||
|
||||
println("{}", accumulate(begin(f), end(f), 0, [](auto acc, auto x) {
|
||||
return acc + x / 2;
|
||||
}));
|
||||
}
|
||||
|
||||
int main() { // {{{
|
||||
std::cin.exceptions(std::cin.failbit);
|
||||
#ifdef LOCAL
|
||||
std::cerr.rdbuf(std::cout.rdbuf());
|
||||
std::cout.setf(std::ios::unitbuf);
|
||||
std::cerr.setf(std::ios::unitbuf);
|
||||
#else
|
||||
std::cin.tie(nullptr)->sync_with_stdio(false);
|
||||
#endif
|
||||
u32 tc = 1;
|
||||
std::cin >> tc;
|
||||
for (u32 t = 0; t < tc; ++t) {
|
||||
solve();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
// }}}
|
||||
11
codeforces/988/io/2037a.1.cpin
Normal file
11
codeforces/988/io/2037a.1.cpin
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
5
|
||||
1
|
||||
1
|
||||
2
|
||||
2 2
|
||||
2
|
||||
1 2
|
||||
4
|
||||
1 2 3 1
|
||||
6
|
||||
1 2 3 1 2 3
|
||||
5
codeforces/988/io/2037a.1.cpout
Normal file
5
codeforces/988/io/2037a.1.cpout
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
0
|
||||
1
|
||||
0
|
||||
1
|
||||
3
|
||||
11
codeforces/988/io/2037b.1.cpin
Normal file
11
codeforces/988/io/2037b.1.cpin
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
5
|
||||
3
|
||||
1 1 2
|
||||
11
|
||||
3 3 4 5 6 7 8 9 9 10 11
|
||||
8
|
||||
8 4 8 3 8 2 8 1
|
||||
6
|
||||
2 1 4 5 3 3
|
||||
8
|
||||
1 2 6 3 8 5 5 3
|
||||
5
codeforces/988/io/2037b.1.cpout
Normal file
5
codeforces/988/io/2037b.1.cpout
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
1 1
|
||||
3 3
|
||||
2 3
|
||||
4 1
|
||||
1 6
|
||||
3
codeforces/988/io/2037c.1.cpin
Normal file
3
codeforces/988/io/2037c.1.cpin
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
2
|
||||
3
|
||||
8
|
||||
2
codeforces/988/io/2037c.1.cpout
Normal file
2
codeforces/988/io/2037c.1.cpout
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
-1
|
||||
1 8 7 3 6 2 4 5
|
||||
27
codeforces/988/io/2037d.1.cpin
Normal file
27
codeforces/988/io/2037d.1.cpin
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
4
|
||||
2 5 50
|
||||
7 14
|
||||
30 40
|
||||
2 2
|
||||
3 1
|
||||
3 5
|
||||
18 2
|
||||
22 32
|
||||
4 3 50
|
||||
4 6
|
||||
15 18
|
||||
20 26
|
||||
34 38
|
||||
1 2
|
||||
8 2
|
||||
10 2
|
||||
1 4 17
|
||||
10 14
|
||||
1 6
|
||||
1 2
|
||||
1 2
|
||||
16 9
|
||||
1 2 10
|
||||
5 9
|
||||
2 3
|
||||
2 2
|
||||
4
codeforces/988/io/2037d.1.cpout
Normal file
4
codeforces/988/io/2037d.1.cpout
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
4
|
||||
-1
|
||||
1
|
||||
2
|
||||
14
codeforces/988/io/2037e.1.cpin
Normal file
14
codeforces/988/io/2037e.1.cpin
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
2
|
||||
5
|
||||
|
||||
4
|
||||
|
||||
0
|
||||
|
||||
1
|
||||
|
||||
2
|
||||
|
||||
2
|
||||
|
||||
0
|
||||
13
codeforces/988/io/2037e.1.cpout
Normal file
13
codeforces/988/io/2037e.1.cpout
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
? 1 5
|
||||
|
||||
? 2 4
|
||||
|
||||
? 4 5
|
||||
|
||||
? 3 5
|
||||
|
||||
! 01001
|
||||
|
||||
? 1 2
|
||||
|
||||
! IMPOSSIBLE
|
||||
19
codeforces/988/io/2037f.1.cpin
Normal file
19
codeforces/988/io/2037f.1.cpin
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
6
|
||||
5 5 3
|
||||
7 7 7 7 7
|
||||
1 2 3 4 5
|
||||
9 5 9
|
||||
2 4 6 8 10 8 6 4 2
|
||||
1 2 3 4 5 6 7 8 9
|
||||
2 10 2
|
||||
1 1
|
||||
1 20
|
||||
2 10 1
|
||||
69696969 420420420
|
||||
1 20
|
||||
2 10 2
|
||||
10 15
|
||||
1 19
|
||||
2 2 2
|
||||
1000000000 1
|
||||
1 3
|
||||
6
codeforces/988/io/2037f.1.cpout
Normal file
6
codeforces/988/io/2037f.1.cpout
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
2
|
||||
2
|
||||
-1
|
||||
6969697
|
||||
15
|
||||
1000000000
|
||||
2
codeforces/988/io/2037g.1.cpin
Normal file
2
codeforces/988/io/2037g.1.cpin
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
5
|
||||
2 6 3 4 6
|
||||
1
codeforces/988/io/2037g.1.cpout
Normal file
1
codeforces/988/io/2037g.1.cpout
Normal file
|
|
@ -0,0 +1 @@
|
|||
5
|
||||
2
codeforces/988/io/2037g.2.cpin
Normal file
2
codeforces/988/io/2037g.2.cpin
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
5
|
||||
4 196 2662 2197 121
|
||||
1
codeforces/988/io/2037g.2.cpout
Normal file
1
codeforces/988/io/2037g.2.cpout
Normal file
|
|
@ -0,0 +1 @@
|
|||
2
|
||||
2
codeforces/988/io/2037g.3.cpin
Normal file
2
codeforces/988/io/2037g.3.cpin
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
7
|
||||
3 6 8 9 11 12 20
|
||||
1
codeforces/988/io/2037g.3.cpout
Normal file
1
codeforces/988/io/2037g.3.cpout
Normal file
|
|
@ -0,0 +1 @@
|
|||
7
|
||||
2
codeforces/988/io/2037g.4.cpin
Normal file
2
codeforces/988/io/2037g.4.cpin
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
2
|
||||
2 3
|
||||
1
codeforces/988/io/2037g.4.cpout
Normal file
1
codeforces/988/io/2037g.4.cpout
Normal file
|
|
@ -0,0 +1 @@
|
|||
0
|
||||
Loading…
Add table
Add a link
Reference in a new issue