[ 问题: ]
Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string.
If the last word does not exist, return 0.
[...
分类:
其他好文 时间:
2014-07-22 23:01:35
阅读次数:
331
表
a = { }
b = { x = 1, ["hello, "] = "world!" }
a.astring = "ni, hao!"
a[1] = 100
a["a table"] = b
function foo()
end
function bar()
end
a[foo] = bar
--分别穷举表a和b
for k, v in pairs(a) do
print(k, "=>",...
分类:
其他好文 时间:
2014-07-22 23:00:33
阅读次数:
261
Sudoku
Time Limit: 2000MS
Memory Limit: 65536K
Total Submissions: 13023
Accepted: 6455
Special Judge
Description
Sudoku is a very simple task. A square table with 9...
分类:
其他好文 时间:
2014-05-03 00:31:30
阅读次数:
400
【题目】
Problem E
Open Credit System
Input: Standard Input
Output: Standard Output
In an open credit system, the students can choose any course they like, but there is a problem. Some of the stude...
分类:
其他好文 时间:
2014-05-03 00:22:50
阅读次数:
380
Problem I
Automatic Poetry
Input: standard input
Output: standard output
Time Limit: 2 seconds
Memory Limit: 32 MB
“Oh God”, Lara Croft exclaims, “it’s one of these dumb rid...
分类:
其他好文 时间:
2014-05-02 22:51:52
阅读次数:
352
Problem
A Communist regime is trying to redistribute wealth in a village. They have have decided to sit everyone around a circular table. First, everyone has converted all of their properties to co...
分类:
其他好文 时间:
2014-05-02 10:30:59
阅读次数:
375
SELECT*FROM表名称LIMITM,N
。其中的m表示从第几条开始,0表示第一条;n表示一共显示几条。mysql_num_rows:取得结果行的数目。table中奇数行变色或偶数行变色:tr:nth_child(odd或even){里面写入颜色};其中odd表示奇数行,even表示偶数行。
分类:
数据库 时间:
2014-05-02 09:17:24
阅读次数:
330
/**
* java 边界布局
* @author gao
*/
package com.gao;
import java.awt.BorderLayout;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.Empty...
分类:
编程语言 时间:
2014-05-01 18:32:35
阅读次数:
370
会PHP的人都知道PHP中的print_r/var_export函数,可以方便的用于打印数组或导出变量,Lua中没有提供,实际应用中却是很多时候需要类似的功能。
今天便封装了个简单函数,实现类似功能,用来打印/导出table:...
分类:
Web程序 时间:
2014-04-30 22:22:39
阅读次数:
392