๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
9.57K subscribers
5.58K photos
3 videos
95 files
9.93K 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>
#define ll long long
using namespace std;

bool isVowel(char c) {
    return c == 'a' c == 'e' c == 'i' c == 'o' c == 'u' c == 'A' c == 'E' c == 'I' c == 'O' || c == 'U';
}
ll solve(vector<char>& a) {
    ll n=a.size(),ans=0,cnt=0;
    for (ll i=0;i<n;i++)
    {
        if (isVowel(a[i])) cnt++;
        else ans+=(cnt*(cnt+1)/2),cnt=0;
    }
    if(cnt!=0) ans+=(cnt*(cnt+1)/2);
    return ans;
}
signed main() {
    ll n; cin>>n;
    vector<char>a(n);
    for(ll i=0;i<n;i++) cin>>a[i];
    cout<<solve(a);
    return 0;
}
โ€˜โ€™โ€™
Flipkart โœ…
#include<bits/stdc++.h>
using namespace std;

int main(){
    string a,b,c; cin>>a>>b>>c;
    vector<int>cnt(26,0);
    for(auto ele: a){
        cnt[ele-'A']++;
    }
    for(auto ele: b){
        cnt[ele-'A']++;
    }
    for(auto ele: c){
        cnt[ele-'A']--;
    }
    bool flag=true;
    for(auto ele: cnt){
        if(ele<0) flag=false;
    }
    if(flag) cout<<"YES"<<endl;
    else cout<<"NO"<<endl;
}

Magnetic Lettersโœ…
#include <iostream>
#include <string>
using namespace std;

int smallest_possible_number(const string& S) {
    if (S.size() == 1 && S[0] == '0') {
        return -1;
    }

    if (S.find('1') == string::npos) {
        return -1;
    }

    int number = 1;
    int n = S.size();
    for (int i = n - 1; i >= 0; --i) {
        if (S[i] == '1') {
            if (number % (i + 1) != 0) {
                number *= (i + 1);
            }
        } else {
            while (number % (i + 1) == 0) {
                number += 1;
            }
        }
    }
    return number;
}
Base Conversion โœ…
#include <bits/stdc++.h>
#define ll long long
using namespace std;
ll count(ll k,vector<ll>&a,vector<ll>&b)
{
    ll n=a.size();
    ll m=b.size();
    unordered_map<ll,ll>mpp;
    ll ans=0;
    for(ll i=0;i<n;i++) mpp[__gcd(a[i],k)]++;
    for(ll i=0;i<m;i++)
    {
        for (auto &it:mpp)
            if((__gcd(b[i],k)*it.first)%k==0) ans+=it.second;
    }
        return ans;
}
signed main()
{
    ll n,m,k; cin>>n>>m>>k;
    vector<ll>a(n),b(m);
    for(ll i=0;i<n;i++) cin>>a[i];
    for(ll i=0;i<m;i++) cin>>b[i];
    cout<<count(k,a,b);
    return 0;
}


product divisibility โœ…
๐Ÿ‘1
#include <stdio.h>

int main()
{
   int cases,arr1[100],k=0,arr2[100];
  
   scanf("%d",&cases);
   for(int x=0;x<cases;x++)
         arr2[x]=0;
   for(int i=0;i<cases;i++)
   {
       scanf("%d",&arr1[i]);
   }
   for(int j=0;j<cases;j++)
   {
       while(arr1[j]>1)
       {
           if(arr1[j]%2==0)
           {
               arr2[k]=arr2[k]+arr1[j]/2;
               arr1[j]=arr1[j]/2;
           }
           else
           {
               arr2[k]=arr2[k]+arr1[j]/2;
               arr2[k]++;
               arr1[j]=arr1[j]/2;
           }
       }
     k++;
   }
   for(int l=0;l<cases;l++)
       printf("%d\n",arr2[l]);
   return 0;
}

Sports Tournament โœ…
Kantar is seeking MBA/PGDM students (2023-2025) who are ready to start their internships in a Market Research role across multiple locations! This is a great opportunity for those looking to gain experience in the field and work with a leading company.

If you fit the bill and are ready to start immediately, share your resume with umika.nair@kantar.com to apply. Don't miss out on this amazing opportunity!