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

模板网站是什么意思软件外包培训学院

模板网站是什么意思,软件外包培训学院,能打开各种网站的浏览器app,325建筑网站【蓝桥杯冲冲冲】Prime Gift 蓝桥杯备赛 | 洛谷做题打卡day31 文章目录 蓝桥杯备赛 | 洛谷做题打卡day31Prime Gift题面翻译题目描述输入格式输出格式样例 #1样例输入 #1样例输出 #1 样例 #2样例输入 #2样例输出 #2 提示题解代码我的一些话 Prime Gift 题面翻译 给你 n n n 个…【蓝桥杯冲冲冲】Prime Gift 蓝桥杯备赛 | 洛谷做题打卡day31 文章目录 蓝桥杯备赛 | 洛谷做题打卡day31Prime Gift题面翻译题目描述输入格式输出格式样例 #1样例输入 #1样例输出 #1 样例 #2样例输入 #2样例输出 #2 提示题解代码我的一些话 Prime Gift 题面翻译 给你 n n n 个互不相同的素数 p 1 , p 2 , ⋯ , p n p_1,p_2,\cdots,p_n p1​,p2​,⋯,pn​它们组成一个集合 P P P。 请你求出第 k k k 小的正整数满足 该数字的所有素因子 ∈ P \in P ∈P 1 ≤ n ≤ 16 , 2 ≤ p i ≤ 100 , 1\le n\le 16,2\le p_i\le 100, 1≤n≤16,2≤pi​≤100, 保证答案不超过 1 0 18 10^{18} 1018。 题目描述 Opposite to Grisha’s nice behavior, Oleg, though he has an entire year at his disposal, didn’t manage to learn how to solve number theory problems in the past year. That’s why instead of Ded Moroz he was visited by his teammate Andrew, who solemnly presented him with a set of $ n $ distinct prime numbers alongside with a simple task: Oleg is to find the $ k $ -th smallest integer, such that all its prime divisors are in this set. 输入格式 The first line contains a single integer $ n $ ( $ 1n16 $ ). The next line lists $ n $ distinct prime numbers $ p_{1},p_{2},…,p_{n} $ ( $ 2p_{i}100 $ ) in ascending order. The last line gives a single integer $ k $ ( $ 1k $ ). It is guaranteed that the $ k $ -th smallest integer such that all its prime divisors are in this set does not exceed $ 10^{18} $ . 输出格式 Print a single line featuring the $ k $ -th smallest integer. It’s guaranteed that the answer doesn’t exceed $ 10^{18} $ . 样例 #1 样例输入 #1 3 2 3 5 7样例输出 #1 8样例 #2 样例输入 #2 5 3 7 11 13 31 17样例输出 #2 93提示 The list of numbers with all prime divisors inside $ {2,3,5} $ begins as follows: $ (1,2,3,4,5,6,8,…) $ The seventh number in this list ( $ 1 $ -indexed) is eight. 题解代码 学会利用新知自己多试试并尝试积攒一些固定解答方案debug以下是题解代码 ~ #includebits/stdc.h using namespace std; typedef long long LL; #define REP(a,b,c) for(int ab;ac;a) int n,a[110],k; LL A[5000010],B[5000010]; int lenA0,lenB0; inline void dfs1(int x,LL s) {A[lenA]s;if (xn) return ;for(LL i1;;i*a[x]) {if (1e18/is) break;dfs1(x2,s*i);} } inline void dfs2(int x,LL s) {B[lenB]s;if (xn) return ;for(LL i1;;i*a[x]) {if (1e18/is) break;dfs2(x2,s*i);} } inline LL check(LL mid) {LL ans0; int jlenB;REP(i,1,lenA) {while (j0B[j]mid/A[i]) j--;ans1ll*j;}return ans; } int main() {ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);cinn; REP(i,1,n) cina[i]; cink;sort(a1,an1);dfs1(1,1); dfs2(2,1);LL l0,r1e18;sort(A1,AlenA1);sort(B1,BlenB1);lenAunique(A1,AlenA1)-A-1;lenBunique(B1,BlenB1)-B-1;while (lr) {LL mid(lr)1;if (check(mid)k) rmid;else lmid1;}coutrendl;return 0; }//完结撒花! の_^我的一些话 今天学习动态规划dp属于比较难的部分这题利用记忆化搜索即可快速解决需要多动脑多思考思路还是很好掌握的虽然一次性AC有一定难度需要通盘的考虑和理解以及扎实的数据结构基础才能独立写出AC代码。但无论难易大家都要持续做题保持题感喔一起坚持(o´ωo) 如果有非计算机专业的uu自学的话关于数据结构的网课推荐看b站上青岛大学王卓老师的课讲的很细致有不懂都可以私信我喔 总结来说思路很重要多想想多在草稿纸上画画用测试数据多调试debug后成功编译并运行出正确结果真的会感到很幸福 关于之前蓝桥杯备赛的路线和基本方法、要掌握的知识之前的博文我都有写欢迎大家关注我翻阅自取哦~ 不管什么都要坚持吧三天打鱼两天晒网无法形成肌肉记忆和做题思维该思考的时候一定不要懈怠今天就说这么多啦欢迎评论留言一起成长
http://www.hkea.cn/news/14263471/

相关文章:

  • 汕尾英文网站建设网站开发团队名字
  • 南昌网站关键词排名长沙线上注册推广公司
  • 素材网站视频知名网站制作公
  • 从化市网站建设建个人网站有什么好处
  • 商业网站建设案例教程网络营销的含义和特点
  • 做的物流网站有哪些广州番禺区有什么好玩的地方
  • 网站建设的栏目网页个人简历模板
  • 漯河市源汇区建设局网站世界最大的互联网公司
  • 赤峰建设局网站wordpress charts
  • 企业培训 电子商务网站建设 图片怎么在百度发布免费广告
  • 做网站找人做网站怎么更新静态页
  • 网站挂马黑链检测清除工具磁力吧最佳搜索引擎
  • 免费制作永久个人网站淄博网站设计制作
  • 生鲜农产品网站建设微信小程序源码网站
  • 网站建设入的什么科目wordpress多个主题
  • 常州网站制作哪家好北京 工业网站建设公司
  • 做平面设计都在那个网站找免费素材?免费网站app哪个好
  • 大连网站制作流程承包网站开发
  • 南宁做网站seo怎么建立一个好公司网站
  • 50个单页面网站设计欣赏(2)网页直接玩的传奇
  • 洛阳企业网站建设北仑网站制作
  • 手机网站打不开wordpress局域网无法访问
  • 网站推广服务费会计分录怎么做网页设计与网站建设简答题
  • 网站备案时间广州越秀区重点场所
  • 网站开发合同付款比例wordpress logo 尺寸
  • 安徽城乡建设网站电脑做微信推送的网站
  • 铜陵高端网站建设查看网站是否备案
  • 淘宝客优惠券网站建设加盟官网海南海口网站开发公司
  • 做生意的网站久久人才招聘网
  • 博物馆网站做的最好的frontpage做视频网站