結果
| 問題 | No.1994 Confusing Name |
| コンテスト | |
| ユーザー |
srjywrdnprkt
|
| 提出日時 | 2023-05-14 00:05:33 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 783 bytes |
| 記録 | |
| コンパイル時間 | 835 ms |
| コンパイル使用メモリ | 138,968 KB |
| 実行使用メモリ | 14,336 KB |
| 最終ジャッジ日時 | 2026-06-30 15:32:51 |
| 合計ジャッジ時間 | 6,026 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 9 TLE * 1 -- * 18 |
ソースコード
#include <iostream>
#include <vector>
#include <cmath>
#include <map>
#include <set>
#include <iomanip>
#include <queue>
#include <algorithm>
#include <numeric>
#include <deque>
#include <complex>
#include <cassert>
using namespace std;
using ll = long long;
int main(){
int N, ans;
cin >> N;
string T;
vector<string> S(N);
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++){
T = S[i];
if (S[i][j] == 'a'+k) continue;
T[j] = 'a'+k;
ans += mp[T];
}
}
cout << ans << endl;
}
return 0;
}
srjywrdnprkt