2024年1月美国计算机奥赛USACO竞赛银奖组问题二——Test Tubes

Bessie has recently gotten into chemistry. At the moment, she has two different colors 1 and 2 of various liquids that don't mix well with one another. She has two test tubes of infinite capacity filled with N (1≤N≤105 ) units each of some mixture of liquids of these two colors. Because the liquids don’t mix, once they settled, they divided into layers of separate colors. Because of this, the two tubes can be viewed as strings f1f2…fN and s1s2…sN where fi represents the color of the liquid that is i units from the bottom of the first tube, and si represents the color of the liquid that is i units from the bottom of the second tube. It is guaranteed that there is at least one unit of each color of liquid.

Bessie wants to separate these liquids so that each test tube contains all units of one color of liquid. She has a third empty beaker of infinite capacity to help her in this task. When Bessie makes a "pour", she moves all liquid of color i
at the top of one test tube or beaker into another.

Determine the minimum number of pours to separate all the liquid into the two test tubes, and the series of moves needed to do so. It does not matter which test tube ends up with which color, but the beaker must be empty..

There will be T (1≤T≤10) test cases, with a parameter P for each test case.

Suppose the minimum number of pours to separate the liquids into the original tubes is M.

If P=1, you will receive credit if you print only M.
If P=2, you will receive credit if you print an integer A such that M≤A≤M+5, followed by A lines that construct a solution with that number of moves. Each line should contain the source and the destination tube (1, 2, or 3for the beaker). The source tube must be nonempty before the move and a tube may not be poured into itself.
If P=3, you will receive credit if you print M, followed by a valid construction using that number of moves.

INPUT FORMAT (input arrives from the terminal / stdin):

The first line contains T, the. number of test cases. For each test case, the next line contains N and P representing the amount each test tube is initially filled to, and the query type. The following line contains f1f2f3…fN representing the first test tube. fi∈{1,2} and f1 represents the bottom of the test tube. The subsequent line contains s1,s2,…,sN representing the second test tube.si∈{1,2} and s1 represents the bottom of the test tube.

It is guaranteed that there will be at least one 1 and one 2 across both input strings.

OUTPUT FORMAT (print output to the terminal / stdout):

For each test case, you will print a single number representing the minimum pours to separate the liquid in the test tubes. Depending on the query type, you may also need to provide a valid construction.

SAMPLE INPUT:

6
4 1
1221
2211
4 2
1221
2211
4 3
1221
2211
6 3
222222
111112
4 3
1121
1222
4 2
1121
1222

SAMPLE OUTPUT:

4
4
1 2
1 3
2 1
3 2
4
1 2
1 3
2 1
3 2
1
2 1
5
2 3
1 2
1 3
1 2
3 1
6
2 3
1 2
1 3
1 2
2 1
3 2

In the first three test cases, the minimum number of pours to separate the tubes is 4. We can see how the following moves separate the test tubes:

Initial state:

1: 1221
2: 2211
3:

After the move "1 2":

1: 122
2: 22111
3:

After the move "1 3":

1: 1
2: 22111
3: 22
After the move "2 1":
1: 1111
2: 22
3: 22

After the move "3 2":

1: 1111
2: 2222
3:

In the last test case, the minimum amount of pours is 5. However, since P=2, the given construction with 6 moves is valid since it is within 5 pours from the optimal answer.

SCORING:

Inputs 2-6: P=1
Inputs 7-11: P=2
Inputs 12-21: No additional constraints.

Additionally, it is guaranteed that T=10 for all inputs besides the sample.

Problem credits: Suhas Nagar

扫码领取USACO试题答案+详细解析

咨询一对一备赛规划

2024年1月美国计算机奥赛USACO竞赛银奖组问题一——Target Practice II

Note: The time limit for this problem is 2.5s, 1.25 times the default.

Note: The large size of integers involved in this problem may require the use of 64-bit integer data types (e.g., a "long long" in C/C++).

The Paris Moolympics are coming up and Farmer John is training his team of cows in archery! He has set up the following exercise on the 2D coordinate plane.

