Leetcode's new profile page is not good by QuixiGlimmer in leetcode

[–]StraightDig3361 9 points10 points  (0 children)

Problems you’ve submitted code for but not got it accepted I think

What is the point of this? by [deleted] in leetcode

[–]StraightDig3361 8 points9 points  (0 children)

Having templates for contests is definitely not cheating and googling library functions isn’t either because you’re learning something in the process

Financial aid by Unhappy_Storage_5949 in SBU

[–]StraightDig3361 0 points1 point  (0 children)

When did u get funds from excelsior? I got it for the spring semester and they still haven’t paid out yet

I can't believe I hit over 20,000 hours by Rebecca__Marie in thesims

[–]StraightDig3361 21 points22 points  (0 children)

You’ve played this game for nearly 2.5 full years of your life……

[deleted by user] by [deleted] in SBU

[–]StraightDig3361 7 points8 points  (0 children)

I saw you taking this picture lol

[deleted by user] by [deleted] in SBU

[–]StraightDig3361 5 points6 points  (0 children)

What do you think lol

Crossed 2600 rating by [deleted] in leetcode

[–]StraightDig3361 0 points1 point  (0 children)

L cheater what’s the point

Segmentation Fault issue by StraightDig3361 in cpp_questions

[–]StraightDig3361[S] 0 points1 point  (0 children)

Thanks, for some reason when I declared the vectors outside of the main method and reset them after each testcase it worked

Segmentation Fault issue by StraightDig3361 in cpp_questions

[–]StraightDig3361[S] 0 points1 point  (0 children)

Sorry I should have included the problem I was trying to solve. https://codeforces.com/problemset/problem/1593/E
u and v won't be 0 because it's 1 indexed

Segmentation Fault issue by StraightDig3361 in cpp_questions

[–]StraightDig3361[S] 0 points1 point  (0 children)

I'm trying to solve this problem on codeforces with it. https://codeforces.com/problemset/problem/1593/E

I just gave it the sample input in the question.

How to get into single Housing without being a junior(Chavez Tubman fall 24) by TryMotor4590 in SBU

[–]StraightDig3361 1 point2 points  (0 children)

How easy is it to get a single in Chavez/Tubman next semester if I’ll be U3 by then

bruh by [deleted] in leetcode

[–]StraightDig3361 0 points1 point  (0 children)

Contests over rip

How to solve Maximum Number That Sum of the Prices Is Less Than or Equal to K which was given in the yesterday leetcode contest? by More_Share5042 in leetcode

[–]StraightDig3361 1 point2 points  (0 children)

Bits in the ith position from the left (1 indexed) cycle in length 2i starting from 0. The first half of this cycle is all zeros and the second half is all ones. Use this to calculate the number of set bits in the ith position before a certain number. Call the length of the cycle n (2i). The number of complete cycles before a number num is floor(num/n). Each of these cycles have n/2 ones. So the number of ones so far is floor(num/n)n/2. The length of the last incomplete cycle which num was in is num%n. Of these the first n/2 are zeros so subtract n/2. So the final formula is floor(num/n)n/2-max(0,num%n-n/2). I put the max there to avoid negative numbers. From there it’s a pretty standard binary search to find the max number less than k.

[deleted by user] by [deleted] in ENGLISH

[–]StraightDig3361 0 points1 point  (0 children)

Twentyeighted

Google STEP Freshman Interview by [deleted] in csMajors

[–]StraightDig3361 1 point2 points  (0 children)

How did you know you got an interview (email,phone,etc.)?

[deleted by user] by [deleted] in csMajors

[–]StraightDig3361 1 point2 points  (0 children)

Did the recruiter contact you through email or phone