최근 글
[정올] 1033 / [백준] 2645 / 회로배치

#include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; typedef unsigned long ull; typedef pair pii; int dx[] = {0, 0, 1, -1}; int dy[] = {1, -1, 0, 0}; struct XY { int x; int y; bool operator==(const XY &other) const { return (x == other.x) && (y == other.y); } }; struct QData { int x; int y; int money; }; str..

[정올] 1027 / [백준] 2661 / 좋은수열

#include using namespace std; typedef long long ll; typedef pair pii; int n; bool isOk(string num){ int numSize = num.size(); if(numSize < 2) return 1; for(int i = 1;i

[정올] 1013 / Fivestar

#include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; typedef pair pii; typedef vector vi; int dx[] = {0, 0, 1, -1}; int dy[] = {1, -1, 0, 0}; /* ***** = 한줄에 (0 ~ 2) .*.... .***** .*.... *****. .*.... */ string board[8]; int preFix[8][12]; int placeAble[15]; bool placed[15]; int height, width, ans = 100; int needs = 0..

[정올] 105 / 출력 - 형성평가5

문제 Seoul 10,312,545 +91,375 Pusan 3,567,910 +5,868 Incheon 2,758,296 +64,888 Daegu 2,511,676 +17,230 Gwangju 1,454,636 +29,774를 출력하는 문제이다. 해결책 printf의 %15s 를 사용하면 글자를 15칸 안에 오른쪽 정렬해서 출력해 준다. 정답 코드 #include int main(){ printf("%15s%15s%15s\n" , "Seoul","10,312,545","+91,375"); printf("%15s%15s%15s\n" , "Pusan","3,567,910","+5,868"); printf("%15s%15s%15s\n" , "Incheon","2,758,296","+64,888"); prin..

[정올] 104 / 출력 - 형성평가4

문제 kor 90 mat 80 eng 100 sum 270을 출력하는 문제이다. 정답 코드 #include int main(){ std::cout

[정올] 103 / 출력 - 형성평가3

문제 T를 크게 출력하는 문제이다. 정답 코드 #include int main(){ std::cout

[정올] 102 / 출력 - 형성평가2

문제 My hometown Flowering mountain을 출력하는 문제이다. 정답 코드 #include int main(){ std::cout

[정올] 101 / 출력 - 형성평가1

문제 My name is Hong 을 출력하는 문제이다. 정답 코드 #include int main(){ std::cout