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 | Benq | 3797 |

2 | tourist | 3723 |

3 | Radewoosh | 3720 |

4 | ecnerwala | 3579 |

5 | ksun48 | 3463 |

6 | Um_nik | 3457 |

7 | maroonrk | 3446 |

8 | jiangly | 3432 |

9 | Petr | 3370 |

10 | scott_wu | 3350 |

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

1 | 1-gon | 209 |

2 | awoo | 184 |

2 | rng_58 | 184 |

4 | Errichto | 182 |

5 | SecondThread | 177 |

6 | maroonrk | 176 |

6 | Radewoosh | 176 |

6 | -is-this-fft- | 176 |

9 | Um_nik | 173 |

10 | antontrygubO_o | 169 |

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: Jun/23/2021 03:31:16 (i1).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|