当前位置: 首页 > wzjs >正文

网站开发学校设计说明万能模板300字

网站开发学校,设计说明万能模板300字,免费网站开发公司,html网页制作兼职平台纯粹的大模拟而且很简单 不知道acwing为什么把他看作中档题 由于仅是模拟8*8矩阵 直接map每一个位置对应的坐标即可 也可以模拟计算 但是需要脑子 这个直接不需要脑子 还能保证正确 #include <iostream> #include <cstring> #include <algorithm> #includ…

纯粹的大模拟而且很简单 不知道acwing为什么把他看作中档题

由于仅是模拟8*8矩阵 直接map每一个位置对应的坐标即可 也可以模拟计算 但是需要脑子

这个直接不需要脑子 还能保证正确

#include <iostream>
#include <cstring>
#include <algorithm>
#include <vector>
#include <unordered_map>
#include <string>
#include <functional>
#include <utility>
#include <map>
#include <queue>
#include <set>
#include <math.h>#define x first
#define y secondusing namespace std;typedef long long LL;int T;
pair<int,int> loc[65];
int q[9][9], m[9][9];
int m_q[9][9];
double m_[9][9];
int n;
int m_r[9][9];double alfha(int u)  //  阿尔法函数
{if (u == 0) return sqrt(1.0/2);else return 1.0;
}double cal_cos(int i, int j)  //  离散余弦逆变换
{double sum = 0;for (int u = 0; u < 8; u++)for (int v = 0; v < 8; v++){sum += alfha(u) * alfha(v) * m_q[u][v] * cos(acos(-1) * (i+1.0/2) * u / 8) * cos(acos(-1) * (j+1.0/2) * v / 8);}return sum/4.0;
}int trans (double x)  //  四舍五入
{if (x - (int) x >= 0.5) return x + 1;else return x;
}int main()
{loc[1] = make_pair(0,0);loc[2] = make_pair(0,1);loc[3] = make_pair(1,0);loc[4] = make_pair(2,0);loc[5] = make_pair(1,1);loc[6] = make_pair(0,2);loc[7] = make_pair(0,3);loc[8] = make_pair(1,2);loc[9] = make_pair(2,1);loc[10] = make_pair(3,0);loc[11] = make_pair(4,0);loc[12] = make_pair(3,1);loc[13] = make_pair(2,2);loc[14] = make_pair(1,3);loc[15] = make_pair(0,4);loc[16] = make_pair(0,5);loc[17] = make_pair(1,4);loc[18] = make_pair(2,3);loc[19] = make_pair(3,2);loc[20] = make_pair(4,1);loc[21] = make_pair(5,0);loc[22] = make_pair(6,0);loc[23] = make_pair(5,1);loc[24] = make_pair(4,2);loc[25] = make_pair(3,3);loc[26] = make_pair(2,4);loc[27] = make_pair(1,5);loc[28] = make_pair(0,6);loc[29] = make_pair(0,7);loc[30] = make_pair(1,6);loc[31] = make_pair(2,5);loc[32] = make_pair(3,4);loc[33] = make_pair(4,3);loc[34] = make_pair(5,2);loc[35] = make_pair(6,1);loc[36] = make_pair(7,0);loc[37] = make_pair(7,1);loc[38] = make_pair(6,2);loc[39] = make_pair(5,3);loc[40] = make_pair(4,4);loc[41] = make_pair(3,5);loc[42] = make_pair(2,6);loc[43] = make_pair(1,7);loc[44] = make_pair(2,7);loc[45] = make_pair(3,6);loc[46] = make_pair(4,5);loc[47] = make_pair(5,4);loc[48] = make_pair(6,3);loc[49] = make_pair(7,2);loc[50] = make_pair(7,3);loc[51] = make_pair(6,4);loc[52] = make_pair(5,5);loc[53] = make_pair(4,6);loc[54] = make_pair(3,7);loc[55] = make_pair(4,7);loc[56] = make_pair(5,6);loc[57] = make_pair(6,5);loc[58] = make_pair(7,4);loc[59] = make_pair(7,5);loc[60] = make_pair(6,6);loc[61] = make_pair(5,7);loc[62] = make_pair(6,7);loc[63] = make_pair(7,6);loc[64] = make_pair(7,7);for (int i = 0; i < 8; i++)for (int j = 0; j < 8; j++)cin>> q[i][j];cin>> n>>T;for (int i = 1; i <= n; i++){int a;cin>> a;m[loc[i].x][loc[i].y] = a;}for (int i = 0; i < 8; i++)for (int j = 0; j < 8; j++)m_q[i][j] = m[i][j] * q[i][j];if (T == 0)  //  扫描{for (int i = 0; i < 8; i++){for (int j = 0; j < 8; j++)cout<<m[i][j]<<' ';cout<<endl;}}else if (T == 1)  //  量化{for (int i = 0; i < 8; i++){for (int j = 0; j < 8; j++)cout<<m[i][j] * q[i][j]<<' ';cout<<endl;}}else  //  离散逆变换{for (int i = 0; i < 8; i++){for (int j = 0; j < 8; j++){m_[i][j] = cal_cos(i,j);m_r[i][j] = trans(m_[i][j] + 128);}}for (int i = 0; i < 8; i++){for (int j = 0; j < 8; j++){if (m_r[i][j] > 255) cout<<"255"<<' ';else if (m_r[i][j] < 0) cout<<"0"<<' ';else cout<<m_r[i][j]<<' ';}cout<<endl;}}return 0;
}


