Codeforces 631A Interview(分析&&位运算| )
来源:互联网 发布:retintex算法 编辑:程序博客网 时间:2024/06/04 18:33
题目:http://codeforces.com/contest/631/problem/A
代码:
#include<stdio.h>#include<string.h>using namespace std;int main(){ int a; int ans1=0,ans2=0; scanf("%d",&a); int n[1005],m[1005]; for(int i=0;i<a;i++) { scanf("%d",&n[i]); } for(int i=0;i<a;i++) { scanf("%d",&m[i]); } for(int i=0;i<a;i++) { ans1=ans1|n[i]; } for(int i=0;i<a;i++) { ans2=ans2|m[i]; } printf("%d\n",ans1+ans2);}
0 0
- Codeforces 631A Interview(分析&&位运算| )
- Codeforces--631A--Interview(位运算)
- CodeForces 631A:Interview【位运算】
- Codeforces Round #344 (Div. 2) A. Interview (位运算)
- CF631 A. Interview【位运算】
- Interview(位运算)
- CodeForces 631A-Interview
- Codeforces 631A - Interview
- CodeForces 631A--Interview
- CodeForces 631A Interview
- 【Codeforces 631 A Interview】
- codeforces 631A Interview
- CodeForces - 631A Interview (思想)水
- CodeForces 631A Interview(水题)
- CodeForces 631 A.Interview(水~)
- Codeforces 631A Interview 【水题】
- CodeForces 631A 631A - Interview
- CodeForces 631 A A. Interview【枚举】
- codevs - 图论 - SPFA
- hdoj 1210 Eddy's 洗牌问题
- linux中的内置命令与外部命令
- 开发不规范,多加分号“;”带来的错误
- Android Activtity Security
- Codeforces 631A Interview(分析&&位运算| )
- ubuntu 12.04 Server 上安装 nodejs, MongoDB
- 基础练习 查找整数
- IOC容器构造之注册BeanDefinition源码分析
- Linux多线程编程之线程控制
- UITextField实现PlaceHolder
- 使用VS调试高效修改代码(poj 3984为例)
- maven的环境配置
- 栈