1) #include <iostream>
#include <set>
#include <vector>
using namespace std;
signed main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
string a,b;
cin >> a >> b;
if(tolower(a[0]) == tolower(b[b.length()-1]))
cout << "YES";
else
cout << "NO";
}
2)
#include <iostream>
string s = "tros";
reverse(s.begin(),s.end());
cout << s << "\n";
for(int i = s.length()-1; i >= 0; i -= 2)
cout << s[i];
for(int i = s.length()-2; i >= 0; i -= 2)
cout << "\n";
cout << s[2] << s[1] << s[0] << s[3];
3)
string s;
set<int> st;
for(int i = 0; i < 10; i++)
st.insert(i);
getline(cin,s);
for(auto i: s)
{
if(st.find(int(i)-48) != st.end())
return 0;
cout << "NO"
for(
1) #include <iostream>
#include <set>
#include <vector>
using namespace std;
signed main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
string a,b;
cin >> a >> b;
if(tolower(a[0]) == tolower(b[b.length()-1]))
cout << "YES";
else
cout << "NO";
}
2)
#include <iostream>
#include <set>
#include <vector>
using namespace std;
signed main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
string a,b;
string s = "tros";
reverse(s.begin(),s.end());
cout << s << "\n";
for(int i = s.length()-1; i >= 0; i -= 2)
cout << s[i];
for(int i = s.length()-2; i >= 0; i -= 2)
cout << s[i];
cout << "\n";
cout << s[2] << s[1] << s[0] << s[3];
}
3)
#include <iostream>
#include <set>
#include <vector>
using namespace std;
signed main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
string s;
set<int> st;
for(int i = 0; i < 10; i++)
st.insert(i);
getline(cin,s);
for(auto i: s)
{
if(st.find(int(i)-48) != st.end())
{
cout << "YES";
return 0;
}
}
cout << "NO";
}
1) #include <iostream>
#include <set>
#include <vector>
using namespace std;
signed main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
string a,b;
cin >> a >> b;
if(tolower(a[0]) == tolower(b[b.length()-1]))
cout << "YES";
cout << "NO"
2)
#include <iostream>
#include <set>
#include <vector>
using namespace std;
signed main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
string a,b;
string s = "tros";
reverse(s.begin(),s.end());
cout << s << "\n";
for(int i = s.length()-1; i >= 0; i -= 2)
cout << s[i];
for(int i = s.length()-2; i >= 0; i -= 2)
cout << s[i];
cout << "\n";
cout << s[2] << s[1] << s[0] << s[3];
3)
#include <iostream>
#include <set>
#include <vector>
using namespace std;
signed main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
string s;
set<int> st;
for(int i = 0; i < 10; i++)
st.insert(i);
getline(cin,s);
for(
if(st.find(int(i)-48) != st.end())
cout << "YES";
return 0;
cout << "NO";