开发者

discrete math arrays and binary relations

Given are two arrays a and b both of length M . Given also is a binary relation R. Specify for开发者_如何学JAVAmally a program to determine whether corresponding elements of a and b are all related by relation R.


Assuming that you are testing whether a[i] R b[i]:

for i=1..M:
  if not (a[i] R b[i]):
    return false
return true
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