๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
9.63K subscribers
5.61K photos
3 videos
95 files
10.6K links
๐ŸšฉMain Group - @SuperExams
๐Ÿ“Job Updates - @FresherEarth

๐Ÿ”ฐAuthentic Coding Solutions(with Outputs)
โš ๏ธDaily Job Updates
โš ๏ธHackathon Updates & Solutions

Buy ads: https://telega.io/c/cs_algo
Download Telegram
#include <bits/stdc++.h>
using namespace std;

int main()
{
    int n;
    cin >> n;
    vector<int> a(n), b(n);
    int sumA = 0, sumB = 0;
    for (auto &i : a)
        cin >> i, sumA += i;
    for (auto &i : b)
        cin >> i, sumB += i;

    int ans = min(sumA, sumB), mask = (1 << n);
    for (int i = 0; i < mask; ++i)
    {
        int curr = 0, currentB = 0;
        for (int j = 0; j < n; ++j)
        {
            if (i & (1 << j))
            {
                curr += a[j];
            }
            else
            {
                currentB += b[j];
            }
        }
        ans = max(ans, min(curr, currentB));
    }
    cout << ans << endl;

    return 0;
}
// game
flipkart โœ…
Need SAP Certified Freshers for Quints Global | Location: Okhla, New Delhi* ๐Ÿ’ฅ๐Ÿ’ฅ๐Ÿ’ฅ

Positions available:
1. SAP SD Management Trainee.
2. SAP FICO Management Trainee.
3. SAP MM Management Trainee.

Qualification: BCA/ MCA/ B Tech.

Date of Interview: 5th & 6th September

Venue: Quints Global Pvt. Ltd., 3rd Floor, 12 A Pride Tower, Near Kotak Mahindra, Sector- 125, Noida, Nearest Metro: Okhla Bird Sanctuary.
def solve(histogram):
    a = 0
    n = len(histogram)
    for i in range(n):
        m = histogram[i]
        for j in range(i, n):
            m = min(m, histogram[j])
            s = min(m, j - i + 1)
            w = s * s
            a = max(a, w)
    return a


Visa โœ…
int webdev(int numProject,vector<int>projectId,vector<int>bid){
    vector<int>ans(numProject,INT_MAX);
    for(int i=0; i<projectId.size(); i++){
        ans[projectId[i]]=min(ans[projectId[i]], bid[i]);
    }
    int sum=0;
    for(auto x: ans){
        if(x!=INT_MAX)
        sum+=x;
        else
        return -1;
    }
๐Ÿ‘1