Meaning: Given a string S, ask how many kinds of substrings start with stat string and end with end string. If they are exactly the same, they are regarded as one. Solution: Considering double hash, judging the equality of strings by hash value can achieve
Added by cookiemonster4470 on Sat, 05 Mar 2022 17:07:08 +0200
A: Color overlay
Title Description Kimi, who loves science, has been studying various colors. Today he plans to do a small experiment on color superposition. Kimi has many blue and yellow rectangular transparent plastic cards. As we all know, if blue and yellow are mixed together, they will turn green. Therefore, Kimi can see green by look ...
Added by bigbob on Fri, 04 Mar 2022 17:07:07 +0200
For a better reading experience, please go to: Paxton's little broken station
1, 01 Backpack
01 backpack is to take out several items from M items and put them in a backpack with space W. the volume of each item is W1, W2 to Wn, and the corresponding value is P1,P2 to Pn. 01 knapsack is the simplest problem in knapsack problem. 01 the ...
You are going to visit a park, which is composed of N islands. The local management department has built a bridge from each island to another island. You can walk in both directions without crossing the bridge.
At the same time, there is a dedicated ferry between each pair of islands.
You prefer walking to taking a boat.
You want the total l ...
Added by Gary Tactic on Wed, 02 Feb 2022 22:49:04 +0200
Title Link: Array Stabilization (GCD version)
Given an array of length n, the subscripts are from 1 to n. where an and a1 are connected (form a ring)
Each round of operation yields a new array b: for all I ∈ [1, n], b[i] = gcd(a[i], a[i + 1]) (b[n] = gcd(a[n], a) Finally, copy the new array b to the original array a
Added by john-iom on Wed, 19 Jan 2022 11:52:20 +0200
1.01 Backpack Problem There are N items and a V-pack. The cost of putting item I is c[i], and the value is w[i]. Seek which items to put in your backpack to maximize the total value. The two-dimensional dynamic equation for the 01 knapsack problem is given directly:
How do you understand that? Imagi ...
Added by dey.souvik007 on Tue, 11 Jan 2022 19:39:28 +0200
I went to the hospital in the afternoon. I could only finish the sign in question of the competition over there. It's really uncomfortable that I can't do two questions without making up and solving them now
codeforce 1551 B2 title link: Click here to transfer
Meaning: give n elements and their numbers, as well as the types and numbers of pig ...
Added by cloudzilla on Wed, 05 Jan 2022 02:53:03 +0200
Link: https://ac.nowcoder.com/acm/problem/15029?&headNav=acm Source: niuke.com Time limit: 1 second for C / C + + and 2 seconds for other languages Space limitation: C/C++ 32768K, other languages 65536K 64bit IO Format: %lld
The little fish spit bubbles and come out. Small fish will spit out two kinds of bubbles: big bub ...
Added by linfidel on Mon, 03 Jan 2022 20:27:31 +0200
A - Jessica's Reading Problem
B - Bound Found
C - Subsequence
D - Tallest Cow
E - Straight Master
F - very male and female
G - rectangle A + B
A - Jessica's Reading Problem
Jessica Huang is facing the severe challenge of the final exam. She usually doesn't listen carefully, but a boy who pursues her helped her draw ...
Added by rahish on Thu, 30 Dec 2021 20:11:02 +0200