QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#406900#5089. 环覆盖valeriu#20 995ms266160kbC++202.8kb2024-05-07 19:44:522024-05-07 19:44:54

Judging History

你现在查看的是最新测评结果

  • [2024-05-07 19:44:54]
  • 评测
  • 测评结果:20
  • 用时:995ms
  • 内存:266160kb
  • [2024-05-07 19:44:52]
  • 提交

answer

#include <bits/stdc++.h>
#define all(x) (x).begin(),(x).end()
using namespace std;

using ll = long long;
using ld = long double;

//#define int ll
#define sz(x) ((int)(x).size())

using pii = pair<int,int>;
using tii = tuple<int,int,int>;

const int mod = 1e9 + 7;
struct Mint {
  int val;
  Mint(ll x = 0): val((x % mod + mod) % mod) {;}
  Mint operator +(const Mint& x) { return Mint(val + x.val); }
  Mint operator -(const Mint& x) { return Mint(val - x.val); }
  Mint operator *(const Mint& x) { return Mint((ll)val * x.val); }
  Mint operator +=(const Mint& x) { return *this = Mint(val + x.val); }
  Mint operator -=(const Mint& x) { return *this = Mint(val - x.val); }
  Mint operator *=(const Mint& x) { return *this = Mint((ll)val * x.val); }
  Mint operator ^(const int& _b) const {
    Mint accum = 1, a = *this;
    int b = _b;
    while(b) {
      accum = (b & 1? accum * a : accum);
      a *= a;
      b >>= 1;
    }
    return accum;
  }
  Mint operator /(const Mint& x) { return Mint((ll)val * (x ^ (mod - 2)).val); }
  Mint operator /=(const Mint& x) { return *this = Mint((ll)val * (x ^ (mod - 2)).val); }
};

const int nmax = 25, mmax = nmax * (nmax - 1) / 2;

vector<pii> edgs;

struct PM { 
   int plus, minus;
   PM(int a = 0, int b = 0): plus(a), minus(b) {;}
   PM flip() { return PM(minus, plus); }
   PM operator +(const PM& x) { 
      return PM(plus + x.plus, minus + x.minus);
   }
};

PM wht[1 << nmax];

Mint dp[mmax + 1][mmax];
Mint rez[mmax];

void init(int m) {
   const int mmax = m;
   for(int i = 0; i <= mmax; i++) {
      dp[i][0] = 1;
      for(int j = 0; j < i; j++) {
         for(int h = mmax - 2; h >= 0; h--)
            dp[i][h + 1] += dp[i][h];
      }
      
      for(int j = 0; j < mmax - i; j++) {
         for(int h = mmax - 2; h >= 0; h--)
            dp[i][h + 1] -= dp[i][h];
      }
   }
   return;
}

Mint cnt[mmax];

signed main() {
   cin.tie(0) -> sync_with_stdio(0);
   int n, m;
   cin >> n >> m;
   init(m);
   
   edgs.resize(m);
   for(auto &[a, b] : edgs) cin >> a >> b, --a, --b, wht[(1 << a) | (1 << b)].plus++;
   
   for(int step = 0; step < n; step++) {
      for(int i = 0; i < (1 << n); i++) {
         if(i & (1 << step)) continue;
         tie(wht[i], wht[i ^ (1 << step)]) = make_pair(wht[i] + wht[i ^ (1 << step)], wht[i] + wht[i ^ (1 << step)].flip());
      }
   }
   
   for(int i = 0; i < (1 << n); i++) {
      cnt[wht[i].plus] += 1;
   }
   for(int i = 0; i <= m; i++) {
      for(int p = 0; p <= m; p++) {
         rez[p] += dp[i][p] * cnt[i];
      }
   }
   
   
   for(int i = 0; i <= m; i++)
      cout << (rez[i] * ((Mint(1) / Mint(2)) ^ n)).val << ' ';
   cout << '\n';
   
   
}

/**
      Istenem! Nu poate fi real.
-- Surse verificate
*/


详细

Subtask #1:

score: 5
Accepted

Test #1:

score: 5
Accepted
time: 11ms
memory: 266088kb

input:

10 9
3 5
3 10
4 7
4 8
5 6
5 9
6 9
7 9
9 10

output:

1 0 0 1 1 1 0 0 0 0 

result:

ok 10 numbers

Test #2:

score: 5
Accepted
time: 20ms
memory: 266076kb

input:

