摘要:
Description 小 X 自幼就很喜欢数。但奇怪的是,他十分讨厌完全平方数。他觉得这些 数看起来很令人难受。由此,他也讨厌所有是完全平方数的正整数倍的数。然而 这丝毫不影响他对其他数的热爱。 这天是小X的生日,小 W 想送一个数给他作为生日礼物。当然他不能送一 个小X讨厌的数。他列出了所有小X 阅读全文
摘要:
Student Arseny likes to plan his life for n days ahead. He visits a canteen every day and he has already decided what he will order in each of the fol 阅读全文
摘要:
Problem Description There are m stones lying on a circle, and n frogs are jumping over them.The stones are numbered from 0 to m−1 and the frogs are nu 阅读全文
摘要:
这就是这个题目的意思,真的感觉这个思想是太神奇了,我这种菜逼现在绝壁想不到这样的证明的过程的,还有就是这个题的推道过程,以下思路纯属借鉴卿学姐的,还是自己太菜了,,,, 讲道理这种问题我真的想不到用容斥原理来做啊,那现在我就用容斥原理来讲一下这个问题,,, |!A1∩!A2∩!A3∩....!An| 阅读全文
摘要:
B. Pasha and Phone time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Pasha has recently bou 阅读全文
摘要:
Problem Description Given 5 integers: a, b, c, d, k, you're to find x in a...b, y in c...d that GCD(x, y) = k. GCD(x, y) means the greatest common div 阅读全文
摘要:
LL mult(LL a, LL k, LL m){ LL res = 0; while(k){ if(k & 1LL) res = (res + a) % m; k >>= 1; a = (a << 1) % m; } return res; } 阅读全文
摘要:
Problem Description When ?? was born, seven crows flew in and stopped beside him. In its childhood, ?? had been unfortunately fall into the sea. While 阅读全文
摘要:
E. Devu and Flowers time limit per test 4 seconds memory limit per test 256 megabytes input standard input output standard output Devu wants to decora 阅读全文
摘要:
其中p为素数 待续 阅读全文