Submission #1036420

# Submission time Handle Problem Language Result Execution time Memory
1036420 2024-07-27T10:50:33 Z vjudge1 XORanges (eJOI19_xoranges) C++17
100 / 100
366 ms 16212 KB
/*
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣤⣤⣶⣶⣶⣶⠦⠶⡶⢦⠤⠤⠤⣄⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣠⣠⣴⣶⣿⣿⣿⣿⣿⣿⣽⣽⣿⣿⣿⣿⣿⣭⣽⣭⣯⡭⡈⢙⣽⣶⣤⣤⣄⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣶⣟⣟⣽⣾⣿⢿⣿⡿⣿⣿⣿⣿⣿⣿⣟⠟⡻⣿⣿⣟⣟⣟⣿⡻⠿⠿⠿⠿⣍⠉⠉⠉⠙⠛⠛⠒⠒⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣶⣿⣿⣿⣿⡿⣾⣿⣯⣿⣿⣿⣽⣿⣷⣽⣿⣿⡿⣿⣿⣾⢿⣿⡷⣿⣿⣿⣿⣯⣭⡅⣠⣹⣢⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⡿⣿⣟⣽⣿⣿⣿⣻⣿⣟⣟⣿⣻⣿⣝⣿⣯⣿⣻⣻⣿⣿⣿⣿⡪⡻⣿⣿⣽⣿⣿⣯⣻⣿⣶⣿⣖⣓⡤⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⠿⢿⣿⣟⣿⣿⣻⣿⣿⣿⠿⣿⣿⡿⣿⣿⢿⣿⡯⣿⣛⣿⣕⣿⣿⡿⣿⣿⣷⢿⡿⣻⣿⣿⣿⢿⣿⣿⡻⣿⡷⠷⠯⠦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣼⡽⠹⠩⡝⡇⡿⢻⢻⢻⡛⣿⣹⣿⣿⣿⣿⣿⣽⣿⣯⣿⣿⣿⡿⣿⣿⣿⣿⣽⡿⣿⣯⣻⣿⣿⡿⣿⣿⣿⣿⣿⣝⡍⠩⠀⢘⢄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣏⣓⣂⣀⣀⠀⣜⣀⣀⠐⠐⠓⣞⠨⣿⠿⣗⣿⣿⣻⣿⣿⣽⣿⣿⣺⣿⣿⣿⣿⣻⣿⣿⣿⣝⢿⣛⠻⣻⣿⣟⣟⣿⣿⣿⣤⣐⣒⣚⣳⡀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣿⣿⠟⠻⠽⢯⣌⣶⣿⠿⡡⢴⣾⠛⢀⣷⡉⡟⣷⢊⢘⢀⡙⣷⣾⣿⣿⣿⣿⣿⣿⢿⣿⢿⣿⡿⣿⣿⣽⢋⣝⣿⡿⣿⢿⢿⣛⢿⣿⣗⢇⠟⢦⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢾⣿⣿⣉⣉⣉⣸⣿⣿⣉⣉⢉⣿⠷⠶⠀⢸⣿⣿⢿⠀⠀⠀⠀⢸⠀⢀⡷⣿⣿⣿⢿⡿⡇⣿⣉⢾⣿⣿⠰⢶⡶⣿⣿⣿⣿⣹⣿⡀⠹⣿⣿⡹⣉⢷⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣾⣿⡭⣥⣿⣾⣿⣿⣿⣿⣿⣿⣓⡃⠐⠀⣘⣯⣿⣚⣟⢒⣓⣒⣿⣒⢺⣟⣻⡧⡉⣿⡿⠍⡭⢭⠨⠹⢿⣝⢒⡞⠀⡖⣚⢷⣙⢛⣯⣦⠈⠻⢿⣿⣮⣧⡀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢰⣿⣿⢩⣿⣿⣿⣾⣷⣿⣿⣿⣟⠒⠀⠐⠀⠉⡿⡟⠉⠹⣿⣟⣳⣶⣆⣴⠑⠀⢳⡄⠈⣷⡁⠁⠈⠀⢈⠙⣷⠀⣀⣀⣀⠀⢨⣷⠀⠊⣟⢣⠀⠀⠉⠛⠿⣿⣄⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⣿⣗⡺⣿⣿⣿⣿⣿⣿⣿⡿⡏⠍⠁⢈⠀⠉⠁⣷⠩⠩⠨⢿⣷⣿⣿⡟⠀⠈⠅⠽⣹⣯⡵⣖⣶⣶⣶⡖⣿⡬⢭⡭⣽⣿⠭⣿⡠⠥⣼⣷⢧⠀⠀⠀⠀⠀⠙⠳⢄⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣟⣿⡏⡃⢀⣠⣬⣶⣶⣦⣍⢀⠈⢸⣘⣧⣿⣿⣏⠀⣀⠀⣃⣷⢿⣼⣽⣆⡲⡦⢵⣾⣿⠃⣧⣿⣿⡼⣿⣿⣇⣻⣿⣘⡆⠀⠀⠀⠀⠀⠀⠈⠛
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢦⣾⠟⠻⠹⢰⣶⣆⡚⢷⡀⠠⠶⡞⣾⣿⠤⠀⠠⡀⢒⡞⠻⣷⠐⢻⣿⣮⡕⣷⣿⡖⣿⣿⣿⡏⣽⣿⣿⢶⣿⣿⢾⡄⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣿⣽⣿⣿⡯⡿⢿⢽⣽⣮⣯⣯⡟⠬⠅⢡⡀⣠⣽⣿⣧⠵⠁⠀⠀⠇⡍⢿⠀⠀⠤⠀⠏⠩⠬⠹⡤⠀⣿⢝⡿⡯⣾⣯⣿⣟⣯⣖⣺⣿⣕⠽⣯⣿⣬⣽⡀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⣻⣿⣿⠷⠿⠿⣻⣿⣟⣿⣿⠆⠁⢠⣿⣿⡽⠿⡿⣿⠀⠀⠀⠀⠀⠉⠋⠀⠀⠀⠀⠒⠉⠊⢈⠋⠁⡋⣻⣿⣿⣿⣿⣿⣿⣿⣿⢿⣿⣷⣿⣿⣟⣹⣿⡆⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⡿⣿⣿⣿⣿⡭⢹⣿⣿⣻⣽⣿⡀⠀⢨⡇⠉⠍⢌⠼⠇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠴⣶⢶⠾⢦⣆⠂⠚⣿⣷⣽⡗⣿⡯⣿⠵⢿⣯⣯⣿⣿⣿⣕⣯⣇⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⣯⣿⣗⣿⣿⣿⡓⣒⣛⣽⣿⣿⢿⣯⠥⠀⠈⢶⡂⠐⣾⠆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠉⢙⣿⣌⣮⠽⣿⣍⢯⣻⣻⣯⠭⠥⣯⠬⣿⣿⣿⣟⣿⣻⣾⣏⢹⡀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⣿⣾⣿⣷⣿⣿⡇⡇⠴⣹⣿⣿⣾⣉⢹⣄⡀⠀⠀⠉⠉⠀⠀⠀⠀⠀⠀⣠⡄⠀⠀⠀⠀⣀⣷⣶⣾⣿⣿⠈⠀⡉⣿⢙⣏⢾⣏⡉⡁⡁⣹⣿⣿⣳⣷⣿⣿⢞⣾⡌⡇⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣯⣿⣿⣿⣿⣭⠭⢭⣿⣿⣷⡒⢀⡶⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢰⡿⠇⠀⠀⠀⠰⡟⣿⢨⠽⢕⡟⠀⠂⣲⡟⠒⢺⣽⣷⣾⡶⠒⣺⣿⣯⣿⣿⣾⢽⣝⣿⠆⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⣿⣿⣿⣿⣟⣿⣿⣿⣧⣚⣾⣚⣿⣿⠬⠤⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠋⠀⠀⠀⠀⠐⣇⠈⢐⢰⡏⠁⠠⢠⡿⠤⣤⣿⣻⣟⣿⠥⣾⣿⣿⣿⣿⣿⣿⡾⡳⣿⡇⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⡷⣿⣿⣿⣿⡿⣽⣿⢿⣿⣿⠶⠾⣿⣿⢉⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠒⠒⠛⠀⠤⠾⣛⣀⣽⣿⣿⣿⣿⣿⡿⣿⣿⣿⣿⣿⣿⣿⣿⣮⣿⡇⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⣯⣿⣿⣿⣿⣫⣫⣿⣿⢕⣿⣭⢹⡿⣿⣷⣐⣀⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠐⣢⣫⣿⣿⣟⣿⣿⣾⣻⣿⣿⣿⣿⣿⣿⣿⣿⣷⢿⡇⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣿⣿⣿⣿⣿⣿⢟⢟⣿⣿⣷⡿⣟⢄⣻⡻⣿⣷⡬⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣾⣛⣿⣿⡿⣿⣿⣟⢟⣟⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⡄⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⡿⣿⣿⣿⡗⣽⣿⣿⣿⣿⣕⡽⣍⢯⣿⣿⣿⢅⠠⠀⠀⠀⠀⠉⠙⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣬⣿⣿⣿⣿⣿⣿⣯⢿⣿⣿⡵⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡽⣄⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⡀⠀⠀⠀⠀⢸⣿⣿⠇⢸⣿⣿⣯⣺⣿⣿⣿⣿⣿⣿⣦⢟⣿⣯⣿⣿⣷⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣼⣾⣿⣿⣿⣿⣿⣿⣗⣟⣿⣿⣺⡯⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣺⡆⠀⠀⠀⠀
⠀⠀⠀⠀⢀⣤⣶⣾⣷⣿⣿⣯⣳⡤⣀⣿⡏⠀⢸⣿⣿⣿⣾⠯⣿⣿⣿⣿⣿⣿⣿⢷⣿⣩⠨⠽⡿⣷⣄⠀⠀⠀⠀⠀⠀⠀⣀⣀⣠⣤⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⣿⣿⢏⣀⣻⣿⣿⣿⣿⣿⣿⣿⣾⡿⣿⣯⢿⡀⠀⠀⠀
⠀⢀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣟⣖⢤⣘⣿⣿⣿⣷⣽⣿⣿⣿⣿⣿⣿⣷⣗⣭⡿⣬⣭⡯⣭⣿⣿⣿⣿⣿⣽⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣺⣿⣿⣿⣕⢒⣿⣿⣿⣿⣿⣿⣿⣿⣻⣾⡿⣿⣿⣇⠀⠀⠀
⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣝⢻⡻⣿⣟⣿⢟⡿⣿⣾⣿⣷⣟⢶⠐⢐⣰⣇⣲⣗⣾⢐⣐⣸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢽⣟⢽⣿⡺⢩⣿⣿⣿⣿⣿⣿⣿⣿⣿⣟⡯⡾⣿⢽⡄⠀⠀
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣾⣾⡻⣷⣿⣟⢿⣿⣿⣿⣿⢷⡤⠀⠴⠑⠷⠶⠰⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣯⣻⢿⣿⣿⣿⣿⣿⣿⣿⣻⣿⣯⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣿⢟⢟⢿⣿⠀⠀
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣝⣿⣿⣝⣿⣿⣿⣿⣷⣽⣄⠄⠀⠄⠀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢝⣿⡆⠙⠿⣿⣿⣿⣿⣺⣺⠟⢰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣗⣟⢽⠈⢿⡆⠀
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⢾⣿⣿⣿⣿⣿⣾⣇⡀⠆⢀⣿⣿⣷⣿⣿⣿⣿⢿⣿⠁⠈⣿⣿⣿⢾⡇⠀⠀⠀⠹⣿⡿⣿⣉⣈⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢏⣏⢾⠀⠀⣇⠀
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣗⣿⣿⣿⣿⣿⣿⣮⡶⣤⣿⣿⣿⣿⣿⣿⣿⡿⣿⡗⠀⠀⠀⠙⢿⣿⣻⠀⠀⠀⠀⠈⣿⡿⣶⣾⣽⣿⡿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣿⡏⠀⠀⣼⠀
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢽⣿⣿⣿⣿⣿⣿⣿⢿⣿⣿⣿⣵⢝⢵⣿⡯⣯⠃⠀⠀⠀⠀⠀⠙⢿⡄⠀⠀⠀⢰⣿⠗⠉⠙⠿⣮⣧⡈⠻⣿⣿⣿⣿⣿⣿⣿⡯⣮⡇⠀⠀⠀⠀
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⣫⣿⣿⣿⣿⣷⣿⣿⣿⣾⣾⣻⣻⣿⣻⣟⢿⣶⣄⡀⠀⠀⠀⠀⠀⠓⠀⠀⢠⡿⠁⠀⠀⠀⠀⠈⠙⠻⢦⠈⠿⣿⣿⣿⣿⣿⣟⣿⠁⠀⠀⠀⠀
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣿⣾⣾⣿⣿⣿⣿⣾⣿⣿⣷⣽⣾⡿⣷⣤⣀⠀⠀⠀⠀⠀⠏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠓⠀⠈⠻⣿⣿⣿⣷⡏⠀⠀⠀⠀⠀
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣽⣿⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣿⡿⣿⣷⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⢿⣿⡟⠀⠀⠀⠀⠀⠀
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⡿⣻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣾⣾⡿⣷⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢿⠃⠀⠀⠀⠀⠀⠀
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢯⣿⣯⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣮⣯⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠋⠀⠀⠀⠀⠀⠀⠀
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣟⣽⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣽⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣯⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣟⣿⠋⠀
*/
// skibidi rizz
#include<bits/stdc++.h>
#define IOS ios_base::sync_with_stdio(false),cin.tie(NULL),cout.tie()
#define ll long long
#define ull unsigned long long
#define pb push_back
// #define endl "\n"
#define int ll
#define F first     
#define S second
#define db double 
#define ld long double
#define short unsigned short
#define pii pair<int,int>
using namespace std;
const   ll inf = 1e17,MOD=1e9+7,N=2e5+10,MN=1e9+7,lim=1e6;
const long db Pie=acos(-1);
//...and justice for all
int binpow(int a,int p);
int t[4*N][2];
int a[N];
int n,q;
void build(int x,int l,int r){
  if(l==r){
    t[x][l%2]=a[l];
    return ;
  }
  int m=(l+r)/2;
  build(x*2,l,m);
  build(x*2+1,m+1,r);
  t[x][0]=t[x*2][0]^t[x*2+1][0];
  t[x][1]=t[x*2][1]^t[x*2+1][1];
}
void upd(int i,int v,int x,int lx,int rx){
  if(lx==rx){
    t[x][i%2]=v;
    return ;
  }
  int m=(lx+rx)/2;
  if(i<=m){
    upd(i,v,x*2,lx,m);
  }
  else{
    upd(i,v,x*2+1,m+1,rx);
  }
  t[x][0]=t[x*2][0]^t[x*2+1][0];
  t[x][1]=t[x*2][1]^t[x*2+1][1];
}
int get(int l,int r,int x,int lx,int rx){
  if(l<=lx&&rx<=r){
    return t[x][l%2];
  }
  if(r<lx||rx<l){
    return 0;
  }
  int m=(lx+rx)/2;
  return get(l,r,x*2,lx,m)^get(l,r,x*2+1,m+1,rx);
}
void solve(){
  // int n,q;
  cin>>n>>q;
  for(int i=1;i<=n;i++){
    cin>>a[i];
  }
  build(1,1,n);
  while(q--){
    int type;
    cin>>type;
    if(type==1){
      int i,j;
      cin>>i>>j;
      upd(i,j,1,1,n);
    }
    else{
      int l,r;
      cin>>l>>r;
      // l--,r--;
      // int ans=0;
      if((r-l+1)%2==0){
        cout<<0<<endl;
        continue;
      }
      // for(int i=l;i<=r;i+=2){
      //   ans^=a[i];
      // }
      cout<<get(l,r,1,1,n)<<endl;
    }
  }
}       
signed main() {
    srand(time(NULL));
    IOS;
    //freopen("coins.in", "r", stdin);
    //freopen("coins.out", "w", stdout);
    int UwU=1;
    // cin>>UwU;
    for(int i=1;i<=UwU;i++) { 
      // cout<<"Case "<<i<<": ";
        solve();
      // cout<<endl;
    }
    cout<<fixed<<setprecision(10);
    cerr<<"Time:"<<1000*((double)clock())/(double)CLOCKS_PER_SEC<<"ms\n"; 
}
int binpow(int a,int p){if(p==0)return 1;if(p%2){return ((binpow(a,p-1)*a)%MOD);}int res=binpow(a,p/2)%MOD; return (res*res)%MOD;}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 1 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 2 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 1 ms 348 KB Output is correct
5 Correct 2 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 1 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
7 Correct 2 ms 348 KB Output is correct
8 Correct 1 ms 348 KB Output is correct
9 Correct 1 ms 348 KB Output is correct
10 Correct 2 ms 348 KB Output is correct
11 Correct 9 ms 604 KB Output is correct
12 Correct 8 ms 632 KB Output is correct
13 Correct 7 ms 600 KB Output is correct
14 Correct 7 ms 604 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 340 ms 14160 KB Output is correct
2 Correct 366 ms 16064 KB Output is correct
3 Correct 343 ms 16212 KB Output is correct
4 Correct 296 ms 15900 KB Output is correct
5 Correct 287 ms 15880 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 1 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
7 Correct 2 ms 348 KB Output is correct
8 Correct 1 ms 348 KB Output is correct
9 Correct 1 ms 348 KB Output is correct
10 Correct 2 ms 348 KB Output is correct
11 Correct 9 ms 604 KB Output is correct
12 Correct 8 ms 632 KB Output is correct
13 Correct 7 ms 600 KB Output is correct
14 Correct 7 ms 604 KB Output is correct
15 Correct 340 ms 14160 KB Output is correct
16 Correct 366 ms 16064 KB Output is correct
17 Correct 343 ms 16212 KB Output is correct
18 Correct 296 ms 15900 KB Output is correct
19 Correct 287 ms 15880 KB Output is correct
20 Correct 204 ms 15956 KB Output is correct
21 Correct 210 ms 15980 KB Output is correct
22 Correct 208 ms 15984 KB Output is correct
23 Correct 305 ms 15868 KB Output is correct
24 Correct 305 ms 15764 KB Output is correct