Attacking the HydraReturn of the Hydra SlayerBecome the Hydra SlayerCalculate probability of getting half as many heads as coin tosses.Golfing: How many unit-length squares in a list of 2d coordinates?Become the Hydra SlayerReturn of the Hydra SlayerMutually Attacking QueensMagic: The Gathering Combat with AbilitiesCount the corners, edges and faces of a cut cubeBorderless tableInvert Some Switches on a Switchboard

Is there a way to proportionalize fixed costs in a MILP?

How to gracefully leave a company you helped start?

Cycle of actions and voice signals on a multipitch climb

Identifying My Main Water Shutoff Valve / Setup

Are there examples in Tanach of 3 or more parties having an ongoing conversation?

Finding the shaded region

graphs in latex

Cases with long math equation

Do I have to cite common CS algorithms?

(A room / an office) where an artist works

What is the hottest thing in the universe?

Why did IBM make the PC BIOS source code public?

Are employers legally allowed to pay employees in goods and services equal to or greater than the minimum wage?

Shifting tenses in the middle of narration

Is there a fallacy about "appeal to 'big words'"?

Word for an event that will likely never happen again

Installing Windows to flash UEFI/ BIOS, then reinstalling Ubuntu

Global BGP Routing only by only importing supernet prefixes

What unique challenges/limitations will I face if I start a career as a pilot at 45 years old?

Is it really Security Misconfiguration to show a version number?

Escape Velocity - Won't the orbital path just become larger with higher initial velocity?

How can I find an old paper when the usual methods fail?

How do some PhD students get 10+ papers? Is that what I need for landing good faculty position?

How do I ask for 2-3 days per week remote work in a job interview?



Attacking the Hydra


Return of the Hydra SlayerBecome the Hydra SlayerCalculate probability of getting half as many heads as coin tosses.Golfing: How many unit-length squares in a list of 2d coordinates?Become the Hydra SlayerReturn of the Hydra SlayerMutually Attacking QueensMagic: The Gathering Combat with AbilitiesCount the corners, edges and faces of a cut cubeBorderless tableInvert Some Switches on a Switchboard






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








6












$begingroup$


Instead of being a skillful warrior capable of slaying Hydras (see here and here), this time you are a warrior that has no prior knowledge on how to kill one or which weapons to use against the creature.



In this problem, whenever you cut a single head off, two will grow in the same place. Since you don't have the mechanism to cut many heads off simultaneously, the number of heads will only grow. In this case, our Hydra can start with N (N ⩾ 1) heads. Let's call the first encounter a generation and we will represent the heads from the first generation as 0, the heads created after the first blow as 1, and so on.



Input



You will be given an integer N representing how many heads the Hydra initially have and a list of size N containing in which index (in the examples I will use 0-indexed format) you will cut a head off. You can always assume the indexes given are valid - remember that the list (i.e.: the heads) will grow as you cut heads off.



Example



Input: N = 4 and [0,4,2,5]



Generation 0 - Attack index 0



0 0 0 0 => 1 1 0 0 0
^ ^ ^


Generation 1 - Attack index 4



1 1 0 0 0 => 1 1 0 0 2 2
^ ^ ^


Generation 2 - Attack index 2



1 1 0 0 2 2 => 1 1 3 3 0 2 2
^ ^ ^


Generation 3 - Attack index 5



1 1 3 3 0 2 2 => 1 1 3 3 0 4 4 2
^ ^ ^


Last generation



1 1 3 3 0 4 4 2


As you can see, the indexes given are related to the list of the previous generation.



Output



You are required to output the last generation.



Test cases



N = 1 and [0] => [1,1]
N = 2 and [0,0] => [2,2,1,0]
N = 2 and [0,1] => [1,2,2,0]
N = 2 and [1,0] => [2,2,1,1]
N = 2 and [1,1] => [0,2,2,1]
N = 4 and [0,4,2,5] => [1,1,3,3,0,4,4,2]
N = 6 and [0,0,0,0,0,0] => [6, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0]
N = 6 and [5,6,7,8,9,10] => [0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 6]
N = 10 and [1,7,3,12,9,0,15,2,2,10] => [6, 6, 9, 9, 8, 1, 3, 3, 0, 0, 10, 10, 2, 5, 5, 0, 0, 4, 7, 7]


This is code-golf so shortest answer in bytes wins!










share|improve this question







New contributor



ihavenoidea is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






$endgroup$













  • $begingroup$
    Sandbox link
    $endgroup$
    – ihavenoidea
    9 hours ago










  • $begingroup$
    Needs a test case where the initial number of heads is greater than the number of heads cut off. I think I see at least one current answer which would fail that case.
    $endgroup$
    – Xcali
    8 hours ago










  • $begingroup$
    @Xcali The number of heads to cut off is actually guaranteed to be equal to the initial number of heads: You will be given an integer N (...) and a list of size N (But I missed that part as well when I first read the challenge.) Therefore, N is simply useless.
    $endgroup$
    – Arnauld
    7 hours ago











  • $begingroup$
    Ah. You're right, I missed it.
    $endgroup$
    – Xcali
    7 hours ago






  • 2




    $begingroup$
    I thought about actually removing N from the input since it is "implicitly" given as the array's size. However, I thought the solutions would save bytes by giving N instead of them relying on array.size() or similar.
    $endgroup$
    – ihavenoidea
    7 hours ago


















6












$begingroup$


Instead of being a skillful warrior capable of slaying Hydras (see here and here), this time you are a warrior that has no prior knowledge on how to kill one or which weapons to use against the creature.



In this problem, whenever you cut a single head off, two will grow in the same place. Since you don't have the mechanism to cut many heads off simultaneously, the number of heads will only grow. In this case, our Hydra can start with N (N ⩾ 1) heads. Let's call the first encounter a generation and we will represent the heads from the first generation as 0, the heads created after the first blow as 1, and so on.



Input



You will be given an integer N representing how many heads the Hydra initially have and a list of size N containing in which index (in the examples I will use 0-indexed format) you will cut a head off. You can always assume the indexes given are valid - remember that the list (i.e.: the heads) will grow as you cut heads off.



Example



Input: N = 4 and [0,4,2,5]



Generation 0 - Attack index 0



0 0 0 0 => 1 1 0 0 0
^ ^ ^


Generation 1 - Attack index 4



1 1 0 0 0 => 1 1 0 0 2 2
^ ^ ^


Generation 2 - Attack index 2



1 1 0 0 2 2 => 1 1 3 3 0 2 2
^ ^ ^


Generation 3 - Attack index 5



1 1 3 3 0 2 2 => 1 1 3 3 0 4 4 2
^ ^ ^


Last generation



1 1 3 3 0 4 4 2


As you can see, the indexes given are related to the list of the previous generation.



Output



