题目链接:hdu 5014 Number Sequence
题目大意:给定n,表示有0~n这n+1个数组成的序列a,要求构造一个序列b,同样是由0~n组成,要求∑ai⊕bi尽量大。
解题思路:贪心构造,对于n来说,找到n对应二进制的取反对应的数x,那么从x~n之间的数即可两两对应,然后x-1即是一个子问题。
#include
#include
#include
using n...
分类:
其他好文 时间:
2014-09-15 21:25:59
阅读次数:
207
给定数组表示的十进制数,加一操作。结果依然用十进制的数组表示。这里主要注意最高位(digit[0])依然有进位,即溢出的情况。
Given a non-negative number represented as an array of digits, plus one to the number.
The digits are stored such that the most si...
分类:
其他好文 时间:
2014-09-15 21:25:19
阅读次数:
236
实验:使用DBMS_FGA实现细粒度审计
1,创建测试表
TEST_USR1@PROD1> create table audit_test (x number );
Table created.
2,创建审计策略
TEST_USR1@PROD1> conn / as sysdba
Connected.
SYS@PROD1> begin
DBMS_FGA.ADD_POLICY (
...
分类:
数据库 时间:
2014-09-15 21:24:59
阅读次数:
294
Number Sequence
Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)
Total Submission(s): 545 Accepted Submission(s): 258
Special Judge
Problem Description
...
分类:
其他好文 时间:
2014-09-15 21:24:49
阅读次数:
341
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,...
分类:
其他好文 时间:
2014-09-15 21:22:10
阅读次数:
240
redis_version:2.4.16 # Redis 的版本redis_git_sha1:00000000redis_git_dirty:0arch_bits:64multiplexing_api:epollgcc_version:4.1.2 #gcc版本号process_id:10629 # ...
分类:
其他好文 时间:
2014-09-15 21:08:59
阅读次数:
204
题目以下思路参考自discuss:http://poj.org/showmessage?message_id=176353/*我的思路:1.将长串数分成一个个部分,每个部分是从1到x的无重复的数字序列2.每个序列比前一个序列多的位数是他的最后一个数的位数,如12345678910比123456789...
分类:
其他好文 时间:
2014-09-15 21:01:49
阅读次数:
186
<fx:Declarations>
<!--将非可视元素(例如服务、值对象)放在此处-->
<mx:ArrayListid="dataList">
<fx:int>10</fx:int>
<fx:String>8</fx:String>
<fx:Number>7.5</fx:Number>
<fx:uint>17</fx:uint>
<..
分类:
其他好文 时间:
2014-09-15 19:53:20
阅读次数:
183
HDU 1492 The number of divisors(约数) about Humble Numbers(数学题)...
分类:
其他好文 时间:
2014-09-15 19:32:29
阅读次数:
190
/*to solve the problem ,i think we can use stack to maintain the numbers,and list to keep it sorted,which is very important to find the Median number....
分类:
其他好文 时间:
2014-09-15 19:07:19
阅读次数:
181