海上月是天上月,眼前人是心上人。
发布于
2022-8-22
发布于
2022-8-14
发布于
2022-7-27
发布于
2022-7-5
发布于
2022-6-22
发布于
2022-6-12
发布于
2022-6-11
发布于
2022-5-25
摘要:
字典树定义:字典树,英文名 trie。顾名思义,就是一个像字典一样的树。 我们先看一下字典树的具体结构: 字典树用边来代表字母,从根节点到某一节点的路径代表一个字符串,例如 1-3-7便代表“ba”,结构是十分间接明了的,对于代码而言呢,我们可以定义一个二维数组来表示字典树:t[][]; t[i][ 阅读全文
摘要:
用DecimalFormat类的实例化对象的format的方法,在DecimalFormat构造的时候将所需要的格式传进去; 具体代码为: 也可以for 循环定义 format 的数量 但是如果输出0.222222的小数点后2位,便会输出.22,这时候将 # 改为 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 阅读全文
摘要:
使用的测试代码: #include<bits/stdc++.h> using namespace std; struct node { int a,b; bool operator < (const node &e) const { return b > e.b; } }; int main() { 阅读全文
摘要:
A. 略 B.语法题 #include<iostream> #include<algorithm> #include<cstring> #include<map> #include<vector> #include<queue> #include<cmath> #include<set> #incl 阅读全文
摘要:
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 阅读全文
摘要:
转载于:https://blog.csdn.net/qq_61903556/article/details/123914801?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522165588867916782388025817%2522% 阅读全文
摘要:
题目: 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 阅读全文
摘要:
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轴)的一个节点,而 阅读全文