A. Little Pony and Crystal Mine题意:输出一个类似于十字形的东西题解:直接打印即可。。。代码: 1 var n,i,j:longint; 2 begin 3 readln(n); 4 for i:=1 to n>>1 do 5 begin 6 f...
分类:
其他好文 时间:
2014-08-16 02:16:09
阅读次数:
207
学编程吧Java学习之while循环发布了,欢迎大家通过xuebiancheng8.com来访问前面分析了java的流程控制分为选择结构,循环结构,其中循环结构分为while,do...while和for循环下面来分析下循环结构中的while循环java中为什么要有while循环呢。先看一个例子现在要执行一万次i++操作..
分类:
编程语言 时间:
2014-08-16 01:06:50
阅读次数:
290
前面分析了java的流程控制分为选择结构,循环结构,其中循环结构分为while,do...while和for循环下面来分析下循环结构中的while循环java中为什么要有while循环呢。先看一个例子现在要执行一万次i++操作怎么办呢,要没有循环操作,我们就得执行写一万行i++操作。这样就浪费了大量...
分类:
编程语言 时间:
2014-08-16 00:58:09
阅读次数:
278
Problem Description:
Given a singly linked list L: L0→L1→…→Ln-1→Ln,
reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→…
You must do this in-place without altering the nodes' values.
For example,
Given...
分类:
其他好文 时间:
2014-08-15 22:34:39
阅读次数:
330
#include #include #include #include #include #include using namespace std;#define eps 1e-8#define MAXX 1000010typedef struct point{ double x; do...
分类:
其他好文 时间:
2014-08-15 22:29:19
阅读次数:
223
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=610先用线段树维护区间颜色的覆盖,然后在把区间的颜色映射到数组,再从数组统计颜色。 1 #include 2 #include 3 #include 4 #defin...
分类:
其他好文 时间:
2014-08-15 22:27:51
阅读次数:
249
linux内核和其他一些开源的代码中,经常会遇到这样的代码:do{ ...}while(0)这样的代码一看就不是一个循环,do..while表面上在这里一点意义都没有,那么为什么要这么用呢?实际上,do{...}while(0)的作用远大于美化你的代码。查了些资料,总结起来这样写主要有以下几点好处:...
分类:
其他好文 时间:
2014-08-15 17:27:29
阅读次数:
153
Problem FOrdering TasksInput: standard inputOutput: standard outputTime Limit: 1 secondMemory Limit: 32 MBJohn has n tasks to do. Unfortunately, the t...
分类:
其他好文 时间:
2014-08-15 14:34:28
阅读次数:
141
There were hundreds of or thousands of programming languages created since the invention of computer. All these languages have the same target which i...
分类:
编程语言 时间:
2014-08-15 14:08:18
阅读次数:
263
Sereja has an array a, consisting of
n integers a1,
a2,
..., an. The boy cannot sit and do nothing, he decided to study an array. Sereja took a piece of paper and wrote
out m integers l1,?l2,?.....
分类:
其他好文 时间:
2014-08-15 12:51:58
阅读次数:
233