Codeforces AIM Tech Round (Div. 2)】的更多相关文章

这是我第一次完整地参加codeforces的比赛! 成绩 news standings中第50. 我觉这个成绩不太好.我前半小时就过了前三题,但后面的两题不难,却乱搞了1.5h都没有什么结果,然后在等System test的时候,就有点头绪了,囧.肯定是我在比赛的时候太困了(这是借口吗?). A Save Luke 考你会不会编程. B Making a String 贪心即可.这题是Hack最多的题.幸好我没有被. C Graph and String 注意到,如果某两个点之间没有边,说明其中…
·将排序限制于子序列中,又可以说明什么呢? C. Sorting by Subsequences ·英文题,述大意:       输入一个长度为n的无重复元素的序列{a1,a2……an}(1<=n<=105,|ai|<109,将其分成p个不重复的子序列,使得只对每个子序列升序排序,能够在各个子序列排完序后,整个序列也是升序排列好的.求p的最大值,将其输出后并按任意顺序每一行输出每个子序列长度和每个元素排序好的下标. ·分析:       对子序列排序,最终竟然可以使得整个序列都排好序,那…
A:开个桶统计一下,但是不要忘记k和0比较大小 #include<bits/stdc++.h> using namespace std; ]; ]; int main() { int k; scanf("%s%d", s, &k); int n = strlen(s); if(n < k) { puts("impossible"); ; } ; i < n; ++i) { int t = s[i] - 'a'; ++cnt[t]; )…
A. Find Square time limit per test: 1 second memory limit per test: 256 megabytes input: standard input output: standard output Consider a table of size n×mn×m, initially fully white. Rows are numbered 11 through nn from top to bottom, columns 11 thr…
D. Birthday 题目连接: http://www.codeforces.com/contest/623/problem/D Description A MIPT student named Misha has a birthday today, and he decided to celebrate it in his country house in suburban Moscow. n friends came by, and after a typical party they d…
D. Array GCD 题目连接: http://codeforces.com/contest/624/problem/D Description You are given array ai of length n. You may consecutively apply two operations to this array: remove some subsegment (continuous subsequence) of length m < n and pay for it m·…
C. Graph and String 题目连接: http://codeforces.com/contest/624/problem/C Description One day student Vasya was sitting on a lecture and mentioned a string s1s2... sn, consisting of letters "a", "b" and "c" that was written on hi…
B. Making a String 题目连接: http://codeforces.com/contest/624/problem/B Description You are given an alphabet consisting of n letters, your task is to make a string of the maximum possible length so that the following conditions are satisfied: the i-th…
A. Save Luke 题目连接: http://codeforces.com/contest/624/problem/A Description Luke Skywalker got locked up in a rubbish shredder between two presses. R2D2 is already working on his rescue, but Luke needs to stay alive as long as possible. For simplicity…
C. Electric Charges 题目连接: http://www.codeforces.com/contest/623/problem/C Description Programmer Sasha is a student at MIPT (Moscow Institute of Physics and Technology) and he needs to make a laboratory work to pass his finals. A laboratory unit is a…