Problem DescriptionYour task is to Calculate a + b.InputInput contains an integer N in the first line, and then N lines follow. Each line consists of ...
分类:
其他好文 时间:
2014-12-05 21:00:44
阅读次数:
327
Problem DescriptionYour task is to calculate the sum of some integers.InputInput contains an integer N in the first line, and then N lines follow. Eac...
分类:
其他好文 时间:
2014-12-05 20:59:08
阅读次数:
212
Problem DescriptionYour task is to calculate the sum of some integers.InputInput contains an integer N in the first line, and then N lines follow. Eac...
分类:
其他好文 时间:
2014-12-05 20:58:18
阅读次数:
147
Givennnon-negative integersa1,a2, ...,an, where each represents a point at coordinate (i,ai).nvertical lines are drawn such that the two endpoints of ...
分类:
其他好文 时间:
2014-12-04 21:33:43
阅读次数:
264
· 题意: 给n条线段,求某点上最多覆盖多少条线段。·hdu上有题解:1002 lines我们可以将一条线段[xi,yi]分为两个端点xi和(yi)+1,在xi时该点会新加入一条线段,同样的,在(yi)+1时该点会减少一条线段,因此对于2n个端点进行排序,令xi为价值1,yi为价值-1,问题转化成了...
分类:
其他好文 时间:
2014-12-04 21:32:08
阅读次数:
213
B:对于坐标先进行离散化,然后线性的扫一遍,常见的处理方式。
lines
Time Limit: 5000/2500 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 644 Accepted Submission(s): 298
Problem D...
分类:
其他好文 时间:
2014-12-02 10:39:54
阅读次数:
187
【题目】
Given n non-negative integers a1, a2,
..., an, where each represents a point at coordinate (i, ai). n vertical
lines are drawn such that the two endpoints of line i is at (i, ai) and (i,...
分类:
其他好文 时间:
2014-12-02 10:38:56
阅读次数:
170
lines
Time Limit: 5000/2500 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 620 Accepted Submission(s): 288
Problem Description
John has several lines...
分类:
其他好文 时间:
2014-12-01 22:28:18
阅读次数:
279
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5124题目意思:给出 n 条线段,每条线段用两个整数描述,对于第 i 条线段:xi,yi 表示该条线段的左端点和右端点。设 A 表示最多线段覆盖的点(当然这个 A 可以有多个啦,但这个无关紧要)。现在需要...
分类:
其他好文 时间:
2014-12-01 22:21:31
阅读次数:
156
#!/usr/bin/ruby
cpunum=`cat/proc/cpuinfo|grepprocessor|wc-l`.to_i
before={}
whiletrue
file=File.readlines(‘/proc/interrupts‘)
puts"ifnamecpu0cpu1cpu2cpu3cpu4cpu5cpu6cpu7cpu8cpu9cpu10cpu11"
file.eachdo|i|
ifi.include?("TxRx")
lines=i.split("")
print"#{lin..
分类:
其他好文 时间:
2014-12-01 16:18:08
阅读次数:
168