Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- TCP/IP
- 운영체제
- HTTP
- 스프링 입문
- C#
- 토마토
- Four Squares
- 제프리리처
- FIFO paging
- 김영한
- 에러핸들링
- redis
- inflearn
- 2475번
- C++
- n타일링2
- 스프링 핵심 원리
- BOJ
- Operating System
- 이펙티브코틀린
- OS
- 열혈 TCP/IP 소켓 프로그래밍
- 윤성우 저자
- Operating System.
- 10026번
- 우아한레디스
- 우아한 테크 세미나
- Window-Via-c/c++
- Spring
- 열혈 tcp/ip 프로그래밍
Archives
- Today
- Total
나의 브을로오그으
[c++] 2775번 : 부녀 회장이 될테야 본문
https://www.acmicpc.net/problem/2775
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main()
{
ios::sync_with_stdio(false);
cin.tie(NULL);
int k = 0;
int n = 0;
int testCase = 0;
cin >> testCase;
int arr[15][15] = { 0, };
for (int i = 1; i < 15; ++i)
{
arr[0][i] = i;
}
for (int floor = 1; floor < 15; ++floor)
{
for (int no = 1; no < 15; ++no)
{
arr[floor][no] = arr[floor - 1][no] + arr[floor][no - 1];
}
}
for (int i = 0; i < testCase; ++i)
{
cin >> k >> n;
cout << arr[k][n] << '\n';
}
return 0;
}
'알고리즘 > BaekJoon' 카테고리의 다른 글
[c++] 2805번 : 나무 자르기 (0) | 2022.04.29 |
---|---|
[c++] 2798번 : 블랙잭 (0) | 2022.04.28 |
[c++] 2751번 : 수 정렬하기 2 (0) | 2022.04.27 |
[c++] 2609번 : 최대공약수, 최소공배수 (0) | 2022.04.27 |
[c++] 2292번 : 벌집 (0) | 2022.04.15 |