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

网站设计制作公司需要什么资质江苏省工程建设标准定额网站

网站设计制作公司需要什么资质,江苏省工程建设标准定额网站,风中有朵雨做的云电影网站,太原最新新闻消息http://acm.whu.edu.cn/land/problem/detail?problem_id1470 大概是给你一个队列,每次移动队头的数到队尾并减1,如果本身这个数为1就删去. 然后ans 这个数 * (队列长度-1),求最小的ans 只要最小的元素最先删除就能保证结果最小 解法: 先对原数列排序 然后模拟原操作 ...但是…http://acm.whu.edu.cn/land/problem/detail?problem_id1470 大概是给你一个队列,每次移动队头的数到队尾并减1,如果本身这个数为1就删去. 然后ans  这个数 * (队列长度-1),求最小的ans 只要最小的元素最先删除就能保证结果最小 解法:  先对原数列排序 然后模拟原操作 ...但是t[i] 太大 .显然不能一个个的模拟...其实稍微推一下就能得出 每次到达能删除元素的时候 整个队列循环了t[i]-1次... 我们维护一下后缀和suffix...就能得到这个公式:  前面等差数列,后面等差数列O(1)就能求出 总共n个数,总共O(n) Notice : 等差数列里面/2不能随意取模,我们要对2求1e97的逆元再取模 过程举例: 2 3 4 5 6 第一轮:  2 3 4 5 6    to  1 2 3 4 5 第二轮: 2 3 4 5    to 1 2 3 4 第三轮:  2 3 4      to 1 2 3 第四轮: 2 3       to 2 第五轮: 2 (结果懒得写了...自己可以拍一下)   /********************* Template ************************/ #include set #include map #include list #include cmath #include ctime #include deque #include queue #include stack #include bitset #include cstdio #include string #include vector #include cassert #include cstdlib #include cstring #include sstream #include fstream #include numeric #include iomanip #include iostream #include algorithm #include functional using namespace std;#define EPS 1e-8 #define MAXN 100005 #define MOD ((int)1e97) #define PI acos(-1.0) #define DINF (1e10) #define LINF ((1LL)50) #define INF (0x3f3f3f3f) #define max(a,b) ((a) (b) ? (a) : (b)) #define min(a,b) ((a) (b) ? (a) : (b)) #define max3(a,b,c) (max(max(a,b),c)) #define min3(a,b,c) (min(min(a,b),c)) #define BUG coutBUG! endl #define line cout--------------endl #define L(t) (t 1) #define R(t) (t 1 | 1) #define Mid(a,b) ((a b) 1) #define lowbit(a) (a -a) #define FIN freopen(in.txt,r,stdin) #define FOUT freopen(out.txt,w,stdout) #pragma comment (linker,/STACK:102400000,102400000)typedef long long LL; typedef unsigned long long ULL; // typedef __int64 LL; // typedef unisigned __int64 ULL; // LL gcd(LL a,LL b){ return b?gcd(b,a%b):a; } // LL lcm(LL a,LL b){ return a*b/gcd(a,b); }/********************* F ************************/ LL suf; LL a[MAXN]; LL r2 (1000000007)/21; int main() {int T;scanf(%d,T);int cas 1;for(int cas 1; cas T; cas){suf 0;int n,num;scanf(%d,n);num n-1;for(int i 0 ; i n ; i)scanf(%lld,a[i]);sort(a,an);for(int i 1 ; i n ; i){suf a[i];}LL res 0;LL ct 0;for(int i 0 ; i n-1 ; i){a[i] a[i] - ct;res (res ((a[i]1)%MOD*a[i]%MOD*r2%MOD*num%MOD))%MOD;int cnt a[i] - 1;if(cnt 0){LL sum (suf (suf - (cnt-1) * num)) % MOD * cnt % MOD * r2 % MOD;res (res (sum*num)%MOD) % MOD;}suf - (num * cnt);suf suf - ((a[i1]-ct) - cnt);num--;ct cnt;}printf(Case %d: ,cas);printf(%lld\n,res);}return 0; }        转载于:https://www.cnblogs.com/Felix-F/p/3279689.html
http://wiki.neutronadmin.com/news/31135/

相关文章:

  • 镇海网站建设建设田达摩托车官方网站
  • 网站没完成可以备案么广告设计就业好找吗
  • 网站建设市场占有率望野诗
  • 在哪个网站可以学做淘宝详情那些网站可以上传自己做的视频
  • 响应式网站开发视频遂宁移动端网站建设
  • 中国建设银行网上银行网站开发网站排名优化
  • 网站不备案不能用吗国家建设部网站倪虹
  • 网站术语asp网站源码使用
  • 彩票网站可以做哪些活动手机视频网站建站
  • 互联网营销常用网站做擦边球视频网站
  • 沧州最新消息上海SEO网站优化推广公司
  • 网站平台建立学校网站建设目的
  • 做网站的ui免费网站建站有哪些
  • h5网站建设图标宁波企业网站设计
  • win7 iis asp网站配置文件萍乡手机网站建设
  • 网站建设与管理试题及答案1m带宽做网站快不
  • ICP备案域名网站wordpress插件tag
  • 怎样改网站英文域名html代码 wordpress
  • 徐州网站建设开发网站方案设计与论证
  • 网站建设需不需要招标高安网站建设公司
  • 网站开发者兼容模式出错文章网站模板哪个好
  • 从0开始做网站本地拖拽网站建设
  • 论坛网站开发成本室内设计师资格证书
  • 国内空间没备案可以打开网站吗展厅公司
  • 相城做网站的公司最新百度关键词排名
  • it教育网站建设如何修改wordpress站
  • 小程序是什么原理成都搜狗seo
  • 设计师网站兼职长沙网站制作公司
  • 云南建设人力资源网站南京网站建设服务
  • 网站黑色代码安徽省住房和建设执业资格注册中心网站