随笔 - 5  文章 - 0  trackbacks - 0
<2009年3月>
22232425262728
1234567
891011121314
15161718192021
22232425262728
2930311234

常用链接

留言簿(1)

随笔分类

随笔档案

文章分类

搜索

  •  

最新评论

阅读排行榜

评论排行榜

 1import java.util.*;
 2
 3public class ImageDithering {
 4    public int count(String dithered, String[] screen) {
 5        int ans = 0;
 6        for (int i = 0; i < screen.length; ++i) {
 7            for (int j = 0; j < screen[0].length(); ++j) {
 8                char ch = screen[i].charAt(j);
 9                if (dithered.indexOf(ch) != -1{
10                    ++ans;
11                }

12            }

13        }

14        return ans;
15    }

16}
posted on 2009-03-21 10:21 edwing 阅读(84) 评论(0)  编辑  收藏 所属分类: tc_exercise

只有注册用户登录后才能发表评论。


网站导航: