Submission #166975

#TimeUsernameProblemLanguageResultExecution timeMemory
166975davitmargFriend (IOI14_friend)C++17
0 / 100
2 ms380 KiB
/*DavitMarg*/ #include <iostream> #include <algorithm> #include <cmath> #include <vector> #include <string> #include <cstring> #include <map> #include <unordered_map> #include <set> #include <queue> #include <iomanip> #include <bitset> #include <stack> #include <cassert> #include <iterator> #include <fstream> #define mod 1000000009ll #define LL long long #define LD long double #define MP make_pair #define PB push_back #define all(v) v.begin(), v.end() using namespace std; #ifndef death #include "friend.h" #endif int findSample(int n, int confidence[], int host[], int protocol[]) { set<int> type; for (int i = 1; i < n; i++) type.insert(protocol[i]); sort(confidence, confidence + n); int ans = confidence[n - 1]; if ((*type.begin()) == 2) for (int i = 0; i < n - 1; i++) ans += confidence[i]; return ans; } #ifdef death int main() { return 0; } #endif /* 7 5 6 7 1 2 3 4 7 5 6 7 1 2 10 4 7 2 3 4 9 6 7 1 1 2 3 4 9 6 7 */
#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...