목록분류 전체보기 (266)
정화 코딩

https://www.acmicpc.net/problem/2239 #include #include using namespace std;vector> s;vector> emp;int n;bool fin = false;bool chk(int idxi, int idxj, int num) { for (int i = 0; i >(9, vector(9)); emp = vector>(); for (int i = 0; i > str; for (int j = 0; j 스도쿠 판을 왼쪽 위부터 차례대로 읽어가며 빈칸에 1부터 9까지의 수를 넣어가면서 가능한 경우를 만나는 즉시 종료하고 출력하도록 했다. 백트래킹 문제이고, 탐색하는 함수 dfs와 가능한 경우인지 체크하는 함수 chk를 만들었다...

icpc-sinchon-workspace의 폴더 구조icpc-sinchon-workspace/├── .github/├── .vscode/├── apps/│ ├── admin-backend/│ │ ├── package.json│ │ └── ...│ └── admin-frontend/│ ├── package.json│ └── ...├── libs/├── .gitignore├── package-lock.json└── package.json여기서 기존의 admin-backend 폴더의 이름을 admin-old-backend로 바꾸고 새로운 nest.js 프로젝트(폴더)를 admin-backend이라는 이름으로 만드려고 한다.최상위 디렉토리에서 npm 설치...\icpc..

https://www.acmicpc.net/problem/1647 #include #include #include using namespace std;int n, m;int parent[100001];vector> edge;int find(int a) { if (parent[a] == a) { return a; } else { parent[a] = find(parent[a]); return parent[a]; }}void unionf(int a, int b) { a = find(a); b = find(b); if (a != b) parent[b] = a;}int main() { ios_base::sync_with_stdio(0);..

https://www.acmicpc.net/problem/5534 #include #include using namespace std;int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n; cin >> n; string s; cin >> s; int ss = s.size(); int ans = 0; for (int i = 0; i > st; int sts = st.size(); bool psb = false; for (int j = 0; j = ss) { psb = true; ..

1. IntelliJ 설치https://www.jetbrains.com/idea/ IntelliJ IDEA – the Leading Java and Kotlin IDEIntelliJ IDEA is undoubtedly the top-choice IDE for software developers. It makes Java and Kotlin development a more productive and enjoyable experience.www.jetbrains.com IntelliJ IDEA Ultimate 버전으로 설치해준다. 설정은 다 기본으로 두고 설치해줬다. 다 설치되었으면 실행하고 이제 라이선스를 등록한다. JetBrains 계정으로 로그인한다. 로그인 하고 다시 돌아와서 라이선스를 활성화..

https://www.acmicpc.net/problem/2467 #include #include using namespace std;int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n; cin >> n; vector a(n); for (int i = 0; i > a[i]; int l = 0; int r = n - 1; int dif = 2000000000; int la = 0; int ra = 0; while (l 0) r--; else l++; } cout 간단한 투 포인터 문제. 포인터 하나는 왼쪽 끝을, 하나는 오른쪽 끝을 ..

https://www.acmicpc.net/problem/13460 #include #include #include using namespace std;int dx[] = {1, -1, 0, 0};int dy[] = {0, 0, 1, -1};int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n, m; cin >> n >> m; vector> g(n, vector(m)); int ri, rj, bi, bj; for (int i = 0; i > s; for (int j = 0; j > q; vector>>> visited(n, vector>>(m, vector>(n, v..

https://www.acmicpc.net/problem/2755 #include #include using namespace std;int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n; cin >> n; int cnt = 0; double sums = 0; while (n--) { string name, grade; int weight; double score = 0; cin >> name >> weight >> grade; if (grade == "A+") score = 4.3; else if (grade..