Submission #383144

# Submission time Handle Problem Language Result Execution time Memory
383144 2021-03-28T22:29:29 Z Iwanttobreakfree Kartomat (COCI17_kartomat) C++17
72 / 80
1 ms 364 KB
#include <iostream>
#include <vector>
#include <string>
using namespace std;
int main(){
	int n;
	string st;
	vector<bool> l(26);
	cin>>n;
	vector<string> str(n);
	for(int i=0;i<n;i++)cin>>str[i];
	cin>>st;
	int k=st.length();
	for(int i=0;i<n;i++){
		bool pos=true;
		for(int j=0;j<k;j++){
			if(str[i][j]!=st[j]){
				pos=false;
				break;
			}
			if(pos)l[str[i][k]-'A']=true;
		}
	}
	cout<<"***";
	for(int i=0;i<5;i++){
		char c=i+'A';
		if(l[i])cout<<c;
		else cout<<'*';
	}
	cout<<'\n';
	for(int i=5;i<13;i++){
		char c=i+'A';
		if(l[i])cout<<c;
		else cout<<'*';
	}
	cout<<'\n';
	for(int i=13;i<21;i++){
		char c=i+'A';
		if(l[i])cout<<c;
		else cout<<'*';
	}
	cout<<'\n';
	for(int i=21;i<26;i++){
		char c=i+'A';
		if(l[i])cout<<c;
		else cout<<'*';
	}
	cout<<"***";
	cout<<'\n';
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
4 Correct 1 ms 364 KB Output is correct
5 Correct 1 ms 364 KB Output is correct
6 Correct 1 ms 364 KB Output is correct
7 Correct 1 ms 364 KB Output is correct
8 Correct 1 ms 364 KB Output is correct
9 Incorrect 1 ms 364 KB Output isn't correct
10 Correct 1 ms 364 KB Output is correct