There are N(1≤N≤4⋅104) axis-aligned rectangular targets and 4N cows. Every cow must be assigned to a different target vertex. At moment i, for 1≤iN:

1.Target i appears.
2.The 4 cows assigned to its vertices shoot at them.
3.If a cow's shot passes through the interior of the target before it hits the assigned vertex or misses, the cows fail the exercise.
4.The target disappears to make space for the next one.

Each cow is located on the y-axis (x=0), and each target is a rectangle where target i has its lower left coordinate at and its upper right coordinate at The coordinates also satisfy (Note: X1 is the same for every target).

In addition, each cow has a "focus" angle they are working on. Therefore, they will turn at a specific angle when shooting. Given that their shot travels in a straight line from their position towards their assigned vertex, the trajectory of cow i's arrow can be described by si (0<|si |<109), the slope of the trajectory.

So that he can carefully examine the cows' technique, Farmer John wants to minimize the distance between the furthest cows. If Farmer John were to optimally assign each cow to a target vertex and place them on the y-axis, can you help him determine what the minimum distance between the furthest cows would be or if the cows will always fail the exercise?

Each input contains T (1≤T≤10) independent test cases. The sum of N across all test cases is guaranteed to not exceed 4⋅104.

INPUT FORMAT (input arrives from the terminal / stdin):

The first line contains T(1≤T≤10), the number of independent test cases. Each test case is described as follows:The first line of each test case contains two integers, N and X1, the number of targets and the left-most x-coordinate of the targets respectively.

This is followed by N lines with the i-th line consisting of three integers,and , the lower y-coordinate, the upper y-coordinate, and the right x-coordinate of the i-th target respectively.

The last line consists of 4N integers,s1,s2,…,s4N where si denotes the slope of cow i's shot trajectory.

OUTPUT FORMAT (print output to the terminal / stdout):

The minimum possible distance between the furthest cows or −1 if the cows will always fail the exercise.

SAMPLE INPUT:

3
2 1
1 3 6
4 6 3
1 -1 2 -2 3 -3 4 -4
2 1
1 3 6
4 6 3
1 1 2 2 3 3 4 4
2 1
1 3 3
4 6 3
1 -1 2 -2 3 -3 4 -4

SAMPLE OUTPUT:

17
-1
11

One optimal assignment for test case 1 is the following target vertices for cows 1-8 respectively:
(6,1),(6,3),(3,4),(3,6),(1,4),(1,3),(1,6),(1,1)

This gives the following y locations for cows 1-8 respectively:
−5,9,−2,12,1,6,2,5

This gives a minimum distance of 12−(−5)=17.

One reason the second test case is impossible is because it is impossible to shoot the vertex at (6,3)(the top right vertex of target 1) without the shot passing through the interior of target 1.

SCORING:

Input 2: |si|is the same for all 1≤i≤4N.
Input 3-9: The sum of N across all testcases is at most 1000.
Inputs 10-15: No additional constraints.

Problem credits: Suhas Nagar

扫码领取USACO试题答案+详细解析

咨询一对一备赛规划

2024年2月美国计算机奥赛USACO竞赛金奖组问题三——Quantum Moochanics

In her free time, Bessie likes to dabble in experimental physics. She has recently discovered a pair of new subatomic particles, named mootrinos and antimootrinos. Like standard matter-antimatter pairs, mootrinos and antimootrinos annihilate each other and disappear when they meet. But what makes these particles unique is that they switch their direction of motion (while maintaining the same speed) whenever Bessie looks at them.

For her latest experiment, Bessie has placed an even number N (2≤N≤2⋅105) of these particles in a line. The line starts with a mootrino on the left and then alternates between the two types of particles, with the i-th particle located at position pi (0≤p1<⋯<pN≤1018). Mootrinos initially move right while antimootrinos initially move left, and the i-th particle moves with a constant speed of si units per second (1≤si≤109).

Bessie makes observations at the following times:

