### idonthatephy's blog

By idonthatephy, history, 3 days ago,

for this solution-167359184 When i am running this code in my own personal computer it is giving me right output (compiler version g++ 11) while in codeforces it is giving the wrong or different output why is that? for ex- 1 7 gives 1 0 2 6 5 4 3 on my personal ide but it gives 6 5 4 3 2 1 0 on c++ 14. I just want to know the reason this is happening?

• 0

By idonthatephy, history, 12 days ago,

I have seen people use binary search in this particular problem 1443C - The Delivery Dilemma but my submission is getting TLE in testcase 9 166040767 Can anyone explain why is that? for example this binary search solution passed 97454890

• -2

By idonthatephy, history, 4 weeks ago,

Can someone look at my profile and suggest based on that what should I do to improve ? I am Usually able to solve question A and B of div2 without any problems but question C is where I get stuck. thus i tried to solve problems of rating-1400. I have solved about 35 (1400) problems 26(1300) and 29(1200),and I am still not able to solve C of div-2. I usually practice 2 questions a day of usually 1400 rating, My aim is to reach specialist untill the end of this year. Any sort of tips will be appreciated.

Background-I am a(starting monday) 3rd year college student ,so any tips on how to manage competitive coding with development as well as college studies will be helpful as well.

• +3

By idonthatephy, history, 4 weeks ago,

163673872--here is the submission Problem-1702E - Split Into Two Sets General Approach- using DSU first check degree of each node

if greater than 2
ans=no
if (a==b)
ans=no

else
if size of parent of each node is even
then
ans=yes
else
ans=no


• +3

By idonthatephy, history, 3 months ago,

1574C - Slay the Dragon--this is the problem given below is my code- 158115252 it is failing test case 3 because of integer overflow, is there any way to overcome the integer overflow?

• 0

By idonthatephy, history, 4 months ago,

1578E - Easy Scheduling--this is the problem

here is my code. basically wont the total time be-- for i =0 to h-1 summation of ceil(2^i/p) is this observation wrong? For some reason the link is'nt working , so here is the code-

#include <bits/stdc++.h>
#define ll long long int
#define endl "\n"


using namespace std;

int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int t;
cin>>t;
while(t--){
double h,p;
cin>>h>>p;
ll pow=1;
ll time=0;

for(int i=0;i<h;i++){

time+=ceil(pow/p);

pow*=2;

}
cout<<time<<endl;
}
return 0;
}


• 0

By idonthatephy, history, 5 months ago,

This is the problem My sol is-Runtime error in test case 4 can someone look at the code and tell me where the runtime error could have come from?

• +10

By idonthatephy, history, 6 months ago,

1426C - Increase and Copy this is the problem and below is the link to my code- https://codeforces.com/problemset/submission/1426/146922562 can anyone explain why I am getting TLE in test case 3? is it because of the timecomplexity O(sqrt(n)logn) or something else?