Submission #18846265


Source Code Expand

Copy
#include <iostream>
#include <fstream>
#include <sstream>
#include <cassert>
#include <cmath>
#include <vector>
#include <map>
#include <set>
#include <cassert>
#include <cstdio>
#include <memory>
#include <random>
#include <list>
#include <string>
#include <unistd.h>
FILE *log_dest =
    stderr;
using namespace std;
struct graph_data{
    constexpr static size_t MaxDegree = 5;
    size_t V, E;
    std::map<size_t, std::map<size_t, size_t>> edges;
    graph_data(std::istream &src){
        src >> V >> E;
        for(size_t i = 0; i < E; ++i){
            size_t u, v, d;
            src >> u >> v >> d;
            --u, --v;
            edges[u][v] = d;
            edges[v][u] = d;
        }
        for([[maybe_unused]]auto &[u, connects] : edges){
        }
    }
};
struct grid_data{
    size_t DayType;
    size_t N_div, N_pattern, sigma_ele, Delta_event;
    double p_event;
    std::vector<std::vector<int>> pw_predict;
    size_t N_grid, C_grid_init, C_grid_max, V_grid_max;
    std::vector<size_t> x, pattern;
    grid_data() = default;
    grid_data(const grid_data&) = default;
    grid_data(std::istream &src){
        src >> DayType;
        src >> N_div >> N_pattern >> sigma_ele >> p_event >> Delta_event;
        pw_predict.resize(N_pattern);
        for(size_t i = 0; i < N_pattern; ++i){
            pw_predict[i].resize(N_div);
            for(size_t j = 0; j < N_div; ++j){
                src >> pw_predict[i][j];
            }
        }
        src >> N_grid >> C_grid_init >> C_grid_max >> V_grid_max;
        x.resize(N_grid);
        pattern.resize(N_grid);
        for(size_t i = 0; i < N_grid; ++i){
            src >> x[i] >> pattern[i];
            --x[i];
            --pattern[i];
        }
    }
    grid_data &operator=(const grid_data&) = default;
};
struct EV_data{
    size_t N_EV, C_EV_init, C_EV_max, V_EV_max, N_trans_max, Delta_EV_move;
    std::vector<size_t> pos;
    EV_data(std::istream &src){
        src>> N_EV >> C_EV_init >> C_EV_max >> V_EV_max >> N_trans_max >> Delta_EV_move;
        pos.resize(N_EV);
        for(size_t i = 0; i < N_EV; ++i){
            src >> pos[i];
            --pos[i];
        }
    }
};
struct A{
    graph_data graph;
    grid_data grid;
    EV_data EV;
    double gamma;
    size_t T_max;
    A(std::istream &src):graph(src), grid(src), EV(src){
        for(size_t i = 0; i < grid.N_grid; ++i){
        }
        src >> gamma;
        src>> T_max;
    }
};
struct B{
    graph_data graph;
    grid_data grid;
    EV_data EV;
    double p_const_trans;
    size_t T_last;
    size_t P_trans;
    double gamma;
    int S_ref_ele, S_ref_trans;
    size_t T_max;
    B(std::istream &src):graph(src), grid(src), EV(src){
        for(size_t i = 0; i < grid.N_grid; ++i){
        }
        src >> p_const_trans >> T_last;
        src >> P_trans >> gamma >> S_ref_ele >> S_ref_trans;
        src>> T_max;
    }
};
struct carinfo{
    size_t charge;
    size_t u, v, dist_from_u, dist_to_v;
    size_t N_adj;
    std::vector<size_t> a;
    size_t N_order;
    std::vector<size_t> o;
    void load(std::istream &src, [[maybe_unused]]size_t C_EV_max = 25000, [[maybe_unused]]size_t V = 225, [[maybe_unused]]size_t MaxDegree = 5, [[maybe_unused]]size_t N_trans_max = 4, [[maybe_unused]]size_t T_last = 900){
        src >> charge;
        src >> u >> v >> dist_from_u >> dist_to_v;
        --u, --v;
        src >> N_adj; a.resize(N_adj);
        for(size_t i = 0; i < N_adj; ++i){
            src >> a[i];
            --a[i];
        }
        src >> N_order; o.resize(N_order);
        for(size_t i = 0; i < N_order; ++i){
            src >> o[i];
            --o[i];
        }
    }
};
struct grid_info{
    size_t N_grid;
    std::vector<size_t> x, y;
    std::vector<int> pw_actual;
    std::vector<size_t> pw_excess, pw_buy;
    grid_info() = default;
    grid_info(size_t N_grid)
        :N_grid(N_grid), x(N_grid), y(N_grid), pw_actual(N_grid), pw_excess(N_grid), pw_buy(N_grid){}
    void load(std::istream &src, [[maybe_unused]]size_t V = 225, [[maybe_unused]]size_t C_grid_max = 50000){
        for(size_t i = 0; i < N_grid; ++i){
            src >> x[i] >> y[i] >> pw_actual[i] >> pw_excess[i] >> pw_buy[i];
            --x[i];
        }
    }
};
std::ostream &operator<<(std::ostream &dest, const grid_info &i){
    dest << "\tGrid info:\n";
    for(size_t j = 0; j < i.N_grid; ++j)
        dest << "\t\tx: " << i.x[j] << ", y: " << i.y[j] << ", actual: " << i.pw_actual[j] << ", excess: " << i.pw_excess[j] << ", buy: " << i.pw_buy[j] << "\n";
    return dest;
}
struct EV_info{
    size_t N_EV;
    std::vector<carinfo> c;
    EV_info() = default;
    EV_info(size_t N_EV)
        :N_EV(N_EV), c(N_EV){}
    void load(std::istream &src){
        for(size_t i = 0; i < N_EV; ++i){
            c[i].load(src);
        }
    }
};
std::ostream &operator<<(std::ostream &dest, const EV_info &i){
    dest << "\tEV info:\n";
    for(size_t j = 0; j < i.N_EV; ++j)
        dest << "\t\tcar " << j << "\n";
    return dest;
}
struct order_info{
    size_t N_order;
    std::vector<size_t> id, w, z, state, time;
    order_info() = default;
    void load(std::istream &src, [[maybe_unused]]size_t V = 225, [[maybe_unused]]size_t T_last = 900){
        src >> N_order;
        id.resize(N_order);
        w.resize(N_order);
        z.resize(N_order);
        state.resize(N_order);
        time.resize(N_order);
        for(size_t i = 0; i < N_order; ++i){
            src >> id[i] >> w[i] >> z[i] >> state[i] >> time[i];
            --w[i], --z[i];
        }
    }
};
std::ostream &operator<<(std::ostream &dest, const order_info &i){
    dest << "\tOrder info: " << i.N_order << " orders left\n";
    for(size_t j = 0; j < i.N_order; ++j)
        dest << "\t\tid: " << i.id[j] << ", departure: " << i.w[j] << ", arrival: " << i.z[j] << ", state: " << i.state[j] << ", ordered at: " << i.time[j] << "\n";
    return dest;
}
struct graph_summary {
    vector<vector<size_t>> len;
    vector<vector<size_t>> next;
    vector<size_t> nanogrid_pos;
    size_t diameter = 0;
    size_t cover_radius = 0;
    graph_summary(const graph_data& graph, const grid_data& grid) :
        len(graph.V, std::vector<size_t>(graph.V, 1e9)),
        next(graph.V, std::vector<size_t>(graph.V)),
        nanogrid_pos(grid.N_grid) {
        const size_t V = graph.V;
        for (size_t i = 0; i < V; ++i)
            len[i][i] = 0;
        for (size_t i = 0; i < V; ++i)
            for (size_t j = 0; j < V; ++j)
                next[i][j] = j;
        for (const auto& [u, u_edges] : graph.edges)
            for (const auto& [v, length] : u_edges) {
                len[u][v] = length;
                len[v][u] = length;
            }
        for (size_t k = 0; k < V; ++k)
            for (size_t i = 0; i < V; ++i)
                for (size_t j = 0; j < V; ++j)
                    if (len[i][j] > len[i][k] + len[k][j]) {
                        len[i][j] = len[i][k] + len[k][j];
                        next[i][j] = next[i][k];
                    }
        nanogrid_pos = grid.x;
        for (size_t i = 0; i < V; ++i)
            for (size_t j = 0; j < V; ++j)
                diameter = max(len[i][j], diameter);
        for (size_t i = 0; i < V; ++i) {
            size_t min_len = 1e9;
            for (size_t j = 0; j < nanogrid_pos.size(); ++j)
                min_len = min(min_len, len[i][j]);
            cover_radius = max(cover_radius, min_len);
        }
    }
};
size_t transit_length(const std::vector<size_t>& path, const std::vector<std::vector<size_t>>& min_path_len) {
    size_t len = 0;
    for (size_t i = 1; i < path.size(); ++i)
        len += min_path_len[path[i - 1]][path[i]];
    return len;
}
size_t transit_length(const std::vector<pair<size_t, int>>& path, const std::vector<std::vector<size_t>>& min_path_len) {
    size_t len = 0;
    for (size_t i = 1; i < path.size(); ++i)
        len += min_path_len[path[i - 1].first][path[i].first];
    return len;
}
pair<size_t, size_t> nearest_point(size_t current, const vector<size_t>& points, const graph_summary& gs) {
    size_t len = 1e9, nearest_pos = -1, nearest_index = -1;
    for (size_t i = 0; i < points.size(); ++i)
        if (gs.len[current][points[i]] < len) {
            len = gs.len[current][points[i]];
            nearest_pos = points[i];
            nearest_index = i;
        }
    return { nearest_index, nearest_pos };
}
pair<size_t, size_t> nearest_nanogrid(size_t current, const graph_summary& gs) {
    return nearest_point(current, gs.nanogrid_pos, gs);
}
string path_string(const vector<pair<size_t, int>>& path) {
    string ret;
    for (auto [p, pickup] : path) ret += " -> " + to_string(p + 1) + (pickup != -1 ? "(pickup: " + to_string(pickup) + ")" : "");
    return ret;
}
vector<pair<size_t, int>> find_transit_path_greedy(size_t current,
    const vector<tuple<size_t, size_t, size_t>>& order,
    const graph_summary& gs) {
    for ([[maybe_unused]] auto [from, to, id] : order) {
    }
    vector<pair<size_t, int>> ret; ret.reserve(2 * order.size());
    vector<size_t> pickup_flag(order.size(), 0);
    vector<size_t> index; index.reserve(order.size());
    vector<size_t> candidate; candidate.reserve(2 * order.size());
    size_t cur = current;
    while (1) {
        for (size_t i = 0; i < order.size(); ++i)
            switch (pickup_flag[i]) {
            case 0:
                candidate.push_back(get<0>(order[i]));
                index.push_back(i);
                break;
            case 1:
                candidate.push_back(get<1>(order[i]));
                index.push_back(i);
                break;
            default:;
            }
        if (candidate.size() == 0) break;
        for ([[maybe_unused]]auto p : candidate) ;
        auto [i, pos] = nearest_point(cur, candidate, gs);
        ret.emplace_back(pos, pickup_flag[index[i]] == 0 ? get<2>(order[index[i]]) : -1);
        pickup_flag[index[i]] += 1;
        cur = pos;
        candidate.clear();
        index.clear();
    }
    return ret;
}
size_t path_length_test(size_t insert_point, size_t insert_index, const std::vector<size_t>& path, const std::vector<std::vector<size_t>>& min_path_len) {
    size_t len = insert_index == 0 ? min_path_len[insert_point][path[0]] : 0;
    for (size_t i = 1; i < path.size(); ++i)
        if (insert_index == i)
            len += min_path_len[path[i - 1]][insert_point] + min_path_len[insert_point][path[i]];
        else
            len += min_path_len[path[i - 1]][path[i]];
    len += insert_index == path.size() ? min_path_len[path.back()][insert_point] : 0;
    return len;
}
struct action : std::list<std::string> {};
struct move_EV : action {
    move_EV(size_t current, size_t goal, const graph_summary& gs) {
        for (size_t cur = current; cur != goal; cur = gs.next[cur][goal]) {
            const size_t next = gs.next[cur][goal];
            for (size_t count = 0; count < gs.len[cur][next]; ++count)
                this->push_back("move " + std::to_string(next + 1));
        }
    }
    move_EV(size_t current, const std::vector<size_t>& path, const graph_summary& gs) {
        size_t cur = current;
        for (size_t goal : path)
            for (; cur != goal; cur = gs.next[cur][goal]) {
                const size_t next = gs.next[cur][goal];
                for (size_t count = 0; count < gs.len[cur][next]; ++count)
                    this->push_back("move " + std::to_string(next + 1));
            }
    }
};
auto minimal_matching(const vector<size_t>& start, const vector<size_t>& goal, const graph_summary& gs) {
    auto minimal_s = start.begin(), minimal_g = goal.begin();
    size_t minimal_len = 1e9;
    for (auto s = start.begin(); s != start.end(); ++s)
        for (auto g = goal.begin(); g != goal.end(); ++g)
            if (gs.len[*s][*g] < minimal_len) {
                minimal_s = s;
                minimal_g = g;
                minimal_len = gs.len[*s][*g];
            }
    return make_pair(minimal_s, minimal_g);
}
template<class... Args>
string strprintf(const char *fmt, const Args & ...args){
    char buf[65536];
    sprintf(buf, fmt, args...);
    return buf;
}
template<class P>
struct strategy :public P {
    const graph_summary& gs;
    vector<list<string>> command_queue;
    strategy(const P& p, const graph_summary& gs) : P(p), gs(gs),
        command_queue(P::EV.N_EV) {}
    virtual void command(const grid_info& g_i, const EV_info& ev_i, const order_info& order_i) = 0;
    virtual void initialize() {
        for (auto& queue : command_queue) queue.clear();
    }
    bool is_free(size_t EV_index) {
        if (command_queue[EV_index].size() > 0) {
            return false;
        }
        return true;
    }
    string dequeue(const EV_info& ev_i) {
        string ret = "";
        for (size_t i = 0; i < ev_i.N_EV; ++i)
            ret += dequeue(i) + "\n";
        return ret;
    }
    string dequeue(size_t EV_index) {
        string ret;
        if (command_queue[EV_index].size() > 0) {
            ret = command_queue[EV_index].front();
            command_queue[EV_index].pop_front();
        }
        else {
            ret = "stay";
        }
        return ret;
    }
    void enqueue(size_t EV_index, const string& cmd) {
        command_queue[EV_index].push_back(cmd);
    }
    void enqueue(size_t EV_index, const string& cmd, size_t repeat) {
        for (size_t i = 0; i < repeat; ++i)
            command_queue[EV_index].push_back(cmd);
    }
    void enqueue(size_t EV_index, list<string>&& cmd_list) {
        command_queue[EV_index].splice(command_queue[EV_index].end(), cmd_list);
    }
};
template<class P>
struct all_stay : strategy<P> {
    all_stay(const P& p, const graph_summary& gs) : strategy<P>(p, gs) {}
    void command(const grid_info&, const EV_info&, const order_info&) {}
};
template<class P>
struct random_walk : strategy<P> {
    using S = strategy<P>;
    std::mt19937_64 engine;
    random_walk(const P& p, const graph_summary& gs) : strategy<P>(p, gs) {}
    void command(const grid_info&, const EV_info& ev_i, const order_info&) {
        for (size_t n = 0; n < ev_i.N_EV; ++n) {
            if (!S::is_free(n)) continue;
            const size_t current = ev_i.c[n].u;
            const size_t safety_energy = S::EV.Delta_EV_move * 50;
            if (auto [_, pos] = nearest_nanogrid(current, S::gs); current != pos) {
                const size_t len_to_charge = S::gs.len[current][pos];
                const int expected_energy = ev_i.c[n].charge - len_to_charge * S::EV.Delta_EV_move;
                if (expected_energy < 0) {
                    S::enqueue(n, "stay", 1000);
                }
                else
                    S::enqueue(n, move_EV(current, pos, S::gs));
                continue;
            }
            else {
                if (ev_i.c[n].charge < safety_energy) {
                    S::enqueue(n, strprintf("charge_from_grid %zu", S::EV.V_EV_max), ceil(1.0 * (safety_energy - ev_i.c[n].charge) / S::EV.V_EV_max));
                    continue;
                }
            }
            uniform_int_distribution<size_t> dice(0, ev_i.c[n].N_adj - 1);
            const size_t goal = dice(engine);
            S::enqueue(n, move_EV(current, ev_i.c[n].a[goal], S::gs));
        }
    }
};
struct transport_only_0 : strategy<B> {
    std::set<size_t> assigned_order;
    transport_only_0(const B& b, const graph_summary& gs) :
        strategy<B>(b, gs) {}
    void initialize() {
        strategy::initialize();
        assigned_order.clear();
    }
    void command(const grid_info&, const EV_info& ev_i, const order_info& order_i) {
        for (size_t n = 0; n < ev_i.N_EV; ++n) {
            if (!is_free(n)) continue;
            const size_t current = ev_i.c[n].u;
            const size_t safety_energy = EV.Delta_EV_move * 50;
            if (auto [_, pos] = nearest_nanogrid(current, gs); current != pos) {
                const size_t len_to_charge = gs.len[current][pos];
                const int expected_energy = ev_i.c[n].charge - len_to_charge * EV.Delta_EV_move;
                if (expected_energy < 0) {
                    enqueue(n, "stay", 1000);
                }
                else
                    enqueue(n, move_EV(current, pos, gs));
                continue;
            }
            else {
                if (ev_i.c[n].charge < safety_energy) {
                    enqueue(n, strprintf("charge_from_grid %zu", EV.V_EV_max), ceil(1.0 * (safety_energy - ev_i.c[n].charge) / EV.V_EV_max));
                    continue;
                }
            }
            std::set<size_t> unassigned_order;
            for (size_t i = 0; i < order_i.N_order; ++i)
                if (assigned_order.count(order_i.id[i]) == 0)
                    unassigned_order.insert(i);
            if (unassigned_order.size() > 0) {
                size_t count = 0;
                std::vector<tuple<size_t, size_t, size_t>> assign_order;
                while (!unassigned_order.empty() && count++ < EV.N_trans_max) {
                    const size_t order_index = *(unassigned_order.begin());
                    unassigned_order.erase(unassigned_order.begin());
                    const size_t from = order_i.w[order_index];
                    const size_t to = order_i.z[order_index];
                    assign_order.emplace_back(from, to, order_i.id[order_index]);
                    assigned_order.insert(order_i.id[order_index]);
                }
                auto path = find_transit_path_greedy(current, assign_order, gs);
                vector<size_t> transit; transit.reserve(path.size() + 1);
                const size_t expected_transit_length = transit_length(path, gs.len) + gs.len[current][path[0].first];
                if (ev_i.c[n].charge < (expected_transit_length + gs.cover_radius) * EV.Delta_EV_move) {
                    enqueue(n, strprintf("charge_from_grid %zu", EV.V_EV_max), ((expected_transit_length + gs.cover_radius) * EV.Delta_EV_move - ev_i.c[n].charge) / EV.V_EV_max + 1);
                }
                size_t cur = current;
                for (auto [to, pick_up] : path) {
                    enqueue(n, move_EV(cur, to, gs));
                    if (pick_up != -1) enqueue(n, strprintf("pickup %d", pick_up));
                    cur = to;
                }
                continue;
            }
            else {
            }
            continue;
        }
    }
};
vector<string> split_command(const string &command_pack){
    vector<string> ret;
    stringstream reader(command_pack);
    string line;
    while(getline(reader, line)){
        if(line == "") continue;
        else ret.emplace_back(line);
    }
    return ret;
}
enum command_type{
    stay,
    move,
    pickup,
    charge_from_grid,
    charge_to_grid,
    invalid_command
};
struct command{
    command_type type;
    size_t val;
    command(command_type type, size_t val) : type(type), val(val){}
    string to_str() const{
        switch (type)
        {
        case command_type::stay:
            return strprintf("stay");
        case command_type::move:
            return strprintf("move %zu", val);
        case command_type::pickup:
            return strprintf("pickup %zu", val);
        case command_type::charge_from_grid:
            return strprintf("charge_from_grid %zu", val);
        case command_type::charge_to_grid:
            return strprintf("charge_to_grid %zu", val);
        default:
            break;
        }
        return "";
    }
};
command parser(const string &command){
    stringstream reader(command);
    string command_str;
    size_t value;
    reader >> command_str >> value;
    if (command_str == "stay") {
        return { command_type::stay, 0 };
    }else if (command_str == "move") {
        return { command_type::move, value};
    }else if (command_str == "pickup") {
        return { command_type::pickup, value };
    }else if (command_str == "charge_from_grid") {
        return { command_type::charge_from_grid, value};
    }else if (command_str == "charge_to_grid") {
        return { command_type::charge_to_grid, value };
    }
    return {invalid_command, (size_t)-1};
}
int main(){
    setbuf(log_dest, nullptr);
    size_t N_solution = 1;
    cin >> N_solution;
    B prob(cin);
    std::shared_ptr<strategy<B>> str = nullptr;
    graph_summary gs(prob.graph, prob.grid);
    grid_info grid_i(prob.grid.N_grid);
    EV_info ev_i(prob.EV.N_EV);
    order_info order_i;
    string command_per_turn;
    vector<pair<double, double>> scores; scores.reserve(N_solution);
    for(size_t n = 0; n < N_solution; ++n){
        // str.reset(new all_stay<B>(prob, gs));
        // str.reset(new random_walk<B>(prob, gs));
        str.reset(new transport_only_0(prob, gs));
        str->initialize();
        for(size_t t = 0; t < prob.T_max; ++t){
            grid_i.load(cin);
            ev_i.load(cin);
            order_i.load(cin);
            str->command(grid_i, ev_i, order_i);
            command_per_turn = str->dequeue(ev_i);
            auto command_list = split_command(command_per_turn);
            cout << command_per_turn << flush;
        }
        grid_i.load(cin);
        ev_i.load(cin);
        order_i.load(cin);
        double S_trans, S_ele;
        cin >> S_trans >> S_ele;
    }
    return 0;
}

