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

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

(26)
BOJ1003: ํ”ผ๋ณด๋‚˜์น˜ ํ•จ์ˆ˜(Silver 3) #include #include #include #include long long fibo0[41] = { 0, }; long long fibo1[41] = { 0, }; void fibonacci(int n) { fibo0[0] = 1; fibo0[1] = 0; fibo1[0] = 0; fibo1[1] = 1; for (int i = 2; i
BOJ1016 : ์ œ๊ณฑใ„ดใ„ด์ˆ˜ (Gold 1) #include #include #include using namespace std; int save[1000001] = { 0, }; void checkfunc(unsigned long long start, unsigned long long end) { int a = end - start; for (unsigned long long i = 2; i max; checkfunc(min, max); for (int i = 0; i
BOJ1759: ์•”ํ˜ธ ๋งŒ๋“ค๊ธฐ(Gold 5) #include #include #include #include using namespace std; bool checkfun(char *a, int L); void permu(char *a, char *target, int start, int level, int L, int C); bool compare(char a, char b) { return int(a) > L >> C; for (int i = 0; i > alphabet[i]; sort(alphabet, alphabet + C, compare); char result[30] = { ""}; //fo..
BOJ5576: ์ฝ˜ํ…Œ์ŠคํŠธ (Bronze 2) #include #include #include using namespace std; int main() { int Wnum[10], Knum[10]; for (int i = 0; i > Wnum[i]; } for (int i = 0; i > Knum[i]; } sort(Wnum, Wnum + 10); sort(Knum, Knum + 10); int Wmax = 0, Kmax = 0; for (int i = 9; i >= 7; i--) { Wmax += Wnum[i]; Kmax += Knum[i]; } cout
BOJ2628 : ์ข…์ด์ž๋ฅด๊ธฐ (Silver 5) #include #include #include #include using namespace std; int main() { int a, b; int linenum; int line_a[10000] = { 0, }; int line_b[10000] = { 0, }; int acount = 0, bcount = 0; int tmp = 0; cin >> a >> b; cin >> linenum; for (int i = 0; i > tmp; if (tmp == 1) { cin >> line_a[acount]; acount++; } else { cin >> line_b[bcount]; bcount++; } } // cout
BOJ2456 : ๋‚˜๋Š” ํ•™๊ธ‰ํšŒ์žฅ์ด๋‹ค (Bronze1) #include #include #include #include using namespace std; int main() { int N; int score[1000][3]; cin >> N; int total[3][3] = {0}; for (int i = 0; i > score[i][0] >> score[i][1] >> score[i][2]; if (score[i][0] == 1) total[0][0]++; if (score[i][0] == 2) total[0][1]++; if (score[i][0] == 3) total[0][2]++; if (score[i][1] == 1) total[1][0]++; if (score[i][1] == 2) total[1][1]++; if ..