Skip to content

Instantly share code, notes, and snippets.

John Cipriano johncip

Block or report user

Report or block johncip

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
johncip / uva-fast-io
Created May 25, 2014
Contest problem fast I/O template
View uva-fast-io
* Title
public class Main {
johncip /
Last active Feb 17, 2016
Count on Cantor
* 264 - Count on Cantor
* Given an input value N, print the Nth term in Cantor's enumeration.
* There may be a simpler closed form of this. However, what strikes me as
* possible right now is: we figure out what diagonal n is on, which gives us
* the beginning of that diagonal (1/2, 3/1, 1/4, 5/1, etc.). Then, we adjust
* the numerator and denominator based on the distance from the first term in
* the diagonal and the direction it takes (up-right for odd, down-left for
You can’t perform that action at this time.