safe保险一点5吧。我是MR: 1 const int Safe=3; 2 int gcd(int a,int b){return !b?a:gcd(b,a%b);} 3 int mul(int a,int b,int p){ 4 int tmp=(a*b-(int)((double)a/...
分类:
其他好文 时间:
2015-06-08 19:26:08
阅读次数:
135
当出现如下代码:Scanner cin = new Scanner(System.in);int tmp = cin.nextInt();String str = cin.nextLine();System.out.println(str);输出结果是""因为nextLine( )截取了输入完int...
分类:
编程语言 时间:
2015-06-08 06:10:00
阅读次数:
136
--先创建测试库test_tmp --根据现有的表创建两张表 SELECTTOP100*INTOtest_tab1FROMmistest_09428.dbo.squarer; SELECTTOP100*INTOtest_tab2FROMmistest_09428.dbo.squarer; --创建角...
分类:
数据库 时间:
2015-06-07 23:00:24
阅读次数:
237
#include
#include
using namespace std;
#define N 1000005
int a[N],dp[N],maxpre[N];
int max(int a,int b)
{
return a>b?a:b;
}
int main()
{
int i,j,n,m,tmp;
while(scanf("%d%d",&m,&n)==2)
{
for(...
分类:
其他好文 时间:
2015-06-06 18:18:43
阅读次数:
330
分析:暴搜,复杂度一次最高也才12^5。
#include
#include
using namespace std;
#define N 30
char s[15],ts[10],ans[10];
int tar,index[N];
bool vis[N];
void dfs(int d,int n)
{
int i,tmp;
if(d==5)
{
tmp=index[ts[0...
分类:
其他好文 时间:
2015-06-06 15:01:19
阅读次数:
91
作者:Vashon
特点:简短但精辟
图片的上传是把图片本身保存在服务器目录文件夹下,保存的是临时文件(后缀为.tmp),而保存在数据库中的是图片的路径名(后缀还是.tmp;保存在数据库的同时要以流的形式写到服务器目录下),在页面中是从数据库中取出图片的路径名进行显示(虽然都是临时文件,但显示时是以图片形式显示)。...
分类:
Web程序 时间:
2015-06-06 13:37:52
阅读次数:
147
题意给一个N*N的方阵,找出一个子矩阵,使子矩阵的和最大。(n<=100)思路一维的情况是经典的”最大连续和问题”。我们考虑把二维的问题降到一维来。我们枚举最高的层和最低的层,把他们中间的值都加到一个tmp数组里,然后用tmp数组来做”最大连续和问题”,不断更新ans。那么最后得出的ans一定是最大子矩阵。代码#include
#include
#inclu...
分类:
其他好文 时间:
2015-06-06 09:12:18
阅读次数:
91
ct 任务nohup sh ./bin/start.sh /dev/null 2>&1 &中控机批量for h in `get_hosts_by_path xxx`;do { ssh $h 'cd /home/map/anticraw_tmp && nohup /home/map/php-fpm/b...
分类:
其他好文 时间:
2015-06-06 00:15:13
阅读次数:
149
#include#include#include#includeintmain(intargc,char*argv[]){intfd;intlock_result;structflocklock;char*pFileName="tmp.lck";fd=open(pFileName,O_RDWR);i...
分类:
系统相关 时间:
2015-06-05 16:59:40
阅读次数:
161
下面是官方的说明:源字符串--->结果字符串“/tmp/scratch.tiff”--->“scratch.tiff”“/tmp/scratch”--->“scratch”“/tmp/”--->“tmp”“scratch”--->“scratch”“/”--->“/”获取网络数据或者路径的文件名以及...
分类:
其他好文 时间:
2015-06-05 15:25:14
阅读次数:
147