IOI 2018 Philippine Team

IOI 2018 Philippine Team

We are happy to announce the Philippine team to this year’s International Olympiad in Informatics. They will represent the country in the most prestigious informatics olympiad. The contest consists of two five-hour sessions of solving algorithmic problems and coding up solutions.

 

Dan

Dan Baterisna
grade 10, Colegio San Agustin Makati

Dan Baterisna is one who enjoys the social aspects of academic contests. He participates in a lot of team contests, providing his science and technology expertise in general knowledge competitions. When he’s not busy pwning algorithmic challenges, you will most likely see him pwning his friends in online games such as Rules of Survival. In the future, he plans to take up computer science with the goal of eventually working with local tech startups.

 

Franz

Franz Cesista
grade 12, Philippine Science High School – Eastern Visayas Campus
coach: Cary Von Alano

Franz Cesista is not content with just learning, he also enjoys sharing it to his interested peers. He shares what he learns in the countless contests and seminars by lecturing, for example, in his school’s programming club. His pursuit of knowledge manifests as well when he unwinds as he often plays complex simulation games such as Factorio. For college, he plans to study mathematics and eventually focus on artificial intelligence.

 

CJ

CJ Quines
grade 12, Valenzuela City School of Mathematics and Science
coach: Ruel Dogma

CJ Quines is the artsy type of scientist. His hobbies include calligraphy, ukelele, and the art of proving mathematical theorems. In fact he recently placed second in a science fair sponsored by Intel. There, he tackled a special case of an NP-complete problem related to planar graphs. He also maintains a blog where he writes about his experiences in various competitions and conferences. After college, he plans on becoming a data scientist.

 

Andrew

Andrew Ting
grade 12, Xavier School San Juan

Andrew Ting has been drumming in his school’s pep rallies since grade school. He found his interest in programming through the game LittleBigPlanet. When he’s not beating the drums, he is likely drumming up interest in algorithms as an officer of his school’s programming club. As a student who’s into game dev, Andrew plans to transition from playing rhythm games to developing them by taking up computer science in college.

 

The team will be accompanied by Team Leaders Kevin Atienza and Vernon Gutierrez.

kevin   vernon

 

All Filipino participants bag medals in Singapore Informatics Olympiad

All Filipino participants bag medals in Singapore Informatics Olympiad

Six Filipino students traveled to Singapore to compete in their national informatics olympiad. The delegation consisted of three Grade 12 students and three Grade 10 students. They were chosen among the top ten participants in the recently concluded NOI.PH 2018 OnSite Finals.

NOI.PH trainers Kevin Atienza and Robin Yu attended the event as the team leaders. Several coaches and supportive parents attended as well. In particular, Coach Cary Von Alano of PSHS Eastern Visayas accompanied Franz Cesista. Meanwhile, Coach John Rainer Joaquin of PSHS Bicol Region accompanied Miko Surara. In addition, Coach Edlen Sanchez of PSHS Main accompanied Kyle Dulay. The parents of the other half of the delegation attended to support their children as well.

Results

Dan Baterisna brought home the country’s second Singapore Olympiad gold medal. He scored in all five tasks and got a perfect score for the CollectingMushrooms and Journey tasks. Dan is the first Filipino Grade 10 student to accomplish such a feat. The first Filipino gold medalist to the Singapore olympiad was Robin Yu.

The rest of the delegation all won silver medals. Andrew Ting managed is on a medal streak as he grabs his second silver medal. Second-timers Franz Cesista and Miko Surara went up the ranks. This time, both of them took home silver – a great improvement from last year‘s bronze. Despite it being their first time in the Singapore NOI, Dion Ong and Kyle Dulay perfomed quite well. They both garnered enough points to get a silver medal as well. Among the six Philippine delegates, Dion was the only one to completely solve the LightningRod task.

The medals are awarded to the invited participants are determined based on their performance in relation to the local delegation. These results are posted on Singapore’s olympiad website.

About The Contest

The contest itself consisted of a five-hour session consisting of five tasks. Each contestant must write a program that outputs an answer to the task given any set of input values within the constraints of the problem. The program must be correct and efficient. That is, the program must output the correct answers and produce them within the allotted time limit.

The Philippines has been joining the Singapore National Olympiad (NOI.SG) ever since they opened the contest to foreign participants back in 2016. More information on the contest can be found here.

Conclusion

All six participants got at least a silver medal. This is a first in Philippine programming. None of this would have been possible without the diligence of our students, the support provided by their coaches and parents, the training provided by the volunteers, and the help extended by our sponsors.

With everyone working together towards the growth of science education in the country, we hope to see a generation of critical thinkers especially in a time where misinformation is prevalent in society.

Photos

Special thanks to Mr. Alex Ting and Coach John Rainer Joaquin for the photos!

2018 National Finals

2018 National Finals

The NOI.PH 2018 National Finals was held in Pointwest Innovations Corporation in Quezon City last 17 – 18 February 2018. It consisted of two rounds on-site, each of which consisted of five problems. It was attended by 28 official participants, 8 coaches, and 19 guests.

Students who almost made it to the top 30 also made it as observers. Philippine Science High School Bicol Region Campus (PSHS BRC), coached by Mr. John Rainer Joaquin, had more than six students who scored high enough in the national eliminations. Thus, the top six students from the school attended as official participants.

Among those invited, only Clyde Lawrence Borrega and John Eric Estrada (both from PSHS BRC) came as observers as they scored almost enough to get in the top 30. As they are currently Grade 8 students going on Grade 9, they have set themselves up for success in the next few years by gaining experience on what the national finals feels like.

NOI.PH Finals Round 1

For the first time, there are five problems in each round instead of the usual four.

Global Warming was the hottest problem as it received the most attention from the participants. In particular, twenty-three submitted code to this problem. Dan Baterisna, Kyle Dulay and Franz Cesista managed to make their program work for all four subtasks. Ron Surara notably passed the first three subtasks, netting him 51 points for the problem.

Fourteen official participants threw in their code for Boomerang Gadget, eagerly waiting what would come back. Dan managed to finish all but the last subtask, giving him 73 points. However, the award for being the only one to complete all subtasks goes to CJ Quines. Now that the scores are official, no one can take that award away from him now.

Thrust Trials was interesting in that you either got it, or you didn’t, just like the Mayon reference located in the problem. Out of the thirteen people who submitted, only four got nonzero scores. Dion Ong and Steven Reyes managed to submit code that correctly treated all the subtasks, as well as Dan and CJ. Sister Spaceships, one of the problems in day two, rightfully congratulates Steven Reyes for being the first to submit a working solution.

A similar situation happened looking at the scores of Voltes Group. Among the six participants who submitted, Kyle and Franz managed to get full points. Interestingly, CJ managed all but the second subtask.

Finally, among the thirteen attempts at Lean on Me, only Dan, Dion, Ron, and Red Ligot managed to get a nonzero score, and all four of them managed to finish the first subtask.

NOI.PH Finals Round 2

Problems in the second round was filled with amusing alliterations. Everyone submitted code for People Power but only Dan, Kyle, and Dion managed to make them work for all subtasks. Nine others managed until the fourth out of the six subtasks. In addition, our two observers both scored 10 points in this problem as well.

Of the twenty-one official participants who submitted code for Sister Spaceships, only Dan, CJ, and Kyle managed to get all subtasks. There were several ways to gain points for this problem. Some managed to get 23 by focusing on the third subtask, which asks to solve a special case of a problem. More notably, Alexander Go managed to score 54 points for doing the first two subtasks instead.

Among the thirteen participants who submitted code to Merging and Missiles, only four managed to obtain nonzero scores. CJ and Kyle both managed all subtasks while Ron and Dion managed to solve enough subtasks to respectively get 55 and 25 points.

One can see a similar pattern in Late-Night Littering. Only half of the eight finalists who submitted got nonzero scores and only half of that, namely Dan and CJ, managed to get all of the subtasks correctly. Ron managed to do all but the last subtask while Andrew Ting managed to do all but the last two.

