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

海丰县建设局官方网站东莞招聘信息

海丰县建设局官方网站,东莞招聘信息,域名网站建设流程,浙江省建设执业注册中心网站A - Spread 输入字符串#xff0c;字符之间加上空格输出 B - Next 输出数组当中第二大的数 C - Count xxx 统计每个字符出现过的最长长度#xff0c;再累加即可 #includebits/stdc.h #pragma GCC optimize(Ofast) #define INF 0x3f3f3f3f #define I…A - Spread 输入字符串字符之间加上空格输出 B - Next 输出数组当中第二大的数 C - Count xxx 统计每个字符出现过的最长长度再累加即可 #includebits/stdc.h #pragma GCC optimize(Ofast) #define INF 0x3f3f3f3f #define IOS ios::sync_with_stdio(false);cin.tie(0); #define int long long #define pb push_back #define vct vector #define checkbit __builtin_popcount #define gcd __gcd #define use int T;cinT;while(T--) #define LEN length() #define all(a) a.begin(),a.end() templateclass T bool mmax(T u, T v) { return u v ? (u v, 1) : 0; } templateclass T bool mmin(T u, T v) { return u v ? (u v, 1) : 0; } #define lowbit(x) (x(-x)) #define yes coutYESendl #define no coutNOendl using namespace std; typedef pairint,intpii; signed main() {IOS int n;cinn; string a; cina; vctintcnt(35,0); vctintmas(35,0); if(cnt[a[0]-a]0){cnt[a[0]-a];mmax(mas[a[0]-a],cnt[a[0]-a]);} for(int i1;in;i){if(cnt[a[i]-a]0){cnt[a[i]-a];mmax(mas[a[i]-a],cnt[a[i]-a]);}if(a[i]a[i-1]){cnt[a[i]-a];}else {mmax(mas[a[i-1]-a],cnt[a[i-1]-a]);cnt[a[i-1]-a]0;} }int ans0; mmax(mas[a[n-1]-a],cnt[a[n-1]-a]); for(int i0;i35;i){ansmas[i]; } coutansendl;return 0; } D - Election Quick Report 给定数组每次第次的票加一每次都输出最多票的人, 我们用记录当前最大票数的人在第次投票时答案只有和两个人每次视情况输出并且更新的值即可. #includebits/stdc.h #pragma GCC optimize(Ofast) #define INF 0x3f3f3f3f #define IOS ios::sync_with_stdio(false);cin.tie(0); #define int long long #define pb push_back #define vct vector #define checkbit __builtin_popcount #define gcd __gcd #define use int T;cinT;while(T--) #define LEN length() #define all(a) a.begin(),a.end() templateclass T bool mmax(T u, T v) { return u v ? (u v, 1) : 0; } templateclass T bool mmin(T u, T v) { return u v ? (u v, 1) : 0; } #define lowbit(x) (x(-x)) #define yes coutYESendl #define no coutNOendl using namespace std; typedef pairint,intpii; bool cmp(int a,int b){return ab; } signed main() {IOS int n,m;cinnm; vctinta(m1); vctintcnt(n1);cina[1]; int masa[1];couta[1]endl; cnt[a[1]]; for(int i2;im;i){cina[i];cnt[a[i]];if(a[i]!mas){if(cnt[a[i]]cnt[mas]){masa[i];printf(%lld\n,mas);}else if(cnt[a[i]]cnt[mas]a[i]mas){masa[i];printf(%lld\n,mas);}else {printf(%lld\n,mas);}}else{printf(%lld\n,mas);}}return 0; } E - Stamp 给一张空白的纸一个印章,问是否可以印成的样子(印章每次会覆盖重复的部分)  利用BFS搜索 #includebits/stdc.h #pragma GCC optimize(Ofast) #define INF 0x3f3f3f3f #define IOS ios::sync_with_stdio(false);cin.tie(0); #define int long long #define pb push_back #define vct vector #define checkbit __builtin_popcount #define gcd __gcd #define use int T;cinT;while(T--) #define LEN length() #define all(a) a.begin(),a.end() templateclass T bool mmax(T u, T v) { return u v ? (u v, 1) : 0; } templateclass T bool mmin(T u, T v) { return u v ? (u v, 1) : 0; } #define lowbit(x) (x(-x)) #define yes coutYESendl #define no coutNOendl using namespace std; typedef pairint,intpii; const int N 2e57; signed main() {IOSint n,m;cinnm;string s,t;cinst;vctboolst(N);queueint q;for(int i0;im-1n;i){bool flag1;for(int j0;jm;j){if(s[ij]!t[j])flag0;}if(flag)q.push(i),st[i]1;}while(!q.empty()){int uq.front();q.pop();for(int j0;jm;j)s[uj]#;for(int imax(u-m1,0*1ll);ium-1im-1n;i){if(!st[i]){int flag1;for(int j0;jm;j){if(s[ij]!#s[ij]!t[j])flag0;}if(flag)q.push(i),st[i]1;}}}bool isok1;for(int i0;in;i){if(s[i]!#)isok0;}if(isok)coutYesendl;else coutNoendl;return 0; } F - Colored Ball 每次操作将a位置当中的元素放到b位置因为是颜色故用set集合 如果按照题目的要求直接写不加优化的话亲测TLE 故当a当中的元素多于b的时候交换a,b当中的元素再插入a,效果相同这样可以达到最优效果 #includebits/stdc.h #pragma GCC optimize(Ofast) #define INF 0x3f3f3f3f #define IOS ios::sync_with_stdio(false);cin.tie(0); #define int long long #define pb push_back #define vct vector #define checkbit __builtin_popcount #define gcd __gcd #define use int T;cinT;while(T--) #define LEN length() #define all(a) a.begin(),a.end() templateclass T bool mmax(T u, T v) { return u v ? (u v, 1) : 0; } templateclass T bool mmin(T u, T v) { return u v ? (u v, 1) : 0; } #define lowbit(x) (x(-x)) #define yes coutYESendl #define no coutNOendl using namespace std; typedef pairint,intpii; const int N 2e57; signed main() {IOSint n,q;cinnq;int x;setinttot[n1];for(int i1;in;i){cinx;tot[i].insert(x);}while(q--){int a,b;cinab;if(tot[a].size()tot[b].size())swap(tot[a],tot[b]);for(auto z:tot[a]){tot[b].insert(z);}tot[a].clear();couttot[b].size()\n;}return 0; }
http://www.dnsts.com.cn/news/233592.html

