Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $esetek = [
- '[1] + [2]' => [
- [ [1],[2] ],
- [1,2]
- ],
- '[2] + [1]' => [
- [ [2],[1] ],
- [1,2]
- ],
- '[1,2] + [3,4]' => [
- [ [1,2],[3,4] ],
- [1,2,3,4]
- ],
- '[3,4] + [1,2]' => [
- [ [3,4],[1,2] ],
- [1,2,3,4]
- ],
- '[1,2,3,4] + [5,6,7,8]' => [
- [ [1,2,3,4],[5,6,7,8] ],
- [1,2,3,4,5,6,7,8]
- ],
- '[5,6,7,8] + [1,2,3,4]' => [
- [ [5,6,7,8],[1,2,3,4] ],
- [1,2,3,4,5,6,7,8]
- ],
- '[1,3,5,7] + [2,4,6,8]' => [
- [ [1,3,5,7],[2,4,6,8] ],
- [1,2,3,4,5,6,7,8]
- ],
- '[2,4,6,8] + [1,3,5,7]' => [
- [ [2,4,6,8],[1,3,5,7] ],
- [1,2,3,4,5,6,7,8]
- ],
- '[1,2,3] + [4,5,6,7,8,9]' => [
- [ [1,2,3],[4,5,6,7,8,9] ],
- [1,2,3,4,5,6,7,8,9]
- ],
- '[1,2,3,4,5,6] + [7,8,9]' => [
- [ [1,2,3,4,5,6],[7,8,9] ],
- [1,2,3,4,5,6,7,8,9]
- ],
- '[1,3,5] + [2,4,6,7,8,9]' => [
- [ [1,3,5],[2,4,6,7,8,9] ],
- [1,2,3,4,5,6,7,8,9]
- ],
- '[1,2,3,4,6,8] + [5,7,9]' => [
- [ [1,2,3,4,6,8],[5,7,9] ],
- [1,2,3,4,5,6,7,8,9]
- ],
- ];
- function algo($arg1, $arg2) {
- }
- foreach($esetek as $eset =>$io) {
- echo "Eset: $eset ... " . (algo(...$io[0]) == $io[1] ? 'Igaz' : 'Hamis') . "<br/>";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement