본문 바로가기

PS/AtCoder25

AtCoder ABC 234 풀이 https://atcoder.jp/contests/abc234/tasks Tasks - AtCoder Beginner Contest 234 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 f(int x) { return x * x + 2 * x + 3; } int main() { ios::sync_with_stdio(0), cin.tie(0); int t; cin >> t; cout n; vectorx(n), y(n);.. 2022. 10. 7.
AtCoder ABC 238 D,E 재밌는 문제들입니다. D. https://atcoder.jp/contests/abc238/tasks/abc238_d D - AND and SUM AtCoder is a programming contest site for anyone from beginners to experts. We hold weekly programming contests online. atcoder.jp x & y = a , x+y=s인 (x,y)가 존재하는지 O(1)에 판정해봅시다. x & y = a이므로, x>=a, y>=a 입니다. x=x1+a, y=y1+a라고 두면, x1 & y1 = 0입니다. 이제 x1 & y1 = 0이고, x1+y1=s-2a인 x1,y1이 존재하는지 알아봅시다. x1과 y1을 이진법으로 썼을 때, a를 .. 2022. 10. 2.
AtCoder ABC 239 풀이 https://atcoder.jp/contests/abc239/tasks Tasks - Denso Create Programming Contest 2022(AtCoder Beginner Contest 239) AtCoder is a programming contest site for anyone from beginners to experts. We hold weekly programming contests online. atcoder.jp A. 구하라는 값을 출력해주면 됩니다. long long을 써줍시다. #include using namespace std; using ll = long long; int main() { ios::sync_with_stdio(0), cin.tie(0); ll x; cin.. 2022. 10. 1.
AtCoder ABC 242 풀이 https://atcoder.jp/contests/abc242/tasks Tasks - AtCoder Beginner Contest 242 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); double a, b, c, x; cin >> a >> b >> c >> x; cout > s; ll ans = 0; ll .. 2022. 9. 28.