結果
| 問題 | No.183 たのしい排他的論理和(EASY) |
| コンテスト | |
| ユーザー |
chiho_miyako
|
| 提出日時 | 2015-04-17 00:13:56 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,099 bytes |
| 記録 | |
| コンパイル時間 | 3,180 ms |
| コンパイル使用メモリ | 85,524 KB |
| 実行使用メモリ | 210,732 KB |
| 最終ジャッジ日時 | 2026-03-25 23:08:11 |
| 合計ジャッジ時間 | 53,474 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 2 WA * 5 RE * 3 TLE * 8 |
ソースコード
import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
Scanner koko = new Scanner(System.in);
int n = koko.nextInt();
int[] a = new int[n];
for(int i=0; i<n; i++){
a[i]=koko.nextInt();
}
boolean[][] haita = new boolean[n+1][16385];
haita[0][0]=true;
for(int j=0; j<16385; j++){
for(int i=0; i<n; i++){
boolean[] b = new boolean[n];
for(int l=0; l<n; l++){
if(haita[i][j]){
if(!b[l]){
haita[i+1][j^a[l]]=true;
b[l]=true;
}
}
}
}
}
int count=0;
for(int i=0; i<16385; i++){
for(int j=0; j<n+1; j++){
if(haita[j][i]){
count++;
break;
}
}
}
System.out.println(count);
}
}
chiho_miyako