Codeforces 443A Anton and Letters(水题)
来源:互联网 发布:ubuntu更新软件的方法 编辑:程序博客网 时间:2024/05/16 06:47
题目链接:Codeforces 443A Anton and Letters
题目大意:给出一个字母的集合,问说有多少个不同的元素。
解题思路:水题。
#include <cstdio>#include <cstring>const int N = 1005;int n, v[N];char s[N];int main () { int ans = 0; memset(v, 0, sizeof(v)); gets(s); n = strlen(s); for (int i = 0; i < n; i++) { if (s[i] >= 'A' && s[i] <= 'z') { int u = s[i] - 'A'; if (v[u] == 0) ans++; v[u] = 1; } } printf("%d\n", ans); return 0;}
0 0
- Codeforces 443A Anton and Letters(水题)
- CodeForces 443A Anton and Letters
- CodeForces 443A Anton and Letters
- 443A - Anton and Letters
- codeforces——443A——Anton and Letters
- Codeforces Anton and Letters
- A. Anton and Letters
- Codeforces Round #253 (Div. 2)A. Anton and Letters
- Codeforces Round #253 (Div. 2) A. Anton and Letters
- CF 253A. Anton and Letters
- A. Anton and Letters Codeforces Round #253 (Div. 2) set 应用
- CodeForces 785A Anton and Polyhedrons【水题】
- cf443A Anton and Letters
- Anton and Letters
- Anton and Letters - CF#253 (Div. 2)A (443A) 大水
- 【77.39%】【codeforces 734A】Anton and Danik
- codeforces 734A .Anton and Danik
- 【codeforces 785A】Anton and Polyhedrons
- 一句话的经典
- 浅谈java中的集合类
- 格式化命令行参数getopt和getopts的使用
- DLL 实现单元
- 【unix网络编程】4-11显示客户IP地址和端口号的时间获取服务程序
- Codeforces 443A Anton and Letters(水题)
- leetcode:Remove Duplicates from Sorted List
- Android笔记之 Web Service 基础
- qSort implemented in recursion and non-recuision version
- Codeforces 19D Points 线段树+set
- The Problems of zoj By watashi
- (转)logback 配置详解(一)
- 如何判断两个链表相交及找到第一个相交点
- 关于S3C2440de6410的CPU,关于FPU方面的配置