全部文章
题目: https://pintia.cn/problem-sets/1268384564738605056/problems/1271415149946912771 Given a stack which can keep M numbers at most. Push N numbers in ...
题目:https://pintia.cn/problem-sets/1268384564738605056/problems/1274008636207132672 给定两棵树T1和T2。如果T1可以通过若干次左右孩子互换就变成T2,则我们称两棵树是“同构”的。例如图1给出的两棵树就是同构的,因为我 ...
re.M|re.I 指的未或。其值与相加一样,即同时满足re.M 与 re.I。因为底层flag的数值相加与位或的值一样,如 re.M 的数值于re.I 的数值 line = "Cats are smarter than dogs" # .* 表示任意匹配除换行符(\n、\r)之外的任何单个或多个字 ...
64位整数乘法 [https://www.acwing.com/problem/content/92/] sol: 将 b 进行二进制拆分,就变成了计算$a*(20 + 21 + 2^2 +....) $,结合乘法分配律,对每一项进行相加,得到结果。 \(O(logN)\) LL mul(LL a, ...
//懒加载window.onload = function(){ var imgs = Array.from(document.querySelectorAll('img')); delay(); window.addEventListener('scroll', exec(delay, 4000) ...
app.vue <template> <div id="app"> <input type="text" v-model='todo' /> <button @click="doAdd()">+增加</button> <br> <hr> <br> <ul> <li v-for="(item,key) ...
题目: https://pintia.cn/problem-sets/1268384564738605056/problems/1274008636207132673 Given a tree, you are supposed to list all the leaves in the order ...
1.什么是机器学习 两个定义: the field of study that gives computers the ability to learn without being explicitly programmed." A computer program is said to learn ...
app.vue <template> <div id="app"> <input type="text" v-model='todo' @keydown="doAdd($event)" /> <br> <hr> <br> <h2>进行中</h2> <ul> <li v-for="(item,key) ...
题目: https://pintia.cn/problem-sets/1268384564738605056/problems/1268385944106778624 给定K个整数组成的序列{ N?1??, N?2??, ..., N?K?? },“连续子列”被定义为{ N?i??, N?i+1?? ...