Backbreaking Breakout proved to be the most backbreaking problem for all the participants as only four got a nonzero score. However, none of the finalists managed to help complete the break out. Dan was the highest scorer in this problem and managed to solve all but the last two subtasks. Ron and Zachary Lopez finished subtask 1 and got 15 points for it. Franz was the only one who finished subtask 4 and got 5 points.

Photo Gallery

Special thanks to Justin Castro for the photos!

Scoreboard for NOI.PH 2018 National Finals

ranknamescoretimegrade levelschoolcoachregionusernameVoltes GroupGlobal WarmingThrust TrialsLean on MeBoomerang GadgetMerging and MissilesSister SpaceshipsLate-Night LitteringBackbreaking BreakoutPeople Power
1Dan Alden Baterisna640567.1Grade 10Colegio San Agustin - Makati NCR: National Capital RegionDBaterisnaPH181001001073010010057100
2Carl Joshua Quines638527.63Grade 12Valenzuela City School of Mathematics and ScienceRuel DogmaNCR: National Capital RegionCQuinesPH1882100010010010010056
3Kyle Patrick Dulay500510.87Grade 12Philippine Science High School - Main CampusEdge AngelesNCR: National Capital RegionKDulayPH181001000100100100
4Franz Louis Cesista266516.18Grade 12Philippine Science High School - Eastern Visayas CampusCary Von AlanoRegion VIII: Eastern VisayasFCesistaPH181001000120230526
5Dion Stephan Ong258570.95Grade 10Ateneo de Manila Junior High School NCR: National Capital RegionDOngPH180100102523100
6Ron Mikhael Surara257548.35Grade 10Philippine Science High School - Bicol Region CampusJohn Rainer JoaquinRegion V: Bicol RegionRSuraraPH18051101255581556
7Andrew Ting154410.57Grade 12Xavier School San Juan NCR: National Capital RegionATingPH18230122340056
8Steven Reyes148423.23Grade 9Saint Jude Catholic School NCR: National Capital RegionSReyesPH181002325
9Alexander Go145584.92Grade 12Xavier School San Juan NCR: National Capital RegionAGoPH18231254056
10Zachary Lopez98567.32Grade 11International School of ManilaNCR: National Capital RegionZLopezPH182312231525
11Ian Vincent Palabasan91538.68Grade 12Rizal National Science High School Region IV-A: CALABARZONIPalabasanPH1823001200056
12Ryan Mark Shao79139.15Grade 11Xavier School San Juan NCR: National Capital RegionRShaoPH18000023056
13Rae Gabriel Samonte79320.88Grade 10Philippine Science High School - Bicol Region CampusJohn Rainer JoaquinRegion V: Bicol RegionRSamontePH1823056
14Steven Gabriel Chua64333.2Grade 10Xavier School San Juan NCR: National Capital RegionSChuaPH188056
15Ian Angelo Aragoza56358.63Grade 12Philippine Science High School - Central Luzon CampusJan Michael IbanezRegion III: Central LuzonIAragozaPH18232310
16Ian Red Ligot55349.4Grade 12CIIT College of Arts and Technology NCR: National Capital RegionILigotPH1823101200010
17Jed Arcilla41248.05Grade 10Philippine Science High School - Bicol Region CampusJohn Rainer JoaquinRegion V: Bicol RegionJArcillaPH18041
18Daniella Joan Francisco33483.4Grade 9Philippine Science High School - SOCCSKSARGEN Region CampusSheena Dawn FerrarenRegion XII: SOCCSKSARGENDFranciscoPH1823010
19Steven Gabriel Chua26116.35Grade 10Xavier School San Juan NCR: National Capital RegionKChuaPH180026
20Al Christian Mabute26118.9Grade 10Philippine Science High School - Bicol Region CampusJohn Rainer JoaquinRegion V: Bicol RegionAMabutePH180000026
21Lance Benedict Cabrera26131.32Grade 8Philippine Science High School - Bicol Region CampusJohn Rainer JoaquinRegion V: Bicol RegionLCabreraPH18000026
22Francis Benedict Martinez26240.22Grade 9Philippine Science High School - Eastern Visayas CampusCary Von AlanoRegion VIII: Eastern VisayasFMartinezPH18000026
23Johnbell De Leon1076.17Grade 9Philippine Science High School - Bicol Region CampusJohn Rainer JoaquinRegion V: Bicol RegionJDeLeonPH180010
24Frederick Ivan Tan10127.47Grade 8Philippine Science High School - Main Campus NCR: National Capital RegionFTanPH180010
25Kim Bryann Tuico10192.8Grade 11Manila Science High SchoolRomer AbellaNCR: National Capital RegionKTuicoPH180000010
26Gregory William Joseph Liu10219.98Grade 11Philippine Science High School - Central Visayas CampusFelix CalvoRegion VII: Central VisayasGLiuPH180010
27Rapharl Justin Portuguez10231.57Grade 11Philippine Science High School - Central Luzon CampusJan Michael IbanezRegion III: Central LuzonRPortuguezPH180010
28Philmon Wee00Grade 10Xavier School San Juan NCR: National Capital RegionPWeePH18000000

Final Message

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

The organizing committee would like to thank our host, Pointwest Innovations Corporation, for their generous support in providing the venue and infrastructure to hold the event. Special thanks to Ms. Beng Coronel, Ms. Veck Basinang, Mr. Sherwin Pelayo, and the infrastructure and IT security teams of Pointwest for accommodating us and helping us throughout the event. We also express our gratitude to Uber for giving the option for our guests to travel with them at a discounted rate. We would also like to express our deepest gratitude to Mr. and Mrs. Ryan and Dorene Uy for helping out.

We would also like to thank our volunteers from the Institute of Electrical and Electronics Engineers (IEEE UPD-SB), ADMU ProgVar, UP ACM, and CompSAt, as well as our testers, and ushers for helping out.

Lastly, we thank all the coaches, parents, and students for their participation and hard work and for making this event a success. We hope for your continued support as we move to the selection of our delegation to the International Olympiad in Informatics in September.

A Firsthand Account of the NOI.PH Onsite Experience

A Firsthand Account of the NOI.PH Onsite Experience

Introduction

Is it going to be your first time to go to the final round? Has it been one of your hashtag life goals to officially participate in the onsite round but haven’t gotten around to preparing yet? Here is a first-hand account of what happened during NOI.PH Onsite Round last year to let you know what you’re going in for. This is being posted with permission from CJ Quines, one of last year’s finalists, and the writer of this article. The article has been edited accordingly to be on a website. The full PDF in all its glory is on his website.

NOI 2017 Reflections

The following is a narration of the events that occurred in the NOI 2017 finals. It’s very likely that the order I did the problems is inaccurate, because I’m writing this quite some time after the actual event. Abbreviated versions of the problem statements are in the appendix.

Practice round

Reminders for the participants were projected in front of everyone. It contained instructions on compiling using the terminal, which was pretty helpful. The computers were running in Ubuntu and I didn’t know how to compile in Ubuntu.

This was the first time I’ll be using Ubuntu, and I really wasn’t familiar with any Linux distro. But well, that was the purpose of the practice round, to get used to the environment.

Apparently we’re allowed to use Zeal, a program that provides offline documentation. Which was a big help, considering I don’t know much of the standard library and the language, even though I should. I could look up how wide an int is, or how to use printf to truncate decimals.

I took a few minutes acclimating to the system. I tried to build a file in C++. I checked which version of Python was on the system, and there was Python 2.7. There was Sublime Text 3, which was good since that’s the editor I used. I tried the build system, which worked, so no problems.

The practice round started a bit after that. It would be for two hours, and I spent the first few minutes looking through all the problems, and they all looked doable except the last. I read the first problem and I am puzzled after finding a simple solution: repeat the string ABC up to n letters. I wondered if there was more to it. It worked, so I moved to the next problems.

