WookjeBlog
    • 블로그
    • 소개
    • 태그
    • 수업/강의
    • 라이브러리
    Main
    • Share to Facebook

    Google Code Jam

    All Posts in google-code-jam

    • [BOJ] 14815 : Fresh Chocolate (Small)

      14815 : Fresh Chocolate (Small) 풀이 룰루랄라 코드 #include <cstdio> #include <algorithm> using namespace std; int main() { int tc, t, n, p, c[5]; scanf("%d", &tc); for (t = 1; t <= tc; t++) { c[0] = c[1] = c[2] = c[3] = 0; scanf("%d %d", &n, &p); for (int i = 0, a; i < n; i++) scanf("%d", &a), c[a % p]++; int r = c[0]; if (p == 2) { r += (c[1]...

      boj google-code-jam math

      wookje.kwon's profile image

      wookje.kwon

      2018-03-30 17:05

    • [BOJ] 14816 : Fresh Chocolate (Large)

      14816 : Fresh Chocolate (Large) 풀이 뭔가 제너럴한 규칙을 찾으려고 했는데 잘 모르겠당 p가 2~4밖에 안 되므로 그냥 경우를 나눠서 잘 따져주자. 코드 #include <cstdio> #include <algorithm> using namespace std; int main() { int tc, t, n, p, c[5]; scanf("%d", &tc); for (t = 1; t <= tc; t++) { c[0] = c[1] = c[2] = c[3] = 0; scanf("%d %d", &n, &p); for (int i = 0, a; i < n; i++) scanf("%d", &a),...

      boj google-code-jam math

      wookje.kwon's profile image

      wookje.kwon

      2018-03-30 17:04

    • github
    • facebook
    • rss

    Copyright © Wookje Kwon. All rights reserved.