[Leetcode]5970. Maximum number of employees attending the meeting

[Title Description] Force bucklehttps://leetcode-cn.com/problems/maximum-employees-to-be-invited-to-a-meeting/ A company is going to organize a meeting with n# employees on the invitation list. The company has prepared a round table for any number of employees. Employee numbers are 0} to n - 1. Each employee has an employee who likes ๏ผŒ and ...

Added by dhope on Sun, 02 Jan 2022 20:42:01 +0200

Data structure -- LeetCode special exercise Day3

350. Intersection of two arrays II Given two arrays, write a function to calculate their intersection. Example 1: Input: nums1 = [1,2,2,1], nums2 = [2,2] Output: [2,2] Example 2: Input: nums1 = [4,9,5], nums2 = [9,4,9,8,4] Output: [4,9] ย  explain: The number of occurrences of each element in the output result shall be consistent with the m ...

Added by LoStEdeN on Fri, 31 Dec 2021 03:22:10 +0200

2021 scuacm training team winter selection 2 most questions

Portal I was at the end of the preview course, but I still couldn't help writing a set of questions A Check in. How many digits of the number are 9. #include <bits/stdc++.h> using namespace std; typedef long long LL; #define rep(i,a,b) for(int i = (a);i <= (b);++i) #define re_(i,a,b) for(int i = (a);i < (b);++i) #define dwn(i,a, ...

Added by Angerslave on Tue, 28 Dec 2021 03:50:16 +0200

USACO 2011 Nov. [Bronze] P4. Cow Beauty Pageant

Original address: http://www.usaco.org/index.php?page=viewproblem2&cpid=87 Title Description Hearing that the latest fashion trend was cows with two spots on their hides, Farmer John has purchased an entire herd of two-spot cows. Unfortunately, fashion trends tend to change quickly, and the most popular current fashion is cows with only on ...

Added by dayo on Tue, 28 Dec 2021 00:30:35 +0200

[JAVA] find the number between two adjacent numbers in the number sequence (Pro20211203) (IndexTree / DP)

subject N people of different heights stand in a row at certain intervals. Everyone monitors whether the people they can see are doing other things according to the following rules. Rule: no one can be taller than me between me and the i-th person I want to monitor, No one can be taller than the i-th person. For example, according to the ...

Added by Grimloch on Fri, 24 Dec 2021 16:55:56 +0200

โญ Introduction to algorithm โญ Queue monotone queue difficulty 02 - leetcode 1425 Restricted subsequence sum

๐Ÿ™‰ If you don't eat or drink, you must brush the questions ๐Ÿ™‰ C language free animation tutorial, punch in with me! ๐ŸŒž Daylight science C language ๐ŸŒž LeetCode is too hard? Look at the simple questions first! ๐Ÿงก 100 cases of introduction to C language ๐Ÿงก Difficult data structure? It doesn't exis ...

Added by cyprus on Wed, 22 Dec 2021 04:02:21 +0200

Knapsack problem (various categories)

Mainly write: 0-1 backpack, complete backpack (unlimited number of coins in change), multiple backpack (limited number of coins in change), fractional backpack 0-1 backpack: there are N items and a backpack with a capacity of V. each item can only be used once. The volume of article I is v[i], and the value is w[i]. Solve which items are loade ...

Added by Maracles on Tue, 21 Dec 2021 23:53:54 +0200

LeetCode best time to buy and sell stocks series summary

LeetCode best time to buy and sell stocks series summary This kind of dynamic programming is optimized from two-dimensional dynamic gauge to one-dimensional dynamic gauge. Greed can also be used in some problems. catalog: 121 the best time to buy and sell stocks 1 122 the best time to buy and sell stocks 2 123the best time to buy and sell st ...

Added by interactive on Tue, 21 Dec 2021 18:41:28 +0200

Atcoder beginer contest 215 problem solution (A-F)

AtCoder Beginner Contest 215 Problem solving (A-F) A. Your First Judge Main idea of the title: Determine whether the string is equal to " H e l l o , ...

Added by sycoj0ker on Mon, 20 Dec 2021 07:11:42 +0200

Dynamic programming of C + + algorithm

Simple dynamic programming Explanation: dynamic programming (DP) is effective in finding the optimal solutions of many overlapping subproblems. It recombines the problems into subproblems. In order to avoid solving these subproblems many times, their results are gradually calculated and saved, from the simple problem to the whole problem. Dyna ...

Added by DoomyCheese on Sat, 18 Dec 2021 15:54:42 +0200