Cic filecan thiet

Một phần của tài liệu Trại huấn luyện tin học trên mạng (Trang 30)

IV. Hf THONG CHAM CHlTOfNG TRINH T^ ©ONG 1 Gidi thif u

3. Md ta hf thong cham hU JUDGE

3.3.1. Cic filecan thiet

Ten file

task.ini

Chirc nang

Chira cau hinh cham bai, bao gdm:

Sd test Gidi han thdi gian va bp nhd

- Ten cac file thu vien, input, output, file hd trp trinh cham - Cac tuy chpn cho dilm

check.exe La chuang trinh cham diem, chuang trinh nay se dpc file input, file ho trp trinh chim, file output va ghi ra bien ban. in.OO

La test thu trong trudng hpp bai nay la bai thi, khi npp bai cac thi sinh cin dupe chim thu va khdng cdng bd ket qua that. File nay khdng bit budc cd.

tc u _! , r

La cac file test input, xx se bang vdi so test. in.Ol -> in.xx

ans.OO La file hd trp trinh cham cua test in.OO. File nay khdng bat bupc cd.

ans.Ol -> ans.xx

Ld file ho trg trinh cham ciia test in.Ol ^ in.xx. Cdc file nay khong bdt bupc cd,

Trong do cac file ho trg trinh cham la cdc file dii li^u ph\i cho qud trinh chdm bai, dugc tac gia ciia bai t\r to chuc (Vi du nhu la ddp dn).

3.3.2. C&ch thurc viet trinh cham diem

Trinh chdm dilm cd thS viSt bdng bdt cu ngdn ngii gi, mien la phdi dupe djch ra file .exe. Chii y la trong trudng hpp trinh chdm chay nhung cd Idi (vi dy nhu khi thi sinh viSt linh tinh ho?lc viet sd qud Idn ra file output) thi thi sinh sg mdc djnh dupe cho 0 diem, vi v|ly trinh chdm khdng can bdt qud nhifiu loi. De ti?n cho vi?c xem xet l?ii trinh chdm sau ndy, nhiJmg ngudi gui bai nen gui kem cd ma nguon cua trinh chdm diem.

Trinh cham diem lam nhipm v\i sau:

- Dpc cdc dfl: li?u cdn thilt: file input, file output, file hd trp trinh chdm. Ten cua tdt cd cdc file ndy dupe quy dinh trong file task.ini. File hd trp trinh cham la 1 file khdng bat bupc c6, neu c6 thi file nay sS la file ma ngudi ra de tuy y sd dyng dl ghi cac thdng tin phyc vy cho vi?c chim bai, VD nhu CO thi ghi dap sd dl sau dd so sanh file nay vdi file output ciia thi sinh. - Ghi bien ban: Bien ban phai dupe ghi ra file result.txt gdm 3 ddng nhu

sau:

• Ddng 1: Ghi 1 ky ty 'c' ho^c 'w' img vdi diing (correct) ho^c sai (wrong).

• Ddng 2: Ghi dilm nhan dupe ciia test nay. Dilm nhan dupe phai la 1 sd nguyen.

• Ddng 3: Ghi Idi binh luan (tuy chpn). Vi dy nhu: "Tinh tong do dai duong di sai." Ldi binh luan nay se dupe ghi ra cho hpc sinh.

3.3.3. Cau hinh bang file *task.ini'

File nay dung dl ciu hinh cac tham biln cho trinh chim. Mpt sd tham bien la bit bupc phai cd, mpt sd khac khdng bit bupc, khi do h? thdng chim sg liy mpt gia tri mac dinh.

c i u tnic chung ciia 1 l?nh d^t tham biln la:

Ten_tham_biln = Gia_tri

Mdi l?nh d$t tham biln dupe vilt tren 1 dong. Ten tham bien cd the dupe tiiy y vilt thudng hoac vilt hoa va cd thi cd mpt sd tiiy y cac diu each Space d bat ky vi tri nao trong ten tham bien.

