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

合肥建委网站网络优化工程师主要做什么

合肥建委网站,网络优化工程师主要做什么,邗江区做网站,wordpress divi 2.7个人主页:Guiat 归属专栏:每日一题 文章目录 1. 【2.24】P10424 [蓝桥杯 2024 省 B] 好数2. 【2.25】P8665 [蓝桥杯 2018 省 A] 航班时间3. 【2.26】P10905 [蓝桥杯 2024 省 C] 回文字符串4. 【2.27】P10425 [蓝桥杯 2024 省 B] R 格式5. 【2.28】P10426…

在这里插入图片描述

个人主页:Guiat
归属专栏:每日一题

在这里插入图片描述

文章目录

  • 1. 【2.24】P10424 [蓝桥杯 2024 省 B] 好数
  • 2. 【2.25】P8665 [蓝桥杯 2018 省 A] 航班时间
  • 3. 【2.26】P10905 [蓝桥杯 2024 省 C] 回文字符串
  • 4. 【2.27】P10425 [蓝桥杯 2024 省 B] R 格式
  • 5. 【2.28】P10426 [蓝桥杯 2024 省 B] 宝石组合
  • 6. 【3.1】P10912 [蓝桥杯 2024 国 B] 数星星
  • 7. 【3.2】P10914 [蓝桥杯 2024 国 B] 跳石头

正文

1. 【2.24】P10424 [蓝桥杯 2024 省 B] 好数

题目链接:https://www.luogu.com.cn/problem/P10424

【AC_Code】

#include <iostream>
#define IOS ios :: sync_with_stdio(0); cin.tie(0); cout.tie(0);using namespace std;int N, cnt;bool check(int n)
{int number = 1;while (n > 0){if (number % 2 == 1) { if ((n % 10) % 2 == 0) return false; }else if ((n % 10) % 2 != 0) return false;n /= 10; number ++;}return true;
}int main()
{IOS; cin >> N;for (int i = 1; i <= N; i ++) if (check(i)) cnt ++;cout << cnt << '\n';return 0;
}

2. 【2.25】P8665 [蓝桥杯 2018 省 A] 航班时间

题目链接:https://www.luogu.com.cn/problem/P8665

【AC_Code】

#include <iostream>
#include <iomanip>
#define IOS ios :: sync_with_stdio(0); cin.tie(0); cout.tie(0);using namespace std;int solve()
{int h1, m1, s1, h2, m2, s2, d = 0; char c1, c2, c3, c4, c5, c6;cin >> h1 >> c1 >> m1 >> c2 >> s1 >> h2 >> c3 >> m2 >> c4 >> s2;if (cin.peek() == ' ') cin >> c5 >> d >> c6;return (86400 * d + 3600 * h2 + 60 * m2 + s2) - (3600 * h1 + 60 * m1 + s1);
}int main()
{IOS; int T; cin >> T;while (T --){int ans = (solve() + solve()) >> 1;cout << setw(2) << setfill('0') << ans / 3600 << ':'<< setw(2) << setfill('0') << (ans % 3600) / 60 << ':'<< setw(2) << setfill('0') << ans % 60 << '\n';}return 0;
}

3. 【2.26】P10905 [蓝桥杯 2024 省 C] 回文字符串

题目链接:https://www.luogu.com.cn/problem/P10905

【AC_Code】

#include <iostream>
#include <string>
#define IOS ios :: sync_with_stdio(0); cin.tie(0); cout.tie(0);using namespace std;void solve()
{string s; cin >> s; int l = 0, r = s.length() - 1;while (s[l] == 'l' || s[l] == 'q' || s[l] == 'b') l ++;while (s[r] == 'l' || s[r] == 'q' || s[r] == 'b') r --;bool flag = true;for (int i = l, j = 0; i <= (l + r) / 2; i ++, j ++) if (s[i] != s[r - j]) flag = false;if ( ! flag ) cout << "No\n";else if (l == 0) cout << "Yes\n";else if (r == s.length() - 1) cout << "No\n";else if (s.length() - r < l) cout << "No\n";else{l --; r ++;while (s[l] == s[r] && l >= 0 && r <= s.length()) l --, r ++;if (r == s.length() || l == -1) cout << "Yes\n";else cout << "No\n";}
}int main()
{IOS; int T; cin >> T; while (T--) solve();return 0;
}

4. 【2.27】P10425 [蓝桥杯 2024 省 B] R 格式

题目链接:https://www.luogu.com.cn/problem/P10425

【AC_Code】

#include <iostream>
#include <algorithm>
#define IOS ios :: sync_with_stdio(0); cin.tie(0); cout.tie(0);using namespace std;const int N = 1e6;
int n, a[N], pos, len; string q;void solve()
{reverse(q.begin(), q.end());pos = q.find('.'); q.erase(pos, 1); len = q.size();for (int i = 0; i < len; i ++) a[i + 1] = q[i] - '0';for (int i = 1; i <= n; i ++){for (int i = 1; i <= len; i ++) a[i] *= 2;for (int i = 1; i <= len; i ++) a[i + 1] += a[i] / 10, a[i] %= 10;if (a[len + 1]) len ++;}if (a[pos] >= 5) a[pos + 1] ++;for (int i = pos + 1; i <= len; i ++) a[i + 1] += a[i] / 10, a[i] %= 10;if (a[len + 1]) len ++;for (int i = len; i > pos; i --) cout << a[i]; cout << '\n';
}int main()
{IOS; cin >> n >> q; solve();return 0;
}

