Блог пользователя zekigurbuz

Автор zekigurbuz, 23 месяца назад, По-английски

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.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +36
  • Проголосовать: не нравится

Автор zekigurbuz, история, 2 года назад, По-английски

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...

Полный текст и комментарии »

  • Проголосовать: нравится
  • +341
  • Проголосовать: не нравится

Автор zekigurbuz, история, 4 года назад, По-английски

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.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +1
  • Проголосовать: не нравится