Beyond the Sora

拖延症晚期

山东省第一届ACM省赛题——Balloons(搜索)

题目描述 Both Saya and Kudo like balloons. One day, they heard that in the central park, there will be thousands of people fly balloons to pattern...

2016-03-31 19:34:18

阅读数:407

评论数:0

山东省第一届ACM省赛题——Phone Number

题目描述 We know that if a phone number A is another phone number B’s prefix, B is not able to be called. For an example, A is 123 while B is 12345,...

2016-03-31 18:23:25

阅读数:794

评论数:0

poj2527——Polynomial Remains(多项式相除)

Description Given the polynomial  a(x) = an xn + ... + a1 x + a0, compute the remainder r(x) when a(x) is divided by xk+1. Input The input...

2016-03-31 14:02:31

阅读数:410

评论数:0

hdu3790——最短路径问题

Problem Description 给你n个点,m条无向边,每条边都有长度d和花费p,给你起点s终点t,要求输出起点到终点的最短距离及其花费,如果最短距离有多条路线,则输出花费最少的。   Input 输入n,m,点的编号是1~n,然后是m行,每行4个数 a,b,d,p,表示a和b之...

2016-03-30 16:59:20

阅读数:252

评论数:0

poj3461——Oulipo(KMP)

Description The French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e'. He was a member of the Oulipo g...

2016-03-30 15:34:29

阅读数:284

评论数:0

树2——List Leaves

Given a tree, you are supposed to list all the leaves in the order of top down, and left to right. Input Specification: Each input file contains on...

2016-03-19 19:35:58

阅读数:444

评论数:0

树1——树的同构

给定两棵树T1和T2。如果T1可以通过若干次左右孩子互换就变成T2,则我们称两棵树是“同构”的。例如图1给出的两棵树就是同构的,因为我们把其中一棵树的结点A、B、G的左右孩子互换后,就得到另外一棵树。而图2就不是同构的。 图1 图2 现给定两棵树,请你判断它们是...

2016-03-19 19:34:36

阅读数:3420

评论数:0

HDU1056 Tree Cutting(最小点覆盖)

Description Bob enjoys playing computer games, especially strategic games, but sometimes he cannot find the solution fast enough and then he is very...

2016-03-18 19:26:34

阅读数:583

评论数:0

一个筛选法求素数的函数

int p[MAXN],a[MAXN]; //p保存素数,a判断当前数是否为素数 void Primer() { int i,cnt=0,j, k; for(i=2;i<MAXN;++i) //i从2开始遍历 { if(a[i]==0) /...

2016-03-14 16:53:14

阅读数:427

评论数:0

poj1995——Raising Modulo Numbers(快速幂取余)

Description People are different. Some secretly read magazines full of interesting girls' pictures, others create an A-bomb in their cellar, others ...

2016-03-11 19:48:55

阅读数:374

评论数:0

poj2115——C Looooops(数论,解模线性方程)

DescriptionA Compiler Mystery: We are given a C-language style for loop of type for (variable = A; variable != B; variable += C)statement;I.e., a l...

2016-03-09 20:13:19

阅读数:381

评论数:0

提示
确定要删除当前文章?
取消 删除
关闭
关闭