QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#445894 | #8416. Dzielniki [B] | GotoHiotori | 0 | 1ms | 4036kb | C++17 | 537b | 2024-06-16 16:47:10 | 2024-06-16 16:47:10 |
answer
#include<stdio.h>
#include"dzilib.h"
typedef long long ll;
ll work(ll y,int k){
if(k==57)return (1ll<<k)-y;
int a=Ask(y),b=Ask(y+(1ll<<k));
ll x;
if(a%(k+1)==0){
for(int i=k+2;i<=58;++i)
if(b%i==0){
x=work(y|1ll<<k,k+1);
if(~x)return x;
break;
}
}
if(b%(k+1)==0){
for(int i=k+2;i<=58;++i)
if(a%i==0){
x=work(y,k+1);
if(~x)return x;
break;
}
}
return -1;
}
int main(){
int t=GetT(),n=GetN();ll q=GetQ(),c=GetC();
for(;t--;Answer(work(114514,0)));
return 0;
}
詳細信息
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3852kb
input:
50 100000 50000 1000000000000 49108 86361 48807 44296 98962 74228 70938 50085 85439 82491 61850 10270 86867 40660 48433 67675 57312 17321 8228 87878 61853 80754 9880 65714 55443 34797 89187 44610 75431 56726 52425 16106 49808 75351 46368 19446 65264 39323 25273 46629 98 24463 76734 54088 12393 93157...
output:
ERROR: expected 49108, found -1
result:
wrong answer
Subtask #2:
score: 0
Wrong Answer
Test #11:
score: 0
Wrong Answer
time: 0ms
memory: 3788kb
input:
50 1000000 5000 1000000000000 986587 791769 338733 959743 466876 613054 887723 862451 853797 721415 115910 736804 796748 950095 362863 419090 786887 27917 364483 289769 26581 70926 685791 12202 554610 768721 279241 297080 445667 441723 529286 230179 985659 690926 297172 606535 540585 426446 300803 5...
output:
ERROR: expected 986587, found -1
result:
wrong answer
Subtask #3:
score: 0
Wrong Answer
Test #21:
score: 0
Wrong Answer
time: 0ms
memory: 3788kb
input:
10 1000000000 50000 1000000000000 408103384 716411227 312685147 924284703 375298759 152825423 311623701 481729457 215396950 9146195
output:
ERROR: expected 408103384, found -1
result:
wrong answer
Subtask #4:
score: 0
Wrong Answer
Test #31:
score: 0
Wrong Answer
time: 1ms
memory: 3792kb
input:
10 100000000000000 5000 100000000000000000 60077435990701 17220541740604 64191465861673 55745499051041 92001632467345 9358956369292 35872866769179 78367022100297 7839460363340 34668026591527
output:
ERROR: expected 60077435990701, found -1
result:
wrong answer
Subtask #5:
score: 0
Wrong Answer
Test #41:
score: 0
Wrong Answer
time: 1ms
memory: 3856kb
input:
10 100000000000000 2000 100000000000000000 12494380076190 85448577530879 31501976723503 61560401637840 9958432442859 68538788138133 81056300713749 31455642088461 52813858531796 2350217441027
output:
ERROR: expected 12494380076190, found -1
result:
wrong answer
Subtask #6:
score: 0
Wrong Answer
Test #51:
score: 0
Wrong Answer
time: 0ms
memory: 3804kb
input:
10 100000000000000 1300 100000000000000000 93861841503524 187801688618 12767914004896 68441979369935 44276894335941 10366130300247 10581531522622 34683620486862 71739885742802 31789387511772
output:
ERROR: expected 93861841503524, found -1
result:
wrong answer
Subtask #7:
score: 0
Wrong Answer
Test #61:
score: 0
Wrong Answer
time: 1ms
memory: 3740kb
input:
10 100000000000000 950 100000000000000000 89476806232027 12353673422544 87587374109960 29662216144897 59695535958606 16446701644855 15698587958167 76032905298130 18875210693225 2202458936163
output:
ERROR: expected 89476806232027, found -1
result:
wrong answer
Subtask #8:
score: 0
Wrong Answer
Test #71:
score: 0
Wrong Answer
time: 1ms
memory: 3768kb
input:
10 100000000000000 820 100000000000000000 57380646951677 24500445660413 52513218855562 35936833055954 21061776201610 17990465203024 53667291726216 50437972694073 8891884060027 40201586063900
output:
ERROR: expected 57380646951677, found -1
result:
wrong answer
Subtask #9:
score: 0
Wrong Answer
Test #81:
score: 0
Wrong Answer
time: 1ms
memory: 4036kb
input:
10 100000000000000 750 100000000000000000 5121346638871 87604132110850 89767773421324 36910678760633 22317088453717 9150554156208 86627018380188 91455697966830 39854585335842 25531102467103
output:
ERROR: expected 5121346638871, found -1
result:
wrong answer
Subtask #10:
score: 0
Wrong Answer
Test #91:
score: 0
Wrong Answer
time: 1ms
memory: 3808kb
input:
10 100000000000000 720 100000000000000000 32571246806419 17047845628559 72028252544868 84189424781123 34278867527450 31844169904318 25833108322349 14895620716019 41844198477918 35390870210849
output:
ERROR: expected 32571246806419, found -1
result:
wrong answer