The second problem invovled \oplus, bitwise addition. After thirty minutes of false starts and forgetting the size of n, I managed to get a wrong answer. Then I managed to find a simple solution: n i i, where i is an integer. At this point I realize that the two previous problems were math problems — was this a sign?

Problem three was a math problem involving pigeonhole. Thus, for the record, there were three math problems in the practice round. The closed-form is well-known among the math community: it is stars-and-bars. The problem was computing a bunch of binomial coefficients quickly. I’ve seen a trick in doing that before, using the magic of DP: store Pascal’s triangle in memory and call.

That was not that straightforward to implement, and I had a few false starts due to wrong indices. I did manage to do so, after roughly another thirty minutes since I solved the second problem. This leaves me with a round 300 points, eighty minutes in the round.

There were forty minutes left and one problem to solve, and the remaining problem was so complicated that even the abbreviated version in this report took two paragraphs. After trying a few cases on paper, I quickly realize that solving it completely would be impossible in the remaining time, and focused on the first subtask. The first subtask was restricted enough that it was only the matter of finding the shortest path from left to right.

I did know that would involve a pathfinding algorithm. I thought of using a BFS. The trouble was, I did not like working with grids and graphs. I spent the last few minutes of the practice round working on reading the data, which I struggled with, because I kept messing up scanf. I gave up at about three minutes left. We counted down the last ten seconds and ended with applause.

Round 1

After the practice round was lunch, and after lunch was the start of the first round. It would be for five hours, starting from 1:30 PM and ending at 6:30 PM.

The first thing I did was read all the problems and try to summarize what each one was asking for. The first problem involved \oplus once again, which probably explains why one of the practice round problems involved \oplus, as setup for this problem. The second problem was probably a math problem, counting the number of increasing sequences. I try a few cases by hand and get nothing.

The third problem was an algorithmic problem, involving ranged sums-of-maximums queries. Of course, after working out on paper, the maximum part isn’t as important — it’s a ranged query of 2^{n-1}a_n + 2^{n-2}a_{n-1} + \cdots + a_1, once you sort it to get a_n > a_{n-1} > \cdots > a_1. Sorting was O(n\lg n), and then q queries made it O(nq\lg n), which isn’t nearly fast enough for the last subtasks.

The fourth problem invovled a binary grid, which makes use of a very interesting property. Suppose we have an (m-1) \times (n-1) binary grid. We add a column to the right of the grid, as the sum modulo two of each row, and add a row to the bottom of the grid, as the sum modulo two of each column. Then if we take the sum modulo two of the last column, and take the sum modulo two of the last row, they’re the same. It’s an interesting combinatorics exercise in invariants.

Without any intuition for which problems would be easier, I decided to work on the first problem first. Since the inputs become really large, there is probably an O(1) or an O(\lg n) solution, and since it looked like a math problem, I erred on the side of an O(1) solution. After working out a few small cases on paper, I fail to see a pattern. Then I realized, I had a computer! I can use a program to bash small cases.

I wrote a short Python program to bash the first few cases. At first the program was only limited to spitting the answer for certain M and N, but this was too slow. So I wrote a function that tried all N \leq M. But this was also too slow, so I wrote another function that tried all M up to a certain limit, and stored the results in a triangle.

There were a few observations to be made. The N = 1 case is easy, and so is the N = 2 case. The M is a power of two and one more than a power of two had a pattern. Usually, for a certain row, after a certain point, everything is just the same power of two over and over. And this power of two was the smallest one larger than M, let’s call it 2^k. Besides that though, there didn’t seem to be any pattern I could exploit for an O(1) solution. My biggest lead was figuring out when it became a power of two over and over, which could be a potential optimization.

After writing out a few cases, I make a conjecture that this happens when M + N - 1 \geq 2^k. At this point, I’ve spent an hour in the competition, so I decided to fold for the moment by writing a program for what I had. It would do the optimizations for the special cases and the M + N - 1 \geq 2^k case, and otherwise bash.

While writing the program, I spend a lot of time figuring out how to compute 2^k given M. I first tried to do some clever stuff using bit manipulations, but after failing for five minutes to find something suitable I decided to just hardcode the powers of two, which would also be helpful later on for the M as a power of two case. At first, I thought of trying a bunch of conditional statements, but then I realized that it would be easier to do a binary search. I mess up the binary search a few times, spending another ten minutes at something that should have been routine.

I finshed the program, and it got a wrong answer. Not even the first subtask, which was M, N \leq 20. This was roughly ninety minutes in the competition. I had to make a decision whether to debug or to proceed, and I made a decision to debug instead, because I was more likely to score points repairing a solution rather than making a new one. (This is something I learned from math contests. When running out of time and faced with the decision to review answers or to proceed, it is often better to review answers, because that holds more potential points.)

After racking my brain looking for typos, I still couldn’t spot the error. I decided to do a brief check and use the triangle I generated from my Python code to make the first twenty rows and submit that. It got the first subtask, so there wasn’t anything wrong with the judge, and the problem had to be my code. (I have good faith in the problem-setter. But I was debugging and under stress, so I had to make sure.)

If my Python code produced the correct answers for the first subtask, and the program failed to, then there must be a discrepancy with the answers that both produced. This was kind of expected: I never proved any of my observations, I just made guesses based on data. I decided to get my program again and print the first twenty rows to compare it with the Python output.

After printing, I noticed something: the conjecture that M + N - 1 \geq 2^k implied the answer was 2^k is wrong, and this was the cause of almost all of the discrepancies. The conjecture that worked was M+N \geq 2^k. There was another discrepancy however, the case M = N = 2, and I could not understand how that was produced, so I decided to just hardcode the answer to that case.

I also noticed I could make an optimization for the bashing. Instead of checking all MN cases, you only need to check the cases between M and 2^k if they could be produced with a number between 1 and N. In other words, you can already produce all the numbers 1 \leq x \leq M by doing x \oplus 1 = x, so you only need to check which numbers M+1 \leq x \leq 2^k can be produced.

This can be done with a cool property of \oplus: a \oplus b = c \iff a \oplus c = b. If we were looking for m \oplus n = x, where x is the value we want to check is possible, we only need to do m \oplus x = n, and check if 1 \leq n \leq N. Although both algorithms are O(MN), the second one is faster by a constant, and the first subtasks were clustered enough together that optimizations counted. I submit and it gets 37 points, not a lot, but fine.

I moved on to the second problem, and after trying out a few small cases I quickly realize that this is a combinatorics task. I try to list out the small cases, wasting a few minutes, especially since a lot of my listing was wrong. I managed to produce the first few values.

I fail to see a pattern, so I decided to try a different approach: treat it as a math problem that I would see in a contest. Let’s say there are n numbers we have to permute. I make a few initial observations from my failed listings, the most important one being that 1 is pretty restricted. It could only appear in the first or second slot in the permutation. If 1 appeared in a later slot, then it had to be larger than either of the two previous slots, which is impossible.

Let’s call the number of permutations where 1 goes first as a_n and where 1 goes second as b_n. If 1 was in the first slot, how can we fill in the rest of the slots? The condition for the third slot is already fulfilled: it’s already larger than the first slot, 1. So the second slot can be anything, and the third slot can be anything, provided that the fourth slot’s conditions were fulfilled, and so on. This was precisely the case for n-1! So a_n = a_{n-1} + b_{n-1}.

Now, if 1 appeared in the second slot, then we can just ignore the first slot. We have a permutation of n-1 where 1 is the first. There are b_{n-1} ways to do this. And then there are n-1 ways to pick the number in the first slot. Thus you had b_n = (n-1)b_{n-1}. I worked out a few cases by hand and it matched my small cases from earlier.

That was great — with both recursions, we could compute for any a_n + b_n. I decided to code up this solution, using two arrays, and it got all the subtasks, hooray. After coding this solution I then realize that you could make it one recursion instead. The (b_n) were basically the factorials, and you could do it with only one array. But the point was that the problem was solved, so I moved to the next problem.

