题目链接:点击打开链接题意:给定长度为n的字符串s,常数k显然s的子串一共同拥有 n(n-1)/2 个要求找到一个长度为n的字符串t,使得t相应位置的k个子串字典序>s#include#include#include#include#include#includeusing namespace st...
分类:
其他好文 时间:
2014-10-02 16:33:53
阅读次数:
193
1 /************************************************************************* 2 * Compilation: javac StdDraw.java 3 * Execution: java St...
分类:
编程语言 时间:
2014-10-02 11:28:43
阅读次数:
258
原文:C#在outlook里创建一封邮件到草稿箱1.引用Microsoft.Office.Interop.Outlook.dll
2.实现代码 1 public static int SendToDraft(List to, List cc, List bcc, string subject, st...
分类:
其他好文 时间:
2014-10-02 09:29:52
阅读次数:
162
P1141最小非负值描述输入一个自然数n(ngetline(cin,st);这里不要写什么infile outfile了,直接写cin经验证无错代码//我对代码长度不是很在意,短码写着累看着也累啊(我也写不好……)#include#include using namespace std;int a....
分类:
其他好文 时间:
2014-10-02 00:31:21
阅读次数:
398
题目大意:有一些牛,他们的牛舍需要被打扫。有N(N
思路:1w的数据量不算很大,再加上时限5s,就n^2动归来做。
将牛按时间段的开始排序。
设f[i]为若取第i头牛打扫,到这头牛结束的时间最小花费是多少。
则 f[i] = min(f[i],f[j] + cost[i]) (f[i].st
最后是初值和答案的问题。由于题目中说每时每刻都有牛在打扫,所以f的初值为极大...
分类:
其他好文 时间:
2014-10-01 19:00:31
阅读次数:
166
读写函数分别例如以下:import java.io.FileInputStream;import java.io.FileOutputStream;import java.util.Properties;public Properties loadConfig(Context context, St...
分类:
移动开发 时间:
2014-10-01 13:37:41
阅读次数:
149
package com.shijiaoyun.model;public class TestThread extends Thread {private String str;private static Object lock = new Object();public TestThread(St...
分类:
编程语言 时间:
2014-09-30 16:34:49
阅读次数:
205
第一眼看出是动态规划。然后写方程:令f[i]表示下面i个积木里面必须取第i个的情况下满足要求的最多个数。则f[i] = max(f[j] + 1)其中j满足以下三个条件(1) j 11 #include 12 #include 13 14 using namespace std;15 16 st.....
分类:
其他好文 时间:
2014-09-30 14:53:29
阅读次数:
220
#include
#include
#include
#include
#include
#include//顺序锁头文件
static int i=0,j=100;//一个线程从0开始加,一个线程从100开始加
struct task_struct *MyThread1=NULL;//线程1
struct task_struct *MyThread2=NULL;//线程2
st...
分类:
系统相关 时间:
2014-09-30 11:35:09
阅读次数:
257
Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100".算法:模拟加法过程 1 class Solution { 2 public: 3 st...
分类:
其他好文 时间:
2014-09-30 11:05:31
阅读次数:
155