[백준 18917번] 수열과 쿼리 38 (C++)
문제링크 : https://www.acmicpc.net/problem/18917#include using namespace std;typedef long long ll;int M;ll sum = 0;ll sum_xor = 0;int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cin >> M; for(int i=0; i> n; if(n==1) { cin >> x; sum +=x; sum_xor ^= x; } else if(n==2) { cin >> x; sum -..
백준/실버
2025. 9. 23. 00:01