Submission #768161

#TimeUsernameProblemLanguageResultExecution timeMemory
768161caganyanmazBoxes with souvenirs (IOI15_boxes)C++17
0 / 100
1 ms296 KiB
#include <bits/stdc++.h> #define int int64_t using namespace std; map<int, int> mleft, mright; int mid; void safe_insert(map<int, int>& m, int val) { if (m.find(val) == m.end()) m[val] = 0; m[val]++; } int delivery(int32_t N, int32_t K, int32_t L, int32_t p[]) { for (int i = 0; i < N; i++) if (p[i] > L / 2) safe_insert(mright, p[i]); else if (p[i] < L / 2) safe_insert(mleft, p[i]); else mid++; return 0; }

Compilation message (stderr)

boxes.cpp: In function 'int64_t delivery(int32_t, int32_t, int32_t, int32_t*)':
boxes.cpp:17:33: warning: unused parameter 'K' [-Wunused-parameter]
   17 | int delivery(int32_t N, int32_t K, int32_t L, int32_t p[])
      |                         ~~~~~~~~^
#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...