hdu1698

maksyuki 发表于 oj 分类,标签:
0

Just a Hook

Problem Description

In the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of the heroes. The hook is made up of several consecutive metallic sticks which are of the same length. 阅读全文 »

hdu1671

maksyuki 发表于 oj 分类,标签:
0

Phone List

Problem Description

Given a list of phone numbers, determine if it is consistent in the sense that no number is the prefix of another. Let’s say the phone 阅读全文 »

hdu1576

maksyuki 发表于 oj 分类,标签:
0

A/B

Problem Description

要求(A/B)%9973,但由于A很大,我们只给出n(n=A%9973)(我们给 阅读全文 »

hdu1573

maksyuki 发表于 oj 分类,标签:
0

X问题

Problem Description

求在小于等于N的正整数中有多少个X满足:X mod a[0] = b[0], X mod a[1] = b[1], X mod a[2] = b[2], …, X mod a[i] = b[i], … (0 < a[i] <= 10)。

Input

输入数据的第一行为一个正整数T,表示有T组测试数据。每组测试 阅读全文 »

hdu1421

maksyuki 发表于 oj 分类,标签: ,
0

搬寝室

Problem Description

搬寝室是很累的,xhd深有体会.时间追述2006年7月9号,那天xhd迫于无奈要从27号楼搬到3号楼,因为10号要封楼了.看着寝室里的n件物品,xhd开始发呆,因为n是一个小于2000的整数,实在是太多了,于是xhd决定随便搬2*k件过去就行了.但还是会很累,因为2*k也不小是一个不大于n的整数.幸运的是xhd根据多年的搬东西的经验发现每搬一次的疲劳度是和左右手的物品的重量差的平方成正比 阅读全文 »

hdu1395

maksyuki 发表于 oj 分类,标签: ,
0

2^x mod n = 1

Problem Description

Give a number n, find the minimum x(x>0) that satisfies 2^x mod n = 1. 阅读全文 »

hdu1251

maksyuki 发表于 oj 分类,标签:
0

统计难题

Problem Description

Ignatius最近遇到一个难题,老师交给他很多单词(只有小写字母组成,不会有重复的单词出现),现在老师要他统计出以某个字符串为前缀的单词数量 阅读全文 »

hdu1240

maksyuki 发表于 oj 分类,标签:
0

Asteroids!

Problem Description

You're in space. 阅读全文 »

hdu1238

maksyuki 发表于 oj 分类,标签:
0

Substrings

Problem Description

You are given a number of case-sensitive strings of alphabetic characters, 阅读全文 »

hdu1232

maksyuki 发表于 oj 分类,标签:
0

畅通工程

Problem Description

某省调查城镇交通状况,得到现有城镇道路统计表,表中列出了每条道路直接连通的城镇。省政府“畅通工程”的目标是使全省任何两个城镇间都可以实现交通 阅读全文 »

hdu1166

maksyuki 发表于 oj 分类,标签:
0

敌兵布阵

Problem Description

C国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务 阅读全文 »

hdu1164

maksyuki 发表于 oj 分类,标签:
0

Eddy's research I

Problem Description

Eddy's interest is very extensive, recently he is interested in prime number. Eddy discover the all number owned can be divided into the multiply of prime number, but he can't write program, so Eddy has to ask intelligent you to help him, he asks you to write a program which can do the number to divided into the multiply of prime number factor .

Input

The input will contain a number 1 < x<= 65535 per line representing the number of elements of the set.

Output

You have to print a line in the output for each entry with the answer to the previous question.

Sample Input

11

9412

Sample Output

112*2*13*181

Author

eddy

 

题目类型:整数素因子分解

算法分析:由于被分解的整数比较小,所以可以使用试除法进行整数分解

 

hdu1160

maksyuki 发表于 oj 分类,标签: ,
0

FatMouse's Speed

Problem Description

FatMouse believes that the fatter a mouse is, the faster it runs. To disprove 阅读全文 »

hdu1159

maksyuki 发表于 oj 分类,标签:
0

Common Subsequence

Problem Description

A subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = <x1, x2, ..., xm> another sequence Z = <z1, z2, ..., zk> is a subsequence of X if there exists a strictly increasing sequence <i1, i2, ..., ik> of indices of X such that for all j = 1,2,...,k, xij = zj. For example, Z = <a, b, f, c> is a subsequence of X = <a, b, c, f, b, c> with index sequence <1, 2, 4, 6>. Given two sequences X and Y the problem is to find the length of the maximum-length common subsequence of X and Y.
The program input is from a text file. Each data set in the file contains two strings representing the given sequences. The sequences are separated by any number of white spaces. The input data are correct. For each set of data the program prints on the standard output the length of the maximum-length common subsequence from the beginning of a separate line.

Sample Input

abcfbc abfcab

programming contest

abcd mnp

Sample Output

4

2

0

Source

Southeastern Europe 2003

Recommend

Ignatius

 

题目类型:线性DP

算法分析:最长公共子序列的模板题,直接求解即可

 

hdu1114

maksyuki 发表于 oj 分类,标签:
0

Piggy-Bank

Problem Description

Before ACM can do anything, a budget must be prepared and the 阅读全文 »

hdu1087

maksyuki 发表于 oj 分类,标签:
0

Super Jumping! Jumping! Jumping!

Problem Description

Nowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU. Maybe you are a good boy, and know little about this game, so I introduce it to you now. 阅读全文 »