본문 바로가기

on my way

검색하기
on my way
프로필사진 wingbeat

  • 분류 전체보기 (183)
    • experiences (6)
      • SNOW Internship (0)
      • GDSC Sookmyung (0)
      • Hackathon||Project (1)
      • DevLog (5)
    • Computer Science (10)
      • JAVA (6)
      • HTML CSS JS (2)
      • Spring (7)
      • Database (6)
      • React (12)
      • CICD (10)
      • IT MATH (5)
      • Graphics (1)
    • algorithm (98)
      • CodingTest (26)
      • SQL (17)
      • Python (36)
      • Java (0)
      • C++ (19)
    • etc (10)
      • Git (1)
Guestbook
반응형
Notice
Recent Posts
Recent Comments
Link
«   2025/08   »
일 월 화 수 목 금 토
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
  • gitbash
  • git
  • GitProject
  • Branch
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록algorithm/C++ (19)

on my way

[GDSC Week0-1] 백준 4358번:: 생태학 (C++)

* 문제를 풀기 위해 생각한 아이디어 Map을 사용해서 종의 이름과, 횟수를 넣는 것으로 이해했다. (또한 C++에서 Map은 자동으로 오름차순으로 정렬되고 중복이 안된다는 점) main에서는 입력을 받는 부분 -> 반복문으로 찾기로 진행 * 코드 #include #include #include #include using namespace std; int main(int argc, char const *argv[]){ ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); map dict; string s; int cnt=0; //전체 입력횟수 // 입력받는 부분 while (getline(cin, s)) { dict[s]++; //종별 입력횟수 cnt..

algorithm/C++ 2021. 9. 26. 16:08
이전 Prev 1 2 3 4 Next 다음

Blog is powered by kakao / Designed by Tistory

티스토리툴바