| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
Re:仅供参考In Reply To:仅供参考 Posted by:handle2 at 2009-08-07 12:09:31 我也贴一下
#include <iostream>
using namespace std;
int main()
{
int queryCount = 0, root = 0;
cin >> queryCount;
while (queryCount -- > 0)
{
cin >> root;
int d = root ^ (root | (root - 1));
cout << root - d << ' ' << root + d << endl;
}
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator