test

Codeforces Round #301 (Div. 2)(A,【模拟】B,【贪心构造】C,【DFS】)

淺唱寂寞╮ 提交于 2020-02-10 05:21:00
A. Combination Lock time limit per test:2 seconds memory limit per test:256 megabytes input:standard input output:standard output Scrooge McDuck keeps his most treasured savings in a home safe with a combination lock. Each time he wants to put there the treasures that he's earned fair and square, he has to open the lock. The combination lock is represented by n rotating disks with digits from 0 to 9 written on them. Scrooge McDuck has to turn some disks so that the combination of digits on the disks forms a secret combination. In one move, he can rotate one disk one digit forwards or backwards

Codeforces Round #315 (Div. 2) (ABCD题解)

霸气de小男生 提交于 2020-02-10 05:20:46
比赛链接: http://codeforces.com/contest/569 A. Music time limit per test:2 seconds memory limit per test:256 megabytes Little Lesha loves listening to music via his smartphone. But the smartphone doesn't have much memory, so Lesha listens to his favorite songs in a well-known social network InTalk. Unfortunately, internet is not that fast in the city of Ekaterinozavodsk and the song takes a lot of time to download. But Lesha is quite impatient. The song's duration is T seconds. Lesha downloads the first S seconds of the song and plays it. When the playback reaches the point that has not yet been

开源数据集

纵饮孤独 提交于 2020-02-10 03:00:30
Images Analysis 数据集 介绍 备注 网址 Flickr30k 图片描述 31,783 images,每张图片5个语句标注 链接 Microsoft COCO 图片描述 330,000 images,每张图片至少5个语句标注 链接 ESP Game 多标签定义图像 20,770 images,268 tags,诸如bed, light man,music 链接 IAPRTC-12 多标签定义图像 19,452 images,291 tags 链接 NUS-WIDE 多标签定义图像 269,648 images,several tags (2-5 on average) per image 链接 CUHK-PEDES 以文搜图 34,054 images,每张图片2条描述 链接 VRD 视觉关系检测 5,000 images, 100目录,37,993对关系 链接 sVG 视觉关系检测 108,000 images, 998,000对关系 链接 Visual Genome Dataset 图像属性检测 108,077 images, 5.4 M 区域块,2.8 M 属性,2.3 M 关系 链接 VQA 问答系统 1,105,904问题,11,059,040 回答 链接 Visual7W 问答系统 327,939 问答对 链接 TID2013 图像质量评价 25张参考图像

【One by one系列】一步步学习docker

帅比萌擦擦* 提交于 2020-02-10 02:18:06
Docker Build,Ship and Anywhere 1.基本概念 Docker Client:Docker提供给用户的客户端,功能就是提供给用户一个终端,用户输入docker提供的命令来管理本地或者远程的服务器。 Docker Server:Docker Daemon是主要组成部分,Docker服务的守护进程,功能接受Docker Client发过来的指令请求,并按照相应的路由规则实现路由分发。 Docker Images:Docker镜像,类比电脑装系统的CD盘,只读的CD Docker Registry:Docker Images的仓库,类比git,有私人的,有公共的,如github,docker提供了官方的Registry,Dock Hub Docker Container:Docker 容器,在容器里,跑项目程序、消耗机器资源、提供服务的地方;容器(Docker Container)通过镜像(Docker Images)启动,在镜像的基础上运行程序。可以理解为容器提供了硬件环境,然后使用了镜像这些制作好的系统盘,再加上项目程序,跑起来就可以提供服务。 理解上图:搭载Docker的主机,通过Docker Client使用 docker build docker pull docker run 让Docker Daemon从Docker

线性回归实战

白昼怎懂夜的黑 提交于 2020-02-09 23:07:26
import pandas as pd from sklearn.linear_model import LinearRegression from sklearn.model_selection import train_test_split from sklearn.preprocessing import StandardScaler from sklearn.metrics import mean_squared_error,r2_score data = pd.read_csv('./Desktop/汽车销售数据.csv') data.head() #查看数据是否有空值 data.isnull().any() out: 券代码 False 日期 False 传统汽车销量 False 国内生产总值当季值(亿元)x1 False 汽油价格(元/吨)x2 False 人民币贷款基准利率%x3 False 汽车总产量(万辆)x4 False 公路里程数 False 汽车整车股票指数 False 消费者信心指数 False #去除空值 data = data.dropna() #划分训练集与测试集 X = data.iloc[:,3:] Y = data.iloc[:,2] x_train,x_test,y_train,y_test = train_test_split(X,Y

