摘要:
有N堆石子,除了第一堆外,每堆石子个数都不少于前一堆的石子个数。两人轮流操作每次操作可以从一堆石子中移走任意多石子,但是要保证操作后仍然满足初始时的条件谁没有石子可移时输掉游戏。问先手是否必胜。 感谢MT大牛翻译. Sample OutputNIE TAKHint Input 第一行u表示数据组数。 阅读全文
摘要:
Farmer John有一个过时的打谷机(收割小麦),它需要带子来带动。发动机驱动轮1总是顺时针旋转的,用来带动转轮2,转轮2来带动转轮3,等等。一共有n(2<=n<=1000)个转轮(n-1条带子)。 上面的图解描述了转轮的两种连接方式,第一种方式使得两个轮子旋转的方向相同,第二种则相反。 给出一 阅读全文
摘要:
The UNAL programming coaches have lost a bet, they bet the 6 UNAL teams would occupy the first six positions in the regional finals. Now, they have to 阅读全文
摘要:
The UN finals are here!, the coaches/ex-coaches team is creating a new exciting contest to select which teams will compete in the Colombian finals. Iv 阅读全文
摘要:
Ignacio is a famous mathematician, some time ago he was married with Dolly, a famous scientific, at that time they bought a huge piece of land that th 阅读全文
摘要:
题目描述 有N个不同的正整数数x1, x2, ... xN 排成一排,我们可以从左边或右边去掉连续的i(1≤i≤n)个数(只能从两边删除数),剩下N-i个数,再把剩下的数按以上操作处理,直到所有的数都被删除为止。 每次操作都有一个操作价值,比如现在要删除从i位置到k位置上的所有的数。操作价值为|xi 阅读全文
摘要:
A. Salem and Sticks 题目描述 Salem gave you n n n sticks with integer positive lengths a1,a2,…,an a_1, a_2, \ldots, a_n a1,a2,…,an . For every stick, y 阅读全文
摘要:
最简单的就是变成1~n的序列; 我们可以先加一个极大的数防止出现负数; 然后对于每一个%(a[ i ] - i); 阅读全文
摘要:
Three companies decided to order a billboard with pictures of their logos. A billboard is a big square board. A logo of each company is a rectangle of 阅读全文
摘要:
Petya loves computer games. Finally a game that he's been waiting for so long came out! The main character of this game has n different skills, each o 阅读全文