diff options
| author | Omar Magdy <omar.professional8777@gmail.com> | 2022-05-30 00:18:17 +0200 |
|---|---|---|
| committer | Omar Magdy <omar.professional8777@gmail.com> | 2022-05-30 00:18:17 +0200 |
| commit | 3a89fc707253f75f46fd5a4822817f1fd5156c40 (patch) | |
| tree | 474b08b187895af91c10838aae21142b2ba2514d /contests/05-05-2022(Div.3) | |
| parent | f5ff62a26052f084b6b807cba220c86785fd45e3 (diff) | |
| download | competitive-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)')
| -rw-r--r--[-rwxr-xr-x] | contests/05-05-2022(Div.3)/A/A | bin | 17848 -> 679 bytes | |||
| -rw-r--r-- | contests/05-05-2022(Div.3)/A/A.cpp | 42 | ||||
| -rw-r--r--[-rwxr-xr-x] | contests/05-05-2022(Div.3)/B/B | bin | 33024 -> 808 bytes | |||
| -rw-r--r-- | contests/05-05-2022(Div.3)/B/B.cpp | 48 | ||||
| -rw-r--r-- | contests/05-05-2022(Div.3)/C/C/C.cpp (renamed from contests/05-05-2022(Div.3)/C/C.cpp) | 0 | ||||
| -rw-r--r-- | contests/05-05-2022(Div.3)/D/D/D.cpp (renamed from contests/05-05-2022(Div.3)/D/D.cpp) | 0 | ||||
| -rw-r--r-- | contests/05-05-2022(Div.3)/E/E/E.cpp (renamed from contests/05-05-2022(Div.3)/E/E.cpp) | 0 | ||||
| -rw-r--r-- | contests/05-05-2022(Div.3)/F/F/F.cpp (renamed from contests/05-05-2022(Div.3)/F/F.cpp) | 0 |
8 files changed, 0 insertions, 90 deletions
diff --git a/contests/05-05-2022(Div.3)/A/A b/contests/05-05-2022(Div.3)/A/A Binary files differindex 7c1c04e..2f5fb6b 100755..100644 --- a/contests/05-05-2022(Div.3)/A/A +++ b/contests/05-05-2022(Div.3)/A/A diff --git a/contests/05-05-2022(Div.3)/A/A.cpp b/contests/05-05-2022(Div.3)/A/A.cpp deleted file mode 100644 index 2f5fb6b..0000000 --- a/contests/05-05-2022(Div.3)/A/A.cpp +++ /dev/null @@ -1,42 +0,0 @@ -#include<bits/stdc++.h> - -using namespace std; - -int main() { - int tt,a,b,c,x,y,remX,remY; - cin >> tt; - while (tt--) { - cin >> a >> b >> c >> x >> y; - if(a > x && b < y) { - remX = 0; - remY = y - b; - } - else if (a < x && b > y) { - remX = x - a; - remY = 0; - } - else if (a > x && b > y) { - remX =0; - remY =0; - } - else { - remX = x - a; - remY = y - b; - } - if(c == 0) { - if(a >= x && b >= y) { - cout << "YES" << endl; - } - else { - cout << "NO" << endl; - } - } - else if(c >= remX + remY) { - cout << "YES" << endl; - } - else { - cout << "NO" << endl; - } - - } -} diff --git a/contests/05-05-2022(Div.3)/B/B b/contests/05-05-2022(Div.3)/B/B Binary files differindex af9715e..27c4853 100755..100644 --- a/contests/05-05-2022(Div.3)/B/B +++ b/contests/05-05-2022(Div.3)/B/B 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]; - } - } - } - -} diff --git a/contests/05-05-2022(Div.3)/C/C.cpp b/contests/05-05-2022(Div.3)/C/C/C.cpp index 8b13789..8b13789 100644 --- a/contests/05-05-2022(Div.3)/C/C.cpp +++ b/contests/05-05-2022(Div.3)/C/C/C.cpp diff --git a/contests/05-05-2022(Div.3)/D/D.cpp b/contests/05-05-2022(Div.3)/D/D/D.cpp index e69de29..e69de29 100644 --- a/contests/05-05-2022(Div.3)/D/D.cpp +++ b/contests/05-05-2022(Div.3)/D/D/D.cpp diff --git a/contests/05-05-2022(Div.3)/E/E.cpp b/contests/05-05-2022(Div.3)/E/E/E.cpp index e69de29..e69de29 100644 --- a/contests/05-05-2022(Div.3)/E/E.cpp +++ b/contests/05-05-2022(Div.3)/E/E/E.cpp diff --git a/contests/05-05-2022(Div.3)/F/F.cpp b/contests/05-05-2022(Div.3)/F/F/F.cpp index e69de29..e69de29 100644 --- a/contests/05-05-2022(Div.3)/F/F.cpp +++ b/contests/05-05-2022(Div.3)/F/F/F.cpp |
