#include "koala.h"
#include "bits/stdc++.h"
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 = 0;
for(int i = 0; i < N; i++){
if(R[i] == 0){
Respuesta = i + 1;
break;
}
}
if(Respuesta == 0) Respuesta = 1;
return Respuesta;
}
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.
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.
}
}
/*1 1
100 100
2 3 4 5 6 7 8 9 10
11 12 13 14 15 16 17 18 19 20
21 22 23 24 25 26 27 28 29 30
31 32 33 34 35 36 37 38 39 40
41 42 43 44 45 1 46 47 48 49 50
51 52 53 54 55 56 57 58 59 60
61 62 63 64 65 66 67 68 69 70
71 72 73 74 75 76 77 78 79 80
81 82 83 84 85 86 87 88 89 90
91 92 93 94 95 96 97 98 99 100
1 1
10 10
1 2 3 4 5 6 7 8 9 10
1 1
11 11
2 3 4 5 6 7 8 1 9 10 11
2 1
100 100
2 3 4 5 6 7 8 9 10
11 12 13 14 15 16 17 18 19 20
21 22 23 24 25 26 27 28 29 30
31 32 33 34 35 36 37 38 39 40
41 42 43 44 45 46 47 48 49 50
51 52 53 54 55 56 57 58 59 60
61 62 63 64 65 66 67 68 69 70
71 72 73 74 75 76 77 78 79 80
81 82 83 84 85 86 87 88 89 90
91 92 93 94 95 96 97 98 99 100 1*/
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
832 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |