C. Mike and Chocolate Thieves time limit per test:2 seconds memory limit per test:256 megabytes input:standard input output:standard output Bad news came to Mike's village, some thieves stole a bunch of chocolates from the local factory! Horrible! As…
Mike and Chocolate Thieves 题目链接: http://acm.hust.edu.cn/vjudge/contest/121333#problem/G Description Bad news came to Mike's village, some thieves stole a bunch of chocolates from the local factory! Horrible! Aside from loving sweet things, thieves fr…
题目链接: C. Mike and Chocolate Thieves time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Bad news came to Mike's village, some thieves stole a bunch of chocolates from the local factory! Horrib…
C. Mike and Chocolate Thieves 题目连接: http://www.codeforces.com/contest/689/problem/C Description Bad news came to Mike's village, some thieves stole a bunch of chocolates from the local factory! Horrible! Aside from loving sweet things, thieves from t…
C. Mike and Chocolate Thieves time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Bad news came to Mike's village, some thieves stole a bunch of chocolates from the local factory! Horrible! As…
原题: Description Bad news came to Mike's village, some thieves stole a bunch of chocolates from the local factory! Horrible! Aside from loving sweet things, thieves from this area are known to be very greedy. So after a thief takes his number of choco…
题目并不难,就是比赛的时候没敢去二分,也算是一个告诫,应该敢于思考…… #include<stdio.h> #include<iostream> using namespace std; int main() { long long n; scanf("%I64d",&n); ,right=1e18,mid,num,m,s; ; while(left<=right) { mid=(left+right)>>; num = ; ;i &l…
题目链接:http://acm.hust.edu.cn/vjudge/problem/visitOriginUrl.action?id=412145 题目大意:给定一个数字n,问能不能求得一个最小的整数x,使得在1-x范围内,可以取的n组T*k^3<=x.T,k为任意整数,需要在小于等于x的情况下,凑够n对T,k,使其满足T*k^3<=x.若x存在,则输出x,若x不存在,则输出-1. 解题思路: 先看k=2,(1,2,4,8)/(2,4,8,16)/(3,6,12,24).... k=3,(1…
Time Limit:2000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64u   Description Bad news came to Mike's village, some thieves stole a bunch of chocolates from the local factory! Horrible! Aside from loving sweet things, thieves from this…
题目大意:有四个小偷,第一个小偷偷a个巧克力,后面几个小偷依次偷a*k,a*k*k,a*k*k*k个巧克力,现在知道小偷有n中偷法,求在这n种偷法中偷得最多的小偷的所偷的最小值. 题目思路:二分查找偷得最多的小偷所偷的数目,并遍历k获取该数目下的方案数.脑子一抽将最右端初始化做了1e15,wa了n多次-- #include<iostream> #include<algorithm> #include<cstring> #include<vector> #in…