![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
比赛题
lyhvoyage
不抛弃,不放弃!
展开
-
CodeForce 236B Easy Number Challenge(筛法求素数 + 整数因式分解)
题目链接:http://codeforces.com/problemset/problem/236/BEasy Number Challengetime limit per test2 secondsmemory limit per test256 megabytesLet's denote d(n) as the number of divis原创 2016-04-05 19:27:00 · 932 阅读 · 0 评论 -
hdu 4915 Parenthese sequence(模拟)2014多校训练第5场
Parenthese sequence Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Problem Descriptio原创 2014-08-06 11:05:16 · 1976 阅读 · 1 评论 -
CodeForce 439C Devu and Partitioning of the Array(模拟)
Devu and Partitioning of the Arraytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputDevu being a small kid, l原创 2014-07-13 17:28:13 · 1450 阅读 · 0 评论 -
ZOJ 1642 Match for Bonus(dp)
Match for BonusTime Limit: 2 Seconds Memory Limit: 65536 KBRoy played a game with his roommates the other day. His roommates wrote 2 strings of characters, and gave each character a b原创 2014-08-02 18:16:44 · 1236 阅读 · 0 评论 -
hdu 4970 Killing Monsters(数组的巧妙运用) 2014多校训练第9场
Killing MonstersTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 906 Accepted Submission(s): 444Problem DescriptionKingdom R原创 2014-08-20 18:10:32 · 2051 阅读 · 0 评论 -
hdu 4965 Fast Matrix Calculation(矩阵快速幂)2014多校训练第9场
Fast Matrix Calculation Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Problem Descript原创 2014-08-20 17:07:44 · 1973 阅读 · 0 评论 -
hdu 4923 Room and Moor(数学题)2014多校训练第6场
Room and Moor Time Limit: 12000/6000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Problem Descriptio原创 2014-08-08 16:45:59 · 1276 阅读 · 0 评论 -
hdu 4932 Miaomiao's Geometry(暴力枚举)
Miaomiao's Geometry Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Problem Des原创 2014-08-11 09:15:54 · 1539 阅读 · 0 评论 -
zoj 3818 Pretty Poem(暴力处理字符串)2014年牡丹江赛区网络赛
Pretty PoemTime Limit: 2 Seconds Memory Limit: 65536 KBPoetry is a form of literature that uses aesthetic and rhythmic qualities of language. There are many famous poets in the contempora原创 2014-09-08 10:34:54 · 3054 阅读 · 0 评论 -
hdu 4920 Matrix multiplication(矩阵相乘)2014多校训练第5场
Matrix multiplication Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Problem De原创 2014-08-05 18:16:26 · 2359 阅读 · 5 评论 -
hdu 4911 Inversion(归并排序求逆序对数)2014多校训练第5场
Inversion Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Problem Description原创 2014-08-06 08:36:01 · 2560 阅读 · 0 评论 -
CodeForces 448
A:Rewards:题目链接:http://codeforces.com/problemset/problem/448/A题意:Bizon有a1个一等奖奖杯,a2个二等奖奖杯,a3个三等奖奖杯,b1个一等奖奖牌,b2个二等奖奖牌,b3个三等奖奖牌,和一个有n个架子的橱柜。现在Bizon想把这些奖牌和奖杯放在橱柜里,但是要遵循下面的规则:一个架子上不能同时放奖杯和奖牌;一个架子上的奖杯数量不原创 2014-07-18 11:03:25 · 1826 阅读 · 0 评论 -
UVA 10196 Morning Walk(欧拉回路)
Problem HMorning WalkTime Limit3 SecondsKamalis a Motashotaguy. He has got a new job in Chittagong. So, he has moved to Chittagong fromDinajpur. He was getting fatter i原创 2014-07-17 12:43:24 · 1462 阅读 · 0 评论 -
CodeForce 424C Magic Formulas(数学题)
Magic Formulastime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPeople in the Tomskaya region like magic for原创 2014-07-21 10:17:17 · 1353 阅读 · 0 评论 -
CodeForce 356A Knight Tournament(set应用)
Knight Tournamenttime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputHooray! Berl II, the king of Berland is m原创 2014-07-20 18:38:30 · 1693 阅读 · 0 评论 -
CodeForce 363C Fixing Typos
Fixing Typostime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputMany modern text editors automatically check th原创 2014-07-21 08:54:10 · 1304 阅读 · 0 评论 -
SPOJ AMR 10I Dividing Stones(搜索)
Dividing StonesTime limit:7sSource limit:50000BMemory limit:256MBThere are N stones, which can be divided into some piles arbitrarily. Let the v原创 2014-08-01 18:36:29 · 1679 阅读 · 0 评论 -
hdu 4902 Nice boat(2014多校训练第4场1006)(暴力写法)
Nice boat Time Limit: 30000/15000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Problem Description原创 2014-08-01 08:46:18 · 1987 阅读 · 2 评论 -
ZOJ 1639 Hang Up the System (状态压缩)
Hang Up the SystemTime Limit: 2 Seconds Memory Limit: 32768 KBYou're going to design a multi-task operating system for an embedded system. Because the resources are limited on this mini c原创 2014-08-02 17:47:55 · 1331 阅读 · 0 评论 -
hdu 4941 Magical Forest(STL之map应用)2014多校训练第7场
Magical Forest Time Limit: 24000/12000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Problem Description原创 2014-08-13 11:13:42 · 1706 阅读 · 0 评论 -
hdu 5038 Grade(简单模拟求解)2014 ACM/ICPC Asia Regional 北京 Online
Grade Time Limit: 3000/1500 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Problem DescriptionTed is原创 2014-09-22 08:43:41 · 2554 阅读 · 0 评论 -
CodeForce 3B Lorry(贪心)
B. Lorrytime limit per test2 secondsmemory limit per test64 megabytesinputstandard inputoutputstandard outputA group of tourists is going to kayak and catamaran原创 2014-10-16 20:16:06 · 2373 阅读 · 0 评论 -
CodeForce 526B Om Nom and Dark Park(dp + 递归)
Om Nom and Dark Parktime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputOm Nom is the main character of a game原创 2015-04-19 11:54:06 · 1659 阅读 · 0 评论 -
Poj 3352 Road Construction & Poj 3177 Redundant Paths(边双连通分量+缩点)
Road ConstructionTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 9465 Accepted: 4699DescriptionIt's almost summer time, and that means that it's almost原创 2015-04-23 16:38:17 · 1293 阅读 · 0 评论 -
Bnuoj 4275 Your Ways(数学题 + 动态规划)
Your Ways You live in a small well-planned rectangular town in Phuket. The size of the central area of the town is H kilometers x W kilometers. The central area is divided into HW unit blocks, e原创 2015-04-19 19:37:52 · 1307 阅读 · 0 评论 -
HDU 5212 Code(容斥 或 莫比乌斯反演)
CodeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Problem DescriptionWLD likes playing with codes.One day he is writing a function.Howerver,his c原创 2015-04-27 09:49:25 · 2796 阅读 · 1 评论 -
POJ 1552 BUY LOW, BUY LOWER(最长单调递减子序列求方案数)
BUY LOW, BUY LOWERTime Limit: 1000MS Memory Limit: 30000K DescriptionThe advice to "buy low" is half the formula to success in the bovine stock market.To be con原创 2015-04-30 11:25:54 · 1529 阅读 · 0 评论 -
Zoj 3870 Team Formation(异或运算)
Team FormationTime Limit: 3 Seconds Memory Limit: 131072 KBFor an upcoming programming contest, Edward, the headmaster of Marjar University, is forming a two-man team from N students of h原创 2015-04-26 09:08:24 · 3448 阅读 · 2 评论 -
CodeForce 237C Primes on Interval(二分+ 素数筛法)
题目链接:http://codeforces.com/problemset/problem/237/CPrimes on Intervaltime limit per test1 secondmemory limit per test256 megabytesYou've decided to carry out a原创 2016-04-05 19:15:50 · 1255 阅读 · 0 评论 -
ZOJ 3702 Gibonacci number(数学推导题)
Gibonacci numberTime Limit: 2 Seconds Memory Limit: 65536 KBIn mathematical terms, the normal sequence F(n) of Fibonacci numbers is defined by the recurrence relationF(n)=F(n-1)+F(n-2)原创 2014-11-16 20:27:46 · 1439 阅读 · 0 评论 -
FZOJ 2014年11月份月赛 ytaaa(dp + RMQ)
题目链接:http://acm.fzu.edu.cn/contest/problem.php?cid=140&sortid=3Problem DescriptionYtaaa作为一名特工执行了无数困难的任务,这一次ytaaa收到命令,需要炸毁敌人的一个工厂,为此ytaaa需要制造一批炸弹以供使用。 Ytaaa使用的这种新型炸弹由若干个炸药组成,每个炸药都有它的威力值,而炸弹的威力值为组原创 2014-11-16 20:57:38 · 1898 阅读 · 2 评论 -
HDU 4998 Rotate(计算几何)2014年鞍山赛区网络赛
Rotate Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)原创 2014-09-14 10:33:32 · 2402 阅读 · 0 评论 -
ZOJ 1633 Big String(模拟构造)
Big StringTime Limit: 2 Seconds Memory Limit: 65536 KBWe will construct an infinitely long string from two short strings: A = "^__^" (four characters), and B = "T.T" (three characters). R原创 2014-08-02 18:30:43 · 2270 阅读 · 0 评论 -
NYOJ 1085 数单词 (AC自动机模板题)
数单词时间限制:1000 ms | 内存限制:65535 KB难度:4描述为了能够顺利通过英语四六级考试,现在大家每天早上都会早起读英语。LYH本来以为自己在6月份的考试中可以通过六级,可是没想到,成绩出来以后,居然没有通过。所以他不得不付出更多的时间来学习英语。要想通过六级,最基本的要求就是词汇量。为了能够更快的记住一些陌生单词,LYH有时会找一些原创 2014-09-29 08:20:06 · 2006 阅读 · 0 评论 -
NYOJ 1076 方案数量(公式 或 递推)
方案数量时间限制:1000 ms | 内存限制:65535 KB难度:2描述给出一个N*M的棋盘,左下角坐标是(0,0),右上角坐标是(N,M),规定每次只能向上或者向右走,问从左下角走到右上角,一共有多少种方案。上图是一个4*3的棋盘。输入多组测试数据。每组输入两个整数N,M(0≤N,M≤30)。输入0,0时表示结束,不做任原创 2014-09-29 08:39:00 · 1444 阅读 · 0 评论 -
CodeForces 321A Ciel and Robot(数学模拟)
题目链接:http://codeforces.com/problemset/problem/321/A题意:在一个二维平面中,开始时在(0,0)点,目标点是(a,b),问能不能通过重复操作题目中的指令,从原点移动到目标点。分析:假设一次完成所有的命令后,移动到了(xx,yy),并且从(Xi,Yi)重复操作k次指令到达目标点,则可以列出方程 Xi + k * xx = a && Yi + k原创 2014-10-08 20:01:32 · 1342 阅读 · 0 评论 -
ZOJ 3804 YY's Minions(简单模拟)
YY's MinionsTime Limit: 2 Seconds Memory Limit: 65536 KBDespite YY's so much homework, she would like to take some time to play with her minions first.YY lines her minions up to an N*M原创 2014-11-12 16:30:40 · 1373 阅读 · 0 评论 -
ZOJ 2319 Beatuiful People(单调上升子序列变形)
Beautiful PeopleTime Limit: 5 Seconds Memory Limit: 32768 KB Special JudgeThe most prestigious sports club in one city has exactly N members. Each of its members is strong and beauti原创 2014-10-02 11:30:04 · 1668 阅读 · 0 评论 -
ZOJ 3700 Ever Dream(模拟)
Ever DreamTime Limit: 2 Seconds Memory Limit: 65536 KB"Ever Dream" played by Nightwish is my favorite metal music. The lyric (see Sample Input) of this song is much more like a poem. E原创 2014-11-16 20:07:11 · 1724 阅读 · 0 评论 -
判断两条线段是否相交
如上图,判断线段AB和线段CD相交。分析:如果线段AB和线段CD相交,只能是图中的两种相交情况。可以用向量叉乘来判断。如果(向量AB叉乘向量AC)*(向量AB叉乘向量AD)设A(X1,Y1), B(X2, Y2), C(X3, Y3), D(X4, Y4),三角形ABC的面积为:2A = = X1*Y2 + X3*Y1 + X2*Y3 - X3*Y2 - X1*Y3 - X2*Y1。原创 2014-04-27 21:41:42 · 8740 阅读 · 0 评论