Loading

摘要: 考虑$SG$定理: \[ \begin{cases} SG(S)=\text{mex}\{SG(T) \mid S \Rightarrow T\} \\ SG(S)=\oplus_{i} SG(w_i)(\cup_{i}w_i=S \land \cap_{i}w_i=\emptyset) \end{ 阅读全文
posted @ 2021-10-09 23:57 nekko 阅读(131) 评论(0) 推荐(0)
摘要: 当且仅当$a_i \ne a_{i-1}$时可行 try {} catch() {}真好用 #include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; while(t --) { int n; cin >> 阅读全文
posted @ 2021-10-09 23:06 nekko 阅读(67) 评论(0) 推荐(0)
摘要: 暴力很容易写,找一下规律,可以发现: 实际上不用找规律,显然$2 \to p$,每个合数肯定是被某个质因子连上去 对于质数$p(>3)$,首先有$2 \to p$的边,之后有$p \to p \cdot (p+2k)$的边,其中$k=0,1,2,3,\cdots$ 最后连上$2 \to \(,其中\ 阅读全文
posted @ 2021-10-09 22:51 nekko 阅读(60) 评论(0) 推荐(0)