aboutsummaryrefslogtreecommitdiff
path: root/contests/05-05-2022(Div.3)/B
diff options
context:
space:
mode:
authorOmar Magdy <omar.professional8777@gmail.com>2022-05-30 00:18:17 +0200
committerOmar Magdy <omar.professional8777@gmail.com>2022-05-30 00:18:17 +0200
commit3a89fc707253f75f46fd5a4822817f1fd5156c40 (patch)
tree474b08b187895af91c10838aae21142b2ba2514d /contests/05-05-2022(Div.3)/B
parentf5ff62a26052f084b6b807cba220c86785fd45e3 (diff)
downloadcompetitive-programming-3a89fc707253f75f46fd5a4822817f1fd5156c40.tar.xz
competitive-programming-3a89fc707253f75f46fd5a4822817f1fd5156c40.zip
Made that every problem is its own folder to make building the code a smooth operation with a shortcut
Diffstat (limited to 'contests/05-05-2022(Div.3)/B')
-rw-r--r--[-rwxr-xr-x]contests/05-05-2022(Div.3)/B/Bbin33024 -> 808 bytes
-rw-r--r--contests/05-05-2022(Div.3)/B/B.cpp48
2 files changed, 0 insertions, 48 deletions
diff --git a/contests/05-05-2022(Div.3)/B/B b/contests/05-05-2022(Div.3)/B/B
index af9715e..27c4853 100755..100644
--- a/contests/05-05-2022(Div.3)/B/B
+++ b/contests/05-05-2022(Div.3)/B/B
Binary files differ
diff --git a/contests/05-05-2022(Div.3)/B/B.cpp b/contests/05-05-2022(Div.3)/B/B.cpp
deleted file mode 100644
index 27c4853..0000000
--- a/contests/05-05-2022(Div.3)/B/B.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-#include<bits/stdc++.h>
-
-using namespace std;
-
-bool isIncreasing(vector<int> v){
- for(int i = 0; i < v.size() - 1; i++) {
- if(v[i] >= v[i+1]) {
- return false;
- }
- }
- return true;
-}
-int getIndex(vector<int> v){
- int index;
- for(int i = 0; i < v.size(); i++) {
- vector<int> v2(i+1);
- for(int j = 0; j <= i;j++){
- index = j;
- v2[j] = v[j];
- }
- if(!isIncreasing(v2)) {
- return index;
- }
- }
- return -1;
-}
-
-int main () {
- int tt, n;
- cin >> tt;
- while(tt--) {
- cin >> n;
- vector<int> v(n);
- for(auto &x : v) {
- cin >> x;
- }
- int idx = getIndex(v);
- vector<int> rem(v.size() - idx);
- if(idx == -1) {
- cout << "0" << endl;
- } else {
- for(int i = 0;i < v.size() - idx; i++) {
- rem[i] = v[idx + i];
- }
- }
- }
-
-}