時間限制 2000 ms ・ 記憶體限制 256 MB
題目描述
判斷兩個整數集合 A、B 的關係:相等、其中一者是另一者的真子集、互不相交,或有交集但彼此都不是子集。
輸入格式
輸入行數為偶數,每兩行是一筆資料。第一行表示 A,第二行表示 B,每行由互不相同的整數組成。讀至檔案結束。
輸出格式
每筆資料依關係輸出以下其中一行:
- A is a proper subset of B
- B is a proper subset of A
- A equals B
- A and B are disjoint
- I'm confused!
最後一種表示兩集合有交集,但彼此都不是子集。
範例測資
範例輸入 1
55 27 55 27 9 24 1995 9 24 1 2 3 1 2 3 4 1 2 3 4 5 6 1 2 2 3
範例輸出 1
A equals B B is a proper subset of A A is a proper subset of B A and B are disjoint I'm confused!
請先登入後再提交程式碼
討論與題解
載入討論區…