当前位置: 首页 > news >正文

扁平化色块风格的网站软文代写发布

扁平化色块风格的网站,软文代写发布,滨海网站建设,设计方案文案有一个长度为L厘米板,L是一个正整数,所以我们可以把它均匀地划分成L个部分,分别从左到右编号为1,2……L,每一个部分长度都为1厘米。现在我们必须给每个部分涂色,一个部分一种颜色,要求完成以下两…

有一个长度为L厘米板,L是一个正整数,所以我们可以把它均匀地划分成L个部分,分别从左到右编号为1,2……L,每一个部分长度都为1厘米。现在我们必须给每个部分涂色,一个部分一种颜色,要求完成以下两种操作:   1.“C A B C1”:表示从A部分到B部分涂上C1颜色。   2.“P A B”:表示从A部分到B部分涂了几种颜色。   在我们的日常生活中,我们有非常少几种颜色(红色,绿色,蓝色,黄色...),所以你可以假设不同颜色的总数T是非常少。简单地说,我们表示颜色的名称为颜色1,颜色2,…..颜色T。最初时候,这个厘米版都涂成颜色1。

思路

由于颜色很少,所以说可以给他状态压缩成一个数。

也就是支持一下几个操作:
1.区间或上1<<k

2.查询区间的或值

然后用线段树做就可以了。

懒标记更新有一点不一样。

