就是找素数。很水的题。模糊搜索一道题搜到的。
但是却 TLE 2次。把所有的 long long 改成 int ,%lld 改成 %d 就神奇的过了。
简直不可思议。
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#def...
分类:
其他好文 时间:
2014-11-13 18:55:12
阅读次数:
176
查看linux系统哪些进程打开了file:
用lsof -p [进程ID] 可以看到某ID的打开文件状况。
进程ID可能用 ps -ef|grep java列出weblogic的进程ID,然后用此ID套入lsof -p ID号,咳,一大堆的请求哟,这显然是网络请求过多造成了 Too many open files。适当调整后便已消除这种现象。...
分类:
系统相关 时间:
2014-11-13 13:02:10
阅读次数:
466
这个以前一直没有碰到过,一次性向Mysql数据库插入内容过长的话会出现这个问题,解决办法就是在Mysql配置文件My.ini中找到[mysqld]选项,
在该选项下找到max_allowed_packet属性值(如果没有就自己加上),该属性值默认大小是1M,你可以根据自身项目需求进行更改。...
分类:
数据库 时间:
2014-11-13 12:57:06
阅读次数:
205
最近随着网站访问量的提高把web服务器移到linux下了,在移服务器的第二天,tomcat频繁的报java.net.SocketException: Too many open files错误,错误日志达到了100多兆,郁闷了,windows上运行了很长时间都没出现这个错误,后来才知道linux对进...
分类:
编程语言 时间:
2014-11-13 10:49:55
阅读次数:
191
I use the ubuntu and do not install the chinse input.The Code: c file requires gnu gsl library, it can be installed easily because many tutorial.Altho...
分类:
其他好文 时间:
2014-11-13 00:20:25
阅读次数:
382
Climbing StairsYou are climbing a stair case. It takesnsteps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct way...
分类:
其他好文 时间:
2014-11-12 16:24:33
阅读次数:
226
http://sd.csdn.net/a/20120127/311088.html作者Krishna Kumar是一名软件开发者,曾多次发表过软件开发、程序、项目管理、商业管理等相关议题文章,原文来自《How Many Hours Can a Programmer Program?》现对此文进行编译...
分类:
其他好文 时间:
2014-11-12 13:33:27
阅读次数:
211
Background
Trees are fundamental in many branches of computer science. Current state-of-the art parallel computers such as Thinking Machines' CM-5 are based on
fat trees. Quad- and octal-trees are f...
分类:
其他好文 时间:
2014-11-11 22:56:41
阅读次数:
239
A couple of years ago, a new world wide crisis started, leaving many people with economical problems. Some workers of a particular company are trying to ask for an increase in their salaries.
The c...
分类:
其他好文 时间:
2014-11-11 22:56:24
阅读次数:
285
Description
The SUM problem can be formulated as follows: given four lists
A, B, C, D of integer values, compute how many quadruplet
(a, b, c, d ) AxBxCxD
are such that a + b + c + d = 0 . In...
分类:
其他好文 时间:
2014-11-11 22:55:20
阅读次数:
173