From 67aa9f93a625b14f8e8807cc45a272981f332fbf Mon Sep 17 00:00:00 2001 From: Beast61224 <95344102+Beast61224@users.noreply.github.com> Date: Tue, 4 Oct 2022 22:58:53 +0530 Subject: [PATCH 1/3] Update README.md --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d724684..fd96fe6 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,9 @@ Its ~~october~~(hackctober month) ...add your codes and contribute to open sourc - OverLord - Kuroko No Basuke - Bleach +- One Piece +- Hunter x Hunter +- Jujutsu Kaisen @@ -122,4 +125,4 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d -This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! \ No newline at end of file +This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! From 60421587fa564c9c4d29ab393e2b7e8b4df176f9 Mon Sep 17 00:00:00 2001 From: Beast61224 <95344102+Beast61224@users.noreply.github.com> Date: Tue, 4 Oct 2022 22:59:37 +0530 Subject: [PATCH 2/3] Create many_pattern.cpp --- C++/many_pattern.cpp | 130 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 C++/many_pattern.cpp diff --git a/C++/many_pattern.cpp b/C++/many_pattern.cpp new file mode 100644 index 0000000..5107cef --- /dev/null +++ b/C++/many_pattern.cpp @@ -0,0 +1,130 @@ +#include + +using namespace std; + +int main() +{ + #ifndef ONLINE_JUDGE + freopen("input.txt", "r", stdin); + freopen("output.txt", "w", stdout); + #endif + int rows, columns; + cin>>rows>> columns; + + cout<<"Pattern 1 :- Rectangle\n"<< endl; + for(int i = 1 ; i <= rows; i++) + { + for(int j = 1 ; j <= columns; j++ ) + { + cout<<"* "; + } + cout<= 1; i--) + { + for(int j = 1 ; j <= i; j++ ) + { + cout<<"* "; + } + cout<= 1; i--) + { + for(int j = 1 ; j <= rows; j++ ) + { + if(j < i) + cout<<" "; + else + cout<<"* "; + } + cout< (rows * 2)- i) && i <= rows) + cout<<"* "; + + else if ((j >= i || j <= (rows * 2)- (i - 1)) && i > rows) + cout<<"* "; + + else + cout<<" "; + } + cout<= 1; i--) + { + for(int j = 1 ; j <= i; j++ ) + { + cout< Date: Tue, 4 Oct 2022 23:00:01 +0530 Subject: [PATCH 3/3] Create minimum_time_to_make_a_rope_colourfull.cpp --- ...minimum_time_to_make_a_rope_colourfull.cpp | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 C++/minimum_time_to_make_a_rope_colourfull.cpp diff --git a/C++/minimum_time_to_make_a_rope_colourfull.cpp b/C++/minimum_time_to_make_a_rope_colourfull.cpp new file mode 100644 index 0000000..a4e29b7 --- /dev/null +++ b/C++/minimum_time_to_make_a_rope_colourfull.cpp @@ -0,0 +1,83 @@ +#include +#include + +using namespace std; + +// int balloon_color_check(char[], int[], int); + +// int main(){ +// int n; +// cin>>n; + + +// char colourfull_balloons[n]; +// for(int i = 0; i>colourfull_balloons[i]; +// } +// int time_taken[n]; +// for (int i = 0; i < n; i++) +// { +// cin>>time_taken[i]; +// } + +// int min_time = balloon_color_check(colourfull_balloons, time_taken, n); +// cout< time_taken[i+1]){ +// min_time += time_taken[i+1]; +// } +// else{ +// min_time += time_taken[i]; +// } +// } +// } +// return min_time; +// } + +int balloon_color_check(string, int[], int); + +int main(){ + int n; + cin>>n; + + + string colourfull_balloons; + cin>>colourfull_balloons; + + int time_taken[n]; + for (int i = 0; i < n; i++) + { + cin>>time_taken[i]; + } + + int min_time = balloon_color_check(colourfull_balloons, time_taken, n); + cout< time_taken[i+1]){ + min_time += time_taken[i+1]; + } + else{ + min_time += time_taken[i]; + } + } + } + return min_time; +} + + +//Done +//https://leetcode.com/problems/minimum-time-to-make-rope-colorful/