ROUNDS

ROUND 7 (NOV 6TH) – the FINALle!!!

After almost two months of championship, another BXCOMP edition has come to an end. We, the organization crew would like to thank all the participants and we hope you had a good time as much we did. We would also like to thank the presence of the professors Fábio, Flávio, Ivandré and Luciano that delivered the medals to the winners. We also let registered our sincere gratitude to the Quantica company, which supported us this year and gently gave the awards (four Kindles) to the winning team.

Regarding the challenges, there were three. The “container” one was, no wonder, the hardest, as it was adapted from the Sao Paulo Programming Marathon ACM 2013 (see all the marathon challenges here). The “Attendance” problem, even being written in English, was solved by all teams which showed up. And the last one was “vida”, which even with a simple logic, took some time to be solved. See all the solutions at the end of this post.

We congratulate the teams “Só de Zuera”, “O Quarteto Fantástico” and “Artic Koalas” for reaching the championship podium.

Click here to check out the pictures of this round!

Click here to see the championship final ranking!

——————————————————————–

Round Challenges and proposed solutions:

———————–
Quantica ROUND (out 30th) – while(Scanner.hasnext()){}

The III BXCOMP’s Quantica round happened on Wednesday(Oct 30) and had the participation of 11 teams. Once again, we had a themed round about the company that supports the III BXCOMP. We had three challenges, a great number of wrong submissions, and only three teams could solve at least one challenge:

The “O Quarteto Fantástico” team stood out from the others by solving two challenges, while the “Federais” and “Só de Zuera” teams were able to solve one of the challenges. The hardest part about the round was to deal with the data input, once the teams did not have a defined number of cases or stop conditions on the challenge’s description. The teams tried from no loops to infinite loop (while(true)), in the first case only the test case 1 was solved, and in the second one after solving all cases the program tried to read an data input that didn’t exist, which ended up with an exception! The recommendation was to use a loop type while (scanner.hasnext()){} that would read the complete data input, and when it didn’t have any new input the condition would turn false and the program would finish.

The first challenge, “Aluno_Engajado”, had 16 submissions and only one was correct, made by “O Quarteto Fantástico” team.

The second one, “Café”, had 12 submissions, of which three were correct, made by the “Federais”, “Só de Zuera” and “O Quarteto Fantástico” teams.

The third challenge didn’t have an accepted solution, but it had eight submissions. The “Só de Zuera” team was closer to solve the challenge, they used all the correct logic, but an infinite loop returned a Runtime Error by the end of the execution.

Next week we’ll have the III BXCOMP round finale, with awards and medals to the top 3 teams. We count on everyone’s presence!

Click here to check out the pictures of this round!

——————————————————————–

Round Challenges and proposed solutions:

———————–
round 5 (OUT 23RD) – IT’S A TRAP! NO, MANY TRAPS IN OWL CITY!

The III BXCOMP fifth round occurred on Thursday (Oct 23rd) and had the presence of 11 teams. Due to the registration period for the PET-SI selection process, that extends until Oct 28th, the freshmen had “themed” round. Three exercises with stories, directly or indirectly, related with the selection process.

While last week’s round the freshmen faced four challenges, today, as they opened the .java… Nothing. Not even the scanner was implemented. At most, a “good luck” message. But, that wasn’t the biggest problem they’ve faced in this round, in which the teams “Só de Zuera” and “Gnus da Savana” were the best, with two exercises submitted correctly each. Because of that, the “Só de Zuera” got eight points of advantage on the others, and the “Gnus da Savana” team got in the three best teams. Another four teams had one exercise solved.

The first challenge, Selection Process, was the hardest of the round, so hard that any of the teams could get into a solution within the 120 minutes. The problem logic wasn’t that hard. The programmers should have made a code that calculates the candidates weighted average and returns, from the highest to the lowest score, the top 3 candidates. However, the competitors had to pay attention to a great number of details on the description, specially on the part where the rules for the selection process were described. The input and the output for the cases were another point that caused some problems, once that one of the cases had only two candidates and no score for them. It’s worth to highlight that, for this case, there wouldn’t be a selection process due to the insufficient number of candidates, as said in the description.

The second challenge, “Insensibilidade”, was the one with most submissions, and five teams got it right. The problem consisted in calculating the “insensibility level” of a determined owl, and that was made by calculating the square of the distance between an object position and the position guessed by the owl, adding these values to have the correct result. In this case, the input and the output were the points in which the competitor needed to pay an extra attention to. For each printed character in a different way given in the description, a “Wrong Answer” would be generated from the code corrector, since the “Presentation Error” appears only in cases in which the number of empty spaces does not match the expected output. Some of the competitors had difficulties on this part of the challenge.

