No tags yet

No tag edit access

The problem statement has recently been changed. View the changes.

×
Time limit per test: 1 second(s)

Memory limit: 262144 kilobytes

Memory limit: 262144 kilobytes

input: standard

output: standard

output: standard

Gena and Petya love playing the following game with each other. There are

Gena and Petya are the world famous experts in unusual games. We will assume that they play optimally.

Recently Petya started to notice that Gena wins too often. Petya decided that the problem is the unjust rules as Gena always gets to move first! To even their chances, Petya decided to cheat and take and hide some stones before the game begins. Since Petya does not want Gena to suspect anything, he will take the same number of stones

Your task is to find the number of distinct numbers

sample input | sample output |

2 3 3 | 3 |

sample input | sample output |

3 3 4 5 | 1 |

sample input | sample output |

4 2 7 4 1 | 1 |

sample input | sample output |

4 4 6 8 10 | 2 |

Codeforces (c) Copyright 2010-2021 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: May/07/2021 08:13:25 (g1).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|