自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(3)
  • 收藏
  • 关注

原创 信息熵的Python实现

import math # 概率队列 pi = [0.125, 0.125, 0.125, 0.125, 0.125, 0.125, 0.125, 0.125] log = [] # 对pi中的每一个数求以2为底的对数 for i in pi: log.append(math.log(i, 2)) # pi与logN对应相乘 product = [x*y for x, y in zip(pi, log)] sum = 0.0 for number in product: sum +.

2022-03-19 22:22:59 1148

原创 CSP 202104-1 灰度直方图

#include <iostream> #include <cstdio> using namespace std; int main(){ int n,m,L; cin >> n >> m >> L; int A[n][m]; for(int i=0;i<n;i++){ for(int j=0;j<m;j++){ cin >> A[i][j]; } } int count[L] = ...

2022-03-02 11:41:10 44

原创 数组初始化方式

int arr[5] = { 0 }; //仅当全设为0时可以这样写 int arr[5] = { 1}; //值为 1 0 0 0 0

2022-03-01 19:06:08 64

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除