/ Vijos /

记录详情

Runtime Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:174:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for (int i = 0; i != str.size(); i++) {
                   ~~^~~~~~~~~~~~~
/in/foo.cc:175:14: warning: array subscript has type 'char' [-Wchar-subscripts]
    cnt[str[i]]++;
              ^
/in/foo.cc:192:87: warning: format '%d' expects argument of type 'int', but argument 2 has type 'std::__cxx11::basic_string<char>::size_type {aka long unsigned int}' [-Wformat=]
   printf("%d %d %.1f\n", str.size() * 8, sumWeight, (double)str.size() * 8 / sumWeight);
                                                                                       ^
/in/foo.cc: In instantiation of 'void compute_length(node<T>*, int) [with T = int]':
/in/foo.cc:187:36:   required from here
/in/foo.cc:162:6: warning: array subscript has type 'char' [-Wchar-subscripts]
   len[root->getCh()] = depth;
   ~~~^
/in/foo.cc: In instantiation of 'node<T>::node(T) [with T = int]':
/in/foo.cc:149:12:   required from 'node<T>* huffman(heap<node<T>*>) [with T = int]'
/in/foo.cc:184:43:   required from here
/in/foo.cc:40:5: warning: converting to non-pointer type 'char' from NULL [-Wconversion-null]
  ch = NULL;
     ^
# 状态 耗时 内存占用
#1 Runtime Error 1ms 204.0 KiB

信息

递交者
类型
递交
题目
P1079 中青局
语言
C++
递交时间
2019-06-16 21:30:46
评测时间
2019-06-16 21:30:46
评测机
分数
0
总耗时
1ms
峰值内存
204.0 KiB