You are required to output the last generation.



Test cases



N = 1 and [0] => [1,1]
N = 2 and [0,0] => [2,2,1,0]
N = 2 and [0,1] => [1,2,2,0]
N = 2 and [1,0] => [2,2,1,1]
N = 2 and [1,1] => [0,2,2,1]
N = 4 and [0,4,2,5] => [1,1,3,3,0,4,4,2]
N = 6 and [0,0,0,0,0,0] => [6, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0]
N = 6 and [5,6,7,8,9,10] => [0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 6]
N = 10 and [1,7,3,12,9,0,15,2,2,10] => [6, 6, 9, 9, 8, 1, 3, 3, 0, 0, 10, 10, 2, 5, 5, 0, 0, 4, 7, 7]


This is code-golf so shortest answer in bytes wins!










share|improve this question







New contributor



ihavenoidea is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






$endgroup$













  • $begingroup$
    Sandbox link
    $endgroup$
    – ihavenoidea
    9 hours ago










  • $begingroup$
    Needs a test case where the initial number of heads is greater than the number of heads cut off. I think I see at least one current answer which would fail that case.
    $endgroup$
    – Xcali
    8 hours ago










  • $begingroup$
    @Xcali The number of heads to cut off is actually guaranteed to be equal to the initial number of heads: You will be given an integer N (...) and a list of size N (But I missed that part as well when I first read the challenge.) Therefore, N is simply useless.
    $endgroup$
    – Arnauld
    7 hours ago











  • $begingroup$
    Ah. You're right, I missed it.
    $endgroup$
    – Xcali
    7 hours ago






  • 2




    $begingroup$
    I thought about actually removing N from the input since it is "implicitly" given as the array's size. However, I thought the solutions would save bytes by giving N instead of them relying on array.size() or similar.
    $endgroup$
    – ihavenoidea
    7 hours ago














6












6








6





$begingroup$


Instead of being a skillful warrior capable of slaying Hydras (see here and here), this time you are a warrior that has no prior knowledge on how to kill one or which weapons to use against the creature.



In this problem, whenever you cut a single head off, two will grow in the same place. Since you don't have the mechanism to cut many heads off simultaneously, the number of heads will only grow. In this case, our Hydra can start with N (N ⩾ 1) heads. Let's call the first encounter a generation and we will represent the heads from the first generation as 0, the heads created after the first blow as 1, and so on.



Input



You will be given an integer N representing how many heads the Hydra initially have and a list of size N containing in which index (in the examples I will use 0-indexed format) you will cut a head off. You can always assume the indexes given are valid - remember that the list (i.e.: the heads) will grow as you cut heads off.



Example



Input: N = 4 and [0,4,2,5]



Generation 0 - Attack index 0



0 0 0 0 => 1 1 0 0 0
^ ^ ^


Generation 1 - Attack index 4



1 1 0 0 0 => 1 1 0 0 2 2
^ ^ ^


Generation 2 - Attack index 2



1 1 0 0 2 2 => 1 1 3 3 0 2 2
^ ^ ^


Generation 3 - Attack index 5



1 1 3 3 0 2 2 => 1 1 3 3 0 4 4 2
^ ^ ^


Last generation



1 1 3 3 0 4 4 2


As you can see, the indexes given are related to the list of the previous generation.



Output



You are required to output the last generation.



Test cases



N = 1 and [0] => [1,1]
N = 2 and [0,0] => [2,2,1,0]
N = 2 and [0,1] => [1,2,2,0]
N = 2 and [1,0] => [2,2,1,1]
N = 2 and [1,1] => [0,2,2,1]
N = 4 and [0,4,2,5] => [1,1,3,3,0,4,4,2]
N = 6 and [0,0,0,0,0,0] => [6, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0]
N = 6 and [5,6,7,8,9,10] => [0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 6]
N = 10 and [1,7,3,12,9,0,15,2,2,10] => [6, 6, 9, 9, 8, 1, 3, 3, 0, 0, 10, 10, 2, 5, 5, 0, 0, 4, 7, 7]


This is code-golf so shortest answer in bytes wins!










share|improve this question







New contributor



ihavenoidea is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






$endgroup$




Instead of being a skillful warrior capable of slaying Hydras (see here and here), this time you are a warrior that has no prior knowledge on how to kill one or which weapons to use against the creature.



In this problem, whenever you cut a single head off, two will grow in the same place. Since you don't have the mechanism to cut many heads off simultaneously, the number of heads will only grow. In this case, our Hydra can start with N (N ⩾ 1) heads. Let's call the first encounter a generation and we will represent the heads from the first generation as 0, the heads created after the first blow as 1, and so on.



Input



You will be given an integer N representing how many heads the Hydra initially have and a list of size N containing in which index (in the examples I will use 0-indexed format) you will cut a head off. You can always assume the indexes given are valid - remember that the list (i.e.: the heads) will grow as you cut heads off.



Example



Input: N = 4 and [0,4,2,5]



Generation 0 - Attack index 0



0 0 0 0 => 1 1 0 0 0
^ ^ ^


Generation 1 - Attack index 4



1 1 0 0 0 => 1 1 0 0 2 2
^ ^ ^


Generation 2 - Attack index 2



1 1 0 0 2 2 => 1 1 3 3 0 2 2
^ ^ ^


Generation 3 - Attack index 5



1 1 3 3 0 2 2 => 1 1 3 3 0 4 4 2
^ ^ ^


Last generation



1 1 3 3 0 4 4 2


As you can see, the indexes given are related to the list of the previous generation.



Output



You are required to output the last generation.



Test cases



N = 1 and [0] => [1,1]
N = 2 and [0,0] => [2,2,1,0]
N = 2 and [0,1] => [1,2,2,0]
N = 2 and [1,0] => [2,2,1,1]
N = 2 and [1,1] => [0,2,2,1]
N = 4 and [0,4,2,5] => [1,1,3,3,0,4,4,2]
N = 6 and [0,0,0,0,0,0] => [6, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0]
N = 6 and [5,6,7,8,9,10] => [0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 6]
N = 10 and [1,7,3,12,9,0,15,2,2,10] => [6, 6, 9, 9, 8, 1, 3, 3, 0, 0, 10, 10, 2, 5, 5, 0, 0, 4, 7, 7]


This is code-golf so shortest answer in bytes wins!







code-golf






share|improve this question







New contributor



ihavenoidea is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.










share|improve this question







New contributor



ihavenoidea is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








share|improve this question




share|improve this question






New contributor



ihavenoidea is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








asked 9 hours ago









ihavenoideaihavenoidea

1313 bronze badges




1313 bronze badges




New contributor



ihavenoidea is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




New contributor




