2023年USACO竞赛考情回顾!USACO难度加大,2023年该如何备考?USACO培训点击了解 |
时间:2023-03-31 10:44:12 作者:犀牛教育 来源:犀牛教育 |
2023年3月USACO公开赛已经落下帷幕,参加考试的同学发挥的怎么样呢?
犀牛教育计算机项目组老师对USACO竞赛进行了一个复盘!来看看今年的考试怎么样吧~
2023年3月24-27日 USACO US.OPEN美国公开赛顺利结束。大家感觉怎么样呢?
本次US.OPEN美国公开赛难度是月赛的1.5倍,题目难度较大。同时,近三年公开赛的难度是逐年递增的。
本次考试还是以暴力搜索和模拟为主,尤其是第二题,需要仔细审题,如果不理解题意会很难下手。与我们考前预测是一致的USACO 3月公开赛独家考情预测!
铜组第1、2题都考察了字符串的知识点,如果对字符串知识点不了解的学生就要多加小心了。
第3题是一道逻辑题目,有点类似2020年2月铜组P3 swapity swap。
USACO教研组老师为大家解析了本次公开赛铜组的题目。我们一起来看看~
P1题目:
P1 FEB:
Bessie and Elsie are plotting to overthrow Farmer John at last! They plan it out over (1 <= N <= 2 * 10 ** 5) text messages. Their conversation can be represented by a string S of length N where Is is either B or E, meaning the ith message was sent by Bessie or Elsie, respectively.
However, Farmer John hears of the plan and attempts to intercept their conversation. Thus, some letters of S are F, meaning Farmer John obfuscated the message and the sender is unknown.
The excitement level of a non-obfuscated conversation is the number of times a cow double-sends - that is, the number of occurrences of substring BB or EE in S. You want to find the excitement level of the original message, but you don’t know which of Farmer John’s messages were actually Bessie’s / Elsie’s. Over all possibilities, output all possible excitement levels of S.
INPUT FORMAT (input arrives from the terminal / stdin):
The first line will consist of one integer N.
The next line contains S
OUTPUT FORMAT (print output to the terminal / stdout):
First output K, the number of distinct excitement levels possible. On the next K lines, output the excitement levels, in increasing order.
SAMPLE INPUT:
4
BEEF
SAMPLE OUTPUT:
2
1
2
SAMPLE INPUT:
9
FEBFEBFEB
SAMPLE OUTPUT:
2
2
3
SAMPLE INPUT:
10
BFFFFFEBFE
SAMPLE OUTPUT:
3
2
4
6
SCORING:
• Inputs 4-8: N ≤ 10
• Inputs 9-20: No additional constraints.
USACO竞赛的第一道题目需要分析出题目的性质,分为F左右都有元素和F只有一边有元素进行讨论,问题转化之后就比较简单了。
考虑每一段"XFF...FFY"可以产生多少贡献
结论是如果X=Y,能产生0,2,4,6,...的贡献
否则能产生1,3,5,7,...的贡献
对于下面的情况,整体减一可以得到和上面一样的结论
再考虑边缘,FF...FFY可以产生多少贡献
发现能产生0,1,2,...的贡献
于是我们可以分别统计这两种,加上初始答案即可
代码如下:
#include <iostream>
using namespace std; #define rep(i,h,t) for (int i=h;i<=t;i++) #define dep(i,t,h) for (int i=t;i>=h;i--) int n; char s[200010]; bool t[200010]; int main() { scanf("%d",&n); scanf("%s",s+1); int O=0; rep(i,1,n) if (s[i]==s[i-1]&&s[i]!='F') O++; int Q1=0,Q2=0; rep(i,1,n) { if (s[i]=='F') { int j=i; while (s[j]=='F'&&j<=n) j++; j--; int num=j-i+1; if (i!=1&&j!=n) { if (s[i-1]==s[j+1]) num++; O+=num%2; Q1+=num/2; } else Q2+=num; i=j; } } rep(i,0,Q1) rep(j,0,Q2) t[i*2+j+O]=1; int OO=0; rep(i,0,n-1) if (t[i]) OO++; cout<<OO<<endl; rep(i,0,n-1) if (t[i]) cout<<i<<endl; return 0; }
犀牛教育计算机项目组的老师,针对今年的考试,给大家整理USACO公开赛真题解析,需要的可以咨询在线客服了解


犀牛USACO竞赛采用体系化的专业教材,将竞赛知识点和国际课程知识点整合。USACO教研组老师曾带出多名白金组学员,拥有专业的教学能力。
老师将根据不同学生的编程水平、学习能力、学习进度进行教学调整,从而真正地帮助每位同学提升自己的计算机能力,培养学科思维,帮助你在竞赛之中脱颖而出,赛出新高度!
为了便于大家理解,我们把USACO与AMC竞赛的难度做了简单的对比,参考如下👇
白金组≈AIME
黄金组≈AMC12
白银组≈AMC10
青铜组≈AMC 8
2022-2023赛季面向中国学生的最后一场比赛已经结束,参加的同学考的怎么样呢,计划长线备考USACO拿奖的同学,赶紧了解我们的课程!可咨询在线客服老师哟~
|
关键字:USACO,USACO课程,USACO竞赛,USACO培训,
|