5-Java common tool classes - set sorting

There are two ways to sort in the Java tool class: java.util.Collections.sort(java.util.List) java.util.Collections.sort(java.util.List, java.util.Comparator) package cn.mtianyan.sort; public class Cat implements Comparable{ private String name; //Name private int month; //Age private String species;//Varieties @O ...

Posted by [PQ3]RogeR on Sat, 04 Jan 2020 23:08:11 -0800

Java RSA asymmetric encryption

Android RSA asymmetric encryption What is Rsa encryption RSA algorithm is the most popular public key cryptography algorithm, which uses keys with variable length. RSA is the first algorithm that can be used for both data encryption and digital signature. The principle of RSA algorithm is as follows: 1. Randomly select t ...

Posted by phynias on Sat, 04 Jan 2020 17:15:48 -0800

Common methods of JS array

I. array 1,function(value, index, array) {} [Format: function (value, index, array) => { // value The value of the index group's current traversal, index The subscript of the index group's current traversal, array Refers to the current array // ... Custom function behavior // return ...; }   2,Array.map(function() {}) Return v ...

Posted by migmedia on Sat, 04 Jan 2020 16:45:21 -0800

AES encrypted files supporting Android 7.0

Reprint by jqorz Source: https://blog.csdn.net/baidu_27419681/article/details/81587232 Originally, I have sorted out a method for Android to encrypt files using AES. See AES encryption / decryption available on Android has been directly encapsulated as file encryption , but when it is used recently, it is found that the ...

Posted by tonyk11 on Sat, 04 Jan 2020 15:59:57 -0800

Block entry bzoj2141 queue

To infinity and beyond. -<Wall-E>   First of all, we can use the discretization + tree array to calculate the time complexity (n log n) of the number of reverse order pairs For questions about the reverse order pair, we can first think of the characteristics of the reverse order pair: Then for each inquiry (x,y) (x &lt ...

Posted by priya_cks on Sat, 04 Jan 2020 09:29:16 -0800

java programming exercise 3

[procedure 11] Title: there are four numbers: 1, 2, 3 and 4. How many three digits can be composed of different numbers without repetition? How many are they? public class Test11 { public static void main(String[] args) { int count = 0; for (int x = 1; x < 5; x++) { for (int y = 1; y &l ...

Posted by coja1 on Sat, 04 Jan 2020 07:58:55 -0800

Algorithms Note 13 - String Sorting

Key Index Count frequency count Convert Frequency to Index data classification Writeback Low-bit-first string ordering High-bit-first string ordering Many important and familiar issues are string-based, such as information processing (searching web pages, documents based on a given keyword), communication systems (sending text messages, e- ...

Posted by JayBlake on Sat, 04 Jan 2020 06:47:02 -0800

codeforces 1017D. The Wu thought

link The meaning of the question is relatively simple. For two N-long strings s,t, they will match and produce "Wu" according to the following rules. The rules are as follows: if si == ti : res += wi; There will be a synthesis. Then the question is to give you m strings of length N and Q questions. For each quest ...

Posted by Carth on Sat, 04 Jan 2020 05:48:08 -0800

Insertion, search and traversal of binary search tree (c/c + +)

The establishment of binary search tree The establishment of binary search tree is to insert elements into the binary tree. When the first element is inserted, the binary search tree is an empty tree, which directly applies for a memory space to put the elements into the tree. When the elements are inserted again, the comparis ...

Posted by kpzani on Sat, 04 Jan 2020 05:04:20 -0800

[solution] CH4401 (bzoj2724) dandelion block + discretization

subject Title Link To find the interval mode #include<cstdio> #include<algorithm> #include<cstring> #include<cmath> using namespace std; const int N=4e4+10; int n,m,t,len,sz,ans,L,R,cnt,num; int a[N],b[N],F[N],st[40],ed[40],c[40][40][N],f[40][40],d[40][40]; //c[i][j][k]Represents an interval whose ...

Posted by BinaryDragon on Sat, 04 Jan 2020 00:00:07 -0800