diff options
author | Anton Luka Šijanec <anton@sijanec.eu> | 2024-09-02 22:42:38 +0200 |
---|---|---|
committer | Anton Luka Šijanec <anton@sijanec.eu> | 2024-09-02 22:42:38 +0200 |
commit | 1630e1bcbe19e5c499b2a7714cc1d98fef28c480 (patch) | |
tree | 1d2006b4393b669dfe1a6130b183e9b5de7bafff /šola | |
parent | iv (diff) | |
download | r-1630e1bcbe19e5c499b2a7714cc1d98fef28c480.tar r-1630e1bcbe19e5c499b2a7714cc1d98fef28c480.tar.gz r-1630e1bcbe19e5c499b2a7714cc1d98fef28c480.tar.bz2 r-1630e1bcbe19e5c499b2a7714cc1d98fef28c480.tar.lz r-1630e1bcbe19e5c499b2a7714cc1d98fef28c480.tar.xz r-1630e1bcbe19e5c499b2a7714cc1d98fef28c480.tar.zst r-1630e1bcbe19e5c499b2a7714cc1d98fef28c480.zip |
Diffstat (limited to 'šola')
-rw-r--r-- | šola/p2/dn/DN06a_63230317.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/šola/p2/dn/DN06a_63230317.c b/šola/p2/dn/DN06a_63230317.c new file mode 100644 index 0000000..a57b548 --- /dev/null +++ b/šola/p2/dn/DN06a_63230317.c @@ -0,0 +1,18 @@ +#include <stdio.h> +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)); +} |