From 5e1ebc52a6957b19988f200684f36a7991626752 Mon Sep 17 00:00:00 2001 From: Sanya Kumari <1701sanya@gmail.com> Date: Thu, 30 Jul 2020 10:39:53 +0530 Subject: [PATCH] Create Pair of Roses.cpp --- Coding Blocks/Pair of Roses.cpp | 48 +++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 Coding Blocks/Pair of Roses.cpp diff --git a/Coding Blocks/Pair of Roses.cpp b/Coding Blocks/Pair of Roses.cpp new file mode 100644 index 0000000..5b3b674 --- /dev/null +++ b/Coding Blocks/Pair of Roses.cpp @@ -0,0 +1,48 @@ +#include +#include +using namespace std; +int main() { + int nth; + cin>>nth; + while(nth--){ + int sum=0; + int temp[100] = {0}; + bool test=true; + int a[1000000]; + int n; + cin>>n; + for(int i=0;i>a[i]; + } + int no; + cin>>no; + sort(a,a+n); // Sort this so it will take less time + for(int i=0;i= a[i]){ + // cout<<"Deepak should buy roses whose prices are "<