8 15
1 4
1 5
1 8
2 4
2 6
3 6
4 5
4 6
4 7
5 6
5 7
5 8
6 7
6 8
7 8

output:

1 0 0 10 18 26 46 54 43 30 18 8 2 0 0 0 

result:

ok 16 numbers

Test #3:

score: 5
Accepted
time: 29ms
memory: 266016kb

input:

19 19
1 12
1 16
1 18
2 8
2 17
3 11
3 17
4 9
4 19
5 17
7 13
8 17
9 13
9 15
9 17
10 16
10 18
14 17
15 16

output:

1 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 

result:

ok 20 numbers

Test #4:

score: 5
Accepted
time: 4ms
memory: 266108kb

input:

7 14
1 3
1 4
1 7
2 3
2 5
2 6
2 7
3 4
3 5
3 7
4 7
5 6
5 7
6 7

output:

1 0 0 11 16 18 46 64 47 30 18 5 0 0 0 

result:

ok 15 numbers

Test #5:

score: 5
Accepted
time: 24ms
memory: 266096kb

input:

10 9
1 9
2 6
3 5
3 8
3 10
4 6
4 8
5 6
7 10

output:

1 0 0 0 0 1 0 0 0 0 

result:

ok 10 numbers

Test #6:

score: 5
Accepted
time: 20ms
memory: 266084kb

input:

15 14
2 9
2 10
3 5
3 10
3 12
3 14
4 6
5 10
5 15
6 9
6 15
7 11
7 13
9 15

output:

1 0 0 2 0 1 3 1 0 0 0 0 0 0 0 

result:

ok 15 numbers

Test #7:

score: 5
Accepted
time: 11ms
memory: 266156kb

input:

9 8
1 3
2 4
2 7
3 5
3 9
4 6
7 9
8 9

output:

1 0 0 0 0 0 0 0 0 

result:

ok 9 numbers

Test #8:

score: 5
Accepted
time: 15ms
memory: 266076kb

input:

19 18
1 5
1 9
1 15
2 4
2 11
2 15
3 6
3 8
3 17
4 19
5 12
6 13
6 15
8 10
8 15
9 19
12 17
13 16

output:

1 0 0 0 1 0 1 2 0 0 1 2 0 0 0 0 0 0 0 

result:

ok 19 numbers

Test #9:

score: 5
Accepted
time: 16ms
memory: 266060kb

input:

7 18
1 2
1 3
1 4
1 6
1 7
2 3
2 5
2 6
2 7
3 4
3 5
3 7
4 5
4 6
4 7
5 6
5 7
6 7

output:

1 0 0 20 51 108 278 528 711 760 660 468 293 156 54 8 0 0 0 

result:

ok 19 numbers

Test #10:

score: 5
Accepted
time: 8ms
memory: 266060kb

input:

10 15
1 6
2 4
2 6
2 9
2 10
3 5
3 8
3 9
3 10
4 5
4 8
5 8
5 10
7 9
8 9

output:

1 0 0 4 6 12 16 12 9 4 0 0 0 0 0 0 

result:

ok 16 numbers

Subtask #2:

score: 0
Wrong Answer

Dependency #1:

100%
Accepted

Test #11:

score: 15
Accepted
time: 12ms
memory: 266096kb

input:

10 22
1 2
1 3
1 4
1 6
1 8
1 9
2 3
2 4
2 5
2 7
2 8
2 10
3 8
3 10
4 7
4 8
5 7
5 10
6 10
7 9
8 10
9 10

output:

1 0 0 13 33 64 162 367 621 906 1216 1343 1215 988 682 353 146 58 20 4 0 0 0 

result:

ok 23 numbers

Test #12:

score: 15
Accepted
time: 3ms
memory: 266096kb

input:

11 38
1 2
1 3
1 4
1 6
1 7
1 8
1 10
2 5
2 8
2 9
2 10
2 11
3 5
3 6
3 7
3 9
3 10
3 11
4 5
4 7
4 11
5 6
5 7
5 9
5 10
5 11
6 7
6 8
6 9
6 10
6 11
7 8
7 9
7 10
8 9
8 11
9 11
10 11

output:

1 0 0 50 210 800 3661 14805 51947 164232 466335 1177265 2639525 5274024 9420013 15077609 21687685 28100640 32827271 34579721 32851761 28140784 21708463 15062239 9394113 5261128 2639589 1183171 472151 166600 51607 13987 3278 656 117 17 1 0 0 

