TheForces Round #31 (Div2.9-Forces) Editorial

Правка en22, от wuhudsm, 2024-07-01 20:15:44

A

Idea:Yugandhar_Master

solution
code(C++)

B

Idea:beyondpluto

solution
code(C++)

C

Idea:Yugandhar_Master

solution
code(C++)

D

Idea:wuhudsm

Preparer:PROELECTRO444

solution
code(C++)

E

Idea:HexShift

solution
code(C++)

F

Idea:Yugandhar_Master

Case $$$1$$$:If both $$$a_i=1$$$ and $$$b_j=0$$$ exist, the answer is $$$0$$$.

Case $$$2$$$:If $$$a_i=1$$$ exist and $$$b_j=1$$$ for all $$$j$$$, the answer is $$$(2^n-1)^k$$$, where $$$k$$$ is the number of $$$i$$$ satisfying $$$a_i=0$$$;

Case $$$3$$$:If $$$b_j=0$$$ exist and $$$a_i=0$$$ for all $$$i$$$, it is similar to case $$$2$$$.

Case $$$4$$$:If $$$a_i=0$$$ and $$$b_j=1$$$ for all $$$i,j$$$, we need to exclude all invalid cases. That is, the caces that there is at least one row containing all $$$1's$$$, or there is at least one coloum containing all $$$0's$$$. Using the Inclusion-Exclusion Principle, we get the answer is $$$2^(n^2)-2\Sigma((-1)^{i} \cdot C(n,i)·2^{n^2-i·n})(1 \le i \le n)$$$.

solution
code(C++)

G

Idea:vikram108

solution
code(C++)

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en25 Английский vikram108 2024-07-01 20:39:11 0 (published)
en24 Английский vikram108 2024-07-01 20:32:56 155 (saved to drafts)
en23 Английский wuhudsm 2024-07-01 20:16:36 97
en22 Английский wuhudsm 2024-07-01 20:15:44 622 (published)
en21 Английский vikram108 2024-07-01 20:07:13 951
en20 Английский wuhudsm 2024-07-01 20:04:46 249
en19 Английский wuhudsm 2024-07-01 19:58:33 501
en18 Английский vikram108 2024-07-01 19:37:30 66
en17 Английский HexShift 2024-07-01 19:33:13 56
en16 Английский wuhudsm 2024-07-01 19:26:51 0 (saved to drafts)
en15 Английский HexShift 2024-07-01 19:25:49 1315 (published)
en14 Английский vikram108 2024-07-01 19:23:29 11 Tiny change: 'st ll P = 998244353;\nconst l' -> 'st ll P = 1e18;\nconst l' (saved to drafts)
en13 Английский HexShift 2024-07-01 19:23:00 1710 Tiny change: 'ce is even(when $n/2$ is even)' -> 'ce is even (when $\frac{n}{2}$ is even)' (published)
en12 Английский vikram108 2024-07-01 18:46:19 146
en11 Английский beyondpluto 2024-07-01 18:43:56 136
en10 Английский beyondpluto 2024-07-01 18:37:42 2009
en9 Английский vikram108 2024-07-01 18:35:01 190 Tiny change: 'qrt{5}}{2}$\nAlice w' -> 'qrt{5}}{2} = \phi$\nAlice w'
en8 Английский vikram108 2024-07-01 18:26:44 76
en7 Английский vikram108 2024-07-01 18:19:01 121 Tiny change: 'sume that x>=y. We desir' -> 'sume that $x>=y$. We desir'
en6 Английский vikram108 2024-07-01 18:05:11 1777
en5 Английский wuhudsm 2024-07-01 18:00:29 23
en4 Английский wuhudsm 2024-07-01 17:59:18 39
en3 Английский wuhudsm 2024-07-01 17:57:17 19367
en2 Английский wuhudsm 2024-07-01 17:48:46 1091
en1 Английский wuhudsm 2024-07-01 17:41:43 18567 Initial revision (saved to drafts)