From 632bcfa92c619128a4f814e81361af3e169cc538 Mon Sep 17 00:00:00 2001 From: KiritoTRw <3021577574@qq.com> Date: Thu, 11 Aug 2016 08:54:53 +0800 Subject: [PATCH] Create RMQ-ST.cpp --- .ACM-Templates/RMQ-ST.cpp | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .ACM-Templates/RMQ-ST.cpp diff --git a/.ACM-Templates/RMQ-ST.cpp b/.ACM-Templates/RMQ-ST.cpp new file mode 100644 index 0000000..274ec68 --- /dev/null +++ b/.ACM-Templates/RMQ-ST.cpp @@ -0,0 +1,34 @@ +#include +#include +using namespace std; + +namespace RMQ_ST +{ +const int MAXN=10000; +int f[MAXN][MAXN]; +int a[MAXN]; +int n; +void init() +{ + for(int i = 1;i<=n;i++) + { + f[i][0]=a[i]; + } + for(int j=1;(1<