当前位置:网站首页>1131: genetic correlation
1131: genetic correlation
2022-06-30 14:49:00 【I would, I think】
Be careful : The first is count Must be double type ,len yes int type ,m=double(count/len)
#include<string.h>
#include<iostream>
using namespace std;
int main()
{
char s1[501],s2[501];
double count;//count Must be double type
double c;
double m;
int len;
int i;
cin>>c>>s1>>s2;
len=strlen(s1);
for(i=1; i<=len; i++)
if(s1[i]==s2[i])
count++;
m=double(count/len);
if(m>=c)
cout<<"yes"<<endl;
else
cout<<"no"<<endl;
return 0;
}
Pay attention to the second :len and count Must be double type ,m=count/len perhaps m=double(count/len)
#include<string.h>
#include<iostream>
using namespace std;
int main()
{
char s1[501],s2[501];
double len,count;
double c;
double m;
int i;
cin>>c>>s1>>s2;
len=strlen(s1);
for(i=1; i<=len; i++)
if(s1[i]==s2[i])
count++;
m=count/len;
if(m>=c)
cout<<"yes"<<endl;
else
cout<<"no"<<endl;
return 0;
}
边栏推荐
- CCF call auction (full mark code + problem solving ideas + skill summary) 201412 - 3
- Four isolation levels of MySQL
- [buuctf] [geek challenge 2019] secret file
- Problem: wechat developer tool visitor mode cannot use this function
- JS array sorting method summary
- Invalid argument during startup: Failed to open the . conf file: redis-window
- [geek challenge 2019] PHP problem solving record
- 2021-07-14 mybaitsplus
- ThinkPHP v3.2 comment annotation injection write shell
- Programming of left-hand trapezoidal thread
猜你喜欢

Clear the route cache in Vue

Using docker to manage MySQL services under Windows

CCF window (Full Score code + problem solving idea) March 2, 2014

Learn about data kinship JSON format design from sqlflow JSON format

Thinkphp5 log file contains trick

How to use Alibaba Vector Icon

@PathVariable

Fastcgi CGI shallow understanding
![【BUUCTF】[GXYCTF2019]Ping Ping Ping1](/img/dc/4d87dfb0c2fa9cd75b54e092fd3971.jpg)
【BUUCTF】[GXYCTF2019]Ping Ping Ping1

CCF sequence segmentation (Full Score code + problem solving idea) 201509 -1
随机推荐
分布式--OpenResty+lua+Redis
Double pointer palindrome string
DR-TANet: Dynamic Receptive Temporal Attention Network for Street Scene Change Detection
PHP conditional operator
【BUUCTF】 EasySql
Svn password forgetting solution
DiceCTF - knock-knock
Fastcgi CGI shallow understanding
Binary rotation array (2)
PHP 2D array change key name
How to use Alibaba Vector Icon
Use of laravel repository mode
Laravel8 custom log directory, rename
PS cutting height 1px, Y-axis tiling background image problem
Knowledge learned from the water resources institute project
[extensive reading of papers] multimodal joint attribute prediction and value extraction for e-commerce product
V3 02——What‘s new in Chrome extensions
@Role of ResponseBody
Upgrade centos7 mysql5.5 to mysql5.7 non RPM in the form of tar package
PS dynamic drawing