QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#748067 | #8779. Square of Triangles | ydzr00000 | WA | 30ms | 3980kb | C++17 | 6.4kb | 2024-11-14 19:13:34 | 2024-11-14 19:13:39 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
using Ld=long double;
const Ld eps=1e-6,sr2=sqrtl(2.00);
int a[5][4],b[13];
Ld c[13];
int P[5],Q[5][4];
inline bool Equals(const Ld &a,const Ld &b){return fabs(a-b)<=eps;}
inline bool Greater(const Ld &a,const Ld &b){return a-b>eps;}
inline bool Less(const Ld &a,const Ld &b){return a-b<(-eps);}
inline bool RtCheckD(const Ld &a,const Ld &b,const Ld &c){return Equals(a*a+b*b,c*c);}
inline bool RtCheckI(const int &a,const int &b,const int &c){return a+b==c;}
inline bool check(const Ld &S)
{
if(b[1]==b[2]&&b[1]+b[2]==b[3])
{
if(b[1]==b[4])
{
if(b[6]==b[7]&&b[9]==b[10]&&b[2]==b[12]&&Equals(c[5]+c[8]+c[11],c[3])&&!Less(c[6],c[3]*0.5)&&!Less(c[10],c[3]*0.5)&&Less(c[6],c[1])&&Less(c[10],c[2]))
return true;
if(b[6]==b[9]&&b[8]==b[11]&&Equals(c[5]+c[12],c[3])&&Equals(c[1],c[7]+c[10])&&!Less(c[6],c[3]*0.5)&&Less(c[6],c[1])&&Less(c[8],max(c[9],c[12])))
return true;
if(b[8]==b[1]&&b[9]==b[10]&&Equals(c[5]+c[12],c[3])&&Equals(c[6],c[7]+c[11])&&!Less(c[6],c[3]*0.5)&&Less(c[6],c[1])&&Less(c[9],max(c[8],c[12])))
return true;
if(b[11]==b[3]&&Equals(c[6]+c[9],c[10])&&Equals(c[8]+c[12],c[1])&&b[5]==b[7]&&Greater(c[10],c[4])&&Less(c[10],c[3])&&Less(c[9],max(c[8],c[4])))
return true;
if(b[5]==b[8]&&b[1]==b[7]&&b[11]==b[9]&&b[6]==b[10]&&b[12]==b[3]&&Less(c[5],c[4])&&Less(c[10],c[3])&&Less(c[9],c[3]))
return true;
if(b[6]==b[7]&&b[8]==b[10]&&Equals(c[5]+c[11],c[1])&&Equals(c[9]+c[12],c[3])&&Greater(c[6],c[4])&&Less(c[6],c[3])&&Less(c[8],max(c[7],c[11])))
return true;
if(b[9]==b[11]&&b[3]==b[12]&&Equals(c[6],c[10]+c[8])&&Equals(c[5]+c[7],c[1])&&Greater(c[6],c[4])&&Less(c[6],c[3])&&Less(c[9],c[12])&&Greater(c[9],c[7]))
return true;
if(b[6]==b[7]&&b[9]==b[10]&&b[12]==b[3]&&Equals(c[5]+c[8]+c[11],c[1])&&Greater(c[6],c[4])&&Greater(c[9],c[6])&&Greater(c[12],c[9]))
return true;
}
if(b[3]==b[12]&&b[6]==b[10]&&b[5]==b[9]&&Equals(c[4]+c[7],c[1])&&Equals(c[8]+c[11],c[2])&&Greater(c[6],c[1])&&Less(c[6],c[3])&&Greater(c[5],c[8])&&Less(c[5],c[6]))
return true;
}
if(b[1]==b[4]&&RtCheckI(b[1],b[2],b[3])&&RtCheckI(b[4],b[5],b[6])&&Greater(b[4],b[5])&&Greater(b[1],b[2]))
{
if(b[6]==b[7]&&b[9]==b[10]&&b[11]==b[3]&&Equals(c[2]+c[8],c[1])&&Equals(c[5]+c[12],c[1])&&Less(b[6],2*b[1])&&Less(b[3],2*b[1])&&Less(b[10],2*b[1]))
return true;
if(b[6]==b[8]&&b[3]==b[12]&&b[9]==b[10]&&Equals(b[9],b[1]*2)&&Equals(c[5]+c[7],c[1])&&Equals(c[2]+c[11],c[4])&&Less(c[3],c[10])&&Less(c[6],c[9]))
return true;
if(b[3]==b[9]&&b[6]==b[12]&&b[8]==b[11]&&Equals(c[10]+c[7],c[1])&&Equals(c[2]+c[5],c[1])&&!Less(c[8],c[1])&&Less(b[8],2*b[1]))
return true;
if(b[7]==b[10]&&b[11]==b[1]&&b[3]==b[8]&&Equals(c[9]+c[12],c[6])&&Equals(c[2]+c[5],c[1])&&Less(c[10],max(c[8],c[11])))
return true;
if(b[3]==b[11]&&b[6]==b[8]&&b[9]==b[10]&&Equals(c[5]+c[7],c[1])&&Equals(c[2]+c[12],c[1])&&Equals(b[1]*2,b[9])&&Less(c[3],c[9])&&Less(c[8],c[9]))
return true;
if(b[10]==b[3]&&b[9]==b[11]&&b[12]==b[6]&&Equals(c[5]+c[7],c[1])&&Equals(c[2]+c[8],c[4])&&Less(b[3],2*b[1])&&Less(b[9],2*b[4])&&Less(b[6],2*b[1])&&RtCheckI(b[7],b[8],b[9]))
return true;
if(b[7]==b[1]&&b[3]==b[9]&&b[6]==b[10]&&b[12]==b[8]&&Equals(c[2]+c[5]+c[11],c[1])&&Greater(c[8],c[6])&&Less(b[8],2*b[1]))
return true;
}
if(RtCheckI(b[1],b[2],b[3])&&Greater(b[1],b[2]))
{
if(b[3]==b[11]&&b[12]==b[1]&&b[9]==b[1]&&b[6]==b[7]&&Equals(c[8]+c[5],c[10])&&Equals(c[2]+c[4],c[1])&&Greater(c[10],c[9])&&Less(b[10],2*b[1])&&Less(c[7],max(c[4],c[9]))&&RtCheckI(b[9],b[4],b[10]))
return true;
if(b[3]==b[11]&&b[9]==b[10]&&b[6]==b[7]&&b[12]==b[1]&&Equals(c[2]+c[4],c[1])&&Equals(c[5]+c[8],c[1])&&Greater(c[10],c[1])&&Less(b[10],2*b[1])&&Greater(c[6],c[4])&&Less(c[6],c[9])&&RtCheckI(b[4],b[5],b[6]))
return true;
if(b[10]==b[9]&&b[11]==b[1]&&b[7]==b[1]&&b[8]==b[6]&&Equals(c[12]+c[5],c[3])&&Equals(c[2]+c[4],c[1])&&Greater(c[6],c[4])&&Less(b[6],2*b[1])&&Less(b[10],2*b[1]))
return true;
if(b[3]==b[10]&&b[4]==b[1]&&b[7]==b[1]&&b[5]==b[8]&&Equals(c[6]+c[9],c[11])&&Equals(c[2]+c[12],c[1])&&Equals(b[11],2*b[1])&&!Less(c[5],0.5*c[11])&&Less(c[5],c[4])&&Greater(c[3],c[1])&&Less(c[3],c[11]))
return true;
}
if(b[1]==b[4]&&b[11]==b[7]&&b[1]==b[11]&&b[8]==b[10]&&b[2]==b[5]&&Equals(c[3]+c[6],c[12]+c[9])&&Equals(c[3]+c[6],sr2*c[1])&&Less(c[8],c[7])&&!Less(c[8],0.5*(c[3]+c[6]))&&Less(c[2],c[1])&&!Less(c[2],0.5*(c[3]+c[6]))&&Equals(S,b[1]))
return true;
if(b[1]==b[4]&&b[4]==b[11]&&b[11]==b[9]&&b[3]==b[5]&&b[6]==b[12]&&b[10]==b[8]&&b[2]==b[7]&&b[3]+b[8]==b[2]+b[12])
{
if(!Less(c[3]+c[8],sr2*c[1])&&!Less(c[7]+c[12],sr2*c[1])&&Less(b[12],2*b[1])&&Less(b[8],2*b[1])&&Less(b[2],2*b[1])&&Less(b[3],2*b[1])&&Less(max(c[2]+c[12],c[3]+c[10]),c[1]+c[4])&&Equals(S,b[1]))
return true;
}
return false;
}
inline Ld Area(const Ld &a,const Ld &b,const Ld &c)
{
Ld p=(a+b+c)/2;
Ld s=sqrtl(p*(p-a)*(p-b)*(p-c));
return s;
}
inline void solve()
{
Ld sum=0;
for(int i=1;i<=4;i++)
{
for(int j=1;j<=3;j++)
scanf("%d",&a[i][j]);
Ld x=sqrtl(1.00*a[i][1]);
Ld y=sqrtl(1.00*a[i][2]);
Ld z=sqrtl(1.00*a[i][3]);
sum+=Area(x,y,z);
}
iota(P+1,P+5,1);
for(int i=1;i<=4;i++)
iota(Q[i]+1,Q[i]+4,1);
bool flg=false;
do{
auto dfs=[&](auto self,int dep)->void
{
if(dep==5)
{
int k=0;
for(int i=1;i<=4;i++)
for(int j=1;j<=3;j++)
b[++k]=a[P[i]][Q[P[i]][j]];
for(int i=1;i<=12;i++)
c[i]=sqrtl(1.00*b[i]);
flg|=check(sum);
return;
}
do{
self(self,dep+1);
}while(next_permutation(Q[dep]+1,Q[dep]+4));
};
dfs(dfs,1);
}while(next_permutation(P+1,P+5));
printf("%d\n",flg);
}
int main(){
int t;
scanf("%d",&t);
while(t--)
solve();
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 5ms
memory: 3836kb
input:
3 1 1 2 2 1 1 2 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 5 125 130 125 20 145 45 130 145 145 145 80
output:
1 0 1
result:
ok 3 lines
Test #2:
score: 0
Accepted
time: 25ms
memory: 3948kb
input:
20 1998001 7984010 9982009 1998001 7984010 1994005 7984010 9978013 9982009 9978013 1994005 7984010 9958045 7968034 9962037 7968034 1994005 9962037 9958045 1990013 7968034 1994005 1990013 7968034 7952074 9938097 1986025 7952074 9942085 1990013 7952074 9942085 9938097 1986025 7952074 1990013 7936130 9...
output:
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
result:
ok 20 lines
Test #3:
score: 0
Accepted
time: 29ms
memory: 3952kb
input:
20 1148639 3581051 1216206 9999916 7026968 270268 6013463 6013463 6756700 6013463 6013463 6756700 2608850 8630930 9445800 9862940 6448880 6939290 8631650 3682160 5184310 7504700 6652150 1917140 2359505 3170711 2299108 4027811 6760781 2960240 4679918 6106006 3178400 8153446 7975057 5222088 8849500 88...
output:
0 0 0 1 1 1 1 0 1 1 1 1 1 0 0 0 0 1 1 1
result:
ok 20 lines
Test #4:
score: 0
Accepted
time: 29ms
memory: 3952kb
input:
20 7300000 8100000 10000000 8100000 7300000 1000000 1000000 7300000 2900000 2900000 10000000 7300000 61728 8950560 9999936 7901184 4012320 4999968 8950560 3950592 4999968 4012320 123456 4999968 4494200 9932182 9932182 8381683 112355 9932182 5505395 9460291 9932182 9999595 4494200 9190639 5994936 671...
output:
1 1 0 0 0 1 0 0 0 0 0 1 1 0 0 0 0 1 0 0
result:
ok 20 lines
Test #5:
score: 0
Accepted
time: 30ms
memory: 3760kb
input:
20 10000000 5078125 3828125 78125 5000000 5078125 1250000 10000000 6250000 5000000 6250000 1250000 7079600 5663680 1415920 7079600 796455 9999935 5663680 9999935 5752175 5663680 88495 5752175 4410468 1135368 9999972 5676840 4541472 5676840 4541472 5676840 5676840 8078580 742356 6288192 8345560 44707...
output:
1 1 0 0 0 1 1 1 1 1 1 0 0 1 0 1 0 1 0 0
result:
ok 20 lines
Test #6:
score: 0
Accepted
time: 29ms
memory: 3980kb
input:
20 10000000 5078125 3828125 2031250 78125 1953125 703125 5078125 2031250 5000000 10000000 5000000 5000000 10000000 5000000 5000000 2890625 390625 6250000 1250000 10000000 1250000 2890625 3515625 6711400 9999986 3288586 4899322 4295296 604026 6979856 9999986 4899322 6711400 6979856 268456 9767552 645...
output:
1 1 1 0 1 1 0 1 1 0 1 1 0 0 1 0 0 1 0 0
result:
ok 20 lines
Test #7:
score: 0
Accepted
time: 29ms
memory: 3916kb
input:
20 3063559 8439238 9999919 3063559 9999919 3005756 8381435 9999919 8439238 8381435 3005756 9999919 6923007 4319483 4852022 2130156 4319483 769223 9999899 3076892 6923007 6923007 2899379 4852022 3271584 4999968 493824 6049344 61728 5246880 4999968 4999968 9999936 5246880 3271584 3950592 7398784 99999...
output:
1 1 1 1 0 1 0 0 1 0 0 0 0 1 0 0 0 1 0 0
result:
ok 20 lines
Test #8:
score: 0
Accepted
time: 29ms
memory: 3832kb
input:
20 5524800 4475088 9999888 55248 4475088 4530336 9999888 5580048 5524800 55248 4530336 5580048 7123920 8940020 2698748 6206580 7677584 8296048 6252164 6473284 9023920 7524124 4702788 5944204 7901120 7901120 6320896 6320896 7901120 7901120 9135670 9999855 913567 1506151 1111095 98764 2222220 3555552 ...
output:
1 0 0 1 0 1 1 0 0 1 1 1 1 1 0 1 0 0 1 0
result:
ok 20 lines
Test #9:
score: 0
Accepted
time: 29ms
memory: 3768kb
input:
20 3404348 6811514 5073762 1575108 4047618 3481696 6589302 6594868 4559458 5124278 2664770 3517574 5393960 2157584 5393960 5393960 2157584 5393960 2199076 9999572 2821456 2157584 8972645 8723693 2091488 4248335 9999927 9999927 9542414 7385567 4248335 9542414 9999927 9999927 2091488 7385567 5867350 7...
output:
0 0 1 0 1 0 1 1 0 1 1 0 1 0 1 1 0 1 0 1
result:
ok 20 lines
Test #10:
score: 0
Accepted
time: 25ms
memory: 3836kb
input:
20 4753532 8244880 6269438 3937444 762818 4555348 7280126 5303718 8327606 9077712 1705788 9903866 4999968 9999936 4999968 555552 7222176 9999936 6543168 1543200 4999968 7222176 6543168 61728 1360000 6560000 3664000 6560000 6560000 4608000 10000000 2960000 6560000 1152000 2320000 3664000 1709400 5470...
output:
0 1 0 0 1 0 1 1 0 0 1 1 1 1 0 1 0 1 0 0
result:
ok 20 lines
Test #11:
score: 0
Accepted
time: 29ms
memory: 3772kb
input:
20 2615382 9846144 9999990 9846144 9999990 9999990 9999990 2769228 2615382 9999990 2769228 9999990 9191125 9999944 4779385 1323522 9191125 6544081 6544081 9999944 9191125 1323522 9191125 4779385 7028892 1743768 1991340 7028892 7028892 1743768 8234460 4865328 7028892 2378844 7599384 9999756 9731530 4...
output:
1 1 0 1 1 1 0 0 1 0 0 0 1 1 1 1 0 1 1 1
result:
ok 20 lines
Test #12:
score: 0
Accepted
time: 29ms
memory: 3920kb
input:
20 4999960 6173420 3316300 4999960 4999960 9999920 459180 459180 918360 1632640 459180 3316300 6328125 5078125 156250 5078125 6328125 10000000 6328125 5078125 10000000 6328125 156250 5078125 9979836 8089680 8280504 7601784 7634364 7141536 5377824 7028244 4492560 5815068 7928868 4377312 720000 800000...
output:
1 1 0 1 0 0 1 1 0 0 1 1 0 0 1 1 1 1 0 1
result:
ok 20 lines
Test #13:
score: 0
Accepted
time: 29ms
memory: 3924kb
input:
20 9999916 1689175 5743195 5743195 878371 4999958 9999916 4999958 4999958 1689175 878371 4999958 6301605 4049556 6301605 2024778 4049556 2024778 7293333 330576 6301605 9999924 6115656 3388404 617280 7901184 6543168 617280 123456 987648 4999968 4999968 9999936 1543200 6543168 4999968 3828125 1953125 ...
output:
1 0 1 1 0 1 1 1 1 0 1 0 0 1 0 0 0 0 0 1
result:
ok 20 lines
Test #14:
score: 0
Accepted
time: 25ms
memory: 3772kb
input:
20 9999720 2888808 3555456 7610898 3555456 7610898 4944306 8805309 1805505 7610898 7610898 3555456 4999968 4999968 9999936 6543168 1543200 2530848 987648 9999936 6543168 1543200 987648 2530848 4999967 2358475 5471662 754712 5471662 9999934 754712 4999967 2358475 4999967 9999934 4999967 5371860 20661...
output:
0 1 1 0 0 1 1 1 0 1 0 0 1 0 1 1 1 1 1 0
result:
ok 20 lines
Test #15:
score: 0
Accepted
time: 29ms
memory: 3916kb
input:
20 4999968 4999968 9999936 4999968 5555520 555552 5555520 3402756 1180548 1180548 2222208 1736100 2207678 4505792 4722268 6840476 4330164 8510736 5829672 8496568 9904306 4191336 5368108 9200414 2644740 821072 2890020 3199420 6624380 4992680 6593608 7493780 2880304 9678732 5684644 8431388 9999920 433...
output:
1 0 0 1 0 0 0 1 1 0 1 1 1 1 0 1 0 1 1 0
result:
ok 20 lines
Test #16:
score: 0
Accepted
time: 29ms
memory: 3980kb
input:
20 8136144 6408528 8054156 7239584 6536596 1012996 1884652 5391096 6567204 1480764 5442988 5704872 9999936 4999968 4999968 902772 5069412 6944400 4999968 902772 5069412 3611088 4999968 277776 6358573 6634433 717236 2110329 2013778 1558609 9737858 9999925 6634433 717236 6634433 6634433 8820735 572387...
output:
0 1 0 0 0 1 1 0 0 0 1 1 1 0 1 0 1 1 1 0
result:
ok 20 lines
Test #17:
score: 0
Accepted
time: 29ms
memory: 3892kb
input:
20 1479580 2551000 2499980 1479580 5408120 2499980 4999960 9999920 4999960 408160 5408120 4999960 1418208 6119592 6943616 4717024 1703128 4933672 8516320 2379048 9953024 6649448 9056784 2567000 6639370 1661665 8301033 6639370 8297389 8301033 1658021 6639370 1661665 8297389 6639370 1658021 8390964 71...
output:
1 0 1 0 0 1 0 1 0 1 1 0 0 0 0 0 0 1 0 1
result:
ok 20 lines
Test #18:
score: 0
Accepted
time: 29ms
memory: 3972kb
input:
20 7346880 3775480 2551000 408160 3775480 3775480 4999960 3775480 204080 4999960 9999920 4999960 1493307 3497157 3289248 8523972 9198432 4312377 9709335 6351264 6294204 6821208 8165214 7286535 3024672 1543200 1111104 4999968 5246880 246912 4444416 5246880 1543200 4999968 4999968 9999936 3773520 1886...
output:
1 0 1 0 0 0 1 0 1 0 0 1 1 0 0 0 1 0 1 1
result:
ok 20 lines
Test #19:
score: 0
Accepted
time: 29ms
memory: 3904kb
input:
20 2352936 2941170 9999978 6522477 1470585 8062266 9999978 4999989 4999989 1245672 4999989 1470585 816320 1326520 1734680 4999960 9999920 4999960 5306080 2653040 2653040 5306080 1020400 9999920 1592350 9745182 5222908 5222908 9999958 9745182 6369400 9745182 1592350 6369400 9745182 9999958 5103567 38...
output:
0 0 1 0 1 0 1 0 1 1 1 1 1 0 1 0 1 1 1 1
result:
ok 20 lines
Test #20:
score: 0
Accepted
time: 29ms
memory: 3920kb
input:
20 7799454 2234856 7068594 7469592 6119295 2577003 5131074 5574153 788268 9870705 8852376 4653597 5475555 487800 2695095 6158475 4938975 9999900 2756070 6890175 6890175 2756070 6890175 6890175 800000 400000 400000 5000000 10000000 5000000 5000000 6800000 1800000 6800000 400000 6400000 9999916 844587...
output:
0 0 1 0 0 0 0 0 1 0 1 0 1 1 0 1 1 0 1 0
result:
ok 20 lines
Test #21:
score: 0
Accepted
time: 29ms
memory: 3832kb
input:
20 8237460 1860180 7272027 4902072 8849757 8065575 3965220 5917359 3180429 3014466 9630789 9316083 7918794 5678634 9874566 2886624 5180292 7598136 4464798 1190046 4641780 1591902 1488552 2232360 5111680 7316092 1437660 5111680 4089344 5111680 5111680 5239472 1661296 3610124 1661296 9999724 10000000 ...
output:
0 0 0 1 1 1 1 1 0 1 1 1 1 1 0 0 0 0 0 0
result:
ok 20 lines
Test #22:
score: 0
Accepted
time: 30ms
memory: 3920kb
input:
20 1938141 7950042 2037501 9986301 2037501 7950042 1938141 7950042 9886941 9986301 9886941 7950042 8268288 8041242 2564520 9467202 6784944 8153346 7401474 5033406 4490748 9289506 9273174 3531036 1780818 4999989 890409 4999989 1780818 5821905 9999978 890409 5821905 9999978 4999989 4999989 9999909 269...
output:
1 0 1 1 1 0 0 0 0 0 0 1 0 0 0 1 1 1 0 0
result:
ok 20 lines
Test #23:
score: 0
Accepted
time: 29ms
memory: 3824kb
input:
20 2416104 6711400 9127504 1677850 9999986 9127504 1073824 604026 1677850 6711400 3288586 9999986 7352800 8602776 2720536 5974150 5974150 919100 919100 5974150 5974150 5441072 9999808 1911728 9392195 5013150 8219905 5548800 4903200 1000450 5186040 4242970 3048285 4759225 2184840 5285745 8648640 7837...
output:
1 0 0 1 0 0 1 0 1 1 0 1 1 0 0 0 1 1 1 0
result:
ok 20 lines
Test #24:
score: 0
Accepted
time: 29ms
memory: 3768kb
input:
20 5102000 9999920 3673440 9999920 5408120 8265240 5408120 2551000 9999920 5102000 9999920 6530560 5000000 5000000 10000000 3200000 5000000 8200000 8100000 200000 6500000 6500000 100000 8200000 4999968 4999968 9999936 9999936 2777760 2777760 694440 2777760 1249992 6249960 1249992 4999968 9999990 345...
output:
1 1 1 1 1 1 1 0 0 1 0 1 0 0 1 1 0 1 0 0
result:
ok 20 lines
Test #25:
score: 0
Accepted
time: 29ms
memory: 3908kb
input:
20 2461536 9999990 7538454 1384614 3846150 2461536 3846150 8923068 1384614 8923068 7538454 9999990 7123272 7260258 9999978 7123272 684930 3424650 7123272 684930 7260258 9999978 7123272 3424650 6512715 8851305 6485040 8758230 3115170 9438570 8690730 8032245 8359425 1004070 4133535 3833130 4226690 455...
output:
1 1 0 0 1 1 0 0 1 0 1 1 1 0 0 0 0 1 0 1
result:
ok 20 lines
Test #26:
score: 0
Accepted
time: 29ms
memory: 3952kb
input:
20 5408120 2040800 918360 9999920 2551000 5408120 4999960 9999920 4999960 2040800 1632640 408160 10000000 2000000 4000000 8000000 1000000 5000000 8000000 1000000 5000000 5000000 5000000 10000000 8005300 8476200 8005300 9002500 9418000 138500 8545450 9999700 124650 8005300 8005300 8476200 138888 3611...
output:
1 0 0 1 0 1 1 0 1 0 1 1 1 0 1 1 1 1 0 0
result:
ok 20 lines
Test #27:
score: 0
Accepted
time: 29ms
memory: 3952kb
input:
20 4062500 8562500 10000000 10000000 7062500 8562500 1125000 8562500 7062500 4062500 8562500 1125000 80000 5920000 5200000 10000000 5200000 5920000 4880000 5920000 80000 5920000 4880000 10000000 9717868 4645503 5521328 2311012 5378917 4137074 5021909 7490649 3000224 3284516 9148277 9904852 6249960 1...
output:
1 1 0 1 0 0 1 1 0 1 1 1 1 0 0 0 0 0 0 0
result:
ok 20 lines
Test #28:
score: 0
Accepted
time: 29ms
memory: 3976kb
input:
20 6697128 8053596 6626364 6595068 8455992 2604024 2944560 7228524 6327096 3293904 9652152 8723208 4999968 9999936 4999968 3950592 6975264 3024672 8950560 61728 9999936 246912 8950560 6975264 3340602 5873346 5676840 5698674 5676840 5873346 9192114 109170 9999972 5676840 5676840 349344 987648 9999936...
output:
0 1 0 1 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0
result:
ok 20 lines
Test #29:
score: 0
Accepted
time: 29ms
memory: 3920kb
input:
20 4000000 4000000 8000000 2000000 4000000 10000000 6250000 8000000 4250000 4250000 6250000 8000000 9999900 3388855 8722135 1444430 8055475 8722135 8722135 1444430 3388855 8055475 8722135 9999900 3472200 4999968 8472168 4999968 9999936 4999968 8472168 7013844 69444 8402724 138888 7013844 5078125 382...
output:
0 1 1 1 1 1 1 0 1 0 1 0 1 0 0 0 0 0 1 1
result:
ok 20 lines
Test #30:
score: 0
Accepted
time: 29ms
memory: 3904kb
input:
20 4429593 9626788 5758165 4904957 9545943 6959708 6061466 7740834 9999227 3923639 3937370 4963055 555555 1888887 1999998 4999995 4999995 9999990 1888887 4999995 888888 5555550 9999990 2222220 5850721 1168921 4681802 4681802 5853781 5850721 1168921 4681802 1171981 1171981 4681802 5853781 5783446 690...
output:
0 1 1 0 1 1 1 1 1 1 1 0 1 1 0 1 1 0 1 0
result:
ok 20 lines
Test #31:
score: 0
Accepted
time: 26ms
memory: 3916kb
input:
20 8167204 2726396 7607640 8207368 5094088 7237940 1889236 7349680 6598032 6603544 5909552 958016 6210068 7765074 7760090 1550026 6210068 1555010 6210068 1555010 7765074 6210068 7760090 1550026 5429512 7620976 5462464 6599536 8481440 6328256 7162360 2183840 5749896 9404016 2898312 6519784 1250000 62...
output:
0 1 0 1 0 1 0 0 0 0 0 0 0 1 1 1 1 0 1 0
result:
ok 20 lines
Test #32:
score: 0
Accepted
time: 29ms
memory: 3920kb
input:
20 6523290 9097503 4079184 6827124 3909657 8150730 9359829 3267423 8627997 4426740 5483787 5447796 9999978 616437 8561625 136986 1712325 1164381 4999989 4999989 9999978 3561636 1712325 4999989 8234065 6194559 9058630 1121694 8650236 7664083 5065445 7707455 4411981 7179879 8934331 6849311 8622380 499...
output:
0 0 0 1 1 0 0 1 1 1 1 1 1 0 1 0 1 1 0 1
result:
ok 20 lines
Test #33:
score: 0
Accepted
time: 30ms
memory: 3840kb
input:
20 4900000 6500000 10000000 2000000 10000000 8000000 900000 6500000 8000000 10000000 2000000 8000000 1340196 2113386 4999962 4999962 9999924 4999962 3350490 9999924 2113386 4999962 3350490 1340196 1538460 3076920 1538460 1538460 1538460 3076920 3076920 9999990 6923070 6538455 6538455 6923070 7369375...
output:
1 1 0 0 0 1 1 0 1 0 1 1 0 1 1 1 0 1 0 1
result:
ok 20 lines
Test #34:
score: 0
Accepted
time: 29ms
memory: 3840kb
input:
20 5050000 5000000 50000 4050000 10000000 5050000 10000000 4050000 5050000 50000 5000000 5050000 3157376 2383608 2783496 1157736 9716360 8996032 9974976 1892728 9114840 9468728 7768808 3929312 9999900 9388795 55555 9999900 7999920 9999900 7999920 9999900 1999980 7999920 9388795 1388875 6192540 96655...
output:
1 0 1 0 1 0 0 0 1 0 1 1 1 1 0 1 0 0 1 0
result:
ok 20 lines
Test #35:
score: 0
Accepted
time: 29ms
memory: 3948kb
input:
20 5703125 9453125 10000000 3203125 781250 1328125 5078125 5078125 312500 312500 5078125 5078125 9999958 6624176 4140110 4140110 3694252 9999958 3694252 6178318 9999958 6624176 9999958 6178318 3400000 5000000 6400000 650000 1250000 3400000 400000 650000 1250000 5000000 10000000 5000000 9999990 70270...
output:
0 1 1 1 1 1 0 0 1 0 0 1 0 0 0 0 0 0 1 1
result:
ok 20 lines
Test #36:
score: 0
Accepted
time: 29ms
memory: 3856kb
input:
20 9127504 67114 9999986 5436234 7315426 9127504 3288586 9999986 6711400 7315426 604026 6711400 9999730 2113345 9082229 876265 6030765 5546242 3267953 3267953 6535906 3267953 3267953 6535906 2776952 6029980 7963024 3535344 5766468 6862516 9188688 7211432 8982368 7021980 4055432 8635460 2001039 79903...
output:
1 0 0 1 0 0 1 0 0 1 0 0 0 1 1 0 1 1 0 1
result:
ok 20 lines
Test #37:
score: 0
Accepted
time: 29ms
memory: 3976kb
input:
20 1145400 5280294 4134894 4318158 9999342 3115488 4134894 5280294 1145400 1145400 7067118 9495366 5655130 4413760 8965450 68965 5586165 5655130 4413760 5586165 9999925 68965 9999925 8965450 4553812 1599988 1230760 7692250 7692250 9969156 3076900 7692250 7692250 615380 9999925 9999925 7200000 400000...
output:
0 1 0 0 1 1 0 1 0 1 0 1 1 1 1 1 1 0 0 1
result:
ok 20 lines
Test #38:
score: 0
Accepted
time: 29ms
memory: 3836kb
input:
20 5517200 841373 6579261 3048253 3048253 5517200 882752 7793045 9999925 5517200 2206880 5517200 6093648 3476682 7214220 7694730 8118792 4621698 6785964 1639044 7765416 9952164 3722814 9112608 4999968 9999936 4999968 493824 308640 61728 308640 3271584 3950592 4999968 3271584 6049344 1230768 9999990 ...
output:
0 0 1 1 1 0 1 0 0 1 1 0 1 1 0 1 1 1 0 0
result:
ok 20 lines
Test #39:
score: 0
Accepted
time: 30ms
memory: 3920kb
input:
20 9839013 7987003 9379770 2923212 5452881 7179769 5340680 9840181 9911721 4682074 3286387 1728129 2936340 7846553 1582361 4437136 5546420 5546420 4437136 5546420 5546420 81565 9999869 9559418 9999608 4938331 1741735 9118495 9118495 9917644 1331915 9118495 4098200 9384878 9118495 4938331 9999990 351...
output:
0 0 0 1 0 1 1 0 1 0 0 1 0 0 1 0 0 0 1 1
result:
ok 20 lines
Test #40:
score: 0
Accepted
time: 25ms
memory: 3720kb
input:
20 1436448 1381200 55248 5524800 9999888 5580048 4475088 9999888 5524800 1381200 1436448 5580048 6450765 544815 6138891 7237605 3329589 6066864 4363101 5144037 7808493 4928364 2961654 4298961 9999925 7310290 620685 68965 5586165 5655130 1724125 7310290 5586165 5586165 9999925 5655130 268456 7315426 ...
output:
1 0 1 1 1 0 1 0 1 1 1 1 1 0 1 0 0 0 0 1
result:
ok 20 lines
Test #41:
score: 0
Accepted
time: 29ms
memory: 3824kb
input:
20 5524800 9999888 4475088 55248 276240 220992 5580048 9999888 5524800 5580048 3535872 276240 8358624 7783808 8482560 9611696 9963920 4555200 9934560 7872720 2100992 3301616 6141360 5774720 5882350 117647 5764703 5882350 470588 5882350 5882350 9999995 2941175 5764703 9999995 4235292 3828125 10000000...
output:
1 0 1 1 1 1 1 0 0 1 0 0 0 0 0 1 0 0 1 0
result:
ok 20 lines
Test #42:
score: 0
Accepted
time: 29ms
memory: 3976kb
input:
20 8413730 7517185 1172405 3655145 1172405 8413730 9999925 7517185 8413730 9999925 8413730 3655145 3049221 5789007 3276630 7254450 6439629 7215348 5303907 8654625 8396640 3786279 9997323 6576780 5791744 1855168 6922944 8054144 8370880 9999808 1312192 8054144 8370880 904960 8370880 8370880 8648640 60...
output:
1 0 0 0 0 0 0 0 0 1 0 1 1 0 1 1 1 1 0 0
result:
ok 20 lines
Test #43:
score: 0
Accepted
time: 29ms
memory: 3772kb
input:
20 8950560 1543200 5555520 9999936 61728 8950560 555552 5555520 4999968 4999968 9999936 4999968 6129440 7661800 7661800 700130 9999970 7661800 9999970 7661800 2391010 3659170 6129440 2073970 6593178 8406564 4161354 6593178 6593178 1551336 9999828 429762 8857290 1436034 8406564 6593178 5703125 500000...
output:
1 0 0 1 0 0 0 0 1 0 1 0 0 1 1 0 1 1 1 0
result:
ok 20 lines
Test #44:
score: 0
Accepted
time: 29ms
memory: 3956kb
input:
20 9024374 4878040 1219510 6341452 1219510 9024374 9024374 9999982 6341452 9999982 9024374 4878040 9999909 7668324 4196853 7668324 673569 6476625 7668324 6476625 9999909 673569 4196853 7668324 3665249 4878624 3698938 6292991 2721386 5806499 5463899 6720670 9985648 1567395 7375607 6991324 4584474 401...
output:
1 1 0 0 1 1 0 0 0 0 0 0 0 1 1 1 0 0 0 1
result:
ok 20 lines
Test #45:
score: 0
Accepted
time: 30ms
memory: 3916kb
input:
20 4999968 3124980 5624964 624996 1180548 2222208 1180548 555552 3124980 9999936 4999968 4999968 7258188 4658488 4181172 6066112 6965856 8440748 3792136 2014244 4868492 8721784 8136496 953768 7744040 9671220 9688820 9671220 1927220 7744040 1944820 7744040 9688820 1927220 1944820 7744040 9464840 6623...
output:
1 0 1 0 1 1 0 0 1 0 1 1 0 0 0 0 0 1 1 0
result:
ok 20 lines
Test #46:
score: 0
Accepted
time: 29ms
memory: 3916kb
input:
20 7641459 1509424 9150883 9150883 7641459 9999934 9999934 5754679 849051 3396204 5754679 2358475 2656250 1406250 5000000 2031250 2656250 1250000 5000000 10000000 5000000 2031250 1250000 3906250 7123272 7465737 68493 7465737 273972 8561625 7465737 9999978 6095877 7465737 7123272 7739709 9999808 1809...
output:
1 1 0 0 0 1 1 0 0 1 0 0 1 0 1 0 0 0 0 0
result:
ok 20 lines
Test #47:
score: 0
Accepted
time: 29ms
memory: 3976kb
input:
20 9999920 1632640 5918320 4999960 2499980 2499980 4999960 2499980 2499980 918360 4999960 5918320 6289250 3917125 3077000 6578625 4040625 9055625 7493250 8998625 9566375 9241625 9958250 8263000 6778514 604026 6979856 6778514 9999986 4295296 3288586 6711400 9999986 6711400 268456 6979856 5154672 8064...
output:
1 0 1 0 0 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0
result:
ok 20 lines
Test #48:
score: 0
Accepted
time: 29ms
memory: 3900kb
input:
20 4999960 2959160 5102000 2959160 2040800 102040 2040800 3673440 816320 4999960 4999960 9999920 8969670 4393918 5470836 8245742 5980472 8380576 4854342 6541344 7095586 7361178 5224256 5629230 8865150 2769564 7870506 8055978 967659 8979075 6637365 8353338 8551704 4009866 6193257 9943689 1111104 4999...
output:
1 0 0 1 1 1 0 0 1 1 1 1 0 0 1 0 0 1 0 1
result:
ok 20 lines
Test #49:
score: 0
Accepted
time: 29ms
memory: 3760kb
input:
20 1867515 7500030 1882515 7500030 9382515 1882515 7500030 1867515 9367515 9382515 9367515 7500030 5050000 10000000 4050000 5000000 50000 5050000 6250000 1250000 5000000 6250000 1250000 10000000 3611088 277776 4999968 5624964 3124980 4999968 9999936 4999968 4999968 69444 3124980 3611088 9422883 4232...
output:
1 1 1 0 1 0 0 1 1 1 0 0 0 0 0 0 1 1 1 0
result:
ok 20 lines
Test #50:
score: 0
Accepted
time: 29ms
memory: 3924kb
input:
20 1156721 4620802 5777521 4620802 5774481 1153681 4620802 1156721 1153681 5774481 5777521 4620802 9915021 9439947 8061660 3594834 7962273 6274683 8329788 8252766 5070951 7155486 3029796 7445997 5360916 8156406 6062454 9490806 392394 9826470 4967088 6125268 5921634 9754710 6159942 9613632 8397191 73...
output:
1 0 0 0 0 1 0 1 0 0 0 0 1 1 0 1 0 1 0 0
result:
ok 20 lines
Test #51:
score: 0
Accepted
time: 29ms
memory: 3836kb
input:
20 3106092 5207532 2782692 8017416 3208656 4903668 4315476 7218816 3266208 5090316 9940524 6990588 4999960 4999960 9999920 6632600 663260 4132620 1632640 4999960 6632600 663260 1275500 918360 4207840 9999808 4009824 4207840 8415680 4207840 8910720 8415680 8415680 2227680 7326592 1831648 5762832 8699...
output:
0 1 0 0 0 0 1 1 1 1 1 1 1 0 0 1 1 0 0 0
result:
ok 20 lines
Test #52:
score: 0
Accepted
time: 29ms
memory: 3904kb
input:
20 7009848 9932352 3128850 7528620 9992124 6966600 9447240 2585394 7867362 6969762 6259332 8607168 9235630 3375782 8662384 3121006 9999958 7770668 9235630 8662384 7452198 9235630 127388 9235630 2500000 5000000 2500000 2500000 2656250 156250 1406250 5000000 2656250 5000000 10000000 5000000 9999900 61...
output:
0 0 1 1 0 0 0 1 1 0 0 1 0 1 0 1 0 1 0 1
result:
ok 20 lines
Test #53:
score: 0
Accepted
time: 29ms
memory: 3772kb
input:
20 3627925 9668450 8942550 4472775 2834950 6152450 9650000 6508175 9445100 8029975 6006475 9850625 5764703 5882350 117647 5882350 1882352 6823526 5764703 4235292 9999995 9999995 6823526 1058823 9999828 3207492 7547040 424521 3065985 3207492 6886674 4622562 7547040 7547040 3773520 3773520 9189180 999...
output:
0 1 0 1 1 0 1 1 1 1 0 1 0 1 0 1 0 1 1 0
result:
ok 20 lines
Test #54:
score: 0
Accepted
time: 29ms
memory: 3920kb
input:
20 1001113 4010114 5011225 5014057 4010114 5011225 1001113 1003945 4010114 4010114 5014057 1003945 5199022 3354662 6735676 3184656 2786790 1710190 1403138 1350132 299630 1672886 4952652 5281468 6446766 7285743 8009076 4264479 5848485 3067731 959706 2097465 1309434 3320592 5158725 3667110 6267888 761...
output:
1 0 0 0 0 1 0 0 1 0 0 1 1 0 0 1 1 1 1 0
result:
ok 20 lines
Test #55:
score: 0
Accepted
time: 25ms
memory: 3760kb
input:
20 6898750 3188990 4202515 8393625 3569340 6355135 4416160 6588475 3692770 5118275 6329355 1616095 5764703 117647 5882350 5882350 5764703 9999995 4235292 9999995 4352939 4235292 4352939 117647 600444 6119910 9999702 8371575 8371575 6697260 5103774 1443375 9202959 6697260 8371575 8371575 4847666 5690...
output:
0 1 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 1 0
result:
ok 20 lines
Test #56:
score: 0
Accepted
time: 26ms
memory: 3920kb
input:
20 1406250 5000000 2656250 3906250 5000000 2656250 5000000 703125 5703125 5703125 1953125 10000000 6127118 289015 6531739 6531739 9999919 6127118 4161816 6531739 9999919 6531739 4161816 289015 1115868 4999947 5944143 9999894 4999947 4999947 5944143 9999894 1394835 2167359 557934 4914111 3630129 4452...
output:
1 1 0 0 1 1 0 0 1 1 1 1 0 1 0 1 1 1 1 0
result:
ok 20 lines
Test #57:
score: 0
Accepted
time: 29ms
memory: 3908kb
input:
20 8524568 819670 9999974 2622944 5901624 8524568 655736 819670 163934 5901624 4098350 9999974 9964800 9904248 4863312 9503856 2709612 7760448 5414004 6643872 9138168 9767052 5510808 9727632 3610124 1661296 9999724 5239472 5111680 1661296 5111680 4089344 5111680 5111680 7316092 1437660 3125000 62500...
output:
1 0 0 0 0 0 1 1 0 1 0 0 1 0 1 1 1 1 0 1
result:
ok 20 lines
Test #58:
score: 0
Accepted
time: 25ms
memory: 3772kb
input:
20 2777775 4999995 6444438 9999990 4999995 4999995 444444 9999990 6444438 2777775 444444 4999995 6410366 6104350 4502066 7045156 861480 7119336 4544534 6840520 5970408 7199410 4531826 3943932 5221580 4776083 7922460 2392468 1927770 1541865 4212754 5678868 6123195 9600604 6694792 8890986 1300000 8000...
output:
1 0 0 1 1 0 1 0 1 1 1 0 1 0 1 1 0 0 0 0
result:
ok 20 lines
Test #59:
score: -100
Wrong Answer
time: 29ms
memory: 3960kb
input:
20 3814404 3505128 9999924 9999924 3814404 7010256 7010256 9999924 6700980 9999924 3505128 6700980 8330784 6906900 361284 7321314 6906900 5408634 5408634 786324 9999066 6906900 6800640 6906900 6721470 4286808 9372792 8648514 6413136 2967816 7658022 9750222 8195184 8728704 7855404 9235140 4760264 188...
output:
1 0 0 0 1 1 1 1 0 0 1 1 0 1 0 1 0 0 1 0
result:
wrong answer 9th lines differ - expected: '1', found: '0'