제출 #416209

#제출 시각아이디문제언어결과실행 시간메모리
416209schse전선 연결 (IOI17_wiring)C++17
0 / 100
1 ms204 KiB
#include <bits/stdc++.h> #ifndef EVAL #include "grader.cpp" #endif #define ll long long #include "wiring.h" using namespace std; ll min(ll a, ll b, ll c) { return std::min(a, std::min(b, c)); } long long min_total_length(std::vector<int> r, std::vector<int> b) { ll sum = 0; for (ll lines = 1, i = 1; i < r.size(); i++) sum += lines * (r[i] - r[i - 1]); for (ll lines = 1, i = 1; i < b.size(); i++) sum += lines * (b[i] - b[i - 1]); sum += max(r.size(), b.size()) * (b[0] - r.back()); return sum; }

컴파일 시 표준 에러 (stderr) 메시지

wiring.cpp: In function 'long long int min_total_length(std::vector<int>, std::vector<int>)':
wiring.cpp:17:30: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   17 |  for (ll lines = 1, i = 1; i < r.size(); i++)
      |                            ~~^~~~~~~~~~
wiring.cpp:19:30: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   19 |  for (ll lines = 1, i = 1; i < b.size(); i++)
      |                            ~~^~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...