From 1630e1bcbe19e5c499b2a7714cc1d98fef28c480 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Luka=20=C5=A0ijanec?= Date: Mon, 2 Sep 2024 22:42:38 +0200 Subject: napad --- "\305\241ola/p2/dn/DN06a_63230317.c" | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 "\305\241ola/p2/dn/DN06a_63230317.c" (limited to 'šola') diff --git "a/\305\241ola/p2/dn/DN06a_63230317.c" "b/\305\241ola/p2/dn/DN06a_63230317.c" new file mode 100644 index 0000000..a57b548 --- /dev/null +++ "b/\305\241ola/p2/dn/DN06a_63230317.c" @@ -0,0 +1,18 @@ +#include +int globina (int * a, int * b) { + int globina[2]; + if (*a) + globina[0] = globina(a+*a, b); + if (*b) + globina[1] = globina(a, b+*b); + +} +int main (void) { + int n; + scanf("%d\n", &n); + int a[n]; + int b[n]; + for (int i = 0; i < n; i++) + scanf("%d %d\n", &a[i], &b[i]); + printf("%d\n", globina(a, b)); +} -- cgit v1.2.3