首页 > 其他分享 >18day-19day-2.2.CSS实战与提高

18day-19day-2.2.CSS实战与提高

时间:2024-03-31 10:30:40浏览次数:16  
标签:18day nth color height 19day nbsp background 2.2 type

请添加图片描述

2.2.CSS实战与提高

练习11:制作开心餐厅页面

在这里插入图片描述

CSS
/*层次选择器*/

p{
    font-size: 14px;
}
/*body后代h2字体16px*/
body h2{
    font-size: 16px;
}
/*第一个h2颜色变为红色*/
.firstH2{
color: red;
}
/*第一个h2后面的通用兄弟元素h2变为蓝色*/
.firstH2 ~ h2{
    color: blue;
}

/*img:first-child{*/
    /*width: 887px;*/
    /*height: 439px;*/
/*}*/

/*img:nth-of-type(2){*/
    /*border: 1px solid red;*/
/*}*/
HTML
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>开心餐厅</title>
    <link href="css/style.css" rel="stylesheet" type="text/css"/>
</head>

<body>
    <img src="image/game01.jpg"  alt="主题图片"/>
    <br/>

    <img src="image/game02.jpg"  alt="游戏简介"/>

    <p >开心餐厅,让你可以开心的烹饪美味佳肴,从一个简洁的小餐厅起步,逐步打造自己的餐饮大食代。<br/>
        烹饪美食,雇佣好友帮忙,装修个性餐厅,获得顾客美誉。<br/>
        步步精心经营,细心打理,我们都能成为餐饮大亨哦。</p>

    <img src="image/game03.jpg"  alt="游戏特色"/>

    <h2 class="firstH2">如何做菜?</h2>
    <p>
        1.点击餐厅中的炉灶,打开菜谱,选择自己要做的食物后,进行烹饪。不断点击炉灶,直到食物进入自动烹饪阶段;<br/>
        2.每道菜所需要制作的步骤和烹饪的时间不一样,你可以根据自己的时间和偏好来进行选择,还会有各地特色食物供应哦;<br/>
        3.烹饪完毕的食物要及时端到餐台上,否则过一段时间会腐坏;<br/>
        4.食物放在餐台上后,服务员会自动端给顾客,顾客吃完后会付钱给你。
    </p>

    <h2>如何经营餐厅?</h2>

    <p>
        1.自己做老板,当大厨,雇佣好友来做服务员为你打工。心情越好的员工效率越高。员工兼职的份数越少,工作的时间越短
        心情越好;好友间亲密度越高,可雇用的时间越长;<br/>
        2.随着等级的升高,可雇佣的员工、可购买的炉灶、餐台、经营面积都会随之增加;<br/>
        3.餐桌椅的摆放位置也很有讲究,它会影响顾客和服务员行走路程。
    </p>

    <h2>如何吸引顾客?</h2>

    <p>
        1.美誉度决定了餐厅的客流量,美誉度高的时候来餐厅的顾客多,美誉度低的时候来餐厅的顾客少;<br/>
        2.如果不需要等待,就能及时享用到食物,顾客就会满意地增加餐厅美誉度;与之相反,如果没有吃到食物就离开的顾客会
        降低美誉度;<br/>
        3.总而言之,储备充足的食物、及时的服务、足够的餐桌椅是必不可少的!
    </p>

    <h2>如何和好友互动?</h2>

    <p>
        1.不忍眼睁睁看好友餐厅的食物腐坏,那就帮忙端到餐台吧!自己还可以获得经验值奖励;<br/>
        2.仓库里的东西可以赠送给好友,直接拖拽到礼物即可赠送;拖拽到收银即可出售。注意哦,每个级别能收到礼物的总价值
        是有上限的;<br/>
        3.系统的额外食物奖励可和好友分享,把分享消息发布到开心网动态上,让朋友们一起感受快乐!每天最多可以从5位好友
        的餐厅领取免费食物,食物将被放入仓库的冷藏室里,可出售给系统,也可以拖到餐台上卖给顾客;<br/>
        4.在好友需要帮助的时候,给予帮忙,当然啦,你也可以给好友捣捣乱、使使坏。作为奖励,你也会获得经验值和现金。
    </p>

    <img src="image/game04.jpg"  alt="游戏口碑"/>

    <p>开心餐厅,让你可以开心的烹饪美味佳肴,从一个简洁的小餐厅起步,逐步打造自己的餐饮大食代。<br/>
        烹饪美食,雇佣好友帮忙,装修个性餐厅,获得顾客美誉。<br/>
        步步精心经营,细心打理,我们都能成为餐饮大亨哦。
    </p>
