This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
#include<string.h> | |
#pragma warning(disable:4996) | |
#define MAX 100 | |
typedef struct student | |
{ | |
int hakbun; //학번 | |
char name[40]; //이름 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
#define MAX 100 | |
typedef struct{ | |
int left; //하한 | |
int right; //상한 | |
}element; //스택 구조체 | |
element stack[MAX]; | |
int top = -1; //스택 top=-1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
using namespace std; | |
int main() | |
{ | |
int N;//정수 갯수 | |
int arr; | |
int now_sum, max_sum; | |
int max_num;//입력 받은 수 중 최대 수 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
#include<algorithm> | |
using namespace std; | |
bool compare(const pair<int, int>& a, const pair<int, int>& b) | |
{ | |
//If the first number is same | |
if (a.first == b.first) | |
return a.second > b.second; //The second number in Descending order |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
using namespace std; | |
typedef struct _Rational { | |
int bunZa, bunMo; | |
} Rational; | |
//Greatest common divisior(최대공약수) | |
int GCD(int a, int b) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
#include<stdlib.h> | |
#define node_num 7 | |
//node struct | |
typedef struct node | |
{ | |
char alphabet; //alphabet | |
struct node* left; //left child node | |
struct node* right; //right child node |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
#define MAX 100 | |
using namespace std; | |
//make row major ordering | |
int (*make_row_major(int a, int b))[MAX] | |
{ | |
int arr[MAX][MAX] = { 0 }; | |
int temp = 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
#include<algorithm> | |
#include<stack> | |
using namespace std; | |
int graph[1001][1001]; //Graph | |
//N : Number of vertex | |
//M : Number of edge | |
//V : Start vertex number |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
#include<algorithm> | |
#include<queue> | |
using namespace std; | |
int graph[1001][1001]; //Graph | |
//N : Number of vertex | |
//M : Number of edge | |
//V : Start vertex number |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
using namespace std; | |
int main() | |
{ | |
int n, money, cost; | |
int d[11][1000] = { 0 }; | |
cin >> n >> money; | |
d[0][0] = 1; |
OlderNewer