B. Not Afraid
来源:互联网 发布:淘宝霏慕最出名模特 编辑:程序博客网 时间:2024/06/08 08:18
x 和 -x 同时存在否
#include <bits\stdc++.h>using namespace std;int mark[10005][2];int main(){ int n,m;scanf("%d%d",&n,&m); int flag = 1; for(int i=0;i<m;i++){ for(int j=1;j<=n;j++) { mark[j][0] = 0; mark[j][1] = 0; } bool test = false; int k;scanf("%d",&k); for(int j=1;j<=k;j++){ int x; scanf("%d",&x); if(x < 0) { x=-1*x;mark[x][0] = 1; } else mark[x][1] = 1; if(mark[x][0] && mark[x][1]){ test = true; } } if(test == false) flag = 0; } if(!flag) printf("YES\n"); else printf("NO\n"); return 0;}
0 0
- B. Not Afraid
- B. Not Afraid STL set
- CodeForces 787B Not Afraid
- I‘m not Afraid
- codeforces787B-Not Afraid
- Codeforces #406 (Div. 2 A. The Monster&B. Not Afraid (暴力
- 74. A straight foot is not afraid of crooked shoe. 身正不怕影子斜
- What I'm afraid of?
- B. Cells Not Under Attack
- B - Cells Not Under Attack
- <b>Fatal error</b>: Class 'SoapClient' not found in <b>
- I'm afraid I must be going.
- Don't Be Afraid to Break Things
- Don’t Be Afraid to Break Things
- codeforces--701B Cells Not Under Attack
- CodeForces 701B Cells Not Under Attack
- CodeForces 701B Cells Not Under Attack
- codeforces B. Cells Not Under Attack (数学)
- sass入门
- win7操作小经验
- 华为机试在线训练——计算最后一个单词的长度
- codeforce 787A The Monster 两种解法
- 两个链表的第一个公共节点
- B. Not Afraid
- C. Dasha and Password(模拟,暴力)
- 【图像基础】相似性变换、放射变换与单应性
- Lua(三)
- 复选框全选/取消全选 获得选中的val id 以及删除tr 增加tr 简单详解
- 51nod 1034 骨牌覆盖 V3 | URAL 1594 Aztec Treasure
- [Android]emulator-5554 offline 问题
- 编写代码模拟三次密码输入的场景
- 编写一个程序,可以一直接收键盘字符,如果是小写字符就输出对应的大写字符,如果是大写字符,就输出对应的小写字符,如果是数字不输出