Submission #1345749
Source Code Expand
Var Gray,Brown,Green,Cyan,Blue,Yellow,Orange,Red:boolean; n,d,total,i:longint; a:array[0..105] of longint; Begin gray:=false; brown:=false; green:=false; cyan:=false; blue:=false; yellow:=false; orange:=false; red:=false; d:=0; total:=0; Readln(n); For i:=1 to n do Begin Read(a[i]); If (a[i]>=1) and (a[i]<=399) then if not gray then begin gray:=true; inc(total); end; If (a[i]>=400) and (a[i]<=799) then if not brown then begin brown:=true; inc(total); end; If (a[i]>=800) and (a[i]<=1199) then if not green then begin green:=true; inc(total); end; If (a[i]>=1200) and (a[i]<=1599) then if not cyan then begin cyan:=true; inc(total); end; If (a[i]>=1600) and (a[i]<=1999) then if not blue then begin blue:=true; inc(total); end; If (a[i]>=2000) and (a[i]<=2399) then if not yellow then begin yellow:=true; inc(total); end; If (a[i]>=2400) and (a[i]<=2799) then if not orange then begin orange:=true; inc(total); end; If (a[i]>=2800) and (a[i]<=3199) then if not red then begin red:=true; inc(total); end; If a[i]>=3200 then inc(d); End; if total=0 then write('1',' ') else Write(total,' '); Total:=Total+d; Write(total); End.
Submission Info
Submission Time | |
---|---|
Task | C - Colorful Leaderboard |
User | tin2016nnmquan |
Language | Pascal (FPC 2.6.2) |
Score | 300 |
Code Size | 1166 Byte |
Status | AC |
Exec Time | 0 ms |
Memory | 128 KB |
Compile Error
/usr/bin/ld.bfd: warning: ./link.res contains output sections; did you forget -T?
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 300 / 300 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | s1.txt, s2.txt, s3.txt |
All | in1.txt, in2.txt, in3.txt, in4.txt, in5.txt, s1.txt, s2.txt, s3.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
in1.txt | AC | 0 ms | 128 KB |
in2.txt | AC | 0 ms | 128 KB |
in3.txt | AC | 0 ms | 128 KB |
in4.txt | AC | 0 ms | 128 KB |
in5.txt | AC | 0 ms | 128 KB |
s1.txt | AC | 0 ms | 128 KB |
s2.txt | AC | 0 ms | 128 KB |
s3.txt | AC | 0 ms | 128 KB |