您当前的位置: 首页 >  ar

先求一个导

暂无认证

  • 3浏览

    0关注

    291博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

arc135 C(证的并不是很明)

先求一个导 发布时间:2022-02-14 10:51:45 ,浏览量:3

题目 题意: 给定数组a,可以执行任意次操作。选定数组中任意一个数a[i],令整个数组均执行^a[i].执行完操作后数组a的最大和。 思路: 可以证明不执行操作和执行操作1次包含了所有情况。 在这里插入图片描述

时间复杂度: O(nlogn) 代码:

// Problem: C - XOR to All
// Contest: AtCoder - AtCoder Regular Contest 135
// URL: https://atcoder.jp/contests/arc135/tasks/arc135_c
// Memory Limit: 1024 MB
// Time Limit: 2000 ms
// 
// Powered by CP Editor (https://cpeditor.org)

#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define OldTomato ios::sync_with_stdio(false),cin.tie(nullptr),cout.tie(nullptr)
#define fir(i,a,b) for(int i=a;i            
关注
打赏
1662037414
查看更多评论
0.1614s