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

做传销网站的程序员犯法吗安徽新站优化

做传销网站的程序员犯法吗,安徽新站优化,手机上怎么做网站,公司网站建设重要性纯粹的大模拟而且很简单 不知道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://www.dtcms.com/wzjs/224517.html

相关文章:

  • 罗湖商城网站建设哪家公司便宜点网上销售
  • 各网站文风中山网站seo
  • 浙江平湖建设局网站推广项目网站
  • 珠海关键词优化收费漯河搜狗关键词优化排名软件
  • 那里有制作网站公司哈尔滨企业网站模板建站
  • 东莞seo优化推广seo流量优化
  • 网站怎么做微信推广线上推广具体应该怎么做
  • 当今做哪个网站能致富seo教程论坛
  • 集趣网站怎么做兼职搜索引擎下载入口
  • 微信公众号怎么做链接网站搜狗网站
  • 西安哪家公司制作响应式网站建设精准营销的典型案例
  • 做网站上传的图片大小网络推广包括哪些
  • 做互联网小程序 和网站有没有前景自己建网站需要钱吗
  • 北京朝阳做网站郑州整站网站优化
  • 怎么做网站的轮播图优化seo招聘
  • 厦门蓝典网站建设推广普通话手抄报模板可打印
  • 湖南网站建设免费推广产品的平台
  • wordpress的登陆地址独立站seo是什么
  • 网站一直没有收录百度查一下
  • 机械网站开发方案正规网站建设公司
  • 自己做影视会员网站外包公司软件开发
  • h5能做网站开发吗优化大师平台
  • 网络运维服务平台北京seo优化
  • 学习做ppt 的网站国内能用的搜索引擎
  • 门户网站建设经验总结报告业务推广平台
  • aws的永久免费服务淄博seo公司
  • 如何设计网站后台如何做好网站站内优化
  • 做网站联盟要多少钱上海网站营销推广
  • 做网站备案实名需要钱吗企业网站优化方案
  • 泊头网站建设甘肃微信小程序官网