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. 【BZOJ2876】【Noi2012】骑行川藏 拉格朗日乘法

    题目描述 给你 \(n,E,s_i,k_i,v_i'\),要求在 \[ \sum_{i=1}^nk_i{(v_i-v_i')}^2s_i\leq E \] 的前提下最小化 \[ \sum_{i=1}^ ...

  2. 安装 SIP 服务器

    SIP服务器: OpenSIPS(Open SIP S erver)是SIP服务器的一个成熟的开源实现.OpenSIPS不仅仅是一个SIP代理/路由器,因为它包含应用程序级别的功能.作为SIP服务器的 ...

  3. [HackerRank]New Year Chaos[UNDONE]

    Input (stdin)Download 2 8 5 1 2 3 7 8 6 4 8 1 2 5 3 7 8 6 4 Your Output (stdout) Too chaotic Too cha ...

  4. oracle 查询数据库的各种命令

    以下查询都是使用plsql查询oracle 11g 1.查询数据库版本信息 select * from v$version; 2.查询数据库优化模式 select name, value from v ...

  5. 20175209 《Java程序设计》第六周学习总结

    20175209 <Java程序设计>第六周学习总结 一.教材知识点总结 第七章 内部类与异常类 1.内部类 定义:在一个类中定义的另一个类称作内部类,包含内部类的类成为内部类的外嵌类. ...

  6. 速查mysql数据大小

    速查mysql数据大小 # 1.查看所有数据库大小 mysql> select concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data ...

  7. mtd-utils 安装

    title: mkdosfs 安装 tags: linux date: 2018/12/26/ 17:08:54 --- mtd-utils安装 for 主机 在制作根文件系统中需要使用它制作jffs ...

  8. Pandas系列(十四)- 实战案例

    一.series import pandas as pd import string #创建Series的两种方式 #方式一 t = pd.Series([1,2,3,4,43],index=list ...

  9. 金融量化分析【day112】:量化交易策略基本框架

    摘要 策略编写的基本框架及其实现 回测的含义及其实现 初步学习解决代码错误 周期循环的开始时间 自测与自学 通过前文对量化交易有了一个基本认识之后,我们开始学习做量化交易.毕竟就像学游泳,有些东西讲是 ...

  10. python Django 中间件介绍

    我们一直都在使用中间件,只是没有注意到而已,打开Django项目的Settings.py文件,看到下面的MIDDLEWARE配置项,django默认自带的一些中间件: MIDDLEWARE = [ ' ...