๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
9.63K subscribers
5.59K photos
3 videos
95 files
10.2K 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;
void print(vector<int> &arr)
{
  for(auto e:arr) cout<<e<<" "; cout<<endl;
}
vector<int> solv(int n,vector<int> &arr)
{
  vector<int> soln;
  for(int i=0;i<n;i++)
  {
    if(arr[i]%2 == 0 || arr[i]%3 == 0 || arr[i]%5 == 0) soln.push_back(arr[i]);
  }
  return soln;
}
int main()
{
    int n;
    cin>>n;
    vector<int> arr(n);
    for(int i=0;i<n;i++) cin>>arr[i];
    vector<int> ans = solv(n,arr); print(ans);
    return 0;
}


Deloitte โœ…
Axtria is (still) HIRING!

In the world of uncertainties, we are fortunate to find ourselves in a place where we continue to be in a great position to keep growing stronger.

This summer, as we await our campus hires, we are also rolling out an interim drive to hire a strong population of off-campus hires.

So if you:

- Are 2023/2024 batch 
B.Tech CS/IT from Top-200 campuses (as per NIRF rankings)
- have an impeccable academic record (10th - 90%, 12th - 80%, Graduation - 80%)
- Wish to build a career as an Analyst
- Are open to working in Delhi NCR, Bangalore, Hyderabad, Pune
- wish to improve patient outcomes

Then please email your profile at 
campusplacement@axtria.com
#include<bits/stdc++.h>
using namespace std;

int solve(vector<vector<int>>& d) {
    unordered_map<int, int> b;
    for(auto& x : d) {
        b[x[0]] -= x[2];
        b[x[1]] += x[2];
    }
    vector<int> pos, neg;
    for(auto& [_, v] : b) {
        if(v > 0) pos.push_back(v);
        else if(v < 0) neg.push_back(-v);
    }
    int t = 0;
    while(!pos.empty() && !neg.empty()) {
        int m = min(pos.back(), neg.back());
        pos.back() -= m;
        neg.back() -= m;
        t++;
        if(pos.back() == 0) pos.pop_back();
        if(neg.back() == 0) neg.pop_back();
    }
    return t;
}

int main() {
    int n, m;
    cin >> n >> m;
    vector<vector<int>> d(m, vector<int>(3));
    for(int i = 0; i < m; i++) {
        for(int j = 0; j < 3; j++) {
            cin >> d[i][j];
        }
    }
    cout << solve(d) << endl;
    return 0;
}

Transaction Simplification โœ…

Sharechat