Submission #1189162

#TimeUsernameProblemLanguageResultExecution timeMemory
1189162MalixKoala Game (APIO17_koala)C++20
19 / 100
8 ms432 KiB
#include "koala.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<vi> vii; typedef pair<int,int> pi; typedef vector<pi> pii; typedef tuple<ll,ll,ll> ti; typedef vector<ll> li; typedef vector<li> lii; #define REP(i,a,b) for(int i=a;i<b;i++) #define F first #define S second #define PB push_back #define LSOne(s) ((s)&(-s)) ll INF=1000000000000000010; int inf=1e9+10; ll M=1e9+7; int minValue(int N, int W) { int a[100],b[100]; REP(i,1,100)a[i]=0; a[0]=1; playRound(a,b); int ans=0; REP(i,1,100)if(b[i]==0)ans=i; return ans; } int maxValue(int N, int W) { int a[100],b[100]; REP(i,0,100)a[i]=1; playRound(a,b); memset(a,0,sizeof(a)); REP(i,0,100)if(b[i]==2)a[i]=2; playRound(a,b); memset(a,0,sizeof(a)); REP(i,0,100)if(b[i]==3)a[i]=4; playRound(a,b); memset(a,0,sizeof(a)); REP(i,0,100)if(b[i]==5)a[i]=11; playRound(a,b); REP(i,0,100)if(b[i]==12)return i; return 0; } int greaterValue(int N, int W) { int a[100],b[100]; int l=1,r=9; while(l!=r){ int m=(l+r)/2; memset(a,0,sizeof(a)); a[0]=m;a[1]=m; playRound(a,b); if(b[0]>b[1])return 0; if(b[1]<b[0])return 1; if(b[0]>m)l=m+1; else r=m; } 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 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...