結果
問題 | No.1994 Confusing Name |
ユーザー |
![]() |
提出日時 | 2022-07-31 13:43:31 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 493 bytes |
コンパイル時間 | 1,688 ms |
コンパイル使用メモリ | 174,352 KB |
実行使用メモリ | 8,832 KB |
最終ジャッジ日時 | 2024-07-20 22:40:38 |
合計ジャッジ時間 | 29,939 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 23 TLE * 5 |
ソースコード
#include <bits/stdc++.h>using namespace std;int main() {int n;cin >> n;vector<string> s(n);set<string> st;for (int i = 0; i < n; i++) {cin >> s[i];st.insert(s[i]);}for (int i = 0; i < n; i++) {int ans = 0;for (int j = 0; j < s[i].size(); j++) {for (char c = 'a'; c <= 'z'; c++) {if (s[i][j] == c) continue;string t = s[i];t[j] = c;ans += st.count(t);}}cout << ans << endl;}return 0;}