結果

問題 No.1994 Confusing Name
ユーザー achapiachapi
提出日時 2024-10-12 13:27:49
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 437 bytes
コンパイル時間 2,393 ms
コンパイル使用メモリ 208,112 KB
実行使用メモリ 8,832 KB
最終ジャッジ日時 2024-10-12 13:28:21
合計ジャッジ時間 28,539 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 3 ms
5,248 KB
testcase_02 AC 2 ms
5,248 KB
testcase_03 AC 2 ms
5,248 KB
testcase_04 AC 2 ms
5,248 KB
testcase_05 AC 8 ms
5,248 KB
testcase_06 AC 17 ms
5,248 KB
testcase_07 AC 4 ms
5,248 KB
testcase_08 AC 12 ms
5,248 KB
testcase_09 AC 19 ms
5,248 KB
testcase_10 AC 9 ms
5,248 KB
testcase_11 AC 7 ms
5,248 KB
testcase_12 AC 1,687 ms
8,832 KB
testcase_13 TLE -
testcase_14 AC 1,735 ms
8,448 KB
testcase_15 AC 1,359 ms
7,680 KB
testcase_16 AC 1,176 ms
7,040 KB
testcase_17 AC 1,347 ms
7,424 KB
testcase_18 AC 1,811 ms
8,704 KB
testcase_19 AC 1,772 ms
8,832 KB
testcase_20 AC 1,800 ms
8,832 KB
testcase_21 AC 315 ms
5,248 KB
testcase_22 AC 125 ms
5,248 KB
testcase_23 AC 1,615 ms
8,448 KB
testcase_24 AC 1,691 ms
8,448 KB
testcase_25 AC 926 ms
6,656 KB
testcase_26 AC 409 ms
5,248 KB
testcase_27 AC 1,549 ms
7,936 KB
testcase_28 AC 1,109 ms
6,784 KB
testcase_29 AC 90 ms
5,248 KB
testcase_30 AC 1,166 ms
7,168 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
int main(){
	int N;
	cin >> N;
	vector<string> S(N);
	for (int i = 0; i < N; i++){
		cin >> S[i];
	}
	set<string> st(S.begin(), S.end());
	for (int i = 0; i < N; i++){
		int ans = 0;
		for (int j = 0; j < (int) S[i].size(); j++){
			auto T = S[i];
			for (int k = 0; k < 26; k++){
				T[j] = 'a' + k;
				if (st.count(T) > 0){
					ans++;
				}
			}
			ans--;
		}
		cout << ans << endl;
	}
}
0