码迷,mamicode.com
首页 >  
搜索关键字:xor sum    ( 22663个结果
题解 hdu6810 Imperative Meeting
题解 hdu6810 Imperative Meeting 题目链接 题目描述 给定一棵 \(n\) 个点的树,每条边长度为 \(1\) ,定义点集 \(S\) 的函数 \(f(S)\) : \[ f(S)=\min_{u=1}^n(\sum_{v\in S}\mbox{dis}(u,v)) \] ...
分类:其他好文   时间:2021-01-20 11:59:02    阅读次数:0
numpy and pandas
1.numpy 1.1 利用numpy库中的array方法生成多维数组,存储数据,可以为1维,2维...n维 1.11 一维数组 import numpy as np \n np.array([1,2,3,4]) * 结果: 且该数组具有列表的特性,可切片,更改 1.12 多维数组 同样具有列表的所 ...
分类:其他好文   时间:2021-01-19 12:28:07    阅读次数:0
kafka初步使用
生产者 KafkaExtendProducer.send("topic","key","value"); 消费者 @Slf4j @RequiredArgsConstructor @Component public class ConsumerThread implements Runnable { ...
分类:其他好文   时间:2021-01-15 11:46:10    阅读次数:0
LeetCode938. 二叉搜索树的范围和
题目 1 class Solution { 2 public: 3 int sum = 0; 4 int rangeSumBST(TreeNode* root, int low, int high) { 5 dfs(root,low,high); 6 return sum; 7 } 8 void d ...
分类:其他好文   时间:2021-01-14 11:04:51    阅读次数:0
[Leetcode]1. Two Sum
题目描述 Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that eac ...
分类:其他好文   时间:2021-01-13 11:07:09    阅读次数:0
[SUCTF 2019]EasySQL
原文链接 -http://www.xianxianlabs.com/blog/2020/05/27/355.html ...
分类:数据库   时间:2021-01-13 10:30:39    阅读次数:0
P2486 [SDOI2011]染色
###链接 调了好久。。。 我平常写平衡树时 \(push\) \(tag\) 的操作都习惯把 \(rev\) 数组清零,但在 \(LCT\) 中不行,因为 \(rev\) 储存了节点间的父子关系,直接清零会改变树的结构。 \(\frak{code}\) #include<bits/stdc++.h ...
分类:其他好文   时间:2021-01-12 11:26:50    阅读次数:0
每日一题——228. 汇总区间
228. 汇总区间 分类: 数组 简单题,但是边界条件挺细节,特别是c++,还要额外注意int的边界,不然 nums[i] == nums[i-1] + 1会overflow class Solution { public: vector<string> summaryRanges(vector<i ...
分类:其他好文   时间:2021-01-12 11:07:54    阅读次数:0
CF1043E Solution
题目链接 题解 可以发现枚举两个在一组里的数会TLE,加之只有两个参数限制与数据范围,容易想到排序算法。 计算第$i$个人的分数和需要知道他在每一组里是$x$还是$y$,因此排序需要满足$a_i$前的数与$a_i$组合时为$x$更优,而$a_i$后的数与$a_i$组合时为$y$更优(反之亦可),也就 ...
分类:其他好文   时间:2021-01-12 11:02:49    阅读次数:0
CF1041E Solution
题目链接 题解 答案一定可以为一条链,因为对于答案树中的每个节点将其子节点从大到小排序放入链尾后依旧成立。 探讨限制条件:(1)$b$只能为$n$,因为$n$一定是它所在连通分量中的最大值。(2)设$cnt_i$表示$i$作为$a$出现的次数,则$\sum\limits_^icnt_j<i$,因为每 ...
分类:其他好文   时间:2021-01-12 11:02:30    阅读次数:0
22663条   上一页 1 ... 30 31 32 33 34 ... 2267 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!