- 博客(23)
- 资源 (12)
- 收藏
- 关注
原创 H - Cow Contest
H - Cow ContestN (1 ≤ N ≤ 100) cows, conveniently numbered 1..N, are participating in a programming contest. As we all know, some cows code better than others. Each cow has a certain constant skill ra...
2018-04-30 16:29:19 204
原创 F - 野茫茫 HDU - 1010
F - 野茫茫HDU - 1010 The doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shake, and the doggie ...
2018-04-29 14:09:26 117
原创 Q - A Knight's Journey
Q - A Knight's JourneyBackground The knight is getting bored of seeing the same black and white squares again and again and has decided to make a journey around the world. Whenever a knight moves, it ...
2018-04-28 20:23:25 123
原创 D - Silver Cow Party
D - Silver Cow Party One cow from each of N farms (1 ≤ N ≤ 1000) conveniently numbered 1..N is going to attend the big cow party to be held at farm #X (1 ≤ X ≤ N). A total of M (1 ≤ M ≤ 100,000) unidi...
2018-04-27 20:33:11 127
原创 C - Talented Chef
C - Talented ChefAs we all know, Coach Gao is a talented chef, because he is able to cook M dishes in the same time. Tonight he is going to have a hearty dinner with his girlfriend at his home. Of cou...
2018-04-24 17:54:06 182
原创 What day is that day?
What day is that day?It's Saturday today, what day is it after 11 + 22 + 33 + ... + NN days? Input There are multiple test cases. The first line of input contains...
2018-04-24 17:13:11 456
原创 E - E LightOJ - 1002
E - E LightOJ - 1002 I am going to my home. There are many cities and many bi-directional roads between them. The cities are numbered from 0 to n-1 and each ...
2018-04-19 19:03:06 170
原创 G - G hdu Find a way
G - G hdu Find a wayPass a year learning in Hangzhou, yifenfei arrival hometown Ningbo at finally. Leave Ningbo one year, yifenfei have many people to meet. Especially a good friend Merceki.Yife...
2018-04-18 17:18:05 137
原创 J - Dungeon Master
J - Dungeon Master You are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may not be filled with rock. It takes one minute to move on...
2018-04-18 15:08:11 122
原创 G - Red and Black
G - Red and BlackThere is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile, he can move to one of four adjacent t...
2018-04-17 21:26:37 116
原创 F - Spotlights
Theater stage is a rectangular field of size n × m. The director gave you the stage's plan which actors will follow. For each cell it is stated in the plan if there would be an actor in this cell or n...
2018-04-17 19:20:52 163
原创 C UVA 12293 Box Game
There are two identical boxes. One of them contains n balls, while the other box contains one ball. Alice and Bob invented a game with the boxes and balls, which is played as follows: Alice and Bob mo...
2018-04-17 13:11:55 119
原创 L - 棋盘问题
L - 棋盘问题在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。Input 输入含有多组测试数据。每组数据的第一行是两个正整数,n k,用一个空格隔开,表示了将在一个n*n的矩阵内描述棋盘,以及摆放棋子的数目。 n ...
2018-04-17 12:49:03 283
原创 T - Catch That Cow Catch That Cow
Catch That CowFarmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,000) on a number line and the cow is at a point K ...
2018-04-14 21:35:14 182
原创 B - 下沙小面的(2)
B - 下沙小面的(2)前文再续,书接上一题。话说当上小面的司机的Lele在施行他的那一套拉客法则以后,由于走的路线太长,油费又贵,不久便亏本了。(真可怜~)于是他又想了一个拉客的办法。对于每一次拉客活动,他一次性把乘客都拉上车(当然也不会超过7个,因为位置只有7个)。然后,Lele计算出一条路线(出于某些目的,Lele只把车上乘客的目的地作为这条路线上的站点),把所有乘客都送到目的地...
2018-04-13 21:20:48 103
原创 D - 水陆距离 HihoCoder - 1478
给定一个N x M的01矩阵,其中1表示陆地,0表示水域。对于每一个位置,求出它距离最近的水域的距离是多少。 矩阵中每个位置与它上下左右相邻的格子距离为1。 Input 第一行包含两个整数,N和M。 以下N行每行M个0或者1,代表地图。 数据保...
2018-04-11 20:55:35 220
原创 除法的可除尽和小数循环
除法的可除尽:结论得自:https://blog.csdn.net/u014193247/article/details/249359011)对于两个互质的正整数(A,B),如果B含有除2,5以外的素因子,则A/B是不可以除尽的。2)对于两个不互质的正整数,gcd(A,B)约分成互质。小数循环:1)模拟除法,余数自乘10,再除以除数。2)判断循环节。只有商和余数同时出现在同一位置时,才是循环节。#...
2018-04-11 19:05:10 1767
原创 A - 小数数字
给定一个真分数P/Q(P < Q),请你求出它的小数部分都包括0~9中的哪些数字。 例如1/2=0.5,只包含数字5;1/3=0.33333……,只包含数字3,1/7=0.142857142857……,包含数字124578。 Input 两个整数P和Q,1 ≤ P < Q ≤ ...
2018-04-11 11:46:04 430
原创 A - Kill the monster
A - Kill the monster There is a mountain near yifenfei’s hometown. On the mountain lived a big monster. As a hero in hometown, yifenfei wants to kill it. Now we know yifenfei have n spells, and the m...
2018-04-10 17:17:38 207
原创 Convex
ConvexTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1497 Accepted Submission(s): 996Problem Description We have a special convex that all p...
2018-04-05 20:11:17 348
原创 Palindrome(manacher算法)
PalindromeTime Limit: 15000MS Memory Limit: 65536KTotal Submissions: 11080 Accepted: 4212DescriptionAndy the smart computer science student was attending an algorithms class when the professor asked t...
2018-04-05 10:42:16 354
原创 J - J 畅通工程续
J - J 畅通工程续某省自从实行了很多年的畅通工程计划后,终于修建了很多路。不过路多了也不好,每次要从一个城镇到另一个城镇时,都有许多种道路方案可以选择,而某些方案要比另一些方案行走的距离要短很多。这让行人很困扰。 现在,已知起点和终点,请你计算出要从起点到终点,最短需要行走多少距离。 Input 本题目包含多组数据,请处理到文件...
2018-04-04 15:05:33 143
原创 权势二进制
权势二进制一个十进制整数被叫做权势二进制,当他的十进制表示的时候只由0或1组成。例如0,1,101,110011都是权势二进制而2,12,900不是。当给定一个n的时候,计算一下最少要多少个权势二进制相加才能得到n。Input 单组测试数据。第一行给出一个整数n (1<=n<=1,000,000)Output 输出答案占一行。 Sample Inp...
2018-04-03 22:32:04 197
HackBar2.1.3.zip
2020-05-21
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人