File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
atcoder-problems-frontend/src/utils Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -20,9 +20,15 @@ export type ContestCategory = typeof ContestCategories[number];
20
20
21
21
export const AGC_001_START = 1468670400 ;
22
22
23
+ const isAhc = ( contestId : string ) : boolean => {
24
+ return Boolean ( / ^ a h c \d { 3 } $ / . exec ( contestId ) ) ;
25
+ } ;
26
+
23
27
export const isRatedContest = ( contest : Contest ) : boolean => {
24
28
return (
25
- contest . rate_change !== "-" && contest . start_epoch_second >= AGC_001_START
29
+ contest . rate_change !== "-" &&
30
+ contest . start_epoch_second >= AGC_001_START &&
31
+ ! isAhc ( contest . id )
26
32
) ;
27
33
} ;
28
34
@@ -49,10 +55,6 @@ export const classifyContest = (contest: Contest): ContestCategory => {
49
55
return "AGC" ;
50
56
}
51
57
52
- if ( / ^ a h c \d { 3 } $ / . exec ( contest . id ) ) {
53
- return "AHC" ;
54
- }
55
-
56
58
if ( isRatedContest ( contest ) ) {
57
59
return classifyOtherRatedContest ( contest ) ;
58
60
}
@@ -67,6 +69,9 @@ export const classifyContest = (contest: Contest): ContestCategory => {
67
69
return "JAG" ;
68
70
}
69
71
72
+ if ( isAhc ( contest . id ) ) {
73
+ return "AHC" ;
74
+ }
70
75
if (
71
76
/ ( ^ C h o k u d a i C o n t e s t | ハ ー フ マ ラ ソ ン | ^ H A C K T O T H E F U T U R E | A s p r o v a | H e u r i s t i c s C o n t e s t ) / . exec (
72
77
contest . title
You can’t perform that action at this time.
0 commit comments