Submission #745252

#TimeUsernameProblemLanguageResultExecution timeMemory
745252rominanafuFriend (IOI14_friend)C++11
0 / 100
1 ms316 KiB
#include "friend.h" #include <bits/stdc++.h> #define pii pair<int,int> using namespace std; pii c[1005]; int findSample(int n, int confidence[], int host[], int protocol[]) { int max_con = 0; for(int i=n-1; i>0; i--) { c[i].first += confidence[i]; c[host[i]].first = max(c[host[i]].first, c[i].second); c[host[i]].second = max(c[host[i]].second, c[i].first); } return max(c[0].first, c[0].second); /// return maximum confidence possible }

Compilation message (stderr)

friend.cpp: In function 'int findSample(int, int*, int*, int*)':
friend.cpp:10:9: warning: unused variable 'max_con' [-Wunused-variable]
   10 |     int max_con = 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...