当前位置:网站首页>2021 robocom world robot developer competition - preliminary competition of higher vocational group
2021 robocom world robot developer competition - preliminary competition of higher vocational group
2022-07-01 23:32:00 【Alan_ Lowe】
2021 RoboCom World robot developer competition - Preliminary competition of higher vocational group
List of articles
Preface
During the competition, the teacher always said , You can't even compete in Higher Vocational Education .
The questions are simple , Just post the code directly , Some use C++ Written , Some use Python Written .
1. The robot says hello

AC Code
print("ni ye lai can jia RoboCom a?")
2. Face recognition

AC Code
#include<bits/stdc++.h>
using namespace std;
signed main(){
int A,B,C,D,a,b,c;
cin>>A>>B>>C>>D>>a>>b>>c;
cout<<"Diff = "<<A-a<<", "<<B-b<<", "<<C-c<<"\n";
if (abs(A-a) + abs(B-b) + abs(C-c) <= D)
cout<<"Yes";
else
cout<<"No";
return 0;
}
3. Monthly output

AC Code
#include<bits/stdc++.h>
using namespace std;
int n;
string s[13] = {
"","January","February","March","April","May","June",
"July","August","September","October","November","December"};
signed main(){
while (cin>>n){
if (n > 12 || n < 1)
break;
cout<<s[n]<<"\n";
}
cout<<"?";
return 0;
}
4. A string of letters

AC Code
#include<bits/stdc++.h>
using namespace std;
signed main(){
int n;cin>>n;
while(n--){
string s;cin>>s;bool f = true;
for (int i = 0; i < s.length() - 1; ++i) {
if (islower(s[i])){
if (!(s[i + 1] == s[i] - 1 || toupper(s[i]) == s[i + 1])){
f = false;break;
}
}
else
if (!(tolower(s[i]) == s[i + 1] || s[i + 1] == s[i] + 1)){
f = false;break;
}
}
if (f)
cout<<"Y\n";
else
cout<<"N\n";
}
return 0;
}
5. Increase by one

AC Code
#include<bits/stdc++.h>
using namespace std;
#define int long long
bool check(int x){
int k = 0,kk = x;
while (kk){
kk /= 10; k += 1;
}
if (k % 2 != 0)
return false;
k = pow(10,k / 2);
if (x % k - 1 == x / k)
return true;
return false;
}
signed main(){
int n;cin>>n;
while(n--){
int m,k = 0;
cin>>m;
if (check(m)){
k += 1;
if (ceil(sqrt(m)) * ceil(sqrt(m)) == m)
k += 1;
}
cout<<k<<"\n";
}
return 0;
}
6. Answer sheet
A netizen posted an article on Sina Weibo saying :“ My friend bought Ben Bohr X Heisenberg's physics boss is humanistic , Yes 300 A high number question . What is more perfect , To finish the question, paint the answer sheet according to the answer , Paint a QR code , Scan the QR code to see the classic , If you make a mistake, you won't see it ……” The legendary answer sheet is shown in the figure below : If the answer is 4 An integer ( When the number of digits is insufficient, make up in the front 0), Then the first two are abscissa , The last two are ordinates . If there are two questions in a question , Then the answer to the first question is abscissa , The answer to the second question is the ordinate . If the answer is a score , Then the molecule is the abscissa , The denominator is the ordinate .
Please help the reader fill in the answer card according to the answers .

AC Code
ch = [['.'] * 105 for i in range(105)]
n, m = map(int,input().split())
for i in range(m):
s = input()
if s.count(';'):
a, b = map(int,s.split(';'))
col = a
row = n - b + 1
ch[row][col] = '#'
elif s.count('/'):
a, b = map(int,s.split('/'))
col = a
row = n - b + 1
ch[row][col] = '#'
else:
a = int(s)
b = a % 100
a //= 100
col = a
row = n - b + 1
ch[row][col] = '#'
for i in range(1,n + 1):
for j in range(1,n + 1):
print(ch[i][j],end='')
print()
7. Save the unlucky guy

AC Code
s = set()
n = int(input())
for i in range(n):
s.add(input())
m = int(input())
for i in range(m):
s.remove(input())
s = list(s)
s.sort(reverse=True)
for i in s:
print(i)
边栏推荐
- 2022-07-01: at the annual meeting of a company, everyone is going to play a game of giving bonuses. There are a total of N employees. Each employee has construction points and trouble points. They nee
- 股票开户哪个证券公司最好,有安全保障吗
- 字典、哈希表、数组的概念
- Huisheng Huiying 2022 intelligent, fast and simple video editing software
- CADD课程学习(3)-- 靶点药物相互作用
- [applet] realize the left and right [sliding] list through the scroll view component
- 从第三次技术革命看企业应用三大开发趋势
- ConcurrentSkipListMap——跳表原理
- ARP报文头部格式和请求流程
- flutter Unable to load asset: assets/images/888. png
猜你喜欢

有没有一段代码,让你为人类的智慧所折服

from pip._internal.cli.main import main ModuleNotFoundError: No module named ‘pip‘

The online beggar function of Japanese shopping websites

Practical application and extension of plain framework

CADD课程学习(3)-- 靶点药物相互作用

Redis RDB快照

Matplotlib common charts

ConcurrentSkipListMap——跳表原理

Redis数据类型和应用场景

【ES实战】ES上的安全性运行方式
随机推荐
Three development trends of enterprise application from the perspective of the third technological revolution
Current situation and future development trend of Internet of things
from pip._internal.cli.main import main ModuleNotFoundError: No module named ‘pip‘
[leetcode] length of the last word [58]
问题随记 —— /usr/bin/perl is needed by MySQL-server-5.1.73-1.glibc23.x86_64
Matplotlib常用設置
[micro service sentinel] sentinel integrates openfeign
Practical application and extension of plain framework
How to display real-time 2D map after rviz is opened
认识--Matplotlib
Matplotlib common charts
CADD course learning (3) -- target drug interaction
Stm32f030f4 drives tim1637 nixie tube chip
Matplotlib常用设置
What professional classification does the application of Internet of things technology belong to
【.Net Core】程序相关各种全局文件
Redis数据类型和应用场景
mysql binlog的清理
Redis AOF日志
MT manager test skiing Adventure