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就越界了。
版权声明:我们致力于保护作者版权,注重分享,被刊用文章【杭州电子科技大学acm1280题我为什么错了?】因无法核实真实出处,未能及时与作者取得联系,或有版权异议的,请联系管理员,我们会立即处理! 部分文章是来自自研大数据AI进行生成,内容摘自(百度百科,百度知道,头条百科,中国民法典,刑法,牛津词典,新华词典,汉语词典,国家院校,科普平台)等数据,内容仅供学习参考,不准确地方联系删除处理!;
工作时间:8:00-18:00
客服电话
电子邮件
beimuxi@protonmail.com
扫码二维码
获取最新动态
