結果
| 問題 | No.1994 Confusing Name | 
| コンテスト | |
| ユーザー |  srjywrdnprkt | 
| 提出日時 | 2023-05-14 00:22:08 | 
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                TLE
                                 
                             | 
| 実行時間 | - | 
| コード長 | 849 bytes | 
| コンパイル時間 | 1,155 ms | 
| コンパイル使用メモリ | 119,168 KB | 
| 最終ジャッジ日時 | 2025-02-13 00:18:02 | 
| ジャッジサーバーID (参考情報) | judge5 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 13 TLE * 15 | 
ソースコード
#include <iostream>
#include <vector>
#include <cmath>
#include <map>
#include <set>
#include <iomanip>
#include <unordered_map>
#include <queue>
#include <algorithm>
#include <numeric>
#include <deque>
#include <complex>
#include <cassert>
using namespace std;
using ll = long long;
int main(){
    int N, ans;
    char c;
    cin >> N;
    vector<string> S(N);
    unordered_map<string, int> mp;
    for (int i=0; i<N; i++){
        cin >> S[i];
        mp[S[i]]++;
    }
    for (int i=0; i<N; i++){
        ans = 0;
        for (int j=0; j<S[i].size(); j++){
            for (int k=0; k<26; k++){
                c = S[i][j];
                if (c == 'a'+k) continue;
                S[i][j] = 'a'+k;
                ans += mp[S[i]];
                S[i][j] = c; 
            }
        }
        cout << ans << endl;
    }
    return 0;
}
            
            
            
        