diff options
Diffstat (limited to 'contests/Round#809/A/B')
| -rwxr-xr-x | contests/Round#809/A/B/C/D/E/F/main.cpp | 13 | ||||
| -rwxr-xr-x | contests/Round#809/A/B/C/D/E/main.cpp | 13 | ||||
| -rwxr-xr-x | contests/Round#809/A/B/C/D/main.cpp | 13 | ||||
| -rwxr-xr-x | contests/Round#809/A/B/C/main.cpp | 13 | ||||
| -rwxr-xr-x | contests/Round#809/A/B/main | bin | 31808 -> 0 bytes | |||
| -rwxr-xr-x | contests/Round#809/A/B/main.cpp | 58 | ||||
| -rwxr-xr-x | contests/Round#809/A/B/main_input0.txt | 13 | ||||
| -rwxr-xr-x | contests/Round#809/A/B/main_input1.txt | 3 | ||||
| -rwxr-xr-x | contests/Round#809/A/B/main_input2.txt | 3 | ||||
| -rwxr-xr-x | contests/Round#809/A/B/main_input3.txt | 3 | ||||
| -rwxr-xr-x | contests/Round#809/A/B/main_output0.txt | 6 | ||||
| -rwxr-xr-x | contests/Round#809/A/B/main_output1.txt | 1 | ||||
| -rwxr-xr-x | contests/Round#809/A/B/main_output2.txt | 1 | ||||
| -rwxr-xr-x | contests/Round#809/A/B/main_output3.txt | 1 |
14 files changed, 0 insertions, 141 deletions
diff --git a/contests/Round#809/A/B/C/D/E/F/main.cpp b/contests/Round#809/A/B/C/D/E/F/main.cpp deleted file mode 100755 index 9549f1d..0000000 --- a/contests/Round#809/A/B/C/D/E/F/main.cpp +++ /dev/null @@ -1,13 +0,0 @@ -#include<bits/stdc++.h> - -using namespace std; - -int main () { - ios_base::sync_with_stdio(false); - cin.tie(NULL); - int tt; - cin >> tt; - while(tt--){ - - } -} diff --git a/contests/Round#809/A/B/C/D/E/main.cpp b/contests/Round#809/A/B/C/D/E/main.cpp deleted file mode 100755 index 9549f1d..0000000 --- a/contests/Round#809/A/B/C/D/E/main.cpp +++ /dev/null @@ -1,13 +0,0 @@ -#include<bits/stdc++.h> - -using namespace std; - -int main () { - ios_base::sync_with_stdio(false); - cin.tie(NULL); - int tt; - cin >> tt; - while(tt--){ - - } -} diff --git a/contests/Round#809/A/B/C/D/main.cpp b/contests/Round#809/A/B/C/D/main.cpp deleted file mode 100755 index 9549f1d..0000000 --- a/contests/Round#809/A/B/C/D/main.cpp +++ /dev/null @@ -1,13 +0,0 @@ -#include<bits/stdc++.h> - -using namespace std; - -int main () { - ios_base::sync_with_stdio(false); - cin.tie(NULL); - int tt; - cin >> tt; - while(tt--){ - - } -} diff --git a/contests/Round#809/A/B/C/main.cpp b/contests/Round#809/A/B/C/main.cpp deleted file mode 100755 index 9549f1d..0000000 --- a/contests/Round#809/A/B/C/main.cpp +++ /dev/null @@ -1,13 +0,0 @@ -#include<bits/stdc++.h> - -using namespace std; - -int main () { - ios_base::sync_with_stdio(false); - cin.tie(NULL); - int tt; - cin >> tt; - while(tt--){ - - } -} diff --git a/contests/Round#809/A/B/main b/contests/Round#809/A/B/main Binary files differdeleted file mode 100755 index 12f7c31..0000000 --- a/contests/Round#809/A/B/main +++ /dev/null diff --git a/contests/Round#809/A/B/main.cpp b/contests/Round#809/A/B/main.cpp deleted file mode 100755 index 90c55c2..0000000 --- a/contests/Round#809/A/B/main.cpp +++ /dev/null @@ -1,58 +0,0 @@ -#include <bits/stdc++.h> - -using namespace std; - -bool isCool(vector<int> &a, int i) { - if (i == 0) { - return false; - } - if (a[i - 1] < a[i] && a[i + 1] < a[i]) { - return true; - } - return false; -} - -int main() { - ios_base::sync_with_stdio(false); - cin.tie(NULL); - int tt; - cin >> tt; - while (tt--) { - int n; - cin >> n; - vector<int> a(n); - for (int &x : a) - cin >> x; - long long ans = 0; - long long mx = 0; - int max_cool = (n - 1) / 2; - int cnt = 0; - if(n > 3) { - for (int i = 1; i < n - 1; i++) { - if(isCool(a,i)) { - cnt++; - } - if (!isCool(a, i) && i % 2 == 0) { - ans += abs(a[i] - max(a[i - 1], a[i + 1])) + 1; - } else if(!isCool(a, i) && i % 2 != 0) { - mx += abs(a[i] - max(a[i - 1], a[i + 1])) + 1; - } - } - long long mx2 = 0; - for (int i = 1; i < n - 1; i += 3) { - if (!isCool(a, i)) { - mx2 += abs(a[i] - max(a[i - 1], a[i + 1])) + 1; - } - } - cerr << mx << " " << ans << " " << mx2 << endl; - if(cnt < max_cool) { - // cout << max(mx2, max(ans, mx)) << endl; - } else { - cout << min(mx2, min(ans, mx)) << endl; - } - - } else { - cout << abs(a[1] - max(a[0], a[2])) + 1 << endl; - } - } -} diff --git a/contests/Round#809/A/B/main_input0.txt b/contests/Round#809/A/B/main_input0.txt deleted file mode 100755 index 3781f01..0000000 --- a/contests/Round#809/A/B/main_input0.txt +++ /dev/null @@ -1,13 +0,0 @@ -6 -3 -2 1 2 -5 -1 2 1 4 3 -6 -3 1 4 5 5 2 -8 -4 2 1 3 5 3 6 1 -6 -1 10 1 1 10 1 -8 -1 10 11 1 10 11 10 1 diff --git a/contests/Round#809/A/B/main_input1.txt b/contests/Round#809/A/B/main_input1.txt deleted file mode 100755 index 07c8f0a..0000000 --- a/contests/Round#809/A/B/main_input1.txt +++ /dev/null @@ -1,3 +0,0 @@ -1 -4 -1 2 2 1
\ No newline at end of file diff --git a/contests/Round#809/A/B/main_input2.txt b/contests/Round#809/A/B/main_input2.txt deleted file mode 100755 index b5a46e0..0000000 --- a/contests/Round#809/A/B/main_input2.txt +++ /dev/null @@ -1,3 +0,0 @@ -1 -5 -1 1 1 4 3
\ No newline at end of file diff --git a/contests/Round#809/A/B/main_input3.txt b/contests/Round#809/A/B/main_input3.txt deleted file mode 100755 index fb1fbc0..0000000 --- a/contests/Round#809/A/B/main_input3.txt +++ /dev/null @@ -1,3 +0,0 @@ -1 -7 -1000000000 1 1000000000 1 1000000000 1 1000000000
\ No newline at end of file diff --git a/contests/Round#809/A/B/main_output0.txt b/contests/Round#809/A/B/main_output0.txt deleted file mode 100755 index 6a9dd24..0000000 --- a/contests/Round#809/A/B/main_output0.txt +++ /dev/null @@ -1,6 +0,0 @@ -2 -0 -3 -3 -0 -4 diff --git a/contests/Round#809/A/B/main_output1.txt b/contests/Round#809/A/B/main_output1.txt deleted file mode 100755 index 56a6051..0000000 --- a/contests/Round#809/A/B/main_output1.txt +++ /dev/null @@ -1 +0,0 @@ -1
\ No newline at end of file diff --git a/contests/Round#809/A/B/main_output2.txt b/contests/Round#809/A/B/main_output2.txt deleted file mode 100755 index 56a6051..0000000 --- a/contests/Round#809/A/B/main_output2.txt +++ /dev/null @@ -1 +0,0 @@ -1
\ No newline at end of file diff --git a/contests/Round#809/A/B/main_output3.txt b/contests/Round#809/A/B/main_output3.txt deleted file mode 100755 index c227083..0000000 --- a/contests/Round#809/A/B/main_output3.txt +++ /dev/null @@ -1 +0,0 @@ -0
\ No newline at end of file |
