#include <iostream>
#include <cstring>
#include <vector>
using namespace std;
int main() {
vector<string> words;
int words_count;
cin >> words_count;
string tmp;
for(int i = 0;i < words_count; i++) {
cin >> tmp;
words.push_back(tmp);
}
bool check = true;
for(int i = 0;i<words_count;i++) {
if(words[i].length() != words[0].length())
{
check = false;
}
}
if(check) {
cout << "Yes";
} else {
cout << "No";
}
return 0;
}
#include <iostream>
#include <map>
using namespace std;
int main()
{
map<char, int> table;
char c = 0;
while(cin >> c) table[c]++;
for(auto [ch, cnt] : table)
{
cout << "symbol: '" << ch << "' count: " << cnt << "\n";
}
}
#include <iostream>
#include <string>
#include <map>
using namespace std;
int main()
{
map<char, int> table;
string s;
getline(cin, s);
for(char c : s) table[c]++;
for(auto [ch, cnt] : table)
{
cout << "symbol: '" << ch << "' count: " << cnt << "\n";
}
}
#include <iostream>
#include <algorithm>
#include <string>
#include <numeric>
#include <vector>
#include <iterator>
using namespace std;
//Придумай сам алгоритм число в строку или нагугли
string lineNumberToString(int ln)
{
return to_string(ln) + " сторка ";
}
int main()
{
auto nums2dArray = vector<vector<int>>{{32,23}, {25,12}};
transform(begin(nums2dArray),
end(nums2dArray),
ostream_iterator<string>(cout, "\n"),
[](auto row){
static int lineNumber = 1;
return lineNumberToString(lineNumber++) +
to_string(accumulate(begin(row), end(row), 0));
});
}