- 博客(4)
- 收藏
- 关注
原创 Good Bye 2017
Good Bye 2017 题目链接:http://codeforces.com/contest/908 A. New Year and Counting Cards(CF 908A) #include<bits/stdc++.h> using namespace std; int ans=0;char s[100]; int main() { scanf(" %s",...
2017-12-31 00:25:37 328
原创 贪吃蛇
无聊写个贪吃蛇玩玩,先扔个代码,以后有空再描述。 有问题或者更好的建议欢迎联系本蒟蒻。#include<bits/stdc++.h> #include<conio.h> #include<Windows.h> #define N 105 using namespace std; int n,m,l,r,dis,ti,flag,sum;char w[N][N]; const int maxn=100
2017-12-26 19:17:39 214
原创 CF886E Maximum Element
Maximum Element题目描述 http://codeforces.com/contest/886/problem/E题解日常不会计数题。 重度推公式困难症患者。 定义状态f[i]表示i个数离散化成排列,最大的那个放最后面的合法方案数。 那么,枚举n的位置,ans=Σf[i]*A(n-1,n-i)。 考虑转移。对于f[i],考虑第二大的数字i-1。若i-1在i-k前则肯定满足。否则
2017-12-06 22:59:38 507
原创 CF886D Restoration of string
Restoration of string题目描述 传送门:http://codeforces.com/problemset/problem/886/D **题解感觉这题思路好精妙。 考虑一个字符串,如果它是most frequent的,那么对这个串中任意相邻的一对元素,如ab,则在good string中对于任意一个a后面都必须跟着一个b。否则a就是一个比ab更常见的子串。 因此,对于读入
2017-12-06 20:40:15 257
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人