随笔分类 - 近期cf
摘要:Codeforces Round #740 A. Simply Strange Sort 题意 给一个长度为$n$的数组$A_i$,开始为S = 1,然后每次加1. 当$S$为奇数,\(when\ a_{odd_i} > a_{odd_i + 1}\),交换,即(1,2; 3,4; 5,6)这样。
阅读全文
摘要:Codeforces Round #737 (Div. 2) A. Ezzat and Two Subsequences 题意 你可以将一个序列分成两边,$f(a)$表示序列集合为$a$内所有数的平均值是多少? 然后求最大的$f(a) + f(b)$ 思路 记录最大值和总和即可算最大的。 code
阅读全文
摘要:Codeforces Round #736 (Div. 2) A. Gregor and Cryptography 题意 给出一个p, 让你找到x,y令 \(x%p = y%p\) 思路 签到思维,想一下mod p = 1的情况就行 code : void solve(){ int n; cin >
阅读全文
摘要:#Codeforces Global Round 15 ##A. Subsequence Permutation 签到 思路 字符串排个序,然后匹配就行了 code: const int N = 200100; int st[30]; void solve(){ int n; string str;
阅读全文

浙公网安备 33010602011771号