๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

๐“ก๐“ธ๐“ธ๐“ถ๐Ÿฃ: ๐’œ๐“๐‘”๐‘œ๐“‡๐’พ๐“‰๐’ฝ๐“‚/์•Œ๊ณ ๋ฆฌ์ฆ˜ ๋ฌธ์ œ ํ’€์ด

(26)
BOJ1343 : ํด๋ฆฌ์˜ค๋ฏธ๋…ธ (Silver 5) #include #include #include using namespace std; string poliomino[501]; void polifunc() { poliomino[0] = "."; poliomino[1] = "-1"; poliomino[2] = "BB"; poliomino[3] = "-1"; poliomino[4] = "AAAA"; for (int i = 5; i tmp2) { poliomino[i] = tmp2; } else { poliomino[i] = tmp; } } else { poliomino[i] = poliomino[i - 2] + "BB"; } } else poliomino[i] = "-1"; } } int main() { string poli; cin >> poli; pol..
BOJ11170 : 0์˜ ๊ฐœ์ˆ˜ (Silver 5) #include #include using namespace std; int number(int a) { int count = 0; string str = to_string(a); for (int i = 0; i > T; for (int i = 0; i > N >> M; int count = 0; for (int j = N; j
BOJ11068 : ํšŒ๋ฌธ์ธ ์ˆ˜ (Silver 5) ์ž ์ง€๊ธˆ๋ถ€ํ„ฐ ๋‚˜๋Š” ๋ฉ์ฒญ์ด๋‹ค๋ฅผ 100๋ฒˆ ๋ณต์ฐฝํ•œ๋‹ค. ์ตœ๋Œ€์ธ 1000000๋ฅผ 2์ง„์ˆ˜๋กœ ๋ฐ”๊พธ๋ฉด ์•ฝ 20์ž๋ฆฌ ์ˆ˜๊ฐ€ ๋‚˜์˜ค๋Š”๋ฐ, ๋‚œ ์ด๊ฑธ ๋ฐ”๋ณด๊ฐ™์ด ๋ฐฐ์—ด์„ ์–ต์ด ๋„˜๋Š” ๋งŒํผ ํ• ๋‹นํ•ด์•ผํ•œ๋‹ค๊ณ  ์ƒ๊ฐํ–ˆ๋‹ค... (๋Œ€์ฒด ์™œ..?) ๊ทธ๋ž˜์„œ ์ด๊ฑด ์–ด๋–ป๊ฒŒ ํ•˜๋ผ๋Š” ๊ฑธ๊นŒ, ๋ฐฐ์—ด๋กœ๋„ ์•ˆ๋˜๊ณ  ๋™์ ํ• ๋‹น์œผ๋กœ๋„ ์•ˆ๋˜์–ด์„œ ๊ฒฐ๊ตญ ์ธํ„ฐ๋„ท ์ฐพ์•„์„œ deque์„ ์‚ฌ์šฉํ–ˆ๋Š”๋ฐ......... ์ƒ๊ฐํ•ด๋ณด๋‹ˆ๊นŒ ๋ฐฐ์—ด์—” 20๊ฐœ ์ž๋ฆฌ๋งŒ ์žˆ์–ด๋„ ๋˜๋Š” ๊ฑฐ์˜€์Œ ใ…‹ใ…‹ใ…‹ใ…‹ใ…‹ใ…‹ใ…‹ใ…‹ใ…‹ใ…‹ใ…‹ใ…‹ใ…‹ใ…‹ใ…‹ใ…‹ใ…‹ใ…‹ใ…‹ใ…‹ใ…‹๊ฐœ๋ฉ์ฒญํ•ด........ #include #include using namespace std; int examine(int a) { deque memory; for (int i = 2; i > TC; for (int i = 0; i > number; cout
BOJ17127 : ๋ฒš๊ฝƒ์ด ์ •๋ณด์„ฌ์— ํ”ผ์–ด๋‚œ ์ด์œ  (Bronze 1) #include using namespace std; int N; int A[10]; int sum(int a, int b, int c); int main() { int max = 0; int count = 0; cin >> N; for (int i = 0; i > A[i]; for (int i = 1; i < N - 2; i++) { for (int j = i + 1; j < N - 1; j++) { for (int k = j + 1; k < N; k++) { int tmp = sum(i, j, k); if (max < tmp) max = tmp; } } } cout
BOJ18512 : ์ ํ”„์ ํ”„ (Bronze 1) ์ผ๋‹จ....๊ฐœ ๋ง˜์— ์•ˆ๋“œ๋Š” ๋ฌธ์ œ์˜€๋‹ค... ๋‚ด ๋…ํ•ด๋ ฅ์ด ๋ฌธ์ œ์ธ์ง€ ๋ฌธ์ œ๊ฐ€ ๋ฌธ์ œ์ธ์ง€ ์ตœ์ดˆ๋กœ ๋งŒ๋‚˜๋Š” ์ง€์ ์ด ์ถœ๋ฐœ์  ์ดํ›„์ธ์ง€ ๋งŒ์•ฝ ๊ฐ™์€ ์ถœ๋ฐœ์ ์—์„œ ์‹œ์ž‘์ด๋ฉด ์–ด๋–ป๊ฒŒ ๋˜๋Š”๊ฑด์ง€ ๋ช‡ ๋ฒˆ ์•ˆ์— ๋งŒ๋‚˜์ง€ ์•Š์œผ๋ฉด ์ด๋Ÿฐ ์กฐ๊ฑด๋„ ์—†๊ณ  ํŠธ๋ž™์ด ๊ธธ์ด๊ฐ€ ์–ผ๋งˆ์ธ์ง€๋„ ๋ชฐ๋ผ์„œ ์ด๊ฑธ ๋Œ€์ฒด ๋ช‡ ๋ฒˆ์„ ๋Œ๋ ค์•ผ ๋งž๋Š”๊ฑด์ง€ ใ…‹ใ…‹ใ…‹ใ…‹ใ…‹ใ…‹ใ…‹ใ…‹ใ…‹ใ…‹ ๊ฐ์œผ๋กœ ๋•Œ๋ ค๋งž์ถค... ์ฒ˜์Œ์—” ์—์ด ์„ค๋งˆ ์ด๊ฑธ ๋ฌด์‹ํ•˜๊ฒŒ n๋ฒˆ ์ž„์˜๋กœ ๋Œ๋ ค๋ณด๊ณ  ๋งž๋‹ค ์•„๋‹ˆ๋‹ค๋ฅผ ํŒ๋‹จํ•˜๊ฒ ์–ด? ๋ฏธ๋ฆฌ ์•„๋‹Œ๊ฑด ๊ฑธ๋Ÿฌ๋‚ด๋Š” ๋ฐฉ๋ฒ•์ด ์žˆ๊ฒ ์ง€ํ•˜๊ณ  ๋จธ๋ฆฌ๋ฅผ ๊ตด๋ ค๋ดค์œผ๋‚˜ ๊ณ„์† ํ‹€๋ ธ๋‹คํ•ด์„œ ์ธํ„ฐ๋„ท ์ฐพ์•„๋ณด๋‹ˆ.... ๊ทธ๋ƒฅ ๋Œ๋ฆฌ๋”๋ผ๋Š”... ๊ทธ๋ž˜์„œ ์ˆซ์ž๋„ ๋‚ด ๋ง˜๋Œ€๋กœ ๋„ฃ๊ณ  ๋Œ๋ ค๋ฒ„๋ ธ๋‹ค ^_^ ๋ณ„๋กœ๊ตฐ #include using namespace std; int main() { int X, Y, P1, P2; cin >> X >> Y >> P..
BOJ1463 : 1๋กœ ๋งŒ๋“ค๊ธฐ (Silver 3) #include #include using namespace std; long long getMin(long long a, long long b, long long c) { long long min = a; if (b < min) min = b; if (c < min) min = c; return min; } long long makeFunction(long long N) { long long array[1000000] = { 0, }; long long a, b, c; array[1] = 0; for (long long i = 2; i
BOJ13777 : Hunt The Rabbit #include #include #include #include using namespace std; void binary(int first, int end, int target) { if (first > end) return; int mid = (first + end) / 2; cout target[i]; if (target[i] == 0) break; } for (int j = 0; j < i; j++) { binary(1, 50, target[j]); cout
BOJ2776 : ์•”๊ธฐ์™• #include #include #include #include using namespace std; int main() { int T, N, M; int number1[1000000]; int number2[1000000]; scanf("%d", &T); for (int i = 0; i < T; i++) { scanf("%d", &N); for (int j = 0; j < N; j++) scanf("%d", number1 + j); sort(number1, number1 + N); scanf("%d", &M); for (int j = 0; j < M; j++) { scanf("%d", number2 + j); printf("%d\n", binary_search(number1, number1 + N, n..
BOJ2805 : ๋‚˜๋ฌด ์ž๋ฅด๊ธฐ #include #include #include #include using namespace std; long long N, M; long long H[1000000]; long long totalLength(long long n) { long long length = 0; for (int i = 0; i 0) length += (H[i] - n); } // cout > N >> M; for (int i = 0; i > H[i]; sort(H, H + N); long long down = 0; long long top = H[N - 1]; long long ans = 0; while (down
BOJ1654 : ๋žœ์„ ์ž๋ฅด๊ธฐ ( #include #include #include using namespace std; int K, N = 0; unsigned long long length[100000]; int check(unsigned long long min) { int num = 0; for (int i = 0; i > K >> N; for (int i = 0; i > length[i]; } /*sort(length, length + K, greater()); unsigned long long minArray[10000]; copy(length, length + K, mi..