제출 #1329751

#제출 시각아이디문제언어결과실행 시간메모리
1329751SulAScales (IOI15_scales)C++20
컴파일 에러
0 ms0 KiB
#include "scale.h"
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
template<typename T> using ordered_set = tree<T, null_type, less_equal<T>, rb_tree_tag, tree_order_statistics_node_update>;

void init(int t) {}

//int getLightest(int a, int b, int c) {
//    cout << a << " " << b << " " << c << endl;
//    cin >> a;
//    return a;
//}

void orderCoins() {
    vector<int> rem = {1, 2, 3, 4, 5, 6};
    int coins[6];
    for (int p = 0; p < 6; p++) {
        int mn = rem[0];
        for (int i = 1; i+1 < 6 - p; i += 2) {
            mn = getLightest(mn, rem[i], rem[i+1]);
        }
        if (rem.size() % 2 == 0)
            mn = getLightest(mn, mn, rem.back());
        coins[p] = mn;
        auto pos = find(rem.begin(), rem.end(), mn);
        swap(rem.back(), *pos);
        rem.pop_back();
    }
    answer(coins);
//    for (int x : coins) cout<<x<<" ";
}


int main() {
    orderCoins();
}

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

scales.cpp:1:10: fatal error: scale.h: No such file or directory
    1 | #include "scale.h"
      |          ^~~~~~~~~
compilation terminated.