Is there any codeforces test case scrapper available which can give me all the test cases of the problem? Also, how do I get to know the large test cases of the problem for which my solution failed?

Thanks.

# | User | Rating |
---|---|---|

1 | tourist | 3822 |

2 | Benq | 3745 |

3 | ksun48 | 3560 |

4 | Radewoosh | 3538 |

5 | peehs_moorhsum | 3532 |

6 | Um_nik | 3489 |

7 | maroonrk | 3424 |

8 | Petr | 3380 |

9 | sunset | 3338 |

10 | ecnerwala | 3336 |

# | User | Contrib. |
---|---|---|

1 | 1-gon | 206 |

2 | Errichto | 181 |

2 | awoo | 181 |

4 | Um_nik | 180 |

5 | -is-this-fft- | 175 |

6 | maroonrk | 174 |

7 | Radewoosh | 172 |

7 | tourist | 172 |

9 | SecondThread | 170 |

10 | rng_58 | 166 |

Is there any codeforces test case scrapper available which can give me all the test cases of the problem? Also, how do I get to know the large test cases of the problem for which my solution failed?

Thanks.

Hi Codeforces community, especially Indians

I was feeling sad while reading this answer from I_love_Tanya_Romanova and felt really bad that many indians are making the reputation of there country bad. It is a humble request to all indians to read this answer, especially point 6 onwards and try to behave in a more better manner.

Today I also saw the below image on Endagorion facebook profile.

Literally, what would you get by tagging someone in someone else profile photo. Then these "_/_" comments, i can bear them now.

So, indians read the above answer and behave properly. The name of country lies on hands of all it's citizens.

Hi codeforces community,

I have been preparing for interview round for placements. I came across these 2 problems which I have not been able to solve for the past 2 days.

Q1) A and B play a game. They are given an array of positive numbers. Each player in his turn picks up 2 numbers from the array such that the difference of the numbers does not exist in the array. He then places the difference into the array too thus increase the array count by 1. Then the next player repeats the same process. The game continues till there are no 2 numbers such that difference does not exist in the array. The one who’s not able to choose numbers loses. If A starts the game and the game proceeds optimally, find who’ll win the game

Example : Input array : 2,5,3

A: 2,5,3,1

B: 2,5,3,1,4

A has no choice so B wins.

Q2) Given a string containing only lowercase alphabets, you have to convert it into a string such that it contains only vowels by doing minimum number of operations. In one operation, you could select a substring always starting from index 0, and move that substring forward or backward. Example of rolling forward or backward are given :

Rolling Forward

Input- axzf

Let index chosen be 0 to 3 and moving it forward

Output- byag

Rolling Backward

Input – axze

Let index chosen be 0 to 2 and moving it backwards

Output- zwyd

Please help me in solving the above problems. I would be highly thankful to you all.

**UPDATE : Doubts are cleared. Thanks everyone for help.**

There are 2 people who play a game. The game is as follows:

The are P sticks, each of length Q meters in length. The player play in turns. For each move a player choses a stick and splits it into 2 or more equal parts, each having an integer length greater than or equal to S meters. Each resulting part is also a stick. The player who can't make a move loses and the other player wins.

If both the players play optimally, determine the winner, given the values of P, Q and S.

For example : 2

1 15 4

4 9 5

Answer:

Player 1

Player 2

Constrains: 1 <= T <= 10, the number of test cases

1 <= P, Q, S <= {10}^{9}.

My approach till now: I was trying to solve this problem using grundy numbers. If the xor of grundy numbers of all piles is 0, player 2 is winner else player 1 is winner. Since all sticks are of same length, P = even number implies, player 2 is always the winner. When P = odd number, then if the grundy number of stick is 0, then player 2 is winner else player 1 is winner. The grundy is 0 only when all the proper divisors (i.e. except 1 and number itself) of the stick length are less than S.

Could anyone please verify whether my approach is correct or not?

Any help would be appreciated.

Codeforces (c) Copyright 2010-2021 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Jul/31/2021 03:36:00 (h3).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|