设为首页 加入收藏

TOP

POJ 3602 Typographical Ligatures
2015-07-20 17:26:56 来源: 作者: 【 】 浏览:3
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 (概率..

评论

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

·Python爬虫教程(从 (2025-12-26 16:49:14)
·【全269集】B站最详 (2025-12-26 16:49:11)
·Python爬虫详解:原 (2025-12-26 16:49:09)
·Spring Boot Java: (2025-12-26 16:20:19)
·Spring BootでHello (2025-12-26 16:20:15)