自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(41)
  • 收藏
  • 关注

原创 E - Ubiquitous Religions(8.4.4)

E - Ubiquitous Religions(8.4.4)Time Limit:5000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64uSubmit StatusDescriptionThere are so many different religions in the worl

2014-07-31 10:50:30 499

原创 C - Wireless Network(8.4.2)

C - Wireless Network(8.4.2)Time Limit:10000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64uSubmit StatusDescription

2014-07-31 10:40:55 416

原创 UVA-10585 War(8.4.3)

D - War(8.4.3)Time Limit:3000MS     Memory Limit:0KB     64bit IO Format:%lld & %lluSubmit StatusDescription  A war is being lead between two countries, A and B. As a loyal citiz

2014-07-31 10:23:50 666

原创 B - Friends(8.4.1)

B - Friends(8.4.1)Time Limit:3000MS     Memory Limit:0KB     64bit IO Format:%lld & %lluSubmit StatusDescription

2014-07-30 19:53:21 449

原创 poj-3349 Snowflake Snow Snowflakes

A - Snowflake Snow SnowflakesTime Limit:4000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64uSubmit StatusDescriptionYou may have heard that no two snowflakes are ali

2014-07-30 09:48:05 514

原创 C - KMP模式匹配 三(串)

C - KMP模式匹配 三(串)Time Limit:1000MS     Memory Limit:131072KB     64bit IO Format:%lld & %lluSubmit StatusDescription

2014-07-29 10:55:10 681

原创 B - KMP模式匹配 二(串)

B - KMP模式匹配 二(串)Time Limit:1000MS     Memory Limit:131072KB     64bit IO Format:%lld & %lluSubmit StatusDescription

2014-07-29 10:50:14 945

原创 A - KMP模式匹配 一(串)

A - KMP模式匹配 一(串)Time Limit:1000MS     Memory Limit:131072KB     64bit IO Format:%lld & %lluSubmit StatusDescription求子串的next值,用next数组存放,全部输出Input输入一个字符串

2014-07-29 10:42:19 687

原创 A - Nearest Common Ancestors(8.1.1)

Nearest Common AncestorsTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 17636 Accepted: 9341DescriptionA rooted tree is a well-known data structure in c

2014-07-27 20:21:22 384

原创 E -What's Cryptanalysis?

Cryptanalysis is the process of breaking someone else's cryptographic writing. This sometimes involves some kind of statistical analysis of a passage of (encrypted) text. Your task is to write a pro

2014-07-25 17:45:55 875

原创 D - Factoring a Polynomial

D - Factoring a PolynomialTime Limit:2000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64uSubmit StatusDescriptionRecently Georgie has learned about polynomials. A po

2014-07-25 11:19:38 751

原创 C - Maya Calendar

C - Maya CalendarTime Limit:1000MS     Memory Limit:10000KB     64bit IO Format:%I64d & %I64uSubmit StatusDescriptionDuring his last sabbatical, professor M. A. Ya made a surpris

2014-07-25 10:16:25 562

原创 poj3750-小孩报数

小孩报数问题Time Limit: 1000MS Memory Limit: 65536KTotal Submissions: 9940 Accepted: 4626Description有N个小孩围成一圈,给他们从1开始依次编号,现指定从第W个开始报数,报到第S个时,该小孩出列,然后从下一个小孩开始报数,仍是报到S个

2014-07-23 18:43:34 780

原创 D - A Stack or A Queue?

DescriptionDo you know stack and queue? They're both important data structures. A stack is a "first in last out" (FILO) data structure and a queue is a "first in first out" (FIFO) one.  Here com

2014-07-23 15:49:25 500

原创 A - Hardwood Species(7.1.1)(利用STL中自带的排序功能编程的实验范例)

DescriptionHardwoods are the botanical group of trees that have broad leaves, produce a fruit or nut, and generally go dormant in the winter.America's temperate climates produce forests with h

2014-07-23 08:57:00 556

原创 C - Ultra-QuickSort(7.2.2)(7.2应用排序算法编程的实验范例)

DescriptionIn this problem, you have to analyze a particular sorting algorithm. The algorithm processes a sequence of n distinct integers by swapping two adjacent sequence elements until the seq

2014-07-23 08:53:33 645

原创 A - Babelfish(6.1.2)(6.1使用词典解题实验范例)

SubmitStatusDescriptionYou have just moved from Waterloo to a big city. The people here speak an incomprehensible dialect of a foreign language. Fortunately, you have a dictionary to help yo

2014-07-22 15:41:57 489

原创 C - Modular multiplication of polynomials

DescriptionConsider polynomials whose coefficients are 0 and 1. Addition of two polynomials is achieved by 'adding' the coefficients for the corresponding powers in the polynomials. The addition o

2014-07-20 17:29:30 685 1

原创 Oulipo

DescriptionThe French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter'e'. He was a member of the Oulipo group. A quote from the book:Tout avait Pair

2014-07-20 15:26:48 472

原创 Blue Jeans

DescriptionThe Genographic Project is a research partnership between IBM and The National Geographic Society that is analyzing DNA from hundreds of thousands of contributors to map how the Earth w

2014-07-20 13:47:00 461

原创 C - Sum of Consecutive Prime Numbers(1.2.2)

