April Fools Contest 2017 C
Description
DO YOU EXPECT ME TO FIND THIS OUT?
WHAT BASE AND/XOR LANGUAGE INCLUDES string?
DON'T BYTE OF MORE THAN YOU CAN CHEW
YOU CAN ONLY DISTORT THE LARGEST OF MATHEMATICS SO FAR
SAYING "ABRACADABRA" WITHOUT A MAGIC AND WON'T DO YOU ANY GOOD
THE LAST STACK RUPTURES. ALL DIE. OH, THE EMBARRASSMENT!
I HAVE NO ARRAY AND I MUST SCREAM
ELEMENTS MAY NOT BE STORED IN WEST HYPERSPACE
The first line of input data contains a single integer n (1 ≤ n ≤ 10).
The second line of input data contains n space-separated integers ai (1 ≤ ai ≤ 11).
Output a single integer.
4
2 5 3 1
4
哇啊啦啦啦哇啦啦,然后知道这是个把每句其中几个字取出来,组合在一起,就是最大值和最后一个数异或
#include<bits/stdc++.h>
using namespace std;
#define ll long long
int n,x,mx=;
int main()
{
cin>>n;
for(int i=;i<=n;i++)
cin>>x,mx=max(mx,x);
cout<<(x^mx);
return ;
}
April Fools Contest 2017 C的更多相关文章
- April Fools Contest 2017 题解&源码(A,数学 B,数学 C,数学 D,字符串 E,数字逻辑 F,排序,卡时间,G,数学)
A. Numbers Joke time limit per test:2 seconds memory limit per test:64 megabytes input:standard inpu ...
- Codeforces April Fools Contest 2017
都是神题,我一题都不会,全程听学长题解打代码,我代码巨丑就不贴了 题解见巨神博客 假装自己没有做过这套
- April Fools Contest 2017 题解
趁着上课无聊,来补一补-- A. Numbers Joke 直接oeis就好了:http://oeis.org/search?q=numbers+joke&language=english&a ...
- April Fools Contest 2017 F
Description You are developing a new feature for the website which sells airline tickets: being able ...
- April Fools Contest 2017 E
Description Input The input consists of four lines, each line containing a single digit 0 or 1. Outp ...
- April Fools Contest 2017 D
Description Input The only line of the input contains a string of digits. The length of the string i ...
- April Fools Contest 2017 B
Description Programmers' kids solve this riddle in 5-10 minutes. How fast can you do it? Input The i ...
- April Fools Contest 2017 A
Description Input The input contains a single integer a (1 ≤ a ≤ 30). Output Output a single integer ...
- April Fools Contest 2018
这个比赛不正经,但是我可以一本正经的写代码啊 A. Quirky Quantifiers time limit per test 2 seconds memory limit per test 64 ...
随机推荐
- SyntaxError:Strict mode does not allow function declaration in a lexically nested statement.
问题描述 使用react-native init创建了一个新项目,在package.json中使用的react-native的版本如下: "dependencies": { & ...
- Replace Type Code With Class和Replace Type Code With Subclass和Replace Type Code With State/Strategy
周末闲来写写看书总结,今天写<重构>中的3个重要手法,分别是Replace Type Code With Class.Replace Type Code With Subclass和Rep ...
- PHP获取类名及所有函数名
PHP获取当前类名.方法名 __CLASS__ 获取当前类名 __FUNCTION__ 当前函数名(confirm) __METHOD__ 当前方法名 (bankcard::confirm) _ ...
- 数字和为sum的方法数(动态规划)
题目描述 给定一个有n个正整数的数组A和一个整数sum,求选择数组A中部分数字和为sum的方案数.当两种选取方案有一个数字的下标不一样,我们就认为是不同的组成方案. 输入描述: 输入为两行: 第一行为 ...
- 织梦DedeCMS信息发布员发布文章默认自动审核更新并生成HTML页面
织梦DedeCMS信息发布员发布文章默认自动审核更新并生成HTML页面 一直以为DEDECMS的信息发布员在后台发布文章后,非要管理员审核才能显示,今天一哥们问我这个问题.问:“能不能直接发布,并自动 ...
- hdu 1043 Eight(双向bfs)
题意:经典八数码问题 思路:双向bfs ps:还有a*算法(还不会)等解法. 代码: #include<iostream> #include<stdio.h> #include ...
- Python web —— Selenium 库
Selenium:硒,一种化学元素. Selenium 是 Python 下第三方浏览器自动化工具. 1. Firefox/Chrome from selenium import webdriver ...
- react之fetch请求json数据
Fetch下载 npm install whatwg-fetch -S Fetch请求json数据 json文件要放在public内部才能被检索到
- 使用Pycharm官方统计代码行插件统计代码总行数
最近有需求,需要统计项目代码的总行数,首先想到了使用Pycharm官方的统计行数插件,发现效果还不错. 官方代码统计插件指导:https://plugins.jetbrains.com/plugin/ ...
- PostgreSQ 连接问题 FATAL: no pg_hba.conf entry for host
PostgreSQ数据库为了安全,它不会监听除本地以外的所有连接请求,当用户通过JDBC访问是,会报一些如下的异常: org.postgresql.util.PSQLException: FATAL: ...