First, 1 second after the start of the experiment.
Then 2 seconds after the first observation.
Then 3 seconds after the second observation.
...
Then n+1 seconds after the n-th observation.

During each observation, Bessie notes down which particles have disappeared.

This experiment may take an extremely long time to complete, so Bessie would like to first simulate its results. Given the experiment setup, help Bessie determine when (i.e., the observation number) she will observe each particle disappear! It may be shown that all particles will eventually disappear.

INPUT FORMAT (input arrives from the terminal / stdin):

Each input contains T(1≤T≤10) independent test cases.Each test case consists of three lines. The first line contains N, the second line contains p1,…, pN, and the third line contains s1…,sN.

It is guaranteed that the sum of all N does not exceed 2⋅105.

OUTPUT FORMAT (print output to the terminal / stdout):

For each test case, output the observation number for each particle's disappearance, separated by spaces.

SAMPLE INPUT:

4
2
1 11
1 1
2
1 12
1 1
2
1 11
4 6
2
1 11
4 5

SAMPLE OUTPUT:

9 9
11 11
1 1
3 3

For the first test, Bessie observes the following during the first 8
observations:

The mootrino (initially moving right) appears at positions 2→0→3→−1→4→−2→5→−3.
The antimootrino (initially moving left) appears at positions 10→12→9→13→8→14→7→15.

Then right at observation 9, the two particles meet at position 6 and annihilate each other.

For the second test, the antimootrino starts 1 additional unit to the right, so the two particles meet at position 6.5 half a second before observation 11.

Note that we only care about observation numbers, not times or positions.

SAMPLE INPUT:

2
4
1 3 5 8
1 1 1 1
4
1 4 5 8
1 1 1 1

SAMPLE OUTPUT:

1 1 3 3
7 2 2 7

For the first test:

The two leftmost particles meet at position 2 right at observation 1.
The two rightmost particles meet at position 6.5 half a second before observation 3.

SCORING:

Input 3 satisfies N=2.
Input 4 satisfies N≤2000 and pi≤104 for all cows.
Inputs 5-7 satisfy N≤2000.
Inputs 8-12 satisfy no additional constraints.

Problem credits: Aryansh Shrivastava, Benjamin Qi

扫码领取USACO试题答案+详细解析

咨询一对一备赛规划

2024年2月美国计算机奥赛USACO竞赛金奖组问题二——Milk Exchange

Farmer John's N(1≤N≤5⋅105)cows are lined up in a circle. The ith cow has a bucket with integer capacity ai (1≤ai≤109) liters. All buckets are initially full.

Every minute, cow i will pass all the milk in their bucket to cow i+1 for 1≤i<N, with cow N passing its milk to cow 1. All exchanges happen simultaneously (i.e., if a cow has a full bucket but gives away x liters of milk and also receives x
liters, her milk is preserved). If a cow's total milk ever ends up exceeding ai, then the excess milk will be lost.

After each of 1,2,…,N minutes, how much total milk is left among all cows?

INPUT FORMAT (input arrives from the terminal / stdin):

The first line contains N.

The next line contains integers a1,a2,…,aN

OUTPUT FORMAT (print output to the terminal / stdout):

Output N lines, where the i-th line is the total milk left among all cows after i
minutes.

SAMPLE INPUT:

6
2 2 2 1 2 1

SAMPLE OUTPUT:

8
7
6
6
6
6

Initially, the amount of milk in each bucket is [2,2,2,1,2,1].

After 1 minute, the amount of milk in each bucket is [1,2,2,1,1,1] so the total amount of milk is 8.

After 2 minutes, the amount of milk in each bucket is [1,1,2,1,1,1] so the total amount of milk is 7.

After 3 minutes, the amount of milk in each bucket is [1,1,1,1,1,1] so the total amount of milk is 6.

After 4 minutes, the amount of milk in each bucket is [1,1,1,1,1,1] so the total amount of milk is 6.

After 5 minutes, the amount of milk in each bucket is [1,1,1,1,1,1] so the total amount of milk is 6.

