码迷,mamicode.com
首页 >  
搜索关键字:翻牌 翻转    ( 2787个结果
Python tip 题目笔记
翻转字符串 x = '123456' y = x[::-1]给你一字典a,如a={1:1,2:2,3:3},输出字典a的key,以','链接,如‘1,2,3'。 print ','.join([str(i) for i in a])给你一个字符串 a, 输出字符奇数位置的字符...
分类:编程语言   时间:2014-11-04 14:28:00    阅读次数:237
Reverse Integer
Reverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321特殊:在32位机中,由于int的范围到该是-20亿到20亿之间,所以如果我们翻转一个数1912345678,就变成876543...
分类:其他好文   时间:2014-11-03 22:26:18    阅读次数:268
hdu - 4869 - Turn the pokers(组合数学 + 乘法逆元)
题意:m 张自牌,开始时全部正面朝下,翻转 n 次,每次翻转 xi 张牌,问最后的结果有多少种(0 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4869 ——>>假如最后有 a 张牌正面朝上,则它的结果有 C[m][a] 种(组合数),所以,只要求出最后可能有多少张牌正面朝上,再累加其组合数可行。。 1)求最后正面牌数的上下界; 2)以 2...
分类:其他好文   时间:2014-11-03 10:13:13    阅读次数:253
UVALIVE 3401 Colored Cubes
翻转立方体#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #...
分类:其他好文   时间:2014-11-02 22:25:11    阅读次数:244
HDU 4286 Data Handler --双端队列
题意:有一串数字,两个指针,然后一些添加,删除,反转,以及移动操作,最后输出序列。解法:可以splay做,但是其实双端队列更简便。维护三个双端队列LE,MI,RI分别表示[L,R]序列左边,[L,R]这段区间的值和[L,R]右边的值。然后维护一个revd标记表示[L,R]内的数是否被翻转了,翻转了的...
分类:其他好文   时间:2014-11-02 22:18:31    阅读次数:234
iOS的横屏(Landscape)与竖屏(Portrait)InterfaceOrientation
转自:http://www.molotang.com/articles/1530.html接着上篇写的触摸事件,这次借机会整理下iOS横屏和竖屏的翻转方向支持,即InterfaceOrientation相关的内容。最近做一个页面,最初并没有太多考虑orientation的情况,当其嵌入到一个在iPa...
分类:移动开发   时间:2014-11-02 18:04:38    阅读次数:253
【UVa】Palindromic Subsequence(dp+字典序)
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=465&page=show_problem&problem=2399最长的很简单,将串翻转过来后求两个串的lcs就是答案。。主要是字典序那里。。...
分类:其他好文   时间:2014-11-02 17:51:53    阅读次数:260
HDU 3487 splay区间翻转切割
Play with Chain Time Limit: 6000/2000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 3986    Accepted Submission(s): 1633 Problem Description YaoYao is fond...
分类:其他好文   时间:2014-11-01 16:21:04    阅读次数:190
HDU 1890 splay区间翻转
Robotic Sort Time Limit: 6000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2505    Accepted Submission(s): 1109 Problem Description Somewhere deep in...
分类:其他好文   时间:2014-11-01 16:19:04    阅读次数:222
翻转View
翻转View...
分类:其他好文   时间:2014-10-31 17:20:03    阅读次数:139
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!