C. Phone Numbers time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Vasya has several phone books, in which he recorded the telephone numbers of his friends. Each of his friends can have one or several phone numbers. Vasya decided to organize information about the phone numbers of friends. You will be given n strings — all entries from Vasya's phone books. Each entry starts with a friend's name. Then follow 继续阅读 >>


殷健翔 18/01/03 15:28:53
Trailing Zeroes (III) LightOJ - 1138 You task is to find minimal natural number N, so that N! contains exactly Q zeroes on the trail in decimal notation. As you know N! = 1*2*...*N. For example, 5! = 120, 120 contains one zero on the trail.大体题意:N!后面有Q个0,给你Q,求NInputInput starts with an integer T (≤ 10000), denoting the number of test cases.Each case contains an integer Q (1 ≤ Q ≤ 108) in a line.OutputFor each case, print the case number and&n 继续阅读 >>


殷健翔 18/01/02 14:23:23
前言 这几天做课设,Linux下的Huffman编码译码器,在命令行输入文件时希望能够实现自动补全,避免错误的同时使输入更加的便捷,于是便想到了暑假时的readline()函数,readline()函数确实很赞,可以与当前的Bash命令行进行交互 Readline库的安装 在Ubuntu下命令行安装 sudo apt-get install libreadline6-dev 这样Readline库就安装完成 Readline库的动态链接 然后进行一下小测试 #include<iostream> #include<readline/readline.h> using namespace std; int main() { char a[] = "please input a string\n"; char *input = readline(a); printf("%s\n",input); return 0; } 后来才知道Readline是一个动态链接库,对动态库链接需要找到它的位置 继续阅读 >>


殷健翔 18/01/02 14:05:06
前言 大二感觉真的特别水,第一次感觉到自己啥都不会,同时啥也不愿意学,整个人和一个废人差不多,博客也没怎么更新(说到底还是太懒,下面得替自己找个借口)这次的训练题实际算是半个月之前就已经做完,上个星期排出成绩,最近又是信号报告,数学建模上机报告,数据结构课程设计报告,搞得天天特别狼狈,而且这次的题的算法最终并没有实现,感觉能力还是欠缺了很多吧。 至于博客也不是神马论文,很多地方也不用那么文绉绉的吧,当然格式也不可能那么的规范。 问题重述 UNO的wiki “UNO是一种趣味性比较强的游戏,它基于颜色和数字不断的轮流出牌,并含有各种功能牌(大部分带有惩罚的性质),最终出完或者剩余牌计分最低的赢得比赛。 牌的类型 普通牌 有红,黄,蓝,绿四种颜色,每种颜色都有 0号牌1张 1-9号牌两张 共计76张 功能牌 有红,黄,蓝,绿四种颜色,每种颜色都有 阻挡牌(skip)2张 反转牌(reverse)2张 罚两张(draw tow)2张 共计24张 万能牌 可以当作任意颜色的牌打出,分两种: 变色牌(wild)4张 王牌(wild f 继续阅读 >>


殷健翔 18/01/02 08:39:46
转自:http://cppblog.com/menjitianya/archive/2015/12/02/212395.html 一、数论基本概念       1、整除性       2、素数            a.素数与合数            b.素数判定            c.素数定理            d.素数筛选法       3、因数分解            a.算术基本定理            b.素数拆分           继续阅读 >>


殷健翔 17/12/09 17:21:02
Aladdin and the Flying Carpet LightOJ - 1341 It's said that Aladdin had to solve seven mysteries before getting the Magical Lamp which summons a powerful Genie. Here we are concerned about the first mystery. Aladdin was about to enter to a magical cave, led by the evil sorcerer who disguised himself as Aladdin's uncle, found a strange magical flying carpet at the entrance. There were some strange creatures guarding the entrance of the cave. Aladdin could run, but he knew t 继续阅读 >>


殷健翔 17/12/09 17:15:38
异或运算概念和性质 在数字逻辑中,逻辑算符互斥或闸(exclusive or)是对两个运算元的一种逻辑分析类型,符号为XOR或EOR或⊕。与一般的逻辑或OR不同,当两两数值相同为否,而数值不同时为真。 两个运算元(命题):A与B的异或一般写成A异或B,A xor B,A ⊕ B,在C或C++中,用A^B表示 其实异或其实是一种二进制不进位加法 1 + 1 = 10                      1^1 = 0 1 + 0 = 01                      1^0 = 1 0 + 1 = 继续阅读 >>


殷健翔 17/12/04 20:49:19
D. Plus and xor time limit per test 0.5 second memory limit per test 256 megabytes input standard input output standard output Bitwise exclusive OR (or bitwise addition modulo two) is a binary operation which is equivalent to applying logical exclusive OR to every pair of bits located on the same positions in binary notation of operands. In other words, a binary digit of the result is equal to 1 if and only if bits on the respective positions in the operands are differe 继续阅读 >>


殷健翔 17/12/04 19:58:53
B. Painting Eggs time limit per test 5 seconds memory limit per test 256 megabytes input standard input output standard output The Bitlandians are quite weird people. They have very peculiar customs. As is customary, Uncle J. wants to have n eggs painted for Bitruz (an ancient Bitland festival). He has asked G. and A. to do the work. The kids are excited because just as is customary, they're going to be paid for the job! Overall uncle J. has got n eggs. G. named his pri 继续阅读 >>


殷健翔 17/11/30 17:32:05
前天给本地电脑虚拟机的Ubuntu系统安装FTP软件,结果没有安装成功,后面再安装其它软件就提示dpkg 被中断,您必须手工运行 sudo dpkg --configure -a解决此问题,但是即使运行sudo dpkg --configure -a也不能解决问题,也在百度上找了一些解决方法,可还是没有搞定,最后在Ubuntu的论坛里面找到了解决方法。 运行下面的命令即可解决 sudo rm /var/lib/dpkg/updates/*sudo apt-get updatesudo apt-get upgrade 主要原因应该是/var/lib/dpkg/updates 文件夹里面的资料有错误,使得更新软件的程序出现错误,所以得把它们完全删除,通过sudo apt-get update这个指令会重新建立这些资料,使用sudo apt-get upgrade更新你的电脑里面已安装的软件的明细,根据软件的明细更新软件到最新版。 英文好的可以看看这篇文章:http://ubuntuforums.org/archive/index.php/ 继续阅读 >>


殷健翔 17/11/29 21:59:24