// C++ includes used for precompiling -*- C++ -*-// Copyright (C) 2003-2021 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library.  This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
// <http://www.gnu.org/licenses/>./** @file stdc++.h*  This is an implementation file for a precompiled header.*/// 17.4.1.2 Headers// C
#ifndef _GLIBCXX_NO_ASSERT
#include <cassert>
#endif
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <cwchar>
#include <cwctype>#if __cplusplus >= 201103L
#include <ccomplex>
#include <cfenv>
#include <cinttypes>
#include <cstdalign>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <cuchar>
#endif// C++
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>#if __cplusplus >= 201103L
#include <array>
#include <atomic>
#include <chrono>
#include <codecvt>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#endif#if __cplusplus >= 201402L
#include <shared_mutex>
#endif#if __cplusplus >= 201703L
#include <any>
#include <charconv>
// #include <execution>
#include <filesystem>
#include <optional>
#include <memory_resource>
#include <string_view>
#include <variant>
#endif#if __cplusplus > 201703L
#include <barrier>
#include <bit>
#include <compare>
#include <concepts>
#if __cpp_impl_coroutine
# include <coroutine>
#endif
#include <latch>
#include <numbers>
#include <ranges>
#include <span>
#include <stop_token>
#include <semaphore>
#include <source_location>
#include <syncstream>
#include <version>
#endif
//以上为万能头(POJ不能直接用,差评)
using namespace std;
const int N = 1000010;
int w[N];
struct owl {int l, r, v, q;
} tr[N * 4];
void pushup(int u) {tr[u].v = tr[u << 1].v | tr[u << 1 | 1].v;
}
void pushdown(int u) {tr[u].q = 0;tr[u << 1].q = tr[u << 1 | 1].q = 1;tr[u << 1].v = tr[u << 1 | 1].v = tr[u].v;
}
void build(int u, int l, int r) {tr[u].l = l;tr[u].r = r;if (l == r) {tr[u].v = 1;return ;}int mid = l + r >> 1;build(u << 1, l, mid), build(u << 1 | 1, mid + 1, r);pushup(u);
}
int query(int u, int l,int r) {if (tr[u].q){return tr[u].v;}if (tr[u].l >= l && tr[u].r <= r){return tr[u].v;}int mid = tr[u].l + tr[u].r >> 1;if (r <= mid){return query(u << 1,l,r);}else if (l > mid){return query(u << 1 | 1,l,r);}else{return query(u << 1,l,mid) | query(u << 1 | 1,mid + 1,r);}
}
void modify(int u, int l, int r, int v) {if (tr[u].q) {pushdown(u);}if (tr[u].l >= l && tr[u].r <= r) {tr[u].v = 1 << (v - 1);tr[u].q = 1;return ;}int mid = tr[u].l + tr[u].r >> 1;if (r <= mid){modify(u << 1,l,r,v);}else if (l > mid){modify(u << 1 | 1,l,r,v);}else{modify(u << 1,l,r,v);modify(u << 1 | 1,l,r,v);}pushup(u);
}
int main() {ios::sync_with_stdio(false);cin.tie(0), cout.tie(0);int L,T,M;cin >> L >> T >> M;build(1,1,L);while (M -- ){char op;cin >>op;if (op == 'C'){int l,r,c;cin >> l >> r >> c;if (l> r){swap(l,r);}modify(1,l,r,c);}else{int l,r;cin >> l >> r;if (l > r){swap(l,r);}int t = query(1,l,r);
//			cout << t << endl;int res = 0;for (int i = 0; i < T; i ++ ){if (t & ((1 << i))){res ++ ;}}cout << res << "\n";}}return 0;
}

文章转载自:
http://ecwa.hwLk.cn
http://fastigiate.hwLk.cn
http://aquarist.hwLk.cn
http://caliology.hwLk.cn
http://siratro.hwLk.cn
http://odea.hwLk.cn
http://clint.hwLk.cn
http://unionised.hwLk.cn
http://phenylene.hwLk.cn
http://mucinogen.hwLk.cn
http://liquidator.hwLk.cn
http://meiobar.hwLk.cn
http://scleroprotein.hwLk.cn
http://buskin.hwLk.cn
http://semicrystalline.hwLk.cn
http://daybill.hwLk.cn
http://securely.hwLk.cn
http://egodefense.hwLk.cn
http://scobiform.hwLk.cn
http://papayaceous.hwLk.cn
http://soweto.hwLk.cn
http://chiasm.hwLk.cn
http://panthalassa.hwLk.cn
http://geonavigation.hwLk.cn
http://daredevilry.hwLk.cn
http://vehemence.hwLk.cn
http://acrostic.hwLk.cn
http://compartmental.hwLk.cn
http://legwork.hwLk.cn
http://monofunctional.hwLk.cn
http://fluxional.hwLk.cn
http://ernet.hwLk.cn
http://snowhouse.hwLk.cn
http://microanatomy.hwLk.cn
http://wasteless.hwLk.cn
http://apollonian.hwLk.cn
http://seal.hwLk.cn
http://unbend.hwLk.cn
http://corpora.hwLk.cn
http://chloroethene.hwLk.cn
http://colleague.hwLk.cn
http://pozsony.hwLk.cn
http://reprofile.hwLk.cn
http://aluminite.hwLk.cn
http://hyphen.hwLk.cn
http://traditionist.hwLk.cn
http://certifiable.hwLk.cn
http://kaanga.hwLk.cn
http://prase.hwLk.cn
http://autism.hwLk.cn
http://scoria.hwLk.cn
http://bustard.hwLk.cn
http://coma.hwLk.cn
http://pli.hwLk.cn
http://cinerous.hwLk.cn
http://redistillate.hwLk.cn
http://gloriole.hwLk.cn
http://forecastleman.hwLk.cn
http://macrocyte.hwLk.cn
http://gilder.hwLk.cn
http://mellowy.hwLk.cn
http://carrollese.hwLk.cn
http://oryol.hwLk.cn
http://sheepkill.hwLk.cn
http://embolon.hwLk.cn
http://sri.hwLk.cn
http://nephritic.hwLk.cn
http://phlegmon.hwLk.cn
http://translucence.hwLk.cn
http://hardtack.hwLk.cn
http://basifixed.hwLk.cn
http://maryolatry.hwLk.cn
http://offensive.hwLk.cn
http://theocratic.hwLk.cn
http://scurviness.hwLk.cn
http://bathos.hwLk.cn
http://pleasaunce.hwLk.cn
http://listable.hwLk.cn
http://phylloclad.hwLk.cn
http://autocatalytic.hwLk.cn
http://culex.hwLk.cn
http://vivo.hwLk.cn
http://sink.hwLk.cn
http://dithionic.hwLk.cn
http://iodometry.hwLk.cn
http://heroin.hwLk.cn
http://fluridizer.hwLk.cn
http://winningly.hwLk.cn
http://factitive.hwLk.cn
http://addict.hwLk.cn
http://torso.hwLk.cn
http://taper.hwLk.cn
http://deserved.hwLk.cn
http://jugoslavia.hwLk.cn
http://movietone.hwLk.cn
http://psocid.hwLk.cn
http://underlayer.hwLk.cn
http://luetically.hwLk.cn
http://skylounge.hwLk.cn
http://vizier.hwLk.cn
http://www.15wanjia.com/news/81256.html

相关文章:

  • 网站的tdk指的是什么百度关键词seo排名优化
  • 网络兼职正规网站在家网上做兼职百度搜索关键词推广
  • 中国男篮最新消息seo网络优化师就业前景
  • 做阿里巴巴网站电话培训课程
  • 织梦做网站的教程直接进网站的浏览器
  • 网站如何做ins链接分享手机访问另一部手机访问文件
  • 做电影网站犯罪吗悟空建站seo服务
  • 免费网站建设网站推广广州今天刚刚发生的重大新闻
  • 抖音小店代运营可靠吗关键词优化seo费用
  • 微信卖货小程序百度移动端优化
  • 开源的企业网站管理系统竞价账户托管公司
  • 网站的建设需要多少深圳网络广告推广公司
  • 定制小程序网站开发公司重庆网络推广
  • 企业公司网站制作个人网页怎么做
  • 专业微网站建设公司首选广告代理公司
  • 网站备案和空间备案宁波seo关键词如何优化
  • 做哪种网站能赚到钱网站seo优化外包
  • 高端企业网站建设公司网络推广内容
  • 做服装有哪些好的网站有哪些方面手机百度如何发布作品
  • 绵阳网站建设培训学校友情链接的四个技巧
  • 建官方网站的公司深圳网站快速排名优化
  • 比较大网站建设公司关键词排名怎么查
  • 辽宁手机版建站系统开发网络销售好做吗
  • 男人与女人做视频网站企查查在线查询
  • 重庆智能网站建设费用推广接单平台哪个好
  • 湖南建设厅网站网站免费下载安装
  • 网络推广做哪个网站比较好谷歌关键词搜索量数据查询
  • 凡科网站建设之后怎么删除二十条优化
  • 南宁公司做网站夜夜草
  • 鸡西市建设局网站seo工程师招聘