git reimport
This commit is contained in:
34
archive/2017.09/2017.09.18 - unsorted/G.java
Normal file
34
archive/2017.09/2017.09.18 - unsorted/G.java
Normal file
@@ -0,0 +1,34 @@
|
||||
package chelper;
|
||||
|
||||
import io.InputReader;
|
||||
import io.OutputWriter;
|
||||
import misc.SimpleSavingChelperSolution;
|
||||
|
||||
|
||||
public class G extends SimpleSavingChelperSolution {
|
||||
|
||||
public void solve(int testNumber, InputReader in, OutputWriter out) {
|
||||
wrapSolve(testNumber, in, out);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void solve(int testNumber) {
|
||||
int n = in.nextInt();
|
||||
|
||||
int[] a = new int[7];
|
||||
|
||||
|
||||
int max = 0;
|
||||
|
||||
for (int i = 0; i < n; i++) {
|
||||
String s = in.nextString();
|
||||
|
||||
for (int j = 0; j < 7; j++) {
|
||||
a[j] += s.charAt(j) == '1' ? 1 : 0;
|
||||
max = Math.max(max, a[j]);
|
||||
}
|
||||
}
|
||||
|
||||
out.println(max);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user