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

湖南建设监理官方网站网站推广的基本方法为

湖南建设监理官方网站,网站推广的基本方法为,广州免费核酸采集点时间,wordpress 二级域名附件传送门 文章目录题意#xff1a;思路#xff1a;题意#xff1a; 给你一个长度为nnn的数组aaa#xff0c;每次操作有两种#xff1a; (1)(1)(1) 给出x,yx,yx,y#xff0c;问aaa中下表在模xxx的时候#xff0c;模数等于yyy的位置aia_iai​之和。 (2)(2)(2) 给出x,yx,yx,…传送门 文章目录题意思路题意 给你一个长度为nnn的数组aaa每次操作有两种 (1)(1)(1) 给出x,yx,yx,y问aaa中下表在模xxx的时候模数等于yyy的位置aia_iai​之和。 (2)(2)(2) 给出x,yx,yx,y代表令axya_xyax​y。 思路 这个题的第一个询问就是从yyy下标开始让后每次递增xxx将经过的位置都算入答案这样的复杂度显然不能接受。 考虑每次递增的xxx如果我们能保证xnx\sqrt nxn​那么递增的次数不会超过nnn\frac{n}{\sqrt n}\sqrt nn​n​n​那么对于x≤nx\le \sqrt nx≤n​的情况我们考虑预处理定义ans[x][y]ans[x][y]ans[x][y]表示在模数为xxx的情况下下标模xxx为yyy的答案这个显然可以nnn\sqrt nnn​预处理。 考虑修改我们只需要枚举n\sqrt nn​的模数让后将他们ansansans的值修改一下即可复杂度n\sqrt nn​。 代码还是很好写的。 复杂度O(mn)O(m\sqrt n)O(mn​) // Problem: P3396 哈希冲突 // Contest: Luogu // URL: https://www.luogu.com.cn/problem/P3396 // Memory Limit: 125 MB // Time Limit: 1000 ms // // Powered by CP Editor (https://cpeditor.org)//#pragma GCC optimize(Ofast,no-stack-protector,unroll-loops,fast-math) //#pragma GCC target(sse,sse2,sse3,ssse3,sse4.1,sse4.2,avx,avx2,popcnt,tunenative) //#pragma GCC optimize(2) #includecstdio #includeiostream #includestring #includecstring #includemap #includecmath #includecctype #includevector #includeset #includequeue #includealgorithm #includesstream #includectime #includecstdlib #includerandom #includecassert #define X first #define Y second #define L (u1) #define R (u1|1) #define pb push_back #define mk make_pair #define Mid ((tr[u].ltr[u].r)1) #define Len(u) (tr[u].r-tr[u].l1) #define random(a,b) ((a)rand()%((b)-(a)1)) #define db puts(---) using namespace std;//void rd_cre() { freopen(d://dp//data.txt,w,stdout); srand(time(NULL)); } //void rd_ac() { freopen(d://dp//data.txt,r,stdin); freopen(d://dp//AC.txt,w,stdout); } //void rd_wa() { freopen(d://dp//data.txt,r,stdin); freopen(d://dp//WA.txt,w,stdout); }typedef long long LL; typedef unsigned long long ULL; typedef pairint,int PII;const int N150010,mod1e97,INF0x3f3f3f3f; const double eps1e-6;int n,m; int val[N],block; LL ans[600][600];int main() { // ios::sync_with_stdio(false); // cin.tie(0);scanf(%d%d,n,m); blocksqrt(n);for(int i1;in;i) scanf(%d,val[i]);for(int i1;in;i) {for(int j1;jblock;j) ans[j][i%j]val[i];}while(m--) {char op[2];int a,b;scanf(%s%d%d,op1,a,b);if(op[1]A) {if(ba) {puts(0);continue;}if(ablock) printf(%lld\n,ans[a][b]);else {LL ans0;for(int ib;in;ia) ansval[i];printf(%lld\n,ans);}} else {for(int i1;iblock;i) {ans[i][a%i]b-val[a];}val[a]b;}}return 0; } /**/
http://www.sadfv.cn/news/161551/

相关文章:

  • 怎样申请网站域名北碚网站建设哪家好
  • 地图类网站开发实战教程高端外贸网站建设
  • 做外单什么网站好建设银行信用卡卡网站
  • 郑州公司网站开发网站地图深度做多少合适
  • 网站怎么做移动图片大全安徽网站建设服务
  • 网站建设费如何会计处理高端网红
  • 烟台高新区网站wordpress my visitors
  • wordpress如何发布文件郑州seo外包顾问热狗
  • 连云港 网站设计在哪些网站做收录比较快
  • 镇江网站建设价格手机网站建设知识
  • 3d在线设计网站网站模板怎么样
  • 网站建设多少钱?中盛腾龙建设工程有限公司网站
  • 网上发布信息的网站怎么做张店网站建设yx718
  • php做电商网站安全性如何知识产权教育网站建设方案
  • 四川 优质高职建设网站沈阳网站制作定制厂家
  • 什么是自主设计网站wordpress安装字体
  • 网站建设ppt课件网站开发与管理心得体会
  • 网站怎么做显得简洁美观怎么提高网站收录
  • 网站怎么添加js广告位网页制作教程 赵丰年
  • 网站外链分析怎么做深圳网站设计按天收费
  • 建站空间通化好的网站建设的公司
  • 做网站广告送报纸广告深圳网站建设制作开发
  • 装修设计那个网站好wordpress如何设水印图片
  • 网站性能需求仙桃seo公司
  • 建设银行的官方网站设计室内效果图设计
  • 郑州哪家公司做网站建立医防融合工作的机制不包括
  • 百度统计网站速度诊断工具网站建设常用软件
  • 云速建站可以建个人网站吗怎么做seo信息优化
  • 域名申请后怎么建网站网络规划与设计师
  • 怎么做网站作业考研培训班哪个机构比较好