ihavenoidea is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • $begingroup$
    Sandbox link
    $endgroup$
    – ihavenoidea
    9 hours ago










  • $begingroup$
    Needs a test case where the initial number of heads is greater than the number of heads cut off. I think I see at least one current answer which would fail that case.
    $endgroup$
    – Xcali
    8 hours ago










  • $begingroup$
    @Xcali The number of heads to cut off is actually guaranteed to be equal to the initial number of heads: You will be given an integer N (...) and a list of size N (But I missed that part as well when I first read the challenge.) Therefore, N is simply useless.
    $endgroup$
    – Arnauld
    7 hours ago











  • $begingroup$
    Ah. You're right, I missed it.
    $endgroup$
    – Xcali
    7 hours ago






  • 2




    $begingroup$
    I thought about actually removing N from the input since it is "implicitly" given as the array's size. However, I thought the solutions would save bytes by giving N instead of them relying on array.size() or similar.
    $endgroup$
    – ihavenoidea
    7 hours ago

















  • $begingroup$
    Sandbox link
    $endgroup$
    – ihavenoidea
    9 hours ago










  • $begingroup$
    Needs a test case where the initial number of heads is greater than the number of heads cut off. I think I see at least one current answer which would fail that case.
    $endgroup$
    – Xcali
    8 hours ago










  • $begingroup$
    @Xcali The number of heads to cut off is actually guaranteed to be equal to the initial number of heads: You will be given an integer N (...) and a list of size N (But I missed that part as well when I first read the challenge.) Therefore, N is simply useless.
    $endgroup$
    – Arnauld
    7 hours ago











  • $begingroup$
    Ah. You're right, I missed it.
    $endgroup$
    – Xcali
    7 hours ago






  • 2




    $begingroup$
    I thought about actually removing N from the input since it is "implicitly" given as the array's size. However, I thought the solutions would save bytes by giving N instead of them relying on array.size() or similar.
    $endgroup$
    – ihavenoidea
    7 hours ago
















$begingroup$
Sandbox link
$endgroup$
– ihavenoidea
9 hours ago




$begingroup$
Sandbox link
$endgroup$
– ihavenoidea
9 hours ago












$begingroup$
Needs a test case where the initial number of heads is greater than the number of heads cut off. I think I see at least one current answer which would fail that case.
$endgroup$
– Xcali
8 hours ago




$begingroup$
Needs a test case where the initial number of heads is greater than the number of heads cut off. I think I see at least one current answer which would fail that case.
$endgroup$
– Xcali
8 hours ago












$begingroup$
@Xcali The number of heads to cut off is actually guaranteed to be equal to the initial number of heads: You will be given an integer N (...) and a list of size N (But I missed that part as well when I first read the challenge.) Therefore, N is simply useless.
$endgroup$
– Arnauld
7 hours ago





$begingroup$
@Xcali The number of heads to cut off is actually guaranteed to be equal to the initial number of heads: You will be given an integer N (...) and a list of size N (But I missed that part as well when I first read the challenge.) Therefore, N is simply useless.
$endgroup$
– Arnauld
7 hours ago













$begingroup$
Ah. You're right, I missed it.
$endgroup$
– Xcali
7 hours ago




$begingroup$
Ah. You're right, I missed it.
$endgroup$
– Xcali
7 hours ago




2




2




$begingroup$
I thought about actually removing N from the input since it is "implicitly" given as the array's size. However, I thought the solutions would save bytes by giving N instead of them relying on array.size() or similar.
$endgroup$
– ihavenoidea
7 hours ago





$begingroup$
I thought about actually removing N from the input since it is "implicitly" given as the array's size. However, I thought the solutions would save bytes by giving N instead of them relying on array.size() or similar.
$endgroup$
– ihavenoidea
7 hours ago











10 Answers
10






active

oldest

votes


















2












$begingroup$


Stax, 12 11 bytes



î╓≡╧▄#¥oWä)A


Run and debug it at staxlang.xyz!



Thanks to recursive for one byte of savings!



Unpacked (13 bytes) and explanation:



z),{i^c&:fFm
z) Push initial array of zeroes to stack
, Push array of attacks to stack
 














1












$begingroup$


Japt, 14 bytes



rÈhY[°TT] cUî


Try it






share|improve this answer









