코딩공부/Softeer 24

[Softeer/C++] [21년 재직자 대회 예선] 회의실 예약

https://softeer.ai/practice/6266 Softeer - 현대자동차그룹 SW인재확보플랫폼 softeer.ai#include#include#include#include#includeusing namespace std;string formatString(int time){ string s = to_string(time); return s.size() > n >> m; string in; int start, end; vector roomName; map> room; for (int i = 0; i > in; roomName.push_back(in); room[in] = vector(10); } for (int i = 0; i > in >> start >> end; for (int i ..

[Softeer/C++] 장애물인식 프로그램

https://softeer.ai/practice/6282 Softeer - 현대자동차그룹 SW인재확보플랫폼 softeer.ai 소스코드 #include #include #include #include #include using namespace std; struct Pos { int y; int x; }; int _dx[4] = { 0,0,-1,1 }; int _dy[4] = { 1,-1,0,0 }; int _visit[26][26]; int _mask; int _n; string _list[26]; int BFS(Pos pos) { queue q; q.push(pos); _visit[pos.y][pos.x] = _mask; int count = 1; while (q.empty() == false) {..

[Softeer/C++] [21년 재직자 대회 예선] 전광판

https://softeer.ai/practice/6268 Softeer - 현대자동차그룹 SW인재확보플랫폼 softeer.ai 소스코드 #include #include #include #include #include using namespace std; int main(int argc, char** argv) { map m; m.insert({ "0",{1,1,1,0,1,1,1} }); m.insert({ "1",{0,0,1,0,0,1,0} }); m.insert({ "2",{1,0,1,1,1,0,1} }); m.insert({ "3",{1,0,1,1,0,1,1} }); m.insert({ "4",{0,1,1,1,0,1,0} }); m.insert({ "5",{1,1,0,1,0,1,1} }); m.in..

[Softeer/C++] 진정한 효도

https://softeer.ai/practice/7374 Softeer - 현대자동차그룹 SW인재확보플랫폼 softeer.ai 소스코드 #include #include using namespace std; int minmin(int a, int b, int c) { int arr[3] = { a, b, c }; sort(arr, arr + 3); int middle = arr[1]; int result = 0; for (int i = 0; i < 3; i++) { if (arr[i] != middle) result = arr[i] - middle; } return abs(result); } int main(int argc, char** argv) { int in; int arr[3][3]; for (i..