답안 #904953

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
904953 2024-01-12T11:50:59 Z Gabriel 코알라 (APIO17_koala) C++17
0 / 100
1 ms 596 KB
#include "koala.h"
#include "bits/stdc++.h"
using namespace std;
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 B[N];
    int R[N];
    memset(B, 0, sizeof(B));
    memset(R, 0, sizeof(R));
    B[0] = 1;
    playRound(B, R);
    for(int i = 0; i < N; i++) cout<<R[i]<<" ";
    cout<<"\n";
    int Respuesta = -1;
    for(int i = 0; i < N; i++){
        if(R[i] == 0){
            Respuesta = i;
            break;
        }
    }
    if(Respuesta == -1) Respuesta = 0;*/
    return /*Respuesta*/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.int B[N];
    /*int B[N];
    int R[N];
    memset(B, 0, sizeof(B));
    memset(R, 0, sizeof(R));
    for(int i = 0; i < N; i++) B[i] = 1;
    playRound(B, R);
    bool Seguir = 1;
    int Respuesta = 0;
    int Actual = 3;
    while(Seguir){
        for(int i = 0; i < N; i++) B[i] = R[i];
        playRound(B, R);
        cout<<Actual<<"\n";
        for(int i = 0; i < N; i++) cout<<R[i]<<" ";
        cout<<"\n";
        bool Mantener = 0;
        for(int i = 0; i < N; i++){
            if(Respuesta != 0) Mantener = 1;
            if(R[i] == Actual) Respuesta = i + 1;
        }
        if(!Mantener) Seguir = 0;
        Actual++;
    }*/
    return /*Respuesta*/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 B[N];
    int R[N];
    memset(B, 0, sizeof(B));
    memset(R, 0, sizeof(R));
    B[0] = 1;
    B[1] = 1;
    playRound(B, R);
    for(int i = 0; i < N; i++) cout<<R[i]<<" ";
    cout<<"\n";
    if(R[0] > R[1]) return 1;
    else 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 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 596 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -