레필리아
'컴퓨터공학 기초/문제 풀이' 카테고리의 글 목록

컴퓨터공학 기초/문제 풀이

컴퓨터공학 기초/문제 풀이

116 - Unidirectional TSP

std::ifstream cin("example.inp");std::ofstream cout("result.txt");#else#include #endif#include using namespace std;static int maxRow, maxCol, result;static int inp[11][101], tracking[11][101], sol[101], c[11][101];bool input(void);void dynamic(void);void tracking_procedure(void);void output(void);int main(void){ while ( input() ) { dynamic(); track..

컴퓨터공학 기초/문제 풀이

BRACKETS2 - Mismatched Brackets

st; Solution() { st = new Stack(); } void solve() { Scanner sc = new Scanner(System.in); for (int testCase = sc.nextInt(); testCase != 0; testCase--) { String line = sc.next(); int ans = parse(line); if (ans == 1) System.out.println("YES"); else System.out.println("NO"); } } private int parse(String line) { st.clear();..

컴퓨터공학 기초/문제 풀이

COINS - Coin Change

MAX_COUNT) System.out.println(ans % MAX_COUNT); else System.out.println(ans); } } long dynamic() { for (int i = 0; i cost) break; dTable[coin]++; for (int j = 1; coin + j

컴퓨터공학 기초/문제 풀이

LECTURE - Lecture Note

tokens = new ArrayList(); String str = sc.nextLine(); for (int j = 0; j

컴퓨터공학 기초/문제 풀이

ENDIANS - Endians

> 24); } public static Long fourthBit(Long origin) { Long fourth = origin > 8; second = second & 65280; return second; } }]]>