kms0204

  • 홈
  • 태그
  • 방명록

메모아이제이션 1

[코드업]3733 : 우박수 길이 (3n+1) (large) | C

#include int arr[10000001] = { 0 }; int f(long long int n, int cnt) { if (n == 1) return cnt; if (n < 10000001 && arr[n] != 0) return cnt + arr[n]-1; if (n % 2 == 0) n /= 2; else n = n * 3 + 1; return f(n,++cnt); } int main() { int a, b,temp,max=-1,max_index; scanf("%d %d", &a, &b); for (int i = a; i max) { max = temp; max_index = i; } } printf("%d %d", max_index, max); return 0; } 사용자로부터 a, b를 ..

알고리즘/코드업 2022.04.12
이전
1
다음
더보기
프로필사진

kms0204

  • 분류 전체보기 (106)
    • 알고리즘 (15)
      • 코드업 (5)
      • 백준 (5)
      • 고급정렬 (0)
      • 기초정렬 (3)
    • Layer7 과제 (87)
      • 웹해킹 (26)
      • 리버싱 (23)
      • 포너블 (27)
    • 프로그래밍 언어 (4)
      • 파이썬 (4)

Tag

pwndbg 명령어, 키워드 필터링 우회, 알고리즘, 정렬, 브루트 포스 알고리즘, XSS filtering bypass, 많은 조건 분기, 브루트포스 알고리즘, 시간복잡도, 메모아이제이션, brute force algorithm, 라이트업, 파이썬, 구현, Greedy Algorithm, null byte injection, 리버싱, 그리디 알고리즘, 문제풀이, 널 바이트 인젝션,

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

공지사항

페이스북 트위터 플러그인

  • Facebook
  • Twitter

Archives

Calendar

«   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

방문자수Total

  • Today :
  • Yesterday :

Copyright © Kakao Corp. All rights reserved.

티스토리툴바