Atcoder-ARC

Atcoder-ARC165F-Make Adjacent

ARC 165 - F - Make Adjacent Statement 给定一个长度为 \(2n\) 的数列 \(a\) ,其中对于每个数 \(i \in [1,n]\),恰好在 \(a\) 中出现两次。每次可以将两个相邻的数交换。最后要求 \(\forall i \in [1,n] : a_{ ......
Atcoder-ARC Adjacent Atcoder F-Make Make

【杂题乱写】AtCoder-ARC116

AtCoder-ARC116_C Multiple Sequences 朴素 DP 是设 \(f_{i,j}\) 表示第 \(i\) 个位置填 \(j\) 的方案数,时间复杂度 \(O(n^2\log V)\)。 考虑求出元素都不同序列个数,再根据长度乘组合数,这样长度是 \(O(\log V)\) ......
AtCoder-ARC AtCoder ARC 116

【杂题乱写】AtCoder-ARC115

AtCoder-ARC115_F Migration * 把问题转化成在某个限制 \(mid\) 下求初始局面和最终局面能到达的最小代价局面,如果相等则说明可达。 比较局面的方式是比较权值,如果相等按字典序比较。 对每个节点 \(u\) 求出权值比 \(u\) 小或权值与 \(u\) 相等且编号比 ......
AtCoder-ARC AtCoder ARC 115

【杂题乱写】AtCoder-ARC114

AtCoder-ARC114_A Not coprime \(50\) 内的质数只有 \(15\) 个,可能的答案也就只有 \(2^{15}\) 个,直接枚举。 提交记录:Submission - AtCoder AtCoder-ARC114_B Special Subsets 就是 \(i\) 与 ......
AtCoder-ARC AtCoder ARC 114

【题解】AtCoder-ARC167

AtCoder-ARC167A Toasts for Breakfast Party 一定不会有空盘,问题转化成 \(2m\) 个数,其中 \(2m-n\) 个是 \(0\),这样一定是最大值和最小值一起,次大值和次小值一起,以此类推。 提交记录:Submission - AtCoder AtCod ......
题解 AtCoder-ARC AtCoder ARC 167

【杂题乱写】AtCoder-ARC113

AtCoder-ARC113A A*B*C 枚举 \(A,B\),那么 \(C\in [1,\left\lfloor\frac{K}{AB}\right\rfloor]\),时间复杂度是 \(O(K\log K)\)。 提交记录:Submission - AtCoder AtCoder-ARC113 ......
AtCoder-ARC AtCoder ARC 113

【杂题乱写】AtCoder-ARC112

AtCoder-ARC112A B=C 在 \(C\) 处计算答案,有: \[ans=\sum_{C=L}^{R-L} (R-L+1)-C=\dfrac{(R-2L+1)(R-2L+2)}{2} \]提交记录:Submission - AtCoder AtCoder-ARC112B -- - B 操 ......
AtCoder-ARC AtCoder ARC 112

AtCoder-ARC073_A Sentou

Sentou 【题意】: 有一个开关,当按下开关后的 T 秒内会一直放水,当在放水状态时,如果有人再次按下开关,那么停止放水,并从按下的那一刻起的 T 秒会再次一直放水,给出 n 个人按压开关的时间,问总共流出多少水 【思路】: 简单模拟 #include <bits/stdc++.h> using ......
AtCoder-ARC AtCoder Sentou ARC 073
共8篇  :1/1页 首页上一页1下一页尾页