记录详情

Accepted

foo.cc: In function 'void Concat(char*, char*, char*)':
foo.cc:8:9: warning: unused variable 'len2' [-Wunused-variable]
    8 |     int len2 = strlen(s2);
      |         ^~~~
foo.cc:9:12: warning: 'char* strncpy(char*, const char*, size_t)' specified bound depends on the length of the source argument [-Wstringop-truncation]
    9 |     strncpy(result, s1, len1 - 1);
      |     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
foo.cc:7:22: note: length computed here
    7 |     int len1 = strlen(s1);
      |                ~~~~~~^~~~
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Accepted 4ms 412.0 KiB

信息

递交者
类型
自测
语言
C++
递交时间
2023-12-05 15:59:30
评测时间
2023-12-05 15:59:30
评测机
分数
10
总耗时
4ms
峰值内存
412.0 KiB