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

电商网站 appsem代运营托管公司

电商网站 app,sem代运营托管公司,wordpress 作者照片,p2p网站建设源码VP时间 A. 关键在于按c的按钮 c&1 Alice可以多按一次c按钮 也就是a多一个(a) 之后比较a,b大小即可 !(c&1) Alice Bob操作c按钮次数一样 1.ac B.贪心 一开始会吃饼干 如果有卖饼的就吃 如果隔离一段时间到d没吃就吃(当时…

VP时间

A.

关键在于按c的按钮

c&1

Alice可以多按一次c按钮

也就是a多一个(a++)

之后比较a,b大小即可

!(c&1)

Alice Bob操作c按钮次数一样

1.ac

B.贪心

一开始会吃饼干

如果有卖饼的就吃

如果隔离一段时间到d没吃就吃(当时间快到的时候卖一次饼)

n是长度

枚举一遍卖饼的位置

不移除

吃饼量=((s[i]-s[i-1]-1)/d)求和

s[i]到s[i-1]之间的距离(s[i-1],s[i])不到s[i]因此要-1

枚举一遍卖饼的位置

还有特判(s[0]=1-d,s[m+1]=n+1),-d+1(到1就吃一口饼),n+1(到n可能会吃一口饼)

res-=(s[i]-s[i-1]-1)/d;

res-=(s[i+1]-s[i]-1)/d;

res+=(s[i+1]-s[i-1])/d;

res+=m-1;

计算出res

ans=min(ans,res)

if(ans==res)cnt++;

C.

gcd最大的数是n/2

gcd(a[i],a[i+1])

i,2*i放一起为最优解

i 枚举奇数

1.ac

题解

A.

// Problem: A. Buttons
// Contest: Codeforces - Codeforces Round 893 (Div. 2)
// URL: https://codeforces.com/contest/1858/problem/A
// Memory Limit: 256 MB
// Time Limit: 1000 ms
// 
// Powered by CP Editor (https://cpeditor.org)//へ     /|
//  /\7    ∠_/
//  / │   / /
// │ Z _,< /   /`ヽ
// │     ヽ   /  〉
//  Y     `  /  /
// イ● 、 ●  ⊂⊃〈  /
// ()  へ    | \〈
//  >ー 、_  ィ  │ //
//  / へ   / ノ<| \\
//  ヽ_ノ  (_/  │//
//	  7       |/
//	  >―r ̄ ̄`ー―_
#include <iostream>
#include <cstring>
#include <iomanip>
#include <ctime>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <vector>
#include <stack>
#include <map>
#include <set>
#include <bitset>
#include <queue>
#define eps 1e-5
#define INF 1e9
using namespace std;
typedef long long ll;
const int N = 2e6 + 9;
int a[N];
void solve() {int a,b,c;cin>>a>>b>>c;if(c&1){a++;if(a>b){cout<<"First"<<'\n';}else{cout<<"Second"<<'\n';}}else{if(a>b){cout<<"First"<<'\n';}else{cout<<"Second"<<'\n';}}}int main() {ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);int q;cin >> q;while (q--) {solve();}return 0;
}

B.

// Problem: B. The Walkway
// Contest: Codeforces - Codeforces Round 893 (Div. 2)
// URL: https://codeforces.com/contest/1858/problem/B
// Memory Limit: 256 MB
// Time Limit: 1000 ms
// 
// Powered by CP Editor (https://cpeditor.org)//へ     /|
//  /\7    ∠_/
//  / │   / /
// │ Z _,< /   /`ヽ
// │     ヽ   /  〉
//  Y     `  /  /
// イ● 、 ●  ⊂⊃〈  /
// ()  へ    | \〈
//  >ー 、_  ィ  │ //
//  / へ   / ノ<| \\
//  ヽ_ノ  (_/  │//
//	  7       |/
//	  >―r ̄ ̄`ー―_
#include <iostream>
#include <cstring>
#include <iomanip>
#include <ctime>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <vector>
#include <stack>
#include <map>
#include <set>
#include <bitset>
#include <queue>
#define eps 1e-5
#define INF 1e9
using namespace std;
typedef long long ll;
const int N = 2e5 + 9;
int s[N];
void solve() {int n,m,d;cin>>n>>m>>d;for(int i=1;i<=m;i++){cin>>s[i];}s[0]=-d+1;s[m+1]=n+1;int sum=0;for(int i=1;i<=m+1;i++){sum+=(s[i]-s[i-1]-1)/d;		}int ans=n+1;int cnt=0;for(int i=1;i<=m;i++){int res=sum;res-=(s[i]-s[i-1]-1)/d;res-=(s[i+1]-s[i]-1)/d;res+=(s[i+1]-s[i-1]-1)/d;res+=m-1;if(res<ans){ans=res;cnt=1;}else if(res==ans){cnt++;}}cout<<ans<<" "<<cnt<<'\n';}int main() {ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);int q;cin >> q;while (q--) {solve();}return 0;
}

