Submission #1200796

#TimeUsernameProblemLanguageResultExecution timeMemory
1200796asli_bgKoala Game (APIO17_koala)C++20
4 / 100
2 ms412 KiB
#include <bits/stdc++.h> using namespace std; #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; #include "koala.h" //#define int long long typedef pair<int,int> pii; typedef vector<int> vi; typedef vector<pii> vii; typedef vector<bool> vb; typedef long long ll; typedef pair<ll,ll> pll; typedef vector<pll> vll; typedef tree<pii,null_type,less<pii>,rb_tree_tag, tree_order_statistics_node_update> oset; #define fi first #define se second #define pb push_back #define pf push_front #define mid (l+r)/2 #define all(x) x.begin(),x.end() #define FOR(i,a) for(int i=0;i<(a);i++) #define FORE(i,a,b) for(int i=(a);i<(b);i++) #define cont(x) for(auto el:x) cout<<el<<' ';cout<<endl; #define contp(x) for(auto el:x) cout<<el.fi<<'-'<<el.se<<' ';cout<<endl; #define sp <<" "<< #define DEBUG(x) cout<<(#x) sp x<<endl #define carp(a,b) (((a%MOD)*(b%MOD))%MOD) #define topla(a,b) (((a%MOD)+(b%MOD))%MOD) const ll INF=1e18; const int MAXN=105; const int MAXK=1e3+3;; const int MOD=1e9+7; int b[MAXN], r[MAXN]; int minValue(int n, int w) { // TODO: Implement Subtask 1 solution here. // You may leave this function unmodified if you are not attempting this // subtask. FOR(i,n) b[i]=0; b[0]=1; playRound(b,r); FOR(i,n){ if(b[i]>=r[i]){ //koala bu parçayı almamış if(b[i]==0){ //0 olmasına rağmen almamışsa bu = 1 return i; } } } FOR(i,n) b[i]=0; b[1]=1; playRound(b,r); if(r[0]==0) return 0; int deg=0; FOR(i,n){ if(b[i]>=r[i]){ deg=i; } } return deg; } int maxValue(int N, int W) { // 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 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...