- 博客(16)
- 收藏
- 关注
原创 HDU 4407 - Sum(容斥原理)
Problem DescriptionXXX is puzzled with the question below: 1, 2, 3, ..., n (1Operation 1: among the x-th number to the y-th number (inclusive), get the sum of the numbers which are co-prime
2015-01-31 15:09:18 570
原创 POJ 3278 - Catch That Cow(BFS)
DescriptionFarmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a pointN (0 ≤ N ≤ 100,000) on a number line and the cow is at a point
2015-01-29 22:19:32 456
原创 POJ 1125 - Stockbroker Grapevine(最短路`Floyd)
DescriptionStockbrokers are known to overreact to rumours. You have been contracted to develop a method of spreading disinformation amongst the stockbrokers to give your employer the tactical edge
2015-01-27 23:17:59 542
原创 HDU 4684 - Arc of Dream(矩阵快速幂)
Problem DescriptionAn Arc of Dream is a curve defined by following function:wherea0 = A0ai = ai-1*AX+AYb0 = B0bi = bi-1*BX+BYWhat is the value of AoD(N) modulo 1,000,000,007? I
2015-01-27 16:24:01 593
原创 CodeForces 432C - Prime Swaps (数论 + 贪心)
You have an array a[1], a[2], ..., a[n], containing distinct integers from1 to n. Your task is to sort this array in increasing order with the following operation (you may need to apply it multiple
2015-01-27 09:11:24 756
原创 LightOJ 1078 - Integer Divisibility(取模运算)
DescriptionIf an integer is not divisible by 2 or 5, some multiple of that number in decimal notation is a sequence of only a digit. Now you are given the number and the only allowable digit, you
2015-01-27 08:18:34 867
原创 LightOJ 1189 - Sum of Factorials(贪心)
DescriptionGiven an integer n, you have to find whether it can be expressed as summation of factorials. For givenn, you have to report a solution such thatn = x1! + x2! + ... + xn! (xi j for a
2015-01-27 08:02:20 1174
原创 POJ 2739 - Sum of Consecutive Prime Numbers(素数筛法+前缀和 / 尺取法)
DescriptionSome positive integers can be represented by a sum of one or more consecutive prime numbers. How many such representations does a given positive integer have? For example, the integer 5
2015-01-27 07:54:16 589
原创 POJ 2253 - Frogger(最短路`dijkstra)
DescriptionFreddy Frog is sitting on a stone in the middle of a lake. Suddenly he notices Fiona Frog who is sitting on another stone. He plans to visit her, but since the water is dirty and full of
2015-01-26 09:12:14 601
原创 POJ 3984 - 迷宫问题(BFS)
Description定义一个二维数组: int maze[5][5] = { 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0,};它表示一个迷宫,其中的1表示墙壁,0表示可以走的路,只能横着走或竖着走,不能斜着走,要求编程序找出从左上角到右下角的最短路线
2015-01-25 21:55:14 1329
原创 POJ 1062 - 昂贵的聘礼(最短路`dijkstra)
Description年轻的探险家来到了一个印第安部落里。在那里他和酋长的女儿相爱了,于是便向酋长去求亲。酋长要他用10000个金币作为聘礼才答应把女儿嫁给他。探险家拿不出这么多金币,便请求酋长降低要求。酋长说:"嗯,如果你能够替我弄到大祭司的皮袄,我可以只要8000金币。如果你能够弄来他的水晶球,那么只要5000金币就行了。"探险家就跑到大祭司那里,向他要求皮袄或水晶球,大祭司要他用金币来换
2015-01-25 11:24:04 637
原创 Codeforces Round #287 (Div. 2) C. (构造)
Amr bought a new video game "Guess Your Way Out!". The goal of the game is to find an exit from the maze that looks like a perfect binary tree of heighth. The player is initially standing at the roo
2015-01-25 09:11:24 536
原创 Codeforces Round #282 (Div. 1) A. Treasure
Malek has recently found a treasure map. While he was looking for a treasure he found a locked door. There was a strings written on the door consisting of characters '(', ')' and '#'. Below there wa
2015-01-14 23:09:51 528
原创 Codeforces Round #280 (Div. 2) C. Vanya and Exams
Vanya wants to pass n exams and get the academic scholarship. He will get the scholarship if the average grade mark for all the exams is at leastavg. The exam grade cannot exceed r. Vanya has pass
2015-01-11 23:01:41 717
原创 Codeforces Round #284 (Div. 1) A(几何)
Crazy Town is a plane on which there are n infinite line roads. Each road is defined by the equationaix + biy + ci = 0, whereai andbi are not both equal to the zero. The roads divide the plane i
2015-01-08 20:50:39 756 1
原创 Codefores Good Bye 2014 - A,B,C
A. New Year Transportationtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputNew Year is coming in Line World! In this
2015-01-02 23:39:49 711
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人