백준/실버 (285) 썸네일형 리스트형 [백준 28293번] 자릿수 (C++) 문제링크 : https://www.acmicpc.net/problem/28293 28293번: 자릿수 첫째 줄에 정수 $a$, $b$가 공백으로 구분되어 주어진다. $(1 \le a \le 10\,000; 1 \le b \le 10\,000\,000)$ $a^b$의 자릿수가 $10\,000$ 또는 $9,999$로 시작하지 않는 입력만 주어진다. www.acmicpc.net #include using namespace std; typedef long long ll; typedef pair pii; const int MAX = 987654321; int main() { ios_base::sync_with_stdio(0); cin.tie(0); int a, b; cin >> a >> b; ll result =.. [백준 28279번] 덱 2 (C++) 문제링크 : https://www.acmicpc.net/problem/28279 28279번: 덱 2 첫째 줄에 명령의 수 N이 주어진다. (1 ≤ N ≤ 1,000,000) 둘째 줄부터 N개 줄에 명령이 하나씩 주어진다. 출력을 요구하는 명령은 하나 이상 주어진다. www.acmicpc.net #include using namespace std; typedef long long ll; typedef pair pii; const int MAX = 987654321; dequedq; int main() { ios_base::sync_with_stdio(0); cin.tie(0); int N; cin >> N; while(N--) { int num, x; cin >> num; switch(num) { cas.. [백준 20529번] 가장 가까운 세 사람의 심리적 거리 (C++) 문제링크 : https://www.acmicpc.net/problem/20529 20529번: 가장 가까운 세 사람의 심리적 거리 각 테스트 케이스에 대한 답을 정수 형태로 한 줄에 하나씩 출력한다. www.acmicpc.net #include using namespace std; typedef long long ll; typedef pair pii; const int MAX = 987654321; int N; vectorv; int cal(string s1, string s2, string s3) //3개 문자열 비교 { int result = 0; for(int i=0; i32) return 0; int result = MAX; for(int i=0; i>N; v.resize(N); for(int i.. [백준 14940번] 쉬운 최단거리 (C++) 문제링크 : https://www.acmicpc.net/problem/14940 14940번: 쉬운 최단거리 지도의 크기 n과 m이 주어진다. n은 세로의 크기, m은 가로의 크기다.(2 ≤ n ≤ 1000, 2 ≤ m ≤ 1000) 다음 n개의 줄에 m개의 숫자가 주어진다. 0은 갈 수 없는 땅이고 1은 갈 수 있는 땅, 2는 목표지점이 www.acmicpc.net #include using namespace std; typedef long long ll; typedef pair pii; const int MAX = 987654321; int N, M; int arr[1001][1001]; int visited[1001][1001]; int dx[] = {1, -1, 0, 0}; int dy[] = {.. [백준 18110번] solved.ac (C++) 문제링크 : https://www.acmicpc.net/problem/18110 18110번: solved.ac 5명의 15%는 0.75명으로, 이를 반올림하면 1명이다. 따라서 solved.ac는 가장 높은 난이도 의견과 가장 낮은 난이도 의견을 하나씩 제외하고, {5, 5, 7}에 대한 평균으로 문제 난이도를 결정한다. www.acmicpc.net #include using namespace std; typedef long long ll; typedef pair pii; const int MAX = 987654321; int arr[300003]; int main() { ios_base::sync_with_stdio(0); cin.tie(0); int N; cin >> N; for(int i=0; i.. [백준 28217번] 두 정삼각형 (C++) 문제링크 : https://www.acmicpc.net/problem/28217 28217번: 두 정삼각형 첫 번째 줄에는 $1$개의 수를, 두 번째 줄에는 $2$개의 수를, $\dots$, $N$번째 줄에는 $N$개의 수를 아래 그림과 같이 배치한 정삼각형 $A$, $B$가 주어진다. 각 위치에 있는 수는 $0$ 또는 $1$이다. 당신은 www.acmicpc.net #include using namespace std; typedef long long ll; typedef pair pii; const int MAX = 987654321; int N, M, result = MAX; int arr1[11][11], arr2[11][11]; void check() { int cnt1 = 0, cnt2= 0; .. [백준 14709번] 여우 사인 (C++) 문제링크 : https://www.acmicpc.net/problem/14709 14709번: 여우 사인 첫 번째 예시는 엄지손가락과 중지, 약지와 중지, 엄지손가락과 약지가 서로 닿아 있고 검지와 새끼손가락은 다른 손가락과 닿아 있지 않으므로 여우 사인이라고 할 수 있다. 두 번째 예시는 검 www.acmicpc.net #include using namespace std; typedef long long ll; typedef pair pii; const int MAX = 987654321; int main() { ios_base::sync_with_stdio(0); cin.tie(0); int N; cin >> N; if(N a >> b; if(a==2 || a==5 || b==2 || b==5) //.. [백준 5046번] 전국 대학생 프로그래밍 대회 동아리 연합 (C++) 문제링크 : https://www.acmicpc.net/problem/5046 5046번: 전국 대학생 프로그래밍 대회 동아리 연합 첫째 줄에 참가자의 수 1 ≤ N ≤ 200, 예산 1 ≤ B ≤ 500000, 호텔의 수 1 ≤ H ≤ 18, 고를 수 있는 주의 개수 1 ≤ W ≤ 13이 주어진다. 다음 줄부터 각 호텔의 정보가 주어지며, 호텔의 정보는 두 줄로 www.acmicpc.net #include using namespace std; typedef long long ll; typedef pair pii; const int MAX = 987654321; int arr[19]; int result = MAX; int main() { ios_base::sync_with_stdio(0); cin.ti.. 이전 1 ··· 16 17 18 19 20 21 22 ··· 36 다음