Submission #91127


Source Code Expand

Copy
import java.io.*;
import java.math.BigInteger;
import java.util.*;
import static java.util.Arrays.*;

public class Main {
	private static final int mod = (int)1e9+7;

	final IOFast io = new IOFast();
	
	public void run() throws IOException {
		int n = io.nextInt();
		int ans = 0;
		for(int i = 0; i < n; i++) {
			int v = 0;
			for(int j = 0; j < 5; j++) v += io.nextInt();
			if(v < 20) ans++;
		}
		io.out.println(ans);
	}
	
	
	
	void main() throws IOException {
		//		IOFast.setFileIO("rle-size.in", "rle-size.out");
		try {
			run();
		}
		catch (EndOfFileRuntimeException e) { }
		io.out.flush();
	}

	public static void main(String[] args) throws IOException {
		new Main().main();
	}
	
	static class EndOfFileRuntimeException extends RuntimeException {
		private static final long serialVersionUID = -8565341110209207657L; }

	static
	public class IOFast {
		private BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		private PrintWriter out = new PrintWriter(System.out);

		void setFileIO(String ins, String outs) throws IOException {
			in = new BufferedReader(new FileReader(ins));
			out = new PrintWriter(new FileWriter(outs));
		}

		//		private static final int BUFFER_SIZE = 50 * 200000;
		private static int pos, readLen;
		private static final char[] buffer = new char[1024 * 8];
		private static final char[] str = new char[500000*8*2];
		private static boolean[] isDigit = new boolean[256];
		private static boolean[] isSpace = new boolean[256];
		private static boolean[] isLineSep = new boolean[256];

		static {
			for(int i = 0; i < 10; i++) { isDigit['0' + i] = true; }
			isDigit['-'] = true;
			isSpace[' '] = isSpace['\r'] = isSpace['\n'] = isSpace['\t'] = true;
			isLineSep['\r'] = isLineSep['\n'] = true;
		}

		public int read() throws IOException {
			if(pos >= readLen) {
				pos = 0;
				readLen = in.read(buffer);
				if(readLen <= 0) { throw new EndOfFileRuntimeException(); }
			}
			return buffer[pos++];
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(nextString());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(nextString());
		}

		public char nextChar() throws IOException {
			while(true) {
				final int c = read();
				if(!isSpace[c]) { return (char)c; }
			}
		}
		
		int reads(char[] cs, int len, boolean[] accept) throws IOException {
			try {
				while(true) {
					final int c = read();
					if(accept[c]) { break; }
					str[len++] = (char)c;
				}
			}
			catch(EndOfFileRuntimeException e) { ; }
			
			return len;
		}

		public char[] nextLine() throws IOException {
			int len = 0;
			str[len++] = nextChar();
			len = reads(str, len, isLineSep);
			
			try {
				if(str[len-1] == '\r') { len--; read(); }
			}
			catch(EndOfFileRuntimeException e) { ; }
			
			return Arrays.copyOf(str, len);
		}

		public String nextString() throws IOException {
			return new String(next());
		}

		public char[] next() throws IOException {
			int len = 0;
			str[len++] = nextChar();
			len = reads(str, len, isSpace);
			return Arrays.copyOf(str, len);
		}

		public double nextDouble() throws IOException {
			return Double.parseDouble(nextString());
		}

	}

}

Submission Info

Submission Time
Task B - 天下一難易度設定
User tanzaku
Language Java (OpenJDK 1.7.0)
Score 30
Code Size 3327 Byte
Status AC
Exec Time 424 ms
Memory 34568 KB

Judge Result