Submission Info

Submission Time
Task B - hokudai_hitachi2020_b
User kmjp
Language C++ (GCC 9.2.1)
Score 435755655664000
Code Size 21868 Byte
Status AC
Exec Time 5202 ms
Memory 7972 KB

Compile Error

./Main.cpp: In instantiation of ‘std::string strprintf(const char*, const Args& ...) [with Args = {}; std::string = std::__cxx11::basic_string<char>]’:
./Main.cpp:516:36:   required from here
./Main.cpp:342:12: warning: format not a string literal and no format arguments [-Wformat-security]
  342 |     sprintf(buf, fmt, args...);
      |     ~~~~~~~^~~~~~~~~~~~~~~~~~~

Judge Result

Set Name All
Score / Max Score 435755655664000 / 9999999999999
Status
AC × 200
Set Name Test Cases
All test_case_1, test_case_10, test_case_100, test_case_101, test_case_102, test_case_103, test_case_104, test_case_105, test_case_106, test_case_107, test_case_108, test_case_109, test_case_11, test_case_110, test_case_111, test_case_112, test_case_113, test_case_114, test_case_115, test_case_116, test_case_117, test_case_118, test_case_119, test_case_12, test_case_120, test_case_121, test_case_122, test_case_123, test_case_124, test_case_125, test_case_126, test_case_127, test_case_128, test_case_129, test_case_13, test_case_130, test_case_131, test_case_132, test_case_133, test_case_134, test_case_135, test_case_136, test_case_137, test_case_138, test_case_139, test_case_14, test_case_140, test_case_141, test_case_142, test_case_143, test_case_144, test_case_145, test_case_146, test_case_147, test_case_148, test_case_149, test_case_15, test_case_150, test_case_151, test_case_152, test_case_153, test_case_154, test_case_155, test_case_156, test_case_157, test_case_158, test_case_159, test_case_16, test_case_160, test_case_17, test_case_18, test_case_19, test_case_2, test_case_20, test_case_21, test_case_22, test_case_23, test_case_24, test_case_25, test_case_26, test_case_27, test_case_28, test_case_29, test_case_3, test_case_30, test_case_31, test_case_32, test_case_33, test_case_34, test_case_35, test_case_36, test_case_37, test_case_38, test_case_39, test_case_4, test_case_40, test_case_41, test_case_42, test_case_43, test_case_44, test_case_45, test_case_46, test_case_47, test_case_48, test_case_49, test_case_5, test_case_50, test_case_51, test_case_52, test_case_53, test_case_54, test_case_55, test_case_56, test_case_57, test_case_58, test_case_59, test_case_6, test_case_60, test_case_61, test_case_62, test_case_63, test_case_64, test_case_65, test_case_66, test_case_67, test_case_68, test_case_69, test_case_7, test_case_70, test_case_71, test_case_72, test_case_73, test_case_74, test_case_75, test_case_76, test_case_77, test_case_78, test_case_79, test_case_8, test_case_80, test_case_81, test_case_82, test_case_83, test_case_84, test_case_85, test_case_86, test_case_87, test_case_88, test_case_89, test_case_9, test_case_90, test_case_91, test_case_92, test_case_93, test_case_94, test_case_95, test_case_96, test_case_97, test_case_98, test_case_99, test_case_ex1, test_case_ex10, test_case_ex11, test_case_ex12, test_case_ex13, test_case_ex14, test_case_ex15, test_case_ex16, test_case_ex17, test_case_ex18, test_case_ex19, test_case_ex2, test_case_ex20, test_case_ex21, test_case_ex22, test_case_ex23, test_case_ex24, test_case_ex25, test_case_ex26, test_case_ex27, test_case_ex28, test_case_ex29, test_case_ex3, test_case_ex30, test_case_ex31, test_case_ex32, test_case_ex33, test_case_ex34, test_case_ex35, test_case_ex36, test_case_ex37, test_case_ex38, test_case_ex39, test_case_ex4, test_case_ex40, test_case_ex5, test_case_ex6, test_case_ex7, test_case_ex8, test_case_ex9
Case Name Status Exec Time Memory
test_case_1 AC 4927 ms 7796 KB
test_case_10 AC 5149 ms 7804 KB
test_case_100 AC 5041 ms 7948 KB
test_case_101 AC 4891 ms 7860 KB
test_case_102 AC 4829 ms 7940 KB
test_case_103 AC 5035 ms 7912 KB
test_case_104 AC 4920 ms 7920 KB
test_case_105 AC 4845 ms 7900 KB
test_case_106 AC 4943 ms 7908 KB
test_case_107 AC 5070 ms 7820 KB
test_case_108 AC 5091 ms 7724 KB
test_case_109 AC 4993 ms 7808 KB
test_case_11 AC 4816 ms 7852 KB
test_case_110 AC 4996 ms 7900 KB
test_case_111 AC 4883 ms 7940 KB
test_case_112 AC 4873 ms 7936 KB
test_case_113 AC 4925 ms 7808 KB
test_case_114 AC 4929 ms 7944 KB
test_case_115 AC 5013 ms 7900 KB
test_case_116 AC 4791 ms 7808 KB
test_case_117 AC 4925 ms 7828 KB
test_case_118 AC 5034 ms 7912 KB
test_case_119 AC 4814 ms 7864 KB
test_case_12 AC 5090 ms 7944 KB
test_case_120 AC 4927 ms 7936 KB
test_case_121 AC 4799 ms 7952 KB
test_case_122 AC 4909 ms 7820 KB
test_case_123 AC 4934 ms 7896 KB
test_case_124 AC 5051 ms 7824 KB
test_case_125 AC 4932 ms 7808 KB
test_case_126 AC 4915 ms 7848 KB
test_case_127 AC 4840 ms 7728 KB
test_case_128 AC 4990 ms 7808 KB
test_case_129 AC 4868 ms 7824 KB
test_case_13 AC 5036 ms 7844 KB
test_case_130 AC 4856 ms 7732 KB
test_case_131 AC 4843 ms 7780 KB
test_case_132 AC 5163 ms 7736 KB
test_case_133 AC 4822 ms 7740 KB
test_case_134 AC 4889 ms 7788 KB
test_case_135 AC 5041 ms 7932 KB
test_case_136 AC 4926 ms 7840 KB
test_case_137 AC 5077 ms 7908 KB
test_case_138 AC 4825 ms 7832 KB
test_case_139 AC 4906 ms 7904 KB
test_case_14 AC 4821 ms 7968 KB
test_case_140 AC 4960 ms 7804 KB
test_case_141 AC 4865 ms 7784 KB
test_case_142 AC 5202 ms 7720 KB
test_case_143 AC 5043 ms 7952 KB
test_case_144 AC 4941 ms 7900 KB
test_case_145 AC 5015 ms 7792 KB
test_case_146 AC 4827 ms 7940 KB
test_case_147 AC 4987 ms 7956 KB
test_case_148 AC 4870 ms 7928 KB
test_case_149 AC 4883 ms 7828 KB
test_case_15 AC 4934 ms 7956 KB
test_case_150 AC 5002 ms 7952 KB
test_case_151 AC 4889 ms 7780 KB
test_case_152 AC 4885 ms 7952 KB
test_case_153 AC 4778 ms 7732 KB
test_case_154 AC 5001 ms 7908 KB
test_case_155 AC 4917 ms 7724 KB
test_case_156 AC 4976 ms 7840 KB
test_case_157 AC 5059 ms 7904 KB
test_case_158 AC 4950 ms 7912 KB
test_case_159 AC 5107 ms 7728 KB
test_case_16 AC 5094 ms 7964 KB
test_case_160 AC 4857 ms 7920 KB
test_case_17 AC 4898 ms 7896 KB
test_case_18 AC 4914 ms 7912 KB
test_case_19 AC 4990 ms 7932 KB
test_case_2 AC 4918 ms 7776 KB
test_case_20 AC 4907 ms 7972 KB
test_case_21 AC 4809 ms 7928 KB
test_case_22 AC 4874 ms 7916 KB
test_case_23 AC 5038 ms 7928 KB
test_case_24 AC 4917 ms 7956 KB
test_case_25 AC 5115 ms 7908 KB
test_case_26 AC 5000 ms 7804 KB
test_case_27 AC 4803 ms 7944 KB
test_case_28 AC 5061 ms 7712 KB
test_case_29 AC 4843 ms 7852 KB
test_case_3 AC 5021 ms 7968 KB
test_case_30 AC 5138 ms 7960 KB
test_case_31 AC 4938 ms 7944 KB
test_case_32 AC 4837 ms 7944 KB
test_case_33 AC 4886 ms 7732 KB
test_case_34 AC 4836 ms 7852 KB
test_case_35 AC 4774 ms 7856 KB
test_case_36 AC 4960 ms 7832 KB
test_case_37 AC 5016 ms 7948 KB
test_case_38 AC 4928 ms 7816 KB
test_case_39 AC 4967 ms 7828 KB
test_case_4 AC 4881 ms 7856 KB
test_case_40 AC 4943 ms 7964 KB
test_case_41 AC 4987 ms 7792 KB
test_case_42 AC 4954 ms 7952 KB
test_case_43 AC 5023 ms 7904 KB
test_case_44 AC 4951 ms 7944 KB
test_case_45 AC 5028 ms 7908 KB
test_case_46 AC 5037 ms 7908 KB
test_case_47 AC 4987 ms 7788 KB
test_case_48 AC 4996 ms 7928 KB
test_case_49 AC 5010 ms 7800 KB
test_case_5 AC 5025 ms 7948 KB
test_case_50 AC 5122 ms 7724 KB
test_case_51 AC 5042 ms 7968 KB
test_case_52 AC 4969 ms 7960 KB
test_case_53 AC 4850 ms 7920 KB
test_case_54 AC 4933 ms 7796 KB
test_case_55 AC 5131 ms 7828 KB
test_case_56 AC 4859 ms 7968 KB
test_case_57 AC 4793 ms 7908 KB
test_case_58 AC 4838 ms 7840 KB
test_case_59 AC 4862 ms 7812 KB
test_case_6 AC 4999 ms 7920 KB
test_case_60 AC 4844 ms 7784 KB
test_case_61 AC 4838 ms 7832 KB
test_case_62 AC 4932 ms 7756 KB
test_case_63 AC 4911 ms 7960 KB
test_case_64 AC 5024 ms 7964 KB
test_case_65 AC 5001 ms 7776 KB
test_case_66 AC 4778 ms 7944 KB
test_case_67 AC 4898 ms 7916 KB
test_case_68 AC 5098 ms 7844 KB
test_case_69 AC 4967 ms 7820 KB
test_case_7 AC 4896 ms 7904 KB
test_case_70 AC 4894 ms 7792 KB
test_case_71 AC 4874 ms 7828 KB
test_case_72 AC 5070 ms 7724 KB
test_case_73 AC 5092 ms 7812 KB
test_case_74 AC 4943 ms 7968 KB
test_case_75 AC 4833 ms 7832 KB
test_case_76 AC 5050 ms 7916 KB
test_case_77 AC 5118 ms 7796 KB
test_case_78 AC 4950 ms 7804 KB
test_case_79 AC 4803 ms 7936 KB
test_case_8 AC 4894 ms 7908 KB
test_case_80 AC 4864 ms 7800 KB
test_case_81 AC 4875 ms 7912 KB
test_case_82 AC 5094 ms 7824 KB
test_case_83 AC 4964 ms 7900 KB
test_case_84 AC 4887 ms 7792 KB
test_case_85 AC 4809 ms 7944 KB
test_case_86 AC 4872 ms 7928 KB
test_case_87 AC 4846 ms 7840 KB
test_case_88 AC 4852 ms 7900 KB
test_case_89 AC 4850 ms 7932 KB
test_case_9 AC 4937 ms 7756 KB
test_case_90 AC 4981 ms 7960 KB
test_case_91 AC 4937 ms 7972 KB
test_case_92 AC 5104 ms 7828 KB
test_case_93 AC 4753 ms 7908 KB
test_case_94 AC 4903 ms 7952 KB
test_case_95 AC 4911 ms 7952 KB
test_case_96 AC 5003 ms 7804 KB
test_case_97 AC 4893 ms 7792 KB
test_case_98 AC 5122 ms 7732 KB
test_case_99 AC 4955 ms 7948 KB
test_case_ex1 AC 4911 ms 7812 KB
test_case_ex10 AC 4852 ms 7836 KB
test_case_ex11 AC 4880 ms 7736 KB
test_case_ex12 AC 4886 ms 7832 KB
test_case_ex13 AC 4979 ms 7788 KB
test_case_ex14 AC 5046 ms 7904 KB
test_case_ex15 AC 4798 ms 7952 KB
test_case_ex16 AC 4813 ms 7940 KB
test_case_ex17 AC 4963 ms 7760 KB
test_case_ex18 AC 4988 ms 7920 KB
test_case_ex19 AC 5019 ms 7736 KB
test_case_ex2 AC 4859 ms 7912 KB
test_case_ex20 AC 5000 ms 7792 KB
test_case_ex21 AC 4822 ms 7972 KB
test_case_ex22 AC 4871 ms 7784 KB
test_case_ex23 AC 4911 ms 7868 KB
test_case_ex24 AC 4816 ms 7920 KB
test_case_ex25 AC 5101 ms 7912 KB
test_case_ex26 AC 5073 ms 7908 KB
test_case_ex27 AC 4842 ms 7960 KB
test_case_ex28 AC 4986 ms 7752 KB
test_case_ex29 AC 4786 ms 7924 KB
test_case_ex3 AC 4825 ms 7940 KB
test_case_ex30 AC 4851 ms 7752 KB
test_case_ex31 AC 5008 ms 7796 KB
test_case_ex32 AC 4986 ms 7784 KB
test_case_ex33 AC 4830 ms 7920 KB
test_case_ex34 AC 5045 ms 7828 KB
test_case_ex35 AC 4901 ms 7956 KB
test_case_ex36 AC 5036 ms 7724 KB
test_case_ex37 AC 4855 ms 7964 KB
test_case_ex38 AC 4783 ms 7844 KB
test_case_ex39 AC 5081 ms 7796 KB
test_case_ex4 AC 4932 ms 7852 KB
test_case_ex40 AC 4921 ms 7780 KB
test_case_ex5 AC 5018 ms 7836 KB
test_case_ex6 AC 4915 ms 7736 KB
test_case_ex7 AC 4968 ms 7800 KB
test_case_ex8 AC 5034 ms 7784 KB
test_case_ex9 AC 4830 ms 7916 KB