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

做分子生物实验常用网站seo自学网视频教程

做分子生物实验常用网站,seo自学网视频教程,it外包数据,汕头门户网站New Maths 题意#xff1a; 定义一个不进位的乘法运算 ⊗#xff0c;先给出一个n#xff0c;判断是否存在a#xff0c;满足a ⊗ a n n的长度最多是25 题解#xff1a; 17 * 17正常等于289 17 ⊗ 17 149 如果a的长度为x#xff0c;那么最后得到的n的长度len是2x-1 倒…New Maths 题意 定义一个不进位的乘法运算 ⊗先给出一个n判断是否存在a满足a ⊗ a n n的长度最多是25 题解 17 * 17正常等于289 17 ⊗ 17 149 如果a的长度为x那么最后得到的n的长度len是2x-1 倒着推就是len11 n的位数小于等于25所以a的位数一定小于等于13直接暴力枚举然后判断合理性 判断依据 逐位用 O(n) 求卷积某一位的方法求出 a ⊗ a 每一位的结果并与 n 对应位进行比较。 可以发现每一位的值都是交叉相乘相加后取余如果第3位就是1×32×21×3(这里的123表示下标)。 至于为什么是交叉相乘相加得到 额。。等我搞清为什么再更新 0427 突然想起这个题 参考文章 我们可以从前往后依次填充数字然后对填的数字进行运算判断是否能完全对应因为是从前往后填所以答案一定是最小值 代码 #include stdio.h #include iostream #include algorithm #include math.h #include string.h #include vector #include stack #include queue #include map #include set #include utility #define pi 3.1415926535898 #define ll long long #define lson rt1 #define rson rt1|1 #define eps 1e-6 #define ms(a,b) memset(a,b,sizeof(a)) #define legal(a,b) ab #define print1 printf(111\n) #define pb(x) push_back(x) using namespace std; const int maxn 2e510; const int inf 0x1f1f1f1f; const ll llinf 1e1710; const ll mod 1e97;int n,len; char s[maxn]; int a[maxn]; int b[maxn]; ll ans;bool check(int k) {int res0;for(int i1; ik; i)res(resb[i]*b[k-i1])%10;return resa[k]; }void get_max() {for(int ilen1; in; i)//判断当前数字是否与N相同{if(!check(i))return;}ll tem0;for(int ilen; i1; i--)temtem*10b[i];ansmin(tem,ans); }void dfs(int x) {if(xlen)//超过长度时 判断是否满足后面半段{get_max();return;}for(int i0; i9; i)//枚举该位置上的数字{b[x]i;if(check(x))//剪枝 将该位置填入i后 判断此时得到的Bx是否和Nx相同 {dfs(x1);}}}int main() {scanf(%s,s1);lenstrlen(s1);ans1e18;if(len%20)printf(-1\n);else{nlen;for(int i1; in; i)a[n-i1]s[i]-0;len(len1)/2;dfs(1);//从1开始枚举位置printf(%lld\n,(ans1e18)?-1:ans);}system(pause);return 0; } #include map #include queue #include string #includeiostream #includestdio.h #includestring.h #include algorithm #include math.h typedef long long ll; typedef unsigned long long ull; using namespace std; typedef pairll,ll pii; #define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define mem(a,x) memset(a,x,sizeof(a)) #define debug(x) cout #x : x endl; #define rep(i,n) for(int i0;i(n);i) #define repi(i,a,b) for(int iint(a);i(b);i) #define repr(i,b,a) for(int iint(b);i(a);--i) const int maxn2e610; #define inf 0x3f3f3f3f #define sf scanf #define pf printf const int mod10000; const int MOD1e97;inline int read() {int x0;bool tfalse;char chgetchar();while((ch0||ch9)ch!-)chgetchar();if(ch-)ttrue,chgetchar();while(ch9ch0)xx*10ch-48,chgetchar();return t?-x:x; }vectorll m1; vectorll m2; priority_queuell, vectorll, greaterll mn; //上 小根堆 小到大 priority_queuell, vectorll, lessll mx; //下 大根堆 大到小 mapll,llmp; ll n,m,p; ll ans1e18; ll dis[maxn],vis[maxn]; ll a[maxn],b[maxn],c[maxn]; ll cnt,flag; bool check(ll num) {for(int i0; i60; i) c[i]0;for(int i1; inum; i) {for(int j1; jnum; j) {c[ij-1](c[ij-1]b[i]*b[j])%10;}}for(int i1; inum; i) {if(c[i]!a[i]) return 0;}return 1; } void dfs(ll num) {if(numn1) {if(check(nn-1)) {ll p0;for(int in; i1; i--) {pp*10b[i];}ansmin(ans,p);flag1;}return ;}for(int i0; i9; i) { ///数字if(numni0) continue;b[num]i;if(check(num)) {dfs(num1);}b[num]0;} } int main() {string str;cinstr;ll lenstr.size();if((len1)%21) puts(-1);else {for(int ilen,j0; i1; i--,j) {a[i]str[j]-0;}n(len1)/2;///数位dfs(1);if(!flag) puts(-1);else printf(%lld\n,ans);}return 0; }
http://www.yutouwan.com/news/121004/

相关文章:

  • 电子商务他们的代表网站西安做网站建设哪家好
  • wordpress能做图片站百度新闻首页新闻全文
  • 建设网站基本流程wordpress子 主题
  • 怎样做国外能看到的网站怎么制作网站在线人数
  • 大连制作网站报价用wordpress编写网站
  • 企业网站 asp php山西建设公司网站
  • 东莞网站建设什么价格便宜h5建站工具
  • 禅城区企业网站建设wordpress 视频模板
  • 广州网站建设模板制作有哪些做画册的网站
  • t么做文献索引ot网站专业提供网站建设服务是什么
  • 广州免费制作网站软件成都企业管理培训
  • 一般做兼职在哪个网站网站建设分工明细表
  • 电子商务网站管理系统完美版个人博客网页模板图片
  • 网站开发流行工具深圳外贸公司qc招聘
  • 网站运营的内容外贸网站海外推广3个必去网站
  • 服装网站技术解决方案手机站喝茶影视
  • 建一个网站需要什么资料网站开发都有哪些语言
  • 信用门户网站建设服装网站建设
  • 自己可以创建网站吗网站制作费用及后期运营
  • 万网网站需要的步骤网站访问者qq
  • 网站建设通用代码wordpress 设置网站目录
  • 阿里云备案网站备案域名购买用老域名做新网站 权重怎么传递
  • 网站建设有哪些渠道wordpress .mo .po
  • 山东省品牌建设促进会网站php网站开发总结
  • 网站开发教程H5网页设计图片地址怎么写
  • 定州建设厅网站wordpress标签中文404
  • 东莞网上做公司网站广州建外贸网站
  • 恩施哪里有做网站的中企动力科技股份有限公司销售
  • 高端网站设计合肥网站建设网站代码怎么查看
  • 网站设计在线培训机构企业网站管理系统站长之家