๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
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;

#define ll long long
#define maxn 1000005
#define inf 1e9

string ff(ll a, ll b, ll c, ll d) {
    ll kit = (b - a + 1) * (d - c + 1);
    ll kat = (b - a + 1) * (d - c);
    return (kat > kit / 2) ? "YES" : "NO";
}

int main() {
    ll a, b, c, d;
    cin >> a >> b;
    cin >> c >> d;
    cout << ff(a, b, c, d) << endl;
    return 0;
}

Guess the full form โœ…
Flipkart
def probability_comparison(L1, R1, L2, R2):
    alice_wins = 0
    for i in range(L1, R1+1):
        for j in range(L2, R2+1):
            if i > j:
                alice_wins += 1
   
    total_outcomes = (R1 - L1 + 1) * (R2 - L2 + 1)
   
    if alice_wins > total_outcomes / 2:
        return "YES"
    else:
        return "NO"
L1, R1, L2, R2 = map(int, input().split())
print(probability_comparison(L1, R1, L2, R2))

Prediction โœ…
def final_card_person(N, K, A):
    remainder = K % N
    final_position = (A - 1 + remainder) % N
    if final_position == 0:
        final_position = N
    return final_position

Cards and Party โœ…
def decode_secret_code(S, N):
    if N == 1:
        return S

    rows = [''] * N
    row = 0
    down = True
   
    for char in S:
        rows[row] += char
       
        if row == 0:
            down = True
        elif row == N - 1:
            down = False
           
        if down:
            row += 1
        else:
            row -= 1

    secret_code = ''.join(rows)
    return secret_code

S = input()
N = int(input())
result = decode_secret_code(S, N)
print(result)

Flipkart โœ…
๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
def decode_secret_code(S, N):     if N == 1:         return S     rows = [''] * N     row = 0     down = True         for char in S:         rows[row] += char                 if row == 0:             down = True         elif row == N - 1:             downโ€ฆ
#include <iostream>
#include <vector>

using namespace std;

string findPassword(string s, int n) {
    if (n == 1)
        return s;

    vector<vector<char>> zigzag(n, vector<char>());
    bool down = true;
    int row = 0;

    for (char c : s) {
        zigzag[row].push_back(c);

        if (down)
            row++;
        else
            row--;

        if (row == 0 || row == n - 1)
            down = !down;
    }

    string password;
    for (int i = 0; i < n; i++) {
        for (char c : zigzag[i]) {
            password += c;
        }
    }

    return password;
}

int main() {
    string s;
    int n;

    cin >> s >> n;

   
    cout << findPassword(s, n) << endl;

    return 0;
}

Flipkartโœ…
๐Ÿ‘1
#include<bits/stdc++.h>
using namespace std;

int main() {
    int n;
    cin >> n;
    vector<int> arr(n);
    for(int i = 0; i < n; i++) {
        cin >> arr[i];
    }
    stack<int> s;
    vector<int> nwe(n, -1);
    for(int i = 0; i < n; i++) {
        while(!s.empty() && arr[s.top()] > arr[i]) {
            nwe[s.top()] = arr[i];
            s.pop();
        }
        s.push(i);
    }
    for(int i = 0; i < n; i++) {
        cout << nwe[i] << " ";
    }
    cout << endl;
    return 0;
}
#include <iostream>

using namespace std;

int maxChocolateCakes(int A, int P) {
    int totalPieces = A * 3 + P;
    return totalPieces / 2;
}

int main() {
    int A, P;
    cin >> A >> P;
   
    int maxCakes = maxChocolateCakes(A, P);
   
    cout << maxCakes << endl;
   
    return 0;
}

Chocoland โœ…
MOD = 998244353
def count_pairs(N):
    count = 0
    b = N
    for a in range(N + 1):
        while b > 0 and (a & b) > N:
            b -= 1
        count = (count + max(b - a + 1, 0)) % MOD
    return count
N = int(input())
print(count_pairs(N))

Flipkart โœ…
๐ŸŒŸ Exciting Internship Opportunity with IBM SkillsBuild! ๐ŸŒŸ

We are thrilled to announce the IBM SkillsBuild Summer Internship Program for June 2024, offering students incredible opportunities to advance their skills in cutting-edge technology areas. Check out our programs:

Data Analytics Internship: June 3 - July 30th, 2024

Front End Web Development Internship: June 4 - July 31st, 2024

AI-ML Internship: June 10 - June 28, 2024

๐Ÿ“… Last Day to Register: May 20, 2024

https://forms.gle/RXExB7v86ZFyLpw66