제출 #1063866

#제출 시각아이디문제언어결과실행 시간메모리
1063866pravcoder전선 연결 (IOI17_wiring)C++14
13 / 100
31 ms4188 KiB
#include "wiring.h" #include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> #include <string> using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<vi> v2i; typedef pair<int, int> pi; typedef vector<pi> vpi; typedef vector<bool> vb; #define pb push_back #define mp make_pair #define rept(i, a, b) for (int i = a; i < b; i++) #define rep(i, n) for (int i = 0; i < n; i++) long long min_total_length(std::vector<int> r, std::vector<int> b) { ll length = 0; int n = r.size(), m = b.size(); b.resize(max(m, n), b[0]); r.resize(max(m, n), r[n - 1]); rep(i, r.size()) { length += b[i] - r[r.size() - i - 1]; } return length; }

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

wiring.cpp: In function 'long long int min_total_length(std::vector<int>, std::vector<int>)':
wiring.cpp:20:37: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   20 | #define rep(i, n) for (int i = 0; i < n; i++)
......
   27 |  rep(i, r.size()) {
      |      ~~~~~~~~~~~                     
wiring.cpp:27:2: note: in expansion of macro 'rep'
   27 |  rep(i, r.size()) {
      |  ^~~
#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...