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

阳春网站开发网站建设需要缴纳印花税么

阳春网站开发,网站建设需要缴纳印花税么,个人网站建立教程,乌克兰武装部队最新战报CF1303F - Number of Components Solution 思路还是有点妙的。 容易想到并查集#xff0c;但是并查集不容易维护删边#xff0c;怎么办呢#xff1f; 我们考虑拆贡献#xff0c;把加边的贡献和删边的贡献拆开#xff0c;分别维护。 只加边就是四连通加边#xff0c;算…CF1303F - Number of Components Solution 思路还是有点妙的。 容易想到并查集但是并查集不容易维护删边怎么办呢 我们考虑拆贡献把加边的贡献和删边的贡献拆开分别维护。 只加边就是四连通加边算一下新增多少个连通块。 只删边的贡献可以从后往前做变成加边对答案的贡献就是新增连通块个数的相反数因为删边就是加边的逆过程贡献相反。 并查集维护即可。 时间复杂度O(qlog⁡n)O(q\log n)O(qlogn)。 Code #include bits/stdc.husing namespace std;templatetypename T inline bool upmin(T x, T y) { return y x ? x y, 1 : 0; } templatetypename T inline bool upmax(T x, T y) { return x y ? x y, 1 : 0; }#define MP(A,B) make_pair(A,B) #define PB(A) push_back(A) #define SIZE(A) ((int)A.size()) #define LEN(A) ((int)A.length()) #define FOR(i,a,b) for(int i(a);i(b);i) #define fi first #define se secondtypedef long long ll; typedef unsigned long long ull; typedef long double lod; typedef pairint, int PR; typedef vectorint VI; const lod eps 1e-9; const lod pi acos(-1); const int oo 1 30; const ll loo 1ll 60; const int mods 1e9 7; const int inv2 (mods 1) 1; const int MAXN 100005; const int MAXM 2000005; const int INF 0x3f3f3f3f; //1061109567 /*--------------------------------------------------------------------*/namespace FastIO{constexpr int SIZE (1 21) 1;int num 0, f;char ibuf[SIZE], obuf[SIZE], que[65], *iS, *iT, *oS obuf, *oT obuf SIZE - 1, c;#define gc() (iS iT ? (iT ((iS ibuf) fread(ibuf, 1, SIZE, stdin)), (iS iT ? EOF : *iS )) : *iS )inline void flush() {fwrite(obuf, 1, oS - obuf, stdout);oS obuf;}inline void putc(char c) {*oS c;if (oS oT) flush();}inline void getc(char c) {for (c gc(); !isdigit(c) c ! EOF; c gc());}inline void reads(char *st) {char c;int n 0;getc(st[ n]);for (c gc(); isdigit(c) ; c gc()) st[ n] c;st[n 1] \0;}templateclass Iinline void read(I x) {for (f 1, c gc(); c 0 || c 9 ; c gc()) if (c -) f -1;for (x 0; c 0 c 9 ; c gc()) x (x 3) (x 1) (c 15);x * f;}templateclass Iinline void print(I x) {if (x 0) putc(-), x -x;if (!x) putc(0);while (x) que[ num] x % 10 48, x / 10;while (num) putc(que[num --]);}struct Flusher_{~Flusher_(){flush();}} io_Flusher_; } using FastIO :: read; using FastIO :: putc; using FastIO :: reads; using FastIO :: print;vectorPR A[MAXM], _A[MAXM]; int dx[4] {0, 0, -1, 1}; int dy[4] {1, -1, 0, 0}; int f[MAXN], col[305][305], Ans[MAXM], _Ans[MAXM], n, m, Case; int getid(int x, int y) { return (x - 1) * m y; } int find(int x) { return f[x] x ? f[x] : f[x] find(f[x]); } void solve(vectorPR A, int opt) {for (auto v : A) f[v.fi] v.fi;for (auto v : A) {int x (v.fi - 1) / m 1, y (v.fi - 1) % m 1, t 1;col[x][y] 1;for (int i 0; i 4 ; i) {int _x x dx[i], _y y dy[i], p getid(_x, _y);if (_x 1 || _y 1 || _x n || _y m || col[x][y] ! col[_x][_y] || find(p) find(v.fi)) continue; f[find(p)] find(v.fi);-- t;}if (opt 1) Ans[v.se] t;else Ans[v.se] - t;} for (auto v : A) col[(v.fi - 1) / m 1][(v.fi - 1) % m 1] 0; } signed main() { #ifndef ONLINE_JUDGEfreopen(a.in, r, stdin); #endifread(n), read(m), read(Case);int MX max(1000, 2000000 / n / m 1);for (int i 1; i n * m ; i) A[0].PB(MP(i, 0));for (int i 1; i Case ; i) {int x, y, z;read(x), read(y), read(z);_A[col[x][y]].PB(MP(getid(x, y), i));col[x][y] z;A[col[x][y]].PB(MP(getid(x, y), i)); }for (int i 1; i n * m ; i) _A[col[(i - 1) / m 1][(i - 1) % m 1]].PB(MP(i, Case 1));for (int i 0; i MX ; i) reverse(_A[i].begin(), _A[i].end());for (int i 0; i MX ; i) solve(A[i], 1);for (int i 0; i MX ; i) solve(_A[i], -1);for (int i 1; i Case ; i) Ans[i] Ans[i - 1];for (int i 1; i Case; i) print(Ans[i]), putc(\n);return 0; }
http://www.zqtcl.cn/news/267366/

相关文章:

  • 做网站友情链接的步骤wordpress文库主题
  • 网站模板用什么软件做泉州网站建设轩奇网讯
  • 网站开发必备人员网页设计图片居中代码
  • 网站列表页怎么做的百度seo优
  • 做网站销售好不好企业seo培训
  • 网站制作排版越南网站建设
  • 满城建设局网站我要买房网
  • 长沙百度提升排名南宁网站seo公司
  • 凡科网做网站怎样东莞寮步汽车城
  • 做百度网站费用多少基于html5的移动端网站开发
  • 专业做网站设计哪家好大型网站技术方案
  • 海外医疗兼职网站建设wordpress 最受欢迎主题
  • 网站改版方案案例入门级网页设计培训学员
  • 安徽优化网站运营平台
  • 小型企业网站设计教程面备案网站建设
  • 重庆业务外包网站建设办公室装修一般多少钱一个平方
  • 网站查询域名ip解析手机短视频网站的建设
  • 甘肃机械化建设工程有限公司网站微小店网站建设价格
  • 个人空间网站建设报告网络游戏交易平台
  • 深圳医疗网站建设中小企业网站功能
  • 汕头集团做网站方案建设网站要买空间吗
  • 宁波搭建网站专业展馆展厅设计公司深圳
  • 山东省建设工程电子信息网站广州开发区第一小学
  • 网站建设推广重要性河北高端网站建设
  • 网站的seo方案怎么做wordpress自动转内链
  • 番禺手机网站制作推广wordpress远程数据库
  • 企业网站seo外包 s深圳国内设计网站
  • 临海高端营销型网站建设地址免费网站alexa排名查询
  • 做企业网站的轻量级cms建设电子商务网站流程图
  • 淘宝网站设计分析国内在线免费服务器