The third challenge, Pizza, was solved by three teams, and the solution was simple too. Given a “circular” pizza (which means, the last piece is next to the first one and vice-versa), the code made by the team should print the biggest possible number of slices of broccoli pizza that could be eaten in sequence (each slice of broccoli pizza was represented by the number zero). The hardest part of the challenge was to do a circular list that represented the property given in the description.

As seen, today’s round was marked by a great diversity of details in which the competitors needed to pay special attention to succeed. Besides that, in this round was required the treatment of blank spaces of the output, what caused a notable number of submissions with “Presentation Error”. In each of these cases of lack of attention, the participants could get into “traps”, most times hard to be noticed, making it difficult to get out of them.

We hope you  get yourselves ready for the Quantica round, that will be special and also a good opportunity for the teams to have a boost in your positions in the ranking, since the round will give 50% of the points. Good luck with the studies, see you next week!

Click here to check out the pictures of this round!

___________________________________

Round Challenges and proposed solutions:

(Click on the name to download)

———————–
ROUND 4 (OUT 16th) – Indecipherable Bridges

The III BXCOMP fourth round occurred on a Wednesday (Oct 16th) and counted with the presence 10 teams. After two weeks without rounds, the teams were surprised with four challenges to be solved, but the amount of challenges and the rainy cold day weren’t able to affects the teams’ performance, with at least two solved challenges each. The only team that solve only one challenge was the “Federais”, that didn’t got points, since only one participant of the team showed up. The highlight of the round goes to the teams “Artic Koalas”, “Só de Zuera”, “Sigma”, “GM³”, “Quarteto fantástico” and “Os Tentação”, which tied with three challenges solved each. Sadly, no team solved the “Bridges way” challenge, which made that no team got a significant advantage.

The first challenge, “Bridges Way”, besides the long description and the apparent huge complexity, didn’t have a hard resolution. The challenge needed to read the number of pillars (N), number of bridges (M) and make an array of M x 3 to map the values of each test. Having that done, the next step was basically to read all numbers of holes in every possible path from the pillar that it was located at the moment. After that, you should get the way with fewer holes and add this value with a variable responsible for counting the number of holes, repeating this process depending on your current position until the position represents the end of the way (N+1).

The second challenge, Emoticons, asked the teams to identify the number of phrases in a text in which an emoticon appeared. The trick in the challenge was that it didn’t ask to count the total number of emoticons in the text, but only the number of lines that had a quantity of emoticon greater or equal to 1.

The third challenge asked a simple reference of a number with a city. It was the easiest exercise of the afternoon, all contestants made it. The only problem that could be faced was the lack of accents in the names of the cities. Sometimes, wrong submissions were made because of that.

The fourth challenge required the account of taxes politics. This problem had a method sc.useLocate(). This method changes the configuration of the scanner and it was used to standardize the inputs and outputs of the program, once that, without it, the input would be with numbers separated by comas and the outputs would be separated by points. This exercise did not present many problems.

The next round will be next week on Oct 23rd. We count on everyone’s presence.

Click here to check out the pictures of this round!

___________________________________

Round Challenges and proposed solutions:

(Click on the challenges name to download)

———————–
round 3 (SET 26th) – Al Capone is sending you a text message

The BXCOMP third round occurred on a Thursday (Sep 26th) and counted with the presence of 12 teams. Despite some tricks on the challenges, the teams showed up “vaccinated” to some problems (should read Strings manipulation) and it looks like they already got the competitions rhythm.

There were two challenges: the telephone and the fugitive; the first one was about a “simple” conversion from letters to numbers, following the standard of a common telephone. The biggest problem could be the Strings manipulation, but the previous round helped in a way that the competitors were ready for that, that’s why it was the challenge that the teams finished and submitted first. In the beginning of the challenge it was discovered by the organization an error in the code given: the loop While (should be shorter) and it generated a “runtime error”. The wrong submissions sent that had this error were analyzed and weren’t considered.

The second challenge was about the fugitive Al Capone that walked in four different directions, and he couldn’t run off from the specific radius in any moment, yes.. that’s right… at any moment, and thats where lots of teams got it wrong, if he left, the program should give an specific message, but the test should be executed until the end, even if he went back to the permitted distance, the warning should be given. In the middle of the round it the staff was warned about a difference on the format of the output given in the description which referred to the message, the participants were made aware of it without causing major problems.

