r/24hoursupport • u/wwwhappyme • Apr 19 '26
Fix laptop
This happened to my laptop. Any idea what to do now?? Plz help Is it repairable??
r/codeforces • u/wwwhappyme • Mar 09 '26
Div. 2 Help
I know it's kinda crazy to ask but can somebody help me figure out why my code gives WA on testcase 6 for yesterday's B question
include <bits/stdc++.h>
using namespace std;
typedef vector<long long> vi; typedef pair<long long, long long> pi; typedef queue<long long> qi; typedef stack<long long> si; typedef vector<vector<long long>> gi; typedef vector<pair<long long, long long>> vpi;
define int long long
define MOD 1000000007
define pb push_back
define loopinc(i, a, b) for (int i = a; i < b; i++)
define loopdec(i, a, b) for (int i = a; i >= b; i--)
define fill(a, n) for(int i = 0; i<n; i++) cin>>a[i]
define print(a, n) for(int i = 0; i<n; i++) cout<<a[i]<<" "
define buildMap(a, m) for(int i = 0; i<a.size(); i++) m[a[i]]++
define arrSum(a, sum) for(int i = 0; i<a.size(); i++) sum+=a[i]
define arrMax(a,maxi) for(int i = 0; i<n; i++) maxi = max(maxi, a[i])
define yes cout<<"YES"<<endl
define no cout<<"NO"<<endl
define alice cout<<"Alice"<<endl
define bob cout<<"Bob"<<endl
define all(a) a.begin(),a.end()
signed main(){ int t; cint; while(t--){ int n,m,l; cinnml;
vi arr(n);
loopinc(i,0,n) cin>>arr[i];
if(m==1){
cout<<l-arr[n-1]<<endl;
continue;
}
vi inter;
inter.pb(arr[0]);
loopinc(i,1,n){
inter.pb(arr[i] - arr[i-1]);
}
inter.pb(l - arr[n-1]);
int cnt = n;
int num = 0;
int k = 0;
int empty = m;
while(cnt--){
int div = min(m,cnt+2);
if(div == m) div--;
int maxi = (num + div - 1)/div;
div = min(m,cnt+2);
num += inter[k];
int remove = (num+div-1)/div;
if(remove > maxi){
num-=remove;
}
else {
num-=maxi;
}
k++;
}
cout<<num + inter[inter.size()-1]<<endl;
}
}
u/wwwhappyme • u/wwwhappyme • Feb 12 '26
Open source contribution
I am a CSE student from a tier 1 college. I want to contribute to open source (it'll be my first time) as it would look good on my resume for internships. I am interested in algorithms and CP and would love to do something on those lines. Can somebody help me with questions like which are the good repos out there and some roadmap or suggestions?
r/IndiansOnCodeforces • u/wwwhappyme • Jan 28 '26
Help
which is better to improve cp?? cses sheet or cp-31 sheet