
刷题
文章平均质量分 78
梦行云_
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
TJU OJ 1201 Rails
目录题目描述输入输出解决思路C++代码题目描述There is a famous railway station in PopPush City. Country there is incredibly hilly. The station was built in last century. Unfortunately, funds were extremely limited that time. It was possible to establish only a surface track.原创 2021-03-25 20:10:00 · 1142 阅读 · 1 评论 -
HDU OJ 1276 士兵队列训练问题
目录问题描述输入输出解题思路c++代码问题描述某部队进行新兵队列训练,将新兵从一开始按顺序依次编号,并排成一行横队,训练的规则如下:从头开始一至二报数,凡报到二的出列,剩下的向小序号方向靠拢,再从头开始进行一至三报数,凡报到三的出列,剩下的向小序号方向靠拢,继续从头开始进行一至二报数。。。,以后从头开始轮流进行一至二报数、一至三报数直到剩下的人数不超过三人为止。输入本题有多个测试数据组,第一行为组数N,接着为N行新兵人数,新兵人数不超过5000。22040输出共有N行,分别对应输入的新兵原创 2021-03-23 16:29:16 · 178 阅读 · 0 评论 -
HDU OJ 3400 Line belt
目录问题描述输入输出解题思路c++代码问题描述In a two-dimensional plane there are two line belts, there are two segments AB and CD, lxhgww’s speed on AB is P and on CD is Q, he can move with the speed R on other area on the plane.How long must he take to travel from A to D?原创 2021-03-22 18:52:34 · 207 阅读 · 0 评论 -
LeetCode 169 多数元素
目录问题描述示例解决思路分治法自杀法(应该是叫投票法)问题描述给定一个大小为 n 的数组,找到其中的多数元素。多数元素是指在数组中出现次数 大于 ⌊ n/2 ⌋ 的元素。你可以假设数组是非空的,并且给定的数组总是存在多数元素。题目来源(https://leetcode-cn.com/problems/majority-element)示例输入:[3,2,3]输出:3输入:[2,2,1,1,1,2,2]输出:2解决思路分治法问题要求出一个数组中出现次数超过本数组的一半元素的数量的原创 2021-03-21 21:31:49 · 91 阅读 · 0 评论 -
HDU OJ 1007 Quoit Design
目录问题描述输入输出解题思路C++代码问题描述Have you ever played quoit in a playground? Quoit is a game in which flat rings are pitched at some toys, with all the toys encircled awarded.In the field of Cyberground, the position of each toy is fixed, and the ring is carefull原创 2021-03-20 17:18:54 · 129 阅读 · 0 评论 -
TJU OJ 1218 Ultra-QuickSort
目录问题描述输入输出解题思路C++代码问题描述In this problem, you have to analyze a particular sorting algorithm. The algorithm processes a sequence of n distinct integers by swapping two adjacent sequence elements until the sequence is sorted in ascending order. For the inpu原创 2021-03-19 17:14:31 · 702 阅读 · 3 评论 -
HDU 1735 字数统计
杭电OJ 1735 字数统计问题描述InputOutput解题思路C++AC代码问题描述一天,淘气的Tom不小心将水泼到了他哥哥Jerry刚完成的作文上。原本崭新的作文纸顿时变得皱巴巴的,更糟糕的是由于水的关系,许多字都看不清了。可怜的Tom知道他闯下大祸了,等Jerry回来一定少不了一顿修理。现在Tom只想知道Jerry的作文被“破坏”了多少。 Jerry用方格纸来写作文,每行有L个格子。(图1显示的是L = 10时的一篇作文,’X’表示该格有字,该文有三个段落)。 图2显示的是浸水后的作文原创 2021-03-19 00:10:08 · 194 阅读 · 0 评论