QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#395134 | #2493. Infection | ucup-team1716# | AC ✓ | 4ms | 4132kb | C++20 | 1.2kb | 2024-04-21 06:26:35 | 2024-04-21 06:26:35 |
Judging History
answer
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
ll n, k, m;
cin >> n >> k >> m;
k--;
vector<ll> p(1 << n, 0);
for(int i=0; i<n; i++) p[1 << i] = 1;
for(int x=0; x<m; x++)
{
int u, v;
cin >> u >> v;
u--; v--;
vector<ll> new_p(1 << n, 0);
for(int i=0; i<(1 << n); i++)
{
if(((i & (1 << u)) >> u) ^ ((i & (1 << v)) >> v))
{
new_p[i | (1<<u) | (1<<v)] += p[i];
new_p[i] += p[i];
}
else
{
new_p[i] += 2 * p[i];
}
}
p = new_p;
}
ll P = 0;
vector<ll> ans_p(n, 0);
for(int i=0; i<(1<<n); i++)
{
if((i & (1<<k)) == 0) continue;
P += p[i];
for(int j=0; j<n; j++)
{
if((i&(1<<j)) != 0) ans_p[j] += p[i];
}
}
for(int i=0; i<n; i++)
{
ll g = __gcd(P, ans_p[i]);
cout << ans_p[i] / g << "/" << P / g << "\n";
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3648kb
input:
3 2 1 1 2
output:
2/3 1/1 0/1
result:
ok 3 lines
Test #2:
score: 0
Accepted
time: 0ms
memory: 3584kb
input:
3 2 2 1 2 2 3
output:
1/2 1/1 5/8
result:
ok 3 lines
Test #3:
score: 0
Accepted
time: 0ms
memory: 3640kb
input:
4 1 4 1 2 2 3 3 4 4 1
output:
1/1 19/37 17/37 27/37
result:
ok 4 lines
Test #4:
score: 0
Accepted
time: 0ms
memory: 3612kb
input:
11 2 11 5 8 9 1 5 7 8 3 7 1 10 3 9 8 6 1 1 8 4 7 3 8
output:
0/1 1/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1
result:
ok 11 lines
Test #5:
score: 0
Accepted
time: 0ms
memory: 3740kb
input:
12 5 49 1 7 10 3 4 1 6 3 12 7 9 8 6 8 8 3 8 2 4 8 5 8 7 2 11 8 12 10 12 2 2 3 11 8 11 9 9 2 6 4 7 6 1 11 7 2 12 6 10 5 2 10 4 2 11 8 9 12 10 11 6 5 9 4 3 8 7 1 8 4 10 11 3 5 8 4 3 4 2 6 9 4 8 7 8 5 11 2 1 4 8 12 8 5 12 7 5 8
output:
66096298529/91338918912 815087737/951447072 284523565/356792652 27500838515/30446306304 1/1 131308729/178396326 4784104691/5708682432 352985179/356792652 142134719/178396326 66014593/89198163 797381561/951447072 210194597/248203584
result:
ok 12 lines
Test #6:
score: 0
Accepted
time: 2ms
memory: 3704kb
input:
14 13 48 7 6 3 6 14 5 3 1 3 13 2 5 5 9 10 4 11 9 7 13 3 1 11 5 5 4 8 6 10 3 7 3 4 7 4 13 5 3 12 9 10 4 11 1 3 4 12 4 7 3 5 4 8 2 4 2 8 1 8 3 9 10 11 1 1 3 9 2 14 1 3 7 3 8 7 13 2 11 12 9 8 13 2 13 9 7 1 10 5 8 9 11 7 10 14 13
output:
2156351983/2866009615 2383468197/2866009615 339591349/409429945 2168049153/2866009615 4359233931/5732019230 566721107/2866009615 4849938363/5732019230 2437397199/2866009615 4573460671/5732019230 2208682289/2866009615 4163403821/5732019230 3037180299/5732019230 1/1 406614322/573201923
result:
ok 14 lines
Test #7:
score: 0
Accepted
time: 0ms
memory: 3640kb
input:
7 7 46 4 5 4 5 4 3 2 6 4 5 7 1 3 6 1 7 7 1 2 7 1 6 4 7 5 6 7 5 5 1 6 5 6 3 4 6 5 4 6 7 6 3 6 1 3 7 1 3 1 2 2 6 5 4 3 7 1 5 7 4 3 1 4 5 6 3 7 3 2 7 6 3 1 5 3 7 6 3 1 2 5 3 4 3 4 7 3 6 7 2 1 2
output:
156795669/158589764 3672868531/3726859454 1850060189/1863429727 3642885355/3726859454 1815896639/1863429727 3681473411/3726859454 1/1
result:
ok 7 lines
Test #8:
score: 0
Accepted
time: 0ms
memory: 3936kb
input:
12 1 34 2 7 1 6 10 3 3 5 4 10 8 9 1 11 9 8 9 12 9 10 12 11 10 2 10 2 4 9 10 5 8 9 11 10 6 4 5 1 7 5 5 4 2 10 6 8 1 6 8 9 2 8 8 9 4 5 5 9 5 3 9 4 3 12 12 10 1 7
output:
1/1 426141/805024 432005/805024 36901/50314 630169/805024 16383/25157 17938/25157 818199/1610048 577185/805024 11307/18296 89513/201256 1745581/3220096
result:
ok 12 lines
Test #9:
score: 0
Accepted
time: 0ms
memory: 3620kb
input:
9 2 32 6 5 3 5 2 5 7 3 8 5 4 6 4 9 8 9 3 4 3 4 1 6 6 4 9 3 7 8 5 8 7 5 7 4 7 9 1 5 3 1 9 7 5 4 3 6 3 1 8 5 8 1 7 9 2 9 2 7 4 6 7 3 9 2
output:
2963203/3966976 1/1 6598151/7933952 5394563/6942208 331585/433888 4667727/6942208 1004443/1068032 21093381/27768832 832645/867776
result:
ok 9 lines
Test #10:
score: 0
Accepted
time: 0ms
memory: 3664kb
input:
10 8 32 4 2 7 4 7 3 6 2 7 6 8 4 1 10 1 5 10 9 8 3 8 2 1 4 5 6 8 5 7 4 2 3 4 2 9 6 9 3 6 3 2 1 10 2 3 5 6 8 5 10 8 9 7 3 3 6 2 9 4 3 2 9 1 9
output:
2642927/3677824 100423/114932 1662933/1838912 1365619/1838912 723639/919456 50373/57466 615/944 1/1 422647/459728 1189513/1838912
result:
ok 10 lines
Test #11:
score: 0
Accepted
time: 0ms
memory: 3560kb
input:
11 1 26 11 6 6 10 2 9 10 4 3 7 2 5 1 10 11 4 9 4 10 2 3 9 10 8 8 7 4 11 5 10 3 4 2 7 7 11 6 2 4 10 5 2 7 3 1 7 2 5 8 1 5 1
output:
1/1 9554137/14695880 969584/1836985 994599/1836985 297759/367397 1165213/2939176 1389443/1836985 1169281/1836985 105765/367397 228309/367397 171184/367397
result:
ok 11 lines
Test #12:
score: 0
Accepted
time: 1ms
memory: 3964kb
input:
14 1 10 12 7 3 14 3 7 8 6 1 5 12 11 7 11 8 5 1 14 10 13
output:
1/1 0/1 2/9 0/1 4/9 0/1 1/9 2/9 0/1 0/1 1/18 0/1 0/1 2/3
result:
ok 14 lines
Test #13:
score: 0
Accepted
time: 0ms
memory: 3648kb
input:
10 6 33 5 6 5 8 10 6 7 3 8 10 10 3 3 4 7 2 10 7 1 2 3 10 10 6 10 5 1 2 2 4 9 7 10 8 5 10 10 5 8 2 6 10 2 7 10 8 5 10 4 9 9 3 3 2 7 8 4 9 9 6 4 2 8 3 4 1
output:
21421/51340 248265/328576 336113/410720 142679/205360 622231/821440 1/1 588269/821440 4101/4832 626/755 10346/12835
result:
ok 10 lines
Test #14:
score: 0
Accepted
time: 3ms
memory: 3836kb
input:
15 11 28 15 8 6 3 7 15 11 6 3 6 6 12 1 7 4 5 13 8 10 13 10 9 13 5 8 7 13 10 5 3 12 1 6 15 3 9 5 4 11 13 2 3 12 7 3 12 7 2 8 1 6 10 15 14 10 1
output:
1471/3584 1065/3584 7073/14336 13/56 11/28 4/7 127/448 25/112 297/896 2151/3584 1/1 5561/14336 3/4 1/8 1/4
result:
ok 15 lines
Test #15:
score: 0
Accepted
time: 3ms
memory: 4128kb
input:
15 11 41 12 10 7 4 2 14 13 1 11 9 13 14 5 7 6 9 9 6 1 9 14 6 5 1 10 5 1 15 2 10 5 10 1 14 4 1 7 2 8 13 11 2 6 11 3 11 10 9 2 10 10 1 10 6 2 4 9 1 15 8 10 9 14 10 2 4 15 3 6 10 4 7 11 15 12 7 5 7 5 7 12 9
output:
16089/26996 253769/431936 3887/6749 232825/431936 94343/215968 300125/431936 1604203/3455488 6483/26996 17865103/27643904 1272371/1727744 1/1 724343/1626112 2253/13498 491919/863872 10365/13498
result:
ok 15 lines
Test #16:
score: 0
Accepted
time: 0ms
memory: 3580kb
input:
8 7 17 7 3 1 3 6 5 5 1 3 4 1 6 4 8 1 2 5 4 8 5 3 2 7 8 5 1 6 8 3 7 3 2 5 4
output:
1063/2027 10311/16216 1649/2027 1193/2027 5139/8108 3937/8108 1/1 2839/4054
result:
ok 8 lines
Test #17:
score: 0
Accepted
time: 0ms
memory: 3528kb
input:
2 2 24 2 1 2 1 2 1 2 1 1 2 2 1 1 2 2 1 2 1 2 1 2 1 2 1 1 2 1 2 1 2 1 2 2 1 2 1 1 2 2 1 2 1 2 1 1 2 2 1
output:
33554430/33554431 1/1
result:
ok 2 lines
Test #18:
score: 0
Accepted
time: 0ms
memory: 3808kb
input:
5 1 1 3 5
output:
1/1 0/1 0/1 0/1 0/1
result:
ok 5 lines
Test #19:
score: 0
Accepted
time: 0ms
memory: 3576kb
input:
8 7 13 7 3 2 6 4 7 1 4 5 6 2 8 1 2 3 1 7 1 5 1 3 1 4 8 4 6
output:
7/8 9/26 77/104 15/26 23/52 71/208 1/1 9/26
result:
ok 8 lines
Test #20:
score: 0
Accepted
time: 1ms
memory: 3764kb
input:
13 11 43 3 13 4 5 4 3 11 8 12 3 1 11 9 8 10 5 9 3 10 5 5 4 9 8 5 11 1 11 6 13 10 3 13 7 10 9 11 9 3 8 10 7 1 7 8 4 1 7 6 4 9 2 6 12 2 9 13 6 5 2 9 10 11 13 7 3 3 7 5 11 7 11 6 10 12 6 9 12 13 9 7 5 7 6 9 12
output:
20582371/38077507 21303349/38077507 27059827/38077507 17308201/38077507 64176901/76155014 237038443/304620056 35932183/38077507 18444014/38077507 31449987/38077507 106045099/152310028 1/1 222314737/304620056 2139050/2929039
result:
ok 13 lines
Test #21:
score: 0
Accepted
time: 0ms
memory: 3576kb
input:
3 3 3 1 3 1 2 3 1
output:
7/8 7/16 1/1
result:
ok 3 lines
Test #22:
score: 0
Accepted
time: 0ms
memory: 3616kb
input:
9 4 38 8 7 9 2 8 9 7 6 9 6 9 5 4 5 4 2 7 6 1 5 6 1 9 7 6 9 1 5 2 7 1 3 1 6 8 3 1 8 1 7 9 5 4 2 6 7 4 2 8 6 4 6 9 4 3 8 7 1 8 9 2 6 5 6 9 1 2 9 8 7 2 9 8 3 9 4
output:
28395309/32115805 6000759/6423161 4680378/6423161 1/1 25269556/32115805 29899652/32115805 26188857/30226640 897913549/1027705760 63358533/64231610
result:
ok 9 lines
Test #23:
score: 0
Accepted
time: 0ms
memory: 3652kb
input:
8 4 45 5 4 2 6 5 4 5 1 2 3 1 7 8 5 5 8 7 2 7 1 6 4 8 5 7 6 2 6 5 2 4 5 6 2 1 7 6 4 8 5 7 3 5 3 7 3 3 2 2 8 4 5 3 1 6 2 6 8 6 8 8 6 5 6 1 4 8 2 8 5 1 8 7 2 2 8 7 2 6 7 1 4 7 6 1 4 7 5 7 1
output:
3916257239/3951151600 3057383203/3160921280 41903093/49389395 1/1 235764429/246946975 3835175533/3951151600 624887215/632184256 698759523/718391200
result:
ok 8 lines
Test #24:
score: 0
Accepted
time: 0ms
memory: 3872kb
input:
11 8 28 8 10 3 2 6 3 11 3 8 10 1 4 7 5 9 4 1 6 10 9 7 11 10 2 2 8 5 11 2 1 4 9 8 9 2 9 9 4 3 11 1 6 7 6 8 7 4 9 3 9 8 11 5 1 11 1
output:
35681/54672 3719/6834 634/1139 25343/54672 11119/27336 1420/3417 764/1139 1/1 1507/2278 1379/3417 1739/2278
result:
ok 11 lines
Test #25:
score: 0
Accepted
time: 0ms
memory: 3564kb
input:
11 9 23 3 7 5 10 7 11 3 8 11 3 1 2 3 7 6 9 9 7 10 11 1 2 9 10 3 2 7 10 5 2 10 1 3 1 8 4 7 1 2 6 4 9 4 8 4 11
output:
11287/19464 535/1622 2161/4866 6829/9732 1861/9732 1047/3244 13193/19464 1064/2433 1/1 554/811 1402/2433
result:
ok 11 lines
Test #26:
score: 0
Accepted
time: 0ms
memory: 3876kb
input:
8 2 40 1 8 2 7 5 1 3 2 1 6 4 8 1 7 6 4 4 5 2 7 3 8 5 2 1 5 7 4 4 1 6 1 4 5 1 5 8 1 6 5 3 8 2 7 1 2 4 5 2 5 4 6 5 4 5 1 1 7 4 6 4 6 6 5 1 5 5 8 7 1 8 2 3 6 1 5 6 7 7 2
output:
958447619/993921839 1/1 734180190/993921839 37790169/43213993 3855591809/3975687356 949977460/993921839 963350489/993921839 898896307/993921839
result:
ok 8 lines
Test #27:
score: 0
Accepted
time: 0ms
memory: 3876kb
input:
2 2 44 2 1 2 1 2 1 2 1 1 2 1 2 2 1 1 2 2 1 2 1 2 1 2 1 2 1 2 1 1 2 2 1 2 1 1 2 2 1 2 1 1 2 2 1 1 2 2 1 2 1 1 2 2 1 1 2 2 1 2 1 1 2 2 1 1 2 2 1 2 1 1 2 1 2 2 1 2 1 1 2 2 1 2 1 2 1 1 2
output:
35184372088830/35184372088831 1/1
result:
ok 2 lines
Test #28:
score: 0
Accepted
time: 1ms
memory: 3804kb
input:
13 5 42 1 12 9 1 9 8 5 1 10 12 1 13 2 3 1 6 2 6 2 12 4 5 12 8 5 8 3 10 1 5 12 8 3 7 4 2 9 11 11 13 4 6 3 8 7 13 9 4 8 10 13 4 7 3 8 1 12 9 11 2 8 5 9 6 7 9 1 8 2 7 6 3 10 7 9 13 12 6 6 4 7 4 3 10
output:
5875/6648 270115193/435683328 40009981/54460416 11300969107/13941866496 1/1 350870077/435683328 11373533051/13941866496 12719/13296 55425399/72613888 52888143/72613888 438693/1134592 5023237/6807552 141919541/217841664
result:
ok 13 lines
Test #29:
score: 0
Accepted
time: 0ms
memory: 3688kb
input:
9 3 34 5 3 8 9 8 9 5 8 1 4 6 2 8 4 1 7 3 4 7 4 2 8 1 2 1 5 5 9 1 8 7 2 3 9 8 5 7 6 5 6 8 9 5 7 8 4 4 2 3 7 4 3 8 2 6 5 1 7 9 8 9 4 4 6 4 9 9 4
output:
85760/111127 357859/444508 1/1 27528069/28448512 366765/444508 6006643/7112128 394829/444508 1535571/1778032 1681695/1778032
result:
ok 9 lines
Test #30:
score: 0
Accepted
time: 1ms
memory: 3676kb
input:
14 5 1 10 11
output:
0/1 0/1 0/1 0/1 1/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1
result:
ok 14 lines
Test #31:
score: 0
Accepted
time: 0ms
memory: 3592kb
input:
10 5 18 7 2 6 9 8 7 7 4 9 2 1 7 8 4 10 2 8 6 6 2 1 3 2 10 2 10 7 1 8 2 7 9 4 7 10 7
output:
0/1 0/1 0/1 0/1 1/1 0/1 0/1 0/1 0/1 0/1
result:
ok 10 lines
Test #32:
score: 0
Accepted
time: 3ms
memory: 3804kb
input:
15 4 32 11 7 1 12 3 12 7 13 10 6 4 10 3 9 11 15 9 8 8 10 5 9 14 15 15 9 5 1 13 2 7 11 14 2 13 12 13 8 13 10 2 15 15 14 1 7 15 2 15 13 8 9 2 1 7 8 1 15 12 9 4 9 7 13
output:
137279/315904 52801/157952 221/1234 1/1 251/1234 72/617 169955/315904 11673/19744 525/617 1173/2468 61/617 569/1234 195659/315904 4135/19744 41799/78976
result:
ok 15 lines
Test #33:
score: 0
Accepted
time: 0ms
memory: 3580kb
input:
4 4 46 1 3 1 2 2 3 3 4 2 4 2 4 1 3 3 2 1 2 2 3 1 4 3 2 1 4 1 4 4 2 4 2 1 2 4 2 3 1 4 2 2 1 3 2 1 2 2 3 1 3 2 3 3 4 1 2 4 1 2 3 4 3 3 2 3 1 2 3 2 4 3 4 3 4 4 3 4 3 2 1 3 4 4 1 1 4 3 4 2 1 1 4
output:
274873640393/274877354881 274870063323/274877354881 274875730985/274877354881 1/1
result:
ok 4 lines
Test #34:
score: 0
Accepted
time: 0ms
memory: 3876kb
input:
8 4 20 2 7 6 4 1 6 5 8 8 1 6 4 2 5 7 5 8 7 7 8 8 2 6 1 1 5 7 5 4 2 1 6 7 4 5 3 3 4 6 8
output:
13465/23432 1821/2929 16677/23432 1/1 7659/11716 30745/46864 17605/23432 3957/5858
result:
ok 8 lines
Test #35:
score: 0
Accepted
time: 0ms
memory: 3996kb
input:
14 14 16 7 1 7 11 13 3 14 10 5 11 5 8 10 5 3 12 7 3 12 11 9 7 7 2 1 2 11 13 10 7 11 3
output:
0/1 0/1 0/1 0/1 1/3 0/1 1/3 0/1 0/1 2/3 0/1 0/1 0/1 1/1
result:
ok 14 lines
Test #36:
score: 0
Accepted
time: 0ms
memory: 3612kb
input:
11 6 21 6 9 1 4 8 11 11 2 9 3 5 3 6 4 4 2 3 8 8 1 6 11 11 4 9 2 5 2 6 4 7 11 3 11 9 3 11 9 6 9 4 9
output:
6307/22832 1579/2854 939/1427 9625/11416 2031/5708 1/1 957/2854 3817/11416 10785/11416 0/1 1176/1427
result:
ok 11 lines
Test #37:
score: 0
Accepted
time: 0ms
memory: 3804kb
input:
5 1 19 3 4 1 3 3 5 2 1 3 2 5 2 1 5 5 4 2 4 4 3 2 1 3 2 4 2 4 3 5 2 2 5 5 3 5 2 4 1
output:
1/1 69131/71036 2391/2537 17083/17759 137329/142072
result:
ok 5 lines
Test #38:
score: 0
Accepted
time: 0ms
memory: 3880kb
input:
9 4 35 3 7 9 2 5 3 8 9 1 5 2 9 2 5 5 3 4 5 5 2 2 3 1 3 6 3 9 1 5 1 1 9 7 6 9 7 4 6 8 5 5 1 8 9 1 5 7 9 8 7 9 1 5 6 9 5 1 5 9 1 3 4 2 1 3 8 7 4 6 9
output:
766934263/899261312 39851877/56203832 5813999/7025479 1/1 48547135/56203832 5990725/7025479 6155768/7025479 11239481/14050958 50613121/56203832
result:
ok 9 lines
Test #39:
score: 0
Accepted
time: 0ms
memory: 3600kb
input:
9 3 16 2 6 7 9 4 9 3 8 2 3 4 5 4 1 8 3 6 3 3 9 8 9 1 5 3 4 6 5 1 2 6 9
output:
263/648 599/1296 1/1 2/3 271/648 1751/2592 10/81 5/9 121/162
result:
ok 9 lines
Test #40:
score: 0
Accepted
time: 0ms
memory: 3612kb
input:
7 3 8 3 2 5 2 1 7 2 7 5 2 4 7 4 6 6 7
output:
0/1 2/3 1/1 1/6 1/2 5/24 1/3
result:
ok 7 lines
Test #41:
score: 0
Accepted
time: 0ms
memory: 3644kb
input:
3 3 44 2 1 1 3 1 2 3 2 1 2 2 3 1 3 1 3 1 3 2 1 1 2 3 1 2 3 3 2 1 3 3 1 3 1 1 2 1 2 1 3 3 1 3 1 1 3 1 2 3 2 3 1 2 1 3 1 3 1 1 2 2 1 2 1 3 1 1 3 1 3 2 1 1 3 3 1 1 2 3 1 2 1 2 1 1 2 2 3
output:
329853209180/329853223987 329853092864/329853223987 1/1
result:
ok 3 lines
Test #42:
score: 0
Accepted
time: 0ms
memory: 3776kb
input:
14 5 2 6 12 14 4
output:
0/1 0/1 0/1 0/1 1/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1
result:
ok 14 lines
Test #43:
score: 0
Accepted
time: 2ms
memory: 3804kb
input:
14 10 38 13 1 10 7 8 6 12 10 10 7 11 1 3 10 3 6 7 8 2 12 9 7 4 7 11 3 13 9 14 10 12 8 10 6 11 10 14 5 1 5 11 14 6 2 1 10 12 10 6 2 5 1 12 8 6 11 2 1 2 14 5 10 3 6 8 13 11 5 1 11 7 5 4 11 6 1
output:
3538835/4026368 89095/125824 17097/31456 4139651/8052736 6985885/8052736 3193573/4026368 4747267/8052736 516/983 377/1966 1/1 1767387/2013184 622/983 2919/7864 163359/251648
result:
ok 14 lines
Test #44:
score: 0
Accepted
time: 0ms
memory: 3588kb
input:
9 8 36 1 4 7 9 8 5 4 2 7 9 3 6 3 9 1 5 4 9 4 3 5 7 6 9 2 4 1 5 1 3 3 5 3 2 7 1 4 3 5 9 5 6 8 2 9 1 6 9 8 5 2 9 4 9 8 1 7 8 9 6 8 4 2 8 6 9 2 9 2 9 4 2
output:
4625045/5724109 88606525/91585744 4234205/5724109 128127299/137378616 13864823/17172327 19090763/22896436 3996767/5724109 1/1 521316127/549514464
result:
ok 9 lines
Test #45:
score: 0
Accepted
time: 0ms
memory: 3652kb
input:
10 7 26 10 5 4 8 6 2 5 7 9 6 10 1 9 1 8 1 3 4 3 9 1 3 6 3 1 2 4 5 10 8 10 5 10 6 7 9 7 10 3 2 4 10 10 7 1 7 4 8 4 8 2 8
output:
23058/29753 301185/476048 130757/238024 79733/119012 13555/29753 33389/59506 1/1 84339/119012 15039/29753 25566/29753
result:
ok 10 lines
Test #46:
score: 0
Accepted
time: 0ms
memory: 3580kb
input:
6 1 44 4 6 4 1 3 6 4 1 6 1 2 3 5 3 5 6 5 6 1 4 1 5 1 4 2 4 2 4 4 1 3 4 6 3 5 6 5 3 1 6 2 4 2 3 4 5 5 1 5 1 5 2 4 3 6 2 5 3 1 6 3 2 3 5 6 4 1 4 4 1 5 4 5 1 5 3 4 1 2 5 6 3 6 3 2 6 5 6
output:
1/1 12723983033/12795960192 51095222611/51183840768 532016155/533165008 12789886931/12795960192 3193170995/3198990048
result:
ok 6 lines
Test #47:
score: 0
Accepted
time: 0ms
memory: 3580kb
input:
8 7 15 5 1 8 1 7 1 7 4 8 7 3 8 2 7 3 7 8 1 7 1 1 2 1 6 7 5 3 4 5 8
output:
259/317 202/317 855/1268 653/1268 1867/2536 259/634 1/1 235/317
result:
ok 8 lines
Test #48:
score: 0
Accepted
time: 0ms
memory: 3616kb
input:
9 2 47 7 5 8 6 1 9 9 6 9 1 5 7 3 8 9 3 7 8 6 4 2 3 3 5 2 5 4 6 8 6 2 4 9 1 3 5 8 6 3 5 8 2 4 7 7 6 2 1 8 9 3 7 7 9 5 2 1 9 4 1 5 6 3 1 3 5 3 1 5 8 3 6 3 9 5 8 9 3 6 2 2 9 7 3 9 1 3 2 8 9 6 4 1 9
output:
2243015828/2307746593 1/1 2284678064/2307746593 3901181953/4615493186 2145330911/2307746593 2164052777/2307746593 2060172865/2307746593 2174011686/2307746593 2281853743/2307746593
result:
ok 9 lines
Test #49:
score: 0
Accepted
time: 0ms
memory: 3572kb
input:
4 2 40 2 4 2 4 4 2 4 1 1 4 1 2 3 4 2 1 2 3 2 4 1 2 2 4 3 2 1 4 1 2 2 1 2 4 1 2 3 2 3 1 1 4 3 4 3 2 4 1 3 4 3 2 4 3 4 2 1 3 1 2 1 2 4 1 2 1 2 1 3 1 2 3 3 4 4 3 3 2 3 1
output:
17176006637/17177887224 1/1 11451808397/11451924816 238515819/238581767
result:
ok 4 lines
Test #50:
score: 0
Accepted
time: 0ms
memory: 3844kb
input:
8 7 2 4 6 2 8
output:
0/1 0/1 0/1 0/1 0/1 0/1 1/1 0/1
result:
ok 8 lines
Test #51:
score: 0
Accepted
time: 2ms
memory: 4004kb
input:
14 8 43 4 14 7 14 2 7 10 6 9 11 5 12 10 8 7 11 6 14 1 14 4 6 6 2 12 6 7 11 13 2 3 2 3 5 12 11 8 10 4 2 3 9 11 2 7 14 5 12 3 9 4 12 11 8 7 8 14 3 9 5 12 11 11 6 10 4 13 14 2 11 7 1 14 13 8 2 11 13 12 2 12 5 10 6 5 8
output:
14192969/40067640 2846663/3338970 1267315/2671176 88739603/160270560 5571769/6677940 11854381/17807840 949999/1669485 1/1 936903/2225980 74214749/128216448 266445949/320541120 5473481/6677940 21013573/32054112 41933269/80135280
result:
ok 14 lines
Test #52:
score: 0
Accepted
time: 0ms
memory: 3632kb
input:
4 3 20 4 2 3 4 1 2 2 1 4 3 1 4 2 3 3 1 4 1 1 2 3 1 1 4 1 2 4 3 1 4 1 4 2 3 1 4 3 2 1 4
output:
510311/515104 15775/16097 1/1 63677/64388
result:
ok 4 lines
Test #53:
score: 0
Accepted
time: 0ms
memory: 3596kb
input:
10 3 19 4 5 5 3 1 5 5 8 7 1 8 1 4 2 7 3 3 7 9 8 8 9 8 5 7 9 1 10 9 7 10 1 8 2 3 7 1 3
output:
2359/2929 6770/20503 1/1 106/707 11115/20503 0/1 33941/41006 11884/20503 59553/82012 39105/82012
result:
ok 10 lines
Test #54:
score: 0
Accepted
time: 0ms
memory: 3584kb
input:
3 2 15 2 3 2 1 3 1 1 2 2 1 1 2 3 1 3 1 3 1 1 3 2 1 1 3 3 2 1 3 1 2
output:
24142/24199 1/1 24065/24199
result:
ok 3 lines
Test #55:
score: 0
Accepted
time: 0ms
memory: 3624kb
input:
10 5 36 6 7 6 2 1 8 1 10 6 4 7 3 2 4 5 4 10 4 1 7 7 5 8 6 10 2 4 2 7 1 1 2 6 1 6 8 4 5 2 5 7 4 2 3 7 9 4 2 7 6 10 7 2 1 2 7 9 10 7 10 1 6 5 7 9 4 9 1 3 10 3 7
output:
54555569/60960848 3523943/3810053 25758715/30480424 3333181/3810053 1/1 3051070/3810053 29886247/30480424 3255183/7620106 52297155/60960848 6800181/7620106
result:
ok 10 lines
Test #56:
score: 0
Accepted
time: 0ms
memory: 3576kb
input:
7 6 42 1 3 6 5 2 5 4 2 4 6 1 3 6 3 3 4 6 3 3 5 6 3 3 4 5 2 5 7 2 1 5 1 4 6 5 4 7 3 2 5 1 3 4 1 3 1 2 7 7 4 5 1 1 5 3 2 1 4 1 5 7 3 4 6 4 7 4 7 2 1 7 3 3 7 7 3 4 2 7 6 1 2 5 7
output:
13305501389/13544958688 26519055237/27089917376 420156203/423279959 840400547/846559918 3293521381/3386239672 1/1 6760630337/6772479344
result:
ok 7 lines
Test #57:
score: 0
Accepted
time: 0ms
memory: 3644kb
input:
3 2 32 3 1 2 3 1 2 2 1 1 3 1 3 1 3 1 2 3 2 1 2 3 1 3 2 1 3 1 2 1 3 2 3 2 1 1 3 1 3 3 2 2 3 1 2 3 1 1 3 1 2 2 3 3 1 3 2 2 1 3 1 3 2 1 3
output:
50330995/50331264 1/1 100662271/100662528
result:
ok 3 lines
Test #58:
score: 0
Accepted
time: 2ms
memory: 3896kb
input:
15 3 10 14 6 7 5 14 13 10 15 12 8 5 13 7 14 5 14 9 11 4 14
output:
0/1 0/1 1/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1
result:
ok 15 lines
Test #59:
score: 0
Accepted
time: 0ms
memory: 3580kb
input:
6 6 2 1 5 3 2
output:
0/1 0/1 0/1 0/1 0/1 1/1
result:
ok 6 lines
Test #60:
score: 0
Accepted
time: 0ms
memory: 3580kb
input:
2 2 24 2 1 2 1 2 1 2 1 2 1 1 2 1 2 2 1 2 1 1 2 1 2 2 1 1 2 1 2 1 2 1 2 1 2 2 1 1 2 1 2 1 2 1 2 1 2 2 1
output:
33554430/33554431 1/1
result:
ok 2 lines
Test #61:
score: 0
Accepted
time: 0ms
memory: 3880kb
input:
4 2 23 4 1 2 3 3 4 4 3 2 1 2 3 3 2 2 1 2 3 4 3 2 4 3 4 1 4 4 1 2 1 4 3 2 1 1 3 1 3 1 3 1 2 3 4 2 4
output:
259839/260366 1/1 259295/260366 129448/130183
result:
ok 4 lines
Test #62:
score: 0
Accepted
time: 0ms
memory: 3528kb
input:
6 1 8 6 2 5 2 2 4 6 2 6 4 3 5 4 3 6 2
output:
1/1 0/1 0/1 0/1 0/1 0/1
result:
ok 6 lines
Test #63:
score: 0
Accepted
time: 0ms
memory: 3872kb
input:
6 2 32 1 2 1 5 1 3 1 6 5 4 6 3 3 6 6 5 4 3 3 2 1 5 1 5 2 5 2 1 5 1 6 1 1 2 4 3 1 6 3 2 6 1 5 3 4 3 5 6 3 1 5 1 5 4 3 6 3 5 6 3 5 4 4 2
output:
91469675/94891547 1/1 93817115/94891547 92563348/94891547 375299663/379566188 369520467/379566188
result:
ok 6 lines
Test #64:
score: 0
Accepted
time: 0ms
memory: 3612kb
input:
4 1 9 3 2 2 1 3 1 1 3 3 1 4 2 3 1 2 3 1 2
output:
1/1 363/395 364/395 151/395
result:
ok 4 lines
Test #65:
score: 0
Accepted
time: 1ms
memory: 3744kb
input:
14 11 8 12 11 13 2 14 9 5 11 5 12 4 7 2 9 11 2
output:
0/1 17/25 0/1 0/1 12/25 0/1 0/1 0/1 6/25 0/1 1/1 11/25 4/25 2/25
result:
ok 14 lines
Test #66:
score: 0
Accepted
time: 0ms
memory: 3636kb
input:
2 1 1 1 2
output:
1/1 2/3
result:
ok 2 lines
Test #67:
score: 0
Accepted
time: 0ms
memory: 3608kb
input:
4 1 44 3 4 2 1 3 2 2 1 3 4 3 2 1 4 2 1 1 4 2 4 4 3 2 1 3 2 3 4 2 1 2 3 2 3 3 1 2 1 1 4 2 1 4 2 3 1 2 3 2 1 4 1 1 2 2 4 1 4 1 2 1 4 2 3 2 3 1 4 3 4 2 4 3 1 3 4 3 1 4 3 1 4 1 4 2 1 1 3
output:
1/1 2642925115/2643048379 34359152488/34359628927 34359373967/34359628927
result:
ok 4 lines
Test #68:
score: 0
Accepted
time: 2ms
memory: 3968kb
input:
14 4 36 2 10 5 6 13 2 5 12 14 2 13 4 10 2 8 1 14 10 3 10 1 4 4 1 6 10 5 7 14 12 1 14 14 5 7 1 11 12 6 9 6 11 1 13 5 9 6 2 14 2 9 13 3 14 1 2 14 12 9 5 7 8 8 11 6 14 6 7 2 12 3 11
output:
1881/2048 1037/1536 305107/786432 1/1 3239/8192 199033/393216 227723/393216 21107/49152 47861/98304 31/192 286699/786432 8181/16384 139/192 53027/98304
result:
ok 14 lines
Test #69:
score: 0
Accepted
time: 1ms
memory: 3764kb
input:
13 8 16 9 1 4 1 3 11 12 13 8 1 12 8 4 13 10 11 9 7 11 2 9 2 7 2 7 8 8 5 2 10 10 1
output:
247/584 22/73 2/73 61/292 81/146 0/1 91/146 1/1 21/73 95/292 6/73 28/73 109/584
result:
ok 13 lines
Test #70:
score: 0
Accepted
time: 0ms
memory: 3640kb
input:
2 1 49 1 2 1 2 2 1 1 2 1 2 1 2 2 1 2 1 2 1 1 2 1 2 1 2 1 2 1 2 2 1 2 1 1 2 1 2 1 2 1 2 2 1 1 2 1 2 2 1 1 2 1 2 2 1 2 1 1 2 1 2 1 2 2 1 2 1 1 2 1 2 1 2 2 1 1 2 1 2 1 2 2 1 1 2 2 1 1 2 1 2 2 1 2 1 1 2 2 1
output:
1/1 1125899906842622/1125899906842623
result:
ok 2 lines
Test #71:
score: 0
Accepted
time: 2ms
memory: 4060kb
input:
15 6 21 1 10 2 12 11 12 7 12 11 8 10 14 4 13 5 13 1 4 11 6 6 8 11 14 5 9 3 15 10 1 9 6 1 3 13 14 8 10 15 3 15 9
output:
2/117 10/117 1/117 4/117 22/117 1/1 25/234 43/78 49/78 11/39 7/13 25/117 103/468 73/234 37/117
result:
ok 15 lines
Test #72:
score: 0
Accepted
time: 0ms
memory: 3616kb
input:
11 8 49 2 5 9 1 5 11 9 5 5 8 8 11 5 3 11 4 9 6 1 6 3 6 2 9 5 8 7 1 4 10 5 6 1 10 7 1 5 2 1 8 2 4 11 5 5 10 10 3 9 7 6 3 3 10 3 10 4 9 6 5 2 10 6 11 3 4 8 5 5 10 3 1 10 8 6 9 11 2 11 5 7 9 5 4 11 3 1 3 9 10 7 8 4 3 11 10 8 3
output:
562996880859/677229443131 1014459255975/1354458886262 658703916544/677229443131 604682821105/677229443131 612033117973/677229443131 537224820495/677229443131 523566673445/677229443131 1/1 576501526955/677229443131 640778681992/677229443131 16859784062/18303498463
result:
ok 11 lines
Test #73:
score: 0
Accepted
time: 0ms
memory: 3692kb
input:
10 4 22 7 10 10 2 4 9 10 3 3 6 6 4 8 5 10 5 6 5 8 10 5 1 7 2 5 2 7 4 9 5 3 2 5 2 9 4 5 4 2 9 1 2 1 10
output:
1003239/1631200 652597/815600 21019/50975 1/1 44921/50975 24567/50975 22329/50975 1015/4078 40428/50975 10707/20390
result:
ok 10 lines
Test #74:
score: 0
Accepted
time: 1ms
memory: 3656kb
input:
14 8 2 8 4 3 9
output:
0/1 0/1 0/1 2/3 0/1 0/1 0/1 1/1 0/1 0/1 0/1 0/1 0/1 0/1
result:
ok 14 lines
Test #75:
score: 0
Accepted
time: 0ms
memory: 3648kb
input:
9 6 2 3 7 4 5
output:
0/1 0/1 0/1 0/1 0/1 1/1 0/1 0/1 0/1
result:
ok 9 lines
Test #76:
score: 0
Accepted
time: 0ms
memory: 3592kb
input:
10 4 4 5 6 5 7 8 4 3 5
output:
0/1 0/1 0/1 1/1 0/1 0/1 0/1 2/3 0/1 0/1
result:
ok 10 lines
Test #77:
score: 0
Accepted
time: 2ms
memory: 3772kb
input:
14 5 33 12 7 13 9 9 12 14 8 14 1 7 3 8 14 10 6 10 3 11 7 2 3 1 13 13 6 5 14 7 9 5 1 5 3 11 2 6 8 9 5 9 5 13 8 5 14 14 7 13 11 14 11 6 1 8 11 14 6 9 6 1 6 5 9 11 4
output:
13460/21611 12160/64833 28312/64833 110897/345776 1/1 104449/129666 23347/43222 91087/172888 40735/43222 9652/64833 110897/172888 13498/64833 9328/21611 51883/64833
result:
ok 14 lines
Test #78:
score: 0
Accepted
time: 1ms
memory: 3644kb
input:
12 8 50 8 4 1 11 6 8 10 4 12 3 7 1 5 3 10 1 5 4 9 3 3 9 4 7 2 10 4 7 11 4 2 7 5 11 11 7 2 8 4 5 10 7 7 9 9 6 1 10 1 9 9 6 10 2 9 5 5 11 10 11 4 5 11 8 7 3 2 6 11 1 7 3 10 4 12 3 3 8 11 6 1 7 3 10 7 6 10 11 5 6 4 1 5 9 12 8 10 11 8 12
output:
397114305/490443568 795426093/1226108920 26967622/30652723 234780123/306527230 65080734719/78470970880 34253996179/39235485440 130251388/153263615 1/1 15508633637/19617742720 17535775747/19617742720 17668324199/19617742720 26427368/30652723
result:
ok 12 lines
Test #79:
score: 0
Accepted
time: 0ms
memory: 3632kb
input:
4 1 41 3 2 1 4 2 1 4 2 1 4 1 4 4 2 3 2 4 2 2 3 2 4 3 2 4 3 1 3 1 3 4 1 2 3 1 2 2 3 3 4 1 2 1 2 2 4 3 2 1 2 1 4 1 4 3 1 2 3 1 2 4 1 1 3 4 2 1 2 2 1 1 4 2 1 4 2 3 4 3 4 1 4
output:
1/1 2147412133/2147450773 8588870843/8589803092 2147405788/2147450773
result:
ok 4 lines
Test #80:
score: 0
Accepted
time: 0ms
memory: 3628kb
input:
7 3 9 5 4 6 4 5 7 7 6 4 5 1 5 6 4 1 6 2 4
output:
0/1 0/1 1/1 0/1 0/1 0/1 0/1
result:
ok 7 lines
Test #81:
score: 0
Accepted
time: 0ms
memory: 3640kb
input:
2 2 2 2 1 1 2
output:
6/7 1/1
result:
ok 2 lines
Test #82:
score: 0
Accepted
time: 0ms
memory: 3576kb
input:
6 6 25 3 2 3 5 6 5 1 3 2 1 4 5 3 6 1 6 3 4 4 2 4 5 2 1 5 1 5 1 1 4 4 6 2 3 3 6 4 6 2 4 3 6 6 4 5 1 1 6 1 4
output:
11920669/12195346 5320540/6097673 5512361/6097673 6012770/6097673 5385101/6097673 1/1
result:
ok 6 lines
Test #83:
score: 0
Accepted
time: 1ms
memory: 3932kb
input:
15 11 2 3 12 8 3
output:
0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1 1/1 0/1 0/1 0/1 0/1
result:
ok 15 lines
Test #84:
score: 0
Accepted
time: 0ms
memory: 3612kb
input:
3 2 43 2 1 2 1 3 2 1 2 1 2 3 2 1 2 1 3 3 1 1 3 2 3 1 3 3 1 2 3 3 1 1 3 3 2 3 2 1 3 2 1 1 2 1 3 2 3 3 2 1 2 3 1 2 3 3 2 3 2 3 1 2 1 2 3 2 1 1 3 1 2 3 1 1 3 2 1 3 2 3 1 3 2 3 1 1 3
output:
3221224701/3221224798 1/1 18741671355/18741671552
result:
ok 3 lines
Test #85:
score: 0
Accepted
time: 0ms
memory: 3876kb
input:
2 1 50 2 1 1 2 2 1 2 1 2 1 2 1 2 1 1 2 1 2 1 2 1 2 1 2 1 2 2 1 1 2 2 1 2 1 2 1 2 1 1 2 2 1 2 1 2 1 2 1 1 2 2 1 2 1 1 2 1 2 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 1 2 2 1 1 2 2 1 1 2 1 2 1 2 2 1 2 1 2 1 1 2
output:
1/1 2251799813685246/2251799813685247
result:
ok 2 lines
Test #86:
score: 0
Accepted
time: 4ms
memory: 3832kb
input:
15 4 50 8 11 6 10 11 15 7 9 12 8 5 13 4 10 11 10 15 4 1 10 9 15 6 1 14 5 8 12 1 14 9 8 11 6 6 4 10 7 10 7 15 1 3 1 1 9 3 8 8 15 10 6 13 10 12 14 6 4 7 14 5 7 7 14 10 13 13 11 12 7 10 12 1 5 1 6 8 1 11 4 3 5 15 2 15 9 10 13 15 13 5 7 13 15 14 10 12 15 3 2
output:
20319025/25007104 11322333/25007104 13874293/25007104 1/1 8099783/12503552 10825853/12503552 8163737/12503552 2079841/3125888 905335/1562944 19920/24421 21256/24421 4851822805/6401818624 22132833/25007104 1035897/1562944 5646348629/6401818624
result:
ok 15 lines
Test #87:
score: 0
Accepted
time: 4ms
memory: 3804kb
input:
15 4 50 9 4 10 12 9 12 14 5 14 3 2 6 9 4 1 3 3 11 7 3 12 14 7 6 2 14 4 13 3 7 8 3 5 14 9 3 2 7 9 13 6 1 1 13 14 8 2 6 5 11 10 1 10 15 7 3 10 5 11 13 12 13 3 7 13 5 3 14 6 14 13 9 13 8 1 12 14 12 6 15 13 10 5 8 12 11 8 2 9 14 1 13 5 13 13 4 1 13 3 8
output:
17434783/20124082 4020349357/7727647488 3666475/5488386 1/1 406239059/482977968 433348033/965955936 202309645/482977968 11923650517/15455294976 122622141/160992656 20436971/30186123 196959111/321985312 1417078243/1931911872 9882809/10062041 482328317/643970624 163129597/482977968
result:
ok 15 lines
Test #88:
score: 0
Accepted
time: 0ms
memory: 4060kb
input:
15 4 50 4 9 11 15 12 7 15 1 2 1 10 14 7 3 4 1 13 5 9 5 7 3 6 7 13 15 4 8 8 2 13 8 13 8 12 11 15 8 7 1 3 4 3 8 9 1 9 5 2 6 4 3 12 3 3 6 8 7 14 2 10 8 11 14 1 12 6 15 1 14 2 5 6 5 14 5 8 4 4 3 9 10 2 3 9 15 13 9 8 14 5 13 4 9 3 9 13 14 14 7
output:
25311085/42378473 27581725/42378473 615111201/678055568 1/1 8126159171/10848889088 228885945/339027784 31831868223/43395556352 2301150627/2712222272 629393633/678055568 22634455/42378473 18831039/84756946 22088830/42378473 8731782021/10848889088 2355139435/2712222272 28116273/42378473
result:
ok 15 lines
Test #89:
score: 0
Accepted
time: 4ms
memory: 4056kb
input:
15 2 50 11 7 7 3 10 7 7 15 9 1 14 15 14 3 4 13 15 10 8 13 11 9 11 15 7 3 15 6 7 9 5 4 15 5 8 6 3 4 15 12 9 5 7 2 3 1 6 8 11 9 2 15 2 10 12 3 6 5 14 11 14 15 9 1 8 13 8 7 12 1 13 4 10 14 5 1 10 3 10 4 14 10 15 1 14 13 9 13 7 14 6 11 1 3 1 11 15 4 5 10
output:
5466497419/6606028800 1/1 51255341/66060288 173750963/235929600 40290416059/52848230400 18569/33600 16230923/20643840 2371/5040 180066389/275251200 46934849707/52848230400 4770408113/6606028800 348167/614400 53188463/82575360 2895334657/3303014400 5705881/6451200
result:
ok 15 lines
Test #90:
score: 0
Accepted
time: 4ms
memory: 4096kb
input:
15 5 50 13 8 11 12 8 15 14 11 15 5 4 11 12 2 14 10 4 2 4 15 11 6 9 13 9 5 12 2 11 12 6 13 10 3 15 10 3 5 2 7 1 3 7 14 6 2 14 3 5 2 10 12 13 5 4 11 8 12 7 3 3 15 8 4 13 11 15 9 12 4 11 8 4 12 12 8 8 2 15 10 8 14 11 7 14 6 11 12 14 12 9 13 15 4 9 10 15 4 11 13
output:
19433/110798 2645873/3545536 489851/886384 160357449/226914304 1/1 15782905/28364288 61333/110798 21473899/28364288 42294631/56728576 38131779/56728576 5741707/7091072 42569211/56728576 11939379/14182144 83615529/113457152 166718169/226914304
result:
ok 15 lines
Test #91:
score: 0
Accepted
time: 4ms
memory: 3800kb
input:
15 8 50 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 2 14 7 8 3 13 7 13 12 6 12 2 12 8 8 13 7 1 8 14 1 4 1 6 6 10 3 14 11 2 10 6 9 11 1 9 10 2 5 6 5 12 11 13 13 12 10 2 1 11 12 5 6 11 11 4 11 8 6 4 3 9 14 5 7 9 13 11 14 9 15 10
output:
228672905/333535409 208437600/333535409 196312389/333535409 227279009/333535409 248409793/333535409 247498497/333535409 206470470/333535409 1/1 8529802505/10673133088 3463698263/5336566544 5022869143/5336566544 34358255/46004884 4598022599/5336566544 8617724663/10673133088 4201931079/10673133088
result:
ok 15 lines
Test #92:
score: 0
Accepted
time: 4ms
memory: 3832kb
input:
15 1 50 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 11 1 5 13 10 8 8 12 2 5 15 2 8 13 12 15 5 14 2 11 13 3 4 6 6 14 13 6 5 11 14 7 11 14 5 15 4 10 9 1 10 3 13 15 10 6 12 3 11 1 4 9 11 8 7 13 6 15 11 9 2 9 6 8 15 13 4 8 11 15 11 13
output:
1/1 4961783/7004392 118610391/224140544 1155073807/1793124352 1115775/1751098 168619577/224140544 1675165/3502196 1441951427/1793124352 11433907/14008784 7738317/14008784 13904224299/14344994816 116101279/224140544 5988951237/7172497408 4426795/7004392 6110093285/7172497408
result:
ok 15 lines
Test #93:
score: 0
Accepted
time: 4ms
memory: 3896kb
input:
15 3 50 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 1 14 12 14 8 4 2 10 1 8 9 7 11 6 13 15 11 13 5 2 7 2 6 1 5 3 13 3 1 10 6 8 9 4 2 12 14 6 8 14 6 5 10 14 12 9 7 15 13 11 1 12 3 6 10 13 3 2 3 12 6 15 10 3 9 5 2 3 2 14 12 9
output:
1075561711/1659800088 1497300749/1659800088 1/1 267157693/829900044 59417493/92211116 2597136157/3319600176 1486088491/3319600176 103966173/184422232 626897423/829900044 175938755/207475011 10343515/23052779 236154277/276633348 1088690017/1659800088 5357904515/6639200352 3927485911/6639200352
result:
ok 15 lines
Test #94:
score: 0
Accepted
time: 4ms
memory: 3868kb
input:
15 1 50 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 14 13 14 11 12 4 15 11 15 14 6 7 1 3 2 7 15 13 11 4 15 9 10 3 9 1 2 3 13 3 1 14 11 14 4 10 5 7 12 9 14 10 5 1 5 8 8 15 3 8 11 10 5 1 4 12 7 10 9 8 7 12 4 6 12 7 5 3 14 9 12 4
output:
1/1 26354705/72924626 116903593/145849252 99862285/145849252 262785597/291698504 15647615/36462313 54575621/72924626 27879691/36462313 27963713/36462313 25893213/36462313 21211481/36462313 221589809/291698504 16022105/36462313 107362125/145849252 156800953/291698504
result:
ok 15 lines
Test #95:
score: 0
Accepted
time: 2ms
memory: 4100kb
input:
15 3 14 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15
output:
2/9 5/9 1/1 11/18 11/36 11/72 11/144 11/288 11/576 11/1152 11/2304 11/4608 11/9216 11/18432 11/36864
result:
ok 15 lines
Test #96:
score: 0
Accepted
time: 4ms
memory: 3832kb
input:
15 1 50 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 5 14 14 4 13 3 9 15 9 5 4 1 11 14 14 3 5 9 5 14 8 10 12 4 14 13 4 8 15 6 1 11 3 11 10 3 12 6 4 13 11 9 7 6 3 4 14 4 4 14 7 1 1 5 4 1 14 2 5 13 12 2 4 14 10 15 14 11 5 13 2 7
output:
1/1 64514814593/91609452008 8109682183/11451181501 21118325661/22902363002 19181577845/22902363002 20537838699/45804726004 30534563271/45804726004 4930841658/11451181501 6828075716/11451181501 5960267045/11451181501 9066385613/11451181501 6670914053/11451181501 9191861973/11451181501 10254760355/114...
result:
ok 15 lines
Test #97:
score: 0
Accepted
time: 4ms
memory: 3840kb
input:
15 1 50 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 8 8 14 9 8 5 1 5 12 12 14 8 3 6 7 2 9 7 2 14 6 2 7 9 1 7 12 8 6 4 6 14 8 11 12 7 6 8 12 6 9 11 9 3 14 7 8 15 13 5 3 4 10 6 10 5 9 13 1 10 4 13 1 5 1 3 12 5 1 6 15
output:
1/1 287942681/690846168 2037476719/2763384672 487352141/921128224 82039312/86355771 359435507/460564112 4034509163/5526769344 1400650887/1842256448 284794597/345423084 202622029/345423084 16761988/28785257 2110088939/2763384672 53148293/86355771 110202305/172711542 2082233073/3684512896
result:
ok 15 lines
Test #98:
score: 0
Accepted
time: 2ms
memory: 3836kb
input:
15 1 20 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 3 2 9 5 10 7 7 13 9 14 5 9
output:
1/1 2/3 1/2 1/6 1/12 1/24 1/48 1/96 49/768 3/256 1/768 1/1536 65/6144 91/4096 1/12288
result:
ok 15 lines
Test #99:
score: 0
Accepted
time: 2ms
memory: 3836kb
input:
15 1 20 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 7 15 10 3 5 9 14 3 15 12 1 3
output:
1/1 22528/58909 50717/58909 13411/58909 9923/58909 4021/58909 6281/58909 3901/58909 9773/58909 21893/58909 7349/58909 8762/58909 7307/58909 53153/117818 39229/235636
result:
ok 15 lines
Test #100:
score: 0
Accepted
time: 0ms
memory: 4132kb
input:
15 1 20 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 6 8 14 5 7 4 7 6 2 3 15 8
output:
1/1 2/3 1/2 1/6 1/12 7/96 19/192 5/192 1/192 1/384 1/768 1/1536 1/3072 171/4096 107/8192
result:
ok 15 lines
Test #101:
score: 0
Accepted
time: 0ms
memory: 3928kb
input:
15 1 20 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 10 7 9 11 15 10 12 15 10 15 8 11
output:
1/1 2/3 1/3 1/6 1/12 1/24 1/48 1/96 1/192 3/256 7/1024 7/2048 1/3072 1/6144 291/32768
result:
ok 15 lines
Test #102:
score: 0
Accepted
time: 2ms
memory: 4100kb
input:
15 1 20 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 2 11 3 14 6 10 13 2 4 14 2 10
output:
1/1 2/3 1/3 5/24 1/12 1/24 1/48 1/96 1/192 529/1536 171/512 1/1536 683/2048 1707/8192 1/12288
result:
ok 15 lines
Test #103:
score: 0
Accepted
time: 2ms
memory: 3832kb
input:
15 1 20 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 3 4 1 12 1 4 9 8 1 13 4 1
output:
1/1 93199/357001 128075/357001 289561/357001 73289/357001 37897/357001 21641/357001 20233/357001 21801/357001 32617/357001 62201/357001 155809/357001 211873/357001 122939/714002 122939/1428004
result:
ok 15 lines
Test #104:
score: 0
Accepted
time: 3ms
memory: 3872kb
input:
15 1 40 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 4 2 14 4 12 5 11 9 15 5 5 10 1 11 3 6 13 5 15 10 4 9 8 3 6 8 7 4 11 7 14 8 13 6 6 11 12 11 15 11 11 4 6 13 1 4 9 3 1 12 7 11
output:
1/1 51746/218887 486898/1094435 928984/1094435 1541871/3502192 5685273/8755480 24929311/35021920 1838401/4377740 4548723/8755480 173255/437774 61433907/70043840 3491153/4377740 4953531/8755480 3446147/8755480 2557703/4377740
result:
ok 15 lines
Test #105:
score: 0
Accepted
time: 0ms
memory: 3596kb
input:
10 8 43 5 3 4 8 1 4 9 3 10 7 2 10 9 2 2 10 3 4 3 1 7 1 2 9 1 4 7 10 6 1 3 6 6 2 3 5 6 7 4 8 8 1 9 4 8 1 8 6 5 8 8 3 9 1 3 1 1 5 2 10 4 9 10 9 8 2 3 4 6 2 9 6 2 9 5 7 5 3 5 8 9 2 6 1 5 7
output:
65659205/73209044 268058623/292836176 16184093/18302261 56196679/73209044 139808919/146418088 2165730423/2342689408 15505148/18302261 1/1 4291971051/4685378816 188110123/292836176
result:
ok 10 lines