G.String Transformation 题目描述 Bobo has a string S = s1 s2...sn consists of letter a , b and c . He can transform the string by inserting or deleting substrings aa , bb and abab .Formally, A = u ? w ? v (“ ? ” denotes string concatenation) can be trans…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6281 题意: 根据已给出的式子,进行排序,然后输出排完序后原先的下表. 题解:用结构体保存,在用结构体排序,利用stable_sort()稳定排序.因为会爆long long ,所以对式子进行转换. 代码: #include<bits/stdc++.h> using namespace std; struct node{ int n; long long a,b,c; friend bool op…
A - Easy $h$-index 后缀扫一下 #include <bits/stdc++.h> using namespace std; #define ll long long #define N 200010 int n; ll arr[N]; inline int work() { ll sum = ; ; --i) { sum += arr[i]; if (sum >= i) return i; } ; } int main() { while (scanf("%d…
比赛链接: http://202.197.224.59/OnlineJudge2/index.php/Contest/problems/contest_id/36 题目来源: 2014嘉杰信息杯ACM/ICPC湖南程序设计邀请赛暨第六届湘潭市程序设计竞赛 × Problem A A simple problem (求N % 1 + N % 2 + ....+ N % N, 待补) ? Problem B Path √ Problem C Range (单调栈) √ Problem…