ICode9

精准搜索请尝试: 精确搜索
  • 【题解】ARC137D - Prefix XORs2022-03-20 10:02:45

    有意思的找规律题。我们先简单写一个程序打表,打印一个01方阵 \(u_{i,j}\) 表示经过 \(i\) 次操作后,\(a_n\) 是否要异或 \(a_j\)。 #define N 100005 int n, a[N]; int main() { read(n); a[n] = 1; int m = 1; while(m < n) m <<= 1; rp(i, m){ rp(j, n)if(a[j])rp(k, j - 1

  • Moscow Pre-Finals Workshop 2020 - Legilimens+Coffee Chicken Contest A. Everyone Loves Playing Games2021-10-05 10:33:09

    Moscow Pre-Finals Workshop 2020 - Legilimens+Coffee Chicken Contest A. Everyone Loves Playing Games 题意 Alice和Bob玩游戏,两人分别有\(n\)对数和\(m\)对数\((x_i,y_i)\) 初始分数\(X = 0\) 操作可以选择数对中的一个数,最终把这些数异或起来构成最终分数,Alice希望\(X\)尽

  • 位或例题Java 暴力法和前缀异或法2021-08-31 22:02:36

      我写的垃圾暴力法: public static int[] xorQueries(int[] arr, int[][] queries) { int i = queries.length; int []querr= new int[i]; int idx = 0; int num; for (int [] s : queries) { num = 0; for (

  • 【每日一题】2021-05-12 14:04:52

    https://leetcode-cn.com/problems/xor-queries-of-a-subarray/ 缓存一下 class Solution { public int[] xorQueries(int[] arr, int[][] queries) { int n = arr.length; int[] xors = new int[n + 1]; for (int i = 0; i < n; i++) {

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有