码迷,mamicode.com
首页 >  
搜索关键字:codeforce    ( 868个结果
codeforce Pashmak and Buses(dfs枚举)
1 /* 2 题意:n个同学,k个车, 取旅游d天! 3 要求所有的学生没有两个或者两个以上的在同一辆车上共同带d天! 输出可行的方案! 4 5 对于d行n列的矩阵,第i行第j列表示的是第i天第j个同学所在的车号! 6 也就是保证所有行不全相同,即每一列都是不相同的...
分类:其他好文   时间:2014-08-16 22:27:31    阅读次数:348
Codeforce 22B Bargaining Table
HDU 1505,1506的变形 只是由求面积变成了求周长 具体分析可见http://blog.csdn.net/iooden/article/details/38379065 另外这题数据比较小 也可以暴力枚举 枚举每点作为左上角 然后枚举合法的的长和宽, 判断形成的的矩阵是否全由 '0'组成, 如果是就更新结果...
分类:其他好文   时间:2014-08-06 02:04:10    阅读次数:334
CodeForce 448C 木片填涂问题
题目大意:有多片木片需要填涂,可以每次横着涂一行,也可以一次涂一列,当然你涂一行时遇到中间长度不够高的木片,填涂到此中断这题目运用dfs能更容易的解出,虽然还是十分不容易理解 1 #include 2 3 using namespace std; 4 5 #define N 5010 6 in...
分类:其他好文   时间:2014-07-26 17:04:21    阅读次数:250
【找规律】CodeForce #258 Problem A——Game With Sticks
来源:点击打开链接 很简单,找规律。 每去掉一个点,点的总数量就减去n+m-1,然后看谁最先减到没有点可减,就可以了。 #include #include using namespace std; int main() { int n,m; cin>>n>>m; int totalpoint=n*m; int count=0; while(totalpoint>0) { ...
分类:其他好文   时间:2014-07-26 02:18:56    阅读次数:202
Codeforce Circle Line 环形数据操作
The circle line of the Berland subway has n stations. We know the distances between all pairs of neighboring stations: d1 is the distance between the 1-st and the 2-nd station; d2 is the d...
分类:其他好文   时间:2014-07-22 23:05:14    阅读次数:302
codeforce Present from Lena 打印菱形
Vasya's birthday is approaching and Lena decided to sew a patterned handkerchief to him as a present. Lena chose digits from 0 to n as the pattern. The digits will form a rhombus. The largest digit ...
分类:其他好文   时间:2014-07-22 23:04:32    阅读次数:412
Codeforce 214 Div 2 B.Hometask
题目描述: Description Furik loves math lessons very much, so he doesn't attend them, unlike Rubik. But now Furik wants to get a good mark for math. For that Ms. Ivanova, his math teacher, gave him...
分类:其他好文   时间:2014-05-03 16:45:31    阅读次数:234
codeforce 泛做
1A - Theatre Square题意:有一个规模为n*m的剧院,用a*a的地板来铺满,问需要多少块木板。思路:水题。 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #define l...
分类:其他好文   时间:2014-05-01 09:33:16    阅读次数:302
868条   上一页 1 ... 85 86 87
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!