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
// ==UserScript== | |
// @name SmartSubmit for AtCoder | |
// @version 0.200001 | |
// @auther anta | |
// @description 問題閲覧画面で Ctrl+V をするだけで提出します。yukicoder <http://yukicoder.me/> の機能・コードを元にしています。 | |
// @match http://*.contest.atcoder.jp/* | |
// @match https://*.contest.atcoder.jp/* | |
// @grant GM_getValue | |
// @grant GM_setValue | |
// @grant GM_listValues |
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
#define _CRT_SECURE_NO_WARNINGS | |
#include <string> | |
#include <vector> | |
#include <algorithm> | |
#include <numeric> | |
#include <set> | |
#include <map> | |
#include <queue> | |
#include <iostream> | |
#include <sstream> |
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
#include <iostream> | |
#include <vector> | |
#include <memory> | |
#include <limits> | |
#include <random> | |
#include <stdint.h> | |
#include <functional> | |
#include <algorithm> | |
//Yuan, Hao, and Mikhail J. Atallah. "Data structures for range minimum queries in multidimensional arrays." Proceedings of the Twenty-First Annual ACM-SIAM Symposium on Discrete Algorithms. Society for Industrial and Applied Mathematics, 2010. |
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
//LICENSE: CC0 (Public Domain) | |
#include <algorithm> | |
#include <memory> | |
#include <utility> | |
#include "../RangeMinimumQuery/DirectRMQ.cpp" //RMQを別途用意することと | |
//Chen, K.Y., Chao, K.M.: | |
//"On the Range Maximum-Sum Segment Query Problem" | |
//<http://www.csie.ntu.edu.tw/~kmchao/seq05fall/RMSQ.pdf> | |
//Tested |
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
template<typename Val, int BlockSize> | |
class DirectRMQ { | |
public: | |
typedef int Index; //今のところ大きくともintを仮定している(queryとか) | |
typedef char InBlockIndex; | |
typedef InBlockIndex (*BlockTypeRef)[BlockSize]; | |
DirectRMQ() { | |
calcBallotNumbers(); | |
buildInnerBlockTable(); |
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
//LICENSE: CC0 (Public Domain) | |
#include <vector> | |
#include <algorithm> | |
class SuffixArray { | |
public: | |
typedef int Index; | |
//Verified: SPOJ SARRAY (0.49 / 2.8M) | |
template<typename AlphaT> |