当前位置:网站首页>search--01
search--01
2022-08-10 12:06:00 【51CTO】
题目大概:
There are many lines connecting multiple routers,Signals cannot be the same between connected routers,Ask at least several signals.
思路:
This is actually a coloring problem in high school.
There are many connected graphs in one plane,Each two connected graphs have a different color,Ask the minimum number of colors that can be used to paint the picture.
Here is the four-color theorem,That's four colors at most.
那就好办了,Cycle from one color,Starts painting each time a certain number of colors are given,开始递归,Paint from the first,And automatically determine whether it is adjacent to it and he is the same color,是则结束,不是则继续,when the color runs out,Not finished painting yet.When all painted,结束.
感想:
Plus a deep search for the four-color theorem.
代码:
边栏推荐
猜你喜欢
Analysis of the implementation principle of UUID from the perspective of source code
gpu-admission 源码分析
ViT结构详解(附pytorch代码)
单目操作符(含原码反码补码转换)
项目部署、
CLIP还能做分割任务?哥廷根大学提出一个使用文本和图像prompt,能同时作三个分割任务的模型CLIPSeg,榨干CLIP能力...
Do self-media monthly income tens of thousands?Several self-media tools that bloggers are using
Flutter气泡框实现
rider内Mono脚本找不到引用资源
建校仅11年就入选“双一流” ,这所高校是凭什么做到的?
随机推荐
三星计划2023年开始在越南生产半导体零部件
An enhanced dynamic packet buffer management.论文核心部分
LeetCode50天刷题计划(Day 19—— 在排序数组中查找元素的第一个和最后一个位置(9.10-10.40)
Introduction to Software Architecture
Does your child lack self-discipline?Ape Counseling: Pay attention to "blank" in the schedule to give children more control
微信小程序,全局变量一个地方改变了其他地方的状态也跟着改变。
孩子自律性不够?猿辅导:计划表要注意“留白”给孩子更多掌控感
Clicking Exercise - 64 Longest Harmonic Subsequences
10 个 Reduce 常用“奇技淫巧”
If someone asks you about distributed transactions again, throw this to him
Licking Exercise - 59 From Binary Search Trees to Greater Sum Trees
技术人必看!数据治理是什么?它对数据中台建设重要吗?
LeetCode 138. 复制带随机指针的链表
不止跑路,拯救误操作rm -rf /*的小伙儿
LeetCode 25. K 个一组翻转链表
SMIC CIM localization project suspended?Rising software: not shut down, changed to remote development!
因为找不到lombok而找不到符号log
力扣练习——56 寻找右区间
单目操作符(含原码反码补码转换)
A little self-deprecating deconstruction about farmers "code"