Two Filipino students bag bronze in Indonesian programming competition

Two Filipino students bag bronze in Indonesian programming competition

NOI.PH Finalists joined the Tim Olimpiade Komputer Indonesia (TOKI) Open 2017 during the NOI.PH In-House training held last 10 – 12 May 2017. TOKI is Indonesia’s version of NOI.PH and its format is very similar to the IOI.

Farrell Eldrian Wu and Dan Alden Baterisna both bagged bronze in the contest; the former scored 234 points and the latter scored 125.

Among the other Filipino participants were Franz Louis Cesista, Alexander Go, Andrew Ting, and Kim Bryann Tuico.

The official scoreboard is available here.

NOI.PH Sponsors Thanksgiving Party

NOI.PH Sponsors Thanksgiving Party

The NOI.PH Organizing Committee and the national representatives to IOI 2016 met up with the sponsors to share their IOI experience and talk about future plans with the representatives of our champion sponsors – Alvin Lao of D&L Industries and Andoni Albert of 24/7 International!

We also want to acknowledge our other sponsors who, though not able to attend, supported us through the IOI 2016 journey – Ms Michelle Bayhonan and Smart Telecom Inc, Ms Stephanie Sy and Thinking Machines Data Science, Mr Robert Ramos and Pointwest Technologies Corporation, Mr Wilson Chua and Bitstop Network Inc, and Mr Reginald Yu, Mr Joel Dayrit and Dr John de Guzman of AAXS.

Thank you very much for your support and we look forward to the year ahead with you!

Pointwest and Senator Bam’s staff meet with NOI.PH Team

Pointwest and Senator Bam’s staff meet with NOI.PH Team

Members of the Organizing Committee, together with two-time IOI bronze medalist Robin Yu, and Philippine Science HS Main Coach Edge Angeles met with the staff of Sen. Bam Aquino and the leaders of Pointwest Technology Corporation including their CEO, Ms. Beng Coronel, to discuss the different possible ways to support the National Olympiad in Informatics.

Sen. Bam Aquino is the current chair of the Science in Technology committee in the 17th Congress while Pointwest has been at the forefront of empowering Filipino tech talent through their business. We are very excited to explore this long-term partnership with them so that we can encourage more students to join (and win) the NOI and the IOI!

Senator Angara reads proposal from NOI.PH Team

Senator Angara reads proposal from NOI.PH Team

Despite his busy schedule with the senate hearings and whatnot, Senator Sonny Angara took his time to read the proposal of the NOI.PH Team. The proposal involves improving institutional support to our young academic contestants! We thank Senator Anagara and his staff, especially Mr. Erwin Lozano, for their support and assistance in reaching out to the different government agencies!

IOI 2016 Photo Gallery

First-Timer Primer

In this post, we answer some questions that participants have asked us.

Q: Is there any way to bypass the 264-1 limit in Java or C++?

A: Java has an arbitrary-precision library called java.math.BigInteger (and java.math.BigDecimal). Keep in mind though that problems used in official NOI contests usually won’t require the use of arbitrary-precision libraries. But we’re not preventing you from using them!

For C++, there is no built-in arbitrary-precision library, so it depends on the amount of “bypassing” you want. For example, you can simulate 128-bit integers by creating a class with two 64-bit integers, the first one representing the higher-order bits and the second the lower-order bits. If you want to use larger numbers, I suggest implementing your own arbitrary-precision arithmetic library.

Q: What is the big O notation and why do I see it in editorials all the time?

A: Roughly speaking, the big O notation expresses the speed of your program relative to the input size. In other words, it describes how quickly your program’s running increases as the input size increases. O(f(n)) roughly means that if the input size is n, then the running time grows approximately as f(n).

For another explanation, we recommend reading this. Also, don’t hesitate to ask us if you’re still having trouble understanding it!

Q: What do you suggest for inputs where n is near the billions?