result:

ok 39 numbers

Test #13:

score: 15
Accepted
time: 23ms
memory: 266100kb

input:

11 24
1 3
1 4
1 7
1 8
2 6
2 7
2 8
3 4
3 5
3 6
3 8
3 10
4 7
4 9
5 7
5 9
5 11
6 8
6 10
6 11
7 10
7 11
8 9
8 10

output:

1 0 0 9 26 65 147 343 709 1179 1783 2437 2715 2489 1993 1341 702 297 109 30 7 2 0 0 0 

result:

ok 25 numbers

Test #14:

score: 15
Accepted
time: 15ms
memory: 266020kb

input:

11 37
1 2
1 4
1 5
1 6
1 7
1 10
2 3
2 4
2 6
2 7
2 8
2 9
2 10
3 5
3 6
3 8
3 10
3 11
4 5
4 6
4 9
4 10
4 11
5 7
5 9
6 7
6 8
6 10
6 11
7 9
7 10
7 11
8 9
8 10
8 11
9 10
10 11

output:

1 0 0 46 189 675 2952 11644 39587 121171 335150 825420 1798517 3475223 5977332 9174036 12597741 15530759 17234898 17229504 15512559 12574521 9163776 5982788 3484905 1805833 829874 336708 120415 37965 10436 2476 518 93 14 2 0 0 

result:

ok 38 numbers

Test #15:

score: 15
Accepted
time: 15ms
memory: 266128kb

input:

19 24
1 9
1 10
1 17
1 19
2 3
3 6
4 8
4 10
4 13
4 14
5 7
7 11
8 13
8 17
9 12
9 16
10 19
11 15
11 17
12 16
13 15
14 15
14 17
14 19

output:

1 0 0 3 5 8 14 25 31 36 40 33 27 20 10 3 0 0 0 0 0 0 0 0 0 

result:

ok 25 numbers

Test #16:

score: 15
Accepted
time: 16ms
memory: 266160kb

input:

9 30
1 3
1 4
1 5
1 6
1 7
2 3
2 4
2 5
2 6
2 7
2 8
2 9
3 4
3 5
3 6
3 7
3 8
4 5
4 6
4 8
4 9
5 6
5 7
5 8
5 9
6 7
6 8
6 9
7 9
8 9

output:

1 0 0 48 175 568 2365 8050 22348 54852 117479 214858 338872 467840 567602 604996 567273 467832 338270 213748 117607 55912 22753 7882 2298 548 107 18 2 0 0 

result:

ok 31 numbers

Test #17:

score: 15
Accepted
time: 11ms
memory: 266160kb

input:

18 24
1 2
1 7
1 13
1 15
1 17
2 3
2 17
3 9
4 6
4 7
5 8
5 15
5 16
6 7
6 14
7 14
8 11
8 16
10 16
11 12
11 18
14 16
14 17
15 16

output:

1 0 0 5 3 4 14 15 16 21 21 16 8 3 1 0 0 0 0 0 0 0 0 0 0 

result:

ok 25 numbers

Test #18:

score: 15
Accepted
time: 8ms
memory: 266124kb

input:

13 27
1 2
1 5
1 7
1 10
1 11
1 12
2 3
2 4
2 12
3 4
3 11
3 12
4 5
4 7
4 12
4 13
5 9
5 10
5 11
7 8
7 9
7 11
7 12
8 11
9 13
10 12
11 13

output:

1 0 0 12 37 85 229 607 1265 2371 4146 6130 7924 9384 9660 8504 6605 4404 2430 1122 423 139 47 9 1 1 0 0 

result:

ok 28 numbers

Test #19:

score: 0
Wrong Answer
time: 12ms
memory: 266012kb

input:

7 21
1 2
1 3
1 4
1 5
1 6
1 7
2 3
2 4
2 5
2 6
2 7
3 4
3 5
3 6
3 7
4 5
4 6
4 7
5 6
5 7
6 7

output:

1 0 0 35 105 252 805 1935 3255 4515 5481 5481 4515 3255 1935 805 252 105 35 0 0 0 

result:

wrong answer 22nd numbers differ - expected: '1', found: '0'

Subtask #3:

score: 15
Accepted

Test #31:

score: 15
Accepted
time: 945ms
memory: 266152kb

input:

