Submission #1774499


Source Code Expand

import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;

public class Main{

	static PrintWriter out;
	static InputReader ir;

	static void solve(){
		int n=ir.nextInt();
		int[] t=ir.nextIntArray(n);
		int mi=Integer.MAX_VALUE;
		for(int i=0;i<n;i++){
			mi=Math.min(mi, t[i]);
		}
		out.println(mi);
	}

	public static void main(String[] args) throws Exception{
		ir=new InputReader(System.in);
		out=new PrintWriter(System.out);
		solve();
		out.flush();
	}

	static class InputReader {

		private InputStream in;
		private byte[] buffer=new byte[1024];
		private int curbuf;
		private int lenbuf;

		public InputReader(InputStream in) {this.in=in; this.curbuf=this.lenbuf=0;}

		public boolean hasNextByte() {
			if(curbuf>=lenbuf){
				curbuf= 0;
				try{
					lenbuf=in.read(buffer);
				}catch(IOException e) {
					throw new InputMismatchException();
				}
				if(lenbuf<=0) return false;
			}
			return true;
		}

		private int readByte(){if(hasNextByte()) return buffer[curbuf++]; else return -1;}

		private boolean isSpaceChar(int c){return !(c>=33&&c<=126);}

		private void skip(){while(hasNextByte()&&isSpaceChar(buffer[curbuf])) curbuf++;}

		public boolean hasNext(){skip(); return hasNextByte();}

		public String next(){
			if(!hasNext()) throw new NoSuchElementException();
			StringBuilder sb=new StringBuilder();
			int b=readByte();
			while(!isSpaceChar(b)){
				sb.appendCodePoint(b);
				b=readByte();
			}
			return sb.toString();
		}

		public int nextInt() {
			if(!hasNext()) throw new NoSuchElementException();
			int c=readByte();
			while (isSpaceChar(c)) c=readByte();
			boolean minus=false;
			if (c=='-') {
				minus=true;
				c=readByte();
			}
			int res=0;
			do{
				if(c<'0'||c>'9') throw new InputMismatchException();
				res=res*10+c-'0';
				c=readByte();
			}while(!isSpaceChar(c));
			return (minus)?-res:res;
		}

		public long nextLong() {
			if(!hasNext()) throw new NoSuchElementException();
			int c=readByte();
			while (isSpaceChar(c)) c=readByte();
			boolean minus=false;
			if (c=='-') {
				minus=true;
				c=readByte();
			}
			long res = 0;
			do{
				if(c<'0'||c>'9') throw new InputMismatchException();
				res=res*10+c-'0';
				c=readByte();
			}while(!isSpaceChar(c));
			return (minus)?-res:res;
		}

		public double nextDouble(){return Double.parseDouble(next());}

		public int[] nextIntArray(int n){
			int[] a=new int[n];
			for(int i=0;i<n;i++) a[i]=nextInt();
			return a;
		}

		public long[] nextLongArray(int n){
			long[] a=new long[n];
			for(int i=0;i<n;i++) a[i]=nextLong();
			return a;
		}

		public char[][] nextCharMap(int n,int m){
			char[][] map=new char[n][m];
			for(int i=0;i<n;i++) map[i]=next().toCharArray();
			return map;
		}
	}
}

Submission Info

Submission Time
Task B - おいしいたこ焼きの食べ方
User holeguma
Language Java8 (OpenJDK 1.8.0)
Score 100
Code Size 3014 Byte
Status AC
Exec Time 73 ms
Memory 24916 KB

Judge Result

Set Name All
Score / Max Score 100 / 100
Status
AC × 33
Set Name Test Cases
All rand0.txt, rand1.txt, rand10.txt, rand11.txt, rand12.txt, rand13.txt, rand14.txt, rand15.txt, rand16.txt, rand17.txt, rand18.txt, rand19.txt, rand2.txt, rand20.txt, rand21.txt, rand22.txt, rand23.txt, rand24.txt, rand25.txt, rand26.txt, rand27.txt, rand28.txt, rand29.txt, rand3.txt, rand4.txt, rand5.txt, rand6.txt, rand7.txt, rand8.txt, rand9.txt, s1.txt, s2.txt, s3.txt
Case Name Status Exec Time Memory
rand0.txt AC 70 ms 19156 KB
rand1.txt AC 70 ms 18516 KB
rand10.txt AC 70 ms 21076 KB
rand11.txt AC 72 ms 19028 KB
rand12.txt AC 70 ms 21204 KB
rand13.txt AC 70 ms 21076 KB
rand14.txt AC 72 ms 19796 KB
rand15.txt AC 71 ms 17364 KB
rand16.txt AC 71 ms 21204 KB
rand17.txt AC 70 ms 19284 KB
rand18.txt AC 70 ms 19156 KB
rand19.txt AC 71 ms 20820 KB
rand2.txt AC 70 ms 18132 KB
rand20.txt AC 72 ms 19156 KB
rand21.txt AC 70 ms 19284 KB
rand22.txt AC 72 ms 18900 KB
rand23.txt AC 70 ms 20180 KB
rand24.txt AC 70 ms 21076 KB
rand25.txt AC 71 ms 20692 KB
rand26.txt AC 71 ms 20436 KB
rand27.txt AC 70 ms 17108 KB
rand28.txt AC 70 ms 20052 KB
rand29.txt AC 69 ms 19412 KB
rand3.txt AC 71 ms 19028 KB
rand4.txt AC 71 ms 24916 KB
rand5.txt AC 71 ms 20692 KB
rand6.txt AC 71 ms 21204 KB
rand7.txt AC 71 ms 22612 KB
rand8.txt AC 69 ms 19924 KB
rand9.txt AC 71 ms 20308 KB
s1.txt AC 71 ms 19028 KB
s2.txt AC 69 ms 21204 KB
s3.txt AC 73 ms 20564 KB