text:
Playing Pickomino
In the game Pickomino, there are several tiles lying in the middle of the table, each with a different positive integer on them. Each turn, the players roll dices in a certain way and get a score, which is a nonnegative integer.
Now the player takes the tile with the highest number that is still lower or equal to their score, removing the tile from the middle and adding it to their stack. If this is not possible because all numbers in the middle are higher than the player's score, the player loses the topmost tile from their stack (which was added latest), which is returned to the middle. If the player has no tiles left, nothing happens.
The challenge
Simulate a player playing the game against themselves. You get a list of the tiles in the middle and a list of the scores that the player got. Return a list of the tiles of the player after all turns have been evaluated.
Challenge rules

You can assume that the list with the tiles is ordered and doesn't contain any integer twice.
You can take both lists of input in any order you want
The output has to keep the order of the tiles on the stack, but you can decide whether the list is sorted from top to bottom or from bottom to top.

General rules

This is code-golf, so shortest answer in bytes wins.
Don't let code-golf languages discourage you from posting answers with non-codegolfing languages. Try to come up with an as short as possible answer for 'any' programming language.
Standard rules apply for your answer with default I/O rules, so you are allowed to use STDIN/STDOUT, functions/method with the proper parameters and return-type, full programs.
Default Loopholes are forbidden.
If possible, please add a link with a test for your code (i.e. TIO).
Adding an explanation for you answer is recommended.

Example
(taken from the 6th testcase)
Tiles: [21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36]
Scores: [22, 22, 22, 23, 21, 24, 0, 22]

First score is 22, so take the highest tile in the middle <= 22, which is 22 itself.
Middle: [21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36]
Stack: [22]
Remaining scores: [22, 22, 23, 21, 24, 0, 22]

Next score is 22, so take the highest tile in the middle <= 22. Because 22 is already taken, the player has to take 21.
Middle: [23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36]
Stack: [22, 21]
Remaining scores: [22, 23, 21, 24, 0, 22]

Next score is 22, but all numbers <= 22 are already taken. Therefore, the player loses the topmost tile on the stack (21), which is returned into the middle.
Middle: [21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36]
Stack: [22]
Remaining scores: [23, 21, 24, 0, 22]

Next scores are 23, 21 and 24, so the player takes these tiles from the middle.
Middle: [25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36]
Stack: [22, 23, 21, 24]
Remaining scores: [0, 22]

The player busts and scores zero. Therefore, the tile with the number 24 (topmost on the stack) is returned into the middle.
Middle: [24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36]
Stack: [22, 23, 21]
Remaining scores: [22]

The last score is 22, but all tiles <= 22 are already taken, so the player loses the topmost tile on the stack (21).
Middle: [21, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36]
Final Stack and Output: [22, 23]

Test cases
(with the topmost tile last in the output list)
Tiles: [21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36]
Scores: [26, 30, 21]
Output: [26, 30, 21]

Tiles: [21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36]
Scores: [35, 35, 36, 36]
Output: [35, 34, 36, 33]

Tiles: [21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36]
Scores: [22, 17, 23, 19, 23]
Output: [23]

Tiles: [21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36]
Scores: []
Output: []

Tiles: [21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36]
Scores: [22, 17, 23, 19, 23, 0]
Output: []

Tiles: [21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36]
Scores: [22, 22, 22, 23, 21, 24, 0, 22]
Output: [22, 23]

Tiles: [1, 5, 9, 13, 17, 21, 26]
Scores: [6, 10, 23, 23, 23, 1, 0, 15]
Output: [5, 9, 21, 17, 13, 1]

Tiles: []
Scores: [4, 6, 1, 6]
Output: []

Sandbox

Can we assume there are no tiles with a value of zero in the middle?

@EmbodimentofIgnorance It says "positive integer", so yes.

Since the tiles are unique, would it be acceptable to take them as a bitmask?

@TRITICIMAGVS Yes, if the middle pile is empty, the player cannot take a tile from the middle, so they lose a tile (if they have one)

@Arnauld That is acceptable

Haskell, 119 111 104 103 bytes
1 byte saved thanks to Ørjan Johansen
(#)=span.(<)
(a%(b:c))d|(g,e:h)<-b#d=(e:a)%c$g++h|g:h<-a,(i,j)<-g#d=h%c$i++g:j|1>0=a%c$d
(a%b)c=a
([]%)

Try it online!
Assumes the tiles are sorted in descending order.
Not much fancy going on here.  The first argument is the players pile, the second their scores and the third is the pile in the middle.

This cannot be right because sort is ascending. The TIO test case never hits that branch, though. I strongly recommend testing all cases every time when iterating like this.

@ØrjanJohansen Thanks! Fixed now.  At least I don't have to import any longer!

Save a byte with (#)=span.(<).

@ØrjanJohansen Change made.  Funny thing is I tried that earlier and thought that it added a byte.

Japt, 24 bytes
Oof! That didn't work out as well as I thought it would!
Takes input in reverse order.
®=Va§Z)Ì?NpVjZ:VpNo)nÃN¤

Try it or run all test cases on TIO
®=Va§Z)Ì?NpVjZ:VpNo)nÃN¤     :Implicit input of N=[U=scores, V=tiles]
®                            :Map each Z in U
 =                           :  Reassign to Z
  Va                         :    0-based index of last element in V (-1 if not found)
    §Z                       :      Less than or equal to Z
      )                      :  End reassignment
       Ì                     :  Sign of difference with -1 (1 if found, 0 if not)
        ?                    :  If truthy (not zero)
         Np                  :    Push to N
           VjZ               :      Remove and return the element at index Z in V
              :              :  Else
               Vp            :    Push to V
                 No          :      Pop the last element of N
                   )         :    End Push
                    n        :    Sort V
                     Ã       :End map
                      N¤     :Slice the first 2 elements (the original inputs) off N

C# (Visual C# Interactive Compiler), 159 158 154 bytes
Called as f(tiles)(scores)
n=>m=>{var s=new Stack<int>();m.Add(0);n.ForEach(k=>{var a=m.Except(s).Where(x=>x<=k).Max();if(a<1)m.Add(s.Count<1?0:s.Pop());else s.Push(a);});return s;}

If only System.Void is actually a return type and not just a placeholder for reflection. I would be able to replace if(a<1)m.Add(s.Count<1?0:s.Pop());else s.Push(a); with var t=a>1?m.Add(s.Count<1?0:s.Pop()):s.Push(a);, saving two bytes.
Try it online!
//Function taking in a list and returning
//another function that takes in another list and returns a stack
n=>m=>{
//Initialize the stack
var s=new Stack<int>();
//Add a zero to the tiles, to ensure no exceptions appear due to accessing
//non-existent elements in an empty collection later
//when we try to filter it later and getting the biggest element
m.Add(0);
//Iterate through our scores
n.ForEach(k=>{
//Create a variable called a, which we will use later
var a=
//Get all the elements in the middle that haven't appeared in our stack
m.Except(s).
//And throw away all elements that are bigger than our current score
Where(x=>x<=k).
//And get the biggest element there, and that is now the value of a
//Without the m.Add(0), we would get an exception here
Max();
//Self-explanatory, if a is less than 1 aka if a equals 0
//Checks if all elements in the middle are bigger than our score
//Except for our self added 0, of course
if(a<1)
//Add 0 to the middle if the stack is empty
//Remember, zeros don't affect the list
m.Add(s.Count<1?0:
//Else pop the stack and add that to the middle
s.Pop());
//If a isn't 0, add a to the stack
else s.Push(a);});
//Afterwards, return the stack
return s;}

JavaScript (Node.js), 80 bytes
Same logic as the ES6 version, but takes the tiles as a BigInt bitmask and the scores as an array of BigInts.
m=>s=>s.map(g=x=>!x||m>>x&1n?m^=1n<<(x?r.push(x)&&x:r.pop()||~x):g(--x),r=[])&&r

Try it online!

JavaScript (ES6),  100 98 94  87 bytes
Takes input as (tiles)(scores). The tiles can be passed in any order.
t=>s=>s.map(g=x=>m[x]?m[x?r.push(x)&&x:r.pop()]^=1:g(x-1),t.map(x=>m[x]=1,m=[r=[]]))&&r

Try it online!
Commented
t => s =>                 // t[] = tiles; s[] = scores
  s.map(g = x =>          // for each score x in s[]:
    m[x] ?                //   if m[x] is set:
      m[                  //     update the 'middle':
        x ?               //       if x is not equal to 0:
          r.push(x) && x  //         push x in the stack r[] and yield x
        :                 //       else:
          r.pop()         //         pop the last value from the stack
                          //         (may be undefined if the stack is empty)
      ] ^= 1              //     toggle the corresponding flag in m[]
    :                     //   else:
      g(x - 1),           //     try again with x - 1
    t.map(x =>            //   initialization of the 'middle': for each value x in t[]:
      m[x] = 1,           //     set m[x]
      m = [r = []]        //     the stack r[] is stored as the first entry of m[],
                          //     which ensures that g will always stop when x = 0
    )                     //   end of initialization
  ) && r                  // end of main loop; return r[]

Perl 6, 89 bytes
{my@x;@^a;@^b>>.&{@x=|@x,|(keys(@a∖@x).grep($_>=*).sort(-*)[0]//(try ~@x.pop&&()))};@x}

Try it online!
I think there's a few more bytes to be golfed off this...

Ruby, 77 bytes
->t,s,r=[]{s.map{|i|(x=(t-[p]).reject{|j|j>i}.max)?(t-=[x];r<<x):t<<r.pop};r}

Try it online!

Charcoal, 35 bytes
Ｆη«≔⌈Φθ¬›κιι¿ι«≔Φθ⁻κιθ⊞υι»¿υ⊞θ⊟υ»Ｉυ

Try it online! Link is to verbose version of code. Explanation:
Ｆη«

Loop over the scores.
≔⌈Φθ¬›κιι

Look for the highest available tile.
¿ι«

If it exists then...
≔Φθ⁻κιθ

... remove the tile from the middle...
⊞υι

... and add it to the stack.
»¿υ

Otherwise, if the stack is not empty...
⊞θ⊟υ

Remove the latest tile from the stack and return it to the middle.
»Ｉυ

Print the resulting stack from oldest to newest.

Python 2, 120 bytes
m,s=input()
t=[]
for n in s:
 i=[v for v in m if v<=n]
 if i:v=max(i);t+=[v];m.remove(v)
 else:m+=t and[t.pop()]
print t

Try it online!

05AB1E, 27 22 bytes
vÐy>‹ÏDgĀià©K®së\sª])¨

Try it online or verify all test cases.
Explanation:
v            # Loop `y` over the (implicit) input-list of scores:
 Ð           #  Triplicate the tiles list (takes it as implicit input in the first iteration)
  y>‹        #  Check for each if `y` <= the value in the tiles list
     Ï       #  Only leave the values at the truthy indices
 D           #  Duplicate the remaining tiles
  ¯Êi        #  If this list is not empty:
     à       #   Pop the list, and push its maximum
      ©      #   Store it in the register, without popping
       K     #   Remove it from the tiles list
        ®    #   Push the maximum again
         s   #   Swap the maximum and tiles-list on the stack
    ë        #  Else:
     \       #   Remove the duplicated empty tiles-list from the stack
      sª     #   Add the last tile to the tiles-list
]            # Close the if-else and loop
 )           # Wrap everything on the stack into a list
  ¨          # Remove the last item (the tiles-list)
             # (and output the result implicitly)