A: For such problems, an O(n) solution would most likely not be accepted, due to the time limits. (Even a loop from 1 to n might not finish in time!) Try finding faster (sublinear) solutions, such as those that run in O(√n), O(log3 n), O(log n) or O(1) time (to name a few). Also, for n ≤ 1018, some slower solutions, such as those that run in O(√n) time, become too slow for these time limits.

However, time complexities such as O(n) can be a bit misleading, because there is a hidden constant behind the O() notation. Also, using pure operation count as your basis for program speed isn’t necessarily more accurate either, because some operations are slower than others. For example, one division is much slower than one bit shift. It’s up to you to judge, and it takes some experience to get the hang of it.

Q: What is “modulo”, and why do a lot of problems ask for the answer “modulo” some number?

A: The result of the operation a mod b” (read “a modulo b”) is simply the remainder when a is divided by b (here b is called the modulus). For example, 100 mod 3 = 1, 5 mod 100 = 5, 100 mod 5 = 0, and 0 mod 11 = 0.

Usually, a problem asks for the answer modulo some number so that the output size isn’t very large, and that computation can all be done without resorting to arbitrary-precision arithmetic. This is because of the following properties of the modulo operation (among others):

(a + b) mod m = ((a mod m) + (b mod m)) mod m
(a × b) mod m = ((a mod m) × (b mod m)) mod m
(ab) mod m = ((a mod m) – (b mod m) + m) mod m

This means that intermediate values can be reduced modulo m safely as long as the operations involved are addition, subtraction, and multiplication (and possibly some other operations).

In C, C++, Java and Python, a mod b is written as a % b.

Q: Why do a lot of problems use the modulus 109+7 if we could just use something else, for example 109?

A: 109+7 is prime, and a prime modulus is desirable in some cases:

1. Sometimes, if the modulus is 109, some important values become 0 for large inputs (or something trivial), making the problem a bit easier for those inputs. But usually when the modulus is prime, it doesn’t. For example, n! mod 109 quickly becomes 0 as early as n = 40, but n! mod (109+7) is nonzero until n = 109+6.

2. You can “divide” modulo a prime by using modular inverses. Keep in mind though that modular inverses usually aren’t required in official NOI contests.

In some problems, the modulus plays a key role, and a problem can be very difficult with one modulus and easier with another. For example, if we ask you, given n ≤ 106, to compute n! mod m for some modulus m, then the problem is easy if m = 109 but a bit harder if m = 109+7. So we recommend paying attention to the modulus.

Q: How do I prepare for the NOI if I have limited knowledge on problem solving, algorithms and implementation?

A: The best way to improve is to join online contests regularly. For example, HackerRank, Codeforces, CodeChef, etc. host programming contests regularly (for example, in weekly / monthly intervals). Check this link for a schedule of upcoming contests. Joining these contests is free!

If you have limited time, I suggest going through all past NOI problems (which are all hosted in our HackerRank NOI practice page) and solving as much as you can, preferably those you feel are standard stuff but you’re not familiar with. Remember that, being past NOI problems, these problems usually have their editorials available somewhere.

For standard stuff like graphs, data structures, standard algorithms, etc., we suggest you to learn them as soon as possible. You can’t rely on pure instinct all the time.

Finally, I suggest learning problem-solving and implementation skills simultaneously. As you encounter new algorithms/data structures, implement them immediately. Usually when you find tutorials, there are sample problems you can try them out with.

Q: What resources would you recommend for learning?

A: Aside from all the links given in the editorials of past NOI problems (of which there are a lot!), you may check this link for a list of tutorials and sample problems. You can find a lot of things to learn there. Be warned though that they aren’t listed in increasing order of difficulty, so I don’t suggest learning them in that order!

In general, you can try searching the web for any topic you hear about, and you might find a tutorial for that. Sometimes, especially in CodeChef long contests, we even look at research papers for solution (and problem) ideas!

But be sure you’re usually able to code brute-force solutions first! Don’t underestimate experience. You could be the most talented guy and yet fail at contests if you can’t code well enough.

