long long solve(int N,int M,vector<int>Arr){
vector<int>v(N+1,INT_MAX);
int n=N;
for(int i=n-1;i>=0;i--){
v[i]=min(v[i+1],Arr[i]);
}
long long ans=INT_MAX;
for(int i=0;i<N;i++){
if((i+M-1)<N){
ans=min(ans,1ll*Arr[i]*v[i+M-1]);
}
}
return ans;
}
Array transfer
Uber โ
vector<int>v(N+1,INT_MAX);
int n=N;
for(int i=n-1;i>=0;i--){
v[i]=min(v[i+1],Arr[i]);
}
long long ans=INT_MAX;
for(int i=0;i<N;i++){
if((i+M-1)<N){
ans=min(ans,1ll*Arr[i]*v[i+M-1]);
}
}
return ans;
}
Array transfer
Uber โ
๐1
void dfs(int curr, int p, vector<int>* e, vector<int>& v, vector<int>& par, vector<int>& A){
par[curr] = p;
v[curr] = A[curr - 1];
for(auto it : e[curr]){
if(it == p) continue;
dfs(it, curr, e, v, par, A);
v[curr] += v[it];
}
}
int solve(int N, vector<vector<int>> edges, vector<int> A){
vector<int> e[N+1];
map<vector<int>, int> mp;
int c = 0;
for(auto it : edges){
e[it[0]].push_back(it[1]);
e[it[1]].push_back(it[0]);
mp[{it[0], it[1]}] = mp[{it[1], it[0]}] = c;
c++;
}
int sum = 0;
for(auto it : A) sum += it;
vector<int> v(N+1, 0), par(N+1, 0);
dfs(1, 0, e, v, par, A);
int ans = sum;
int id = edges.size();
for(int i = 1; i <= N; i++){
int a = sum - v[i];
if(abs(a - v[i]) < ans){
ans = abs(a - v[i]);
id = mp[{par[i], i}] + 1;
}
else if(abs(a - v[i]) == ans){
id = min(id, mp[{par[i], i}] + 1);
}
}
return id;
}
Division Nodes โ
Uber
par[curr] = p;
v[curr] = A[curr - 1];
for(auto it : e[curr]){
if(it == p) continue;
dfs(it, curr, e, v, par, A);
v[curr] += v[it];
}
}
int solve(int N, vector<vector<int>> edges, vector<int> A){
vector<int> e[N+1];
map<vector<int>, int> mp;
int c = 0;
for(auto it : edges){
e[it[0]].push_back(it[1]);
e[it[1]].push_back(it[0]);
mp[{it[0], it[1]}] = mp[{it[1], it[0]}] = c;
c++;
}
int sum = 0;
for(auto it : A) sum += it;
vector<int> v(N+1, 0), par(N+1, 0);
dfs(1, 0, e, v, par, A);
int ans = sum;
int id = edges.size();
for(int i = 1; i <= N; i++){
int a = sum - v[i];
if(abs(a - v[i]) < ans){
ans = abs(a - v[i]);
id = mp[{par[i], i}] + 1;
}
else if(abs(a - v[i]) == ans){
id = min(id, mp[{par[i], i}] + 1);
}
}
return id;
}
Division Nodes โ
Uber
typedef long long ll;
void solve() {
ll n = N;
vector<vector<ll>>arr(n, vector<ll>(3));
for (int i = 0; i < n; i++) {
arr[i] = {[0] = people[i] , [1] = starting[i] , [2] = ending[i]};
}
sort(arr.begin() , arr.end() , [&](vector<ll>& a , vector<ll>& b) {
if (a[1] == b[1]) return a[2] < b[2];
return a[1] < b[1];
});
ll sum = 0;
for (auto& x : arr) sum += x[0];
vector<ll>dp(n, -1);
auto recurr = [&](ll i , auto && recurr)->ll{
if (i >= n) return 0;
ll& ans = dp[i];
if (ans != -1) return ans; ans = 0;
ans = recurr(i + 1 , recurr);
ll low = i , high = n , val = arr[i][2];
while (high - low > 1) {
ll mid = (low + high) >> 1;
if (val >= arr[mid][1]) low = mid;
else high = mid;
}
ans = max(ans, arr[i][0] + recurr( low + 1 , recurr) );
return ans;
};
return sum - recurr(0, recurr);
}
Meeting Room โ
Uber
void solve() {
ll n = N;
vector<vector<ll>>arr(n, vector<ll>(3));
for (int i = 0; i < n; i++) {
arr[i] = {[0] = people[i] , [1] = starting[i] , [2] = ending[i]};
}
sort(arr.begin() , arr.end() , [&](vector<ll>& a , vector<ll>& b) {
if (a[1] == b[1]) return a[2] < b[2];
return a[1] < b[1];
});
ll sum = 0;
for (auto& x : arr) sum += x[0];
vector<ll>dp(n, -1);
auto recurr = [&](ll i , auto && recurr)->ll{
if (i >= n) return 0;
ll& ans = dp[i];
if (ans != -1) return ans; ans = 0;
ans = recurr(i + 1 , recurr);
ll low = i , high = n , val = arr[i][2];
while (high - low > 1) {
ll mid = (low + high) >> 1;
if (val >= arr[mid][1]) low = mid;
else high = mid;
}
ans = max(ans, arr[i][0] + recurr( low + 1 , recurr) );
return ans;
};
return sum - recurr(0, recurr);
}
Meeting Room โ
Uber
Tomorrow anyone give exam Oracle?
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Dunzo
Dunzo Careers
Order and get free delivery from your nearby restaurants, shop for online medicines also get groceries and packages delivered online at your doorstep using Dunzo.
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company Name: Park+
Role: SDE 1
Batch eligible: 2022 and 2023 grads.
Apply: https://parkplus.io/careers/jobs/sde-1#apply-job
Role: SDE 1
Batch eligible: 2022 and 2023 grads.
Apply: https://parkplus.io/careers/jobs/sde-1#apply-job
#include <bits/stdc++.h>
using namespace std;
#define int long long
vector<pair<int,int>> v;
int dp[1005][1005];
int solve(int i,int alice,int bob){
if(i==v.size()) return 0;
if(dp[alice][bob]!=-1) return dp[alice][bob];
int v1=abs(v[alice].first-v[i].first) + abs(v[alice].second-v[i].second);
int v2=abs(v[bob].first-v[i].first) + abs(v[bob].second-v[i].second);
int al=v1 + solve(i+1,i,bob);
int bb=v2 + solve(i+1,alice,i);
return dp[alice][bob]=min(al,bb);
}
signed main() {
int n;
cin>>n;
v.resize(n+2);
memset(dp,-1,sizeof(dp));
for(int i=0;i<n+2;i++){
cin>>v[i].first>>v[i].second;
}
cout<<solve(2,0,1);
return 0;
}
Falling Apples โ
using namespace std;
#define int long long
vector<pair<int,int>> v;
int dp[1005][1005];
int solve(int i,int alice,int bob){
if(i==v.size()) return 0;
if(dp[alice][bob]!=-1) return dp[alice][bob];
int v1=abs(v[alice].first-v[i].first) + abs(v[alice].second-v[i].second);
int v2=abs(v[bob].first-v[i].first) + abs(v[bob].second-v[i].second);
int al=v1 + solve(i+1,i,bob);
int bb=v2 + solve(i+1,alice,i);
return dp[alice][bob]=min(al,bb);
}
signed main() {
int n;
cin>>n;
v.resize(n+2);
memset(dp,-1,sizeof(dp));
for(int i=0;i<n+2;i++){
cin>>v[i].first>>v[i].second;
}
cout<<solve(2,0,1);
return 0;
}
Falling Apples โ
๐1
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
If youโre interested, just go for it ๐ค
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company Name: Ford
Role: Software. Engineer
Batch eligible: 2022 and 2023 grads.
Apply: https://efds.fa.em5.oraclecloud.com/hcmUI/CandidateExperience/en/sites/CX_1/requisitions/preview/12657/
Note:
1) Below this hiring, you will find many other openings for the same role, do apply in which you are confident.
2) Try to go with referral.
Role: Software. Engineer
Batch eligible: 2022 and 2023 grads.
Apply: https://efds.fa.em5.oraclecloud.com/hcmUI/CandidateExperience/en/sites/CX_1/requisitions/preview/12657/
Note:
1) Below this hiring, you will find many other openings for the same role, do apply in which you are confident.
2) Try to go with referral.
Ford Global Career Site
2023 Software Engineer
int solve(vector<int> &a){
vector<int> xorr(128, -1);
xorr[0] = 0;
for(auto i: a){
for(int v=0; v<128; v++){
if(xorr[v]!=-1){
if(xorr[v]<i and builtin_popcount(v)<=builtin_popcount(i)){
int newx = v^i;
if(xorr[newx]==-1) xorr[newx] = i;
else xorr[newx] = min(i, xorr[newx]);
}
}
}
}
int cnt = 0;
for(auto i: xorr){
if(i!=-1) cnt++;
}
return cnt;
}
Media net xor subsequence โ
vector<int> xorr(128, -1);
xorr[0] = 0;
for(auto i: a){
for(int v=0; v<128; v++){
if(xorr[v]!=-1){
if(xorr[v]<i and builtin_popcount(v)<=builtin_popcount(i)){
int newx = v^i;
if(xorr[newx]==-1) xorr[newx] = i;
else xorr[newx] = min(i, xorr[newx]);
}
}
}
}
int cnt = 0;
for(auto i: xorr){
if(i!=-1) cnt++;
}
return cnt;
}
Media net xor subsequence โ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company profile link:
https://www.linkedin.com/company/trialshoppy/
Intern openings in Trialshopy remote work.
Apply:https://docs.google.com/forms/d/15nYBTPKRxqPKv2oWWBP9FTlHF08D4CQ6fkfxAMLSjrc/edit
https://www.linkedin.com/company/trialshoppy/
Intern openings in Trialshopy remote work.
Apply:https://docs.google.com/forms/d/15nYBTPKRxqPKv2oWWBP9FTlHF08D4CQ6fkfxAMLSjrc/edit
Google Docs
Summer internship Offer at Trialshopy
Frontend Developer Internship at Trialshopy -6/ 2-Month Opportunity
As Frontend developer we require:
Proficiency in HTML, CSS, JavaScript, and frontend frameworks (React, Angular, or Vue.js). Strong problem-solving, collaboration, and attention to detailโฆ
As Frontend developer we require:
Proficiency in HTML, CSS, JavaScript, and frontend frameworks (React, Angular, or Vue.js). Strong problem-solving, collaboration, and attention to detailโฆ
๐1
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Costwise.Ai is hiring devops intern
Stipend : 10-20k
Link : https://docs.google.com/forms/d/e/1FAIpQLSdNiSqpEvNn5JM7zDYM7AwMWJYrfFzNvfBSeXGfveK8tsvfvQ/viewform
Stipend : 10-20k
Link : https://docs.google.com/forms/d/e/1FAIpQLSdNiSqpEvNn5JM7zDYM7AwMWJYrfFzNvfBSeXGfveK8tsvfvQ/viewform
Google Docs
DevOps Intern Application
Hiring for DevOps Intern at costwise.ai
Duration: 3-6 Months
Stipend: 10k-20k
Requirements (Mandatory) :
Hands-on Experience with Cloud ( AWS Preferred )
Strong DevOps Fundamentals (Linux, Networking, Docker etc.)
Automation with Shell Scripting / Pythonโฆ
Duration: 3-6 Months
Stipend: 10k-20k
Requirements (Mandatory) :
Hands-on Experience with Cloud ( AWS Preferred )
Strong DevOps Fundamentals (Linux, Networking, Docker etc.)
Automation with Shell Scripting / Pythonโฆ
๐1๐ฑ1
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
๐ด Company:- Boeing
Job Role :- ASSOCIATE SOFTWARE ENGINEER
Experienced Required : - 1 to 4 years
Eligibility : Bachelor or Master
Salary Range :- 9LPA to 30 LPA+ (Depend upon Experience)
Job Location - Bengaluru
โ๏ธ Apply Link : https://jobs.boeing.com/job/-/-/185/51425401296
Job Role :- ASSOCIATE SOFTWARE ENGINEER
Experienced Required : - 1 to 4 years
Eligibility : Bachelor or Master
Salary Range :- 9LPA to 30 LPA+ (Depend upon Experience)
Job Location - Bengaluru
โ๏ธ Apply Link : https://jobs.boeing.com/job/-/-/185/51425401296
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Walmart Converge Sparkathon
Chance to interview at Walmart for Software Engineering Internships and Full Time roles with a package of 23 LPA and a stipend of 1 Lakh/month.
Open to all engineering colleges in India who are pursuing the following degrees in circuit branches (ECE, EE, EEE, IT, CS):
BE/B.Tech - Batch of 2024 and 2025 (1st and 2nd-year students are not eligible to apply)
Dual degree full-time program - Batch of 2024 and 2025 (1st/2nd/3rd-year students are not eligible to apply)
ME/M.Tech. full-time programs - Batch of 2024 (1st-year students are not eligible to apply)
Apply Link: https://walmart.converge.tech/content/converge/en_in/sparkathon.html
Chance to interview at Walmart for Software Engineering Internships and Full Time roles with a package of 23 LPA and a stipend of 1 Lakh/month.
Open to all engineering colleges in India who are pursuing the following degrees in circuit branches (ECE, EE, EEE, IT, CS):
BE/B.Tech - Batch of 2024 and 2025 (1st and 2nd-year students are not eligible to apply)
Dual degree full-time program - Batch of 2024 and 2025 (1st/2nd/3rd-year students are not eligible to apply)
ME/M.Tech. full-time programs - Batch of 2024 (1st-year students are not eligible to apply)
Apply Link: https://walmart.converge.tech/content/converge/en_in/sparkathon.html
Sparkathon: Open innovation challenge for Indian students
Hack your way through complex retail problems using deep tech and build a culture that emphasizes product innovation and entrepreneurial vision.
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Xiaomi Technology Hiring !!
Role - Internship
Batch - 2024
Location - singapore
https://www.linkedin.com/jobs/view/3644157973
Role - Internship
Batch - 2024
Location - singapore
https://www.linkedin.com/jobs/view/3644157973
Linkedin
Xiaomi Technology hiring ใINTERNใSite Reliability Engineer in Singapore, Singapore | LinkedIn
Posted 9:47:40 AM. This position belongs to the 2024 Xiaomi Intern Recruitment Program.The ideal candidate'sโฆSee this and similar jobs on LinkedIn.
๐2