</body>
</html>

练习12:制作爱奇异视频播放列表

在这里插入图片描述

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>爱奇异视频播放列表</title>
    <style>
        li{
            display: inline-block;
        }
        li h4:nth-of-type(1){
            font-size: 16px;
            color: #4d4d4d;
        }

        li p:nth-of-type(1){
            color: #640000;
            font-size: 14px;

        }
        li p:nth-of-type(2){
            font-size: 12px;
            color: blue;
        }

    </style>
</head>
<body>
<h3>热播</h3>
<ul>
    <li>
        <img src="image/img1.png" alt=""/>
        <h4>神武赵子龙</h4>
        <p>怒,林更新不抱网红抱女神</p>
        <p>点击次数:242445次</p>
    </li>
    <li>
        <img src="image/img2.png" alt=""/>
        <h4>旋风十一人</h4>
        <p>胡歌变教练在撩前女友</p>
        <p>点击次数:242445次</p>

    </li>
    <li>
        <img src="image/img3.png" alt=""/>
        <h4>太阳的后裔</h4>
        <p>宋慧乔吃嫩草</p>
        <p>点击次数:242445次</p>

    </li>
    <li>
        <img src="image/img4.png" alt=""/>
        <h4>山海经之赤影传说</h4>
        <p>娜扎张翰再度联手</p>
        <p>点击次数:242445次</p>

    </li>
</ul>

</body>
</html>

练习13:家用电器商品分类页面

在这里插入图片描述

CSS

#type {
	width:300px;
}
#title {
	font-size:18px;
	text-indent:1em;
	/*background-color:#0f7cbf;*/
	background: linear-gradient(to bottom,#0467ac,#63a7d6,#b6dbf5);
	line-height:35px;
	height: 35px;
	color:#FFF;
	font-weight:bold;
}

