本题要求编写程序,顺序输出给定字符串中所出现过的大写英文字母,每个字母只输出一遍;若无大写英文字母则输出“Not Found”。
输入格式:

输入为一个以回车结束的字符串(少于80个字符)。
输出格式:

按照输入的顺序在一行中输出所出现过的大写英文字母,每个字母只输出一遍。若无大写英文字母则输出“Not Found”。
输入样例1:

FONTNAME and FILENAME

输出样例1:

FONTAMEIL

输入样例2:

fontname and filrname

输出样例2:

Not Found

作者
颜晖
单位
浙江大学城市学院
代码长度限制
16 KB
时间限制
400 ms
内存限制
64 MB

#define debug
#ifdef debug
#include <time.h>
#include "/home/majiao/mb.h"
#endif#include <iostream>
#include <algorithm>
#include <vector>
#include <string.h>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <math.h>#define MAXN ((int)1e5+7)
#define ll long long
#define INF (0x7f7f7f7f)
#define fori(lef, rig) for(int i=lef; i<=rig; i++)
#define forj(lef, rig) for(int j=lef; j<=rig; j++)
#define fork(lef, rig) for(int k=lef; k<=rig; k++)
#define QAQ (0)using namespace std;#define show(x...)                             \do {                                       \cout << "\033[31;1m " << #x << " -> "; \err(x);                                \} while (0)void err() { cout << "\033[39;0m" << endl; }
template<typename T, typename... A>
void err(T a, A... x) { cout << a << ' '; err(x...); }namespace FastIO {char print_f[105];void read() { }void print() { putchar('\n'); }template <typename T, typename... T2>inline void read(T &x, T2 &... oth) {x = 0;char ch = getchar();ll f = 1;while (!isdigit(ch)) {if (ch == '-') f *= -1; ch = getchar();}while (isdigit(ch)) {x = x * 10 + ch - 48;ch = getchar();}x *= f;read(oth...);}template <typename T, typename... T2>inline void print(T x, T2... oth) {ll p3=-1;if(x<0) putchar('-'), x=-x;do{print_f[++p3] = x%10 + 48;} while(x/=10);while(p3>=0) putchar(print_f[p3--]);putchar(' ');print(oth...);}
} // namespace FastIO
using FastIO::print;
using FastIO::read;int n, m, Q, K, vis[MAXN];
char buf[MAXN];int main() {#ifdef debugfreopen("test", "r", stdin);// freopen("out_main", "w", stdout);clock_t stime = clock();
#endifcin.getline(buf, sizeof(buf));bool ok = true;for(int i=0; buf[i]; i++) {if(buf[i]>='A' && buf[i]<='Z' && !vis[int(buf[i])]) {vis[int(buf[i])] = true;ok = false;putchar(buf[i]);}}if(ok)printf("Not Found\n");#ifdef debugclock_t etime = clock();printf("rum time: %lf 秒\n",(double) (etime-stime)/CLOCKS_PER_SEC);
#endif return 0;
}

