题目连接:点击打开链接
解题思路:
暴力
完整代码:
#include
#include
#include
#include
#include
using namespace std;
const int INF = 1000000000;
string s;
int main()
{
#ifdef DoubleQ
freopen("in.txt" , "...
分类:
其他好文 时间:
2015-04-05 13:22:34
阅读次数:
177
1.封装import java.util.Date;public class Human { protected String name; protected BirthDay birthDay; protected String sex; public St...
分类:
编程语言 时间:
2015-04-05 13:16:18
阅读次数:
185
var t = new Thread(new ThreadStart(() => { HttpListener listener = new HttpListener(); var prefix = string.F...
分类:
Web程序 时间:
2015-04-05 13:12:49
阅读次数:
138
常规类型的格式化 String类的format()方法用于创建格式化的字符串以及连接多个字符串对象。熟悉C语言的同学应该记得C语言的sprintf()方法,两者有类似之处。format()方法有两种重载形式。 format(String format, ...
分类:
编程语言 时间:
2015-04-05 12:06:19
阅读次数:
221
首先阐述String类和StringBuffer类的区别,String类是常量,不能添加,而StringBuffer则是一个字符缓冲区,可以往里面添加字符串。比如说:
String str = "helloworld";
str += "welcome";
这里其实过程是这样的:生成了String对象 "helloworld" 引用由str持有, 当执行 str += "welcome"...
分类:
编程语言 时间:
2015-04-05 12:05:01
阅读次数:
168
背景:第一因为找到结果之后没有及时的停止查找而wa了一发,改正后ac。
思路:首先对读入的每一个string,设置一个独特的ID,这样就把string变为int,后来比较的时候就会简化很多,设置ID的时候用map来赋予每一种string对应一个独特的ID。然后构建一个key为pair的map,因为行比较多列比较少(列的数为10),就枚举列的所有组合,然后对每组组合来进行map判重。
我的代码;...
分类:
其他好文 时间:
2015-04-05 10:37:36
阅读次数:
108
定义:动态地将责任附加到对象上。若要扩展功能,装饰者提供了比继承更有弹性的替代方案。 UML图示: 代码示例:以我最爱吃的冰淇淋为例 /**定义冰淇淋抽象类*/ public abstract class Ice { //描述 public String desctription = "unkonw...
分类:
其他好文 时间:
2015-04-05 10:24:15
阅读次数:
170
Public Class Cls_JM '使用 'Dim Jm As New Cls_JM(2) 'Dim strTmp As String 'Jm.jiemi(strTmp) 'Jm.Jiami(strTmp) Private TripleDes As New ...
分类:
Web程序 时间:
2015-04-05 10:20:43
阅读次数:
149
JDBC操作步骤/*
* JDBC操作步骤
*
*/
public class Test01 {
public static void main(String[] args) {
try {
//1.加载并注册驱动
Class.forName("com.mysql.jdbc.Driver");...
分类:
数据库 时间:
2015-04-05 09:08:04
阅读次数:
229
Button与ImageButton基本类似也有类似于TextView和ImageView的区别这里需要注意的是:在你定义text属性的内容时,最好是在Values文件下的String.xml中声明在使用”@string/..."的形式引用,在你更改数据时会非常方便
分类:
移动开发 时间:
2015-04-05 08:57:13
阅读次数:
120