码迷,mamicode.com
首页 >  
搜索关键字:kari oj    ( 4256个结果
Light OJ 1168 Wishing Snake 强连通缩点+哈密顿通路
题目来源:Light OJ 1168 Wishing Snake 题意:有点难看懂题意 看了一个小时再加别人的代码才懂意思  从0开始 输入的那些每一对u v 都要经过 就是从0到到达那些点 思路:首先缩点 每一个强连通分量里面的点都是可达的  缩点后的图是有向无环图 如果从0这个强连通分量可以出去到2个强连通分量 那么这两个强连通分量是不可能相互可达 所以可行的方案就是所有的强连通分量...
分类:其他好文   时间:2014-06-11 00:50:25    阅读次数:242
[leetcode]Divide Two Integers @ Python
原题地址:https://oj.leetcode.com/problems/divide-two-integers/题意:Divide two integers without using multiplication, division and mod operator.解题思路:不许用乘、除和求...
分类:编程语言   时间:2014-06-10 21:43:00    阅读次数:267
[leetcode]Container With Most Water @ Python
原题地址:https://oj.leetcode.com/problems/container-with-most-water/题意:Givennnon-negative integersa1,a2, ...,an, where each represents a point at coordina...
分类:编程语言   时间:2014-06-10 20:05:44    阅读次数:213
[LeetCode OJ] Single Number之二 ——Given an array of integers, every element appears THREE times except for one. Find that single one.
1 class Solution { 2 public: 3 int singleNumber(int A[], int n) { 4 int bits = sizeof(int)*8; 5 int result=0; 6 for(int i...
分类:移动开发   时间:2014-06-10 19:45:48    阅读次数:334
[leetcode]Roman to Integer @ Python
原题地址:https://oj.leetcode.com/problems/roman-to-integer/题意:Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range f...
分类:编程语言   时间:2014-06-10 19:34:10    阅读次数:255
[leetcode]Palindrome Number @ Python
原题地址:https://oj.leetcode.com/problems/palindrome-number/题意:Determine whether an integer is a palindrome. Do this without extra space.click to show spo...
分类:编程语言   时间:2014-06-10 16:06:52    阅读次数:286
HDU1370(中国剩余定理)
昨天我仔细一想,发现自己之前的分类(用OJ来划分,毫无意义啊!)太失败了,所以我重新划分了一下大分类,在分到数论的时候,我就想起了中国剩余定理了,于是乎今天就刷了一题中国剩余定理的题目了,话说太久没作数学题,导致我连样例都调了好多次(在算逆元时候老是算错~烦恼!),好在提交时候是1A。 题目的意思就是:人有三个周期,记为p,e,i,周期天数分别为23,28,33,现在给定你三个时间a,b,c,和...
分类:其他好文   时间:2014-06-10 14:42:16    阅读次数:144
[LeetCode OJ] Single Number之一 ——Given an array of integers, every element appears twice except for one. Find that single one.
1 class Solution { 2 public: 3 int singleNumber(int A[], int n) { 4 int i,j; 5 for(i=0; i<n; i++) 6 { 7 for(j...
分类:移动开发   时间:2014-06-10 11:41:55    阅读次数:259
Leetcode OJ: Binary Tree Maximum Path Sum
Binary Tree Maximum Path SumGiven a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the be...
分类:其他好文   时间:2014-06-10 10:42:58    阅读次数:203
[LeetCode OJ] Candy
There areNchildren standing in a line. Each child is assigned a rating value.You are giving candies to these children subjected to the following requi...
分类:其他好文   时间:2014-06-10 00:35:47    阅读次数:246
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!