![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ACM解题报告
文章平均质量分 83
zsc09_leaf
add oil
展开
-
poj -- 2833 The Average(优先队列或堆或直接模拟)
http://poj.org/problem?id=2833 The AverageTime Limit: 6000MS Memory Limit: 10000KTotal Submissions: 7443 Accepted: 2288Case Time Limit: 4000MSDescriptionIn a speech contest, when原创 2011-04-10 16:49:00 · 1275 阅读 · 2 评论 -
hdu 4020 --Ads Proposal(排序)
http://acm.hdu.edu.cn/showproblem.php?pid=4020Ads ProposalTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 65768/6原创 2011-09-08 13:30:32 · 1141 阅读 · 0 评论 -
hdu - 2608 -0 or 1(规律)
0 or 1Time Limit: 6000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 986 Accepted Submission原创 2011-08-12 02:15:34 · 1945 阅读 · 2 评论 -
hdu 1717 --小数化分数2
1.有限循环小数化成分数 例1: 0.5 0.5*10=5; 0.5 = 5/10 = 1/2; 例2: 0.3275 0.3275 * 10000 = 3275 0.3275 = 3275/10000 = 131/400 ; 2.无限循环小数化分数 例1: 0.(4)原创 2011-06-16 13:45:00 · 1070 阅读 · 0 评论 -
hdu 2441-ACM(Array Complicated Manipulation)(数学)
ACM(Array Complicated Manipulation)Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s原创 2011-08-28 23:54:07 · 1293 阅读 · 1 评论 -
ZJU 1654 -- Place the Robots (二分匹配)
Place the Robots Time Limit: 5 Seconds Memory Limit: 32768 KB原创 2011-07-25 13:03:00 · 1138 阅读 · 0 评论 -
poj 1434 --Fill the Cisterns!(计算几何,二分)
http://poj.org/problem?id=1434Fill the Cisterns!Time Limit: 5000MS Memory Limit: 10000KTotal Submissions: 1806 Accepted: 653Descri原创 2011-07-06 15:54:36 · 1730 阅读 · 0 评论 -
poj 3421 --X-factor Chains(数学、组合)
http://poj.org/problem?id=3421 X-factor ChainsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 4495 Accepted: 1379DescriptionGiven原创 2011-07-09 10:06:39 · 1549 阅读 · 2 评论 -
poj -- 2886 约瑟夫问题(线段树)
<br />http://poj.org/problem?id=2886<br /> <br /> <br /> <br />Who Gets the Most Candies?Time Limit: 5000MS Memory Limit: 131072K<br />Total Submissions: 4140 Accepted: 1117<br />Case Time Limit: 2000MS<br /><br /><br />Description<br /><br />N children原创 2011-04-29 09:33:00 · 1329 阅读 · 0 评论 -
poj 1195 -- Mobile phones(2维树状数组)
<br />Mobile phonesTime Limit: 5000MS Memory Limit: 65536K<br />Total Submissions: 8215 Accepted: 3596<br /><br /><br />Description<br />Suppose that the fourth generation mobile phone base stations in the Tampere area operate as follows. The area is div原创 2011-04-24 16:49:00 · 746 阅读 · 0 评论 -
poj -- 3349--Snowflake Snow Snowflakes (暴力)
Snowflake Snow SnowflakesTime Limit: 4000MS Memory Limit: 65536KTotal Submissions: 18980 Accepted: 4926原创 2011-08-19 14:15:38 · 1640 阅读 · 0 评论 -
hdu -- 2421--Deciphering Password (分解质因数)
Deciphering PasswordTime Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1044 Acce原创 2011-08-19 14:11:37 · 1660 阅读 · 0 评论 -
poj 3233 --- Matrix Power Series (二分,矩阵)
Matrix Power SeriesTime Limit: 3000MS Memory Limit: 131072KTotal Submissions: 9393 Accepted: 4018DescriptionGiven a n × n matrix A and a positive integer k,原创 2012-03-22 18:40:59 · 1566 阅读 · 0 评论 -
poj 2023 -- scanf用法
题目链接:http://poj.org/problem?id=2023Choose Your Own AdventureTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 1503 Accepted: 609Description原创 2012-02-26 17:11:12 · 905 阅读 · 0 评论 -
pku -- 3468 A Simple Problem with Integers(线段树)
题目连接:http://poj.org/problem?id=3468 Time Limit: 5000MS Memory Limit: 131072KTotal Submissions: 17698 Accepted: 4581Case Time Limit: 2000MSDescriptionYou have N integers, A1, A2原创 2011-03-10 22:36:00 · 929 阅读 · 0 评论 -
poj 3264 --Balanced Lineup (RMQ或线段树)
Balanced LineupTime Limit: 5000MS Memory Limit: 65536KTotal Submissions: 20172 Accepted: 9369Case Time Limit: 2000MSDescriptionFor the daily milking, Farm转载 2011-10-31 22:17:41 · 673 阅读 · 0 评论 -
poj 1747 -- Expression(递归)
http://poj.org/problem?id=1747 ExpressionTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 476 Accepted: 297DescriptionIt is known that Sheffer strok转载 2011-11-15 20:07:05 · 1002 阅读 · 0 评论 -
hdu 2444-The Accomodation of Students(二分匹配)
The Accomodation of StudentsTime Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 609原创 2011-08-28 23:43:12 · 1723 阅读 · 0 评论 -
poj--1703/2492 (经典并查集)
Find them, Catch themTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 18126 Accepted: 5330Descr原创 2011-08-17 01:49:16 · 4908 阅读 · 0 评论 -
poj 1182 --食物链(经典并查集)
食物链Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 25115 Accepted: 7217 Description动物王国中有三类动物A,B,C,这三类动物的食物链构成了有趣的环形。A吃原创 2011-08-26 13:46:50 · 5153 阅读 · 0 评论 -
poj-1988-Cube Stacking (并查集)
Cube StackingTime Limit: 2000MS Memory Limit: 30000KTotal Submissions: 12537 Accepted: 4200Case Time Limit: 10原创 2011-08-25 12:42:01 · 2781 阅读 · 0 评论 -
poj -- 2689 Prime Distance(筛选法求素数)
<br />Prime DistanceTime Limit: 1000MS Memory Limit: 65536K<br />Total Submissions: 5188 Accepted: 1384<br /><br /><br />Description<br />The branch of mathematics called number theory is about properties of numbers. One of the areas that has captured th原创 2011-04-25 19:04:00 · 1210 阅读 · 2 评论 -
poj -- 3277City Horizon (线段树)
<br />City HorizonTime Limit: 2000MS Memory Limit: 65536K<br />Total Submissions: 11351 Accepted: 3026<br /><br /><br />Description<br /><br />Farmer John has taken his cows on a trip to the city! As the sun sets, the cows gaze at the city horizon and ob原创 2011-04-24 17:01:00 · 817 阅读 · 0 评论 -
hdu -- 1867 A + B for you again (KMP)
<br /> <br /> <br />http://acm.hdu.edu.cn/showproblem.php?pid=1867<br /> <br /> <br />改天再写细节。<br /> <br />#include<iostream>using namespace std;const int P=500010;int fail[P]; char a[500010],b[500010];char ans[2][1000010];int kmp(char* str, cha原创 2011-05-19 17:02:00 · 1027 阅读 · 0 评论 -
pku 2104 -- K-th Number (sort +小优化水过)
<br /><br /> <br /> <br />http://poj.org/problem?id=2104<br /> <br /> <br /> K-th NumberTime Limit: 20000MS Memory Limit: 65536KTotal Submissions: 22939 Accepted: 6366Case Time Limit: 2000MS<br />DescriptionYou are working for Macrohard company in data原创 2011-03-21 23:19:00 · 1900 阅读 · 0 评论 -
hdu 1754 -- I Hate It (线段树)
<br /> <br /> <br /> <br />I Hate It<br /> <br />Time Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)<br />Total Submission(s): 7941 Accepted Submission(s): 2808<br /><br /><br />Problem Description<br />很多学校流行一种比较的习惯。老师们很原创 2011-03-14 17:58:00 · 591 阅读 · 0 评论 -
pku 1220--NUMBER BASE CONVERSION(高精度进制转换)
<br /><br />NUMBER BASE CONVERSIONTime Limit: 1000MS Memory Limit: 10000K<br />Total Submissions: 3000 Accepted: 1277<br /><br /><br />Description<br />Write a program to convert numbers in one base to numbers in a second base. There are 62 different dig原创 2011-03-05 15:33:00 · 1589 阅读 · 1 评论 -
pku 1953 -- World Cup Noise (DP)
http://poj.org/problem?id=1953World Cup NoiseTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 10772 Accepted: 5331DescriptionBackground "KO-RE-A, KO-RE-A" shout 54.000 happy football fans after their team has reached the semifinals of the FIFA W原创 2011-02-16 14:13:00 · 1417 阅读 · 0 评论 -
hdu 2056 -- Rectangles (矩形重合)
2056 -- Rectangles (矩形重合)RectanglesTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5731 Accepted Submission(s): 1802Problem DescriptionGiven two rectangles and the coordinates of two points on the diagon原创 2011-02-16 13:27:00 · 2271 阅读 · 0 评论 -
hdu 1496 -- Equations(哈希)
<br />Hot! 浙大计算机研究生复试上机考试—— 历年题目(链接) 全真模拟(链接) <br />Equations<br />Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)<br />Total Submission(s): 1387 Accepted Submission(s): 542<br /><br /><br />Problem Description<br />C原创 2011-03-04 15:37:00 · 1204 阅读 · 0 评论 -
pku 1164 -- The Castle (递归)
<br />1164 -- The Castle (递归)<br />The CastleTime Limit: 1000MS Memory Limit: 10000K<br />Total Submissions: 4361 Accepted: 2460<br /><br /><br />Description<br /> <br /><br /> <br />Figure 1 shows the map of a castle.Write a program that cal原创 2011-03-02 17:15:00 · 785 阅读 · 0 评论 -
pku 3630--Phone List(二分查找,trie树)
<br />Phone ListTime Limit: 1000MS Memory Limit: 65536K<br />Total Submissions: 10228 Accepted: 3288<br /><br /><br />Description<br /><br />Given a list of phone numbers, determine if it is consistent in the sense that no number is the prefix of another.原创 2011-03-02 16:53:00 · 1713 阅读 · 0 评论 -
poj 3909 --Lucky numbers(搜索)
题源:http://poj.org/problem?id=3909题意:very lucky number 定义:我们称只包含 4和 7的为lucky number ,由一个或多个 lucky number的成绩得到的数我们就叫做very lucky number 解法:只由4和7组成的 只有8000多个先找出这些数 (lucky number )再由这些数搜索出 very lucky number 大概有35W个 //3520K 125MS#include #include原创 2011-05-20 14:04:00 · 2145 阅读 · 0 评论 -
poj 2668 -- Defending Castle(数学题)
<br />Defending CastleTime Limit: 2000MS Memory Limit: 65536K<br />Total Submissions: 4559 Accepted: 1060<br /><br /><br />Description<br />The kingdom Eintagra is in great danger! Overwhelming enemy has surrounded the emperor's castle and once they ente原创 2011-03-30 20:26:00 · 1482 阅读 · 1 评论 -
poj -- 2155 Matrix (二维树状数组)
MatrixTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 9076 Accepted: 3411DescriptionGiven an N*N matrix A, whose elements are either 0 or 1. A[i, j] means the number in the i-th row and j-th column. Initially we have A[i, j] = 0 (1 We can chang原创 2011-04-23 18:04:00 · 811 阅读 · 0 评论 -
Zju -- 2859 Matrix Searching(线段树)
Matrix SearchingTime Limit: 10 Seconds Memory Limit: 32768 KB Given an n*n matrix A, whose entries Ai,j are integer numbers ( 1 Input The first line of the input contains a single integer T , the number of test cases. For each test case, the first原创 2011-04-23 13:40:00 · 886 阅读 · 0 评论 -
最长不降子序列 NlogN解法
这是一个很好的题目。题目的算法还是比较容易看出来的,就是求最长上升子序列的长度。不过这一题的数据规模最大可以达到40000,经典的O(n^2)的动态规划算法明显会超时。我们需要寻找更好的方法来解决是最长上升子序列问题。先回顾经典的O(n^2)的动态规划算法: 设A[i]表示序列中的第i个数,F[i]表示从1到i这一段中以i结尾的最长上升子序列的长度,初始时设F[i] = 0(i = 1转载 2011-06-10 16:37:00 · 6142 阅读 · 0 评论 -
poj -- 3692 Kindergarten (最大完全子图)
<br /> <br />KindergartenTime Limit: 2000MS Memory Limit: 65536K<br />Total Submissions: 2819 Accepted: 1292<br /><br /><br />Description<br /><br />In a kindergarten, there are a lot of kids. All girls of the kids know each other and all boys also know原创 2011-04-14 22:49:00 · 4100 阅读 · 0 评论 -
ACM计算几何题目推荐
下面的OJ之中,CII是指ACM-ICPC Live Archive ,网址是:http://cii-judge.baylor.edu/其他OJ的地址大家都熟知了,因此不再提供。一。基础题目1.1 有固定算法的题目A, 最近点对问题最近点对问题的算法基于扫描线算法。ZOJ 2107 Quoit Design 典型最近点对问题POJ 3714 Raid 变种最近点对问题B,最小包围圆最小包围圆的算法是一种增量算法,期望是O(n)。ZOJ 1450 Minimal转载 2011-04-18 18:22:00 · 15463 阅读 · 1 评论 -
用树状数组解决区间查询问题
转至ROBA大神博客:http://roba.rushcj.com/?p=510 本文扩写自郭神的《树状数组新应用》,在此表示膜拜。树状数组的学名貌似叫做Binary Index Tree,关于它的基本应用可参考Topcoder上的这篇Tutorial.树状数组可以看作一个受限制的线段树,它维护一个数组,最经典的树状数组支持的基本操作有两个:(1)改变转载 2011-06-07 20:02:00 · 1703 阅读 · 0 评论