QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#119975 | #6669. Mapa | LYC_music | 0 | 3ms | 9652kb | C++14 | 1.5kb | 2023-07-06 09:27:00 | 2023-07-06 09:27:01 |
Judging History
answer
#include<bits/stdc++.h>
#define poly vector<int>
#define IOS ios::sync_with_stdio(false)
#define ll long long
#define mp make_pair
#define mt make_tuple
#define pa pair < int,int >
#define fi first
#define se second
#define inf 1e18
#define mod 1000000007
#define int ll
#define N 10000005
using namespace std;
const int B=998244353;
int t,x[N],y[N],a[N];
int f[N][3];
int n,q,L;
void BellaKira()
{
cin>>t;
if (t==1)
{
cin>>n;
int nw=B;
for (int i=1;i<=n;i++)
{
cin>>x[i]>>y[i];
x[i]=(x[i]+nw)%mod;
y[i]=(y[i]+nw)%mod;
a[i*3-2]=x[i]%97;
a[i*3-1]=x[i]%93;
a[i*3]=y[i];
// cout<<x[i]%97<<" "<<nw<<" "<<(x[i]-nw'\n';
nw=nw*1023%mod;
// a[i*4-1]=y[i]%97;
// a[i*4]=y[i]%93;
}
cout<<(30+14)*n<<'\n';
for (int i=1;i<=3*n;i++)
if (i%3!=0) cout<<bitset<7>(a[i]);
else cout<<bitset<30>(a[i]);
return;
}
cin>>n>>q>>L;
int smx=0,smy=0;
for (int i=1;i<=3*n;i++)
{
int nw=0;
for (int j=1;j<=((i%3)?7:30);j++)
{
char ch;
cin>>ch;
nw=nw*2+ch-'0';
}
if (i%3==0) y[i/3]=nw;
else f[i/3+1][i%3]=nw;
}
// for (int i=1;i<=n;i++) cout<<f[i][1]<<" "<<f[i][2]<<" "<<y[i]<<'\n';
while (q--)
{
int o;
cin>>o;
int nw=B;
for (int i=1;i<=n;i++)
{
// cout<<"?"<<i<<" "<<nw<<" "<<f[i][1]<<" "<<(o+nw)%97<<endl;
if ((o+nw)%mod%97==f[i][1]&&(o+nw)%mod%93==f[i][2])
{
cout<<(y[i]-nw+mod)%mod<<'\n';
break;
}
nw=nw*1023%mod;
}
}
}
signed main()
{
IOS;
cin.tie(0);
int T=1;
while (T--)
{
BellaKira();
}
}
详细
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 53.3333
Acceptable Answer
time: 1ms = 0ms + 1ms
memory: 9560kb,5464kb
input:
1 100 495528311 963488152 269613430 443544124 700489871 792354118 151890319 506569919 180452297 13229948 684464994 543841485 978085128 903812192 238355172 441140842 28061035 783291471 530823766 718942732 936853023 439421263 201361623 226633955 304644844 778868118 864860135 461524170 88300500 6959354...
output:
4400 1001010010011011100101010010110111111001001010101010111011100110100110000011100001010000011110101010110110101100101101110111011110111100000000010011000001000100010111100010001110011000111001001100001011000001000110011110000000100100001101101110100011001111010101100110110011111111100111000110001...
input:
2 100 79 4400 1001010010011011100101010010110111111001001010101010111011100110100110000011100001010000011110101010110110101100101101110111011110111100000000010011000001000100010111100010001110011000111001001100001011000001000110011110000000100100001101101110100011001111010101100110110011111111100111...
output:
310305144 821194635 174780370 903812192 805026231 996046536 439421263 645287342 90686849 20101025 440972097 543841485 176553522 249563964 461524170 348624865 848301562 506569919 306718453 206848250 382805509 278712030 964702808 868944393 493895143 39665197 574757075 441140842 785665865 229376884 551...
result:
points 0.53333333330 ok K = 4400
Test #2:
score: 53.3333
Acceptable Answer
time: 2ms = 2ms + 0ms
memory: 9556kb,5480kb
input:
1 100 743248071 842720888 367650901 130970775 297946283 705168964 771526942 537186020 245003150 707948455 643491261 668001146 311535032 293708068 183828318 18515526 593973840 915870006 102456762 64193833 729806890 839221652 47145974 35682954 668676377 228428310 370700393 569441954 250911162 48980047...
output:
4400 1000110100010111001000100000000111000111001001011001011100010011111101101011101010101011000111100000110101011001100100100000011110011100000001000111001000010111100010000100100001100001001011110101100101001010000111001001010011001001010000101011010010001011111111000110001011011101010101101000101...
input:
2 100 79 4400 1000110100010111001000100000000111000111001001011001011100010011111101101011101010101011000111100000110101011001100100100000011110011100000001000111001000010111100010000100100001100001001011110101100101001010000111001001010011001001010000101011010010001011111111000110001011011101010101...
output:
442563406 97578442 469403815 293708068 138158276 720700065 839221652 674386240 810209830 563527225 259979005 668001146 813899310 943777483 569441954 226088806 825435650 537186020 131383422 83733737 830289758 425793016 858146541 609883097 414389335 407054915 47572024 18515526 276587480 810627636 4972...
result:
points 0.53333333330 ok K = 4400
Test #3:
score: 53.3333
Acceptable Answer
time: 3ms = 2ms + 1ms
memory: 9540kb,5448kb
input:
1 100 770174568 168127255 893508708 185778664 976425263 477317099 287595878 512153851 621600374 418802856 818787535 612197605 796811122 566496677 789841517 873731343 43178468 619503942 597852289 471053284 66112404 635260765 158101403 199253397 680158192 123081916 626776438 29107026 721141470 5177084...
output:
4400 0101110101101000100111101010101000010001000101101001000111010111001110110000011111111100010011010000000010000000010001100010001000000100100011100011000010011001100100100101111100010100011110100100010110001001111011001010010111001101011110101111101111010111011011101001101000011010010110101011001...
input:
2 100 79 4400 0101110101101000100111101010101000010001000101101001000111010111001110110000011111111100010011010000000010000000010001100010001000000100100011100011000010011001100100100101111100010100011110100100010110001001111011001010010111001101011110101111101111010111011011101001101000011010010110...
output:
676203467 418593456 222540092 566496677 487711174 155177230 635260765 19655934 405420089 197948311 16997620 612197605 623431791 654167214 29107026 103769907 951695033 512153851 401411177 839097490 141196222 886472586 767476542 270436089 885084406 492744649 861074271 873731343 744691837 300804222 364...
result:
points 0.53333333330 ok K = 4400
Test #4:
score: 53.3333
Acceptable Answer
time: 2ms = 1ms + 1ms
memory: 9616kb,5460kb
input:
1 100 546594289 9670068 665528790 773039281 266567267 744830423 338924380 918542055 413001686 717894752 786408307 211692098 280986141 432842000 195582858 921321743 412109607 485887870 262421557 244551274 303481411 585109375 922835159 77375674 276669713 485047938 748493209 63888398 37129726 285918022...
output:
4400 0001110101100000000001111000110000111010111001100110000100111010001110111110101011000101000111000110000101111111011001010000000011000010010101101100110100110111110001100100010000100000111111110110001011000110011010000010000000010011011000110001110010011100110010110101111101001101110110110011101...
input:
2 100 79 4400 0001110101100000000001111000110000111010111001100110000100111010001110111110101011000101000111000110000101111111011001010000000011000010010101101100110100110111110001100100010000100000111111110110001011000110011010000010000000010011011000110001110010011100110010110101111101001101110110...
output:
43372101 204611063 352593757 432842000 142147490 891337416 585109375 743309504 647533065 464964608 876089821 211692098 955710889 971589766 63888398 781195091 748872098 918542055 738134414 271774069 559783342 631668225 32245370 502187994 978371138 563783889 900635155 921321743 760555399 270665755 276...
result:
points 0.53333333330 ok K = 4400
Test #5:
score: 53.3333
Acceptable Answer
time: 3ms = 2ms + 1ms
memory: 9616kb,5496kb
input:
1 100 326454605 159474960 11647328 932941462 367166680 626258331 846588658 385992166 148602944 380296908 32123445 521548223 146657758 872883623 78417135 361494853 902204073 975297913 50096537 520296997 687284103 420187394 93781442 87808395 503014564 573344902 720903126 546124141 87676450 646360824 9...
output:
4400 1010100011010100100101100110100110110000101001100110110110001000001010010000101010100011000011100011000100001110010100001011110100000001011010011010100100010100011111110100101010110110101010100010000011010001000011101110101000000011111101011001010010100100010010001001101011111111011111101110001...
input:
2 100 79 4400 1010100011010100100101100110100110110000101001100110110110001000001010010000101010100011000011100011000100001110010100001011110100000001011010011010100100010100011111110100101010110110101010100010000011010001000011101110101000000011111101011001010010100100010010001001101011111111011111...
output:
744601533 267129639 871217352 872883623 255371549 162360942 420187394 62984915 242781986 691399852 480380990 521548223 206206675 214089065 546124141 380557861 669664079 385992166 150840342 413877880 634078816 965530575 770169571 451364705 804171981 524846617 166621075 361494853 603970305 891038427 6...
result:
points 0.53333333330 ok K = 4400
Test #6:
score: 53.3333
Acceptable Answer
time: 1ms = 0ms + 1ms
memory: 9552kb,5544kb
input:
1 100 64333280 212072142 621741906 581061751 485561139 692210649 992259436 287935018 247191279 473618369 757620730 140577613 737479792 180977604 404566245 999575096 265846881 11981569 207666352 505750476 304958822 388901054 389584560 428620342 171809402 115660346 324907936 144402645 844495803 791121...
output:
4400 0010000100000100110010001001001011001100100001000100011111101110110010101001001010001011011000110011010101001101001101100110000011101000101101000010001100111100010000111000111001100110000111100111100111010000100111100011101001110111000111101101111101111101110101100111010100100000111010110000100...
input:
2 100 79 4400 0010000100000100110010001001001011001100100001000100011111101110110010101001001010001011011000110011010101001101001101100110000011101000101101000010001100111100010000111000111001100110000111100111100111010000100111100011101001110111000111101101111101111101110101100111010100100000111010...
output:
925952390 770406569 77034978 180977604 957934192 99668862 388901054 858699296 371495636 28514411 68070922 140577613 781757001 847250666 144402645 346058199 267461021 287935018 989151756 348668969 556273495 997895853 95321369 938341707 276009971 101428817 899728485 999575096 385642796 181794009 75258...
result:
points 0.53333333330 ok K = 4400
Test #7:
score: 53.3333
Acceptable Answer
time: 2ms = 1ms + 1ms
memory: 9556kb,5520kb
input:
1 100 38589601 573023388 6635272 692946586 153397181 811034102 859889237 493892802 259205483 364719660 954343124 427626481 959173918 753851930 975496695 577574806 311830132 29056811 509015429 310443549 588209966 697904208 31314024 836756664 249907127 458343750 355938610 284261099 221528639 337802970...
output:
4400 0101000101100010001000001100110110101001011010100100101111110101011101011100110010101110001011001110010110111110100010000000001010110101111010010010111110000010111011100010011000111010000110100001000111110110000001001110100101101100111011111111101110000010011110100111101001111111000011010101111...
input:
2 100 79 4400 0101000101100010001000001100110110101001011010100100101111110101011101011100110010101110001011001110010110111110100010000000001010110101111010010010111110000010111011100010011000111010000110100001000111110110000001001110100101101100111011111111101110000010011110100111101001111111000011...
output:
230017218 565349569 47782129 753851930 678112683 647428660 697904208 283703409 312668984 173256201 644234813 427626481 304813844 912323446 284261099 886592164 929134689 493892802 555567576 65699189 645479813 694103982 65190925 671520247 354050416 976551128 738019464 577574806 813237436 891060967 888...
result:
points 0.53333333330 ok K = 4400
Test #8:
score: 53.3333
Acceptable Answer
time: 3ms = 2ms + 1ms
memory: 9644kb,5516kb
input:
1 100 608812690 879292074 479028197 788306143 615995302 841820438 145257256 962764296 602711633 995581697 898256936 448106429 760128150 867194906 843820112 719060821 156799570 629004151 556234422 563271562 355032462 28734192 691911457 345245685 868932163 940932744 589136297 140594459 605248500 81637...
output:
4400 1011101000000111010001001110001001001010010000000000011110111011001001001101111011110011011101010000100111011011111001000011010010111010111100100100111111011010100011010110010110011110110110001011000111101100011100011100011111100110001100010011010000000010010001101010000010111111011110010111011...
input:
2 100 79 4400 1011101000000111010001001110001001001010010000000000011110111011001001001101111011110011011101010000100111011011111001000011010010111010111100100100111111011010100011010110010110011110110110001011000111101100011100011100011111100110001100010011010000000010010001101010000010111111011110...
output:
500331265 566760896 580044819 867194906 560949333 9781752 28734192 263251739 247143049 846291006 332847217 448106429 266605081 382040161 140594459 32445827 364204743 962764296 647363961 549897822 266248054 819012425 609835929 951476639 538336120 158314822 355385207 719060821 493794877 696188978 3014...
result:
points 0.53333333330 ok K = 4400
Test #9:
score: 53.3333
Acceptable Answer
time: 1ms = 0ms + 1ms
memory: 9652kb,5444kb
input:
1 100 221411475 163696773 580081552 897674994 529495152 42484057 439934490 746227851 716122469 137572309 850797298 158711960 820091048 515476547 797154090 246166696 923505280 368103965 246035210 308696941 613434683 955145371 875043135 212559533 205331778 121889189 468477922 194020296 861623799 72521...
output:
4400 0000000011001100100110100111000001100111111100100000110010000110000011101110101011111111010111001101011010011011010000100101100101010110011001001000001011110010011101111110100010000111010111010011100101010110000111110111000001101101010111111111010000110011001000010000011100111110001010100000100...
input:
2 100 79 4400 0000000011001100100110100111000001100111111100100000110010000110000011101110101011111111010111001101011010011011010000100101100101010110011001001000001011110010011101111110100010000111010111010011100101010110000111110111000001101101010111111111010000110011001000010000011100111110001010...
output:
447518344 20372800 820057525 515476547 929148550 975667875 955145371 710181675 270693487 815249231 444426161 158711960 978716476 472823181 194020296 768850245 118243886 746227851 939771652 880147346 23021000 674514174 170878417 120543464 688090699 772795972 659239901 246166696 22324283 62945716 4424...
result:
points 0.53333333330 ok K = 4400
Test #10:
score: 0
Wrong Answer
time: 1ms = 0ms + 1ms
memory: 9608kb,5516kb
input:
1 100 19599769 503599235 607852146 743568370 186281835 152620298 14504908 481672793 781288195 362834688 151340700 673227358 631578327 616559846 162406965 868151253 654902334 704640894 506151846 36830214 260055673 991685781 541724792 551734837 725627458 660315138 732278528 433696372 325821250 4876257...
output:
4400 1011100001001101110111101001100001100111110110111000000111111000011110100011101000000110001101100001001100000100010010110001010001100110101011010010111011001000011101111011110100111010111110100001000000101001110100100010100001100011000000110000010001001010111000001011001010000010100010100111000...
input:
2 100 79 4400 1011100001001101110111101001100001100111110110111000000111111000011110100011101000000110001101100001001100000100010010110001010001100110101011010010111011001000011101111011110100111010111110100001000000101001110100100010100001100011000000110000010001001010111000001011001010000010100010...
output:
17522166 203911209 128873662 616559846 5724752 637807633 991685781 152620298 23742057 733808995 34061776 673227358 76723239 80053091 433696372 302174338 804265440 481672793 129338272 820651206 457529317 578437883 142129496 92873118 115024862 323981695 456071005 868151253 79539206 533123847 250920833...
result:
wrong answer wrong answer on query #8: read 152620298 but expected 667107960