제출 #839532

#제출 시각아이디문제언어결과실행 시간메모리
839532model_codeA Plus B (IOI23_aplusb)C++17
30 / 100
1085 ms24796 KiB
// correct/solution-subtask2.cpp #include "aplusb.h" #include <vector> std::vector<int> smallest_sums(int N, std::vector<int> A, std::vector<int> B) { std::vector<int> C(N*N); for(int i=0; i<N; i++){ for(int j=0; j<N; j++) C[i*N+j] = A[i]+B[j]; } std::vector<int> ans(N); for(int i=0; i<N; i++) { int id = 0; for(int j=0; j<N*N; j++){ if (C[j] <= C[id]) id = j; } ans[i] = C[id]; C[id] = A[N-1] + B[N-1]; } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...