日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 编程问答 >内容正文

编程问答

1131:基因相关性

發(fā)布時(shí)間:2024/5/6 编程问答 30 豆豆
生活随笔 收集整理的這篇文章主要介紹了 1131:基因相关性 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

時(shí)間限制: 1000 ms 內(nèi)存限制: 65536 KB
提交數(shù): 10401 通過(guò)數(shù): 5283

【題目描述】

為了獲知基因序列在功能和結(jié)構(gòu)上的相似性,經(jīng)常需要將幾條不同序列的DNA進(jìn)行比對(duì),以判斷該比對(duì)的DNA是否具有相關(guān)性。

現(xiàn)比對(duì)兩條長(zhǎng)度相同的DNA序列。定義兩條DNA序列相同位置的堿基為一個(gè)堿基對(duì),如果一個(gè)堿基對(duì)中的兩個(gè)堿基相同的話,則稱為相同堿基對(duì)。接著計(jì)算相同堿基對(duì)占總堿基對(duì)數(shù)量的比例,如果該比例大于等于給定閾值時(shí)則判定該兩條DNA序列是相關(guān)的,否則不相關(guān)。

【輸入】

有三行,第一行是用來(lái)判定出兩條DNA序列是否相關(guān)的閾值,隨后2行是兩條DNA序列(長(zhǎng)度不大于500)。

【輸出】

若兩條DNA序列相關(guān),則輸出“yes”,否則輸出“no”。

【輸入樣例】

0.85
ATCGCCGTAAGTAACGGTTTTAAATAGGCC
ATCGCCGGAAGTAACGGTCTTAAATAGGCC

【輸出樣例】

yes

【來(lái)源】

No

code

/*^....0^ .1 ^1^.. 011.^ 1.0^ 1 ^ ^0.11 ^ ^..^0. ^ 0^.0 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1000^.1 ^.^ . 00.. 1.1 0. 01. . 1. .^1. 1 1. ^0^ . ^.1 00 01^.0 001. .^*/ // An_all_in_one_book_on_Informatics —— 1131.cpp created by VB_KoKing on 2019,04,25,11. /* Procedural objectives:Procedural thinking:Functions required by the program:Variables required by the program:*/ /* My dear Max said: "I like you, So the first bunch of sunshine I saw in the morning is you, The first hurricane that passed through your ear is you, The first star you see is also you. The world I see is all your shadow."FIGHTING FOR OUR FUTURE!!! */ #include <iostream> using namespace std; int main() {int num=0;double flag;string str1,str2;cin>>flag>>str1>>str2;for (int i = 0; i < str1.length(); i++) {if (str1[i]==str2[i]) num++;}double temp=1.0*num/str1.length(); // cout<<temp<<endl;if (temp>flag) cout<<"yes"<<endl;else cout<<"no"<<endl;return 0; }

總結(jié)

以上是生活随笔為你收集整理的1131:基因相关性的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。