wklejamy.pl website for sale. You are interested in. Please contact. wklejamy@gmail.com
Click to buy coffeUntitled
Guest 493 3rd Apr, 2023
#include <iostream>
#include <fstream>
using namespace std;
bool czy_pot_2(int a)
{
for(int i=1;i<=2048;i*=2)
{
if(i==a) return true;
else if(i>a) return false;
}
}
bool podzial(string s)
{
string temp;
for(int i=0;i<s.size();i+=2)
{
if(s[i]=='B' && s[i+1]=='D') temp.push_back('A');
else if(s[i]=='C' && s[i+1]=='A') temp.push_back('B');
else if(s[i]=='C' && s[i+1]=='D') temp.push_back('B');
else if(s[i]=='D' && s[i+1]=='D') temp.push_back('C');
else if(s[i]=='B' && s[i+1]=='C') temp.push_back('D');
else return true;
}
if(temp.size()==1) return false;
return podzial(temp);
}
int main()
{
string s;
int suma=0;
ifstream plik("genetyka_1.txt");
{
while(plik>>s)
{
suma+=podzial(s);//cout<<s<<" "<<suma<<"\n";
}
}
cout<<suma;
return 0;
}
To share this paste please copy this url and send to your friends
RAW Paste Data
Recent Pastes
- Wanted to get the drift what your opinion is on this point
Xeora | 14 | 16 hours ago
- psycho
Markup | 17 | 19 hours ago
- Untitled
Markup | 28 | 1 day ago
- Untitled
Markup | 17 | 1 day ago
- Выгодное предложение для каждого человека
Q (kdb+ database) | 15 | 1 day ago
- Untitled
Markup | 56 | 2 days ago
- гадалка в пензе подскажите - гадалки пенза
Arduino | 24 | 2 days ago