<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[starmoth的博客]]></title><description><![CDATA[]]></description><link>https://blog.csdn.net/starmoth</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; starmoth]]></copyright><item><title><![CDATA[TASK 03]]></title><link>https://blog.csdn.net/starmoth/article/details/115190919</link><guid>https://blog.csdn.net/starmoth/article/details/115190919</guid><author>starmoth</author><pubDate>Wed, 24 Mar 2021 23:46:02 +0800</pubDate><description><![CDATA[一、以太坊客户端
1.1、什么是以太坊客户端
以太坊客户端是一个软件应用程序，它实现以太坊规范并通过p2p网络与其他以太坊客户端进行通信。如果不同的以太坊客户端符合参考规范和标准化通信协议，则可以进行相互操作。
以太坊是一个开源项目，由“黄皮书”正式规范定义。除了各种以太坊改进提案之外，此正式规范还定义了以太坊客户端的标准行为。
因为以太坊有明确的正式规范，以太网客户端有了许多独立开发的软件实现，它们之间又可以彼此交互。
1.2、基于以太坊规范的网络
存在各种基于以太坊规范的网络，这些网络基本符合以太坊“黄]]></description><category></category></item><item><title><![CDATA[Task2]]></title><link>https://blog.csdn.net/starmoth/article/details/115036584</link><guid>https://blog.csdn.net/starmoth/article/details/115036584</guid><author>starmoth</author><pubDate>Sat, 20 Mar 2021 23:22:24 +0800</pubDate><description><![CDATA[1.将固定长度字节数组转化为string类型
pragma solidity ^0.4.0;

contract bytes32tostring {
    
    bytes10 testword=0x68656c6c6f776f726c64; //为helloworld
    function bytes32ToString(bytes32 x) constant returns (string) {
        bytes memory bytesString = new bytes(32);]]></description><category></category></item><item><title><![CDATA[区块链Task1]]></title><link>https://blog.csdn.net/starmoth/article/details/114955224</link><guid>https://blog.csdn.net/starmoth/article/details/114955224</guid><author>starmoth</author><pubDate>Wed, 17 Mar 2021 23:18:14 +0800</pubDate><description><![CDATA[在阅读区块链简介后对于难点的POW和POS加深了理解:
