上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 27 下一页
摘要: 2,某模型 机 有 8 条 指 令I1 ~I8,它 们 的 使 用 频 度 分 别 为 0.3,0.3,0.2,0.1,0.05,0.02,0.02,0.01。 (1)试分别用 Huffman编码和平均码长最短的等长扩展码(限定为两种码长)对其操作码进行编码。 (2)分别计算 Huffman编码和等 阅读全文
posted @ 2022-03-15 22:49 ethon-wang 阅读(59) 评论(0) 推荐(0) 编辑
摘要: code #include<iostream> #include<algorithm> using namespace std; int n, m, k, tot = 0; const int N = 2e5 + 50; //languige come from scientiet,audio an 阅读全文
posted @ 2022-03-15 09:25 ethon-wang 阅读(32) 评论(0) 推荐(0) 编辑
摘要: code // Forward declaration of compare API. // bool compare(int a, int b); // return bool means whether a is less than b. class Solution { public: vec 阅读全文
posted @ 2022-03-14 14:51 ethon-wang 阅读(24) 评论(0) 推荐(0) 编辑
摘要: code #include<iostream> #include<algorithm> using namespace std; const int N = 1e5 + 10; int cows[N]; double sum[N]; int n, m; bool check(double avg) 阅读全文
posted @ 2022-03-13 12:07 ethon-wang 阅读(36) 评论(0) 推荐(0) 编辑
摘要: code #include<iostream> #include<algorithm> #include<set> using namespace std; const int N=1e4+10; set<pair<int,int>> existed; int n,p,h,m; int c[N],d 阅读全文
posted @ 2022-03-13 10:20 ethon-wang 阅读(35) 评论(0) 推荐(0) 编辑
摘要: code #include<iostream> #include<algorithm> using namespace std; using ll=long long; const int N=110000; ll n,m,i,j,p,q,a[N]; //p为b序列中正数之和,而q为b序列中负数之和 阅读全文
posted @ 2022-03-12 14:24 ethon-wang 阅读(24) 评论(0) 推荐(0) 编辑
摘要: Q A #include<iostream> #include<cstring> #include<algorithm> using namespace std; const int N = 5e3 + 10; int s[N][N]; int n, r; int main() { ios::syn 阅读全文
posted @ 2022-03-12 10:23 ethon-wang 阅读(43) 评论(0) 推荐(0) 编辑
摘要: Q A #include<iostream> #include<complex> #include<iomanip> using namespace std; using LL = long long ; using PLL = pair<LL,LL>; PLL calc(LL n,LL m){ i 阅读全文
posted @ 2022-03-11 13:11 ethon-wang 阅读(25) 评论(0) 推荐(0) 编辑
摘要: #include<iostream> using namespace std; #define Mod 9901 #define ll long long int a,b; int ksm(int a,int b){ int ans=1; a%=Mod; while(b){ if(b&1){ ans 阅读全文
posted @ 2022-03-10 14:25 ethon-wang 阅读(19) 评论(0) 推荐(0) 编辑
摘要: Q 你玩过“拉灯”游戏吗? 25 盏灯排成一个 5×5 的方形。 每一个灯都有一个开关,游戏者可以改变它的状态。 每一步,游戏者可以改变某一个灯的状态。 游戏者改变一个灯的状态会产生连锁反应:和这个灯上下左右相邻的灯也要相应地改变其状态。 我们用数字 1 表示一盏开着的灯,用数字 0 表示关着的灯。 阅读全文
posted @ 2022-03-10 11:37 ethon-wang 阅读(28) 评论(0) 推荐(0) 编辑
上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 27 下一页