- 博客(14)
- 收藏
- 关注
原创 HDU 1160
#include #include #define maxn 1001typedef struct{ int num;//老鼠的编号 int w,v;//w体重 v速度}Mouse;int cmp(const void *a,const void *b);int print(int max_l);int f[1001],p[1001];Mouse mice[1001];in
2013-10-18 21:19:41
442
原创 Code:KMP
#include #include void KMP(char S[],char T[],int next[]);void GetNext(char T[],int next[]);int main(void){ char S[100],T[100]; int next[100]; fgets(S,100,stdin);//fgets读取回车符,在计算长度时需要减1 fge
2013-09-14 19:38:17
375
原创 求任意多边形的面积
#include #include int main(void){ int n; while(scanf("%d",&n) != EOF) { if(n==0) break; int i; double area,x[101],y[101]; area = 0; for(i=0;i<n;i++) scanf("%lf%lf",&x[i],&y[i]);
2013-06-03 22:34:45
1098
转载 常见OJ评判结果对照表
Waiting:你的程序刚刚提交,正在等待OJ评测你的程序。 Compiling:OJ正在编译你的程序。 Accepted:OK!你的程序是正确的 ^_^。 Wrong Answer:你的程序运行的结果和正确结果不同。状态页面CASE那一览显示的是你的程序在第几个样例上出错的。 Time Limit Exceeded:你的程序运行时间太长了,超过了对应题目的时间限制
2013-04-28 10:51:17
530
转载 457 - Linear Cellular Automata(就这样懒惰的转了吧)
觉得写得蛮好的 http://www.cnblogs.com/sineatos/archive/2013/02/06/2908165.html
2013-04-27 19:22:17
606
转载 各大OJ...平台
1. TOJ : Linux系统 2. ZOJ : Linux系统 3. POJ : Win系统,语言如选择C/C++,则用MS编译器[支持两种声明],如选择GCC/G++,则为MinGW 4. UVa : Linux系统 5. Ural: Win系统,MS编译器[支持两种声明] 6. SPOJ: Linux系统 7. SGU : Win系统,MS编译器[支持两种声明]
2013-04-23 21:17:54
695
原创 694 - The Collatz Sequence
The Collatz Sequence An algorithm given by Lothar Collatz produces sequences of integers, and is described as follows:Step 1: Choose an arbitrary positive integer A as the first item i
2013-04-23 21:13:25
459
原创 489 - Hangman Judge
Hangman Judge In ``Hangman Judge,'' you are to write a program that judges a series of Hangman games. For each game, the answer to the puzzle is given as well as the guesses. Rules are the
2013-04-22 16:37:27
405
原创 insertion_sort
看了算法导论后写的一个关于插入排序的程序,有缺点的地方欢迎指正#include #include #define MAX 100void INSERTION_SORT(int A[],int len);int main(void){ int len=0,A[MAX]; while(scanf("%d",&A[len]) != EOF)
2013-03-30 22:45:38
484
原创 488 - Triangle Wave
Triangle Wave In this problem you are to generate a triangular wave form according to a specified pair ofAmplitude and Frequency.Input and OutputThe input begins with a single positive integer
2013-03-29 15:37:40
473
原创 445 - Marvelous Mazes
Marvelous Mazes Your mission, if you decide to accept it, is to create a mazedrawing program. A maze will consist of the alphabeticcharactersA-Z, * (asterisk), and spaces.Input and O
2013-03-28 21:15:58
459
原创 490 - Rotating Sentences
Rotating Sentences In ``Rotating Sentences,'' you are asked to rotate a series of input sentences 90 degrees clockwise.So instead of displaying the input sentences from left to right and t
2013-03-27 15:50:09
744
原创 414 - Machined Surfaces
Machined Surfaces An imaging device furnishes digital images of two machined surfaces thateventually will be assembled in contact with each other. The roughness of thisfinal contact is to
2013-03-26 17:24:07
474
原创 494 - Kindergarten Counting Game
Kindergarten Counting Game Everybody sit down in a circle. Ok. Listen to me carefully.``Woooooo, you scwewy wabbit!''Now, could someone tell me how many words I just said?Input and OutputInp
2013-03-22 22:33:05
362
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人