c언어 25597번 푸앙이와 러닝머신
#include int main(void) { long long int x, t; scanf("%lld %lld", &x, &t); //single 0>1, 0>4, 0>8 if(t >= x) { printf("1\n%lld 1", t-x); return 0; } if(t >= x/4 && x%4 == 0) { printf("1\n%lld 4", t-x/4); return 0; } if(t >= x/8 && x%8 == 0) { printf("1\n%lld 8", t-x/8); return 0; } //double 0>4>1, 0>8>1, 0>8>4 if(t >= x/4+x%4) { printf("2\n%lld 4\n", t-x/4-x%4); printf("%lld 1", t-x%4); return 0;..
c언어/BAEKJOON
2022. 9. 22. 15:37
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- DP
- 기하학
- find
- 1835
- 스택
- XOR
- BFS
- 정렬
- 최소 스패닝 트리
- 그리디
- PASCAL
- 그래프
- 누적 합
- 세그먼트 트리
- union
- Lazy Propagation
- java
- C++
- 오프라인 쿼리
- 최대공약수
- Krustal
- 백준
- 플로이드
- C언어
- 누적합
- 1835번
- 덱
- Segment Tree
- DFS
- 브루트포스
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함