[Level 1][C++] 모의고사
#include #include #include using namespace std;vector solution(vector answers) { vector> students(3); students[0] = {1,2,3,4,5}; students[1] = {2,1,2,3,2,4,2,5}; students[2] = {3,3,1,1,2,2,4,4,5,5}; vector counts = {0, 0, 0}; for(int j=0; j copyCounts = counts; sort(counts.begin(), counts.end(), greater()); vector answer; for(int i=0; i
[Level 1][C++] 2016년
#include #include #include using namespace std;void inputDate(int& a, int& b){ while (1) { try { cout > a; if (a 12) throw 0; cout > b; if (b 31) throw 0; break; } catch (int expn) { cout month = { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31,..