# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
220800 | 2020-04-08T21:51:26 Z | Haunted_Cpp | Marko (COCI15_marko) | C++17 | 14 ms | 1536 KB |
#include<bits/stdc++.h> using namespace std; int main(){ ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); unordered_map<int,string>dict; dict[2]="abc"; dict[3]="def"; dict[4]="ghi"; dict[5]="jkl"; dict[6]="mno"; dict[7]="pqrs"; dict[8]="tuv"; dict[9]="wxyz"; int N,A=0;cin>>N; vector<string>word(N);for(int i=0;i<N;i++)cin>>word[i]; string valid;cin>>valid; for(int i=0;i<N;i++){ if(word[i].size()>valid.size())continue; for(int j=0;j<word[i].size();j++){ string ref=dict[valid[j]-'0']; if(ref.find(word[i][j])==string::npos)goto end; } A++; end:; } cout<<A<<'\n'; return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 4 ms | 384 KB | Output is correct |
2 | Correct | 5 ms | 384 KB | Output is correct |
3 | Correct | 5 ms | 384 KB | Output is correct |
4 | Correct | 13 ms | 1408 KB | Output is correct |
5 | Correct | 5 ms | 512 KB | Output is correct |
6 | Correct | 6 ms | 512 KB | Output is correct |
7 | Correct | 7 ms | 1024 KB | Output is correct |
8 | Correct | 14 ms | 1536 KB | Output is correct |
9 | Correct | 6 ms | 384 KB | Output is correct |
10 | Correct | 11 ms | 1152 KB | Output is correct |