| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 301222 | eagle30 | Arranging Shoes (IOI19_shoes) | C++14 | 1139 ms | 814420 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "shoes.h"
#include<bits/stdc++.h>
using namespace std;
int mi(vector<int> vi, vector<int> pe, multiset<int> mu, int s){
    int n=vi.size();
    if(s==n){
        int coun=0;
        for(int i=0; i<n; i++){
            for(int j=i; j<n; j++){
                if(pe[i]==vi[j]){
                    for(int k=j-1; k>=i; k--)
                        swap(vi[k], vi[k+1]), coun++;
                    break;
                }
            }
        }
        return coun;
    }
    int mini=2e9;
    vector<int> asdf;
    for(auto x:mu){
        asdf.push_back(x);
    }
    for(int i=0; i<asdf.size(); i++){
        pe[s]=-asdf[i];
        pe[s+1]=asdf[i];
        mu.erase(mu.find(asdf[i]));
        mini=min(mini, mi(vi, pe, mu, s+2));
        mu.insert(asdf[i]);
    }
    return mini;
}
long long count_swaps(vector<int> s) {
    vector<int> yo;
    int n=s.size();
    yo.assign(n, 0);
    map<int, int> mp;
    for(int i=0; i<n; i++)
        mp[abs(s[i])]++;
    multiset<int> mu;
    for(auto x:mp){
        for(int i=0; i<x.second/2; i++)
            mu.insert(x.first);
    }
    return mi(s, yo, mu, 0);
}
컴파일 시 표준 에러 (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... | ||||
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
