Loading

上一页 1 ··· 70 71 72 73 74
摘要: 题目描述 现在请求你维护一个数列,要求提供以下两种操作: 1、 查询操作。 语法:Q L 功能:查询当前数列中末尾L个数中的最大的数,并输出这个数的值。 限制:LLL不超过当前数列的长度。(L>0)(L > 0)(L>0) 2、 插入操作。 语法:A n 功能:将nnn加上ttt,其中ttt是最近一 阅读全文
posted @ 2020-02-01 20:36 脂环 阅读(176) 评论(0) 推荐(0) 编辑
摘要: You are given two integers nn and mm . Calculate the number of pairs of arrays (a,b)(a,b) such that: the length of both arrays is equal to mm ; each e 阅读全文
posted @ 2020-01-31 22:04 脂环 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 题目描述 猫猫TOM和小老鼠JERRY最近又较量上了,但是毕竟都是成年人,他们已经不喜欢再玩那种你追我赶的游戏,现在他们喜欢玩统计。最近,TOM老猫查阅到一个人类称之为“逆序对”的东西,这东西是这样定义的:对于给定的一段正整数序列,逆序对就是序列中ai>aj且i<j的有序对。知道这概念后,他们就比赛 阅读全文
posted @ 2020-01-31 01:33 脂环 阅读(359) 评论(0) 推荐(0) 编辑
摘要: 题目描述 自从到了南蛮之地,孔明不仅把孟获收拾的服服帖帖,而且还发现了不少少数民族的智慧,他发现少数民族的图腾往往有着一种分形的效果,在得到了酋长的传授后,孔明掌握了不少绘图技术,但唯独不会画他们的图腾,于是他找上了你的爷爷的爷爷的爷爷的爷爷……帮忙,作为一个好孙子的孙子的孙子的孙子……你能做到吗? 阅读全文
posted @ 2020-01-29 11:23 脂环 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 题目描述 有NNN级的台阶,你一开始在底部,每次可以向上迈最多KKK级台阶(最少111级),问到达第NNN级台阶有多少种不同方式。 输入格式 两个正整数N,K。 输出格式 一个正整数,为不同方式数,由于答案可能很大,你需要输出ans mod 100003ans \bmod 100003ansmod1 阅读全文
posted @ 2020-01-28 19:42 脂环 阅读(262) 评论(0) 推荐(0) 编辑
摘要: Oh, New Year. The time to gather all your friends and reflect on the heartwarming events of the past year... nn friends live in a city which can be re 阅读全文
posted @ 2020-01-22 12:18 脂环 阅读(141) 评论(0) 推荐(0) 编辑
摘要: There are nn friends who want to give gifts for the New Year to each other. Each friend should give exactly one gift and receive exactly one gift. The 阅读全文
posted @ 2020-01-21 12:07 脂环 阅读(160) 评论(0) 推荐(0) 编辑
摘要: There are nn Christmas trees on an infinite number line. The ii -th tree grows at the position xixi . All xixi are guaranteed to be distinct. Each int 阅读全文
posted @ 2020-01-21 11:58 脂环 阅读(130) 评论(0) 推荐(0) 编辑
上一页 1 ··· 70 71 72 73 74