当前位置:网站首页>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安全员-C证考试题模拟考试题库及模拟考试
- The online beggar function of Japanese shopping websites
- The difference between timer and scheduledthreadpoolexecutor
- y53.第三章 Kubernetes从入门到精通 -- ingress(二六)
- 常见的积分商城游戏类型有哪些?
- notBlank 和 notEmpty
- Redis AOF日志
- 问题随记 —— file /usr/share/mysql/charsets/README from install of MySQL-server-5.1.73-1.glibc23.x86_64 c
- from pip._internal.cli.main import main ModuleNotFoundError: No module named ‘pip‘
- Airserver latest win64 bit personal screen projection software
猜你喜欢

Redis RDB snapshot

认识--Matplotlib

距离度量 —— 汉明距离(Hamming Distance)

2022年危险化学品经营单位安全管理人员考试题及在线模拟考试

What is the relationship between modeling and later film and television?

The best smart home open source system in 2022: introduction to Alexa, home assistant and homekit ecosystem

Development trend and future direction of neural network Internet of things

Glass mosaic

软件架构的本质

Experience of practical learning of Silicon Valley products
随机推荐
Why is PHP called hypertext preprocessor
De PIP. Interne. CLI. Main Import main modulenotfounderror: No module named 'PIP'
MT manager test skiing Adventure
mt管理器测试滑雪大冒险
从第三次技术革命看企业应用三大开发趋势
The best smart home open source system in 2022: introduction to Alexa, home assistant and homekit ecosystem
Who do you want to know when opening a stock account? Is it safe to open an account online?
Material Design组件 - 使用BottomSheet展现扩展内容(一)
软件架构的本质
ShanDong Multi-University Training #3
flutter Unable to load asset: assets/images/888. png
2022年起重机司机(限桥式起重机)考试试题及模拟考试
上海炒股开户选择手机办理安全吗?
SWT / anr problem - SWT causes kernel fuse deadlock
PostgreSQL source code (57) why is the performance gap so large in hot update?
Oracle中已定义者身份执行函数AUTHID DEFINER与Postgresql行为的异同
内存泄露和内存溢出的区别是什么?
SWT/ANR问题--SWT 导致 kernel fuse deadlock
距离度量 —— 汉明距离(Hamming Distance)
云信小课堂 | IM及音视频中常见的认知误区