//先打素数的表#include #include using namespace std;const int maxp=200,n=10000;int prime[maxp],total=0;bool isprime(int n1){    int k;    for(int i=0;i    {        if(n1%prime[i]==0)

2014-07-17 18:18:33 518

原创 A - Sum(1.5.1)

DescriptionYour task is to find the sum of all integer numberslying between 1 andN inclusive.InputThe input consists of a single integer N that isnot greater than 10000 by it's

2014-07-17 15:06:08 431

原创 J - MANAGER(2.4.5)

DescriptionOne of the programming paradigm in parallel processing is the producer/consumer paradigm that can be implemented using a system with a "manager" process and several "client" processes.

2014-07-17 14:56:55 468

原创 A - Calendar

DescriptionA calendar is a system for measuring time, from hours and minutes, to months and days, and finally to years and centuries. The terms of hour, day, month, year and century are all units

2014-07-16 19:36:30 1682

原创 B - Adding Reversed Numbers

DescriptionThe Antique Comedians of Malidinesia prefer comedies to tragedies. Unfortunately, most of the ancient plays are tragedies. Therefore the dramatic advisor of ACM has decided to transfigure

2014-07-16 19:29:58 518

原创 C - Fractal(3.4.1)

DescriptionA fractal is an object or quantity that displays self-similarity, in a somewhat technical sense, on all scales. The object need not exhibit exactly the same structure at all scales, but

2014-07-16 10:11:46 492

原创 B - Symmetric Order(3.3.1)

DescriptionIn your job at Albatross Circus Management (yes, it's run by a bunch of clowns), you have just finished writing a program whose output is a list of names in nondescending order by lengt

2014-07-15 18:06:13 486

原创 A - Red and Black(3.2.1)

DescriptionThere 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 til

2014-07-15 16:43:02 470

原创 C - 排列(1.5.9)

Description题目描述:大家知道,给出正整数n,则1到n这n个数可以构成n!种排列,把这些排列按照从小到大的顺序(字典顺序)列出,如n=3时,列出1 2 3,1 3 2,2 1 3,2 3 1,3 1 2,3 2 1六个排列。任务描述:给出某个排列,求出这个排列的下k个排列,如果遇到最后一个排列,则下1排列为第1个排列,即排列1 2 3…n。比如:n = 3,k

2014-07-15 14:34:29 737

原创 G - Self Numbers(2.2.1)

SubmitStatusDescriptionIn 1949 the Indian mathematician D.R. Kaprekar discovered a class of numbers called self-numbers. For any positive integer n, define d(n) to be n plus the sum of the dig

2014-07-14 19:43:09 415

原创 F - Ride to School(2.1.2)

DescriptionMany graduate students of Peking University are living in Wanliu Campus, which is 4.5 kilometers from the main campus – Yanyuan. Students in Wanliu have to either take a bus or ride a b

2014-07-14 16:59:08 575

原创 I - The 3n + 1 problem(2.4.2)

DescriptionProblems in Computer Science are often classified as belonging to a certain class of problems (e.g., NP, Unsolvable, Recursive). In this problem you will be analyzing a property of an a

2014-07-14 15:44:04 494

原创 E - Speed Limit(2.1.1)

DescriptionBill and Ted are taking a road trip. But the odometer in their car is broken, so they don't know how many miles they have driven. Fortunately, Bill has a working stopwatch, so they can

2014-07-14 10:40:51 407

原创 B - Ugly Numbers(1.5.8)

#include using namespace std;int main(){    int n,p,i,m2,m3,m5;    int a[1505],t;    while(cin>>n&&n!=0)    {        m2=0;        m3=0;        m5=0;        a[0]=1;        for(i

2014-07-14 10:04:43 527

原创 D - I Think I Need a Houseboat(1.3.1)

DescriptionFred Mapper is considering purchasing some land in Louisiana to build his house on. In the process of investigating the land, he learned that the state of Louisiana is actually shrinkin

2014-07-13 20:40:48 424

原创 E - Hangover(1.4.1)

DescriptionHow far can you make a stack of cards overhang a table? If you have one card, you can create a maximum overhang of half a card length. (We're assuming that the cards must be perpendic

2014-07-13 20:32:59 956

原创 F - Humidex(1.4.2)

#include #include #include using namespace std;int main(){    char M=0,N=0;    while(cin>>M && M!='E')    {        float m=0,n=0;        cin>>m>>N>>n;        if((M=='T' && N=='D'

2014-07-13 20:28:09 384

原创 G - Specialized Four-Digit Numbers(1.5.2)

DescriptionFind and list all four-digit numbers in decimal notation that have the property that the sum of its four digits equals the sum of its digits when represented in hexadecimal (base 16) no

2014-07-13 20:23:50 501

原创 H - Quicksum(1.5.3)

DescriptionA checksum is an algorithm that scans a packet of data and returns a single number. The idea is that if the packet is changed, the checksum will also change, so checksums are often us

2014-07-13 20:07:59 362

原创 I - Dirichlet's Theorem on Arithmetic Progressions(1.5.5)

#include #include using namespace std;bool prime(int n){    int i;    double m;    m=sqrt(double(n)); if(n==1)  return 0;    for(i=2;i {        if(n%i==0) break; }    if(i>m)

2014-07-13 20:03:50 404

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

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