码迷,mamicode.com
首页 > 其他好文
海选女主角
海选女主角 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 35439 Accepted Submission(s): 15836 Problem Description potato老师虽然很喜欢教书,但是迫于生活压力,不得不...
分类:其他好文   时间:2014-11-27 09:19:22    阅读次数:157
(贪心)HDU 1789 解题报告
(贪心)HDU 1789 解题报告 思路: 既然要让被扣掉的分数最少,那么必然是对分数高的作业优先安排。注意题中有一个不是很明显的条件可以支持这一点:完成每份作业都需要一天。这样就避免了优先完成一份分数高的作业而导致n(n>1)份作业没有完成,而且这n份作业分数和比一份分数高的作业还要大的情况。 方法: 对于所有的作业,按照分数从高到低排序,分数相同时,截止时间小的排在前面。另外初始化一个大小为n的数组,用来保存某一天是否已经被占用。然后开始贪心,对于每份作业,看从当天到当前之前的时间里面,有没有空...
分类:其他好文   时间:2014-11-27 09:17:10    阅读次数:164
nyoj 32 组合数 (深搜,不错,好题)
组合数 时间限制:3000 ms  |  内存限制:65535 KB 难度:3 描述找出从自然数1、2、... 、n(0<n<10)中任取r(0<r<=n)个数的所有组合。 输入输入n、r。 输出按特定顺序输出所有组合。 特定顺序:每一个组合中的值从大到小排列,组合之间按逆字典序排列。 样例输入 5 3 样例输出 543 542 541 532 ...
分类:其他好文   时间:2014-11-27 09:16:46    阅读次数:157
[Leetcode]Reverse Integer
Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 click to show spoilers. Have you thought about this? Here are some good questions to ask before c...
分类:其他好文   时间:2014-11-27 09:15:14    阅读次数:178
LeetCode[Tree]: Symmetric Tree
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). Recursive Algorithm class Solution { public: bool isSymmetric(TreeNode *root) { return ...
分类:其他好文   时间:2014-11-27 09:18:04    阅读次数:176
leetcode-Path Sum
Path Sum  Total Accepted: 31405 Total Submissions: 104326My Submissions Question  Solution  Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that add...
分类:其他好文   时间:2014-11-27 09:15:36    阅读次数:151
使用cocos-2dx 3.x 封装的PageView
使用cocos2dx 实现的XKPageView, 可以监听滑动信息,可以获取第几个Page~...
分类:其他好文   时间:2014-11-27 09:17:21    阅读次数:584
leetcode-Minimum Depth of Binary Tree
leetcode-Minimum Depth of Binary Tree...
分类:其他好文   时间:2014-11-27 09:16:04    阅读次数:248
leetcode-Remove Nth Node From End of List
Given a linked list, remove the nth node from the end of list and return its head. For example, Given linked list: 1->2->3->4->5, and n = 2. After removing the second node from the end, the l...
分类:其他好文   时间:2014-11-27 09:14:31    阅读次数:197
hdu 1198(并查集 )
自从懂了并查集只后,感觉好多题都是并查集,就像哪一天的字典树一样,这道题一看就是一个并查集,最后查询父节点有几个, 难点:建模的时候应该吧上下联通的和左右联通的标记一下,只要他们和上下左右的都能连通,就把他们并到一个集合里面,我是只判断下和右即可, 源代码: #include #include int up[8], down[8], right[8], left[8]; int par[...
分类:其他好文   时间:2014-11-27 09:16:38    阅读次数:162
由找工作引发的读研感悟
作者:李冰 ·微博:懒人李冰 ·豆瓣:懒人李冰 引子:          9月底找到工作后,就想写一篇文章,总结一下自己的研究生生活和找工作期间的感受,拖到现在,今天补上。 为什么想写这篇文章:      1、读研的过程给了我很多启示,想记录下来。      2、在学习的过程中,没人指导让我感...
分类:其他好文   时间:2014-11-27 09:15:11    阅读次数:337
HDU2059_龟兔赛跑
题目大意:龟兔赛跑,总长度为N,兔子以恒定速度VR跑,乌龟骑电动车 跑,当电动车有电的时候最多跑C幂,有电的时候以VT1速度跑,没电的时 候以VT2的速度跑,已知路上有N个充电站,给你N个充电站离起点的距离。 每次充电需要T秒,问最终乌龟有可能赢得比赛吗? 思路:为了计算每个加油站距离下个充电站的距离,可将起点和终点看做是 充电站。这样总共就有N+2个充电站,序号为0~N+1。从第一个充电站到 第N+1个充电站,计算出从第0个充电站到第j个充电站在充满电的情况下跑 到第i个充电站的最短时间dp[i]。最终答...
分类:其他好文   时间:2014-11-27 09:15:56    阅读次数:244
判断上三角矩阵
第5题 【描述】 输入一个正整数n(2≤n≤10)和n×n矩阵a中的元素,如果a是上三角矩阵,输出“Yes”,否则输出“No”。 【输入】 第一行为正整数n,表示矩阵大小。 接着n行,每一行n个整数,整数以空格间隔。 【输出】 输出“Yes”或“No”。 【输入示例】 3 3 4 5 1 2 3 1 3 4 【输出示例】 No 【提示】 用二维数组表示n×n矩阵时(...
分类:其他好文   时间:2014-11-27 09:13:45    阅读次数:173
informatica安装报错关于libclntsh.so
报错 ERRORDatabase driver event..Error occurred loading library [libclntsh.so.10.1 ] Database driver event.. Error occurred loading library [libpmora8.s...
分类:其他好文   时间:2014-11-27 09:13:49    阅读次数:186
LINQ Operators之过滤(Filtering)
转:http://www.cnblogs.com/lifepoem/archive/2011/11/16/2250676.html在本系列博客前面的篇章中,已经对LINQ的作用、C# 3.0为LINQ提供的新特性,还有几种典型的LINQ技术:LINQ to Objects、LINQ to SQL、E...
分类:其他好文   时间:2014-11-27 09:12:59    阅读次数:296
20141124
select*from category where Parent='011'or'012'or'013' select*from Category where Parent not in('011','012','013')--parent不是012,013,011的 select*from Ca...
分类:其他好文   时间:2014-11-27 09:12:38    阅读次数:194
OpenCV Tutorials —— Features2D + Homography to find a known object
通过特征检测和单应性匹配来发掘已知物体 ~~ Use the function findHomography to find the transform between matched keypoints. Use the function perspectiveTransform to map t...
分类:其他好文   时间:2014-11-27 09:10:48    阅读次数:399
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!