Skip to content

Commit cdcf43a

Browse files
authored
Merge branch 'master' into eslint
2 parents bb05a87 + 5ffab75 commit cdcf43a

File tree

99 files changed

+5232
-3220
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+5232
-3220
lines changed

.github/(archived) module-review.md

-37
This file was deleted.

.github/workflows/build-tests.yml

+4
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ jobs:
1212
timeout-minutes: 30
1313
steps:
1414
- uses: actions/checkout@v2
15+
- name: Use Node.js 20.x
16+
uses: actions/setup-node@v1
17+
with:
18+
node-version: 20.x
1519
- uses: dart-lang/setup-dart@v1
1620

1721
- name: Cache node modules

.github/workflows/test.yml

+7-4
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ jobs:
1919
- uses: actions/checkout@v2
2020
with:
2121
fetch-depth: 0 # Required to retrieve git history of Chromatic
22-
22+
- name: Use Node.js 20.x
23+
uses: actions/setup-node@v1
24+
with:
25+
node-version: 20.x
2326
- name: Cache node modules
2427
uses: actions/cache@v2
2528
id: cache-node-modules
@@ -51,10 +54,10 @@ jobs:
5154
timeout-minutes: 30
5255
steps:
5356
- uses: actions/checkout@v2
54-
- name: Use Node.js 14.x
57+
- name: Use Node.js 20.x
5558
uses: actions/setup-node@v1
5659
with:
57-
node-version: 14.x
60+
node-version: 20.x
5861

5962
- name: Cache node modules
6063
uses: actions/cache@v2
@@ -70,7 +73,7 @@ jobs:
7073

7174
- name: run Lighthouse CI
7275
run: |
73-
npm install -g @lhci/cli@0.7.x
76+
npm install -g @lhci/cli@0.13.x
7477
lhci autorun
7578
env:
7679
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}

.github/workflows/update-usaco.yml

+4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ jobs:
1010
uses: actions/checkout@v2
1111
with:
1212
fetch-depth: 0
13+
- name: Use Node.js 20.x
14+
uses: actions/setup-node@v1
15+
with:
16+
node-version: 20.x
1317
- name: Checkout usaco-problems
1418
uses: actions/checkout@v2
1519
with:

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,6 @@ build.css
9191

9292
# for problem auto-updates
9393
usaco-problems/
94+
95+
# storybook
96+
storybook-static/

.storybook/preview.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,14 @@ export const parameters = {
4444
};
4545

