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

My IOI 2016 Experience

My IOI 2016 Experience

Now that the IOI 2016 results are out, our national representatives have had a chance to reflect. We asked them about their experience and here’s what they have to say:

Maded Batara (Grade 11, Philippine Science High School) says…

Being at the IOI in Kazan was a great experience. Not only did it open up my eyes to how amazing the world of competitive programming is, but it also made me appreciate the culture and people of Russia are. It was an eye-opening experience, and I’d definitely train more to get into next year’s IOI and get a medal.

Ian Palabasan (Grade 10, Rizal National Science High School) says…

For me, IOI 2016 in Kazan, Russia was, compared to last year’s in Almaty, Kazakhstan, more well organised but had less activities. My favourite part of the trip was the Medieval fair thing where we tried our hands at different skills like pottery, smithy, and fencing, while the most stressful were the quarantine periods where we did nothing. Judging by the preformance this year compared to last year’s, it seems that the PH team needs more training, more available materials and resources, and more time to improve and mature.

Robin Yu (Grade 12, Xavier School) says…

The IOI has become one of the events I most look forward to every year. There’s nothing like representing your country in an event where the best of the best minds from each country meet, and for something I love doing, no less. Indeed the best part of the IOI is not the excursions or the delicious food, but the thrill of the competition, the feeling of being among the best and representing your country in such a grand and anticipated event. Of course, being able to see that I am far from the best, and seeing all the other skilled and talented minds is a great motivator to push myself to study harder and get better at programming.

For sure, I am not the best or most talented programmer in the Philippines; I was just very lucky to have been introduced to the NOI.PH early. I hope that, with the help of sponsors, we would be able to discover and cultivate more great raw talent who may not have the financial freedom to practice and compete, and better represent the Philippines in future such international competitions.

Do you want to be the national representatives for the next IOI? Go to the registration page for NOI.PH! Your journey begins there.

IOI 2016 Results

IOI 2016 Results

Filipino students brought home the country’s second bronze medal from one of the most prestigious computer science competitions in the world, proving for the second time that our local homegrown students can compete alongside all the other nations.

Robin Yu, competing as a Grade 11 student from Xavier School, won bronze at the recently concluded International Olympiad in Informatics (IOI) held in Kazan, Russia. He managed to get a perfect score of 100 for Detecting Molecules (Day 1) and Paint By Number (Day 2). Including the partial scores for both days, he was able to obtain an impressive 257 points for the whole competition. This feat earns him his second bronze medal for the IOI.

Farrell Wu, on the other hand, competed as a Grade 11 student from MGC New Life Christian Academy. He managed to score 190 points for the whole competition.

The younger participants among the four were Maded Batara III, a Grade 10 student from the Philippine Science High School – Main Campus and also a first-timer, and Ian Palabasan, competing as a Grade 9 student from Rizal National Science High School. Both accumulated a total of 72 points each across all the problems given during the competition.

The four students were accompanied by team leader Kevin Atienza and deputy team leader Payton Yao, both prominent local figures in the national competitive programming scene. The students were coached by Kevin Atienza, Payton Yao, and Jared Asuncion.

This is only the second time that a Philippine delegation was sent to represent the country in the International Olympiad in Informatics – and the second time our delegates have reaped awards for our country. This year, a total of 324 participants from 88 countries registered to the Olympiad. Among the countries represented are China, Russia, Japan, Canada, Taiwan, Singapore, Korea, Vietnam, the US, Australia and the Philippines.

The students were sponsored by local tech companies 24/7 International, Bitstop Networking Services, Custom Thread, D&L Industries, Inc., Pointwest Technologies Corporation, Smart Communications and Thinking Machines Data Science. The organizing team would also like to thank Tonette Rivera for her help.


The Philippine delegation to the IOI were chosen among the top students who joined the third annual National Olympiad in Informatics – Philippines (NOI.PH 2016). The organizing committee for the NOI.PH is composed mainly of UP graduates. who were once participants and winners of university-level programming contests. They volunteer each year to organize the NOI and IOI so that students can experience the joys of competitive programming at an earlier age. NOI.PH was started by Martin Gomez and Wilson Chua back in 2014, with similar goals.

The Philippines Delegation to IOI 2016

The Philippines Delegation to IOI 2016

robin

