Vova promised himself that he would never play computer games... But recently Firestorm - a well-known game developing company - published their newest game, World of Farcraft, and it became really popular. Of course, Vova started playing it. Now he…
A /*Huyyt*/ #include<bits/stdc++.h> #define mem(a,b) memset(a,b,sizeof(a)) #define pb push_back using namespace std; typedef long long ll; typedef unsigned long long ull; const ll LLmaxn = 2e18; int main() { string a; cin >> a; , c=; ; i <…
题目链接:http://codeforces.com/contest/722/problem/C 题意:每次破坏一个数,求每次操作后的最大连续子串和. 思路:并查集逆向操作 #include<bits/stdc++.h> using namespace std; typedef long long ll; const int N = 1e5 + 10; ll sum[N], ans[N]; int n, a[N], b[N], father[N], r[N]; bool vis[N]; int…