POW的一般理解
根据难度做SHA256哈希运算, 不停寻找Nonce特定的HASH 前导0的个数越多，代表难度越大
优点是难于计算，一旦收到网络上的区块，能快速验证难度算法按高度动态调整，维持出块时间不变
POW规范链
POW易分叉，本地存储所有分叉区块CanonicalChain维护HASH和Number对应关系，标记最长链
当收到区块难度比本地高时，会发生区块回退reorg，执行块的交易，状态更新
POS
POS权益证明POW耗费电力，提高出块时]]></description><category></category></item><item><title><![CDATA[201609-2火车购票]]></title><link>https://blog.csdn.net/starmoth/article/details/103281381</link><guid>https://blog.csdn.net/starmoth/article/details/103281381</guid><author>starmoth</author><pubDate>Wed, 27 Nov 2019 18:54:49 +0800</pubDate><description><![CDATA[问题描述
　　请实现一个铁路购票系统的简单座位分配算法，来处理一节车厢的座位分配。
　　假设一节车厢有20排、每一排5个座位。为方便起见，我们用1到100来给所有的座位编号，第一排是1到5号，第二排是6到10号，依次类推，第20排是96到100号。
　　购票时，一个人可能购一张或多张票，最多不超过5张。如果这几张票可以安排在同一排编号相邻的座位，则应该安排在编号最小的相邻座位。否则应该安排在编号最...]]></description><category></category></item><item><title><![CDATA[csp工资计算]]></title><link>https://blog.csdn.net/starmoth/article/details/103223962</link><guid>https://blog.csdn.net/starmoth/article/details/103223962</guid><author>starmoth</author><pubDate>Sun, 24 Nov 2019 14:07:42 +0800</pubDate><description><![CDATA[问题描述
　　小明的公司每个月给小明发工资，而小明拿到的工资为交完个人所得税之后的工资。假设他一个月的税前工资（扣除五险一金后、未扣税前的工资）为S元，则他应交的个人所得税按如下公式计算：
　　1） 个人所得税起征点为3500元，若S不超过3500，则不交税，3500元以上的部分才计算个人所得税，令A=S-3500元；
　　2） A中不超过1500元的部分，税率3%；
　　3） A中超过1500元...]]></description><category></category></item><item><title><![CDATA[csp地铁修建]]></title><link>https://blog.csdn.net/starmoth/article/details/103223272</link><guid>https://blog.csdn.net/starmoth/article/details/103223272</guid><author>starmoth</author><pubDate>Sun, 24 Nov 2019 12:35:26 +0800</pubDate><description><![CDATA[问题描述
　　A市有n个交通枢纽，其中1号和n号非常重要，为了加强运输能力，A市决定在1号到n号枢纽间修建一条地铁。
　　地铁由很多段隧道组成，每段隧道连接两个交通枢纽。经过勘探，有m段隧道作为候选，两个交通枢纽之间最多只有一条候选的隧道，没有隧道两端连接着同一个交通枢纽。
　　现在有n家隧道施工的公司，每段候选的隧道只能由一个公司施工，每家公司施工需要的天数一致。而每家公司最多只能修建一条候选隧...]]></description><category></category></item><item><title><![CDATA[201709-2-公共钥匙盒]]></title><link>https://blog.csdn.net/starmoth/article/details/103167209</link><guid>https://blog.csdn.net/starmoth/article/details/103167209</guid><author>starmoth</author><pubDate>Wed, 20 Nov 2019 17:20:07 +0800</pubDate><description><![CDATA[问题描述
　　有一个学校的老师共用N个教室，按照规定，所有的钥匙都必须放在公共钥匙盒里，老师不能带钥匙回家。每次老师上课前，都从公共钥匙盒里找到自己上课的教室的钥匙去开门，上完课后，再将钥匙放回到钥匙盒中。
　　钥匙盒一共有N个挂钩，从左到右排成一排，用来挂N个教室的钥匙。一串钥匙没有固定的悬挂位置，但钥匙上有标识，所以老师们不会弄混钥匙。
　　每次取钥匙的时候，老师们都会找到自己所需要的钥匙将其...]]></description><category></category></item><item><title><![CDATA[201809-4再卖菜]]></title><link>https://blog.csdn.net/starmoth/article/details/103096296</link><guid>https://blog.csdn.net/starmoth/article/details/103096296</guid><author>starmoth</author><pubDate>Sat, 16 Nov 2019 11:07:09 +0800</pubDate><description><![CDATA[问题描述
　　在一条街上有n个卖菜的商店，按1至n的顺序排成一排，这些商店都卖一种蔬菜。
　　第一天，每个商店都自己定了一个正整数的价格。店主们希望自己的菜价和其他商店的一致，第二天，每一家商店都会根据他自己和相邻商店的价格调整自己的价格。具体的，每家商店都会将第二天的菜价设置为自己和相邻商店第一天菜价的平均值（用去尾法取整）。
　　注意，编号为1的商店只有一个相邻的商店2，编号为n的商店只有一个...]]></description><category></category></item><item><title><![CDATA[小明种苹果（续）]]></title><link>https://blog.csdn.net/starmoth/article/details/102081400</link><guid>https://blog.csdn.net/starmoth/article/details/102081400</guid><author>starmoth</author><pubDate>Fri, 04 Oct 2019 17:21:46 +0800</pubDate><description><![CDATA[思路:这道题还是模拟就行了。
#include &lt;iostream&gt;
#include &lt;string&gt;
#include &lt;vector&gt;
typedef long long ll;
using namespace std;
ll t;
ll m;
ll x;
ll n;
ll maxn;//记录当前树子真实结果
ll nows;//记录树子记录的结果
ll...]]></description><category></category></item><item><title><![CDATA[CCF CSP 碰撞的小球]]></title><link>https://blog.csdn.net/starmoth/article/details/102074146</link><guid>https://blog.csdn.net/starmoth/article/details/102074146</guid><author>starmoth</author><pubDate>Fri, 04 Oct 2019 15:19:20 +0800</pubDate><description><![CDATA[问题描述
数轴上有一条长度为L（L为偶数)的线段，左端点在原点，右端点在坐标L处。有n个不计体积的小球在线段上，开始时所有的小球都处在偶数坐标上，速度方向向右，速度大小为1单位长度每秒。
　　当小球到达线段的端点（左端点或右端点）的时候，会立即向相反的方向移动，速度大小仍然为原来大小。
　　当两个小球撞到一起的时候，两个小球会分别向与自己原来移动的方向相反的方向，以原来的速度大小继续移动。
　　现...]]></description><category></category></item><item><title><![CDATA[CCF认证 201812-2小明放学]]></title><link>https://blog.csdn.net/starmoth/article/details/102063659</link><guid>https://blog.csdn.net/starmoth/article/details/102063659</guid><author>starmoth</author><pubDate>Fri, 04 Oct 2019 12:55:43 +0800</pubDate><description><![CDATA[题目背景
　　汉东省政法大学附属中学所在的光明区最近实施了名为“智慧光明”的智慧城市项目。具体到交通领域，通过“智慧光明”终端，可以看到光明区所有红绿灯此时此刻的状态。小明的学校也安装了“智慧光明”终端，小明想利用这个终端给出的信息，估算自己放学回到家的时间。
问题描述
　　一次放学的时候，小明已经规划好了自己回家的路线，并且能够预测经过各个路段的时间。同时，小明通过学校里安装的“智慧光明”终端，...]]></description><category></category></item><item><title><![CDATA[USACO06FEB数字三角形]]></title><link>https://blog.csdn.net/starmoth/article/details/99093795</link><guid>https://blog.csdn.net/starmoth/article/details/99093795</guid><author>starmoth</author><pubDate>Sat, 10 Aug 2019 18:09:15 +0800</pubDate><description><![CDATA[有这么一个游戏：
写出一个11至NN的排列a_ia
i
​	 ，然后每次将相邻两个数相加，构成新的序列，再对新序列进行这样的操作，显然每次构成的序列都比上一次的序列长度少11，直到只剩下一个数字位置。下面是一个例子：
3,1,2,43,1,2,4
4,3,64,3,6
7,97,9
1616
最后得到1616这样一个数字。
现在想要倒着玩这样一个游戏，如果知道NN，知道最后得到的数字的大小sums...]]></description><category></category></item><item><title><![CDATA[房租赛-模型融合]]></title><link>https://blog.csdn.net/starmoth/article/details/98397315</link><guid>https://blog.csdn.net/starmoth/article/details/98397315</guid><author>starmoth</author><pubDate>Sun, 04 Aug 2019 00:14:26 +0800</pubDate><description><![CDATA[import pandas as pd
import numpy as np
import lightgbm as lgb
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.model_selection import KFold
from sklearn.metrics import r2_score

