Continuous Login Time Limit: 2 Seconds      Memory Limit: 131072 KB      Special Judge Pierre is recently obsessed with an online game. To encourage users to log in, this game will give users a continuous login reward. The mechanism of continuous log…
problem description http://acm.hdu.edu.cn/showproblem.php?pid=1030 #include <cstdio> #include <cmath> #include <algorithm> int calPathLength(int x, int y) { //path length from 1 (1st line, lower) to a number in ith line is only differ by…
哈密顿绕行世界问题 Time Limit : 3000/1000ms (Java/Other)   Memory Limit : 32768/32768K (Java/Other) Total Submission(s) : 66   Accepted Submission(s) : 33 Font: Times New Roman | Verdana | Georgia Font Size: ← → Problem Description 一个规则的实心十二面体,它的 20个顶点标出世界著名的…
UIkit动力学是UIkit框架中模拟真实世界的一些特性. UIDynamicAnimator 主要有UIDynamicAnimator类,通过这个类中的不同行为来实现一些动态特性. 它一般有两种初始化方法,先讲常见的第一种 ? 1 animator= [[UIDynamicAnimator alloc] initWithReferenceView:self.view]; 动态特性的实现主要依靠它所添加的行为,通过以下方法进行添加和移除, ? 1 2  [animator addBehavior…
Ranking System Time Limit: 2 Seconds      Memory Limit: 65536 KB Few weeks ago, a famous software company has upgraded its instant messaging software. A ranking system was released for user groups. Each member of a group has a level placed near his n…
转载自 Blog of 天外的星星: http://www.cnblogs.com/leo-lsw/p/log4j2tutorial.html Log4j 2的好处就不和大家说了,如果你搜了2,说明你对他已经有一定的了解,并且想用它,所以这里直接就上手了. 1. 去官方下载log4j 2,导入jar包,基本上你只需要导入下面两个jar包就可以了(xx是乱七八糟的版本号): log4j-core-xx.jar log4j-api-xx.jar 2. 导入到你的项目中:这个就不说了. 3. 开始使用…
先打个广告: .Net交流群:252713569 本人QQ :524808775 欢迎技术探讨, 近期公司要求上传的PPT和Word都需要可以在线预览.. 小弟我是从来没有接触过这一块的东西 感觉很棘手..不过网络是强大的,还是让我找到了解决方案,记载一下. 要实现无任何插件的预览,swf文件是比较好的. PDF则需要有这个插件才能预览..那么转换的过程如下 以PPT 为例 : PPT →(由ASPOSE转换)→ PDF文件 →(由pdf2swf转换)→Swf文件  最终由EXTJS嵌入Flex…
Speed Limit Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 17967   Accepted: 12596 Description Bill and Ted are taking a road trip. But the odometer in their car is broken, so they don't know how many miles they have driven. Fortunately…
数据结构上机测试2-2:单链表操作B TimeLimit: 1000ms Memory limit: 65536K 题目描述 按照数据输入的相反顺序(逆位序)建立一个单链表,并将单链表中重复的元素删除(值相同的元素只保留最后输入的一个). 输入 第一行输入元素个数n: 第二行输入n个整数. 输出 第一行输出初始链表元素个数: 第二行输出按照逆位序所建立的初始链表: 第三行输出删除重复元素后的单链表元素个数: 第四行输出删除重复元素后的单链表. 示例输入 10 2130 14 55 32 63 1…
as Scott Meyers said in his book Effective STL, "My advice on choosing among the sorting algorithms is to make your selection based on what you need to accomplish, not on performance considerations. If you choose an algorithm that does only what you…
B. Sagheer, the Hausmeister time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Some people leave the lights at their workplaces on when they leave that is a waste of resources. As a hausmeiste…
乘积最大 今年是国际数学联盟确定的"2000--世界数学年",又恰逢我国著名数学家华罗庚先生诞辰90周年.在华罗庚先生的家乡江苏金坛,组织了一场别开生面的数学智力竞赛的活动,你的一个好朋友XZ也有幸得以参加.活动中,主持人给所有参加活动的选手出了这样一道题目: 设有一个长度为N的数字串,要求选手使用K个乘号将它分成K+1个部分,找出一种分法,使得这K+1个部分的乘积能够为最大. 同时,为了帮助选手能够正确理解题意,主持人还举了如下的一个例子: 有一个数字串:312, 当N=3,K=1时…
the 2 version are essentially the same, except version 2 search from the larger end, which reduce the search time in extreme condition from linear to constant, so be faster. version 1 #include <cstdio> #include <algorithm> struct LWPair{ int l…
1.算法简介 1.1筛法起源 筛法是一种简单检定素数的算法.据说是古希腊的埃拉托斯特尼(Eratosthenes,约公元前274-194年)发明的,又称埃拉托斯特尼筛法(sieve of Eratosthenes). 1.2筛法过程 具体做法是:给出要筛数值的范围 n,找出 n√以内的素数p1,p2,p3,--,pk.从最小素数2去筛,即把2留下,把2的倍数剔除掉:再用下一个素数,也就是3筛,把3留下,把3的倍数剔除掉:接下去用下一个素数5筛,把5留下,把5的倍数剔除掉:不断重复下去. 2.实现…
Labeling Balls Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 11893 Accepted: 3408 Description Windy has N balls of distinct weights from 1 unit to N units. Now he tries to label them with 1 to N in such a way that: No two balls share the…
bit masking is very common on the lower level code. #include <cstdio> #include <algorithm> #define MAXSIZE 205 char line[MAXSIZE]; int main() { //freopen("input.txt","r",stdin); int x,y, dir; // (dir&3) 0,1,2,3 -- right…
partial sort. first use std::nth_element to find pivot, then use std::stable_partition with the pivot to partition the largest k, whose indices are in acsending order, print them in reverse order. p.s. lambda expression is also used. STL is powerful.…
#include <cstdio> #include <iostream> #include <cstring> #include<queue> using namespace std; const int INF = 0x3fffffff; int g[1005][1005]; bool vis[1005]; int m; int Edmond_Karp(int s,int t) { int pre[1005]; int flow[1005]; memse…
代码如下: import java.awt.FlowLayout; import java.awt.Frame; import java.awt.GridLayout; import javax.swing.BorderFactory; import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.…
覆盖的面积 Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 3553    Accepted Submission(s): 1743 Problem Description 给定平面上若干矩形,求出被这些矩形覆盖过至少两次的区域的面积.   Input 输入数据的第一行是一个正整数T(1<=T<=100),代表测试数据的数量.每个测…
这题目看一眼以为难度评级出错了,只是一个求余数的题目,,后来才发现,位数小于百万位,,,我还以为是大小小于百万呢,所以借鉴了另一大神的代码, 用大数,重点是同余定理: (a+b)mod m=((a mod m)+(b mod m))mod m; a*b mod m=(a mod m)*(b mod m) mod m; a^b mod m=(a mod m)^b mod m; #include<stdio.h> #include<string.h> #include<stdli…
#include<cstdio> #include<cstring> #include<vector> using namespace std; int pre[100005]; vector<int>v[100005]; void DFS(int cur) { for(int i = 0; i < v[cur].size(); ++i) { if(pre[v[cur][i]]) continue; //若存在父节点则继续遍历 pre[v[cur][i…
#include<stdio.h> int main(){ long long a,b,c,d,e,f; while(scanf("%lld%lld%lld%lld%lld%lld",&a,&b,&c,&d,&e,&f)!=EOF){ if(a*c*e*b*d*f==0){ if(d==0)printf("Hermione"); else{ if(c==0)printf("Ron");…
下载地址1:https://securityswitch.googlecode.com/files/SecuritySwitch%20v4.2.0.0%20-%20Binary.zip 下载地址2:http://url.cn/SOzKPC 1.将下载的"SecuritySwitch.dll"文件放在bin文件夹中,然后添加"SecuritySwitch"引用 2.打开web.config文件为您的web应用程序,或网站,添加如下的配置(注意···线条所包含的地方就是…
(1)DECLARE 两种用法: 1>: DECLARE @usid VARCHAR(50),@usna NVARCHAR(100),@grna NVARCHAR(100); 2>: DECLARE @usid VARCHAR(50) DECLARE @usna NVARCHAR(100) DECLARE @grna NVARCHAR(100) (2)select 1 from mytable select 1 from mytable;(一般是作条件用的) select anycol(目的表…
说明: (1)支持Window 7系统,但是xp系统智能朗读英文和数字: (2)添加引用 Interop.SpeechLib.dll; (3)使用时调用StringToVoice(str)即可. using SpeechLib; /// <summary> /// 把字符串转换成声音 /// </summary> /// <param name="str">要朗读的字符串</param> public static void String…
<strong><span style="font-size:18px;">(1)INI文件的名称:FileConfig.ini</span></strong> <span style="font-family: Arial, Helvetica, sans-serif;"><span style="font-size:14px;"><strong>(2)实现代码…
在linux下一般用scp这个命令来通过ssh传输文件. 1.从服务器上下载文件 scp username@servername:/path/filename /var/www/local_dir(本地目录) 例如scp root@192.168.0.101:/var/www/test.txt 把192.168.0.101上的/var/www/test.txt 的文件下载到/var/www/local_dir(本地目录) 2.上传本地文件到服务器 scp /path/filename usern…
1.sh -x script 这将执行脚本并显示所有变量的值 如,脚本: #!/bin/bash #a test about shift if [ $# -le 0 ] then echo "there is no parameters" exit 0 fi sum=0 while [ $# -gt 0 ] do sum=`expr $sum + $1` shift done echo $sum 输出: 2.sh -n script 不执行脚本,只是检查语法模式,将返回所有的语法错误…
1.启动IIS管理器,点击开始菜单->所有程序->管理工具->Internet信息服务(IIS)管理器: 2.选择"服务器证书": 3.在右边窗口,选择"导入" 4.导入CA签好的私钥证书文件 5.证书导入成功,如下图: 6.将SSL证书和网站绑定,先选择需要使用证书的网站,右击后点击"编辑绑定" 7.添加一个新的绑定: 8.将类型改为HTTPS,端口改为443,然后选择刚才导入的SSL证书,点击"确定",则…