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
- C++
- 덱
- 오프라인 쿼리
- 최소 스패닝 트리
- BFS
- 그래프
- 최대공약수
- 브루트포스
- DP
- PASCAL
- 정렬
- Segment Tree
- 누적 합
- 백준
- 세그먼트 트리
- 1835번
- 스택
- 1835
- Lazy Propagation
- C언어
- DFS
- java
- XOR
- find
- Krustal
- 플로이드
- 누적합
- 기하학
- union
- 그리디
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함