当前位置:网站首页>7.15模擬賽總結
7.15模擬賽總結
2022-07-18 13:36:00 【Flame*】
好 好 感覺最近自己確實是逐漸焦慮化
甚至家裏的劉老師過來跟我循循善誘)覺得我是不是魔怔了有點
我:嘎
難蚌,感覺很累,感覺就是精神狀態快撐不住了
時間安排
8.00-10.30
先往字符串方向想了一會T1 感覺沒什麼結果 然後看看T2 也不會 最後開始做貌似最可做的T3 (我怎麼感覺我見過這個題)
然後打了一個假做法(第二短路) 想了一會打了一個費用流
10.30-11.20
又想了一會 寫了個T1 的暴力
11.20-11.50
寫了T2 的暴力 中間沒法去重 想了想套了個hash 想打部分分 但又不知道多測怎麼寫判斷sub
11.50-12.40
吃了點東西 垂死病中驚坐起 打了個T2 的菊花
題目分析
T1
純暴力枚舉+三進制hash
upd
考慮因為只有01 ,然後考慮從 l e n 1 , l e n 2 len1,len2 len1,len2 變成 l e n 1 + 1 , l e n 2 − 1 len1+1,len2-1 len1+1,len2−1 答案會增加當且僅當 s [ l e n 1 + 1 ] ! = t [ l e n 2 ] s[len1+1]!=t[len2] s[len1+1]!=t[len2]
而且考慮 改變的比特置是依次向後的 所以同一長度的一定不會重複
因此 a n s = ( s 0 + 1 ) ∗ ( t 1 + 1 ) + ( s 1 + 1 ) ∗ ( t 0 + 1 ) − 1 ans=(s0+1)*(t1+1)+(s1+1)*(t0+1)-1 ans=(s0+1)∗(t1+1)+(s1+1)∗(t0+1)−1
然後考慮點積 我不是很懂 明天學一下
T2
不懂捏 但起碼把暴力打出來了
upd
首先按照連邊搞出一個二分圖然後黑白染色 假設我們知道原樹 那麼我們會發現 二分圖形成的兩個連通塊是同構的,而且染色情况相同
(考慮從右邊第一個點染黑,然後黑白交替染色 再挑左邊第一個沒被選的點染黑,然後黑白交替然色)
因此相當於我們要確定兩件事: 在兩個連通塊裏的右部點 對應另一個連通塊裏的左部點的編號是什麼
又因為我們知道 兩個連通塊最後需要同構
因此 我們將重心提出來之後(之所以提重心 是因為重心是唯一確定的(只需要讓一個連通塊裏的確定點對上另一個連通塊裏的不確定點就行,但你沒法確定比如1號點在另一個連通塊裏對應什麼)
然後只要滿足 有編號限制的 黑白染色同構就好
不好錶述 具體看代碼
T3
費用流 tarjan論文題
upd
不太好的地方是沒注意到30分檔可以支配樹 qwq
边栏推荐
- 【luogu AT2230】Water Distribution(状压DP)(最小生成树)
- 双位置继电器DLS-5/1
- [software testing] test slang, the advice given to you by ten-year old employees
- 蓝牙技术|首批蓝牙LE Audio兼容设备年内上市,蓝牙耳机续航将突飞猛进
- Sword finger offer 27 Image of binary tree
- USB protocol (I)
- 基于AMDP的BW转换专家例程
- The static variable looks a little dizzy, and the GDB assembly is awake
- Task-Customized Self-Supervised Pre-training with Scalable Dynamic Routing
- Expert routine of BW conversion based on AMDP
猜你喜欢

Static routing technology

DLS-42/4-4 DC110V双位置继电器

Dpr-34, AC220V double position relay

软件测试零基础测试篇-基本概念

EXCEL图表的绘制的一些注意点

Sword finger offer 42 Maximum sum of continuous subarrays

After Jay Chou's co branded model, Fang Wenshan brought online shopping to promote the collection of "Hualiu" top-level co branded dolls

内网部署EDUSOHO遇到的问题

三匹马携手乾元公益基金会 | 炎夏送清凉,致敬坚守者 !

Sword finger offer 28 Symmetric binary tree
随机推荐
Common protocols of tcp/ip
ES (6/7/8/9/10/11) notes
Community summit pulsar summit old golden peak conference topic highlights exposure!
Gan online learning notes
Zhongang Mining: Fluorite guarantees the supply of fluorine in new energy industry
使用pssh批量在多台主机上执行命令
Work method record
An understanding of mapstruct domain transformation tool!
DLS-12B/DC220V双位置继电器
Summary of various parameters of ultra micro motherboard
快速上手Jupyter Notebook
迁移学习在医学图像分类中的研究进展
Qunhui 7.1 add hard disk with SHR
求水仙花数
Research progress of transfer learning in medical image classification
Problems encountered in deploying edusoho on the Intranet
『HarmonyOS』探索HarmonyOS应用
5、 Basic composition & assertion of JMeter script
Halcon 3D create_pose
[RT thread] NXP rt10xx sfud and fal component construction and use