codeforces round #234B(DIV2) A Inna and Choose Options
#include <iostream>
#include <string>
#include <vector> using namespace std; const int num = ;
const int item[] = {,,,,,}; int main(){
int t;
cin >> t;
for(int i = ; i < t; ++ i ){
string character;
cin >> character;
vector<int> result;
for(int j = ; j < num ; ++ j){
int a = item[j], b = /a;
int col = , row = ;
for(col = ; col < b ; ++ col){
for(row = ; row < a; ++ row){
if(character[col+b*row] == 'O') break;
}
if(row >= a) break;
}
if(col < b) result.push_back(a);
}
cout<<result.size();
for(int k = ; k < result.size(); ++ k ){
cout<<" "<<result[k]<<"x"<</result[k];
}
cout<<endl;
}
}
codeforces round #234B(DIV2) A Inna and Choose Options的更多相关文章
- codeforces round #234B(DIV2) C Inna and Huge Candy Matrix
#include <iostream> #include <vector> #include <algorithm> #include <utility> ...
- codeforces round #234B(DIV2) B Inna and New Matrix of Candies
#include <iostream> #include <vector> #include <string> #include <algorithm> ...
- Codeforces Round #234 (Div. 2) :A. Inna and Choose Options
A. Inna and Choose Options time limit per test 1 second memory limit per test 256 megabytes input st ...
- Codeforces Round #234 (Div. 2) A. Inna and Choose Options 模拟题
A. Inna and Choose Options time limit per test 1 second memory limit per test 256 megabytes input st ...
- Codeforces Round #234 (Div. 2) A. Inna and Choose Options
A. Inna and Choose Options time limit per test 1 second memory limit per test 256 megabytes input st ...
- CodeForces 400A Inna and Choose Options
Inna and Choose Options Time Limit: 1000ms Memory Limit: 262144KB This problem will be judged on Cod ...
- Codeforces Round #539 div2
Codeforces Round #539 div2 abstract I 离散化三连 sort(pos.begin(), pos.end()); pos.erase(unique(pos.begin ...
- 【前行】◇第3站◇ Codeforces Round #512 Div2
[第3站]Codeforces Round #512 Div2 第三题莫名卡半天……一堆细节没处理,改一个发现还有一个……然后就炸了,罚了一啪啦时间 Rating又掉了……但是没什么,比上一次好多了: ...
- Codeforces Round#320 Div2 解题报告
Codeforces Round#320 Div2 先做个标题党,骗骗访问量,结束后再来写咯. codeforces 579A Raising Bacteria codeforces 579B Fin ...
随机推荐
- javascript - DOM对象控制HTML元素详解
1.方法 getElementsByName() -- 获取name getElementByTagName() -- 获取 getAttribute() --获取元素属性 se ...
- 数据结构和算法 – 9.二叉树和二叉查找树
9.1.树的定义 9.2.二叉树 人们把每个节点最多拥有不超过两个子节点的树定义为二叉树.由于限制子节点的数量为 2,人们可以为插入数据.删除数据.以及在二叉树中查找数据编写有效的程序了. 在 ...
- Spring.Net的IOC入门
1.构造器注入 namespace Spring.Net { class Program { //构造器注入 static void Main(string[] args) { IApplicatio ...
- 微信支付:“当前页面的URL未注册”
最近在尝试着写微信支付方面的内容,今天下午的时候遇到了一个问题,也就是当前页面没有进行注册的问题. 在写好后台代码之后我在微信后台配置了测试授权目录和支付白名单,如下图所示,但是无论我如何进行测试总是 ...
- “init terminating in do_boot” Windows10 Rabbit MQ fails to start
在Windows 10环境下安装rabbitmq-server-3.6.2后,CMD中运行命令:rabbitmq-plugins enable rabbitmq_management 报错: { , ...
- Solr入门之(6)配置文件solrconfig.xml
solrconfig.xml包含了用于配置自身行为的绝大部分参数,其作用范围是当前core.该文件位于${solr_home}/solr/core1/conf/下. 参数列表概览: A.lib B.d ...
- scala中的抽象类
scala中也有和java,c#类似的抽象类,抽象类会有部分实现,也有没有实现的方法定义.抽象类最大的特征是不能直接实例化.下面我们看个例子. abstract class Animal { def ...
- html5 方框内的小球
html5 方框内的小球 版本一 <!DOCTYPE html> <html> <head lang="en"> <meta charse ...
- 免费电子书:Azure Web Apps开发者入门
(此文章同时发表在本人微信公众号"dotNET每日精华文章",欢迎右边二维码来关注.) 题记:之前介绍过微软正在逐步出版一个名为Azure Essential的入门系列教程,最近刚 ...
- VMWARE虚拟机CentOS6.4系统使用主机无线网卡上网的三种方法介绍
转自:http://www.jb51.net/network/98820.html 如何真正的实现VMWARE虚拟机CentOS6.4系统使用主机无线网卡上网 环境:WIN7旗舰版,台式机,U盘无 ...