brycesandlund's blog

By brycesandlund, history, 6 years ago, In English

The 2018 North Central North America ACM-ICPC Regional Programming Contest is tomorrow, Saturday November 3rd, 4pm UTC. There is an open division for anyone interested in competing at: https://open.kattis.com/contests/ncna18open. The official scoreboard will be at https://ncna18.kattis.com/.

As there is no way to request or issue clarifications in the open division of Kattis, please comment here if any questions arise.

The problem set was created by myself, Alexander Scheel, xennygrimmato, NibNalin, vlyubin, Joshua Guerin, Kathleen Ericson, David Poplawski, and erena. Additional thanks to asdoc, xiaowuc1, and y0105w49 for problem solutions.

EDIT: This is happening in about three hours.

Full text and comments »

  • Vote: I like it
  • +38
  • Vote: I do not like it

By brycesandlund, history, 6 years ago, In English

Hi all,

I am co-chief judge of the 2018 ICPC North Central Regional Contest. This year, to alleviate the workload on the problem-setting committee, I'd like to ask directly for problem submissions. If you are interested in contributing a problem (or multiple), email me ([email protected]) or PM me with a description of the problem(s), like what you'd see in an actual ICPC contest (see: https://open.kattis.com/problems/lostmap and https://open.kattis.com/problems/atlantis for example problem descriptions — please include sample input/ output). Please also include the difficulty rating (easy, medium, hard) and a brief paragraph on the intended solution. I will look through the submissions and pick some for the contest. If you submit a problem, ideally you will take on the work of also generating test data and writing solutions if your problem is selected. It would also be great if you could be online and help judge your problem during the contest on November 3rd, likely from about 10am — 3pm Central Time. Problems that appear in the Regional will be available on Kattis for anyone to solve after the contest, like what you can see from the two example problems I wrote for last year's contest. I'd like to get problem submissions by October 1st, so we have time to write test cases and solutions before the Regional contest.

We also need people to write judge solutions to other problems and add test cases to get full coverage. If you are interested in this, please let me know. Finally, please forward this message to anyone else who might be interested. The only condition is that anyone who helps should not be actively participating or coaching for the North Central Regional this year.

Full text and comments »

  • Vote: I like it
  • -1
  • Vote: I do not like it

By brycesandlund, history, 7 years ago, In English

Hi all,

The 2017 North Central North America ACM-ICPC Regional Programming Contest is tomorrow. Our region hosted the World Finals last year. There is an open division for anyone who is interested in competing, link here: https://open.kattis.com/contests/ncna17open. Official scoreboard will be live at https://ncna17.kattis.com/ at 4pm UTC tomorrow.

Myself and Dr. Larry Pyeatt of SDSMT primarily created the problem set, with the help of: Robert Hochberg, Bowen Yu, y0105w49, Menghui Wang, Andrew Morgan, The East Coast North America regional problem development team, and especially, the Kattis team, specifically Fredrik Niemela and Greg Hamerly, to which we are very grateful.

Good luck to all contestants tomorrow!

Full text and comments »

  • Vote: I like it
  • +38
  • Vote: I do not like it

By brycesandlund, history, 8 years ago, In English

(This post is primarily for ACM-ICPC, since you don't need to type in code for online contests.)

My current geometry library uses a Pt struct with members x and y. However, many times I just use a pair instead as this avoids needing to type the struct code and a comparator if you need sorting. However, if you're writing enough geometry functions, it's quicker to write and easier to read with .x and .y instead of .first and .second. I'm now considering doing something like the following:

typedef long long T;
typedef pair<T, T> Pt;
#define x first
#define y second

Pt operator - (Pt a, Pt b) { return Pt(a.x-b.x, a.y-b.y); }

T dot(Pt a, Pt b) { return a.x*b.x + a.y*b.y; }

double dist(Pt a, Pt b) {
    return sqrt(dot(a-b,a-b));
}

This kind of gives the best of both worlds; however, it has some strange side effects. I am wondering if the community has an opinion on what is the best to use, or if there is a different trick I can make use of.

Full text and comments »

  • Vote: I like it
  • +3
  • Vote: I do not like it

By brycesandlund, history, 8 years ago, In English

I am wondering what tricks the competitive programming community uses to avoid stack overflow with recursive algorithms. I vaguely remember pulling up someone's code a while back that used a recursive DFS with input size at least 100,000. I also have Steven and Felix Halim's Competitive Programming book and they seem to use recursion without regard to the possibility of stack overflow.

Full text and comments »

  • Vote: I like it
  • +14
  • Vote: I do not like it

By brycesandlund, 9 years ago, In English

I competed in Google Code Jam Round 2 last Saturday and managed to get 341st place. Unfortunately, I now sit in 1215th place. What happened was that in my solution to B-large, I encountered a bug after downloading the input file. It wasn't until I had only 40 seconds left on the counter that I found it. I managed to fix it, rerun the program, and upload the output file in that 40 seconds, but I had about 3 seconds to find and upload the source file, among a directory with 200 other files (I'm kicking myself for forgetting to create a new directory for the competition as I usually do). So I double clicked some random file and got the submission in literally as the countdown hit 0. The output was correct, but on Monday, Google informed me that they rejected my submission since I didn't have the proper source file, dropping me to 1215th place.

It doesn't look like there is anything I can do at this point, but I wanted to inform the community: Google manually checks every submission! I pulled something similar in Facebook Hacker Cup, manually changing 0's to 1's in an output file, and they did not catch it. Anyway, people ranked between 341st and 1215th in GCJ Round 2 will see a change in their ranking from after the contest, something I have never had happen to me, so I can only assume is quite rare. I also found out, if you upload the incorrect source file, you can resubmit it via the "Ask a question..." link, which must be done during contest time: https://code.google.com/codejam/terms.html (see the section "(E) Submission 'Erros' — oh the irony — and Discrepancies"). If only I had known this sooner!

Full text and comments »

  • Vote: I like it
  • +117
  • Vote: I do not like it