제출 #1047967

#제출 시각아이디문제언어결과실행 시간메모리
1047967Trent전선 연결 (IOI17_wiring)C++17
13 / 100
19 ms3932 KiB
#include "wiring.h" #include "bits/stdc++.h"; using namespace std; #define forR(i, x) for(int i = 0; i < (x); ++i) #define REP(i, a, b) for(int i = (a); i < (b); ++i) #define all(x) x.begin(), x.end() typedef long long ll; typedef vector<int> vi; typedef vector<vi> vvi; long long min_total_length(std::vector<int> r, std::vector<int> b) { sort(all(r)); sort(all(b)); ll tot = 0; for(int i : r) tot += r.back() - i; for(int i : b) tot += i - b.front(); tot += (ll) max(r.size(), b.size()) * (b.front() - r.back()); return tot; }

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

wiring.cpp:2:25: warning: extra tokens at end of #include directive
    2 | #include "bits/stdc++.h";
      |                         ^
#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...