From fda4c4c50b0b022892f32cc87e8e3a362a299b9d Mon Sep 17 00:00:00 2001 From: Gaurav Verma <93048788+ChimeraElixir@users.noreply.github.com> Date: Fri, 2 Sep 2022 00:44:46 +0530 Subject: [PATCH 1/4] Create Repetitions.cpp --- answers/ChimeraElixir/Repetitions.cpp | 29 +++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 answers/ChimeraElixir/Repetitions.cpp diff --git a/answers/ChimeraElixir/Repetitions.cpp b/answers/ChimeraElixir/Repetitions.cpp new file mode 100644 index 0000000..07107ab --- /dev/null +++ b/answers/ChimeraElixir/Repetitions.cpp @@ -0,0 +1,29 @@ +#include +using namespace std; + +int main(){ +#ifndef ONLINE_JUDGE + freopen("input.txt", "r", stdin); + freopen("output.txt", "w", stdout); +#endif + string s; + cin>>s; + int occurance=1,best=0; + + for (int i=0;i Date: Sun, 4 Sep 2022 23:20:58 +0530 Subject: [PATCH 2/4] Add files via upload --- answers/ChimeraElixir/Increasing_array.cpp | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 answers/ChimeraElixir/Increasing_array.cpp diff --git a/answers/ChimeraElixir/Increasing_array.cpp b/answers/ChimeraElixir/Increasing_array.cpp new file mode 100644 index 0000000..1ab9c72 --- /dev/null +++ b/answers/ChimeraElixir/Increasing_array.cpp @@ -0,0 +1,31 @@ +#include +using namespace std; +#define ll long long +#define loop for(ll i=0;i>n; + ll count=0; + ll array[n]; + + loop{ + cin>>array[i]; + } + + loop{ + if(array[i]>array[i+1]){ + count+=abs(array[i]-array[i+1]); + array[i+1]=array[i]; + } + } + + cout< Date: Sun, 4 Sep 2022 23:22:17 +0530 Subject: [PATCH 3/4] Update Increasing_array.cpp --- answers/ChimeraElixir/Increasing_array.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/answers/ChimeraElixir/Increasing_array.cpp b/answers/ChimeraElixir/Increasing_array.cpp index 1ab9c72..139cebc 100644 --- a/answers/ChimeraElixir/Increasing_array.cpp +++ b/answers/ChimeraElixir/Increasing_array.cpp @@ -1,4 +1,4 @@ -#include +#include using namespace std; #define ll long long #define loop for(ll i=0;i Date: Wed, 7 Sep 2022 00:13:15 +0530 Subject: [PATCH 4/4] Add files via upload --- answers/ChimeraElixir/Permutations.cpp | 40 ++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 answers/ChimeraElixir/Permutations.cpp diff --git a/answers/ChimeraElixir/Permutations.cpp b/answers/ChimeraElixir/Permutations.cpp new file mode 100644 index 0000000..11a6ba7 --- /dev/null +++ b/answers/ChimeraElixir/Permutations.cpp @@ -0,0 +1,40 @@ +#include +#include +using namespace std; +#define ll long long +#define loop for(ll i=0;i>n; + vector v; + + + + if(n==1){ + cout<<'1'<