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<