๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
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
Bharti Airtel Scholarship
A merit-cum-means based scholarship program has been designed for students enrolled in technology based engineering undergraduate (UG) courses and 5-year integrated programs (as per the eligibility criteria) in the top 50 NIRF Engineering institutes including IITs

https://bhartifoundation.org/bharti-airtel-scholarship/
๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
Photo
#include <bits/stdc++.h>
using namespace std;
using II = long long;
II solve(vector<int> nums) {
    vector<int> Primes;
    for(int num = 2; num <= 200; num++) {
        bool isPrime = true;
        for(int factor = 2; factor * factor <= num; factor++) {
            if(num % factor == 0) {
                isPrime = false;
                break;
            }
        }
        if(isPrime) Primes.push_back(num);
    }
    map<II, II> mp;
    II ans = 0, mask = 0, one = 1;
    mp[mask] = 1;
    for(int num : nums) {
        for(int pos = 0; pos < Primes.size(); pos++) {
            int power = 0;
            while(num % Primes[pos] == 0) {
                num /= Primes[pos];
                power++;
            }
            if(power & 1) mask ^= (one << pos);
        }
        ans += mp[mask]++;
    }
    return ans;
}


Optimal subarray configurations โœ