{"problem":{"name":"F. Print Mix Strings","description":{"content":"While I was working in the company, the internet broke. I didn't have anything to do without internet, so I decided to write this ACM problem.  We need to mix between two strings and also we should k","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":2000,"memory_limit":65536},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF10088F"},"statements":[{"statement_type":"Markdown","content":"While I was working in the company, the internet broke. I didn't have anything to do without internet, so I decided to write this ACM problem. \n\nWe need to mix between two strings and also we should keep the same order for both strings. \n\nExample: if we have s1 = \"ab\" and s2 = \"cd\", we can generate six strings: \n\nabcd   acbd \n\nacdb cdab \n\ncadb cabd \n\nthank you for your help in ”Count Mix Strings” problem. now I can calculate the complexity and make input and output files. You will be given the two strings and you should print all the distinct strings that could be generated in the alphabetical order.\n\nYour program will be tested on one or more test cases. The first line of the input will be a single integer T, the number of test cases (1 ≤ T ≤ 100). \n\nFollowed by the test cases, each test case is on one line. it contains two strings s1 and s2, both strings consist of at least 1 and at most 8 lower case English letters (from ‘a’ to ‘z’).\n\nFor each test case, print all the distinct strings that could be generated in the alphabetical order. \n\nprint a blank line after each test case.\n\n## Input\n\nYour program will be tested on one or more test cases. The first line of the input will be a single integer T, the number of test cases (1 ≤ T ≤ 100). Followed by the test cases, each test case is on one line. it contains two strings s1 and s2, both strings consist of at least 1 and at most 8 lower case English letters (from ‘a’ to ‘z’).\n\n## Output\n\nFor each test case, print all the distinct strings that could be generated in the alphabetical order. print a blank line after each test case.\n\n[samples]","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ R_1 = [x_1, x_1 + w_1] \\times [y_1, y_1 + h_1] $ be the initial rectangle.  \nLet $ R_2 = [x_2, x_2 + w_2] \\times [y_2, y_2 + h_2] $ be the fixed target rectangle.  \nLet $ K \\in \\mathbb{Z}_{\\geq 0} $ be the maximum number of moves.  \n\nA move reflects $ R_1 $ about one of its four edges (left, right, top, bottom), preserving its width and height.\n\n**Constraints**  \n1. $ 1 \\leq T \\leq 10^5 $  \n2. $ 1 \\leq w_1, h_1, w_2, h_2 \\leq 10^9 $  \n3. $ |x_1|, |y_1|, |x_2|, |y_2| \\leq 10^9 $  \n4. $ 0 \\leq K \\leq 10^9 $\n\n**Objective**  \nCompute the maximum possible area of intersection $ A = \\text{Area}(R_1' \\cap R_2) $, where $ R_1' $ is the rectangle obtained after applying at most $ K $ reflections about its own edges.","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF10088F","tags":[],"sample_group":[],"created_at":"2026-03-03 11:00:39"}}