题目
FIT5216_S1_2025 Week 2 participation quiz
单项选择题
What does the following MiniZinc model print as output: var 0..3: x;var 1..4: y;constraint x = y;
选项
A.a. =====UNSATISFIABLE=====
B.b. x = 2; y = 2;
C.c. x = 3; y = 3;
D.d. x = 1; y = 1;
E.e. x = 0; y = 0;
查看解析
标准答案
Please login to view
思路分析
To tackle this question, first note the two variables and their domains: x ranges from 0 to 3, and y ranges from 1 to 4. The constraint x = y requires x and y to take the same value within these overlapping possibilities.
Option a. 'a. =====UNSATISFIABLE=====': This is incorrect because there is an overlap between the domains (for example, x = 1, y = 1 satisfies both the domains and the constraint). Therefore, the......Login to view full explanation登录即可查看完整答案
我们收录了全球超50000道考试原题与详细解析,现在登录,立即获得答案。
类似问题
What is the value of h in the following var 0..100: x = y + 2; var 4..7: y; int: h = lb(x);
What is the value of h in the following var 0..100: x = y + 2; var 4..7: y; int: h = lb(x);
What is the value of h in the following var 0..100: x = y + 2; var 4..7: y; int: h = lb(x);
What does the following MiniZinc model print? var 0..3: x;var 1..4: y;constraint y = x + 1;constraint 2*y + 3*x = 12;
更多留学生实用工具
希望你的学习变得更简单
加入我们,立即解锁 海量真题 与 独家解析,让复习快人一步!