Robin Yu brought home the first IOI medal last year and has been training in programming for the past few years. He spends most of his time training mostly through self-study. However, he never hesitates to ask for the help of the NOI.PH Scientific Committee on the rare occassion that he gets stuck. Apart from NOI.PH, he has placed in a lot of online competitions he joined at his own volition. He also joined Google Code Jam, where he placed third, just under Kevin and Payton, in one round among all the Filipino competitors. People say he is a creative thinker, probably because his height offers him a different perspective of the world.

farrell

Farrell Wu is named as one of the Ten Smartest Kids in the World by The Business Insider in 2013. He has garnered awards in a number of global competitions, including the prestigious International Math Olympiad (IOI) and the Australian Mathematics Competition where he aced all the questions. He was granted Filipino citizenship status thru House Bill 4073 early last year after he expressed desire to be a full-fledged Filipino. He brought a stuffed penguin during the IOI because he likes penguins. And perhaps stuffed toys too.

maded

Maded Batara, coached by Edge Angeles, hails from Iligan City and has been training with us for the last two years. Starting Grade 1, he has placed in the MTAP division finals for six consecutive years. Aside from the NOI, he has also participated in and won other several technology related competitions such as the Ateneo Programming Open and the Grace IT Quiz Bee. Even though he is quite young, he is very organized and was responsible for coordinating a couple of team selfies during the IOI (as per the request of the organizing committee).

ian

Ian Palabasan is a self-proclaimed addict in C++, a programming language. He has participated in several programming competitions held in Ateneo and FEU coincidentally with some his other competitors from the NOI. He is a fan of Undertale, a role-playing game about refusing to give up. This is why during the IOI, he was filled with determination.


Now that you know all about the Philippines’ representatives to the IOI 2016, let’s see what they have to say about their IOI experience.

2016 National Finals

2016 National Finals

The NOI.PH 2016 National Finals was held in De La Salle Lipa. It consisted of two rounds on-site, each of which consisted of four problems.

NOI.PH Finals Round 1

Almost all our participants finished the first subtask of 1A: A Simple Problem!, each giving them eight points. Ian Vincent Palabasan (Rizal National Science High School), Franz Louis Cesista (Philippine Science High School – Eastern Visayas Campus), and Joaquin Jose Lopez (Philippine Science High School – Main Campus) scored the first two subtasks. Proving that is indeed a simple problem was Robin Yu (Xavier School) finishing all subtasks and getting 100 points for it. Participants seem to really really really really really really like 1B: Confidential Message since most of them scored at least 32 points for answering the first two subtasks. Robin went above and beyond and finished the next two subtasks too, netting him a total of 72 points. Three participants scored a perfect 100 for 1D: Pabebe Girl Cuts Cake. Truly, hindi sila napigilan until the system told them tama na ‘yan after submitting their code. Finally, only one participant attempted 1C: The King and Queen of Rock and Roll. Robin Yu was the only one to submit code for this problem, and it was code that succesfully treated all subtasks. This nets him another 100 points.

NOI.PH Finals Round 2

Robin and Farrell did not make us paasa since they both got a perfect score in 2A: Paasa Numbers. In addition, Robin, Franz and Farrell kept cruising and can’t stop won’t stop coding until they also managed to get a perfect score in 2B: Shake It Off. The participants, though, had a little trouble with 2C: Candles For Everyone as no one managed to pass any subtask beyond the second. Finally, Robin impresses us again one final time this year, as he was the only contestant to score in 2D: Goodbye, Awkward Goodbyes!, managing to finish all but the last subtask.

Scoreboard for NOI.PH 2016 National Finals

Final Message

Congratulations to all the winners of the National Olympiad in Informatics – Philippines 2016 Finals!

We thank our hosts De La Salle Lipa, the Province of Batangas, and Batangas Vice-Governor Mark Leviste; our partners Bitstop Network Services Inc. and HackerRank; our friends at the Science Education Institute – Department of Science and Technology and the Office of President Noynoy Aquino (P-Noy); and most especially the sponsoring government agency of this event, the Information and Communications Technology Office (DOST-ICTO).

Do you want to have a chance to compete in the International Olympiad in Informatics? Register for the next NOI.PH now!

2016 National Eliminations

2016 National Eliminations

The NOI.PH 2016 National Eliminations was divided into three sets of four problems each.

NOI.PH Online Round 1

