結果
問題 | No.2737 Compound Word |
ユーザー |
|
提出日時 | 2024-04-20 14:37:02 |
言語 | TypeScript (5.7.2) |
結果 |
AC
|
実行時間 | 68 ms / 2,000 ms |
コード長 | 287 bytes |
コンパイル時間 | 8,418 ms |
コンパイル使用メモリ | 228,616 KB |
実行使用メモリ | 41,456 KB |
最終ジャッジ日時 | 2025-01-01 00:44:05 |
合計ジャッジ時間 | 11,658 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 27 |
ソースコード
let lines: string[] = require("fs").readFileSync("/dev/stdin", "utf8").split("\n");const [N] = lines[0].split(' ').map(Number);const S = lines.slice(1, N + 1);const ans = new Set(S.flatMap((s1, i) => S.map((s2, j) => i !== j ? s1 + s2 : null).filter(Boolean))).size;console.log(ans);