Skip to content

andyzhu23/Competitive-Programming

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome!

Hello, I am Andy Zhu, I am a high school student at St. George's School an undergrad at the University of Cambridge interested in Competitive Programming. This repo is just for me to review my own solutions

andy_zhu23 on DMOJ

Wizard_of_Orz on codeforces

Wizard_of_Orz on LeetCode

Wizard_of_Orz on AtCoder

to do list

task date time

past events

task date time score reflection
CCC 2023 Feb 15th 8:00am 63 FINALLY HAD ONE GOOD CCC
USACO Jan 2022 Platinum Jan 30th 9:00 100 too hard
USACO Dec 2022 Platinum Dec 19th 9:00 550(90th) Solved 1 problem, solve 2 next time :)
CF 825 Oct 10th 7:35 3829(131st best so far) Very good job skipping C2 and did D
CF 824 Oct 2nd 7:35 3593(192nd best so far) took too long to solve A and B
CF 821 Sept 19th 7:35 3772 bruh actually didn't think of dp for D2
CF 819 Sept 6th 7:35 2980 too slow, clear array for every test case
CF 813 August 13th 7:35 2876 didn't solve D :(
CF 812 August 6th 7:35 2806 didn't solve D :(
CF Edu_133 August 4th 7:35 3 didn't solve C, I am a failure :(
CodeTon 2 July 31st 7:05 3167 Do problems faster
CF 804 July 4th 7:35 2732 Didn't solve D :(
CF 803 June 28th 7:35 1857 got hacked :(
DMOPC June 27th 9:00 235 failed to solve P2, actually took 2 hour to think, brain is so slow
CF Global 21 Jun 25th 7:35am 5148(first time solve 5 problems!!!) made such a stupid mistake for E
CF 801 Jun 18th 7:35am 2071 picked the wrong root
CF Edu_130 Jun 12th 7:35am 4/6 Too many wrong subs!!!
CF 796 Jun 3rd 7:35am 2455 Got trolled by C, should've looked at E
CF 795 May 31st 7:35am 3592 should've checked C before submitting
ACSL Final May 28th whole day 35(Silver Medal) problem so cancer
CF Edu 129 May 23rd 7:35am 3 you win some, you lose some
mBit May 22nd 10am 2/10 should've looked at the leaderboard to do easier problems
CF 793 May 22nd 7:35 4151(211th best so far) I shouldnt've made 3 wrong sub for C
CF 789 May 8th 7:35 3081(266th best so far) didn't solve D :(
CF 788 May 6th 7:35 4021 actually failed A cause didn't put equal sign
CF 785 Apr 30th 7:35 2457 really close to solve D
DMOPC Apr Apr 24th 9:00 210 too slow debugging for P2
CF 782 Apr 17th 7:35 3197(482nd best so far) too slow, made so many WA on B
MALD 1 Apr 16th 9:00 310 actually failed C Orz
USACO US Open 2022 Platinum Mar 28th 6:00 0 Orz Orz Orz
USACO US Open 2022 Gold Mar 27th 1:00 1000 I love Bessie!!!
CF Edu 125 Mar 22nd 7:35am 3 problems need improvement
Google Kickstart Mar 19th 9:00pm 58 throw less template, wrong manacher alg
SAC Code Challenge 4 Mar 13th 9:00 500(AK) too slow debugging
CF 777 Mar 11 6:35 2707 fail to consider some cases for D
USACO 2022 Feb Feb 25th-28th 9:00 531 get better at expected dp
CF 772 Feb 20th 6:35 4076(best so far 558th) very good in terms of accuracy, but need improvement on time
CCC Senior Feb 16th 8:00 43 I shouldn't have focused on S5, I am actually bad
DMOPC 21 Feb Feb 10th - Feb 14th 9:00 52 P4 use bfs instead of dfs, go from the point not on path
CF 770 Feb 6th 6:35am 2844 look at parity
USACO 2022 Jan Jan 28th - Jan 31st 9:00 438 so clooooose to plaaaat
An Animal Contest 5 Jan 21th - Jan 24th 9:00 410 (8th best so far) keep it up, should've looked at P5 more
DMOPC Jan Jan 13th - Jan 17th 9:00 220 should've done P3, instead of focusing on P5
Mock CCC Senior 2 Jan 2 - Jan 16th 9:00 45 could've done P3, overcomplicated it
Hello 2022 Jan 3rd 6:35am 2140 I should just start from D next time
BSSPC 21 Senior December 26th - December 29th 9:00 330 (15th place best so far) think of out of bound earlier when debugging
An Animal Contest 4 December 23rd - December 27th 9:00 340 should've got full for problem 4
DMOPC December December 17th - December 20th 9:00 205 left the last hour, should've been able to solve P3
CF Deltix Autumn Nov 28th 6:35 - 8:05 3680 For D, I thought too much, should've just read data size more carefully
CF 756 Nov 25th 6:35 - 8:50 4/8 Got hacked for E1, F considered an extra step that is wrong
DMOPC November November 12th - 15th 9:00 210 Should've finished first problem quicker
DMOPC October October 8th -11th 9:00 230 should've attempted interactive, for problem 4 should've known how to do it
CF 747 Oct 8th 7:35 - 9:35 2764 too dumb, too slow
CF 746 Oct 3rd 7:35 - 9:35 1210 very sad that I missed on condition in the if statement for C
CF 742 Sept 5th 7:35 - 9:35 2921(first time solve 2250) Good thing I solved E
DMOPC September Sept 4th 9:00 - 9:00 200 I need to learn interactive problems!
CF Deltix21 Aug 29th 7:35 - 10:35 1298 Need more practices!
CF 741 Aug 26th 7:35 - 9:35 1276 Think case by case, and be patient when doing rough works
CF 740(div 2) Aug 24th 7:35 - 10:05 3678(598th/best so far) don't get stuck on using segment when you can use prefix sum
Kickstart round E Aug 21st 8:30 - 11:30 1062th place this one is hard
CF 739 Aug 18th 7:35am 4/7 Try to check answer before submission next time
CF 738 Aug 15th 7:35am 3254/best so far(798th) Should do questions faster and made one false submission
CF 737 Aug 9th 7:35am 1330 My brain too slow, do those questions faster
An Animal Contest 3 Aug 3rd 9:00pm 400/800 do questions faster, at least got back to purple
CF Edu_112 July 30th 7:35am 3/6 Getting back some skills after undergone 20 days of hell
CF 728 (Div 2) Jne 24th 8:35 am 2342 could've completed them faster
CF 727 June 20th 3:05 am 2108 Almost got the fourth question, could've finished problems quicker
DMOPC 21' June June 18th - June20th 9:00 am 120 For the second question I don't know how to output answers clockwise
CF LATOKEN June 13 8:35 am 2366 Too dumb to do interactive problem. Also remember to check long long before submission
DMOPC '21 May Contest May 28 - May 30 9:00 am 300 question 4 USE SET I am so dumbbbbb
An Animal Contest 2 May 7th - May 10th 9:00 pm 230 should've done question 3
DMOPC '21 April Contest April 23 2021 - April 25 2021, 2021 21:00 PDT - 21:00 PDT 200 Should've gotten partial for question 3
Google Kickstart 2021 round B April 18th 4:00am 41/100 good thing I got partial for C and D
Codeforces Round #713 April 10th 7:35am 4/7 I ran out of time
USACO 2021 US Open April 2nd 9:00am 394/1000 (Gold) P2 and P3 are out of my skill range currently
USACO 2021 Feburary Feb 17th 9:00am 800/1000 (Silver) P2 make the array bigger
USACO 2020 December Dec 18th 9:00am 900/1000 (Bronze) Final question using discretization

problems

CSP

Source Problems status skills needed rating
CSPS 2021 T2 complete dp, using multiple states ***
CSPJ 2022 T4 complete dp **
CSPJ 2022 T3 complete stack **
CSPJ 2022 T2 complete binary search **
CSPJ 2022 T1 complete don't be dumb *
CSPS 2022 T3 complete kind of hashing, simplify the problem ****
CSPS 2022 T1 complete travel two places, use math to combine cases ***
CSPS 2022 T2 complete use multiple sparse tables **

HDU

Source Problems status skills needed rating
HDU Winner Prediction complete greedily let 1 win for every m2 games containing 1, dinic all other games ***
HDU Matryoshka Doll complete dp ***
HDU Origrimmar complete answer is the same regardless, just simulate *
HDU backpack complete bitset, dp ***
HDU ball complete bitset, sorting ***
HDU copy complete do operation in reverse, bitset ***
HDU Link with Level Editor II complete two pointer, matrices ***
HDU Shinobu loves trips complete math **
HDU Luxury cruise ship complete do dp till the LCM of all three numbers ***
HDU Static Query on Tree complete segtree, hld, binary lifting ***
HDU alice bob complete 2 Ns can be viewed as 1 N - 1 **
HDU random complete understand expected value *

mBit

Source Problems status skills needed rating
2022 Spring P7 complete knapsack **
2022 Spring P9 complete get result with first time, check with all other times ***

NOIP && NOI

Source Problems status skills needed rating
NOI 2009 P4 complete minimum cut, get rid of cycle with tarjan ***
NOI 2008 P3 complete max flow, assume hire inf employers and build graph ***
NOI 2006 P4 complete minimum cut, flow means profit lost ****
NOIP 2015 Substring complete dp, rolling array ***
NOIP 2016 toy complete easy implementation **
NOIP 2016 classroom complete expected value dp ***
NOIP 2016 earthworm complete maintain three values, get max every time ***

Yet Another Contest

Source Problems status skills needed rating
C2 P6 complete li chao tree, convex hull trick ****
C2 P4 complete prim **

An Animal Contest

Source Problems status skills needed rating
C7 P5 complete find diameter ***
C7 P3 complete binary search or two pointer for the position using and not using portal **
C7 P2 complete reorganize the tree *
C7 P1 complete case by case *
C6 P3 complete math, frequency array ***
C5 P6 complete centroid decomposition, LCA, dijkstra *****
C5 P5 complete fenwick, two pointer ****
C5 P4 complete binary search, move big number first ***
C5 P3 complete dfs with range **
C5 P2 complete query 1 with all other numbers *
C5 P1 complete super easy implementation *
C4 P4 complete throw l bananas, throw randomly doesn't matter, but last throw go to f **
C4 P3 complete choose a reference coordinate, if two points with the same slope shoot to the same reference, then they form a pair **
C4 P2 complete maintain a prefix lcm, and binary search ***
C4 P1 complete super easy implementation *
C3 P4 complete greedy, a bit of math ***
C3 P3 complete sorting, greedy **
C3 P2 complete greedy *
C3 P1 complete implementation *
C2 P1 Koala Konundrum complete greedy **
C2 P2 Koala Party complete case enumeration **
C2 P3 Koala Balloon complete binary search, prefix sum ***
C2 P4 Koala Gambling complete case enumeration, greedy ***
C2 P5 Koala Carnival complete Segment Tree, two pointer, binary search *****
C2 P6 Koala Transport System complete heavy light decomposition ***

Google Kickstart

Source Problems status skills needed rating
22 Round B Problem C complete interval dp, a dimension to maintain right or left it was transitioned ***
22 Round B Problem B complete brute force *
22 Round B Problem A complete math *
22 Round A Problem C complete bitmask dp ***
22 Round A Problem B complete math *
22 Round A Problem A complete super easy implementation *
21 Round H Problem B complete fake dp *
21 Round H Problem A complete Greedy *
21 Round F Problem A complete binary search *
21 Round E Problem C complete Disjoint Set Union, merge palindrom elements ***
21 Round E Problem A complete shuffle string by swaping *
21 Round B Problem D complete Segment Tree, offline/unsynchronized calculation, dfs ****
21 Round B Problem C complete Maximum interval between primes **
21 Round B Problem B complete Pre-fix Sum, total three cases **
21 Round B Problem A complete enumeration *

DMOPC Problems

Source Problems status skills needed rating
DMOPC 19 c3 P4 complete dp **
DMOPC 19 c7 P4 complete matrix ***
DMOPC 19 c7 P5 complete cdq divide and conquer ***
DMOPC 16 c4 P4 complete Mo's algorithm **
DMOPC 19 c4 P3 complete dp **
DMOPC 19 c6 P4 complete map on fenwick tree, don't use segment **
DMOPC 15 c5 P5 complete don't use HLD, use fenwick + Euler tour **
DMOPC 22 c2 P2 complete inverse pair **
DMOPC 22 c2 P3 complete use graph theory, topological sort ***
DMOPC 18 c3 P4 complete find centroid of all z, then sum of depth ***
DMOPC 19 c2 P3 complete 20 fenwicks **
DMOPC 21 c10 P2 complete either not move 1, not move 2, or move 1 and 2 **
DMOPC 21 c10 P1 complete basic stack *
DMOPC 20 c7 P5 complete literally samething as NOI06p4, just gotta do ll ****
DMOPC 21 Apr P2 complete odd even have same sum **
DMOPC 21 Apr P1 complete easy multiset **
DMOPC 21 Mar P2 complete linked list **
DMOPC 21 Feb P4 complete A to B cover up C or D ***
DMOPC 21 Feb P3 complete bfs with pq **
DMOPC 21 Feb P2 complete greedy, just consecutive 0s are important **
DMOPC 21 Feb P1 complete greedy *
DMOPC 21 Jan P2 complete game theory dp, only three possible cases ***
DMOPC 21 Jan P1 complete odd number first, then even number **
DMOPC 21 Jan P1 complete number theory *
DMOPC 21 Dec P3 complete nothing to do with coding, pure math **
DMOPC 21 Dec P2 complete prime sieving *
DMOPC 21 Dec P1 complete geometry and slopes *
DMOPC 21 Nov P4 complete use DSU to merge groups, use segtree that store sizes for each value ****
DMOPC 21 Nov P2 complete only consider separate into two ***
DMOPC 21 Nov P1 complete interactive big brain **
DMOPC 21 Oct P4 complete monotone queue dp, calculate l and r in O(n) ***
DMOPC 21 Oct P3 complete randomize all the unknown number ***
DMOPC 21 Oct P2 complete two arrays, keep track of index and value **
DMOPC 21 Oct P1 complete binary search, prefix sum ***
DMOPC 16 c4 P5 complete dsu, dfs ***
DMOPC 21 Sept P3 complete interactive, merge two disjoint sets and redirect all edges in each query ***
DMOPC 21 Sept P2 complete remove as "consecutive" as possible **
DMOPC 21 Sept P1 complete greedy, go by two each time *
DMOPC 21 June P4 complete heavy light decomposition, store how many son nodes are safe ***
DMOPC 21 June P2 complete store lines in a set with pair<pii, pii> ***
DMOPC 21 May P3 complete dfs, reverse graph, greedy ***
DMOPC 21 May P2 complete greedy ***
DMOPC 21 May P1 complete kind of two pointer, greedy **
DMOPC 15 Contest 2 Personal Assistant complete knapsack problem, discretization, binarySearch ***
DMOPC 20 Contest 5 Home Row complete enumeration *
DMOPC 20 Contest 5 On the Clock complete enumeration, double inacurrate **
DMOPC 20 Contest 4 Beautiful Grid complete Greedy, enumeration ***
DMOPC 20 Contest 4 Roving Roombas complete Block Matrix, binarySearch ****

Mock USACO

Source Problems status skills needed rating
wlxsq 华盛顿的斧子 complete DSU, kruskal ***
wlxsq 绝地求生 complete segtree ***
wlxsq 红叶配绿花 complete binary search, subtract red by a value ****
wlxsq 招待 complete ternary **
wlxsq 小说 complete two dimensional dijkstra **
wlxsq DNA complete easy hashing **
wlxsq 种树 complete dp ***
wlxsq 旅游景点 complete graph don't have to be connected, lca, connect edges not connected to node 1 ~ k first **
wlxsq calc complete binary lifting ****
wlxsq travel complete dfs *

USACO Problems

Source Problems status skills needed rating
USACO 2022 Dec Platinum P1 complete only run dfs if going through edge is better, this solution probably cheese ***
USACO 2022 Dec Platinum P2 complete dsu, merge small to big ***
USACO 2021 Jan Platinum P1 complete segtree maintain the number of numbers not swappable before the current number ***
USACO 2020 Jan Platinum P1 complete dsu, dp on DAG **
USACO 2019 Dec Platinum P2 complete Euler tour, remove operations using bst ***
USACO 2021 Dec Platinum P1 complete segment tree store graph, build reverse graph, create super node, make sure every given segment is a single point ****
USACO 2017 Feb Platinum P2 complete segment tree to store the dp state with the maximum roads you can have with last road on that position ****
USACO 2019 Dec Platinum P1 complete interval dp ****
USACO 2021 US Open Platinum P1 complete segment tree to calculate number of sets for all l as r is enumerated ****
USACO 2021 Feb Platinum No time to cry complete answer equal to length minus pairs of same color such that they can be drawn with one bruh stroke ***
USACO 2020 Dec Platinum Sleeping cows complete dp, add dimensions *****
USACO 2017 Jan Platinum Promotion Counting complete Persistent tree, dfs order *****
USACO 2017 Feb Platinum Why did the Cow Cross the Road I complete Fenwick, shift both a and b ***
USACO 2016 Feb Platinum Fenced In complete Greedy, MST, open up all row or col at once *****
USACO 2015 Dec Platinum Max Flow complete Lazy, sparse table lca ***
USACO 2015 Jan Gold P3 complete layered graph, tarjan ***
USACO 2022 Dec Gold P1 complete dp, sort according to x, set x to 0 after using it as much as possible ***
USACO 2022 Dec Gold P2 complete monotonic set, use segtree instead of std::set ***
USACO 2022 Dec Gold P3 complete greedy forward, dsu backward ***
USACO 2017 Open Gold P3 complete pick interval end earliest, use linked list to check whether or not possible ***
USACO 2017 Jan Gold Hoof, Paper, Scissors complete prefix mx **
USACO 2006 October Gold Building the Moat complete convex hull **
USACO 2007 Open Gold Dining complete dinic, make each cow an edge ***
USACO 2022 Open Gold P3 complete maintain max l and min r for all subtrees ****
USACO 2022 Open Gold P2 complete standard dp, 0 and 1 are special cases ***
USACO 2022 Open Gold P1 complete realise two inequalities and use map ****
USACO 2022 Feb Gold P3 complete only connect nodes from the same row once **
USACO 2022 Jan Gold P2 complete do operations in reverse ***
USACO 2022 Jan Gold P1 complete dynamic programming, prefix sum ***
USACO 2018 Dec Gold fine dining complete dijkstra, spfa, create a super node ***
USACO 2021 Dec Gold pair up complete dp, binary search ****
USACO 2021 Dec Gold HILO complete monotonic stack, enumerate rank, and then store position ****
USACO 2019 Jan Gold sleepy complete shortest length is the total length subtract longest decreasing suffix ***
USACO 2019 Jan Gold poetry complete dp, at last, calculate number of ways for one rhyme class, then multiply all together later ***
USACO 2019 Jan Gold shortcut complete dijkstra, build the tree last, very important, otherwise order is messed up ***
USACO 2019 Feb Gold barn painting complete 2d lazy, enumerate 2 column and use prefix sum, two rectangle most have one axis to separate ****
USACO 2019 Feb Gold dishes complete binary searching, simulation ***
USACO 2020 Feb Gold delegation complete dp, only one path can lead up the tree, all rest need to be matched ***
USACO 2020 Dec Gold P3 complete two pointers, flip the coordinates for easier implementation ****
USACO 2019 US Open Gold P3 complete enumerating how many 1s is passed from left to right and vise versa ***
USACO 2019 US Open Gold P1 complete dp, sparse table **
USACO 2019 US Open Gold P2 complete minimum spanning tree, the kth biggest edge, prim O(n^2) ***
USACO 2020 Jan Gold threesum complete interval dp, consider two end points to update, use array instead of unordered_map, delete only the added ***
USACO 2020 Jan Gold boards complete segment tree, remember to sort by y as well, write transition out ***
USACO 2020 Jan Gold Time is Mooney complete dp add dimension, reverse graph, remember to initialize **
USACO 2021 Feb Gold Stone Game complete game theory, mirror moves, find odd occurrence ****
USACO 2019 Dec Gold moortal cowmbat complete dp, floyd algorithm, prefix sum ***
USACO 2019 Dec Gold milk_pumping complete dijkstra's algorithm, another dimension for flow rate ***
USACO 2021 Jan Gold telephone complete only connect the closest breeds, connecting to further cows will only produce same result ***
USACO 2021 Jan Gold Uddered But Not Herd complete bitmask dp, only 20 char, in dp statement, choose a letter to be the most afterward ****
USACO 2020 Dec Gold Bovine Genetics complete dynamic programming, express the last two segments in dp statement ****
USACO 2015 Feb Gold Censoring complete Hashing ****
USACO 2019 Feb Gold Cow Land complete easy heavy light decomposition ***
USACO 2020 Feb Gold Exercise complete knapsack problem, add to n, sum of LCM ****
USACO 2020 Feb Gold Help Yourself complete lazy, each segment contribute 1 when no other segment cover its beginning ****
USACO 2020 Feb Gold TimeLine complete SPFA, remember to include the property less than m ****
USACO 2020 US Open Gold Favorite Color complete disjoint set union, merge edges ***
USACO 2020 US Open Gold Hair Cut complete fenwick, each time add inverse pair end with j ***
USACO 2007 Nov Gold Cow Relays complete binary rate multiply, floyd algorithm ****
USACO 2003 Fall Gold Puck Just Me complete Tarjan ****
USACO Training Bessie come Home complete dijkstra, reverse graph **
USACO Training Riding the Fence complete Euler Circuit, Hierholzer's Algorithm ***
USACO 2005 Dec Gold Layout complete Bellman-Ford, -1 for negative ring, -2 for not connected. turn Differential constraint into graphs ****
USACO 2011 Open Gold Mowing the Lawn complete monotone queue dynamic programming ***
USACO 2008 Jan cow race complete floyd algorithm ***
USACO 2021 Open Gold Portals complete Kruskal, turn cycles into vertices ****
USACO 2006 Nov Gold cowfood complete bitmasking, dynamic programming ***
USACO 2016 Feb Gold Fenced In complete MST algorithm, separate into horizontal and vertical lines ****
USACO 2019 Dec Gold Milk Visits complete Sparse Table, offline/unsynchronized calculation ****
USACO 2021 US Open Gold United Cows of Farmer John complete enumerate r, binary search l, revisited with Fenwick tree **
USACO 2008 Nov Gold Switching light complete Segment Tree, interval update **
USACO 2017 Jan Gold Balanced Photo complete Segment Tree, discretization **
USACO 2021 Feb Gold Modern Art 3 complete Dynamic Programming ***
USACO 2022 Dec Silver P3 complete get an answer from adjacent, check the answer **
USACO 2022 Dec Silver P2 complete game theory, realize formula ***
USACO 2022 Dec Silver P1 complete first send up, then send down ***
USACO 2017 Dec Silver P1 complete psa **
USACO 2021 Dec Silver P3 complete lazy array **
USACO 2021 Dec Silver P2 complete DSU, find length to 1 and n **
USACO 2020 Jan Silver Loan_Repayment complete skipping repeated terms ***
USACO 2018 Feb Silver Snow Boots complete implementation **
USACO 2015 Feb Silver Censoring complete Hashing ****
USACO 2020 Jan Silver Berry Picking complete greedy + enumerate berries in Elsie's buckets ***
USACO 2019 Dec Silver Milk Visits complete Sparse Table **
USACO 2021 US Open Silver Do You Know ABCs? complete enumeration, brute force **
USACO 2021 Feb Silver Comfortable Cows complete implementation *
USACO 2021 Feb Silver Year of the Cows complete Greedy *
USACO 2021 Feb Silver Just Green Enough complete Monotone Stack ****
USACO 2021 Jan Silver Dance Mooves complete DFS, Graph Theory **
USACO 2021 Jan Silver No Time to Paint complete Prefix Sum, Suffix Sum ***
USACO 2021 Jan Silver Spaced Out complete enumeration, knowing two lines give the whole grid ***
USACO 2020 Dec Silver Cowntagion complete Graph Theory, Tree **
USACO 2020 Dec Silver Rectangular Pasture complete 2D Prefix - sum, Multiplication Principle ****
USACO 2020 Dec Silver Stuck in a Rut complete Discretization, priority_queue, Topological order *****
USACO 2020 Feb Silver P1 complete binary lifting **
USACO 2020 US Open Bronze P2 complete don't be dumb *
USACO 2016 US Open Bronze P1 complete psa *
USACO 2020 Dec Bronze Stuck in a Rut complete Discretization, priority_queue *****

CCO Problems

Source Problems status skills needed rating
CCO 17 P4 complete sort pillar from greatest to smallest, bitmask dp ***
CCO 16 P5 complete linesweep, segtree ***
CCO 15 P6 complete inclusion principle, 2d stuffs ***
CCO 19 P2 complete heap, simulation, dsu ***
CCO 08 P3 complete brute force checking, use dep and sz to optimize **
CCO 03 P6 complete tarjan **
CCO 09 P5 complete segtree, merge operations **
CCO 18 P3 complete dp, case by case ***
CCO 18 P2 complete cancerous thinking **
CCO 19 P1 complete bitmask dp **
CCO 19 P5 complete same as USACO Dec 2022 **
CCO 01 P6 complete easily check "will become", use dinic to check "may"/"will not" ***
CCO 11 P4 complete multiset, greedy *
CCO 20 P1 complete coordinate compression, difference array **
CCO 17 P5 complete same as buying everything first, assume every item lower than the want value of current one has been obtained ***
CCO 21 P2 complete brute force dfs ***
CCO 21 P1 complete separate into two sets, one appear more than 100 times, and another less than 100 times, swap = inversion pair ***
CCO 14 P5 complete easy greedy **
CCO 20 P2 complete number of swap = number of inversion, from last element, search for maximum spot to place ***
CCO 14 P2 complete run dijkstra from A and B(reverse graph), calculate offline **
CCO 18 P4 complete do two binary searches together ***
CCO 16 P6 complete splay ****
CCO 05 P4 complete use bitset, prime seiving **
CCO 15 P6 complete 5 dimension dp, super cancer ***
CCO 22 P2 complete first check YES/NO, stack to buy umbrella, difference array ***
CCO 05 P5 complete dp **
CCO 22 P1 complete two pointer/binary search, find cycle **
CCO 15 P4 complete topological order **
Mock CCO 18 P2 complete greedy, break into x + t, x - t ***
Mock CCO 18 P3 complete second shortest path ***
CCO 12 P2 complete second shortest path ***
CCO 98 P1 complete big number *
CCO Mock 18 P4 complete check negative cycle with bellman ford **
CCO 2010 P2 complete dp on trees, knapsack ***
CCO Mock 19 P1 complete reverse merge ***
CCO 2014 P3 complete dp on trees, knapsack ***
CCO 2014 P1 complete dp **
CCO 2010 P6 complete binary lifting ***
CCO Prep packing up complete convex hull trick, use __int128 ****
CCO 2018 P1 complete LCS **
CCO 2013 P3 complete find half of perimeter ****
CCO 2015 P2 complete Bitmasking ****

CCC Problems

Source Problems status skills needed rating
CCC 2023 J5 complete easy dfs, optional hashing **
CCC 2023 S4 complete sort edge based on C, remove based on dijkstra **
CCC 2023 S3 complete case by case, cancerous ***
CCC 2023 S2 complete enumerate middle and expand *
CCC 2023 S1 complete trivial *
CCC 2022 S5 complete cancerous tree dp ***
CCC 2022 S4 complete psa, cancerous counting ***
CCC 2011 S4 complete maximum flow **
CCC 2022 S3 complete put numbers in increasing order ***
CCC 2022 J5 complete sorted based on x axis ***
Mock CCC 2022 1 S4 complete Mo algorithm, reset left point, only expanding, don't use vectors or hashing structure, just array ****
Mock CCC 2022 2 S3 complete hashing ***
CCC 2002 S4 hard complete segment tree, change result from i to the rightmost element greater than one ***
CCC 2020 S5 complete dp, only last position of a burger matters, if need to randomly choose, the subset is always the same ****
CCC 1996 S5 complete easy minimum segtree ***
CCC 2003 S5 complete mst, dfs ***
CCC 2019 S5 complete divide and conquer, best solution for sub triangle is when it crosses the centroid (2/3) n *****
CCC 2020 on DMOJ J4_hard complete Rolling Hash ****
CCC 2010 S5 complete DP on a tree, trade memory for time ***
CCC 2003 S4 complete if all substrings of length X are distinct, then all substring of X+1 should also be distinct ***
CCC 2009 S4 complete dijkstra **
CCC 2011 S4 complete disjoint set, reading input correctly ***
CCC 2010 S3 complete binary search **
CCC 2011 S5 complete bitwise operation, bfs **
CCC 2019 S4 complete Dynamic Programming, Sparse Table, Greedy *****
CCC 2019 S4v2 complete segment tree, subtract by infinity, no worry about days ****
CCC 2017 S5 complete block matrix, block[l] == block[r] not l == r *****
CCC 2018 S5 complete Calculate Flights and Portals separately, link all portals/flights except those already connected *****
CCC 2012 S4 complete Brute Force, BFS, java is op(passing array into queue), c++ pointer ***
CCC 2021 S5 complete Greedy, Segment Tree, lazy, lcm, gcd *****
CCC 2013 S4 complete turn situation into a graph *
CCC 2013 S3 compelte enumeration *
CCC 2019 J5 complete run dfs twice ***
CCC 2016 S5 complete Binary rate multiply, xor *****
CCC 2015 S5 complete Dynamic Programming, Greedy, four dimensional dp state ****
CCC 2017 S4 complete Kruskal algorithm, MST problem, run MST twice to see if a non-active pipe can be replaced ****
CCC 2014 S4 complete Discretization ***
CCC 2014 S5 complete Dynamic Programming, save the result last time to avoid collision with other results ****
CCC 2020 S4 complete enumeration, greedy ****
CCC 2020 S3 complete Rolling Hash, compute hash value twice ****
CCC 2018 S4 complete Dynamic Programming, multiplication ***
CCC 2021 S1 complete implementation, double is not accurate *
CCC 2021 S2 complete using two arrays instead of a 2d array *
CCC 2021 S3 complete Prefix Sum, Binary Search, Math ****
CCC 2021 S4 complete Reversed graph, Dijkstra, priority_queue ***
CCC 2015 S4 complete SPFA, add a dimension **
CCC 2002 S4 complete Doing dp in an interval ***
CCC 2001 S3 complete Disjoint Set **
CCC 2009 S3 complete toxic *
CCC 2005 S5 complete fenwick **
CCC 2008 S5 complete game theory dp **

IOI Problems

Source Problems Status Skills needed rating
IOI 2015 P4 complete use log value to compare **
IOI 2002 P4 complete convex hull trick ***
IOI 2006 P2 complete use fenwick on rmq ***
IOI 1998 P4 complete coordinate compression, line sweep, difference array **
IOI 2010 P3 complete binary search, prefix sum ***
IOI 2004 Empodia complete montonic stack to store min and max, two nodes is okay if value - index is the same ***
IOI 1996 Network of Schools complete Tarjan scc ***
IOI 1994 The Triangle complete standard dp *

Codeforces Problems

Source Problems status skills needed rating
CF 604 E complete minimize $\frac{x^2}{2}$ using max flow ****
CF 884 D complete dp, get all factors **
CF 884 C complete dp, odd length can be 0 **
CF 292 D complete dsu on tree, diameter of tree ***
CF Beta 3 D complete put all ), if not okay, replace with cheapest ( **
CF 722 D complete add edges between adjacent nodes ****
CF 872 D2 complete count number of occurence of edges, + 1 to get result for nodes ***
CF 873 E complete manacher + segtree + dp ***
CF 200 D complete heavy light decomp **
CF Edu_111 E complete binary search, bitmask dp ***
CF 852 F complete binary search for left, everytime decrease by average, use segment tree maintain answer for l ****
CF 845 E complete binary search, scc, dsu ***
CF 845 D complete expected value ***
CF 845 C complete sort, two pointer **
CF 845 B complete math, all permutation are the same *
CF 845 A complete trivial *
CF Hello 2023 F complete odd tree makes no difference even can be turned to 0 ***
CF Hello 2023 D complete monotonic stack, dsu **
CF Hello 2023 C complete use min or max instead of current element **
CF Hello 2023 B complete do some algebra *
CF Hello 2023 A complete trivial *
CF Polynomial Round 2022 E complete binary lifting **
CF Polynomial Round 2022 D complete two pointer **
CF Polynomial Round 2022 C complete observation **
CF Polynomial Round 2022 B complete sort **
CF Polynomial Round 2022 A complete change everytime see 1 *
CF 832 D complete case by case ***
CF 832 C complete whoever have the minimum **
CF 832 B complete don't be dumb *
CF 832 A complete don't be dumb *
CF 831 E complete simple dp **
CF 831 D complete only 2 blank spaces are required **
CF 831 C complete let a number be in 2, one of the other number must be either max or min **
CF 831 B complete long long *
CF 831 A complete don't be dumb *
CF 830 C complete realize f(l, r) <= f(l, r + 1), enumerate first 32 non-zero L because of pigeon hole, binary search r ***
CF 830 B complete be careful of 0 *
CF 830 A complete answer can only be 0, 1, 2 *
CF 829 E complete basic expected value **
CF 829 D complete simple math *
CF 829 C complete group with previous one to change sign **
CF 829 B complete greedy *
CF 829 A complete don't be dumb *
CF Edu_138 E complete turn into graph, dijkstra ***
CF Edu_138 D complete make sure to either mod or use __int128 **
CF Edu_138 C complete binary search *
CF Edu_138 B complete don't be dumb *
CF Edu_138 A complete don't be dumb *
CF 828 F complete go to the next smallest number, do some math for median ***
CF 825 D complete group every consecutive two numbers, connect if 01 or 10 ***
CF 825 C1 complete segment tree + binary search **
CF 825 B complete take lcm and check if it is okay *
CF 825 A complete don't be dumb *
CF 824 D complete enumerating, use set **
CF 824 C complete dsu, implementation **
CF 824 B complete math *
CF 824 A complete math *
CF Global 22 D complete topological order ***
CF Global 22 C complete logic **
CF Global 22 B complete implementation *
CF Global 22 A complete implementation *
CF 821 D1 complete if not two consecutive, then always just use all y **
CF 821 C complete set a[1] = a[n], then update accordingly **
CF 821 B complete always a win follow by some lose *
CF 821 A complete don't be dumb *
CF Edu_135 D complete dp **
CF Edu_135 C complete look at maximum **
CF Edu_135 B complete pattern *
CF Edu_135 A complete easy *
CF 819 D complete dsu, use red to do a tree, remaining edge might form cycle, in that case, relink edges ***
CF 819 C complete logic **
CF 819 B complete case by case *
CF 819 A complete case by case *
CF Edu_134 D complete bit by bit, every number in a, there must be a reverse in b ***
CF Edu_134 C complete for min, use two pointer, for max, find leftmost r such a[r] > b[r - 1] ***
CF Edu_134 B complete check border *
CF Edu_134 A complete don't be dumb *
CF 813 C complete greedy **
CF 813 B complete swap adjacent *
CF 813 A complete easy *
CF 812 D complete interactive, eliminate 3 elements with 2 moves ***
CF 812 C complete dp **
CF 812 B complete minimum must be on either side *
CF 812 A complete don't be stupid *
CF Edu_133 D complete dp, cannot make more than around sqrt(N) jumps ***
CF Edu_133 B complete don't be stupid *
CF Edu_133 A complete don't be stupid *
CF 811 G complete simple binary lifting **
CF 811 E complete turn everything into 2 suffix and check modulo 20 **
CF 811 D complete dp **
CF 811 C complete pattern *
CF 811 B complete don't be dumb *
CF 811 A complete don't be dumb *
CodeTon 2 E complete simulate N times to remove middle 0s, topological sort add up all a ***
CodeTon 2 D complete subtracting two sequences ***
CodeTon 2 C complete simple math **
CodeTon 2 B complete set up range **
CodeTon 2 A complete check suffix *
CF 810 C complete just at least two columns for every color **
CF 810 B complete basic thinking *
CF 810 A complete big brain observation *
CF 809 E complete LCA, segtree, dsu ****
CF 809 D1 complete get all numbers, go from small to big **
CF 809 C complete odd even property *
CF 809 B complete odd even property **
CF 809 A complete very easy implementation *
CF 808 D complete just simulate ***
CF 808 C complete compute backwards ***
CF 808 B complete number don't have to be distinct, ith gcd be i **
CF 808 A complete gcd **
CF 807 E complete turn into binary number add and sub 1s ***
CF 807 D complete remove duplicates to check, then store starting and ending position and subtract ***
CF 807 C complete record copying position, transition to the original string ***
CF 807 B complete always use the most front *
CF 807 A complete easy sorting *
CF Edu_131 D complete turn into intervals, sort based on right hand side ***
CF Edu_131 C complete binary search **
CF Edu_131 B complete greedy *
CF Edu_131 A complete easy *
CF 804 C complete maintain l, r, two cases inside outside interval **
CF 804 B complete repeat a pattern **
CF 804 A complete if odd not possible, else two 0s and n/2 *
CF 803 D complete cut into two segments and delete swaps outside of current segment **
CF 803 B complete add will only make it worse unless k = 1 **
CF 803 A complete xor properties *
CF Global 21 E complete realize pattern is same as number of paths in a matrix, Fermat's little theorem ***
CF Global 21 D complete monotonic stack ***
CF Global 21 C complete divide all element by m as many times as possible and check whether simplified versions are equal **
CF Global 21 B complete answer is 0, 1 or 2, remove 0s on the side check whether center have 0 *
CF Global 21 A complete or all value in a with z *
CF 802 D complete dp, find how long it first i pipes to fill first i first ***
CF 802 C complete difference array, greedy **
CF 802 B complete math *
CF 802 A complete math *
CF 801 D complete gotta pick any root degree >= 3, and no need query root ***
CF 801 C complete yes if 0 between minimum and maximum **
CF 801 B complete game theory **
CF 801 A complete easy brute force *
CF 800 E complete dijkstra ***
CF 800 D complete simple tree dp ***
CF 800 C complete some logics **
CF 800 B complete no consecutive 0 or 1 in the end *
CF 800 A complete alternate 1 and 0 *
CF 799 H complete maintain minimum prefix sum **
CF 786 G complete find longest path after deleting edges must be deleted ***
CF Edu_127 E complete dp on tree, find lexicongraphically smallest possible string and compare ***
CF 130 D complete binary search for first position repeated, if no repeat, query 1 ***
CF 130 C complete delete b first, check all relative position of a and c **
CF 130 B complete prefix sum *
CF 130 A complete don't be dumb *
CF Edu_86 D complete binary search, sorting **
CF Edu_82 D complete bitmask, greedily combine small bags **
CF 798 D complete not lots of useful squares, answer to right minus one, left add one **
CF 798 B complete swaping only adjacent *
CF 798 A complete sort and choose min *
CF Edu_67 E complete dp change root ***
CF 797 G complete segment tree, interval merging **
CF 797 F complete simple cycle finding, lcm **
CF 797 E complete mod, two pointer **
CF 797 D complete prefix sum *
CF 797 C complete don't be dumb *
CF 797 B complete don't be dumb *
CF 797 A complete don't be dumb *
CF 776 E complete disgusting implementation **
CF 672 C complete always optimal to choose local min and max ***
CF 558 C complete when simplifying lines, consider horizontal and vertical lines **
CF 550 E complete big number addition, division **
Grakn Forces D complete suffix maximum, get minimum y based on x ***
CF 796 E complete get l for all path, sort l, if l is added to answer, keep path, otherwise leave it ***
CF 796 D complete initial has nothing to do with added **
CF 796 C complete check parity **
CF 796 B complete easy parity *
CF 796 A complete easy bitmask *
CF 795 E complete dsu merge blue with blue, red with red, remove blue red cross over ***
CF 795 D complete monotonic stack, prefix sum, segtree ***
CF 795 C complete decrease by either 1 or 10, make sure check causes with one 1, or no 1 **
CF 795 B complete no single element *
CF 795 A complete odd even *
CF 713 C complete slope trick, minus i to compute non strictly increasing ***
CF 13 C complete slope trick ***
CF Edu_129 F complete dfs order, interval update, for all colors get size of separate components ***
CF Edu_129 C complete sort two first, do swap sort to generate swap **
CF Edu_129 B complete just +b and mod *
CF Edu_129 A complete don't be stupid *
CF 260 A complete dp **
CF 793 D complete find a root so that next one is 1, connect with previous or root ***
CF 793 C complete largest number with only one occurance can be made into two occurances ***
CF 793 B complete find all not equal position, & all of them **
CF 793 A complete check same character in the middle *
CF Edu_128 E complete dp ***
CF 792 E complete greedy ***
CF 792 D complete the k(k-1)/2 is the same for all cases and don't matter when comparing ***
CF 791 C complete fenwick, rook not bishop I am terrible at chess *
CF 791 D complete binary search, tarjan find cycle ***
CF 789 E complete alternate for cycles ***
CF 789 D complete build row answer on the mth last row ***
CF 789 C complete prefix sum **
CF 789 B2 complete greedy **
CF 789 B1 complete implementation *
CF 789 A complete implementation *
CF 788 D complete precompute, answer add by 2 each time a new line cross an old line ***
CF 788 C complete do cycle with dsu, remove cycle that are locked by d ***
CF 788 B complete largest interval without special characters **
CF 788 A complete move all negative to the front *
CF 787 F complete find path from x to y, brute force subtrees **
CF 787 E complete dsu the letters *
CF 786 F complete maintain last point **
CF 785 D complete check 0, -1, as long as ends don't touch, and lcm(d, q) == r ***
CF 785 C complete easy knapsack *
CF 785 B complete find last occurance of the letter, see if any letter not in the interval **
CF 785 A complete type faster *
CF 783 D complete max fenwick, dp, only good making positive segment long, other segment can stay as size 1 ***
CF 783 C complete enumerate 0 position, brute force **
CF 783 B complete sorting, implementation *
CF 783 A complete easy math *
CF 782 E complete dsu, if answer 0 -> common bit, if answer 1 -> common bit other than 1 before even edge, else answer 2, super node ***
CF 782 D complete calculate number of 1s, fenwick ***
CF 782 C complete math, prefix sum, greedy **
CF 782 B complete if odd, make a move to first 1, otherwise turn first 2 0s to 1s **
CF 782 A complete just brute force, don't try to be smart *
CF Edu_126 D complete fenwick store difference, increase by the largest first ***
CF Edu_126 C complete binary search ***
CF Edu_126 B complete precompute answers **
CF Edu_126 A complete put all small number to one *
CF 780 F2 complete pigeonhole ignore adjacent, fenwick tree ***
CF 780 F1 complete easy enumeration **
CF 780 D complete each separate by 0, delete left and right most negative is count is odd *
CF Edu_125 D complete dp, combine D and H ***
CF Edu_125 C complete regular can only be length 2, rest are all palindrome **
CF Edu_125 B complete implementation *
CF Edu_125 A complete "Cause first move x second move y"(Leo Liu) *
CF 777 E complete binary lifting, greedy ****
CF 777 D complete multiple cases ***
CF 777 C complete greedy **
CF 777 B complete check for whole rectangle **
CF 777 A complete only 2 1 are possible *
CF 772 F complete big brain proof, fenwick tree, sort according to r ****
CF 772 E complete topological sort, dfs ****
CF 772 D complete dp, bitmask ***
CF 772 C complete greedy **
CF 772 B complete greedy **
CF 772 A complete bitmask **
CF 771 D complete bfs ***
CF 771 C complete dsu, greedy, heap **
CF 771 B complete sort parody *
CF 771 A complete greedy *
CF 770 D complete interactive **
CF 700 C complete greedy **
CF 770 B complete since guaranteed possible, focus on parity ***
CF 770 A complete check if palindrome *
CF 769 D complete segtree, binary search ***
CF 764 G complete bitmask, go from high bit, dsu, mst ***
CF 764 F complete interactive ***
CF 764 E complete dp **
Hello 2022 C complete interactive, dfs **
Hello 2022 B complete greedy, farthest segment *
Hello 2022 A complete greedy *
CF Deltix Autumn21 E complete obtain states, and costs to go to other states, maintain states with segtree ****
CF Deltix Autumn21 D complete brute force to store the state before arranging any non necessary moves **
CF Deltix Autumn21 C complete dsu, merge consecutive 1s *
CF Deltix Autumn21 B complete just count how many abc are there *
CF Deltix Autumn21 A complete very simple greedy *
CF 756 F complete two pointer ***
CF 756 E2 complete dp, think of how one branch can protect the other ***
CF 756 E1 complete use BFS not DFS **
CF 756 D complete basic tree dp **
CF 756 C complete big scam, biggest value forces you to always choose other side ***
CF 756 B complete get better at math *
CF 756 A complete answer can only be -1, 1, 2 *
CF 105 D complete probability dp ***
CF 399 D complete probability dp ***
CF 752 C complete check the prefix **
CF 752 B complete greedy, separate all into n, or n - 1 subsets *
CF 752 A complete implementation *
CF Edu_44 F complete hash all character ***
CF Edu_2 E complete save the result of heavy node, brute force light nodes ****
CF Edu_65 F complete when merging l and r, it is l[i] * (n - i + 1) + r[i] * i ****
CF 748 G complete segment tree interval merging, when fully cancel, the only remainings options are alternating brackets ****
CF 748 E complete bfs, priority queue, use multiset to lower time complexity ***
CF 748 D1 complete get difference, and get gcd ***
CF 748 C complete binary search **
CF 748 B complete only consider two digits *
CF 748 A complete implmentation *
CF Edu 115 E complete dp[i][j][0/1] means ith row, jth column, coming from above or left ***
CF Edu 115 D complete find the number of cases that don't work, subtract from total ****
CF Edu 115 C complete um TLEed, should use map ***
CF Edu 115 B complete simple implementation **
CF Edu 115 A complete simple observation *
CF 747 E1 complete combinatorics *
CF 747 D complete dsu, mark all subsets, get the sum of the maximum possible subsets ***
CF 747 C complete mark all factors, answer can only be 0 1 or 2 ***
CF 747 B complete bitmask, fast_pow **
CF 747 A complete two numbers always work are n and -(n - 1) *
CF 746 D complete binary search, answer is maximum edge, euler tour ***
CF 746 C complete Separate into case odd and even, only really need 1 or 2 edges deleted ***
CF 746 B complete if one is not at the prooper position and it is stuck, answer is NO **
CF 746 A complete don't use loop, just use math *
CF global 15 F complete all portals after current must be on, fenwick tree ***
CF 744 G complete use relative position to the l endpoint to avoid negative index ****
CF 744 F complete dfs on zeros, build graph ***
CF 744 E2 complete fenwick tree or balanced data structure, greedy ***
CF 744 E1 complete simulate *
CF 744 D complete do meeting one by one greedy, don't just subtract **
CF 744 C complete brute force *
CF 744 B complete reverse when sorting *
CF 744 A complete count A, B, C *
CF Edu 114 D complete priority queue to search max, hash banned, make sure add vis ****
CF Edu 114 C complete binary search for hero to send ***
CF Edu 114 B complete annoying math **
CF Edu 114 A complete dfs *
CF 743(div 2) C complete cycle detection, see if it is DAG, then do dp ****
CF 743(div 2) B complete make A or B monotone, then Binary Search **
CF 743(div 2) A complete move all numbers to the right and then subtract, greedy *
Global 16 E complete separate all component, merge them, order don't matter, no global variable ****
Global 16 D complete greedy, fenwick ***
Global 16 C complete greedy **
Global 16 B complete greedy *
Global 16 A complete greedy *
CF Edu_113 D complete only both on x or y, binary search, enumerate people add to time not multiply ***
CF Edu_113 C complete case by case, for all permutations, k out of k + 1 of them work ****
CF 742 E complete interval merging segment tree ****
CF 742 D complete greedy, go from highest digit to the lowest digit ****
CF 742 C complete big brain observation ****
CF 742 B complete working with xor, xor properties **
CF 742 A complete switching U with D and vice versa *
CF Deltix21 E complete turn it into bracket pairing, sparse table ****
CF Deltix21 D complete interactive, get numbers three a time, (a & b) + (a | b) == a + b ****
CF Deltix21 C complete implementation, details very important ***
CF Deltix21 B complete odd even, moving numbers ***
CF Deltix21 A complete straight forward *
CF 741 E complete dp, longest prefix substring, only if the first different character is different *****
CF 741 D2 complete map, binary search for position, prefix sum ****
CF 741 D1 complete separate into odd even, prefix sum ****
CF 741 C complete case by case ****
CF 741 B complete case by case ***
CF 741 A complete pick r / 2 + 1, or l **
CF 740(div 2) D2 complete suffix-sum, dp, two cases ****
CF 740(div 2) D1 complete any range data structure, dp, two cases ****
CF 740(div 2) C complete turn each cave into a node, sorting ***
CF 740(div 2) B complete brute force, math **
CF 740(div 2) A complete implementation **
CF 739 F2 complete greedy, enumerate digits, using multiset and pointers to make it easier ****
CF 739 F1 complete precomplete, binary search ***
CF 739 E complete first get second answer, then compute first, then check ***
CF 739 D complete bit by bit **
CF 739 C complete math, logics *
CF 739 B complete math *
CF 739 A complete implementation *
CF 738 D2 complete DSU, try random nodes from random components from the two forests until we have enough edges *****
CF 738 D1 complete disjoint set union on two forests **
CF 738 C complete just try to insert the n + 1 node into any interval *
CF 738 B complete greedy, just ulternate B and R *
CF 738 A complete minimum of all is to &(and) all numbers *
CF 737 C complete Fermat's Little Theorem, fast_pow, careful of integer overflow, case by case, working with bit ****
CF 737 B complete greedy, sorting, binary search ***
CF 737 A complete greedy, setprecision **
CF 736 C complete greedy ***
CF 734 E complete big brain dp ****
CF 734 C complete sorting **
CF Edu_112 E complete Segment Tree using minimum to check segments, two pointer ****
CF Edu_112 D complete Prefix Sum & enumeration **
CF Edu_112 C complete Prefix Sum & greedy **
CF Edu_112 B complete too dumb, consider cases and enumeration **
CF Edu_112 A complete Greedy **
CF 732 Div 2 C complete separate position to even and odd ***
CF 732 Div 2 B complete store the postion for each letter **
CF 728 Div 2 C complete greedy, sorting, implementation ***
CF 728 Div 2 B complete greedy, enumeration **
CF 728 Div 2 A complete greedy *
CF 727 D complete greedy, kind of discretization ***
CF 727 C complete greedy, binary search ***
CF 727 B complete prefix sum with alphabet **
CF 727 A complete implementation **
CF Edu_110 C complete two pointer ****
CF Edu_110 B complete sort into first even, then odd ***
CF LATOKEN F2 complete Tarjan, Greedy(Gassing Bonny), dp on DAG *****
CF LATOKEN F1 complete Tarjan, find all with in degree 0 ****
CF LATOKEN D complete bipartite characteristics of trees ***
CF LATOKEN C complete Realize cycle find numbers of cycle **
CF LATOKEN B complete decrease only when one single column is tall **
CF 725 G complete Binary Search, inequalities ****
CF 725 F complete number theory, each digit changed r - l times **
CF 725 E complete implementation, STL ***
CF 725 D complete number theory, calculate prime numbers beforehand ***
CF 725 C complete binary Search **
CF 724 D complete binary Search, Set
CF 724 C complete dynamic programming, pattern ***
CF 724 B complete enumerating string properly **
CF 724 A complete analyze the problem to find out pattern on the sample test case *
CF 520 Company incomplete LCA, segment tree/sparse tree *****
CF 713 Education complete enumeration, not greedy ***
CF 713 Permutation by Sum complete Greedy, enumerate one by one ***
CF 713 Short Task complete Calculate beforehand, number theory ***
CF 708 K LCM complete greedy, let all other numbers be 1 only consider the last three ***
CF 702 Old Floppy Drive complete Prefix Sum, binarySearch, replace with Maximum ****
CF 702 Advertising Agency complete Math, Fermat's little theorem **
CF 697 Accidental Victory complete Binary Search, sorting ***
CF 697 Cleaning the Phone complete Sorting, Binary Search ***

SAC Code Challenge

Source Problems status skills needed rating
c4 J4 complete binary lifting **
c4 P5 complete do all q2, then binary search q1, and then sort ***
c4 P4 complete sparse table, binary search **
c4 P3 complete ternary search *
c4 P2 complete dfs *
c4 P1 complete implementation *
c3 P5 complete string hashing **
c3 P4 complete do in reverse order, dsu, lca ***
c3 P3 complete customized sorting **
c3 P2 complete binary search **
c3 P1 complete don't be stupid *

LeetCode

Source Problems status skills needed rating
Hard Median of Two Sorted Arrays complete priority queue one small one big **

Other Problems

Source Problems status skills needed rating
braziloi 19 P2 complete graph theory ***
JOI 17 P4 complete dijkstra ***
COCI 07 c6 P5 complete array of sets, cheesed with clearing map **
DMOJ wac1p4 complete tree dp ***
DMOJ cpc21c1p6 complete sort A, do segtree on B and C ***
COCI 22 c4 P2 complete dp ***
Japan OI joi13op3 complete binary search, dynamic programming, 2 pointer **
Baltic OI btoi05p5 complete dp, priority queue ***
COCI 22 c4 P5 complete segtree **
Baltic OI btoi18p6 complete math, case by case **
CEOI 17 ceoi17p4 complete li chao tree, convex hull trick ***
Baltic OI btoi17p2 complete matrices segtree ***
DMOJ wc99sp6 complete priority_queue ***
APIO 12 P1 complete dsu on tree ***
COCI 07 c3 P6 complete array in segtree **
DMOJ cheapsegments complete sort l, put r into segtree **
COCI 19 c6 P5 complete hash, don't dare using aho korasick ***
COCI 07 c1 P5 complete count big and small *
SHOI 2012 回家的路 complete layered graph **
POI TEL-Teleportation complete layered graph ***
NA 孤岛营救问题 complete layered graph for all possible key combinations ***
JLOI2011 飞行路线 complete layered graph **
Atcoder DP T cmoplete psa ***
DMOJ invperm complete swap first with last, do a cyclic shift **
DMOJ Traffic Light complete shortest path **
COCI 22 c1 P5 complete enumerate r, find l, only logMax possible l ***
COCI 13 c5 P3 complete hash, stack *
CEOI 18 P2 complete find LIS from front and back, try to combine them **
COCI 16 c7 P4 complete maintain ending 0s **
DMOJ wac3p5 complete dp, psa **
DMOJ acmtryouts1e complete dp, psa **
DMOJ acc3p4 complete two segtree, interval update i * a[i] value ***
COCI 17 P4 complete divid by 2 to brute force, use pbds ***
DMOJ lemontree complete centroid decomposition, minus M at the beginning ***
JOI 22 Final P2 complete bs answer **
DMPG 19 G5 complete centroid decomposition, LCA, lazy ***
CEOI 09 Harbingers complete dp, convex hull trick, ternary search, maintain previous stack ****
Atcoder DP S complete digit dp **
Atcoder DP R complete matrices **
Atcoder DP Q complete segtree **
Atcoder DP M complete prefix sum, dp **
DMOJ revdig complete easy application of max flow **
utso15 utso15p5 complete kruskal, LCA **
DMOJ seed5 complete minimum cut ***
DMOJ bts18p6 complete math, difference array ***
DMOJ Monkey Motel complete segtree, dfs order ***
Atcoder coins complete probability dp **
DMOJ btoi09p2 complete same as victor rain ***
DMOJ higgs complete easy segtree *
DMOJ A plus B hard complete high precision **
SAC 22 c5 P4 complete merge interval with two pointer **
DMOJ Lexicographically Least Substring complete skip already matched, brute force check last position **
CTU Open 2018 Escalator complete bit by bit, dsu **
apio 2007 Mobiles complete tree dp, read problem carefully **
wlxsq 合并果树 complete sort using frequency array, coordinate compression ***
Facebook Hacker Cup '15 Round 1 Homework complete seive and add 1 to cnt every time seiving **
第k小值 complete bs, two pointer ***
DMOJ Tenri complete bitmask dp **
wlxsq 相遇 complete LCA ***
wlxsq 包裹传递 complete bs, same three decimal places **
DMOJ Lemon Game complete game theory, euclidean alg **
DMOJ comparing arrays complete hash on segtree **
DMOJ hydration complete bs for answer **
DMOJ Chirstmas Cards complete knapsack **
TJOI 猜数字 complete chinese remainder theorem, fast multiply ***
DMOJ N-Kat complete the minimum two sets where not completely contained which have best answer is the answer ***
DMOJ balancing act complete easy dfs *
atcoder deque complete game theory dp *
dmoj Levves Loves Segment Tree complete dynamic segment tree **
dmoj 2 Primes complete prime sieving ***
dmoj Dog Girls complete kmp, string hashing ***
HDU Gorgeous Sequence complete segment tree, update to min ***
COCI 14c5 P4 complete implementation **
dmoj String Finding complete string hashing *
wlxsq 士兵占领 complete dinic ***
JSOI blue mary complete li chao tree ***
NOI Online 丹钓战 complete fenwick tree, monotonic stack ***
wlxsq 运输问题 complete max flow minimum cost, dinic, EK **
wlxsq 分配问题 complete max flow minimum cost, dinic, EK **
wlxsq 方格取数 complete max flow, bipartite graph ***
TLE 16 c8 P5 complete max flow/bipartite ***
ICPC knapsack 4 complete dp store difference, random shuffle ***
DMOJ Kth-Rank Student complete pbds ordered set, merge light into heavy ***
wlxsq 可达性统计 complete bitset ***
DMOJ Fox Girls complete every connected component is tree plus an edge, run tree dp ****
DMOJ Boxling complete fenwick, linesweep ***
DMOJ Farming Simulator complete dp ***
wlxsq 星球大战 complete compute in reverse order ***
COCI Bicikli complete tarjan scc, dp ***
DMOJ Inaho IX complete matrices multiplication ****
DMOJ Training Regimen complete dsu ***
DMOJ Multiplication Madness Fermat's little theorem *
NA 绝对价值 complete DSU **
Atcoder Knapsack 2 complete reverse weight and value **
DMOJ A Subarray Problem complete dsu or keep upper and lower bound **
DMOJ City Game complete monotonic stack, find top and bottom bounds for a maximum length at a position ***
COCI Index complete Mo's Algorithm, segment tree ***
DMOJ Serial Killer complete segment tree, dp **
DMOJ A Rage Tree Problem complete segment tree, lazy propagation ***
DMOJ Fax's Christmas Bash complete fenwick tree to store coefficients, binary search for convex, use ceiling or floor ****
DMOJ Good Debugging complete segment tree, lazy propagation **
NA 逆序对 complete Mo's Algorithm, fenwick tree ***
NA 温度测量 complete segment tree, maintain lowest temperature possible starting from some point before ***
NOI Travel complete dp on DAG **
CSP S 廊桥分配 complete greedy ***
DMOJ check number complete binary search **
DMOJ Arithmetic Snowman complete dp, be careful of memory **
DMOJ nightmare-a-thon complete segment tree **
DMOJ knapsack 3 complete knapsack binary packaging ***
NOIP 18 Paving Road complete very standard dp *
DMOJ Mimi and Division complete partition algorithm & brute force ***
DMOJ Frog 3 complete Convex Hull Trick ****
UCC WoodCutting Game complete game theory dp ***
DMOJ pick up complete dp **
COCI 16 c4 kas complete dp stores difference between two numbers ***
DMOJ Cheapest Operation Ever complete Convex Hull Trick dp ****
CSP S 21 回文 complete big brain observation ***
APIO 14 Split the Sequence complete Convex Hull Trick dp ****
NA 最长异或路径 complete Trie ***
JSOI 2012 玄武密码 complete AC automaton ****
DMOJ Victor Makes Banks complete matrices power, consider case when n = 1 ***
DMOJ 最小逆序对数 complete very standard fenwick tree **
DMOJ School Traversal complete very easy and standard lca *
DMOJ SAC That Problem complete dp, memory optimization **
DMOJ SAC That Wall complete binary search, dp ***
DMOJ Poutine complete lca, mantain max and second max **
DMOJ GGG complete change the index of the first array, LIS **
DMOJ Bruce's Little Bridge complete merge nodes together that don't have edge length 1 ***
DMOJ Joey and Biology complete shortest editing distance **
DMOJ Holy Grail War complete interval merging segment tree ***
DMOJ Strict Evaluation complete basic lazy propagation ***
DMOJ Subway_Routes complete locate the middle of the perimeter, and then dfs there ****
NOI 21 P1 complete heavy light decomposition, set heavy edges as that two of the nodes have the same value, update different value every time ******
SDOI 染色 complete combining intervals, heavy light decomposition ****
DMOJ figurine complete lazy propagation, keep max for A and B, {maxA, k}, {k, maxB} ****
NA 树上操作 complete heavy light decomposition ***
NA 最小生成树? complete shrink LCA(not yet implemented) ***
DMOJ Maria and Maze complete don't binary search **
NA 最大生成森林 complete dsu, binary search ***
SCOI 游戏 complete knapsack dp, sum to n, find number of unique LCM ****
DMOJ 2spooky4me complete discretization, lazy ***
DMOJ redstone if a node you can visit is incycle add one to amount of cycles **
NA JM挑数 complete multiset **
NA dynamic median complete priority queue, one for small one for big ***
NOIP 2017 D2T3 列队 complete splay tree
NA Interval Reversal complete splay tree *****
Another Contest 8 P5 complete fenwick to find number of sequences ***
Another Contest 8 P3 complete find a cycle ***
NA 网络分析 complete dsu, dp **
NOI 2009 Modified Treap complete interval dp, let w be best answer with root weight >= w, discretization, sorting ****
NA 部落战争 complete bipartite matching ***
CTSC 2000 邱比特的烦恼 complete KM algorithm, math ****
DMOJ Persuation complete bitmask, 0x3f3f3f3f was not big enough ***
DMOJ BST test complete treap ****
DMOJ dynamic sum complete binary search, segment tree/block matrix too slow ***
DMOj K-th Minimum Number complete merge sort segment tree *****
CSP-S 能量项链 complete interval dynamic programming ***
LOJ 家庭作业 complete heap, greedy, segment tree or disjoint set union ****
TJOI 攻击装置 complete bipartite matching, tile coloring ****
NA 合唱团 complete dp, 1 for place at beginning, n for placing at the end ****
CPC P4 complete reverse graph I am so dumbbbb **
CPC P1 complete turn B into 2a * 5b **
NA 最小弹药数 complete bipartite matching ***
VM7WC Uniting the Earth Empire complete Montone stack **
NA 棋盘覆盖 complete hungarian algorithm bipartite matching ****
SCOI 糖果 complete 差分约束 ***
ACM The Great ATM Robbery complete Tarjan ****
Bulgarian OI 09 P4 complete Monotone Stack **
COI Patrik complete Monotone Stack **
NA 树上差分 complete LCA, Segment Tree, lazy on tree ****
DMPG Black and White complete two dimensional lazy **
DMOJ Subtree complete DP on trees, switch the root, pre-suf sum to avoid modular inverse when MOD is not prime
NA 钓鱼 complete dynamic programming **
ACM 数列第n项 complete matrices, factoring ***
UTS Open 21 State Taxes complete block_mat, segment tree ****
UTS Open 21 Latin Class complete dynamic programming, prefix-sum **
UTS Open 21 Prime Arrays complete Big Brain Greedy **
DMOJ Fibonacci hard complete Matrices, store big numbers as string, fast_pow in base 10 to avoid dividing strings *****
DMOJ Fibonacci complete Matrices, fast_pow **
P3043 涂抹果酱 complete bitmasking, dynamic programming ****
P3041 TSP 问题 complete bitmasking, dynamic programming ***
P0414 最小瓶颈路 complete lca ***
P3042 炮兵阵地 complete bitmasking, dynamic programming ****
P0511 状态压缩DP complete bitmasking dynamic programming ****
P3036 树上最远点对 complete LCA, Segment Tree, property of diameter of the tree ***
NA 区间lca complete lca, segment tree/sparse table ****
NA 次小生成树 complete LCA, first getMax, then update x, y ****
DMOJ dynamic range minimum query complete Segment Tree *
COCI Zapis complete Dynamic Programming, iomanip ***
COCI Dostavljač complete Graph Theory, Dynamic Programming, knapsack problem
DMOJ Dominos Tiling complete Dynamic Programming, two cases *
DMOJ CamelCase complete Dynamic Programming, unordered_set *
NA 区间异或 complete Segment Tree, property of xor, writing number as an array in binary ***
DMOJ Cat Girls complete Dynamic Programming, Binary Search, this question is so wrong *
NA 小白逛公园 complete Segment Tree **
USACO 旅馆预订 complete Segment Tree ****
NA 47序列 complete Segment Tree ****
NA 维护序列 complete Segment Tree, first multiply then addition ***
NA 区间操作 complete Segment Tree **
NA 弱点 complete Segment Tree, compute segment tree twice **
NA Interval GCD complete two Segment Tree, properties of GCD, be careful about absolute value ****
CCF Online 重力球 incomplete
CCF Online 吃豆人 incomplete Prefix Sum, enumeration, greedy ****
CCF Online 切蛋糕 complete case enumeration you need not more than three cuts ***
NOIP 魔法阵 complete enumeration ****
CSP 2019 纪念品 complete knapsack problem, dynamic programming ****
CSP 2019 加工零件 complete bfs, number theory ****

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages