제출 #56104

#제출 시각아이디문제언어결과실행 시간메모리
56104zetapi친구 (IOI14_friend)C++14
16 / 100
5 ms928 KiB
#include "friend.h" #include "bits/stdc++.h" using namespace std; #define pb push_back #define mp make_pair #define ll long long #define itr ::iterator const int MAX=1e5; int findSample(int n,int confidence[],int host[],int protocol[]) { int res=0; for(int A=n-1;A>0;A--) { if(protocol[A]==0) { res+=confidence[A]; confidence[host[A]]-=confidence[A]; } else if(protocol[A]==1) confidence[host[A]]+=max(0,confidence[A]); else confidence[host[A]]=max(confidence[host[A]],confidence[A]); } return res+max(0,confidence[0]); }
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...