ICode9

精准搜索请尝试: 精确搜索
  • [python]-SimpleITK模块-医学影像标注nii.gz文件的读取与保存2022-09-16 11:04:24

    SimpleITK模块以多种语言为 ITK 提供简化的接口,支持Python、R、Java、C#、Lua、Ruby、TCL 和 C++ 中的开源多维图像分析,由 Insight Toolkit 社区为生物医学科学及其他领域开发。 官方文档链接:https://simpleitk.org/# 在实际使用中,医学影像标注nii.gz文件的读取与保存用它比较方便

  • STL再回顾(非常见知识点)2022-09-11 23:33:49

    目录为人熟知的pair类型再谈STL迭代器的使用常用的STL容器顺序容器vector(向量)构造方式拥有的常用的成员函数(java人称方法)string构造方式成员函数dequelist关联容器set/multiset优点成员函数集合的交集,并集,差集map/multimapmap/multimap的区别主要的成员函数适配器容器概述stackq

  • k8s配置harbor密钥2022-09-06 12:34:19

    目录一、简介二、k8s解决方案三、参考 一、简介 1、Kubernetes在拉取私服(Harbor)镜像时,经常出现问题,导致ImagePullBackOff,通过desicribe查看pod发现没有pull权限所致。 2、首先,不要寄望于~/.docker/config.json。与Docker Swarm不同,Kubernetes不会使用这里的配置来pull。 二、k8s

  • PAT_A 1037 Magic Coupon2022-09-04 23:31:52

    PAT_A 1037 Magic Coupon 分析 尽量增大总回报值即可得到结果。 PAT_A 1037 Magic Coupon 题目的描述 The magic shop in Mars is offering some magic coupons. Each coupon has an integer N printed on it, meaning that when you use this coupon with a product, you may get

  • CF1702G2 Passable Paths (hard version)2022-09-04 21:01:21

    Passable Paths (hard version) 给出一棵大小为 \(n\) 的树,\(q\) 次询问,每次给出一大小为 \(m\) 的点集,判断是否存在一条链覆盖这些点,注意这条链可以经过其他点。\(n,\sum m \leq 2\times 10^5\) ,\(q \leq 10^5\)。 SOLUTION1: 虚树 由于 \(q\) 次询问的 \(\sum m \le 2 \times 1

  • CSP-S模拟2(联考) 谜之阶乘 子集 混凝土粉末 排水系统2022-09-04 17:00:45

    rank 40 40多分? T1:暴力;T2:构造 T2:构造出(1--n)的连续整数分成k组,每组的数加起来一样。(n<=1e6) 只要能实现一种构造方案,使得3k个连续数字分k组可以达到(a+b+c)相同(或2k,很显然) 构造方法: 1 8 15 2 9 13 3 10 11 4 6 14 5 7 12 很玄学,积累下来吧? 点击查看代码 #include<bits/std

  • MathProblem 79 Three humans, three monkeys, and a boat problem2022-09-03 05:00:35

    One one side of a river are three humans, one big monkey, two small monkeys, and one boat. Each of the humans and the big monkey are strong enough to row the boat. The boat can fit one or two bodies (regardless of size). If at any time at either side of t

  • 【题解】「COCI 2018.10」Teoretičar2022-09-03 00:04:10

    传送门 题目大意 有一个二分图,构造一种对边的染色方案,使得没有两个颜色相同的边共顶点。 假设对于给定二分图的答案是 \(C\),记 \(X\) 是大于等于 \(C\) 的最小的 \(2\) 的整次幂,你只需要给出一个方案,使得颜色数量不多于 \(X\)。 \(L, R\le 10^5, m\le 5\times 10^5\) 题解 设度数

  • C++之常用的算法2022-09-01 18:31:30

    C++之常用的算法 1 函数对象 重载函数调用运算符的类,其对象称为函数对象。 一元仿函数 / 二元仿函数(根据参数个数判定) class MyPrint { public: void operator() (int num) { cout << "num = " << num << endl; } }; void test01() { MyPrint myPrint; myPrint(2); // 仿

  • LC1672022-09-01 12:01:41

    vector<int> twoSum(vector<int>& nums, int target) { int l=0; int r=nums.size()-1; vector<int> ans; while(l<r){ if(nums[l]+nums[r]>target){ r--; }else if(nums[l]+nums[r]==target){

  • ac802 区间和2022-08-31 22:05:44

    注意 >> 的运算顺序在加减之后 #include<bits/stdc++.h> using namespace std; const int N = 300010;// int n, m; int a[N];//坐标插入的值 int s[N];//a数组的前缀和 vector<int> alls;//所有查询和和插入的坐标 vector<pair<int, int>> add,

  • 递归详解2022-08-31 13:00:08

    递归详解 在计算机科学领域, 递归是用于处理一类具有相同子问题处理方式的问题; 是数学归纳法, 数学递推公式在计算机中的应用 The power of recursion evidently lies in the possibility of defining an infinite set of objects by a finite statement. In the same manner, a

  • LeetCode 1472. Design Browser History2022-08-22 03:00:18

    原题链接在这里:https://leetcode.com/problems/design-browser-history/ 题目: You have a browser of one tab where you start on the homepage and you can visit another url, get back in the history number of steps or move forward in the history number of step

  • osg学习-2《绘制基本单元》2022-08-21 10:37:35

    上一篇演示了基本四边形的绘制,这一篇是共享顶点的方法,通过索引绘制顶点和颜色。 为了便于理解特意在ppt中绘制了顶点的坐标位置,5个顶点,绘制了一个四边形和三角形,其中有2个共享顶点定义了4中颜色,有一个颜色共享。 分别测试按顶点渲染和按图元渲染。 直接放效果  需要注意的是 

  • osg学习-6《显示三维矩阵》2022-08-21 10:37:15

    在三维空间显示三维矩阵,需要显示它的6个外表面。假设xyz三个方向的维数是ni,nj,nk,三个方向的顶点维数是ni+1,nj+1, nk+1。在每个面上分别绘制各自的四边形。每个四边形的颜色根据矩阵的值获取,这个例子采用了离散的数值。使用了之前创建的颜色模板类。   void DrawShape::drawDisMode

  • 56. 合并区间2022-08-20 23:32:58

    56. 合并区间 以数组 intervals 表示若干个区间的集合,其中单个区间为 intervals[i] = [starti, endi] 。请你合并所有重叠的区间,并返回 一个不重叠的区间数组,该数组需恰好覆盖输入中的所有区间 。   示例 1: 输入:intervals = [[1,3],[2,6],[8,10],[15,18]] 输出:[[1,6],[8,10]

  • [AcWing 1118] 分成互质组2022-08-17 18:03:21

    DFS 点击查看代码 #include<bits/stdc++.h> using namespace std; typedef long long LL; const int N = 50 + 10; int n; int a[N]; int len, ans = 1e9; vector<int> g[N]; // 判断数字y能否放到第k组 bool inline check(int k, int y) { for (auto& x : g[k])

  • 239.sliding-window-maxium 滑动窗口最大值2022-08-16 22:05:36

    采用双端队列deque,并且保证deque从前往后依次递减,并且出现在deque里面的相邻两数,其在原滑动窗口中,两数中间的数一定比这两个数小。为了保证这一点,在push_back()时,如果deque.back()小于要push_back()的数,则执行pop_back(),直到deque为空或者不小于为止。 #include <deque> #include

  • 高精度a+b2022-08-16 13:00:26

    高精度a+b acwing3596.a+b 存在vector< int >中去,倒着存,低位在前,高位在后 代码 #include<iostream> #include<vector> #include<cstring> using namespace std; vector<int> add(vector<int>& A,vector<int>& B) { vector<int>

  • 49. 字母异位词分组2022-08-15 19:30:39

    49. 字母异位词分组 给你一个字符串数组,请你将 字母异位词 组合在一起。可以按任意顺序返回结果列表。 字母异位词 是由重新排列源单词的字母得到的一个新单词,所有源单词中的字母通常恰好只用一次。   示例 1: 输入: strs = ["eat", "tea", "tan", "ate", "nat", "bat"] 输出:

  • mongodb 备份与迁移2022-08-14 01:01:36

    从一台服务器迁移到另一台: 数据导出: ./bin/mongoexport -h 127.0.0.1 -u root -p ****** --port 27017 --authenticationDatabase admin -d databaseName -c collectionName -o ./back/collectionName.dat 数据导入: ./bin/mongoimport -h 127.0.0.1 -u root -p ****** --port 27

  • 牛客小白月赛542022-08-12 22:31:09

    牛客小白月赛54 https://ac.nowcoder.com/acm/contest/38457#question 题意不用说,因为是中文,自己看就得了 感觉这次比上回难点 EF 待补 A - Sum 最容易想到的思路就是拿个堆,每次找最大的两个数相加。但是这么做复杂度暴了(我不会算)。 考虑优化一下。先排个序,每次贪心的选最大的两个

  • 力扣-22-括号生成2022-08-08 14:31:09

    直达链接 之前好像也有一道括号的题,力扣-20-有效的括号,给的标签是“栈”,不过这次的标签是“动态规划”和“回溯法”了 返回所有可能结果,一看就是回溯了,但是我好像一直没完全搞明白过 class Solution { public: void backtrack(vector<string>& ans, string& cur, int open, int

  • LeetCode 797 All Paths From Source to Target 回溯2022-08-07 03:30:25

    Given a directed acyclic graph (DAG) of n nodes labeled from 0 to n - 1, find all possible paths from node 0 to node n - 1 and return them in any order. The graph is given as follows: graph[i] is a list of all nodes you can visit from node \(i\) (i.e.,

  • 20_傅里叶变换2022-08-03 12:00:43

    # 3. 傅里叶变换 import numpy as np import cv2 from matplotlib import pyplot as plt img = cv2.imread('D:/pycharm/pycharm-cope/opencv/resource/photo/13_Lena.jpg',0) img_float = np.float32(img) # 输入图片转换成 np.float32 格式 dft = cv2.dft(img_float, flags =

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有