C.

// Problem: C. Yet Another Permutation Problem
// Contest: Codeforces - Codeforces Round 893 (Div. 2)
// URL: https://codeforces.com/contest/1858/problem/C
// Memory Limit: 256 MB
// Time Limit: 2000 ms
// 
// Powered by CP Editor (https://cpeditor.org)//へ     /|
//  /\7    ∠_/
//  / │   / /
// │ Z _,< /   /`ヽ
// │     ヽ   /  〉
//  Y     `  /  /
// イ● 、 ●  ⊂⊃〈  /
// ()  へ    | \〈
//  >ー 、_  ィ  │ //
//  / へ   / ノ<| \\
//  ヽ_ノ  (_/  │//
//	  7       |/
//	  >―r ̄ ̄`ー―_
#include <iostream>
#include <cstring>
#include <iomanip>
#include <ctime>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <vector>
#include <stack>
#include <map>
#include <set>
#include <bitset>
#include <queue>
#define eps 1e-5
#define INF 1e9
using namespace std;
typedef long long ll;
const int N = 2e6 + 9;
int a[N];
void solve() {int n;cin>>n;vector<int> a;for(int i=1;i<=n;i+=2){for(int j=i;j<=n;j*=2){a.push_back(j);}}for(int i=0;i<n;i++){cout<<a[i]<<" ";}cout<<'\n';
}int main() {ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);int q;cin >> q;while (q--) {solve();}return 0;
}

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

相关文章:

  • 做服务器的网站都有哪些搜狗关键词排名此会zjkwlgs
  • php动态网站开发 唐四薪 答案b站引流推广网站
  • 长沙3天2晚自由行攻略论述搜索引擎优化的具体措施
  • 外汇局网站做结汇申报被逆冬seo课程欺骗了
  • 网站运营配置免费网站在线观看人数在哪直播
  • 什么网站做一手房好系统优化的例子
  • wordpress 插入wordseo排名点击工具
  • 网站推广易网宣seo的主要分析工具
  • 安徽网站定制最大免费广告发布平台
  • 怎么查网站有没有做404公司宣传网页怎么做
  • 靠谱营销网站开发选哪家seo的优点和缺点
  • 企业网站建设论文文献综述百度推广的广告真实可信吗
  • 企业网站优化方式广州最新消息今天
  • 旅游网站开发的意义seo优化方案案例
  • 山东做网站的公司seo数据分析哪些方面
  • 做网站用哪几个端口 比较好百度贴吧官网网页
  • 弹幕网站是怎么做的百度在线翻译
  • 独立网站域名代发关键词包收录
  • 如何建立门户网站百度可以发布广告吗
  • 网站开发毕设文献郑州网站优化顾问
  • 青海建设银行的官方网站自己制作网页的网站
  • 网站建设的图片叠加步骤过程2021年搜索引擎排名
  • 网站链接到邮箱怎么做搜索引擎推广试题
  • 十堰城市建设网站制作自己的网站
  • 传媒网站建设公司深圳百度seo优化
  • 公司需要网站 该怎么做公司推广咨询
  • 高中男女做那个视频网站seo做的好的网站
  • 网站建设 摄影服务上海seo网站排名优化公司
  • 网页设计中html代码seo博客网站
  • 怎样建设小游戏网站google关键词搜索技巧