/ Vijos /

记录详情

Accepted

foo.cc: In function ‘void build()’:
foo.cc:64:39: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
   64 |                 for(register int i=0;i<=temp.size();++i)
      |                                      ~^~~~~~~~~~~~~
foo.cc:67:39: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
   67 |                          int r=temp[(i>temp.size()-1?0:i)]-'0';
      |                                      ~^~~~~~~~~~~~~~
foo.cc:73:73: warning: comparison of integer expressions of different signedness: ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
   73 |                                 if(new_string.empty()||new_string.size()>max_len)//||new_string.size()!=temp.size()+1)
      |                                                        ~~~~~~~~~~~~~~~~~^~~~~~~~
foo.cc:87:29: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
   87 |                         if(i==temp.size())
      |                            ~^~~~~~~~~~~~~
foo.cc:89:49: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
   89 |                         for(register int j=i+1;j<temp.size();++j)
      |                                                ~^~~~~~~~~~~~
foo.cc:93:54: warning: suggest parentheses around ‘+’ inside ‘<<’ [-Wparentheses]
   93 |                                 register int wt=(x&y)+(x^y)<<1;
      |                                                 ~~~~~^~~~~~
foo.cc:116:57: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
  116 |                                 register int r=temp[(i+1>temp.size()-1?0:i+1)]-'0';
      |                                                      ~~~^~~~~~~~~~~~~~
# 状态 耗时 内存占用
#1 Accepted 5ms 3.523 MiB
#2 Accepted 6ms 3.566 MiB
#3 Accepted 6ms 3.793 MiB
#4 Accepted 5ms 3.523 MiB
#5 Accepted 5ms 3.566 MiB
#6 Accepted 30ms 5.145 MiB
#7 Accepted 131ms 10.684 MiB
#8 Accepted 47ms 5.781 MiB
#9 Accepted 500ms 38.625 MiB
#10 Accepted 689ms 45.781 MiB

信息

递交者
类型
递交
题目
P1422 教主的难题
语言
C++
递交时间
2024-07-14 09:29:51
评测时间
2024-07-14 09:29:51
评测机
分数
100
总耗时
1428ms
峰值内存
45.781 MiB