public static void main(String[] args) { Scanner in = new Scanner(System.in); int m = in.nextInt(); Set<String> sets = new HashSet<String>(); in.nextLine(); for(int i = 0 ; i < m; ++i){ String str = in.nextLine(); char[] chs = str.toCharArray(); Arrays.sort(chs); sets.add(new String(chs)); } System.out.println(sets.size()); } 思路是一样的 但是我这个AC了
点赞 评论

相关推荐

05-07 20:52
吉林大学 Java
点赞 评论 收藏
分享
04-14 20:10
已编辑
门头沟学院 Java
点赞 评论 收藏
分享
豆泥🍀:同26届,加油,我也还没找到查看图片
点赞 评论 收藏
分享
牛客网
牛客企业服务