Comments

Host every contest offline, registering for a context would mean you would have to travel offsite to give the contest.

In problem B solution, the extra — in the beginning is confusing. — y-xi+ti

+56

Because This

On MarinushHow to become Master., 4 years ago
+75

Okay, let me enter depression mode!

On Pie-Lie-DieGoogle phone screen, 5 years ago
0

How would why handle this case — -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -4 and k = 1000

I am not sure that taking only 11 elements would work.

On Pie-Lie-DieGoogle phone screen, 5 years ago
+3

Divide the array into two sets let call them A and B, where all the positive elements will be in A, and negative in B, find the top K sum in both the set individually, and then use a priority queue to find the top K from both A and B.

Top K for each set can be found by sorting and some observations.

what was your dp state for 250 points problem? codebuster_10

UPD: got it dp[i][j] -> # of ways to get j vowels odd number of times with i as the string length

Where is it given that directions changes between neighbors

Why is the output for Problem E test 2 'No'?

I Don't think Artificial intelligence is enough for CP.

In problem E this Binary Exponentiation code gives WA

int pwmd(int n, int m,int mod) {
  int res = 1;
  // n %= mod;     correct ans when this line is added
  while (m > 0) {
    if (m & 1)
      res = (res % mod * n % mod) % mod;
    m >>= 1;
    n = (n % mod * n % mod) % mod;
  }

  return res;
}

it gives the correct answer when I add n %= mod

why is this line needed?

Game Theory Problem for sure!

Are the contests going to be updated manually by you or by automation?

Here we go again...

+10

For authentication, they are using firebase.

No, I was not.

By the way, I don't know how to solve the problem either.

Okay, then I can stop regretting not being able to solve this problem.

Consider all the cells needs to be cleaned how your bfs is going to work?

I Don't think this will work, as the robot can clean cells while returning to (0,0)

Mike_Mirzayanov_Is_Pussy is your solution for problem 3 takes O(4 ^ K) if not then how did you solve it?

UPD: 4 ^ K = 16777216 as max k is 12

we can slightly optimize it by observing that the robot can't go beyond a distance of k / 2 from (0,0) as he also has to return to the cell (0,0). I think this should work.

why are you checking only till sqrt(maxvalue), how will it work for the case 21, 14

ig it will give wrong answer for test 6 14 3 7

the answer is 2 (3 and 7), but according to your approach answer is 3 (2,3,7)

On Kevin114514Asking for Advice on CP, 5 years ago
+10
Solution

Binary Search on the answer, Now how to check if we can make M teams of K size each

Note that we need a total of M * K members

now from each country, we can take a maximum of M members, so if the summation of Min(A[i],M) overall "i" is greater than or equal to M * K then we can form M teams of K size each, otherwise not.

What is goc33?

Spoiler

was this contest for full time or intern hiring?

Were this challenge was for full time or intern hiring?

On itsmihirIntroducing CF Bot, 5 years ago
0

I used it in 2 contest work so good thanks, man.

On itsmihirIntroducing CF Bot, 5 years ago
+3

How are you inspired from SecondThread ?

Completely agreed, that's why I wrote "etc".

Companies like Uber, Codenation, Sprinklr, Google(Maybe) you need to have good experience in CP, but other companies including Amazon, Microsoft, etc leetcode/InterviewBit/GFG is the best resource you can use. You can still keep on giving cf contest.

On bot007Ambarsariya = Karangreat 2.0, 5 years ago
0

so that we don't replace two adjacent elements with the same prime number. consider the case 3 3 3

All the best bro.

Thanks a lot.

Can anyone help can't figure out what's wrong with my problem D solution.

WA on Test 5 114051343

Thanks.

VScode forever.

oh Nice.

Also, likes and dislikse of each problem like leetcode are also good.

Cool App.

real data analyst

Thanks really helped alot.

+8

It takes time and effort to make a contest all we can do is wait.

Practice more.

Cool.

On mercuristHelp me. I'm stuck., 5 years ago
0

Practice.

I am not getting problem D.

I am not getting problem D.

Why is the answer of sample test 1(test case 2) is 0 what about the path 1->2->3->4

upd: My bad understood now

Why I am not able to see the editorial? zscoder

arham_doshi I have a different approach for the problem "Flight Discount" But getting wrong answer on 3 TC can you help me please,I can't find any TC.

My Solution

Can E be solved with Matrix exponentiation??

The sad part is that I can only give you upvote for this amazing article.

p.s this is the best blog I have read on cf.

Got it. This is because the back edge vertex can be an articulation point. So, if we do low[v] = min(low[v],low[to]) then it will connect both of the components.

see Example

7 8

1 2

1 3

2 4

3 4

4 5

4 6

5 7

6 7

-is-this-fft- I feel dumb asking this. In the implementation to find Bridges.

// in dfs

if (visited[to]) { low[v] = min(low[v], tin[to]); }

Why can't we do low[v] = min(low[v],low[to]) or both things are different?

.

Okay thanks!

I have a small doubt in problem statement

For n=6 m=2 k=2

2 2 2 1 2 2

Is this a valid combination?

0

Brute force on the persuade people by taking two-pointer one starting from 0 index(say left) and one at n-min(k,m-1)-1 (say right), then for each pair of left and right, find the minimum element you can get by brute-forcing from left to right with the same approach of taking two-pointer one starting from left(say l) and another at n-m+left(say r), then find minimum from max(a[l], a[r], r till right.

Do the same for all the values of left and right. And the maximum of all the values will be the answer.

70354436

0

Can you help me to find the time complexity of my submission with explanation for Div2 C problem 70354436