Putogethers Visual Aid

Farrell Wu (MGC New Life Christian Academy) managed to put together 68 points in 1A: Putogethers and 78 points in 1C: The Holiday School Play. This makes him the top scorer for these two problems. Meanwhile, Robin Yu (Xavier School), managed to run up the scoreboard by geting a perfect score in 1B: 런데빌런. Six people attempted 1D: Dishes, How We Do It? Unfortunately, none of the contestants were able to show us how to do it.

NOI.PH Online Round 2

HeKaSerye Visual Aid

The Christmas spirit clearly was with Chryz Than Wolf Chavez (Philippine Science High School – Bicol Region Campus), scoring 60 on 2A: Christmas at NAIA. Meanwhile, Ian Vincent Palabasan (Rizal National Science High School) and Andrea Jaba (Saint Jude Catholic School) scored 32 on 2B: HeKaSerye. It is believed they scored sa tamang panahon. Ian managed to get a perfect score in 2C: Meteor Garden Garden. You really can’t help falling in love with that kind of score! Robin Yu tied with everyone above for the highest score in the first three problems. However, among the eight who attempted 2D: Balikbayan Boxes, he was the only one to bring home any score. Not just any score, he scored a perfect hundred! We hope scores don’t get taxed too!

NOI.PH Online Round 3

A Little Bit Frightening Visual Aid

Almost everybody was 3A: Kung-Fu Fighting since a lot of the contestants attempted it. Farrell, Ian, Ron Mikhael Surara (Philippine Science High School – Bicol Region Campus) and Joaquin Jose Lopez (Philippine Science High School – Main Campus) would have made Master Shifu proud for scoring 22 points in that problem. Moreover, Farrell swooped in and scored 24 points in 3B: Fast As Lightning. Living up to its name, 3C: A Little Bit Frightening managed to scare away most of the participants, save for nine brave souls who attempted it. Farrell, Andrea, Shaquille Wyan Que (Grace Christian College) and two eighth-graders Rae Gabriel Samonte (Philippine Science High School – Bicol Region Campus) and Jed Arcilla (Philippine Science High School – Bicol Region Campus), manged to score 56 points on 3D: Expert Timing.

Scoreboard for NOI.PH 2016 National Eliminations

 

Final Round Qualifiers of NOI.PH 2016

Congratulations to the following students for making it to the Top 20 of the 2016 National Olympiad in Informatics – Philippines Online Eliminations!

  1. Robin Christopher Yu
    Xavier School
  2. Farrell Eldrian Wu
    MGC New Life Christian Academy
  3. Ian Vincent Palabasan
    Rizal National Science High School
  4. Andrea Jaba
    Saint Jude Catholic School
  5. Rae Gabriel Samonte
    Philippine Science High School – Bicol Region Campus
  6. Ron Mikhael Surara
    Philippine Science High School – Bicol Region Campus
  7. Shaquille Wyan Que
    Grace Christian College
  8. Franz Louis Cesista
    Philippine Science High School – Eastern Visayas Campus
  9. Marielle Montero
    Philippine Science High School – Western Visayas Campus
  10. Alexander Bernard Go
    Xavier School
  11. Sean Sta. Maria
    Philippine Science High School – Eastern Visayas Campus
  12. Royce Roger Yan
    Philippine Science High School – Eastern Visayas Campus
  13. Simon Juleovenz Garnace
    Philippine Science High School – Eastern Visayas Campus
  14. Jed Arcilla
    Philippine Science High School – Bicol Region Campus
  15. Maded Batara III
    Philippine Science High School – Main Campus
  16. Joaquin Jose Lopez
    Philippine Science High School – Main Campus
  17. Justine Che Romero
    Philippine Science High School – Bicol Region Campus
  18. Hans Filomeno Olaño
    Philippine Science High School – Bicol Region Campus
  19. Chryz Than Wolf Chavez
    Philippine Science High School – Bicol Region Campus
  20. Greg Millora
    Philippine Science High School – SOCCSKSARGEN Region Campus

They will all advance to the Finals round in February, a step to qualify them for the Philippine team to the International Olympiad in Informatics 2016 (IOI 2016) in Kazan, Russia!

For the finalists, please regularly check this website, your email and the Facebook like page for announcements.

All codes/submissions have been audited, and all scores/rankings are final.

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.