Unity Shader Early-Z技术

老子叫甜甜 提交于 2020-02-09 23:06:08
Early-Z技术 传统的渲染管线中,ZTest其实是在Blending阶段,这时候进行深度测试,所有对象的像素着色器都会计算一遍,没有什么性能提升,仅仅是为了得出正确的遮挡结果,会造成大量的无用计算,因为每个像素点上肯定重叠了很多计算。 因此现代GPU中运用了Early-Z的技术,在Vertex阶段和Fragment阶段之间(光栅化之后,fragment之前)进行一次深度测试,如果深度测试失败,就不必进行fragment阶段的计算了,因此在性能上会有很大的提升。但是最终的ZTest仍然需要进行,以保证最终的遮挡关系结果正确。 前面的一次主要是Z-Cull为了裁剪已达到优化的目的,后一次主要是Z-Check,为了检查,如下图: Early-Z的实现,主要是通过一个Z-pre-pass显示,简单来说,对于所有不透明的物体(透明的没有用,本身不会写入深度),首先用一个超级简单的shader进行渲染,这个shader不写入颜色缓冲区,只写深度缓冲区,第二个pass关闭深度写入,开启深度测试,用正常的shader进行渲染。其实这种技术,我们也可以借鉴,在渲染透明物体时,因为关闭了深度写入,有时候会有其他不透明的部分遮挡住透明的部分,而我们其实不希望他们被遮挡,仅仅希望被遮挡的物体半透,这时我们就可以用两个pass来渲染,第一个pass使用Color Mask屏蔽颜色写入,仅写入深度

【Spring】JdbcTemplate函数接口方法:RowMaper、RowCallbackhandler、ResultSetExtractor、PreparedStatementCreator

瘦欲@ 提交于 2020-02-09 19:47:30
文章目录 RowMaper的使用 RowCallbackhandler的使用 ResultSetExtractor的使用 PreparedStatementCreator的使用 PreparedStatementSetter的使用 ConnectionCallback的使用 StatementCallback RowMapper与RowCountCallbackHandler使用对比 总结 RowMaper的使用 /** * RowMaper Test */ @Test public void test_RowMapper ( ) { //学生成绩表字段映射类 -- 局部内部类 class Score { private Integer id ; private String sid ; private Integer chinese ; private Integer math ; private Integer english ; public Integer getId ( ) { return id ; } public void setId ( Integer id ) { this . id = id ; } public String getSid ( ) { return sid ; } public void setSid ( String sid ) {

[HDU1074]Doing Homework (状压DP)

走远了吗. 提交于 2020-02-09 19:33:15
Ignatius has just come back school from the 30th ACM/ICPC. Now he has a lot of homework to do. Every teacher gives him a deadline of handing in the homework. If Ignatius hands in the homework after the deadline, the teacher will reduce his score of the final test, 1 day for 1 point. And as you know, doing homework always takes a long time. So Ignatius wants you to help him to arrange the order of doing homework to minimize the reduced score. InputThe input contains several test cases. The first line of the input is a single integer T which is the number of test cases. T test cases follow. Each

第八课 正则表达式

末鹿安然 提交于 2020-02-09 17:32:48
正则表达式 示例1(新建名为grep.txt文件) ooxx12121212ooxx ooxx 12121212 oox 12121212 1212 ooxx 1212 oo3xx oo4xx ooWxx oomxx $ooxx oo1234xx ooxyzxx 键入如下命令 grep "\(^[0-9]\|[^0-9][0-9]\)[0-9]\{2\}\([0-9][^0-9]\|[0-9]$\)" grep.txt grep -E "^[0-9]{4}[^0-9]|[^0-9][0-9]{4}[^0-9]|[^0-9][0-9]{4}$|^[0-9]{4}$" grep.txt 示例2(新建test文件) aaabbcaaa aa bbc aaa bb bbc bbb asgodssgoodsssagodssgood asgodssgoodsssagoodssgod sdlkjflskdjf3slkdjfdksl slkdjf2lskdjfkldsjl 键入如下指令 cat test 51 grep "a" test 52 grep "a\{3\}" test 53 grep "\<aaa" test 54 grep "\<aaa\>" test 55 grep "b" test 56 grep "b\{2,3\}" test 57 clear 58 cat test 59