public static void main(String[] args) { Scanner sc = new Scanner(System.in); String[] strTemp = sc.nextLine().split("]"); List<List<Integer>> map = new LinkedList(); for(String str : strTemp) { List<Integer> path = new LinkedList<>(); for (int i = 0; i < str.length(); i++) { if(str.charAt(i) - '0' >= 0 &;&; str.charAt(i) - '0' <= 9) { path.add(str.charAt(i) - '0' ); } } map.add(new ArrayList(path)); } boolean res = verify(map); System.out.print(res); }
点赞 评论

相关推荐

牛客网
牛客企业服务