Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- typedef long long int ll;
- int alfa[26];
- int main(){
- memset(alfa,0,sizeof(alfa));
- int n, m, k;
- cin >> n >> m >> k;
- for(int i = 0; i < n; i++){
- string s; cin >> s;
- for(int j = 0; j < s.size(); j++)
- alfa[s[j]-'a']++;
- }
- for(int i = 0; i < m; i++){
- string s; cin >> s;
- for(int j = 0; j < s.size(); j++){
- if(alfa[(s[j]-'a'+k)%26]) alfa[(s[j]-'a'+k)%26]--;
- else{
- cout << "It is gonna be daijoubu." << endl;
- return 0;
- }
- }
- }
- cout << "Make her kokoro go doki-doki!" << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement