Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
8
Task/Power-set/OPL/power-set-1.opl
Normal file
8
Task/Power-set/OPL/power-set-1.opl
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{string} s={"A","B","C","D"};
|
||||
range r=1.. ftoi(pow(2,card(s)));
|
||||
{string} s2 [k in r] = {i | i in s: ((k div (ftoi(pow(2,(ord(s,i))))) mod 2) == 1)};
|
||||
|
||||
execute
|
||||
{
|
||||
writeln(s2);
|
||||
}
|
||||
3
Task/Power-set/OPL/power-set-2.opl
Normal file
3
Task/Power-set/OPL/power-set-2.opl
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
[{} {"A"} {"B"} {"A" "B"} {"C"} {"A" "C"} {"B" "C"} {"A" "B" "C"} {"D"} {"A"
|
||||
"D"} {"B" "D"} {"A" "B" "D"} {"C" "D"} {"A" "C" "D"} {"B" "C" "D"}
|
||||
{"A" "B" "C" "D"}]
|
||||
Loading…
Add table
Add a link
Reference in a new issue