Submission #526351

#TimeUsernameProblemLanguageResultExecution timeMemory
526351model_codeLet's Win the Election (JOI22_ho_t3)C++17
5 / 100
1 ms440 KiB
#include <iostream> #include <algorithm> using namespace std; int N, K; int A[509], B[509]; int main() { // Step #1. Input cin >> N >> K; for (int i = 0; i < N; i++) { cin >> A[i] >> B[i]; } // Step #2. Sorting sort(A, A + N); // Step #3. Find Answer int Answer = 0; for (int i = 0; i < K; i++) { Answer += A[i]; } cout << Answer << endl; return 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...
#Verdict Execution timeMemoryGrader output
Fetching results...