题意:有n个数(n#include#includeusing namespace std;typedef __int64 ss;const ss mod=1000000007;int dp[1005][1080],t[1005][1080],n,s[1005],maxn;int p[1005][10...
分类:
其他好文 时间:
2014-08-03 20:22:25
阅读次数:
255
#include#include#include#include#include#includeusing namespace std;int main(){ int t,i,n,k; string s,ss,s1,s2; while(cin>>t) { ...
分类:
其他好文 时间:
2014-08-02 01:33:32
阅读次数:
238
/*
13 * 16 = 244
设为x进制数
解:
(1*x + 3) * (1*x + 3) = 2*x^2 + 4*x +4
x^2 + 9x + 18 = 2x^2 + 4x + 4
x^2 - 5x - 14 = 0
(x - 7)(x - 2) = 0
解得:
x = 7 或者 x = 2
接下来不用说了。。
*/...
分类:
其他好文 时间:
2014-07-31 17:19:16
阅读次数:
177
private string GetCurrentDateTime() { return DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss "); }
分类:
其他好文 时间:
2014-07-31 16:15:26
阅读次数:
207
1,配置DHCP服务器编辑DHCP服务器配置文件位置在/etc/dhcp/dhcpd.conf指定next-server以及filename2、配置tftpserver#yuminstalltftp-server安装tftp-server#chkconfigtftpon确保tftp启动#servicexinetdrestart重启超级守护进程#ss-unl|grep:69查看69号端口3、提供PXE的工作环..
分类:
其他好文 时间:
2014-07-31 03:15:56
阅读次数:
217
运算符是编程中用得最多的,其包括一元,二元和三元 三种运算符。swift也和其它编程语言一样基本就那些,下面总结一下,也有它特有的运算符,比如区间运算符
1、一元运算符
= 赋值运算符,用得最多的啦,其不带任何返回值
+
加法(数字相加,也可用于字符拼接var ss = "a"+"b")
- 减法
* 乘法
/
除法
%
求余(负号忽略,浮点数也可以求...
分类:
其他好文 时间:
2014-07-30 20:56:24
阅读次数:
176
题目链接:HDU 4891 The Great Pan
求一串字符有多少种不同的意思,其中关心‘{’,‘}’之间的‘|’。和‘$','$'之间的空格,连续N个空格算N+1种;
AC代码:
#include
#include
#include
using namespace std;
char s[2*1024*1024+10];
string ss;
int cnt;...
分类:
其他好文 时间:
2014-07-30 14:52:14
阅读次数:
177
沙坡鸣钟(调寄河传第三体)杨森翔树渺,沙远,黄流纹细,白堤微现。水一湾,浑脱船,一声锣鼓飞似箭。龙争虎斗到天上,放眼望:艨艟凝屏障;草初长,花欲狂,堪赏。鸣钟为谁响?
分类:
其他好文 时间:
2014-07-30 12:10:13
阅读次数:
192
宁夏新八[景之]一:古峡新韵古峡有名叫青铜,掷地铿锵倍有声。崖若斧劈留禹迹,峰形牛首隐仙踪。楼坛连嶂千岩秀,天水双绝百塔雄。北往南来登临客,无人不道快哉风。
分类:
其他好文 时间:
2014-07-30 12:08:33
阅读次数:
182
例1:char ss[100]=”0123456789”; Sizeof(ss)结果为100,ss表示在内存中预分配的大小,100*1; Strlent(ss)结果为10,它的内部实现是用一个循环计算字符串的长度,直到”\0”为止。例2:int ss[100]=”0123456789”; Sizeo...
分类:
其他好文 时间:
2014-07-29 17:03:02
阅读次数:
205