As an aside, my write-up for this might make it look like solving the second problem was a straightforward process. It wasn’t — it took another hour. At this point, I spent the first two hours at the first task and another hour at the second task, putting me three hours in the competition.

With roughly two hours left, I had several choices of things to do, and it was hard to decide which to do next. Optimize task 1, try task 3, try task 4.

The advice I heard was maximize points in the remaining time”, which was easier said than done. I felt I couldn’t get any more potential points for task 1 without spending a lot of time, but tasks 3 and 4 seemed easier to get at least a few points. I tried task 3 first, because it was before task 4.

I already worked out earlier on paper that the answer was just the powers of two times the sorted list, and that this was O(nq\lg n). I try to think of a more clever solution. Since it involved ranged queries, the first thought was to try a segtree, and figure out how to propagate.

This was not easy, and I failed to do so. The problem was that segtrees should have parts that build up from smaller cases, but the power of two times the sorted subarray did not build up easily. I couldn’t think of a good way to solve the problem. The O(nq \lg n) was enough to grab about a third of the points, I think, so I tried coding that first.

That was also problematic. I had to repeatedly look up how to use sort, since I wasn’t familiar with that. I needed the powers of two, and computing them each time was slow. I realized that I already had the powers of two hardcoded from my solution to task 1, so I just grabbed that. After that, I think I managed to get 53 points, and I had an hour left.

I did not manage to do a lot in the last hour. The tasks I could do included: optimize task 1, optimize task 3, try task 4. After trying task 4, I then quickly realized that it was not easy.

I managed to come up with a way to count the minimum number of entries that need to be changed, which is a complicated thing involving counting the number of ones in each row and column. This happened after trying lots and lots of small cases, which took up thirty minutes of my time.

The hard part was computing the number of ways to obtain a good grid. After doing a lot of combinatorial stuff, there was an O(1) solution that was very very long and used a lot of factorials and was, to be brief, hard to compute.

I tried to code brute force instead for task 4, but after failing to read the input after fifteen minutes, I decided to give up. I spent the remaining time trying the first task.

As the time was about to close, I used up another ten minutes or so trying out the first task by looking for patterns in the binary expansion. I did not manage to find a usable pattern. I ended up with 190 points, placing me at third place for round 1.

Round 2

The numbering will be as in the appendix, so the problems in round 2 are tasks five through eight.

Again, I first read all the problems to get a general sense of the round today. It was lucky for me that the problems in the previous day were largely mathematical in nature, in contrast to algorithmic problems that are usual in competitive programming. (This was not good for other contestants, however. Robin was particularly against this. He makes the case in his blog that this should not happen in programming contests, and it is a thought-provoking read.) The second day, however, seemed to be all algorithmic problems.

The fifth task would’ve been easier, if it was considering subsequences instead of subarrays. Indeed, this was the mistake I made in my first reading. The sum of the second smallest terms in each subsequence can be found simply by sorting and multiplying each term by the appropriate factor, O(n \lg n). But this was subarrays, not subsequences.

The sixth task seemed relatively straightfoward and it seemed like it can be done in O(n) for reading the input. The seventh task seemed like a straight MST (Minimum spanning tree, a classic algorithmic problem.) at first, though I had to read it twice. I found it hard to believe that a classical problem would be given out, so I decided to take a closer look later.

The eighth task was a tiling problem, and it would make a good combinatorics problem. However, the programming version is significantly harder, because you have to read the input and output the tiling correctly, which was quite complicated. I decided I probably wouldn’t solve it.

Once again, I tried the tasks in order. I knew early on that the sixth task was the easiest, but I would be leaving it for the middle of the competition when my concentration is least. I did the fifth task first. I spent a good amount of time trying to figure out how to do it quickly.

I spent a good deal of time trying out the problem on paper, and lots of small cases. It felt like a DP problem, and if it was a DP problem, then it should be able to be done with a processing from left to right. Adding a new element on the end of a list with n-1 elements gives you n new subarrays, all of them ending with the newly added element. If you sort them one-by-one, that’s O(n \lg n). You have n new subarrays, and you do this n times, so that’s O(n^3 \lg n), quite slow.

I somehow had the strong urge that sweeping from left-to-right would be best. I tried more and more small cases on paper, looking for a pattern. I briefly thought of using something like a divide-and-conquer, a segtree-style solution. Once you have the segtree set up in O(n \lg n), you have O(n^2) queries and O(\lg n) time for each query, making O(n^2 \lg n). But I was not good with segtrees.

I went back to my previous solution — there was a lot of redundancy in sorting the subarrays, because there was a huge overlap between them. Right, overlap! You only need the second smallest term for each subarray, but each new subarray is the same as a previous one, with a new element on the end.

Thus you didn’t need to sort the whole array over again. You just need to keep in memory the two smallest elements in the subarray starting from each element. Then you’d only compare this new term to the two previous smallest elements, which is O(1), because it’s two comparisons worst-case.

Why is it two comparisons worst-case? Say the two previous smallest elements in the subarray were x \leq y, and you’re adding z to the subarray. If z \leq x, then the new smallest elements are (z, x). If z \geq y, then you retain the smallest elements: (x, y). Finally, if neither, then it’s (x, z). Two comparisons, instead of sorting the whole subarray, which cut O(n \lg n) to O(1).

That bought the time down to O(n^2): n subarrays for each added element, and you add an element n times. I couldn’t reduce it any further, so I typed up my solution. That got me 45 points, after some debugging, and the next subtask seemed too difficult, so I moved on to the next problem.

Even though the next problem was the easiest one throughout the whole competition, I spent nearly an hour and a half trying to solve it. The sixth task was a reference that I got: it was referring to Breaking Bad, and it was rather witty.

My solution, basically, involved keeping track of the previous coordinate and the current coordinate, as well as the current mode”. It could be in horizontal mode, or vertical mode, or neither. Basically, if it was in horizontal mode and the next vertex did not lie in the same horizontal line, you have to make a turn, ditto for vertical mode.

After coding my solution, and debugging it, it still got a wrong answer. Not even the first subtask. At this point I’ve spent nearly forty minutes coding and debugging, and trying to find what was wrong, so I made the mistake of hanging on to my code and creating test case after test case.

I tried to remember some advice I heard about debugging. Create tricky test cases, with small inputs. After writing several of these, I managed to find the error, but I didn’t know how to fix it. I simply decided that my solution was rubbish and that there was a simpler way to proceed.

Instead of keeping track of modes, you keep track of directions. This was a far simpler idea, and simpler ideas tend to work better. You kept the direction undecided for the first few points, until you hit a horizontal or vertical point. Then after that you had to alternate direction, and you simply incremented each time you had to alter.

That solution worked, and got all the points. I’ve used roughly three hours at this point.

Two hours left, and there were several things I could do: solve task seven, optimize task five, solve task eight, in order of ease. Task eight was placed last because I had bad experience with two-dimensional input and output. Optimizing task five would be hard, because the next subtask was such a big leap.

That left me with trying task seven, the MST variant. At first, I thought it was a straight MST — to minimize the average, you needed to minimize the sum, right? That was what it seemed like based on the sample case. So I tried to implement an MST algorithm, and build from there.

However, I’ve never implemented an MST algorithm before. I knew Kruskal’s, but I’ve never tried programming it. The idea was to keep all the edges sorted by weight from lightest to heaviest, and put in the edges one-by-one. If any new edge connected two vertices that were already in the tree, then discard.

Easier said than done, however. I ended up taking a lot of time for the edge routine, because I couldn’t figure out how to use priority_queue. I also got tired typing edge.second.first and edge.second.second over and over again. After a few iterations however, I got a seemingly working Kruskal algorithm.

I did not get any subtasks however. Then I realized that the way I was printing the floats was inaccurate, and it took me a few mintues of looking up printf before I could figure out what was wrong. Then I still got no points, and that was when I decided to take a break and think about the problem in the break room.