After 6 minutes, the amount of milk in each bucket is [1,1,1,1,1,1] so the total amount of milk is 6.

SAMPLE INPUT:

8
3 8 6 4 8 3 8 1

SAMPLE OUTPUT:

25
20
17
14
12
10
8
8

After 1 minute, the amount of milk in each bucket is [1,3,6,4,4,3,3,1] so the total amount of milk is 25.

SAMPLE INPUT:

10
9 9 10 10 6 8 2 1000000000 1000000000 1000000000

SAMPLE OUTPUT:

2000000053
1000000054
56
49
42
35
28
24
20
20

SCORING:

Inputs 4-5: N≤2000
Inputs 6-8: ai ≤2
Inputs 9-13: All ai are generated uniformly at random in the range [1,109].
Inputs 14-23: No additional constraints.

Problem credits: Chongtian Ma, Alex Liang, Patrick Deng

扫码领取USACO试题答案+详细解析

咨询一对一备赛规划

2024年2月美国计算机奥赛USACO竞赛金奖组问题一——Bessla Motors

**Note: The time limit for this problem is 3s, 1.5x the default. The memory limit for this problem is 512MB, twice the default.**

Farmer John would like to promote his line of Bessla electric tractors by showcasing Bessla's network of charging stations. He has identified N
(2≤N≤5⋅104) points of interest labeled 1…N, of which the first C
(1≤C<N) are charging stations and the remainder are travel destinations. These points of interest are interconnected by M (1≤M≤105) bidirectional roads, the i-th of which connects distinct points ui and vi (1≤ui,viN) and has length i miles (1≤i ≤109).

A Bessla can travel up to 2R miles (1≤R≤109) on a single charge, allowing it to reach any destination within R miles of a charging station. A destination is deemed well-connected if it is reachable from at least K(1≤K≤10) distinct charging stations. Your task is to assist Farmer John in identifying the set of well-connected travel destinations.

INPUT FORMAT (input arrives from the terminal / stdin):

The first line contains five space-separated integers N, M, C, R, and K. Each of the following M lines contains three space-separated integers ui, vi, and i such that uivi.

The charging stations are labeled 1,2,…,C. The remaining points of interest are all travel destinations.

OUTPUT FORMAT (print output to the terminal / stdout):

First, output the number of well-connected travel destinations on a single line. Then, list all well-connected travel destinations in ascending order, each on a separate line.

SAMPLE INPUT:

3 3 1 4 1
1 2 3
1 3 5
2 3 2

SAMPLE OUTPUT:

1
2

We have one charging station at 1. From this charging station, we can reach point 2(since it is distance 3 away from 1), but not point 3 (since it is distance 5 away from 1). Thus, only point 2 is well-connected.

SAMPLE INPUT:

4 3 2 101 2
1 2 1
2 3 100
1 4 10

SAMPLE OUTPUT:

2
3
4

We have charging stations at 1 and 2, and both points 3 and 4 are within distance 101 of both 1 and 2. Thus, both points 3 and 4 are well-connected.

SAMPLE INPUT:

4 3 2 100 2
1 2 1
2 3 100
1 4 10

SAMPLE OUTPUT:

1
4

SCORING:

Inputs 4 and 5: K=2 and N≤500 and M≤1000.
Inputs 6 and 7: K=2.
Inputs 8-15: No additional constraints.

Problem credits: Alexander Wei

扫码领取USACO试题答案+详细解析

咨询一对一备赛规划

2024年2月美国计算机奥赛USACO竞赛白金组问题三——Infinite Adventure

**Note: The memory limit for this problem is 512MB, twice the default.**

Bessie is planning an infinite adventure in a land with N (1≤N≤105) cities. In each city i, there is a portal, as well as a cycling time Ti. All Ti's are powers of 2, and T1+⋯+TN≤105. If you enter city i's portal on day t, then you instantly exit the portal in Ci,t  mod Ti.

