from turtle import * def draw(r): begin_fill() for i in range(5): forward(r) right(144) end_fill() def mygoto(x, y): up() goto(x, y) down() setup(... ...
分类:
编程语言 时间:
2018-03-15 00:34:38
阅读次数:
201
#coding=utf-8 # arrow(海龟箭头);turtle(实心箭头);circle(实心方形箭头);square(粗大箭头2);triangle(classic) from turtle import * def position(x,y): up() goto(x,y) down() ... ...
分类:
编程语言 时间:
2018-03-14 23:46:15
阅读次数:
609
【题意】给定长度为n的排列,m次询问区间[L,R]的最长连续值域。n<=50000。 【算法】莫队算法 【题解】考虑莫队维护增加一个数的信息:设up[x]表示数值x往上延伸的最大长度,down[x]表示数值x往下延伸的最大长度。 增加一个数x时,up[x]=up[x+1]+1,down[x]=dow ...
分类:
编程语言 时间:
2018-03-14 19:40:14
阅读次数:
202
Problem Statement Dolphin resides in two-dimensional Cartesian plane, with the positive x-axis pointing right and the positive y-axis pointing up.Curr ...
分类:
其他好文 时间:
2018-03-13 21:08:25
阅读次数:
184
其实很简单,是因为 中断不仅仅需要 gpio 的 input 属性, 还需要 pull_up 的数据 配置如上 ...
分类:
其他好文 时间:
2018-03-12 21:06:38
阅读次数:
188
该状态持续很久,访问该服务也返回错误,但在注册中心界面,该服务却一直存在,且为UP状态,并且在大约十分钟后,出现一行红色大字:EMERGENCY! EUREKA MAY BE INCORRECTLY CLAIMING INSTANCES ARE UP WHEN THEY'RE NOT. RENEWA ...
分类:
编程语言 时间:
2018-03-11 22:28:46
阅读次数:
354
[抄题]: Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given ...
分类:
其他好文 时间:
2018-03-11 14:15:02
阅读次数:
124
The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the elev ...
分类:
其他好文 时间:
2018-03-11 11:57:43
阅读次数:
150
在开发中时不时会用到这个需求,比如要放置一个宠物在身边,但是不能在自己身上。一个简单的方法Vector3pos=Vector3.zero;intangle=Random.Range(0,360);Vector3range=Quaternion.AngleAxis(angle,Vector3.up)*Vector3.back*1.5f;pos=pos+range;同理,如果想做一个跟随功能,就是离角
分类:
编程语言 时间:
2018-03-11 00:17:35
阅读次数:
168
Mr. Fib is a mathematics teacher of a primary school. In the next lesson, he is planning to teach children how to add numbers up. Before the class, he ...
分类:
其他好文 时间:
2018-03-10 22:13:18
阅读次数:
361