摘要:
DescriptionFarmer John has been elected mayor of his town! One of his campaign promises was to bring internet connectivity to all farms in the area. He needs your help, of course.Farmer John ordered a high speed connection for his farm and is going to share his connectivity with the other farmers. T
閱讀全文
摘要:
DescriptionThere are N villages, which are numbered from 1 to N, and you should build some roads such that every two villages can connect to each other. We say two village A and B are connected, if and only if there is a road between A and B, or there exists a village C such that there is a road bet
閱讀全文
摘要:
DescriptionYou are the owner of SmallCableCo and have purchased the franchise rights for a small town. Unfortunately, you lack enough funds to start your business properly and are relying on parts you have found in an old warehouse you bought. Among your finds is a single spool of cable and a lot of
閱讀全文
摘要:
DescriptionThe Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was spent on extra roads between villages some years ago. But the jungle overtakes roads relentlessly, so the large road network is too expensive to maintain. The Council of Elders must choose t
閱讀全文
摘要:
1.題目:判斷斷一個由a-z這26個字符組成的字符串中哪個字符出現的次數最多。#include<stdio.h>#include "string.h"int main(){ int n, Case[26], j, max; char str[1001]; scanf("%d", &n); for(int i=0; i<n; i++) { scanf("%s", str); memset(Case, 0, sizeof(Case)); for(j=0; j<strlen(str); j++) Case[s
閱讀全文
摘要:
<1>.異體font-variant屬性可以設定小型大寫字母。小型大寫字母不是一般的大寫字母,也不是小寫字母,這種字母采用不同大小的大寫字母。 1 <html> 2 <head> 3 <style type="text/css"> 4 p.normal {font-variant:normal} 5 p.small {font-variant: small-caps} 6 </style> 7 </head> 8 9 <body>10 <p class="normal&quo
閱讀全文
摘要:
首先來了解一下CSS字體:通用字體系列前面討論過,實際上相同的字體可能有很多不同的稱呼,不過 CSS 邁出了勇敢的一步,力圖幫助用戶代理把這種混亂狀況理清楚。我們所認為的“字體”可能有許多字體變形組成,分別用來描述粗體、斜體文本,等等。例如,你可能已經對字體 Times 很熟悉。不過,Times 實際上是多種變形的一個組合,包括 TimesRegular、TimesBold、TimesItalic、TimesOblique、TimesBoldItalic、TimesBoldOblique,等等。Times 的每種變形都是一個具體的字體風格(font face),而我們通常認為的 Times 是
閱讀全文
摘要:
<1>字母大小寫 1 <html> 2 <head> 3 <style type="text/css"> 4 h1 {text-transform: uppercase} 5 p.uppercase {text-transform: uppercase} 6 p.lowercase {text-transform: lowercase} 7 p.capitalize {text-transform: capitalize} 8 </style> 9 </head>10 11 <body>12
閱讀全文
摘要:
<1>.對齊文本 1 <html> 2 <head> 3 <style type="text/css"> 4 h1 {text-align: center} 5 h2 {text-align: left} 6 h3 {text-align: right} 7 </style> 8 </head> 9 10 <body>11 <h1>這是標題 1</h1>12 <h2>這是標題 2</h2>13 <h3>這是標題 3</h3&g
閱讀全文
摘要:
<1>.用比例設置行間距 1 <html> 2 <head> 3 <style type="text/css"> 4 p.small {line-height: 90%} 5 p.big {line-height: 200%} 6 </style> 7 </head> 8 9 <body>10 <p>11 這是擁有標準行高的段落。12 在大多數瀏覽器中默認行高大約是 110% 到 120%。13 這是擁有標準行高的段落。14 這是擁有標準行高的段落。15 這...
閱讀全文