li{
	list-style: none;
}
.secondTitle {
	background-color:#e4f1fa;
	background: linear-gradient(to bottom,#e4f1fa,#bddff7,#e4f1fa);
	text-indent:2em;
	font-size:14px;
	line-height:30px;
	font-weight:bold;
}
.secondTitle a {
	color:#0565c6;
	text-decoration:none;
}
.secondTitle a:hover {
	text-decoration:underline;
}
p {
	line-height:26px;
	text-indent:1em;
}
p a {
	color:#666666;
	text-decoration:none;
	
}
p a:hover {
	color:#F60;
	text-decoration:underline;
}


HTML
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>家用电器分类</title>
    <link href="css/type.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="type">
    <h2 id="title">家用电器</h2>
    <ul>
        <li>
            <h3 class="secondTitle"><a href="#">大家电</a></h3>

            <p><a href="#">平板电视</a>&nbsp;&nbsp;<a href="#">洗衣机</a>&nbsp;&nbsp;<a href="#">冰箱</a><br/>
                <span>&nbsp;&nbsp;</span><a href="#">空调</a>&nbsp;&nbsp;<a href="#">烟机/灶具</a>&nbsp;&nbsp;<a
                        href="#">热水器</a><br/>
                <span>&nbsp;&nbsp;</span><a href="#">冷柜/酒柜</a>&nbsp;&nbsp;<a href="#">消毒柜</a>&nbsp;&nbsp;<a href="#">家庭影院</a>
            </p>
        </li>
        <li>
            <h3 class="secondTitle"><a href="#">生活电器</a></h3>

            <p><a href="#">电风扇</a>&nbsp;&nbsp;<a href="#">净化器</a>&nbsp;&nbsp;<a href="#">吸尘器</a><br/>
                <span>&nbsp;&nbsp;</span><a href="#">净水设备</a>&nbsp;&nbsp;<a href="#">挂烫机</a>&nbsp;&nbsp;<a
                        href="#">电话机</a>
            </p>

        </li>
        <li>
            <h3 class="secondTitle"><a href="#">厨房电器</a></h3>

            <p><a href="#">榨汁机</a>&nbsp;&nbsp;<a href="#">电压力锅</a>&nbsp;&nbsp;<a href="#">电饭煲</a><br/>
                <span>&nbsp;&nbsp;</span><a href="#">豆浆机</a>&nbsp;&nbsp;<a href="#">微波炉</a>&nbsp;&nbsp;<a
                        href="#">电磁炉</a>
            </p>

        </li>
        <li><h3 class="secondTitle"><a href="#">五金家装</a></h3>

            <p><a href="#">淋浴/水槽</a>&nbsp;&nbsp;<a href="#">电动工具</a>&nbsp;&nbsp;<a href="#">手动工具</a><br/>
                <span>&nbsp;&nbsp;</span><a href="#">仪器仪表</a>&nbsp;&nbsp;<a href="#">浴霸/排气</a>&nbsp;&nbsp;<a
                        href="#">灯具</a>
            </p></li>
    </ul>

</div>
</body>
</html>

练习14:畅销书排行榜

在这里插入图片描述

CSS

.book {
	width:290px;
	background-color:#f3f4df;
	background: linear-gradient(to bottom,#f9fbcb,#f8f8f3);
}
.title {
	font-size:16px;
	color:#FFF;
	line-height:30px;
	text-indent:1em;
	background:#518700 url(../image/bang.gif) 100px 2px no-repeat;
	background-size: contain;
}
ul li {
	list-style-type:none;
	line-height:28px;
	font-size:12px;
	text-indent:2em;
}
ul li:nth-of-type(1){background:url(../image/book_no01.gif) 0 center no-repeat;}
ul li:nth-of-type(2){background:url(../image/book_no02.gif) 0 center no-repeat;}
ul li:nth-of-type(3){background:url(../image/book_no03.gif) 0 center no-repeat;}
ul li:nth-of-type(4){background:url(../image/book_no04.gif) 4px center no-repeat;}
ul li:nth-of-type(5){background:url(../image/book_no05.gif) 4px center no-repeat;}
ul li:nth-of-type(6){background:url(../image/book_no06.gif) 4px center no-repeat;}
ul li:nth-of-type(7){background:url(../image/book_no07.gif) 4px center no-repeat;}
ul li:nth-of-type(8){background:url(../image/book_no08.gif) 4px center no-repeat;}
ul li:nth-of-type(9){background:url(../image/book_no09.gif) 4px center no-repeat;}
ul li:nth-of-type(10){background:url(../image/book_no10.gif) 4px center no-repeat;}

ul li a {
	color:#1a66b3;
	text-decoration:none;
}
ul li a:hover {
	text-decoration:underline;
}

HTML
<!DOCTYPE html>
<html>
<head lang="en">
  <meta charset="UTF-8">
<title>畅销书排行榜</title>
<link href="css/book.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="book">
  <h2 class="title">畅销书排行</h2>
  <ul>
    <li ><a href="#" target=_blank>不抱怨的世界(畅...</a></li>
    <li ><a href="#" target=_blank>遇见未知的自己...</a></li>
    <li ><a href="#" target=_blank>活法(季羡林、...</a></li>
    <li ><a href="#" target=_blank>高效能人士的七个习惯</a></li>
    <li ><a href="#" target=_blank>被迫强大(北外女生香奈儿...</a></li>
    <li ><a href="#" target=_blank>遇见心想事成的自己(《遇...</a></li>
    <li ><a href="#" target=_blank>世界上最伟大的推销员(插...</a></li>
    <li ><a href="#" target=_blank>我的成功可以复制(唐骏亲...</a></li>
    <li ><a href="#" target=_blank>少有人走的路:心智成熟的...</a></li>
    <li ><a href="#" target=_blank>活出全新的自己――唤醒...</a></li>
  </ul>
</div>
</body>
</html>

练习15:聚美优品商品分类

在这里插入图片描述

CSS

h1, dl, dt, dd {
    margin: 0px;
    padding: 0px;
}

body {
    background-color: #D5D5D5;
}

#product {
    width: 230px;
    background-color: #fff;
}

#product h1 {
    font-size: 16px;
    font-weight: bold;
    color: #FFF;
    background-color: #000;
    text-indent: 1em;
    line-height: 35px;
}

#product dt {
    padding-left: 27px;
    line-height: 35px;
    height: 35px;
    font-size: 14px;
    font-weight: bold;
}

#product dd {
    font-size: 12px;
    color: #666666;
    line-height: 20px;
    border-bottom: 1px #666666 dashed;
    padding-left: 27px;
}

#product dt:nth-of-type(1) {
    background: url(../image/icon_01.gif) 0px 0px no-repeat;
}

#product dt:nth-of-type(2) {
    background: url(../image/icon_02.gif) 0px 2px no-repeat;
}

#product dt:nth-of-type(3) {
    background: url(../image/icon_03.gif) 0px 4px no-repeat;
}

#product dt:nth-of-type(4) {
    background: url(../image/icon_04.gif) 0px 2px no-repeat;
}

