Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /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]
- return max_element(cnts.begin(), cnts.end()) - cnts.begin() + 1;
- ^
- /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]
- /home/eezotop/cpp_projects/cf-contest/src/main.cpp:52:5: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration]
- vector<long long int> cnts_left(class_cnt), cnts_right(class_cnt);
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- /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]
- if (objects.size() > 50)
- ^
- /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]
- /home/eezotop/cpp_projects/cf-contest/src/main.cpp:61:9: warning: use range-based for loop instead [modernize-loop-convert]
- for (size_t i = 0; i < cnts_right.size(); i++)
- ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- (long long i : cnts_right)
- /home/eezotop/cpp_projects/cf-contest/src/main.cpp:73:69: warning: statement should be inside braces [readability-braces-around-statements]
- if (objects.front().first[i] == objects.back().first[i])
- ^
- {
- /home/eezotop/cpp_projects/cf-contest/src/main.cpp:76:13: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration]
- long long int sum_left = 0, sum_right = csum_right;
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- /home/eezotop/cpp_projects/cf-contest/src/main.cpp:77:13: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration]
- long long int left_size = 0, right_size = objects.size();
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- /home/eezotop/cpp_projects/cf-contest/src/main.cpp:78:13: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration]
- vector<long long int> to_left_cnt(cnts_left), to_right_cnt(cnts_right);
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- /home/eezotop/cpp_projects/cf-contest/src/main.cpp:89:42: warning: statement should be inside braces [readability-braces-around-statements]
- if (it == objects.size())
- ^
- {
- /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]
- int curr_cl = objects[prev_it].second - 1;
- ^
- /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]
- /home/eezotop/cpp_projects/cf-contest/src/main.cpp:111:32: warning: narrowing conversion from 'long long' to 'double' [bugprone-narrowing-conversions]
- double pleft = sum_left / static_cast<double>(left_size);
- ^
- /home/eezotop/cpp_projects/cf-contest/src/main.cpp:111:32: warning: narrowing conversion from 'long long' to 'double' [cppcoreguidelines-narrowing-conversions]
- /home/eezotop/cpp_projects/cf-contest/src/main.cpp:112:33: warning: narrowing conversion from 'long long' to 'double' [bugprone-narrowing-conversions]
- double pright = sum_right / static_cast<double>(right_size);
- ^
- /home/eezotop/cpp_projects/cf-contest/src/main.cpp:112:33: warning: narrowing conversion from 'long long' to 'double' [cppcoreguidelines-narrowing-conversions]
- /home/eezotop/cpp_projects/cf-contest/src/main.cpp:118:36: warning: narrowing conversion from 'long long' to 'double' [bugprone-narrowing-conversions]
- ideal_border = (objects[it - 1].first[i] + objects[it].first[i]) / 2.0;
- ^
- /home/eezotop/cpp_projects/cf-contest/src/main.cpp:118:36: warning: narrowing conversion from 'long long' to 'double' [cppcoreguidelines-narrowing-conversions]
- /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]
- ideal_border = (objects[it - 1].first[i] + objects[it].first[i]) / 2.0;
- ^
- /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]
- /home/eezotop/cpp_projects/cf-contest/src/main.cpp:135:9: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration]
- vector<obj_t> to_left, to_right;
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- /home/eezotop/cpp_projects/cf-contest/src/main.cpp:136:9: warning: use range-based for loop instead [modernize-loop-convert]
- for (size_t i = 0; i < objects.size(); i++)
- ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- (auto & object : objects)
- /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]
- curr_node.right = tree.size() + 1;
- ^
- /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]
- /home/eezotop/cpp_projects/cf-contest/src/main.cpp:163:69: warning: statement should be inside braces [readability-braces-around-statements]
- if (objects.front().first[i] == objects.back().first[i])
- ^
- {
- /home/eezotop/cpp_projects/cf-contest/src/main.cpp:166:13: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration]
- long long int left_size = 0, right_size = objects.size();
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- /home/eezotop/cpp_projects/cf-contest/src/main.cpp:167:13: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration]
- vector<long long int> to_left_cnt(cnts_left), to_right_cnt(cnts_right);
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- /home/eezotop/cpp_projects/cf-contest/src/main.cpp:178:42: warning: statement should be inside braces [readability-braces-around-statements]
- if (it == objects.size())
- ^
- {
- /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]
- int curr_cl = objects[prev_it].second - 1;
- ^
- /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]
- /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]
- long long int right_val = to_right_cnt[curr_cl];
- ^
- /home/eezotop/cpp_projects/cf-contest/src/main.cpp:182:31: note: Value stored to 'right_val' during its initialization is never read
- /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]
- long long int left_val = to_left_cnt[curr_cl];
- ^
- /home/eezotop/cpp_projects/cf-contest/src/main.cpp:183:31: note: Value stored to 'left_val' during its initialization is never read
- /home/eezotop/cpp_projects/cf-contest/src/main.cpp:190:17: warning: Value stored to 'right_val' is never read [clang-analyzer-deadcode.DeadStores]
- right_val = to_right_cnt[curr_cl];
- ^
- /home/eezotop/cpp_projects/cf-contest/src/main.cpp:190:17: note: Value stored to 'right_val' is never read
- /home/eezotop/cpp_projects/cf-contest/src/main.cpp:191:17: warning: Value stored to 'left_val' is never read [clang-analyzer-deadcode.DeadStores]
- left_val = to_left_cnt[curr_cl];
- ^
- /home/eezotop/cpp_projects/cf-contest/src/main.cpp:191:17: note: Value stored to 'left_val' is never read
- /home/eezotop/cpp_projects/cf-contest/src/main.cpp:193:17: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration]
- double pleft = 0.0, pright = 0.0;
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- /home/eezotop/cpp_projects/cf-contest/src/main.cpp:194:17: warning: use range-based for loop instead [modernize-loop-convert]
- for (int biba = 0; biba < to_left_cnt.size(); biba++)
- ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- (long long biba : to_left_cnt)
- /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]
- if (!to_left_cnt[biba])
- ~^
- == 0
- /home/eezotop/cpp_projects/cf-contest/src/main.cpp:196:44: warning: statement should be inside braces [readability-braces-around-statements]
- if (!to_left_cnt[biba])
- ^
- {
- /home/eezotop/cpp_projects/cf-contest/src/main.cpp:203:17: warning: use range-based for loop instead [modernize-loop-convert]
- for (int boba = 0; boba < to_right_cnt.size(); boba++)
- ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- (long long boba : to_right_cnt)
- /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]
- if (!to_right_cnt[boba])
- ~^
- == 0
- /home/eezotop/cpp_projects/cf-contest/src/main.cpp:205:45: warning: statement should be inside braces [readability-braces-around-statements]
- if (!to_right_cnt[boba])
- ^
- {
- /home/eezotop/cpp_projects/cf-contest/src/main.cpp:212:29: warning: narrowing conversion from 'long long' to 'double' [bugprone-narrowing-conversions]
- if (pleft * left_size + pright * right_size < best)
- ^
- /home/eezotop/cpp_projects/cf-contest/src/main.cpp:212:29: warning: narrowing conversion from 'long long' to 'double' [cppcoreguidelines-narrowing-conversions]
- /home/eezotop/cpp_projects/cf-contest/src/main.cpp:212:50: warning: narrowing conversion from 'long long' to 'double' [bugprone-narrowing-conversions]
- if (pleft * left_size + pright * right_size < best)
- ^
- /home/eezotop/cpp_projects/cf-contest/src/main.cpp:212:50: warning: narrowing conversion from 'long long' to 'double' [cppcoreguidelines-narrowing-conversions]
- /home/eezotop/cpp_projects/cf-contest/src/main.cpp:214:36: warning: narrowing conversion from 'long long' to 'double' [bugprone-narrowing-conversions]
- best = pleft * left_size + pright * right_size;
- ^
- /home/eezotop/cpp_projects/cf-contest/src/main.cpp:214:36: warning: narrowing conversion from 'long long' to 'double' [cppcoreguidelines-narrowing-conversions]
- /home/eezotop/cpp_projects/cf-contest/src/main.cpp:214:57: warning: narrowing conversion from 'long long' to 'double' [bugprone-narrowing-conversions]
- best = pleft * left_size + pright * right_size;
- ^
- /home/eezotop/cpp_projects/cf-contest/src/main.cpp:214:57: warning: narrowing conversion from 'long long' to 'double' [cppcoreguidelines-narrowing-conversions]
- /home/eezotop/cpp_projects/cf-contest/src/main.cpp:216:36: warning: narrowing conversion from 'long long' to 'double' [bugprone-narrowing-conversions]
- ideal_border = (objects[it - 1].first[i] + objects[it].first[i]) / 2.0;
- ^
- /home/eezotop/cpp_projects/cf-contest/src/main.cpp:216:36: warning: narrowing conversion from 'long long' to 'double' [cppcoreguidelines-narrowing-conversions]
- /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]
- ideal_border = (objects[it - 1].first[i] + objects[it].first[i]) / 2.0;
- ^
- /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]
- /home/eezotop/cpp_projects/cf-contest/src/main.cpp:233:9: warning: multiple declarations in a single statement reduces readability [readability-isolate-declaration]
- vector<obj_t> to_left, to_right;
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- /home/eezotop/cpp_projects/cf-contest/src/main.cpp:234:9: warning: use range-based for loop instead [modernize-loop-convert]
- for (size_t i = 0; i < objects.size(); i++)
- ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- (auto & object : objects)
- /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]
- curr_node.right = tree.size() + 1;
- ^
- /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]
- /home/eezotop/cpp_projects/cf-contest/src/main.cpp:256:9: warning: variable 'm' is not initialized [cppcoreguidelines-init-variables]
- int m; cin >> m >> class_cnt >> max_h;
- ^
- = 0
- /home/eezotop/cpp_projects/cf-contest/src/main.cpp:257:9: warning: variable 'n' is not initialized [cppcoreguidelines-init-variables]
- int n; cin >> n;
- ^
- = 0
- /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]
- cout << setprecision(20);
- ^
- /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]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement