예제 #1
0
파일: WORDCHAIN.cpp 프로젝트: blmarket/icpc
void process(int dataId)
{
    int n;
    cin >> n;
    for(int i=0;i<30;i++) for(int j=0;j<30;j++) links[i][j].clear();
    output.clear();
    for(int i=0;i<n;i++)
    {
        string tmp;
        cin >> tmp;
        int c1 = tmp[0] - 'a';
        int c2 = *(tmp.rbegin()) - 'a';
        links[c1][c2].pb(tmp);
    }
}
예제 #2
0
 /** Empty the cache. */
 void clear()
 {
     map_.clear();
     list_.clear();
     size_ = 0;
 }