Accepted

foo.cc: In function ‘bool check(std::string)’:
foo.cc:9:22: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
    9 |         for(int i=0;i<str.size();i++)
      |                     ~^~~~~~~~~~~
foo.cc:15:39: warning: suggest parentheses around comparison in operand of ‘|’ [-Wparentheses]
   15 |                                 str[i]=='#'|str[i]=='$')fhnum =1;
foo.cc: In function ‘int main()’:
foo.cc:25:22: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
   25 |         for(int i=0;i<st.size();i++)
      |                     ~^~~~~~~~~~
foo.cc:30:29: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
   30 |                         if(i==st.size()-1&&check(s))
      |                            ~^~~~~~~~~~~~~
正在同步测试数据,请稍后
# 状态 耗时 内存占用
#1 Accepted 2ms 536.0 KiB
#2 Accepted 3ms 536.0 KiB
#3 Accepted 3ms 320.0 KiB
#4 Accepted 2ms 536.0 KiB

信息

递交者
类型
递交
题目
P2596 密码合规检测3级2 202306
语言
C++
递交时间
2024-06-27 12:03:38
评测时间
2024-06-27 12:03:38
评测机
分数
100
总耗时
12ms
峰值内存
536.0 KiB