QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#119982 | #6669. Mapa | LYC_music | 0 | 3ms | 9656kb | C++14 | 1.5kb | 2023-07-06 09:35:55 | 2023-07-06 09:35:55 |
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;
const int coef1=16369;
const int coef2=103;
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*2-1]=x[i]%coef1;
a[i*2]=y[i];
nw=nw*1023%mod;
// a[i*4-1]=y[i]%97;
// a[i*4]=y[i]%93;
}
cout<<(30+14)*n<<'\n';
// cout<<"??"<<a[1]<<'\n';
for (int i=1;i<=2*n;i++)
if (i%2) cout<<bitset<14>(a[i]);
else cout<<bitset<30>(a[i]);
return;
}
cin>>n>>q>>L;
int smx=0,smy=0;
for (int i=1;i<=2*n;i++)
{
int nw=0;
for (int j=1;j<=((i%2)?14:30);j++)
{
char ch;
cin>>ch;
nw=nw*2+ch-'0';
}
// cout<<"??"<<i<<" "<<nw<<'\n';
if (i%2==0) y[i/2]=nw;
else f[i/2+1][i%2]=nw;
}
// for (int i=1;i<=n;i++) cout<<f[i][1]<<" "<<y[i]<<'\n';
while (q--)
{
int o;
cin>>o;
int nw=B;
for (int i=1;i<=n;i++)
{
// cout<<(o+nw)%mod%coef1<<" "<<f[i][1]<<'\n';
if ((o+nw)%mod%coef1==f[i][1])
{
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: 3ms = 2ms + 1ms
memory: 9640kb,5480kb
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 0001101110110011100101010010110111111001001001111010110111100110100110000011100001010000111011000010100110101100101101110111011110110000000000100011000001000100010111100010001101111101111000001100001011000001000110011110100001010000101101101110100011001111010101100010011101010111100111000110001...
input:
2 100 79 4400 0001101110110011100101010010110111111001001001111010110111100110100110000011100001010000111011000010100110101100101101110111011110110000000000100011000001000100010111100010001101111101111000001100001011000001000110011110100001010000101101101110100011001111010101100010011101010111100111...
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: 1ms = 0ms + 1ms
memory: 9604kb,5516kb
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 1001001110111111001000100000000111000111001010110010000001010011111101101011101010101011001011110110010101011001100100100000011110010011000000010111001000010111100010000100100011111001000110110101100101001010000111001001011000111101000000101011010010001011111111001111100001101001010101101000101...
input:
2 100 79 4400 1001001110111111001000100000000111000111001010110010000001010011111101101011101010101011001011110110010101011001100100100000011110010011000000010111001000010111100010000100100011111001000110110101100101001010000111001001011000111101000000101011010010001011111111001111100001101001010101...
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: 9656kb,5452kb
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 1000101111001100100111101010101000010001000111010101001111010111001110110000011111111100000111011100000010000000010001100010001000000110011001110111000010011001100100100101111110110100111111100100010110001001111011001010011011100000011110101111101111010111011011100000001111010110010110101011001...
input:
2 100 79 4400 1000101111001100100111101010101000010001000111010101001111010111001110110000011111111100000111011100000010000000010001100010001000000110011001110111000010011001100100100101111110110100111111100100010110001001111011001010011011100000011110101111101111010111011011100000001111010110010110...
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: 3ms = 2ms + 1ms
memory: 9612kb,5556kb
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 1100100010011100000001111000110000111010111001100001001100111010001110111110101011000101001101001111100101111111011001010000000011000001110101001100110100110111110001100100010000101111110110110110001011000110011010000010010110001111111000110001110010011100110010111011010010100101110110110011101...
input:
2 100 79 4400 1100100010011100000001111000110000111010111001100001001100111010001110111110101011000101001101001111100101111111011001010000000011000001110101001100110100110111110001100100010000101111110110110110001011000110011010000010010110001111111000110001110010011100110010111011010010100101110110...
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: 0
Wrong Answer
time: 2ms = 1ms + 1ms
memory: 9608kb,5460kb
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 0011011000101100100101100110100110110000101000001101000000001000001010010000101010100011110110001011100100001110010100001011110100001100101000000010100100010100011111110100101011000111101001100010000011010001000011101110010110100101011101011001010010100100010010000111000001100011011111101110001...
input:
2 100 79 4400 0011011000101100100101100110100110110000101000001101000000001000001010010000101010100011110110001011100100001110010100001011110100001100101000000010100100010100011111110100101011000111101001100010000011010001000011101110010110100101011101011001010010100100010010000111000001100011011111...
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 111136702 6...
result:
wrong answer wrong answer on query #30: read 111136702 but expected 891038427