码迷,mamicode.com
首页 > 其他好文 > 详细

结果填空:最强团队

时间:2019-03-20 01:07:31      阅读:147      评论:0      收藏:0      [点我收藏+]

标签:nbsp   div   for   algo   mamicode   namespace   main   com   name   

技术图片

暴力更新最大值

 1 #include <iostream>
 2 #include <cstdio>
 3 #include <cstring>
 4 #include <string>
 5 #include <algorithm>
 6 #include <cmath>
 7 #include <queue> 
 8 using namespace std;
 9 int a[30]={
10 258055, 69760, 163908, 249856, 53440,
11 
12 151684, 77958, 176134, 8262, 229446,
13 
14 245953, 20676, 45189, 69826, 131075,
15 
16 28672, 155717, 118851, 221318, 254150,
17 
18 135235, 86083, 41089, 28743, 32772,
19 
20 225475, 118855, 249862, 184320, 217154};
21 int main()
22 {
23     int maxn=0;
24     for(int i=0;i<30;i++){
25         for(int j=0;j<30;j++){
26             for(int k=0;k<30;k++){
27                 if(i!=j&&j!=k&&i!=k){
28                     maxn=max(maxn,a[i]^a[j]^a[k]);
29                 }
30             }
31         }
32     }
33     cout<<maxn<<endl;
34     return 0;
35 }

 

结果填空:最强团队

标签:nbsp   div   for   algo   mamicode   namespace   main   com   name   

原文地址:https://www.cnblogs.com/shixinzei/p/10562326.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!