花费 60ms 找到486908条记录
Codeforces Round #411(A. Fake NP; B. 3-palindrome; C. Find Amir; D.Minimum number of steps) 繁体
2017年05月05 - A. Fake NP 题解:给定一个闭区间的两个端点,试判断在此区间内所有数字的非 公因子出现最多的数字。如果有多个,给出其中一个就可以了。这道题比较讨巧的方法试直接输出 。 B. palindrome 题解:题目要求用由 a , b c 三个字母组成给定长度的字符串,其中不能包含长度超过三的子回文串,同时要保证 c 的使用尽可能少。 本题只需要根据给定长度是否为 的倍数就可以分情况讨论,得出当

Codeforces Round #411 D. Minimum number of steps 繁体
2017年05月05 - 题意 We have a string of letters a and b . We want to perform some operations on it. On each step we choose one of substrings ab in the string and replace it with the string bba . If we have no ab as a

Codeforces Round #411 (Div. 2) D. Minimum number of steps 繁体
2017年05月25 - D. Minimum number of steps time limit per test nbsp second memory limit per test nbsp megabytes nbsp We have a string of letters a and b . We want to perform some operations on it. On each step we ch

Codeforces Round #411 (Div. 2) C. Find Amir 繁体
2017年05月05 - 题目链接:Find Amir 题目大意:给你一个n,城市编号从 到n,然后让你建路,两个点之间建一条路需要的花费是 i j n ,然后叫你去建路,使得总花费最小 题目思路:直接绕着点转圈就好了,比如n等于 的时候,先连 ,然后 ,然后 ,一直连,直到所有的点连完,然后判一下奇偶就可以了 include lt bits stdc .h gt using namespace std typedef

Codeforces Round #411 (Div. 2) C. Find Amir 繁体
2017年05月25 - C. Find Amir time limit per test nbsp second memory limit per test nbsp megabytes nbsp A few years ago Sajjad left his school and register to another one due to security reasons. Now he wishes to fin

Codeforces Round #411(Div. 2)C. Find Amir【思维】 繁体
2017年05月05 - C. Find Amir time limit per test second memory limit per test megabytes input standard input output standard output A few years ago Sajjad left his school and register to another one due to security

【推导】Codeforces Round #411 (Div. 1) B. Minimum number of steps 繁体
2017年05月06 - 最后肯定是bbbb...aaaa...这样。 你每进行一系列替换操作,相当于把一个a移动到右侧。 会增加一些b的数量 然后你统计一下就行。式子很简单。 喵喵喵,我分段统计的,用了等比数列 感觉智障。一个a一个a地统计答案即可。 include lt cstdio gt include lt cstring gt include lt iostream gt using namespace std

Codeforces Round #411 (Div. 2)D. Minimum number of steps(贪心) 繁体
2017年05月05 - 传送门 Description We have a string of letters a and b . We want to perform some operations on it. On each step we choose one of substrings ab in the string and replace it with the string bba . If we hav

Codeforces Round #411(Div. 2)D. Minimum number of steps【思维递推+快速幂】 繁体
2017年05月05 - D. Minimum number of stepstime limit per test secondmemory limit per test megabytesinputstandard inputoutputstandard outputWe have a string of letters a and b . We want to perform some operations on i

CodeForces#411div2 D. Minimum number of steps 繁体
2017年05月05 - D. Minimum number of steps time limit per test second memory limit per test megabytes input standard input output standard output We have a string of letters a and b . We want to perform some operatio


 
粤ICP备14056181号  © 2014-2020 ITdaan.com