上一页 1 ··· 4 5 6 7 8 9 下一页
摘要: MingSD's KMP 阅读全文
posted @ 2019-01-22 22:23 liuyongliu 阅读(96) 评论(0) 推荐(0)
摘要: 传送门 阅读全文
posted @ 2019-01-22 22:17 liuyongliu 阅读(149) 评论(0) 推荐(0)
摘要: 一:知识点 欧拉函数参考1 浅谈欧拉函数参考2 欧拉函数的定义: 在数论中,对于正整数N,少于或等于N ([1,N]),且与N互质(即gcd为1)的正整数(包括1)的个数,记作φ(n)。 欧拉函数的延伸: 小于或等于n的数中,与n互质的数的总和为:φ(x) * x / 2 (n>1)。 (如果mod 阅读全文
posted @ 2019-01-22 20:28 liuyongliu 阅读(378) 评论(0) 推荐(0)
摘要: C. Classy Numbers C. Classy Numbers time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output Let' 阅读全文
posted @ 2019-01-22 12:38 liuyongliu 阅读(247) 评论(0) 推荐(0)
摘要: E - Stars 题意:B表示点亮改点,D表示熄灭,Q查询区间内亮的个数 Sample Input 5 B 581 145 B 581 145 Q 0 600 0 200 D 581 145 Q 0 600 0 200 AC代码: 1 #include <bits/stdc++.h> 2 3 us 阅读全文
posted @ 2019-01-21 20:09 liuyongliu 阅读(183) 评论(0) 推荐(0)
摘要: A - A Simple Problem with Integers "C a b c" means adding c to each of Aa, Aa+1, ... , Ab. -10000 ≤ c ≤ 10000."Q a b" means querying the sum of Aa, Aa 阅读全文
posted @ 2019-01-21 16:43 liuyongliu 阅读(179) 评论(0) 推荐(0)
摘要: P1164 小A点菜 d[i][j] : 前i个菜刚好花费j元的方案数 int d[200][10008]; int main() { int n,m; cin>>n>>m; int v[200]; for(int i=1;i<=n;i++) cin>>v[i]; d[1][0]=1; d[1][v 阅读全文
posted @ 2019-01-21 10:30 liuyongliu 阅读(176) 评论(0) 推荐(0)
摘要: 招生 #include <iostream> #include <cstdio> #include <algorithm> #include <cstring> #include <string> #include <vector> #include <stack> #include <map> # 阅读全文
posted @ 2019-01-20 18:30 liuyongliu 阅读(299) 评论(0) 推荐(0)
摘要: const int N = 100000 + 5; bool prime[N];//prime[i]表示i是不是质数 int p[N], tot;//p[N]用来存质数 void init(){ for(int i = 2; i < N; i ++) prime[i] = true;//初始化为质数 阅读全文
posted @ 2019-01-20 18:25 liuyongliu 阅读(145) 评论(0) 推荐(0)
摘要: 1 #include <iostream> 2 #include <cstdio> 3 #include <algorithm> 4 #include <cstring> 5 #include <string> 6 #include <vector> 7 #include <map> 8 #incl 阅读全文
posted @ 2019-01-20 18:23 liuyongliu 阅读(289) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 下一页