**346 problems solved**

**Rank by points:**#108

**Total points:**472

**7 contests written**

**Rank by rating:**#351

**Rating:**1566

**Volatility:**305

**Min. rating:**965

**Max rating:**1566

**From**
St. Marcellinus C.S.S., Olympiads School

#### About

**~\Huge Retired.~**

I'll be Candidate Master soon™.

I'll also be top 100 by points soon™.

Candidate Master -> Jan 1st, 2019

Likes Trees (Other than Binary Indexed Tree)

#### Problems that I like:

APIO '15 P2 - Jakarta Skyscrapers

DMOPC '15 Contest 3 P4 - Contagion

TSOC '15 Contest 2 #6 - All-Out War!

CCC '18 S5 - Maximum Strategic Savings

DMOPC '14 Contest 2 P5 - Sawmill Scheme

DMOPC '14 Contest 2 P6 - Selective Cutting

Mock CCO '17 Day 1 P2 - Penetrating Power

GFSSOC '14 Contest 1 J5 - Pursuit of Knowledge

Mock CCO '18 Contest 4 Problem 3 - Counterattack

#### Extra Info

Fun in Föràg needs better testcases and problem statements. Also, it requires a Dijkstra's optimization to pass.

Pursuit of Knowledge also has weak testcases.

All-Out War! is somewhat overrated. It is also very similar to Penetrating Power. (Penetrating Power requires more thinking though).

Counterattack is difficult to pass in Java. It also has a similar problem named The Hungary Games (CCO '12 P2). Make edges unidirectional and you will pass.

Selective Cutting has a similar problem named Dr. Henri and Lab Data (DMOPC '18 Contest 4 P4).

Once you are finished Black and White, finish Tinted Glass Window (CCC '14 S4).

Don't overthink Sawmill Scheme like I did.

I currently have the slowest solution to Jakarta Skyscrapers due to using Java. I am also the second AC in Java (There are only 2 ACs).

Lazy Fox is ** extremely** difficult to pass in Java (You will most likely MLE). To pass? Ignore using objects and store a triple (three integers paired together) as a long. This can be done by allowing one number to take up half the bits, another number to take up a quarter of the bits, and the last number to take up the last quarter of the bits.

Example: When the values are 12 238 73, store it as 1200023800073. Mod for your answers.

For those who are as dumb as me: A Balanced Binary Search Tree is not a data structure itself. It is a type of data structure that can be coded in many ways. For example: AVL Tree, Treap, Red-Black Tree, 2-3 Tree, etc.

~~DMOJ test data is extremely weak for CCC '19 S3 - Arithmetic Square. My code doesn't even pass the second sample, yet it gets an AC on the test data.~~

If stuck on any of the questions:

- Search on Google for optimizations / bug fixes.
- Ask on #help in the DMOJ Slack.
- (Last Resort) Read a Github sol from: https://github.com/FelixHe4/Competitive-Programming

#### Useful Notes

Small optimizations:

Dijkstras:

```
if (dis[cur.ev] < cur.cost) {
continue;
}
```

```
if (cur.ev == dest) {
break;
}
```

Kruskals:

```
if (curEdges == n - 1) {
break;
}
```

Remember:

Use a PriorityQueue for Prims

Don't trust the fast reader's "readLine()" method. Use read()

Use a Java fast reader by stealing the template from Hello World: https://dmoj.ca/submission/1150414~~