当前位置:网站首页>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)
边栏推荐
- [understanding of opportunity-35]: Guiguzi - flying clamp - the art of remote connection, remote control and remote testing
- MySQL binlog cleanup
- 云信小课堂 | IM及音视频中常见的认知误区
- 图的遍历之深度优先搜索和广度优先搜索
- Matplotlib common settings
- 问题随记 —— /usr/bin/perl is needed by MySQL-server-5.1.73-1.glibc23.x86_64
- Redis AOF日志
- Notes on problems - /usr/bin/perl is needed by mysql-server-5.1.73-1 glibc23.x86_ sixty-four
- 2022年最佳智能家居开源系统:Alexa、Home Assistant、HomeKit生态系统介绍
- ARP报文头部格式和请求流程
猜你喜欢
字典、哈希表、数组的概念
Airserver latest win64 bit personal screen projection software
What professional classification does the application of Internet of things technology belong to
What is mosaic?
Huisheng Huiying 2022 intelligent, fast and simple video editing software
Postgresql源码(57)HOT更新为什么性能差距那么大?
CADD course learning (3) -- target drug interaction
Matplotlib common charts
from pip._internal.cli.main import main ModuleNotFoundError: No module named ‘pip‘
Experience of practical learning of Silicon Valley products
随机推荐
How to display real-time 2D map after rviz is opened
Leetcode(34)——在排序数组中查找元素的第一个和最后一个位置
[micro service sentinel] @sentinelresource details
力扣今日题-241. 为运算表达式设计优先级
PostgreSQL source code (57) why is the performance gap so large in hot update?
The difference between timer and scheduledthreadpoolexecutor
Redis数据类型和应用场景
2021 RoboCom 世界机器人开发者大赛-高职组复赛
Three development trends of enterprise application from the perspective of the third technological revolution
PostgreSQL notes (10) dynamically execute syntax parsing process
plain framework的实际应用和扩展
Is it safe to choose mobile phone for stock trading account opening in Shanghai?
URL introduction
Daily three questions 6.28
Concepts of dictionary, hash table and array
Oracle中已定义者身份执行函数AUTHID DEFINER与Postgresql行为的异同
What is mosaic?
Daily three questions 6.30 (2)
flutter Unable to load asset: assets/images/888. png
Reproduction process and problems of analog transformer (ICLR 2022 Spotlight)