Pyth, 32 bytes
VE ?JeS+0f!>TNQ=-QeaYJaQ.)|Y]0;Y

Try it online here, or verify all the test cases at once here.
There must be room for improvement here somewhere - any suggestions would be much appreciated!
VE ?JeS+0f!>TNQ=-QeaYJaQ.)|Y]0;Y   Implicit: Q=input 1 (middle), E=input 2 (scores), Y=[]
VE                            ;    For each score, as N, in the second input:
         f    Q                      Filter Q, keeping elements T where:
          !>TN                         T is not greater than N
                                       (less than or equal is the only standard inequality without a token in Pyth, grrr)
       +0                            Prepend 0 to the filtered list
     eS                              Take the largest of the above (_e_nd of _S_orted list)
    J                                Store the above in J
   ?                                 If the above is truthy:
                   aYJ                 Append J to Y
                  e                    Take last element of Y (i.e. J)
               =-Q                     Remove that element from Q and assign the result back to Q
                                     Else:
                          |Y]0         Yield Y, or [0] if Y is empty
                        .)             Pop the last element from the above (mutates Y)
                      aQ               Append the popped value to Q
                               Y   Print Y

Perl 5 -apl -MList:Util=max, 97 bytes
$_=$".<>;for$i(@F){(($m=max grep$_<=$i,/\d+/g)&&s/ $m\b//?$s:$s=~s/ \d+$//?$_:$G).=$&}$_=$s;s/ //

TIO
reads scores and tiles on next line and prints output.
How

-apl : -p to loop over lines and print, -a autosplit, -l to chomp from input and add newline character to output
$_=$".<> : to read next line (tiles) and prepend a space into default var $_
for$i(@F){ ... } loop $i over @F fields of current line (scores)
( .. ? .. : .. ).=$& append previous match to ternary l-value
($m=max grep$_<=$i,/\d+/g)&&s/ $m\b//?$s in case max value found and removed from tiles ($_) l-value is scores ($s)
$s=~s/ \d+$//?$_ otherwise if last number could be removed from scores it's tiles
:$G finally it's garbage because can't occur
$_=$s;s/ // to set scores to default var, and remove leading space


text:
Superpermutations
Introduction
You're a criminal tasked with stealing some secret plans from the new tech startup Dejavu. You sneak in over the back wall, but find a door that requires a pin to open it. You recognize the make of the lock and know that it takes a 5 digit pin using all numbers from 0 to 4. After each digit entered, the lock checks the last 5 digits entered and opens if the code is correct. You have to get past this lock, and fast.
Superpermutations in a Nutshell
A permutation is all possible combinations of a certain set of digits. for example, all the permutations of the digits 0, 1, 2 are:
012, 021, 102, 120, 201, and 210.
If we concatenate all these permutations together, we get a superpermutation:
012021102120201210
this superpermutation contains all the permutations of 0, 1, 2, but it's possible to make one shorter than this. I'm going to skip a bit here, but the shortest superpermutation of these digits is:
012010210
For our intents and purposes, this is essentially the shortest string of digits that contains all possible permutations of those digits, i.e. a superpermutation.
Task
Your task is a bit harder than the superpermutation example as shown above, because you have two more digits to worry about. -  If you haven't read about superpermutations, or my example above was a bit unclear, I highly suggest you read this great article by Patrick Honner on the subject (this challenge was quite heavily inspired by his article, so kudos to him): https://www.quantamagazine.org/unscrambling-the-hidden-secrets-of-superpermutations-20190116/. Your goal is to write the shortest program possible that generates a superpermutation of the digits 0 to 4.
Scoring
Your program does not take any input of any sort, and produce a superpermutation of the digits from 0 to 4. This resulting superpermutation must be printed to the console or visibly displayed to the user to the extent provided by your language of choice. This doesn't have to be the shortest permutation possible, it just has to be a valid superpermutation. Because of this, the goal is to write the shortest program with the shortest superpermutation, so you should calculate your score like so:
file size (bytes) * generated superpermutation length (digits)
for example, if I had a 40 byte program, and my superpermutation is 153 digits long, my score will be:
40 * 153 = 6120
as always, the goal is to get this score as low as possible.
Template
Here is how you should post your answer:

Language | Score
link to code in working environment (if possible)
code snippet
code explanation, etc.

Finalities
This is one of my first questions on this site. So please tell me if I'm missing anything or a section of my challenge is unclear. Thank you, and have fun golfing!

Can we know the length of the shortest superpermutation to get an idea of the lowest score?

@Fatalize 153 is the shortest

@Fatalize See A180632.

Is there any sort of time limit on the program?

Here is a script to test a superpermutation.

@JoKing no, as long as it eventually provides the correct answer and terminates.

At first glance, this looks like it just asks for a de Bruijn sequence; however, the scoring criterion makes this challenge interesting. Well done!

@EriktheOutgolfer It’s not just a scoring difference: a superpermutation includes all permutations of some length, while a de Bruijn sequence includes all strings of some length.

Just ran into this Standup Maths video about a 4chan poster providing a new proof for a lower-bound superpermutation length that was tighter than the previous one. Yes, the primary author on the paper is "Anonymous 4chan Poster"

05AB1E, score = 1673 (7 bytes · 239)
žBœ∊{3ý

Try it online!
How it works
žB          push 1024
  œ         permutations: ["1024", "1042", …, "4201"]
   ∊        vertically mirror: ["1024", "1042", …, "4201", "4201", …, "1042", "1024"]
    {       sort: ["0124", "0124", "0142", "0142", …, "4210", "4210"]
     3      push 3
      ý     join: "01243012430142301423…3421034210"

Pyth, score = 1944 (9 bytes · 216)
s+R+4d.p4

Try it online!
How it works
 +R   .p4   append to each permutation d of [0, 1, 2, 3]:
   +4d        [4] + d
s           concatenate

vy3yJ saves a byte

In the Pyth code, m+d -> +R saves a byte.

Wouldn't it be better to post this as two separated answers, since the approaches and programming languages are both different?

@KevinCruijssen Meh, they’re both variations on the theme of joining permutations of 4 elements with the remaining element; my 05AB1E answer actually has about as much in common with my Pyth answer as it does with different versions of itself. So I didn’t want to ask for twice as many upvotes just for switching languages.

Brachylog, score = 2907 (19 bytes × 153)
4⟦pᶠP∧~l.g;Pz{sᵈ}ᵐ∧

Too slow to see anything, but if you change 4 by 2 you can test it: Try it online!
This finds the shortest superpermutation as such:
4⟦                   The range [0,1,2,3,4]
  pᶠP                P is the list of all permutations of this range
     ∧
      ~l.            Try increasing lengths for the output
         g;Pz        Zip the output with P
             {sᵈ}ᵐ   For each permutation, it must be a substring of the output
                  ∧

CJam (6 * 240 = 1440)
5e!72>

Online demo, validation (outputs the index at which each permutation of 0..4 can be found; it needs to flatten the output because the original program gives suitable output to stdout but what it places on the stack is not directly usable).
Approach stolen from Sanchises, although the permutation order of CJam is different, giving a different substring.

CJam (22 * 207 = 4554)
0a4{)W@+W+1$)ew\a*W-}/

Online demo, validation.
Dissection
This uses a simple recursive construction.
0a       e# Start with a superpermutation of one element, [0]
4{       e# for x = 0 to 3:
  )      e#   increment it: n = x+1
  W@+W+  e#   wrap the smaller superpermutation in [-1 ... -1]
  1$)ew  e#   split into chunks of length n+1
  \a*    e#   insert an n between each chunk
  W-     e#   remove the -1s from the ends
}/

Python 2, Score: 24327 15147 12852 12628 (154*82 bytes)
S=str(int('OH97GKT83A0GJRVO309F4SGSRWD0S2T292S1JBPVKJ6CRUY8O',36))
print S+S[::-1]

Try it online!

Also:
Python 2, 12628 (154*82 bytes)
S=oct(int('FS02C3XQJX14OTVMGM70CGCPWU41MNJZ0CO37ZMU0A0Y',36))[:-1]
print S+S[::-1]

Try it online!

05AB1E, score: 5355 2160 (216 * 10 bytes)
3ÝœJε4yJ}J

Port of @AndersKaseorg's Pyth answer, so make sure to upvote him!
Try it online.
Explanation:
3Ý           # Push a list in the range [0,3]: [0,1,2,3]
  œ          # Get all possible permutations of this list
   J         # Join each inner list together to a single string
    ε        # Map each string `y` to:
             #  (Push string `y` implicitly)
     4       #  Push 4
      y      #  Push string `y` again
       J     #  Join all three together
        }J   # After the map: Join all strings together to a single string
             # (and output it implicitly as result)

Jelly, 3000 (600*5 bytes)
5ḶŒ!F

Try it online!

JavaScript (ES6), 26975 (325 * 83 bytes)
With this scoring system, there's little room for something between 'hardcode the optimal supermutation' and 'just use a short built-in to concatenate all permutations', at least in non-esolangs.
Here's an attempt anyway.
f=(a=[0,1,2,3,4],p=r='')=>a.map((v,i)=>f(a.filter(_=>i--),p+v))|~r.search(p)?r:r+=p

Try it online!
It generates a string of 325 bytes:
012340124301324013420142301432021340214302314023410241302431031240314203214032410341203421
041230413204213042310431204321102341024310324103421042310432201342014320314203412041320431
210342104330124301423021430241304123042131024310423201432041321044012340132402134023140312
4032141023410324201342031421034301243021431024320143210

You have a valid point, I will say I was a bit worried about the scoring system. In the future, I'll try to be more considerate and score in a way that allows for a wide variety of methods. :D

If you can return a string for less than 23 bytes boilerplate, hardcoding scores better than this solution (26975/153-153>23)