Bessie has Q(1≤Q≤5⋅104) plans for her trip, each of which consists of a tuple (v,t,Δ). In each plan, she will start in city v on day t. She will then do the following Δ times: She will follow the portal in her current city, then wait one day. For each of her plans, she wants to know what city she will end up in.

INPUT FORMAT (input arrives from the terminal / stdin):

The first line contains two space-separated integers: N, the number of nodes, and Q, the number of queries.

The second line contains N space-separated integers: T1, T2,…,TN
(1≤Ti, Ti is a power of 2, and T1+⋯+TN≤105).

For i=1,2,…,N, line i+2 contains Ti space-separated positive integers, namely Ci,0,…,ci,Ti−1(1≤Ci,tN).

For j=1,2,…,Q, line j+N+2 contains three space-separated positive integers,vj,tj,Δj(1≤vjN, 1≤tj≤1018, and 1≤Δj≤1018) representing the j
th query.

OUTPUT FORMAT (print output to the terminal / stdout):

Print Q lines. The jth line must contain the answer to the jth query.

SAMPLE INPUT:

5 4
1 2 1 2 8
2
3 4
4
2 3
5 5 5 5 5 1 5 5
2 4 3
3 3 6
5 3 2
5 3 7

SAMPLE OUTPUT:

2
2
5
4

Bessie's first three adventures proceed as follows:

In the first adventure, she goes from city 2 at time 4 to city 3 at time 5, to city 4 at time 6, to city 2 at time 7.
In the second adventure, she goes from city 3 at time 3 to city 4 at time 4, to city 2 at time 5, to city 4 at time 6, to city 2 at time 7, to city 4 at time 8, to city 2 at time 9.

In the third adventure, she goes from city 5 at time 3 to city 5 at time 4, to city 5 at time 5.

SAMPLE INPUT:

5 5
1 2 1 2 8
2
3 4
4
2 3
5 5 5 5 5 1 5 5
2 4 3
3 2 6
5 3 2
5 3 7
5 3 1000000000000000000

SAMPLE OUTPUT:

2
3
5
4
2

SCORING:

Input 3:Δj≤2⋅102.
Inputs 4-5: N,∑Tj≤2⋅103.
Inputs 6-8: N,∑Tj≤104.
Inputs 9-18: No additional constraints.

Problem credits: Brandon Wang

扫码领取USACO试题答案+详细解析

咨询一对一备赛规划

2024年2月美国计算机奥赛USACO竞赛白金组问题二——Minimum Sum of Maximums

Bessie has N (2≤N≤300) tiles in a line with ugliness values a1,a2,…,aN in that order (1≤ai≤106). K(0≤K≤min(N,6)) of the tiles are stuck in place; specifically, those at indices x1,…,xK(1≤x1<x2<⋯<xKN).

Bessie wants to minimize the total ugliness of the tiles, which is defined as the sum of the maximum ugliness over every consecutive pair of tiles; that is, She is allowed to perform the following operation any number of times: choose two tiles, neither of which are stuck in place, and swap them.

Determine the minimum possible total ugliness Bessie can achieve if she performs operations optimally.

INPUT FORMAT (input arrives from the terminal / stdin):

The first line contains N and K.

The next line contains a1,…,aN .

The next line contains the K indices x1,…,xK.

OUTPUT FORMAT (print output to the terminal / stdout):

Output the minimum possible total ugliness.

SAMPLE INPUT:

3 0
1 100 10

SAMPLE OUTPUT:

110

Bessie can swap the second and third tiles so that a=[1,10,100], achieving total ugliness max(1,10)+max(10,100)=110. Alternatively, she could swap the first and second tiles so that a=[100,1,10], also achieving total ugliness max(100,1)+max(1,10)=110.

SAMPLE INPUT:

3 1
1 100 10
3

SAMPLE OUTPUT:

110

Bessie could swap the first and second tiles so that a=[100,1,10]
, achieving total ugliness max(100,1)+max(1,10)=110.

SAMPLE INPUT:

3 1
1 100 10
2

SAMPLE OUTPUT:

200

