each

20190708三人开黑CF模拟赛

こ雲淡風輕ζ 提交于 2020-02-07 22:34:30
7月8号晚上8点和两位巨佬开了一场虚拟cf: [ Helvetic Coding Contest 2018 online mirror (teams allowed, unrated) ] 我这么 蔡 ,只AC了A2、C1、C2、E1(被巨佬吊打) 我就说一下我写的几道题吧: A2. Death Stars (medium) The stardate is 1983, and Princess Heidi is getting better at detecting the Death Stars. This time, two Rebel spies have yet again given Heidi two maps with the possible locations of the Death Star. Since she got rid of all double agents last time, she knows that both maps are correct, and indeed show the map of the solar system that contains the Death Star. However, this time the Empire has hidden the Death Star very well, and

k60驱动代码学习(5)

匆匆过客 提交于 2020-02-07 19:55:40
//systick 记时,延时 # include "include.h" # include "MK60_SYSTICK.h" # define EACH_PER_MS 25 //每隔 25 ms 中断一次 systick 定时器是24位向下计数的定时器 最大装载值16777215 / 600 000 000= 0.2796 最大计时27ms struct time { uint32_t fac_us ; //us分频系数 uint32_t fac_ms ; //ms分频系数 volatile uint32_t millisecond ; //ms uint64_t microsecond ; //us uint8_t ms_per_tick ; //1ms多少systick计数次数 } timer ; /*LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL 【作 者】LQ-005 【功能说明】初始化systick计数器 【软件版本】V1.0 【最后更新】2019年03月12日 【返回值】无 【参数值】无 【例子 】systime.init(); //开启systick定时器 QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ*/

Codeforces Round #318 div2

浪尽此生 提交于 2020-02-07 07:18:27
每天一套AK div2 计划开始了。。。 A. Bear and Elections time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Limak is a grizzly bear who desires power and adoration. He wants to win in upcoming elections and rule over the Bearland. There are n candidates, including Limak. We know how many citizens are going to vote for each candidate. Now i -th candidate would get a i votes. Limak is candidate number 1. To win in elections, he must get strictly more votes than any other candidate. Victory is more important than everything else so Limak decided to

Watir: How to retrieve all HTML elements that match an attribute? (class, id, title, etc)

我与影子孤独终老i 提交于 2020-02-07 01:47:08
问题 I have a page that is dynamically created and displays a list of products with their prices. Since it's dynamic, the same code is reused to create each product's information, so they share the tags and same classes. For instance: <div class="product"> <div class="name">Product A</div> <div class="details"> <span class="description">Description A goes here...</span> <span class="price">$ 180.00</span> </div> </div> <div class="product"> <div class="name">Product B</div> <div class="details">

for each in for in for of

China☆狼群 提交于 2020-02-06 04:07:03
for each...in 使用一个变量迭代一个对象的所有属性值,对于每一个属性值,有一个指定的语句块被执行. for each...in 是 ECMA-357 (E4X) 标准的一部分, 大部分非Mozilla浏览器都没有实现该标准, E4X并不是 ECMAScript 标准的一部分. 作为ECMA-357( E4X )标准的一部分,for each...in语句已被废弃,E4X中的大部分特性已被删除,但考虑到向后兼容,for each...in只会被禁用而不会被删除,可以使用ES6中新的 for...of 语句来代替. 语法: 1 2 3 for each (variable in object) { statement }    参数: variable 用来遍历属性值的变量,前面的 var 关键字是可选的.该变量是函数的局部变量而不是语句块的局部变量. object 该对象的属性值会被遍历. statement 遍历属性值时执行的语句. 如果想要执行多条语句, 请用( { ... } ) 将多条语句括住. 一些对象的内置属性是无法被遍历到的,包括所有的内置方法,例如String对象的 indexOf 方法.不过,大部分的用户自定义属性都是可遍历的. 警告: 永远不要使用for each...in语句遍历数组,仅用来遍历常规对象。 for...in

GreenPlum 配置参数设置

廉价感情. 提交于 2020-02-05 04:26:05
-------------------------------------------------MASTER SHOW ALL------------------------------------------------------ =# show all; name | setting | description ------------------------------------------------------+----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------- add_missing_from | off | Automatically adds missing table references to FROM clauses. application_name | psql | Sets the

jQuery---each方法

北城以北 提交于 2020-02-04 17:41:11
each方法 each方法 //each方法 $("li").each(function (index, element) { $(element).css("opacity", (index + 1) / 10); }) for循环方法 for (var i = 0; i < $("li").length; i++) { $("li").eq(i).css("opacity", (i + 1) / 10); } 来源: https://www.cnblogs.com/jane-panyiyun/p/12259913.html

第一天:树与并查集

眉间皱痕 提交于 2020-02-04 01:53:33
一、树   1、概念     根和深度     儿子父亲子树森林     叶子:没有儿子的节点     爸爸:父亲的父亲  2、 两点距离最短时过其公共祖先  3、任意两点之间加一条线变成一个环  4、直径:最远两点的路径     任取点P,搜索到P距离最远的Q,再搜索离Q最远的W,直径为QW(证明) 二、二叉树     1、 左右儿子,左右子树,    2、前序遍历:根,左子树,右子树      中序遍历:左,根,右    后序遍历:左,右,根       给两种求第三种     3、满二叉树 2^n-1个节点,最大深度为n      完全二叉树:若设二叉树的深度为h,除第 h 层外,其它各层 (1~h-1) 的结点到最大个数,第 h 层所有的结点都连续集中在最左边,这就是完全二叉树。 三、并查集   路径压缩 测验 题目: 2003年4月16日,世界卫生组织根据包括中国内地和香港地区,加拿大、美国在内的11个国家和地区的13个实验室通力合作研究的结果,宣布重症急性呼吸综合征的病因是一种新型的冠状病毒,称为SARS冠状病毒。 很不幸,小明同学昨天晚上被确诊以经感染非典病毒,为此,校医院需要对他隔离治疗并隔离观察与他直接或间接接触者。 可以认为,同一个社团内如果有人感染病毒或可能感染病毒,那么这个社团内所有人都被认为是可能已经感染了病毒,由于时间紧迫

SIT103 – Data and Information Management

血红的双手。 提交于 2020-02-04 00:13:00
SIT103 – Data and Information Management Assignment 2 Due Date - 11.59 PM on 17 May 2019 Database for Movie Lover Company Total mark of the assignment: 100 (20% of the final unit assessment). Late Submission and Extension Policy All students MUST submit an assignment on the due date, whether it is completed or not. Students who have just cause may email your lecturer and apply for an extension BEFORE the due date unless they are hospitalised or there are extenuating circumstances that prevent this. All applications must be accompanied by documentary evidence of the disadvantage causing this

Suffix Automaton

﹥>﹥吖頭↗ 提交于 2020-02-03 00:10:17
Suffix Automaton A suffix automaton is a powerful data structure that allows solving many string-related problems. For example, you can search for all occurrences of one string in another, or count the amount of different substrings of a given string. Both tasks can be solved in linear time with the help of a suffix automaton. Intuitively a suffix automaton can be understood as compressed form of all substrings of a given string. An impressive fact is, that the suffix automaton contains all this information in a highly compressed form. For a string of length \(n\) it only requires \(O(n)\)