This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// See https://codeforces.com/blog/entry/44478#comment-290116 | |
// This (mostly untested) implementation is for educational purposes only | |
// and suffers from several drawbacks. Most notably, segment ends have to | |
// be stored in every operation (and every node), even though they can be | |
// calculated 'on the fly'. | |
#include <vector> | |
using namespace std; |