[Logo] Mendo Judge Discussion Board - Forums
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 
Messages posted by: BATIR
Forum Index » Profile for BATIR » Messages posted by BATIR
Author Message
#include <iostream>

using namespace std;

int main()
{
string a,b;
int n;
cin>>n;
for (int k=0;k<n; k++)
{


cin>>a;
cin>>b;
bool najdeno=false;
int i=0,j=0;
while (j<b.size())
{
if (a[i]==b[j])
{
i++;
j++;
}
else
{
j++;
}

if (i==a.size())
{
najdeno=true;
break;
}
}

if (najdeno==true)
{
cout<<"DA"<<endl;
}
else
{
cout<<"NE"<<endl;
}

}

return 0;
}




EVE GO KODOT ZA ZADACA PORAKA , DOLZNOST MI E DA VI POMOGNAM , IAKO VAKA NE SE UCI!
Nvm
fala!
ako moze da se prati pobrzo pomosta bidejki e bitno

jas ja resiv ovaa zadaca po moe zosto mi dava samo dva tocni odgovori?


#include <iostream>


using namespace std;

int main()
{
int n, i, sleden;
int prv=0;
int vtor=1;

cin>>n;

cout<<1<<endl;
for(i=1; i<n; i++)
{

sleden=prv+vtor;
prv=vtor;
vtor=sleden;

cout<<sleden<<endl;
}
return 0;
}
 
Forum Index » Profile for BATIR » Messages posted by BATIR
Go to:   
Powered by JForum 2.1.8 © JForum Team