@Sanchises We need 5 bytes boilerplate for a string, or 4 for a BigInt.

@Sanchises We can compress the string slightly: Try it online! (or less if you don't count the default n suffix that console.log outputs)

Hex bigints

@Ausername Yes, that was Neil's suggestion above (with coercion to string).

Octave, 27 x 442 = 11934
'01234'(perms(1:5)'(4:445))

Try it online!
So, it turns out, naively generating all the permutations and then truncating to the shortest substring that is still a valid superpermutation is shorter than generating the shortest superpermutation. Sadly, this time the score is not a palindrome.
Octave, 97 x 153 = 14841
a=sym(9);while i<120
i=0;a+=1;q='01234';for t=q(perms(1:5))'
i+=any(regexp(char(a),t'));end
end
a

Try it online!
Entry updated for a few things

a++ is not implemented for symbolic numbers.
contains() is not implemented in Octave. Replaced with any(regexp()).
In the online link, I manually entered an a very close to the 153-length superpermutation. This allows for the solution to be verified.

Japt -P, 2376 (11 x 216)
4o ¬á Ë+4+D

Try it!
-1 byte thanks to @ Shaggy!
Port of Anders Kaseorg's Pyth answer.

There's a shortcut for q<space> ;)

Charcoal, 29 bytes, output length 153, score 4437
”)⊞⧴�r3⁼Ｈ⁴↓¦σ✳ＬïpＷＳ [Ｔ↑ZωÞ”‖Ｏ

Try it online! Link is to verbose version of code. Explanation: Like @TFeld, I just print half of a superpermutation and mirror it. I calculated the superpermutation using the following code:
Push(u, w);
for (u) {
    Assign(Plus(Plus(i, Length(i)), i), h);
    Assign(Ternary(i, Join(Split(w, i), h), h), w);
    Assign(Incremented(Length(i)), z);
    if (Less(z, 5)) for (z) Push(u, Slice(h, k, Plus(k, z));
}
Print(w);

This translates to a 45-byte program in Charcoal so would have scored 6885.

MATL, 16 x 442 = 7072
4Y25:Y@!)K442&:)

Try it online!
MATL port of my Octave answer. -442 thanks to Luis Mendo

Perl 6, 7191 (153*47 bytes)
say first *.comb(permutations(5).all.join),0..*

Try it online!
Finds the first number that contains all permutations of the digits 0 to 4. This will take a long time to execute, but you can test it with the first two permutations 0 and 0,1

Wolfram Language (Mathematica), 153*95 bytes,  14535
Nest[Flatten[Join[#,{Max@#+1},#]&/@Partition[#,Max@#+1,1]]//.{b__,a__,a__,c__}:>{b,a,c}&,{0},4]

Try it online!

9936

9504?

8424?

Nice! I just wanted to post a 153-solution. You can post a new answer if you like

Oh, also... explanation pls :P

The Recursive Algorithm is here.. http://www.gregegan.net/SCIENCE/Superpermutations/Superpermutations.html

I meant the Mathematica code :P although I should probably stop being lazy and figure it out myself

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
Heart-shaped quine
As you may or may not know, Valentine's day is getting close. So today, my task for you is:
Write a heart-shaped quine
Rules:

Code should look like an identifyable heart shape, i.e. Has two round parts on top and a pointy bottom. It does NOT have to be filled in, but this is not disallowed.
Standard Quine rules apply (no opening/reading files, etc)
This is a popularity-contest, so try to be as creative as possible in your solutions!

The closing date will be the day after valentine's day (15th of February), 12:00 UTC

A popularity contest must always include an objective validity criterion. The validity criterion identifyable heart shape. It doesn't have to be perfect, but make sure it resembles a heart is clearly not objective

@LuisMendo Updated to be more specific. If this is still not sufficient, feel free to suggest changes.

@Martmists I do not think round and pointy are really objective with regards to text ...

[tag:popularity-contests] are (ironically) not very popular these days, simply because they're very hard to define in a way that is objective while also allowing for variation in answers.

Title suggestion: A program that only loves itself

What you could do is to define a series of heart shapes (most likely increasing in size) and defining "looks like a heart" as "matches non-white border characters with one of the following hearts". Just an idea, though.

from a perl quine

Joke answer. Has two round parts on top and a pointy bottom. The heart is filled in.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Parallel accounts (Day 2)
Challenge Taken with permission from my University Code Challenge Contest

After finishing her studies a couple of months ago, Marie opened a bank account to start receiving the payment of her first job in town. Since then she has been performing a few transactions with it. Her first payment was $1000 dollars. With that money she paid for a dinner in which she invited her parents (The dinner cost $150 dollars), then, she did a purchase in a well-known supermarket ($80 dollars) and a hotel reservation for her vacations ($200). At the end of the month she received her payment again (1040 dollars, a little more than the previous month) and the day after she spent another $70 dollars at the supermarket.
Today, she realized that if after paying the first $80 dollars in the supermarket a second account had been created and the first one frozen, both accounts would have exactly the same balance:
$$ \underbrace{1000\quad -150\quad -80}_{Total=770}\quad \underbrace{-200\quad 1040\quad -70}_{Total=770} $$
The event was so rare to her that she wants to continue ascertaining if the movements of her account and those of her friends have also this feature or not.
Challenge
Given a list of transactions, output the number of instants of time in which the owner of the bank account could have created a second account so that both had the same final balance.
Example: [1000, -150, -80, -200, 1040, -70]
$$ \color{red}{1)\quad\underbrace{}_{Total=0}\quad \underbrace{1000\quad -150\quad -80\quad -200\quad 1040\quad -70}_{Total=1540}} $$
$$ \color{red}{2)\quad\underbrace{1000}_{Total=1000}\quad \underbrace{-150\quad -80\quad -200\quad 1040\quad -70}_{Total=540}} $$
$$ \color{red}{3)\quad\underbrace{1000\quad -150}_{Total=850}\quad \underbrace{-80\quad -200\quad 1040\quad -70}_{Total=690}} $$
$$ \color{green}{4)\quad\underbrace{1000\quad -150\quad -80}_{Total=770}\quad \underbrace{-200\quad 1040\quad -70}_{Total=770}} $$
$$ \color{red}{5)\quad\underbrace{1000\quad -150\quad -80\quad-200}_{Total=570}\quad \underbrace{ 1040\quad -70}_{Total=970}} $$
$$ \color{red}{6)\quad\underbrace{1000\quad -150\quad -80\quad -200\quad 1040}_{Total=1610}\quad \underbrace{-70}_{Total=-70}} $$
$$ \color{red}{7)\quad\underbrace{1000\quad -150\quad -80\quad-200\quad 1040\quad -70}_{Total=1540}\quad \underbrace{}_{Total=0}} $$
Test Case

Input: 1000 -150 -80 -200 1040 -70 Output: 1
Input: 100 -100 Output: 2
Input: 1 2 3 Output: 1
Input: 10 -20 15 Output: 0
Input: 15 -15 15 -15 Output: 3
Input: 1 Output: 0

Notes

You can assume there wont be any transaction of $0 dollars
You can take input in any reasonable way

After 6 months of frozen and newly created accounts, it is reported that Marie's banker is now interned in a sanitarium. "We are your friends. You need some rest", they said.

Suggested test case of a single transaction

C# (Visual C# Interactive Compiler), 63 bytes
n=>n.Append(0).Where((a,b)=>n.Take(b).Sum()*2==n.Sum()).Count()

Saved 6 bytes thanks to dana
Try it online!

Perl 6, 25 bytes
{+grep .sum/2,[\+] 0,|$_}

Try it online!
Explanation
We just prepend a zero to the given list (0,|$_), make a sequence of partial sums with [\+] (i. e. the sequence formed by the first element, the sum of first two, the sum of first three etc.), and look (grep) for any elements that are exactly equal to the half of the final account state (sum of the given list). Finally, we count them with a +.

05AB1E, 11 bytes
0.ø.œ2ùO€ËO

Try it online or verify all test cases.
Explanation:
0.ø          # Surround the (implicit) input list with a leading and trailing 0
             #  i.e. [100,-100] → [0,100,-100,0]
   .œ        # Get all possible partitions to divide the list
             #  → [[[0],[100],[-100],[0]],[[0],[100],[-100,0]],[[0],[100,-100],[0]],[[0],[100,-100,0]],[[0,100],[-100],[0]],[[0,100],[-100,0]],[[0,100,-100],[0]],[[0,100,-100,0]]]
     2ù      # Only leave partitions consisting of 2 items
             #  → [[[0],[100,-100,0]],[[0,100],[-100,0]],[[0,100,-100],[0]]]
       O     # Take the sum of each
             #  → [[0,0],[100,-100],[0,0]]
        €Ë   # Check of each inner list if both sums are equal (1 if truthy; 0 if falsey)
             #  → [1,0,1]
          O  # Take the sum of that (and output as result)
             #  → 2

Jelly, 11 6 bytes
ŻÄḤ=SS

Try it online!

JavaScript (Node.js), 45 bytes
a=>!a.map(v=>o[s+=v]=-~o[s],s=0,o=[1])|o[s/2]

Try it online!
Save 4 bytes by using -~o[s]. Thanks to Shaggy.

+1 for beating Arnauld :o

45 bytes

@LuisfelipeDejesusMunoz, Arnauld ain't (always) unbeatable! ;)

@Shaggy leading + is changed to !, so it could work for input [100].

Ah, didn't realise we had to handle singleton arrays. Nicely fixed.

44 bytes if undefined instead of $0$ is acceptable.

Brachylog, 9 bytes
Not as good as day 1. This one loses to Jelly
{~c₂+ᵐ=}ᶜ

Explanation
{      }ᶜ   # Count the ways to:
 ~c₂        #   Split the input array in 2 ...
    +ᵐ      #   so that their sums ...
      =     #   are equal

Test suite:
Try it online!

JavaScript (ES6), 52 bytes
a=>a.map(x=>n+=(s+=x)==eval(a.join`+`)-s,n=s=0)|n+!s

Try it online!
Commented
a =>                        // a[] = input array
  a.map(x =>                // for each element x in a[]:
    n +=                    //   increment n if the following test is truthy:
      (s += x)              //     update the left sum
      ==                    //     and test whether it's equal to
      eval(a.join`+`) - s,  //     the right sum
    n = s =0                //   start with n = s = 0
  )                         // end of map()
  | n                       // yield n; if the final sum is 0, it means that we could have
  +                         // created a balanced account at the beginning of the process;
  !s                        // so, we increment n if it is

