题目链接

https://www.nowcoder.com/acm/contest/85/H

思路

如果熟悉 五线谱 才能做啊。。。

然后 先竖着遍历 再 横着 遍历 就可以了

AC代码

#include <cstdio>
#include <cstring>
#include <ctype.h>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <ctime>
#include <iostream>
#include <algorithm>
#include <deque>
#include <vector>
#include <queue>
#include <string>
#include <map>
#include <stack>
#include <set>
#include <numeric>
#include <sstream>
#include <iomanip>
#include <limits> using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll; const double PI = 3.14159265358979323846264338327;
const double E = 2.718281828459;
const double eps = 1e-6; const int INF = 0x3f3f3f3f;
const int maxn = 1e5 + 5;
const int MOD = 1e9 + 7; int main()
{
map <int, char> m;
m[0] = 'F';
m[1] = 'E';
m[2] = 'D';
m[3] = 'C';
m[4] = 'B';
m[5] = 'A';
m[6] = 'G';
m[7] = 'F';
m[8] = 'E';
int n;
cin >> n;
getchar();
string s[9];
string ans = "";
for (int i = 0; i < 9; i++)
getline(cin, s[i]);
for (int i = 0; i < n; i++)
{
int flag = 0;
for (int j = 0; j < 9; j++)
{
if (flag)
{
if (s[j][i] != '|')
flag = 0;
else
continue;
}
if (s[j][i] == '|' && j == 0)
flag = 1;
else if (s[j][i] == 'o')
{
ans += m[j];
break;
}
}
if (flag)
ans += '|';
}
cout << ans << endl;
}

最新文章

  1. PostgreSQL笔记
  2. list转datatable
  3. Cannot find class for bean with name service
  4. JDBC编程步骤
  5. 《WPF程序设计指南》读书笔记——第7章 Canvas
  6. CentOS7添加第三方源
  7. poj 2411 新写法
  8. CentOS6.5与XP双系统安装
  9. js调用wcf 的SOA
  10. 分布式版本控制系统Git-----4.Git 常用命令整理
  11. SonarQube+Jenkins,搭建持续交付平台
  12. 关于Visio Studio 2012使用Nuget获取Sqlite驱动包报错:“System.Data.SQLite.EF6”的架构版本与 NuGet 的版本 2.0.30625.9003 不兼容
  13. Android开发学习之路--Drawable mutations
  14. LoadRunner服务水平协议SLA
  15. ABP框架 配置权限、本地语言文件、左侧菜单项
  16. Tetrahedron based light probe interpolation(基于四面体的Light Probe插值)
  17. python3的命令行参数传递
  18. Docker 为 ASP.NET Core WebApi 应用程序生成 Docker 映像,创建容器并运行
  19. 如何利用JS判断当前来路域名并跳转到指定页面
  20. 推荐系统第5周--- 基于内容的推荐,隐语义模型LFM

热门文章

  1. first core data
  2. PHP使用微软认知服务Face API
  3. java 安装后 不能 java javac 说找不到命令 -bash: javac: command not found
  4. Proftp设置虚拟用户(转)
  5. Google 商店
  6. Sphinx之配置文件
  7. MongoDB入门学习(1)
  8. linux 参数内核
  9. mongodb 安装及使用
  10. git入门五(分支合并冲突和衍合)