<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12

      2024.8.21 鮮花

      Never Gonna Give You Up
      We're no strangers to love
      You know the rules and so do I
      A full commitment's what I'm thinking of
      You wouldn't get this from any other guy
      I just wanna tell you how I'm feeling
      Gotta make you understand
      Never gonna give you up
      Never gonna let you down
      Never gonna run around and desert you
      Never gonna make you cry
      Never gonna say goodbye
      Never gonna tell a lie and hurt you
      We've known each other for so long
      Your heart's been aching but you're too shy to say it
      Inside we both know what's been going on
      We know the game and we're gonna play it
      And if you ask me how I'm feeling
      Don't tell me you're too blind to see
      Never gonna give you up
      Never gonna let you down
      Never gonna run around and desert you
      Never gonna make you cry
      Never gonna say goodbye
      Never gonna tell a lie and hurt you
      Never gonna give you up
      Never gonna let you down
      Never gonna run around and desert you
      Never gonna make you cry
      Never gonna say goodbye
      Never gonna tell a lie and hurt you
      (Ooh give you up)
      (Ooh give you up)
      (Ooh) never gonna give, never gonna give
      (give you up)
      (Ooh) never gonna give, never gonna give
      (give you up)
      We've known each other for so long
      Your heart's been aching but you're too shy to say it
      Inside we both know what's been going on
      We know the game and we're gonna play it
      I just wanna tell you how I'm feeling
      Gotta make you understand
      Never gonna give you up
      Never gonna let you down
      Never gonna run around and desert you
      Never gonna make you cry
      Never gonna say goodbye
      Never gonna tell a lie and hurt you
      Never gonna give you up
      Never gonna let you down
      Never gonna run around and desert you
      Never gonna make you cry
      Never gonna say goodbye
      Never gonna tell a lie and hurt you
      Never gonna give you up
      Never gonna let you down
      Never gonna run around and desert you
      Never gonna make you cry
      Never gonna say goodbye
      Never gonna tell a lie and hurt you
      

      模擬退火和本地 IO 交互。

      模擬退火:

      退火定義,有興趣可以看看 this

      當然這和算法無關。

      考慮爬山缺陷,會陷入局部解,考慮讓他跳出最優解。

      定義退火函數 \(T\),每次決策后下降(一般為乘 \([0.995,0.996]\))每次決策點偏移量乘上 \(T\)

      為了跳出局部解,要有一定概率接受不優的解。

      \(\Delta\) 為這次解和上次的差,轉移概率:

      \[P(x,y)=\begin{cases} 1 ,\ \Delta < 0 \\ e ^ {- \frac{\Delta}{T}} \ , \ \Delta > 0\end{cases} \]

      本地交互:

      重點科技:管道

      普通管道沒有辦法雙向,考慮管道文件。

      用 mkfifo 創建一個管道文件,然后就可以用這個交互了。

      具體就是創建兩個文件,分別用重定向讀入寫出,因為互相阻塞可以達到效果。

      這里實現了一個簡單的猜數交互

      猜數程序(a.cpp)

      #include<bits/stdc++.h>
      using namespace std;
      using llt=long long;
      using llf=long double;
      using ull=unsigned long long;
      #ifdef LOCAL
      	FILE *InFile=freopen("in_out/in.in","r",stdin),*OutFile=freopen("in_out/out.out","w",stdout);
      #else
      	FILE *InFile=stdin,*OutFile=stdout;
      #endif
      
      const llt RG=1e18;
      
      int main(){
      	ios::sync_with_stdio(false),cin.tie(nullptr),cout.tie(nullptr);
      	llt l=1,r=RG;
      	while(l<=r){
      		llt mid=(l+r)>>1; bool fg; cout<<"? "<<mid<<endl,cin>>fg;
      		if(fg) r=mid-1;
      		else l=mid+1;
      	}
      	cout<<"! "<<l<<endl;
      }
      

      交互程序(b.cpp)

      #include<bits/stdc++.h>
      using namespace std;
      using llt=long long;
      using llf=long double;
      using ull=unsigned long long;
      #ifdef LOCAL
      	FILE *InFile=freopen("in_out/in.in","r",stdin),*OutFile=freopen("in_out/out.out","w",stdout);
      #else
      	FILE *InFile=stdin,*OutFile=stdout;
      #endif
      
      const llt RG=1e18;
      mt19937_64 rnd(ull(new char)*ull(new char));
       
      int main(){
      	ios::sync_with_stdio(false),cin.tie(nullptr),cout.tie(nullptr);
          llt a=rnd()%RG+1,tot=0;
      	while(true){
      		char k; llt x; cin>>k>>x;
      		if(k=='?') cout<<(x>=a)<<endl,++tot;
      		else{
      			if(x!=a) return cerr<<"Sorry, you are wrong. Answer: "<<a<<' '<<x<<endl,-1;
      			else return cerr<<"Good, you are right. Times: "<<tot<<endl,0;
      		}
      	}
      }
      

      Run 記得先用 mkfifo 建 inpipe 和 outpipe

      #include<bits/stdc++.h>
      using namespace std;
      
      int main(){
      	assert(!system("g++ a.cpp -o a -O2 -std=c++14"));
      	assert(!system("g++ b.cpp -o b -O2 -std=c++14"));
          system("(./a>inpipe<outpipe)&(./b<inpipe>outpipe)");
      }
      

      注意要把先輸出的放到前面

      夙愿達成

      posted @ 2024-08-21 20:50  xrlong  閱讀(137)  評論(9)    收藏  舉報

      Loading

      主站蜘蛛池模板: 蜜臀av在线一区二区三区| 色吊丝永久性观看网站| 亚洲第一无码专区天堂| 国产午夜精品一区理论片| av天堂久久精品影音先锋| 丝袜欧美视频首页在线| 国内熟妇与亚洲洲熟妇妇| 国产成人综合在线女婷五月99播放 | 久热这里只有精品6| 扎赉特旗| 久久久久人妻精品一区三寸| 亚洲高清乱码午夜电影网| 国产精品中文字幕免费| 99久久伊人精品综合观看| 国产精品亚洲一区二区三区| 国产精品成人午夜福利| 婷婷丁香五月亚洲中文字幕| 欧美成人h亚洲综合在线观看| 中文字幕亚洲精品乱码| 国产精品爆乳在线播放第一人称| 人妻少妇久久久久久97人妻| 永久免费无码成人网站| 玩弄放荡人妻少妇系列| 精品无码国产污污污免费| 国产极品美女网站在线观看| 久久精品久久电影免费理论片| 精品国产欧美一区二区三区在线| 中文国产不卡一区二区| 久久99精品久久久久久不卡| 中文字幕在线日韩| 天堂a无码a无线孕交| 久久理论片午夜琪琪电影网| 国产综合久久99久久| 九九热在线免费视频观看| 午夜精品福利亚洲国产| 国产精品午夜福利精品| 军人粗大的内捧猛烈进出视频| 免青青草免费观看视频在线| 曝光无码有码视频专区| 国产精品原创不卡在线| 国产精品视频免费一区二区三区|