3728 联合权值 时间限制: 1 s 空间限制: 128000 KB 题目等级 : 黄金 Gold 题解 查看运行结果 3728 联合权值 3728 联合权值 时间限制: 1 s 空间限制: 128000 KB 题目等级 : 黄金 Gold 时间限制: 1 s 空间限制: 128000 KB 题目 ...
分类:
其他好文 时间:
2017-02-05 11:20:33
阅读次数:
275
1、事件委托原理 利用事件冒泡,事件绑定到父元素上,点击子元素的时候,委托父元素触发事件。2、js短路运算 条件语句的简写 例如:if(a >=6){ alert("你好"); } 可以简成: a >= 6 && alert("你好"); 3、获取某月的最后一天 new Date(2016,12,0 ...
分类:
编程语言 时间:
2017-02-05 11:16:04
阅读次数:
174
http://www.lydsy.com/JudgeOnline/problem.php?id=2154 (题目链接) 题意 给出${n,m}$,求$${\sum_{i=1}^n\sum_{j=1}^mlcm(i,j)}$$ Solution 莫比乌斯反演,推啊推式子。 \begin{aligned ...
分类:
其他好文 时间:
2017-02-05 10:59:09
阅读次数:
152
给你一列数, 询问和最大的子串. N<=10^6 啊!!!好巧妙,幸亏当时记了笔记。。。 给你两列数 A; B, 定义一个子串 [l; r] 的权值为 ∑r i=l Ai除以∑r i=l Bi 问权值最大的子串n ≤ 10^5. ...
分类:
其他好文 时间:
2017-02-05 10:55:48
阅读次数:
211
Summarize other answers I found 11 main ways to do this (see below). And I wrote some performance tests (see results below):Ways to convert an InputSt ...
分类:
编程语言 时间:
2017-02-05 10:49:35
阅读次数:
339
如果采用 void sig_chld(int signo) { pid_t pid; int stat; while((pid = waitpid(-1, &stat, WNOHANG)) > 0){ printf("child %d terminated\n", pid); } return; } ...
分类:
其他好文 时间:
2017-02-04 23:17:52
阅读次数:
169
A - D-query Time Limit:1500MS Memory Limit:0KB 64bit IO Format:%lld & %llu A - D-query Given a sequence of n numbers a1, a2, ..., an and a number of d ...
分类:
其他好文 时间:
2017-02-04 22:23:15
阅读次数:
253
hdu-2027题(水题~~~) 统计每个元音字母在字符串中出现的次数。 Input输入数据首先包括一个整数n,表示测试实例的个数,然后是n行长度不超过100的字符串。 Output对于每个测试实例输出5行,格式如下: a:num1 e:num2 i:num3 o:num4 u:num5 多个测试实 ...
分类:
其他好文 时间:
2017-02-04 22:15:25
阅读次数:
204
题目背景 在成功地发明了魔方之后,鲁比克先生发明了它的二维版本,称作魔板。这是一张有8个大小相同的格子的魔板: 1 2 3 4 8 7 6 5 题目描述 我们知道魔板的每一个方格都有一种颜色。这8种颜色用前8个正整数来表示。可以用颜色的序列来表示一种魔板状态,规定从魔板的左上角开始,沿顺时针方向依次 ...
分类:
其他好文 时间:
2017-02-04 22:11:27
阅读次数:
251