QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#867484 | #9684. 倾诉 | lgvc# | 2 | 3068ms | 72024kb | C++23 | 5.8kb | 2025-01-23 17:03:40 | 2025-01-23 17:03:40 |
Judging History
answer
#include <bits/stdc++.h>
#define BIT 61
#define SIZ 13
struct bitset {
long long bits[SIZ];
void init(void) {for(int i=0;i<SIZ;i++) bits[i]=0;}
void set(int x,bool y) {bits[x/BIT]^=((((bits[x/BIT]>>(x%BIT))&1)^y)<<(x%BIT));}
void setall(bool y) {for(int i=0;i<SIZ;i++) bits[i]=((((long long)y)<<BIT)-(long long)(y));}
bool q(int x) {return (bits[x/BIT]>>(x%BIT))&1;}
void operator=(const bitset& y) {for(int i=0;i<SIZ;i++) bits[i]=y.bits[i];}
void operator|=(const bitset& y) {for(int i=0;i<SIZ;i++) bits[i]|=y.bits[i];}
void operator&=(const bitset& y) {for(int i=0;i<SIZ;i++) bits[i]&=y.bits[i];}
void operator^=(const bitset& y) {for(int i=0;i<SIZ;i++) bits[i]^=y.bits[i];}
void operator+=(const bitset& y) {
for(int i=0;i<SIZ;i++) {
bits[i]+=y.bits[i];
if((bits[i]>>BIT)&1) bits[i]^=(1ll<<BIT),bits[i+1]++;
}
}
void operator-=(const bitset& y) {
for(int i=0;i<SIZ;i++) {
bits[i]-=y.bits[i];
if(bits[i]<0) bits[i]+=(1ll<<BIT),bits[i+1]--;
}
}
void operator<<=(int k) {
bitset z;z.init();
int tmp=k/BIT;
for(int i=0;i<SIZ-tmp;i++) z.bits[i+tmp]=bits[i];
k%=BIT;
z.bits[SIZ-1]<<=k;
for(int i=SIZ-2;i>=0;i--) {
long long tmp=z.bits[i];
z.bits[i]&=((1ll<<(BIT-k))-1);
z.bits[i+1]|=((tmp^z.bits[i])>>(BIT-k));
z.bits[i]<<=k;
}
for(int i=0;i<SIZ;i++) bits[i]=z.bits[i];
}
void operator>>=(int k) {
bitset z;z.init();
int tmp=k/BIT;
for(int i=tmp;i<SIZ;i++) z.bits[i-tmp]=bits[i];
k%=BIT;
z.bits[0]>>=k;
for(int i=1;i<SIZ;i++) {
z.bits[i-1]|=((z.bits[i]&((1ll<<k)-1))<<(BIT-k));
z.bits[i]>>=k;
}
for(int i=0;i<SIZ;i++) bits[i]=z.bits[i];
}
bitset operator|(const bitset& y) {
bitset z;
for(int i=0;i<SIZ;i++) z.bits[i]=bits[i]|y.bits[i];
return z;
}
bitset operator&(const bitset& y) {
bitset z;
for(int i=0;i<SIZ;i++) z.bits[i]=bits[i]&y.bits[i];
return z;
}
bitset operator^(const bitset& y) {
bitset z;
for(int i=0;i<SIZ;i++) z.bits[i]=bits[i]^y.bits[i];
return z;
}
bitset operator+(const bitset& y) {
bitset z;z.bits[0]=0;
for(int i=0;i<SIZ;i++) {
z.bits[i]+=bits[i]+y.bits[i];
if((z.bits[i]>>BIT)&1) z.bits[i]^=(1ll<<BIT),z.bits[i+1]=1;else z.bits[i+1]=0;
}
return z;
}
bitset operator-(const bitset& y) {
bitset z;z.bits[0]=0;
for(int i=0;i<SIZ;i++) {
z.bits[i]+=bits[i]-y.bits[i];
if(z.bits[i]<0) z.bits[i]+=(1ll<<BIT),z.bits[i+1]=-1;else z.bits[i+1]=0;
}
return z;
}
bitset operator<<(int k) {
bitset z;z.init();
int tmp=k/BIT;
for(int i=0;i<SIZ-tmp;i++) z.bits[i+tmp]=bits[i];
k%=BIT;
z.bits[SIZ-1]<<=k;
for(int i=SIZ-2;i>=0;i--) {
long long tmp=z.bits[i];
z.bits[i]&=((1ll<<(BIT-k))-1);
z.bits[i+1]|=((tmp^z.bits[i])>>(BIT-k));
z.bits[i]<<=k;
}
return z;
}
bitset operator>>(int k) {
bitset z;z.init();
int tmp=k/BIT;
for(int i=tmp;i<SIZ;i++) z.bits[i-tmp]=bits[i];
k%=BIT;
z.bits[0]>>=k;
for(int i=1;i<SIZ;i++) {
z.bits[i-1]|=((z.bits[i]&((1ll<<k)-1))<<(BIT-k));
z.bits[i]>>=k;
}
return z;
}
int count(void) {
int ans=0;
for(int i=0;i<SIZ;i++) ans+=__builtin_popcountll(bits[i]);
return ans;
}
bool operator<(const bitset& y) {
for(int i=SIZ-1;i>=0;i--) if(bits[i]^y.bits[i]) return bits[i]<y.bits[i];
return 0;
}
bool operator>(const bitset& y) {
for(int i=SIZ-1;i>=0;i--) if(bits[i]^y.bits[i]) return bits[i]>y.bits[i];
return 0;
}
bool operator<=(const bitset& y) {
for(int i=SIZ-1;i>=0;i--) if(bits[i]^y.bits[i]) return bits[i]<y.bits[i];
return 1;
}
bool operator>=(const bitset& y) {
for(int i=SIZ-1;i>=0;i--) if(bits[i]^y.bits[i]) return bits[i]>y.bits[i];
return 1;
}
bool operator==(const bitset& y) {
for(int i=SIZ-1;i>=0;i--) if(bits[i]^y.bits[i]) return 0;
return 1;
}
};
bitset max(bitset& x,bitset& y) {
for(int i=SIZ-1;i>=0;i--) {
if(x.bits[i]>y.bits[i]) return x;
if(x.bits[i]<y.bits[i]) return y;
}
return x;
}
bitset min(bitset& x,bitset& y) {
for(int i=SIZ-1;i>=0;i--) {
if(x.bits[i]>y.bits[i]) return y;
if(x.bits[i]<y.bits[i]) return x;
}
return x;
}
int T,N,a[20009],K,p[4300009],ct,co[755][755][16],iv[4300009];
bitset f[755],qq[755][755],va[4300009];
int dp[755][755];
bool cmp(int x,int y) {
return va[x]<va[y];
}
bool chk(int cl) {
dp[N+1][N+1]=0;
for(int i=N;i>=1;i--) {
dp[i][N+1]=0x3f3f3f3f;
int r=N;
for(int j=N;j>=i;j--) {
dp[i][j]=dp[i][j+1];
while((r>j)||(co[i][r][j-r]>cl)) {
r--;
}
dp[i][j]=std::min(dp[i][j],dp[r+1][j+1]+(j-i));
//for(int k=j;k>=i;k--) {
// if((qq[i][k]<=(x<<(j-k)))) {
// printf("%d %d %d %d %d\n",i,k,j,qq[1][1].count(),x.count());
// break;
// }
//}
}
}
if(dp[1][1]<=K) return 1;
return 0;
}
signed main(void) {
scanf("%d",&T);
// T=1;
while(T--) {
std::mt19937 rng(114);
scanf("%d %d",&N,&K);
// N=750;K=10000;
for(int i=1;i<=N;i++) {
scanf("%d",&a[i]);
// a[i]=rng()%1000000+1;
f[i].setall(0);
f[i].bits[0]=a[i];
f[i]<<=N;
}
for(int i=1;i<=N;i++) {
qq[i][i]=f[i];
for(int j=i+1;j<=N;j++) {
qq[i][j]=(qq[i][j-1]>>1);
qq[i][j]+=f[j];
}
}
ct=0;
for(int i=1;i<=N;i++) {
for(int j=i;j<=N;j++) {
for(int k=j;k<=j+14&&k<=N;k++) {
co[i][j][k-j]=++ct;
p[ct]=ct;
va[ct]=(qq[i][j]>>k-j);
}
}
//printf("%d\n",ct);
}
std::sort(p+1,p+ct+1,cmp);
for(int i=1;i<=ct;i++) {
iv[p[i]]=i;
}
for(int i=1;i<=N;i++) {
for(int j=i;j<=N;j++) {
for(int k=j;k<=j+14&&k<=N;k++) {
co[i][j][k-j]=iv[co[i][j][k-j]];
}
}
}
int l=1,r=ct,mm;
while(l<r) {
mm=(l+r)/2;
if(chk(mm)) r=mm;else l=mm+1;
}
bitset ff=va[p[l]];
int st=0;
for(int i=N+20;i>=0;i--) {
if(ff.q(i)) {
st=i;
break;
}
}
for(int i=st;i>=0;i--) printf("%d",ff.q(i));
printf("\n");
}
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 2
Accepted
Test #1:
score: 2
Accepted
time: 0ms
memory: 14164kb
input:
5 6 1 11764 28428 28179 18698 6443 20288 6 3 29 17548 61962 31242 8172 4107 6 15 7 2 239427 137145 171239 3 6 4 294 211 407 190 2 2 6 5 197190 265870 12121 144584 21313 14169
output:
110111100001100000000 101110011000100110000 11101001110100001100000 11000110110000 10100110100010001101100
result:
ok 5 lines
Test #2:
score: 2
Accepted
time: 0ms
memory: 14160kb
input:
3 10 9 11333 23 34461 34357 354 4 3 55 3 3 10 13 5 17524 48186 2193 17524 17524 20914 15829 17524 6 10 5 128279 27396 7992 44204 132529 84302 26783 3378 42535 3786
output:
11010110100011011110 101111000011101000000000 11010100100010110010000000
result:
ok 3 lines
Test #3:
score: 2
Accepted
time: 0ms
memory: 16208kb
input:
1 30 23 129534 106530 312047 478493 635175 682687 771242 851161 898940 103771 4 22344 668706 758190 219263 803071 787124 804602 997769 398659 874234 1 845912 226469 600617 203296 540318 171121 5 103637
output:
1011110001001010101000000000000000000000000000000
result:
ok single line: '1011110001001010101000000000000000000000000000000'
Test #4:
score: 2
Accepted
time: 1ms
memory: 18260kb
input:
1 30 20 24369 112417 273642 91342 16920 82890 51488 110843 350768 2127 32310 317716 289575 345557 10461 133151 237824 131339 154529 77796 16773 128740 561207 292189 244465 178375 50425 149932 60698 32020
output:
100000110011011000011001110000000000000000000000
result:
ok single line: '100000110011011000011001110000000000000000000000'
Test #5:
score: 2
Accepted
time: 0ms
memory: 16196kb
input:
1 30 22 5164 3437 1409 1477 1234 290 641 8387 2389 4783 1704 1430 2859 422 368 348 3778 2161 1898 964 357 763 380 3870 6050 1136 3613 1747 975 131
output:
11100100111010100100000000000000000000000
result:
ok single line: '11100100111010100100000000000000000000000'
Test #6:
score: 2
Accepted
time: 2ms
memory: 18264kb
input:
1 30 16 78284 104679 51060 38372 468848 144187 84013 249991 72147 295666 63152 22000 35446 88085 67085 19719 4766 988 384917 450684 101500 548119 105206 420503 54774 10663 13882 48365 104067 33372
output:
11100010001001000011101010000000000000000000000
result:
ok single line: '11100010001001000011101010000000000000000000000'
Test #7:
score: 2
Accepted
time: 1ms
memory: 18264kb
input:
1 30 20 93587 95074 833612 98114 468073 405234 294453 151570 336309 555067 71292 497114 301076 302914 130800 17777 145963 834497 152338 526181 242311 266037 315170 36843 72099 59791 95401 96269 181758 156382
output:
111011010101101111000000101010000000000000000000
result:
ok single line: '111011010101101111000000101010000000000000000000'
Test #8:
score: 2
Accepted
time: 2ms
memory: 20180kb
input:
1 30 20 7 5 5 2 5 2 4 2 1 8 244222 244222 244222 244222 244222 244222 244222 244222 244222 244222 244222 244222 244222 244222 244222 244222 8 6 8 1
output:
111011101000110110010001100000001000000000000
result:
ok single line: '111011101000110110010001100000001000000000000'
Test #9:
score: 2
Accepted
time: 2ms
memory: 18264kb
input:
1 30 30 1486 898 1035 2327 2777 3385 4083 330 2925 3348 1324 826 3223 3418 45 184 54 591 44 4301 4453 1558 601 1914 2114 8 1 93 7 6
output:
10011001000001011100000000000000000000
result:
ok single line: '10011001000001011100000000000000000000'
Test #10:
score: 2
Accepted
time: 1ms
memory: 16212kb
input:
1 30 132 999998 999998 999999 999999 1000000 1000000 1000000 1000000 999999 1000000 999999 1000000 999998 999999 999999 999999 999998 1 1 1 1 1 1 1 1 1 1 1 1 1
output:
10110111000110101111000000000000000000
result:
ok single line: '10110111000110101111000000000000000000'
Subtask #2:
score: 0
Wrong Answer
Dependency #1:
100%
Accepted
Test #11:
score: 10
Accepted
time: 0ms
memory: 16212kb
input:
33 6 1 2201 30891 22926 51021 5381 1953 6 1 17621 35116 7069 5597 24627 4779 6 8 6 19015 19015 19015 19015 2 6 4 19047 11041 11837 2027 1116 2645 6 7 117530 117530 117530 117530 117530 4 6 5 26692 20497 5915 6516 6714 1098 6 7 348470 348470 348470 348470 348470 7 6 3 2 1 2378 4 107252 2 6 2 9325 369...
output:
111100010101011100000 110000000110011000000 10010100100101100000 1110111101011010100 1110010110010001000000 10001011101010100100 101010100010100010000000 1101000101111100000000 1001001101001001000000 10100110001010100000 1111111101011100000 1110110000100000000 1000010001100101000000 1010011111111001...
result:
ok 33 lines
Test #12:
score: 10
Accepted
time: 0ms
memory: 16216kb
input:
20 10 10 7398 2663 2 28570 2 2 2 2 2 3 10 10 5 4 486615 486615 486615 521695 469075 486615 486615 7 10 5 5132 160984 19067 83543 351799 157254 40607 16829 39349 21513 10 3 2234 2158 11383 7501 3047 737 626 4487 5017 4908 10 5 31661 111680 91073 9607 12095 42688 118218 47360 392 51408 10 3 28734 5994...
output:
1110111000011011000 1111111010111011111000000000 110000100111001110000000000 10101101101101010000000 11010001011110101100000000 111000110111001000000000000 11111011001001000000000000 11110011101111100000000 1000111111101100000000000 1110010101000111001000000000 11100111110110011100000 10110011111001...
result:
ok 20 lines
Test #13:
score: 10
Accepted
time: 4ms
memory: 20312kb
input:
8 25 15 2317 3833 9894 20350 54995 518 77 9839 15551 281 5127 13100 16 13930 16 16 3872 44999 28972 30892 63777 36955 9212 13452 6 25 24 99488 111510 114067 99889 114169 167030 178257 168039 292710 214341 275210 350436 319813 436188 410390 450309 445475 482666 516698 666862 623999 693281 692643 7096...
output:
110110011010100000000000000000000000000 10101101010000100100000000000000000000000000 111001101011010001100000010000 1000010011011111000000000000000000000 11111000000101000000000000000000000000000 10110110001100111011110110000000000000000 111010000000000000000000000000 1001101000001101010101000000000...
result:
ok 8 lines
Test #14:
score: 10
Accepted
time: 12ms
memory: 22480kb
input:
4 50 34 95 81 35 25 62 110 1410 59 3104 7106 65431 5351 95886 127301 256 73557 41 38 60 43 55 8 32 3661 6459 5863 1242 1188 9 32402 14 11 11 13 62993 14 121264 128664 122950 6617 40500 44292 7 5 2 4 4 5 4 2 50 29 5982 32011 27127 38729 45979 27737 46199 11445 36544 9629 104678 220775 12741 46011 468...
output:
10110111110110010010110100000000000000000000000000000000000000 110001110111011000110111000100000000000000000000000000000000000000 11100001000000000000000000000000000000000000000000000000000 101010011111110001111111111110101011000000110110000000000000000000
result:
ok 4 lines
Test #15:
score: 10
Accepted
time: 98ms
memory: 69588kb
input:
1 200 104 824019 802339 516620 688752 477193 458691 362601 284661 179293 149012 114733 46386 997099 937623 842616 725675 526621 419116 944566 8 947114 835410 880188 817427 933050 781449 749967 709476 674043 659058 694092 595430 606209 578012 589236 565119 563253 538372 527012 506608 471302 379419 40...
output:
1001100000110100001100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
result:
ok single line: '100110000011010000110000000000...0000000000000000000000000000000'
Test #16:
score: 10
Accepted
time: 93ms
memory: 69972kb
input:
1 200 146 355620 195534 77535 30471 502788 155147 125612 229317 59146 35958 136590 392319 137199 221090 93946 193044 208968 65713 32921 34906 560844 303977 333461 45377 307699 32096 20279 14237 52638 123530 354319 215336 213842 201158 82292 20137 152410 383905 334181 24694 15921 115128 62545 573156 ...
output:
10100000001001011010010010100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
result:
ok single line: '101000000010010110100100101000...0000000000000000000000000000000'
Test #17:
score: 10
Accepted
time: 90ms
memory: 69972kb
input:
1 200 180 12027 63296 71968 12762 26117 176085 211676 816605 431465 442615 490565 215621 95221 222871 242713 425042 582819 517932 492219 142280 472292 318760 574570 296860 539417 501497 381830 456540 281725 588426 261330 95874 726762 153818 453674 253818 265931 435468 249789 503978 214586 484730 143...
output:
11001110111001010110011100101110111000110010101100111001101111011111111000011101111110011100110001000001100110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
result:
ok single line: '110011101110010101100111001011...0000000000000000000000000000000'
Test #18:
score: 10
Accepted
time: 87ms
memory: 67796kb
input:
1 200 240 7 8 1 652114 652114 652114 652114 652114 652114 652114 652114 652114 652114 652114 652114 652114 652114 652114 652114 652114 652114 652114 652114 652114 652114 652114 652114 652114 652114 652114 652114 652114 652114 652114 652114 652114 652114 652114 652114 652114 652114 652114 652114 6521...
output:
1110111011001111101100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
result:
ok single line: '111011101100111110110000000000...0000000000000000000000000000000'
Test #19:
score: 10
Accepted
time: 89ms
memory: 69976kb
input:
1 200 279 1 2 5 6 2 3 1 2 7 3 3 3 3 3 4 7 2 3 3 5 7 2 5 6 3 2 5 6 7 7 4 2 228606 228606 228606 228606 228606 228606 228606 228606 228606 228606 228606 228606 228606 228606 228606 228606 228606 228606 228606 228606 228606 228606 228606 228606 228606 228606 228606 228606 228606 228606 228606 228606 22...
output:
1010011101101111101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
result:
ok single line: '101001110110111110100000000000...0000000000000000000000000000000'
Test #20:
score: 10
Accepted
time: 94ms
memory: 72024kb
input:
1 200 169 7353 7753 5155 4759 7316 4440 14772 7931 1421 7350 9161 7156 4525 5978 15883 5924 7913 16372 4068 180432 147014 84712 135022 120070 247413 245415 113692 93943 198658 256478 234505 120986 19909 103949 11457 38642 49133 3222 41930 67973 30301 84413 63309 31681 97310 35350 30751 4 63053 3 205...
output:
110101010011110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
result:
ok single line: '110101010011110000000000000000...0000000000000000000000000000000'
Test #21:
score: 10
Accepted
time: 94ms
memory: 69504kb
input:
1 200 130 246 53 27 161 162 209 66 36 28 207 250 247 127 18 72 155 1182 1155 1644 396 312 1318 915 1377 760 1367 1814 1668 823 514 1334 1597 1459 604 806 1875 1468 243 298 502 1203 1237 1299 1575 1983 1603 1453 1055 1333 1191 1033 732 1561 371 326 966 685 1232 286 1752 169 1798 165036 216075 144560 ...
output:
1010011010110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
result:
ok single line: '101001101011000000000000000000...0000000000000000000000000000000'
Test #22:
score: 0
Wrong Answer
time: 91ms
memory: 72020kb
input:
1 200 1265 999998 1000000 999999 999999 1000000 999999 999999 999999 1000000 999999 1000000 999999 1000000 1000000 999999 999998 1000000 1000000 1000000 999998 999998 999998 999999 1000000 999999 1000000 999998 999998 999999 999999 1000000 1000000 999998 999999 1000000 999999 999998 999998 1000000 9...
output:
110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
result:
wrong answer 1st lines differ - expected: '101101110001101011101000000000...0000000000000000000000000000000', found: '110000000000000000000000000000...0000000000000000000000000000000'
Subtask #3:
score: 0
Skipped
Dependency #2:
0%
Subtask #4:
score: 0
Skipped
Dependency #3:
0%
Subtask #5:
score: 0
Time Limit Exceeded
Test #60:
score: 17
Accepted
time: 12ms
memory: 16216kb
input:
1666 6 1 282 719 29 355 388 275 6 1 348 766 91 299 474 96 6 23 5 2 8554 8554 8554 2 6 1 84 195 23 37 120 117 6 3 8 3 51 62 28 5 6 3 3 64 64 4 4 2 6 9 5 552 552 552 552 5 6 3 3611 1144 417 3461 459 755 6 3 777 315 1007 5 2 1061 6 6 1300 2101 4 1877 360 2434 6 1 384 713 168 25 524 390 6 3 203 18 305 1...
output:
110000100100000 111011010000000 1000010110111000000 1111000100000 11111000000 11110000000 100011001000000 100010001101100000 10000100101000000 100110000010000000 1000001100100000 10011001100000 111001011010000000 1100000110100000 1110111111110000 101011111000000 1000011110000 100101000000000 1011110...
result:
ok 1666 lines
Test #61:
score: 17
Accepted
time: 33ms
memory: 16208kb
input:
1000 10 10 1765 725 287 2983 1959 3 855 1094 2960 4 10 4 856 92 85 15 31 233 718 137 64 213 10 8 4575 2773 2373 497 8150 5057 2455 9107 5 5 10 8 216 189 143 218 154 222 153 147 2 5 10 3 77 74 30 27 241 85 57 8 66 86 10 7 3471 3468 5868 2881 478 3775 2 470 1 3 10 5 317 2460 139 3033 107 359 4 1716 3 ...
output:
101110011000000000000 1010110010000000000 1100010110011110000000 11011110000000000 10101111110000000 110110001111000000000 100100100101100000000 1101111101000000000 10111010010110000000 1111110111101100 10100101000100000000 10100110000110000000 1011110110101000000000 10011110100000000000 10000100100...
result:
ok 1000 lines
Test #62:
score: 17
Accepted
time: 203ms
memory: 16080kb
input:
400 25 16 678 1005 3339 2086 1363 1802 549 124 406 305 325 742 3344 2194 640 2744 383 1494 2369 1209 667 120 423 243 91 25 16 5 6 5 4 4 37 6 2 2 2 2 2 2 2 2 7 13 12 9 10 15 32 32 1 4 25 18 848 963 139 413 186 82 1329 524 629 70 40 324 1255 282 581 193 439 189 81 268 769 733 22 36 332 25 23 61 41 39 ...
output:
11111011010000000000000000000000000 11001000000000000000000000000 1011111100101000000000000000000000 110110010001110110001100000 1100011111111100000000000000000000000 11000001001110000000000000000000000 110000110110000000000000000000000000 100110110000101000000000000000000 11010000111000000000000000...
result:
ok 400 lines
Test #63:
score: 17
Accepted
time: 635ms
memory: 22356kb
input:
200 50 38 1635 1767 1420 565 1815 1952 1969 1438 1749 21 415 15 1257 1883 22 26 13 22 19 12 22 9 16 19 20 19 25 11 28 21 519 29 653 315 987 806 450 651 102 77 101 87 40 2 5 3 3 1 5 3 50 39 157 165 46 80 176 17 4 41 47 213 8 18 161 53 10 56 21 5 400 10 173 35 73 263 161 33 88 102 132 55 173 3 11 6 48...
output:
1110000000000000000000000000000000000000000000000000000 100110011111111000011100000000000000000000000000000000000 1010111111111101011101101000000000000000000000000000000000000 110011111001000000000000000000000000000000000000000000000000 1010101101101000000000000000000000000000000000000000000000000 1...
result:
ok 200 lines
Test #64:
score: 17
Accepted
time: 1787ms
memory: 32856kb
input:
100 100 385 2 1 3 1 2 3 806 806 806 806 806 806 806 806 806 806 806 806 806 806 806 806 806 806 806 806 806 806 806 806 806 806 806 806 806 806 806 806 806 806 806 806 806 806 806 806 806 806 806 806 806 806 806 806 806 806 806 2332 43 806 806 806 806 806 806 806 806 806 806 806 806 806 1438 490 806...
output:
10010110111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 101001111101111111111111111111111111111111111111111111111111111111111010111011010000000000000000000000000000 11001111111011000100110000110100010110100001000110111101000000000010010111110010...
result:
ok 100 lines
Test #65:
score: 17
Accepted
time: 3068ms
memory: 51284kb
input:
66 150 146 1 4 5 4 2 1 1 8476 8476 8476 8476 8476 8476 8476 8476 8476 8476 8476 8476 8476 8476 8476 8476 8476 8476 8476 8476 8476 8476 8476 8476 8476 8476 8476 8476 8476 8476 8476 8476 8476 8476 8476 8476 8476 8778 8325 8476 8476 8476 8476 8476 8476 8476 8476 8476 8476 8476 8926 8251 8476 8476 8476 ...
output:
100001101111101111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101111011100100000000000 11011011111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
ok 66 lines
Test #66:
score: 0
Time Limit Exceeded
input:
50 200 180 124 41 159 16 91 31 179 200 68 35 70 40 45 20 6 10 84 54 286 83 35 51 28 87 148 51 55 54 262 76 81 9 42 184 4 201 32 67 234 97 147 50 2122 737 934 356 10 1140 495 1732 975 816 278 163 107 683 53 481 54 18 44 126 27 44 52 38 81 125 30 34 58 38 25 6 12 194 29 75 52 21 45 31 4 10 34 5 28 133...
output:
10100101000001001110000000100000000010010001000011010001111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 111010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
result:
Subtask #6:
score: 0
Wrong Answer
Test #80:
score: 16
Accepted
time: 28ms
memory: 16216kb
input:
3333 6 1000000000 131727 7 4 170194 6 59263 6 1000000000 417714 286613 7 310122 6 4 6 1000000000 63764 2430 2696 6699 8478 22261 6 1000000000 217 131 6 1487 2927 2 6 1000000000 26225 27991 3842 72525 4521 5231 6 1000000000 34409 26001 23563 19345 30764 24919 6 1000000000 97981 138532 59280 82393 128...
output:
10100110001101001000000 10010111011100001100000 101011011110101000000 10110111001100000 110010000010110110000 111100110010110100000 11111011000100010000000 11001111100101100 1100000101001001010100000 100000000000 100111000110001000000 101110110010100111000000 10000000000000000000000 1100000111101000...
result:
ok 3333 lines
Test #81:
score: 16
Accepted
time: 66ms
memory: 16212kb
input:
2000 10 1000000000 4 225227 95031 258432 108444 260818 190505 154686 1 5 10 1000000000 541067 480522 7 372550 533382 366492 200177 240412 6 1 10 1000000000 10004 14230 86468 2812 9690 7106 21976 45928 9749 30567 10 1000000000 12217 2718 4247 9981 12911 1845 2048 4 1387 16384 10 1000000000 46966 1438...
output:
11110100000110100010000000 101001100100010010010000000 1111111110010010000000000 1000000000000000000000000 11010100011000000000 110010110111010010100000000 11000010111011011011000000000 1001001110000111010000000000 11110110001100100100000000 101110111011100111000000000 100001001101001011110000000 10...
result:
ok 2000 lines
Test #82:
score: 0
Wrong Answer
time: 407ms
memory: 16156kb
input:
800 25 1000000000 87944 70771 86657 342502 146802 122800 216223 248367 121688 22026 9518 1128 64025 63379 231058 292954 218186 35314 64373 10501 20550 32081 39386 10095 78181 25 1000000000 54665 3 129508 98607 92526 68177 57466 62726 21642 52766 23748 16110 18286 9033 4 6 3 6 2 5 7 5 7 1 4 25 100000...
output:
100110001011001010000000000000000000000000 11001101110010100000000000000 1101110010100110110000000000000000000000 1011101001000100000000000000000000000000 10100110000000000000000000000000 1001111010011010010000000000000000000000 10010000010110010011000000000000000000000000 10000010010000000000000000...
result:
wrong answer 521st lines differ - expected: '1110001000000000000000000000', found: '1110000000000000000000000000'
Subtask #7:
score: 0
Skipped
Dependency #4:
0%