답안 #1099438

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1099438 2024-10-11T09:58:49 Z vjudge1 XORanges (eJOI19_xoranges) C++17
12 / 100
1000 ms 1880 KB
#include <bits/stdc++.h>
using namespace std;
#define int long long



signed main()
{
   int n, q; cin >> n >> q;
   vector<int> a(n + 1);
   for (int i = 1; i <= n; i++){
       cin >> a[i];
   }
    while(q--){
        int t, l, u; cin >> t >> l >> u;
        int x = 0;
        if (t == 2){
            if ((u - l + 1) % 2 == 0){
            cout << 0 << endl;
            }else{
                for (int i = 1; i <= u - l + 1; i++){
                //cout << i << endl;
                    for (int j = l; j <= u - i + 1; j++){
                        //cout << "j:::::" << j << endl;
                        for (int k = j; k <= j + i - 1; k++){
                            x ^= a[k];
                        }
                    }
                }
                cout << x << endl;
            }
        }else{
            a[l] = u;
        }
        
    }
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 2 ms 348 KB Output is correct
5 Correct 2 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 206 ms 348 KB Output is correct
2 Correct 149 ms 600 KB Output is correct
3 Correct 259 ms 348 KB Output is correct
4 Execution timed out 1057 ms 348 KB Time limit exceeded
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 2 ms 348 KB Output is correct
5 Correct 2 ms 348 KB Output is correct
6 Correct 206 ms 348 KB Output is correct
7 Correct 149 ms 600 KB Output is correct
8 Correct 259 ms 348 KB Output is correct
9 Execution timed out 1057 ms 348 KB Time limit exceeded
10 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 1014 ms 1880 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 2 ms 348 KB Output is correct
5 Correct 2 ms 348 KB Output is correct
6 Correct 206 ms 348 KB Output is correct
7 Correct 149 ms 600 KB Output is correct
8 Correct 259 ms 348 KB Output is correct
9 Execution timed out 1057 ms 348 KB Time limit exceeded
10 Halted 0 ms 0 KB -