原题: 题目描述 输入10个整数,将它们从小到大排序后输出,并给出现在每个元素在原来序列中的位置。 输入 输入数据有一行,包含10个整数,用空格分开。 输出 输出数据有两行,第一行为排序后的序列,第二行为排序后各个元素在原来序列中的位置。 示例输入 1 2 3 5 4 6 8 9 10 7 示例输出 1 2 3 4 5 6 7 8 9 10 1 2 3
原创 2013-03-19 20:52:00
430阅读
[ 题目描述]现在有一个圆圈, 顺时针标号分别从 0 到 n-1, 每次等概率顺时针走一步或者逆时针走一步,即如果你在 i 号点,你有 1/2 概率走到((i-1)mod n)号点,1/2 概率走到((i+1)mod n)号点。问从 0 号点走到 x 号点的期望步数。[ 输入]第一行包含一个整数 T
转载 2017-10-10 14:23:00
114阅读
2评论
A Time Limit: 60ms Memory limit: 65536K 有疑问?点这里^_^ 题目描写叙述 给出n(1<= n && n <= 2*10^6)个字符串,每一个字符串仅仅包括小写英文字母。且最多有五个。问这n个字符串中出现次数最多的有多少个。 输入 单组输入。第一行输入一个数字
转载 2017-07-03 10:38:00
106阅读
2评论
Greatest NumberTime Limit: 1000MS Memory limit: 65536K题目描述 Saya likes math, because she think math can make her cleverer. One day, Kudo invited a very simple game: GivenNintegers, then the players choose no more than four integers from them (can be repeated) and add them together. Finally, the one..
转载 2013-05-18 16:53:00
325阅读
2评论
1001http://acm.hdu.edu.cn/diy/contest_showproblem.php?pid=1001&cid=13996原来做过的一道题目,我用的贪心,按比重从大到小排序,然后依次选直到不能再放进来为止。注意两点:1:F[j]可能为0因为题目中说的非负数。记得第一次做的时候wa无数次。。2:选完的时候有2种可能:1:n恰好用完,最后不能再选;2:n有剩余,可能n比较大把所有的都选了还有剩余,可能中间出现不能全部将这间屋子里的换完只能换部分。View Code #include <iostream>#include <cstdio>#inc
转载 2011-12-06 16:46:00
39阅读
2评论
原题: 题目描述 In our region, the contest traditionally starts at 12:30 and lasts for 5 hours. If you are able to submit a solution at 12:39, the wise judges would determine that 9 minutes had elap
原创 2013-03-30 16:04:00
404阅读
原题: 题目描述        倾国倾城的大家闺秀潘小姐要选夫婿啦!武林中各门各派,武林外各大户人家,闻讯纷纷前来,强势围观。前来参与竞选的男生藏龙卧虎,高手云集,才子遍布,帅哥纷纭,更不乏富二代,官二代,可谓声势空前。          每个人参与竞选的帅哥除了进行一段激情洋溢的求婚演讲
原创 2013-03-19 20:06:00
380阅读
Problem Description snow 是个热爱打字的家伙,每次敲出更快的速度都会让他很开心。现在,
原创 2022-08-10 10:24:00
17阅读
Pixel densityTime Limit: 1000MS Memory limit: 65536K题目描述 Pixels per inch (PPI) or pixel density is a measurement of the resolution of devices in various contexts; typically computer di
原创 2022-08-10 11:11:12
75阅读
Pick applesTime Limit: 1000MS Memory limit: 165536K题目描述Once ago, there is a mystery yard which only produces three kinds of apples. The number of each kind is infinite. A girl carrying a
原创 2022-08-10 11:11:21
54阅读
Rescue The PrincessTime Limit: 1000ms   Memory limit: 65536K  有疑问?点这里^_^题目描述    S
原创 2022-08-10 12:15:05
58阅读
Problem Description
原创 2023-02-19 09:37:51
103阅读
CircleTime Limit: 2000ms   Memory limit: 65536K  有疑问?点这里^_^题目描述You have been given a circle from 0 to n - 1. If you are currently at x, you will move to (x - 1) mod n or (x + 1) mod n with
原创 2023-04-24 09:00:53
50阅读
Rescue The PrincessTime Limit: 1000ms Memory limit: 65536K有疑问?点这里^_^题目描述 Several days ago, a beast caught a beautiful princess and the princess was put in prison. To rescue the princess, a prince who wanted to marry the princess set out immediately. Yet, the beast set a maze. Only if the prince find
转载 2013-06-18 16:22:00
49阅读
2评论
Pick applesTime Limit: 1000ms Memory limit: 165536K有疑问?点这里^_^题目描述Once ago, there is a mystery yard which only produces three kinds of apples. The number of each kind is infinite. A girl carrying a big bag comes into the yard. She is so surprised because she has never seen so many apples before. Each
转载 2013-05-17 18:10:00
68阅读
2评论
1001http://acm.sdut.edu.cn/web/problem.php?action=showproblem&problemid=2389卡精度的题目,第一次的WA后就想到了应该是卡精度的问题,可是以前没接触过eps怎么用,于是就纠结在了eps的考虑上,好不容易弄好了。可是还是WA结果我真的就死心了,于是就去做最小生成树的那个题(后来还是纠结了,,唉悲剧啊、。。)今天拿来,就是加了个tmp数组的出事化。。就A了。。唉。每次比赛时对于时间的把握,以及拿过题目来之后思路的整理,都还不够完善。。需要锻炼。View Code #include <iostream>#i
转载 2012-02-27 21:07:00
69阅读
2评论
Max SumTime Limit: 2000ms   Memory limit: 32768K  有疑问?点这里^_^题目描述Given a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example,
原创 2023-04-21 02:01:51
67阅读
[题目大意]:给定一个字符串,求到哪一位时的字串是前几位循环组成的,并求出循环次数。 思路:求每个前缀的最小循环周:从i到n枚举len,如果len%(len-next[len])==0,则这个前缀是由循环节组成的,且循环次数为len/(len-next[len])//len为当前i的值,next[l
原创 2024-08-14 17:19:01
36阅读
Alice and BobTime Limit: 1000ms   Memory limit: 65536K  有疑问?点这里^_^题目描述    Alice and Bob like playing games very much.Today, they introduce a new game.    There is a polynomial like thi
原创 2022-08-10 10:34:34
36阅读
The number of stepsTime Limit: 1000ms   Memory limit: 65536K  有疑问?点这里^_^题目描
原创 2022-08-10 12:14:14
55阅读
  • 1
  • 2
  • 3
  • 4
  • 5