CodeForces Round #498 div3】的更多相关文章

A: 题目没读, 啥也不会的室友帮我写的. #include<bits/stdc++.h> using namespace std; #define Fopen freopen("_in.txt","r",stdin); freopen("_out.txt","w",stdout); #define LL long long #define ULL unsigned LL #define fi first #def…
◇赛时·V◇ Codeforces Round #486 Div3 又是一场历史悠久的比赛,老师拉着我回来考古了……为了不抢了后面一些同学的排名,我没有做A题 ◆ 题目&解析 [B题]Substrings Sort +传送门+   [暴力模拟] 题意 给出n个字符串,你需要将它们排序,使得对于每一个字符串,它前面的字符串都是它的子串(对于字符串i,则字符串 1~i-1 都是它的子串). 解析 由于n最大才100,所以 O(n3) 的算法都不会爆,很容易想到暴力模拟. 如果字符串i是字符串j的子串…
http://codeforces.com/contest/1092/problem/B There are nn students in a university. The number of students is even. The ii-th student has programming skill equal to aiai. The coach wants to form n2n2 teams. Each team should consist of exactly two stu…
http://codeforces.com/contest/1092/problem/D2 Vova's family is building the Great Vova Wall (named by Vova himself). Vova's parents, grandparents, grand-grandparents contributed to it. Now it's totally up to Vova to put the finishing touches. The cur…
http://codeforces.com/contest/1092/problem/D1 Vova's family is building the Great Vova Wall (named by Vova himself). Vova's parents, grandparents, grand-grandparents contributed to it. Now it's totally up to Vova to put the finishing touches. The cur…
http://codeforces.com/contest/1092/problem/C Ivan wants to play a game with you. He picked some string ss of length nn consisting only of lowercase Latin letters. You don't know this string. Ivan has informed you about all its improper prefixes and s…
http://codeforces.com/contest/1092/problem/A You are given two integers nn and kk. Your task is to construct such a string ss of length nn that for each ii from 11 to kk there is at least one ii-th letter of the Latin alphabet in this string (the fir…
http://codeforces.com/contest/1006/problem/A Mishka got an integer array aa of length nn as a birthday present (what a surprise!). Mishka doesn't like this present and wants to change it somehow. He has invented an algorithm and called it "Mishka's A…
[比赛链接] https://codeforces.com/contest/1006 [题解] Problem A. Adjacent Replacements        [算法] 将序列中的所有偶数替换为奇数即可 时间复杂度 : O(N) [代码] #include<bits/stdc++.h> using namespace std; template <typename T> inline void chkmax(T &x,T y) { x = max(x,y);…
这次div3比上次多一道, 也加了半小时, 说区分不出1600以上的水平.(我也不清楚). A. Remove Duplicates 题意:给你一个数组,删除这个数组中相同的元素, 并且保留右边的元素. 代码: #include<bits/stdc++.h> using namespace std; #define Fopen freopen("_in.txt","r",stdin); freopen("_out.txt","…