답안 #262740

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
262740 2020-08-13T08:01:33 Z SorahISA 코알라 (APIO17_koala) C++11
15 / 100
257 ms 632 KB
#include "koala.h"
#include <bits/stdc++.h>
using namespace std;

// #define int long long
#define double long double
using pii = pair<int, int>;
template<typename T>
using prior = std::priority_queue<T, vector<T>, greater<T>>;
template<typename T>
using Prior = std::priority_queue<T>;

#define X first
#define Y second
#define ALL(x) (x).begin(), (x).end()
#define eb emplace_back
#define pb push_back
#define fastIO() ios_base::sync_with_stdio(false), cin.tie(0)

int minValue(int N, int W) {
    // TODO: Implement Subtask 1 solution here.
    // You may leave this function unmodified if you are not attempting this
    // subtask.
    
    int play[N], ret[N];
    memset(play, 0x00, sizeof(play));
    
    play[0] = 1;
    playRound(play, ret);
    
    for (int i = 0; i < N; ++i) {
        if (ret[i] <= play[i]) return i;
    }
    
    return 0;
}

int maxValue(int N, int W) {
    // TODO: Implement Subtask 2 solution here.
    // You may leave this function unmodified if you are not attempting this
    // subtask.
    return 0;
}

int greaterValue(int N, int W) {
    // TODO: Implement Subtask 3 solution here.
    // You may leave this function unmodified if you are not attempting this
    // subtask.
    
    int play[N], ret[5][N];
    memset(play, 0x00, sizeof(play));
    
    play[0] = play[1] = 1;
    playRound(play, ret[0]);
    
    play[0] = play[1] = 2;
    playRound(play, ret[1]);
    
    play[0] = play[1] = 3;
    playRound(play, ret[2]);
    
    play[0] = play[1] = 5;
    playRound(play, ret[3]);
    
    play[0] = play[1] = 8;
    playRound(play, ret[4]);
    
    for (int i = 0; i < 5; ++i) {
        if (ret[i][0] != ret[i][1]) return ret[i][0] < ret[i][1];
    }
    
    return 0;
}

void allValues(int N, int W, int *P) {
    if (W == 2*N) {
        // TODO: Implement Subtask 4 solution here.
        // You may leave this block unmodified if you are not attempting this
        // subtask.
    } else {
        // TODO: Implement Subtask 5 solution here.
        // You may leave this block unmodified if you are not attempting this
        // subtask.
    }
}
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 384 KB Output is correct
2 Correct 6 ms 384 KB Output is correct
3 Correct 6 ms 384 KB Output is correct
4 Correct 6 ms 384 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Partially correct 252 ms 384 KB Output is partially correct
2 Partially correct 228 ms 384 KB Output is partially correct
3 Partially correct 253 ms 632 KB Output is partially correct
4 Partially correct 252 ms 384 KB Output is partially correct
5 Partially correct 254 ms 384 KB Output is partially correct
6 Partially correct 251 ms 404 KB Output is partially correct
7 Partially correct 257 ms 524 KB Output is partially correct
8 Partially correct 253 ms 384 KB Output is partially correct
9 Partially correct 250 ms 384 KB Output is partially correct
10 Partially correct 254 ms 384 KB Output is partially correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -