Igorjan94's blog

By Igorjan94, history, 9 months ago, In English,

C++17 is now available on codeforces, community wants new edition of C++ tricks by Swift, so, let's start!
Disclaimer: I have done only few examples of new features, which in my opinion are related to competitive programming. Feel free to comment and provide more real-world examples or ask to elaborate some features with more examples or explanations.

Fold expressions

  • I think that everybody knows, what reduce or fold means, but a c++11 example:
vector<int> v = {1, 3, 5, 7};
int res = accumulate(v.begin(), v.end(), 0, [](int a, int b) { return a + b; });
cout << res; // 16
  • In C++17 there is also folding support for a template parameters list. It has the following syntax:
(pack op ...)
(... op pack)
(pack op ... op init)
(init op ... op pack)
  • For example, implement a template function that takes a variable number of parameters and calculates their sum.

Read more »

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

By Igorjan94, history, 3 years ago, translation, In English,

Looking through recent actions, I caught up blogs with top 100 and top 228 comments. So, I decided to do the table, which will contain all the same info as blogs have, but which will be updating. The result is here : click
On page with comments there are comments, which has absolute value more then MAGICCOMMENTS(now it is 75). It should be updating one per 6 hours (server looks through recent action every half-hour and every 6 hours parses these blogs for rating of new or updated comments
On page with users there is sum of votes for all comments of user, if absolute value is more than MAGICUSERS(now it is 500). This page will be refreshing too rare only by hand by scanning all posts and comments again
(Votes for blogs aren't taken into consideration)

I'll be glad to here some criticism/comments/advice!

PS. Please, if you see any mistake in translation, PM me :)

UPD0: In first release I occasionally parsed only english comments, now all information should be relevant. Soon, there will be page will votes for posts.

UPD1: I've rewritten my code little more than comletely(even switched from python to java :) ), and now there is full statistics on blogs, comments and users (updated by mentioned algo). Only restrict on absolute value is on comments because of their count. Also I did some nice features for more convenient usage

UPD2: Code

Read more »

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

By Igorjan94, 4 years ago, translation, In English,

UPD0: Thank you everybody for such appreciation of my plugin! It inspired me to continue improving it and now my plugin can parse contest, create file structure of it, has primitive testing on downloaded samples, shows list of contests (thanks to I_love_Hoang_Yen), problem statement is parsing correctly and so on. You can see changelog on github, I think I wont duplicate it here. Everybody who is interested in it, update plugin without any notification.

Happy birthday, CodeForces! This is my favorite site, cause here I can find lots of useful and interesting things. And everything is done with good sense of humor and is constantly upgrading. So I decided to improve some users' life too :)

I started using vim as main IDE for about one year ago. In the beginning, as was implied, I didn't estimate all advantages of it and coded in Code::Blocks or QtCreator, depending on problem. But later, when I installed all plugins knew how to use it, I don't like other IDE's. It is true only for C++ and, imho, python. What about Java, I use Intellij IDEA and Eclipse, but can redact small files in vim too. I can write big post about advantages of vim, but I'll tell only about one, which was "born" some days ago and is has the same idea as (J|C)Helper

Main page of plugin is on github, here I post only screens and main features of it.

  • Watch standings of contest(friends, official, unofficial, room)

Read more »

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