/ Vijos /

记录详情

Accepted

foo.cc: In function 'int main()':
foo.cc:18:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   18 |     for (int i = 0; i < str.length(); i++)
      |                     ~~^~~~~~~~~~~~~~
foo.cc:22:34: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   22 |             for (j = 0, k = i; j < s0.length(); j++, k++)
      |                                ~~^~~~~~~~~~~~~
foo.cc:25:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   25 |             if(j == s0.length() && (k == str.length() || str[k] == ' '))
      |                ~~^~~~~~~~~~~~~~
foo.cc:25:39: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   25 |             if(j == s0.length() && (k == str.length() || str[k] == ' '))
      |                                     ~~^~~~~~~~~~~~~~~
foo.cc:34:31: warning: 'p' may be used uninitialized in this function [-Wmaybe-uninitialized]
   34 |         cout << ans << " " << p <<endl;
      |                               ^
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Accepted 3ms 256.0 KiB
#2 Accepted 3ms 256.0 KiB
#3 Accepted 2ms 256.0 KiB
#4 Accepted 3ms 256.0 KiB
#5 Accepted 2ms 384.0 KiB
#6 Accepted 6ms 640.0 KiB
#7 Accepted 4ms 640.0 KiB
#8 Accepted 35ms 3.051 MiB
#9 Accepted 35ms 3.051 MiB
#10 Accepted 35ms 3.051 MiB

信息

递交者
类型
递交
题目
P1761 统计单词数
语言
C++
递交时间
2022-08-12 19:17:11
评测时间
2022-08-12 19:17:11
评测机
分数
100
总耗时
132ms
峰值内存
3.051 MiB