摘要:
Fibonacci-ish Yash has recently learnt about the Fibonacci sequence and is very excited about it. He calls a sequence Fibonacci-ish if the sequence co 阅读全文
摘要:
Equations 题意:给定一个四元二次方程的系数a,b,c,d;问有多少个解; a, b, c, d are integers from the interval [-50,50] and any of them cannot be 0.It is consider a solution a s 阅读全文
摘要:
C. Lieges of Legendre 题意:给n,m表示有n个为2的倍数,m个为3的倍数;问这n+m个数不重复时的最大值 最小为多少? 数据:(0 ≤ n, m ≤ 1 000 000, n + m > 0) ps:很水的题,主要是策略; 思路:由于里面每隔6就会重复一次,不好直接模拟,并且模 阅读全文
摘要:
Lieges of Legendre 题意:有n堆牛,每堆有ai头牛。两个人玩一个游戏,游戏规则为: <1>从任意一个非空的堆中移走一头牛; <2>将偶数堆2*x变成k堆,每堆x头牛(可以增加牛的个数) 移走最后一头牛的人获胜; 数据:n and k (1 ≤ n ≤ 100 000, 1 ≤ k 阅读全文
摘要:
K-th Number Input The first line of the input file contains n --- the size of the array, and m --- the number of questions to answer (1 <= n <= 100 00 阅读全文