結果
| 問題 | No.3556 KCPC or KUPC |
| コンテスト | |
| ユーザー |
37zigen
|
| 提出日時 | 2026-05-29 19:08:42 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
AC
|
| 実行時間 | 40 ms / 2,000 ms |
| コード長 | 5,517 bytes |
| 記録 | |
| コンパイル時間 | 3,783 ms |
| コンパイル使用メモリ | 87,280 KB |
| 実行使用メモリ | 39,680 KB |
| 最終ジャッジ日時 | 2026-05-29 19:08:48 |
| 合計ジャッジ時間 | 5,146 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
| 純コード判定待ち |
(要ログイン)
| サブタスク | 配点 | 結果 |
|---|---|---|
| 部分点1 | 5 % | AC * 2 |
| 部分点2 | 5 % | AC * 2 |
| 部分点3 | 5 % | AC * 2 |
| 部分点4 | 5 % | AC * 2 |
| 部分点5 | 5 % | AC * 2 |
| 部分点6 | 6 % | AC * 2 |
| 部分点7 | 7 % | AC * 2 |
| 部分点8 | 8 % | AC * 2 |
| 部分点9 | 9 % | AC * 2 |
| 部分点10 | 10 % | AC * 2 |
| 部分点11 | 5 % | AC * 10 |
| 部分点12 | 5 % | AC * 10 |
| 部分点13 | 25 % | AC * 20 |
| 合計 | 100 点 |
ソースコード
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintStream;
import java.io.PrintWriter;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.nio.file.Files;
import java.nio.file.LinkOption;
import java.nio.file.OpenOption;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.attribute.FileAttribute;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map.Entry;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.Optional;
import java.util.Queue;
import java.util.Set;
import java.util.TreeSet;
import java.util.function.Consumer;
import java.util.function.Predicate;
import java.util.function.Supplier;
import java.util.regex.Pattern;
import java.util.stream.Stream;
public class Main {
static MyPrintWriter pw = MyPrintWriter.getInstance();
static FastScanner sc = FastScanner.getInstance();
public static void main(String[] args) throws IOException {
Thread.setDefaultUncaughtExceptionHandler((t, e) -> System.exit(1));
new Main().run();
pw.flush();
}
void run() {
int N = sc.nextInt();
char[][] S = sc.nextChars(N, N);
int d = S.length / 11;
if (S[0][S.length - (2 * d)] == '#') {
pw.println("KCPC");
} else {
pw.println("KUPC");
}
}
}
class FastScanner {
private static FastScanner instance = null;
private final InputStream in = System.in;
private final byte[] buffer = new byte[1 << 16];
private int ptr = 0;
private int buflen = 0;
private FastScanner() {
}
public static FastScanner getInstance() {
if (instance == null) {
instance = new FastScanner();
}
return instance;
}
private boolean hasNextByte() {
if (this.ptr < this.buflen) {
return true;
}
this.ptr = 0;
try {
this.buflen = this.in.read(this.buffer);
} catch (IOException e) {
e.printStackTrace();
}
return this.buflen > 0;
}
private int readByte() {
if (hasNextByte()) {
return this.buffer[this.ptr++];
} else {
return -1;
}
}
private boolean isPrintableChar(int c) {
return (33 <= c) && (c <= 126);
}
public boolean hasNext() {
while (hasNextByte() && (!isPrintableChar(this.buffer[this.ptr]))) {
this.ptr++;
}
return hasNextByte();
}
public String next() {
if (!hasNext()) {
throw new NoSuchElementException();
}
StringBuilder sb = new StringBuilder();
int b = readByte();
while (isPrintableChar(b)) {
sb.appendCodePoint(b);
b = readByte();
}
return sb.toString();
}
public long nextLong() {
if (!hasNext()) {
throw new NoSuchElementException();
}
long n = 0;
boolean minus = false;
int b = readByte();
if (b == '-') {
minus = true;
b = readByte();
}
while ((b >= '0') && (b <= '9')) {
// n = n * 10 + (b - '0');
n = ((n << 1) + (n << 3)) + (b - '0');
b = readByte();
}
return minus ? -n : n;
}
public int nextInt() {
return ((int) (nextLong()));
}
public char[][] nextChars(int H, int W) {
if (W == 0) {
return new char[H][0];
}
char[][] a = new char[H][];
for (int i = 0; i < H; i++) {
a[i] = next().toCharArray();
}
return a;
}
}
class MergeFiles {}
class MyPrintWriter extends PrintWriter {
private static MyPrintWriter instance = null;
private MyPrintWriter() {
super(System.out);
}
public static MyPrintWriter getInstance() {
if (instance == null) {
instance = new MyPrintWriter();
}
return instance;
}
}
// --- Original Code ---
// import java.io.IOException;
// import java.util.Arrays;
//
// import library.tools.FastScanner;
// import library.tools.MergeFiles;
// import library.tools.MyPrintWriter;
// import library.util.ArrayUtils;
// import library.util.polynomial.PolynomialFpDynamic;
// import library.util.polynomial.PolynomialFpDynamic2D;
// import library.util.polynomial.PolynomialFpDynamic3D;
// import library.util.polynomial.PolynomialLong2D;
// import library.util.polynomial.PolynomialLong3D;
//
// public class Main {
// static MyPrintWriter pw = MyPrintWriter.getInstance();
// static FastScanner sc = FastScanner.getInstance();
//
// public static void main(String[] args) throws IOException {
// new Main().run();
// pw.flush();
// MergeFiles.export();
// }
//
// void run() {
// int N=sc.nextInt();
// char[][]S=sc.nextChars(N, N);
// int d=S.length/11;
// if(S[0][S.length-2*d]=='#') {
// pw.println("KCPC");
// } else {
// pw.println("KUPC");
// }
// }
//
//
// void tr(Object... objects) {
// System.out.println(Arrays.deepToString(objects));
// }
// }
37zigen