백준 1253 문제 C++
버블소트 문제
백준 25314
빠른 A + B
A+B-7
A + B -8
#include using namespace std; int main(void) { iosbase::syncwith_stdio(false); cin.tie(0); cout.tie(0); int a; cin >> a; for (int i = 1; ...
별찍기 2
#include using namespace std; int main() { ios::syncwithstdio(false); cin.tie(0); cout.tie(0); int a, b; while (!(cin >> a >> b).eof()) { ...
#include #include #include using namespace std; vector solution(vector players, vector callings) { vector answer; map m1; map m2; for(int i = 0 ; ...
#include #include #include using namespace std; vector solution(vector name, vector yearning, vector> photo) { vector answer; map m; for(int i = 0; i < na...
#include #include #include using namespace std; typedef struct { int x, y; }box; // 상 하 좌 우 box moveD[4] = { { -1, 0 }, { 1, 0 }, { 0, -1 }, { 0, 1 } }; map ...
#include #include using namespace std; vector solution(vector wallpaper) { vector answer{100,100,-100,-100}; const int n = wallpaper.size(); const int m = w...
#include #include using namespace std; int main() { ios::syncwithstdio(false); cin.tie(0); cout.tie(0); int n, m; cin >> n >> m; vecto...
#include using namespace std; // 스위치 배열 선언 bool arr[101]; int main() { // 스위치 개수 변수 선언 int switch_num; cin >> switch_num; // 스위치 상태에 맞게 입력 ...
or)
#include #include using namespace std; int main() { iosbase::syncwith_stdio(false); cin.tie(NULL); int ans = 2147483647; vector> v; int n; cin >> n;...
#include using namespace std; int main() { int num[9]; for (int i = 0; i > num[i]; } int maxValue = -1; int maxValueIndex; for (int i =...
#include using namespace std; int arr1025, dp1025; int main() { iosbase::syncwith_stdio(false); cin.tie(NULL);
#include using namespace std; int main() { ios::syncwithstdio(false); cin.tie(0); cout.tie(0); int n, k; int sum = 0; int big = 0; ...
문제) 수 N개 A1, A2, ..., AN이 주어진다. A를 오름차순 정렬했을 때, 앞에서부터 K번째 있는 수를 구하는 프로그램을 작성하시오. 입력) 첫째 줄에 N(1 ≤ N ≤ 5,000,000)과 K (1 ≤ K ≤ N)이 주어진다. 둘째에는 A1, A2, ..., AN이 주어진다. (-109 ≤ Ai ≤ 109) 출력) A를 정렬했을 때, 앞...