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

哪些网站可以做文字链广告seo应用领域有哪些

哪些网站可以做文字链广告,seo应用领域有哪些,app开发公司办公室设计,湖南住建云网站个人主页:Guiat 归属专栏:算法竞赛 文章目录 A. 移动距离(5分填空题)B. 客流量上限(5分填空题)C. 可分解的正整数D. 产值调整E. 画展布置F. 水质检测G. 生产车间H. 装修报价 正文 总共10道题。 A. 移动距离…

在这里插入图片描述

个人主页:Guiat
归属专栏:算法竞赛

在这里插入图片描述

文章目录

  • A. 移动距离(5分填空题)
  • B. 客流量上限(5分填空题)
  • C. 可分解的正整数
  • D. 产值调整
  • E. 画展布置
  • F. 水质检测
  • G. 生产车间
  • H. 装修报价

正文

总共10道题。

A. 移动距离(5分填空题)

【题目】移动距离

【分析】
考察数学。先往右走直线,再走圆弧,即最优解。

【答案】1576

【AC_Code】

#include <bits/stdc++.h>
#define IOS ios :: sync_with_stdio(0); cin.tie(0); cout.tie(0);using namespace std;void solve()
{int x = 233, y = 666; double r = sqrt(x * x + y * y);double res = r * (1 + atan2(y, x));cout << fixed << setprecision(0)  << res << '\n';
}int main()
{IOS int _ = 1;   // cin >> _;while (_ --) solve();return 0;
}

B. 客流量上限(5分填空题)

【题目】客流量上限

【分析】

【答案】781448427

【AC_Code1】

#include <bits/stdc++.h>
#define IOS ios :: sync_with_stdio(0); cin.tie(0); cout.tie(0);using namespace std;
using ll = long long; const int mod = 1e9 + 7;int FE(int m, int k, int p)
{ll t = m, res = 1;while (k){if (k & 1) res = res * t % p;k >>= 1; t = t * t % p;}return res;
}void solve()
{cout << FE(2, 1012, mod) << '\n';
}int main()
{IOS int _ = 1;   // cin >> _;while (_ --) solve();return 0;
}

【AC_Code2】

#include <bits/stdc++.h>
#define IOS ios :: sync_with_stdio(0); cin.tie(0); cout.tie(0);using namespace std;const int mod = 1e9 + 7;int pow(int m, int k, int p)
{int res = 1;while (k --) res = res * m % p;return res;
}void solve()
{cout << pow(2, 1012, mod) << '\n';
}int main()
{IOS int _ = 1;   // cin >> _;while (_ --) solve();return 0;
}

C. 可分解的正整数

【题目】可分解的正整数

【分析】
考察模拟。根据题意,分析出除1以外的任何整数都可以分解。

【AC_Code】

#include <bits/stdc++.h>
#define IOS ios :: sync_with_stdio(0); cin.tie(0); cout.tie(0);using namespace std;const int N = 1e5 + 10; int a[N], ans;void solve()
{int n; cin >> n;for (int i = 0; i < n; i ++) { cin >> a[i]; if (a[i] != 1) ans ++; }cout << ans << '\n';
}int main()
{IOS int _ = 1;   // cin >> _;while (_ --) solve();return 0;
}

D. 产值调整

【题目】产值调整

【分析】
按题意暴力模拟会超时只有30分。“观察到”如果 A, B, C 三个数相同的话再处理还是不改变三个数大小,此时直接跳出循环来节省时间,可以拿到满分。

【AC_Code】

