当前位置:网站首页>"Daily practice, happy water" 1108 IP address invalidation
"Daily practice, happy water" 1108 IP address invalidation
2022-06-25 04:42:00 【Who eats mints】
List of articles
Try to catch up with the original question :
* A brief introduction to the topic :
Give you an effective IPv4 Address address, Go back to this IP Invalid version of address .
The so-called invalidation IP Address , In fact, it is to use “[.]” Instead of every “.”.
* Their thinking :
- Simulation Dafa is good
- Traversal string , hold
.Replace with[.]that will do - over
*C++ Code :
class Solution {
public:
string defangIPaddr(string address) {
string ans;
for (auto c : address) {
if (c == '.') {
ans += "[.]";
} else {
ans.push_back(c);
}
}
return ans;
}
};
Result display :

边栏推荐
- Php7.2 add JPEG extension
- GBASE 8s的数据视图
- cnpm : 无法加载文件 C:\Users\Administrator\AppData\Roaming\npm\cnpm.ps1,因为在此系统上禁止运行脚本。
- Sleep more, you can lose weight. According to the latest research from the University of Chicago, sleeping more than 1 hour a day is equivalent to eating less than one fried chicken leg
- ROS2/DDS/QoS/主题的记录
- Package for gbase 8s
- 论文笔记: 多标签学习 ESMC (没看懂, 还没写出来, 暂时放这里占个位置)
- Trigger for gbase 8s
- CTF_ Web: Changan cup-2021 old but a little new & asuka
- Easyrecovery15 very easy to use computer data recovery software
猜你喜欢

Paper notes: multi label learning ESMC (I don't understand it, but I haven't written it yet, so I'll put it here for a place temporarily)

我的IC之旅——资深芯片设计验证工程师成长——“胡”说IC工程师完美进阶

【FLink】access closed classloader classloader.check-leaked-classloader

30岁了开始自学编程,家里比较困难还来得及吗?

重磅直播 | 相移法+多频外差之数学原理推导+实现

论文笔记: 多标签学习 ESMC (没看懂, 还没写出来, 暂时放这里占个位置)

Easyrecovery15 very easy to use computer data recovery software

Successfully solved: selenium common. exceptions. TimeoutException: Message: timeout: Timed out receiving message from

GBASE 8s 索引R树

CTF_ Web: Advanced questions of attack and defense world expert zone WP (9-14)
随机推荐
What is persistence? What are RDB and AOF in redis persistence?
三角形类(构造与析构)
多睡觉,能减肥,芝加哥大学最新研究:每天多睡1小时,等于少吃一根炸鸡腿...
dotnet-exec 0.4.0 released
CTF_ Web: deserialization learning notes (I) classes and objects in PHP
分布式websocket搭建方案
Immutable学习之路----告别传统拷贝
领导:谁再用 Redis 过期监听实现关闭订单,立马滚蛋!
How to screen out words related to products and eliminate invalid words accurately
Coordinate system left multiply right multiply
GBASE 8s中DELIMIDENT环境变量的使用
After the newly assigned variable of the applet is modified, the original variable will also be modified
Mongodb cluster
Use text analysis to identify the main gender in a text
CTF_ Web: Changan cup-2021 old but a little new & asuka
Codeforces Round #802 (Div. 2) C D
WPF 使用 MAUI 的自绘制逻辑
[Flink] problems and solutions of the continuous growth of checkpoint size in rocksdb incremental mode
Deep learning - several types of learning
Value transfer between parent and child components of wechat applet