結果
| 問題 |
No.305 鍵(2)
|
| コンテスト | |
| ユーザー |
ルッツファン
|
| 提出日時 | 2015-11-27 23:23:15 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 116 ms / 2,000 ms |
| コード長 | 1,620 bytes |
| コンパイル時間 | 3,688 ms |
| コンパイル使用メモリ | 77,672 KB |
| 実行使用メモリ | 55,680 KB |
| 平均クエリ数 | 44.08 |
| 最終ジャッジ日時 | 2024-07-16 21:50:28 |
| 合計ジャッジ時間 | 5,868 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 13 |
ソースコード
package yukicoder;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class yukicoder02 {
public static void main(String[] args){
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String tes = null;
char[] peso = {48,48,48,48,48,48,48,48,48,48};
//sysgoer(peso);
System.out.println(peso);
try {
tes = br.readLine();
} catch (IOException e) {
// TODO 自動生成された catch ブロック
e.printStackTrace();
}
if(tes.equals("10 unlocked")){
try {
br.close();
} catch (IOException e) {
// TODO 自動生成された catch ブロック
e.printStackTrace();
}
System.exit(0);
}
String[] tew = tes.split(" ");
int i = 0;
String tmp = null;
int hai = 0;
int kazu =Integer.parseInt(tew[0]);
int kazu2 = kazu;
while(true){
peso[hai]++;
System.out.println(peso);
try {
tes = br.readLine();
} catch (IOException e) {
// TODO 自動生成された catch ブロック
e.printStackTrace();
}
if(tes.equals("10 unlocked")){
try {
br.close();
} catch (IOException e) {
// TODO 自動生成された catch ブロック
e.printStackTrace();
}
System.exit(0);
}
tew = tes.split(" ");
kazu =Integer.parseInt(tew[0]);
if(kazu < kazu2){
peso[hai]--;
hai++;
}else if(kazu > kazu2){
hai++;
kazu2 = kazu;
}
}
}
// public static void sysgoer(char[] peso){
// for(int i=0;i < 10;i++){
// System.out.print(peso[i]);
// }
// System.out.println();
//
// }
}
ルッツファン