제출 #415796

#제출 시각아이디문제언어결과실행 시간메모리
415796schse전선 연결 (IOI17_wiring)C++17
0 / 100
2 ms332 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) { vector<vector<long long>> dp(r.size() + 1, vector<long long>(b.size(), 0)); for (int i = 1; i <= r.size(); i++) { for (int e = 1; e <= b.size(); e++) { dp[i][e] = min(dp[i - 1][e - 1], dp[i][e - 1], dp[i - 1][e]) + abs(r[i] - b[e]); } } return dp[r.size()][b.size()]; }

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

wiring.cpp: In function 'long long int min_total_length(std::vector<int>, std::vector<int>)':
wiring.cpp:17:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   17 |  for (int i = 1; i <= r.size(); i++)
      |                  ~~^~~~~~~~~~~
wiring.cpp:19:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   19 |   for (int e = 1; e <= b.size(); e++)
      |                   ~~^~~~~~~~~~~
#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...