![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
codeforces
文章平均质量分 68
杨鹏1234
相信自己,一定会坚持下来的。
展开
-
codeforces 398A
思路:枚举要分的段数,将每段的最大值和段数保留。同时在多个x字符串中插入o使得x分散。同时注意段数的数目。#include#include#includeusing namespace std;typedef __int64 ll;const ll INF=-1999999999;//取到负最大值,否则有些样例过不了ll v,x,ans,a,b,k;ll slove(int c){原创 2014-03-11 12:09:20 · 754 阅读 · 0 评论 -
codeforces 385B
思路:反复只考虑两个字符串即可,同时每次记住前一个bear的位置,减去当前与前一个重复的地方即可#include#include#includeusing namespace std;int main(){ string ch; int i,j; cin>>ch; int len=ch.size(),ans=0,x=0; for(i=0;i<len;i++){ if(ch[i原创 2014-03-14 13:44:44 · 803 阅读 · 0 评论