すのはら荘春原庄的雪

Hi, Toretto!

You got to put the past behind you before you can move on.

  • 海上月是天上月,眼前人是心上人。
    自动机入门——字典树(Trie)

    摘要: 字典树定义:字典树,英文名 trie。顾名思义,就是一个像字典一样的树。 我们先看一下字典树的具体结构: 字典树用边来代表字母,从根节点到某一节点的路径代表一个字符串,例如 1-3-7便代表“ba”,结构是十分间接明了的,对于代码而言呢,我们可以定义一个二维数组来表示字典树:t[][]; t[i][

    java输出小数点后n位

    摘要: 用DecimalFormat类的实例化对象的format的方法,在DecimalFormat构造的时候将所需要的格式传进去; 具体代码为: 也可以for 循环定义 format 的数量 但是如果输出0.222222的小数点后2位,便会输出.22,这时候将 # 改为 0 即可,#可以理解为消除小数点前

    Codeforces Round #813 (Div. 2) A~C

    摘要: A. Wonderful Permutation You are given a permutation p1,p2,…,pnp1,p2,…,pn of length nn and a positive integer k≤nk≤n. In one operation you can choose

    c++ 结构体内置函数不同写法的不同效果

    摘要: 使用的测试代码: #include using namespace std; struct node { int a,b; bool operator < (const node &e) const { return b > e.b; } }; int main() {

    Codeforces Round #806 (Div. 4)

    摘要: A. 略 B.语法题 #include #include #include #include #include #include #include #include #incl

    The Third Problem

    摘要: You are given a permutation a1,a2,…,ana1,a2,…,an of integers from 00 to n−1n−1. Your task is to find how many permutations b1,b2,…,bnb1,b2,…,bn are si

    stl

    摘要: 转载于:https://blog.csdn.net/qq_61903556/article/details/123914801?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522165588867916782388025817%2522%

    Infected Tree

    摘要: 题目: Byteland is a beautiful land known because of its beautiful trees. Misha has found a binary tree with nn vertices, numbered from 11 to nn. A binar

    Codeforces Round #798 (Div. 2)A~C

    摘要: A.Lex String Kuznecov likes art, poetry, and music. And strings consisting of lowercase English letters. Recently, Kuznecov has found two strings, aa 

    二维线段树

    摘要: 关于二维的线段树,好像是有两种方法实现? 一种为每个一维节点做一个线段数,就是树套树,另一种是四叉的一维线段树。本人实属菜鸡,只记录了第一中方法。 第一种方法时间复杂度是log^2,空间复杂度是n*n*log^2,似乎也够用哈😀。 基本思想: 把第二维(即矩阵的y轴)看作一维(x轴)的一个节点,而

    摘要: 字典树定义:字典树,英文名 trie。顾名思义,就是一个像字典一样的树。 我们先看一下字典树的具体结构: 字典树用边来代表字母,从根节点到某一节点的路径代表一个字符串,例如 1-3-7便代表“ba”,结构是十分间接明了的,对于代码而言呢,我们可以定义一个二维数组来表示字典树:t[][]; t[i][ 阅读全文
    posted @ 2022-09-03 17:34 cbmango 阅读(309) 评论(1) 推荐(3) 编辑
    摘要: 用DecimalFormat类的实例化对象的format的方法,在DecimalFormat构造的时候将所需要的格式传进去; 具体代码为: 也可以for 循环定义 format 的数量 但是如果输出0.222222的小数点后2位,便会输出.22,这时候将 # 改为 0 即可,#可以理解为消除小数点前 阅读全文
    posted @ 2022-08-22 21:04 cbmango 阅读(66) 评论(0) 推荐(0) 编辑
    摘要: A. Wonderful Permutation You are given a permutation p1,p2,…,pnp1,p2,…,pn of length nn and a positive integer k≤nk≤n. In one operation you can choose 阅读全文
    posted @ 2022-08-14 00:50 cbmango 阅读(210) 评论(0) 推荐(0) 编辑
    摘要: 使用的测试代码: #include<bits/stdc++.h> using namespace std; struct node { int a,b; bool operator < (const node &e) const { return b > e.b; } }; int main() { 阅读全文
    posted @ 2022-07-27 20:14 cbmango 阅读(123) 评论(0) 推荐(0) 编辑
    摘要: A. 略 B.语法题 #include<iostream> #include<algorithm> #include<cstring> #include<map> #include<vector> #include<queue> #include<cmath> #include<set> #incl 阅读全文
    posted @ 2022-07-13 22:11 cbmango 阅读(56) 评论(1) 推荐(2) 编辑
    摘要: You are given a permutation a1,a2,…,ana1,a2,…,an of integers from 00 to n−1n−1. Your task is to find how many permutations b1,b2,…,bnb1,b2,…,bn are si 阅读全文
    posted @ 2022-07-05 10:25 cbmango 阅读(100) 评论(0) 推荐(0) 编辑
    摘要: 转载于:https://blog.csdn.net/qq_61903556/article/details/123914801?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522165588867916782388025817%2522% 阅读全文
    posted @ 2022-06-22 17:05 cbmango 阅读(117) 评论(0) 推荐(0) 编辑
    摘要: 题目: Byteland is a beautiful land known because of its beautiful trees. Misha has found a binary tree with nn vertices, numbered from 11 to nn. A binar 阅读全文
    posted @ 2022-06-12 00:19 cbmango 阅读(159) 评论(0) 推荐(1) 编辑
    摘要: A.Lex String Kuznecov likes art, poetry, and music. And strings consisting of lowercase English letters. Recently, Kuznecov has found two strings, aa  阅读全文
    posted @ 2022-06-11 23:23 cbmango 阅读(96) 评论(0) 推荐(0) 编辑
    摘要: 关于二维的线段树,好像是有两种方法实现? 一种为每个一维节点做一个线段数,就是树套树,另一种是四叉的一维线段树。本人实属菜鸡,只记录了第一中方法。 第一种方法时间复杂度是log^2,空间复杂度是n*n*log^2,似乎也够用哈😀。 基本思想: 把第二维(即矩阵的y轴)看作一维(x轴)的一个节点,而 阅读全文
    posted @ 2022-05-25 16:46 cbmango 阅读(205) 评论(0) 推荐(0) 编辑
    点击右上角即可分享
    微信分享提示