SRM 145 ImageDithering

SRM 145 ImageDithering
 1 import  java.util. * ;
 2
 3 public   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}

你可能感兴趣的:(SRM 145 ImageDithering)