| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1342337 | javkhlantogs | 코알라 (APIO17_koala) | C++20 | 8 ms | 452 KiB |
#include<bits/stdc++.h>
#include "koala.h"
#define ll long long
using namespace std;
int i,j,k,q;
int b[100],r[100];
int minValue(int n,int w){
for(i=0 ; i<n ; i++) b[i]=0;
b[0]=1;
playRound(b,r);
for(i=0 ; i<n ; i++){
if(r[i]<=b[i]) return i;
}
}
int maxValue(int n,int w){
for(i=0 ; i<n ; i++) b[i]=1;
playRound(b,r);
while(1){
ll cnt=0;
for(i=0 ; i<n ; i++) if(r[i]>b[i] and b[i]!=0) cnt++;
if(cnt==1) for(i=0 ; i<n ; i++) if(r[i]>b[i] and b[i]!=0) return i;
for(i=0 ; i<n ; i++){
if(r[i]>b[i] and b[i]!=0) b[i]=100/cnt;
else b[i]=0;
}
playRound(b,r);
}
}
int greaterValue(int n,int w){
int ok=0,ng=7;
for(i=0 ; i<n ; i++) b[i]=0;
while(ng-ok>1){
int mid=(ng+ok)/2;
b[0]=b[1]=mid;
playRound(b,r);
if(r[1]<=b[1] and r[0]<=b[0]) ng=mid;
else if(r[0]>b[0] and r[1]>b[1]) ok=mid;
else{
if(r[0]<r[1]) return 1;
else return 0;
}
}
}
void allValues(int n,int w,int *p){
}컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
