程設助教 judge 題目

  • 助教:蘇子權 SubaRya
  • 題目:

hw0205

  • 測資、答案、generate answer code 和 hw0205.c 的連結

  • 評分標準

    • searchCommitInformationByHashVal
      • 六筆:一筆 (2pt)
        • 提醒:少一個項目(commits, file changed, insertions, seletions) 一筆扣 1 分,少兩個以上就全錯。
    • searchMonthlyContribution
      • 三筆:一筆 (2pt)
        • 提醒:少一個項目(commits, file changed, insertions, seletions) 一筆扣 1 分,少兩個以上就全錯。
    • 沒有寫進 contribute.txt
      • -1 pt
    • author name 沒有節錄完整
      • -1 pt

這份的 jsonLog 是透過 jc parse 出的 jsonLog.json,再使用 Python 將 題目 所指定的部分以 list 過濾出來並寫進 contribution.txt

如果有要自行測試 git log 其他專案並使用 jc parse to json 的,這裡注意一點,jc 目前的 1.23.1 版本 git log parse 是有問題的,我也有提出 issue 並收到下個 release 會 fix 的回覆,因此這裡再特地提醒想自行測試的同學們。

  • 使用 jc 將 git log parse 成 json 的方法。
    # in your repo directory layer and you will get jsonLog.json
    $ git log --format=fuller --stat | jc --git-log -p > jsonLog.json

以下是沒有 signal 版本的 hw0205.c,若有需要 signal 版本的請前去我的 GitHub Repo 上領取

// hw0205.c
#include <stdio.h>
#include "ContributionCalculate.h"
int main(void){
    searchCommitInformationByHashVal("1cdbc6ec");
    searchCommitInformationByHashVal("20421a42");
    searchCommitInformationByHashVal("1a712217");
    searchCommitInformationByHashVal("5f579554");
    searchCommitInformationByHashVal("cfe22e1c");
    searchCommitInformationByHashVal("5bc1f331");
    searchMonthlyContribution("Oct");
    searchMonthlyContribution("Nov");
    searchMonthlyContribution("Dec");
    return 0;
}

hw0206

  • 沒有有說明問題點
    • int32_t 和 1<<31 (-2pts)
  • 沒有說明實作解決方法
    • 實作 -> (-1pt) (如果講解解決方法明確請況下,無實作也給分)
    • 講解解決方法 -> (-2pts)