๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
#include <bits/stdc++.h>
using namespace std;
struct ST {
int n;
vector<long long> t, lz;
ST(int sz) {
n = sz;
t.resize(4 * n, 0);
lz.resize(4 * n, 0);
}
void p(int nd, int s, int e) {
if (lz[nd] != 0) {
t[nd] += lz[nd];
if (s != e) {
lz[2 * nd + 1] += lz[nd];
lz[2 * nd + 2] += lz[nd];
}
lz[nd] = 0;
}
}
void ru(int nd, int s, int e, int l, int r, long long v) {
p(nd, s, e);
if (s > r || e < l) return;
if (s >= l && e <= r) {
lz[nd] += v;
p(nd, s, e);
return;
}
int m = (s + e) / 2;
ru(2 * nd + 1, s, m, l, r, v);
ru(2 * nd + 2, m + 1, e, l, r, v);
t[nd] = max(t[2 * nd + 1], t[2 * nd + 2]);
}
long long rq(int nd, int s, int e, int l, int r) {
p(nd, s, e);
if (s > r || e < l) return 0;
if (s >= l && e <= r) return t[nd];
int m = (s + e) / 2;
return max(rq(2 * nd + 1, s, m, l, r), rq(2 * nd + 2, m + 1, e, l, r));
}
void u(int l, int r, long long v) {
ru(0, 0, n - 1, l, r, v);
}
long long q(int l, int r) {
return rq(0, 0, n - 1, l, r);
}
};
long long SkillUpdate(int n, int q, vector<tuple<int, int, int>>& u) {
ST st(n);
vector<long long> mx(q, 0);
for (auto& [l, r, x] : u) {
st.u(l - 1, r - 1, x);
}
for (int i = 0; i < q; i++)
{
auto [l, r, x] = u[i];
st.u(l - 1, r - 1, -x);
mx[i] = st.q(0, n - 1);
st.u(l - 1, r - 1, x);
}
return *min_element(mx.begin(), mx.end());
}
Minimize and Maximumโ
#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main(){
int n;
cin>>n;
vector<int>arr(n);
for(int i=0;i<n;i++)cin>>arr[i];
vector<int>presum(n);
presum[0]=arr[0];
for(int i=1;i<n;i++)presum[i]=presum[i-1]+arr[i];
vector<int>dp(n);
vector<int>val(n);
dp[0]=1;
val[0]=arr[0];
for(int i=1;i<n;i++){
int l=0,h=i;
int ind=0;
while(h>=l){
int mid=(l+h)/2;
int sum= presum[i]- (mid>0?presum[mid-1]:0);
int prev = (mid>0?val[mid-1]:0);
if(sum>=prev){
ind=mid;
l=mid+1;
}
else h=mid-1;
}
if(ind==0){
dp[i]=1;
val[i]=presum[i];
}
else{
dp[i]=dp[ind-1]+1;
val[i]=presum[i]-presum[ind-1];
}
}
cout<<dp.back();
}
Operate the subarrayโ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
๐SurveySparrow Hiring
Role: Quality Assurance Intern
Experience: 0 - 6 months
Eligibility: Students from the 2024 batch
Internship Duration: 4 to 6 months
Location: Chennai (Work from Office)
THIS IS AN INTERN ONLY OPPORTUNITY
๐ปApply Link: https://surveysparrow.keka.com/careers/jobdetails/12253
Role: Quality Assurance Intern
Experience: 0 - 6 months
Eligibility: Students from the 2024 batch
Internship Duration: 4 to 6 months
Location: Chennai (Work from Office)
THIS IS AN INTERN ONLY OPPORTUNITY
๐ปApply Link: https://surveysparrow.keka.com/careers/jobdetails/12253
#include <iostream>
#include <string>
#include <set>
#include <algorithm>
using namespace std;
string LexicographicOrder(string S) {
string result = "";
while (!S.empty()) {
set<char> seen;
string uniqueChars = "";
for (char c : S) {
if (seen.find(c) == seen.end()) {
uniqueChars += c;
seen.insert(c);
}
}
sort(uniqueChars.begin(), uniqueChars.end());
result += uniqueChars;
for (char c : uniqueChars) {
size_t pos = S.find(c);
if (pos != string::npos) {
S.erase(pos, 1);
}
}
}
return result;
}
Tiger Analytics โ
#include <bits/stdc++.h>โ
using namespace std;
long long comb(int n, int r) {
if (r > n) return 0;
if (r == 0 || r == n) return 1;
long long res = 1;
for (int i = 0; i < r; i++) {
res = res * (n - i) / (i + 1);
}
return res;
}
long long Balanced(int A, int B, int C) {
long long s = 0;
for (int p = 4; p <= min(A, C - 1); p++) {
int w = C - p;
if (w >= 1 && w <= B) {
s += comb(A, p) * comb(B, w);
}
}
return s;
} // Balance Mixture
#include <iostream>
#include <string>
#include <cmath>
using namespace std;
int gap(char a, char b) {
return abs(a - b);
}
string longestKInterspaceSubstring( string &word, int k) {
string temp = "", maxSubstring = "";
for (size_t i = 0; i < word.length(); i++) {
temp += word[i];
if (i < word.length() - 1 && gap(word[i], word[i + 1]) > k) {
if (temp.length() > maxSubstring.length()) {
maxSubstring = temp;
}
temp = "";
}
}
if (temp.length() > maxSubstring.length()) {
maxSubstring = temp;
}
return maxSubstring;
}
Longest K intersapace substring โ
Paypal
public static int getMinProcessingTime(int[] data, int processTimeA, int processTimeB) {
int n = data.length;
int tds = 0;
for (int i : data) {
tds += i;
}
int[] dp = new int[tds + 1];
for (int i = 0; i <= tds; i++) {
dp[i] = Integer.MAX_VALUE;
}
dp[0] = 0;
for (int size : data) {
for (int j = tds - size; j >= 0; j--) {
if (dp[j] != Integer.MAX_VALUE) {
dp[j + size] = Math.min(dp[j + size], dp[j] + size * processTimeA);
}
}
}
int minTime = Integer.MAX_VALUE;
for (int sumA = 0; sumA <= tds; sumA++) {
if (dp[sumA] != Integer.MAX_VALUE) {
int sumB = tds - sumA;
int timeB = sumB * processTimeB;
minTime = Math.min(minTime, Math.max(dp[sumA], timeB));
}
}
return minTime;
}
Minimum Processing Time โ
int n = data.length;
int tds = 0;
for (int i : data) {
tds += i;
}
int[] dp = new int[tds + 1];
for (int i = 0; i <= tds; i++) {
dp[i] = Integer.MAX_VALUE;
}
dp[0] = 0;
for (int size : data) {
for (int j = tds - size; j >= 0; j--) {
if (dp[j] != Integer.MAX_VALUE) {
dp[j + size] = Math.min(dp[j + size], dp[j] + size * processTimeA);
}
}
}
int minTime = Integer.MAX_VALUE;
for (int sumA = 0; sumA <= tds; sumA++) {
if (dp[sumA] != Integer.MAX_VALUE) {
int sumB = tds - sumA;
int timeB = sumB * processTimeB;
minTime = Math.min(minTime, Math.max(dp[sumA], timeB));
}
}
return minTime;
}
Minimum Processing Time โ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Linkedin
๐ข Hiring Freshers !! | Kanika Goel
๐ข Hiring Freshers !!
Capri Global Capital Limited is looking for dynamic and motivated IT Interns to join our innovative team. ๐
Location : Gurgaon/ Noida (Work from Office)
Who we're looking for :
Btech/Mtech graduates in CS/ IT/ ECE
Interested candidatesโฆ
Capri Global Capital Limited is looking for dynamic and motivated IT Interns to join our innovative team. ๐
Location : Gurgaon/ Noida (Work from Office)
Who we're looking for :
Btech/Mtech graduates in CS/ IT/ ECE
Interested candidatesโฆ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Swiggy is hiring for Associate Software Engineer.
If interested, fill the form: https://docs.google.com/forms/d/e/1FAIpQLSfz_6J2t7ES3KjCMex-_0_c12K74_ggpjGttFeuD8J5oZ80TA/viewform
If interested, fill the form: https://docs.google.com/forms/d/e/1FAIpQLSfz_6J2t7ES3KjCMex-_0_c12K74_ggpjGttFeuD8J5oZ80TA/viewform
from collections import Counter
def solve(n, s, k):
freq = Counter(s)
distinct_count = len(freq)
if k > n:
return -1
if k == distinct_count:
return 0
operations = 0
if k > distinct_count:
operations = k - distinct_count
else:
extra = distinct_count - k
freq_values = sorted(freq.values())
operations = sum(freq_values[:extra])
return operations
Distinct Character transformation โ
def solve(n, s, k):
freq = Counter(s)
distinct_count = len(freq)
if k > n:
return -1
if k == distinct_count:
return 0
operations = 0
if k > distinct_count:
operations = k - distinct_count
else:
extra = distinct_count - k
freq_values = sorted(freq.values())
operations = sum(freq_values[:extra])
return operations
Distinct Character transformation โ
๐1
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Shellovation hiring Mobile / App Development Intern
2026/2027 batch passouts
38 k per month stipend
Apply Here : https://unstop.com/internships/mobile-app-developer-shellovation-private-limited-1270510?lb=riTZ96J&utm_medium=Share&utm_source=shortUrl
2026/2027 batch passouts
38 k per month stipend
Apply Here : https://unstop.com/internships/mobile-app-developer-shellovation-private-limited-1270510?lb=riTZ96J&utm_medium=Share&utm_source=shortUrl
Unstop
Mobile / App Development Internship - Shellovation Private Limited | 1270510 // Unstop
Click the link to apply for Mobile / App Development Internship at Shellovation Private Limited. | 2024 | 1270510
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Marsh McLennan is hiring (only with referral)
Take referral on LinkedIn and apply!!
Take referral on LinkedIn and apply!!
๐1
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Datamate Infosolutions
Software Developers - Datamate Infosolutions
Level(s): Junior, Senior, Team/Project Leads Qualification: MCA/BTech/BE Computer Science Preferred expertise: ASP.NET, Java, SQL, HTML Junior scale: 0 โ 3 yearsโ experience Senior scale: 3 โ 6 yearsโ experience Team/Project Leads scale: Above 6 years
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company : Uber
Program: Uber She++ and UberSTAR Internship
Eligibility : 2027
Apply: https://flows.beamery.com/uber/apac-uber-she---2025-s_29svpsn
Program: Uber She++ and UberSTAR Internship
Eligibility : 2027
Apply: https://flows.beamery.com/uber/apac-uber-she---2025-s_29svpsn
Beamery
Loading...
A Beamery web application
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
๐PayU is hiring!
Data Engineering Intern
Location: Mumbai, Bengaluru, Gurgaon
Qualification:
- A degree in Engineering, Statistics, Computer Science, Mathematics or other similar quantitative field from a premier institute
- Students in the 2nd / 3rd semester & final year of their Graduation/Post Graduation can apply for an internship
๐ปApply Link: https://jobs.eu.lever.co/payu/ee2691f3-64c7-4251-9284-e91aa40b2932/
Data Engineering Intern
Location: Mumbai, Bengaluru, Gurgaon
Qualification:
- A degree in Engineering, Statistics, Computer Science, Mathematics or other similar quantitative field from a premier institute
- Students in the 2nd / 3rd semester & final year of their Graduation/Post Graduation can apply for an internship
๐ปApply Link: https://jobs.eu.lever.co/payu/ee2691f3-64c7-4251-9284-e91aa40b2932/
๐1
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Teknorix
Trainee Software Engineer - .NET/ReactJS (Freshers - Goa) - Teknorix
Looking for skilled young IT Professionals enthusiastic about software development.
If you are a self-taught and drivenwith agenuine passion for technology, we would like to hear from you.
About TeknorixTeknorix is a global produc
If you are a self-taught and drivenwith agenuine passion for technology, we would like to hear from you.
About TeknorixTeknorix is a global produc
def ok(mid, N, M):
count = 0
for i in range(1, N + 1):
count += min(M, mid // i)
return count
def solve(N, M, K):
low, high = 1, N * M
while low < high:
mid = (low + high) // 2
if ok(mid, N, M) < K:
low = mid + 1
else:
high = mid
return low
N, M, K = map(int, input().split())
print(solve(N, M, K))
A lot to merge โ
Media. Net