Solve problem 1 from phase 2
This commit is contained in:
parent
78f1d367fb
commit
30eeae6fbb
1 changed files with 8 additions and 0 deletions
|
@ -14,6 +14,14 @@
|
||||||
⍝ 2020 APL Problem Solving Competition Phase II
|
⍝ 2020 APL Problem Solving Competition Phase II
|
||||||
⍝ Stub function for Problem 1, Task 1 - DiveScore
|
⍝ Stub function for Problem 1, Task 1 - DiveScore
|
||||||
⍝ Put your code and comments below here
|
⍝ Put your code and comments below here
|
||||||
|
:If 7=≢scores
|
||||||
|
scores←scores[¯2↓2↓⍋scores]
|
||||||
|
:ElseIf 5=≢scores
|
||||||
|
scores←scores[¯1↓1↓⍋scores]
|
||||||
|
:Else
|
||||||
|
scores←scores
|
||||||
|
:EndIf
|
||||||
|
score←2(⍎⍕)dd×+/scores
|
||||||
∇
|
∇
|
||||||
|
|
||||||
∇ steps←{p}Steps fromTo
|
∇ steps←{p}Steps fromTo
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue