E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
Thief
Educational Codeforces Round 9 E.
Thief
in a Shop
链接:http://codeforces.com/contest/632/problem/E题意:给定n,k,然后给定n个1000以内的整数,求从中取k个(可重复取同一元素)能组成多少个不同的数,输出所有恰能用k个数组成的情况。分析:很明显这题只要将数x当做指数项直接去FFT即可,最后输出系数非0的项即可,另最大的数为x,mx=x*k,那么暴力FFT是O(mx*k*logmx),这样显然是不行的,
Fsss_7
·
2016-03-21 21:00
codeforces_632E.
Thief
in a Shop(dp)
E.ThiefinaShoptimelimitpertest5secondsmemorylimitpertest512megabytesinputstandardinputoutputstandardoutputAthiefmadehiswaytoashop.Asusualhehashisluckyknapsackwithhim.Theknapsackcancontainkobjects.Ther
christry_stool
·
2016-03-14 18:24
337. House Robber III
The
thief
has found himself a new place for his thievery again.
qdqade
·
2016-03-14 16:47
contact
Tonight
Without
Thief
in a Shop(FFT)
题意:给定N,K≤103,N种物品,价值Ai≤103,必须装K个物品的背包求所有能装的价值,从小到大输出分析:其实就是长度为1000的物品价值向量的k次幂,存在该价值就为1否则为0然后用fft求k次卷积就好了用bool数组可以降低精度误差,同时不要直接把fft的len设置成106,可以优化下常数时间复杂度是O(WlogWlogk),W=106代码:// //CreatedbyTaoSamaon20
lwt36
·
2016-03-07 22:00
fft
Thief
in a Shop dp fft
E.ThiefinaShop题目连接:http://www.codeforces.com/contest/632/problem/EDescriptionAthiefmadehiswaytoashop.Asusualhehashisluckyknapsackwithhim.Theknapsackcancontainkobjects.Therearenkindsofproductsintheshop
qscqesze
·
2016-03-02 22:00
Thief
in a Shop (dp)
Athiefmadehiswaytoashop.Asusualhehashisluckyknapsackwithhim.Theknapsackcancontainkobjects.Therearenkindsofproductsintheshopandaninfinitenumberofproductsofeachkind.Thecostofoneproductofkindiisai.Thethi
Herumw
·
2016-03-02 18:16
dp
dp
Thief
in a Shop (dp)
Athiefmadehiswaytoashop.Asusualhehashisluckyknapsackwithhim.Theknapsackcancontain k objects.Thereare n kindsofproductsintheshopandaninfinitenumberofproductsofeachkind.Thecostofoneproductofkind i is ai
Kirito_Acmer
·
2016-03-02 18:00
dp
(Educational Codeforces Round 9)
Thief
in a Shop(dp)
ThiefinaShoptimelimitpertest5secondsmemorylimitpertest512megabytesinputstandardinputoutputstandardoutputAthiefmadehiswaytoashop.Asusualhehashisluckyknapsackwithhim.Theknapsackcancontainkobjects.Therea
liangzhaoyang1
·
2016-03-02 17:00
codeforces
Thief
in a Shop fft
题目链接E.ThiefinaShoptimelimitpertest5secondsmemorylimitpertest512megabytesinputstandardinputoutputstandardoutputAthiefmadehiswaytoashop.Asusualhehashisluckyknapsackwithhim.Theknapsackcancontain k object
yohaha
·
2016-03-02 14:00
HDU——1982Kaitou Kid - The Phantom
Thief
(1)(坑爹string题)
KaitouKid-ThePhantomThief(1)TimeLimit:3000/1000MS(Java/Others) MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):2694 AcceptedSubmission(s):1182ProblemDescription DoyouknowKaitouKid?Inthel
a88770202
·
2016-02-24 12:00
HackerRank "Dorsey
Thief
"
Avariationto0-1Knapsack.(NoPythoncodegotfullyAC.Pythonistooslowforthisproblem)#include #include #include #include #include usingnamespacestd; intmain() { //Getinput intN,X;cin>>N>>X; vec
Tonix
·
2016-02-03 14:00
HackerRank "Dorsey
Thief
"
Avariationto0-1Knapsack.(NoPythoncodegotfullyAC.Pythonistooslowforthisproblem)#include #include #include #include #include usingnamespacestd; intmain() { //Getinput intN,X;cin>>N>>X; vec
Tonix
·
2016-02-03 14:00
【C】我到底错在那里………………
}kid[10];voidfind(inti){ intn; intaver; intthief; intvictim; for(n=0;naver)
thief
1193972689
·
2016-01-17 22:00
【C】我到底错在那里………………
}kid[10];voidfind(inti){ intn; intaver; intthief; intvictim; for(n=0;naver)
thief
1193972689
·
2016-01-17 22:00
【C】我到底错在那里………………
}kid[10];voidfind(inti){ intn; intaver; intthief; intvictim; for(n=0;naver)
thief
1193972689
·
2016-01-17 22:00
hdu 1983 Kaitou Kid - The Phantom
Thief
(2) DFS + BFS
http://acm.hdu.edu.cn/showproblem.php?pid=1983 转自:http://hi.baidu.com/song19870626/blog/item/b44a8110d9341376ca80c48d.html 思路: 封锁出口或者入口周围的格子. 最多需要4个封锁点. 所以我们可以采取这样的策略: 1.寻找一条盗贼的可行路线,如
·
2015-11-13 16:50
ant
HDU 1982 Kaitou Kid - The Phantom
Thief
(1)
http://acm.hdu.edu.cn/showproblem.php?pid=1982 字符串处理 View Code #include <iostream> #include <string> using namespace std ; char str[27]={"ABCDEFGHIJKLMNOPQRSTUVWXYZ"};
·
2015-11-13 02:13
ant
HDU 1983 Kaitou Kid - The Phantom
Thief
(2)
神题,搜索太差,来自网络的题解与程序 思路: 封锁出口或者入口周围的格子. 最多需要4个封锁点. 所以我们可以采取这样的策略: 1.寻找一条盗贼的可行路线,如果没有,返回0. 2.计算封锁出口和入口四周需要的封锁点数量,取小的一个,假设是k,k <=4 3.从少到多,遍历所有封锁点个数小于k的方案,验证是否是一条有效的覆盖方案
·
2015-11-12 16:21
ant
UESTC-第五届ACM趣味程序设计竞赛第四场(正式赛)--不完全解题报告
cid=230 A.Police And The
Thief
---UESTC 1913 简单博弈,先假设在警察先走的情况下分析,小偷先走的结果在其基础上取反面即可。
·
2015-11-11 16:33
程序设计
[DP] The 0-1 knapsack problem
O(nW) time, where n is the number of items and W is the maximum weight of items that the
thief
·
2015-11-11 12:46
dp
*House Robber II
题目: After robbing those houses on that street, the
thief
has found himself a new place for his thievery
·
2015-11-11 09:04
r
HDOJ HDU 1982 Kaitou Kid - The Phantom
Thief
(1) ACM 1982 IN HDU
//MiYu原创, 转帖请注明 : 转载自 ______________白白の屋 题目地址 : http://acm.hdu.edu.cn/showproblem.php?pid=1982 PE了N次, 很纠结的一个题........ 题目如下 : Prob
·
2015-11-11 07:26
ant
【LeetCode】213. House Robber II
After robbing those houses on that street, the
thief
has found himself a new place for his thievery so
·
2015-11-07 11:51
LeetCode
csu 1356 Catch bfs(vector)
Limit: 128 MB Submit: 96 Solved: 40 [ Submit][ Status][ Web Board] Description A
thief
·
2015-11-07 09:58
vector
House Robber II
After robbing those houses on that street, the
thief
has found himself a new place for his thievery so
·
2015-11-02 14:00
r
HDU-Catching the
Thief
博弈
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3469 题目大意:警察抓小偷。有n个房间,编号1-n,小偷躲在其中的一个房间里面,警察每天早上会检查一个房间,如果小偷不在那个房间里面,那么小偷晚上会转向相邻的房间,问警察在最坏情况下需要多少天抓到小偷。 这个题目是分奇偶情况讨论。先假设小偷在第偶数个房间,那么警察从第2个房间依次向右找
·
2015-10-31 15:07
catch
House Robber II
After robbing those houses on that street, the
thief
has found himself a new place for his thieve
·
2015-10-31 10:50
r
【LeetCode 213】House Robber II
After robbing those houses on that street, the
thief
has found himself a new place for his thievery so
·
2015-10-31 10:12
LeetCode
2.Dynamic Programming on Stolen Values【dp】
A
thief
is going to steal the maximal value in these houses, but he cannot steal in two adjacent
·
2015-10-28 09:16
[LeetCode] House Robber II
After robbing those houses on that street, the
thief
has found himself a new place for his thievery so
·
2015-10-27 15:26
LeetCode
sgu482 Impudent
Thief
设dp[i][j]为最后一个放i,周长为j所拿走的木板总高度dC(i,j)表示i与j放在一起,周长的改变量这样dp方程如下dp[k][j+dC(i,k)]=max{dp[i][j]-h[k]},k>i时间复杂度为O(n^2*C),即O(n^3*h)#include #include #include #include usingnamespacestd; constintMAXN=55; con
u010005180
·
2015-10-26 18:00
House Robber II
After robbing those houses on that street, the
thief
has found himself a new place for his thievery so
·
2015-10-23 09:46
r
焦耳小偷-Joule_
thief
原理分析
焦耳小偷电路可以榨干一节废旧干电池上的所有能量。通常1.5V的干电池用完之后还会有1V左右的电压,说明此时电池内还有能量,只不过内阻已经变的很大,输出电流很微弱,已经无法驱动一般的电路,此时就算直接接一个LED也无法将其点亮,焦耳小偷电路可以通过磁感线圈产生高频高压的脉冲电压,使LED导通。以下是原理分析:1.电流从BJT基极流入,使BJT轻微导通,使得集电极产生电流,集电极端的线圈产生磁通量,磁
wu5795175
·
2015-08-16 21:00
HDU 3469 Catching the
Thief
(博弈 + DP递推)
CatchingtheThiefTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):653 AcceptedSubmission(s):359ProblemDescriptionIntheQingshuiVillage,there'sacleverthief
qq_18661257
·
2015-08-14 16:00
Stop
thief
!
原文RoyTrentonusedtodriveataxi.Ashortwhileago,however,hebecameabusdriverandhehasnotregrettedit.Heisfindinghisnewworkfarmoreexciting.WhenhewasdrivingalongCatfordStreetrecently,hesawtwothievesrushoutofash
Robinson_lu
·
2015-08-10 13:00
hdoj 3478 Catch(二分图判定+并查集)
pid=3478 思路分析:该问题需要求是否存在某一个时刻,
thief
可能存在图中没一个点;将该问题转换为图论问题即为判断该图是否为一个连通图且不为二分图; (1)二分图的性质:对于无向图G=(V,
·
2015-07-24 10:00
catch
Flarum 用到的前端 javascript 库
color-
thief
https://github.c
flarum
·
2015-06-11 13:00
JavaScript
PHP
flarum
LeetCode 213 - House Robber II
After robbing those houses on that street, the
thief
has found himself a new place for his thievery so
yuanhsh
·
2015-05-26 14:00
LeetCode
LeetCode 213 - House Robber II
After robbing those houses on that street, the
thief
has found himself a new place for his thievery so
yuanhsh
·
2015-05-26 14:00
LeetCode
[LeetCode] House Robber II 打家劫舍之二
After robbing those houses on that street, the
thief
has found himself a new place for his thievery so
·
2015-05-21 03:00
LeetCode
Leetcode - House Robber II
After robbing those houses on that street, the
thief
has found himself a new place for his thievery so
likesky3
·
2015-05-20 22:00
LeetCode
SGU 482 Impudent
Thief
dp
题目链接:点击打开链接题意:给定n列箱子,下面n个数表示每列的箱子个数每次可以拿走一列箱子,拿走中间列的箱子后两边的箱子会向中间靠拢(即中间不会有缝隙)拿走箱子后的周长必须*2>=原周长问:最多拿走几个箱子(即使得面积最大)输出能拿走的最大面积输出拿走的列数 输出拿走具体哪几列思路:dp[i][j]表示前i列留下第i列后剩下面积为j时最大的周长。顺便记录下前驱什么的。。#include #incl
qq574857122
·
2014-09-18 16:00
HDU 1982 Kaitou Kid - The Phantom
Thief
(1)
/*注意###--##类似的重复处理,同HDU1062相似,直接使用2次串流可能会导致PE*/ #include #include #include #include #include usingnamespacestd; voidprocess(strings) { replace(s.begin(),s.end(),'-',''); stringstreamm(s); intt; whil
Matrix_Reloaded
·
2014-06-15 22:00
Algorithm
ACM
HDU 1982:Kaitou Kid - The Phantom
Thief
(1)
传送门:http://acm.hdu.edu.cn/showproblem.php?pid=1982TimeLimit:3000/1000MS(Java/Others)MemoryLimit:32768/32768K(Java/Others)ProblemDescriptionDoyouknowKaitouKid?Inthelegend,KaitouKidisamasterofdisguise,a
HQU_hideyoshi
·
2014-06-12 22:17
ACM
蒟蒻专刷水题你们不要和我抢w
acm
c
c++
hdu
杭电
ZOJ 2864 Catch the
thief
本来不想写题解的,不过意外发现这题居然是#1。。。留念下,写个题解题意:一个小偷从S到T,只走最短路。给出一个时间,问此时小偷可能的位置有多少个?有可能在顶点上也可能在边上。思路:求两次最短路,源分别是从T出发(记为dis[])和S(记为_dis[])。点和边分开考虑:1.对于边(u,v)如果dis[u]+e(u,v)+_dis[v]==dis[S],说明e(u,v)是一条最短路上的边。那么如果询
gzh1992n
·
2014-02-28 22:00
算法
ACM
ZOJ
ZOJ
monthly
Kaitou Kid - The Phantom
Thief
(1) 第三次周赛
KaitouKid-ThePhantomThief(1)TimeLimit:3000/1000ms(Java/Other) MemoryLimit:32768/32768K(Java/Other)TotalSubmission(s):21 AcceptedSubmission(s):10ProblemDescriptionDoyouknowKaitouKid?Inthelegend,Kai
u011455899
·
2013-10-27 11:00
XFS攻击一例
什么是XFS攻击,下面举一个例子:Tom在QQ上发消息诱骗Jerry点击了下面的连接:http://
thief
.com上面的连接返回了下面的html:IECrossFrameScriptingRestrictionBypassExamplefunctionalertKey
iteye_19284
·
2013-08-13 17:57
j2ee
XFS攻击一例
什么是XFS攻击,下面举一个例子:Tom在QQ上发消息诱骗Jerry点击了下面的连接:http://
thief
.com上面的连接返回了下面的html:IECrossFrameScriptingRestrictionBypassExamplefunctionalertKey
cuishen
·
2013-08-13 17:00
XFS
脚本
js
攻击
security
XFS攻击一例
什么是XFS攻击,下面举一个例子: Tom在QQ上发消息诱骗Jerry点击了下面的连接: http://
thief
.com 上面的连接返回了下面的html: <html
cuishen
·
2013-08-13 17:00
js
脚本
Security
XFS
攻击
XFS攻击一例
什么是XFS攻击,下面举一个例子:Tom在QQ上发消息诱骗Jerry点击了下面的连接:http://
thief
.com上面的连接返回了下面的html:IECrossFrameScriptingRestrictionBypassExamplefunctionalertKey
cuishen
·
2013-08-13 17:00
XFS
脚本
js
攻击
security
上一页
1
2
3
4
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他