提出 #15419726
ソースコード 拡げる
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
import java.util.Iterator;
public class Main {
static BufferedReader reader;
final static boolean MODE_DEBUG = false;
static int[] read_line_int;
static int read_line_int_ptr;
static long[] read_line_long;
static int read_line_long_ptr;
static String[] read_line;
static int read_line_ptr;
//static field here
public static void main(String[] args) {
// TODO Auto-generated method stub
reader = new BufferedReader(new InputStreamReader(System.in));
//code here
int N = readInt();
int K = readInt();
int[] A = readLineInt();
for(int i=0;i<=N-K-1;i++) {
if(A[i]<A[i+K]) {
print("Yes");
}else {
print("No");
}
}
}
//functions here
//note that all methods should be STATIC
private static <T> int arraySearch(T needle, T[] heystack) {
for(int i=0;i<heystack.length;i++) {
if(needle.equals(heystack[i])) {
return i;
}
}
return -1;
}
private static int[] sort(int[] base) {
int[] copy = array_copy(base);
Arrays.sort(copy);
return copy;
}
private static int[] array_copy(int[] base) {
int[] copy = new int[base.length];
for(int i=0;i<base.length;i++) {
copy[i] = base[i];
}
return copy;
}
private static int[] asArray(ArrayList<Integer> ints) {
int[] intlist = new int[ints.size()];
for(int i=0;i<intlist.length;i++) {
intlist[i] = ints.get(i);
}
return intlist;
}
private static int readInt() {
if(read_line_int==null||read_line_int_ptr==read_line_int.length) {
read_line_int = readLineInt();
read_line_int_ptr=0;
}
return read_line_int[read_line_int_ptr++];
}
private static long readLong() {
if(read_line_long==null||read_line_long_ptr==read_line_long.length) {
read_line_long = readLineLong();
read_line_long_ptr=0;
}
return read_line_long[read_line_long_ptr++];
}
private static String readString() {
if(read_line==null||read_line_int_ptr==read_line.length) {
read_line = readLine();
read_line_ptr=0;
}
return read_line[read_line_ptr++];
}
private static String[] readLine(){
try{
return reader.readLine().split(" ");
}catch(Exception e){
e.printStackTrace();
return new String[]{e.getMessage()};
}
}
private static int[] readLineInt(){
try{
String[] s = readLine();
int[] ints = new int[s.length];
for(int i=0;i<ints.length;i++) {
ints[i] = Integer.parseInt(s[i]);
}
return ints;
}catch(Exception e){
e.printStackTrace();
return null;
}
}
private static long[] readLineLong(){
try{
String[] s = readLine();
long[] ints = new long[s.length];
for(int i=0;i<ints.length;i++) {
ints[i] = Long.parseLong(s[i]);
}
return ints;
}catch(Exception e){
e.printStackTrace();
return null;
}
}
private static byte[] readLineByte(){
try{
String[] s = readLine();
byte[] bytes = new byte[s.length];
for(int i=0;i<bytes.length;i++) {
bytes[i] = Byte.parseByte(s[i]);
}
return bytes;
}catch(Exception e){
e.printStackTrace();
return null;
}
}
private static char[] readLineChar(){
try{
String[] s = readLine();
char[] chars = new char[s.length];
for(int i=0;i<chars.length;i++) {
chars[i] = (char)Integer.parseInt(s[i]);
}
return chars;
}catch(Exception e){
e.printStackTrace();
return null;
}
}
private static void print(Object o){
System.out.println(o);
}
private static void print(){
System.out.println();
}
private static void printd(Object o){
if(MODE_DEBUG)System.err.println(o);
}
private static void printd(){
if(MODE_DEBUG)System.err.println();
}
}
提出情報
| 提出日時 | |
|---|---|
| 問題 | C - Marks |
| ユーザ | YutaGameMusic |
| 言語 | Java (OpenJDK 11.0.6) |
| 得点 | 300 |
| コード長 | 3902 Byte |
| 結果 | AC |
| 実行時間 | 992 ms |
| メモリ | 64888 KiB |
ジャッジ結果
| セット名 | Sample | All | ||||
|---|---|---|---|---|---|---|
| 得点 / 配点 | 0 / 0 | 300 / 300 | ||||
| 結果 |
|
|
| セット名 | テストケース |
|---|---|
| Sample | sample_01.txt, sample_02.txt, sample_03.txt |
| All | in01.txt, in02.txt, in03.txt, in04.txt, in05.txt, in06.txt, in07.txt, in08.txt, in09.txt, in10.txt, in11.txt, in12.txt, in13.txt, in14.txt, in15.txt, in16.txt, in17.txt, sample_01.txt, sample_02.txt, sample_03.txt |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| in01.txt | AC | 76 ms | 32156 KiB |
| in02.txt | AC | 677 ms | 63940 KiB |
| in03.txt | AC | 678 ms | 63220 KiB |
| in04.txt | AC | 671 ms | 62628 KiB |
| in05.txt | AC | 677 ms | 63884 KiB |
| in06.txt | AC | 985 ms | 64844 KiB |
| in07.txt | AC | 992 ms | 64888 KiB |
| in08.txt | AC | 245 ms | 61064 KiB |
| in09.txt | AC | 251 ms | 61540 KiB |
| in10.txt | AC | 676 ms | 63884 KiB |
| in11.txt | AC | 656 ms | 63812 KiB |
| in12.txt | AC | 695 ms | 58740 KiB |
| in13.txt | AC | 979 ms | 60428 KiB |
| in14.txt | AC | 254 ms | 61280 KiB |
| in15.txt | AC | 262 ms | 61100 KiB |
| in16.txt | AC | 74 ms | 32288 KiB |
| in17.txt | AC | 77 ms | 32428 KiB |
| sample_01.txt | AC | 82 ms | 32452 KiB |
| sample_02.txt | AC | 74 ms | 32384 KiB |
| sample_03.txt | AC | 75 ms | 32436 KiB |