๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
using ll = long long;
long long minOverlapCost(vector<vector<int>> &segments)
{
sort(segments.begin(), segments.end(), [](const vector<int> &a, const vector<int> &b)
{ return a[1] < b[1]; });
ll minCost = LLONG_MAX;
ll minL = 1e18;
ll minCostSoFar = 1e18;
for (const auto &seg : segments)
{
ll L = seg[0], R = seg[1], cost = seg[2];
if (minL < L)
minCost = min(minCost, 1LL * minCostSoFar * cost);
if (cost < minCostSoFar)
{
minCostSoFar = cost;
minL = R;
}
}
return (minCost == LLONG_MAX) ? -1 : minCost;
}
Inframarket โ
long long minOverlapCost(vector<vector<int>> &segments)
{
sort(segments.begin(), segments.end(), [](const vector<int> &a, const vector<int> &b)
{ return a[1] < b[1]; });
ll minCost = LLONG_MAX;
ll minL = 1e18;
ll minCostSoFar = 1e18;
for (const auto &seg : segments)
{
ll L = seg[0], R = seg[1], cost = seg[2];
if (minL < L)
minCost = min(minCost, 1LL * minCostSoFar * cost);
if (cost < minCostSoFar)
{
minCostSoFar = cost;
minL = R;
}
}
return (minCost == LLONG_MAX) ? -1 : minCost;
}
Inframarket โ
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
long long solve(int n, int s, int f, vector<int> cost) { s--; f--; long long cw = 0; int i = s; while (i != f) { cw += cost[i]; i = (i + 1) % n; } long long ccw = 0; i = s; while (i != f) { โฆ
def solve (N, start, finish, Ticket_cost):
f = 0
r = 0
if start > finish:
start, finish = finish, start
f = sum(Ticket_cost[start-1:finish-1])
t = sum(Ticket_cost)
r = t - f
return min(f, r)
N = int(input())
start = int(input())
finish = int(input())
Ticket_cost = list(map(int, input().split()))
out_ = solve(N, start, finish, Ticket_cost)
print (out_)
Tram Ride โ
Python 3
f = 0
r = 0
if start > finish:
start, finish = finish, start
f = sum(Ticket_cost[start-1:finish-1])
t = sum(Ticket_cost)
r = t - f
return min(f, r)
N = int(input())
start = int(input())
finish = int(input())
Ticket_cost = list(map(int, input().split()))
out_ = solve(N, start, finish, Ticket_cost)
print (out_)
Tram Ride โ
Python 3
#include <iostream>
#include <vector>
#include <string>
using namespace std;
int countSubstrings(string input_str) {
string d[9] = {"ab", "cde", "fgh", "ijk", "lmn", "opq", "rst", "uvw", "xyz"};
vector<int> mp(26, 0);
for (int i = 0; i < 9; ++i) {
for (char c : d[i]) {
mp[c - 'a'] = i + 1;
}
}
int ans = 0;
int n = input_str.size();
for (int i = 0; i < n; ++i) {
int s = 0;
for (int j = i; j < n; ++j) {
s += mp[input_str[j] - 'a'];
if (s % (j - i + 1) == 0) {
++ans;
}
}
}
return ans;
}
Countsubstring โ
#include <vector>
#include <string>
using namespace std;
int countSubstrings(string input_str) {
string d[9] = {"ab", "cde", "fgh", "ijk", "lmn", "opq", "rst", "uvw", "xyz"};
vector<int> mp(26, 0);
for (int i = 0; i < 9; ++i) {
for (char c : d[i]) {
mp[c - 'a'] = i + 1;
}
}
int ans = 0;
int n = input_str.size();
for (int i = 0; i < n; ++i) {
int s = 0;
for (int j = i; j < n; ++j) {
s += mp[input_str[j] - 'a'];
if (s % (j - i + 1) == 0) {
++ans;
}
}
}
return ans;
}
Countsubstring โ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Kindly share your CV with hr@althisolutions.com
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
def is_valid_email(email):
if not email.endswith('@hackerrank.com'):
return False
user = email[:-15]
if len(user) < 1 or len(user) > 11:
return False
letters = 0
underscore = 0
digits = 0
for char in user:
if 'a' <= char <= 'z':
if underscore or digits:
return False
letters += 1
elif char == '_':
if underscore or digits:
return False
underscore += 1
elif '0' <= char <= '9':
digits += 1
else:
return False
if letters < 1 or letters > 6:
return False
if underscore > 1:
return False
if digits > 4:
return False
return True
query = int(input())
result = ['False'] * query
for i in range(query):
someString = input()
if is_valid_email(someString):
result[i] = 'True'
with open('output.txt', 'w') as fileOut:
fileOut.write('\n'.join(result))
Valid Email Addresses โ
int help(vl arr, vl arr2, int n)
{
vector<pair<ll, ll>> ans;
for (int i = 0; i < n; i++)
{
ans.pb({arr[i], arr2[i]});
}
sort(all(ans));
debug(ans);
ll ans1 = *max_element(all(arr));
ll finalans = ans1;
ll sum = 0;
for (int i = n - 1; i >= 0; i--)
{
ans1 = ans[i].ff;
finalans = min(finalans, max(ans1, sum));
sum += ans[i].ss;
}
finalans = min(finalans, sum);
return finalans;
}
Efficient Application Development โ
{
vector<pair<ll, ll>> ans;
for (int i = 0; i < n; i++)
{
ans.pb({arr[i], arr2[i]});
}
sort(all(ans));
debug(ans);
ll ans1 = *max_element(all(arr));
ll finalans = ans1;
ll sum = 0;
for (int i = n - 1; i >= 0; i--)
{
ans1 = ans[i].ff;
finalans = min(finalans, max(ans1, sum));
sum += ans[i].ss;
}
finalans = min(finalans, sum);
return finalans;
}
Efficient Application Development โ
long getMaximumEfficiency(int n,int k,vl capacity,vl numserver){
sort(numserver.begin(),numserver.end());
sort(capacity.begin(),capacity.end());
ll sum=0;
int x=0;
int y=n-1;
for(int i=k-1;i>=0;i--){
if(numserver[i]==1){
break;
}
sum+=capacity[y]-capacity[x];
x++;
y--;
}
return sum;
}
Server upgrade โ
sort(numserver.begin(),numserver.end());
sort(capacity.begin(),capacity.end());
ll sum=0;
int x=0;
int y=n-1;
for(int i=k-1;i>=0;i--){
if(numserver[i]==1){
break;
}
sum+=capacity[y]-capacity[x];
x++;
y--;
}
return sum;
}
Server upgrade โ
๐1
from collections import deque
def can_reach_all_with_p(teammates, P):
n = len(teammates)
graph = [[] for _ in range(n)]
for i in range(n):
for j in range(n):
if i != j:
dist = abs(teammates[i][0] - teammates[j][0]) + abs(teammates[i][1] - teammates[j][1])
if dist <= P:
graph[i].append(j)
def bfs(start):
visited = [False] * n
q = deque([start])
visited[start] = True
count = 1
while q:
node = q.popleft()
for neighbor in graph[node]:
if not visited[neighbor]:
visited[neighbor] = True
q.append(neighbor)
count += 1
return count == n
for i in range(n):
if bfs(i):
return True
return False
def min_initial_points(teammates):
left, right = 0, 2 * 10**9
while left < right:
mid = (left + right) // 2
if can_reach_all_with_p(teammates, mid):
right = mid
else:
left = mid + 1
return left
Reach teammate
Groww โ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
๐Bank of America Hiring Apprentice
Qualification:
Final year Graduates from the Class of 2025 ONLY
- Must Have Major Specialization in Computer Science & Information Technology ONLY
- Must have scored 60% in the last semester OR CGPA of 6 on a scale of 10 in the last semester
- No Active Backlogs in any of the current or prior semesters
- Students should be willing to join any of the roles/skills/segment as per company requirement
- Students should be willing to work in any shifts/night shifts as per company requirement
- Students should be willing to work in any locations namely โ Mumbai, Chennai, Gurugram, Gandhinagar (GIFT), Hyderabad as per company requirement
๐ปApply: https://careers.bankofamerica.com/en-us/job-detail/24035855/apprentice-multiple-locations
Qualification:
Final year Graduates from the Class of 2025 ONLY
- Must Have Major Specialization in Computer Science & Information Technology ONLY
- Must have scored 60% in the last semester OR CGPA of 6 on a scale of 10 in the last semester
- No Active Backlogs in any of the current or prior semesters
- Students should be willing to join any of the roles/skills/segment as per company requirement
- Students should be willing to work in any shifts/night shifts as per company requirement
- Students should be willing to work in any locations namely โ Mumbai, Chennai, Gurugram, Gandhinagar (GIFT), Hyderabad as per company requirement
๐ปApply: https://careers.bankofamerica.com/en-us/job-detail/24035855/apprentice-multiple-locations
Bankofamerica
Bank of America Error Page
Please Try Again
๐1
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
๐ Naukri Campus Young Turks Skill Assessment Test ๐
Your chance to showcase your skills in demand by employers by taking two tests.
Eligibility : Students currently pursuing UG courses and 2024 undergraduates looking for their first job ( BA, B.Com, B.Sc, B.Tech, BBA, BCA & more)
Round 1 : Basic Aptitude Test
Round 2 : Skills Test in fields like coding & six other areas
Rewards ๐: Earn merit certificates from top brands to enhance your CV, even win cash prizes, goodies up to Rs. 20,00,000! ๐ถ
Enroll Here ๐ : https://feji.us/zh7zag
Your chance to showcase your skills in demand by employers by taking two tests.
Eligibility : Students currently pursuing UG courses and 2024 undergraduates looking for their first job ( BA, B.Com, B.Sc, B.Tech, BBA, BCA & more)
Round 1 : Basic Aptitude Test
Round 2 : Skills Test in fields like coding & six other areas
Rewards ๐: Earn merit certificates from top brands to enhance your CV, even win cash prizes, goodies up to Rs. 20,00,000! ๐ถ
Enroll Here ๐ : https://feji.us/zh7zag
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Adidas is hiring Junior Data and Platform Engineer
For 2022, 2023 grads
Location: Gurugram
https://jobs.adidas-group.com/adidas/job/Gurgaon-Junior-Data-&-Platform-Engineer-HR/1113244801/?feedId=301201
For 2022, 2023 grads
Location: Gurugram
https://jobs.adidas-group.com/adidas/job/Gurgaon-Junior-Data-&-Platform-Engineer-HR/1113244801/?feedId=301201
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company Name : Qualcomm
Role : Software Engineer (Test)
Batch : 2023 passouts - ECE/CS
Mail your resume to : aayushar@qti.qualcomm.com
Role : Software Engineer (Test)
Batch : 2023 passouts - ECE/CS
Mail your resume to : aayushar@qti.qualcomm.com
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Linkedin
Rohan . on LinkedIn: We are hiring for the SDE Intern for Remote(Work from Home Location).
Noteโฆ | 45 comments
Noteโฆ | 45 comments
We are hiring for the SDE Intern for Remote(Work from Home Location).
Note - Its Internship not Full Time
Kindly dm with resume, | 45 comments on LinkedIn
Note - Its Internship not Full Time
Kindly dm with resume, | 45 comments on LinkedIn
๐1
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int solve(const vector<int>& arr) {
int n = arr.size();
int a = 0;
for (int i = 0; i < n; i++) {
if (arr[i] == 1) a++;
}
if (a == n) {
return n - 1;
}
vector<int> f(n);
for (int i = 0; i < n; i++) {
f[i] = (arr[i] == 1) ? -1 : 1;
}
int m = f[0], v = f[0];
for (int i = 1; i < n; i++) {
v = max(f[i], v + f[i]);
m = max(m, v);
}
int e = a + m;
return e;
}
flipping frenzy gameโ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
TCS Codevita is back with its 12 edition!!
Batch eligible: 2025, 2026, 2027 and 2028 grads
Apply: https://codevita.tcsapps.com/
Batch eligible: 2025, 2026, 2027 and 2028 grads
Apply: https://codevita.tcsapps.com/
Tcsapps
TCS CodeVita | Home
TCS CodeVita, a programming contest, is TCS' way of attracting young impressionable college students to adopt this culture and experience joy of programming.