当前位置:网站首页>11th week ACM training report
11th week ACM training report
2022-07-21 22:44:00 【Eloi0424】
Personal blog :Eloi- Still moving forward .
Catalog
21.12.13 Monday
21.12.14 Tuesday
21.12.15 Wednesday
21.12.16 Thursday
- Codeforces Round #761 (Div. 2)
- C. Paprika and Permutation
— Simple greed —
The question : Give you a sequence of numbers to pass mod x The operation turns it into n The whole arrangement
We can consider greedy algorithm
1-n Don't touch it , Of course, if there are duplicates, they will also enter the priority queue
The rest goes to the priority queue
Analysis is easy to know : The larger the number, the better the transformation is , Have a linear relationship
So then we judge from 1-n Whether the non-existent number in the queue can be determined by top Just convert
- C. Paprika and Permutation
21.12.17 Friday
- Educational Codeforces Round 119 (Rated for Div. 2)(VP)
- E. Replace the Numbers:
The question :q Group operation , There are two kinds of 1. Push a number into the end of the array x
2. Put... In the array x All into y
Ideas : Because of the operation 2 With no aftereffect , We can think backwards , Reverse treatment
Inquiry operation 2 becomes ——“ Then press x When I press in y”
You can design one flag Array tag corresponds to —— To press in x When I press into who
At the beginning, it's all about pushing yourself
Note that the second operation here is :flag[Q[i].a]=flag[Q[i].b];
instead of :flag[Q[i].a]=Q[i].b;
Avoid, for example, I want to press 4, But it was previously stipulated to press 4 When I press in 3
But the previous regulation stipulates that it is necessary to press 3 When I press in 2
- E. Replace the Numbers:
21.12.18 Saturday
- Codeforces Round #581 (Div. 2)
- C. Anna, Svyatoslav and Maps
---- All source shortest path floyed Algorithm -----
The question : Here's a digraph for you , A sequence of paths ,
Let you find a sequence of nodes ,
Its shortest path sequence is the above path sequence
Ideas : For a given path sequence , Second to second m-1 Each node judges
Is it irreplaceable
1. When judging the first irreplaceable point before this point
The shortest path to the next point of the judgment point is the path, which can be replaced
2. When judging the first irreplaceable point before this point
When the shortest path to the next point of the judgment point is not the path, it cannot be replaced
Alternatively delete
Output the result
- C. Anna, Svyatoslav and Maps
21.12.19 Sunday
边栏推荐
猜你喜欢
What are the problems in the classification and future development of IOT devices?
205. Isomorphic string
543. Diameter of binary tree
74. 搜索二维矩阵
Comprehensive: realtek/ Ruiyu wireless product map and market composition
leetcode哈希
AtCoder Beginner Contest 218 题解
14. 最长公共前缀
Analysis of the characteristics of matter protocol (I) support non matter protocol, private protocol, and technical analysis of matter Bridge
299. Guessing numbers game
随机推荐
机器学习-频率派vs贝叶斯派
西瓜书第三章-线性模型
组合学总结
Level 3 academic level test
第二周ACM训练报告
328. Parity linked list
VisualStudio2019 配置点云库 PCL1.11.1+斯坦福兔子测试
Probability theory hypothesis test
226. Flip binary tree
1046. 最后一块石头的重量
三类基于贪心思想的区间覆盖问题
2020普及组总结
ACM训练题解集记录
西瓜书第二章笔记-评估方法
每日升个级
62. Different paths
Smart devices are coming, making our lives more automated
Week 8 ACM training report
004: print characters
What impact does the Internet of things have on the development of enterprises?