码迷,mamicode.com
首页 >  
搜索关键字:codeforce    ( 868个结果
codeforce 600A - Extract Numbers
学习string 1 #include 2 #define eps 1e-8 3 #define M_PI 3.141592653589793 4 const int N = 100005; 5 using namespace std; 6 7 string st; 8 vectorv1,v2;.....
分类:其他好文   时间:2015-11-28 12:01:24    阅读次数:148
codeforce -602B Approximating a Constant Range(暴力)
CF上说是数据结构类型。表示不会。题意是,找连续的并且任意两个数相差不超过1的最长串。思路:题中说相邻的两个数相差不超过1;那么cnt最小为2,cnt赋初值2;由于要相差不超过一,所以每个串的最大值最小值相差不能超过一,那么从第三个元素开始,如果abs(a[i]-max) 2 #include 3 ...
分类:移动开发   时间:2015-11-25 22:23:02    阅读次数:312
codeforce 599C Day at the Beach
Bi表示第i个块,那么就是说Bi max≤Bi+1 min,又因为Bi min≤ Bi max,因此只要判断前缀的最大值是否小于等于后缀。#includeusing namespace std;typedef long long ll;const int maxn = 1e5+1;int h[max...
分类:其他好文   时间:2015-11-21 13:10:54    阅读次数:113
codeforce 599D Spongebob and Squares
很容易得到n× m的方块数是然后就是个求和的问题了,枚举两者中小的那个n ≤ m。然后就是转化成a*m + c = x了。a,m≥0,x≥ c。最坏是n^3 ≤x,至于中间会不会爆,测下1e18就好。#includeusing namespace std;typedef long long ull;...
分类:其他好文   时间:2015-11-21 13:05:07    阅读次数:129
codeforce 599B Spongebob and Joke
一道水题WA那么多发,也是醉了。f看成函数的话,其实就是判断一下反函数存不存在。坑点,只能在定义域内判断,也就是只判断b[i]。没扫一遍前不能确定Impossible。#includeusing namespace std;typedef long long ll;const int maxn = ...
分类:其他好文   时间:2015-11-21 13:04:46    阅读次数:155
Bad Luck Island-CodeForce(dp)
链接:http://codeforces.com/problemset/problem/540/D题目大意:这个岛上有三种生物 r石头 s剪刀 p布求最后只剩一种生物的概率用dp[i][j][k]表示概率石头和剪刀相遇的概率是p=i*j/(i*j+j*k+k*i),剪刀会被吃掉 所以dp[i][j....
分类:其他好文   时间:2015-11-20 21:47:08    阅读次数:161
codeforce 597C-Subsequences(dp+树状数组)
题目和南阳那道题一样链接http://www.cnblogs.com/zzuli2sjy/p/4943774.html代码: 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 typedef long long l...
分类:编程语言   时间:2015-11-19 13:13:04    阅读次数:204
CodeForce 7 B - Memory Manager(模拟)
题目大意:给你一段内存,要你进行如下的三个操作。1.分配内存 alloc X ,分配连续一段长度为X的内存。如果内存不够应该输出NULL,如果内存够就给这段内存标记一个编号。2.擦除编号为 X的内存,erase X, 如果这段内存不存在那么输出“ILLEGAL_ERASE_ARGUMENT”,否则....
分类:其他好文   时间:2015-10-23 18:23:02    阅读次数:116
codeforce好地方啊 Bear and Elections *
Codeforces Round #318 居然可以看测试数据,哪里没过一目了然,哈哈哈 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 using namespace std; 9 #de...
分类:其他好文   时间:2015-09-21 15:38:01    阅读次数:159
CodeForce 569A
Time Limit:2000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64uDescriptionLittle Lesha loves listening to music via his smartphone. But the smar...
分类:其他好文   时间:2015-08-21 21:04:14    阅读次数:206
868条   上一页 1 ... 79 80 81 82 83 ... 87 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!