4646
export const decorators = [
47-
renderStory => (
47+
Story => (
4848
<div className="grid storybook-container font-sans">
4949
<div className="h-full">
5050
<div className="p-4 sm:p-6 lg:p-8 max-w-4xl mx-auto">
5151
<p className="text-gray-800 text-2xl font-bold">Light Mode</p>
5252
<div className="h-4" />
5353
<DarkModeContext.Provider value={false}>
54-
{renderStory()}
54+
<Story />
5555
</DarkModeContext.Provider>
5656
</div>
5757
</div>
@@ -60,7 +60,7 @@ export const decorators = [
6060
<p className="text-gray-100 text-2xl font-bold">Dark Mode</p>
6161
<div className="h-4" />
6262
<DarkModeContext.Provider value={true}>
63-
{renderStory()}
63+
<Story />
6464
</DarkModeContext.Provider>
6565
</div>
6666
</div>

announcements/2021 Feb.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ order: 4
77

88
All problems from the
99
[USACO 2021 February Contest](http://www.usaco.org/index.php?page=feb21results)
10-
have been added to the USACO problem table [here](/general/usaco-monthlies).
10+
have been added to the USACO problem table [here](https://www.usaco.guide/general/usaco-monthlies).
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
date: 'Jan 25th, 2024'
3+
id: usaco-january-2024-workshop
4+
title: "USACO January 2024 Contest Workshop"
5+
order: 9
6+
---
7+
8+
Learn how to solve the Bronze/Silver problems by experienced instructors from the USACO Jan 2024 contest, from intuition to code!
9+
Find more information and the registration link for the workshop [here!](https://joincpi.org/workshops/jan24)

announcements/2024 Spring Classes.mdx

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
date: 'Jan 23th, 2024'
3+
id: usaco-spring-2024-classes
4+
title: "USACO Spring 2024 Classes Registration Open!"
5+
order: 7
6+
---
7+
8+
Registration for the Spring Session of USACO classes are now open! Head over to
9+
the [CPI website](https://joincpi.org/classes) to register!
+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
date: 'Jan 24th, 2024'
3+
id: usaco-spring-2024-tournament
4+
title: "USACO Spring 2024 Informatics Tournament Registration Open!"
5+
order: 8
6+
---
7+
8+
The USACO.Guide Spring 2024 Informatics Tournament will be held on March 2nd, 2024. Registration and details
9+
can be found [here!](https://joincpi.org/tournament)

announcements/Groups Open To Public.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ We're opening access to [USACO Guide Groups](/groups) to everyone! Groups is a
99
learning management system that allows assigning problems, posting
1010
announcements, and tracking progress with a leaderboard. Now, you're able to
1111
create your own group and invite your friends -- go to
12-
[the groups page](/groups) to get started.
12+
[the groups page](https://www.usaco.guide/groups) to get started.

announcements/Open Source.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ order: 3
88
If this project has helped you, consider
99
[giving us a star on Github](https://github.com/cpinitiative/usaco-guide)! As a
1010
fully open source project, we depend on community members like you to improve
11-
our product. Check out the [contributing](/general/contributing) module to learn
11+
our product. Check out the [contributing](https://usaco.guide/general/contributing) module to learn
1212
how you can help make the USACO Guide better.

content/3_Silver/Conclusion.problems.json

-12
Original file line numberDiff line numberDiff line change
@@ -290,18 +290,6 @@
290290
"kind": "internal"
291291
}
292292
},
293-
{
294-
"uniqueId": "lc-MaximizeValueOfFunctionInABallPassingGame",
295-
"name": "Maximize Value of Function in a Ball Passing Game",
296-
"url": "https://leetcode.com/contest/weekly-contest-360/problems/maximize-value-of-function-in-a-ball-passing-game/",
297-
"source": "LC",
298-
"difficulty": "Hard",
299-
"isStarred": false,
300-
"tags": ["Functional Graph"],
301-
"solutionMetadata": {
302-
"kind": "none"
303-
}
304-
},
305293
{
306294
"uniqueId": "cf-412D",
307295
"name": "Giving Awards",

content/4_Gold/.DS.swp

-12 KB
Binary file not shown.

content/4_Gold/DP_Trees.problems.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@
143143
"uniqueId": "usaco-1020",
144144
"name": "Delegation",
145145
"url": "http://www.usaco.org/index.php?page=viewproblem2&cpid=1020",
146-
"source": "Plat",
146+
"source": "Platinum",
147147
"difficulty": "Normal",
148148
"isStarred": false,
149149
"tags": ["DP", "Tree", "Binary Search"],

content/4_Gold/DSU.problems.json

+12-13
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,18 @@
9898
"solutionMetadata": {
9999
"kind": "internal"
100100
}
101+
},
102+
{
103+
"uniqueId": "cf-468B",
104+
"name": "Two Sets",
105+
"url": "https://codeforces.com/contest/468/problem/B",
106+
"source": "CF",
107+
"difficulty": "Normal",
108+
"isStarred": false,
109+
"tags": ["DSU"],
110+
"solutionMetadata": {
111+
"kind": "internal"
112+
}
101113
}
102114
],
103115
"harder": [
@@ -138,19 +150,6 @@
138150
"kind": "internal"
139151
}
140152
},
141-
{
142-
"uniqueId": "cf-468B",
143-
"name": "Two Sets",
144-
"url": "https://codeforces.com/contest/468/problem/B",
145-
"source": "CF",
146-
"difficulty": "Hard",
147-
"isStarred": false,
148-
"tags": ["DSU", "2SAT"],
149-
"solutionMetadata": {
150-
"kind": "autogen-label-from-site",
151-
"site": "CF"
152-
}
153-
},
154153
{
155154
"uniqueId": "onlinejudgeorg-war",
156155
"name": "War",

content/4_Gold/Tree_Euler.problems.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -135,13 +135,13 @@
135135
"uniqueId": "cf-1051F",
136136
"name": "The Shortest Statement",
137137
"url": "https://codeforces.com/contest/1051/problem/F",
138-
"source": "AC",
138+
"source": "CF",
139139
"difficulty": "Normal",
140140
"isStarred": false,
141141
"tags": ["Euler Tour"],
142142
"solutionMetadata": {
143143
"kind": "autogen-label-from-site",
144-
"site": "AC"
144+
"site": "CF"
145145
}
146146
},
147147
{

content/6_Advanced/BCC_2CC.mdx

+7-4
Original file line numberDiff line numberDiff line change
@@ -334,10 +334,13 @@ int main() {
334334
int a, b, c;
335335
cin >> a >> b >> c;
336336
a--, b--, c--;
337-
if (!is_cutpoint[c]) {
338-
cout << "YES" << '\n';
339-
} else if (on_path(id[a], id[b], id[c])) {
340-
cout << "NO" << '\n';
337+
// The path does not exist in two cases:
338+
// 1) a == c or b == c
339+
// 2) c is a cutpoint and it lies on path between a and b in block-cut
340+
// tree
341+
if (a == c || b == c ||
342+
(is_cutpoint[c] && on_path(id[a], id[b], id[c]))) {
343+
std::cout << "NO\n";
341344
} else {
342345
cout << "YES" << '\n';
343346
}

0 commit comments

Comments
 (0)