主页
题目
状态
排名
OI排名
统计
题解
请登录
常用链接
AOJ考试平台
老赵的Gitee代码
编译原理模拟考试平台
Java技术手册
FCC网站
菜鸟网
在线工具箱
字节豆包GPT
代码可视化
力扣网
牛客网
洛谷
杭电OJ
CodeForce
隐藏编译器
Problem B: Just Skip The Problem
上一题
正确率: $63.64\%$
下一题
Time Limit
$1$ 秒/Second(s)
Memory Limit
$512$ 兆字节/Megabyte(s)
提交总数
$11$
正确数量
$7$
"
裁判形式
标准裁判/Standard Judge
我的状态
尚未尝试
难度
分类标签
×
为本题添加算法分类(请不要超过5个)
当前分类(单击移除):
单击选择分类:
Description
<span style="font-family:Merriweather, serif;font-size:18px;background-color:rgba(210, 210, 255, 0.5);">Y_UME has just found a number </span>x<span style="font-family:Merriweather, serif;font-size:18px;background-color:rgba(210, 210, 255, 0.5);"> in his right pocket. The number is a non-negative integer ranging from </span>0<span style="font-family:Merriweather, serif;font-size:18px;background-color:rgba(210, 210, 255, 0.5);"> to </span>2^n−1<span style="font-family:Merriweather, serif;font-size:18px;background-color:rgba(210, 210, 255, 0.5);"> inclusively. You want to know the exact value of this number. Y_UME has super power, and he can answer several questions at the same time. You can ask him as many questions as you want. But you must ask all questions simultaneously. In the </span>i<span style="font-family:Merriweather, serif;font-size:18px;background-color:rgba(210, 210, 255, 0.5);">-th question, you give him an integer </span>yi<span style="font-family:Merriweather, serif;font-size:18px;background-color:rgba(210, 210, 255, 0.5);"> ranging from </span>0<span style="font-family:Merriweather, serif;font-size:18px;background-color:rgba(210, 210, 255, 0.5);"> to </span>2^n−1<span style="font-family:Merriweather, serif;font-size:18px;background-color:rgba(210, 210, 255, 0.5);"> inclusively, and he will answer you if </span>x&yi<span style="font-family:Merriweather, serif;font-size:18px;background-color:rgba(210, 210, 255, 0.5);"> equals to </span>yi<span style="font-family:Merriweather, serif;font-size:18px;background-color:rgba(210, 210, 255, 0.5);"> or not. Note that each question you ask has a index number. Namely, the questions are ordered in certain aspect. Note that Y_UME answer all questions at the same time, which implies that you could not make any decision on the remaining questions you could ask according to some results of some of the questions. </span><br /> <br /> <span style="font-family:Merriweather, serif;font-size:18px;background-color:rgba(210, 210, 255, 0.5);">You want to get the exact value of </span>x<span style="font-family:Merriweather, serif;font-size:18px;background-color:rgba(210, 210, 255, 0.5);"> and then minimize the number of questions you will ask. How many different methods may you use with only minimum number of questions to get the exact value of </span>x<span style="font-family:Merriweather, serif;font-size:18px;background-color:rgba(210, 210, 255, 0.5);">? You should output the number of methods modulo </span>10^6+3<span style="font-family:Merriweather, serif;font-size:18px;background-color:rgba(210, 210, 255, 0.5);">. </span><br /> <br /> <span style="font-family:Merriweather, serif;font-size:18px;background-color:rgba(210, 210, 255, 0.5);">Two methods differ if and only if they have different number of questions or there exsits some </span>i<span style="font-family:Merriweather, serif;font-size:18px;background-color:rgba(210, 210, 255, 0.5);"> satisfying that the </span>i<span style="font-family:Merriweather, serif;font-size:18px;background-color:rgba(210, 210, 255, 0.5);">-th question of the first method is not equal to the </span>i<span style="font-family:Merriweather, serif;font-size:18px;background-color:rgba(210, 210, 255, 0.5);">-th of the second one.</span>
Input
<span style="font-family:Merriweather, serif;font-size:18px;background-color:rgba(210, 210, 255, 0.5);">There are multiple test cases. </span><br /> <br /> <span style="font-family:Merriweather, serif;font-size:18px;background-color:rgba(210, 210, 255, 0.5);">Each case starts with a line containing one positive integer </span>n(n≤10^9)<span style="font-family:Merriweather, serif;font-size:18px;background-color:rgba(210, 210, 255, 0.5);">.</span>
Output
<span style="font-family:Merriweather, serif;font-size:18px;background-color:rgba(210, 210, 255, 0.5);">For each test case, output one line containing an integer denoting the answer.</span>
Sample Input
复制
2
Sample Output
复制
2
AOJ
Please Login