분류 전체보기439 백준 1260번 C++ #include #include #include #include #include using namespace std; const int MAX = 1001;int n, m, v;vector dfsway;queue bfsway;int visited[MAX]; bool cmp(pair p1, pair p2) {if (p1.first == p2.first)return p1.second > v;memset(visited, -1, sizeof(visited)); for (int i = 0; i > start .. 2019. 2. 19. 백준 10610번 C++ #include #include #include using namespace std; const int MAX = 100001;char number[MAX];int length; bool cmp(char c1, char c2) {return c1 > c2;} int main(void) {cin >> number;length = strlen(number); int flag = 0;int sum = 0; for (int i = 0; i < length; i++) {sum = sum + (number[i] - '0');if (number[i]== '0')flag = 1;}if ((flag == 1) && (sum % 3 == 0)) {sort(number, number + length, cmp);cout 2019. 2. 18. 백준 1931번 C++ #include #include #include using namespace std; int n;vector time; bool cmp(pair p1, pair p2) {if (p1.second == p2.second)return p1.first = end) {answer++;end = time[i].second;}}return answer;} int main(void) {cin >> n;time.resize.. 2019. 2. 18. 백준 11047번 C++ #include #include using namespace std; int n,k;vector coin; int mincost() {int answer=0; for (int i = n - 1; i >= 0; i--) {if (k == 0)break;if (k / coin[i] == 0)continue;answer = answer + k / coin[i];k = k - coin[i] * (k / coin[i]);}return answer;} int main(void) {cin >> n >> k;coin.resize(n); for (int i = 0; i > coin[i];}cout 2019. 2. 18. 이전 1 ··· 72 73 74 75 76 77 78 ··· 110 다음