- 博客(70)
- 收藏
- 关注
原创 LightOJ-1078 Integer Divisibility
D - F是签到题Time Limit:2000MS Memory Limit:32768KB 64bit IO Format:%lld & %llu SubmitStatusPracticeLightOJ 1078uDebug Description If an integer is not divisible by 2 or 5, some multiple of that
2016-07-31 19:19:24 517
原创 POJ-1016 青蛙的约会
C - F是签到题Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u SubmitStatusPracticeOpenJ_Bailian 1061 Description 两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西
2016-07-31 17:49:19 1352
原创 欧几里德及扩展欧几里德算法总结
1.欧几里德: 应用:用于求a,b的最大公约数:递归解法:__int64 gcd(__int64 a,__int64 b)//求解a,b的最大公约数 { if(a%b==0)//b为最大公约数 return b; return gcd(b,a%b);//gcd(a,b)=gcd(b,a%b) } 非递归解法:__int64 gcd(__int64 a,__in
2016-07-31 15:42:08 337
原创 BFS学习总结
基本思想:1.用到了递归的思想:如图:最上端的节点开始要求到最下方节点的最短路,从节点开始向外层层层扩展,第一层的扩展都有最小值,如果能取最小值肯定不要最大值了,那么我们肯定会优先考了虑每一层的最小值了,没错,就是优先队列,对于访问的一个节点的子节点总是优先考虑离得最近的子节点,就是按与父节点的距离大小尽排序,近的在队头,远的在队尾,理论上对于每一层都要开辟一个新的队列,但是我们可以类比生活中的队伍
2016-07-29 18:58:59 315
原创 B - Rescue
B - RescueTime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmitStatusDescriptionAngel was caught by the MOLIGPY! He was put in prison by Moligpy. The prison is describ
2016-07-29 17:28:40 301
原创 A - Oil Deposits
A - Oil DepositsTime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u SubmitStatus Description The GeoSurvComp geologic survey company is responsible for detecting underground
2016-07-29 16:17:13 359
原创 最少步数 NYOJ 58
最少步数时间限制:3000 ms | 内存限制:65535 KB难度:4描述这有一个迷宫,有0~8行和0~8列:1,1,1,1,1,1,1,1,11,0,0,1,0,0,1,0,11,0,0,1,1,0,0,0,11,0,1,0,1,1,0,1,11,0,0,0,0,1,0,0,11,1,0,1,0,1,0,0,11,1,0,1,0,1,0,0,1
2016-07-29 13:16:29 271
原创 最少步数 NYOJ 58
最少步数 时间限制:3000 ms | 内存限制:65535 KB 难度:4 描述 这有一个迷宫,有0~8行和0~8列:1,1,1,1,1,1,1,1,1 1,0,0,1,0,0,1,0,1 1,0,0,1,1,0,0,0,1 1,0,1,0,1,1,0,1,1 1,0,0,0,0,1,0,0,1 1,1,0,1,0,1,0,0,1 1,1,0,1,0,1,0,0
2016-07-29 12:01:15 313
原创 A - Red and Black POJ 1979
A - Red and BlackTime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u SubmitStatus Description There is a rectangular room, covered with square tiles. Each tile is colored ei
2016-07-28 14:01:18 309
原创 N - Mafia Codeforces 348A
`N - MafiaTime Limit:2000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u SubmitStatus Description One day n friends gathered together to play “Mafia”. During each round of the game so
2016-07-27 23:18:49 378
原创 P - k-Multiple Free Set
P - k-Multiple Free SetTime Limit:2000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u SubmitStatus Description A k-multiple free set is a set of integers where there is no pair of int
2016-07-27 21:32:39 409
原创 M - Counting Kangaroos is Fun . Codeforces 373C
M - Counting Kangaroos is FunTime Limit:1000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u SubmitStatus Description There are n kangaroos with pockets. Each kangaroo has a size (inte
2016-07-27 19:11:38 384
原创 HDU-4907 Task schedule
J - Task scheduleTime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u SubmitStatus Description 有一台机器,并且给你这台机器的工作表,工作表上有n个任务,机器在ti时间执行第i个任务,1秒即可完成1个任务。 有m个询问,每个询问有一个数字q,表示如果
2016-07-27 17:06:57 359
原创 I - Red packet
I - Red packetTime Limit:1000MS Memory Limit:65535KB 64bit IO Format:%lld & %llu SubmitStatus Description New Year is coming! Our big boss Wine93 will distribute some “Red Package”, just lik
2016-07-27 11:08:26 461
原创 H - Pie
H - PieTime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u SubmitStatus Description My birthday is coming up and traditionally I’m serving pie. Not just one pie, no, I have
2016-07-27 10:25:30 359
原创 F - Expanding Rods POJ 1905
F - Expanding RodsTime Limit:500MS Memory Limit:32768KB 64bit IO Format:%lld & %llu SubmitStatus Description When a thin rod of length L is heated n degrees, it expands to a new length L’ =
2016-07-27 00:17:57 286
原创 C - Can you find it? HDU 2141
C - Can you find it?Time Limit:3000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64u SubmitStatus Description Give you three sequences of numbers A, B, C, then we give you a number X. No
2016-07-26 23:38:30 273
原创 E - Crossed Ladders
E - Crossed LaddersTime Limit:2000MS Memory Limit:32768KB 64bit IO Format:%lld & %llu SubmitStatus Description A narrow street is lined with tall buildings. An x foot long ladder is rested a
2016-07-26 16:17:46 323
原创 D - The Frog's Games hdoj 4404
D - The Frog’s GamesTime Limit:1000MS Memory Limit:65768KB 64bit IO Format:%I64d & %I64u SubmitStatus Description The annual Games in frogs’ kingdom started again. The most famous game is th
2016-07-26 15:39:34 319
原创 B - Cable master
B - Cable masterTime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u SubmitStatus Description Inhabitants of the Wonderland have decided to hold a regional programming contes
2016-07-26 11:36:02 558
原创 E - V
E - VTime Limit:3000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmitStatusDescriptionBecause of the wrong status of the bicycle, Sempr begin to walk east to west every morning a
2016-07-26 08:54:09 308
原创 D - IV
D - IVTime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u SubmitStatus Description 看病要排队这个是地球人都知道的常识。 不过经过细心的0068的观察,他发现了医院里排队还是有讲究的。0068所去的医院有三个医生(汗,这么少)同时看病。而看病的人病情有轻重,所
2016-07-26 00:10:00 406
原创 A - I
A - ITime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u SubmitStatus Description ACboy was kidnapped!! he miss his mother very much and is very scare now.You can’t image
2016-07-25 20:29:08 297
原创 C - Ekka Dokka
C - Ekka DokkaTime Limit:2000MS Memory Limit:32768KB 64bit IO Format:%lld & %llu SubmitStatus Description Ekka and his friend Dokka decided to buy a cake. They both love cakes and that’s why
2016-07-24 22:48:19 586
原创 R - Answering Queries
R - Answering QueriesTime Limit:3000MS Memory Limit:32768KB 64bit IO Format:%lld & %llu SubmitStatus Description The problem you need to solve here is pretty simple. You are give a function
2016-07-24 21:36:42 292
原创 L - New Skateboard
L - New SkateboardTime Limit:1000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u SubmitStatus Description Max wants to buy a new skateboard. He has calculated the amount of money that
2016-07-24 17:58:57 344
原创 E - Internet Service Providers
E - Internet Service ProvidersTime Limit:2000MS Memory Limit:32768KB 64bit IO Format:%lld & %llu SubmitStatus Description A group of N Internet Service Provider companies (ISPs) use a privat
2016-07-24 15:57:19 399
原创 I - Jam's math problem
I - Jam’s math problemTime Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u SubmitStatus Description Jam has a math problem. He just learned factorization. He is trying to f
2016-07-24 15:08:54 301
原创 HDU-5363 Key Set 【快速幂取模+递推】
A - ATime Limit:1000MS Memory Limit:131072KB 64bit IO Format:%I64d & %I64u SubmitStatus Description soda has a set S with n integers {1, 2, \dots, n}. A set is called key set if the sum of i
2016-07-23 14:49:20 513 1
原创 C - C
C - CTime Limit:1000MS Memory Limit:30000KB 64bit IO Format:%lld & %llu SubmitStatus Description People are different. Some secretly read magazines full of interesting girls’ pictures, other
2016-07-23 14:19:48 1421 2
原创 E - E
E - ETime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u SubmitStatus Description Given a positive integer N, you should output the most right digit of N^N. Input The input
2016-07-23 13:58:25 357
原创 D - D
D - DTime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u SubmitStatus Description 求A^B的最后三位数表示的整数。 说明:A^B的含义是“A的B次方” Input 输入数据包含多个测试实例,每个实例占一行,由两个正整数A和B组成(1<=A,B<=10000)
2016-07-23 13:49:02 107684
原创 B - B
B - BTime Limit:1000MS Memory Limit:65536KB 64bit IO Format:%lld & %llu SubmitStatus Description Fermat’s theorem states that for any prime number p and for any integer a > 1, ap = a (mod p)
2016-07-23 13:29:26 306
原创 E - Doing Homework again hd 1789
E - Doing Homework againTime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u SubmitStatus Description zichen has just come back school from the 30th ACM/ ICPC. Now he has a l
2016-07-23 11:11:30 364
原创 F - TIANKENG’s restaurant hd 4886
F - TIANKENG’s restaurantTime Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u SubmitStatus Description TIANKENG manages a restaurant after graduating from ZCMU, and tens of t
2016-07-23 00:31:09 348
原创 文章标题
J - *汉诺塔VII Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u SubmitStatus Description n个盘子的汉诺塔问题的最少移动次数是2^n-1,即在移动过程中会产生2^n个系列。由于发生错移产生的系列就增加了,这种错误是放错了柱子,并不会把大盘放到小盘上,即各柱
2016-07-21 21:44:10 209
原创 L - Kefa and Company
L - Kefa and CompanyTime Limit:2000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u SubmitStatus Description Kefa wants to celebrate his first big salary by going to restaurant. Howeve
2016-07-21 21:39:36 254
原创 K - Spongebob and Joke
K - Spongebob and JokeTime Limit:2000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u SubmitStatus Description While Patrick was gone shopping, Spongebob decided to play a little trick
2016-07-21 21:38:44 246
原创 J - HDD is Outdated Technology
J - HDD is Outdated TechnologyTime Limit:1000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u SubmitStatus Description HDD hard drives group data by sectors. All files are split to fra
2016-07-21 21:37:39 306
原创 I - Restaurant
I - RestaurantTime Limit:4000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u SubmitStatus Description A restaurant received n orders for the rental. Each rental order reserve the rest
2016-07-21 21:36:42 238
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人