I was pacing around in the break room, trying to figure out what was wrong. Why wouldn’t the MST contain the smallest average edge weight? What wouldn’t make a minimal average spanning graph contain the MST?

After thinking it through and going through a few examples in my head, I realized what was wrong: you can add lighter edges to the MST to make the average smaller. It took me a few minutes before making that realization, but once I got that, I went back to the contest room and started working on paper.

Were there cases with a smaller average edge weight than the MST? That was impossible — either it contains the MST or it’s not the smallest average, by contradiction. I work out a few test cases on paper, and try to work it out.

For Kruskal’s, instead of throwing away an edge that would connect two vertices in the tree, you put it in another queue. And then when you make your MST, you push edges from that queue as long as it makes the average smaller.

Once again, easier said than done. The rest of the time was spent working on this problem, trying to fix my routines. I was implementing the graph using vectors, and I wasn’t well-versed with vectors at all.

Eventually there were two minutes left and I was still debugging my program. I couldn’t figure out what was wrong. I tried all the sample cases and the test cases I could think of and I still couldn’t spot the error. Eventually, I do see it: there’s a mistake with one of my subroutines, but there was not enough time.

I ended up with 145 points, which was just fine. That gave me a total of 335 points, making me sixth place, though I would only find that out later that evening. I had to leave early as I had class the next day.

Reflections

I had problems of inefficiency during the contest. Excluding the fact that I didn’t notice the bitonicity for task 3, which few people did anyway, there was a lot of room for improvement, and much of that could be done relatively quickly.

For example, the fact that I didn’t know how to implement Kruskal’s made me lose a hundred points in the second round. I also had to refer to the documentation a lot, and I was only then figuring out how to do several things. It would be better to come to a programming competition more prepared, so I could focus on solving the problems.

Poor debugging skills were also something I needed to work on. I spent a lot of time debugging, which I could’ve spent figuring out algorithms and implementing them. This was something I’ve noticed before but didn’t give much attention to.

I did enjoy the competition a lot, and it was a wonderful learning experience to program for five hours straight for two days. It was very exciting, and I made a lot of new friends. I had a really fun time and I want to join again next year.

Acknowledgements

Thanks firstly to the organizers and volunteers who made the NOI possible. It’s a huge effort, and I really appreciate the time they spend working on the NOI, without getting anything in return. Thanks to Pointwest for providing the venue which was really nice. Thanks to VCSMS as always for being supportive. And finally, thanks to the other competitors who were good company throughout the contest.

2018 National Eliminations

2018 National Eliminations

The NOI.PH 2018 National Eliminations started on 6PM of 5 January 2018 and finished on 11:59PM of 14 January 2018. It consisted of fifteen problems of varying difficulty.

The Participants

Among the 261 registrants, 156 participated in the 222-hour online competition. The participants came from 30 different schools from all over the country. Moreover, each of the main regions of the Philippines were represented.

Luzon (60) | Visayas (34) | Mindanao (16) | NCR (46) | abroad (0)

Broken down by region, we have the following chart:

CAR (9) | I (19) | II (1) | III (5) | IV-A (6) | V (20) | VI (14) | VII (8) | VIII (12) | X (5) | XI (1) | XII (10) | NCR (46)

With regards to the distribution of grade levels, the likeliness to join was directly proprtional to the number of years spent in school. A lot of participants from senior high school have only spent one year studying but ended up with spectacular results. What more would at least three years of training? Younger participants are encouraged to join.

Grade 7 (2) | Grade 8 (11) | Grade 9 (19) | Grade 10 (31) | Grade 11 (43) | Grade 12 (50)

The Problems

Here is the list of problems for the elimination round.

 

Scoreboard for NOI.PH 2018 National Eliminations

This year, only registered participants are included in the final scoreboard.

 

Final Round Qualifiers of NOI.PH 2018

In no particular order, here is the list of students who qualify for the NOI.PH 2018 Final Round. This list is subject to change depending on whether the students confirm or not.

  • Al Christian Mabute (Grade 10)
    Philippine Science High School – Bicol Region Campus
    Coach: John Rainer Joaquin
  • Alexander Go (Grade 12)
    Xavier School San Juan
  • Andrew Ting (Grade 12)
    Xavier School San Juan
  • Carl Joshua Quines (Grade 12)
    Valenzuela City School of Mathematics and Science
    Coach: Ruel Dogma
  • Dan Alden Baterisna (Grade 10)
    Colegio San Agustin – Makati
  • Daniella Joan Francisco (Grade 9)
    Philippine Science High School – SOCCSKSARGEN Region Campus
    Coach: Sheena Dawn Ferraren
  • Dion Stephan Ong (Grade 10)
    Ateneo de Manila Junior High School
  • Francis Benedict Martinez (Grade 9)
    Philippine Science High School – Eastern Visayas Campus
    Coach: Cary Von Alano
  • Franz Louis Cesista (Grade 12)
    Philippine Science High School – Eastern Visayas Campus
    Coach: Cary Von Alano
  • Frederick Ivan Tan (Grade 8)
    Philippine Science High School – Main Campus
  • Gregory William Joseph Liu (Grade 11)
    Philippine Science High School – Central Visayas Campus
    Coach: Felix Calvo
  • Ian Angelo Aragoza (Grade 12)
    Philippine Science High School – Central Luzon Campus
    Coach: Jan Michael Ibanez
  • Ian Red Ligot (Grade 12)
    CIIT College of Arts and Technology
  • Ian Vincent Palabasan (Grade 12)
    Rizal National Science High School
  • Jed Arcilla (Grade 10)
    Philippine Science High School – Bicol Region Campus
    Coach: John Rainer Joaquin
  • Joaquin Jose Lopez (Grade 12)
    Philippine Science High School – Main Campus
    Coach: Edge Angeles
  • Johnbell De Leon (Grade 9)
    Philippine Science High School – Bicol Region Campus
    Coach: John Rainer Joaquin
  • Kim Bryann Tuico (Grade 11)
    Manila Science High School
    Coach: Romer Abella
  • Kirby Ezra Chua (Grade 11)
    Xavier School San Juan
  • Kyle Patrick Dulay (Grade 12)
    Philippine Science High School – Main Campus
    Coach: Edge Angeles
  • Lance Benedict Cabrera (Grade 8)
    Philippine Science High School – Bicol Region Campus
    Coach: John Rainer Joaquin
  • Nyle Aldrin Maliwat (Grade 12)
    Philippine Science High School – Central Luzon Campus
    Coach: Jan Michael Ibanez
  • Philmon Wee (Grade 10)
    Xavier School San Juan
  • Rae Gabriel Samonte (Grade 10)
    Philippine Science High School – Bicol Region Campus
    Coach: John Rainer Joaquin
  • Rapharl Justin Portuguez (Grade 11)
    Philippine Science High School – Central Luzon Campus
    Coach: Jan Michael Ibanez
  • Ron Mikhael Surara (Grade 10)
    Philippine Science High School – Bicol Region Campus
    Coach: John Rainer Joaquin
  • Ryan Mark Shao (Grade 11)
    Xavier School San Juan
  • Steven Gabriel Chua (Grade 10)
    Xavier School San Juan
  • Steven Reyes (Grade 9)
    Saint Jude Catholic School
  • Zachary Lopez (Grade 11)
    International School of Manila

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 2018 (IOI 2018) in Ibaraki, Japan!

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.

NOI.PH 2018 Fun-Filled Christmas Practice Contest Extravaganza Results

In preparation for the NOI.PH 2018 Online Round, we held the month-long NOI.PH 2018 Fun-Filled Christmas Practice Contest Extravaganza on HackerRank last December 2017.

Here are the results.

First, the general rankings, where all officially-registered contestants are eligible to win prizes:

2018 Practice Round Official Leaderboard - General Leaderboard

