Tag:meaning of the title

  • Liquor – Divide into k equal subsets


    1. Topic: Given an integer array nums and a positive integer k, find out if it is possible to divide the array into k non-empty subsets whose sums are all equal. Example 1: Input: nums = [4, 3, 2, 3, 5, 2, 1], k = 4 output: True Explanation: It is possible to divide it […]

  • Network tumor 24 questions


    foreword I don't seem to know what to say(?) The network flow is numb     (1) P3358 Longest $k$ Multiple Interval Set Problem meaning of the title: Given $n$ left-closed and right-open intervals, select some intervals from these intervals, so that no point on the number line is contained by more than $k$ intervals, […]

  • Blue Bridge Cup algo-985 lucky shopkeeper (greedy)


    Test algorithm training lucky shopkeepers Resource constraints Time limit: 1.0s memory limit: 256.0mb Problem description Xuanxuan opened a store and sold only one product. XXX, XXX sold for n yuan. Interestingly, there are only notes with a face value of 3 powers in the world, that is, notes with only 1 yuan, 3 yuan, 9 […]

  • Codeforces Round #797 (Div. 3)


    The migrant workers were late from work, and there was only one hour left when they got home. After finishing the last two questions, they arrived at the midnight snack takeout, and the previous questions were cooed first. F. Shifting String meaning of the title Given a length of\(n\)String for\(s\)And a length of\(n\)Arrangement of\(p\)。 Defining […]

  • Purple book Chapter III exercises personal solutions


    Purple Book chap3 Although the exercises in the front of Chapter 3 are relatively simple, we can still accumulate some points that need to be paid attention to. We always plant holes in the format. The later exercises are a little more difficult, but fortunately, the amount of data is relatively small, and general violence […]

  • dichotomy


    Dichotomy Dichotomy as the name suggestsIn fact, I keep dividing things into two partsDichotomy has existed since ancient times The hammer of one foot is half taken by the day, and it will never be exhausted for all ages Dichotomy also has applications in mathematics, such as the existence theorem of zeros \(let y = […]

  • Best cattle fence and search section


    Because the two questions are similar, they are combined into one question solution ———– inscription Best cattle fence Idea: Dichotomous answerThe answer is the average How to check whether the answer meets the meaning of the question,Judge whether an interval satisfying the meaning of the question is > = this average valueGenerally, you can subtract […]

  • 2010 noip improvement group problem solution


    MT Use the queue to simulate the meaning of the question #include #include #include using namespace std; int n,m; int head=0,tail=0; int s[1100]; long long ans=0; bool book[1100]; int main(){ cin>>m>>n;memset(book,0,sizeof(book)); for(int i=1;i<=n;++i){ int a;cin>>a; if(book[a]==0){ s[++tail]=a; book[a]=1;// Join the team If (head + m < = tail) // leave the team book[s[head++]]=0; ++ans; } […]

  • 2021 Niuke summer multi school training camp 3


    2021 Niuke summer multi school training camp 3 A Guess and lies(to be) Meaning: Alice has a number y in 1 ~ n. let Bob guess. Each round, you can ask whether y is greater than or equal to X. Alice answers yes or no, but Alice can lie once. Now, for X (1 ~ […]

  • Niuke competition data structure special class tree array and line segment tree exercises


    Niuke competition data structure special class tree array and line segment tree exercises The author’s konjaku ability is limited, and can write a few lines [noip2012] borrow classroom Obviously, it is very consistent with the operation of line segment tree, but it needs to be selected whether it is interval sum, interval minimum or interval […]

  • 2021ccpc online game 8.28 problem solution


    2021ccpc online Online 1001、Cut The Wire Check in and think about it according to the meaning of the question Opening time: 0:05 Hand in time: 0:39 Problem: the hand speed is slow. Secondly, it is too complex to think about classification, but it can’t think clearly quickly #include using namespace std; typedef long long ll; […]

  • Niuke IOI weekly 28 popularity group


    Niuke IOI weekly 28 popularity group String Game Simple simulation, move the first to the end, move x no more than N, directly output from the X character, and then output the previous number Similarly, if there are more than n characters, every n characters moved is equivalent to the original string, so every time […]