runtime
error(access_violation)是运行时错误,非法访问内存,比如数组越界或者堆栈溢出。
看看题目要求:
input
contains
multiple
test
cases.
each
test
case
starts
with
a
number
n
(
0 <
n
<=
1000
) -- the
total
number
of balloons
distributed. the next n
lines
contain
one
color
each.
the
color
of
a
balloon
is
a
string
of
up
to
15
lower-case
letters.
a
test
case
with
n
=
0
terminates
the input
and
this
test
case
is
not
to
be
processed.
而你的程序:
a=(char
**)malloc(
10
*sizeof(char
*));
用个超过10个的case就越界了。