#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
const int MOD = 1000000007;
int countNewArrays(vector<int>& arr) {
int n = arr.size();
sort(arr.begin(), arr.end());
long long result = 1;
for (int i = 0; i < n; ++i) {
int a = arr[i] - i;
if (a <= 0) {
return 0;
}
result = (result * possaible_values) % MOD;
}
return result;
}
DE SHAW โ
๐1
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
typedef struct {
int a, b, c;
double area;
} triangle;
double calculate_area(int a, int b, int c) {
double p = (a + b + c) / 2.0;
return (p * (p - a) * (p - b) * (p - c));
}
int compare(const void* a, const void* b) {
triangle* t1 = (triangle*)a;
triangle* t2 = (triangle*)b;
if (t1->area < t2->area)
return -1;
else if (t1->area > t2->area)
return 1;
else
return 0;
}
int sort_by_area(triangle* tr, int n) {
if (tr == NULL || n <= 0) {
return -1;
}
for (int i = 0; i < n; i++) {
tr[i].area = calculate_area(tr[i].a, tr[i].b, tr[i].c);
}
qsort(tr, n, sizeof(triangle), compare);
return 0;
}
IBMโ
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
public class Main {
public static void convertToIpv6(String ipv4Address) {
String[] octets = ipv4Address.split("\\.");
if (octets.length != 4) {
System.out.println("Invalid input");
return;
}
if (octets[0].equals("127")) {
System.out.println("::1");
return;
}
StringBuilder ipv6 = new StringBuilder("::FFFF:");
try {
for (int i = 0; i < 4; i++) {
int octet = Integer.parseInt(octets[i]);
if (octet < 0 || octet > 255) {
System.out.println("Invalid input");
return;
}
String hex = String.format("%02X", octet);
ipv6.append(hex);
if (i == 1) {
ipv6.append(":");
}
}
} catch (NumberFormatException e) {
System.out.println("Invalid input");
return;
}
System.out.println(ipv6.toString());
}
IBMโ
def optimize_packaging(N, prods, M, bxs, K):
prods.sort(key=lambda x: x[0], reverse=True)
bxs.sort(key=lambda x: x[0], reverse=True)
boxC = 0
pidx = 0
for bx in bxs:
boxW, boxV = bx
currW = 0
currV = 0
while (pidx < N and
currW + prods[pidx][0] <= boxW and
currV + prods[pidx][1] <= boxV):
currW += prods[pidx][0]
currV += prods[pidx][1]
pidx += 1
if currW > 0 or currV > 0:
boxC += 1
if pidx == N:
break
return boxC if pidx == N and boxC <= K else -1
Product Packaging
Meesho Dice โ
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
#include <bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
fast();
int N, M, K;
cin >> N >> M;
unordered_map<int, int> freq;
for (int i = 0; i < N; i++) {
set<int> uniqP;
for (int j = 0; j < M; j++) {
int pid;
cin >> pid;
uniqP.insert(pid);
}
for (int prod : uniqP) {
freq[prod]++;
}
}
cin >> K;
vector<int> res;
for (auto& it : freq) {
if (it.second >= K) {
res.push_back(it.first);
}
}
sort(res.begin(), res.end());
for (int prod : res) {
cout << prod << " ";
}
cout << endl;
}
#define ll long long
using namespace std;
int main() {
fast();
int N, M, K;
cin >> N >> M;
unordered_map<int, int> freq;
for (int i = 0; i < N; i++) {
set<int> uniqP;
for (int j = 0; j < M; j++) {
int pid;
cin >> pid;
uniqP.insert(pid);
}
for (int prod : uniqP) {
freq[prod]++;
}
}
cin >> K;
vector<int> res;
for (auto& it : freq) {
if (it.second >= K) {
res.push_back(it.first);
}
}
sort(res.begin(), res.end());
for (int prod : res) {
cout << prod << " ";
}
cout << endl;
}
๐2
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
def parse_ip_header(a, b, c):
def binary_to_decimal(binary_str):
try:
return int(binary_str, 2)
except ValueError:
print("Error converting binary to decimal. Invalid binary string.")
return -1
if len(a) < 32 or len(b) < 32 or len(c) < 32:
print("INVALID Input")
return
version = binary_to_decimal(a[0:4])
protocol_binary = a[4:12]
ttl_binary = a[12:20]
packet_length_binary = a[20:32]
protocol_number = binary_to_decimal(protocol_binary)
protocol = 'TCP' if protocol_number == 6 else 'UDP' if protocol_number == 17 else 'Unknown'
ttl = binary_to_decimal(ttl_binary)
packet_length = binary_to_decimal(packet_length_binary)
def binary_ip_to_decimal(ip_binary):
try:
return '.'.join(str(binary_to_decimal(ip_binary[i:i+8])) for i in range(0, 32, 8))
except ValueError:
print("Error converting binary IP to decimal.")
return "Invalid IP"
source_ip = binary_ip_to_decimal(b)
destination_ip = binary_ip_to_decimal(c)
print(f"{version},{protocol},{ttl},{packet_length}")
print(source_ip)
print(destination_ip)
import sys
n = int(input())
inputs = [line.strip() for line in sys.stdin.readlines()]
if len(inputs) < 3:
print("Invalid Input")
else:
a, b, c = inputs[:3]
parse_ip_header(a, b, c)
IBMโ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Email: shipra.paliwal@gxinetworks.com
Fill the form: https://docs.google.com/forms/d/e/1FAIpQLSdSCmom-2HnmLk_mOA3kA6a4Pp4yBVRHmf1wp7R11yxTCgAVw/viewform
Fill the form: https://docs.google.com/forms/d/e/1FAIpQLSdSCmom-2HnmLk_mOA3kA6a4Pp4yBVRHmf1wp7R11yxTCgAVw/viewform
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Cisco is hiring for Software Engineer and Software Engineer Intern role
Batch eligible: 2025 grads (for full time) and 2026 grads (for intern)
Apply Link:
1) Software Engineer: https://jobs.cisco.com/jobs/ProjectDetail/Software-Engineer-Network-Embedded-Application-Development-New-Grad-India-UHR/1421660
2) Software Engineer Intern: https://jobs.cisco.com/jobs/IsAJob?projectId=1421663
Referral form : https://forms.gle/jiz1bvDD6GonvquP7
Batch eligible: 2025 grads (for full time) and 2026 grads (for intern)
Apply Link:
1) Software Engineer: https://jobs.cisco.com/jobs/ProjectDetail/Software-Engineer-Network-Embedded-Application-Development-New-Grad-India-UHR/1421660
2) Software Engineer Intern: https://jobs.cisco.com/jobs/IsAJob?projectId=1421663
Referral form : https://forms.gle/jiz1bvDD6GonvquP7
Cisco
Software Engineer โ Network/Embedded/Application Development (New Grad) - India UHR
Apply for Software Engineer โ Network/Embedded/Application Development (New Grad) - India UHR job with Cisco in Bangalore, India. Read about the role and find out if it's right for you.
๐1
#include <iostream>
#include <string>
using namespace std;
string outputNumber(string inputStr) {
string result = "";
int count = 1;
for (size_t i = 1; i < inputStr.length(); ++i) {
if (inputStr[i] == inputStr[i - 1]) {
count++;
} else {
result += to_string(count);
count = 1;
}
}
result += to_string(count); // Append the count of the last sequence
return result;
}
int main() {
string inputStr;
getline(cin, inputStr);
cout << outputNumber(inputStr) << endl;
return 0;
}
Principal FTE โ
#include <string>
using namespace std;
string outputNumber(string inputStr) {
string result = "";
int count = 1;
for (size_t i = 1; i < inputStr.length(); ++i) {
if (inputStr[i] == inputStr[i - 1]) {
count++;
} else {
result += to_string(count);
count = 1;
}
}
result += to_string(count); // Append the count of the last sequence
return result;
}
int main() {
string inputStr;
getline(cin, inputStr);
cout << outputNumber(inputStr) << endl;
return 0;
}
Principal FTE โ
#include <bits/stdc++.h>
using namespace std;
unsigned int single_digit_sum(int num) {
while (num >= 10) {
int sum = 0;
while (num > 0) {
sum += num % 10;
num /= 10;
}
num = sum;
}
return num;
}
unsigned int quotient(int** a, int n, int p, int q) {
unsigned int diagonal_sum = 0;
for (int i = 0; i < n; ++i) {
diagonal_sum += a[i][i];
}
unsigned int single_digit = single_digit_sum(a[p][q]);
return diagonal_sum / single_digit;
}
int main() {
int i, j, p, q;
int n;
cin >> n;
int** a = new int*[n];
for (i = 0; i < n; ++i) {
a[i] = new int[n];
}
for (i = 0; i < n; ++i) {
for (j = 0; j < n; ++j) {
cin >> a[i][j];
}
}
cin >> p >> q;
cout << quotient(a, n, p, q);
for (i = 0; i < n; ++i) {
delete[] a[i];
}
delete[] a;
return 0;
}
Principal FTE โ
using namespace std;
unsigned int single_digit_sum(int num) {
while (num >= 10) {
int sum = 0;
while (num > 0) {
sum += num % 10;
num /= 10;
}
num = sum;
}
return num;
}
unsigned int quotient(int** a, int n, int p, int q) {
unsigned int diagonal_sum = 0;
for (int i = 0; i < n; ++i) {
diagonal_sum += a[i][i];
}
unsigned int single_digit = single_digit_sum(a[p][q]);
return diagonal_sum / single_digit;
}
int main() {
int i, j, p, q;
int n;
cin >> n;
int** a = new int*[n];
for (i = 0; i < n; ++i) {
a[i] = new int[n];
}
for (i = 0; i < n; ++i) {
for (j = 0; j < n; ++j) {
cin >> a[i][j];
}
}
cin >> p >> q;
cout << quotient(a, n, p, q);
for (i = 0; i < n; ++i) {
delete[] a[i];
}
delete[] a;
return 0;
}
Principal FTE โ
๐1
int Max (int N, int K, vector<int> arr) {
vector<int> b(N + 1, 0);
vector<int> c;
int cnt = 0;
for (int i = 1; i <= N; ++i) {
if (arr[i - 1] % 2 == 1) {
b[i] = 1;
} else {
b[i] = -1;
}
}
for (int i = 1; i <= N; ++i) {
b[i] += b[i - 1];
}
for (int i = 1; i < N; ++i) {
if (b[i] == 0) {
c.push_back(abs(arr[i] - arr[i - 1]));
}
}
sort(c.begin(), c.end());
int pt = 0, cost = 0;
while (pt < c.size() && cost + c[pt] <= K) {
cost += c[pt];
++pt;
}
return pt;
}
max separations
โ
#include<bits/stdc++.h>
using namespace std;
const int MAXN = 1000000;
vector<long long> dp(MAXN + 1, 0);
void precompute() {
dp[1] = 1;
for (int i = 1; i <= MAXN; i++) {
for (int j = 2 * i; j <= MAXN; j += i) {
dp[j] += dp[i];
}
}
}
class Precompute {
public:
Precompute() {
precompute();
}
};
Precompute pre;
long long solve(int N) {
return dp[N];
}
Islands
BT Group โ
#include <iostream>
#include <vector>
#include <map>
#include <algorithm>
using namespace std;
long long findMaxRequests(int N, vector<int>& A, vector<int>& L, vector<int>& R) {
map<int, long long> events;
for (int i = 0; i < N; i++) {
events[L[i]] += A[i];
events[R[i]] -= A[i];
}
long long c = 0;
long long m = 0;
for (auto& event : events) {
c += event.second;
m = max(m, c);
}
return m;
}
Server Capability โ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
https://www.linkedin.com/posts/usha-subba-5598538a_sewaro-is-hiring-new-requirements-activity-7238819095876386816-FK36?utm_source=share&utm_medium=member_desktop
!! Sewaro is Hiring !!
New Requirements Alert ๐จ
Freshers can Apply
job mode - hybrid
location - Pune , Baner
pls fill the below form ๐
https://lnkd.in/dPf5E5hb
!! Sewaro is Hiring !!
New Requirements Alert ๐จ
Freshers can Apply
job mode - hybrid
location - Pune , Baner
pls fill the below form ๐
https://lnkd.in/dPf5E5hb
Linkedin
Usha Subba on LinkedIn: !! Sewaro is Hiring !!
New Requirements Alert ๐จ
Freshers can Apply
jobโฆ | 14 comments
New Requirements Alert ๐จ
Freshers can Apply
jobโฆ | 14 comments
!! Sewaro is Hiring !!
New Requirements Alert ๐จ
Freshers can Apply
job mode - hybrid
location - Pune , Baner
Radhika Subba Sewaro HR Solutions SEWAROโฆ | 14 comments on LinkedIn
New Requirements Alert ๐จ
Freshers can Apply
job mode - hybrid
location - Pune , Baner
Radhika Subba Sewaro HR Solutions SEWAROโฆ | 14 comments on LinkedIn
๐2
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
https://www.linkedin.com/posts/bhavana-bhavana-5b024a188_greeting-from-quess-corp-we-are-hiring-for-activity-7238787314640900096-xfph?utm_source=share&utm_medium=member_desktop
Greeting from Quess corp
We are hiring for one of our reputed client for Desktop management
Fresher only 2022, 2023 and 2024 batch
WFO /WFH โ WFO
Work Timings โ 6:30 PM โ 4 AM IST Both the way cab will be provided
Work Location โ Bangalore
CTC - 21900 Monthly
Job Description โ Desktop Support Management.
Summary: As an Application Support Engineer, you will be responsible for identifying and solving issues within multiple components of critical business systems. Your typical day will involve providing support for Microsoft Windows Desktop Management and ensuring smooth functioning of the systems
Greeting from Quess corp
We are hiring for one of our reputed client for Desktop management
Fresher only 2022, 2023 and 2024 batch
WFO /WFH โ WFO
Work Timings โ 6:30 PM โ 4 AM IST Both the way cab will be provided
Work Location โ Bangalore
CTC - 21900 Monthly
Job Description โ Desktop Support Management.
Summary: As an Application Support Engineer, you will be responsible for identifying and solving issues within multiple components of critical business systems. Your typical day will involve providing support for Microsoft Windows Desktop Management and ensuring smooth functioning of the systems
Linkedin
Bhavana Bhavana on LinkedIn: Greeting from Quess corp
We are hiring for one of our reputed client forโฆ | 37 comments
We are hiring for one of our reputed client forโฆ | 37 comments
Greeting from Quess corp
We are hiring for one of our reputed client for Desktop managementโฆ | 37 comments on LinkedIn
We are hiring for one of our reputed client for Desktop managementโฆ | 37 comments on LinkedIn
๐1