#product dt:nth-of-type(5) {
    background: url(../image/icon_05.gif) 0px 0px no-repeat;
}

#product dt:nth-of-type(6) {
    background: url(../image/icon_06.gif) 0px 0px no-repeat;
}

#product dt:nth-of-type(7) {
    background: url(../image/icon_07.gif) 0px 0px no-repeat;
}

#product dt:nth-of-type(8) {
    background: url(../image/icon_08.gif) 0px 0px no-repeat;
}

#product dt:nth-of-type(9) {
    background: url(../image/icon_09.gif) 0px 0px no-repeat;
}

#product dd:last-of-type {
    border-bottom: 0px;
}
HTML
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>商品分类</title>
    <link href="css/product.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="product">
    <h1>全部分类</h1>
    <dl>
        <dt>护肤</dt>
        <dd>洁面 化妆水 喷雾 美容液 眼霜<br/>
            眼部精华 眼膜 面膜 面膜贴<br/>
            水洗面膜 免洗面膜 精华 精油<br/>
            凝露 乳液 面霜 日霜 晚霜
        </dd>
        <dt>彩妆</dt>
        <dd>卸妆 防晒 隔离 BB霜 粉底 粉饼<br/>
            睫毛膏 眼影 唇彩 腮红 眼线笔<br/>
            底妆 遮瑕 蜜粉 眉笔 美甲
        </dd>
        <dt>香氛</dt>
        <dd>男香 女香 小Q装 中性香水</dd>

        <dt>身体护理</dt>
        <dd>洗发 护发 沐浴 身体乳 手足护理<br/>
            护手霜 纤体 身体精油 颈部护理<br/>
            个人护理 卫生用品 脱毛
        </dd>
        <dt>礼盒套装</dt>
        <dd>护肤套装 身体护理套装 彩妆套装 <br/>
            旅行装 香水套装 男士套装
        </dd>
        <dt>美容工具</dt>
        <dd>护肤 彩妆 美发 美体 美甲 <br/>
            美容仪器 其他美容工具
        </dd>
        <dt>母婴专区</dt>
        <dd>奶粉 尿裤湿巾 母婴洗护</dd>
        <dt>男士专区</dt>
        <dd>洁面 爽肤水 面霜 男香<br/>
            眼霜 凝胶 乳液 精华 沐浴
        </dd>
        <dt>食品保健</dt>
        <dd>瘦身类 保健类 美容类 食品类</dd>
    </dl>
</div>
</body>
</html>

练习16:仿京东快报