RankHackerRankFirst NameLast NameGrade LevelSchoolScore
1DanIsTheManDan AldenBaterisna10Colegio San Agustin - Makati4416
2_LELOY_Franz LouisCesista12Philippine Science High School - Eastern Visayas Campus3693
3redligot2009Ian RedLigot12CIIT College of Arts and Technology3280
4dsjong2002Dion StephanOng10Ateneo de Manila Junior High School3021
5andrewtingAndrewTing12Xavier School San Juan2457.33
6Something_HackerRon MikhaelSurara10Philippine Science High School - Bicol Region Campus2317
7H3XoRuSHRae GabrielSamonte10Philippine Science High School - Bicol Region Campus1698
8cjquinesCarl JoshuaQuines12Valenzuela City School of Mathematics and Science1634
9rogue8200Royce RogerYan12Philippine Science High School - Eastern Visayas Campus1414
10rmlshao19Ryan MarkShao11Xavier School San Juan1375
11nitrateatomAlexanderGo12Xavier School San Juan1354.33
12jedjetplaneJedArcilla10Philippine Science High School - Bicol Region Campus1268
13TheLostCookieKyle PatrickDulay12Philippine Science High School - Main Campus1200
14franciellajoanDaniella JoanFrancisco9Philippine Science High School - SOCCSKSARGEN Region Campus1156
15NemurinoFrancis BenedictMartinez9Philippine Science High School - Eastern Visayas Campus1114
16mjzamorasMichaelZamoras9Philippine Science High School - Eastern Visayas Campus1071
17Steve120StevenReyes9Saint Jude Catholic School924
18IntegJose RafaelMatienzo9Philippine Science High School - Eastern Visayas Campus893
19LittleHacker12JohnbellDe Leon9Philippine Science High School - Bicol Region Campus890
20fourcodingMiguel AngeloDelos Santos11Philippine Science High School - Ilocos Region Campus873
21clydejallorinaClyde CourtneyJallorina11Philippine Science High School - Main Campus816
22kelc210Kirby EzraChua11Xavier School San Juan800
22KatAttack01Jayson LenoiArollado12Xavier School San Juan800
24shannaurellegShann AurelleRipalda10Philippine Science High School - Eastern Visayas Campus642
25chosen_one12John AngeloOringo8Philippine Science High School - Bicol Region Campus628
26AudentesMarc DominicEnriquez12Philippine Science High School - Eastern Visayas Campus600
27stsorupiaSvenSorupia12Philippine Science High School - Main Campus578
28ariiicJose EnriqueRamirez8Philippine Science High School - Bicol Region Campus457
29acmabuteAl ChristianMabute10Philippine Science High School - Bicol Region Campus453
30Chou_Tzuyu1015SimwelPante9Philippine Science High School - Bicol Region Campus416
31BoogySaluteAllen AdrianSolis10Philippine Science High School - SOCCSKSARGEN Region Campus414.33
32AnagramicCoderJohn DavidVidad11Philippine Science High School - Ilocos Region Campus300
33F_Boi_69AdalbertApuya8Philippine Science High School - Bicol Region Campus286
34StrikeofsonarKristoferSano10Philippine Science High School - SOCCSKSARGEN Region Campus242
35HackskillShaquille WyanQue12Grace Christian College200
35regiszehnharold1Zehn HaroldRegis9Philippine Science High School - Eastern Visayas Campus200
35eryllaErylla BeatrishOamil11Philippine Science High School - Ilocos Region Campus200
35TG_GuruGabrielGeraldo9Philippine Science High School - Eastern Visayas Campus200
35calapsssCharles JavierCalapini11Philippine Science High School - Ilocos Region Campus200
35IllumeeSeanSta Maria12Philippine Science High School - Eastern Visayas Campus200
35CodeCodeCodeCodeVictor EdwinReyes9Philippine Science High School - Bicol Region Campus200
35ZachLoZacharyLopez11International School of Manila200
35CoderX_412ClarenceCombinido9Philippine Science High School - Eastern Visayas Campus200
44Blackheart_2003Gerrymie FlorelBajaro8Philippine Science High School - Bicol Region Campus116.67
45flameicicle27AmosVillanueva11Philippine Science High School - Ilocos Region Campus100
45booandroGarlu VictorNepomuceno10Manila Science High School100
45norielleeco76NorielleEco7Philippine Science High School - Eastern Visayas Campus100
45Rhayne213Maxene RhaynePaler7Philippine Science High School - Eastern Visayas Campus100
45HansA4HansAndales7Philippine Science High School - Eastern Visayas Campus100
45CyTPMJaymund CyrusFloranza8Philippine Science High School - Bicol Region Campus100
51SnarglePopJoel AndrewMallari9Philippine Science High School - Central Luzon Campus56

 

Second, the special rankings, limited to only those who have not ranked within the Top 10 of previous NOI.PH Final Rounds and have not been invited to NOI.PH In-House Training Camps:

2018 Practice Round Official Leaderboard - Special Leaderboard

RankHackerRankFirst NameLast NameGrade LevelSchoolScore
1redligot2009Ian RedLigot12CIIT College of Arts and Technology3280
2dsjong2002Dion StephanOng10Ateneo de Manila Junior High School3021
3H3XoRuSHRae GabrielSamonte10Philippine Science High School - Bicol Region Campus1698
4rogue8200Royce RogerYan12Philippine Science High School - Eastern Visayas Campus1414
5rmlshao19Ryan MarkShao11Xavier School San Juan1375
6jedjetplaneJedArcilla10Philippine Science High School - Bicol Region Campus1268
7franciellajoanDaniella JoanFrancisco9Philippine Science High School - SOCCSKSARGEN Region Campus1156
8NemurinoFrancis BenedictMartinez9Philippine Science High School - Eastern Visayas Campus1114
9mjzamorasMichaelZamoras9Philippine Science High School - Eastern Visayas Campus1071
10Steve120StevenReyes9Saint Jude Catholic School924
11IntegJose RafaelMatienzo9Philippine Science High School - Eastern Visayas Campus893
12LittleHacker12JohnbellDe Leon9Philippine Science High School - Bicol Region Campus890
13fourcodingMiguel AngeloDelos Santos11Philippine Science High School - Ilocos Region Campus873
14clydejallorinaClyde CourtneyJallorina11Philippine Science High School - Main Campus816
15kelc210Kirby EzraChua11Xavier School San Juan800
15KatAttack01Jayson LenoiArollado12Xavier School San Juan800
17shannaurellegShann AurelleRipalda10Philippine Science High School - Eastern Visayas Campus642
18chosen_one12John AngeloOringo8Philippine Science High School - Bicol Region Campus628
19AudentesMarc DominicEnriquez12Philippine Science High School - Eastern Visayas Campus600
20stsorupiaSvenSorupia12Philippine Science High School - Main Campus578
21ariiicJose EnriqueRamirez8Philippine Science High School - Bicol Region Campus457
22acmabuteAl ChristianMabute10Philippine Science High School - Bicol Region Campus453
23Chou_Tzuyu1015SimwelPante9Philippine Science High School - Bicol Region Campus416
24BoogySaluteAllen AdrianSolis10Philippine Science High School - SOCCSKSARGEN Region Campus414.33
25AnagramicCoderJohn DavidVidad11Philippine Science High School - Ilocos Region Campus300
26F_Boi_69AdalbertApuya8Philippine Science High School - Bicol Region Campus286
27StrikeofsonarKristoferSano10Philippine Science High School - SOCCSKSARGEN Region Campus242
28HackskillShaquille WyanQue12Grace Christian College200
28regiszehnharold1Zehn HaroldRegis9Philippine Science High School - Eastern Visayas Campus200
28eryllaErylla BeatrishOamil11Philippine Science High School - Ilocos Region Campus200
28TG_GuruGabrielGeraldo9Philippine Science High School - Eastern Visayas Campus200
28calapsssCharles JavierCalapini11Philippine Science High School - Ilocos Region Campus200
28IllumeeSeanSta Maria12Philippine Science High School - Eastern Visayas Campus200
28CodeCodeCodeCodeVictor EdwinReyes9Philippine Science High School - Bicol Region Campus200
28ZachLoZacharyLopez11International School of Manila200
28CoderX_412ClarenceCombinido9Philippine Science High School - Eastern Visayas Campus200
37Blackheart_2003Gerrymie FlorelBajaro8Philippine Science High School - Bicol Region Campus116.67
38flameicicle27AmosVillanueva11Philippine Science High School - Ilocos Region Campus100
38booandroGarlu VictorNepomuceno10Manila Science High School100
38norielleeco76NorielleEco7Philippine Science High School - Eastern Visayas Campus100
38Rhayne213Maxene RhaynePaler7Philippine Science High School - Eastern Visayas Campus100
38HansA4HansAndales7Philippine Science High School - Eastern Visayas Campus100
38CyTPMJaymund CyrusFloranza8Philippine Science High School - Bicol Region Campus100
44SnarglePopJoel AndrewMallari9Philippine Science High School - Central Luzon Campus56

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

