04 2017 档案

摘要:传送门 Description Watchmen are in a danger and Doctor Manhattan together with his friend Daniel Dreiberg should warn them as soon as possible. There are 阅读全文
posted @ 2017-04-30 23:58 zxzhang 阅读(329) 评论(0) 推荐(0) 编辑
摘要:传送门 Description The prison of your city has n prisoners. As the prison can't accommodate all of them, the city mayor has decided to transfer c of the 阅读全文
posted @ 2017-04-30 23:49 zxzhang 阅读(239) 评论(0) 推荐(0) 编辑
摘要:std::pair是一个结构模板,提供了一种将两个异构对象存储为一个单元的方法. 定义于头文件 <utility> std::make_pair 创建一个std::pair对象,推导出目标类型的参数类型. 定义于头文件 <utility> 示例: pair与make_pair的示例 阅读全文
posted @ 2017-04-30 23:38 zxzhang 阅读(1700) 评论(0) 推荐(0) 编辑
摘要:使用STL中的map时候,有时候需要使用结构题自定义键值,比如想统计点的坐标出现的次数 这样子的话,会出现一堆报错 看着似乎满屏错误,其实就是少了一个键值比较函数,因为我们知道map插入键值后默认从小到大排序,使用自定义结构体作为键值,但是没有自定义比较函数的话,编译器无法为插入的元素排序。 这样子 阅读全文
posted @ 2017-04-30 23:15 zxzhang 阅读(1494) 评论(0) 推荐(2) 编辑
摘要:传送门 Description Daniel has a string s, consisting of lowercase English letters and period signs (characters '.'). Let's define the operation of replac 阅读全文
posted @ 2017-04-29 23:52 zxzhang 阅读(341) 评论(0) 推荐(0) 编辑
摘要:传送门 Amount of Degrees Time limit: 1.0 secondMemory limit: 64 MB Amount of Degrees Time limit: 1.0 secondMemory limit: 64 MB Description Create a code 阅读全文
posted @ 2017-04-28 17:41 zxzhang 阅读(299) 评论(0) 推荐(1) 编辑
摘要:传送门 Description Vasiliy has an exam period which will continue for n days. He has to pass exams on m subjects. Subjects are numbered from 1 to m. Abou 阅读全文
posted @ 2017-04-28 00:06 zxzhang 阅读(215) 评论(0) 推荐(0) 编辑
摘要:传送门 Description Vasiliy spent his vacation in a sanatorium, came back and found that he completely forgot details of his vacation! Every day there was 阅读全文
posted @ 2017-04-28 00:02 zxzhang 阅读(294) 评论(0) 推荐(0) 编辑
摘要:传送门 Description Mike has a sequence A = [a1, a2, ..., an] of length n. He considers the sequence B = [b1, b2, ..., bn] beautiful if the gcd of all its 阅读全文
posted @ 2017-04-23 21:21 zxzhang 阅读(194) 评论(0) 推荐(0) 编辑
摘要:传送门 Description Mike has n strings s1, s2, ..., sn each consisting of lowercase English letters. In one move he can choose a string si, erase the firs 阅读全文
posted @ 2017-04-23 10:19 zxzhang 阅读(275) 评论(0) 推荐(1) 编辑
摘要:今天在Ubuntu下编译C++代码,然后毫无防备的出现以下错误: 查阅了相关资料,__int64是VC++独有的,因此64位g++无法识别。 以下内容转载自:Byvoid 在C/C++中,64位整型一直是一种没有确定规范的数据类型。现今主流的编译器中,对64位整型的支持也是标准不一,形态各异。一般来 阅读全文
posted @ 2017-04-23 00:20 zxzhang 阅读(1534) 评论(0) 推荐(0) 编辑
摘要:传送门 Description The little girl loves the problems on array queries very much. One day she came across a rather well-known problem: you've got an arra 阅读全文
posted @ 2017-04-22 20:08 zxzhang 阅读(309) 评论(0) 推荐(0) 编辑
摘要:传送门 Description You have a positive integer m and a non-negative integer s. Your task is to find the smallest and the largest of the numbers that have 阅读全文
posted @ 2017-04-22 19:55 zxzhang 阅读(202) 评论(0) 推荐(0) 编辑
摘要:传送门 Description Every Codeforces user has rating, described with one integer, possibly negative or zero. Users are divided into two divisions. The fir 阅读全文
posted @ 2017-04-21 17:49 zxzhang 阅读(167) 评论(0) 推荐(0) 编辑
摘要:传送门 Description High school student Vasya got a string of length n as a birthday present. This string consists of letters 'a' and 'b' only. Vasya deno 阅读全文
posted @ 2017-04-21 16:28 zxzhang 阅读(179) 评论(0) 推荐(0) 编辑
摘要:传送门 Description When Valera has got some free time, he goes to the library to read some books. Today he's got t free minutes to read. That's why Valer 阅读全文
posted @ 2017-04-21 11:21 zxzhang 阅读(370) 评论(0) 推荐(0) 编辑
摘要:传送门 Description You've got array a[1], a[2], ..., a[n], consisting of n integers. Count the number of ways to split all the elements of the array into 阅读全文
posted @ 2017-04-21 01:22 zxzhang 阅读(226) 评论(0) 推荐(0) 编辑
摘要:传送门 Description Leonid wants to become a glass carver (the person who creates beautiful artworks by cutting the glass). He already has a rectangular w 阅读全文
posted @ 2017-04-20 23:19 zxzhang 阅读(318) 评论(0) 推荐(0) 编辑
摘要:参考资料: 极客学院IBMdeveloperWorks 重定向标准I/O Linux shell(比如Bash)接收或发送序列和字符串流形式的输入或输出。每个字符都独立于与之相邻的字符。字符没有被组织成结构化记录或固定大小的块。不管实际的字符串流进入或来自文件、键盘、显示窗口或其他 I/O 设备,都 阅读全文
posted @ 2017-04-20 00:20 zxzhang 阅读(338) 评论(0) 推荐(0) 编辑
摘要:因为 shell 频繁地使用文件名,所以shell有一个使命令行强大的特性, shell 提供了特殊字符来帮助我们快速指定一组文件名。这些特殊字符叫做通配符。使用通配符(也以文件名代换著称)允许我们依据字符类型来选择文件名。下表列出这些通配符以及它们所选择的对象: 接受文件名作为参数的任何命令,都可 阅读全文
posted @ 2017-04-19 16:38 zxzhang 阅读(847) 评论(1) 推荐(0) 编辑
摘要:我们知道,正则表达式(和有穷自动机)的数目是可数的,而语言的数目是不可数的,因此存在非正则语言。如何判定一个语言不是正则语言,这需要从正则语言的“本质”特性去讨论。 有穷自动机(DFA)是正则语言(RL)的识别模型。一个 DFA 只有有穷个状态,也就是说,当该DFA识别的语言 L 是无穷语言时,L 阅读全文
posted @ 2017-04-17 18:48 zxzhang 阅读(5633) 评论(1) 推荐(2) 编辑
摘要:一个编写良好的计算机程序常常具有良好的局部性(locality)。局部性通常有两种不同的形式:时间局部性(temporal locality)和空间局部性(spatial locality)。在一个具有良好时间局部性的程序中,被引用过一次的内存位置很可能在不远的将来再被多次引用。在一个具有良好空间局 阅读全文
posted @ 2017-04-16 18:19 zxzhang 阅读(1068) 评论(0) 推荐(0) 编辑
摘要:转载自:传送门 去年9月,twitter改版。 一个显著变化,就是URL加入了"#!"符号。比如,改版前的用户主页网址为 http://twitter.com/username 改版后,就变成了 http://twitter.com/#!/username 在我印象中,这是主流网站第一次将"#"大规 阅读全文
posted @ 2017-04-16 00:03 zxzhang 阅读(426) 评论(0) 推荐(0) 编辑
摘要:byzanz-record主要参数选项 安装byzanz-record 通过xwininfo获取窗口大小以及位置等信息 输入byzanz-record命令录制动态图 另外,有一个小工具xdotool可以获取鼠标的所在坐标,再根据所得的坐标位置来进行录制。 阅读全文
posted @ 2017-04-14 22:15 zxzhang 阅读(406) 评论(0) 推荐(0) 编辑
摘要:1、cmatrix 2、asciiquarium 阅读全文
posted @ 2017-04-14 21:48 zxzhang 阅读(305) 评论(0) 推荐(0) 编辑
摘要:Linux 下常见常用的压缩包文件格式有*.zip,*.rar,*.7z*.gz,*.xz,*.bz2,*.tar,*.tar.gz,*.tar.xz,*tar.bz2等后缀的压缩文件 ZIP zip压缩打包文件 zip命令文件压缩与解压 zip命令可以用来解压缩文件,或者对文件进行打包操作。zip 阅读全文
posted @ 2017-04-14 20:44 zxzhang 阅读(389) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示