mirror of
https://github.com/ton-blockchain/ton
synced 2025-02-13 19:52:18 +00:00
17 lines
332 B
Text
17 lines
332 B
Text
global ((int, int) -> int) op;
|
|
|
|
int check_assoc(int a, int b, int c) {
|
|
return op(op(a, b), c) == op(a, op(b, c));
|
|
}
|
|
|
|
int main(int x, int y, int z) {
|
|
op = _+_;
|
|
return check_assoc(x, y, z);
|
|
}
|
|
|
|
{-
|
|
method_id | in | out
|
|
TESTCASE | 0 | 2 3 9 | -1
|
|
TESTCASE | 0 | 11 22 44 | -1
|
|
TESTCASE | 0 | -1 -10 -20 | -1
|
|
-}
|