码迷,mamicode.com
首页 >  
搜索关键字:up    ( 7825个结果)
LightOJ 1132 Summing up Powers(矩阵快速幂+二项式定理)
LightOJ 1132题意:给出N(1≤N≤1015),K(0≤K≤50);给出N (1 ≤ N ≤ 10^{15}) , K (0 ≤ K ≤ 50); 计算:(1K+2K+3K+...+NK)%232.计算:(1^K + 2^K + 3^K + ... + N^K) \% 2^{32}.思路:根据二项式定理,我们可以得到: (n+1)k=C0knk+C1knk?1+C2knk?2+...+...
分类:其他好文   时间:2015-08-17 01:14:22    阅读次数:185
glassfish 一个bug重现
链接原文DAS becomes deadlock at start-up after setting log levelDetailsType:BugStatus:OPENPriority:BlockerResolution:UnresolvedAffects Version/s:4.1F...
分类:其他好文   时间:2015-08-16 22:48:05    阅读次数:114
POJ 3087-Shuffle'm Up(map+模拟)
题目地址:POJ 3087 题意:已知两堆牌数均为n的纸牌堆a和b的初始状态, 按给定规则能将他们相互交叉组合成一堆牌str,再将str的最底下的n张牌归为a,最顶的n张牌归为b,依此循环下去。现在输入a和b的初始状态 以及 预想的最终状态c,问a, b经过多少次洗牌之后,最终能达到状态c,若永远不可能相同,则输出”-1”。 思路:用map记录一下当前str出现的状态,如果当前的str在前面出现...
分类:其他好文   时间:2015-08-16 18:26:16    阅读次数:166
【LeetCode】107 - Binary Tree Level Order Traversal II
Given a binary tree, return thebottom-up level ordertraversal of its nodes' values. (ie, from left to right, level by level from leaf to root).For exa...
分类:其他好文   时间:2015-08-16 18:09:04    阅读次数:127
POJ-3087 Shuffle'm Up (模拟)
DescriptionA common pastime for poker players at a poker table is to shuffle stacks of chips. Shuffling chips is performed by starting with two stacks...
分类:其他好文   时间:2015-08-16 16:34:06    阅读次数:127
解题报告 之 HDU5294 Tricks Device
解题报告 之 HDU5294 Tricks Device Description Innocent Wu follows Dumb Zhang into a ancient tomb. Innocent Wu’s at the entrance of the tomb while Dumb Zhang’s at the end of it. The tomb is made up of many chambers, the total number is N. And there are M channe...
分类:其他好文   时间:2015-08-16 13:49:52    阅读次数:117
关于Linux系统清理/tmp/文件夹的原理
转自:http://www.opsers.org/base/clean-up-on-the-linux-system-tmp-folder-you-may-want-to-know.html我们知道,在Linux系统中/tmp文件夹里面的文件会被清空,至于多长时间被清空,如何清空的,可能大家知识的就...
分类:系统相关   时间:2015-08-16 07:03:35    阅读次数:215
1.Two Sum
题目 Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two numbers such that they add up to the targe...
分类:其他好文   时间:2015-08-16 02:10:26    阅读次数:172
ForkingMixIn 示例
import os import socketimport threadingimport SocketServerSERVER_HOST = 'localhost'SERVER_PORT = 0 #tells the kernel to pick up a port dynamicallyBUF_...
分类:其他好文   时间:2015-08-15 22:44:21    阅读次数:190
[Leetcode] Binary Tree Level order travelsal (normal and zigzag and bottom-up )
一、normal fasion使用queue记录上次访问的是记录的孩子节点 1 public List> levelOrder(TreeNode root) { 2 List> res = new LinkedList>(); 3 Queue queue = new LinkedLi...
分类:其他好文   时间:2015-08-15 17:51:51    阅读次数:173
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!