/ Vijos /

记录详情

Accepted

/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:188:58: 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, str.size(), 8.0);
                                                          ^
/in/foo.cc:188:58: warning: format '%d' expects argument of type 'int', but argument 3 has type 'std::__cxx11::basic_string<char>::size_type {aka long unsigned int}' [-Wformat=]
/in/foo.cc:199: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:194: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:192:43:   required from here
/in/foo.cc:40:5: warning: converting to non-pointer type 'char' from NULL [-Wconversion-null]
  ch = NULL;
     ^
# 状态 耗时 内存占用
#1 Accepted 1ms 332.0 KiB

信息

递交者
类型
递交
题目
P1079 中青局
语言
C++
递交时间
2019-06-17 11:58:39
评测时间
2019-06-17 11:58:39
评测机
分数
100
总耗时
1ms
峰值内存
332.0 KiB