Pluteum's blog

By Pluteum, history, 2 years ago, In English

Hello! There're some data structures requires dynamically allocating memory, such as treap, splay treeans so on. In a recent contest, I saw a problem requiring those data structures, 1737G and noticed many legendary users submitted using pointers: 175023666, 175037024, 175043108 and 175054239...

But somewhat in a Chinese OJ, many people told me that pointers are way slower than using arrays(to create a global array with sufficient number of elements and simulate the pointers), and we should avoid using pointers. Even if we use pointers, we are not supposed to use operator new, but to open a memory pool(this way is then similar to arrays). In fact, we can also notice that for the above problem, almost all Chinese users submitted using arrays: 175027760, 175218209 and 175032925...

What's your opinion on this topic? I'm currently using pointers, should I insist on using pointers or change my coding way? Any help is appreciated!

Full text and comments »

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

By Pluteum, history, 3 years ago, In English

Codeforces is one of the few platforms which support C++20. Some others are using C++17 like AtCoder and CodeChef. Topcoder and many classical OJ such as HDU is still using C++11 if I recall correctly. POJ is even on C++98... And for Java I haven't seen one that supports Java18.

So here's the question. I think update the compilers is rather a simple thing. Well, at least for my PC. Is there any technical issue on updating the compilers or will it cause some trouble?

Sorry, I don't have many knowledge on this, but it really confused me because it makes me to follow different standard when solving problems on different OJ...

Full text and comments »

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