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
wet
Wet
Shark and Bishops
B.WetSharkandBishopstimelimitpertest2secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputToday,WetSharkisgivennbishopsona1000by1000grid.Bothrowsandcolumnsofthegridarenumberedfro
acm_fighting
·
2016-02-02 17:00
Codeforces 621C
Wet
Shark and Flowers
题意:一群鲨鱼围成一圈,WetShark说个质数p,每个鲨鱼在一定范围内选个数,如果两个相邻的鲨鱼选的数的乘积能被p整除,则每个鲨鱼都将得到1000元,求鲨鱼们最终得到钱数的期望。分析:比赛时乱七八糟的写,一直错,重新读题才注意到题目中说的:Ifforanypairofneighbouringsharksiandjtheproductsi·sjisdivisiblebyp,thenWetShark
Yukizzz
·
2016-02-02 08:00
Codeforces 621A
Wet
Shark and Odd and Even
题目:点击打开链接题意:求几个最大的数的和且保证和为偶数。代码:#include usingnamespacestd; longlongx,s,k=1e18; intmain() { intn; cin>>n; for(inti=0;i>x; if(x&1)k=min(k,x); s+=x; } if(s&1)s-=k; cout<<s; }s&1等价s%2==1
qq_32473657
·
2016-02-02 01:00
codeforce 621C
Wet
Shark and Flowers
题意:输入个n和质数p,n个区间,每个区间可以等概率的任选一个数,如果选的这个区间和它下个区间选的数的积是p的倍数的话(n的下个是1),就挣2000,问挣的期望思路:整体的期望可以分成每对之间的期望。期望=概率乘2000.得到钱概率=1-得不到钱的概率1#include 2#include 3#include 4#include 5#include 6#include 7#includ
untiltetw
·
2016-02-02 00:00
Wet
Shark and Blocks --DP+矩阵快速幂
给出n,b,k,x; 以及n个数 n #include #include #include #include #include #include #include #include #include usingnamespacestd; structMatrix { __int64mat[105][105]; }; Matrixunit_matrix,p,dp; __int64MAX=100;
viphong
·
2016-02-01 23:00
Wet
Shark and Flowers
C.WetSharkandFlowerstimelimitpertest2secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputThereare n sharkswhogrowflowersforWetShark.Theyareallsittingaroundthetable,suchthatshark
aozil_yang
·
2016-02-01 23:00
C语言
codeforces
codeforces 621C
Wet
Shark and Flowers
C.WetSharkandFlowers Thereare n sharkswhogrowflowersforWetShark.Theyareallsittingaroundthetable,suchthatsharks i and i + 1 areneighboursforall i from 1 to n - 1.Sharks n and 1 areneighbourstoo.Eachsha
焰
·
2016-02-01 20:00
codeforces 621B
Wet
Shark and Bishops
grid.Bothrowsandcolumnsofthegridarenumberedfrom 1 to 1000.Rowsarenumberedfromtoptobottom,whilecolumnsarenumberedfromlefttoright.
Wet
焰
·
2016-02-01 20:00
codeforces 621A
Wet
Shark and Odd and Even
A.WetSharkandOddandEven Today,WetSharkisgiven n integers.Usinganyoftheseintegersnomorethanonce,WetSharkwantstogetmaximumpossibleeven(divisibleby 2)sum.Please,calculatethisvalueforWetShark.Note,thatif
焰
·
2016-02-01 20:00
Wet
Shark and Bishops
B.WetSharkandBishopstimelimitpertest2secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputToday,WetSharkisgiven n bishopsona 1000 by 1000 grid.Bothrowsandcolumnsofthegridarenumbe
aozil_yang
·
2016-02-01 17:00
C语言
codeforces
【概率与期望】[CodeForces - 621C]
Wet
Shark and Flowers
题目大意有n个鲨鱼围成一圈,每个鲨鱼有一个写着数字的花,第i个鲨鱼的数字在[li,ri]区间等概率选取,如果有相邻的两个鲨鱼数字的乘积是p的倍数,那WetShark就会给他们每人1000元。分析样本空间的大小为S=∏i=1n(ri−li+1)每种情况是概率出现的,只需要将所有情况的WetShark需要付的钱加起来除以S即可。然而,显然直接不能这样做,我们考虑优化。令第i只鲨鱼的取值中有npi个数字
wangyaninglm
·
2016-02-01 15:00
C++
数论
codeforces
NOI
概率与期望
Wet
Shark and Blocks(dp + 矩阵快速幂)
题意:给定b≤109块数字,每块有n≤105个数字,现在从每块选一个拼出一个大数求这个大数MOD x=k的方法数,x,k≤100分析:一种理解:dp[i][j]:=由模x得i,经(∗10+k),模x得j的方法数显然这个要做b次,显然ans=dpb[0][k]预处理出dp1[i][j]这个矩阵,转移我们发现是矩阵的自乘,比如dp2[i][k]=∑9j=0dp1[i][j]∗dp1[j][k],矩阵快
lwt36
·
2016-02-01 15:00
dp
矩阵快速幂
codeforce 621B
Wet
Shark and Bishops
对角线x1+y1=x2+y2或者x1-y1=x2-y21#include 2#include 3#include 4#include 5#include 6#include 7#include 8#include 9#include 10#include 11#include 12#include 13#include 14usingnamespacestd; 15#d
untiltetw
·
2016-02-01 14:00
Wet
Shark and Blocks(矩阵优化DP)
题目链接:点击打开链接题意:给n个数作为一个块,有b个块,从其中若干个中选择数,每个块只能选一个数,最后组成一个数模x等于k的方法数。思路:很容易想到这样一个DP方程:用dp[i][j]表示现在i位,余数是j。那么很容易知道,边界是d[0][0]=1;那么dp[i][j]=sum(dp[i-1][a]*cnt[k]),其中a是(a*10+k)%x==j,k是指枚举放1~9中哪一位,cnt[k]就是
weizhuwyzc000
·
2016-02-01 14:00
dp
codeforces
ACM-ICPC
矩阵优化
Wet
Shark and Flowers(期望)
题意:给定N≤105个人围成一个圈,每个人有一个数据范围[li,ri]每个人选定一个数s,若相邻的si∗sj能被一个素数p整除,每个人得到1000块钱求最后总钱数的期望分析:考虑每一对相邻pair,发现他俩拿钱跟别人选择啥数是没有关系的,也就是每一对相邻pair独立这个题显然不能单独算贡献了,(109)105=109×105,long double都存不下根据期望的线性性,我们可以分开算每一对,然
lwt36
·
2016-02-01 14:00
期望
Wet
Shark and Blocks
E.WetSharkandBlockstimelimitpertest2secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputThereare b blocksofdigits.Eachoneconsistingofthesame n digits,whicharegiventoyouintheinpu
acm_fighting
·
2016-02-01 14:00
codeforce 621A
Wet
Shark and Odd and Even
水最大偶数和1#include 2#include 3#include 4#include 5#include 6#include 7#include 8#include 9#include 10#include 11#include 12#include 13#include 14usingnamespacestd; 15#defineINF0x3f3f3f3f 1
untiltetw
·
2016-02-01 13:00
Wet
Shark and Flowers (期望)
C.WetSharkandFlowerstimelimitpertest2secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputTherearensharkswhogrowflowersforWetShark.Theyareallsittingaroundthetable,suchthatsharksi
helloiamclh
·
2016-02-01 12:00
Wet
Shark and Flowers(简单容斥)
题目链接:点击打开链接题意:有n个人围坐成一圈,每个人可以从a[i].l到a[i].r里选一个数,如果相邻两个数的乘积能整除p,那么就奖励他们一人1000,求所得钱的总和的期望。思路:既然求期望,先求概率。显然是要求每组相邻两个人的值乘积能否被p整除,可以很容易知道在区间里有多少个数不能被p整除,正难则反,就能算出相邻两个有多少种组合不能被p整除,那么也就很容易算出每组可以被p整除的概率,乘上20
weizhuwyzc000
·
2016-02-01 12:00
codeforces
ACM-ICPC
容斥
Wet
Shark and Bishops (正副对角线规律)
B.WetSharkandBishopstimelimitpertest2secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputToday,WetSharkisgivennbishopsona1000by1000grid.Bothrowsandcolumnsofthegridarenumberedfro
helloiamclh
·
2016-02-01 12:00
Wet
Shark and Odd and Even (水)
A.WetSharkandOddandEventimelimitpertest2secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputToday,WetSharkisgivennintegers.Usinganyoftheseintegersnomorethanonce,WetSharkwantstog
helloiamclh
·
2016-02-01 12:00
Codeforces Round #341 (Div. 2) problemE
Wet
Shark and Blocks 矩阵乘法 dp
CodeforcesRound#341(Div.2)problemEWetSharkandBlocks题目大意:有b(b #include #include #include #include #definelllonglong #defineMo1000000007 usingnamespacestd; structM{llmap[105][105];}ori,res,tmp; intcnt[1
yxr0105
·
2016-02-01 11:00
dp
codeforces
矩阵乘法
Wet
Shark and Flowers(思维)
C.WetSharkandFlowerstimelimitpertest2secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputThereare n sharkswhogrowflowersforWetShark.Theyareallsittingaroundthetable,suchthatshark
handsomecui
·
2016-02-01 10:00
Wet
Shark and Bishops(思维)
B.WetSharkandBishopstimelimitpertest2secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputToday,WetSharkisgiven n bishopsona 1000 by 1000 grid.Bothrowsandcolumnsofthegridarenumbe
handsomecui
·
2016-02-01 08:00
Wet
Shark and Odd and Even(水)
A.WetSharkandOddandEventimelimitpertest2secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputToday,WetSharkisgiven n integers.Usinganyoftheseintegersnomorethanonce,WetSharkwantst
handsomecui
·
2016-02-01 08:00
Codeforces 621B
Wet
Shark and Bishops(判定对角线点+组合数统计)
B.WetSharkandBishopstimelimitpertest2secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputToday,WetSharkisgiven n bishopsona 1000 by 1000 grid.Bothrowsandcolumnsofthegridarenumbe
zwj1452267376
·
2016-02-01 02:00
Codeforces 621A
Wet
Shark and Odd and Even
A.WetSharkandOddandEventimelimitpertest2secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputToday,WetSharkisgiven n integers.Usinganyoftheseintegersnomorethanonce,WetSharkwantst
zwj1452267376
·
2016-02-01 01:00
Wet
Shark and Flowers-数学-概率计算
。。。。求的是期望嘛。。。range[i]=R[i]-L[i]+1 我们设【l,r】之间,p的倍数的个数为tm[i], 那么每一对i,i+1他们每场赢钱的概率是pi=【tm[i]*range[i+1]+tm[i+1]*range[i]-tm[i]*tm[i+1] 】/ (range[i]*rangr[i+1])而他们每次赢钱是2个人各得一千,也就是pi*2000;所以for(i=1;iY表示区间不
viphong
·
2016-02-01 01:00
CF#341-B-
Wet
Shark and Bishops-水题
http://codeforces.com/contest/621/problem/B给你一个1000*1000的矩阵,上的n个点,计算每个对角线上有多少个点,如果一个对角线有n个点,代表有n个牧师,会互相打架,计算打架总数直接统计每条对角线多少个点,然后....n个人,有n*(n-1)/2场架,GG//注意主对角线要+n,否则下标为负数#include #include #include #in
viphong
·
2016-02-01 01:00
CF 621A
Wet
Shark and Odd and Even
A.WetSharkandOddandEventimelimitpertest2secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputToday,WetSharkisgiven n integers.Usinganyoftheseintegersnomorethanonce,WetSharkwantst
qq_33638791
·
2016-02-01 00:00
Wet
Shark and Flowers
题意:不概括了..太长了..额第一次做这种问题算是概率dp吗?保存前缀项中第一个和最后一个的概率然后每添加新的一项就解除前缀和第一项和最后一项的关系并添加新的一项和保存的两项的关系这里关系指的是两者相邻会产生的额外收入(其中一个满足条件就能得到因此公式是2000*(rate[a]*rate[b]+rate[a]*(1-rate[b])+rate[b]*(1-rate[a]))至于一开始为什么老是调
失踪百景
·
2016-02-01 00:00
Wet
Shark and Bishops
题意:处在同一对角线上的主教(是这么翻译没错吧==)会相互攻击求互相攻击对数由于有正负对角线因此用两个数组分别保存每个主教写的x-y和x+y然后每个数组中扫描重复数字kans加上kC2就行了wa了两发的原因是没考虑到如果整个数组都是重复的那要最后额外加一次#include #include #include #include #include #include #defineINF0x
失踪百景
·
2016-02-01 00:00
Wet
Shark and Odd and Even
题意是得到最大的偶数和解决办法很简单排个序取和如果是奇数就减去最小的奇数#include #include #include #include #include #include #defineINF0x3f3f3f3f #definemem(str,x)memset(str,(x),sizeof(str)) #defineSTOPputs("Pause"); usingname
失踪百景
·
2016-02-01 00:00
Wet
Shark and Odd and Even
A.WetSharkandOddandEventimelimitpertest2secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputToday,WetSharkisgiven n integers.Usinganyoftheseintegersnomorethanonce,WetSharkwantst
aozil_yang
·
2016-02-01 00:00
C语言
codeforces
Win 7 下ArcGIS Server登录manger成功,add NEW servers的时候添加resoures成功,就是finish后出现如下问题的解放方法
Server Object instance creation failed on machine pc--20101007
wet
.
·
2015-11-13 11:36
server
html笔记01:顺序和无序列表
DOCTYPE html> 2 <html> 3 <body> 4 5 <li>Yellow 6 <ul><li>
Wet
·
2015-11-11 19:01
html
Booklist to Read
The important thing is finding
wet
snow and a really long hill.
·
2015-11-11 15:15
list
poj 2391 Ombrophobic Bovines(最大流+floyd+二分)
Limit: 65536K Total Submissions: 14519Accepted: 3170 Description FJ's cows really hate getting
wet
·
2015-11-11 00:38
floyd
HackerRank#
Wet
Shark and Two Subsequences
原题地址 对于给定的两个约束条件,可以通过联立方程组直接解出子序列A的和和子序列B的和,即sum(A) = (r + s) / 2,sum(B) = (r - s) / 2,假设|A|=|B|=n 所以问题变成了,在一个数组中求长度为n且子序列和为sum(A)或sum(B)有多少个。 假设count(n, s)表示长度为n且子序列和为s有多少个,则要求的是count(n, s
·
2015-11-05 08:37
sequence
silverlight 添加配置项
MainApp.
wet
下面webconfig,index Web.config <!
·
2015-11-02 13:51
silverlight
redhat 5.4 下rabbitMQ单机安装.md
下载软件包 `
wet
http://www.rabbitmq.com/releases/rabbitmq-server/v3.1.5/rabbitmq-server-3.1.5-
·
2015-10-31 17:33
rabbitmq
Ombrophobic Bovines - POJ 2391
Description FJ's cows really hate getting
wet
so much that the mere thought of getting caught in the
·
2015-10-31 11:06
poj
AP常用的五种模式
(AP模式可以比Linksys的
WET
11的点对点模式接多很多个无线客户端,最多达250个)2:WirelessClient(网桥模式)跟Linksys的
WET
11和D-LINK的DWL-810+一样,
jjqfox
·
2015-09-12 00:51
bridge
wireless
wireless
Repeater
AP常用的五种模式
(AP模式可以比Linksys的
WET
11的点对点模式接多很多个无线客户端,最多达250个)2:WirelessClient(网桥模式)跟Linksys的
WET
11和D-LINK的DWL-810+一样,
jjqfox
·
2015-09-12 00:51
bridge
wireless
wireless
Repeater
MTK+Android编译
1.修改recovery代码比如mediatek\custom\itek82_
wet
_kk\recovery\inc\cust_keys.h./mkrk.
LoongEmbedded
·
2015-08-05 15:00
hdu4711Weather 概率dp
//第i个城市到第j个城市的概率ma[i][j]//第i天的天气天气
wet
[i]//第i个城市天气为j的概率
wet
_m[i][j]//Hovey从0点开始,找出其概率最大的路线//dp[i][j]表示在第
cq_pf
·
2015-07-22 22:00
MTK6582+Android4.4.2之LK和kernel logo显示
Android增加支持新显示屏的显示》,链接:http://blog.csdn.net/loongembedded/article/details/38535143 mediatek\config\itek82_
wet
_kk
LoongEmbedded
·
2015-07-17 16:00
A
wet
night
原文Lateintheafternoon,theboysputuptheirtentinthemiddleofafield.Assoonasthiswasdone,theycookedamealoveranopenfire.Thewereallhungryandthefoodsmelledgood.Afterawonderfulmeal,theytoldstoriesandsangsongsbyt
Robinson_lu
·
2015-07-09 13:00
1569:
Wet
Tiles
DescriptionAliceownsaconstructioncompanyinthetownofNorainia,famousforitsunusuallydryweather.Infact,itonlyrainsafewdaysperyearthere.Becauseofthisphenomenon,manyresidentsofNorainianeglecttodoroofrepairs
Kirito_Acmer
·
2015-04-08 15:00
搜索
Android系统移植与调试之安装apk时MTK命令和出现Failure [INSTALL_FAILED_DEXOPT]问题解决方法
,-opt=……:编译附加条件,一般使用-opt=TARGET_BUILD_VARIANT=user来编译用户板软件-h,help:打印帮助信息并退出Project:工程名,例如:basicom72_
wet
_jb3Action
meng_yun
·
2015-04-01 16:56
上一页
1
2
3
4
5
下一页
按字母分类:
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
其他