코딩공부 216

[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..

[Softeer/C++]Level2 [한양대 HCPC 2023] X marks the Spot

https://softeer.ai/practice/7703/history?questionType=ALGORITHM Softeer - 현대자동차그룹 SW인재확보플랫폼 softeer.ai 소스코드 #include using namespace std; int main() { int n; cin >> n; string a, b; string result; for (int i = 0; i > a >> b; for (int i = 0; i < a.size(); i++) { a[i] = toupper(a[i]); } size_t idx = a.find("X"); string temp = b.substr(idx, 1); result+= toupper(temp[0]); } cout

[Softeer/C++]Level1 위험한 효도

https://softeer.ai/practice/7368 Softeer - 현대자동차그룹 SW인재확보플랫폼 softeer.ai 소스코드 #include #include #include #include #include using namespace std; int main(int argc, char** argv) { int a,b,d; cin >> a>>b>>d; int destint = d * 2; int curdir =0; int time =0; int temp = 0; bool isFront = false; while (destint != curdir) { if (isFront == false) { for (int i = 0; i < a; i++) { time += 1; curdir += 1; if ..