记录详情

Accepted

foo.cc: In function 'int main()':
foo.cc:9:11: warning: comparison of integer expressions of different signedness: 'll' {aka 'long long int'} and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    9 |  for(i=0;i<s.size();i++)
      |          ~^~~~~~~~~
foo.cc:11:11: warning: comparison of integer expressions of different signedness: 'll' {aka 'long long int'} and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   11 |  for(i=1;i<s.size();i++)
      |          ~^~~~~~~~~
foo.cc:15:14: warning: comparison of integer expressions of different signedness: 'll' {aka 'long long int'} and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   15 |   for(j=i+1;j<=s.size();j++)
      |             ~^~~~~~~~~~
foo.cc:19:12: warning: format '%d' expects argument of type 'int', but argument 2 has type 'll' {aka 'long long int'} [-Wformat=]
   19 |   printf("%d+%d=%d\n",t1,t2,t1+t2);
      |           ~^          ~~
      |            |          |
      |            int        ll {aka long long int}
      |           %lld
foo.cc:19:15: warning: format '%d' expects argument of type 'int', but argument 3 has type 'll' {aka 'long long int'} [-Wformat=]
   19 |   printf("%d+%d=%d\n",t1,t2,t1+t2);
      |              ~^          ~~
      |               |          |
      |               int        ll {aka long long int}
      |              %lld
foo.cc:19:18: warning: format '%d' expects argument of type 'int', but argument 4 has type 'll' {aka 'long long int'} [-Wformat=]
   19 |   printf("%d+%d=%d\n",t1,t2,t1+t2);
      |                 ~^          ~~~~~
      |                  |            |
      |                  int          ll {aka long long int}
      |                 %lld
foo.cc:23:21: warning: format '%d' expects argument of type 'int', but argument 2 has type 'll' {aka 'long long int'} [-Wformat=]
   23 |  printf("summax is:%d\n",k);
      |                    ~^    ~
      |                     |    |
      |                     int  ll {aka long long int}
      |                    %lld
正在同步测试数据,请稍后
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Accepted 1ms 384.0 KiB
#2 Accepted 2ms 384.0 KiB
#3 Accepted 1ms 384.0 KiB
#4 Accepted 2ms 384.0 KiB
#5 Accepted 2ms 384.0 KiB

信息

递交者
类型
递交
题目
4-1 改错题
语言
C++
递交时间
2022-07-30 08:29:18
评测时间
2022-07-30 08:29:18
评测机
分数
100
总耗时
10ms
峰值内存
384.0 KiB