不懂得详见poj 2356 抽屉原理详解,这题竟然卡精度。。。提交了好几次都WA,改成long long sum[100100] 才对
代码如下:
#include
#include
int flag[100100],a[100100],str[100100];
long long sum[100100];
int main()
{
int n,i,j,t,chi;
whi...
分类:
其他好文 时间:
2014-07-23 13:38:16
阅读次数:
228
//除去字符串中的“111@”
NSMutableString *str = [[NSMutableString
alloc]initWithFormat:@"111@sudhqu111@lgkokge"];
while ([str rangeOfString:@"111@"].length>0)
{
[str deleteCharactersI...
分类:
移动开发 时间:
2014-07-23 13:16:26
阅读次数:
194
CREATE FUNCTION [dbo].[f_getpy_tb] ( @str VARCHAR(100) )RETURNS @tb TABLE ( re VARCHAR(8000) )AS BEGIN DECLARE @re TABLE ( id INT, re VARCH...
分类:
数据库 时间:
2014-07-23 12:57:26
阅读次数:
283
function addCookie(objName, objValue, objHours) { var str = objName + "=" + EncodeURI(objValue); if (objHours > 0) { var date = new Date(...
分类:
Web程序 时间:
2014-07-23 12:56:36
阅读次数:
233
# -*- conding:utf-8-*-import subprocessdef getpid_windows(process_name): """利用cmd_str = tasklist|find /i "xdict.exe" 来查找windows平台的进程id""" cmd_line = '...
分类:
其他好文 时间:
2014-07-23 12:53:36
阅读次数:
242
单引号,双引号,三引号,原型字符串几种形式1、创建字符串:单引号,双引号,str()几种创建方式2、访问子串:切片方式3、修改或者说更新字符串:“+”运算,给字符串内容增加一个长度的字符串;重新赋值方式;4、删除子串:切片做“+”运算(aString = aString[:3] + aString[...
分类:
编程语言 时间:
2014-07-23 12:42:46
阅读次数:
266
function_exist()如果没有函数,返回空。is_string($str) 如果$str是布尔型的值,返回为空。是返回1,错误返回空is_array() 同上字符串输出时,加逗号就自动空格。结果为6//字符串"3+4+5"只输出3布尔型与Null ---->integer /float.....
分类:
Web程序 时间:
2014-07-23 11:36:16
阅读次数:
222
public static function base64Encode(str:String, charset:String = "GBK"):String{
if(StringUtils.getInstance().isEmpty(str)){
return "";
}
var base64:Base64Encoder = new Base64Encoder();
...
分类:
其他好文 时间:
2014-07-23 00:06:07
阅读次数:
392
题意:就是要你求最小生成树所需的最小距离
思路:Kruskal算法
AC代码:
#include
#include
#include
using namespace std;
#define N 125000
int u[N],v[N],w[N],r[N];
int f[520],str[520][520];
int find(int x)
{
if(x!=f[x])
...
分类:
Web程序 时间:
2014-07-23 00:03:57
阅读次数:
266
#include #include void main(){ int x,i; char str[100]; //gets(st1); printf("Please input a string to find out whether the string is palind...
分类:
其他好文 时间:
2014-07-22 23:04:32
阅读次数:
240