http://codeforces.com/contest/1104/problem/C

好厉害的题~ 只要把竖着的放在第一第二行,横着的放在第三/第四行就行。 哦吼,大半夜脑子迷糊地看英文的脑筋急转弯么?

 #include<stdio.h>
#include<string.h>
#include<math.h>
#include<iostream>
#include<stdlib.h>
#include<algorithm>
#include<queue>
#include<vector>
#include<string>
#include<set>
#include<cctype>
#include<sstream>
#define mem(a) memset(a,0,sizeof(a))
#define LL long long
using namespace std;
const int N=1e2+;
int a[N],n;
string s;
int main()
{
getline(cin,s);
int r=,l=;
for(size_t i=;i<s.size();i++)
{ if(s[i]=='')
{
cout<<"1 "<<l<<endl;
if(l+>) l=;
else l++;
}
else if(s[i]=='')
{
cout<<"4 "<<r<<endl;
if(r+>) r=;
else r=r+;
} } }

Round#534 div.2-C Grid game的更多相关文章

  1. Codeforces Round #534 (Div. 2)

    B. Game with string 题意: 给出一个字符串s只包括小写字母.当轮到一个玩家的时候,他可以选择两个连续且相等的字母并且删除它.当一个玩家没得删的时候他就输了. 题解: 乍一看有点懵, ...

  2. Codeforces Round #534 (Div. 2) Solution

    A. Splitting into digits Solved. #include <bits/stdc++.h> using namespace std; int n; void sol ...

  3. [ACM]Codeforces Round #534 (Div. 2)

    A. Splitting into digits Vasya has his favourite number n. He wants to split it to some non-zero dig ...

  4. 20191028 Codeforces Round #534 (Div. 1) - Virtual Participation

    菜是原罪. 英语不好更是原罪. \(\mathrm{A - Grid game}\) 题解 \(4 \times 4\) 的格子,两种放法. 发现这两种在一起时候很讨厌,于是强行拆分这个格子 上面 \ ...

  5. Codeforces Round #534 (Div. 1)

    A 构造题 有一个44的方格 每次放入一个横向12或竖向2*1的方格 满了一行或一列就会消掉 求方案 不放最后一行 这样竖行就不会消 然后竖着的放前两行 横着的放第三行 循环放就可以啦 #includ ...

  6. Round#534 div.2-B Game with string

    唔,第一次参加,掉了好多分. http://codeforces.com/contest/1104/problem/B 不用考虑太多,string真的好厉害. #include<stdio.h& ...

  7. Codeforces Round #534 (Div. 2)D. Game with modulo-1104-D(交互+二分+构造)

    D. Game with modulo time limit per test 1 second memory limit per test 256 megabytes input standard ...

  8. Codeforces 1104 D. Game with modulo-交互题-二分-woshizhizhang(Codeforces Round #534 (Div. 2))

    D. Game with modulo time limit per test 1 second memory limit per test 256 megabytes input standard ...

  9. Codeforces Round #534 (Div. 2) D. Game with modulo(取余性质+二分)

    D. Game with modulo 题目链接:https://codeforces.com/contest/1104/problem/D 题意: 这题是一个交互题,首先一开始会有一个数a,你最终的 ...

随机推荐

  1. Prometheus监控elasticsearch集群(以elasticsearch-6.4.2版本为例)

    部署elasticsearch集群,配置文件可"浓缩"为以下: cluster.name: es_cluster node.name: node1 path.data: /app/ ...

  2. x86汇编语言实践(1)

    0 写在前面 为了更深入的了解程序的实现原理,近期我学习了IBM-PC相关原理,并手工编写了一些x86汇编程序. 在2017年的计算机组成原理中,曾对MIPS体系结构及其汇编语言有过一定的了解,考虑到 ...

  3. 首次使用Oracle SQL Developer 提示: enter the full pathname for java.exe

    https://www.cnblogs.com/520future/p/7699095.html 首次使用Oracle SQL Developer 提示: enter the full pathnam ...

  4. java替换ascii表字符

    如下: //处理特殊字符 public String dealSpecialXml(String xml){ String result = ""; //result = xml. ...

  5. Python常用模块-时间模块

    在写代码的过程中,我们常常需要与时间打交道,在python中,与时间处理有关的模块有time,datetime和calendar.,这里主要介绍time和datetime模块 在python中,表示时 ...

  6. js介绍,js三种引入方式,js选择器,js四种调试方式,js操作页面文档DOM(修改文本,修改css样式,修改属性)

    js介绍 js运行编写在浏览器上的脚本语言(外挂,具有逻辑性) 脚本语言:运行在浏览器上的独立的代码块(具有逻辑性) 操作BOM 浏览器对象盒子 操作DOM 文本对象 js三种引入方式 (1)行间式: ...

  7. [物理学与PDEs]第4章习题3 一维理想反应流体力学方程组的数学结构

    证明: Euler 坐标系下的一维反应流体力学方程组 (3. 10)-(3. 13) 也是一个一阶拟线性双曲型方程组. 证明: 由 (3. 10), (3. 12), (3. 13) 知 $$\bex ...

  8. Javaweb学习笔记——(二十四)——————图书商城项目

    图书商城          环境搭建         1.导入原型             *用户模块             *分类模块             *图书模块              ...

  9. 删除对象的某个属性 delete

    有时候我们可能会遇到需要删除一个对象的某个属性的这种情况,保留剩下的,不想遍历,那我们就可以使用delete操作符, let obj = { a: 1, b: 2, c: 3 } delete obj ...

  10. 在centos7下安装.net core

    在这里记录下安装的过程: 一开始需要去官网下载centos相关的dotnetcore的sdk 上传到linux,解压,发现需要安装libunwind, 安装libunwind:yum install  ...