def getSortedProblemList(lines):
    num_problem_mapping = dict()
    for line in lines:
        if line:
            num, name = line.split(" ", maxsplit=1)
            num_problem_mapping[int(num)] = name
    print(sorted(num_problem_mapping.items()))
    print(len(num_problem_mapping))


if __name__ == '__main__':
    ip = ['283 Move Zeroes',
          '301 Remove Invalid Parentheses',
          '273 Integer to English Words',
          '325 Maximum Size Subarray Sum Equals k',
          '67 Add Binary',
          '621 Task Scheduler',
          '253 Meeting Rooms II',
          '17 Letter Combinations of a Phone Number',
          '311 Sparse Matrix Multiplication',
          '91 Decode Ways 19.8%',
          '297 Serialize and Deserialize Binary Tree',
          '314 Binary Tree Vertical Order Traversal',
          '10 Regular Expression Matching',
          '15 3Sum',
          '158 Read N Characters Given Read4 II – Call multiple times',
          '278 First Bad Version',
          '277 Find the Celebrity',
          '200 Number of Islands',
          '76 Minimum Window Substring',
          '257 Binary Tree Paths',
          '282 Expression Add Operators',
          '23 Merge k Sorted Lists',
          '157 Read N Characters Given Read4',
          '121 Best Time to Buy and Sell Stock',
          '602 Friend Requests II: Who Has the Most Friends',
          '56 Merge Intervals',
          '161 One Edit Distance',
          '173 Binary Search Tree Iterator',
          '1 Two Sum',
          '543 Diameter of Binary Tree',
          '211 Add and Search Word – Data structure design',
          '341 Flatten Nested List Iterator',
          '252 Meeting Rooms',
          '125 Valid Palindrome',
          '597 Friend Requests I: Overall Acceptance Rate',
          '139 Word Break',
          '636 Exclusive Time of Functions',
          '285 Inorder Successor in BST',
          '78 Subsets',
          '98 Validate Binary Search Tree',
          '43 Multiply Strings',
          '75 Sort Colors',
          '670 Maximum Swap',
          '57 Insert Interval',
          '133 Clone Graph',
          '215 Kth Largest Element in an Array',
          '33 Search in Rotated Sorted Array',
          '13 Roman to Integer',
          '206 Reverse Linked List',
          '79 Word Search',
          '494 Target Sum',
          '236 Lowest Common Ancestor of a Binary Tree',
          '398 Random Pick Index',
          '477 Total Hamming Distance',
          '38 Count and Say',
          '680 Valid Palindrome II',
          '49 Group Anagrams',
          '88 Merge Sorted Array',
          '218 The Skyline Problem',
          '146 LRU Cache',
          '238 Product of Array Except Self',
          '209 Minimum Size Subarray Sum',
          '102 Binary Tree Level Order Traversal',
          '90 Subsets II',
          '71 Simplify Path',
          '286 Walls and Gates',
          '128 Longest Consecutive Sequence',
          '639 Decode Ways II',
          '523 Continuous Subarray Sum',
          '334 Increasing Triplet Subsequence',
          '208 Implement Trie (Prefix Tree)',
          '28 Implement strStr()',
          '269 Alien Dictionary',
          '127 Word Ladder',
          '647 Palindromic Substrings',
          '377 Combination Sum IV',
          '20 Valid Parentheses',
          '44 Wildcard Matching',
          '554 Brick Wall',
          '235 Lowest Common Ancestor of a Binary Search Tree',
          '380 Insert Delete GetRandom O(1)',
          '50 Pow(x, n)',
          '117 Populating Next Right Pointers in Each Node II',
          '69 Sqrt(x)',
          '461 Hamming Distance',
          '85 Maximal Rectangle',
          '210 Course Schedule II',
          '26 Remove Duplicates from Sorted Array',
          '68 Text Justification',
          '221 Maximal Square',
          '274 H-Index',
          '404 Sum of Left Leaves',
          '25 Reverse Nodes in k-Group',
          '234 Palindrome Linked List',
          '689 Maximum Sum of 3 Non-Overlapping Subarrays',
          '80 Remove Duplicates from Sorted Array II',
          '168 Excel Sheet Column Title',
          '261 Graph Valid Tree',
          '265 Paint House II',
          '275 H-Index II',
          '410 Split Array Largest Sum',
          '525 Contiguous Array',
          '674 Longest Continuous Increasing Subsequence',
          '572 Subtree of Another Tree',
          '578 Get Highest Answer Rate Question',
          '637 Average of Levels in Binary Tree',
          '642 Design Search Autocomplete System',
          '653 Two Sum IV – Input is a BST',
          '673 Number of Longest Increasing Subsequence',
          '535 Encode and Decode TinyURL']
    getSortedProblemList(ip)
