제출 #1179793

#제출 시각아이디문제언어결과실행 시간메모리
1179793NValchanovKoala Game (APIO17_koala)C++20
19 / 100
8 ms432 KiB
#include "koala.h" #include <bits/stdc++.h> using namespace std; int minValue(int n, int w) { int b[n]; int r[n]; for(int i = 1; i < n; i++) { b[i] = 0; } b[0] = 1; playRound(b, r); if(r[0] <= 1) return 0; for(int i = 1; i < n; i++) { if(r[i] == 0) return i; } return 0; } int maxValue(int n, int w) { int b[n]; int r[n]; vector < int > maxset; for(int i = 0; i < n; i++) { maxset.push_back(i); } while(maxset.size() > 1) { int sz = maxset.size(); int by = w / sz; for(int i = 0; i < n; i++) { b[i] = 0; } for(int idx : maxset) { b[idx] = by; } playRound(b, r); maxset.clear(); for(int i = 0; i < n; i++) { if(r[i] > by) maxset.push_back(i); } } return maxset[0]; return 0; } int greaterValue(int n, int w) { return 0; } void allValues(int n, int w, int *p) { }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...