/ StarLand /

记录详情

Accepted

foo.cc: In function 'std::string bin(int, int)':
foo.cc:6:9: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
    6 |         for(long long i=1; a!=0; i++)s.push(a%2),a/=2;int l=s.size();
      |         ^~~
foo.cc:6:55: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
    6 |         for(long long i=1; a!=0; i++)s.push(a%2),a/=2;int l=s.size();
      |                                                       ^~~
foo.cc: In function 'int main()':
foo.cc:16:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   16 |         for(int i=0; i<s.size(); i++) s1+=bin(s[i],8);
      |                      ~^~~~~~~~~
foo.cc:17:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   17 |         for(int i=0; i<s1.size(); i++) {
      |                      ~^~~~~~~~~~
foo.cc:21:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   21 |         for(int i=0;i<s1.size();i++){
      |                     ~^~~~~~~~~~
正在同步测试数据,请稍后
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Accepted 4ms 412.0 KiB
#2 Accepted 4ms 412.0 KiB
#3 Accepted 8ms 412.0 KiB
#4 Accepted 10ms 540.0 KiB

信息

递交者
类型
递交
题目
P1005 信息的熵
语言
C++
递交时间
2023-07-17 09:56:36
评测时间
2023-07-17 09:56:36
评测机
分数
100
总耗时
28ms
峰值内存
540.0 KiB