Let's denote a function f(x)f(x) in such a way: we add 11 to xx , then, while there is at least one trailing zero in the resulting number, we remove t ...
分类:
其他好文 时间:
2019-05-09 22:02:39
阅读次数:
336
题目描述 在一条环形公路旁均匀地分布着N座仓库,编号为1~N,编号为 i 的仓库与编号为 j 的仓库之间的距离定义为 dist(i,j)=min?(|i-j|,N-|i-j|),也就是逆时针或顺时针从 i 到 j 中较近的一种。每座仓库都存有货物,其中编号为 i 的仓库库存量为 Ai。在 i 和 j ...
分类:
其他好文 时间:
2019-05-02 21:28:46
阅读次数:
216
from sklearn.metrics import zero_one_loss,log_loss def test_zero_one_loss(): y_true=[1,1,1,1,1,0,0,0,0,0] y_pred=[0,0,0,1,1,1,1,1,0,0] print("zero_one... ...
分类:
编程语言 时间:
2019-05-02 14:30:57
阅读次数:
327
1100 Mars Numbers (20 分) 1100 Mars Numbers (20 分) 1100 Mars Numbers (20 分) People on Mars count their numbers with base 13: Zero on Earth is called "t ...
分类:
其他好文 时间:
2019-05-01 01:43:27
阅读次数:
126
原文:WPF Bitmap转Imagesource var imgsource = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(bmp.GetHbitmap(),IntPtr.Zero,Int32Rect.Empty,Bi... ...
定义: 定义: 提供一个创建一系列相关或相互依赖对象的接口,而无需指定他们具体的类。 结构:(书中图,侵删) 这个图相对来说有一点点复杂,其实就是在工厂方法模式的基础上做了一些扩展,工厂方法模式只用于生成一种产品(把上图ProductB相关的都去掉就是了),而抽象工厂模式可用于生产多种产品。 加上例 ...
分类:
其他好文 时间:
2019-04-27 09:41:31
阅读次数:
133
文件类型- 普通文件d 目录文件b 块设备c 字符设备l 符号链接文件p 管道文件pipes 套接字文件socket ——————————————————————目录sbin 系统管理员存放的执行工具bin 普通用户执行工具boot 启动内核文件dev /sda以块存放/zero
分类:
其他好文 时间:
2019-04-26 09:31:32
阅读次数:
164
int readable_timeo(int fd, int sec) { fd_set rset; struct timeval tv; FD_ZERO(&rset); FD_SET(fd, &rset); tv.tv_sec = sec; tv.tv_usec = 0; return (sele... ...
分类:
其他好文 时间:
2019-04-24 17:48:20
阅读次数:
143
题目描述 给出平面上的n个点,现在需要你求出,在这n个点里选3个点能构成一个三角形的方案有几种。 输入描述: 第一行包含一个正整数n,表示平面上有n个点(n <= 100)第2行到第n + 1行,每行有两个整数,表示这个点的x坐标和y坐标。(所有坐标的绝对值小于等于100,且保证所有坐标不同) 输出 ...
分类:
其他好文 时间:
2019-04-24 14:49:40
阅读次数:
153
题意 C. Gerald and Giant Chesstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputGiant chess is quite ...
分类:
其他好文 时间:
2019-04-23 09:46:30
阅读次数:
140