east-wind 님의 블로그

  • 홈
  • 태그
  • 방명록

Algorithm_Java/Implementation 1

백준 1041 : 주사위

최솟값 구하는건데 최댓값 구하는걸로 문제 잘못봤다. N=1일 때의 반례를 생각하지 않았는데 쉽게 찾았다.import java.io.*;import java.util.*;public class Main { static long N;//1 (N-2)*4*(N-1)+(N-2)^2 = (N-2)(5N-6) //2개면만 보임 -> (N-1)*4+(N-2)*4 = 8N-12 //3개면만 보임 -> 4 dice = new long[6]; StringTokenizer st = new StringTokenizer(br.readLine()); for(int i = 0; i

Algorithm_Java/Implementation 2025.03.29
이전
1
다음
더보기
프로필사진

east-wind 님의 블로그

east-wind 님의 블로그 입니다.

  • 분류 전체보기 (228)
    • Algorithm_SQL (11)
    • Algorithm_Java (19)
      • Graph Search (2)
      • Dynamic Programming (1)
      • Greedy Algorithm (2)
      • String (0)
      • Math (2)
      • Implementation (1)
      • Data structure (2)
      • Search (0)
      • Brute Force (3)
      • ETC (4)
    • Algorithm_C++ (152)
      • Graph Search (26)
      • Dynamic Programming (18)
      • Greedy Algorithm (11)
      • String (5)
      • Math (21)
      • Implementation (25)
      • Data Structure (6)
      • Search (9)
      • Brute Force (4)
      • ETC (27)
    • CS (21)
      • Network (3)
      • CloudComputing (0)
      • DB (3)
      • SoftwareEngineering (6)
      • Web (1)
      • OS (2)
      • Security (2)
      • ETC (4)
      • ComputerArchitecture (0)
    • ML (3)
    • Project (14)
      • Spring (13)
      • FastAPI (1)
    • Diary (0)
      • 2024 (0)
      • 2025 (0)
    • 빅분기 (3)
    • 면접 (0)

Tag

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

공지사항

페이스북 트위터 플러그인

  • Facebook
  • Twitter

Archives

Calendar

«   2025/12   »
일 월 화 수 목 금 토
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.

티스토리툴바