您当前的位置: 首页 > 

先求一个导

暂无认证

  • 0浏览

    0关注

    291博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

codeforces 784-div4(感觉这个难度有点逆天,呼呼的做水题)

先求一个导 发布时间:2022-05-03 21:32:11 ,浏览量:0

题目

D 题意: 略。 思路: 找规律的题,一开始没发现,写了一个奇奇怪怪的。最后看了题解原来是这样,一段不存在W的区间必须满足B和R都存在,否则肯定不行。我也这么想的,不过写麻烦了。 时间复杂度: O(n) 代码:

// Problem: D. Colorful Stamp
// Contest: Codeforces - Codeforces Round #784 (Div. 4)
// URL: https://codeforces.com/contest/1669/problem/D
// Memory Limit: 256 MB
// Time Limit: 1000 ms
// 
// Powered by CP Editor (https://cpeditor.org)

#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define OldTomato ios::sync_with_stdio(false),cin.tie(nullptr),cout.tie(nullptr)
#define fir(i,a,b) for(int i=a;i>n;
   string s; cin>>s;
   s = "W" + s; s += "W";
   bool ok = 1;
   for(int i=1;i            
关注
打赏
1662037414
查看更多评论
0.0367s