2017年3月28日 星期二

Q496 : Simply Subsets

https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=437


這題只是數值比對有四種情況
1.A equals B (兩串列相等)
2.A is a proper subset of B(A是B的子集)
3.B is a proper subset of A(B是A的子集)
4.A and B are disjoint(兩串列完全不同,沒交集)
5.I'm confused!(有相等的數字但不構成子集,如{1,2} {2,3} 或是 {1,2,3} {3,4} )

這題建議不要使用uDebug的測資因為內有例外測資,簡單來說就是沒有重複數字的集合
The judge's input most likely does not contain any negative integers and sets like so
3 3 3 2
3 3 3 3 3 3 2
However, both cases are handled correctly by the code for this problem on uDebug.

沒有留言:

張貼留言