protagonist
摘要: 11449: 余数求和 题目描述 给出正整数n和k,计算j(n,k)=k mod 1 + k mod 2 + k mod 3 +⋯+ k mod n的值。其中k mod i表示k除以i的余数。例如j(5,3)=3 mod 1 + 3 mod 2 + 3 mod 3 + 3 mod 4 + 3 mod 阅读全文
posted @ 2019-03-23 13:40 czy-power 阅读(482) 评论(0) 推荐(0) 编辑
摘要: 11450: 错排 题目描述 求有多少种长度为n的序列A,满足以下条件:1.1~n这n个数在序列中各出现了一次。2.若第i个数Ai的值为i,则称i是稳定的。序列恰好有m个数是稳定的。满足条件的序列可能很多,序列数对109+7取模。 输入 第一行一个数T,表示有T组数据。接下来T行,每行两个整数n,m 阅读全文
posted @ 2019-03-23 13:39 czy-power 阅读(221) 评论(0) 推荐(0) 编辑
摘要: 6771: Zero-Sum Ranges 题目描述 We have an integer sequence A, whose length is N.Find the number of the non-empty contiguous subsequences of A whose sums a 阅读全文
posted @ 2019-03-23 13:35 czy-power 阅读(166) 评论(0) 推荐(0) 编辑
摘要: D. Jongmah time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output You are playing a game of Jon 阅读全文
posted @ 2019-03-23 08:56 czy-power 阅读(227) 评论(0) 推荐(0) 编辑