1 | 给你一个由一些多米诺骨牌组成的列表 dominoes。 |
直接哈希表
1 | class Solution { |
二元组表示 + 计数
先把数对转换成 $[a,b]$ 其中 $a<=b$
然后将两个数字表示成 $a*10+b$ 的形式
最终的每个数对数量是$C_n^2$
1 | class Solution { |
1 | 给你一个由一些多米诺骨牌组成的列表 dominoes。 |
1 | class Solution { |
先把数对转换成 $[a,b]$ 其中 $a<=b$
然后将两个数字表示成 $a*10+b$ 的形式
最终的每个数对数量是$C_n^2$
1 | class Solution { |
tag:
缺失模块。
1、请确保node版本大于6.2
2、在博客根目录(注意不是yilia根目录)执行以下命令:
npm i hexo-generator-json-content --save
3、在根目录_config.yml里添加配置:
jsonContent:
meta: false
pages: false
posts:
title: true
date: true
path: true
text: false
raw: false
content: false
slug: false
updated: false
comments: false
link: false
permalink: false
excerpt: false
categories: false
tags: true