diff --git a/2558. Take Gifts From the Richest Pile1 b/2558. Take Gifts From the Richest Pile1 new file mode 100644 index 0000000..cf53d03 --- /dev/null +++ b/2558. Take Gifts From the Richest Pile1 @@ -0,0 +1,41 @@ +class Solution1 { +public: + long long pickGifts(vector& gifts, int k) { + long long ans=0; + for(int i=0;igifts[m]) m=j; + int a=gifts[m]; + // cout<& gifts, int k) { + long long ans=0; + priority_queue vp; + for(int i : gifts) vp.push(i); + for(int i=0;i