Each contestant has the chance to win Steam credits, in proportion to their score on both leaderboards. We will notify contestants by email regarding their prizes. Congratulations to all!

IOI 2017 Reflections

IOI 2017 Reflections

Each year, we ask our IOI participants to write a reflection of their experience so that future Filipino IOI contestants will have an idea what it’s like straight from their peers.

Franz Cesista

Tehran is just like any other developed city, but also is unique in its own way. The city blends sand, cement, and rocks in a nice smooth gradient sprinkled with beautiful landmarks in view form each other. Even the buildings are desert-themed. The people were also very nice, especially Ate Kimia, our guide. Iran is definitely worth a second visit. It’s a fascinating country with a colorful culture; completely different from what I usually hear about it.

During the contest, I felt like I was a hundred meters deep below the ocean. Even though I prepared for months for this competition and tried to meditate that morning, I still felt the immense pressure. My mind couldn’t rest, even for a minute. “You need to solve this subtask or you won’t get a medal” warned half of my brain and “No, you need to chill, I know you can do it” comforted the other half. They then annoyingly continued this bickering ‘til the end of the contest.

The most interesting problem for me would either be Nowruz or The Big Prize. I’m not sure, really. The first problem was basically just about reducing a graph into a tree with a lot of leaves and the second about some kind of randomized binary searching. These insights needed a flash of genius to come up with. In my case, most of them came to me after the contest. Although it would have been better if they came during the contest, finding the solution is a reward in itself. I still have to train a lot to improve my chances in the future.

I also made some international friends during the event. I had lunch one time with contestants from the Nigerian team and we mostly talked about Codeforces and the IOI itself. When I was about to eat breakfast one morning, I noticed that the cafeteria was already packed, so I had came across to sit beside one of the Argentine delegates. I found a new breakfast-mate.

On the bright side, at least I already now have firsthand experience on how it feels to be participate in the IOI. At least, I’ve become aware of which parts aspects of myself need improvement. Hopefully, in the next IOI, I’ll be more prepared and less affected by the pressure.

None of us here in the Philippine Team was born with a keyboard in hand. All of us started with zero knowledge and did our best to be where we are today. We were raised in different familial environments, taught with different curriculums, and have different goals in mind but what bonded us together was our interest in programming and love for problem solving. If you share the interest, start your competitive programming journey and join local competitions such as NOI.PH. Trust me, you won’t regret it. Ganbate!

Kim Tuico

The IOI 2017 that was held in Tehran, Iran gave me a lot of memorable experience that could only occur to events like this. One of these events is when we went to the Opark Complex, a Water Park in Iran. We were thrilled by the park’s slides especially by the free-fall slide. Yet nothing is comparable to the tension I felt when the contest proper had started but as the time passed by, I was slowly making myself comfortable. I think, getting used to a setting like this will help me suit myself to situations similar to this.

This year’s IOI committee did a great job since the competition and the events were well-organized. Aside from learning many things in programming and knowing the culture, places, and cuisine of Iran, all of us that participated in this event created a connection that would last a lifetime, that’s why I am looking forward to next year’s IOI that will be held in Japan.

I would also like to express my gratitude to NOI.PH organizing committee and to the sponsors who supported us in this IOI 2017 journey.

Farrell Wu

As my seventh and last international scientific olympiad, the IOI 2017, and everything leading up to it, was a truly rewarding experience. NOI.PH and the IOI provided me an opportunity to learn coding and algorithmic thinking. More importantly, it gave me the chance to explore something new, learning for the sake of improving myself and pursuing my passions, instead of merely inertia and fulfilling expectations.

By far, my favorite part of the IOI was the competition itself. Getting into competitive programming during Grade 11 from a mathematical olympiad background, I was in for something different. Unlike the IMO, it is not enough at the IOI to have good ideas: I had to implement them. Getting the correct idea is only 10% of the way there.

The IOI gave me a glimpse into the “engineering” side of STEM. Unlike pure scientific problem solving, the IOI rewards the mindset “if it works, it works.” In fact, the code that pushed me above the medal boundary was a naïve brute force, making me hesitate because I felt it was “ugly” and “suboptimal”. Trial and error were also integral – due to the full feedback format, I could make 25 attempts before finally solving a problem.

That said, there is more to the IOI than the two contest days. The numerous excursions allowed me to explore a different side of Iran, which I would never have seen otherwise. Discussing with fellow contestants, I realized that the problem-solving thought process extends across scientific disciplines, encouraging me to never stop exploring.

Robin Yu

I was initially reluctant to attend this IOI — there were conflicts with the schedule of this and my university, and people around me had thus heavily discouraged my participation — but I decided to go anyway, and I am glad I did so. The places and people I got to encounter were far removed from the predominant impression one would get from western media. I am grateful to have had the experience to visit a different country, with its unfamiliar language and culture. The excursions and programs were relatively well-organized and I thoroughly enjoyed them.

The first day of the contest went as expected; I was quite surprised with my result, as I had ended within the gold medal boundary, and there was significant pressure to fight to remain there. Thus panic started settling in on the second day, when I realized that the problems were not immediately approachable. I had gone two hours in without solving anything, and the stress snowballed and made it difficult for me to focus. My sub-optimal performance on the second day was definitely regretful — I was one key insight away from gold — but at the end of the day, I believe I had done my best.

I hope that someone will carry on the torch and finish what we have started. My experiences in IOI have revealed that winning gold is really not that far-fetched for the Philippines. Anyone with enough dedication has a good shot at it. Indeed, I had started in 2014 knowing nothing more than the most basic programming; I recall clearly solving the problem of sorting three pairs of points with 100 lines of code, considering all possible cases, compared to now where I can do that with less than 5. I hope that my story can serve as an inspiration to those who may want to get into this field.

Of course, none of this would have happened without the generosity of our sponsors. On behalf of the entire 2017 Philippine delegation, I would like to thank them for having supported us all the way. I hope they will continue to support the future generation of Philippine competitive programmers, as we look towards the years to come.

 

Philippine Teams to the 2017 International Science Olympiads

Philippine Teams to the 2017 International Science Olympiads

Thanks to Dr. Richard Eden of the IMO Organizing Team, we have managed to round up (hopefully all) the Philippine Teams to the 2017’s International Science Olympiads. Click the image below to zoom it in or scroll down for the text version. Did we miss an olympiad? Let us know by sending an email to [email protected]

Philippine Teams to 2017 International Science Olympiads

49th International Chemistry Olympiad

Date: 6 – 15 July 2017
Venue: Nakhon Pathom, THAILAND

This is the first time that the Philippines participated.

Participants:

  • ISRAEL AGUBA
  • ARTHUR REINER DE BELEN – Bronze Medal
  • HANNAH KEREN DUQUE
  • CHARLES JEROME BARTOLO – Bronze Medal

