From 3a89fc707253f75f46fd5a4822817f1fd5156c40 Mon Sep 17 00:00:00 2001 From: Omar Magdy Date: Mon, 30 May 2022 00:18:17 +0200 Subject: Made that every problem is its own folder to make building the code a smooth operation with a shortcut --- contests/08-03-2022(Div.3)/A | Bin 18880 -> 451 bytes contests/08-03-2022(Div.3)/A.cpp | 25 -------------- .../A_Deletions_of_Two_Adjacent_Letters | Bin 18664 -> 722 bytes .../A_Deletions_of_Two_Adjacent_Letters.cpp | 37 --------------------- contests/08-03-2022(Div.3)/B | Bin 17688 -> 410 bytes contests/08-03-2022(Div.3)/B.cpp | 23 ------------- contests/08-03-2022(Div.3)/B_DIV_MOD.cpp | 23 ------------- contests/08-03-2022(Div.3)/B_DIV_MOD/B_DIV_MOD.cpp | 23 +++++++++++++ contests/08-03-2022(Div.3)/C.cpp | 22 ------------ contests/08-03-2022(Div.3)/C/C.cpp | 22 ++++++++++++ contests/08-03-2022(Div.3)/D.cpp | 20 ----------- contests/08-03-2022(Div.3)/D/D.cpp | 20 +++++++++++ contests/08-03-2022(Div.3)/E.cpp | 9 ----- contests/08-03-2022(Div.3)/E/E.cpp | 9 +++++ 14 files changed, 74 insertions(+), 159 deletions(-) mode change 100755 => 100644 contests/08-03-2022(Div.3)/A delete mode 100644 contests/08-03-2022(Div.3)/A.cpp mode change 100755 => 100644 contests/08-03-2022(Div.3)/A_Deletions_of_Two_Adjacent_Letters delete mode 100644 contests/08-03-2022(Div.3)/A_Deletions_of_Two_Adjacent_Letters.cpp mode change 100755 => 100644 contests/08-03-2022(Div.3)/B delete mode 100644 contests/08-03-2022(Div.3)/B.cpp delete mode 100644 contests/08-03-2022(Div.3)/B_DIV_MOD.cpp create mode 100644 contests/08-03-2022(Div.3)/B_DIV_MOD/B_DIV_MOD.cpp delete mode 100644 contests/08-03-2022(Div.3)/C.cpp create mode 100644 contests/08-03-2022(Div.3)/C/C.cpp delete mode 100644 contests/08-03-2022(Div.3)/D.cpp create mode 100644 contests/08-03-2022(Div.3)/D/D.cpp delete mode 100644 contests/08-03-2022(Div.3)/E.cpp create mode 100644 contests/08-03-2022(Div.3)/E/E.cpp (limited to 'contests/08-03-2022(Div.3)') diff --git a/contests/08-03-2022(Div.3)/A b/contests/08-03-2022(Div.3)/A old mode 100755 new mode 100644 index a2ce84f..741b57a Binary files a/contests/08-03-2022(Div.3)/A and b/contests/08-03-2022(Div.3)/A differ diff --git a/contests/08-03-2022(Div.3)/A.cpp b/contests/08-03-2022(Div.3)/A.cpp deleted file mode 100644 index 741b57a..0000000 --- a/contests/08-03-2022(Div.3)/A.cpp +++ /dev/null @@ -1,25 +0,0 @@ -#include - -using namespace std; - -int main(){ - int tt; - cin >> tt; - while(tt--){ - string word; - char ch; - cin >> word; - cin >> ch; - int len = word.length(); - if(word[len/2 + 1] == ch){ - cout << word[len/2 + 1] << endl; - cout << ch << endl; - cout << "YES" << "\n"; - } - else{ - cout << "NO" << "\n"; - } - } - - return 0; -} \ No newline at end of file diff --git a/contests/08-03-2022(Div.3)/A_Deletions_of_Two_Adjacent_Letters b/contests/08-03-2022(Div.3)/A_Deletions_of_Two_Adjacent_Letters old mode 100755 new mode 100644 index c79eb1d..3f7daa2 Binary files a/contests/08-03-2022(Div.3)/A_Deletions_of_Two_Adjacent_Letters and b/contests/08-03-2022(Div.3)/A_Deletions_of_Two_Adjacent_Letters differ diff --git a/contests/08-03-2022(Div.3)/A_Deletions_of_Two_Adjacent_Letters.cpp b/contests/08-03-2022(Div.3)/A_Deletions_of_Two_Adjacent_Letters.cpp deleted file mode 100644 index 3f7daa2..0000000 --- a/contests/08-03-2022(Div.3)/A_Deletions_of_Two_Adjacent_Letters.cpp +++ /dev/null @@ -1,37 +0,0 @@ -#include - -using namespace std; - -void findMultOcc(vector &indices, string str, char ch){ - for(int i = 0; i < str.length();i++){ - if(str[i] == ch){ - indices.push_back(i); - } - } -} - -string solve(vector indices){ - for(int i = 0; i < indices.size(); i++) - { - if(indices[i] >= 0 && indices[i] % 2 == 0){ - return "YES"; - } - } - return "NO"; -} - -int main(){ - int tt; - cin >> tt; - while(tt--){ - vector indices; - string word; - char ch; - cin >> word; - cin >> ch; - findMultOcc(indices, word, ch); - cout << solve(indices) << '\n'; - } - - return 0; -} diff --git a/contests/08-03-2022(Div.3)/B b/contests/08-03-2022(Div.3)/B old mode 100755 new mode 100644 index b11c838..dd8bb54 Binary files a/contests/08-03-2022(Div.3)/B and b/contests/08-03-2022(Div.3)/B differ diff --git a/contests/08-03-2022(Div.3)/B.cpp b/contests/08-03-2022(Div.3)/B.cpp deleted file mode 100644 index dd8bb54..0000000 --- a/contests/08-03-2022(Div.3)/B.cpp +++ /dev/null @@ -1,23 +0,0 @@ -#include - -using namespace std; - -int modDiv(int r, int a){ - // law r % a == 0, return r-1 % a + r-1 /a, else return r % a + r /a; - if(r % a == 0){ - return (r-1) % a + (r-1)/a; - } - return r % a + r / a; -} - -int main(){ - int tt; - while(tt--){ - cout << "tt: " << tt; - int l, r, a; - cin >> l >> r >> a; - cout << modDiv(r, a); - } - - return 0; -} \ No newline at end of file diff --git a/contests/08-03-2022(Div.3)/B_DIV_MOD.cpp b/contests/08-03-2022(Div.3)/B_DIV_MOD.cpp deleted file mode 100644 index f861b3b..0000000 --- a/contests/08-03-2022(Div.3)/B_DIV_MOD.cpp +++ /dev/null @@ -1,23 +0,0 @@ -#include - -using namespace std; - -int modDiv(int r, int a){ - // law r % a == 0, return r-1 % a + r-1 /a, else return r % a + r /a; - if(r % a == 0){ - return (r-1) % a + (r-1)/a; - } - return r % a + r / a; -} - -int main(){ - int tt; - cin >> tt; - while(tt--){ - int l, r, a; - cin >> l >> r >> a; - cout << modDiv(r, a) << endl; - } - - return 0; -} diff --git a/contests/08-03-2022(Div.3)/B_DIV_MOD/B_DIV_MOD.cpp b/contests/08-03-2022(Div.3)/B_DIV_MOD/B_DIV_MOD.cpp new file mode 100644 index 0000000..f861b3b --- /dev/null +++ b/contests/08-03-2022(Div.3)/B_DIV_MOD/B_DIV_MOD.cpp @@ -0,0 +1,23 @@ +#include + +using namespace std; + +int modDiv(int r, int a){ + // law r % a == 0, return r-1 % a + r-1 /a, else return r % a + r /a; + if(r % a == 0){ + return (r-1) % a + (r-1)/a; + } + return r % a + r / a; +} + +int main(){ + int tt; + cin >> tt; + while(tt--){ + int l, r, a; + cin >> l >> r >> a; + cout << modDiv(r, a) << endl; + } + + return 0; +} diff --git a/contests/08-03-2022(Div.3)/C.cpp b/contests/08-03-2022(Div.3)/C.cpp deleted file mode 100644 index f63ebcd..0000000 --- a/contests/08-03-2022(Div.3)/C.cpp +++ /dev/null @@ -1,22 +0,0 @@ -#include - -using namespace std; - -int main(){ - int tt; - cin >> tt; - while(tt--){ - list ls; - int len; - int x; - cin >> len; - for(int i = 0; i < len; i++){ - cin >> x; - ls.push_back(x); - } - - - } - - return 0; -} \ No newline at end of file diff --git a/contests/08-03-2022(Div.3)/C/C.cpp b/contests/08-03-2022(Div.3)/C/C.cpp new file mode 100644 index 0000000..f63ebcd --- /dev/null +++ b/contests/08-03-2022(Div.3)/C/C.cpp @@ -0,0 +1,22 @@ +#include + +using namespace std; + +int main(){ + int tt; + cin >> tt; + while(tt--){ + list ls; + int len; + int x; + cin >> len; + for(int i = 0; i < len; i++){ + cin >> x; + ls.push_back(x); + } + + + } + + return 0; +} \ No newline at end of file diff --git a/contests/08-03-2022(Div.3)/D.cpp b/contests/08-03-2022(Div.3)/D.cpp deleted file mode 100644 index 0572f03..0000000 --- a/contests/08-03-2022(Div.3)/D.cpp +++ /dev/null @@ -1,20 +0,0 @@ -#include - -using namespace std; - -int solve() -{ - -} - -int main(){ - int tt; - cin >> tt; - while(tt--){ - - - } - - - return 0; -} diff --git a/contests/08-03-2022(Div.3)/D/D.cpp b/contests/08-03-2022(Div.3)/D/D.cpp new file mode 100644 index 0000000..0572f03 --- /dev/null +++ b/contests/08-03-2022(Div.3)/D/D.cpp @@ -0,0 +1,20 @@ +#include + +using namespace std; + +int solve() +{ + +} + +int main(){ + int tt; + cin >> tt; + while(tt--){ + + + } + + + return 0; +} diff --git a/contests/08-03-2022(Div.3)/E.cpp b/contests/08-03-2022(Div.3)/E.cpp deleted file mode 100644 index 2601cd5..0000000 --- a/contests/08-03-2022(Div.3)/E.cpp +++ /dev/null @@ -1,9 +0,0 @@ -#include - -using namespace std; - -int main(){ - int tt; - - return 0; -} \ No newline at end of file diff --git a/contests/08-03-2022(Div.3)/E/E.cpp b/contests/08-03-2022(Div.3)/E/E.cpp new file mode 100644 index 0000000..2601cd5 --- /dev/null +++ b/contests/08-03-2022(Div.3)/E/E.cpp @@ -0,0 +1,9 @@ +#include + +using namespace std; + +int main(){ + int tt; + + return 0; +} \ No newline at end of file -- cgit v1.2.3