답안 #1041371

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1041371 2024-08-02T00:11:08 Z Edu175 코알라 (APIO17_koala) C++17
14 / 100
68 ms 508 KB
#include "koala.h"
#include <bits/stdc++.h>
#define pb push_back
#define fst first
#define snd second
#define fore(i,a,b) for(ll i=a,mxcont=b;i<mxcont;i++)
#define SZ(x) ((int)x.size())
#define ALL(x) x.begin(),x.end()
#define mset(a,v) memset((a),(v),sizeof(a))
#define imp(v) {for(auto jfhg:v)cout<<jfhg;cout<<"\n";}
using namespace std;
typedef int ll;
typedef pair<ll,ll> ii;
random_device rd;
mt19937 rng(rd());

int minValue(int N, int W) {
    return N+W;
}

int maxValue(int N, int W) {
    return N+W;
}

int greaterValue(int n, int w) {
    ll res=-1;
    auto qan=[&](ll x)->int{
        // cout<<"qan "<<x<<"\n";
        vector<ll>B(n),R(n);
        B[0]=B[1]=x;
        playRound(B.data(),R.data());
        // imp(B); imp(R);
        vector<ll>s(n);
        fore(i,0,n)s[i]=R[i]>B[i];
        // imp(s);
        if(s[0]!=s[1])res=s[0]<s[1];
        return s[0]+s[1];
    };
    ll l=1,r=8;
    while(l<=r){
        ll m=(l+r)/2;
        if(qan(m)==2)l=m+1;
        else r=m-1;
    }
    return res;
}

void allValues(int N, int W, int *P) {
    assert(P[0]);
    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 Partially correct 67 ms 344 KB Output is partially correct
2 Partially correct 64 ms 344 KB Output is partially correct
3 Partially correct 68 ms 344 KB Output is partially correct
4 Partially correct 66 ms 344 KB Output is partially correct
5 Partially correct 65 ms 344 KB Output is partially correct
6 Partially correct 66 ms 344 KB Output is partially correct
7 Partially correct 66 ms 508 KB Output is partially correct
8 Partially correct 67 ms 468 KB Output is partially correct
9 Partially correct 64 ms 344 KB Output is partially correct
10 Partially correct 66 ms 344 KB Output is partially correct
# 결과 실행 시간 메모리 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 -