题目链接:HDOJ - 5183题目分析分两种情况,奇数位正偶数位负或者相反。从1到n枚举,在Hash表中查询 Sum[i] - k ,然后将 Sum[i] 加入 Hash 表中。BestCoder比赛的时候我写了 STL map, 然后TLE...注意: Hash负数的时候 % 了一个质数,得到的...
分类:
其他好文 时间:
2015-03-08 10:28:59
阅读次数:
142
HDU 5183 Negative and Positive (NP) (set + 读入外挂 乱搞)...
分类:
其他好文 时间:
2015-03-08 06:48:04
阅读次数:
992
传送门:Negative and Positive (NP)题意:给定一个数组(a0,a1,a2,?an?1)和一个整数K, 请来判断一下是否存在二元组(i,j)(0≤i≤j#include #include #include #include #include #include #include ...
分类:
其他好文 时间:
2015-03-08 00:05:47
阅读次数:
214
Title:监视系统3389的VBS脚本 --2010-10-27 19:56从网上找的,不知道是不是NP写的那个---------------------------------------------------------------------------------------------...
分类:
其他好文 时间:
2015-03-07 13:48:00
阅读次数:
140
wget下载整个网站,或者特定目录需要下载某个目录下面的所有文件。命令如下wget-c-r-np-k-L-pwww.xxx.org/pub/path/在下载时。有用到外部域名的图片或连接。如果需要同时下载就要用-H参数。wget-np-nH-r--span-hostswww.xxx.org/pub/path/-c断点续传-r递归下载,下载指定网页某..
分类:
Web程序 时间:
2015-03-05 15:00:13
阅读次数:
196
Problem Description
Problems in Computer Science are often classified as belonging to a certain class of problems (e.g., NP, Unsolvable, Recursive). In this problem you will be analyzing a property o...
分类:
其他好文 时间:
2015-02-25 14:16:04
阅读次数:
178
转载一下豆瓣的一个不知名的朋友的介绍:NP是指多项式时间内验证其解是否正确。比如: 我们给一个0-1背包的解,就可以在多项式时间内验证是否满足条件。至于是否能找到 满足条件的解,这在NP复杂度里没有规定。而Sharp-P (#P)NP问题中对应的满足条件的实例或路径的个数。比如:0-1背包问有没有这...
分类:
其他好文 时间:
2015-02-24 16:21:23
阅读次数:
671
Classification with HDF5 data1.导入库 1 import os 2 import h5py 3 import shutil 4 import sklearn 5 import tempfile 6 import numpy as np 7 import pandas a...
分类:
其他好文 时间:
2015-02-23 06:27:19
阅读次数:
354
Problem Description
Problems that process input and generate a simple ``yes'' or ``no'' answer are called decision problems. One class of decision problems, the NP-complete problems, are not amenable to general efficient solutions. Other problems may be si...
分类:
其他好文 时间:
2015-02-17 17:43:31
阅读次数:
196
传送门:Power Network题意:在一个网络图中有n个点,其中有np个发电站,nc个用户,m条电线;每个发电站,用户,和电线都对应有一个最大的电流;让求出该网络中最大的电流。分析:最大流裸题,增加一个源点0和汇点n+1后直接跑最大流即可。#pragma comment(linker,"/STA...
分类:
其他好文 时间:
2015-02-16 15:34:29
阅读次数:
163