2022 HZNU Programing Contest for Sophomore Grade Group
A. Petr
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
n
2
...
Added by cookiemonster4470 on Sat, 05 Mar 2022 17:07:08 +0200
The first trial of HNUCM ladder competition
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
GDUT ACM2022 winter vacation training topic II D E (01 backpack)
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 ...
Added by Bijan on Sat, 12 Feb 2022 09:00:17 +0200
acwing-358. Island (base ring tree dp)
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
Codeforces 1547f array stabilization (GCD version)
Title Link: Array Stabilization (GCD version)
General meaning
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[1]) Finally, copy the new array b to the original array a
...
Added by john-iom on Wed, 19 Jan 2022 11:52:20 +0200
Algorithmic Learning-Backpack Problem
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:
f[i][j]=max(f[i-1][j],f[j-c[i]]+w[i]);
How do you understand that? Imagi ...
Added by dey.souvik007 on Tue, 11 Jan 2022 19:39:28 +0200
29 personal training summary
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
Bubble spitting problem solution
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
Title Description
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
Supplementary question record of the fifth session of Niuke multi school on July 31
B Boxes
Yes
n
n
n boxes, each box contains black ball, and the probability of white ball is
1
2
\displaystyle \frac{1}{2}
...
Added by mattcass on Sun, 02 Jan 2022 14:56:37 +0200
HRBU 2021 summer training problem solving report phase III Day2
catalogue
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
Meaning:
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