题目:
In how many ways can you tile a 2xn rectangle by 2x1 or 2x2 tiles?
Here is a sample tiling of a 2x17 rectangle.
代码:
import java.io.*;
import java.math.*;
import java.util.*;
import j...
分类:
其他好文 时间:
2015-01-18 09:24:00
阅读次数:
244
最近在搞whenever时看到可以用cron语法设置定时任务。所以研究了下cron 语法。every '0 0 27-31 * *' do command "echo 'you can use raw cron syntax too'"endcron命令,用于设置周期性被执行的指令。格式# 文件格....
分类:
其他好文 时间:
2015-01-17 17:45:25
阅读次数:
188
Description Pass a year learning in Hangzhou, yifenfei arrival hometown Ningbo at finally. Leave Ningbo one year, yifenfei have many people to meet...
分类:
其他好文 时间:
2015-01-16 23:46:04
阅读次数:
185
Follow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and empty space i...
分类:
其他好文 时间:
2015-01-16 23:38:32
阅读次数:
178
many-to-many这是映射关系中最不大好解决的问题。以前没大用过,由于业务需求昨天用了一下,出了bug,bug描述如下:user和role属于多对多的关系,当为user添加岗位role时,死活添加不进去roles这个属性,而其他的属性都能添加成功。查看后台自动生成显示的数据库操作语句只有:i..
分类:
其他好文 时间:
2015-01-16 17:12:09
阅读次数:
121
题目大意:
问去除关系网中的一个点,使得从1到n的路径最长,输出最长路径。若可以使得1到n不通,输出Inf。
解题思路:
枚举去除的点,计算1->n的最短路径。因为数据范围实在太小,直接弗洛伊德乱搞。...
分类:
其他好文 时间:
2015-01-16 16:46:56
阅读次数:
170
Wormholes
Time Limit: 2000MS
Memory Limit: 65536K
Total Submissions: 32393
Accepted: 11771
Description
While exploring his many farms, Farmer John has discovered...
分类:
编程语言 时间:
2015-01-16 13:07:27
阅读次数:
320
Follow up for "Unique Paths":
Now consider if some obstacles are added to the grids. How many unique paths would there be?
An obstacle and empty space is marked as 1 and 0 respectively
in the ...
分类:
其他好文 时间:
2015-01-15 23:54:55
阅读次数:
206
Problem E: How many 0's?A Benedict monk No. 16 writes down the decimal representations of all natural numbers between and includingmandn,m≤n. How many...
分类:
其他好文 时间:
2015-01-15 23:30:26
阅读次数:
216
1、在导入数据前执行以下命令即可:set SESSION sql_mode='';通过设置sql_mode变量更改模式。linux下安装完mysql后,默认的sql-mode值是空,在这种情形下mysql执行的是一种不严格的检查,例如日期字段可以插入’0000-00-00 00:00:00’这样的值...
分类:
其他好文 时间:
2015-01-15 12:34:58
阅读次数:
210