$endgroup$






















    1












    $begingroup$

    JavaScript (ES6),  61 59  51 bytes



    Thanks to @Shaggy for point out that n is useless, saving 8 bytes in both versions



    Expects the array in 0-indexed format. Ignores n.





    a=>a.map(i=>b.splice(i,1,++g,g),b=a.map(_=>g=0))&&b


    Try it online!





    JavaScript (Node.js),  64  56 bytes



    Using reduce() and flat():





    a=>a.reduce((b,i,g)=>b.flat(1,b[i]=[++g,g]),a.map(_=>0))


    Try it online!






    share|improve this answer











    $endgroup$














    • $begingroup$
      Would a=>a.map(i=>b.splice(i,1,++g,g),b=a.map(_=>g=0))&&b work, without taking n?
      $endgroup$
      – Shaggy
      8 hours ago










    • $begingroup$
      @Shaggy Oops. I missed that part: and a list of size N. So, yeah, it seems like n IS useless.
      $endgroup$
      – Arnauld
      8 hours ago


















    1












    $begingroup$


    Python 2, 60 bytes





    H,a=input()
    H=[0]*H
    for i in a:H[i:i+1]=[max(H)+1]*2
    print H


    Try it online!






    share|improve this answer









    $endgroup$










    • 1




      $begingroup$
      Dang it. Beat me by 52 seconds...
      $endgroup$
      – TFeld
      7 hours ago










    • $begingroup$
      @TFeld LOL you tried to avoid an extra variable for the generation too! :D
      $endgroup$
      – Erik the Outgolfer
      7 hours ago


















    1












    $begingroup$


    Python 2, 60 bytes





    n,a=input()
    h=[0]*n
    for c in a:h[c:c+1]=[max(h)+1]*2
    print h


    Try it online!






    share|improve this answer









    $endgroup$






















      1












      $begingroup$


      Retina 0.8.2, 69 bytes



      d+
      $*_
      r`_G
      ,0
      +`^((,*)_)(_)*(.*,,(?<-3>d+,)*)d+
      $2$4$.1,$.1
      ^,+



      Try it online! Link includes test cases. 1-indexed. Takes input as ...list,N. Does not require the list to be of length N. Explanation:



      d+
      $*_


      Convert all of the inputs to unary, but using _, so that it doesn't get confused with later uses of the digit 1. (Retina 1 would do this automatically for a 2-byte saving.)



      r`_G
      ,0


      Replace N with an array of N zeros, but don't alter the list.



      +`


      Process all elements of the list.



      ^((,*)_)(_)*(.*,,(?<-3>d+,)*)d+


      Find the next element of the list and the equivalent position in the array. $1 = current generation (as a length), $2 = commas from previous generations, $3 = current index - 1, $4 = first $3 heads.



      $2$4$.1,$.1


      Replace the head at the current index with two copies of the current generation in decimal.






      share|improve this answer









      $endgroup$






















        1












        $begingroup$


        Haskell, 63 bytes





        foldl g.(0<$)<*>zip[1..];g y(x,n)|(a,_:b)<-splitAt n y=a++x:x:b


        Try it online!






        share|improve this answer









        $endgroup$






















          1












          $begingroup$


          PHP, 101 bytes





          function h($n,$a)$h=array_fill(0,$n,0);foreach($a as$b)array_splice($h,$b,0,$h[$b]=++$x);return $h;


          Try it online!






          share|improve this answer










          New contributor



          XMark is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.





          $endgroup$














          • $begingroup$
            Welcome! Consider adding an explanation and a link to an online interpreter, such as TIO. Code-only answers are usually automatically marked as low-quality. See existing answers for details.
            $endgroup$
            – mbomb007
            5 hours ago










          • $begingroup$
            I've added a TIO link
            $endgroup$
            – XMark
            4 hours ago













          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "200"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );






          ihavenoidea is a new contributor. Be nice, and check out our Code of Conduct.









          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodegolf.stackexchange.com%2fquestions%2f189999%2fattacking-the-hydra%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          10 Answers
          10






          active

          oldest

          votes








          10 Answers
          10






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          2












          $begingroup$


          Stax, 12 11 bytes



          î╓≡╧▄#¥oWä)A


          Run and debug it at staxlang.xyz!



          Thanks to recursive for one byte of savings!



          Unpacked (13 bytes) and explanation:



          z),{i^c&:fFm
          z) Push initial array of zeroes to stack
          , Push array of attacks to stack
          { F For each attack, push it and then:
          i^c Push [x,x], where x is the generation number
          & Set the head at the attack index to this new array
          :f Flatten
          m Print the last generation


          The challenge explicitly says "you are required to output the last generation," so my guess is this consensus doesn't hold here. If it does, though, ten bytes can be managed by leaving the result on an otherwise-empty stack:



          z),Fi^c&:f





          share|improve this answer











          $endgroup$










          • 1




            $begingroup$
            0]* can be replaced with z). Edit: Apparently this is undocumented behavior, but pad-left takes its operands in either order. (npm lol)
            $endgroup$
            – recursive
            5 hours ago











          • $begingroup$
            @recursive Undocumented behavior is the best kind of behavior :)
            $endgroup$
            – Khuldraeseth na'Barya
            5 hours ago















          2












          $begingroup$


          Stax, 12 11 bytes



          î╓≡╧▄#¥oWä)A


          Run and debug it at staxlang.xyz!



          Thanks to recursive for one byte of savings!



          Unpacked (13 bytes) and explanation:



          z),{i^c&:fFm
          z) Push initial array of zeroes to stack
          , Push array of attacks to stack
          { F For each attack, push it and then:
          i^c Push [x,x], where x is the generation number
          & Set the head at the attack index to this new array
          :f Flatten
          m Print the last generation


          The challenge explicitly says "you are required to output the last generation," so my guess is this consensus doesn't hold here. If it does, though, ten bytes can be managed by leaving the result on an otherwise-empty stack:



          z),Fi^c&:f





          share|improve this answer











          $endgroup$










          • 1




            $begingroup$
            0]* can be replaced with z). Edit: Apparently this is undocumented behavior, but pad-left takes its operands in either order. (npm lol)
            $endgroup$
            – recursive
            5 hours ago











          • $begingroup$
            @recursive Undocumented behavior is the best kind of behavior :)
            $endgroup$
            – Khuldraeseth na'Barya
            5 hours ago













          2












          2








          2





          $begingroup$


          Stax, 12 11 bytes



          î╓≡╧▄#¥oWä)A


          Run and debug it at staxlang.xyz!



          Thanks to recursive for one byte of savings!



          Unpacked (13 bytes) and explanation:



          z),improve this answer









          $endgroup$




          Japt, 14 bytes



          rÈhY[°TT] cUî


          Try it







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 8 hours ago









          Embodiment of IgnoranceEmbodiment of Ignorance

          4,9661 silver badge30 bronze badges




          4,9661 silver badge30 bronze badges
























              1












              $begingroup$

              JavaScript (ES6),  61 59  51 bytes



              Thanks to @Shaggy for point out that n is useless, saving 8 bytes in both versions



              Expects the array in 0-indexed format. Ignores n.





              a=>a.map(i=>b.splice(i,1,++g,g),b=a.map(_=>g=0))&&b


              Try it online!





              JavaScript (Node.js),  64  56 bytes



              Using reduce() and flat():





              a=>a.reduce((b,i,g)=>b.flat(1,b[i]=[++g,g]),a.map(_=>0))


              Try it online!






              share|improve this answer











              $endgroup$














              • $begingroup$
                Would a=>a.map(i=>b.splice(i,1,++g,g),b=a.map(_=>g=0))&&b work, without taking n?
                $endgroup$
                – Shaggy
                8 hours ago










              • $begingroup$
                @Shaggy Oops. I missed that part: and a list of size N. So, yeah, it seems like n IS useless.
                $endgroup$
                – Arnauld
                8 hours ago















              1












              $begingroup$

              JavaScript (ES6),  61 59  51 bytes



              Thanks to @Shaggy for point out that n is useless, saving 8 bytes in both versions



              Expects the array in 0-indexed format. Ignores n.





              a=>a.map(i=>b.splice(i,1,++g,g),b=a.map(_=>g=0))&&b


              Try it online!





              JavaScript (Node.js),  64  56 bytes



              Using reduce() and flat():





              a=>a.reduce((b,i,g)=>b.flat(1,b[i]=[++g,g]),a.map(_=>0))


              Try it online!






              share|improve this answer











              $endgroup$














              • $begingroup$
                Would a=>a.map(i=>b.splice(i,1,++g,g),b=a.map(_=>g=0))&&b work, without taking n?
                $endgroup$
                – Shaggy
                8 hours ago










              • $begingroup$
                @Shaggy Oops. I missed that part: and a list of size N. So, yeah, it seems like n IS useless.
                $endgroup$
                – Arnauld
                8 hours ago













              1












              1








              1





              $begingroup$

              JavaScript (ES6),  61 59  51 bytes



              Thanks to @Shaggy for point out that n is useless, saving 8 bytes in both versions



              Expects the array in 0-indexed format. Ignores n.





              a=>a.map(i=>b.splice(i,1,++g,g),b=a.map(_=>g=0))&&b


              Try it online!





              JavaScript (Node.js),  64  56 bytes



              Using reduce() and flat():





              a=>a.reduce((b,i,g)=>b.flat(1,b[i]=[++g,g]),a.map(_=>0))


              Try it online!






              share|improve this answer











              $endgroup$



              JavaScript (ES6),  61 59  51 bytes



              Thanks to @Shaggy for point out that n is useless, saving 8 bytes in both versions



              Expects the array in 0-indexed format. Ignores n.





              a=>a.map(i=>b.splice(i,1,++g,g),b=a.map(_=>g=0))&&b


              Try it online!





              JavaScript (Node.js),  64  56 bytes



              Using reduce() and flat():





              a=>a.reduce((b,i,g)=>b.flat(1,b[i]=[++g,g]),a.map(_=>0))


              Try it online!







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited 8 hours ago

























              answered 9 hours ago









              ArnauldArnauld

              89.9k7 gold badges104 silver badges366 bronze badges




              89.9k7 gold badges104 silver badges366 bronze badges














              • $begingroup$
                Would a=>a.map(i=>b.splice(i,1,++g,g),b=a.map(_=>g=0))&&b work, without taking n?
                $endgroup$
                – Shaggy
                8 hours ago










              • $begingroup$
                @Shaggy Oops. I missed that part: and a list of size N. So, yeah, it seems like n IS useless.
                $endgroup$
                – Arnauld
                8 hours ago
















              • $begingroup$
                Would a=>a.map(i=>b.splice(i,1,++g,g),b=a.map(_=>g=0))&&b work, without taking n?
                $endgroup$
                – Shaggy
                8 hours ago










              • $begingroup$
                @Shaggy Oops. I missed that part: and a list of size N. So, yeah, it seems like n IS useless.
                $endgroup$
                – Arnauld
                8 hours ago















              $begingroup$
              Would a=>a.map(i=>b.splice(i,1,++g,g),b=a.map(_=>g=0))&&b work, without taking n?
              $endgroup$
              – Shaggy
              8 hours ago




              $begingroup$
              Would a=>a.map(i=>b.splice(i,1,++g,g),b=a.map(_=>g=0))&&b work, without taking n?
              $endgroup$
              – Shaggy
              8 hours ago












              $begingroup$
              @Shaggy Oops. I missed that part: and a list of size N. So, yeah, it seems like n IS useless.
              $endgroup$
              – Arnauld
              8 hours ago




              $begingroup$
              @Shaggy Oops. I missed that part: and a list of size N. So, yeah, it seems like n IS useless.
              $endgroup$
              – Arnauld
              8 hours ago











              1












              $begingroup$


              Python 2, 60 bytes





              H,a=input()
              H=[0]*H
              for i in a:H[i:i+1]=[max(H)+1]*2
              print H


              Try it online!






              share|improve this answer









              $endgroup$










              • 1




                $begingroup$
                Dang it. Beat me by 52 seconds...
                $endgroup$
                – TFeld
                7 hours ago










              • $begingroup$
                @TFeld LOL you tried to avoid an extra variable for the generation too! :D
                $endgroup$
                – Erik the Outgolfer
                7 hours ago















              1












              $begingroup$


              Python 2, 60 bytes





              H,a=input()
              H=[0]*H
              for i in a:H[i:i+1]=[max(H)+1]*2
              print H


              Try it online!






              share|improve this answer









              $endgroup$










              • 1




                $begingroup$
                Dang it. Beat me by 52 seconds...
                $endgroup$
                – TFeld
                7 hours ago










              • $begingroup$
                @TFeld LOL you tried to avoid an extra variable for the generation too! :D
                $endgroup$
                – Erik the Outgolfer
                7 hours ago













              1












              1








              1





              $begingroup$


              Python 2, 60 bytes





              H,a=input()
              H=[0]*H
              for i in a:H[i:i+1]=[max(H)+1]*2
              print H


              Try it online!






              share|improve this answer









              $endgroup$




              Python 2, 60 bytes





              H,a=input()
              H=[0]*H
              for i in a:H[i:i+1]=[max(H)+1]*2
              print H


              Try it online!







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered 7 hours ago









              Erik the OutgolferErik the Outgolfer

              35.5k4 gold badges30 silver badges110 bronze badges




              35.5k4 gold badges30 silver badges110 bronze badges










              • 1




                $begingroup$
                Dang it. Beat me by 52 seconds...
                $endgroup$
                – TFeld
                7 hours ago










              • $begingroup$
                @TFeld LOL you tried to avoid an extra variable for the generation too! :D
                $endgroup$
                – Erik the Outgolfer
                7 hours ago












              • 1




                $begingroup$
                Dang it. Beat me by 52 seconds...
                $endgroup$
                – TFeld
                7 hours ago










              • $begingroup$
                @TFeld LOL you tried to avoid an extra variable for the generation too! :D
                $endgroup$
                – Erik the Outgolfer
                7 hours ago







              1




              1




              $begingroup$
              Dang it. Beat me by 52 seconds...
              $endgroup$
              – TFeld
              7 hours ago




              $begingroup$
              Dang it. Beat me by 52 seconds...
              $endgroup$
              – TFeld
              7 hours ago












              $begingroup$
              @TFeld LOL you tried to avoid an extra variable for the generation too! :D
              $endgroup$
              – Erik the Outgolfer
              7 hours ago




              $begingroup$
              @TFeld LOL you tried to avoid an extra variable for the generation too! :D
              $endgroup$
              – Erik the Outgolfer
              7 hours ago











              1












              $begingroup$


              Python 2, 60 bytes





              n,a=input()
              h=[0]*n
              for c in a:h[c:c+1]=[max(h)+1]*2
              print h


              Try it online!






              share|improve this answer









              $endgroup$



















                1












                $begingroup$


                Python 2, 60 bytes





                n,a=input()
                h=[0]*n
                for c in a:h[c:c+1]=[max(h)+1]*2
                print h


                Try it online!






                share|improve this answer









                $endgroup$

















                  1












                  1








                  1





                  $begingroup$


                  Python 2, 60 bytes





                  n,a=input()
                  h=[0]*n
                  for c in a:h[c:c+1]=[max(h)+1]*2
                  print h


                  Try it online!






                  share|improve this answer









                  $endgroup$




                  Python 2, 60 bytes





                  n,a=input()
                  h=[0]*n
                  for c in a:h[c:c+1]=[max(h)+1]*2
                  print h


                  Try it online!







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered 7 hours ago









                  TFeldTFeld

                  18.2k3 gold badges14 silver badges57 bronze badges




                  18.2k3 gold badges14 silver badges57 bronze badges
























                      1












                      $begingroup$


                      Retina 0.8.2, 69 bytes



                      d+
                      $*_
                      r`_G
                      ,0
                      +`^((,*)_)(_)*(.*,,(?<-3>d+,)*)d+
                      $2$4$.1,$.1
                      ^,+



                      Try it online! Link includes test cases. 1-indexed. Takes input as ...list,N. Does not require the list to be of length N. Explanation:



                      d+
                      $*_


                      Convert all of the inputs to unary, but using _, so that it doesn't get confused with later uses of the digit 1. (Retina 1 would do this automatically for a 2-byte saving.)



                      r`_G
                      ,0


                      Replace N with an array of N zeros, but don't alter the list.



                      +`


                      Process all elements of the list.



                      ^((,*)_)(_)*(.*,,(?<-3>d+,)*)d+


                      Find the next element of the list and the equivalent position in the array. $1 = current generation (as a length), $2 = commas from previous generations, $3 = current index - 1, $4 = first $3 heads.



                      $2$4$.1,$.1


                      Replace the head at the current index with two copies of the current generation in decimal.






                      share|improve this answer









                      $endgroup$



















                        1












                        $begingroup$


                        Retina 0.8.2, 69 bytes



                        d+
                        $*_
                        r`_G
                        ,0
                        +`^((,*)_)(_)*(.*,,(?<-3>d+,)*)d+
                        $2$4$.1,$.1
                        ^,+



                        Try it online! Link includes test cases. 1-indexed. Takes input as ...list,N. Does not require the list to be of length N. Explanation:



                        d+
                        $*_


                        Convert all of the inputs to unary, but using _, so that it doesn't get confused with later uses of the digit 1. (Retina 1 would do this automatically for a 2-byte saving.)



                        r`_G
                        ,0


                        Replace N with an array of N zeros, but don't alter the list.



                        +`


                        Process all elements of the list.



                        ^((,*)_)(_)*(.*,,(?<-3>d+,)*)d+


                        Find the next element of the list and the equivalent position in the array. $1 = current generation (as a length), $2 = commas from previous generations, $3 = current index - 1, $4 = first $3 heads.



                        $2$4$.1,$.1


                        Replace the head at the current index with two copies of the current generation in decimal.






                        share|improve this answer









                        $endgroup$

















                          1












                          1








                          1





                          $begingroup$


                          Retina 0.8.2, 69 bytes



                          d+
                          $*_
                          r`_G
                          ,0
                          +`^((,*)_)(_)*(.*,,(?<-3>d+,)*)d+
                          $2$4$.1,$.1
                          ^,+



                          Try it online! Link includes test cases. 1-indexed. Takes input as ...list,N. Does not require the list to be of length N. Explanation:



                          d+
                          $*_


                          Convert all of the inputs to unary, but using _, so that it doesn't get confused with later uses of the digit 1. (Retina 1 would do this automatically for a 2-byte saving.)



                          r`_G
                          ,0


                          Replace N with an array of N zeros, but don't alter the list.



                          +`


                          Process all elements of the list.



                          ^((,*)_)(_)*(.*,,(?<-3>d+,)*)d+


                          Find the next element of the list and the equivalent position in the array. $1 = current generation (as a length), $2 = commas from previous generations, $3 = current index - 1, $4 = first $3 heads.



                          $2$4$.1,$.1


                          Replace the head at the current index with two copies of the current generation in decimal.






                          share|improve this answer









                          $endgroup$




                          Retina 0.8.2, 69 bytes



                          d+
                          $*_
                          r`_G
                          ,0
                          +`^((,*)_)(_)*(.*,,(?<-3>d+,)*)d+
                          $2$4$.1,$.1
                          ^,+



                          Try it online! Link includes test cases. 1-indexed. Takes input as ...list,N. Does not require the list to be of length N. Explanation:



                          d+
                          $*_


                          Convert all of the inputs to unary, but using _, so that it doesn't get confused with later uses of the digit 1. (Retina 1 would do this automatically for a 2-byte saving.)



                          r`_G
                          ,0


                          Replace N with an array of N zeros, but don't alter the list.



                          +`


                          Process all elements of the list.



                          ^((,*)_)(_)*(.*,,(?<-3>d+,)*)d+


                          Find the next element of the list and the equivalent position in the array. $1 = current generation (as a length), $2 = commas from previous generations, $3 = current index - 1, $4 = first $3 heads.



                          $2$4$.1,$.1


                          Replace the head at the current index with two copies of the current generation in decimal.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered 6 hours ago









                          NeilNeil

                          87.2k8 gold badges46 silver badges183 bronze badges




                          87.2k8 gold badges46 silver badges183 bronze badges
























                              1












                              $begingroup$


                              Haskell, 63 bytes





                              foldl g.(0<$)<*>zip[1..];g y(x,n)|(a,_:b)<-splitAt n y=a++x:x:b


                              Try it online!






                              share|improve this answer









                              $endgroup$



















                                1












                                $begingroup$


                                Haskell, 63 bytes





                                foldl g.(0<$)<*>zip[1..];g y(x,n)|(a,_:b)<-splitAt n y=a++x:x:b


                                Try it online!






                                share|improve this answer









                                $endgroup$

















                                  1












                                  1








                                  1





                                  $begingroup$


                                  Haskell, 63 bytes





                                  foldl g.(0<$)<*>zip[1..];g y(x,n)|(a,_:b)<-splitAt n y=a++x:x:b


                                  Try it online!






                                  share|improve this answer









                                  $endgroup$




                                  Haskell, 63 bytes





                                  foldl g.(0<$)<*>zip[1..];g y(x,n)|(a,_:b)<-splitAt n y=a++x:x:b


                                  Try it online!







                                  share|improve this answer












                                  share|improve this answer



                                  share|improve this answer










                                  answered 5 hours ago









                                  B. MehtaB. Mehta

                                  6832 silver badges9 bronze badges




                                  6832 silver badges9 bronze badges
























                                      1












                                      $begingroup$


                                      PHP, 101 bytes





                                      function h($n,$a)$h=array_fill(0,$n,0);foreach($a as$b)array_splice($h,$b,0,$h[$b]=++$x);return $h;


                                      Try it online!






                                      share|improve this answer










                                      New contributor



                                      XMark is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                      Check out our Code of Conduct.





                                      $endgroup$














                                      • $begingroup$
                                        Welcome! Consider adding an explanation and a link to an online interpreter, such as TIO. Code-only answers are usually automatically marked as low-quality. See existing answers for details.
                                        $endgroup$
                                        – mbomb007
                                        5 hours ago










                                      • $begingroup$
                                        I've added a TIO link
                                        $endgroup$
                                        – XMark
                                        4 hours ago















                                      1












                                      $begingroup$


                                      PHP, 101 bytes





                                      function h($n,$a)$h=array_fill(0,$n,0);foreach($a as$b)array_splice($h,$b,0,$h[$b]=++$x);return $h;


                                      Try it online!






                                      share|improve this answer










                                      New contributor



                                      XMark is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                      Check out our Code of Conduct.





                                      $endgroup$














                                      • $begingroup$
                                        Welcome! Consider adding an explanation and a link to an online interpreter, such as TIO. Code-only answers are usually automatically marked as low-quality. See existing answers for details.
                                        $endgroup$
                                        – mbomb007
                                        5 hours ago










                                      • $begingroup$
                                        I've added a TIO link
                                        $endgroup$
                                        – XMark
                                        4 hours ago













                                      1












                                      1








                                      1





                                      $begingroup$


                                      PHP, 101 bytes





                                      function h($n,$a)$h=array_fill(0,$n,0);foreach($a as$b)array_splice($h,$b,0,$h[$b]=++$x);return $h;


                                      Try it online!






                                      share|improve this answer










                                      New contributor



                                      XMark is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                      Check out our Code of Conduct.





                                      $endgroup$




                                      PHP, 101 bytes





                                      function h($n,$a)$h=array_fill(0,$n,0);foreach($a as$b)array_splice($h,$b,0,$h[$b]=++$x);return $h;


                                      Try it online!







                                      share|improve this answer










                                      New contributor



                                      XMark is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                      Check out our Code of Conduct.








                                      share|improve this answer



                                      share|improve this answer








                                      edited 4 hours ago





















                                      New contributor



                                      XMark is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                      Check out our Code of Conduct.








                                      answered 5 hours ago









                                      XMarkXMark

                                      112 bronze badges




                                      112 bronze badges




                                      New contributor



                                      XMark is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                      Check out our Code of Conduct.




                                      New contributor




                                      XMark is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                      Check out our Code of Conduct.
















                                      • $begingroup$
                                        Welcome! Consider adding an explanation and a link to an online interpreter, such as TIO. Code-only answers are usually automatically marked as low-quality. See existing answers for details.
                                        $endgroup$
                                        – mbomb007
                                        5 hours ago










                                      • $begingroup$
                                        I've added a TIO link
                                        $endgroup$
                                        – XMark
                                        4 hours ago
















                                      • $begingroup$
                                        Welcome! Consider adding an explanation and a link to an online interpreter, such as TIO. Code-only answers are usually automatically marked as low-quality. See existing answers for details.
                                        $endgroup$
                                        – mbomb007
                                        5 hours ago










                                      • $begingroup$
                                        I've added a TIO link
                                        $endgroup$
                                        – XMark
                                        4 hours ago















                                      $begingroup$
                                      Welcome! Consider adding an explanation and a link to an online interpreter, such as TIO. Code-only answers are usually automatically marked as low-quality. See existing answers for details.
                                      $endgroup$
                                      – mbomb007
                                      5 hours ago




                                      $begingroup$
                                      Welcome! Consider adding an explanation and a link to an online interpreter, such as TIO. Code-only answers are usually automatically marked as low-quality. See existing answers for details.
                                      $endgroup$
                                      – mbomb007
                                      5 hours ago












                                      $begingroup$
                                      I've added a TIO link
                                      $endgroup$
                                      – XMark
                                      4 hours ago




                                      $begingroup$
                                      I've added a TIO link
                                      $endgroup$
                                      – XMark
                                      4 hours ago










                                      ihavenoidea is a new contributor. Be nice, and check out our Code of Conduct.









                                      draft saved

                                      draft discarded


















                                      ihavenoidea is a new contributor. Be nice, and check out our Code of Conduct.












                                      ihavenoidea is a new contributor. Be nice, and check out our Code of Conduct.











                                      ihavenoidea is a new contributor. Be nice, and check out our Code of Conduct.














                                      If this is an answer to a challenge…



                                      • …Be sure to follow the challenge specification. However, please refrain from exploiting obvious loopholes. Answers abusing any of the standard loopholes are considered invalid. If you think a specification is unclear or underspecified, comment on the question instead.


                                      • …Try to optimize your score. For instance, answers to code-golf challenges should attempt to be as short as possible. You can always include a readable version of the code in addition to the competitive one.
                                        Explanations of your answer make it more interesting to read and are very much encouraged.


                                      • …Include a short header which indicates the language(s) of your code and its score, as defined by the challenge.


                                      More generally…



                                      • …Please make sure to answer the question and provide sufficient detail.


                                      • …Avoid asking for help, clarification or responding to other answers (use comments instead).




                                      draft saved


                                      draft discarded














                                      StackExchange.ready(
                                      function ()
                                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodegolf.stackexchange.com%2fquestions%2f189999%2fattacking-the-hydra%23new-answer', 'question_page');

                                      );

                                      Post as a guest















                                      Required, but never shown





















































                                      Required, but never shown














                                      Required, but never shown












                                      Required, but never shown







                                      Required, but never shown

































                                      Required, but never shown














                                      Required, but never shown












                                      Required, but never shown







                                      Required, but never shown







                                      Popular posts from this blog

                                      19. јануар Садржај Догађаји Рођења Смрти Празници и дани сећања Види још Референце Мени за навигацијуу

                                      Israel Cuprins Etimologie | Istorie | Geografie | Politică | Demografie | Educație | Economie | Cultură | Note explicative | Note bibliografice | Bibliografie | Legături externe | Meniu de navigaresite web oficialfacebooktweeterGoogle+Instagramcanal YouTubeInstagramtextmodificaremodificarewww.technion.ac.ilnew.huji.ac.ilwww.weizmann.ac.ilwww1.biu.ac.ilenglish.tau.ac.ilwww.haifa.ac.ilin.bgu.ac.ilwww.openu.ac.ilwww.ariel.ac.ilCIA FactbookHarta Israelului"Negotiating Jerusalem," Palestine–Israel JournalThe Schizoid Nature of Modern Hebrew: A Slavic Language in Search of a Semitic Past„Arabic in Israel: an official language and a cultural bridge”„Latest Population Statistics for Israel”„Israel Population”„Tables”„Report for Selected Countries and Subjects”Human Development Report 2016: Human Development for Everyone„Distribution of family income - Gini index”The World FactbookJerusalem Law„Israel”„Israel”„Zionist Leaders: David Ben-Gurion 1886–1973”„The status of Jerusalem”„Analysis: Kadima's big plans”„Israel's Hard-Learned Lessons”„The Legacy of Undefined Borders, Tel Aviv Notes No. 40, 5 iunie 2002”„Israel Journal: A Land Without Borders”„Population”„Israel closes decade with population of 7.5 million”Time Series-DataBank„Selected Statistics on Jerusalem Day 2007 (Hebrew)”Golan belongs to Syria, Druze protestGlobal Survey 2006: Middle East Progress Amid Global Gains in FreedomWHO: Life expectancy in Israel among highest in the worldInternational Monetary Fund, World Economic Outlook Database, April 2011: Nominal GDP list of countries. Data for the year 2010.„Israel's accession to the OECD”Popular Opinion„On the Move”Hosea 12:5„Walking the Bible Timeline”„Palestine: History”„Return to Zion”An invention called 'the Jewish people' – Haaretz – Israel NewsoriginalJewish and Non-Jewish Population of Palestine-Israel (1517–2004)ImmigrationJewishvirtuallibrary.orgChapter One: The Heralders of Zionism„The birth of modern Israel: A scrap of paper that changed history”„League of Nations: The Mandate for Palestine, 24 iulie 1922”The Population of Palestine Prior to 1948originalBackground Paper No. 47 (ST/DPI/SER.A/47)History: Foreign DominationTwo Hundred and Seventh Plenary Meeting„Israel (Labor Zionism)”Population, by Religion and Population GroupThe Suez CrisisAdolf EichmannJustice Ministry Reply to Amnesty International Report„The Interregnum”Israel Ministry of Foreign Affairs – The Palestinian National Covenant- July 1968Research on terrorism: trends, achievements & failuresThe Routledge Atlas of the Arab–Israeli conflict: The Complete History of the Struggle and the Efforts to Resolve It"George Habash, Palestinian Terrorism Tactician, Dies at 82."„1973: Arab states attack Israeli forces”Agranat Commission„Has Israel Annexed East Jerusalem?”original„After 4 Years, Intifada Still Smolders”From the End of the Cold War to 2001originalThe Oslo Accords, 1993Israel-PLO Recognition – Exchange of Letters between PM Rabin and Chairman Arafat – Sept 9- 1993Foundation for Middle East PeaceSources of Population Growth: Total Israeli Population and Settler Population, 1991–2003original„Israel marks Rabin assassination”The Wye River Memorandumoriginal„West Bank barrier route disputed, Israeli missile kills 2”"Permanent Ceasefire to Be Based on Creation Of Buffer Zone Free of Armed Personnel Other than UN, Lebanese Forces"„Hezbollah kills 8 soldiers, kidnaps two in offensive on northern border”„Olmert confirms peace talks with Syria”„Battleground Gaza: Israeli ground forces invade the strip”„IDF begins Gaza troop withdrawal, hours after ending 3-week offensive”„THE LAND: Geography and Climate”„Area of districts, sub-districts, natural regions and lakes”„Israel - Geography”„Makhteshim Country”Israel and the Palestinian Territories„Makhtesh Ramon”„The Living Dead Sea”„Temperatures reach record high in Pakistan”„Climate Extremes In Israel”Israel in figures„Deuteronom”„JNF: 240 million trees planted since 1901”„Vegetation of Israel and Neighboring Countries”Environmental Law in Israel„Executive branch”„Israel's election process explained”„The Electoral System in Israel”„Constitution for Israel”„All 120 incoming Knesset members”„Statul ISRAEL”„The Judiciary: The Court System”„Israel's high court unique in region”„Israel and the International Criminal Court: A Legal Battlefield”„Localities and population, by population group, district, sub-district and natural region”„Israel: Districts, Major Cities, Urban Localities & Metropolitan Areas”„Israel-Egypt Relations: Background & Overview of Peace Treaty”„Solana to Haaretz: New Rules of War Needed for Age of Terror”„Israel's Announcement Regarding Settlements”„United Nations Security Council Resolution 497”„Security Council resolution 478 (1980) on the status of Jerusalem”„Arabs will ask U.N. to seek razing of Israeli wall”„Olmert: Willing to trade land for peace”„Mapping Peace between Syria and Israel”„Egypt: Israel must accept the land-for-peace formula”„Israel: Age structure from 2005 to 2015”„Global, regional, and national disability-adjusted life years (DALYs) for 306 diseases and injuries and healthy life expectancy (HALE) for 188 countries, 1990–2013: quantifying the epidemiological transition”10.1016/S0140-6736(15)61340-X„World Health Statistics 2014”„Life expectancy for Israeli men world's 4th highest”„Family Structure and Well-Being Across Israel's Diverse Population”„Fertility among Jewish and Muslim Women in Israel, by Level of Religiosity, 1979-2009”„Israel leaders in birth rate, but poverty major challenge”„Ethnic Groups”„Israel's population: Over 8.5 million”„Israel - Ethnic groups”„Jews, by country of origin and age”„Minority Communities in Israel: Background & Overview”„Israel”„Language in Israel”„Selected Data from the 2011 Social Survey on Mastery of the Hebrew Language and Usage of Languages”„Religions”„5 facts about Israeli Druze, a unique religious and ethnic group”„Israël”Israel Country Study Guide„Haredi city in Negev – blessing or curse?”„New town Harish harbors hopes of being more than another Pleasantville”„List of localities, in alphabetical order”„Muncitorii români, doriți în Israel”„Prietenia româno-israeliană la nevoie se cunoaște”„The Higher Education System in Israel”„Middle East”„Academic Ranking of World Universities 2016”„Israel”„Israel”„Jewish Nobel Prize Winners”„All Nobel Prizes in Literature”„All Nobel Peace Prizes”„All Prizes in Economic Sciences”„All Nobel Prizes in Chemistry”„List of Fields Medallists”„Sakharov Prize”„Țara care și-a sfidat "destinul" și se bate umăr la umăr cu Silicon Valley”„Apple's R&D center in Israel grew to about 800 employees”„Tim Cook: Apple's Herzliya R&D center second-largest in world”„Lecții de economie de la Israel”„Land use”Israel Investment and Business GuideA Country Study: IsraelCentral Bureau of StatisticsFlorin Diaconu, „Kadima: Flexibilitate și pragmatism, dar nici un compromis în chestiuni vitale", în Revista Institutului Diplomatic Român, anul I, numărul I, semestrul I, 2006, pp. 71-72Florin Diaconu, „Likud: Dreapta israeliană constant opusă retrocedării teritoriilor cureite prin luptă în 1967", în Revista Institutului Diplomatic Român, anul I, numărul I, semestrul I, 2006, pp. 73-74MassadaIsraelul a crescut in 50 de ani cât alte state intr-un mileniuIsrael Government PortalIsraelIsraelIsraelmmmmmXX451232cb118646298(data)4027808-634110000 0004 0372 0767n7900328503691455-bb46-37e3-91d2-cb064a35ffcc1003570400564274ge1294033523775214929302638955X146498911146498911

                                      Черчино Становништво Референце Спољашње везе Мени за навигацију46°09′29″ СГШ; 9°30′29″ ИГД / 46.15809° СГШ; 9.50814° ИГД / 46.15809; 9.5081446°09′29″ СГШ; 9°30′29″ ИГД / 46.15809° СГШ; 9.50814° ИГД / 46.15809; 9.508143179111„The GeoNames geographical database”„Istituto Nazionale di Statistica”Званични веб-сајтпроширитиуу