cac ten tham biln dupe cho bdi bang sau (Nhimg tham biln dupe td dam la nhihig tham biln bit bupc phai cd, cac tham biln cdn lai khdng bit bupc phai co hoac c6 thi liy gia tri mac dinh nlu khdng dupe dat):

Tin tham bien ANSWER TIME LIMIT MEMORY LIMIT CHECK TIME LIMIT MISSING OUTPUT TEST WRONG SCORE Xau So nguyen So nguyen So nguyen So nguyen So nguyen Ddy so th\rc dugc ghi cdch nhau

Ten file trg giiip trinh cham

Thdi gian chay mdi test, tinh bang mili giay Gidi han bp nhd eda chuang trinh thi sinh,

tinh bin^ byte Thdi gian tdi da chay trinh chim, tinh bang

mili giay

Sd diem mac dinh neu khdng cd file output So dilm mac dinh neu

ket qua sai

He sd nhan vao diem ciia mdi test khi tinh tdng dilm. So he so bing sd test. 1 000 ms 2 000 000 bytes 30 000 ms 0 0 1 1 1 1 ... 3.3.4. Vi dy

Dl de hilu han, chung tdi xin liy mpt vi dy la them vao thu vi?n bai tap 1 bai nhu sau:

- Dl bai: Cho 2 sd nguyen a va b (|a|, |b| <10000 ), tinh tdng cua 2 sd nay.

• Input: Dpc da li?u tir file SUM.INP gdm mpt dong ghi 2 sd a va b.

• Ouput: Ghi ra file SUM.OUT duy nhit mpt sd la kit qua cua a+b.

Tin tham bien / / PROBLEM TYPE UNIT Kieu gia trj Xau OUTPUTONLY/ NORMAL/ INTERACTIVE Xau Y nghta

Dimg de comment out, tit ca cac ky tu tren cimg

mpt ddng d sau ky hieu nay se khdng dupe xet

r

den

Tuy chpn 1 trong 3 loai bai

Ten file thu vien (cd the cd nhieu ddng nhu the

nay) Gid trf mac dinh 5 " " • 1 NORMAL 1 1 1 I 1 ANSWER TIME LIMIT MEMORY LIMIT CHECK TIME LIMIT MISSING OUTPUT TEST WRONG SCORE xau Sd nguyen Sd nguyen

Ten file trp giup trinh cham

Thai gian chay mdi test, tinh bing mili giay

Sd nguyen w So nguyen r So nguyen Day sd thyrc dupe ghi each

nhau

Gidi han bp nhd cua chuong trinh thi sinh,

tinh bin^ byte linn pang pyie Thdi gian tdi da ch^y trinh cham, tinh bing

m i l l r y i o \ /

mili giay

So diem mac dinh neu

• •

khoiig cd file output Sd diem mac dinh neu

ket qua sai

1000 ms 2 000 000

bytes 30 000 ms

0

He sd nhan vao diem ciia rrioi test khi tinh tdng diem. Sd he sd bang sd

test.

0

1 1 1 1 .

3.3.4. Vi dy

D I dl hilu han, chiing tdi xin liy mOt vi dy la them vao thu vi?n bai tap 1 bai nhu sau:

- Dl bai: Cho 2 sd nguyen a va b (|a|, |b| <10000 ), tinh tong cua 2 sd nay. . Input: Dpc dii li?u tir file SUM.INP gdm mpt ddng ghi 2 sd a va b. . Input: Dpc dii li?u tir file SUM.INP gdm mpt ddng ghi 2 sd a va b. . Ouput: Ghi ra file SUM.OUT duy nhit mpt sd la kit qua cua a+b.

• Gidi han: Thdi gian: 1 s/test. Bp nhd 1MB.

Một phần của tài liệu Trại huấn luyện tin học trên mạng (Trang 30)

Tải bản đầy đủ (PDF)

(58 trang)