제출 #1022925

#제출 시각아이디문제언어결과실행 시간메모리
1022925hirayuu_oj전선 연결 (IOI17_wiring)C++17
0 / 100
17 ms3064 KiB
#include "wiring.h" #include<bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0; i<(n); i++) using ll=long long; long long min_total_length(std::vector<int> r, std::vector<int> b) { if(r.size()<=200&&b.size()<=200){ } else{ ll ans=0; rep(i,r.size()){ ans+=abs(r[i]-b[max(0,(int)b.size()-1-i)]); } return ans; } }

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

wiring.cpp: In function 'long long int min_total_length(std::vector<int>, std::vector<int>)':
wiring.cpp:4:32: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    4 | #define rep(i,n) for(int i=0; i<(n); i++)
      |                                ^
wiring.cpp:13:3: note: in expansion of macro 'rep'
   13 |   rep(i,r.size()){
      |   ^~~
wiring.cpp:18:1: warning: control reaches end of non-void function [-Wreturn-type]
   18 | }
      | ^
#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...