**298 problems solved**

**Rank by points:**#1035

**Total points:**288

**6 contests written**

**Rank by rating:**#3072

**Rating:**1039

**Min. rating:**823

**Max rating:**1039

**From**
Christ Church Grammar School

#### About

I code in Python 3.

Other Languages I've gotten AC in problems with:

- PyPy 3
- C++03
- Python 2
- Text
- PyPy 2
- C++14
- C
- Pascal
- NASMx86
- NASMx64
- Brain*

I am friends with Viv_CCGS

I can't do Dynamic Programming or Graph Theory 😔😔😔😤😤😤

**Advice**:

Sit rated contests.

Never give up if you are in, like, the last 20 seconds of a contest and you are only a short way away from solving a problem.

Do the simple problems first (1-pointers), and then work your way up to the 3 and 5 pointers. Based on the Point System Re-network, if you do Rubik’s Cube Solver as your first problem, followed by Hello, World!, you will have hard times when you do more problems.

Work hard and try your best.

Have fun solving the problems.

**Thank you for help with stuff (in any sort of way)**:

Jan, Viv_CCGS, Plasmatic, Badmode, Xyene, Kirito, quantum, kingW3, TimothyW553, maxcruickshanks, d, Spitfire720, awaykened, Computer_Genius, Nils_Emmenegger, Tomorrow, ThingExplainer.

**Respected Coders (💪 💦 🖥 )**:

zhouzixiang2004, bqi343, 4840648, justin_g_20, Josh, SourSpinach, wleung_bvg, y0105w49, bruce, 4fecta, koosaga_wcipeg, koosaga, Riolku, Zeyu, ecnerwal, eddieee, Tmaswang03, Gennady, blin00, dalt, injust, hitonanode, ksun48, Evang.

**Milestones**

**Major Milestones**

**27 July 2021**: Did my first rated contest (CPC '21 Contest 1) !

**30 August 2021**: Reached a green name (Another Contest 8) !

**3 September 2021**: Reached 200 points!

**12 September 2021**: Solved 200 problems!

**31 October 2021**: Top 1000 in DMOJ in weighted points!

**Other Milestones**

**May 12 2021**: Started Coding in Python 3

**May 12 2021**: Did my first problem (a 3-point problem) Alpaca Shapes.

**May 15 2021**: Did my first 1-point problem Hello, World!

**July 2 2021**: Did my first 5-point problem Farmer Bob.

**July 5 2021**: Did my 10th 5-point problem Fix.

**July 16 2021**: Did my first 10-point problem Lucas' Other Tower.

**July 18 2021**: Did my first 7-point problem Diverse Arrays.

**July 24 2021**: Did my first 15-point problem A Plus B (Hard).

**August 8 2021**: Did my 75th 3-point problem Boolean.

**August 21 2021**: Did my first 12-point problem Koala Gambling.

**August 26 2021**: Sat the Intermediate AIO, and got 200/600 points (Bronze), solving Robot Vacuum and Art Class II.

**September 2 2021**: Did my 100th 3-point problem Pithy Passtimes.

**September 11 2021**: Did my 10th 7-point problem Maze.

**September 12 2021**: Did my 5th 10-point problem Fighting the Zombie.

**September 17 2021**: Did my 50th 5-point problem Partial Game.

**September 18 2021**: Did my 125th 3-point problem Dog Treats.

**October 7 2021**: Did my 25th 7-point problem Ammunition.

**October 15 2021**: Did my first 17-point problem Fibonacci Sequence (Harder).

**October 26 2021**: My amount of points is equal to my amount of problems done (276 points, 276 problems done)

**October 30 2021**: Did my 150th 3-point problem Trik.

**November 2 2021**: Did my 10th 10-point problem Fibonacci Numbers.

**Rated Contests Written:**

CPC '21 Contest 1 (176th, Rating 823)

An Animal Contest 3 (193rd, Rating 973)

Another Contest 8 (96th, Rating 1004)

DMOPC '21 September Contest (169th, Rating 1030)

DMOPC '21 October Contest (123rd, Rating 1028)

DMOPC '21 November Contest (122nd, Rating 1035)

**Random**:

Submission to Boolean in Brain*

🤦♂️ solution, I spent so long on this question when I realised I can just do this in Piggy.

Text Solution to Cell-Phone Messaging because the test cases are weak.

#define everything lol credit to ThingExplainer

All the comments in this problem are downvoted.

Click on this problem for a little surprise!

Only Text Submission to The Matrix because the test cases are weak.

**Goals** (although most of these won't happen):

**Solve the following problems:**

[X] Solve Fibonacci

[X] Solve Fibonacci (Harder)

Solve Rubik's Cube Solver (In any amount of time, probably won't happen)

Solve Brandon's Cryptographically Secure Pseudorandom Number Generator

Solve 2048

Solve Monkey Retirement

Solve A Times B

Solve The Final Test

Solve Bohemian Rhaksody

**Rating Goals** (according to the Elo-MMR Rating System):

[X] Unrated 💩 💩 💩 (0)

[X] Newbie: Grey (<1000)

[X] Amateur: Green (1000-1299)

Expert: Blue (1300-1599)

Candidate Master: Purple (1600-1899)

Master: Yellow (1900-2399)

Grandmaster: Red (2400-2999)

Target: Also Red (≥3000)

**Point Goals**:

[X] Get to 100 weighted points

[X] Get to 200 weighted points

Get to 300 weighted points

Get to 400 weighted points

Get to 500 weighted points

Get to 600 weighted points

Get to 700 weighted points

Get to 800 weighted points

**Problem Goals**:

[X] Solve 100 problems

[X] Solve 200 problems

Solve 300 problems

Solve 400 problems

Solve 500 problems

Solve 600 problems

Solve 700 problems

**Point Ranking Goals**:

[X] Top 10000 in weighted points

[X] Top 1000 in weighted points

Top 500 in weighted points

Top 250 in weighted points

Top 100 in weighted points

Top 50 in weighted points

Top 10 in weighted points (NEVER GOING TO HAPPEN)

Top 1 in weighted points (NEVER GOING TO HAPPEN) Currently zhouzixiang2004

**Rating Ranking Goals**:

[X] Top 10000 in rating

Top 2500 in rating

Top 1000 in rating

Top 500 in rating

Top 250 in rating

Top 100 in rating

Top 50 in rating

Top 10 in rating (NEVER GOING TO HAPPEN)

Top 1 in rating (NEVER GOING TO HAPPEN) Currently bqi343

**Other**:

Pass the Problem Setter Quiz (in any amount of time)

Author a problem (once the Problem Setter Quiz is passed)

[X] Write a contest

Author a contest

**User-Script**:

Show hidden comments:

`$(k=>$("a[href^='javascript:comment_show_content(']").each((i,j)=>comment_show_content(parseInt(j.href.replace(/^\D+/g,"")))));`

Prank (Yes, credit to d):

```
$(function() {
var elements = document.getElementsByTagName("li");
for (i=elements.length-1; i>=0; i--) {
var e=elements[i];
if (e.children.length===1) {
var f=e.children[0];
if (f.tagName.toUpperCase()==="A") {
if (f.text==="Edit profile") {
e.parentNode.removeChild(e);
}
else if (f.text==="Log out") {
e.parentNode.removeChild(e);
}
}
}
}
var links = document.getElementsByTagName("a");
for (i=links.length-1; i>=0; i--) {
var l=links[i];
if (l.text.toLowerCase()==="resubmit") {
l.href="/";
l.text="You cannot resubmit";
}
else if (l.text.toLowerCase()==="submit solution") {
l.href="/";
l.text="You cannot submit";
}
}
inputs = document.getElementsByTagName("input");
for (var index=inputs.length-1; index>=0; index--) {
i=inputs[index];
if (i.hasAttribute("Value")) {
if (i.value.toLowerCase()==="submit!") {
i.disabled=true;
i.value="Submission unavailable";
}
}
}
});
function banned(){
setTimeout(function(){alert("YOU HAVE BEEN PERMANENTLY BANNED FROM DMOJ.")}, 2000);
}
banned();
```

**Unofficial Hints for Problems**:

End the first line in `\n`

, end the second line in `\r`

, and end the third line in `\r\n`

.

Just to clear up confusion, this is not the correct output:

```
Hello, World! Hello, World! Hello, World!
Hello, World! Hello, World! Hello, World!
Hello, World! Hello, World! Hello, World!
```

Only print 'Hello, World!' once per line.

This problem is not solvable in Text.

There is only one test case, in which N is equal to 1521. (This is probably the reason why "Your code must not be longer than 1521 bytes.") The input can be in four languages: English words, decimal numbers, French, or Simplified Chinese.

1-10 in decimal numbers: `["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"]`

1-10 in English words: `["one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten"]`

1-10 in French: `["un", "deux", "trois", "quatre", "cinq", "six", "sept", "huit", "neuf", "dix"]`

1-10 in Simplified Chinese: `["一", "二", "三", "四", "五", "六", "七", "八", "九", "十"]`

If the number is in a language, convert it to decimal numbers and add them up.

**Note**: A can be in one language and B can be in another, i.e. `deux 四`

. In this case, your program should output `6`

.

The inputs are likely like this: `1 2 3 5 7`

. Just output the numbers in input order and you will get AC.

The following characters are not allowed in code: `"'1234567890`

.

Think outside the box.

If your code loops at least `9**9**9`

times, you will get a pass. It is possible to loop infinitely using while loops.

Also re-read the *Scoring* section if you are getting AC with no points:

Your score will be~\left(\frac 9 N\right)^5 \times 7~, where N is the length of your program in bytes, if your program works.Otherwise, it will receive a score of zero.

Boolean (Warmup, Easy, Medium, Hard and Lunatic):

These problems are a little special. The testcases vary in each problem, and each time you submit a solution, the testcases change. To solve it, just output `True`

and hope for the best. Eventually, you'll get AC for all test cases. It took me 40 tries to get AC in all test cases in Lunatic in NASMx86.

In Warmup and Easy, there is 1 test case.

In Medium, there are 2 test cases.

In Hard, there are 3 test cases.

In Lunatic, there are 4 test cases.

Looks like anything will pass. You can literally do anything for this problem. It doesn't check for Compilation Errors or Invalid Returns.

This page will help.

`AK`

stands for `All Kill`

, not `Avtomat Kalashnikova`

as in `AK-47`

.

There is no input for this problem. Don't ask for one. It appears that any non-empty output will get AC.

Brandon's Cryptographically Secure Pseudorandom Number Generator:

If your program tries to request for an input, it crashes.

If your program outputs `the following file`

, the grader will give you WA and the feedback will be `Nice try, print the actual file`

.

I'm still trying to solve this problem.

Badmode's comment helped me solve this question:

Storing 1 million numbers will go past the memory limit in any language. You don't have to store the inputs to solve this problem.

If you store the input, you will get MLE!

This problem is basically the same as Sorting.

Given a list of n numbers, sort them and output them one per line from smallest to largest. The first line of the input contains a positive integer n no greater than 100, the number of numbers to follow.

Each line after will have a single positive integer less than 32000.

Output the numbers in sorted order from smallest to largest, one per line.

Woburn Challenge - Telling Time:

Start a running counter to tell you how many glasses he can break.

If the frequency of his watch is **a multiple of** the frequency of the glass, he can break it. What should you now do to the counter?

Output the counter at the end.

Check out my comment if you are stuck on this problem:

Thank you for help maxcruickshanks and d.

For those who are stuck on this problem:

When a person has a disease, they infect exactly R other people but only on the very next day. No person is infected more than once. We want to determine when a total of more than P people have had the disease.

I thought originally that ‘they infect exactly R other people but only on the very next day’ meant that they only start infecting others on the very next day and

they keep infecting others every day after that. maxcruickshanks’s comment and d’s comment told me that what it really means is that they only infect a person on the next day andstop infecting others once they have infected R people. Bad comprehension by me, so thanks for pointing that out.Test your code that it works for test cases when R = 1. Very interesting and challenging problem, 👍 to the creator. I would probably cry if I was taking part in CCC 2020 😂.

Start with 3 counters, one for the day, one for the people infected, and one for the number of people going to infect others.

Use a while loop for while the number of people infected is less than or equal to P.

Add the number of people going to infect others to the people infected.

Multiply the number of people going to infect others by R.

Increase the day by 1.

At the end of the loop, output the day in which the amount of people infected went over P.

Loop N times:

Get two numbers, N and the Nth odd number.

Use if statements for both numbers:

If N is divisible by 7, the answer is `Fizz`

.

If N is divisible by 13, the answer is `Fuzz`

.

If N is divisible by 7 and 13, e.g. `91`

, the answer is `Fizz Fuzz`

.

If the Nth odd number is divisible by 7, the answer is `Fizz`

.

If the Nth odd number is divisible by 13, the answer is `Fuzz`

.

If the Nth odd number is divisible by 7 and 13, e.g. `91`

, the answer is `Fizz Fuzz`

.

Get the answers to both.

For example, if one of the lines has `14 27`

as its answers (the 14th odd number is 27), the output has to be `Fizz 27`

, since 14 is divisible by 7. If one of the lines has `46 91`

as its answers (the 46th odd number is 91), the output has to be `46 Fizz Fuzz`

, since 91 is divisible by 7 and 13. If, somehow, one of the lines has `91 91`

as its answers, which will never happen anyway, the output has to be `Fizz Fuzz Fizz Fuzz`

, since 91 and 91 are both divisible by 7 and 13.

Here's an example of how your program should work:

Input:

`7`

Output:

```
1 1
2 3
3 5
4 Fizz
5 9
6 11
Fizz Fuzz
```

Loop T times:

Loop N times:

Get an input, and append it to a list.

Sort the list.

Output the last item in the sorted list.

Floor the square root of the the number.

This can be done in Python using `math.floor()`

and `math.sqrt()`

.

**Note**: Make sure to **import** first!

Tri:

You'll need a few if loops.

Don't use `if if if if`

, use `if elif elif elif`

so you don't accidentally output two equations.

Make a dictionary for the letters (you can see Computer_Genius’s comment):

`time = {'a': 1, 'b': 2, 'c': 3, 'd': 1, 'e': 2, 'f': 3, 'g': 1, 'h': 2, 'i': 3, 'j': 1, 'k': 2, 'l': 3, 'm': 1, 'n': 2, 'o': 3, 'p': 1, 'q': 2, 'r': 3, 's': 4, 't': 1, 'u': 2, 'v': 3, 'w': 1, 'x': 2, 'y': 3, 'z': 4}`

Then, if a letter and the letter after it are on the same key, include the pause which takes two seconds.

All inputs can be fit into a 64-bit unsigned integer. Your task is to output **A + B + C**, modulo **42069900169420**.