DescriptionLike to delve into the problem of JS classmate, and recently fascinated by the encryption method of thinking. One day, he suddenly came up with what he thought was the ultimate encryption: to make a circle of information that needs to be encrypted, it is clear that they have many different ways of reading. For example, it can be read as:JSOI07 soi07j oi07js i07jso 07JSOI 7jsoi0 sort them by the size of the string: 07JSOI 7jsoi0 i07jso JSOI07 oi07js soi07j read the last column of chara
A hash is the conversion of the target text into an irreversible hash string (or message digest) of the same length, whereas encryption (Encrypt) converts the target text into a reversible cipher with different lengths. This article mainly introduces PHP commonly used hash encryption function, in the case of a detailed analysis of PHP hash encryption function usage, code with detailed comments, easy to understand, the need for friends can refer to,
Th
toN-1 DoInc (Wc[wd[i]); $ fori:=1 toM Dowc[i]:=wc[i-1]+Wc[i]; - fori:=n-1 Downto 0 Do - begin the Dec (wc[wd[i]]); -sa[wc[wd[i]]]:=Y[i];Wuyi End; the - fori:=0 toN Doswap (x[i],y[i]); Wu -p:=1; x[sa[0]]:=0; About fori:=1 toN-1 Do $ begin - ifCMP (sa[i-1],SA[I],J) Thenx[sa[i]]:=p-1 - Else beginX[sa[i]]:=p; Inc (P);End; - End; A +j:=j*2; them:=p; - End; $ End; the the the begin theAssign (input,'bzoj1031r.in'); Reset (input); -Assign (output,'Bzoj1031r
Because we're going to be poor here. The password includes 0-9,a-z,a-z a total of 62 characters, so we use 62 binary to traverse.First, we implement a 10 binary to 62 binary method. private static char[] CharSet = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ". ToCharArray (); private static string[] CharSet = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9",// "A", "B", "C", "D", "E", "F",
Description like to delve into the problem of JS classmate, and recently fascinated by the encryption method of thinking. One day, he suddenly came up with what he thought was the ultimate encryption: to make a circle of information that needs to be encrypted, it is clear that they have many different ways of reading. For example, it can be read as:JSOI07 soi07j oi07js i07jso 07JSOI 7jsoi0 sort them by the size of the string: 07JSOI 7jsoi0 i07jso JSOI07 oi07js soi07j read the last column of char
Mathematical. X^2% n = 1 (x+1) (x-1) = kn. Set x+1 = K1*n1, x-1=k2*n2. Then K1*k2=k, N1*n2=n. It is possible to calculate the approximate number of each greater than sqrt (n) and then make the N1,N2 attempt separately. Calculate x Be sure to take the mold. Otherwise 1 will become n+1. #include #include#include#include#includeusing namespacestd;Const intMAXN =100000+Ten;intRES[MAXN];intn,m,cnt;Long Longt,j;intMain () {CIN>> N; Cnt=0; if(n==1) {printf ("none\n");return 0;} M=(int) sqrt (n+0.5); f
Topic: Given a two-dimensional matrix, the sub-matrix of the a*b with the most occurrences is obtained.Two-dimensional hash, just remember that the vertical base can not be the same, love how to engage in how to doThe natural overflow result from the beginning of writing OLE thought it was a natural overflow was stuck out and then wrote a double modulo ... The result is still OLEFinally found that the problem read into the pit dad ... There are spaces in the string not to say, full of invisible
Test Instructions:LinkMethod:Permutation groupparsing:Quite a simple permutation group? But the first time was too two to think wrong. I thought I was going to just follow that sequence and get the power of the permutation group OK. The results found that I did not affect this many loops-it is not funny. So hurry back and ask for a loop. For each of the intra-cycle permutations, the water problem is followed.Code:#include #include #include #include #define Nusing namespace STD;intN,k;intA[n];int
The program task is to convert the genetic phonetic alphabet to 6 digits, we can use any well-remembered pinyin string, the transformation process is as follows, the first step, the string six a group of folding up, such as wangximing into: WangxiMingIn the second step, we want to add the ASCII value of all the characters perpendicular to the same position, and draw out 6 numbers, as the example above, then draw 228 202 206Then the number of each digit processing, that is, the number of each bit
Cipher
Time limit:1000 ms
Memory limit:10000 K
Total submissions:19228
Accepted:5148
DescriptionBob and Alice started to use a brand-new encoding scheme. surprisingly it is not a public key cryptosystem, but their encoding and decoding is based on secret keys. they chose the secret key at their last meeting in Philadelphia on February 16th, 1996. they chose as a secret key a sequence of N distinct integers, A1 ;.
Poj 1026 Cipher (replacement group)
Link: poj 1026
Given n integers (1-n) as keys, a string is given,
Evaluate the k-encoded string
Analysis: brute-force solving times out and can be solved using the knowledge of the replacement group.
Replacement group: a one-to-one transformation of a finite set is called replacement. A pair of replicas form a replacement group.
For a set a (a [1], a [2], a [3]... a [n ]),
(B [a [1], B [a [2], B [a [3]... B [a [n])
/////////////////////////////////////////////////////////////Author:stardicky//e-mail: [email protected]//qqnumber:9531511//Companyname:ezone International//class:hbs-0308//Title: Using dotnet Password system to ensure data security///////////////////////////////////////////////////////////////Note: A des symmetric encryption algorithm using one of the dotnet cipher Systems ensures data security/////////////////////////////////////////////////////////
("");return;} while(x>0) ch[++num]=x%Ten, x/=Ten; while(Num) Putchar (ch[num--]+ -); Puts ("");}//**************************************************************************************Chars[2*MAXN];intN;intSA[MAXN],RA[MAXN],TMP[MAXN],HEIGHT[MAXN];inttop[maxn+Ten];voidBuild_sa () {intm = -;//Maximum character value int*x = ra, *y = tmp;//x First keyword y backup//to sort a single character in cardinal order for(inti =0; I 0; for(inti =0; I ; for(inti =1; I 1]; for(inti = n1; I >=0; i
Topic: Given a string, the string of the last column after the string is sorted to the beginning of each character.Legend of the suffix array 0.0 last night DC3 did not understand, so wrote a multiplier 0.0 Mr. Luo's 25 lines of code is really abstract Qaq Konjac Konjac Express Understanding can not qaq so I wrote a relatively clear version QaqFirst, this is the ring, so we add the first n-1 character of the string to the end of the string and then the suffix array.After this, enumerate each beg
Topic Link Topic DescriptionLike to delve into the problem of JS classmate, and recently fascinated by the encryption method of thinking. One day, he suddenly came up with an encryption method he thought was the ultimate: In a circle of information that needs to be encrypted, it is clear that there are many different ways of reading them. For example, it can be read as:JSOI07 soi07j oi07js i07jso 07JSOI 7jsoi0 sort them by the size of the string: 07JSOI 7jsoi0 i07jso JSOI07 oi07js soi07j read th
This paper illustrates the method of generating random cipher by Python3, which has a wide range of practical value in Python programming. The specific methods are as follows:
This article mainly realizes the creation of 8-bit random password (uppercase and lowercase + digits), and uses Python3 to generate the random password of the primary algorithm.
The main functional code is as follows:
__author__ = ' Goopand '
import string
import random
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.