#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; typedef signed char i8; typedef short i16; typedef int i32; typedef long long i64; int dx[] = {0, 0, 1, -1}; int dy[] = {1, -1, 0, 0}; int n, ans = 0; struct Path { int from; int to; int need; }; vector paths; i..
#include #include #include #include #include #include #include #include using namespace std; typedef long long ll; typedef pair pii; const int limit_div = 10000; /* Fibo : 1 1 2 3 5 8 13 1 1 & 1 1 > 2 1 1 0 & 1 0 > 1 1 2 1 & 1 1 > 3 2 1 1 & 1 0 > 2 1 3 2 & 1 1 > 5 3 2 1 & 1 0 > 3 2 */ struct twoBtwo{ public: int leftTop; int rightTop; int leftBottom; int rightBottom; public: void limitB(int l) {..
#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..
#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
#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..
문제 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..
문제 kor 90 mat 80 eng 100 sum 270을 출력하는 문제이다. 정답 코드 #include int main(){ std::cout
문제 T를 크게 출력하는 문제이다. 정답 코드 #include int main(){ std::cout
문제 My hometown Flowering mountain을 출력하는 문제이다. 정답 코드 #include int main(){ std::cout