在这里插入图片描述

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>京东快报</title>
    <style>
        * {
            padding: 0;
            margin: 0;
        }

        body {
            margin: 30px;
        }

        a {
            text-decoration: none;
        }

        .box {
            border: 1px #e4e4e4 solid;
            width: 230px;
            box-sizing: border-box;
        }

        h2 {
            padding-left: 10px;
            line-height: 43px;
            height: 43px;
            border-bottom: 2px #E8E8E7 dotted;
            font-size: 16px;
            color: #666;
            font-weight: normal;
            background: linear-gradient(to bottom,#CCCCFF,#FFFFFF);
        }

        ul {
            list-style: none;
            padding-top: 5px;
            padding-bottom: 5px;
        }

        ul li {
            line-height: 26px;
            padding-left: 10px;
            padding-right: 10px;
        }

        li a {
            font-size: 12px;
            color: #666;
            text-decoration: none;
        }

        li a:hover {
            color: #b20000;
        }

        li a span {
            font-weight: bold;
        }
    </style>
</head>
<body>
<div class="box">
    <h2>京东快报</h2>
    <ul>
        <li><a href=""><span>[特惠]</span>海飞丝去屑又去油 超清爽</a></li>
        <li><a href=""><span>[公告]</span>京东公益支持鲁甸新动作</a></li>
        <li><a href=""><span>[特惠]</span>4688元抢iPhone 6</a></li>
        <li><a href=""><span>[公告]</span>小米电视携豪礼高调入驻京东</a></li>
    </ul>
</div>
</body>
</html>

练习17:制作特殊图形

半圆

在这里插入图片描述

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>border-radius制作半圆形</title>
    <style>
        div{
            background: red;
            margin: 30px;
        }
        div:nth-of-type(1){
            width: 100px;
            height: 50px;
            border-radius: 50px 50px 0 0;
        }
        div:nth-of-type(2){
            width: 100px;
            height: 50px;
            border-radius:0 0 50px 50px;
        }
        div:nth-of-type(3){
            width: 50px;
            height: 100px;
            border-radius:0 50px 50px  0;
        }
        div:nth-of-type(4){
            width: 50px;
            height: 100px;
            border-radius: 50px 0 0 50px;
        }
    </style>
</head>
<body>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
</body>
</html>
扇形

在这里插入图片描述

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>border-radius制作扇形</title>
    <style>
        div{
            background: red;
            margin: 30px;
        }
        div:nth-of-type(1){
            width: 50px;
            height: 50px;
            border-radius: 50px 0 0 0;
        }
        div:nth-of-type(2){
            width: 50px;
            height: 50px;
            border-radius:0 50px 0 0;
        }
        div:nth-of-type(3){
            width: 50px;
            height: 50px;
            border-radius:0 0 50px 0;
        }
        div:nth-of-type(4){
            width: 50px;
            height: 50px;
            border-radius: 0 0 0 50px;
        }
    </style>
</head>
<body>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
</body>
</html>
圆形

在这里插入图片描述

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>border-radius制作圆形</title>
    <style>
        div{
            width: 100px;
            height: 100px;
            border: 4px solid red;
            border-radius: 50%;

        }
    </style>
</head>
<body>
    <div></div>
</body>
</html>

练习18:聚美优品美容产品热点

在这里插入图片描述

CSS

p, ul, li {
	margin:0px;
	padding:0px;
}
ul, li {
	list-style-type:none;
}
body {
	background-color:#eee7e1;
	font-size:12px;
}
#beauty {
	width:260px;
	background-color:#FFF;
}
#beauty p {
	font-size:14px;
	font-weight:bold;
	color:#FFF;
	background-color:#e9185a;
	height:35px;
	line-height:35px;
	padding-left:10px;
}
#beauty li {
	border-bottom:1px #a8a5a5 dashed;
	height:30px;
	line-height:30px;
	padding-left:2px;
}
#beauty a {
	color:#666666;
	text-decoration:none;
}
#beauty a:hover {
	color:#e9185a;
}
#beauty a span {
	color:#FFF;
	font-weight:bold;
	margin-right: 10px;
	display: inline-block;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #373b3c;
	line-height: 20px;
	text-align: center;

}
#beauty a:hover span {
	background: #e9185a;
}

