上一页 1 ··· 74 75 76 77 78 79 80 81 82 ··· 94 下一页

2011年10月2日

Hexadecimal View (2011ACM亚洲大连赛区现场赛D题)

摘要: Hexadecimal ViewTime Limit: 2 Seconds Memory Limit: 65536 KBHexadecimal is very important and useful for computer programmers. You are requested to provide a hexadecimal view for given data. The hexadecimal view is made up of one or more rows. Every row except the last one represents 16 characters.. 阅读全文

posted @ 2011-10-02 13:35 kuangbin 阅读(2030) 评论(1) 推荐(0) 编辑

2011年9月17日

Counting Game (Uva)

摘要: Counting GameThere are n people standing in a line, playing a famous game called ``counting". When the game begins, the leftmost person says ``1" loudly, then the second person (people are numbered 1 to n from left to right) says ``2" loudly. This is followed by the 3rd person saying 阅读全文

posted @ 2011-09-17 18:21 kuangbin 阅读(530) 评论(0) 推荐(0) 编辑

One-Two-Three (Uva)

摘要: One-Two-ThreeYour little brother has just learnt to write one, two and three, in English. He has written a lot of those words in a paper, your task is to recognize them. Note that your little brother is only a child, so he may make small mistakes: for each word, there might be at most one wrong lett 阅读全文

posted @ 2011-09-17 17:41 kuangbin 阅读(378) 评论(0) 推荐(0) 编辑

2011年9月15日

ACM POJ 3981 字符串替换(简单题)

摘要: 字符串替换Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 5975Accepted: 2795Description编写一个C程序实现将字符串中的所有"you"替换成"we"Input输入包含多行数据 每行数据是一个字符串,长度不超过1000 数据以EOF结束Output对于输入的每一行,输出替换后的字符串Sample Inputyou are what you doSample Outputwe are what we doSource#include<stdio.h>#in 阅读全文

posted @ 2011-09-15 22:25 kuangbin 阅读(1092) 评论(0) 推荐(0) 编辑

ACM POJ 3979 分数加减法(水题)

摘要: 开学以来,各种忙碌,好久没有刷题了。。。。今天在POJ刷了题,,,很简单分数加减法Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 8389Accepted: 2668Description编写一个C程序,实现两个分数的加减法Input输入包含多行数据 每行数据是一个字符串,格式是"a/boc/d"。 其中a, b, c, d是一个0-9的整数。o是运算符"+"或者"-"。 数据以EOF结束 输入数据保证合法Output对于输入数据的每一行输出两个分数的运算结果。 注意结 阅读全文

posted @ 2011-09-15 22:08 kuangbin 阅读(1692) 评论(0) 推荐(0) 编辑

2011年9月11日

ACM HDU 4033 Regular Polygon(2011ACM四川网络赛第3题)

摘要: Regular PolygonTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65768/65768 K (Java/Others)Total Submission(s): 682Accepted Submission(s): 174Problem DescriptionIn a 2_D plane, there is a point strictly in a regular polygon with N sides. If you are given the distances between it and N vertexes of 阅读全文

posted @ 2011-09-11 22:56 kuangbin 阅读(548) 评论(0) 推荐(0) 编辑

2011年9月9日

ACM HDU 1042 N!(高精度计算阶乘)

摘要: N!Time Limit: 10000/5000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 24579Accepted Submission(s): 6774Problem DescriptionGiven an integer N(0 ≤ N ≤ 10000), your task is to calculate N!InputOne N in one line, process to the end of file.OutputFor each N, output N! in 阅读全文

posted @ 2011-09-09 19:22 kuangbin 阅读(2169) 评论(0) 推荐(0) 编辑

2011年9月3日

ACM HDU 4004 The Frog's Games(2011ACM大连赛区第四题)

摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4004本文作者 :kuangbin @SHU博客:www.cnblogs.com/kuangbin题意:一条长为l的河上有n个石头,告诉每个石头的位置,一个青蛙从头跳,求最少每次跳多少距离才能跳到对面。最多跳m次 解题策略:二分答案。。。其实二分的效率是很高的噢~~~~很常用的算法。。直接贴代码了:/*HDU 4004二分 */#include<stdio.h>#include<algorithm>using namespace std;#define MAXN 500010 阅读全文

posted @ 2011-09-03 23:32 kuangbin 阅读(636) 评论(0) 推荐(0) 编辑

ACM HDU 4001 To Miss Our Children Time (2011ACM大连赛区网络赛)

摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4001本文作者:kuangbin @SHU作者博客:www.cnblogs.com/kuangbin转载请注明出处。THX题意:小孩子玩积木堆房子的情景:每组测试数据第一行给出n,代表接下来有n块砖;接下来n行,每行给出砖的长,宽,高,属性(a,b,c,d);属性d:d=0:该砖的长度和宽度(a,b)要比垫在他下面的砖的长,宽大或者相等;就是长>=长,宽>=宽d=1:改砖的宽度和长度要比下面的砖的长度大或者相等,同时,该砖的宽度值和面积值要比下面的砖的面积值大;即长>=长,宽> 阅读全文

posted @ 2011-09-03 22:25 kuangbin 阅读(2301) 评论(6) 推荐(0) 编辑

ACM HDU 4002 Find the maximum(2011年大连赛区网络赛第二题)

摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4002本文作者:kuangbin作者博客:www.cnblogs.com/kuangbin 转载请注明出处。否则违法必究。。。保留最终解释权~~~~通过发现规律其实很简单。先是把前i个素数的乘积求出来,结果就是不超出n的素数和。题意:给出一个整数n,求一个数x,x在1到n之间,并且x/φ(x)最大(其中φ(x)为x的欧拉函数)。思路:由欧拉函数为积性函数,即:如果gcd(m , n) == 1,则有φ(m * n) == φ(m) * φ(n);且由φ(p^k) == (p - 1) * p^(k 阅读全文

posted @ 2011-09-03 20:21 kuangbin 阅读(1640) 评论(3) 推荐(0) 编辑

上一页 1 ··· 74 75 76 77 78 79 80 81 82 ··· 94 下一页

导航

JAVASCRIPT: