๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
#include <iostream>
#include <string>
using namespace std;
string helper(const string& s, size_t& index) {
string ans = "";
int isans = 0;
while (index < s.length())
{
if (isdigit(s[index]))
{
isans = isans * 10 + (s[index] - '0');
} else if (s[index] == '(')
{
index++;
string subResult = helper(s, index);
for (int i = 0; i < isans; i++)
{
ans += subResult;
}
isans = 0;
} else if (s[index] == ')')
{
index++;
return ans;
} else
{
ans += s[index];
}
index++;
}
return ans;
}
string expandString(const string& s) {
size_t index = 0;
return helper(s, index);
}
#include <string>
using namespace std;
string helper(const string& s, size_t& index) {
string ans = "";
int isans = 0;
while (index < s.length())
{
if (isdigit(s[index]))
{
isans = isans * 10 + (s[index] - '0');
} else if (s[index] == '(')
{
index++;
string subResult = helper(s, index);
for (int i = 0; i < isans; i++)
{
ans += subResult;
}
isans = 0;
} else if (s[index] == ')')
{
index++;
return ans;
} else
{
ans += s[index];
}
index++;
}
return ans;
}
string expandString(const string& s) {
size_t index = 0;
return helper(s, index);
}
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
#include <string>
#include <cmath>
#include <algorithm>
#include <iostream>
using namespace std;
int swapAndCount(string s, string t) {
int swaps=0;
int flag=1;
int n=s.size();
for(int i=0;i<n;i++){
if(s[i]==t[i]) continue;
else if(s[i]<t[i]){
if(flag) {
swaps++;
flag=0;
}
if(!flag){
continue;
}
}
else{
if(flag){
flag=0;
}
else if(!flag){
swaps++;
}
}
}
return swaps;
}
int solution(string S, string T) {
return min(swapAndCount(S, T),swapAndCount(T, S));
}
#include <cmath>
#include <algorithm>
#include <iostream>
using namespace std;
int swapAndCount(string s, string t) {
int swaps=0;
int flag=1;
int n=s.size();
for(int i=0;i<n;i++){
if(s[i]==t[i]) continue;
else if(s[i]<t[i]){
if(flag) {
swaps++;
flag=0;
}
if(!flag){
continue;
}
}
else{
if(flag){
flag=0;
}
else if(!flag){
swaps++;
}
}
}
return swaps;
}
int solution(string S, string T) {
return min(swapAndCount(S, T),swapAndCount(T, S));
}
#include <vector>
#include <array>
#include <algorithm>
#include <numeric>
#include <functional>
long long solve(int N, std::vector<int> from, std::vector<int> to, std::vector<int> weight, int k) {
std::vector<std::vector<std::pair<int, int>>> adj(N);
for (int i = 0; i < N - 1; ++i) { // build adj
adj[from[i]].emplace_back(to[i], weight[i]);
adj[to[i]].emplace_back(from[i], weight[i]);
}
std::function<std::array<long long, 2>(int, int)> dfs = [&](int cur, int parent) {
std::array<long long, 2> ans{};
std::vector<long long> take, skip, diff;
for (auto& [next, w] : adj[cur]) if (parent != next) {
auto [not_full, full] = dfs(next, cur);
take.push_back(not_full + w);
skip.push_back(full);
diff.push_back(take.back() - skip.back());
}
int n = int(diff.size());
std::ranges::nth_element(diff, diff.begin() + k - 1, std::greater<>());
ans[0] = std::reduce(diff.begin(), diff.begin() + std::min(k, n)) + std::reduce(skip.begin(), skip.end());
if (n && n >= k) {
ans[1] = ans[0];
ans[0] -= *std::min_element(diff.begin(), diff.begin() + k);
}
return ans;
};
auto ans = dfs(0, -1);
return std::max(ans[0], ans[1]);
}
Server โ
#include <array>
#include <algorithm>
#include <numeric>
#include <functional>
long long solve(int N, std::vector<int> from, std::vector<int> to, std::vector<int> weight, int k) {
std::vector<std::vector<std::pair<int, int>>> adj(N);
for (int i = 0; i < N - 1; ++i) { // build adj
adj[from[i]].emplace_back(to[i], weight[i]);
adj[to[i]].emplace_back(from[i], weight[i]);
}
std::function<std::array<long long, 2>(int, int)> dfs = [&](int cur, int parent) {
std::array<long long, 2> ans{};
std::vector<long long> take, skip, diff;
for (auto& [next, w] : adj[cur]) if (parent != next) {
auto [not_full, full] = dfs(next, cur);
take.push_back(not_full + w);
skip.push_back(full);
diff.push_back(take.back() - skip.back());
}
int n = int(diff.size());
std::ranges::nth_element(diff, diff.begin() + k - 1, std::greater<>());
ans[0] = std::reduce(diff.begin(), diff.begin() + std::min(k, n)) + std::reduce(skip.begin(), skip.end());
if (n && n >= k) {
ans[1] = ans[0];
ans[0] -= *std::min_element(diff.begin(), diff.begin() + k);
}
return ans;
};
auto ans = dfs(0, -1);
return std::max(ans[0], ans[1]);
}
Server โ
#include <iostream>
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
vector<int> a(n);
for (int i = 0; i < n; i++) {
cin >> a[i];
}
int l = 0, r = n - 1;
while (l < n && a[l] == 0) l++;
while (r > l && a[r] == 0) r--;
int ans = 0;
if ((r - l + 1) % 2 == 0) {
if (a[l] > a[r]) {
ans += a[r];
r--;
} else {
ans += a[l];
l++;
}
}
int sum = 0, c = 1, max1 = 0, sum1 = 0, max2 = 0, sum2 = 0;
for (int i = l; i <= r; i++) {
sum += a[i];
int tmp = c / 2;
int god = (tmp * (tmp + 1)) + (tmp + 1);
if (god <= sum && c % 2 == 1) {
max1 = c;
sum1 = sum;
}
c++;
}
c = 1;
sum = 0;
for (int i = r; i >= l; i--) {
sum += a[i];
int tmp = c / 2;
int god = (tmp * (tmp + 1)) + (tmp + 1);
if (god <= sum && c % 2 == 1) {
max2 = c;
sum2 = sum;
}
c++;
}
int max1h = max1 / 2, max2h = max2 / 2;
int ans1 = (max1h * (max1h + 1)) + (max1h + 1);
int ans2 = (max2h * (max2h + 1)) + (max2h + 1);
cout << min(sum - sum1 + sum1 - ans1, sum - sum2 + sum2 - ans2) + ans << endl;
return 0;
}
//bitonic array โ
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
vector<int> a(n);
for (int i = 0; i < n; i++) {
cin >> a[i];
}
int l = 0, r = n - 1;
while (l < n && a[l] == 0) l++;
while (r > l && a[r] == 0) r--;
int ans = 0;
if ((r - l + 1) % 2 == 0) {
if (a[l] > a[r]) {
ans += a[r];
r--;
} else {
ans += a[l];
l++;
}
}
int sum = 0, c = 1, max1 = 0, sum1 = 0, max2 = 0, sum2 = 0;
for (int i = l; i <= r; i++) {
sum += a[i];
int tmp = c / 2;
int god = (tmp * (tmp + 1)) + (tmp + 1);
if (god <= sum && c % 2 == 1) {
max1 = c;
sum1 = sum;
}
c++;
}
c = 1;
sum = 0;
for (int i = r; i >= l; i--) {
sum += a[i];
int tmp = c / 2;
int god = (tmp * (tmp + 1)) + (tmp + 1);
if (god <= sum && c % 2 == 1) {
max2 = c;
sum2 = sum;
}
c++;
}
int max1h = max1 / 2, max2h = max2 / 2;
int ans1 = (max1h * (max1h + 1)) + (max1h + 1);
int ans2 = (max2h * (max2h + 1)) + (max2h + 1);
cout << min(sum - sum1 + sum1 - ans1, sum - sum2 + sum2 - ans2) + ans << endl;
return 0;
}
//bitonic array โ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Onix is hiring for Software Engineers
2024 batch eligibile
Delhi/Hyderabad/Pune/Bangalore
2 sept 2024 is the joining date
Selection Process :
Online Aptitude cum Technical Assessment โ 95 minutes
Two Levels of Technical Interviews
HR Interview
Apply Form : https://forms.gle/sanQ1wiQKkZCN1Ss9
2024 batch eligibile
Delhi/Hyderabad/Pune/Bangalore
2 sept 2024 is the joining date
Selection Process :
Online Aptitude cum Technical Assessment โ 95 minutes
Two Levels of Technical Interviews
HR Interview
Apply Form : https://forms.gle/sanQ1wiQKkZCN1Ss9
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Thriving Springs is hiring for SDE (Full time) | MEAN stack | Hyderabad | 4.5 LPA - 9.5 LPA
| 2 openings | 2023/2022/2021/2020 passouts eligible
Apply here - https://forms.gle/ea47rjtc5ZUjQdrU6
| 2 openings | 2023/2022/2021/2020 passouts eligible
Apply here - https://forms.gle/ea47rjtc5ZUjQdrU6
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Role: Software development Intern
Company: Thriving Springs
Tech stacks, HTML, CSS
Good to know: Angular, Node.js
Location: Hyderabad
Mode of Work: Work from Office
Working Days: Monday to Friday; (Monday to Thursday - WFO, Friday - WFH)
Stipend - 20K/M
Duration - 6 months
Open Positions - 10
Post Completion of the Internship period, PPO offered from 5 LPA to 7.5 LPA based upon performance evaluation.
Apply here - https://forms.gle/ea47rjtc5ZUjQdrU6
Company: Thriving Springs
Tech stacks, HTML, CSS
Good to know: Angular, Node.js
Location: Hyderabad
Mode of Work: Work from Office
Working Days: Monday to Friday; (Monday to Thursday - WFO, Friday - WFH)
Stipend - 20K/M
Duration - 6 months
Open Positions - 10
Post Completion of the Internship period, PPO offered from 5 LPA to 7.5 LPA based upon performance evaluation.
Apply here - https://forms.gle/ea47rjtc5ZUjQdrU6
๐1
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
https://www.uber.com/in/en/careers/
UPDATE on UBER New Grad Opening.
Please check with Uber's Recruiters directly.
UPDATE on UBER New Grad Opening.
Please check with Uber's Recruiters directly.
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
๐Fintract Global is hiring for SDE interns
Batch: 2025
Apply here:
https://linkedin.com/jobs/view/3972108858/?alternateChannel=search
Batch: 2025
Apply here:
https://linkedin.com/jobs/view/3972108858/?alternateChannel=search
Linkedin
Fintract Global hiring SDE interns ( Next.Js, TailwindCSS, MongoDB - Advanced) in New Delhi, Delhi, India | LinkedIn
Posted 2:57:45 PM. Company Description FinTract Global is an investment and fintech company located in New Delhi. Weโฆ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)
๐Ciena is hiring for Software Engineering DevOps New Grad
Expected Salary: 10-20 LPA
Apply here:
https://careers.ciena.com/us/en/job/CIENUSR025123ENUS/Software-Engineering-DevOps-New-Grad
Expected Salary: 10-20 LPA
Apply here:
https://careers.ciena.com/us/en/job/CIENUSR025123ENUS/Software-Engineering-DevOps-New-Grad
Ciena
Careers
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
๐Monotype is hiring for Software Engineer Trainee
Expected Salary: 4 - 8 LPA
Apply here:
https://monotype.wd1.myworkdayjobs.com/en-US/Monotype/job/Noida/Software-Engineer-Trainee_R0003599
Expected Salary: 4 - 8 LPA
Apply here:
https://monotype.wd1.myworkdayjobs.com/en-US/Monotype/job/Noida/Software-Engineer-Trainee_R0003599
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Global Logic is conducting Walkin for freshers
2024/2023/2022 passouts eligible
Register on the link below : https://www.globallogic.com/in/careers/associate-analyst-freshers-non-tech-irc234095/
2024/2023/2022 passouts eligible
Register on the link below : https://www.globallogic.com/in/careers/associate-analyst-freshers-non-tech-irc234095/
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
๐Iterate AI is hiring for SDE Intern
Stipend: โน2L โ โน6 LPA
Apply here:
https://wellfound.com/jobs/3057469-sde-intern-full-stack
Stipend: โน2L โ โน6 LPA
Apply here:
https://wellfound.com/jobs/3057469-sde-intern-full-stack
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
๐Zinnia is hiring for Software Engineer (0-2 years)
Expected Salary: 6-12 LPA
Apply here:
https://linkedin.com/jobs/view/3954854195/?alternateChannel=search
Expected Salary: 6-12 LPA
Apply here:
https://linkedin.com/jobs/view/3954854195/?alternateChannel=search
Linkedin
Zinnia hiring Software Engineer in Pune, Maharashtra, India | LinkedIn
Posted 9:16:33 AM. Who We AreZinnia is simplifying how people buy, sell, and administer insurance products. Combiningโฆ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)
Tech Edge Bootcamp:
Gain practical tech knowledge and skills required to get Job and Internship
Itโs completely free to attend the bootcamp.
Register Now: https://bit.ly/4cZ0TBT
Last date to register: 16th july 7pm
Gain practical tech knowledge and skills required to get Job and Internship
Itโs completely free to attend the bootcamp.
Register Now: https://bit.ly/4cZ0TBT
Last date to register: 16th july 7pm
Masai School
Tech Edge with IIT Guwahati
We are thrilled to announce Tech Edge with IIT Guwahati, a 6-day event where IIT Guwahati professors and distinguished IIT alumni will guide you towards a successful career in the tech world.With software engineering being the most in-demand field right nowโฆ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Salesforce is hiring for Interns
2026 Passout
To get Referral follow these steps
In "How Did You Hear About Us" question
Select Referral and enter my Email s.sarkar@salesforce.com
2026 Passout
To get Referral follow these steps
In "How Did You Hear About Us" question
Select Referral and enter my Email s.sarkar@salesforce.com
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
GenC PWD Hiring 2023 & 2024 Batch
Apply link ๐
https://app.joinsuperset.com/join/#/signup/student/jobprofiles/07a89094-b25f-4041-b191-5bd8eb09a5aa
Apply link ๐
https://app.joinsuperset.com/join/#/signup/student/jobprofiles/07a89094-b25f-4041-b191-5bd8eb09a5aa