The initial total ugliness of the tiles is max(1,100)+max(100,10)=200
. Bessie is only allowed to swap the first and third tiles, which does not allow her to reduce the total ugliness.

SAMPLE INPUT:

4 2
1 3 2 4
2 3

SAMPLE OUTPUT:
9

SCORING:

Input 5: K=0
Inputs 6-7: K=1
Inputs 8-12: N≤50
Inputs 13-24: No additional constraints
Problem credits: Benjamin Qi

扫码领取USACO试题答案+详细解析

咨询一对一备赛规划

2024年2月美国计算机奥赛USACO竞赛白金组问题一——Lazy Cow

Bessie is hard at work preparing test cases for the USA Cowmputing Olympiad February contest. Each minute, she can choose to not prepare any tests, expending no energy; or expend 3a−1 energy preparing a test cases, for some positive integer a.

Farmer John has D (1≤D≤2⋅105) demands. For the ith demand, he tells Bessie that within the first mi minutes, she needs to have prepared at least bi test cases in total (1≤mi≤106,1≤bi≤1012).

Let ei be the smallest amount of energy Bessie needs to spend to satisfy the first i
demands. Print e1,…,eD modulo 109+7.

INPUT FORMAT (input arrives from the terminal / stdin):

The first line contains D. The ith of the next D lines contains two space-separated integers mi and bi .

OUTPUT FORMAT (print output to the terminal / stdout):

Output D lines, the ith containing ei mod 109+7.

SAMPLE INPUT:

4
5 11
6 10
10 15
10 30

SAMPLE OUTPUT:

21
21
25
90

For the first test case,

i=1: If Bessie creates [2,3,2,2,2] test cases on the first 5 days, respectively, she would have expended 31+32+31+31+31=21 units of energy and created 11
test cases by the end of day 5.

i=2: Bessie can follow the above strategy to ensure 11 test cases are created by the end of day 5, and this will automatically satisfy the second demand.

i=3: If Bessie creates [2,3,2,2,2,0,1,1,1,1] test cases on the first 10 days, respectively, she would have expended 25 units of energy and satisfied all demands. It can be shown that she cannot expend less energy.

i=4: If Bessie creates 3 test cases on each of the first 10 days she would have expended 32⋅10=90 units of energy and satisfied all demands.
For each i, it can be shown that Bessie cannot satisfy the first i demands using less energy.

SAMPLE INPUT:

2
100 5
100 1000000000000
SAMPLE OUTPUT:
5
627323485

SAMPLE INPUT:

20
303590 482848034083
180190 112716918480
312298 258438719980
671877 605558355401
662137 440411075067
257593 261569032231
766172 268433874550
8114 905639446594
209577 11155741818
227183 874665904430
896141 55422874585
728247 456681845046
193800 632739601224
443005 623200306681
330325 955479269245
377303 177279745225
880246 22559233849
58084 155169139314
813702 758370488574
929760 785245728062

SAMPLE OUTPUT:

108753959
108753959
108753959
148189797
148189797
148189797
148189797
32884410
32884410
32884410
32884410
32884410
32884410
32884410
3883759
3883759
3883759
3883759
3883759
3883759

SCORING:

Inputs 4-5: D≤100 and mi≤100 for all i
Inputs 6-8: D≤3000
Inputs 9-20: No additional constraints.

Problem credits: Brandon Wang and Claire Zhang

扫码领取USACO试题答案+详细解析

咨询一对一备赛规划

USACO晋级情况如何?USACO竞赛2023-2024赛季分数线汇总!

CS专业在留学圈中一直被视为兼具热度与难度、前景与钱景的专业。许多中学生志在CS专业,他们会通过参加各种相关活动及比赛来为自己的Profile增加专业光环。其中,USACO(国计算机奥林匹克竞赛)是一个参与度较高的比赛。

USACO晋级情况

满分晋级

如果选手在赛时拿到满分。可以在同一场比赛的时间段内再次参与高一个级别的比赛。也就是说,理论上可以在一场比赛的四天里面从青铜打到白金。

