[CC-MCO16306]Fluffy and Alternating Subsequence 题目大意: 给定一个\(1\sim n(n\le3\times10^5)\)的排列\(a\). 对于一个序列\(b\),如果以下两个条件之一成立,则称\(b_i\)是一个跳跃序列: \(b_{2k}<b_{2k-1}\)对所有的\(2k\le n\)都成立,且\(b_{2k}<b_{2k+1}\)对所有的\(2k+1\le n\)都成立. \(b_{2k}>b_{2k-1}\)对所有的\(2k…
A. Alternative Thinking time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Kevin has just recevied his disappointing results on the USA Identification of Cows Olympiad (USAICO) in the form of…
C. Alternative Thinking Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/604/problem/C Description Kevin has just recevied his disappointing results on the USA Identification of Cows Olympiad (USAICO) in the form of a binary…
Kevin has just recevied his disappointing results on the USA Identification of Cows Olympiad (USAICO) in the form of a binary string of length n. Each character of Kevin's string represents Kevin's score on one of the n questions of the olympiad—'1'…
Kevin has just recevied his disappointing results on the USA Identification of Cows Olympiad (USAICO) in the form of a binary string of length n. Each character of Kevin's string represents Kevin's score on one of the n questions of the olympiad-'1' …
time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Kevin has just recevied his disappointing results on the USA Identification of Cows Olympiad (USAICO) in the form of a binary string of length n…
unrated 选手悠闲做题,然后只做出四个滚蛋了 符合 div3 一贯风格,没啥难算法 E最后就要调出来了,但还是赛后才A的 CF1343A Candies 传送门 找到一个 \(x\),使得存在一个正整数 \(k>1\),满足 \(\sum_{i=0}^{k-1}2^i x=n\) 给定 \(n\) \[\sum_{i=0}^{k-1}2^i x=n\Rightarrow 2^k-1=\frac{n}{x} \] 那么我们只要枚举 \(x\in[1,\sqrt n]\),如果 \(x\mid…
比赛链接:https://codeforces.com/contest/1343 A - Candies 题意 有一数列 x + 2x + 4x + ... + 2k-1x = n,输出 k ≥ 2 时任一满足该等式的一个 x 值. 思路 等比数列求和得 (2k-1) x = n,枚举 k 即可. 代码 #include <bits/stdc++.h> using namespace std; void solve() { int n; cin >> n; for (int i =…
A. Alternative Thinking time limit per test 2 seconds memory limit per test 256 megabytes   Kevin has just recevied his disappointing results on the USA Identification of Cows Olympiad (USAICO) in the form of a binary string of length n. Each charact…
[抄题]: Given a string s, find the longest palindromic subsequence's length in s. You may assume that the maximum length of s is 1000. Example 1:Input: "bbbab" Output: 4 One possible longest palindromic subsequence is "bbbb". [暴力解法]: 时间分…