摘要: input1 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include 11 #include 12 13 using ... 阅读全文
posted @ 2015-11-02 21:52 cdongyang 阅读(244) 评论(0) 推荐(0) 编辑
摘要: input长度不大于3*10e5的数字串output不含前导0的能整除64的字串的个数(0算一个,064不算)一般数组中找能整除一个数的字串都是用取余来做的用一个a[64]来存下从1-i位累加到第i位的余数为0-63的个数,每次都加上余数为0的个数,第一位为0的只统计一次,不加入a数组中 1 #in... 阅读全文
posted @ 2015-11-02 17:11 cdongyang 阅读(162) 评论(0) 推荐(0) 编辑
摘要: input 1<=T<=2000 2<=n<=10e5 a1 a2 ... an 1<=ai<=10e5 最多二十个n>1000 output 能否从数组中移除一个数使数组变为升序或降序,能输出YES,不能输出NO 做法,用后一个数减前一个数,统计正数的个数和负数的个数,如果全部为正或全部为负肯定可 阅读全文
posted @ 2015-11-02 10:09 cdongyang 阅读(395) 评论(0) 推荐(0) 编辑
摘要: input1=100outputmax((a[i]+a[j])^a[k]) i!=j!=k做法,将s数组建成一颗01字典树,枚举a[i]+a[j]找最大,找之前要把a[i]和a[j]删掉,找完后再插入 1 #include 2 #include 3 #include 4 #includ... 阅读全文
posted @ 2015-11-02 09:23 cdongyang 阅读(389) 评论(0) 推荐(0) 编辑
摘要: input1 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 11 using namespace std;12 13 int a[100010][2]... 阅读全文
posted @ 2015-11-01 10:54 cdongyang 阅读(220) 评论(0) 推荐(0) 编辑
摘要: input1val时,a[i+1]*b[j]>val 1 #include 2 #include 3 #include 4 using namespace std; 5 typedef long long LL; 6 7 const int MAXN = 100010; 8 9 int... 阅读全文
posted @ 2015-10-31 10:22 cdongyang 阅读(1295) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include #include #include #include #include #define lowbit(x) x&-xusing namespace std;int c[100010],a[20010],n,T,... 阅读全文
posted @ 2015-10-30 20:33 cdongyang 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include 11 12 using namespace std;13 1... 阅读全文
posted @ 2015-10-29 20:33 cdongyang 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 高效率移动编 1、在插入模式之外基本上来说,你应该尽可能少的呆在插入模式里面,因为在插入模式里面 VIM 就像一个“哑巴”编辑器一样。很多新手都会一直呆在插入模式里面,因为这样易于使用。但 VIM 的强大之处在于他的命令模式!你会发现,在你越来越了解 VIM 之后,你就会花越来越少的时间使用插入模式 阅读全文
posted @ 2015-10-29 15:57 cdongyang 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 1 " All system-wide defaults are set in $VIMRUNTIME/debian.vim and sourced by 2 " the call to :runtime you can find below. If you wish to change any o 阅读全文
posted @ 2015-10-28 23:09 cdongyang 阅读(270) 评论(0) 推荐(0) 编辑