본문 바로가기

Easy-So-Easy

검색하기
Easy-So-Easy
프로필사진 섭_민

  • Easy-So-Easy (26)
    • Rust (3)
    • BaekJoon (21)
    • Flutter (2)
    • Writing (0)
Guestbook
반응형
Notice
Recent Posts
Recent Comments
Link
  • 코드 업로드
  • 문제 2
  • 문제 3
  • 문제 4
  • 문제 5
  • 문제 6
«   2025/05   »
일 월 화 수 목 금 토
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
Tags
  • 10872
  • 13460
  • 러스트란 #cargo
  • C++
  • 14500
  • 13458
  • 14501
  • 15651
  • 테트로미노
  • rust설치
  • 백준
  • 분해합
  • 연산자 끼워넣기 성공
  • C
  • rustup
  • 14891
  • 15650
  • 3190
  • 백트래킹
  • 15652
  • 14888
  • 문제풀이
  • 15649
  • 팰린드롬수
  • 1259
  • 14503
  • 2798
  • 9663
  • 14890
  • 15683
more
Archives
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록14891 (1)

Easy-So-Easy

[백준] 14891번 톱니바퀴 - C/C++ (Easy 풀이)

백준 14891 문제(Problem) 풀이 & 전체 코드(Solution & Code) #include using namespace std; int res, cnt=1; char wheels[5][9]; // 톱니바퀴를 돌리는 함수 void spin(int w, int dir) { char temp; if(dir==1) { // 오른쪽으로 spin temp=wheels[w][8]; for(int i=8; i>1; i--) wheels[w][i]=wheels[w][i-1]; wheels[w][1]=temp; } else { // 왼쪽으로 spin temp=wheels[w][1]; for(int i=1; i4) return; // 기저조건: 오른쪽에 톱니바퀴가 없을 때 if(wheels[w][3] != wh..

BaekJoon 2023. 7. 13. 14:53
이전 Prev 1 Next 다음

Blog is powered by kakao / Designed by Tistory

티스토리툴바