- 博客(19)
- 收藏
- 关注
原创 URAL1573 Alchemy
1573. AlchemyTime limit: 1.0 secondMemory limit: 64 MBLich Sandro recently became an expert in alchemy and is very glad because of it. Sure enough, because this skill allows to mix simpl
2017-01-24 00:01:07 363
原创 HDU1087Super Jumping! Jumping! Jumping!
http://acm.hdu.edu.cn/showproblem.php?pid=1087Problem DescriptionNowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU. Maybe you are a good boy
2017-01-23 23:50:09 183
原创 POJ1284 Primitive Roots
http://poj.org/problem?id=1284DescriptionWe say that integer x, 0 i mod p) | 1 <= i <= p-1 } is equal to { 1, ..., p-1 }. For example, the consecutive powers of 3 modulo 7 are 3, 2, 6, 4
2017-01-23 23:47:18 240
原创 POJ2773 Happy
http://poj.org/problem?id=2773DescriptionTwo positive integers are said to be relatively prime to each other if the Great Common Divisor (GCD) is 1. For instance, 1, 3, 5, 7, 9...are all
2017-01-23 23:45:33 209
原创 HDU1061Rightmost Digit
http://acm.hdu.edu.cn/showproblem.php?pid=1061Problem DescriptionGiven a positive integer N, you should output the most right digit of N^N. InputThe input contains severa
2017-01-23 23:44:15 261
原创 求n!中某个因子个数【模板】
Problem B: Zhazhahe究竟有多二DescriptionZhazhahe竟然能二到把耳机扔到洗衣机里去洗,真的是二到了一种程度,现在我们需要判断一下zhazhahe二的程度(就是计算zhazhahe的脑残值有几个2的因子),下面给你一个n,n!表示zhazhahe的脑残值。Input输入一个正整数t(0表示样例组数,每组样例输入一个正整
2017-01-23 23:33:12 518
原创 POJ1502MPI Maelstrom 【Dijkstra】
http://poj.org/problem?id=1502DescriptionBIT has recently taken delivery of their new supercomputer, a 32 processor Apollo Odyssey distributed shared memory machine with a hierarchical c
2017-01-23 23:31:05 246
原创 HDU2095find your present (2)
http://acm.hdu.edu.cn/showproblem.php?pid=2095Problem DescriptionIn the new year party, everybody will get a "special present".Now it's your turn to get your special present, a lot of pr
2017-01-23 23:27:13 183
原创 HDU3037Saving Beans 【组合数取模,即,LUCAS定理模板】
http://acm.hdu.edu.cn/showproblem.php?pid=3037Problem DescriptionAlthough winter is far away, squirrels have to work day and night to save beans. They need plenty of food to get th
2017-01-23 20:53:58 317
原创 POJ - 2387Til the Cows Come Home
http://poj.org/problem?id=2387DescriptionBessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes her for the morning milkin
2017-01-23 20:51:11 214
原创 POJ 2240Arbitrage
http://poj.org/problem?id=2240DescriptionArbitrage is the use of discrepancies in currency exchange rates to transform one unit of a currency into more than one unit of the same currency
2017-01-23 20:48:31 219
原创 POJ1860 Currency Exchange【bellman-Ford算法】
http://poj.org/problem?id=1860DescriptionSeveral currency exchange points are working in our city. Let us suppose that each point specializes in two particular currencies and performs ex
2017-01-23 20:45:15 296
原创 HDU2051&2031【进制转换】
http://acm.hdu.edu.cn/showproblem.php?pid=2051Problem DescriptionGive you a number on base ten,you should output it on base two.(0 InputFor each case there is a postive
2017-01-23 20:42:13 242
原创 POJ 1125Stockbroker Grapevine 【最短路】
http://poj.org/problem?id=1125POJ - 1125 Stockbroker GrapevineDescriptionStockbrokers are known to overreact to rumours. You have been contracted to develop a method of spreading
2017-01-23 20:28:11 264
原创 POJ 1061青蛙的约会【扩展欧几里德算法】
http://poj.org/problem?id=1061 A - 青蛙的约会 POJ - 1061 #include#includeusing namespace std;long long x,y,q;long long X,Y,M,N,L;void exgcd(long long a,long long b){ if(b==0)
2017-01-23 20:16:25 360
原创 最小生成树 ∷相关函数:MiniSpanTree_PRIM函数
#include /* INT_MAX等 */#include /* EOF(=^Z或F6),NULL */#include /* floor(),ceil(),abs() */#define TRUE 1#define FALSE 0#define OK 1#define ERROR 0typedef int Status; /* Status是函数的类型,其值是函数结果状态代码,
2017-01-18 16:18:24 1484
原创 最短路径∷相关函数:ShortestPath_DIJ函数
#include /* INT_MAX等 */#include /* EOF(=^Z或F6),NULL */#define TRUE 1#define FALSE 0#define OK 1#define ERROR 0typedef int Status; /* Status是函数的类型,其值是函数结果状态代码,如OK等 */#define MAX_NAME 5 /* 顶点字符串的
2017-01-18 16:16:59 1888
原创 每一对顶点之间的最短路径【Floyd】
#define MAX_NAME 5 /* 顶点字符串的最大长度+1 */#define MAX_INFO 20 /* 相关信息字符串的最大长度+1 */typedef int VRType;typedef char VertexType[MAX_NAME];typedef char InfoType;#include /* INT_MAX等 */#include /* EOF(=^Z
2017-01-18 16:15:45 580
原创 【学习】八大排序
复习:大神的博客 #include"stdio.h"#include"stdlib.h"#define Max 100typedef struct{ //定义记录类型 int key; //关键字项}RecType;typedef RecType SeqList[Max+1]; //SeqLi...
2017-01-17 18:39:34 440
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人