Polygon 教學

介紹

Polygon 是 Codeforces 的出題工具
不僅可以將題目直接導入進Codeforces,也可以把檔案下載透過轉換方式丟進OJ中

出一題水題步驟

  1. 先在Polygon上註冊一個帳號 (帳密不需要與Codeforces上的一樣)
  2. 理論上可以看到這一行
    Image Not Showing Possible Reasons
    • The image was uploaded to a note which you don't have access to
    • The note which the image was originally uploaded to has been deleted
    Learn More →
    • New Problem 創建新的題目
    • View Problems 可以看到你看的到的題目 (一開始會有教學的題目在裡面)
    • My Problems 你出過的題目
    • New Contest 、 View Contests 、 View Contest Groups 基本上自己出題用不到
  3. 點 New Problems 在裡面輸入題目名稱(只能小寫、減號 這裡的題目名稱不是題敘上的)
    Image Not Showing Possible Reasons
    • The image was uploaded to a note which you don't have access to
    • The note which the image was originally uploaded to has been deleted
    Learn More →
  4. 好了之後可以看到最上面那個是你剛剛建的題目,點 Start
    Image Not Showing Possible Reasons
    • The image was uploaded to a note which you don't have access to
    • The note which the image was originally uploaded to has been deleted
    Learn More →
  5. 就會看到這個
    Image Not Showing Possible Reasons
    • The image was uploaded to a note which you don't have access to
    • The note which the image was originally uploaded to has been deleted
    Learn More →
    • General info 一些基礎設定 : Time limit 、 Memory limit 、 題目名稱修改(在Advanced)
    • Statement 題敘
    • Files 一些檔案都要放在這裡,像是Generator(測資產生)、Validator(測資格式確認)、Checker(嚴格比對or寬鬆比對or奇奇怪怪的東西)
    • Checker 嚴格比對、寬鬆比對、Yes-no比對 等等會細說
    • Validator 檢查你的測資(手打或生成的)是否符合格式以及變數範圍
    • Tests 測資 等等會細說
    • Stresses 沒用過,但應該是測試時間限制跟Memory可不可以壓到極限的東西
    • Solution files 官解還有一些怪怪的解可以放進去 等等會細說
    • Invocations 測試你丟上去的奇奇怪怪解對測資跑出來的結果
    • Issues 沒用過,不重要
    • Pakages 整個題目輸出檔案 等等細說
    • Manage Access 管理這題的權限,假如要丟上去Codeforces需要把Codeforces加上去
  6. 點Statment進去選English(就算其他語言也選English)
    Image Not Showing Possible Reasons
    • The image was uploaded to a note which you don't have access to
    • The note which the image was originally uploaded to has been deleted
    Learn More →
  7. 進來之後會看到一大堆東西,直接選Edit with Preview,阿底下那個brief manual有很多東西,不會寫題敘都可以抄那邊的
    Image Not Showing Possible Reasons
    • The image was uploaded to a note which you don't have access to
    • The note which the image was originally uploaded to has been deleted
    Learn More →
  8. 進來Edit with Preview之後會看到很多個區塊
    Image Not Showing Possible Reasons
    • The image was uploaded to a note which you don't have access to
    • The note which the image was originally uploaded to has been deleted
    Learn More →
    • Name 題目名稱(可以打中文了)
    • Legend 主題敘,一大堆故事的地方
    • Input 輸入說明(阿變數範圍默認都寫在這裡,但是我丟上去TOJ都直接改html哈哈)
    • Output 輸出說明
    • Notes 好心人的提醒,大概大家都不會滑到最下面看,所以範例說明跟一些小細節可以寫在這裡
  9. Statement的編寫細節大概跟markdown語法差不多,自己去找Google就有了
  10. 寫完題敘後可以點最下面的那個Save,然後點右上角的叉叉就可以出去了
    Image Not Showing Possible Reasons
    • The image was uploaded to a note which you don't have access to
    • The note which the image was originally uploaded to has been deleted
    Learn More →

    Image Not Showing Possible Reasons
    • The image was uploaded to a note which you don't have access to
    • The note which the image was originally uploaded to has been deleted
    Learn More →
  11. 出去之後滑到下面可以看到這些,Scoring section就是子任務那個地區,下面那個add files是把題敘相關的文件丟進去(Like Photos 然後再在題敘中導入)
    Image Not Showing Possible Reasons
    • The image was uploaded to a note which you don't have access to
    • The note which the image was originally uploaded to has been deleted
    Learn More →
  12. 寫完題敘後去Solution files那邊 把官解丟上去
    Image Not Showing Possible Reasons
    • The image was uploaded to a note which you don't have access to
    • The note which the image was originally uploaded to has been deleted
    Learn More →
    • 按 New file 打 xxx.cpp 就可以直接創建一個C++檔案
    • 阿這裡也可以把一些TLE WA的code丟進來,但記得選狀態
  13. 之後去Checker選擇比對方式,不知道選什麼就直接選fcmp(嚴格比對)
    Image Not Showing Possible Reasons
    • The image was uploaded to a note which you don't have access to
    • The note which the image was originally uploaded to has been deleted
    Learn More →

    Image Not Showing Possible Reasons
    • The image was uploaded to a note which you don't have access to
    • The note which the image was originally uploaded to has been deleted
    Learn More →
    • fcmp 嚴格比對
    • wcmp 寬鬆比對
    • yesno YESNO比對
    • 其他的沒用過
    • 阿記得要多組解的題目要自己寫Checker(丟給GPT寫很讚)
  14. 選完Checker之後去Tests,Add Test可以把手打測資寫進去 (不用寫輸出結果,結果都給官解跑)
    Image Not Showing Possible Reasons
    • The image was uploaded to a note which you don't have access to
    • The note which the image was originally uploaded to has been deleted
    Learn More →
    • Add Test 新增測資(可以導入檔案)
    • Preview Tests 預覽結果
    • Enable points 分數啟用(可以對測資附加分數,不開啟則該題為100)
    • Enable groups 子任務啟用
  15. 要生成測資(不想手打的話)去files那邊,New file開一個檔案 (阿記得先去here那邊複製generator的基本格式,怎麼寫那邊大概都有講)
    Image Not Showing Possible Reasons
    • The image was uploaded to a note which you don't have access to
    • The note which the image was originally uploaded to has been deleted
    Learn More →

    Image Not Showing Possible Reasons
    • The image was uploaded to a note which you don't have access to
    • The note which the image was originally uploaded to has been deleted
    Learn More →
  16. 寫完generator後回去test那邊,去底下那個script那邊生成測資,阿記得底下有Save script要點
    Image Not Showing Possible Reasons
    • The image was uploaded to a note which you don't have access to
    • The note which the image was originally uploaded to has been deleted
    Learn More →
    • #list 就很像for迴圈
    • 1..n 跑N次
    • as T 把這個變數命名為T
    • gen 看你的generator叫什麼就寫什麼(我都寫gen.cpp)
    • ${T} > $ 固定用法,阿假如你的generator還要導入變數就自己在前面打進去就行
  17. 基本上以上步驟寫完就寫好一題了,之後到隨便一頁的右邊底下有commit changes,點下去
    Image Not Showing Possible Reasons
    • The image was uploaded to a note which you don't have access to
    • The note which the image was originally uploaded to has been deleted
    Learn More →
  18. 然後記得點Don't send email,不然那個會很煩,最後點commit
    Image Not Showing Possible Reasons
    • The image was uploaded to a note which you don't have access to
    • The note which the image was originally uploaded to has been deleted
    Learn More →
  19. 最後去Pakages那邊點Full,等很多下(因為很久)然後他顯示成功就是成功了(要一直重刷新網頁才看的到喔)
    Image Not Showing Possible Reasons
    • The image was uploaded to a note which you don't have access to
    • The note which the image was originally uploaded to has been deleted
    Learn More →
  20. 最後要把題目丟Codeforces的要記得去Manage access那邊加Codeforces
    Image Not Showing Possible Reasons
    • The image was uploaded to a note which you don't have access to
    • The note which the image was originally uploaded to has been deleted
    Learn More →

還有一些東西沒講到,手痠了,以後再寫