Submission #738866

# Submission time Handle Problem Language Result Execution time Memory
738866 2023-05-09T14:46:25 Z myrcella Koala Game (APIO17_koala) C++17
19 / 100
12 ms 320 KB
//by szh
#include<bits/stdc++.h>
using namespace std;

#define fi first
#define se second
#define pii pair<int,int>
#define pll pair<long long,long long>
#define pb push_back
#define debug(x) cerr<<#x<<"="<<x<<endl
#define pq priority_queue
#define inf 0x3f
#define rep(i,a,b) for (int i=a;i<(b);i++)
#define MP make_pair
#define SZ(x) (int(x.size()))
#define ll long long
#define mod 1000000007
#define ALL(x) x.begin(),x.end()
void inc(int &a,int b) {a=(a+b)%mod;}
void dec(int &a,int b) {a=(a-b+mod)%mod;}
int lowbit(int x) {return x&(-x);}
ll p0w(ll base,ll p) {ll ret=1;while(p>0){if (p%2ll==1ll) ret=ret*base%mod;base=base*base%mod;p/=2ll;}return ret;}

#include "koala.h"

int minValue(int N, int W) {
	int b[111];
	b[0] = 1;
	rep(i,1,N) b[i] = 0;
	int a[111];
	playRound(b,a);
	rep(i,0,N) if (a[i]<=b[i]) return i;
	assert(1==2);
    // TODO: Implement Subtask 1 solution here.
    // You may leave this function unmodified if you are not attempting this
    // subtask.
}

int maxValue(int N, int W) {
	int n=N;
	int a[111],b[111];
	rep(i,0,n) a[i] = 1;
	playRound(a,b);
	int a2[111],b2[111];
	rep(i,0,n) {
		if (b[i]<=a[i]) a2[i] = 0;
		else a2[i] = 2;
	}
	playRound(a2,b2);
	int a3[111],b3[111];
	rep(i,0,n) {
		if (a2[i]==0 or b2[i]<=a2[i]) a3[i] = 0;
		else a3[i] = 4;
	}
	playRound(a3,b3);
	int a4[111],b4[111];
	rep(i,0,n) {
		if (a3[i]==0 or b3[i]<=a3[i]) a4[i] = 0;
		else a4[i] = 11;
	}
	playRound(a4,b4);
	rep(i,0,n) if (a4[i]!=0 and b4[i]>a4[i]) return i;
	assert(1==2);
    // TODO: Implement Subtask 2 solution here.
    // You may leave this function unmodified if you are not attempting this
    // subtask.
    return 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.
    }
}
# Verdict Execution time Memory Grader output
1 Correct 4 ms 208 KB Output is correct
2 Correct 4 ms 208 KB Output is correct
3 Correct 4 ms 208 KB Output is correct
4 Correct 4 ms 208 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 11 ms 316 KB Output is correct
2 Correct 11 ms 320 KB Output is correct
3 Correct 12 ms 208 KB Output is correct
4 Correct 11 ms 208 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 208 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 208 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -