摘要: Given four lists A, B, C, D of integer values, compute how many tuples (i, j, k, l) there are such that A[i] + B[j] + C[k] + D[l] is zero.To make problem a bit easier, all A, B, C, D have same length ... 阅读全文
posted @ 2018-01-07 10:25 xiejunzhao 阅读(141) 评论(0) 推荐(0)
摘要: There are N students in a class. Some of them are friends, while some are not. Their friendship is transitive in nature. For example, if A is a direct friend of B, and B is a direct friend of C, th... 阅读全文
posted @ 2018-01-07 10:25 xiejunzhao 阅读(211) 评论(0) 推荐(0)