5. 【2.28】P10426 [蓝桥杯 2024 省 B] 宝石组合

题目链接:https://www.luogu.com.cn/problem/P10426

【AC_Code】

#include <iostream>
#include <vector>
#include <algorithm>
#define IOS ios :: sync_with_stdio(0); cin.tie(0); cout.tie(0);using namespace std;const int MAXN = 1e5 + 10; int n, h[MAXN]; vector<int> fac[MAXN];int gcd(int a, int b) { return __gcd(a, b); }void solve()
{cin >> n; for (int i = 1; i <= n; ++ i) cin >> h[i];sort(h + 1, h + 1 + n);for (int i = 1; i <= n; ++ i) for (int j = 1; j * j <= h[i]; ++j){if (h[i] % j == 0){fac[j].push_back(h[i]);if (h[i] / j != j) fac[h[i] / j].push_back(h[i]);}}for (int i = MAXN; i >= 1; -- i){if (fac[i].size() >= 3){int a = fac[i][0], b = fac[i][1], c = fac[i][2];if (gcd(gcd(a, b), c) == i) { cout << a << " " << b << " " << c << "\n"; return; }}}
}int main()
{IOS; solve();return 0;
}

6. 【3.1】P10912 [蓝桥杯 2024 国 B] 数星星

题目链接:https://www.luogu.com.cn/problem/P10912

【AC_Code】

#include <iostream>
#include <vector>
#include <algorithm>
#define IOS ios :: sync_with_stdio(0); cin.tie(0); cout.tie(0);using namespace std;const int N = 1e5 + 10, mod = 1e9 + 7;
int n, a[N], b[N], c[N], f[N], l, r, ans;
vector<int> vec[N];int fun(int x, int y) { return 1ll * b[x] * f[y] % mod * f[x - y] % mod; }void DFS(int x, int y)
{for (auto n : vec[x]) if (n != y) DFS(n, x);if (static_cast<int> (vec[x].size()) + 1 >= 1){int p = min(r - 1, static_cast<int> (vec[x].size()));for (int i = l - 1; i <= p; i ++) ans = (ans + fun(vec[x].size(), i)) % mod;}
}void solve()
{cin >> n; b[0] = c[0] = 1; b[1] = 1; c[1] = 1; f[0] = 1; f[1] = 1;for (int i = 2; i <= n; i ++){b[i] = 1ll * b[i - 1] * i % mod;c[i] = 1ll * c[mod % i] * (mod - mod / i) % mod;f[i] = 1ll * f[i - 1] * c[i] % mod;}for (int i = 1; i < n; i ++){int x, y; cin >> x >> y;vec[x].push_back(y); vec[y].push_back(x);}cin >> l >> r;DFS(1, 0);cout << ans << '\n';
}int main()
{IOS; solve();return 0;
}

7. 【3.2】P10914 [蓝桥杯 2024 国 B] 跳石头

题目链接:https://www.luogu.com.cn/problem/P10914

【AC_Code】

#include <iostream>
#include <bitset>
#define IOS ios :: sync_with_stdio(0); cin.tie(0); cout.tie(0); using namespace std;const int N = 4e4 + 10; int c[N], n, ans;
bitset<N> f[N];void solve()
{cin >> n;for (int i = 1; i <= n; i ++){cin >> c[i]; f[i][c[i]] = 1;}for (int i = n; i >= 1; i --){if (i + c[i] <= n) f[i] |= f[i + c[i]];if (2 * i <= n) f[i] |= f[2 * i];ans = max(ans, (int)f[i].count());}cout << ans << '\n';
}int main()
{IOS; solve();return 0;
}

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

在这里插入图片描述

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

相关文章:

  • wordpress资源下载站网络推广公司哪家好
  • 建大网站首页windows系统优化软件排行榜
  • 造价师注册管理系统杭州网站seo
  • 广州排名seo公司大连百度网站排名优化
  • 福建网站建建设在线工具
  • 视差 长沙做网站5118关键词查询工具
  • 江门网站建设方案国际购物网站平台有哪些
  • 贸易公司做网站有优势吗公众号软文是什么意思
  • 民宿预订网站制作中国域名注册官网
  • 动态网站的建设烟台seo关键词排名
  • 烟台网站建设策划方案黑帽seo教程
  • 建设工程查询系统持续优化疫情防控举措
  • 电商网站制作流程天津百度关键词seo
  • 公司字号大全seo百度关键词优化
  • 网站 报价方案企业查询
  • 做网站源代码怎么下载百度竞价点击一次多少钱
  • 介绍好的免费网站模板下载地址网页开发教程
  • 英文网站推广工作seo推广收费标准
  • 蚌埠专业制作网站的公司长沙seo运营
  • 外贸b2c商城网站设计百度广告联盟平台的使用知识
  • 政府网站什么程序做的seo推广工具
  • 多平台网站开发河北网络科技有限公司
  • 个人网站主办者名称国内优秀个人网站欣赏
  • 网上编程课靠谱吗外贸网站建设优化推广
  • 温州平阳县网站建设兼职百度一下官网首页百度一下
  • 网站建设应考虑哪些方面的问题企业网站设计图片
  • 网站建设的基本技术互联网推广渠道有哪些
  • 网站的推广方法电影站的seo
  • 朗姿青春日记 网站谁做的百度联盟注册
  • 做pc端网站一般多少钱谷歌账号