#后面写注释加上.0则自动作为float处理输出int:print"He‘s%dpoundsheavy."%my_weight输出String:print"He‘sgot%seyesand%shair."%(my_eyes,my_hair)Usethe%rfordebugging,sinceitdisplaysthe"raw"dataofthevariable,buttheothersareusedfordisplayingtousers.单引号和双引号都..
分类:
编程语言 时间:
2015-02-06 16:56:40
阅读次数:
130
http://www.mikeheijmans.com/2008/04/make-git-svn-work-on-mac-osx-tiger/After a few hours of googling and pull some hair out, I have finally figured ou...
分类:
系统相关 时间:
2015-01-10 12:25:37
阅读次数:
741
1660: [Usaco2006 Nov]Bad Hair Day 乱发节Time Limit:2 SecMemory Limit:64 MBSubmit:665Solved:318[Submit][Status]DescriptionInput* Line 1: 牛的数量 N。* Lines 2....
分类:
其他好文 时间:
2014-12-14 21:10:16
阅读次数:
173
gloss1音節gloss 発音記号/gl?s, gl???s|gl??s/音声を聞く【名詞】【不可算名詞】[また a gloss]1光沢,つや.用例 the gloss of silk 絹の光沢.a lovely gloss on her hair 彼女の髪の美しいつや. 2虚飾,見せかけ 〔of...
分类:
其他好文 时间:
2014-12-12 18:27:01
阅读次数:
272
my_name = 'Zed A. Shaw'my_age = 35 # not a liemy_height = 74 # inchesmy_weight = 180 # lbsmy_eyes = 'Blue'my_teeth = 'White'my_hair = 'Brown'print "Le...
分类:
其他好文 时间:
2014-10-21 23:05:05
阅读次数:
257
维护一个单调递减的栈 每次家进栈首的牛必定可以被其他栈里面的牛看到
#include
#include
using namespace std;
const int maxn = 80010;
typedef unsigned long long LL;
int a[maxn], s[maxn];
int main()
{
int n;
scanf("%d", &n);
for(int...
分类:
其他好文 时间:
2014-10-15 21:33:21
阅读次数:
161
题目地址:POJ 3250
初学单调栈。多校和网络赛已经碰到两次了。
单调栈的原理简单的不能再简单了。。就是让栈里的元素从栈顶到栈底呈单调性。
比如说递增单调栈。
每次放进一个数的时候,如果栈顶的数小于要放的数,就把栈顶的数pop出来使得栈里保持单调性。
对于这道题来说,就从右往左开始遍历,建一个递增单调栈。那么每次pop出来的就是当前的牛可以看到的牛数。然后累加即可。
代码如下:
...
分类:
其他好文 时间:
2014-09-23 01:13:53
阅读次数:
289
题目链接:http://poj.org/problem?id=3250思路分析: 题目要求求每头牛看见的牛的数量之和,即求每头牛被看见的次数和; 现在要求如何求出每头牛被看见的次数? 考虑到对于某头特定的牛来说,看见它的牛一定在它的左边,另外其高度应该大于该牛的高度,所...
分类:
其他好文 时间:
2014-09-22 02:39:31
阅读次数:
161
农民约翰的某N(1<=N<=80000)头奶牛正在过乱头发节!由于每头牛都意识到自己凌乱不堪的发型,约翰希望统计出能够看到其他牛的头发的牛的数量。
每一头牛i有一个高度hi(1<=hi<=`10^9`)...
分类:
其他好文 时间:
2014-09-10 14:01:40
阅读次数:
233
There cheap ghd hair straighteners has never been anyone else like you on the earth nor will there ever be again. And unless you are the identical twi...
分类:
其他好文 时间:
2014-09-02 15:27:04
阅读次数:
271