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

网站备案登记表怎么做网站导航地图

网站备案登记表,怎么做网站导航地图,网站首页在哪个文件夹,最近有哪些新闻题目描述1 Problem - A - Codeforces 题目分析 对于此题我们要求差值种类最大#xff0c;故我们可以构造出相邻差值分别为1#xff0c;2#xff0c;3...由于n规定了最大的范围故我们增到一定的差值之后其差值必定为之前出现过的数字#xff0c;但由于要保证数组呈递增趋势…题目描述1 Problem - A - Codeforces 题目分析 对于此题我们要求差值种类最大故我们可以构造出相邻差值分别为123...由于n规定了最大的范围故我们增到一定的差值之后其差值必定为之前出现过的数字但由于要保证数组呈递增趋势故可以在(n i - k) 与 (a[i - 1] i - 1)中取到最小的那个以保证可以在范围内。 #includebits/stdc.h using namespace std; const int N 2e5 10; void solve() {int k, n, d, a[N];cin k n;a[1] 1;for(int i 2; i k; i ){a[i] min(n i - k, a[i - 1] i - 1);}for(int i 1; i k; i )cout a[i] ;cout \n; } int main() {ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);int t;cin t;while(t --){solve();}return 0; } 题目描述2 Problem - B - Codeforces 题目分析 #includebits/stdc.h using namespace std; const int N 2e5 10; typedef long long ll; ll n, a[N], prefix[2][N]; void solve() {cin n;for(int i 1; i n; i ){cin a[i];}ll ans 0, cnt1 0;for(int i 1; i n; i ){if(a[i])cnt1 ;else ans cnt1;//逆序对数量 if(a[i] 0)prefix[0][i] prefix[0][i - 1] 1;else prefix[0][i] prefix[0][i - 1];if(a[i] 1)prefix[1][i] prefix[1][i - 1] 1;else prefix[1][i] prefix[1][i - 1];}ll sum ans;for(int i 1; i n; i ){if(a[i])//将1改为0 {ll d prefix[1][i - 1] - (prefix[0][n] - prefix[0][i]);//左1减右0ans max(ans, sum d); }else{ll d (prefix[0][n] - prefix[0][i]) - prefix[1][i - 1];//右0减左1 ans max(ans, sum d);}}cout ans \n; } int main() {ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);int t;cin t;while(t --){solve();}return 0; } 题目描述3 Problem - C - Codeforces 题目分析 对于a和c的相对位置是不会发生变化的其分别可以借助b向右移和左移。 本题确定三点 1.a,c子序列相等 2.所有a仅右移 3.所有c仅左移 #includebits/stdc.h using namespace std; const int N 2e5 10; int n, flag; char s[N], t[N]; void solve() {flag 0;string ss , tt ;cin n;cin s 1 t 1; for(int i 1; i n; i ){if(s[i] ! b)ss s[i];if(t[i] ! b)tt t[i];}if(ss ! tt)flag 1;if(flag){cout NO \n;return;}vectorint sa, sc, ta, tc;for(int i 1; i n; i ){if(s[i] a)sa.push_back(i);if(s[i] c)sc.push_back(i);if(t[i] a)ta.push_back(i);if(t[i] c)tc.push_back(i);}flag 1;for(int i 0; i sa.size() flag; i ){if(sa[i] ta[i])flag 0; }for(int i 0; i sc.size() flag; i ){if(sc[i] tc[i])flag 0;}if(!flag)cout NO \n;else cout YES \n; } int main() {ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);int t;cin t;while(t --){solve();}return 0; }题目描述4 cnt[w] :  在w位的数的个数 #includebits/stdc.h using namespace std; typedef long long ll; const int N 2e5 10; int a[N], cnt[N]; int getpos(int x) {int res 0;while(x)res , x 1;return res; } void solve() {int n;cin n;memset(cnt, 0, sizeof cnt);for(int i 1; i n; i ){cin a[i];}ll ans 0;for(int i 1; i n; i ){int pos getpos(a[i]);ans cnt[pos] ;}cout ans \n; } int main() {int t;cin t;while(t --){solve(); } return 0; } 题目描述5 Problem - E - Codeforces 题目分析  题意为将相加为t的两个数字尽量分在不同的组中如果两个数相加为t的只能放在一组的时候尽量将其平均放置 #includebits/stdc.h using namespace std; void solve() {int n, t, x;cin n t;for(int i 1, j 0; i n; i ){cin x;if((1 t) / 2 x)cout 1 ;else if(t / 2 x) cout 0 ;else cout j , j ^ 1; }cout \n; } int main() {int t;cin t;while(t --){solve();}return 0; }
http://www.zqtcl.cn/news/123766/

相关文章:

  • 韩国网站免费观看网站建设 博客
  • 网站网商wordpress图片生成插件下载
  • seo网站营销推广桂林网站建设内容
  • 乐达淄博网站建设制作html网站开发流程
  • 赤峰网站建设flash教程网站都有哪些
  • 网站建设哪里学成品短视频app源码搭建
  • 网站可以自己做温州制作手机网站
  • 根河企业网站建设房地产如何做网站推广
  • 东莞个人网站建设南宁网站制作公
  • 网站推广seo是什么上海市人力资源网官网
  • 玉溪做网站的公司delphi xe10网站开发
  • 使用vue做的网站有哪些企业门为什么要建设门户网站
  • 上海移动云网站建设在门户网站上爆光怎么做
  • 网站建设开票内容百度浏览器广告怎么投放
  • 深圳公司网站建立小程序商店制作
  • 网站建设知识网犀牛云做网站多少钱
  • 东莞seo优化推广重庆做网络优化公司电话
  • 网站建设的设计思路高校建设网站的特色
  • 宁波网站建设八宝山做网站的公司
  • 哪里有网站建设多少钱网站建设哪家服务态度好
  • 白云区网站开发公司备案不关闭网站的方法
  • 男的做那个视频网站家用电脑可以做网站服务器
  • 网站建设的行业客户烟台市未成年思想道德建设网站
  • 设计个网站要多少钱鼓楼网站开发
  • 东莞外贸网站搭建制作北京app开发制作
  • 优化网站公司外包微信商城怎么开店
  • 网站设计的导航栏怎么做东莞seo网络优化
  • wordpress直接上传视频网站吗做网站软件
  • 电脑维修网站模板下载来个网站吧好人一生平安2021
  • 做公益选哪个网站好网站建设方案多少钱