03 2019 档案
摘要:走廊里有 nn 盏灯,编号依次为 1,2,3,...,n,由学校电路控制中心管理。初始时,所有灯都是关闭的。某黑客入侵了学校电路控制中心,黑客想让灯忽明忽暗,进行了 n 轮操作。第 i 轮操作,会让所有编号为 ii 的倍数的灯状态反转,也就是打开的变为关闭,关闭的变为打开。现在黑客想知道,n 轮操作
阅读全文
摘要:题目: 蒜头国有 nn 座城市,编号分别为 0,1,2,3,...,n-1。编号为 x 和 y 的两座城市之间如果要修高速公路,必须花费 x|y 个金币,其中|表示二进制按位或。 吝啬的国王想要花最少的价格修建高速公路,使得所有城市可以通过若干条高速公路互相达到。现在请你求出 n=2019 时,一共
阅读全文
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4811 题目描述: Problem Description Jenny likes balls. He has some balls and he wants to arrange them in a r
阅读全文
摘要:编译器不同,所占字节宽度是不相同,分别如下: 16位编译器: int: 2个字节 long: 4个字节 long long: 8个字节 unsigned long: 4个字节 32位编译器: int: 2个字节 long: 4个字节 long long: 8个字节 unsigned long: 4个
阅读全文
摘要:Problem Description Given three strings a, b and c , your mission is to check whether c is the combine string of a and b .A string c is said to be the
阅读全文
摘要:Problem Description As a cute girl, Kotori likes playing ``Hide and Seek'' with cats particularly.Under the influence of Kotori, many girls and cats a
阅读全文
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5705 题目: Problem Description Given a time HH:MM:SS and one parameter a , you need to calculate next tim
阅读全文
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4791 题目解释:给你一组数据s1,p1,s2,p2...sn,pn,一个数字q,问你当要打印q张资料时,最少花费是多少?值得注意的是p1>p2>p3>...>pn,就是因为看清这个条件,走了很多弯路。
阅读全文
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5701 题目: Problem Description 中位数定义为所有值从小到大排序后排在正中间的那个数,如果值有偶数个,通常取最中间的两个数值的平均数作为中位数。现在有n个数,每个数都是独一无二的,求
阅读全文
摘要:Pocky Let’s talking about something of eating a pocky. Here is a Decorer Pocky, with colorful decorative stripes in the coating, of length L. While th
阅读全文
摘要:Description There is a straight highway with villages alongside the highway. The highway is represented as an integer axis, and the position of each v
阅读全文
摘要:从外部环境import一个项目进入Java工作环境中,若出现以下错误,解决方法如下: 鼠标移上去,会出现以下错误提示: 解决方法: 选中该项目->右键->Build path->Configure build path->Libraries,若是因为第三个JRE System Library前方的提
阅读全文
摘要:代码:(完全背包) 其他解法详见:http://blog.sina.com.cn/s/blog_91e2390c01014b1u.html 假如3的个数为i,则剩余的需兑换的钱有n-3*i,剩余的对2来说,有可能有0,1,2...(n-3*i)/2;即有i个3的情况有 (n-3*i)/2+1个(2从
阅读全文
摘要:题目链接:http://poj.org/problem?id=1163 7 3 8 8 1 0 2 7 4 4 4 5 2 6 5 (Figure 1) Figure 1 shows a number triangle. Write a program that calculates the hig
阅读全文
摘要:题意:彼得有n支雪茄,每k个烟头可以换一支新雪茄,问彼得最多可以吸多少支雪茄 ? 当时自己做时,错在了直接在while循环开始前,便将雪茄的初始数量给加上了,然而应该是先处理后再加上最终剩余的雪茄数量。
阅读全文
摘要:1、:配置好相应环境和检查tomcat8.5能否运行,详见https://www.cnblogs.com/LJHAHA/p/10461697.html 2、将tomcat8.5下的webapps目录中所有内容备份到另一文件夹(bak)中,再清空webapps目录; 3、进入eclipse,配置好相应
阅读全文
摘要:首先: 了解我电脑中各类需要的软件的位置: 1、Java jdk1.8.0_191处在C盘目录下(C:\Program Files\Java\jdk1.8.0_191),Java jre1.8.0_191也处在该目录下(C:\Program Files\Java\jre1.8.0_191); 2、t
阅读全文
摘要:题目:http://acm.hdu.edu.cn/showproblem.php?pid=5745 C++ bitset的用法:https://www.cnblogs.com/magisk/p/8809922.html 题目: 题意:给两个字符串 a 和 b ,b可以进行变换,规则是可以任意交换相邻
阅读全文
摘要:链接:http://acm.hdu.edu.cn/showproblem.php?pid=4035 题意: 有n个房间,由n-1条隧道连通起来,实际上就形成了一棵树, 从结点1出发,开始走,在每个结点i都有3种可能: 1.被杀死,回到结点1处(概率为ki) 2.找到出口,走出迷宫 (概率为ei) 3
阅读全文
摘要:描述 Diablo III is an action role-playing video game. A few days ago, Reaper of Souls (ROS), the new expansion of Diablo III, has been released! On hear
阅读全文
摘要:链接:http://acm.hdu.edu.cn/showproblem.php?pid=4747 题目大意:给一个含有n个数的序列 ns[1~n],定义函数 mex(l,r)为区间 [l,r] 中未出现的最小的非负整数,求序列ns所有区间的 mex 和。 Sample Input Sample O
阅读全文

浙公网安备 33010602011771号