HTML5 知识点(1)语义化标记 ,,,,,,,,,,(2)表单增强 ①新的INPUT类型: color, email, date, month, week, time, datetime, datetime-local, number, range, search, tel, url ②新属性:...
分类:
Web程序 时间:
2014-09-15 00:51:27
阅读次数:
303
HDU 5014 Number Sequence,二进制异或处理。...
分类:
其他好文 时间:
2014-09-14 23:46:17
阅读次数:
479
Problem Description
There is a special number sequence which has n+1 integers. For each number in sequence, we have two rules:
● ai ∈ [0,n]
● ai ≠ aj( i ≠ j )
For sequence a and sequence b, t...
分类:
其他好文 时间:
2014-09-14 23:41:28
阅读次数:
262
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5014解题报告:西安网赛的题,当时想到一半,只想到从大的开始匹配,做异或运算得到对应的b[i],但是少了一个操作,ans[i] = temp,却没有想到ans[temp] = i;所以就一直卡在这里了,因...
分类:
其他好文 时间:
2014-09-14 23:28:07
阅读次数:
219
HDU 5014 Number Sequence
题目链接
思路:对于0-n,尽量不让二进制中的1互相消掉就是最优的,那么只要两个数只要互补就可以了,这样每次从最大的数字,可以找到和他互补的数字,然后这个区间就能确定了,然后剩下的递归下去为一个子问题去解决
代码:
#include
#include
const int N = 100005;
int n, a[N]...
分类:
其他好文 时间:
2014-09-14 22:12:27
阅读次数:
220
HDU 5014 Number Sequence(异或 进制问题)...
分类:
其他好文 时间:
2014-09-14 22:10:27
阅读次数:
387
尽可能凑2^x-1
#include
#include
const int N = 100005;
int a[N], p[N];
int init(int x) {
int cnt = 0;
while(x > 1) {
x /= 2;
cnt ++;
}
return cnt + 1;
}
int main() {
int n;
while(~scanf("%d", ...
分类:
其他好文 时间:
2014-09-14 20:49:07
阅读次数:
165
Memory Limit:65536KTotal Submissions:4637Accepted:1180DescriptionGiven aN×Nmatrix A, whose element in thei-th row andj-th columnAijis an number that e...
分类:
其他好文 时间:
2014-09-14 20:43:07
阅读次数:
249
CREATE OR REPLACE FUNCTION TTD(V_DATE NUMBER) RETURN VARCHAR2 IS RESULT VARCHAR(100);BEGIN SELECT TO_CHAR(TO_DATE('1970-1-1 00:00:00', 'yyyy-mm-dd h.....
分类:
数据库 时间:
2014-09-14 20:38:37
阅读次数:
215
http://acm.hdu.edu.cn/showproblem.php?pid=5012Problem Description There are 2 special dices on the table. On each face of the dice, a distinct number ...
分类:
其他好文 时间:
2014-09-14 20:35:37
阅读次数:
269