Also, try setting a goal for yourself. For example, solve all NOI practice problems, or get some number of points in UVa Online Judge, or get to a certain rating in Codeforces/HackerRank/CodeChef, etc. During college I tried to get as many points in UVa as possible, and it helped me solve and train regularly.

You may also want to check out our previous posts to prepare for the NOI.

Ways of Proceeding and Honor Code

Holding eliminations rounds online is the most feasible setup we can do this year for a national programming competition for high school students. This setup is convenient for you, the participants, as you can code at the comfort of your own school – or even at your own home!

To keep everything as fair as possible, we trust that all participants and coaches read through and follow the honor code below during the online elimination rounds:

The Four Codemandments

I.
The first rule of reading NOI problems
is you do not talk about the NOI problems

(until after the round is concluded)

You are not allowed to discuss the problems with anyone else until after an hour after the contest. This includes talking to your co-participants in-person or online. Moreover, posting the problems on forums (such as but not limited to Quora, etc) during the contest is not allowed. Co-participants, coaches, parents, siblings, guardian angels, and friends may stay with you for moral and technical support (i.e. setting up the computer), but offering and receiving help in solving the problems is strictly prohibited.

II.
Any code submitted to the contest
must have been written by you

All parts of the code you submitted must have been written by you, the participant. Snippets of codes you have written in the past may be used during the contest itself. Codes from other people including but not limited to friends, co-participants, and strangers from the Internet are not allowed. Suspicious code, as has been done in the past, will be investigated.

III.
Questions regarding the problems are to be raised
at the discussion panel of the problem

Questions specific to the problems involved should be written in the discussion panel of the problem for everyone to see. This means that all correspondence between the NOI Scientific Committee regarding the problems are public and available to all. You could also check your notifications and the discussion pages of the problems should the need arise for clarifications. For technical support, you may consult ask[at]noi.ph preferably before the contest starts.

IV.
Consulting the internet is fine.

As this is an online competition, it is nearly impossible to ban participants from consulting the Internet for help with the problems. Moreover, it might even lose you time if you only start reading on the duration of the contest itself. So we suggest you prepare before the contest starts. Furthermore, we would like to reiterate that from the second codemandment, you are not allowed to copy-paste any code found on the internet. We advise not to use it too much though, as in the Finals Round, using the Internet for purposes other than HackerRank is prohibited.

Penalties

NOI.PH is an official event of the Philippines sanctioned by the government of the Republic. The consequences of violating any of the aforementioned commandments are at least the following:

  1. Immediate disqualification from the whole competition.
  2. Cases of dishonesty will be reported to government agencies including, but not limited to, the DOST, ICTO, and DepEd.

Conclusion

Now that you’ve read the honor code, you should familiarize yourself with the official rules. Only officially participants who register before the deadline will be allowed to join the contest. Moreover, if you haven’t already, you can also consult the Frequently Asked Questions page. For other concerns, contact us by emailing [email protected]. If you have no more concerns, open your favorite text editor and start practicing!

How to Access the NOI Practice Problems

Here’s how to access the NOI Practice Problems.

  1. Sign yourself up for a HackerRank account.
  2. Login with your credentials.
  3. Register yourself to the NOI Practice Contest.

Mabuhay!

Welcome to the National Olympiad in Informatics – Philippines 2016, the Philippines’ official qualifier for the 2016 IOI in Kazan, Russia!

Registered participants should review the rules, see the schedule and start preparing! Check out the Frequently Asked Questions page as well for clarifications.

Last year, the first Philippine delegation to the IOI consisted of four students who competed in Kazakhstan and brought home the country’s first IOI medal.

This would have not been possible without the help of last year’s sponsors. If you would like to help sponsor the Philippine delegation to the IOI, please visit the sponsor page. Any help will greatly be appreciated!

Should you have any other questions or concerns, please contact the organizing committee by emailing [email protected]. You can also keep in touch by liking the official NOI.PH Facebook page and following the NOI.PH Twitter account.

Thank you, and all the best!