Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
学得不好,望指点(RE)(PASCAL)Program ex; Var i, j, k, m, n, a, b, max:Integer; p : Char; Data:Array[1..1000] Of Integer; Begin Readln(n); For i := 1 To n Do Begin Fillchar(Data, Sizeof(Data), 0); Max := 0; Readln(m); For j := 1 To m Do Begin Read(p); Readln(a, b); For k := a To b - 1 Do Inc(Data[k]); If b > Max Then Max := b; End; For j := 1 To Max Do Begin Case Data[j] OF 1 : Write('A'); 2 : Write('B'); 3 : Write('C'); 4 : Write('D'); 5 : Write('E'); 6 : Write('F'); 7 : Write('G'); 8 : Write('H'); 9 : Write('I'); 10 : Write('J'); 11 : Write('K'); 12 : Write('L'); 13 : Write('M'); 14 : Write('N'); 15 : Write('O'); 16 : Write('P'); 17 : Write('Q'); 18 : Write('R'); 19 : Write('S'); 20 : Write('T'); 21 : Write('U'); 22 : Write('V'); 23 : Write('W'); 24 : Write('X'); 25 : Write('Y'); 26 : Write('Z'); End; End; Writeln; End; End. Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator