본문 바로가기

DP37

AtCoder ABC 262 풀이 https://atcoder.jp/contests/abc262/tasks Tasks - AtCoder Beginner Contest 262 AtCoder is a programming contest site for anyone from beginners to experts. We hold weekly programming contests online. atcoder.jp A. 나머지 분류후 적절히 4k+2꼴로 만들어주면 됩니다. #include using namespace std; int main() { ios::sync_with_stdio(0), cin.tie(0); int n; cin >> n; if (n % 4 == 0) { cout > u >> v; g[u][v] = 1; g[v][u] = 1; .. 2022. 8. 30.
AtCoder ABC 266 풀이 https://atcoder.jp/contests/abc266/tasks Tasks - AtCoder Beginner Contest 266 AtCoder is a programming contest site for anyone from beginners to experts. We hold weekly programming contests online. atcoder.jp A. 중간 글자를 출력하면 됩니다. #include using namespace std; int main() { ios::sync_with_stdio(0), cin.tie(0); string s; cin >> s; cout p인 경우 답은 N%p 입니다. 2) 0> b.x >> b.y; cin >> c.x >> c.y; cin >> d... 2022. 8. 29.
AtCoder ABC 263 풀이 https://atcoder.jp/contests/abc263/tasks Tasks - LINE Verda Programming Contest(AtCoder Beginner Contest 263) AtCoder is a programming contest site for anyone from beginners to experts. We hold weekly programming contests online. atcoder.jp A. 정렬후 케이스를 잘 나눠주면 됩니다. #include using namespace std; int main() { ios::sync_with_stdio(0), cin.tie(0); int a[5]; for (int i = 0; i > a[i]; sor.. 2022. 8. 28.
AtCoder ABC 264 풀이 https://atcoder.jp/contests/abc264/tasks Tasks - freee Programming Contest 2022(AtCoder Beginner Contest 264) AtCoder is a programming contest site for anyone from beginners to experts. We hold weekly programming contests online. atcoder.jp A. pass B. 굳이 채우지 않고 규칙성으로 해결해봅시다. 중앙사각형에서 "간격"이 홀수이면 검은색이고 짝수면 흰색입니다. 여기서 간격이란 어떤 칸을 잡았을 때 그 칸을 포함하는 정사각틀과 중앙사각형의 거리입니다. 이 간격은 |R-8|과 |C-8|중 최댓값이 됨을 쉽게 알 수 .. 2022. 8. 27.