Recursive version,  54  53 bytes
f=(a,s=0)=>a+a?(s==eval(a.join`+`))+f(a,s+a.pop()):!s

Try it online!

I was just about to suggest that 52-byte version!

@Shaggy Yeah, I discarded the non-recursive version too soon because I thought the recursive one could be shorter.

APL (Dyalog Unicode), 21 bytesSBCS
Anonymous tacit prefix function
+/⊂((+/↑)=1⊥↓)¨⍨0,⍳∘≢

Try it online!
⍳ ɩndices
 ∘ of
≢ the tally of transactions
0, prepend zero
⊂(…)¨⍨ apply the following tacit function with each of those as left argument and the entire list of transactions as right argument (⍨ swaps argument
⊂ the entire list of transactions
 (…) as left argument to the below function
  ¨ applied to each of the indices
   ⍨ with swapped arguments (i.e. list on right, indices on left:
  ↓ drop that many from the left
  1⊥ sum (lit. evaluate in base-1)
  (…)= is it (0/1) equal to…
   ↑ take that many transactions from the left
   +/ sum them
+/ sum that Boolean list to get the count of truths

Japt -x, 14 11 bytes
iT å+ ®¥nUx

Try it
iT å+ ®¥nUx     :Implicit input of array U
i               :Prepend
 T              :  Zero
   å+           :Cumulatively reduce by addition
      ®         :Map each Z
       ¥        :  Test for equality with
        n       :  Z subtracted from
         Ux     :  U reduced by addition
                :Implicitly reduce by addition and output

Python 3, 67 58 bytes
lambda l:sum(sum(l[:x])*2==sum(l)for x in range(len(l)+1))

Try it online!
-9 bytes thanks to @Don't be a x-triple dot

Summing instead of filtering will save you 7 bytes: lambda l:sum(sum(l[:x])==sum(l[x:])for x in range(len(l)+1)).

sum(l[:x])*2==sum(l) saves you another 2 bytes.

R, 50 37 bytes
sum(c(0,cumsum(x<-scan()))==sum(x)/2)

Try it online!

Perl 5 -p, 42 41 bytes
@NahuelFouilleul saves a byte
y/ /+/;$\+=eval$'==eval$`while/^|$|\+/g}{

Try it online!

y/ /+/; saves 1 byte

34 bytes using other approach

30 bytes

Batch, 84 bytes
@set s=%*
@set/as=%s: =+%,c=0
@for %%n in (0 %*)do @set/as-=%%n*2,c+=!s
@echo %c%

Takes input as command-line arguments. Explanation:
@set s=%*

Join the arguments with spaces.
@set/as=%s: =+%,c=0

Replace the spaces with +s and evaluate the result. Also clear the count.
@for %%n in (0 %*)do @set/as-=%%n*2,c+=!s

For each amount, subtract double that from the sum. If the result is zero, then this is a valid match, so increment the count. The extra zero at the beginning allows for a match before any amounts.
@echo %c%

Print the result.

Charcoal, 15 bytes
⊞θ⁰ＩΣＥθ⁼Σθ⊗Σ✂θκ

Try it online! Link is to verbose version of code. Explanation:
 θ              Input list
  ⁰             Literal 0
⊞               Push to list
      θ         Augmented list
     Ｅ          Mapped to
             θ  Augmented list
            ✂   Sliced from
              κ Current index
           Σ    Summed
          ⊗     Doubled
       ⁼        Equals
         θ      (Augmented) list
        Σ       Summed
    Σ           Sum of booleans
   Ｉ            Cast to string
                Implicitly print

Unfortunately in Charcoal Sum([]) is not 0 so I have to ensure that there is always at least one element to sum.

PowerShell, 88 82 bytes
-6 Bytes thanks to mazzy

param($n)0..($x=$n.length)|%{$i+=+$z-eq($n[$_..$x]|measure -Su).sum;$z+=$n[$_]};$i

Try it online!
This seems like a very clumsy method but it got the job done. I'll try and revamp it in the future.

you can write $i+=<predicate> instead if(<predicate>){$i++}

MATL, 9 bytes
s0GhYsE=s

Try it online!
Same approach as some other answers: prepend a zero, and check how often half the cumulative sum is equal to the total sum.
s   % Total sum of (implicit) input
0Gh % Prepend 0 to another copy of the input
Ys  % Cumulative sum
E=  % Check element-wise equality of 2*cumulative sum with total sum
s   % Sum number of `true` values

PowerShell, 49 45 36 bytes
(($args+0|%{2*($s+=$_)})-eq$s).count

Try it online!

bash, 52 bytes
IFS=+;for i in 0 $@;{((c+=2*(x+=i)=="$*"));};echo $c

TIO
The trick: setting IFS=+, "$*" expands to a string where arguments are delimited by +, in arithmetic expression eval to the sum

Haskell, 46 35 bytes
f x=sum[1|a<-scanl(+)0x,a==sum x/2]

Try it online!

J, 19 bytes
1#.[:(={:-])0+/\@,]

Try it online!
explanation
1 #. [: (= ({: - ])) 0 +/\@, ]

                     0     , ]  NB. prepend 0 to input...
                       +/\@     NB. and take the prefix sums...
     [:    ({: - ])             NB. then subtract that list
                                NB. from its final elm
                                NB. (`{:`), giving the list
                                NB. of suffix sums...
     [: (= (      ))            NB. create a 1-0 list showing
                                NB. where the prefix sums
                                NB. equal the suffix sums
1 #.                            NB. and take the sum.


text:
Indexing the Extended Fibonacci Numbers
You've probably heard of Fibonacci numbers. Ya know, that integer sequence that starts with 1, 1, and then each new number is the sum of the last two?
1 1 2 3 5 8 13...

And so on. Challenges about Fibonacci numbers are pretty popular 'round here. But who says that the Fibonacci numbers have to start with 1, 1? Why couldn't they start with 0, 1? Alright, let's redefine them to start at 0:
0 1 1 2 3 5 8 13...

But... We don't have to stop there either! If we can add the last two numbers to get the next one, we could also subtract the first number from the second number to prepend a new number. So it could start with 1, 0:
1 0 1 1 2 3 5 8 13...

We can even end up with negatives:
-1 1 0 1 1 2 3 5 8 13...

And this series also goes on forever. I think it's interesting how it ends up kinda mirroring the regular Fibonacci numbers, just with every other number made negative:
13 -8 5 -3 2 -1 1 0 1 1 2 3 5 8 13...

Let's call this series the "Extended Fibonacci Number", or EFN. Since there isn't really an obvious negative number to start this series on, we'll say that 0 shows up at 0, the regular Fibonacci numbers extend in to the positive indices, and the negative (half-negative?) Fibonacci numbers extend in to the negative indices, like so:
Indices: ...-7  -6 -5  -4 -3  -2 -1  0  1  2  3  4  5  6  7 ...
Values:  ...13  -8  5  -3  2  -1  1  0  1  1  2  3  5  8  13...

This leads into today's challenge:

Given an integer N, return every index at which N appears in the EFN series.

Some random observations on this task:

1 appears more times in the EFN than any other number: [-1, 1, 2]. No number will appear in more than 3 places.
Every Fibonacci number > 1 will show up either once (3, 8, 21, etc.) or twice (2, 5, 13, etc.)

Rule Clarifications:

If abs(N) is not a Fibonacci number, it will never appear in the EFN series, so you must output nothing/an empty collection if possible, or if that is not possible in your language, you can output some constant non-numeric value.
If N appears at multiple places in the EFN, your output does not need to be sorted. Although each index must appear exactly once.
Although most sequence challenges allow you to choose whether you want to use 1-based or 0-based indexing, this challenge must use the indexing described (where 0 appears at 0).
You may take I/O through any standard format.

Test Cases
-13: []
-12: []
-11: []
-10: []
-9: []
-8: [-6]
-7: []
-6: []
-5: []
-4: []
-3: [-4]
-2: []
-1: [-2]
0: 0
1: [-1, 1, 2]
2: [-3, 3]
3: [4]
4: []
5: [-5, 5]
6: []
7: []
8: [6]
9: []
10: []
11: []
12: []
13: [-7, 7]

And some larger test cases:
89: [-11, 11]
1836311903: [46]
10000: []
-39088169: [-38]

As usual, shortest answer in bytes wins!

Related, though not a duplicate, since it doesn't require handling negatives or non-Fibonacci numbers.

By the way, there's another good reason that the Fibonacci numbers should always be indexed so that $F_0=0$, even when using only positive Fibonacci numbers. That's the indexing that allows this beautiful property: if $k$ divides $n$, then $F_k$ divides $F_n$.

Haskell, 78 bytes
4 bytes saved thanks to nimi
a#b=a:b#(a-b)
f 0=[0]
f a=do{(i,x)<-zip[0..a*a+1]$0#1;[-i|x==a]++[i|abs x==a]}

Try it online!
First we set up (#), (#) takes two parameters, a and b, and returns the a list starting with a and followed by b#(a-b).  This creates an infinite list, but because Haskell is lazy we don't need to wory about it looping forever.  This essentially works backwards creating the Fibonacci sequence before a certain pair. For example (0#1) would be the list of all the Fibonacci numbers with negative index.
From here we make f.  f takes a argument a which is the number we are trying to find in the sequence.  Here we use do notation to do a list comprehension.  We start by taking the first a*a+1 elements of the list 0#11.  Since the function a*a+1 grows faster than the inverse of the Fibonacci sequence we can be sure that if we check within this bound we will find all the results.  This prevents us from searching an infinite list.  Then for each value x and index i, if x==a we found a in the negative half of the sequence so we return -i, and if abs x==a we return i as well because the absolute value of the negative half is the positive half so we found it there.
Since this makes the list [0,0] for 0 we hardcode the correct output for that one.
1: This trick is taken from Οurous' Clean answer.  The same speedup aplies here as there, replace a*a+1 with abs a+1 to save a lot of time.

Replacing u with a#b=a:b#(a-b) plus 0#1 saves a byte: Try it online!

@nimi It actually saves 4 bytes, your tio link has 3 extra spaces.

Clean, 132 120 109 bytes
import StdEnv
g n|n<2=n=g(n-1)+g(n-2)
?k=[e\\p<-[0..k*k+1],e<-if(isOdd p)([~p,p]%(0,k))[p*sign k]|g p==abs k]

Try it online!
g :: Int -> Int is the Fibonacci function.
? :: Int -> [Int] just indexes into the elements of the EFN within k^2+1 of 0.
For a version that runs in a sane ammount of time, change k*k+1 to abs k+1.

That list comprehension trick is pretty neat! Saves my 14 bytes on my answer.

Jelly, 11 bytes
A‘ŒRÆḞẹ_A_2

Try it online!

APL (Dyalog Classic), 52 50 bytes
Requires ⎕IO←0
{X-⍨⍸⍵=F,⍨⌽0,F×1 ¯1⍴⍨≢F←{⍵≤1:1⋄+/∇¨⍵-1 2}¨⍳X←1+|⍵}

Try it online!

JavaScript (ES6),  94  93 bytes
n=>(g=a=>a*a<n*n?g(b,b+=a,i++):a%n)(i=0,b=1)?[]:i&1?n<0?~n?[]:-2:i-1?[-i,i]:[-i,i,2]:n<0?-i:i

Try it online!
Or 92 bytes if we can return \$-0\$ for \$n=0\$.

Python 3, 92 bytes
f=lambda x,l=[],i=0,a=0,b=1:i<x*x+2and f(x,l+[i][:a==x]+[-i][:i%2*2*a-a==x],i+1,b,a+b)or{*l}

Try it online!
Returns a set of indices.

Python 2, 87 85 bytes
f=lambda v,a=0,b=1,i=1:v*v>=a*a and[i]*(v==b)+[1-i]*((-1)**i*a==v)+f(v,b,a+b,i+1)or[]

Try it online!

Retina 0.8.2, 104 102 bytes
[1-9].*
$*
(-)?(\b1|(?>\3?)(\2))*(1)$|(0)?.*
$5$1$4$4$#2$*
-1(11)+$

^1(11)+$
-$&,$&
1+
$.&
^2$
-1,1,2

Try it online! Explanation:
[1-9].*
$*

Convert to unary, unless the input is zero.
(-)?(\b1|(?>\3?)(\2))*(1)$|(0)?.*
$5$1$4$4$#2$*

Calculate the Fibonacci index of the absolute value, but if the number is not a Fibonacci number then delete it, unless it was zero. This uses @MartinEnder's Fibonacci-testing regex.
-1(11)+$

Delete negative numbers whose absolute values are odd Fibonacci numbers.
^1(11)+$
-$&,$&

Add negative indices for odd positive Fibonacci numbers.
1+
$.&

Convert to decimal.
^2$
-1,1,2

Add the extra indices for 1.

Actually, 34 bytes
;╗3*;±kSix⌠;;AF@;1&@0>*YτD(s**╜=⌡░

Brute-force saves the day
Explanation:
;╗3*;±kSix⌠;;AF@;1&@0>*YτD(s**╜=⌡░
;╗                                  save a copy of the input (let's call it N) to register 0 (the main way to get additional values into functions)
  3*;±                              -3*N, 3*N
      kSi                           push to list, sort, flatten (sort the two values on the stack so that they are in the right order for x)
         x                          range(min(-3*N, 3*N), max(-3*N, 3*N))
          ⌠;;AF@;1&@0>*YτD(s**╜=⌡░  filter (remove values where function leaves a non-truthy value on top of the stack):
           ;;                         make two copies of parameter (let's call it n)
             AF                       absolute value, Fib(|n|)
               @;                     bring a copy of n to the top of the stack and make another copy
                 1&                   0 if n is divisible by 2 else 1
                   @0>                1 if n is negative else 0 (using another copy of n)
                      *               multiply those two values (acts as logical AND: is n negative and not divisible by 2)
                       YτD            logical negate, double, decrement (maps [0, 1] to [1, -1])
                          (s          sign of n (using the last copy)
                            **        multiply Fib(|n|), sign of n, and result of complicated logic (deciding whether or not to flip the sign of the value for the extended sequence)
                              ╜=      push value from register 0, equality comparison (1 if value equals N else 0)

Try it online!

Python 2, 95 92 94 bytes
x=input()
i=a=0;b=1
while x*x>=a:
 if 0<a==x:print i
 if[-a,a][i%2]==x:print-i
 a,b=b,a+b;i+=1

Try it online!

C# (Visual C# Interactive Compiler), 144 bytes
o=>{int c=0,n=1,i=0,k=Math.Abs(o);for(;c<k;i++,n+=c,c=n-c);return new[]{c>k|o<0?0.1:i,(i>0|o<0)&i%2>0&c==k?-i:0.1,o==1?2:0.1}.Where(p=>p!=0.1);}

Try it online!

05AB1E, 36 bytes
x*ÝʒÅfIÄQ}Ii®šë1KIdiÐ`ÉiD(ì}ëD`Èi(ë¯

There has to be a better approach.. >.> There are six (or seven if we include 0) different scenarios for this challenge, and it's killing me..
Try it online or verify all test cases.
Explanation:
x*Ý            # Create a list in the range [0, (implicit) input * input * 2]
   ʒ     }     # Filter this list by:
    Åf         #  Where the Fibonacci value at that index
      IÄQ      #  Is equal to the absolute value of the input
Ii             # If the input is exactly 1:
  ®š           #  Prepend -1 to the list
ë              # Else:
 1K            #  Remove all 1s (only applies to input -1)
 Idi           #  If the input is non-negative:
    Ð`Éi   }   #   If the found index in the list is odd:
        D(ì    #    Prepend its negative index to the list
   ë           #  Else (the input is negative):
    D`Èi       #   If the found index in the list is even:
        (      #    Negate the found index
       ë       #   Else (found index is odd):
        ¯      #    Push an empty array
               # (Output the top of the stack implicitly as result)

Some step-by-step examples:
Input:  Filtered indices:  Path it follows (with actions) and result:

-8      [6]                NOT 1 → neg → even index → negate index: [-6]
-5      [5]                NOT 1 → neg → odd index → push empty array: []
-1      [1,2]              NOT 1 → (remove 1) neg → even remaining index: negate index: [-2]
0       [0]                NOT 1 → even index → negate index: [0]
1       [1,2]              1 → prepend -1: [-1,1,2]
5       [5]                NOT 1 → non-neg → odd index → Prepend neg index: [-5,5]
8       [6]                NOT 1 → non-neg → even index → (nothing): [6]


text:
Radiation is Painful
A radiation-hardened quine can take a hit and stay standing, but nobody ever said that the quine can't be a wuss about it.
For this challenge, you should write a quine that:

If no characters are removed, prints its source code normally.
Iff any one character is removed, prints the original program's source code, followed by a new line and then this text:
Owie! That hurt!

You should only print the original plus that.

Standard quine rules apply for this challenge, and the shortest valid code in bytes wins. See also Radiation Detector!

I'm not sure what this adds to the site beyond the quine and radiation hardened quine challenges.

There's a little bit of new complexity in both retaining the same behaviour while irradiated, while also being able to tell that it has been irradiated.

Can I choose which character is deleted?

@seshoumara no, you can't. That'd sorta defeat the point of radiation-hardening.


text:
determine if the circle is boxed in
Pretty simple challenge here. Who can make the fastest algorithm (lowest time complexity) to determine whether or not the circle is "boxed in" given the following setup?
Input: Your program receives a pair of numbers (a,b) that denotes the position of a circle on a grid like this with arbitrary dimensions:

Where a-1 is the number of units from the right, and b-1 is the number of units from the bottom. Assume that (a,b) is always a white square. The program should work for arbitrary arrangements of purple squares .
Definition of "boxed in": A circle at S=(a,b) is "boxed in" if there is no path from S consisting of vertical, horizontal, and diagonal one space moves that reaches a white square on the edge of the grid without going on a purple space. This means that:

is boxed in, but:

is not because of the open diagonal.
Output: A Boolean - is in boxed in, or not?
You can choose whatever data structure you want to represent the grid. Remember though, the goal is speed so keep that in mind.
[please note this is my first post on this SE site, so if I need to fix something let me know]

I see the input for the position of the circle, but how do we determine where the purple squares are?

Welcome to PPCG. This is an interesting question but it needs to be more rigorously defined in order to run as a challenge here. In future you might want to post your challenge ideas to https://codegolf.meta.stackexchange.com/q/2140/15599 I would suggest that answering a few challenges would also help to identify what needs to be included in a spec

I would also suggest that fastest algorithm is going to be difficult to tie break. What you are effectively looking for is a fill algorithm, and there are only a few fast ones out there. Time complexity rarely makes a good winning criterion. Fastest code is also unlikely to work unless you can provide very large test cases. I personally think codegolf (shortest code) would work best.

OK thanks guys I'll fix the question after school. But to address @JoKing the input format for the purple squares is intended to be up to you (whatever is fastest for your program). Obviously I did not make this clear, that's my bad

i think the problem is that you seemed to specify that the only input is a pair of numbers (a,b). I also just noticed you have two winning criterion tags [tag:code-challenge] and [tag:fastest-algorithm]. I assume you just want [tag:fastest-algorithm]


text:
Tetris! Final heights (Day 3)
Challenge Taken from my university code challenge contest
This is actually Day 0 but yesterdays' challenge was too easy and can be a dupe of another question here.

Tetris is a video game that became popular in the 80s. It consists of placing a series of pieces with different shapes that fall on a board, so that they fit in the most compact way possible.
In this problem we will assume a sequence of pieces that fall, each in a certain position and with a certain orientation that can not be changed. The pieces are piled up as they fall and the complete rows are not eliminated (as in the original game). The objective is to determine the final height of each column of the board after all the pieces fall.
There are a total of 7 different pieces, shown in the figure:

Challenge
Given a list of pieces, output the height of all the columns from the board after all pieces falls
A piece consists of three numbers: I, R and P. The first number, I, is the identifier of the piece (a number between 1 and 7, in the same order as in the figure). The second number, R, is the rotation of the piece. It can take the values 0, 90, 180 or 270 and represents the angle of rotation of the piece in the anti-clockwise direction. The third number, P, indicates the position of the piece. Represents the column on the left occupied by the piece (this can be 1 or 0 Index. Please specify).
Example and Test case (1 Index)

Given [[1, 0, 1], [4, 0, 1], [5, 90, 4]]

Output [3, 3, 1, 3, 2]

Given [[6, 270, 4], [1, 180, 5], [1, 90, 6], [7, 0, 4]]

Output [0, 0, 0, 9, 9, 8, 3, 3]

Given [[3,0,1],[3,180,3]] Output [1,1,4,4,4]
Given [[2,180,1],[2,0,3]] Output [2,2,4,3,3]

Notes

This is code-golf
Row/Column can be 1 or 0 Index. Please specify.
You can redefine input values (maybe you want to call piece 1 as A, etc..). In that case please specify

Questions

Can we use any 4 distinct values instead of an angle in degrees?: Yes
Are we supposed to handle "holes" if a piece doesn't exactly fit over the previous ones?: Yes
Is the height or the width of the board bounded? No. Neither the width nor the height are bounded

Thanks @Arnauld for the images and the test cases *.*

Can I, R and P be input in a different order?

@Neil yes. It can be in any order

If we can redefine input values, can I take the piece id as a matrix that represents the pieces shape(without rotation)?

I think we cannot input a matrix representing pieces shape for 2 reasons. The input is clearly defined: 1,2,3.. or A,B,C..  And one fundamental part of this challenge is to manage this constraint.

@EmbodimentofIgnorance As AZTECCO said, redefine values means you may take letters instead of numbers A => 1, B => 2, etc...

Would it be OK to include trailing 0's?

JavaScript (Node.js),  286 284 270  266 bytes
Pieces and positions are 0-indexed. Angles are in \$[0..3]\$.
a=>a.map(([p,r,x])=>(g=y=>y>3?g(+!Y--):b[Y+y]&(m[y]=('0x'+`717433667233ff4717333327661${1e12+0x5e7056a566ffff57efa65n.toString(4)}`[(p*2+r*56+y*99+13)%113])<<x)?m.map(v=>(g=x=>v&&g(x+1,H[x]=v&1?Y:~~H[x],v>>=1))(0,b[++Y]|=v)):g(y+1))(Y=a.length*4),m=[b=[-1]],H=[])&&H

Try it online!
or try an enhanced version that also displays the final board.
Shape encoding
All pieces are stored as exactly 4 nibbles (4x4 bits) with the rows sorted in reverse order and the leftmost pixel mapped to the least significant bit. In other words, the binary representation of the shape is mirrored both vertically and horizontally.
Example:

Hash function and lookup table
Given a piece \$p \in [0..6]\$, a rotation \$r \in [0..3]\$ and a row \$y \in [0..3]\$, we use the following hash function to get the index \$n\$ of the corresponding bitmask from a lookup table:
$$n=(2p+56r+99y+13)\bmod 113$$
Only the first \$82\$ entries are explicitly stored. Everything else is set to \$0\$.
These entries are packed as:
`717433667233ff4717333327661${1e12+0x5e7056a566ffff57efa65n.toString(4)}`

which expands to the following 82 nibbles:
"717433667233ff47173333276611000000000000113213001112221112123333333311133233221211"

Using hexadecimal in the final format is only required for the two horizontal representations of the \$I\$ piece, hence the "ff" in the above string.
The parameters of the hash function were brute-forced in a way that optimizes leading and trailing zeros. The fact that the string can be compressed some more by using 1e12 for the zeros in the middle and a conversion from base-16 to base-4 for the right part is just a welcome but unexpected side effect. :-)
Here is a demonstration of the unpacking process for all pieces and all rotations.
Commented
a => a.map(([p, r, x]) => (     // for each piece p with rotation r and position x:
  g = y =>                      //   g = recursive function taking y
    y > 3 ?                     //   if y is greater than 3:
      g(+!Y--)                  //     reset y to 0, decrement Y and try again
    :                           //   else:
      b[Y + y] & (              //     test if we have a collision of the board with
        m[y] =                  //     the y-th row m[y] of the current piece
          ('0x' + `717...`[     //     which is extracted from a lookup table
            (p * 2 + r * 56 +   //     using the hash function described in the
             y * 99 + 13) % 113 //     previous paragraph
          ]) << x               //     and shifted to the left according to x
      ) ?                       //     if we have a collision:
        m.map(v => (            //       we iterate again on the piece rows stored in m[]
          g = x =>              //         g = recursive function taking x
            v &&                //         if v is not equal to 0:
            g(                  //           do a recursive call:
              x + 1,            //             increment x
              H[x] =            //             update the height at x:
                v & 1 ?         //               if this bit is set:
                  Y             //                 set it to Y
                :               //               else:
                  ~~H[x],       //                 leave it unchanged or force it to 0
                                //                 if it was still undefined
              v >>= 1           //             shift v to the right
            )                   //           end of recursive call
          )(0,                  //         initial call to g with x = 0
               b[++Y] |= v)     //         increment Y and copy the piece row to the board
        )                       //     end of map()
      :                         //   else (no collision):
        g(y + 1)                //     do a recursive call to test the next row
  )(Y = a.length * 4),          //   initial call to g with y = Y = 4 * the number of pieces
                                //   (assuming the worst case: piled vertical I pieces)
  m = [b = [-1]], H = []        //   initialize m[], b[] and H[]
                                //   we set a full line at the bottom of b[]
) && H                          // end of map(); return H[]

Nice job packing/unpacking the pieces. That's really impressive :)

C (clang), 253 239 221 212 bytes
t(*a,*b,c){char*z="VP\225TBUIUVAaUZ@AWVDeTf@EVWhUEQVRTYTUU";for(size_t*p,f,n,y,i;c--;b++){f=1<<(8-*b)/3;p=z+*b++*8+*b++%f*2;f=n=*p;for(y=i=0;i<=f%4;y=fmax(y,a[*b+i++]+n%4))n/=4;for(;i--;a[*b+i]=y+n%4)n/=4;}}

Try it online!
p.s. Actually the code size is 221 bytes (but 212 chars) because of UNICODE chars coded in UTF-8. But tio.run treats it as 212 byte code...
Code size on my computer is 209 chars (218 bytes). But I couldn't replace \225 by visible char in tio.run
Ungolfed code
// a - output array (must be zeroed), b - array of block info, c - number of blocks

// Figure codes: 2->0, 3->1, 6->2, 1->3, 5->4, 7->5, 4->6 (0,1 are L-figures, 2 is is T-figure, 3 is a line 1x4; 4,5 are zigzags; 6 is a cube 2x2)
// Vertical and horizontal positions are zero-indexed, angles = 0..3

t(*a,*b,c)
{
  char*z="VP\225TBUIUVAaUZ@AWVDeTf@EVWhUEQVRTYTUU";  // UTF-8
//char*z="VP\225TBUIUVAaUZ@AWVDeTf@EVW\1hU\26EQVRTYTUU";  // 3 bytes longer (use it if you can't copy previous string correctly) :)
  // Blocks
  for(size_t*p,f,n,y,i;c--;b++){
    f=1<<(8-*b)/3;  // number of figure variants
    p=z+*b++*8+*b++%f*2;
    // Get top base line position (y)
    f=n=*p;  // figure width, TBLs and HATs
    for(y=i=0;i<=f%4;
      y=fmax(y,a[*b+i++]+n%4))
      n/=4;
    // Add heights (HATs)
    for(;i--;
      a[*b+i]=y+n%4)
      n/=4;
  }
}  // 215 chars (224 bytes)
Description
Let's found top base line (TBL) of each figure and describe it as a number of cells below TBL for each horizontal position. Also let's describe number of cells (height) above TBL (HAT).
E.g.:
                       ________                                      ________
_[]_____ HAT = 1,0,0    [][][]  HAT = 0,0,0   ___[][]_ HAT = 0,1,1    [][][]  HAT = 0,0,0
 [][][]  TBL = 1,1,1    []      TBL = 2,1,1    [][]    TBL = 1,1,0      []    TBL = 1,2,1
Let's describe TBLs and HATs for each figure and each rotation angle:
Width  TBLs     HATs
-----  -------  -------
L-figures:
  3    1 1 1    1 0 0    // 0°
  2    1 1      0 2      // 90°
  3    1 1 2    0 0 0    // 180°
  2    3 1      0 0      // 270°

  3    1 1 1    0 0 1    // 0°
  2    1 3      0 0      // 90°
  3    2 1 1    0 0 0    // 180°
  2    1 1      2 0      // 270°

T-figure:
  3    1 1 1    0 1 0    // 0°
  2    1 2      0 1      // 90°
  3    1 2 1    0 0 0    // 180°
  2    2 1      1 0      // 270°

Line:
  4    1 1 1 1  0 0 0 0  // 0°, 180°
  1    4        0        // 90°, 270°

Zigzags:
  3    1 1 0    0 1 1    // 0°, 180°
  2    1 2      1 0      // 90°, 270°

  3    0 1 1    1 1 0    // 0°, 180°
  2    2 1      0 1      // 90°, 270°

Cube:
  2    2 2      0 0      // any angle
Now we should encode these numbers as a sequences of 2 bits and put into an array (replacing 4 0 by 3 1 for 90° angle of "line" to fit in 2 bits – result will be the same; and decrease widths by 1).
We'll encode in order: width (in 2 LSB), TBLs, HATs (backward for backward loop).
E.g. 2  2 1  1 0  for 270° angle of T-figure will be encoded as 1 0  1 2  1 (last 1 is width-1): 0b0100011001 = 281.
updated 12.02:
a) I've converted an array to a string and saved 18 chars (you can see previous 239 bytes code) :))
b) More optimization, code is shrinked by 9 chars.
This is my last attempt (I think so, lol!)

You can strike using <s> ... </s>.

243 bytes.

Oh, cool. Thanks. Lol :))

Wow! Low-level Tetris

TBL is number of figure cells under the highest line which has only free space or cell blocks below and above it (no free space and then cells). TBL + HAT = height of figure (on each horizontal position). TBL>0 and HAT>0 too.

Who asked about TBL???

TBL values are added to current row positions of each column over that figure is placed. The maximum value of these sums is real row position of "top base line" where figure will be dropped. Then I just add HATs to this value and get new row positions :))

What kind of crazy person are you?

212 bytes

C# (Visual C# Interactive Compiler), 308 bytes
a=>{var o=new int[a.Max(x=>x.Item3+4)];foreach(var(i,r,p)in a){var b="\"4TqzŒª!\0\0HSš	Ó\0$\n\0!“A“š š@";int m=0,n=b[i],t=0,u=n/8+r%(n%8),v=b[u*=2]<<8|b[u-1];for(;t<v/8%8;m=m>n?m:n)n=o[p+t]+v%8-(n=(u=v>>6+3*t++)/2&1)-(n&u);for(;t-->0;)o[p+t]=m-(n=(u=v>>6+3*t)/4&1)-(n&u);}return o;}

Try it online!
OK - That was madness... I submitted an answer that used run-of-the-mill code-golf techniques. But when I saw what others were submitting, I realized there was a better way.
Each (shape, rotation) tuple is encoded into a C# string literal with duplicates removed. The encoding process captures each of these configurations in 2 bytes.
The lowest 3 bits store height and the next 3 store width. Since each of these values is never more than 4, they can be read directly from the 3 bits without any conversion.  Here are some examples:
  W   H
010 010 (2x2)
010 011 (2x3)
001 100 (1x4)
011 010 (3x2)
100 001 (4x1)

Next, each column is stored in 3 bits. The most useful thing for me to store was the number of missing squares from the top and bottom of the column.
// missing squares per column

+------ 0 top / 0 bottom
|+----- 0 top / 1 bottom
||+---- 0 top / 1 bottom
|||
HHH (L-Shape)         HH (Jagged-Shape)
H                    HH
                     |||
1 top / 0 bottom ----+||
0 top / 0 bottom -----+|
0 top / 1 bottom ------+

There is never more than 2 squares missing from the top or bottom, and there is never more than 1 square missing from both at the same time. Given this set of constraints, I came up with the following encoding:
// column encoding of missing squares per column

000: none missing
100: 1 missing on top
101: 2 missing on top
010: 1 missing on bottom
011: 2 missing on bottom
110: 1 missing on top and bottom

Since we have to account for at most 3 columns with missing squares above or below, we can encode each (shape, rotation) tuple in 15 bits.
 C3  C2  C1   W   H
000 000 000 010 010 - 2x2 with no missing squares
000 000 000 100 001 - 4x1 with no missing squares
100 000 100 011 010 - 3x2 with missings square on top of columns 1 and 3
000 110 000 010 011 - 2x3 with missing squares on top and bottom of column 2

Lastly, duplicate shapes have been removed. The follow example show how multiple (shape,rotation) tuples can produce duplicate outputs for the same shape at different rotations:
// Square
HH  (0, 90, 180, 270)
HH
#-------------------------------#
// ZigZag
HH  (0, 180)    H  (90, 270)
 HH            HH
               H
#-------------------------------#
// T
 H  (0)        HHH  (180)
HHH             H

 H  (90)       H    (270)
HH             HH
 H             H

All unique outputs are determined and saved to a byte[] and converted to a C# string literal. In order to quickly lookup where a shape is based on I and R, the first 7 bytes of the array consist of an encoded lookup key.
Below is a link to the program that I used to compress the pieces.
Try it online!
Less golfed and commented code:
// a: input list of (i,r,p) tuples
a=>{
  // create an output array that 4 more than
  // the largest position. this may result
  // in some trailing 0's
  var o=new int[a.Max(x=>x.Item3+4)];

  // iterate over each (i,r,p) tuple
  foreach(var(i,r,p)in a){
    // escaped string
    var b="\"4Tqzª!\0\0HS   Ó\0$\n\0!A @";
    // declare several variables that will be used later
    int m=0,n=b[i],t=0,
      // u is the decoded index into b for the current (i,r) pair
      u=n/8+r%(n%8),
      // convert 2 bytes from b into an encoded (shape,rotation) pair
      v=b[u*=2]<<8|b[u-1];
    // iterate over the columns, determining the top of the current
    // piece. The formula here is:
    //   piece_top = max(column_height + shape_height - shape_space_bottom)
    for(;t<v/8%8;m=m>n?m:n)
      n=o[p+t]+v%8-(n=(u=v>>6+3*t++)/2&1)-(n&u);
    // iterate over the columns again, saving the the new height
    // in each column. The formula here is:
    //   new_column_height = piece_top - shape_space_top
    for(;t-->0;)
      o[p+t]=m-(n=(u=v>>6+3*t)/4&1)-(n&u);
  }
  return o;
}

Common Lisp, 634 bytes
(let((w(make-hash-table))(r 0))(defun z(c)(or(gethash c w)0))(defun x(c v)(setf r(max r c))(setf(gethash c w)v))(defun m(s)(dolist(c s)(apply(lambda(n u p)(let*((i(let*((j'(2 2 2))(k'(3 3))(l'(2 3))(m'(3 2))(o(case n(1(list'(1 1 1 1)'(4)))(2(list j k'(1 1 2)'(3 1)))(3(list j'(1 3)'(2 1 1)k))(4(list'(2 2)))(5(list'(2 2 1)l))(6(list j l'(1 2 1)m))(7(list'(1 2 2)m)))))(setf(cdr(last o))o)))(o(nth(+ u 2)i))(b(nth u i))(s(length o))(d 0)(h 0))(dotimes(i s)(let*((w(nth i b))(g(z(+ i p)))(m(+ g w)))(when(> m d)(setf d m)(setf h(- g(-(apply'max b)w))))))(dotimes(i s)(x(-(+ s p)i 1)(+(nth i o)h)))))c))(dotimes(i r)(print(z (+ i 1))))))

Verbose
(defun circular (list)
  (setf (cdr (last list)) list))

(defun get-piece (piece-number)
  (circular (case piece-number
              (1 (list '(1 1 1 1)
                       '(4)))
              (2 (list '(2 2 2)
                       '(3 3)
                       '(1 1 2)
                       '(3 1)))
              (3 (list '(2 2 2)
                       '(1 3)
                       '(2 1 1)
                       '(3 3)))
              (4 (list '(2 2)))
              (5 (list '(2 2 1)
                       '(2 3)))
              (6 (list '(2 2 2)
                       '(2 3)
                       '(1 2 1)
                       '(3 2)))
              (7 (list '(1 2 2)
                       '(3 2))))))

(let ((world (make-hash-table))
      (rightmost-column 0))
  (defun get-world-column (column)
    (or (gethash column world) 0))

  (defun set-world-column (column value)
    (setf rightmost-column (max rightmost-column column))
    (setf (gethash column world) value))

  (defun drop-piece (piece-number rotation position)
    (let* ((piece (get-piece piece-number))
           (top (nth (+ rotation 2) piece))
           (bottom (nth rotation piece))
           (size (length top))
           (max-combined-height 0)
           (contact-height 0))
      (dotimes (i size)
        (let* ((down-distance (nth i bottom))
               (height (get-world-column (+ i position)))
               (combined-height (+ height down-distance)))
          (when (> combined-height max-combined-height)
            (setf max-combined-height combined-height)
            (setf contact-height
                  (- height
                     (- (apply #'max bottom)
                        down-distance))))))
      (dotimes (i size)
        (set-world-column (- (+ size position) i 1)
                          (+ (nth i top) contact-height)))))

  (defun drop-pieces (pieces)
    (dolist (piece pieces)
      (apply #'drop-piece piece)))

  (defun print-world ()
    (loop for i from 1 to rightmost-column
          do (print (get-world-column i)))))

(defun play-tetris (pieces)
  (drop-pieces pieces)
  (print-world))

Test it
The pieces are circular-lists of lists of numbers.  These sub-lists each represent a side of the shape, the numbers indicating how far they are from the opposite side.  They are left to right when that side is on the bottom, right to left when on top, top to bottom when on left, and bottom to top when on right.  These design choices eliminate the need to write code for rotation.  Unfortunately, the lack of rotation code does not seem to have made up for the lengthy shape representations, or the somewhat complicated logic I used for calculating new column heights.
Rotation is a non-negative integer.  0=0 degrees, 1=90 degrees, 2=180 degrees, 4=270 degrees

Charcoal, 98 bytes
Ｆθ«≔§⪪§⪪”)¶∧↷"e«↨U∧0%3；D∧⁼~h⊟⁵h/₂dΦ↗(EＦ”2⊟ι1⊟ιη≔⊟ιζＷ‹Ｌυ⁺ζＬη⊞υ⁰≔⌈Ｅη⁻§υ⁺ζλ﹪Ｉκ³εＦＬη§≔υ⁺ζκ⁺ε⊕÷Ｉ§ηκ³»Ｉυ

Try it online! Link is to verbose version of code. Takes input as an array of [P, R, I] values, where I is from 0 to 6, R is from 0 o 3 and P is also 0-indexed. Explanation:
Ｆθ«

Loop over the input pieces.
≔§⪪§⪪”)¶∧↷"e«↨U∧0%3；D∧⁼~h⊟⁵h/₂dΦ↗(EＦ”2⊟ι1⊟ιη

Extract the description of the current piece and rotation. (See below.)
≔⊟ιζ

Extract the position.
Ｗ‹Ｌυ⁺ζＬη⊞υ⁰

Ensure that there is enough horizontal room to place the piece.
≔⌈Ｅη⁻§υ⁺ζλ﹪Ｉκ³ε

Ensure that there is enough vertical room to place the piece.
ＦＬη§≔υ⁺ζκ⁺ε⊕÷Ｉ§ηκ³

Calculate the new heights of the affected columns.
»Ｉυ

When all the pieces have been processed, output the final list of column heights on separate lines.
The compressed string represents the original string 00001923001061443168200318613441602332034173203014614341642430137. Here the 2s are I separators and the 1s are R separators. The pieces therefore decode as follows:
P\R  0    1    2    3
0    0000 9
1    300  06   443  68
2    003  86   344  60
4    33
5    034  73
6    030  46   434  64
7    430  37

Missing R values are automatically filled cyclically by Charcoal. Each digit then maps to two values, overhang and total height, according to the following table:
\ O H
0 0 1
3 0 2
4 1 2
6 0 3
7 1 3
8 2 3
9 0 4

The overhang and total height relate to the column heights as follows: Given a piece that we want to place at a given position e, it may be possible to place the piece even though one of the columns is taller than e. The amount of spare space is given by the overhang. The new height of the column after placing the piece is simply the placed position plus the total height.
Example: Suppose we start by placing a 5 piece in column 1. Since there is nothing else yet the piece is therefore placed at position 0 and columns 1 and 3 now have height 1 while column 2 has height 2. We then want to place a 6 piece with 1 rotation in column 0. Here we can actually place this piece at position 0; although column 1 has a height of 1, the piece has an overhang of 1, and so there is enough space to place it. Column 0 ends up with a height of 2 and column 1 ends up with a height of 3.


text:
Help Notwen simulate gravity!
Notwen wants to study the kinematics of bodies thrown from big heights in a uniform gravitational field but unfortunately he doesn't have the technical possibility to go to sufficiently high places and observe the objects while falling. But who doesn't want to see advances in science so... Let's help Notwen build a gravity simulator!
Physical Background
An object dropped from a height \$h\$ (without initial velocity) in a uniform gravitational field, neglecting atmospheric effects such as drag or wind gains velocity and speeds up towards the ground with time. This "rate of change" of velocity in a unit of time is called gravitational acceleration. Near the surface of Earth, it is approximately equal to \$g\approx9.8\frac{m}{s^2}\$, but for the purposes of this challenge we will use the value \$10\frac{m}{s^2}\$, meaning that in a single second, an object increases its velocity by about \$10 \frac{m}{s}\$. Consider having a height \$h\$, which is a multiple of \$100m\$ and imagine dividing that height into equal intervals, each \$100\$ meters long. Notwen wants to measure how long it takes for the object to fall through each of those intervals, so that's what we aim to compute as well. Modern kinematics – skipping technicalities – tells us that:
$$\Delta h_k=v_kt_k+\dfrac{1}{2}gt_k^2$$
where \$\Delta h_k\equiv\Delta h=100m\$ for all values of \$k\$ in our case, \$v_k\$ is the initial velocity at the beginning of our \$k^\text{th}\$ interval and \$t_k\$ is the duration of the \$k^\text{th}\$ time interval (for reference, indexing starts at \$0\$ with \$v_0=0\$). We also know that \$v_k\$ has the following expression:
$$v_k=\sqrt{2g(\Delta h_0+\Delta h_1+\cdots+\Delta h_{k-1})}=\sqrt{2gk\Delta h}$$
Numerically, we get \$v_k=\sqrt{2000k}\frac{m}{s}\$ and plugging into the first equation and solving for \$t_k\$ gives $$\color{red}{\boxed{t_k=2\sqrt{5}\left(\sqrt{k+1}-\sqrt{k}\right)s}}\tag{*}$$
So the object travels the first interval (\$k=0\$) in \$4.4721s\$, the second interval (\$k=1\$) in \$1.8524s\$ and so on (pastebin with more values).
The challenge
Input: The height \$h\$ from which the object is thrown as either: a positive integer multiple of \$100\$, \$h\$ or the number of intervals \$N=\frac{h}{100}\$ (so either \$700\$ or \$7\$ would mean that \$h=700m\$) – which one is up to you.
Output: An ASCII art animation of a falling object, dropped from a height \$h\$ (details below).
The structure of an output frame must be as follows:

\$N\$ newlines preceding the "ground", represented by at least one non-whitespace character (e.g. @). At least one of the characters of the ground must lie on the vertical that the object falls on.
Another non-whitespace character representing the object (e.g. X), other than the one you chose for the ground.
Optionally, a character at the beginning of each line representing the vertical axis or the wall made on \$N\$ lines. Any amount of leading and trailing spaces are fine as long as they are consistent between frames, as well as any amount of spaces between the wall and the object. Examples of valid frames include1 (for \$h=700m\$ or \$N=7\$):

| X                                       >
|                             @           >   A
|                                         >
|        or            or           or    >
|               O                         >
|                                         >
|                                         >
@@@             ^           -----            &&&

The object must start on the first line of the first frame, then after \$t_0\approx 4.47s\$ the output should be flushed and your program should display the object on the same vertical but on the next line in the second frame; then after \$t_1\approx 1.85s\$ the output should be flushed again and your program should display the object on the same vertical but on the next line in the third frame and so on, until the object reaches the line right above the ground. Example:

Rules

The output should be some text written to an interactive (flushable) console, a GIF, a separate file for each frame or some other reasonable technique of output.
Each frame should completely overwrite the last frame and be in the same location.
You can assume that the time required for the compiler / interpreter to output the text is negligible and the minimum precision permitted for computing the square roots is to 2 decimal places.
You can take input and provide output through any standard method, while taking note that these loopholes are forbidden by default. This is code-golf, so try  to complete the task in the least bytes you can manage in your language of choice.

1: I'm lenient about what constitutes a valid frame because I want to allow whatever suits your solution best and I'm not trying to add superfluous stuff to the challenge. If anything is unclear, ask in the comments.

JavaScript (ES7) + CSS + HTML, 340 bytes

f=n=>{o.style.height=n+'em';x.style.animationDuration=(n*20)**.5+'s';o.appendChild(x,x.remove())}
pre{position:relative;border:1px solid;height:5em;overflow:hidden}span{position:absolute;top:0;animation:x 10s cubic-bezier(0.33,0,0.67,0.33)both}@keyframes x{to{top:100%}}
<input type=number value=5 oninput=f(this.value)>
X

If I've got my sums right then the animation duration is \$ \sqrt { 20 N } \$ and then the CSS cubic-bezier does the rest.

Charcoal, 28 bytes
Ｎθ↓θ⁴Ｆθ«Ｊ²ιＰXＲ⌊×φ×₂²⁰⁻₂⊕ι₂ι

Try it online! Link is to verbose version of code. Note: trailing space. You can observe the delay on TIO but you can't watch the animation so you'll have to imagine that from the output. Takes N as input. Explanation:
Ｎθ

Input N.
↓θ⁴

Print the wall and the ground, so that the output's shape is consistent.
Ｆθ«

Loop over each interval.
Ｊ²ιＰX

Place an X at the appropriate height.
Ｒ⌊×φ×₂²⁰⁻₂⊕ι₂ι

Output the current canvas contents and wait for the appropriate amount of time (truncated to the nearest millisecond).

Overwrite the X with a space.

Perl 6, 81 bytes
{say "\e[s{"\n"x$_}-";map {say "\e[u{" \n"x 4.9e-6*$_²}o";sleep .01},^452*.sqrt}

"Try it online!", but TIO cannot handle the animation.
Explanation
I chose a bit different approach (and I think it's for the better, though I don't know for sure). Instead of sleeping for times given by the formula in the OP, I just draw the appropriate situation "every 10 ms" (± errors induced by sleep).
That means that there are 100 frames a second, so if we denote the frame number by \$k\$, it must be \$t=k/100\$. And since we divide the vertical distance into 100 meter blocks, we can write the height as \$h = 100n\$, where \$n\$ is the number of blocks (given as an input). The height traveled in time \$t\$ is given by \$h = gt^2/2\$, so the number of blocks traveled is
$$ n = \frac{1}{100} \tfrac 1 2 g t^2 = \tfrac 1 2 g \times 10^{-6} k^2 \approx 4.905\times 10^{-6} k^2. $$
We can invert it to get the total number of frames we need to render:
$$ k = \frac{\sqrt n}{\sqrt{4.905\times 10^{-6}}} \approx 452 \times \sqrt n.$$
This suffices to write the function. It takes one argument, the number of blocks to render, i. e. \$n\$. First, we do say "\e[s{"\n"x$_}-". That prints an ANSI escape sequence called Save Cursor, then it prints \$n\$ newlines, and after that, it prints a dash (the ground) and a newline. (This uses the cool feature of double quotes in Perl 6: you can inline result of any code right into the string by writing that code inside curly braces.)
After that, we make a sequence from 0 to \$452\sqrt n\$ (automatically truncated to integer) with ^452*.sqrt, and we map over it. In each iteration, we print an Unsave Cursor ANSI sequence (which puts the cursor at the position where it was last saved), write \$4.9\times 10^{-6} k^2\$ strings "space+newline" (automatically truncated once again) and finally an o that denotes the object. Then we sleep for 10 ms, rinse and repeat.
Due to the automatic truncation, it just Does The Right Thing™ and moves the "o" only after each full 100 m of the fall.

C# (.NET Core), 201, 180+13 = 193 bytes
Needs using System; for 13 additional bytes.
Strangely, Console.Clear() does not seem to be working for me on TIO.  However, this runs perfectly in a console app under VS2017.
EDIT:  Thanks to Embodiment of Ignorance for shortening up the loop, pointing out my unnecessary variable assign and unnecessary using System.Threading; statement (leftover from VS copying), and pointing out that the ground was required!  Total of 8 bytes golfed thus far with the addition of the ground.  Ty Ty!
x=>{for(var j=x;j>0;System.Threading.Thread.Sleep((int)(4470*(Math.Sqrt(x-j+1)-Math.Sqrt(x-j--))))){Console.Clear();Console.Write("X".PadLeft(x-j+1,'\n').PadRight(x+1,'\n')+"-");}}

Try it online!

Haskell, 145 bytes
import Control.Concurrent
a!b=[a..b]>>"\n"
f h=mapM(\k->putStr("\27[2J"++1!k++'O':k!h++"-")>>threadDelay(round$4472135*(sqrt(k+1)-sqrt k)))[1..h]

Needs to be run in an  ANSI terminal. The input is the number of intervals.
threadDelay's parameter is in nanoseconds, so a literal 4472135 is shorter than 2*sqrt 5*10^6. Unfortunately 46**4 = 4477456 is not within the limit of the required precision.

Python 2, 117 120 123 bytes
-3 bytes Thanks to "Don't be a x-triple dot" and  "Jonathan Frech"
import time
h=input()
for k in range(h):print'\33[2J'+'\n'*k+'O'+'\n'*(h-k)+'^';time.sleep(2*5**.5*((k+1)**.5-k**.5))

Try it online!

+1 from me, good solution! Wouldn't using the actual unprintable character save a couple of bytes rather than chr(27)?

@Don'tbeax-tripledot And if one does not get ahold of the character itself, '\33' should still be shorter.

Also, 2*5**.5 is 20**.5.

@JonathanFrech Square root of 20 replaced by 4.47

@mdahmoune Well ... If that accuracy is good enough, then yes.

Why not chr(27)+'[2J' ~> '\33[2J'?


text:
Recursive search golf (JS only)
Sorry folks, but what I've got for you today is a golf but just limited by JS (or, to be strict, for a day of posting - an ES6 - the most modern set of it - if its ES7 - feel free to EDIT! use MOST MODERN features).
So if you afford that restriction - let's proceed!
Assume we have JSON root data structure r and some global ID g=0:
g=0;r={i:g++,x:0,c:[]}

This creates a root r of a data tree, indexed by unique index i, with a data payload x, where we (for simplicity) let x to be always zero, and child array c where c[j] just an object of same syntax, as r its own. Sorry for extra data x, indeed, we will don use it ever! Our goal is to do golfed ID lookup method!
My grandfather implementation was quite a mess... Just imagine, in his times people named functions with more than one symbol! Just like that:
find_subid = (id, childVec) => {
    for( child of childVec ) {
        found = find_id( id, child );
        if( found ) // 200
            return found;
        }
        return null; // 404
    }
find_id = (id, parent) => (id == parent.i) ? parent : find_subid(id, parent.c);

Now I can call find_id(123,g) but.. I just feel that's too long to write today!
So we should fix his errors and do our own, faster, harder and shorter version in most possible modern JS as of the time you are reading this text!

"json" is a specific textual way of representing javascript objects, it does not mean javascript objects themselves.

@Shaggy what is unclear? I am asking to golf some existing javascript code!

I believe the return null; needs to be after the for-loop, not inside. Your question could use some test cases and a clear specification how the json is allowed to look.

I would consider this question as unclear as 1. You should fix up your sample code as mentioned above. 2. You should and some testcases so we can test our implementation. 3. You should include a clear description about what you want to implement, and define the "ID lookup method".

FWIW, I had i=>g=o=>o.i-i?o.c.flatMap(g):[o] for 32 bytes.