Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
34
Task/Symmetric-difference/Aime/symmetric-difference.aime
Normal file
34
Task/Symmetric-difference/Aime/symmetric-difference.aime
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
show_sdiff(record u, x)
|
||||
{
|
||||
record r;
|
||||
text s;
|
||||
|
||||
r.copy(u);
|
||||
|
||||
for (s in x) {
|
||||
if (r.key(s)) {
|
||||
r.delete(s);
|
||||
} else {
|
||||
r.p_integer(s, 0);
|
||||
}
|
||||
}
|
||||
|
||||
r.vcall(o_, 0, "\n");
|
||||
}
|
||||
|
||||
new_set(...)
|
||||
{
|
||||
record r;
|
||||
|
||||
ucall(r_p_integer, 1, r, 0);
|
||||
|
||||
r;
|
||||
}
|
||||
|
||||
main(void)
|
||||
{
|
||||
show_sdiff(new_set("John", "Bob", "Mary", "Serena"),
|
||||
new_set("Jim", "Mary", "John", "Bob"));
|
||||
|
||||
0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue