1~n 中找到一个最大的集合,使集合中不存在 a,b 两数,使 a*k==b。输出该集合中元素的数量。
(容斥原理) ...
分类:
其他好文 时间:
2020-02-04 21:59:31
阅读次数:
64
题目:https://vjudge.net/problem/UVA-232 分析:在输入的同时用序号对起始格标记,然后按照输出要求输出即可。(注意:本题最后一个样例末尾没有空行) 1 #include <stdio.h> 2 #include <string.h> 3 int main(void){ ...
分类:
其他好文 时间:
2020-02-04 15:47:18
阅读次数:
85
Some times ubuntu user disappeared, need to create the same user again and point to the same home drive, use below command id -u username sudo useradd ...
分类:
系统相关 时间:
2020-02-04 15:35:05
阅读次数:
92
这题初看题意还是比较友好的,相比于前面几题来说,思路并不是很难想。但是,题目描述误导我了很久,以至于我debug了很久,再次强调英语阅读理解的重要性(认真脸)。不过接下来就是无尽的TLE... 尝试了很多方法,但都没什么用,后来无奈只能查了网上的解法,发现最终的quote都是提前存好的,不是像我要算 ...
分类:
其他好文 时间:
2020-02-04 11:08:17
阅读次数:
89
题目:https://vjudge.net/problem/UVA-624 题目描述: 选CD填充时间,使CD所占总和尽可能大。 分析: 在总的时间内选尽可能大的。那么可以看成CD所占的时间是它的费用,也是它的价值。费用不超总时间。就是01背包了,还要选哪个,那就要记录一下路径。记录方法参照网上的博 ...
分类:
其他好文 时间:
2020-02-04 00:18:18
阅读次数:
67
Contest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges' favorite time is guessing the most popula ...
分类:
其他好文 时间:
2020-02-03 22:08:22
阅读次数:
85
本文编写的目的是为了,方便自己日后查看。 '>' 输出到文件中。文件不存在会创建。文件已存在,内容会被覆盖。文件时间会更新。 第一次输入'> test', 第二次输入'> test again', 发现内容 [root@localhost ~]# echo '> test' > echo.log [ ...
分类:
系统相关 时间:
2020-02-01 19:31:47
阅读次数:
104
题面:给出长度为n的数列,然后算出其区间和乘区间最小数所能得到的最大值,并且输出区间 样例输入: 6 3 1 6 4 5 2 样例输出: 60 3 5 原题链接:https://vjudge.net/problem/UVA-1619 分析: 这里有两种算法,一种是O(nlogn)的,用st表+递归, ...
分类:
其他好文 时间:
2020-02-01 19:29:46
阅读次数:
83
Problem DescriptionContest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges' favorite time is guess ...
分类:
其他好文 时间:
2020-02-01 16:05:23
阅读次数:
66
链接:https://vjudge.net/problem/UVA-1597#author=0 这题写了我一个晚上,然后debug了一个早上。。 最主要就是AND那一部分,一开始用了一个很奇怪的方法实现,就是利用set递增的性质,设置一个cur变量保存现在遍历到的文章下标的最大值,然后检查s1和s2 ...
分类:
Web程序 时间:
2020-02-01 14:16:01
阅读次数:
80