7-14 输出大写英文字母 (15分) 瞎搞
本题要求编写程序,顺序输出给定字符串中所出现过的大写英文字母,每个字母只输出一遍;若无大写英文字母则输出“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分) 瞎搞相关推荐
- 7-9 输出大写英文字母 (15 分)
7-9 输出大写英文字母 (15 分) 本题要求编写程序,顺序输出给定字符串中所出现过的大写英文字母,每个字母只输出一遍:若无大写英文字母则输出"Not Found". 输入格式: ...
- 带注释 实验7-3-5 输出大写英文字母 (15分)
实验7-3-5 输出大写英文字母 (15分) 本题要求编写程序,顺序输出给定字符串中所出现过的大写英文字母,每个字母只输出一遍:若无大写英文字母则输出"Not Found". 输入 ...
- 实验7-3-5 输出大写英文字母(15分)
实验7-3-5 输出大写英文字母 (15 分) 本题要求编写程序,顺序输出给定字符串中所出现过的大写英文字母,每个字母只输出一遍:若无大写英文字母则输出"Not Found". 输 ...
- PTA-7-1 输出大写英文字母 (15分)(C语言)
本题要求编写程序,顺序输出给定字符串中所出现过的大写英文字母,每个字母只输出一遍:若无大写英文字母则输出"Not Found". 输入格式: 输入为一个以回车结束的字符串(少于80 ...
- 7-156 输出大写英文字母 (15 分)
本题要求编写程序,顺序输出给定字符串中所出现过的大写英文字母,每个字母只输出一遍:若无大写英文字母则输出"Not Found". 输入格式: 输入为一个以回车结束的字符串(少于80 ...
- 7-21 输出大写英文字母 (15分)
本题要求编写程序,顺序输出给定字符串中所出现过的大写英文字母,每个字母只输出一遍:若无大写英文字母则输出"Not Found". 输入格式: 输入为一个以回车结束的字符串(少于80 ...
- 7-11 输出大写英文字母 (15 分)
本题要求编写程序,顺序输出给定字符串中所出现过的大写英文字母,每个字母只输出一遍:若无大写英文字母则输出"Not Found". 输入格式: 输入为一个以回车结束的字符串(少于80 ...
- 第3章-22 输出大写英文字母 (15分)
本题要求编写程序,顺序输出给定字符串中所出现过的大写英文字母,每个字母只输出一遍:若无大写英文字母则输出"Not Found". 输入格式: 输入为一个以回车结束的字符串(少于80 ...
- 第3章-22 输出大写英文字母 (15 分)
致读者:本人是一名通信专业学生,仅学了4天Python ,难免有些地方写的很笨拙. 写博客一方面是为了记录自己的学习过程中遇到的问题和思考,一方面是希望能够帮助到很多和自己一样处于困惑的读者. 水平有 ...
最新文章
- 美观实用!Star 过万,用 Python 做交互式图形的这款工具火了!
- 重记解决kube-dns故障一则---ceph惹的祸
- 【Verilog】 3-8译码器
- numpy中reshape方法详解
- 【杂谈】如何让2020年秋招CV项目能力更加硬核,可深入学习有三秋季划4大领域32个方向
- Educational Round 64 题解
- 线性代数(矩阵、高斯、线性基……)
- flink 复杂事件_复杂的(事件)世界
- MySQL实战 | 01 当执行一条 select 语句时,MySQL 到底做了啥?
- c程序员的python开发总结
- WebService工具类调用远程接口服务时java.io.IOException: Server returned HTTP response code: 500 for URL XXX
- ES6——Set和WeakSet
- coreldraw水涟漪怎么做_不懂怎么挑选水处理设备?跟贝斯沃了解这3点再做决定,轻松挑出适合自己的...
- 2018-2019-2 20175215 实验五《网络编程与安全》实验报告
- IOS 手写控件 简单播放器 AVFoundation音乐播放
- 自适应直方图均衡化matlab 程序,直方图均衡化程序 matlab
- 北京二手房价10月微涨 业内:坚持限购就不会大涨
- windows自动化操作——程序员必备
- 领取CPS外卖红包攻略及小程序项目源码
- 题目 1536: 最长单词