๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
9.52K subscribers
5.56K photos
3 videos
95 files
9.7K 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
๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
Photo
import sys
import threading

class FenwickTree:
    def __init__(self, size):
        self.n = size + 2
        self.tree = [0] * self.n
   
    def update(self, idx):
        while idx < self.n:
            self.tree[idx] += 1
            idx += idx & -idx
   
    def query(self, idx):
        res = 0
        while idx > 0:
            res += self.tree[idx]
            idx -= idx & -idx
        return res
       
def main():
    sys.setrecursionlimit(1 << 25)
    n = int(sys.stdin.readline())
    ranges = []
    for i in range(n):
        x, y = map(int, sys.stdin.readline().split())
        ranges.append((x, y, i))
   
    rangesSorted = sorted(ranges, key=lambda x: (x[0], -x[1]))
    endPoints = sorted(list(set([y for x, y, _ in rangesSorted])))
    yMapping = {y: idx+1 for idx, y in enumerate(endPoints)}
   
    ft = FenwickTree(len(yMapping))
    contains = [0] * n
   
    for x, y, idx in rangesSorted:
        contains[idx] = ft.query(len(yMapping)) - ft.query(yMapping[y]-1)
        ft.update(yMapping[y])
   
    rangesSortedRev = sorted(ranges, key=lambda x: (-x[0], x[1]))
   
    ftRev = FenwickTree(len(yMapping))
    containedBy = [0] * n
   
    for x, y, idx in rangesSortedRev:
        containedBy[idx] = ftRev.query(yMapping[y])
        ftRev.update(yMapping[y])
   
    print(' '.join(map(str, containedBy)))
    print(' '.join(map(str, contains)))

threading.Thread(target=main).start()


Kickdrum โœ…
๐Ÿš€ ๐„๐ฑ๐œ๐ข๐ญ๐ข๐ง๐  ๐Ž๐ฉ๐ฉ๐จ๐ซ๐ญ๐ฎ๐ง๐ข๐ญ๐ฒ ๐€๐ฅ๐ž๐ซ๐ญ: ๐๐š๐ข๐ ๐Ž๐ง-๐‰๐จ๐› ๐“๐ซ๐š๐ข๐ง๐ž๐ž๐ฌ๐ก๐ข๐ฉ๐ฌ ๐ข๐ง ๐€๐ˆ ๐š๐ง๐ ๐ƒ๐š๐ญ๐š! ๐Ÿš€

Are you a fresher or a non-IT professional eager to dive into the booming tech industry? We Thirumoolar Software have just the opportunity for you!

We are thrilled to announce limited trainee positions for the following roles:

- ๐€๐ˆ ๐‘๐ž๐ฌ๐ž๐š๐ซ๐œ๐ก๐ž๐ซ
- ๐Œ๐‹ ๐„๐ง๐ ๐ข๐ง๐ž๐ž๐ซ
- ๐“๐ซ๐š๐ข๐ง๐ž๐ ๐ƒ๐š๐ญ๐š๐’๐ž๐ญ ๐€๐ง๐š๐ฅ๐ฒ๐ฌ๐ญ

For More Details About Paid On-Job Traineeship and to Apply, Click below:

https://forms.gle/94iP6Z1rigWAduGx7


These roles offer invaluable hands-on experience, working with cutting-edge technology and gaining insights from industry experts. Itโ€™s the perfect launchpad for a successful career in IT.

๐Ÿ” ๐–๐ก๐ฒ ๐ฃ๐จ๐ข๐ง ๐ฎ๐ฌ?

- Competitive stipends

- Mentorship from experienced professionals

- Real-world project experience

- Networking opportunities within the tech industry

๐Ÿ“… ๐‡๐ฎ๐ซ๐ซ๐ฒ, ๐š๐ฉ๐ฉ๐ฅ๐ข๐œ๐š๐ญ๐ข๐จ๐ง๐ฌ ๐š๐ซ๐ž ๐จ๐ฉ๐ž๐ง ๐ฎ๐ง๐ญ๐ข๐ฅ ๐Ž๐œ๐ญ๐จ๐›๐ž๐ซ ๐Ÿ๐Ÿฌ๐ญ๐ก! ๐’๐ž๐š๐ญ๐ฌ ๐š๐ซ๐ž ๐ฅ๐ข๐ฆ๐ข๐ญ๐ž๐, ๐ฌ๐จ ๐๐จ๐งโ€™๐ญ ๐ฆ๐ข๐ฌ๐ฌ ๐จ๐ฎ๐ญ ๐จ๐ง ๐ญ๐ก๐ข๐ฌ ๐ ๐จ๐ฅ๐๐ž๐ง ๐œ๐ก๐š๐ง๐œ๐ž ๐ญ๐จ ๐ฃ๐ฎ๐ฆ๐ฉ๐ฌ๐ญ๐š๐ซ๐ญ ๐ฒ๐จ๐ฎ๐ซ ๐œ๐š๐ซ๐ž๐ž๐ซ ๐ข๐ง ๐€๐ˆ ๐š๐ง๐ ๐ƒ๐š๐ญ๐š ๐’๐œ๐ข๐ž๐ง๐œ๐ž.

Apply now and transform your career path! ๐ŸŒŸ
Apple ML research in Paris has multiple open internship positions!๐ŸŽ

We are looking for Ph.D. students interested in generative modeling, optimization, large-scale learning or uncertainty quantification, with applications to challenging scientific problems.

Infos:
- all internships must be on-site; we will support travel and visa procedures if needed
- Length: 4-6 months, anytime from now until late sep. 25
- This is a research internship: the objective is to publish exciting ideas

Requirements:
- Track record of publications in ML conferences like NeurIPS, ICLR, ICML, Aistats, etc... Additional publications in related fields will be considered
- Experience coding for ML research in Python (e.g., numpy, PyTorch or Jax)

Apply here: https://jobs.apple.com/en-gb/details/200570877/aiml-intern-in-ml-research-mlr?team=MLAI

If you have any questions, please reach out to MLR_Paris_Internships@group.apple.com
#include <iostream>
#include <vector>
using namespace std;
int main() {
    int n;
    cin >> n;
    vector<int> a(n), b(n);

    for (int i = 0; i < n; i++) cin >> a[i];

    for (int i = 0, j = 0, k = n - 1; i < n; i++) {
        b[i] = (i % 2 == 0) ? a[j++] : a[k--];
    }
 
    for (int i = 0; i < n; i++) cout << b[i] << " ";

    return 0;
}


Visa OA โœ