- 博客(65)
- 收藏
- 关注
原创 CodeForces - 77E :Martian Food (笛卡尔定理+韦达定理)
CodeForces - 77E :Martian Food Have you ever tasted Martian food? Well, you should.Their signature dish is served on a completely black plate with the radius of R, flat as a pancake.First, they put a perfectly circular portion of the Golden Honduras on
2017-08-30 21:58:17 4495
原创 POJ-2109:Power of Cryptography
POJ-2109:Power of CryptographyCurrent work in cryptography involves (among other things) large prime numbers and computing powers of numbers among these primes. Work in this area has resulted in the practical use of results from number theory and other bra
2017-08-30 19:11:02 310
原创 POJ-1753:Flip Game
POJ-1753:Flip GameFlip game is played on a rectangular 4x4 field with two-sided pieces placed on each of its 16 squares. One side of each piece is white and the other one is black and each piece is lying either it's black or white side up. Each round you f
2017-08-30 16:12:27 309
原创 POJ-1742:Coins(多重背包二进制求法)
POJ-1742:Coins(多重背包二进制求法)People in Silverland use coins.They have coins of value A1,A2,A3...An Silverland dollar.One day Tony opened his money-box and found there were some coins.He decided to buy a very nice watch in a nearby shop. He wanted to pay the ex
2017-08-30 14:54:55 434
原创 第十二届湖南省赛:三角形和矩形
第十二届湖南省赛:三角形和矩形 Bobo 有一个三角形和一个矩形,他想求他们交的面积。具体地,三角形和矩形由 8 个整数 x 1,y 1,x 2,y 2,x 3,y 3,x 4,y 4 描述。 表示三角形的顶点坐标是 (x 1,y 1),(x 1,y 2),(x 2,y 1), 矩形的顶点坐标是 (x 3,y 3),(x 3,y 4),(x 4,y4),(x 4,y 3).
2017-08-30 08:59:58 371
原创 ZOJ - 3806 :Incircle and Circumcircle
ZOJ - 3806 :Incircle and CircumcircleA triangle is one the basic shapes in geometry. It's a polygon with three vertices and three sides which are line segments. A triangle with vertices A, B, C is denoted ΔABC. And its three sides, BC, CA, AB are often den
2017-08-29 19:06:59 360
原创 HDU -4775:Infinite Go
HDU -4775:Infinite GoGo is a proverbial board game originated in China. It has been proved to be the most difficult board game in the world. “The rules of Go are so elegant, organic, and rigorously logical that if intelligent life forms exist elsewhere in
2017-08-29 18:17:32 439
原创 2017百度之星程序设计大赛 - 复赛 HDU-6149:Valley Numer II
2017百度之星程序设计大赛 - 复赛 HDU-6149:Valley Numer II为了形成山谷,首先要将一个图的顶点标记为高点或者低点。标记完成后如果一个顶点三元组<X, Y, Z>中,X和Y之间有边,Y与Z之间也有边,同时X和Z是高点,Y是低点,那么它们就构成一个valley。度度熊想知道一个无向图中最多可以构成多少个valley,一个顶点最多只能出现在一个valley中。
2017-08-28 21:08:58 421
原创 POJ - 3046 :Ant Counting
POJ - 3046 :Ant CountingBessie was poking around the ant hill one day watching the ants march to and fro while gathering food. She realized that many of the ants were siblings, indistinguishable from one another. She also realized the sometimes only one an
2017-08-28 18:47:43 439
原创 POJ-2430:Lazy Cows
POJ-2430:Lazy CowsFarmer John regrets having applied high-grade fertilizer to his pastures since the grass now grows so quickly that his cows no longer need to move around when they graze. As a result, the cows have grown quite large and lazy... and winter
2017-08-28 17:04:27 516
原创 2017 Multi-University Training Contest - Team 10 HDU-6172:Array Challenge
2017 Multi-University Training Contest - Team 10 HDU-6172:Array ChallengeThere’s an array that is generated by following rule.h0=2,h1=3,h2=6,hn=4hn−1+17hn−2−12hn−3−16And let us define two arrays bnandan as below.bn=3hn+1hn+9hn+1hn−1+9h2n+27hnhn−1−18hn+1
2017-08-28 14:02:15 408
原创 HYSBZ-2818: Gcd
2818: GcdTime Limit: 10 Sec Memory Limit: 256 MBSubmit: 6160 Solved: 2725[Submit][Status][Discuss]Description给定整数N,求1<=x,y<=N且Gcd(x,y)为素数的数对(x,y)有多少对.Input一个整数NOutput如题Sample Input4Sample Outp...
2017-08-24 10:04:00 377
原创 POJ 2689:Prime Distance
POJ 2689:Prime DistanceThe branch of mathematics called number theory is about properties of numbers. One of the areas that has captured the interest of number theoreticians for thousands of years is the question of primality. A prime number is a number th
2017-08-23 21:10:38 563
原创 ZOJ-2292:Anti-bug before Chinese Valentine's Day(轮廓线DP)
Anti-bug before Chinese Valentine's DayTime Limit: 2 Seconds Memory Limit: 65536 KBAugust 22, 2004 is Chinese Valentine's Day. popo's girlfriend qoqo asks popo to see beautiful star field with he...
2017-08-23 18:25:16 508
原创 POJ-1739:Tony's Tour
POJ-1739:Tony's TourA square township has been divided up into n*m(n rows and m columns) square plots (1<=N,M<=8),some of them are blocked, others are unblocked. The Farm is located in the lower left plot and the Market is located in the lower right plot.
2017-08-23 14:59:14 492
原创 2017 Multi-University Training Contest - Team 9 HDU -6167:Missile Interception
Missile Interception Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Problem DescriptionA country's defense department has been informed there ar...
2017-08-23 11:42:08 548
原创 HDU 6170:Two strings
Two strings Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Problem DescriptionGiving two strings and you should judge if they are...
2017-08-22 19:06:23 444
原创 HDU - 1166 :敌兵布阵
HDU - 1166 :敌兵布阵 C国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的一清二楚,每个工兵营地的人数都有可能发生变动,可能增加或减少若干人手,但这些都逃不过C国的监视。
2017-08-22 09:14:07 329
原创 POJ - 2352 :Stars
POJ - 2352 :Stars Astronomers often examine star maps where stars are represented by points on a plane and each star has Cartesian coordinates. Let the level of a star be an amount of the stars that are not higher and not to the right of the given star. As
2017-08-21 22:00:02 312
原创 CodeForces - 2C:Commentator problem
CodeForces - 2C:Commentator problemThe Olympic Games in Bercouver are in full swing now. Here everyone has their own objectives: sportsmen compete for medals, and sport commentators compete for more convenient positions to give a running commentary. Today
2017-08-21 15:24:30 602
原创 hihocoder:#1055 : 刷油漆
hihocoder:#1055 : 刷油漆上回说到,小Ho有着一棵灰常好玩的树玩具!这棵树玩具是由N个小球和N-1根木棍拼凑而成,这N个小球都被小Ho标上了不同的数字,并且这些数字都是处于1..N的范围之内,每根木棍都连接着两个不同的小球,并且保证任意两个小球间都不存在两条不同的路径可以互相到达。没错,这次说的还是这棵树玩具的故事!小Ho的树玩具的质量似乎不是很好,短短玩了几个星期,便掉漆了!“简直是一场噩梦!”小Ho拿着树玩具眼含热泪道。“这有什么好忧伤的,自己买点油漆刷一刷不就行了?”小Hi
2017-08-21 09:09:15 444
原创 hihocoder:#1520 : 古老数字
时间限制:20000ms单点时限:2000ms内存限制:256MB描述小Hi有一张纸条,上面写着一个长度为N的整数。由于年代过于久远,其中有些位置已经看不清了,我们用'?'来代替这个位置。小Hi印象中记得这个数字除以X的余数为Y,他想知道这个数最小可能是多少?注意这个整数的首位不能是0,除非它本身等于0。输入第1行:1个长度为N的字符串,只包含数字0~9和'?',1≤N≤200第2行:两个整数,X...
2017-08-20 19:05:33 453
原创 HDU - 1693:Eat the Trees
HDU - 1693:Eat the Trees Most of us know that in the game called DotA(Defense of the Ancient), Pudge is a strong hero in the first period of the game. When the game goes to end however, Pudge is not a strong hero any more. So Pudge’s teammates give him a
2017-08-20 08:35:42 413
原创 ZOJ-3453:Doraemon's Sweet Bullet
ZOJ-3453:Doraemon's Sweet BulletDoraemon likes to shoot his enemies with sweet bullets.n "enemies" stand in a line, each with a life value li (the index i increases from left to right side and starts from 1). Each time Doraemon shoots a sweet bullet from
2017-08-18 14:03:53 365
原创 LA-2512:Art Gallery(半平面交)
LA-2512:Art Gallery(半平面交)The art galleries of the new and very futuristic building of the Center for Balkan Cooperation have the form of polygons (not necessarily convex). When a big exhibition is organized, watching over all of the pictures is a big secur
2017-08-18 10:51:57 401
原创 CodeForces - 404D:Minesweeper 1D
Game "Minesweeper 1D" is played on a line of squares, the line's height is 1 square, the line's width is n squares. Some of the squares contain bombs. If a square doesn't contain a bomb, then it contains a number from 0 to 2 — the total number of bombs in
2017-08-16 20:20:18 394
原创 2017 Multi-University Training Contest 7:Hard challenge
2017 Multi-University Training Contest 7:Hard challengeThere are n points on the plane, and the ith points has a value vali, and its coordinate is (xi,yi). It is guaranteed that no two points have the same coordinate, and no two points makes the line which
2017-08-16 16:48:05 345
原创 POJ - 1383:Labyrinth
POJ - 1383:LabyrinthThe northern part of the Pyramid contains a very large and complicated labyrinth. The labyrinth is divided into square blocks, each of them either filled by rock, or free. There is also a little hook on the floor in the center of every
2017-08-16 14:16:28 502
原创 POJ-3348:Cows
POJ-3348:CowsYour friend to the south is interested in building fences and turning plowshares into swords. In order to help with his overseas adventure, they are forced to save money on buying fence posts by using trees as fence posts wherever possible. Gi
2017-08-14 19:21:59 342
原创 ZOJ 3449:Doraemon's Number Game III
ZOJ 3449:Doraemon's Number Game IIIDoraemon likes to play number game with Nobita.One day, Doraemon came up with an idea, he gave a number a in base 10 and a number x (x < 10), and then he let Nobita multiplies the first digit of a with x and add the sec
2017-08-14 17:57:54 363
原创 POJ - 3962:Dome of Circus
POJ - 3962:Dome of CircusA travelling circus faces a tough challenge in designing the dome for its performances. The circus has a number of shows that happen above the stage in the air under the dome. Various rigs, supports, and anchors must be installed o
2017-08-13 09:45:40 336
原创 hihocoder #1328 : 逃离迷宫
hihocoder #1328 : 逃离迷宫小Hi正处在由 N × M 个房间组成的矩阵迷宫中。为了描述方便,我们把左上角的房间的坐标定为(0, 0),右下角房间的坐标定为(N-1, M-1)。每个房间可能是3种状态之一:开放的、关闭的、或者上锁的。开放房间用'.'表示。小Hi可以从一个开放房间到达另一个相邻的(上下左右)开放房间。关闭房间用'#'表示。小Hi永远不能进入一个关闭的房间。上锁的房间用大写字母('A', 'B', 'C' ...)表示。小Hi在取得相应的钥匙前不能进入上锁的房间,
2017-08-12 12:20:29 1355 2
原创 hihocoder #1519 : 逃离迷宫II
hihocoder #1519 : 逃离迷宫II小Hi被坏女巫抓进里一间有N x M个格子组成的矩阵迷宫。有些格子是小Hi可以经过的,我们用'.'表示;有些格子上有障碍物小Hi不能经过,我们用'#'表示。小Hi的起始位置用'S'表示,他需要到达用'T'表示的格子才能逃离迷宫。麻烦的是小Hi被坏女巫施了魔法,他只能选择上下左右某一个方向,沿着这个方向一直走,直到遇到障碍物或者迷宫边界才能改变方向。新的方向可以是上下左右四个方向之一。之后他还是只能沿着新的方向一直走直到再次遇到障碍物或者迷宫边界……
2017-08-12 12:06:30 804 3
原创 hihocoder #1515 : 分数调查
hihocoder #1515 : 分数调查小Hi的学校总共有N名学生,编号1-N。学校刚刚进行了一场全校的古诗文水平测验。 学校没有公布测验的成绩,所以小Hi只能得到一些小道消息,例如X号同学的分数比Y号同学的分数高S分。 小Hi想知道利用这些消息,能不能判断出某两位同学之间的分数高低?
2017-08-12 12:02:42 506
原创 WUST OJ 1276: 峰峰不搞G
WUST OJ 1276: 峰峰不搞G峰峰在2013年暑假集训的时候找到了自己的真爱,她的名字叫LRW。今天距离2013年武科大“菜鸟杯”程序设计竞赛已经过去了十年了,今天对峰峰和LRW也是特别的一天——1周年结婚纪念日。这一天LRW问了峰峰一个问题:你会爱我多久?峰峰想让这个回答更有一些意义,又正巧家里有一面闲置的白墙。于是峰峰出门去买了一桶油漆。他想用油漆在墙上写下一个代表天数的数字作为他的答案。为了表达他对LRW的爱,他想把这个数字写的尽量大一些。但是讨厌英语的他不喜欢数字0,因为他觉得这像大写的英语
2017-08-11 18:24:07 677
原创 POJ - 2738:Two Ends
POJ - 2738:Two EndsIn the two-player game "Two Ends", an even number of cards is laid out in a row. On each card, face up, is written a positive integer. Players take turns removing a card from either end of the row and placing the card in their pile. The
2017-08-11 18:02:26 424
原创 POJ - 2653:Pick-up sticks
POJ - 2653:Pick-up sticksStan has n sticks of various length. He throws them one at a time on the floor in a random way. After finishing throwing, Stan tries to find the top sticks, that is these sticks such that there is no stick on top of them. Stan has
2017-08-11 16:34:22 533
原创 2017 Multi-University Training Contest - Team 6-HDU 6097:Mindis
2017 Multi-University Training Contest - Team 6-HDU 6097:MindisThe center coordinate of the circle C is O, the coordinate of O is (0,0) , and the radius is r.P and Q are two points not outside the circle, and PO = QO.You need to find a point D on the ci
2017-08-11 08:56:28 320
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人