cf C. Sereja and Algorithm】的更多相关文章

http://codeforces.com/contest/368/problem/C 从左向右记录从1位置到每一个位置上x,y,z的个数.然后判断在l,r区间内的x,y,z的关系满不满足abs(x-y)<=1&&abs(x-z)<=1&&abs(y-z)<=1,满足输出YES,否则输出NO. #include <cstdio> #include <cstring> #include <algorithm> #defin…
#include <iostream> #include <vector> #include <algorithm> #include <string> using namespace std; int main(){ string s ; cin >>s; int m; cin >>m; vector<int> l(m),r(m); ; i < m ; ++ i ) cin >> l[i]>>…
http://codeforces.com/contest/368/problem/D #include <cstdio> #include <cstring> #include <map> #include <vector> #include <algorithm> #define maxn 300000 #define LL long long using namespace std; int n,m,p; LL a[maxn],b[maxn…
http://codeforces.com/contest/368/problem/B 从后往前找一遍就可以. #include <cstdio> #include <cstring> #include <algorithm> #define maxn 200000 using namespace std; int dp[maxn]; int n,m; int a[maxn]; bool vis[maxn]; int main() { while(scanf("…
题目链接:http://codeforces.com/problemset/problem/314/C 题意:给定一个数列a.(1)写出a的不同的所有非下降子列:(2)定义某个子列的f值为数列中各个数的乘积.(3)求所有非下降子列的f值之和. 思路:我们用s[i]表示以数字a[i]结尾的所有非下降子列的f之和.那么a必然是接在之前小于等于a的某个数之后,设这个位置为j,那么s[i]=(s[j]+1)*a[i].也就是,a[i]可以接在其后或者自成一个子列.那么最后的答案就是所有的s值之和.这里有…
#include <bits/stdc++.h> #define llong long long using namespace std; const int N = 1e5; const int P = 1e9+; const llong INV2 = 5e8+; int nxt[N+]; int lstpos[N+]; int a[N+]; int num[N+]; int cnum[N+]; llong tmp0[N+],tmp1[N+],tmp2[N+]; vector<int&…
一. keytool -list -printcert -jarfile "%filename%" 二. 非常low方法:下载的应用安装能成功覆盖原应用则签名一致三. 作者:陈子腾链接:https://www.zhihu.com/question/20749413/answer/16715284来源:知乎著作权归作者所有,转载请联系作者获得授权. 1. 查找apk里的rsa文件(Windows)> jar tf HelloWorld.apk |findstr RSA(Linux)…
A. Sereja and Algorithm 水题不解释. B. Sereja ans Anagrams 模p同余的为一组,随便搞. C. Sereja and the Arrangement of Numbers 我还以为是找规律... 把每个数当成一个点.就有一个图.让后求欧拉路什么的. D. Sereja and Sets 这个思路感觉很巧妙(可能是我太弱了),我们对于每一段连续的d,找到不包含它们的所有集合,这些集合的子集一定不可行. 见代码. /* * Problem: D. Ser…
A Sereja and Algorithm 题意:给定有x,y,z组成的字符串,每次询问某一段s[l, r]能否变成变成zyxzyx的循环体. 分析: 分析每一段x,y,z数目是否满足构成循环体,当然长度<3的要特判. 代码: #include <bits/stdc++.h> #define in freopen("solve_in.txt", "r", stdin); #define pb push_back using namespace s…
可以比对apk签名的fingerprint. 假定安装了JDK,如果想查HelloWorld.apk所使用的签名的fingerprint,可以这样做: 1. 查找apk里的rsa文件 (Windows)> jar tf HelloWorld.apk |findstr RSA (Linux)$ jar tf HelloWorld.apk |grep RSA META-INF/CERT.RSA 2. 从apk中解压rsa文件 jar xf HelloWorld.apk META-INF/CERT.R…