摘要: 农夫为他的 N (1 ≤ N ≤ 100) 牛准备了 F (1 ≤ F ≤ 100)种食物和 D (1 ≤ D ≤ 100) 种饮料。每头牛都有各自喜欢的食物和饮料,而每种食物或饮料只能分配给一头牛。最多能有多少头牛可以同时得到喜欢的食物和饮料? Input 第一行输入三个整数N, F, D 接下来 阅读全文
posted @ 2018-08-21 16:41 踩在浪花上 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 链式前向星 没听说过的同学 戳这里 阅读全文
posted @ 2018-08-21 16:35 踩在浪花上 阅读(327) 评论(0) 推荐(0) 编辑
摘要: 要求(A/B)%9973,但由于A很大,我们只给出n(n=A%9973)(我们给定的A必能被B整除,且gcd(B,9973) = 1)。 Input数据的第一行是一个T,表示有T组数据。 每组数据有两个数n(0 <= n < 9973)和B(1 <= B <= 10^9)。Output对应每组数据输 阅读全文
posted @ 2018-08-21 10:21 踩在浪花上 阅读(121) 评论(0) 推荐(0) 编辑
摘要: In the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of the heroes. The hook is made up of several consecutive metallic 阅读全文
posted @ 2018-08-21 09:28 踩在浪花上 阅读(264) 评论(0) 推荐(0) 编辑
摘要: The inversion number of a given number sequence a1, a2, ..., an is the number of pairs (ai, aj) that satisfy i < j and ai > aj. For a given sequence o 阅读全文
posted @ 2018-08-21 09:20 踩在浪花上 阅读(170) 评论(0) 推荐(1) 编辑
摘要: 很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。 这让很多学生很反感。 不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。 Input本题目包含多组测试,请处理到文件结束。 在每个测试的第一行, 阅读全文
posted @ 2018-08-21 08:56 踩在浪花上 阅读(168) 评论(0) 推荐(0) 编辑