当前位置:网站首页>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)
边栏推荐
- 【微服务|Sentinel】sentinel整合openfeign
- 股票开户哪个证券公司最好,有安全保障吗
- Three development trends of enterprise application from the perspective of the third technological revolution
- ShanDong Multi-University Training #3
- sql 优化
- 云信小课堂 | IM及音视频中常见的认知误区
- Redis AOF log
- 物联网现状及未来发展趋势
- Reproduction process and problems of analog transformer (ICLR 2022 Spotlight)
- Zhao Fuquan: to ensure supply in the short term, we should build a safe, efficient and resilient supply chain in the long term
猜你喜欢

mysql binlog的清理

STM32F030F4驱动TIM1637数码管芯片

2022年R1快开门式压力容器操作考题及答案

2022安全员-C证考试题模拟考试题库及模拟考试

2022 R1 fast opening pressure vessel operation test questions and answers

问题随记 —— file /usr/share/mysql/charsets/README from install of MySQL-server-5.1.73-1.glibc23.x86_64 c

Redis data types and application scenarios

CADD course learning (3) -- target drug interaction

硅谷产品实战学习感触

Future trend and development of neural network Internet of things
随机推荐
Why is PHP called hypertext preprocessor
jpa手写sql,用自定义实体类接收
plain framework的实际应用和扩展
CADD course learning (3) -- target drug interaction
SWT / anr problem - SWT causes kernel fuse deadlock
2022年危险化学品经营单位安全管理人员考试题及在线模拟考试
Matplotlib常用图表
[swoole Series 1] what will you learn in the world of swoole?
物联网开发零基础教程
Redis AOF日志
Oracle中已定义者身份执行函数AUTHID DEFINER与Postgresql行为的异同
What are the common types of points mall games?
Create Ca and issue certificate through go language
Current situation and future development trend of Internet of things
力扣今日题-241. 为运算表达式设计优先级
Linux基础 —— CentOS7 离线安装 MySQL
Linux foundation - centos7 offline installation of MySQL
ConcurrentSkipListMap——跳表原理
2022 R1 fast opening pressure vessel operation test questions and answers
from pip._ internal. cli. main import main ModuleNotFoundError: No module named ‘pip‘