Set Name All
Score / Max Score 30 / 30
Status
AC × 99
Set Name Test Cases
All 01_input10, 01_input11, 01_input12, 01_input13, 01_input14, 01_input15, 01_input16, 01_input17, 01_input18, 01_input19, 01_input2, 01_input20, 01_input21, 01_input22, 01_input23, 01_input24, 01_input25, 01_input26, 01_input27, 01_input28, 01_input29, 01_input3, 01_input30, 01_input4, 01_input5, 01_input6, 01_input7, 01_input8, 01_input9, 01_manual1, 01_rand31, 01_rand32, 01_rand33, 01_rand34, 01_rand35, 01_rand36, 01_rand37, 01_rand38, 01_rand39, 01_rand40, 01_rand41, 01_rand42, 01_rand43, 01_rand44, 01_rand45, 01_rand46, 01_rand47, 01_rand48, 01_rand49, 01_rand50, 01_rand51, 01_rand52, 01_rand53, 01_rand54, 01_rand55, 01_rand56, 01_rand57, 01_rand58, 01_rand59, 01_rand60, 01_rand61, 01_rand62, 01_rand63, 01_rand64, 01_rand65, 01_rand66, 01_rand67, 01_rand68, 01_rand69, 01_rand70, 01_rand71, 01_rand72, 01_rand73, 01_rand74, 01_rand75, 01_rand76, 01_rand77, 01_rand78, 01_rand79, 01_rand80, 01_rand81, 01_rand82, 01_rand83, 01_rand84, 01_rand85, 01_rand86, 01_rand87, 01_rand88, 01_rand89, 01_rand90, 01_rand91, 01_rand92, 01_rand93, 01_rand94, 01_rand95, 01_rand96, 01_rand97, 01_rand98, 01_rand99
Case Name Status Exec Time Memory
01_input10 AC 424 ms 34568 KB
01_input11 AC 383 ms 34268 KB
01_input12 AC 384 ms 34308 KB
01_input13 AC 382 ms 34260 KB
01_input14 AC 395 ms 34356 KB
01_input15 AC 398 ms 34244 KB
01_input16 AC 386 ms 34352 KB
01_input17 AC 388 ms 34356 KB
01_input18 AC 382 ms 34212 KB
01_input19 AC 384 ms 34332 KB
01_input2 AC 389 ms 34224 KB
01_input20 AC 385 ms 34312 KB
01_input21 AC 387 ms 34212 KB
01_input22 AC 397 ms 34384 KB
01_input23 AC 391 ms 34344 KB
01_input24 AC 389 ms 34348 KB
01_input25 AC 388 ms 34280 KB
01_input26 AC 393 ms 34268 KB
01_input27 AC 385 ms 34224 KB
01_input28 AC 390 ms 34332 KB
01_input29 AC 400 ms 34224 KB
01_input3 AC 408 ms 34228 KB
01_input30 AC 393 ms 34224 KB
01_input4 AC 380 ms 34284 KB
01_input5 AC 392 ms 34284 KB
01_input6 AC 394 ms 34356 KB
01_input7 AC 391 ms 34280 KB
01_input8 AC 405 ms 34356 KB
01_input9 AC 390 ms 34332 KB
01_manual1 AC 383 ms 34220 KB
01_rand31 AC 385 ms 34224 KB
01_rand32 AC 394 ms 34224 KB
01_rand33 AC 385 ms 34224 KB
01_rand34 AC 388 ms 34228 KB
01_rand35 AC 392 ms 34232 KB
01_rand36 AC 388 ms 34224 KB
01_rand37 AC 389 ms 34208 KB
01_rand38 AC 383 ms 34212 KB
01_rand39 AC 384 ms 34224 KB
01_rand40 AC 412 ms 34228 KB
01_rand41 AC 388 ms 34264 KB
01_rand42 AC 384 ms 34228 KB
01_rand43 AC 383 ms 34276 KB
01_rand44 AC 391 ms 34216 KB
01_rand45 AC 394 ms 34352 KB
01_rand46 AC 383 ms 34268 KB
01_rand47 AC 385 ms 34228 KB
01_rand48 AC 381 ms 34276 KB
01_rand49 AC 390 ms 34292 KB
01_rand50 AC 382 ms 34220 KB
01_rand51 AC 405 ms 34168 KB
01_rand52 AC 395 ms 34360 KB
01_rand53 AC 382 ms 34280 KB
01_rand54 AC 390 ms 34284 KB
01_rand55 AC 386 ms 34216 KB
01_rand56 AC 393 ms 34148 KB
01_rand57 AC 377 ms 34276 KB
01_rand58 AC 383 ms 34228 KB
01_rand59 AC 376 ms 34228 KB
01_rand60 AC 384 ms 34224 KB
01_rand61 AC 379 ms 34224 KB
01_rand62 AC 384 ms 34276 KB
01_rand63 AC 384 ms 34224 KB
01_rand64 AC 396 ms 34348 KB
01_rand65 AC 384 ms 34220 KB
01_rand66 AC 380 ms 34220 KB
01_rand67 AC 380 ms 34308 KB
01_rand68 AC 382 ms 34348 KB
01_rand69 AC 378 ms 34204 KB
01_rand70 AC 386 ms 34272 KB
01_rand71 AC 378 ms 34276 KB
01_rand72 AC 379 ms 34232 KB
01_rand73 AC 381 ms 34276 KB
01_rand74 AC 410 ms 34340 KB
01_rand75 AC 381 ms 34236 KB
01_rand76 AC 387 ms 34252 KB
01_rand77 AC 381 ms 34224 KB
01_rand78 AC 386 ms 34228 KB
01_rand79 AC 381 ms 34352 KB
01_rand80 AC 382 ms 34204 KB
01_rand81 AC 383 ms 34356 KB
01_rand82 AC 387 ms 34224 KB
01_rand83 AC 378 ms 34212 KB
01_rand84 AC 386 ms 34204 KB
01_rand85 AC 382 ms 34224 KB
01_rand86 AC 382 ms 34228 KB
01_rand87 AC 382 ms 34268 KB
01_rand88 AC 381 ms 34336 KB
01_rand89 AC 381 ms 34220 KB
01_rand90 AC 386 ms 34272 KB
01_rand91 AC 385 ms 34340 KB
01_rand92 AC 379 ms 34356 KB
01_rand93 AC 382 ms 34264 KB
01_rand94 AC 393 ms 34224 KB
01_rand95 AC 380 ms 34208 KB
01_rand96 AC 383 ms 34224 KB
01_rand97 AC 379 ms 34264 KB
01_rand98 AC 384 ms 34260 KB
01_rand99 AC 400 ms 34332 KB