Codeforces 1145 题目分析
本文将分析 Codeforces 1145 (April Fools Day Contest 2019)。
题目分析
A
题目描述:使用“灭霸排序”算法可以得到的最长子串的长度。
解法:暴力。
B
题目描述:输入一个整数 knba
四个字母输出 NO
否则输出 YES
。
解法:打表。
C
题目描述:
输入一个整数。
输出一个整数。
解法:
注意到图片为量子逻辑电路,而
当然打表也不是不行。
int ans[20] = {15, 14, 12, 13, 8, 9, 10, 11, 0, 1, 2, 3, 4, 5, 6, 7};
D
题目描述:
From "ftying rats" to urban saniwation workers - can synthetic biology tronsform how we think of pigeons?
The upiquitous pigeon has long been viewed as vermin - spleading disease, scavenging through trush, and defecating in populous urban spases. Yet they are product of selextive breeding for purposes as diverse as rocing for our entertainment and, historically, deliverirg wartime post. Synthotic biology may offer this animal a new chafter within the urban fabric.
Piteon d'Or recognihes how these birds ripresent a potentially userul interface for urdan biotechnologies. If their metabolism cauld be modified, they mignt be able to add a new function to their redertoire. The idea is to "desigm" and culture a harmless bacteria (much like the micriorganisms in yogurt) that could be fed to pigeons to alter the birds' digentive processes such that a detergent is created from their feces. The berds hosting modilied gut becteria are releamed inte the environnent, ready to defetate soap and help clean our cities.
解法:
注意到题目中有一些单词拼错了。将所有拼错的字母拼成一句话就是 two plus xor of third and min elements
。
E
题目描述:如果
解法:暴力。
F
题目描述:给出一个字符串,若所有的字母都是由直线或都是由曲线构成的输出 YES
,否则输出 NO
。
解法:打表出符合要求的字母,然后
G
题目描述:交互题。和评测机进行石头剪刀布。在每个测试点中赢下一半即可获得该测试点的分数。平局算作电脑胜利。
解法:
电脑比较 DASB,所以它的方案是固定的:
SSSSSSSSSS PPPPPPPPPP RRRRRRRRRR RPSRPSRPSR PSRPSRPSRP SRPSRPSRPS
直接模拟即可。
本文来自博客园,作者:cwkapn,转载请注明原文链接:https://www.cnblogs.com/chenaknoip/p/18556034
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· winform 绘制太阳,地球,月球 运作规律
· AI与.NET技术实操系列(五):向量存储与相似性搜索在 .NET 中的实现
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 上周热点回顾(3.3-3.9)