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

wordpress网站阿里云备案/百度推广怎么优化关键词的质量

wordpress网站阿里云备案,百度推广怎么优化关键词的质量,施工企业在其施工资质许可内自建自用的工程,找人做的网站怎么运行前言 题解 2021 RoboCom 世界机器人开发者大赛-高职组(复赛)解题报告。 模拟题为主,包含进制转换等等。 最后一题,是对向量/自定义类型,重定义小于操作符。 7-1 人工智能打招呼 分值: 15分 考察点: 分支判定&…

前言

在这里插入图片描述


题解

2021 RoboCom 世界机器人开发者大赛-高职组(复赛)解题报告。

模拟题为主,包含进制转换等等。

最后一题,是对向量/自定义类型,重定义小于操作符。

在这里插入图片描述

7-1 人工智能打招呼

分值: 15分

考察点: 分支判定,判重技巧

#include <bits/stdc++.h>using namespace std;int main() {int n;cin >> n;set<string> hp;for (int i = 0; i < n; i++) {string id; cin >> id;if (hp.find(id) == hp.end()) {cout << "Hello " << id << ", how are you?\n";hp.insert(id);} else {cout << "Hi " << id<< "! Glad to see you again!\n";}}return 0;
}

7-2 人工智能数字翻译

分值: 20分
考察:进制转换,10和27进制互转

在这里插入图片描述

#include <bits/stdc++.h>using namespace std;int main() {string a;int d;cin >> a >> d;if (d == 10) {string res;int s = stoi(a);while (s > 0) {int r = s % 27;if (r >= 0 && r < 10) {res += (char)(r + '0');} else {res += (char)(r - 10 + 'A');}s /= 27;}if (res.empty()) res = "0";reverse(res.begin(), res.end());// 去掉前置多余的0if (res[0] == '0' && res.size() > 0) {int pos = res.size() - 1;for (int i = 0; i < res.size(); i++) {if (res[i] != '0') {pos = i;break;}}res = res.substr(pos);}cout << res << "\n";} else {int64_t res = 0;string s = a;for (char c: s) {if (c >= '0' && c <= '9') {res = res * 27 + (c - '0');} else {res = res * 27 + (c - 'A' + 10);}}cout << res << "\n";}return 0;
}

7-3 机器人拼图

分值: 20分

模拟
在这里插入图片描述


#include <bits/stdc++.h>using namespace std;int main() {int n, m;cin >> n >> m;vector<vector<int>> mat(n, vector<int>(m, 0));for (int i = 0; i < n * m; i++) {string op; cin >> op;int x = 0, y = 0;for (char c: op) {if (c == '1') {y = min(y + 1, m - 1);} else if (c == '3') {y = max(y - 1, 0);} else if (c == '2') {x = min(x + 1, n - 1);} else if (c == '4') {x = max(x - 1, 0);} else {if (mat[x][y] == 0) {mat[x][y] = i + 1;}}}}for (int i = 0; i < n; i++) {for (int j = 0; j < m; j++) {cout << mat[i][j] << " \n"[j == m - 1];}}return 0;
}

7-4 PAT基础级排名

分值: 20分

思路: 排序 + 分组循环

因为存在同分的情况,所以分组循环,是种优雅的写法

#include <bits/stdc++.h>using namespace std;struct Stu {string name;int score;
};int main() {int n, L;cin >>n >> L;vector<Stu> arr;for (int i = 0; i < n; i++) {Stu stu;cin >> stu.name >> stu.score;arr.push_back(stu);}sort(arr.begin(), arr.end(), [](auto &a, auto &b) {if (a.score != b.score) return a.score > b.score;return a.name < b.name;});int levels[6] = {0, 30, 50, 60, 80, 100}; auto resolve = [levels](int a) {for (int i = 5; i >= 0; i--) {if (a > levels[i]) return i + 1;}return 0;};int x = L + 1;int m = n;int acc = 0;int rank = 0;for (int i = 0;i < n; i++) {Stu &stu = arr[i];int level = resolve(stu.score);if (x > level) {m = m - acc;acc = 0;x = level;rank = 1;}acc++;if (acc > 1 && arr[i].score == arr[i - 1].score) {} else {rank = acc;}if (x != 0) {cout << stu.name << " " << x << " " << stu.score << "/" << levels[x] << " "<< rank << "/" << m << "\n";} else {cout << stu.name << "\n";}}return 0;
}

7-5 人工智能刑警

分值: 25分

思路: 自定义类型重定义小于操作符

因为这边采用map(底层是树),所以需要对自定义类型重定义小于操作符。

#include <bits/stdc++.h>using namespace std;struct T {vector<int> feature;bool operator<(const T&lhs) const {int n = feature.size();for (int i = 0; i < n; i++) {int v1 = feature[i], v2 = lhs.feature[i];if (v1 != v2) return v1 < v2;}return 0;}
};int main() {map<T, string> hp;int n, f;cin >> n >> f;for (int i = 0; i < n; i++) {T t;for (int j = 0; j < f; j++) {int v; cin >> v;t.feature.push_back(v);}string name; cin >> name;hp[t] = name;}while (true) {bool ok = true;T t2;for (int i = 0; i < f; i++) {int v; if (cin >> v && (v == 0 && i == 0)) {ok = false;break;}t2.feature.push_back(v);}if (!ok) break;if (hp.find(t2) != hp.end()) {cout << hp[t2] << "\n";} else {cout << "Pass"  << "\n";}}return 0;
}

写在最后

在这里插入图片描述

http://www.lryc.cn/news/577839.html

相关文章:

  • 电商法规定企业网站必须做3年/最好的小说网站排名
  • 高端手机/河南网站seo靠谱
  • 建设部网站下载/本地建站软件有哪些
  • 视频当背景图片 网站开发/seo关键词排优化软件
  • 网站被降权后怎么办/推广平台软件有哪些
  • 仿做国外产品网站出路/推广哪个平台好
  • 帝国网站建设/公司网站页面设计
  • 卖服务器网站源码/百度搜索seo优化技巧
  • 机关门花网站建设/网店推广方法
  • 网站建设完成报告/市场seo是什么
  • 淄博哪个网站做房屋出赁好/中国公关公司前十名
  • 网站定制开发流程/网站优化关键词排名
  • 怎么进入网站开发模式/百度一下百度网页官
  • 织梦网站源码下载/产品推广方案范例
  • wordpress 无法上传文件/seo排名点击器
  • 想做网站找哪个公司好/时事新闻最新消息
  • 网站建好了怎么做淘宝客/广告代发平台
  • 政府网站共享平台建设情况汇报/怎么推广软件
  • 做神马网站优化快速排名软件/站长统计入口
  • mysql asp网站/大数据精准营销获客
  • 网站建设计什么费用/提高网站排名
  • 潍坊高新区建设局门户网站/网站建站网站
  • wordpress 整套模板下载/广东seo价格是多少钱
  • 菏泽网站制建设哪家好/b站怎么推广
  • 番禺开发网站费用/今日新闻头条内容
  • 比较好看的企业网站/青岛网站推广系统
  • 大唐工作室 网站制作/seo职位
  • 小程序开发平台哪家实惠/泉州关键词优化排名
  • 可以做很多个网站然后哭推广/河南专业网站建设
  • 杭州网站建设哪家强/培训心得体会1000字通用