摘要:由于题目是相机拍摄的,难免不清楚。Problem A#include <stdio.h> int val[1001];
void Bubble_Sort(int a[],int n)
{ int i,j,tmp; for(i = 0;i < n;i++) { for(j = i + 1;j < n;j++) if(a[i] > a[j]) tmp = a[i],a[i] = a[j],a[j] = tmp; }
}
int main()
{ int tmp; int cnt = 0; int i,...
阅读全文
摘要:原题地址http://poj.org/problem?id=3852String LDTime Limit:1000MSMemory Limit:65536KDescriptionStringld (left delete) is a function that gets a string and deletes its leftmost character (for instance Stringld(“acm”) returns “cm”).You are given a list of distinct words, and at each step, we apply stringld
阅读全文
摘要:http://poj.org/problem?id=3095简单字符串模拟Linear PachinkoTime Limit:1000MSMemory Limit:65536KDescriptionThis problem is inspired byPachinko, a popular game in Japan. A traditional Pachinko machine is a cross between a vertical pinball machine and a slot machine. The player launches small steel balls to t
阅读全文
摘要:http://poj.org/problem?id=3157Java vs C++Time Limit:2000MSMemory Limit:65536KDescriptionApologists of Java and C++ can argue for hours proving each other that their programming language is the best one. Java people will tell that their programs are clearer and less prone to errors, while C++ people
阅读全文
摘要:http://poj.org/problem?id=2993学会了用strtok()函数分割字符串Emag eht htiw Em PlehTime Limit:1000MSMemory Limit:65536KDescriptionThis problem is a reverse case of theproblem 2996. You are given the output of the problem H and your task is to find the corresponding input.Inputaccording to output ofproblem 2996.O
阅读全文
摘要:字符串模拟排序http://poj.org/problem?id=2996Help Me with the GameTime Limit:1000MSMemory Limit:65536KDescriptionYour task is to read a picture of a chessboard position and print it in the chess notation.InputThe input consists of an ASCII-art picture of a chessboard with chess pieces on positions described
阅读全文
摘要:http://poj.org/problem?id=3652Persistent BitsTime Limit:1000MSMemory Limit:65536KDescriptionWhatNext Software creates sequence generators that they hope will produce fairly random sequences of 16-bit unsigned integers in the range 0–65535. In general a sequence is specified by integersA,B,C, andS, w
阅读全文
摘要:http://poj.org/problem?id=1051P,MTHBGWBTime Limit:1000MSMemory Limit:10000KTotal Submissions:5088Accepted:2924DescriptionMorse code represents characters as variable length sequences of dots and dashes. In practice, characters in a message are delimited by short pauses. The following table shows the
阅读全文