๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
using namespace std;
int solution(int n,vector<int>&a){
vector<int> p,neg;
for(int i = 0; i < n; i++) {
if(a[i] >= 0) {
p.push_back(a[i]);
} else {
neg.push_back(abs(a[i]));
}
}
sort(p.begin(), p.end());
sort(neg.begin(), neg.end());
int ans1=0;
int prev=0;
int cnt=n;
for(auto ele:p){
int dis=ele-prev;
ans1+=dis*cnt;
prev=ele;
cnt--;
}
prev=0;
if(p.size()>0){
int len2=p.size();
prev=p[len2-1];
}
for(int i=0;i<neg.size();i++){
if(i==0){
int dis= prev + neg[i];
ans1+=dis*cnt;
cnt--;
prev=neg[i];
continue;
}
int dis=neg[i]-prev;
ans1+=dis*cnt;
prev=neg[i];
cnt--;
}
cnt=n;
int ans2=0;
prev=0;
for(auto ele:neg){
int dis=ele-prev;
ans2+=dis*cnt;
prev=ele;
cnt--;
}
for(int i=0;i<p.size();i++){
if(i==0){
int dis= prev + p[i];
ans2+=dis*cnt;
cnt--;
prev=p[i];
continue;
}
int dis=p[i]-prev;
ans2+=dis*cnt;
prev=p[i];
cnt--;
}
return min(ans1,ans2);
}
int main() {
int n;
cin >> n;
vector<int> a(n);
for (int i = 0; i < n; i++) {
cin >> a[i];
}
cout << solution(n, a) << endl;
return 0;
}
kickdrum โ
#include <bits/stdc++.h>
using namespace std;
int findMinimumMoves(int C, int N) {
vector<vector<int>> dp(C + 1, vector<int>(N + 1, 0));
for (int n = 0; n <= N; n++) dp[1][n] = n;
for (int c = 1; c <= C; c++) dp[c][0] = 0;
for (int c = 2; c <= C; c++) {
for (int n = 1; n <= N; n++) {
int low = 1, high = n, result = n;
while (low <= high) {
int mid = (low + high) / 2;
int breakCase = dp[c-1][mid-1];
int noBreakCase = dp[c][n-mid];
int worstCase = 1 + max(breakCase, noBreakCase);
result = min(result, worstCase);
if (breakCase > noBreakCase) {
high = mid - 1;
} else {
low = mid + 1;
}
}
dp[c][n] = result;
}
}
return dp[C][N];
}
int main() {
int C, N;
cin >> C >> N;
cout << findMinimumMoves(C, N) << endl;
return 0;
}
Kickdrum โ
#include<cstdio>
const int N=2e5+1;
long long r;
int i,j,k,n,a[N],f[N][2];
int t,en[N],fa[N],nxt[N];
void dfs(int u,int p)
{
int w=a[u]>>k&1,i=fa[u],v;
for(f[u][w]=1,f[u][w^1]=0;i;i=nxt[i])if((v=en[i])!=p)
{
dfs(v,u);
r+=(1ll*f[v][0]*f[u][1]+1ll*f[v][1]*f[u][0])<<k;
f[u][1]+=f[v][w^1],f[u][0]+=f[v][w];
}
}
int main()
{
scanf("%d",&n);
for(i=1;i<=n;r+=a[i++])
scanf("%d",a+i);
for(k=1;k<n;++k)
{
scanf("%d%d",&i,&j);
en[++t]=j,nxt[t]=fa[i],fa[i]=t;
en[++t]=i,nxt[t]=fa[j],fa[j]=t;
}
for(k=19;~k;--k)dfs(1,0);
printf("%I64d",r);
}
Titan โ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
๐Cybage Software is hiring for Software Engineer
Experience: 0 - 1 year
Expected Salary: 6-12 LPA
Apply here: https://www.linkedin.com/jobs/view/4080212254/?alternateChannel=search
๐Cargoa is hiring for Junior Full-Stack Developer
Experience: 0 - 1 year
Expected Salary: 3 LPA
Apply here: https://forms.microsoft.com/pages/responsepage.aspx?id=aJQTBBVzyEumXuMRdJrJIB0fvyqGGKxFlToyI_4r9UJUREQ0QUIzSUtRSlk1VUY4V1RCM0lHTThYRC4u&route=shorturl
Experience: 0 - 1 year
Expected Salary: 6-12 LPA
Apply here: https://www.linkedin.com/jobs/view/4080212254/?alternateChannel=search
๐Cargoa is hiring for Junior Full-Stack Developer
Experience: 0 - 1 year
Expected Salary: 3 LPA
Apply here: https://forms.microsoft.com/pages/responsepage.aspx?id=aJQTBBVzyEumXuMRdJrJIB0fvyqGGKxFlToyI_4r9UJUREQ0QUIzSUtRSlk1VUY4V1RCM0lHTThYRC4u&route=shorturl
Linkedin
Cybage Software hiring Software Engineer in Pune, Maharashtra, India | LinkedIn
Posted 2:31:59 PM. About Cybage:Founded in 1995, Cybage Software Pvt. Ltd., a technology consulting organization is aโฆSee this and similar jobs on LinkedIn.
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int maxMinDistance(vector<int>& x, int k) {
sort(x.begin(), x.end());
int low = 0, high = x.back() - x.front();
int result = 0;
while (low <= high) {
int mid = (low + high) / 2;
int count = 1;
int lastPoint = x[0];
for (int point : x) {
if (point - lastPoint >= mid) {
count++;
lastPoint = point;
}
}
if (count >= k) {
result = mid;
low = mid + 1;
} else {
high = mid - 1;
}
}
return result;
}
//Optimal points selection โ
#include <vector>
#include <algorithm>
using namespace std;
int maxMinDistance(vector<int>& x, int k) {
sort(x.begin(), x.end());
int low = 0, high = x.back() - x.front();
int result = 0;
while (low <= high) {
int mid = (low + high) / 2;
int count = 1;
int lastPoint = x[0];
for (int point : x) {
if (point - lastPoint >= mid) {
count++;
lastPoint = point;
}
}
if (count >= k) {
result = mid;
low = mid + 1;
} else {
high = mid - 1;
}
}
return result;
}
//Optimal points selection โ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
๐IBM is hiring Freshers for Associate System Engineer Role
Role: Associate System Engineer
Experience: Entry Level
Location: Multiple
๐ปApply Link:
https://careers.ibm.com/job/21123930/associate-system-engineer-mumbai-in
Role: Associate System Engineer
Experience: Entry Level
Location: Multiple
๐ปApply Link:
https://careers.ibm.com/job/21123930/associate-system-engineer-mumbai-in
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Walkin in HCL for Graduate Trainee role
2022/2023/2024 batch passouts eligible
4 LPA CTC
Apply Here : https://forms.office.com/pages/responsepage.aspx?id=N-edGDrJWk-LaG9MqZQZEtK-Zjp5OQpPvLar3Zjew65UMVczOUg4S0hEUFVZUEpDUjRHWVdDVUtYTCQlQCN0PWcu&route=shorturl
2022/2023/2024 batch passouts eligible
4 LPA CTC
Apply Here : https://forms.office.com/pages/responsepage.aspx?id=N-edGDrJWk-LaG9MqZQZEtK-Zjp5OQpPvLar3Zjew65UMVczOUg4S0hEUFVZUEpDUjRHWVdDVUtYTCQlQCN0PWcu&route=shorturl
Office
Please fill out this form
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Deloitte
Check out this job at Deloitte, IT Ops- Lead Jr. Associate
Job Title: Lead Jr. Associate 1) Overview Executive โ Service Desk will be primarily responsible for performing L1 Service Desk activities...
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company (IBM-Kyndryl)
Role:- Associate Technical Engineer
Package 4.5LPA
Location : Bengaluru
Only 2023&2024 Passed out
Both Male and Female Candidates eligible
*6.5CGPA or 65% Throughout Required*
BE/B.TECH/CS/IS/EE/EC/ME/Mtech/MCA
Skills:- C/Python/OS/Linux
Apply link : https://kyndryl.wd5.myworkdayjobs.com/en-US/KyndrylEarlyCareers/job/Associate-Technical-Engineer_R-27649
Role:- Associate Technical Engineer
Package 4.5LPA
Location : Bengaluru
Only 2023&2024 Passed out
Both Male and Female Candidates eligible
*6.5CGPA or 65% Throughout Required*
BE/B.TECH/CS/IS/EE/EC/ME/Mtech/MCA
Skills:- C/Python/OS/Linux
Apply link : https://kyndryl.wd5.myworkdayjobs.com/en-US/KyndrylEarlyCareers/job/Associate-Technical-Engineer_R-27649
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
CRED is hiring Flutter Intern
For 2024, 2025 grads
https://jobs.lever.co/cred/d387f7d2-2c41-4825-8dda-ef2bc36ad44d/apply
For 2024, 2025 grads
https://jobs.lever.co/cred/d387f7d2-2c41-4825-8dda-ef2bc36ad44d/apply
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
๐Onelab Ventures is hiring for Software Engineer
Batch: 2024, 2025
Salary: 2024 (6 LPA) & 2025 (20k stipend per month + 6 LPA)
Apply Link: https://links.acciojob.com/sakjhodh
Batch: 2024, 2025
Salary: 2024 (6 LPA) & 2025 (20k stipend per month + 6 LPA)
Apply Link: https://links.acciojob.com/sakjhodh
Tally Forms
Onelab Ventures - Software Engineer - Job Drive - Now Closed
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Linkedin
Sign Up | LinkedIn
500 million+ members | Manage your professional identity. Build and engage with your professional network. Access knowledge, insights and opportunities.
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company Name: Happyfox
Role: Backend Developer Intern
Batch Eligible: 2025 passouts
Location: Bangalore
PPO Based on Performance
Share with your College Whatsapp Groups & Friends too
Apply Link: https://happyfox.hire.trakstar.com/jobs/fk0pq6x/
Note: Apply ASAP! It can get closed anytime soon.
Role: Backend Developer Intern
Batch Eligible: 2025 passouts
Location: Bangalore
PPO Based on Performance
Share with your College Whatsapp Groups & Friends too
Apply Link: https://happyfox.hire.trakstar.com/jobs/fk0pq6x/
Note: Apply ASAP! It can get closed anytime soon.
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Nordson hiring Software Engineer
0-1 year experience
3-5 LPA CTC
Apply Here : https://nordsonhcm.wd5.myworkdayjobs.com/nordsoncareers/job/India---Bangalore/Software-Engineer-I_REQ42193?source=LinkedIn
0-1 year experience
3-5 LPA CTC
Apply Here : https://nordsonhcm.wd5.myworkdayjobs.com/nordsoncareers/job/India---Bangalore/Software-Engineer-I_REQ42193?source=LinkedIn
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Linkedin
Ayushi Jain on LinkedIn: Google Forms: Sign-in | 82 comments
Scaler is Hiring: Problem Setter Intern for our DSML program.
Location: Remote
Duration: 3 months
Grad Year: 2026/2027
Role:
- Create and test high-quality programming questions.
- Collaborate with the content team on DSML modules and strategy.
- Writeโฆ
Location: Remote
Duration: 3 months
Grad Year: 2026/2027
Role:
- Create and test high-quality programming questions.
- Collaborate with the content team on DSML modules and strategy.
- Writeโฆ