HTML
<!DOCTYPE html>
<html>
<head lang="en">
  <meta charset="UTF-8">
<title>美容热点产品</title>
<link href="css/beauty.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="beauty">
  <p>大家都喜欢买的美容品</p>
  <ul>
    <li><a href="#"><span>1</span>雅诗兰黛即时修护眼部精华霜15ml</a></li>
    <li><a href="#"><span>2</span>伊丽莎白雅顿显效复合活肤霜 75ml</a></li>
    <li><a href="#"><span>3</span>OLAY玉兰油多效修护霜 50g</a></li>
    <li><a href="#"><span>4</span>巨型一号丝瓜水320ML</a></li>
    <li><a href="#"><span>5</span>倩碧保湿洁肤水2号 200ml</a></li>
    <li><a href="#"><span>6</span>比度克细肤淡印霜 30g</a></li>
    <li><a href="#"><span>7</span>兰芝 (LANEIGE)夜间修护锁水面膜 80ml</a></li>
    <li><a href="#"><span>8</span>SK-II护肤精华露 215ml</a></li>
    <li><a href="#"><span>9</span>欧莱雅青春密码活颜精华肌底液</a></li>
  </ul>
</div>
</body>
</html>

练习19:制作爱奇异视频播放列表

在这里插入图片描述

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>爱奇异视频播放列表</title>
    <style>
        *{
            margin: 0;
            padding:0;
        }
        .box{
            width: 1000px;
            margin: 50px auto;
        }
        h3{
            font-size: 18px;
            line-height: 40px;
        }
        li{
            display: inline-block;
            padding: 10px;
            margin-right: 5px;
        }
        li img{
            border-radius: 10px;
        }
        li h4:nth-of-type(1){
            font-size: 16px;
            color: #4d4d4d;
            line-height: 30px;
        }

        li p:nth-of-type(1){
            color: #640000;
            font-size: 14px;
            line-height: 20px;

        }
        li p:nth-of-type(2){
            font-size: 12px;
            color: blue;
            line-height: 20px;
        }
        ul li:hover{
            border-color: #dfdfdf;
            border-radius: 10px;
            -moz-box-shadow: 0 5px 5px rgba(0, 0, 0, 0.1), 0 0 10px 0 rgba(0, 0, 0, 0.2);
            -webkit-box-shadow: 0 5px 5px rgba(0, 0, 0, 0.1), 0 0 10px 0 rgba(0, 0, 0, 0.2);
            box-shadow: 0 5px 5px rgba(0, 0, 0, 0.1), 0 0 10px 0 rgba(0, 0, 0, 0.2);
            background-color: #fff;
        }
    </style>
</head>
<body>
    <div class="box">
        <h3>热播</h3>
        <ul>
            <li>
                <img src="image/img1.png" alt=""/>
                <h4>神武赵子龙</h4>
                <p>怒,林更新不抱网红抱女神</p>
                <p>点击次数:242445次</p>
            </li>
            <li>
                <img src="image/img2.png" alt=""/>
                <h4>旋风十一人</h4>
                <p>胡歌变教练在撩前女友</p>
                <p>点击次数:242445次</p>

            </li>
            <li>
                <img src="image/img3.png" alt=""/>
                <h4>太阳的后裔</h4>
                <p>宋慧乔吃嫩草</p>
                <p>点击次数:242445次</p>

            </li>
            <li>
                <img src="image/img4.png" alt=""/>
                <h4>山海经之赤影传说</h4>
                <p>娜扎张翰再度联手</p>
                <p>点击次数:242445次</p>

            </li>
        </ul>

    </div>
</body>
</html>

后续待更新

在这里插入图片描述

标签:18day,nth,color,height,19day,nbsp,background,2.2,type
From: https://blog.csdn.net/DaB210/article/details/137192219

