https://codeforces.com/contest/1196/problem/C

题解:思维+交集

/*
*@Author:   STZG
*@Language: C++
*/
#include <bits/stdc++.h>
#include<iostream>
#include<algorithm>
#include<cstdlib>
#include<cstring>
#include<cstdio>
#include<string>
#include<vector>
#include<bitset>
#include<queue>
#include<deque>
#include<stack>
#include<cmath>
#include<list>
#include<map>
#include<set>
//#define DEBUG
#define RI register int
#define endl "\n"
using namespace std;
typedef long long ll;
//typedef __int128 lll;
const int N=100000+10;
const int M=100000+10;
const int MOD=1e9+7;
const double PI = acos(-1.0);
const double EXP = 1E-8;
const int INF = 0x3f3f3f3f;
int t,n,m,k,p,l,r,u,v;
int ans,cnt,flag,temp,sum;
int x,y,f[5];
int b[5][2]={0,-1,0,0,1,0,1,0,0,-1};
char str;
struct node{};
int main()
{
#ifdef DEBUGfreopen("input.in", "r", stdin);//freopen("output.out", "w", stdout);
#endif//ios::sync_with_stdio(false);//cin.tie(0);//cout.tie(0);scanf("%d",&t);while(t--){scanf("%d",&n);int left=-1e5;int right=1e5;int low=-1e5;int high=1e5;for(int i=1;i<=n;i++){scanf("%d%d%d%d%d%d",&x,&y,&f[1],&f[2],&f[3],&f[4]);if(!f[1])left=max(left,x);if(!f[2])high=min(high,y);if(!f[3])right=min(right,x);if(!f[4])low=max(low,y);}if(left<=right&&low<=high){cout<<1<<" "<<left<<" "<<low<<endl;}else{cout<<0<<endl;}}#ifdef DEBUGprintf("Time cost : %lf s\n",(double)clock()/CLOCKS_PER_SEC);
#endif//cout << "Hello world!" << endl;return 0;
}

Codeforces 1196C Robot Breakout相关推荐

  1. CodeForces 1463 C. Busy Robot 模拟

    CodeForces 1463 C. Busy Robot 模拟 题目大意: 有一个一维坐标轴,在最初时刻有个机器人位于坐标 0 0 0 位置,有 n n n 个命令,对于每一个命令在 t i t_i ...

  2. 【codeforces 752C】Santa Claus and Robot

    time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard o ...

  3. CodeForces 321A Ciel and Robot(数学模拟)

    题目链接:http://codeforces.com/problemset/problem/321/A 题意:在一个二维平面中,开始时在(0,0)点,目标点是(a,b),问能不能通过重复操作题目中的指 ...

  4. Yet Another Walking Robot CodeForces - 1296C

    There is a robot on a coordinate plane. Initially, the robot is located at the point (0,0)(0,0). Its ...

  5. Ciel and Robot CodeForces - 322C

    Fox Ciel has a robot on a 2D plane. Initially it is located in (0, 0). Fox Ciel code a command to it ...

  6. Codeforces Round #753 (Div. 3)E. Robot on the Board 1

    问题翻译: The robot is located on a checkered rectangular(直角 的) board of size n×m (n rows, m columns). T ...

  7. Codeforces 583 DIV2 Robot's Task 贪心

    原题链接:http://codeforces.com/problemset/problem/583/B 题意: 就..要打开一个电脑,必须至少先打开其他若干电脑,每次转向有个花费,让你设计一个序列,使 ...

  8. 【Educational Codeforces Round 6A】【水题】Professor GukiZ's Robot 曼哈顿距离

    A. Professor GukiZ's Robot time limit per test 0.5 seconds memory limit per test 256 megabytes input ...

  9. CodeForces - 589J Cleaner Robot

    J. Cleaner Robot time limit per test2 seconds memory limit per test512 megabytes inputstandard input ...

最新文章

  1. 计算机书籍-Scratch少儿编程
  2. C语言访问内部ROM,C语言随笔2: rom ram 及其运行的过程
  3. 谈家政O2O平台的出路
  4. python 实数如何取整_从面试官角度提问:15道硬核Python面试题,论面霸是如何炼成的...
  5. java dcl 失效解决_DCL失效原因和解决方案
  6. 【Python基础知识-pycharm版】第八节-面向对象编程/类
  7. 《敏捷可执行需求说明 Scrum提炼及实现技术》—— 3.4 关注干系人的“愿求”...
  8. 手把手带你入门加密算法的Python实现
  9. mysql应用层透明扩展_MySQL高扩展和高可用
  10. linux查看服务器温度指令,linux查看服务器温度
  11. Flex样式工作原理
  12. 2025年中国信息消费总额将达12万亿元
  13. 龙果 mycat mysql_龙果学院Spring Boot源码解析视频教程完整未加密(价值599)
  14. html中背景简写,css中background简写属性
  15. 读书笔记:《吴军阅读与写作讲义》
  16. 新生研讨课--无人机技术
  17. Win7如何部署定制的Quicklaunch图标
  18. SharePoint BI培训资料
  19. 数据库与文件的数据存储的区别
  20. 信息安全-操作系统安全保护(二)

热门文章

  1. qdebug重定向_每个Qter都该知道的qDebug
  2. 【数据结构与算法-2】链表
  3. arm中的.a文件如何产生的_可变文件系统:如何在IPFS中处理文件?
  4. php 计划任务 curl,通过Task Scheduler定时运行调用cURL的PHP脚本 | 学步园
  5. 深度学习和目标检测系列教程 8-300:目标检测常见的标注工具LabelImg和将xml文件提取图像信息
  6. 今晚直播 | 微软亚洲研究院徐毅恒:预训练时代下的文档智能
  7. 如何获取高精度CV模型?快来试试百度EasyDL超大规模视觉预训练模型
  8. 直播 | 清华大学郑楚杰:知识增强对话生成中的差异感知知识选择
  9. ICCV 2019 开源论文 | ShapeMatchingGAN:打造炫酷动态的艺术字
  10. 商汤 AI TECH DAY丨见大咖、拿OFFER、体验AI,一次就够!