We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
0 parents commit 71d22eeCopy full SHA for 71d22ee
41A.cpp
@@ -0,0 +1,18 @@
1
+#include<iostream>
2
+#include<string>
3
+#include<algorithm>
4
+
5
+using namespace std;
6
7
+int main(){
8
+ string s1,s2;
9
+ cin>>s1;
10
+ cin>>s2;
11
+ reverse(s2.begin(),s2.end());
12
+ if(s1 == s2){
13
+ cout<<"YES"<<endl;
14
+ }
15
+ else{
16
+ cout<<"NO"<<endl;
17
18
+}
4C.cpp
@@ -0,0 +1,28 @@
+#include<map>
+string s[100010];
+map <string,int> mp;
+ int n;
+ cin >> n;
+ for (int i = 0; i < n; i++)
+ {
+ cin >> s[i];
+ if (mp.find(s[i]) == mp.end())
19
+ printf("OK\n");
20
+ mp[s[i]] = 1;
21
22
+ else
23
24
+ cout << s[i] << mp[s[i]] << endl;
25
+ mp[s[i]]++;
26
27
28
0 commit comments