Advertisement
EeZotop

Heller build log

Jun 3rd, 2022
291
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.74 KB | None | 0 0
  1. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:31:12: warning: narrowing conversion from 'long' to signed type 'int' is implementation-defined [bugprone-narrowing-conversions]
  2. return max_element(cnts.begin(), cnts.end()) - cnts.begin() + 1;
  3. ^
  4. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:31:12: warning: narrowing conversion from 'long' to signed type 'int' is implementation-defined [cppcoreguidelines-narrowing-conversions]
  5. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:52:5: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration]
  6. vector<long long int> cnts_left(class_cnt), cnts_right(class_cnt);
  7. ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  8. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:58:26: warning: 50 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers]
  9. if (objects.size() > 50)
  10. ^
  11. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:58:26: warning: 50 is a magic number; consider replacing it with a named constant [readability-magic-numbers]
  12. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:61:9: warning: use range-based for loop instead [modernize-loop-convert]
  13. for (size_t i = 0; i < cnts_right.size(); i++)
  14. ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  15. (long long i : cnts_right)
  16. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:73:69: warning: statement should be inside braces [readability-braces-around-statements]
  17. if (objects.front().first[i] == objects.back().first[i])
  18. ^
  19. {
  20. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:76:13: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration]
  21. long long int sum_left = 0, sum_right = csum_right;
  22. ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  23. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:77:13: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration]
  24. long long int left_size = 0, right_size = objects.size();
  25. ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  26. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:78:13: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration]
  27. vector<long long int> to_left_cnt(cnts_left), to_right_cnt(cnts_right);
  28. ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  29. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:89:42: warning: statement should be inside braces [readability-braces-around-statements]
  30. if (it == objects.size())
  31. ^
  32. {
  33. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:92:31: warning: narrowing conversion from 'long long' to signed type 'int' is implementation-defined [bugprone-narrowing-conversions]
  34. int curr_cl = objects[prev_it].second - 1;
  35. ^
  36. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:92:31: warning: narrowing conversion from 'long long' to signed type 'int' is implementation-defined [cppcoreguidelines-narrowing-conversions]
  37. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:111:32: warning: narrowing conversion from 'long long' to 'double' [bugprone-narrowing-conversions]
  38. double pleft = sum_left / static_cast<double>(left_size);
  39. ^
  40. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:111:32: warning: narrowing conversion from 'long long' to 'double' [cppcoreguidelines-narrowing-conversions]
  41. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:112:33: warning: narrowing conversion from 'long long' to 'double' [bugprone-narrowing-conversions]
  42. double pright = sum_right / static_cast<double>(right_size);
  43. ^
  44. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:112:33: warning: narrowing conversion from 'long long' to 'double' [cppcoreguidelines-narrowing-conversions]
  45. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:118:36: warning: narrowing conversion from 'long long' to 'double' [bugprone-narrowing-conversions]
  46. ideal_border = (objects[it - 1].first[i] + objects[it].first[i]) / 2.0;
  47. ^
  48. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:118:36: warning: narrowing conversion from 'long long' to 'double' [cppcoreguidelines-narrowing-conversions]
  49. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:118:88: warning: 2.0 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers]
  50. ideal_border = (objects[it - 1].first[i] + objects[it].first[i]) / 2.0;
  51. ^
  52. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:118:88: warning: 2.0 is a magic number; consider replacing it with a named constant [readability-magic-numbers]
  53. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:135:9: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration]
  54. vector<obj_t> to_left, to_right;
  55. ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  56. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:136:9: warning: use range-based for loop instead [modernize-loop-convert]
  57. for (size_t i = 0; i < objects.size(); i++)
  58. ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  59. (auto & object : objects)
  60. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:148:27: warning: narrowing conversion from 'unsigned long' to signed type 'int' is implementation-defined [bugprone-narrowing-conversions]
  61. curr_node.right = tree.size() + 1;
  62. ^
  63. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:148:27: warning: narrowing conversion from 'unsigned long' to signed type 'int' is implementation-defined [cppcoreguidelines-narrowing-conversions]
  64. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:163:69: warning: statement should be inside braces [readability-braces-around-statements]
  65. if (objects.front().first[i] == objects.back().first[i])
  66. ^
  67. {
  68. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:166:13: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration]
  69. long long int left_size = 0, right_size = objects.size();
  70. ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  71. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:167:13: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration]
  72. vector<long long int> to_left_cnt(cnts_left), to_right_cnt(cnts_right);
  73. ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  74. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:178:42: warning: statement should be inside braces [readability-braces-around-statements]
  75. if (it == objects.size())
  76. ^
  77. {
  78. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:181:31: warning: narrowing conversion from 'long long' to signed type 'int' is implementation-defined [bugprone-narrowing-conversions]
  79. int curr_cl = objects[prev_it].second - 1;
  80. ^
  81. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:181:31: warning: narrowing conversion from 'long long' to signed type 'int' is implementation-defined [cppcoreguidelines-narrowing-conversions]
  82. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:182:31: warning: Value stored to 'right_val' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
  83. long long int right_val = to_right_cnt[curr_cl];
  84. ^
  85. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:182:31: note: Value stored to 'right_val' during its initialization is never read
  86. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:183:31: warning: Value stored to 'left_val' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
  87. long long int left_val = to_left_cnt[curr_cl];
  88. ^
  89. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:183:31: note: Value stored to 'left_val' during its initialization is never read
  90. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:190:17: warning: Value stored to 'right_val' is never read [clang-analyzer-deadcode.DeadStores]
  91. right_val = to_right_cnt[curr_cl];
  92. ^
  93. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:190:17: note: Value stored to 'right_val' is never read
  94. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:191:17: warning: Value stored to 'left_val' is never read [clang-analyzer-deadcode.DeadStores]
  95. left_val = to_left_cnt[curr_cl];
  96. ^
  97. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:191:17: note: Value stored to 'left_val' is never read
  98. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:193:17: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration]
  99. double pleft = 0.0, pright = 0.0;
  100. ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  101. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:194:17: warning: use range-based for loop instead [modernize-loop-convert]
  102. for (int biba = 0; biba < to_left_cnt.size(); biba++)
  103. ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  104. (long long biba : to_left_cnt)
  105. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:196:26: warning: implicit conversion '__gnu_cxx::__alloc_traits<std::allocator<long long>, long long>::value_type' (aka 'long long') -> bool [readability-implicit-bool-conversion]
  106. if (!to_left_cnt[biba])
  107. ~^
  108. == 0
  109. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:196:44: warning: statement should be inside braces [readability-braces-around-statements]
  110. if (!to_left_cnt[biba])
  111. ^
  112. {
  113. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:203:17: warning: use range-based for loop instead [modernize-loop-convert]
  114. for (int boba = 0; boba < to_right_cnt.size(); boba++)
  115. ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  116. (long long boba : to_right_cnt)
  117. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:205:26: warning: implicit conversion '__gnu_cxx::__alloc_traits<std::allocator<long long>, long long>::value_type' (aka 'long long') -> bool [readability-implicit-bool-conversion]
  118. if (!to_right_cnt[boba])
  119. ~^
  120. == 0
  121. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:205:45: warning: statement should be inside braces [readability-braces-around-statements]
  122. if (!to_right_cnt[boba])
  123. ^
  124. {
  125. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:212:29: warning: narrowing conversion from 'long long' to 'double' [bugprone-narrowing-conversions]
  126. if (pleft * left_size + pright * right_size < best)
  127. ^
  128. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:212:29: warning: narrowing conversion from 'long long' to 'double' [cppcoreguidelines-narrowing-conversions]
  129. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:212:50: warning: narrowing conversion from 'long long' to 'double' [bugprone-narrowing-conversions]
  130. if (pleft * left_size + pright * right_size < best)
  131. ^
  132. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:212:50: warning: narrowing conversion from 'long long' to 'double' [cppcoreguidelines-narrowing-conversions]
  133. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:214:36: warning: narrowing conversion from 'long long' to 'double' [bugprone-narrowing-conversions]
  134. best = pleft * left_size + pright * right_size;
  135. ^
  136. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:214:36: warning: narrowing conversion from 'long long' to 'double' [cppcoreguidelines-narrowing-conversions]
  137. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:214:57: warning: narrowing conversion from 'long long' to 'double' [bugprone-narrowing-conversions]
  138. best = pleft * left_size + pright * right_size;
  139. ^
  140. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:214:57: warning: narrowing conversion from 'long long' to 'double' [cppcoreguidelines-narrowing-conversions]
  141. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:216:36: warning: narrowing conversion from 'long long' to 'double' [bugprone-narrowing-conversions]
  142. ideal_border = (objects[it - 1].first[i] + objects[it].first[i]) / 2.0;
  143. ^
  144. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:216:36: warning: narrowing conversion from 'long long' to 'double' [cppcoreguidelines-narrowing-conversions]
  145. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:216:88: warning: 2.0 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers]
  146. ideal_border = (objects[it - 1].first[i] + objects[it].first[i]) / 2.0;
  147. ^
  148. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:216:88: warning: 2.0 is a magic number; consider replacing it with a named constant [readability-magic-numbers]
  149. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:233:9: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration]
  150. vector<obj_t> to_left, to_right;
  151. ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  152. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:234:9: warning: use range-based for loop instead [modernize-loop-convert]
  153. for (size_t i = 0; i < objects.size(); i++)
  154. ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  155. (auto & object : objects)
  156. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:246:27: warning: narrowing conversion from 'unsigned long' to signed type 'int' is implementation-defined [bugprone-narrowing-conversions]
  157. curr_node.right = tree.size() + 1;
  158. ^
  159. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:246:27: warning: narrowing conversion from 'unsigned long' to signed type 'int' is implementation-defined [cppcoreguidelines-narrowing-conversions]
  160. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:256:9: warning: variable 'm' is not initialized [cppcoreguidelines-init-variables]
  161. int m; cin >> m >> class_cnt >> max_h;
  162. ^
  163. = 0
  164. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:257:9: warning: variable 'n' is not initialized [cppcoreguidelines-init-variables]
  165. int n; cin >> n;
  166. ^
  167. = 0
  168. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:273:26: warning: 20 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers]
  169. cout << setprecision(20);
  170. ^
  171. /home/eezotop/cpp_projects/cf-contest/src/main.cpp:273:26: warning: 20 is a magic number; consider replacing it with a named constant [readability-magic-numbers]
  172.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement