设为首页 加入收藏

TOP

POJ 3602 Typographical Ligatures
2015-07-20 17:26:56 来源: 作者: 【 】 浏览:2
Tags:POJ 3602 Typographical Ligatures

【题意简述】:题意就是输入一串字符串,问我们有多少种不同的字符,也就是说出现过一次的字符,下次就不记到种数中了,特别的有 ff, fi ,fl ,ffi ,ffl,'',``, 这几个每个算是一种。

【分析】:经过题意简述,便好解决了。

代码:

// 196K 0Ms
#include
  
   
#include
   
     #include
    
      using namespace std; char s[1000]; int count1[1000]; int ff[7]; int len; void solve() { int ans = 0; memset(count1,0,sizeof(count1)); memset(ff,0,sizeof(ff)); for(int i = 0;i
     
      >c) { if(c == EOF) break; if(c == ' '||c == '\n') continue; s[len++] = c; } solve(); return 0; }
     
    
   
  


】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇leetcode - Spiral Matrix II 下一篇hdu 4405 Aeroplane chess (概率..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·About - Redis (2025-12-26 08:20:56)
·Redis: A Comprehens (2025-12-26 08:20:53)
·Redis - The Real-ti (2025-12-26 08:20:50)
·Bash 脚本教程——Li (2025-12-26 07:53:35)
·实战篇!Linux shell (2025-12-26 07:53:32)