相关文章:

  • 网站制作上哪学校美图在线图片编辑器
  • 如何设置网站公司动态网站建设网站营销
  • 工信部网站黑名单查询没网站域名可以做备案吗
  • 做推文封面的网站有用模板网在线制作免费网站
  • 做网站需要提供些什么页面html电影网站模板下载
  • 那个外贸网站做的最好网站建设开发能力很强的企业
  • 怎样免费建设个人网站以下哪个单词表示搜索引擎优化
  • 建设银行在网站上开通短信提醒做网站需要用什么系统
  • 网站做虚假宣传有没有做处罚移动网站建设作业
  • 网站制作的主要技术北京的网站设计公司
  • 企业为什么需要手机网站系统开发工程师是干什么的
  • 网站用户告知书广东网站建设智搜宝
  • 做网站的软件著作权学校文化建设的网站
  • 新网站建设需要注意wordpress输入xml
  • 创建网站要申请域名吗如何在网站添加代码
  • 网站建设技术开发不付费免费网站
  • 桂林广告公司网站建设网站开发厦门
  • 查网站是否正规wordpress段子主题
  • 网站建设基本要求百度推广 帮做网站吗
  • 电子商务网站业务流程别人用我公司权限做网站
  • 深圳入户申请网站官网机械加工网站模板
  • 网站建设技术外包golang 网站开发 教程
  • 做网站服务器电脑配置安徽省城乡建设厅网站
  • 温州产品推广网站做设计不进设计公司网站
  • 网站开发案例php企业形象设计的意义
  • 手机 网站 翻页 外部教您如何找专业网站制作公司
  • 西安百度网站快速排名网站建设品牌好
  • 列举电子商务网站建设需要的语言织梦源码哪个网站好
  • 建立什么本地网站赚钱腾讯广告联盟
  • 长业建设网站上海网站建设网页制