题目如下:
Problem A
The Most Distant State
Input: standard input
Output: standard output
The 8-puzzle is a square tray inwhich eight square tiles are placed. The remaining ninth square is uncove...
分类:
其他好文 时间:
2014-09-07 13:35:55
阅读次数:
284
Given an undirected weighted graph G , you should find one of spanning trees specified as follows.
The graph G is an ordered pair (V, E) , where V is a set of vertices {v1, v2,..., vn} and E is
a...
分类:
其他好文 时间:
2014-09-06 22:36:34
阅读次数:
358
250:乱搞解题代码: 1 // BEGIN CUT HERE 2 /* 3 4 */ 5 // END CUT HERE 6 #line 7 "RunningAroundPark.cpp" 7 #include 8 #include 9 #include 10 #include 11 #in...
分类:
其他好文 时间:
2014-09-06 22:31:04
阅读次数:
377
步骤:// 在内存中构造一幅图片BufferedImage img = new BufferedImage(80, 30, BufferedImage.TYPE_INT_RGB);// 获得在图中的画笔Graphics graph = img.getGraphics()...
分类:
其他好文 时间:
2014-09-06 09:40:32
阅读次数:
185
SRM 632 Div.2 (58/688): 这场是除了我第一场之外最简单的一场了,前两道太简单,一下就秒了。最后一题复杂度很微妙,感觉深搜会超时,结果貌似没超...看了一下别人的代码,觉得那些用map的人的代码很好,也学着写了一下。现在感觉map真是太有用了。 1 // BEGIN CUT...
分类:
其他好文 时间:
2014-09-05 22:19:02
阅读次数:
253
OGNL:object-graph navigation language 类似EL表达式,但是有自己的优点:“.”作为操作符,例如user.getName()可以这样写:user.name,OGNL主要有3个符号:# % $struts2的标签共分为五大类:一、逻辑控制标签1)条件标签:用于执行基...
分类:
其他好文 时间:
2014-09-05 19:42:51
阅读次数:
320
|是shift+\打出的字符用法:命令1+【选项】+【参数】|命令2+【选项】|命令3+【选项】...作用:|后命令的参数是前一个命令的运行结果。举例:echo"1234"|cut-b2,第一个命令的运行结果为字符串1234,第二个命令要前切出第一个命令结果的第二个字符,显示结果是2。错误举例:1234|..
分类:
其他好文 时间:
2014-09-05 18:26:01
阅读次数:
194
一、作用:可对文本的每一行进行操作,获取想要的结果。二、选项:1、cut-d:-f1file1,对于file1进行cut,以:为分隔,取每行的第1个字段,有-d必有-f;2、cut-b3file1,对于file1进行cut,取每行的第3个字节如file1的内容为“abc”,则此命令后输出c。若file1的内容为“星期一..
分类:
其他好文 时间:
2014-09-05 18:25:22
阅读次数:
292
shell编程中的字符串的截取方法:
一、Gnu Linux shell 截取字符变量的前8位,有方法如下:
1.expr substr “$a” 1 8
2.echo $a|awk ‘{print substr(,1,8)}’
3.echo $a|cut -c1-8
4.echo $
5.expr $a : ‘\(.\\).*’
6.echo $a|dd bs=1 count=8 ...
分类:
其他好文 时间:
2014-09-05 18:23:01
阅读次数:
214
cut是一个选取命令,就是将一段数据经过分析,取出我们想要的。一般来说,选取信息通常是针对“行”来进行分析的,并不是整篇信息分析的。(1)其语法格式为:cut [-bn] [file] 或 cut [-c] [file] 或 cut [-df] [file]使用说明cut 命令从文件的每一行剪切字节...
分类:
其他好文 时间:
2014-09-05 02:09:20
阅读次数:
294