记录详情

Accepted

foo.cc: In function 'int main()':
foo.cc:22:29: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   22 |                 if (pos + 1 < h.size() && h[pos + 1] >= '5')
      |                     ~~~~~~~~^~~~~~~~~~
foo.cc:25:26: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   25 |                 while (i < h.size() && h[i] != '.') cout << h[i++];
      |                        ~~^~~~~~~~~~
foo.cc:30:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   30 |         for (; i < h.size() && i <= pos + k; i++)
      |                ~~^~~~~~~~~~
foo.cc:32:43: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   32 |                 if (i == pos + k && i + 1 < h.size() && h[i + 1] >= '5')
      |                                     ~~~~~~^~~~~~~~~~
foo.cc:30:16: warning: 'i' may be used uninitialized [-Wmaybe-uninitialized]
   30 |         for (; i < h.size() && i <= pos + k; i++)
      |                ^
foo.cc:29:13: note: 'i' was declared here
   29 |         int i;
      |             ^
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Accepted 4ms 412.0 KiB
#2 Accepted 3ms 412.0 KiB
#3 Accepted 3ms 412.0 KiB
#4 Accepted 3ms 412.0 KiB

信息

递交者
类型
递交
题目
P1499 Problem A. 四舍五入
比赛
2023秋 苏州青少年科技馆(吴江计算机协会)CSP-J/S模拟赛(2)
语言
C++
递交时间
2023-10-09 18:44:39
评测时间
2023-10-09 18:44:39
评测机
分数
100
总耗时
15ms
峰值内存
412.0 KiB