Ուղարկել | Բոլոր լուծումները | Լավագույն լուծումները | Վերադառնալ ցուցակին |
ACM0309 - RETURN PATH |
For security reasons, it is advised that the return path of the president car should not be the same as the starting path.
You have been asked to write a program that can tell if the return path is the same as the starting path.
Input.
The first line of input contains a single integer P, (1 ≤ P ≤ 1000), which is the number of data sets that follow. Each data set consists of two lines containing each, one path which is composed of strings of less than 200 characters. Each string is a name of town. There will not be more than 20 towns per path. The name of town will be case insensitive and will be a string formed with characters [a-z] [A-Z] and with the sign “-”
Output.
For each data set, generate one line of output containing a single word “Same” if the starting path is same as the return path or “Different” if not.
Sample test.
N |
stdin |
stdout |
1 |
3 Tsevie Notse Notse tsevie Lome Dapaong Kara Kara Lome Dapaong Aneho Kara Kpalime Sokode Sokode Kpalime kara aneho |
Same Different Same |
Ավելացրեց. | Հրանտ Հովհաննիսյան |
Ամսաթիվ. | 2016-07-25 |
Ժամանակի սահմանափակումը. | 1s |
Ծրագրի տեքստի սահմանափակումը. | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Լեզուներ. | Բոլորը բացի ASM32 ASM64 GAWK CLPS CLOJURE D ERL FSHARP FORTRAN GOSU HASK ICON ICK NEM NIM OBJC-CLANG PICO PIKE PYPY PYPY3 PY_NBC RUST SCM guile CHICKEN SED TCL WHITESPACE |
Աղբյուրը. | Togolese Collegiate Programming Contest, 2016 |