常规晋级

比赛结束后组织者根据全部选手的成绩划定分数线,分数线上的选手在下一场比赛的时候晋级到更高级别。

晋级分数线的划定不是固定的,是从这场比赛参赛选手的成绩根据比例反推的分数线。一般来说,在一场比赛的三道题当中,要拿到两道半才能晋级。

晋级率

USACO竞赛参赛人数越来越多,USACO竞赛在近几年的发展过程中:Bronze铜级别的通过率大概在15%左右,Silver银级别的通过率则是在5-6%之间,而Gold金级别的通过率则仅为2-3%。

USACO竞赛分数线

2023-2024赛季分数线:

2023-2024赛季 12月赛事

(Bronze铜级)分数线:青铜级别总参赛人数为12591,晋级分数线为700分+

(Silver银级)分数线:总参赛人数为3841,晋级分数线为750分+

(Gold金级)分数线:总参赛人数为1375,晋级分数线为800分+

(铂金级)分数线:铂金级别共有673名参赛学生

1月USACO比赛晋级分数线

Bronze铜级分数线:

总参赛人数为8454,晋级分数线为750分+。

Silver银级分数线:

总参赛人数为3920,晋级分数线为750分+。

Gold金级分数线:

总参赛人数为940,晋级分数线为800分+。

Platinum铂金级分数线:

铂金级别共有489名参赛学生。

扫码免费领取USACO计算机竞赛备考资料

金牌导师&精编讲义“强强联手”

扫码咨询USACO长线备考班、冲刺班课程详情,了解课程优惠!

USACO竞赛编程语言应该怎么选?USACO竞赛各级别能力有何要求?

近年来,随着国内信奥学习热度的不断增长,参加USACO计算机竞赛的国内选手人数也与日俱增。2024年度新赛季的USACO竞赛已经开启。虽然USACO是一个国的竞赛,但对于其他国家的同学来说也是非常友好的。

USACO竞赛各级别的能力要求:

铜级:

- 要求掌握基本编程知识,至少熟练掌握一种编程语言。

- 铜级问题通常没有太多的效率问题,重点在于理解题意,设计算法解决问题。

银级:

- 在铜级的基础上,引入了数据结构包括堆、栈、列表、树以及相对应的排序、搜索算法,并广泛应用。

- 算法的效率和复杂度成为重点,一般的简单方法如穷举法将不再适用。

金级:

- 在银级的基础上,要求掌握基本的数据结构如列表、堆、栈、集合、关联数组和相关的算法,并广泛应用。

- 需要应用更复杂的数据结构,包括树和图的算法,以及动态规划、数论和排列组合等。

铂金级:

- 要求对算法有深入了解,能够解决复杂问题和开放问题。

- 题目复合多种算法,还会涉及高难度辅助算法,思维难度大,编码工作量也在加大。

USACO竞赛编程语言应该怎么选?

根据年级选择

- 7年级之前,学生可以学习Python语言,因为它更容易入门。

- 7年级之后,学生们可以学习更多的语言,因为语言之间是相通的,如果掌握了一门语言的基础,学习其他语言会更容易。

- 到了10年级,建议学生掌握C++语言,特别是对于冲刺USACO更高阶的级别,或者冲刺NOI竞赛都非常有用。

根据竞赛级别/难度选择

- C++语言运行速度最快,在白金以上级别中使用较多,在集训队和国际竞赛级别应用广泛。

- Java是美国高中AP考试的编程语言,有不少考生考到白金和集训队。

- Python是新兴语言,适用于人工智能AI和大数据Data science,有更广阔的就业机会和前景。目前已经有不少考生用Python考到了金级。

根据个人兴趣、目标和竞赛级别来选择编程语言,这样可以更好地发挥自己的优势,提高在USACO竞赛中的竞争力。

扫码免费领取USACO计算机竞赛备考资料

金牌导师&精编讲义“强强联手”

扫码咨询USACO长线备考班、冲刺班课程详情,了解课程优惠!