Submission #1015432

#TimeUsernameProblemLanguageResultExecution timeMemory
1015432parsadox2Friend (IOI14_friend)C++17
0 / 100
1 ms348 KiB
#include "friend.h" #include <bits/stdc++.h> using namespace std; const int N = 1e5 + 10; int n , ar[N] , col[N]; int findSample(int nn,int confidence[],int host[],int protocol[]){ n = nn; for(int i = 0 ; i < n ; i++) ar[i] = confidence[i]; for(int i = 1 ; i < n ; i++) { if(protocol[i] == 0) col[i] = (col[host[i]] ^ 1); else col[i] = col[host[i]]; } int cnt = 0; for(int i = 0 ; i < n ; i++) cnt += col[i]; return max(cnt , n - cnt); }
#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...