#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int minOperations(int k, vector<int>& locks) {
int n = locks.size();
int answer = 1e9;
for (int target = 1; target <= k; ++target) {
int operations = 0;
for (int j = 0; j < n; ++j) {
if (locks[j] == target) continue;
int direct_op = abs(target - locks[j]);
int threshold_op = k - locks[j] + target;
operations += min(direct_op, threshold_op);
}
answer = min(answer, operations);
}
return answer;
}
int main() {
int k, n;
cin >> k >> n;
vector<int> locks(n);
for (int i = 0; i < n; ++i) {
cin >> locks[i];
}
cout << minOperations(k, locks) << endl;
return 0;
}
#include <vector>
#include <algorithm>
using namespace std;
int minOperations(int k, vector<int>& locks) {
int n = locks.size();
int answer = 1e9;
for (int target = 1; target <= k; ++target) {
int operations = 0;
for (int j = 0; j < n; ++j) {
if (locks[j] == target) continue;
int direct_op = abs(target - locks[j]);
int threshold_op = k - locks[j] + target;
operations += min(direct_op, threshold_op);
}
answer = min(answer, operations);
}
return answer;
}
int main() {
int k, n;
cin >> k >> n;
vector<int> locks(n);
for (int i = 0; i < n; ++i) {
cin >> locks[i];
}
cout << minOperations(k, locks) << endl;
return 0;
}
๐1
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Multiple Hiring Opportunities! ๐จ ๐
Batch: 2021/2022/2023/2024/2025
Google is hiring for Data Scientist
Salary Range: 40-70 LPA
Location: Bangalore/Hyderabad
https://google.com/about/careers/applications/jobs/results/129511447085359814-data-scientist/
Meeden Labs is hiring for Frontend Developer
Salary: 4-7 LPA
Location: Bangalore (Hybrid)
https://linkedin.com/jobs/view/3736204405/
Sophos is hiring for Software Engineer - SDET
Salary Range: 6-10 LPA
Location: Remote
https://jobs.lever.co/sophos/d9edb6af-558e-48b3-aa32-9ce22b93d0d2
Keysight is hiring for Technical Support Engineer
Salary: 4-7 LPA
Location: Bangalore
https://jobs.keysight.com/job/Bengaluru-Technical-Support-Engineer/841801800/
Wipro is hiring for Analyst
Salary: 4-6 LPA
Location: Gurugram
https://careers.wipro.com/careers-home/jobs/3012196?mode=job&iis=Social+Media&iisn=Linkedin&lang=en-us
Baker Hughes is hiring for Early Career Trainee
Salary Range: 4-5 LPA
Location: Bangalore
https://careers.bakerhughes.com/global/en/job/BAHUGLOBALR102077/Early-Career-Trainee-DT
Batch: 2021/2022/2023/2024/2025
Google is hiring for Data Scientist
Salary Range: 40-70 LPA
Location: Bangalore/Hyderabad
https://google.com/about/careers/applications/jobs/results/129511447085359814-data-scientist/
Meeden Labs is hiring for Frontend Developer
Salary: 4-7 LPA
Location: Bangalore (Hybrid)
https://linkedin.com/jobs/view/3736204405/
Sophos is hiring for Software Engineer - SDET
Salary Range: 6-10 LPA
Location: Remote
https://jobs.lever.co/sophos/d9edb6af-558e-48b3-aa32-9ce22b93d0d2
Keysight is hiring for Technical Support Engineer
Salary: 4-7 LPA
Location: Bangalore
https://jobs.keysight.com/job/Bengaluru-Technical-Support-Engineer/841801800/
Wipro is hiring for Analyst
Salary: 4-6 LPA
Location: Gurugram
https://careers.wipro.com/careers-home/jobs/3012196?mode=job&iis=Social+Media&iisn=Linkedin&lang=en-us
Baker Hughes is hiring for Early Career Trainee
Salary Range: 4-5 LPA
Location: Bangalore
https://careers.bakerhughes.com/global/en/job/BAHUGLOBALR102077/Early-Career-Trainee-DT
Linkedin
Meeden Labs hiring Frontend Developer in Bengaluru, Karnataka, India | LinkedIn
Posted 4:51:55 AM. Job descriptionRole DescriptionThis is a full-time position for a Frontend Developer with a hybridโฆSee this and similar jobs on LinkedIn.
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Zycus hiring Software Engineer - Angular (SOF01865)
Experience: 0-1 years
(Fresher- ONLY 2020, 2021 and 2022 PASSOUTS)
Salary: 4 LPA - 7 LPA
Apply - https://tinyurl.com/yvp2wtns
Experience: 0-1 years
(Fresher- ONLY 2020, 2021 and 2022 PASSOUTS)
Salary: 4 LPA - 7 LPA
Apply - https://tinyurl.com/yvp2wtns
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company Name: Tower Research Capital
Role: Software Engineer
Batch eligible: 2021, 2022 and 2023 grads
Apply: https://boards.greenhouse.io/embed/job_app?token=5400276&source=LinkedIn
Role: Software Engineer
Batch eligible: 2021, 2022 and 2023 grads
Apply: https://boards.greenhouse.io/embed/job_app?token=5400276&source=LinkedIn
boards.greenhouse.io
Software Engineer
Gurgaon
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Verloop.io is Hiring fresher for SDE 1 Backend !!
SKILLS AND EXPERIENCE
โข 0-3 years of experience in Golang / NodeJS.
โข Should value simple solutions and write concise code.
โข Understanding of Microservice / SaaS based application development paradigms
โข Strong computer science fundamentals
โข Self-motivated to work in a fast-growing environment.
โข Excellent organizational skills.
โข You are a self-starter that anticipates requests and doesnโt need a lot of oversight.
โข Great problem-solving skills, taking a consultative approach to find the best solution.
โข Excellent verbal & written communication skills. You can explain complex issues in simple terms and adapt your tone for different users.
JOB RESPONSIBILITIES
โข Build feature components in the product backend.
โข Have a keen eye for detail to make sure systems are running smoothly.
โข Coordinate with multiple teams to ensure smooth interoperability between microservices.
โข THIS POSITION IS REMOTE
NOTE: Interested candidates will have to take up the mandatory online test (Round 1) using the link below
Link: https://www.hackerrank.com/test/7qp4frfoq30/cfdeb864b32e28bf47ec37a5e2088127
Candidates that pass the online test will be the only ones to get a call for round 2
SKILLS AND EXPERIENCE
โข 0-3 years of experience in Golang / NodeJS.
โข Should value simple solutions and write concise code.
โข Understanding of Microservice / SaaS based application development paradigms
โข Strong computer science fundamentals
โข Self-motivated to work in a fast-growing environment.
โข Excellent organizational skills.
โข You are a self-starter that anticipates requests and doesnโt need a lot of oversight.
โข Great problem-solving skills, taking a consultative approach to find the best solution.
โข Excellent verbal & written communication skills. You can explain complex issues in simple terms and adapt your tone for different users.
JOB RESPONSIBILITIES
โข Build feature components in the product backend.
โข Have a keen eye for detail to make sure systems are running smoothly.
โข Coordinate with multiple teams to ensure smooth interoperability between microservices.
โข THIS POSITION IS REMOTE
NOTE: Interested candidates will have to take up the mandatory online test (Round 1) using the link below
Link: https://www.hackerrank.com/test/7qp4frfoq30/cfdeb864b32e28bf47ec37a5e2088127
Candidates that pass the online test will be the only ones to get a call for round 2
HackerRank
Join over 23 million developers in solving code challenges on HackerRank, one of the best ways to prepare for programming interviews.
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Jumptrading is Hiring !!
Role: Software Engineer Intern
Batch: 2025
Apply here- https://www.jumptrading.com/careers/5423503/?gh_jid=5423503
Role: Software Engineer Intern
Batch: 2025
Apply here- https://www.jumptrading.com/careers/5423503/?gh_jid=5423503
Jumptrading
Jump Trading
Jump Trading is a division of Jump Trading Group, a leading data and research-driven trading business
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Meesho is hiring for Business Analyst Role
Required Experience: 0-2 Years
Key Skills: Advanced SQL, Excel & Structured Problem Solving!
Application/Referral google form:
https://docs.google.com/forms/d/e/1FAIpQLSceRpZBtxKtcM9GJCCk0J28Sj3fJhTmIS-HXpBbEHmKdRpkOQ/viewform
Required Experience: 0-2 Years
Key Skills: Advanced SQL, Excel & Structured Problem Solving!
Application/Referral google form:
https://docs.google.com/forms/d/e/1FAIpQLSceRpZBtxKtcM9GJCCk0J28Sj3fJhTmIS-HXpBbEHmKdRpkOQ/viewform
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
looking for a CA Fresher or MBA Finance with 0 to 2 years of experience at Reliance Jio for JioAds - Commercial Role.
Location - Navi Mumbai
Interested candidates can send CV to hardik.satra@ril.com
Location - Navi Mumbai
Interested candidates can send CV to hardik.satra@ril.com
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Hiring Freshers !!!
Location - Mumbai/Pune
Eligibility - B.Tech or Diploma in Mechanical, Electrical, Electronics & Telecommunications
Interested candidates can share updated CV at Priya@doyenservices.com
Location - Mumbai/Pune
Eligibility - B.Tech or Diploma in Mechanical, Electrical, Electronics & Telecommunications
Interested candidates can share updated CV at Priya@doyenservices.com
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Quest Global!!
We are hiring BE Mechatronics freshers who have graduated in 2022 or 2023 Interested candidates pleases share your resume to sangeetha.veerapathiran@quest-global.com
We are hiring BE Mechatronics freshers who have graduated in 2022 or 2023 Interested candidates pleases share your resume to sangeetha.veerapathiran@quest-global.com
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Appfire Hiring Software Engineer
Batch - 2022 or before
Link
https://boards.greenhouse.io/appfiretechnologiesllc/jobs/4327109005?gh_src=bafe9fd45us
Batch - 2022 or before
Link
https://boards.greenhouse.io/appfiretechnologiesllc/jobs/4327109005?gh_src=bafe9fd45us
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Forcepoint Hiring IT intern
Batch : 2024, 2025, 2026 passout
Experience: fresher
Salary : 50k per month
https://www.linkedin.com/jobs/view/3737855502/
Batch : 2024, 2025, 2026 passout
Experience: fresher
Salary : 50k per month
https://www.linkedin.com/jobs/view/3737855502/
Linkedin
Forcepoint hiring IT Intern in Bengaluru East, Karnataka, India | LinkedIn
Posted 4:23:20 AM. Who is Forcepoint? Forcepoint simplifies security for global businesses and governmentsโฆSee this and similar jobs on LinkedIn.
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
EPIO Hiring Software Intern
Batch : 2024, 2025, 2026 passout
Experience: Students
Salary : 50k per month
https://epiqsystems.wd5.myworkdayjobs.com/en-US/Epiq_Careers/job/IND-Hyderabad-Sohini-Tech-Park-3rd-Floor-Financial-District/Software-Engineering-Intern_R0026574
Batch : 2024, 2025, 2026 passout
Experience: Students
Salary : 50k per month
https://epiqsystems.wd5.myworkdayjobs.com/en-US/Epiq_Careers/job/IND-Hyderabad-Sohini-Tech-Park-3rd-Floor-Financial-District/Software-Engineering-Intern_R0026574
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
L&T Technology Services - B.Tech Hiring โ 2023 pass out batch.
Please register using the below link:
https://forms.office.com/pages/responsepage.aspx?id=eDMbMYqOXkujP-gKPYumCl54ACWF32ZNsqKK3NlTPy1UQk1ESDE3NUIzRkdGOVowNjdZVEg2QTZYQS4u
** Please note that applicants that do not fill the above form will not be considered.
Registration End Date: 6:00PM, 19th October 2023
Position Details:
- Hiring for candidates with specialization in Instrumentation and Control & Civil.
Year of Pass out โ 2023.
Joining โ Quarterly Joining
Type of Offer โ Full time
Compensation - As per Industry Standards
**Please note that only candidates who have completed B.Tech will be considered for the further processes.
Please register using the below link:
https://forms.office.com/pages/responsepage.aspx?id=eDMbMYqOXkujP-gKPYumCl54ACWF32ZNsqKK3NlTPy1UQk1ESDE3NUIzRkdGOVowNjdZVEg2QTZYQS4u
** Please note that applicants that do not fill the above form will not be considered.
Registration End Date: 6:00PM, 19th October 2023
Position Details:
- Hiring for candidates with specialization in Instrumentation and Control & Civil.
Year of Pass out โ 2023.
Joining โ Quarterly Joining
Type of Offer โ Full time
Compensation - As per Industry Standards
**Please note that only candidates who have completed B.Tech will be considered for the further processes.
Office
Please fill out this form
๐1
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Vector Shift is hiring
Stipend : $100k -$160k
New grads can also apply
Link : https://www.workatastartup.com/jobs/63007
Stipend : $100k -$160k
New grads can also apply
Link : https://www.workatastartup.com/jobs/63007
Y Combinator's Work at a Startup
Fullstack Engineer at VectorShift
As a Fullstack Engineer, you will have the unique opportunity to shape the DNA of our product. Given the no/low-code nature of our platform, we're seeking someone who is not only technically adept but also deeply passionate about creating an engaging, intuitiveโฆ