7-14 输出大写英文字母 (15分) 瞎搞相关推荐

  1. 7-9 输出大写英文字母 (15 分)

    7-9 输出大写英文字母 (15 分) 本题要求编写程序,顺序输出给定字符串中所出现过的大写英文字母,每个字母只输出一遍:若无大写英文字母则输出"Not Found". 输入格式: ...

  2. 带注释 实验7-3-5 输出大写英文字母 (15分)

    实验7-3-5 输出大写英文字母 (15分) 本题要求编写程序,顺序输出给定字符串中所出现过的大写英文字母,每个字母只输出一遍:若无大写英文字母则输出"Not Found". 输入 ...

  3. 实验7-3-5 输出大写英文字母(15分)

    实验7-3-5 输出大写英文字母 (15 分) 本题要求编写程序,顺序输出给定字符串中所出现过的大写英文字母,每个字母只输出一遍:若无大写英文字母则输出"Not Found". 输 ...

  4. PTA-7-1 输出大写英文字母 (15分)(C语言)

    本题要求编写程序,顺序输出给定字符串中所出现过的大写英文字母,每个字母只输出一遍:若无大写英文字母则输出"Not Found". 输入格式: 输入为一个以回车结束的字符串(少于80 ...

  5. 7-156 输出大写英文字母 (15 分)

    本题要求编写程序,顺序输出给定字符串中所出现过的大写英文字母,每个字母只输出一遍:若无大写英文字母则输出"Not Found". 输入格式: 输入为一个以回车结束的字符串(少于80 ...

  6. 7-21 输出大写英文字母 (15分)

    本题要求编写程序,顺序输出给定字符串中所出现过的大写英文字母,每个字母只输出一遍:若无大写英文字母则输出"Not Found". 输入格式: 输入为一个以回车结束的字符串(少于80 ...

  7. 7-11 输出大写英文字母 (15 分)

    本题要求编写程序,顺序输出给定字符串中所出现过的大写英文字母,每个字母只输出一遍:若无大写英文字母则输出"Not Found". 输入格式: 输入为一个以回车结束的字符串(少于80 ...

  8. 第3章-22 输出大写英文字母 (15分)

    本题要求编写程序,顺序输出给定字符串中所出现过的大写英文字母,每个字母只输出一遍:若无大写英文字母则输出"Not Found". 输入格式: 输入为一个以回车结束的字符串(少于80 ...

  9. 第3章-22 输出大写英文字母 (15 分)

    致读者:本人是一名通信专业学生,仅学了4天Python ,难免有些地方写的很笨拙. 写博客一方面是为了记录自己的学习过程中遇到的问题和思考,一方面是希望能够帮助到很多和自己一样处于困惑的读者. 水平有 ...

最新文章

  1. 美观实用!Star 过万,用 Python 做交互式图形的这款工具火了!
  2. 重记解决kube-dns故障一则---ceph惹的祸
  3. 【Verilog】 3-8译码器
  4. numpy中reshape方法详解
  5. 【杂谈】如何让2020年秋招CV项目能力更加硬核,可深入学习有三秋季划4大领域32个方向
  6. Educational Round 64 题解
  7. 线性代数(矩阵、高斯、线性基……)
  8. flink 复杂事件_复杂的(事件)世界
  9. MySQL实战 | 01 当执行一条 select 语句时,MySQL 到底做了啥?
  10. c程序员的python开发总结
  11. WebService工具类调用远程接口服务时java.io.IOException: Server returned HTTP response code: 500 for URL XXX
  12. ES6——Set和WeakSet
  13. coreldraw水涟漪怎么做_不懂怎么挑选水处理设备?跟贝斯沃了解这3点再做决定,轻松挑出适合自己的...
  14. 2018-2019-2 20175215 实验五《网络编程与安全》实验报告
  15. IOS 手写控件 简单播放器 AVFoundation音乐播放
  16. 自适应直方图均衡化matlab 程序,直方图均衡化程序 matlab
  17. 北京二手房价10月微涨 业内:坚持限购就不会大涨
  18. windows自动化操作——程序员必备
  19. 领取CPS外卖红包攻略及小程序项目源码
  20. 题目 1536: 最长单词

热门文章

  1. 汇顶科技联手镭速传输,打造科技创新!
  2. 名帖385 文徵明 行草《雪诗卷》
  3. 高德地图 瓦片地图上画圆,线段等
  4. 售前成本评估你做对了吗?
  5. MySQL数据库——MySQL是什么?它有什么优势?
  6. 为什么一个概念会非常难懂呢?人是如何理解的呢?
  7. php cli python,PHP MVC框架 CodeIgniter CLI模式简介
  8. 9.使用M4sh编程
  9. 安卓app保持屏幕常亮
  10. SpringAOP技术【松思园】