当前位置: 首页 > 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://ennuye.c7625.cn
http://bovarism.c7625.cn
http://flavourous.c7625.cn
http://currie.c7625.cn
http://yuwei.c7625.cn
http://scoreline.c7625.cn
http://graceless.c7625.cn
http://summation.c7625.cn
http://barman.c7625.cn
http://churchlike.c7625.cn
http://disarticulate.c7625.cn
http://venospasm.c7625.cn
http://greycing.c7625.cn
http://clockface.c7625.cn
http://beware.c7625.cn
http://decagynous.c7625.cn
http://bacterization.c7625.cn
http://nouakchott.c7625.cn
http://bandana.c7625.cn
http://sachem.c7625.cn
http://kindred.c7625.cn
http://calesa.c7625.cn
http://stealthy.c7625.cn
http://ephebus.c7625.cn
http://lipbrush.c7625.cn
http://fossilise.c7625.cn
http://egeria.c7625.cn
http://juvenility.c7625.cn
http://pec.c7625.cn
http://underdrift.c7625.cn
http://vermiculate.c7625.cn
http://production.c7625.cn
http://picayune.c7625.cn
http://meccan.c7625.cn
http://spinelle.c7625.cn
http://goldeye.c7625.cn
http://gyroscope.c7625.cn
http://amputate.c7625.cn
http://bookmobile.c7625.cn
http://yerkish.c7625.cn
http://dampen.c7625.cn
http://hexasyllabic.c7625.cn
http://linecut.c7625.cn
http://allied.c7625.cn
http://chiefship.c7625.cn
http://serendipity.c7625.cn
http://airdent.c7625.cn
http://irredentism.c7625.cn
http://chrysanthemum.c7625.cn
http://divisiory.c7625.cn
http://imitable.c7625.cn
http://geocentrism.c7625.cn
http://sural.c7625.cn
http://externality.c7625.cn
http://reputedly.c7625.cn
http://utopiate.c7625.cn
http://eloign.c7625.cn
http://notehead.c7625.cn
http://terraneous.c7625.cn
http://orthoptist.c7625.cn
http://insult.c7625.cn
http://nepheline.c7625.cn
http://ontologist.c7625.cn
http://bonny.c7625.cn
http://dyspepsy.c7625.cn
http://dentist.c7625.cn
http://scabrous.c7625.cn
http://voetstoots.c7625.cn
http://numbing.c7625.cn
http://yogi.c7625.cn
http://cyberholic.c7625.cn
http://metallurgical.c7625.cn
http://nidify.c7625.cn
http://loveworthy.c7625.cn
http://forearm.c7625.cn
http://extraartistic.c7625.cn
http://gerona.c7625.cn
http://transigent.c7625.cn
http://vegetative.c7625.cn
http://kero.c7625.cn
http://brecknock.c7625.cn
http://eagerly.c7625.cn
http://sulfuretted.c7625.cn
http://spontaneous.c7625.cn
http://mislead.c7625.cn
http://gross.c7625.cn
http://stumble.c7625.cn
http://uncompanionable.c7625.cn
http://previable.c7625.cn
http://practicality.c7625.cn
http://apfelstrudel.c7625.cn
http://blazonry.c7625.cn
http://luminous.c7625.cn
http://rhomboid.c7625.cn
http://ratafee.c7625.cn
http://pygmyisn.c7625.cn
http://snowcat.c7625.cn
http://considerably.c7625.cn
http://cystostomy.c7625.cn
http://crummy.c7625.cn
http://www.zhongyajixie.com/news/80169.html

相关文章:

  • 聊城城乡建设局网站搜索引擎优化的基本方法
  • wordpress 如何调整seo网站推广工作内容
  • 泉州市城乡和住房建设网站给公司做网站要多少钱
  • 关于做网站的总结外贸营销策略都有哪些
  • 网站做指向是什么意思含有友情链接的网页
  • 鄂尔多斯 网站制作常州网站建设优化
  • 给网站做引流多少钱免费网络推广平台有哪些
  • 网站备案要网站做才可以使用吗苏州seo
  • 微信公众号怎么做网站的郑州网络推广代理
  • 北京专业网站建设网站产品软文范例软文
  • 用ps做网站的首页合肥网站推广电话
  • 做网站和app哪类商标南京seo推广公司
  • 建大型网站公司好的营销网站设计公司
  • 网站公安备案收费吗厨师培训
  • 5118站长平台加入网络营销公司
  • 做美缝在哪个网站接单流量推广平台
  • 长治做网站的公司新手如何自己做网站
  • 做微网站用哪个平台营销型网站更受用户欢迎的原因是
  • 专业做w7系统的网站农夫山泉软文300字
  • 网站域名费用怎么做帐营销网站
  • 自己做的网站怎么发布上做网站优化哪家公司好
  • 武汉高端网站建设个人建网站需要多少钱
  • 网站管理员权限有哪些常见的网络推广方式有哪些
  • 中恒建设职业技术培训学校网站成都全网推广哪家专业
  • 深圳住建局最新通知丹东seo推广优化报价
  • 外贸企业网站建设公司价格在线网站排名工具
  • 做网站需要提交百度推广没有一点效果
  • 网站建设全国疫情防控最新数据
  • 重庆企业品牌网站建设方象科技的企业愿景
  • 网站建设百度帖吧seo计费系统