Submission #573219
Source Code Expand
#!/bin/sh
a=(`cat -`)
for b in `echo ${a[1]} | fold -w 1`; do
[ -z "$c" ] && c=$b && continue
[ $c -eq $b ] && d=$((d + 1)) || c=""
done
[ ! -z "$c" ] && d=$((d + 1))
echo $((d / 2))
Submission Info
| Submission Time | |
|---|---|
| Task | C - 寿司タワー |
| User | ter979 |
| Language | Bash (4.2.25) |
| Score | 100 |
| Code Size | 209 Byte |
| Status | AC |
| Exec Time | 50 ms |
| Memory | 1260 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 100 / 100 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | sample-01.txt, sample-02.txt |
| All | sample-01.txt, sample-02.txt, 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 01-06.txt, 01-07.txt, 01-08.txt, 01-09.txt, 01-10.txt, 01-11.txt, 01-12.txt, 01-13.txt, 01-14.txt, 01-15.txt, 01-16.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 01-01.txt | AC | 37 ms | 1200 KiB |
| 01-02.txt | AC | 33 ms | 1168 KiB |
| 01-03.txt | AC | 33 ms | 1120 KiB |
| 01-04.txt | AC | 34 ms | 1160 KiB |
| 01-05.txt | AC | 47 ms | 1172 KiB |
| 01-06.txt | AC | 47 ms | 1140 KiB |
| 01-07.txt | AC | 45 ms | 1260 KiB |
| 01-08.txt | AC | 45 ms | 1204 KiB |
| 01-09.txt | AC | 50 ms | 1128 KiB |
| 01-10.txt | AC | 50 ms | 1164 KiB |
| 01-11.txt | AC | 48 ms | 1160 KiB |
| 01-12.txt | AC | 44 ms | 1156 KiB |
| 01-13.txt | AC | 50 ms | 1256 KiB |
| 01-14.txt | AC | 46 ms | 1172 KiB |
| 01-15.txt | AC | 44 ms | 1140 KiB |
| 01-16.txt | AC | 40 ms | 1112 KiB |
| sample-01.txt | AC | 35 ms | 1112 KiB |
| sample-02.txt | AC | 35 ms | 1120 KiB |