25 45
1 6
1 12
1 17
2 3
2 4
2 6
3 6
3 8
4 5
4 12
4 16
5 17
6 21
7 14
7 22
7 23
8 15
8 19
8 24
9 11
9 19
9 23
9 25
10 17
10 18
11 16
11 19
11 22
12 19
13 18
14 19
15 19
16 24
17 19
17 22
17 25
18 19
18 21
18 24
19 23
20 22
21 25
22 23
23 25
24 25

output:

1 0 0 6 14 39 85 198 451 995 2173 4284 8230 15397 26870 44452 69519 101666 139154 177420 209814 230374 234537 220150 189837 150703 109969 72996 43834 23885 11788 5232 2064 716 224 62 12 1 0 0 0 0 0 0 0 0 

result:

ok 46 numbers

Test #32:

score: 15
Accepted
time: 979ms
memory: 266156kb

input:

25 45
1 6
1 11
1 13
1 14
2 9
2 10
2 20
2 22
3 17
3 21
3 22
4 14
4 20
4 24
5 19
5 20
6 9
6 18
7 23
8 14
8 24
9 10
9 21
10 11
10 14
10 18
11 22
12 20
13 16
14 16
14 20
15 23
16 25
17 19
17 23
18 22
18 23
19 21
19 23
19 25
20 22
21 23
22 24
23 25
24 25

output:

1 0 0 6 14 31 74 181 468 1135 2360 4843 9830 18434 32404 53472 82502 119104 159718 198544 228314 241907 235810 210693 172196 128583 87316 53963 30130 14876 6560 2582 833 218 46 4 0 0 0 0 0 0 0 0 0 0 

result:

ok 46 numbers

Test #33:

score: 15
Accepted
time: 979ms
memory: 265992kb

input:

25 45
1 11
1 12
1 17
2 11
2 13
2 15
3 19
4 7
4 12
4 16
4 21
5 16
5 25
6 14
6 15
6 21
6 22
6 25
7 15
7 23
8 11
8 16
8 18
9 11
10 11
10 16
11 23
11 25
12 19
12 21
12 25
13 18
13 20
14 18
15 20
16 17
16 20
17 22
18 22
19 24
20 21
21 24
22 24
23 25
24 25

output:

1 0 0 2 13 21 78 161 382 908 1931 4128 8119 15293 26845 44666 70215 102467 140124 177415 209314 230772 234200 219453 189104 149762 109859 73038 43967 24329 12045 5368 2138 735 230 57 11 1 0 0 0 0 0 0 0 0 

result:

ok 46 numbers

Test #34:

score: 15
Accepted
time: 962ms
memory: 266100kb

input:

25 45
1 5
2 15
2 16
2 24
3 14
3 17
3 20
4 14
4 17
4 24
5 12
5 14
5 23
5 25
6 11
6 21
7 8
7 12
7 16
8 17
8 21
8 25
9 23
10 13
11 17
12 14
13 25
14 18
15 21
15 22
15 24
16 23
17 18
17 19
17 20
18 24
19 20
19 21
19 23
19 25
20 21
21 24
22 25
23 24
24 25

output:

1 0 0 6 20 39 101 321 704 1575 3550 7220 14060 25467 43101 68935 102070 140187 179306 212666 233596 236709 221359 191311 151760 109733 71754 42344 22628 10489 4079 1481 473 89 14 4 0 0 0 0 0 0 0 0 0 0 

result:

ok 46 numbers

Test #35:

score: 15
Accepted
time: 974ms
memory: 266008kb

input:

25 45
1 4
1 18
2 12
2 21
2 24
3 10
3 13
4 9
4 10
4 18
5 7
5 24
5 25
6 7
7 19
7 20
8 24
9 23
9 25
10 12
11 12
11 19
12 14
12 15
12 16
12 24
13 18
13 20
13 22
14 15
15 22
16 17
16 21
16 23
17 25
18 19
18 21
19 21
19 24
20 23
21 22
21 24
22 23
23 25
24 25

output:

1 0 0 8 11 25 94 223 468 1096 2376 4712 9191 16836 28866 46984 71744 103145 139116 174771 205491 225049 228418 215831 188656 151442 112176 76086 46649 26042 13086 5650 2075 653 156 23 2 0 0 0 0 0 0 0 0 0 

result:

ok 46 numbers

Test #36:

score: 15
Accepted
time: 995ms
memory: 266112kb

input:

25 45
1 5
1 7
1 13
1 24
2 4
2 16
2 19
2 20
2 23
3 5
3 19
4 10
4 21
4 24
5 12
5 15
5 24
6 14
7 9
7 12
8 9
8 20
9 11
9 14
9 16
9 19
10 11
10 24
11 24
12 22
13 14
13 15
14 17
14 25
15 24
16 20
17 19
18 23
19 21
19 25
20 24
21 25
22 25
23 25
24 25

output:

1 0 0 6 14 29 79 217 496 1089 2342 4762 9190 16784 28993 47139 71899 103164 138682 174306 205295 224981 228393 215927 189338 152361 112330 75734 46356 25630 12727 5629 2202 762 230 56 9 0 0 0 0 0 0 0 0 0 

result:

ok 46 numbers

Test #37:

score: 15
Accepted
time: 960ms
memory: 266072kb

input:

25 45
1 5
1 13
1 18
2 8
3 18
4 7
4 9
4 10
4 17
4 22
5 8
5 11
5 18
5 21
6 8
7 8
7 10
7 12
7 23
8 13
8 24
9 13
9 17
10 11
10 13
10 22
10 23
11 13
11 15
12 13
12 21
13 24
13 25
14 22
15 22
16 20
17 23
18 20
19 20
20 21
21 25
22 23
23 24
23 25
24 25

output:

1 0 0 10 23 65 164 427 1110 2430 5223 10849 20487 36528 61390 95232 137000 182691 224085 251788 257605 238313 198664 148987 100594 61340 33761 16697 7389 2902 998 298 79 19 3 0 0 0 0 0 0 0 0 0 0 0 

result:

ok 46 numbers

Test #38:

score: 15
Accepted
time: 959ms
memory: 266084kb

input:

25 45
1 3
1 10
1 17
2 3
2 12
2 17
2 21
2 25
3 17
3 18
4 5
4 12
4 15
4 20
5 16
6 8
6 13
6 19
7 10
7 12
7 17
7 25
8 12
8 21
8 25
9 20
9 24
10 14
11 19
12 23
13 18
14 19
15 16
15 20
16 19
16 22
17 25
18 23
18 24
19 20
20 21
21 24
22 25
23 24
24 25

output:

1 0 0 6 15 26 65 188 373 781 1778 3546 6672 12449 22286 37290 58562 87158 121754 158290 192149 217606 228866 223176 201165 167569 129390 92126 60246 36309 19966 9954 4539 1868 694 224 54 10 1 0 0 0 0 0 0 0 

result:

ok 46 numbers

Test #39:

score: 15
Accepted
time: 953ms
memory: 266028kb

input:

25 45
1 4
1 11
1 16
2 15
2 16
2 20
3 13
3 16
3 18
3 20
4 21
5 15
6 7
6 15
6 20
7 10
7 11
7 25
8 20
9 12
9 19
10 18
10 24
11 15
12 19
13 17
13 18
13 23
14 15
14 18
15 17
15 21
16 17
16 25
17 23
17 25
18 20
19 25
20 23
21 23
21 25
22 23
22 24
23 24
24 25

output:

1 0 0 6 14 39 96 272 631 1369 3196 6511 12187 22419 38111 59813 88896 123532 159225 191834 215996 225978 220038 199786 167995 130337 93566 61691 36899 20059 9899 4337 1661 554 157 38 8 1 0 0 0 0 0 0 0 0 

result:

ok 46 numbers

Test #40:

score: 15
Accepted
time: 980ms
memory: 266088kb

input:

25 45
1 6
2 9
2 22
3 7
3 21
3 22
4 13
4 24
5 7
5 13
6 8
6 12
6 21
7 11
7 20
7 25
8 10
8 23
9 14
9 23
10 11
10 23
10 25
11 15
11 20
11 24
12 18
12 19
13 15
13 19
14 20
14 22
15 19
16 20
17 19
18 24
19 20
20 21
20 22
20 23
21 25
22 23
22 25
23 24
24 25

output:

1 0 0 5 24 44 96 288 680 1381 2907 5899 11114 20124 34394 55182 83504 118925 157969 194575 223164 237260 232156 209092 172700 130095 89549 56573 32290 16236 7178 2670 811 223 39 4 0 0 0 0 0 0 0 0 0 0 

result:

ok 46 numbers

Test #41:

score: 15
Accepted
time: 986ms
memory: 266116kb

input:

25 45
1 3
1 9
2 15
3 5
3 18
4 19
5 7
5 15
5 20
5 24
6 8
6 11
6 18
7 12
7 16
8 11
8 14
9 16
10 12
10 14
10 19
10 21
11 16
11 20
11 21
12 25
13 15
13 22
14 20
15 22
15 24
16 20
17 18
17 22
17 24
18 19
18 21
18 22
19 23
20 22
20 23
21 22
22 25
23 25
24 25

output:

1 0 0 6 11 32 87 181 441 1081 2236 4458 8828 16185 27814 45652 70301 101077 136679 173473 205898 227807 233635 221805 194271 155347 112682 73876 43484 22807 10528 4298 1562 463 115 27 3 1 0 0 0 0 0 0 0 0 

result:

ok 46 numbers

Test #42:

score: 15
Accepted
time: 955ms
memory: 266060kb

input:

25 45
1 12
1 25
2 14
2 20
2 22
3 5
3 25
4 6
4 8
4 11
4 22
5 10
5 23
6 18
7 18
7 23
7 24
8 14
8 15
9 18
9 19
9 25
10 16
10 18
11 23
12 23
13 19
14 17
14 23
14 24
15 19
15 20
15 23
16 17
17 18
17 22
17 24
17 25
18 20
19 24
20 23
21 24
22 23
23 25
24 25

output:

1 0 0 3 20 45 100 263 624 1371 2860 5822 10908 19167 32050 50483 75339 105494 138640 171726 199309 216836 220464 208469 183866 151055 114548 79494 50574 29643 15754 7425 3114 1184 384 91 21 5 0 0 0 0 0 0 0 0 

result:

ok 46 numbers

Test #43:

score: 15
Accepted
time: 948ms
memory: 266076kb

input:

25 45
1 16
1 17
1 18
2 12
3 15
3 19
3 21
3 25
4 10
4 18
5 10
5 15
6 14
6 15
6 17
6 20
7 13
7 15
7 25
8 10
9 17
9 25
10 18
11 16
11 24
11 25
12 18
12 20
13 14
13 25
14 21
14 24
15 25
16 23
16 24
17 18
17 19
18 23
19 24
20 24
21 23
22 24
23 24
23 25
24 25

output:

1 0 0 9 13 38 116 261 618 1406 3047 6117 11514 20963 35678 56419 84321 118419 155479 190947 218689 233404 231440 211371 176752 134940 93485 58015 31512 14555 5550 1661 356 51 5 0 0 0 0 0 0 0 0 0 0 0 

result:

ok 46 numbers

Test #44:

score: 15
Accepted
time: 948ms
memory: 266020kb

input:

25 45
1 22
1 23
1 25
2 21
3 7
3 24
4 9
4 25
5 14
5 18
5 20
5 22
5 23
6 16
6 25
7 18
7 25
8 20
8 24
9 18
9 19
9 21
10 11
10 14
11 19
12 13
12 15
12 17
13 16
13 19
14 15
14 24
15 22
16 20
16 22
16 24
17 24
17 25
18 25
19 22
20 24
21 24
22 23
23 24
24 25

output:

1 0 0 6 13 36 93 236 510 1079 2358 4689 8752 15554 26303 42494 64259 91263 123073 156175 185307 206398 216074 211312 192544 164133 130648 96615 66154 41750 24487 13350 6606 3013 1249 435 142 38 3 0 0 0 0 0 0 0 

result:

ok 46 numbers

Test #45:

score: 15
Accepted
time: 944ms
memory: 266116kb

input:

25 45
1 7
1 25
2 8
2 13
2 23
3 6
3 20
4 11
4 22
5 12
6 7
7 17
8 12
8 15
8 16
9 15
9 17
9 25
10 20
10 21
11 14
11 15
12 13
12 23
12 25
13 15
13 16
14 16
14 22
15 17
15 22
16 18
16 19
16 23
17 20
17 22
17 24
18 19
19 22
19 24
20 24
21 24
22 24
23 24
24 25

output:

1 0 0 6 24 27 89 295 615 1374 2798 5514 10289 17482 28847 44740 65229 91408 120732 150836 179605 201814 212731 209916 193517 166110 132686 98874 68259 43202 25241 13688 6622 2836 1160 418 127 35 4 1 0 0 0 0 0 0 

result:

ok 46 numbers

Test #46:

score: 15
Accepted
time: 952ms
memory: 266024kb

input:

25 45
1 6
1 8
1 13
1 21
1 24
2 16
2 23
3 10
3 13
3 21
4 15
5 8
5 11
6 12
7 10
7 20
7 25
8 9
8 16
8 18
9 12
9 13
9 14
9 24
10 18
10 19
11 12
11 16
12 25
13 17
14 18
14 24
15 24
16 25
17 18
17 25
18 24
19 21
19 22
20 21
20 23
21 25
22 25
23 25
24 25

output:

1 0 0 2 19 38 72 182 483 1126 2220 4565 8870 15928 27728 45353 69492 100850 137486 174556 206839 228542 233888 221360 192527 153266 112208 74477 44304 23828 11192 4305 1241 198 6 0 0 0 0 0 0 0 0 0 0 0 

result:

ok 46 numbers

Test #47:

score: 15
Accepted
time: 971ms
memory: 266156kb

input:

25 45
1 12
1 19
2 5
3 4
4 8
4 21
5 12
5 25
6 11
6 14
7 8
7 15
8 22
9 12
9 22
10 12
10 15
10 19
10 25
11 20
11 25
12 18
12 19
12 23
12 24
13 15
14 20
15 17
15 19
15 21
15 22
16 18
16 23
17 19
17 25
18 22
18 25
19 20
19 22
20 21
20 25
21 25
22 25
23 25
24 25

output:

1 0 0 8 36 76 182 525 1222 2588 5181 9776 17373 28858 45030 66505 93172 122660 152393 180028 200325 209594 206650 191343 166042 133844 100063 69680 44423 25662 13450 6331 2699 1004 315 92 19 2 0 0 0 0 0 0 0 0 

result:

ok 46 numbers

Test #48:

score: 15
Accepted
time: 947ms
memory: 266096kb

input:

25 45
1 11
1 15
1 23
2 7
3 5
3 7
3 8
3 15
4 17
4 22
4 23
5 6
5 24
6 13
6 15
7 22
8 10
9 13
9 18
9 19
9 24
9 25
10 16
10 18
10 22
10 24
11 22
12 20
13 21
14 15
14 22
15 24
16 20
16 22
17 24
18 21
19 20
19 21
20 21
20 22
21 25
22 23
22 25
23 24
24 25

output:

1 0 0 5 18 36 74 222 539 1138 2363 4876 9417 16930 29039 47152 72144 103224 137826 173144 204110 224632 229592 216606 189295 152850 112655 75904 46821 25922 12607 5332 1941 580 132 23 2 0 0 0 0 0 0 0 0 0 

result:

ok 46 numbers

Test #49:

score: 15
Accepted
time: 973ms
memory: 266124kb

input:

25 45
1 9
1 14
1 19
1 24
2 9
2 14
3 5
3 10
3 22
4 11
4 12
5 15
6 15
6 17
7 9
7 12
7 14
7 19
8 12
8 18
9 15
9 18
10 16
10 17
10 25
11 21
12 15
13 18
13 20
14 17
14 20
14 21
15 18
16 21
17 19
17 25
18 22
19 23
19 24
19 25
20 21
21 22
22 24
23 25
24 25

output:

1 0 0 7 14 20 70 179 386 904 1853 3760 7442 13396 22851 37085 56606 81241 110164 141228 169884 192117 204658 205175 193972 172218 143933 113604 83530 57334 37215 22495 12505 6405 2994 1257 458 141 38 10 2 0 0 0 0 0 

result:

ok 46 numbers

Test #50:

score: 15
Accepted
time: 962ms
memory: 266064kb

input:

25 45
1 7
2 3
2 5
2 9
2 10
2 16
2 21
3 20
3 21
4 10
4 17
5 7
5 12
5 20
6 8
6 19
7 12
7 15
7 17
8 15
8 25
9 11
9 20
10 21
11 19
11 23
12 23
13 14
13 19
13 21
13 22
14 16
15 21
16 19
17 23
18 23
19 22
19 24
20 21
21 22
21 24
21 25
22 24
23 24
24 25

output:

1 0 0 9 17 26 84 237 502 1050 2258 4545 8579 15634 27094 44049 67642 97994 133740 171831 206391 230734 239280 229191 201270 159358 112666 71419 39989 19270 8102 3003 921 222 40 4 0 0 0 0 0 0 0 0 0 0 

result:

ok 46 numbers

Subtask #4:

score: 0
Skipped

Dependency #2:

0%

Subtask #5:

score: 0
Skipped

Dependency #4:

0%