結果
問題 | No.1994 Confusing Name |
ユーザー | kokatsu |
提出日時 | 2022-07-01 22:01:06 |
言語 | D (dmd 2.106.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 596 bytes |
コンパイル時間 | 2,021 ms |
コンパイル使用メモリ | 202,060 KB |
実行使用メモリ | 26,552 KB |
最終ジャッジ日時 | 2023-09-04 17:35:56 |
合計ジャッジ時間 | 6,210 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
4,384 KB |
testcase_01 | AC | 2 ms
4,380 KB |
testcase_02 | AC | 2 ms
4,384 KB |
testcase_03 | AC | 1 ms
4,380 KB |
testcase_04 | AC | 1 ms
4,380 KB |
testcase_05 | AC | 32 ms
6,664 KB |
testcase_06 | AC | 66 ms
7,764 KB |
testcase_07 | AC | 16 ms
6,180 KB |
testcase_08 | AC | 51 ms
7,708 KB |
testcase_09 | AC | 74 ms
7,720 KB |
testcase_10 | AC | 34 ms
6,924 KB |
testcase_11 | AC | 32 ms
6,660 KB |
testcase_12 | TLE | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
testcase_24 | -- | - |
testcase_25 | -- | - |
testcase_26 | -- | - |
testcase_27 | -- | - |
testcase_28 | -- | - |
testcase_29 | -- | - |
testcase_30 | -- | - |
ソースコード
import std; void main() { int N; readf("%d\n", N); auto S = new string[](N); bool[string] isRegistered; foreach (i; 0 .. N) { S[i] = readln.chomp; isRegistered[S[i]] = true; } foreach (s; S) { int res; auto t = s.dup.to!(dchar[]); auto len = t.length; foreach (i; 0 .. len) { foreach (l; lowercase) { if (l == s[i]) continue; t[i] = l; if (t.to!string in isRegistered) ++res; } t[i] = s[i]; } res.writeln; } }