码迷,mamicode.com
首页 >  
搜索关键字:codeforce    ( 868个结果
codeforce 510C Fox And Names
原题地址:http://codeforces.com/problemset/problem/510/C 题意: 给定一组字符串,要求找到一个字符排列,使得该字符串的排序满足字符序列对应地字典序 题解 拓扑排序…… ...
分类:其他好文   时间:2016-06-09 13:30:00    阅读次数:313
codeforce 22#div2E
题目大意 给了 n(25) 个点,从每个点 u 出发连向了一个点 v(共 n 条边) 现在要求添加最少的边使得整个图是一个强连通图 做法分析   这道题千万不要一般化:先求强连通分量再把图化为 DAG 来做(我们能够很方便的得到需要添加的边的数量,但是加哪些边会变得很麻烦) 注意一个细节:每个点的出度必为 1 有什么特点?         从一个点 ...
分类:其他好文   时间:2016-05-07 09:48:52    阅读次数:165
【找规律】CodeForce #258 Problem A——Game With Sticks
来源:点击打开链接 非常easy。找规律。 每去掉一个点,点的总数量就减去n+m-1,然后看谁最先减到没有点可减。就能够了。 #include <iostream> #include <cstring> using namespace std; int main() { int n,m; cin>>
分类:其他好文   时间:2016-02-26 18:57:21    阅读次数:151
codeforce 621B Wet Shark and Bishops
对角线 x1+y1=x2+y2 或者x1-y1=x2-y2 1 #include<iostream> 2 #include<string> 3 #include<algorithm> 4 #include<cstdlib> 5 #include<cstdio> 6 #include<set> 7 #
分类:其他好文   时间:2016-02-01 17:59:32    阅读次数:154
codeforce 338 C 巧妙处理序列匹配问题
这道题就是给你两个序列A,和B, 然后问你求出一个用最少的Ade子序列组成B的方法。。例如A = abc B = abccba, 那么就可以用两个A表示B, 一个是正的序列, 另外一个是负的序列。对于这个问题我们先做一个小小的转换,我们将A倒置变为A1,然后就是用递增的A和A1序列表示B,我们用.....
分类:其他好文   时间:2016-01-10 22:30:42    阅读次数:454
codeforce 611B New Year and Old Property
暴力搞#include#include#include#includeusing namespace std;long long a,b;long long tmpa,tmpb;long long num1[70],num2[70];int tot1,tot2;int main(){// fr...
分类:其他好文   时间:2016-01-02 10:23:19    阅读次数:199
codeforce 611A New Year and Days
#include#include#include#includeusing namespace std;char num[1000];char s[1000];int week[10];int main(){ week[1]=1; week[2]=1; week[3]=1; ...
分类:其他好文   时间:2016-01-02 10:22:41    阅读次数:163
CodeForce 607A&&608C Chain Reaction
[题目传送门] ---------------> http://codeforces.com/problemset/problem/608/C[题目] There are n beacons located at distinct positions on a number line. The i....
分类:其他好文   时间:2015-12-24 16:14:44    阅读次数:277
CodeForce---Educational Codeforces Round 3 D. Gadgets for dollars and pounds 正题
对于这题笔者无解,只有手抄一份正解过来了:基本思想就是 :二分答案,对于第x天,计算它最少的花费f(x),#include #include #include #include using namespace std;typedef long long ll;typedef pair pii;#d....
分类:其他好文   时间:2015-12-21 23:14:58    阅读次数:195
CodeForce---Educational Codeforces Round 3 Load Balancing 正题
看到这题是我的想法就是肯定跟平均值有关但是接下来就不知道怎么做了看完大神的正解数之后,原来发现是这么简单,但是就是不知道为啥一定是平均值和平均值加1,而不是平均值和平均值减1;好啦下面就贴出大神的代码吧:#include#include#includeusing namespace std;int ...
分类:其他好文   时间:2015-12-21 21:47:09    阅读次数:179
868条   上一页 1 ... 77 78 79 80 81 ... 87 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!