def ...]]></description><category></category></item><item><title><![CDATA[房租赛-模型测试]]></title><link>https://blog.csdn.net/starmoth/article/details/98081185</link><guid>https://blog.csdn.net/starmoth/article/details/98081185</guid><author>starmoth</author><pubDate>Thu, 01 Aug 2019 18:01:19 +0800</pubDate><description><![CDATA[params = {
    'num_leaves': 31,
    'min_data_in_leaf': 20,
    'min_child_samples':20,
    'objective': 'regression',
    'learning_rate': 0.01,
    "boosting": "gbdt",
    "feature_fraction": 0.8,
...]]></description><category></category></item><item><title><![CDATA[房租赛-特征]]></title><link>https://blog.csdn.net/starmoth/article/details/97616601</link><guid>https://blog.csdn.net/starmoth/article/details/97616601</guid><author>starmoth</author><pubDate>Sun, 28 Jul 2019 17:11:35 +0800</pubDate><description><![CDATA[import pandas as pd
import numpy as np
import lightgbm as lgb
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.model_selection import KFold
from sklearn.metrics import r2_score


def...]]></description><category></category></item><item><title><![CDATA[房租赛-数据处理]]></title><link>https://blog.csdn.net/starmoth/article/details/97420325</link><guid>https://blog.csdn.net/starmoth/article/details/97420325</guid><author>starmoth</author><pubDate>Fri, 26 Jul 2019 21:25:14 +0800</pubDate><description><![CDATA[import pandas as pd
import numpy as np
import lightgbm as lgb
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.model_selection import KFold
from sklearn.metrics import r2_score
def p...]]></description><category></category></item><item><title><![CDATA[房租赛-eda]]></title><link>https://blog.csdn.net/starmoth/article/details/97114420</link><guid>https://blog.csdn.net/starmoth/article/details/97114420</guid><author>starmoth</author><pubDate>Wed, 24 Jul 2019 16:35:42 +0800</pubDate><description><![CDATA[读取文件
import pandas as pd
import numpy as np
import lightgbm as lgb
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.model_selection import KFold
from sklearn.metrics import r2_score
...]]></description><category></category></item><item><title><![CDATA[python中的datatime.dt.day一系列]]></title><link>https://blog.csdn.net/starmoth/article/details/91469115</link><guid>https://blog.csdn.net/starmoth/article/details/91469115</guid><author>starmoth</author><pubDate>Tue, 11 Jun 2019 21:19:40 +0800</pubDate><description><![CDATA[1998-10-19这种日期是datatime标准形式
如果数据为1998/10/19或其他可以下面语句变为标准
train_df['label'] = (train_df['repay_date'] - train_df['auditing_date']).dt.days

2.下面这种类型的语句可以对操作后的datatime直接进行取数
pandas.series.dt.days
df[...]]></description><category></category></item><item><title><![CDATA[矩阵快速幂hdu 1575]]></title><link>https://blog.csdn.net/starmoth/article/details/90379570</link><guid>https://blog.csdn.net/starmoth/article/details/90379570</guid><author>starmoth</author><pubDate>Mon, 20 May 2019 17:57:54 +0800</pubDate><description><![CDATA[矩阵快速幂就是求方阵A的n次方，一定得是方阵.复杂度为logn，对角线相加就是矩阵的值
主要是套模板,下面给出我收藏的模板
struct mat{
    int m[maxn][maxn];
}unit;
//矩阵乘法
mat operator * (mat a,mat b)
{
    mat ret;
    ll x;
    for(int i=0;i&lt;n;i++)
    for...]]></description><category></category></item><item><title><![CDATA[python中resample函数实现重采样和降采样]]></title><link>https://blog.csdn.net/starmoth/article/details/89212122</link><guid>https://blog.csdn.net/starmoth/article/details/89212122</guid><author>starmoth</author><pubDate>Thu, 11 Apr 2019 15:32:52 +0800</pubDate><description><![CDATA[函数原型
resample(self, rule, how=None, axis=0, fill_method=None, closed=None, label=None, convention=‘start’, kind=None, loffset=None, limit=None, base=0, on=None, level=None)
比较关键的是rule,closed,label下面会随...]]></description><category></category></item></channel></rss>