码迷,mamicode.com
首页 >  
搜索关键字:candy    ( 281个结果
575. Distribute Candies
Given an integer array with even length, where different numbers in this array represent different kinds of candies. Each number means one candy of th ...
分类:其他好文   时间:2018-11-19 20:24:21    阅读次数:112
723. Candy Crush
This question is about implementing a basic elimination algorithm for Candy Crush. Given a 2D integer array board representing the grid of candy, diff ...
分类:其他好文   时间:2018-11-08 18:15:35    阅读次数:162
575. Distribute Candies
Given an integer array with even length, where different numbers in this array represent different kinds of candies. Each number means one candy of th ...
分类:其他好文   时间:2018-10-29 14:06:14    阅读次数:108
ZOJ Monthly, January 2018 Solution
A - Candy Game 水。 1 #include <bits/stdc++.h> 2 using namespace std; 3 4 #define N 1010 5 int t, n; 6 int a[N], b[N]; 7 8 int main() 9 { 10 scanf("%d", ...
分类:其他好文   时间:2018-10-27 21:16:36    阅读次数:149
[AtCoder AGC27A]Candy Distribution Again
题目大意:把$x$个糖果分给$n$个人,必须分完,如果第$i$个人拿到$a_i$个糖果,就会开心,输出最多多少人开心 题解:从小到大排序,判断是否可以让他开心,注意最后判断是否要少一个人(没分完) 卡点:无 C++ Code: ...
分类:其他好文   时间:2018-10-11 13:44:43    阅读次数:118
135. Candy
一、题目 1、审题 2、分析 每个小孩对应一个等级,每个小孩至少分一颗糖,紧挨着的等级高的小孩要比紧挨着的等级低的小孩的糖果多,求至少要分几颗糖果。 二、解答 1、思路: 方法一、 考虑到每个小孩的分到的糖果数受左右两边的小孩等级的影响。故: ①、找出所有小孩中等级最低的小孩1,分一棵糖,且他左边若 ...
分类:其他好文   时间:2018-10-10 14:37:12    阅读次数:115
[LeetCode] 723. Candy Crush 糖果粉碎
This question is about implementing a basic elimination algorithm for Candy Crush. Given a 2D integer array board representing the grid of candy, diff ...
分类:其他好文   时间:2018-10-05 12:09:18    阅读次数:167
HDU 4780 Candy Factory
Candy Factory 题意: 有n种糖果,要求每种糖果都要生产刚好一颗 遵循如下规则: 1.糖果i的生产区间在(si, ti),花费是k*(pi-si),pi是实际开始生产的时间,pi需要在区间[si, ti-1]以内. 2.每个机器第一次使用的时候都有一个初始化时间,机器 j 从初始化到生产 ...
分类:其他好文   时间:2018-09-28 20:44:07    阅读次数:189
AGC027 A - Candy Distribution Again
[TOC] 题目链接 "AGC027 A Candy Distribution Again" 题解 贪心即可 代码 c++ include include include define gc getchar() define pc putchar inline int read() { int x ...
分类:其他好文   时间:2018-09-25 22:56:44    阅读次数:305
leetcode135 - Candy - hard
There are N children standing in a line. Each child is assigned a rating value.You are giving candies to these children subjected to the following req ...
分类:其他好文   时间:2018-09-16 12:25:21    阅读次数:169
281条   上一页 1 2 3 4 5 ... 29 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!