No plate contains pieces of both cakes. To make his guests happy, Ivan wants to distribute the cakes in such a way that the minimum number of pieces on the plate is maximized. Formally, Ivan wants to know the maximum possible number x such that he can distribute the cakes according to t...
standard output Sasha and Dima want to buy twonn -tier cakes. Each cake should consist ofnn different tiers: from the size of11 to the size ofnn . Tiers should go in order from the smallest to the biggest (from top to bottom). They live on the same street, there are2⋅n2⋅n ...
Sasha and Dima want to buy twonn -tier cakes. Each cake should consist ofnn different tiers: from the size of11 to the size ofnn . Tiers should go in order from the smallest to the biggest (from top to bottom). They live on the same street, there are2⋅n2⋅n houses in a ro...
CodeForces-1130B.Two Cakes(dp) 题目:https://codeforces.com/problemset/problem/1130/B 分析:由于在每个点买蛋糕是相互独立的,所以我们只要求出每一步的最小值就行,这样最后就是最小值。 所以转移就是: 用vector来存图,最后要加进两个0; 因为任何一个人他可以走到两个相同size 的tier的任意一个,所以...
CodeForces Algorithms. Contribute to duyminh-bostrap/CodeForces development by creating an account on GitHub.
http://codeforces.com/contest/1110/problem/B 题意:有一把尺子n处破了,总长m,可以用k张原无限长的胶布进行修补,问最少使用胶布多长; 思路:n个位置必补,先进性修补,再把间隔里取最短的n-k个修补; ...B. Two Cakes B. Two Cakes time limit per test 1 second memory limit per test 256 megabytes...
【Educational Codeforces Round 35 C】Two Cakes,【链接】"我是链接,点我呀:)"【题意】在这里输入题意【题解】直觉题。感觉情况会很少。毕竟间隔太大了。中间肯定有一些数字达不到。有1肯定可以22x肯定可以333也可以244也可以。就这样【代码】cppincludeusingnamespacestd
CodeForces Algorithms. Contribute to duyminh-bostrap/CodeForces development by creating an account on GitHub.
【Educational Codeforces Round 35 C】Two Cakes 【链接】我是链接,点我呀:) 【题意】 在这里输入题意 【题解】 直觉题。 感觉情况会很少。 毕竟间隔太大了。中间肯定有一些数字达不到。 有1肯定可以 2 2 x肯定可以 3 3 3也可以 2 4 4也可以。 就这样...
【Educational Codeforces Round 35 C】Two Cakes 【链接】 我是链接,点我呀:) 【题意】 在这里输入题意 【题解】 直觉题。 感觉情况会很少。 毕竟间隔太大了。中间肯定有一些数字达不到。 有1肯定可以 2 2 x肯定可以 3 3 3也可以 2 4 4也可以。 就这样 【代码】...Educational Codeforces Round ...