Qualified's blog

By Qualified, 5 years ago, In English

Why not use

#include <bits/extc++.h>

It has all of the policy based data structure "includes" in these articles Implicit cartesian tree in GNU C++ STL C++ STL: Policy based data structures and everything included in

#include <bits/stdtr1c++.h>

and

#include <bits/stdc++.h>

Also, with precompiled headers, it runs in about the same time as

#include <bits/stdc++.h>

Link to the file of

#include <bits/extc++.h>
  • Vote: I like it
  • +38
  • Vote: I do not like it

»
5 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by Qualified (previous revision, new revision, compare).

»
5 years ago, # |
  Vote: I like it -29 Vote: I do not like it

I'm not sure if anyone really uses policy based data structures, it is quite easy to write cartesian tree or segment tree etc. if you had done it enough times, or even write once, copypaste and modificate to the particular problem you solve. Of course you are welcome to do it if you want. Although it is quite feasible not to use bits/stdc++.h to reduce compile time (or even use autoimport tools, but I'm not familiar with such for c++)

»
5 years ago, # |
  Vote: I like it 0 Vote: I do not like it

I used it for some days, then stopped it after getting compilation error in vjudge on an old atcoder problem: Compilation error vs Accepted (You need to login to vjudge to view the source codes, they are same, except bits/extc++.h vs bits/stdc++.h).