zekigurbuz's blog

By zekigurbuz, 2 years ago, In English

Hello, Codeforces!

UTPC, the competitive programming organization at the University of Texas at Austin, is happy to invite you to participate in the 2023 edition of the UT Open (UTOPC) which will be held on Saturday, April 15, 2023 at 1:00PM UTC-5 (CDT).

You will be given 14-17 problems and 5 hours to solve them, with standard ICPC scoring. There will be a wide range of difficulties -- anyone is welcome to participate! This is a team contest, meaning that you are allowed to compete in teams of up to 3 members (it is totally acceptable to compete without teammates as well). This is (of course) not an official Codeforces round, and is thus unrated.

Prizes will be available to students competing in person in Austin (at the Gates-Dell Complex), and further prize information is TBD.

The problems were prepared and tested by Prayaag Gupta, speedycatfish, porkchops, nwx, blueberryJam, jxin31415, fishy15, bridgeminion, chickencode, picroft, abhonsley00, DylanSmith, oopsimbad, and myself.

And also a huge thanks to Marlov for planning logistics and JamsRamen for help with testing problems!

We would like to thank:

Good luck and have fun!

UPD: For those wondering, the contest is in the Gym tab.

Full text and comments »

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

By zekigurbuz, history, 3 years ago, In English

Recently, I was watching a certain YouTube video and did a double take around the 15 second mark.

"Why?", you ask. Well, it wasn't for the amazing poker gameplay, it was for another reason; see for yourself!

Looks oddly familiar, perhaps?

What could this mean?

I will leave this as an exercise to the reader...

Full text and comments »

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

By zekigurbuz, history, 5 years ago, In English

Edit: Solved.

Recently, I was looking at this Kattis problem. I was considering a (perhaps simpler, i.e. smaller bounds on Q) online version of the problem, and considered using it as an opportunity to learn the GNU policy-based ordered set data structure (for C++). I first noticed that the structure of the define statement could be modified to support different data types other than just ints.

For example, this: #define ordered_set tree<pair<int, int>, null_type,less<pair<int, int>>, rb_tree_tag,tree_order_statistics_node_update>

instead of this: #define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>

Obviously, the two main functionalities of this data structure are find_by_order(x) and order_of_key(x). However, when using the ordered set with pair<int, int> as the data type, I noticed that when trying to use the find_by_order(x) method (by passing in an int as a parameter), my code was immediately throwing a long, practically unreadable error.

I was wondering if anyone familiar with C++ or GNU PBDS could help explain what is going on (I can send my code so far if necessary). Any help would be appreciated.

Thank you.

Full text and comments »

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