#include <bits/stdc++.h>
#define IOS ios :: sync_with_stdio(0); cin.tie(0); cout.tie(0);using namespace std;void solve()
{int T; cin >> T;while (T --){int A, B, C, K; cin >> A >> B >> C >> K;while (K --){int a = A, b = B, c = C;A = (b + c) / 2; B = (a + c) / 2; C = (a + b) / 2;if (A == B && B == C) break;   // 拿满分关键 }cout << A << ' ' << B << ' ' << C << '\n';}
}int main()
{IOS int _ = 1;   // cin >> _;while (_ --) solve();return 0;
}

E. 画展布置

【题目】画展布置

【分析】

【AC_Code】

#include <bits/stdc++.h>
#define IOS ios :: sync_with_stdio(0); cin.tie(0); cout.tie(0);using namespace std;
using ll = long long;const int N = 1e5 + 10; ll a[N], ans = LLONG_MAX;void solve()
{int n, m; cin >> n >> m;for (int i = 0; i < n; i ++) cin >> a[i], a[i] *= a[i];sort(a, a + n);for (int l = 0, r = m - 1; r < n; l ++, r ++) ans = min(a[r] - a[l], ans);cout << ans << '\n';  
}int main()
{IOS int _ = 1;   // cin >> _;while (_ --) solve();return 0;
}

F. 水质检测

【题目】水质检测

【分析】

【AC_Code】

#include <bits/stdc++.h>
#define IOS ios :: sync_with_stdio(0); cin.tie(0); cout.tie(0);using namespace std;void solve()
{string a, b; cin >> a >> b;int last = -1, state = -1, cnt = 0;for (int i = 0; i < a.length(); i ++){if (a[i] == '.' && b[i] == '.') continue;if (last != -1) cnt += i - last - 1;if (a[i] == '#' && b[i] == '#') state = 3;else if (a[i] == '#' && b[i] == '.'){if (state == 2) { cnt ++; state = 3; } else state = 1;}else if (a[i] == '.' && b[i] == '#'){if (state == 1) { cnt ++; state = 3; } else state = 2;}last = i;}cout << cnt << '\n';
}int main()
{IOS int _ = 1;   // cin >> _;while (_ --) solve();return 0;
}

G. 生产车间

【题目】生产车间

【分析】

【AC_Code】

H. 装修报价

【题目】装修报价

【分析】

【AC_Code1】

#include <bits/stdc++.h>
#define IOS ios :: sync_with_stdio(0); cin.tie(0); cout.tie(0);using namespace std;
using ll = long long;const int mod = 1e9 + 7;int s, ans;ll FE(ll a, ll b, ll p)
{ll ans = 1; a %= p;while (b){if (b & 1) ans = (ans * a) % p;b >>= 1; a = (a * a) % p;}return ans % p;
}void solve()
{int n; cin >> n;for (int i = 1; i <= n; i ++){int a; cin >> a; s ^= a;if (i < n) { ans += 2 * s * FE(3ll, n - i - 1, mod) % mod; }else ans += s;ans %= mod;}cout << ans << '\n';
}int main()
{IOS int _ = 1;   // cin >> _;while (_ --) solve();return 0;
}

【AC_Code2】

#include <bits/stdc++.h>
#define IOS ios :: sync_with_stdio(0); cin.tie(0); cout.tie(0);using namespace std;
using ll = long long;const int mod = 1e9 + 7; ll sum, ans;void solve()
{int n; cin >> n;for (int i = 1; i <= n; i ++){int a; cin >> a;ans = (ans * 3 - sum + (sum ^= a) + mod) % mod;}cout << ans << '\n';
}int main()
{IOS int _ = 1;   // cin >> _;while (_ --) solve();return 0;
}

结语
感谢您的阅读!期待您的一键三连!欢迎指正!

在这里插入图片描述

http://www.dtcms.com/wzjs/524113.html

相关文章:

  • 云南网站建设维修公司哪家好百度人气榜排名
  • 宁波市镇海建设交通局网站首页今日国内新闻最新消息
  • 学做软件的网站营销软件哪个好
  • 网站开发相关书籍资料百度手机助手下载2021新版
  • 无锡网站建设服务公司app运营需要做哪些
  • 怎么做网站内部搜索功能网络营销与策划实践报告
  • 建筑设计网站大全网站关键词林俊杰在线听免费
  • 网站主要内容包括什么软文发布平台媒体
  • 网站选择理由描述完整的网页设计代码
  • 杭州网站建设排名宣传渠道和宣传方式有哪些
  • 做网站建设公司企业西安百度竞价推广
  • 网站建设功能设计关键词优化的方法有哪些
  • 延吉做网站页面优化的方法有哪些
  • 温州网页网站制作宁德市蕉城区疫情
  • 加强门户网站建设方案网店买卖有哪些平台
  • 网站上的定位怎么做百度搜索推广官网
  • 环保公司网站建设方案精准营销推广方案
  • 做网站是不是也是暴利百度搜索引擎投放
  • liferay 做网站三只松鼠的软文范例
  • 学校网站div css模板网络营销有哪几种方式
  • 张家界市建设网站网络营销网课
  • 网页制作与网站建设技术大全 pdf产品怎么进行推广
  • 创建一个网站的技术关键词查询工具
  • 电子商务网站建设的定义上海疫情又要爆发了
  • 阿里云个人怎么免费做网站软文网站有哪些
  • 广州做网站app引流推广多少钱一个
  • 网站建设学习浩森宇特韩国最新新闻
  • 福建定制网站开发青岛爱城市网app官方网站
  • 怎么给公司做网站百度24小时客服电话136
  • 专门做自助游攻略的网站是哪个seo的优点