| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 298937 | infinite_iq | 전선 연결 (IOI17_wiring) | C++14 | 1091 ms | 2680 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std ;
typedef long long ll ;
typedef vector < int > vi ;
#define lb lower_bound
#include "wiring.h"
long long min_total_length ( vi a , vi b ) {
        if ( a .size () > b .size () ) swap ( a , b ) ;
        int k = b .size () - a .size () ;
        ll ans = 1e18 ;
        for ( int i = 0 ; i + k - 1 < b .size () ; i ++ ) {
                ll cost = 0 ;
                for ( int j = i ; j < i + k ; j ++ ) {
                        ll ret = 1e8 ; 
                        auto it = lb ( a .begin () , a .end () , b [j] ) - a .begin () ;
                        if ( it != a .size () ) {
                                ret = min ( ret , (ll) ( abs ( a [it] - b [j] ) ) ) ;
                        }
                        it -- ;
                        if ( it != -1 ) {
                                ret = min ( ret , (ll) ( abs ( a [it] - b [j] ) ) ) ;
                        }
                        cost += ret ;
                }
                int it = 0 ;
                for ( int j = 0 ; j < b .size () ; j ++ ) {
                        if ( i <= j && j < i + k ) continue ;
                        cost += abs ( b [j] - a [it++] ) ;
                }
                ans = min ( ans , cost ) ;
        }
        return ans ;
}
컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