We would like to congratulate the “Arctic Koalas” team for the first place. Completing the podium, the “Tempo de Execução” team in second and the “Só de Zuera” team in third place.

Well, following the championship’s chronogram, we will now have a two weeks break and then we will come back on Oct 16th with lots of energy and surprises. Study, get ready and Good Luck.

Click here to check the pictures of this round.

___________________________________

Round challenges and proposed solutions:

(Click on the challenges name to download)

———————–

round 2 (SET 18th) – if(Problema.equals(“String”))

With the soundtrack of the “Bateria Bandida”, the second round of BXComp 2013 began. And despite the fact that it jumbled the teams at the beginning, this wasn’t the biggest challenge: the Strings were there to torment the competitors.

The three challenges of the round involved the manipulation of Strings. In the first challenge, “Números Primos”, the freshmen should calculate the sum of prime numbers that turned up in a String input; in “Dígitos Falhos”, it was necessary to remove from a number, the occurrences of the given digit on the input. At last, “Frequência” needed the competitors to check in a String, which was the most frequent character.

Some teams didn’t submit any solutions to this round and none of them could solve all the three challenges proposed. Only one team submitted a solution to the problem “Frequência”, but sadly, it wasn’t right. Despite that, we would like to congratulate the team “Só de Zuera” for solving two challenges. But cool down! The championship it’s only beginning! We observed the most common difficulties between the teams and, to help them, here are some tips that can be very useful in the next rounds:

  • The problems needed String manipulation. So, don’t forget to study the java String library. On this round, for example, the following methods of the String class could be used: equals, replace, replaceAll and split;

  • The method parseInt of the Integer class could also be used to convert a String to a number. That was necessary to verify if the given number in the input was prime, in the case of the “Números primos” challenge, for example;

  • Another thing that is important is to know the difference between an empty String and a Null String. Empty String  is when we use the System.out.println(“”) and null String is when we use x = null;
  • It is important to read the specifications on the description! Some teams received “Presentation error” as an answer because they didn’t skip a line, as it was said on the description, after the output on the last case of “Dígitos Falhos”;

  • Last, we noticed that many teams tried to convert a String into a integer in “Dígitos Falhos”. The problem was that the challenge was tested having an input with big numbers, that don’t fit in an integer type (and it would give Runtime Error), like “2345432543423”, that was on the description. It wasn’t necessary to convert a String into an integer, but if the team wanted, it could be done by converting it to a Long type, for example, that would contain the number;

As we said last week, this round has 12 points, four to each correct challenge.

Enjoy the tips and prepare yourselves to the next round! Don’t forget to check out the solutions proposed for the challenges.

See you. :)

Click here to check out the pictures of this round!

___________________________________

Round challenges and proposed solutions:

(Click on the name of the challenge to download)

———————–

round 1 (SET 11th) – It  started!!!

The III BXComp first round happened on Wednesday (Sep 11) and counted with all teams’ presence, except for the “Ultimo.prox” team that showed up with only one contestant. The teams were instructed on the way to manipulate the BOCA system, championship’s general rules and the laboratory utilization. In sequence, the freshmen answered a questionnaire about themselves and expectations on the championship.

Next, the round began and the teams had to solve two problems called “Bissexto” and “Jogo da Velha”. On the first one, the contestants should make an algorithm that verifies if a group of years is bissextile. The second challenge asked  the contestants to define the winner of a tic-tac-toe game based on 3×3 array  filled with “X” and “O”.

The teams have done really well, but not before getting to know the “Runtime Error” once in a while. The main problem revolved around the Scanner class. The method hasNext(); didn’t allowed that the program finish during the teams tests, which is normal. When you’re testing during the development of the algorithm, the input comes from the keyboard, and that’s why the software is always waiting for more input lines.  During the tests on the BOCA system, the reading is done by a text file that eventually comes to an end and finishes the algorithm execution naturally. We suggest that, for the continuation of the championshi you all study a bit about the Scanner class and the multiple ways of doing the reading of an input.

You can check the resolution of each challenge propose by the organization crew on the links by the end of this post.

Since it was the first round, it was only worth two points, one for each solved challenge. Wrong submissions and execution time weren’t considered. But, from the next round on, these details will be crucial for the ranking, and the rounds will turn to 12 points each. See you next Wednesday!

Click here to check out the pictures of this round!

___________________________________

Round challenges and proposed solutions:

(Click on the challenge name to download)