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

WordPress评论加签到seo顾问多少钱

WordPress评论加签到,seo顾问多少钱,工业品公司做商城网站好吗,使用bootstrap做的网站今天第一次打CF,不过鼠鼠被气死了 先说说战况,今天一发没A(赛场上),生活真是无奈,废物女友真是一点用没有 心里也很烦,什么压力都自己扛着。每天想尝试改变什么,又被现实掣肘&…

今天第一次打CF,不过鼠鼠被气死了

先说说战况,今天一发没A(赛场上),生活真是无奈,废物女友真是一点用没有

心里也很烦,什么压力都自己扛着。每天想尝试改变什么,又被现实掣肘,或许抛弃掉所有愿望回炉重造才适合我吧。

题面就不粘贴了,给个图片和链接吧,粘贴效果不好

Problem - A - Codeforces

 输入样例

5
2
8 9
3
1 1 2
4
1 1 4 5
5
2 3 3 3 3
4
100000 100000 100000 100000

输出样例

Yes
Yes
No
No
Yes

这一题怎么分析呢,重点是从等式入手,应该要能看出

b1=b3=b5=...b2n-1

b2=b4=b6=...b2n

这两条信息,这说明给出的数字只能是两种

如果两种数的 数量相差不超过一则可以组成good array

具体的我们创建map<int,int>来存储数据计数和判断种类数

使用最值函数取出极值判断即可

#include<iostream>
#include<map>
#include<algorithm>
#include<queue>
#include<string> 
#include<string.h> 
using namespace std;
#define IOO ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
//const int maxLine=5000+10;
const int maxLine=100+10;
//#define DEBUG true
//int n,m,k;int arr[maxLine];
//调用可以进行重定向 
void initRedict(){#ifdef DEBUGcout<<"执行重定向"<<endl; //重定向输入	freopen("../redict/demo/demo_in.txt","r",stdin); //重定向输出 覆写 
//	freopen("../redict/demo/demo_out.txt","w",stdout); #endif
} 
// 调用可以取消重定向 
void breakEnd(){#ifdef DEBUGfclose(stdin);
//	fclose(stdout); #endif 
}
bool cmp(const pair<int,int>&a,const pair<int,int>&b){return a.second<b.second;
}
int temp;
int main(){
//	initRedict();IOO;int n;cin>>n;map<int,int> mymap;for(int i=0;i<n;i++){int nums;cin>>nums;mymap.clear();for(int j=0;j<nums;j++){cin>>temp;mymap[temp]++;}if (mymap.size()==1) cout<<"Yes";else if (mymap.size()>=3) cout<<"No";else {int minValue=min_element(mymap.begin(),mymap.end(),cmp)->second;int maxValue=max_element(mymap.begin(),mymap.end(),cmp)->second;if (abs(minValue-maxValue)<=1) cout<<"Yes";else cout<<"No";}cout<<endl;} return 0;
} 

我感觉这个代码是逻辑上最简洁的了

下面也贴一下赛场写的假题代码(因为没看出来只会有两种数字才合法这一规律qwq)

#include<iostream>
#include<map>
#include<algorithm>
#include<queue>
#include<string> 
#include<string.h> 
using namespace std;
#define IOO ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
//const int maxLine=5000+10;
const int maxLine=100+10;
//#define DEBUG true
int n,m,k;
// 拖堂的班级的人数 
int normalNums=0;
int arr[maxLine];
//调用可以进行重定向 
void initRedict(){#ifdef DEBUGcout<<"执行重定向"<<endl; //重定向输入	freopen("../redict/demo/demo_in.txt","r",stdin); //重定向输出 覆写 
//	freopen("../redict/demo/demo_out.txt","w",stdout); #endif
} 
// 调用可以取消重定向 
void breakEnd(){#ifdef DEBUGfclose(stdin);
//	fclose(stdout); #endif 
}inline bool check(int arr[maxLine],int len){int initNums=arr[0]+arr[1];for(int i=0;i<len-1;i++){if (arr[i]+arr[i+1]!=initNums){return false;}} return true;
} 
int main(){
//	initRedict();IOO;int n;cin>>n;for(int i=0;i<n;i++){int nums;cin>>nums;memset(arr,sizeof(arr),0);for(int j=0;j<nums;j++){cin>>arr[j];}sort(arr,arr+nums);long long sum=0;do{if (check(arr,nums)){flag=true;break;};sum++;}while(next_permutation(arr,arr+nums));if (flag) cout<<"Yes";else cout<<"No";cout<<endl;} return 0;
} 

全排列狠狠超市,记录一下自己犯蠢写假题写的代码,方便后面回来取笑自己

http://www.hkea.cn/news/535383/

相关文章:

  • 网站建设吉金手指专业13中国营销网站
  • 做销售在哪些网站注册好百度产品
  • dw做汽车网站seo排名工具提升流量
  • 网络培训学校排名奉化seo页面优化外包
  • vps除了做网站还能做什么晨阳seo服务
  • seo网站建设优化什么意思网络营销与直播电商专业就业前景
  • 工程建设企业网站网站关键词优化应该怎么做
  • 修复wordpress青岛网站优化
  • 敦煌网站做外贸怎样网页推广怎么做的
  • 南京网站建设优化今日头条普通版
  • 网站编辑的工作职能有哪些活动营销案例100例
  • 小程序招商加盟平台我是seo关键词
  • wordpress 发帖机镇江抖音seo
  • 网站建设的小结可以发外链的论坛有哪些
  • 网站正常打开速度网店营销与推广策划方案
  • 义乌 网站制作进入百度app
  • 做外围网站赌球红树林seo基础入门免费教程
  • 绿色风格网站seo排名赚钱
  • 南宁企业免费建站百度推广营销怎么做
  • 建立个人网站的成本短视频seo营销系统
  • 深圳公司名称大全网站结构优化的内容和方法
  • 安康市代驾公司上海网站关键词排名优化报价
  • 怎么在网站上建设投票统计在线培训系统app
  • 泰州网站建设哪家好网站seo的主要优化内容
  • 洛卡博网站谁做的seo权重查询
  • 东莞网络科技公司有哪些山东网站seo
  • 网站建设需要学什么网站模板购买
  • 用html做的游戏网站关键词推广效果分析
  • 做影视网站引流正规推广平台有哪些
  • 免费下载简历模板北京seo排名厂家