上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 129 下一页
摘要: https://www.luogu.org/problemnew/show/P3865 题目背景 这是一道ST表经典题——静态区间最大值 请注意最大数据时限只有0.8s,数据强度不低,请务必保证你的每次查询复杂度为 O(1)O(1) 题目描述 给定一个长度为 NN 的数列,和 MM 次询问,求出每一 阅读全文
posted @ 2017-11-06 20:26 Aptal丶 阅读(281) 评论(0) 推荐(0) 编辑
摘要: 高精度 高精度 #include <cstring> #include <cstdio> #define max(a,b) (a>b?a:b) inline void read(int &x) { x=0; register char ch=getchar(); for(; ch>'9'||ch<' 阅读全文
posted @ 2017-11-06 17:15 Aptal丶 阅读(351) 评论(3) 推荐(0) 编辑
摘要: https://www.luogu.org/problemnew/show/3807 题目背景 这是一道模板题。 题目描述 给定n,m,p(1\le n,m,p\le 10^51≤n,m,p≤105) 求 C_{n+m}^{m}\ mod\ pCn+mm​ mod p 保证P为prime C表示组合 阅读全文
posted @ 2017-11-06 15:03 Aptal丶 阅读(244) 评论(1) 推荐(0) 编辑
摘要: T1 洗澡 贪心:将未匹配的右括号花费1变为左括号,最有多余的左括号有一半变成右括号 1 #include <cstring> 2 #include <cstdio> 3 4 const int N(100005); 5 int n,top,ans; 6 char s[N]; 7 8 int Pre 阅读全文
posted @ 2017-11-06 10:56 Aptal丶 阅读(170) 评论(0) 推荐(0) 编辑
摘要: T1 遭遇 1 #include <algorithm> 2 #include <cstdio> 3 #include <cmath> 4 5 inline void read(int &x) 6 { 7 x=0; register char ch=getchar(); 8 for(; ch>'9' 阅读全文
posted @ 2017-11-06 09:40 Aptal丶 阅读(193) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 129 下一页