[OJ]1010:Water Drinking

2019-1-13 写技术

Description The Happy Desert is full of sands. There is only a kind of animal called camel living on the Happy Desert. Cause they live here, they need water here. Fortunately, they find a pond which is full of water in the east corner of the desert. Though small, but enough. However...

阅读全文>>

标签: C

评论(0) 浏览(1184)

[OJ]1009:抛硬币

2019-1-12 写技术

Description James得到了一堆有趣的硬币,于是决定用这些硬币跟朋友们玩个小游戏。在一个N行M列的表格上,每一个第i行第j列的格子上都放有一枚James的硬币,抛该硬币正面朝上的概率为Pij,所有抛硬币事件两两之间是相互独立的。 现在,玩家在M列硬币中,从每一列里各选择1枚,共M枚,构成一组。如此重复选择N组出来,且保证被选择过的硬币不能再选。选好组之后,每组的M枚硬币各抛一次,如果都是正面朝上,则该组胜利,总分赢得1分;否则该组失败,总分不加也不减。请问,如果让你自行选择硬币的分组,游戏总得分的数学期望的最大值是多少? ...

阅读全文>>

标签: C

评论(0) 浏览(1112)

[OJ]1008:

2019-1-12 写技术

Description A Horcrux is an object in which a Dark wizard or witch has hidden a fragment of his or her soul for the purpose of attaining immortality. Constructing a Horcrux is considered Dark magic of the foulest, most evil kind, as it violates laws of nature and morality, and requi...

阅读全文>>

标签: C

评论(0) 浏览(977)

[OJ]1005:Binary Search Tree analog

2019-1-11 写技术

Input The first integer of the input is T, the number of test cases. Each test case has two lines. The first line contain an integer N,(1<=N<=1000), the number of numbers need to be inserted into the BST. The second line contain N integers separated by space, each integer is in the...

阅读全文>>

标签: C

评论(0) 浏览(1051)

[OJ]1004:Xi and Bo

2019-1-11 写技术

Description Bo has been in Changsha for four years. However he spends most of his time staying his small dormitory. One day he decides to get out of the dormitory and see the beautiful city. So he asks to Xi to know whether he can get to another bus station from a bus station. Xi is n...

阅读全文>>

标签: C

评论(0) 浏览(1372)

[OJ]1003:UC Browser

2019-1-10 写技术

You can get 10 experiences after using UC Browser one day in a row, 20 experiences for two days in a row, 30 experiences for three days in a row, 40 experiences for four days in a row, 50 experiences for five days in a row. If you use UC Browser six days in a row, the experiences you can g...

阅读全文>>

标签: C

评论(0) 浏览(1109)

关键字过滤功能

2018-11-27 写技术

针对于大量营销评论,评论区已经增加了关键字过滤功能。

阅读全文>>

标签: html

评论(0) 浏览(1045)

[html]定时获取服务器时间和本地时间

2018-11-1 写技术

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta name="viewport" cont...

阅读全文>>

标签: html

评论(0) 浏览(1753)

[linux]How to access ini file by shell

2018-10-16 写技术

readIni() { file=$1; section=$2; item=$3; val=$(awk -F '=' '/\['${section}'\]/{a=1} (a==1 && "'${item}'"==$1){a=0;print $2}' ${file}) echo ${val} } writeIni() { file=$1; section=$2; item=$3; val=$4; awk -F '=' '/\['${section}'\]/{a=1} (a==1 && "'${i...

阅读全文>>

标签: linux

评论(0) 浏览(1249)

合法IP地址分类总结

2018-9-29 写技术

1.A类IP地址 一个A类IP地址由1字节(每个字节是8位)的网络地址和3个字节主机地址组成,网络地址的最高位必须是“0”,即第一段数字范围为1~127。每个A类地址可连接16387064台主机,Internet有126个A类地址。 2.B类IP地址 一个B类IP地址由2个字节的网络地址和2个字节的主机地址组成,网络地址的最高位必须是“10”,即第一段数字范围为128~191。每个B类地址可连接64516台主机,Internet有16256个B类地址。 3.C类IP地址 一个C类地址是由3个字节的网络地址和1个字节的主机地址组成,网络地址的最高位必须是“ll0”,...

阅读全文>>

标签: network

评论(0) 浏览(2546)

Powered by anycle 湘ICP备15001973号-1