随笔分类 -  随机乱搞

摘要:1 //初温尽量调高点,末温如果太小也调大点;玄学; 2 class Solution { 3 public: 4 int minimumXORSum(vector<int>& nums1, vector<int>& nums2) { 5 int ans=INT_MAX; 6 srand(time( 阅读全文
posted @ 2022-04-04 23:13 matt-11 阅读(68) 评论(0) 推荐(0) 编辑
摘要:无论是求最大值还是最小值;能量差值del=now-ans; del的正负性无关紧要,重要的是del的差值,也就是绝对值大小; 如果当前求的是最大值if(now>ans)ans=now,说明现在的值更优,否则完美以一定概率接受劣质解; 如果del越大说明劣质解偏差较大,我们接受它的概率就要小,否则劣质 阅读全文
posted @ 2022-04-03 20:57 matt-11 阅读(25) 评论(0) 推荐(0) 编辑
摘要:#include<bits/stdc++.h> using namespace std; typedef long long ll; ll ans,n,sum; int a[100]; int f() { int t=0; for(int i=1;i<=n/2;i++)t+=a[i]; return 阅读全文
posted @ 2022-04-03 16:29 matt-11 阅读(20) 评论(0) 推荐(0) 编辑
摘要:1 #include<bits/stdc++.h> 2 using namespace std; 3 typedef long long ll; 4 typedef double db; 5 const int N=1e3+5; 6 db ansx,ansy,answ; 7 int n; 8 str 阅读全文
posted @ 2022-04-03 15:50 matt-11 阅读(47) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示