两个人(Y和M)要在‘@’处相遇,图中有不定个‘@’;
对每个人做一遍BFS即可,然后枚举每个‘@’位置
#include "stdio.h"
#include "string.h"
#include "queue"
using namespace std;
const int inf=0x7fffffff;
const int dir[4][2]={{1,0},{-1,0},{0,1...
分类:
其他好文 时间:
2015-03-09 20:58:41
阅读次数:
151
Given two integers representing the numerator and denominator of a fraction, return the fraction in string format.If the fractional part is repeating,...
分类:
其他好文 时间:
2015-03-09 20:46:28
阅读次数:
166
以下是获取从2015年2月25到2015年3月08的日期序列的字符串java程序通过修改程序中的startday和endday就可以调整日期范围 1 String startday = "20150225"; 2 String endday = "20150308"; 3 ...
分类:
编程语言 时间:
2015-03-09 20:46:02
阅读次数:
241
String strs = null;// System.out.println("HELLO="+strs.equals("01")); //报错 System.out.println("HELLO2="+("01").equals(strs)); //返回fa...
分类:
其他好文 时间:
2015-03-09 20:36:57
阅读次数:
148
一天一段scala代码(十)
为了更好的驾驭spark,最近在学习scala语言特性,主要看《快学scala》,顺便把一些自己认为有用的代码记下来。
package examples
//特质的基本使用
trait Logger
{
def log(msg:String) //不定义,抽象方法
}
class Conso...
分类:
其他好文 时间:
2015-03-09 19:08:40
阅读次数:
129
//body是要传递的参数,格式"roleId=1&uid=2"//post的cotentType填写://"application/x-www-form-urlencoded"//soap填写:"text/xml; charset=utf-8" public static string Po...
分类:
Windows程序 时间:
2015-03-09 18:51:19
阅读次数:
4411
import java.util.UUID;
public class GeneralKey {
public static String getGeneralKey(){
UUID uuid = UUID.randomUUID();
return uuid.toString().replaceAll("-", "");
}
public static void m...
分类:
编程语言 时间:
2015-03-09 17:38:36
阅读次数:
205
目录目录
About Swift
Hello World
变量与常量
数据类型转换以及字符串String插值
数组Array和字典DictionaryAbout SwiftSwift是一门汲取了C与Objective-C的精华,用来开发iOS和OS X应用的新的编程语言(由苹果公司于2014年6月7日发布)。Swift摆脱了C语言兼容性的约束,采用安全的编程模式并且添加了现代化的特性,让编程更加容易...
分类:
编程语言 时间:
2015-03-09 17:34:03
阅读次数:
174
String hql="select js_product_warehouse.c_id,js_product_warehouse.c_product_id,js_product_warehouse.c_stock,nvl(m.sumEnterWarehouse,0),nvl(n.sumOutWarehouse,0),nvl(m.enterWarehouseDate,n.outWarehouseD...
分类:
其他好文 时间:
2015-03-09 17:33:35
阅读次数:
113
?原文网址链接:http://blog.csdn.net/xujing81/article/details/7313507 第一阶段:Java面向对象编程 1.Java基本数据类型与表达式,分支循环。? 2.String和StringBuffer的使用、正则表达式。? 3.面向对象的抽...
分类:
移动开发 时间:
2015-03-09 16:27:15
阅读次数:
181