相关文章

  • 计算机组成与体系结构--2.2:校验码
    转上一节---2.1数据的表示计算机组成与体系结构-数据的表示http://t.csdnimg.cn/1WUdC2.2:校验码考点1:奇偶校验码1.校验码基础知识码距:任何-种编码都由许多码字构成,任意两个码字之间最少变化的二进制位数就称为数据校验码的码距。例如:用2位二进制表示4种状态,则有4个......
  • 2.27 二分图与网络流复习
    可能会有一些有一点用的trick的整理与复习。很少,很不系统。1Dinic优化给bfs和dfs加上当前弧优化。但是此时要一定注意在遍历时,\(rest=0\)退出循环需要在循环内写,而非在for中的条件写。对边权排序后分段。Dinic很多时候慢是因为边权差距太大了。于是我们不断设......
  • 4.2.2、容器,算法,迭代器 初识
    了解STL中容器、算法、迭代器概念之后,我们利用代码感受STL的魅力STL中最常用的容器为Vector,可以理解为数组,下面我们将学习如何向这个容器中插入数据、并遍历这个容器1、vector存放内置数据类型容器:vector算法:for_each迭代器:vector<int>::iteratorvoidMyPrint(intval){ c......
  • POI升级5.2.2报错问题
    POI升级5.2.2报错问题标签:版本冲突报错信息Exceptioninthread"main"java.lang.NoSuchMethodError:org.apache.logging.log4j.Logger.atDebug()Lorg/apache/logging/log4j/LogBuilder; atorg.apache.poi.openxml4j.opc.PackageRelationshipCollection.parseRelati......
  • P1466 [USACO2.2] 集合 Subset Sums
    题目传送门:P1466[USACO2.2]集合SubsetSums-洛谷|计算机科学教育新生态(luogu.com.cn)https://www.luogu.com.cn/problem/P1466//https://www.luogu.com.cn/problem/P1466//背包#include<bits/stdc++.h>usingnamespacestd;intval[40],f[40][1005];//f[i][......
  • 肖sir__pycharm安装2.2
    PyCharm安装使用教程Pycharm是目前Python语言最好用的集成开发工具。下载 Pycharm载时有两种版本选择 Professional(专业版,收费)和Community(社区版,免费)PyCharm是JetBrains公司(www.jetbrains.com)研发,用于开发 Python 的IDE开发工具。 JetBrains公司开发的多款......
  • 2024.2.29校招 实习 内推 面经
    绿*泡*泡VX:neituijunsir  交流*裙,内推/实习/校招汇总表格1、校招|影石Insta3602024春季校园招聘启动(内推)校招|影石Insta3602024春季校园招聘启动(内推)2、校招|虹软科技2024届校招春招批通道开启(内推)校招|虹软科技2024届校招春招批通道开启(内推)3、校招|......
  • 算法模板 v1.10.2.20240320
    算法模板v1.1.1.20240115:之前历史版本已不可寻,创建第一份算法模板。v1.2.1.20240116:删除“编译”-“手动开栈”;删除“编译”-“手动开O优化”;修改“编译”-“CF模板”;删除“读写”;删除“图论”-“欧拉图”-“混合图”;删除“图论”-“可达性统计”;删除“数据类型”-“高精类”。......
  • FL Studio21.2.2最新破解中文版编曲软件功能及使用讲解
     音乐是人类最美好的语言,它能够跨越国界、文化和语言,将人们紧密地联系在一起。在当今数字化时代,音乐创作已经不再是专业人士的专利,越来越多的音乐爱好者开始尝试自己动手制作音乐。而FLStudio21中文版编曲软件正是这样一个为你打开音乐创作之门的工具。FLStudio21中文版编......
  • 【NodeJS】GLIBC_2.28 not found CentOS7不兼容Node高版本 npm报错
    CentOS7环境下安装Nvm,在执行nvmuse18.17.0后执行node-v爆出如下错误 bash复制代码node:/lib64/libm.so.6:version`GLIBC_2.27'notfound(requiredbynode)node:/lib64/libc.so.6:version`GLIBC_2.25'notfound(requiredbynode)node:/lib64/libc.so......