58th International Mathematical Olympiad

Date: 12 – 23 July 2017
Venue: Rio de Janeiro, BRAZIL

This is the first time that all six members of a Philippine Team won IMO medals.
Country Rank: 17th out of 111 countries

Participants:

  • CLYDE WESLEY ANG – Bronze Medal
  • KYLE PATRICK DULAY – Silver Medal
  • ALBERT JOHN PATUPAT – Silver Medal
  • SHAQUILLE WYAN QUE – Bronze Medal
  • SEAN ANDERSON TY – Bronze Medal
  • FARRELL ELDRIAN WU – Silver Medal

48th International Physics Olympiad

Date: 16 – 24 July 2017
Venue: Yogyakarta, INDONESIA

Participants:

  • MIKHAIL ANGEL TORIO – Honourable Mention

29th International Olympiad in Informatics

Date: 28 July 2017 – 4 August 2017
Venue: Tehran, IRAN

This is the first IOI Silver Medal for the Philippines.

Participants:

  • FRANZ LOUIS CESISTA
  • KIM BRYANN TUICO
  • FARRELL ELDRIAN WU – Bronze Medal
  • ROBIN CHRISTOPHER YU – Silver Medal

14th International Geography Olympiad

Date: 2 – 8 August 2017
Venue: Belgrade, SERBIA

Participants:

  • ALDWIN ADIONG
  • URIEL VICTOR ESCOBIDO
  • DANN LAWRENCE LLABORE – Bronze Medal
  • JON EDILPERT MORANO

11th International Earth Science Olympiad

Date: 22 – 29 August 2017
Venue: Côte d’Azur, FRANCE

Participants:

  • ADRIAN JEREMIAH BORNILLA
  • MARIA JANINE JUACHON
  • EUGENE TORIBIO
  • MIKHAIL ANGEL TORIO
PH team bags first silver medal at the International Olympiad in Informatics

PH team bags first silver medal at the International Olympiad in Informatics

The International Olympiad in Informatics 2017, the programming equivalent of the olympics, recently concluded this 4 August 2017. Medals in the IOI signify great honor as there are only a limited number given away each year. Each country can send at most four participants to compete in this annual olympiad. Hence, a maximum of four medals can be won by a country each year. This 2017, the Philippines brought home two.

The prestigious contest was held in the Kooh e Noor building in Tehran, Iran. Eighty-eight countries sent their delegations to this event. The Philippine delegation consisted of

and team leaders

accompanied by Philippine Science Eastern Visayas Coach Cary Von Alano.

Despite the lack of adequate institutional support and a constant shortage of funds, the Philippines has improved its overall ranking. 2017 is the first year that the total score of the Philippine team is in the upper half of the board. Moreover, this is the first year where the Philippines scored more than one medal. This is also the first year where the Philippines is taking home a silver medal, an impressive feat considering the fact that this is the Philippines’ third year of sending participants to the IOI.

The Contest

The contest proper was spread out into two days. For each contest day, three tasks, algorithmic in nature, are given and the contestants have five hours to score as many points as they can. To serve as breathers, excursion days are scheduled after each of the contest days. These excursions serve as a way for the contestants to unwind, discover the cultural diversity in Iran, and gain new friendships.

Both IOI veterans of the Philippine delegation were able to score medals this year. Robin Christopher Yu (Grade 12) obtained a total score of 322.03 points out of a maximum possible of 600, 100 of which came from completely solving the wiring task of Day 1. The cut-off score for a silver medal is 249.42 points, thus Robin brings home the Philippines’ first IOI silver medal with a lot of points to spare. Farrell Eldrian Wu (Grade 12), obtained a total of 144.99, netting the country its third bronze medal.

These achievements would have not been obtained by their students without hardwork and perseverance. Robin first joined NOI.PH in 2014 and has consistently trained ever since. Farrell first joined NOI.PH in 2016, trained tirelessly as well, and managed his time to train for both the IMO and the IOI.

Other members of the Philippine delegation scored remarkably well despite it being their first time. Franz Louis Cesista (Grade 11), the first Visayan student to be part of the Philippine delegation, scored a total of 87.75 points. Meanwhile, Kim Bryann Tuico (Grade 10), scored a total of 64.65 points.

Team Selection

The selection of the Philippine team of the IOI starts as early as January 2017. High school students all around the country like Robin, Farrell, Franz and Kim, registered as early as September 2016 for the 2017 NOI.PH Online Round. The top 30 of this online round were then invited to the 2017 NOI.PH Onsite Round held in Pointwest. The next step of the selection involved the top ten being officially invited to a weekly online training. The trainees needed to read and solve and submit problems assigned by the scientific committee every week. This weekly online training concluded with an In-House training held in Tagaytay, which involved joining the TOKI Indonesian contest, and a contest-style final exam given by the scientific committee. The performance of the students were exclusively determined by their performance starting from the NOI.PH Onsite Round.

For interested students

Students who are interested in trying out competitive programming are encouraged to leave their email here so that they can be promptly informed of important announcements as soon at the registration for NOI.PH 2018 is open. First-timers are recommended

  • to request access to the discord server by emailing [email protected] with their name, grade level, and school
  • to read the (soon-to-be finished) series of articles: Your First NOI Problem
  • to read and understand the (soon-to-be polished) PDFs of week0, week1, week2, week3, week4 of last year’s weekly training
  • to gather courage and email [email protected] if they need help in understanding and/or following any of the above recommendations

Intermediate-level participants are recommended to read the rest of the weekly training PDFs — week5, week6, week7, week8, week9.

Supporters

None of what happened this year would have been possible without our sponsors. The NOI.PH Organizing Team would like to express its gratitude to its sponsors for the help in sending the Philippine delegation to the IOI 2017. In particular, we would like to thank

Our champion sponsors

  • CustomThread, through their CEO, Mr. Erik Sy, with the assistance of Ms. Deegee Moreno and Shiela Rivera
  • D&L, through their CEO, Mr. Alvin Lao

Our silver sponsors

  • Thinking Machines, through their CEO, Ms. Stef Sy
  • Xurpas

Our private donors

  • Mr. Jojy Azurin
  • Mr. Wilson Chua
  • our GavaGives contributors

We would also like to thank

  • the Iranian embassy, especially Mr. Alex Alib for the assistance in processing the visa
  • Senator Bam Aquino’s office, for assisting in Team Leader Kevin Atienza’s visa concerns
  • the IOI 2017 for organizing the entire event

Finally, we would like to thank the parents for their unending support and appreciation of the efforts of the organizing team and their support and recognition of the hardwork of their passionate children.

Featured Photos


The Philippine team

 


We made a stopover at a very nice AirBnB in Bangkok.

 


After more than 24 hours of travelling, we finally reach Iran!

 


The Philippine team is introduced in the opening ceremonies.

 


The Philippine team is shown on the screen stage left (not pictured).

 


Round 1 starts. Franz looks at the screen and types out the solution to one of the problems.

 


The Pokemon Robin brings represents the correct solutions to the tasks. Because he wants to catch them all.

 


After Round 1, participants unwind by going to an excursion to experience the beauty of Tehran.

 


ASEAN leaders pose for a photo during one of the General Assemblies.

 


Round 2 starts. Kim starts coding the solution to one of the tasks.

 


Farrell solves on paper before typing. His penguin makes sure the computer is still working.

 


Farrell is recognized on stage with other bronze medalists.

 


Robin is called on stage with other silver medalists.

 


The Philippine team poses in front of a Philippine flag just outside the closing ceremony hall.

 


Along with the others, Robin went to the Winners’ Closet after the closing ceremonies.

 


Dinner with one of the grandmothers of the very hospitable Iranian guides.

 


Bringing home the bacon. And by bacon, we mean medals, certificates and memories.

 


Someone snapped a photo of the team from behind, giving a good view of the logos of our generous sponsors.

Other Photos

More photos in this link.

Photos are for personal use only.

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.