《億萬年的孤獨:地外文明探尋史話》
這本書首先依照時間順序介紹了搜索地外文明的小故事,接著探討費米悖論的內容以及相關解釋,最後以一篇科幻小說和作者對於地外文明的臆想作結。作者的目的是激起人們的好奇心,所以全書內容淺顯。另一方面作者也在段落間抒發個人意見,表達他對於科學家精神的看法
這本書首先依照時間順序介紹了搜索地外文明的小故事,接著探討費米悖論的內容以及相關解釋,最後以一篇科幻小說和作者對於地外文明的臆想作結。作者的目的是激起人們的好奇心,所以全書內容淺顯。另一方面作者也在段落間抒發個人意見,表達他對於科學家精神的看法
先前曾介紹 R 讀取 FASTQ 檔的方式,本文則要分別介紹如何在 R 環境,使用 seqnir 套件或 baseR 讀取 FASTA 檔。
求一個整數數列使用 insertion sort 所需的數字交換次數
Given: A positive integer $n \leq 10^3$ and an array $A[1..n]$ of integers.
Return: The number of swaps performed by the insertion sort algorithm on $A[1..n]$.
給定 k 個長度為 n 的整數數列,求各數列裡總和為零的三個數字的位置。若存在多組解,則以自位置順序以最靠前的為準。
Given: A positive integer $k \leq 20$, a positive integer $n \leq 10^4$, and $k$ arrays of size $n$ containing integers from $-10^5$ to $10^5$.
Return: For each array $A[1..n]$, output three different indices $1 \leq p < q < r \leq n$ such that $A[p] + A[q] + A[r] = 0$ if they exist, and
"-1"
otherwise.
給定 k 個長度為 n 的整數數列,求各數列裡互為加法反元素(相反數)的兩數位置。
Given: A positive integer $k \leq 20$, a positive integer $n \leq 10^4$, and $k$ arrays of size $n$ containing integers from $-10^5$ to $10^5$.
Return: For each array $A[1..n]$, output two different indices $1 \leq p < q \leq n$ such that $A[p] = -A[q]$ if they exist, and
"-1"
otherwise.
給定一個數列,求其反序數對 (inversions) 的數量。
Given: A positive integer $n \leq 10^5$ and an array $A[1..n]$ of integers from $-10^5$ to $10^5$.
Return: The number of inversions in $A$.
以 merge sort 遞增排序一個整數數列。
Given: A positive integer $n \leq 10^5$ and an array $A[1..n]$ of integers from $-10^5$ to $10^5$.
Return: A sorted array $A[1..n]$.
給定兩個有序的整數數列,求一個含有兩數列所有數字的有序數列。
Given: A positive integer $n \leq 10^5$ and a sorted array $A[1..n]$ of integers from $-10^5$ to $10^5$, a positive integer $m \leq 10^5$ and a sorted array $B[1..m]$ of integers from $-10^5$ to $10^5$.
Return: A sorted array $C[1..n+m]$ containing all the elements of $A$ and $B$.
《後宮之夜》是結合 ASMR 的試驗性短篇視覺小說,描述主角與逝去愛貓在神明安排下重逢的小小奇蹟。遊戲共有三個結局,總時數約四小時。兩位女主角皆由聲優以特殊麥克風配音,營造出角色在玩家耳邊細語的感覺,遊玩體驗很像在聽坊間的音聲作品。
雖然這款遊戲的情節主要為 H 場景服務,但它其實是在虛構世界中,為那些心懷遺憾的玩家帶來療育的故事。主角島津佳九是一名自由撰稿人,夢想著成為暢銷作家。佳九深信願望一旦說出口就不會成真,所以從不向他人透漏內心的夢想。這個信念與他小時候的經歷有關──佳九的雙親時常吵架,儘管他不斷央求雙方和好,家庭關係仍然緊張,宛若陌生人般住在同一屋簷下。
那時,佳九僅有的玩伴是家裡養的白貓,還有一隻常黏著他的野貓。佳九非常疼愛牠們,可是這兩隻貓就像他的父母一樣總是吵架。佳九不曾放棄讓牠們和好,但一場意外讓他徹底夢碎:兩隻貓都因為車禍過世。他在鄰近神社後方的空地埋葬了兩隻愛貓,哭著向神明祈願能再次與牠們重逢,但願望始終沒有實現。
給定長度為 n 的數列,求其中出現頻率大於五成的數字。
Given: A positive integer $k \leq 20$, a positive integer $n \leq 10^4$, and $k$ arrays of size $n$ containing positive integers not exceeding $10^5$.
Return: For each array, output an element of this array occurring strictly more than $n / 2$ times if such element exists, and “
-1
“ otherwise.