Submission #54708

#TimeUsernameProblemLanguageResultExecution timeMemory
54708SpaimaCarpatilorFriend (IOI14_friend)C++17
0 / 100
2 ms1008 KiB
#include "friend.h" #include<bits/stdc++.h> using namespace std; int findSample (int N, int confidence[], int host[], int protocol[]) { int ans = 0; for (int i=1; i<N; i++) { int x = host[i], y = i, curr = min (confidence[x], confidence[y]); ans += curr; confidence[x] -= curr; confidence[y] -= curr; } for (int i=0; i<N; i++) ans += confidence[i]; return ans; }
#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...