Cake Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2648 Accepted Submission(s): 1275 Problem Description 一次生日Party可能有p人或者q人参加,现准备有一个大蛋糕.问最少要
Alice and the Cake题解 AC记录:记录-洛谷 题面翻译(大概就是题目大意) 执行恰好 n − 1 n-1 n−1 次操作,每次操作可以选择当前所有蛋糕中满足其重量 w ⩾ 2 w\geqslant 2 w⩾2 的一块,然后将其分为质量分别为 ⌊ w 2 ⌋ \lfloor\dfrac w2\rfloor ⌊2w⌋ 和 ⌈ w 2 ⌉ \lceil\dfrac
题目链接:zoj 3905 Cake 代码 #include <cstdio>#include <cstring>#include <algorithm>using namespace std;const int maxn = 805;struct State {int a, b;State (int a = 0, int b = 0): a(a), b(b) {}bool operat
Lucy and Lily are twins. Today is their birthday. Mother buys a birthday cake for them. Now we put the cake onto a Descartes coordinate. Its center is at (0, 0), and the cake’s length of radius is 100
This way 题意: 现在有一个正n边型的蛋糕,每次都会在蛋糕的点上切下一个三角形,现在给你每个三角形的三个点的下标,问你这个蛋糕下标排列的顺序以及按照什么顺序切下这些三角形的。 题解: 由于最外面的边只会出现一次,切割边会出现两次,所以我们计算每条边出现的次数,然后做一个dfs就可以求出下标排列的顺序。 我们可以发现每次切下一个三角形的时候一定有一个点在接下来只出现一次,于是我们只需
原题: Lucy and Lily are twins.Today is their birthday.Mother buys a birthday cake for them. Now we put the cake onto a Descartes coordinate. Its center is at (0,0), and the cake’s length of radius is
【题目】 Cake Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3489 Accepted Submission(s): 1815 Problem Description 一次生日P
题目描述: Door's family is going celebrate Famil Doors's birthday party. They love Famil Door so they are planning to make his birthday cake weird! The cake is a n×n n×n n×n square consisting of equal s
题意:给你一系列的点,让你找出一条直线AX+BY=0,使直线把这一系列的点分为两个部分。 由于A,B的范围在-500~500之间,所以直接枚举就可以了。 反思:由于没仔细看题意,If there are many solutions, you can only print one of them.这句话让我吃亏了。 调试的程序和Sample Output 不一样,然后就纠结了老久。。。。