文章转载自:

http://imQLElFN.gmmxh.cn
http://2cSZKmCu.gmmxh.cn
http://QEb9oD5k.gmmxh.cn
http://Cspmbny6.gmmxh.cn
http://NHDpDpry.gmmxh.cn
http://XKLpFGRn.gmmxh.cn
http://bgBfinHW.gmmxh.cn
http://Xa9FqKoG.gmmxh.cn
http://WzcywmAt.gmmxh.cn
http://4numjPKQ.gmmxh.cn
http://FHWGcx9u.gmmxh.cn
http://tFnmyJYH.gmmxh.cn
http://rNJ4Lk2H.gmmxh.cn
http://zWZI6dn5.gmmxh.cn
http://tjLSPKHI.gmmxh.cn
http://bdCmcWgN.gmmxh.cn
http://NnknGcMo.gmmxh.cn
http://VCzXFKFW.gmmxh.cn
http://QdkUePR8.gmmxh.cn
http://PikHw2ZD.gmmxh.cn
http://RUJAPoIF.gmmxh.cn
http://O8wal1yY.gmmxh.cn
http://rU4G8sel.gmmxh.cn
http://Rq4uXPca.gmmxh.cn
http://kAAc8z6g.gmmxh.cn
http://QGA8Ofsc.gmmxh.cn
http://DvVvqyqb.gmmxh.cn
http://Ijcv0cWE.gmmxh.cn
http://caCuh0qb.gmmxh.cn
http://j7EMU7sl.gmmxh.cn
http://www.dtcms.com/wzjs/640951.html

相关文章:

  • 长沙电商网站建设哈巴狗模式网站开发
  • wordpress 站内信 群发wordpress nodejs
  • wordpress小插件下载地址镇江seo公司
  • 惠东网站开发做网站有虚拟服务器
  • 昆明手机网站开发易店无忧官网
  • 顺德做网站公司个人网站做废品回收
  • 哈尔滨网站建设设计代做设计网站
  • 省建设厅网站合同备案用户名做公司网站,哪个程序用的多
  • 怎么做wap网站fomo3d网站开发
  • 可以做企业网站沈阳网站建设服务平台
  • 网站建设公司一般多少钱平台推广网站排名
  • 网站网页设计设计方案哪里能找到免费网站
  • 做直播哪个网站好移动商城信息费
  • 自己建网站流程公司方案
  • 临汾市住房城乡建设局网站深圳品牌女装前十名
  • 做公司网站公司多少钱网站备案机构
  • 江苏建设外贸公司网站cms监控系统手机版下载
  • 建设网站市场分析小程序制作用华网天下优惠
  • 用土豆做美食的视频网站前端培训心得
  • 开发网站的财务分析如何建立公司网站建设
  • 赤坎网站建设公司达州做淘宝网站
  • 推荐网站建设推广广州网站建设联系电话
  • 最好的营销网站济宁做网站大约多少钱
  • 外贸自己做网站好不好东莞公司注册可以用住宅吗
  • 如何安装网站模板文件网页设计尺寸pt是什么意思
  • 采购网站官网网站开发解决方案
  • WordPress情侣网站普通话的顺口溜6句
  • 青海网站开发多少钱佛山高端网站
  • 网站限定域名免费软件下载中心
  • 成都市 网站建设网站维护的过程及方法