COGNIZANT EXAM HELP GROUP
3.55K subscribers
5.3K photos
21 videos
10 files
3.22K links
🚀 Placement Preparation Hub

🎓 From Preparation to Placement

OA Support • Coding • Aptitude • Technical • HR

🌟 Trusted by Hundreds of Students

🏆 372+ Placement Successes

📩 DM: @Mrtrueliving_ix

💙 Turning Aspirations into Offer Letters.
Download Telegram
Turing Help done ▶️✔️📣

Java Developer
☄️

Test accomplished ❤️

OA HELP
@MRTRUELIVING_IX ☄️
All placement help available

#Turning #Javadeveloper #CODING
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
int solution(int n,vector<int>nums){
priority_queue<long long, vector<long long>, greater<long long> > pq;
long long S = 0;

for(int i = 1;i <= n;i++){
int x=nums[i-1];
S += x;
pq.push(x);

while(S < 0){
S -= pq.top();
pq.pop();
}
}

return (int) pq.size();
}.

// Axis bank positive total
Saks India ONCampus

Help available

DM
@MRTRUELIVING_IX ✔️
Please open Telegram to view this post
VIEW IN TELEGRAM
Netcore Round2 help done

DM @MRTRUELIVING_IX ✔️▶️ for Test Clearance

#Netcore #Round2 #Coding

Sliding window Algorithm
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Netcore Round2 help done

DM @MRTRUELIVING_IX ✔️▶️ for Test Clearance

#Netcore #Round2 #Coding
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
All placement help available

DM for 💯 test Clearance 🤗🪄

-
@MRTRUELIVING_IX

-
@MRTRUELIVING_IX
DEVRev Ai help done ✔️

Coding & SQL are done
✔️

Test accomplished

DM for
@MRTRUELIVING_IX 💯 TEST CLEARANCE

ALL PLACEMENT HELP AVAILABLE

@MRTRUELIVING_IX

@MRTRUELIVING_IX

#DEVREV #AI #DONE

APPLY NOW

https://t.me/code_alphix/4138
Please open Telegram to view this post
VIEW IN TELEGRAM
DevRev help

Test accomplished ❤️ with 💯 clearance

DM for OA help

@MRTRUELIVING_IX

@MRTRUELIVING_IX

All Placement help available
#DevRev #AI #CODING
#include <iostream>
#include <vector>
#include <map>
#include <algorithm>
#include <cmath>

using namespace std;

struct Line {
int x1, y1, x2, y2;
};

int countCells(Line line, pair<int, int> star, bool split) {
if (line.x1 == line.x2) {
return split ? min(abs(star.second - line.y1), abs(star.second - line.y2)) + 1 : abs(line.y1 - line.y2) + 1;
} else {
return split ? min(abs(star.first - line.x1), abs(star.first - line.x2)) + 1 : abs(line.x1 - line.x2) + 1;
}
}

bool intersects(Line a, Line b, pair<int, int>& intersection) {
if (a.x1 == a.x2 && b.y1 == b.y2) {
if (b.x1 <= a.x1 && a.x1 <= b.x2 && a.y1 <= b.y1 && b.y1 <= a.y2) {
intersection = {a.x1, b.y1};
return true;
}
} else if (a.y1 == a.y2 && b.x1 == b.x2) {
if (a.x1 <= b.x1 && b.x1 <= a.x2 && b.y1 <= a.y1 && a.y1 <= b.y2) {
intersection = {b.x1, a.y1};
return true;
}
}
return false;
}

int main() {
int N, K;
cin >> N;
vector<Line> lines(N);
for (int i = 0; i < N; ++i) {
cin >> lines[i].x1 >> lines[i].y1 >> lines[i].x2 >> lines[i].y2;
if (lines[i].x1 > lines[i].x2 || (lines[i].x1 == lines[i].x2 && lines[i].y1 > lines[i].y2)) {
swap(lines[i].x1, lines[i].x2);
swap(lines[i].y1, lines[i].y2);
}
}
cin >> K;

map<pair<int, int>, vector<Line>> stars;
for (int i = 0; i < N; ++i) {
for (int j = i + 1; j < N; ++j) {
pair<int, int> intersection;
if (intersects(lines[i], lines[j], intersection)) {
stars[intersection].push_back(lines[i]);
stars[intersection].push_back(lines[j]);
}
}
}

int totalIntensity = 0;
for (auto& star : stars) {
if (star.second.size() / 2 == K) {
vector<int> intensities;
for (auto& line : star.second) {
intensities.push_back(countCells(line, star.first, true));
}
totalIntensity += *min_element(intensities.begin(), intensities.end());
}
}

cout << totalIntensity << endl;
return 0;
}

`

Magic' star✔️ TcsCodevita ▶️
Please open Telegram to view this post
VIEW IN TELEGRAM
1
https://t.me/code_iconix

Drop your TcsCodevita Questions✔️
Please open Telegram to view this post
VIEW IN TELEGRAM