Trong một rừng cây có
$N$ cây, các cây được đánh số từ$1$ đến$N$ , có tất cả$M$ loại cây.
Cây thứ$i$ thuộc loại$B_i ;(1 \leq B_i \leq M).$ Chênh lệch chiều cao của rừng cây được tính theo công thức: tổng các giá trị tuyệt đối của hiệu chiều cao giữa tất cả các cặp cây khác loại nhau.
Nghĩa là chênh lệch chiều cao của rừng cây được tính bằng công thức
$\sum |C_i - C_j|\forall 1 \le i < j \le N, ; B_i \ne B_j$
{job="dnsmasq"} | regexp `(?P<syslog_date>[A-Z][a-z]{2} \d{2} \d{2}:\d{2}:\d{2}) dnsmasq\[(?P<pid>\d+)\]: (?P<state>[^\s\[]*)(\[(?P<qtype>[A-Z]*)\])? (?P<domain>[^\s]*) (from (?P<client>.*))?(is (?P<destination>[^<]*))?`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"".split("/") | |
.map((p, i) => | |
i >= 3 | |
? p | |
.split("") | |
.map((c) => | |
"?#".includes(c) | |
? c | |
: `%${c.charCodeAt(0).toString(16).padStart(2, "0")}`, | |
) |
sudo su
- install acme.sh as root
- open port 80 and
acme.sh --issue --standalone -d <YOUR_DOMAIN>
echo "DOMAIN=<YOUR_DOMAIN>">.env
curl -LO https://gist.githubusercontent.com/hUwUtao/896f925b51f0c50e100af70c671450d0/raw/28e5e79cb9d1e49427addee286f986cc75a11c49/wings.sh
chmod +x wings.sh
./wings.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int main() { | |
ll a,b,c,d,e=0,f=0; | |
scanf("%lld %lld %lld %lld", &a,&b,&c,&d); | |
#define in(n,l,g) n >= l && n <= g | |
for(ull i = (a<c?a:c) ; i<= (b>d?b:d) ; i++){ | |
if(!pr(i)){ | |
if(in(i,a,b))e++; | |
if(in(i,c,d))f++; | |
//printf("%lld %lld %lld\n",i,e,f); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
COMPRESSION=${COMPRESSION:-"gzip"} | |
ALGORITHM=${ALGORITHM:-"-aes-256-cbc"} | |
OUTC=$([ "$PLSAVE" == true ]; printf ">\"$1\"") | |
OUTF="$1.sh" | |
echo $OUTC $OUTF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def main(): | |
fs = open("flowers.inp", "r") | |
n = int(fs.readline()) | |
a = list(map(int, fs.readline().split(" "))) | |
for i, c in enumerate(a[:-3]): | |
if c == a[i+1] == a[i+2] and c != a[i+3]: | |
print(n - i -1) | |
return | |
print(n) | |
main() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
copy( | |
[...document.querySelectorAll("table")] | |
.slice(1, -3) | |
.flatMap((d) => | |
[...d.querySelector("tbody").querySelectorAll("tr")].map((r) => | |
[...r.querySelectorAll("td")].map((r) => r.innerHTML), | |
), | |
) | |
.map((r) => | |
r[0].startsWith("<a") |
NewerOlder