thomas / gist:93531801654143bc94c72c3786e4ae54
0 likes
0 forks
2 files
Last active
1 | azeaze |
thomas / gist:59465537b9a84c80899806d938dc0ed0
0 likes
0 forks
0 files
Last active
No files found
ProtyayMnd50 / getminSum.py
0 likes
0 forks
2 files
Last active
1 | |
2 | def getMinimumSum(arr): |
3 | n = len(arr) |
4 | if n < 3: |
5 | return -1 |
6 | |
7 | left_min = [None] * n |
8 | min_so_far = float('inf') |
9 | |
10 | # Populate left_min |
ProtyayMnd50 / variantsCount.cpp
0 likes
0 forks
4 files
Last active
1 | #include <bits/stdc++.h> |
2 | using namespace std; |
3 | |
4 | int countPairs(const vector<int>& projectCosts, int target) { |
5 | // Using an unordered set to keep track of visited numbers |
6 | unordered_set<int> visited; |
7 | int count = 0; |
8 | |
9 | // Iterate through each number in the list |
10 | for (int cost : projectCosts) { |
ProtyayMnd50 / dem.cpp
0 likes
0 forks
1 files
Last active
1 | int N = segments.size(); |
2 | |
3 | |
4 | vector<vector<int>> sortedSegments = segments; |
5 | sort(sortedSegments.begin(), sortedSegments.end(), [](const vector<int> &a, const vector<int> &b) { |
6 | return a[1] < b[1]; |
7 | }); |
8 | |
9 | |
10 | priority_queue<pair<int, int>, vector<pair<int, int>>, greater<pair<int, int>>> minHeap; |
ProtyayMnd50 / hello.cpp
0 likes
0 forks
3 files
Last active
1 | #include <iostream> |
2 | #include <vector> |
3 | #include <algorithm> |
4 | #include <climits> |
5 | #include <bits/stdc++.h> |
6 | using namespace std; |
7 | #define ll long long |
8 | # updated |
9 | ll minCostProduct(const vector<vector<ll>> &seg) |
10 | { |
tetetetetetetetedsa / gist:708c1be179b14cd683c2194f9c5a6d97
0 likes
0 forks
1 files
Last active
1 | #chat { |
2 | filter: drop-shadow(2px 2px 0.2rem black); |
3 | overflow-wrap: anywhere; |
4 | bottom: 0; |
5 | position: absolute; |
6 | padding-left: 12px; |
7 | padding-bottom: 6px; |
8 | overflow: hidden; |
9 | word-break: break-word; |
10 | width: 100%; |
Newer
Older