Submission #112061
Source Code Expand
let (n,m) = Scanf.scanf "%d %d\n" (fun n m -> (n,m));; let e = let rec add_edge t = if t = 0 then [] else (Scanf.scanf "%d %d\n" (fun a b -> (a-1,b-1)) :: (add_edge (t-1))) in add_edge m;; let rec is_clique2 h t e = match t with [] -> true | (hh::tt) -> if ((List.mem (h,hh) e) ||(List.mem (hh,h) e)) then is_clique2 h tt e else false;; let rec is_clique l e sz = match l with [] -> sz | h::t -> if (is_clique2 h t e) then (is_clique t e sz) else 0;; let solve = let rec search l i m e sz = if i = m then (is_clique l e sz) else (let t1 = search (i::l) (i+1) m e (sz+1) in let t2 = search l (i+1) m e sz in (max t1 t2)) in search [] 0 n e 0;; Printf.printf "%d\n" solve;;
Submission Info
Submission Time | |
---|---|
Task | D - 派閥 |
User | eha |
Language | OCaml (3.12.1) |
Score | 100 |
Code Size | 894 Byte |
Status | AC |
Exec Time | 579 ms |
Memory | 3232 KB |
Judge Result
Set Name | all | ||
---|---|---|---|
Score / Max Score | 100 / 100 | ||
Status |
|
Set Name | Test Cases |
---|---|
all | 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 00_sample_04.txt, test_01.txt, test_02.txt, test_03.txt, test_04.txt, test_05.txt, test_06.txt, test_07.txt, test_08.txt, test_09.txt, test_10.txt, test_11.txt, test_12.txt, test_13.txt, test_14.txt, test_15.txt, test_16.txt, test_17.txt, test_18.txt, test_19.txt, test_20.txt, test_21.txt, test_22.txt, test_23.txt, test_24.txt, test_25.txt, test_26.txt, test_27.txt, test_28.txt, test_29.txt, test_30.txt, test_31.txt, test_32.txt, test_33.txt, test_34.txt, test_35.txt, test_36.txt, test_37.txt, test_38.txt, test_39.txt, test_40.txt, test_41.txt, test_42.txt, test_43.txt, test_44.txt, test_45.txt, test_46.txt, test_47.txt, test_48.txt, test_49.txt, test_50.txt, test_51.txt, test_52.txt, test_53.txt, test_54.txt, test_55.txt, test_56.txt, test_57.txt, test_58.txt, test_59.txt, test_60.txt, test_61.txt, test_62.txt, test_63.txt, test_64.txt, test_65.txt, test_66.txt, test_67.txt, test_68.txt, test_69.txt, test_70.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_sample_01.txt | AC | 55 ms | 1088 KB |
00_sample_02.txt | AC | 26 ms | 1180 KB |
00_sample_03.txt | AC | 26 ms | 1088 KB |
00_sample_04.txt | AC | 29 ms | 1336 KB |
test_01.txt | AC | 25 ms | 1196 KB |
test_02.txt | AC | 25 ms | 1088 KB |
test_03.txt | AC | 25 ms | 1012 KB |
test_04.txt | AC | 25 ms | 1088 KB |
test_05.txt | AC | 25 ms | 1088 KB |
test_06.txt | AC | 27 ms | 1088 KB |
test_07.txt | AC | 27 ms | 1088 KB |
test_08.txt | AC | 29 ms | 1216 KB |
test_09.txt | AC | 47 ms | 1400 KB |
test_10.txt | AC | 33 ms | 1240 KB |
test_11.txt | AC | 31 ms | 1272 KB |
test_12.txt | AC | 172 ms | 2356 KB |
test_13.txt | AC | 25 ms | 1112 KB |
test_14.txt | AC | 25 ms | 1088 KB |
test_15.txt | AC | 26 ms | 1184 KB |
test_16.txt | AC | 38 ms | 1216 KB |
test_17.txt | AC | 91 ms | 1724 KB |
test_18.txt | AC | 36 ms | 1344 KB |
test_19.txt | AC | 213 ms | 2496 KB |
test_20.txt | AC | 490 ms | 3136 KB |
test_21.txt | AC | 47 ms | 1344 KB |
test_22.txt | AC | 219 ms | 2492 KB |
test_23.txt | AC | 219 ms | 2496 KB |
test_24.txt | AC | 574 ms | 3136 KB |
test_25.txt | AC | 29 ms | 1136 KB |
test_26.txt | AC | 79 ms | 1728 KB |
test_27.txt | AC | 32 ms | 1216 KB |
test_28.txt | AC | 25 ms | 1088 KB |
test_29.txt | AC | 28 ms | 1216 KB |
test_30.txt | AC | 48 ms | 1344 KB |
test_31.txt | AC | 83 ms | 1596 KB |
test_32.txt | AC | 97 ms | 1724 KB |
test_33.txt | AC | 391 ms | 3132 KB |
test_34.txt | AC | 91 ms | 1724 KB |
test_35.txt | AC | 392 ms | 3136 KB |
test_36.txt | AC | 575 ms | 3132 KB |
test_37.txt | AC | 37 ms | 1344 KB |
test_38.txt | AC | 463 ms | 3136 KB |
test_39.txt | AC | 162 ms | 2240 KB |
test_40.txt | AC | 49 ms | 1600 KB |
test_41.txt | AC | 529 ms | 3136 KB |
test_42.txt | AC | 576 ms | 3136 KB |
test_43.txt | AC | 46 ms | 1472 KB |
test_44.txt | AC | 198 ms | 2496 KB |
test_45.txt | AC | 154 ms | 2112 KB |
test_46.txt | AC | 263 ms | 2876 KB |
test_47.txt | AC | 391 ms | 3132 KB |
test_48.txt | AC | 576 ms | 3136 KB |
test_49.txt | AC | 68 ms | 1600 KB |
test_50.txt | AC | 53 ms | 1584 KB |
test_51.txt | AC | 84 ms | 1728 KB |
test_52.txt | AC | 71 ms | 1600 KB |
test_53.txt | AC | 92 ms | 1984 KB |
test_54.txt | AC | 79 ms | 1728 KB |
test_55.txt | AC | 232 ms | 2752 KB |
test_56.txt | AC | 138 ms | 2236 KB |
test_57.txt | AC | 140 ms | 2212 KB |
test_58.txt | AC | 194 ms | 2348 KB |
test_59.txt | AC | 361 ms | 3136 KB |
test_60.txt | AC | 574 ms | 3232 KB |
test_61.txt | AC | 579 ms | 3132 KB |
test_62.txt | AC | 27 ms | 1120 KB |
test_63.txt | AC | 72 ms | 1600 KB |
test_64.txt | AC | 67 ms | 1600 KB |
test_65.txt | AC | 86 ms | 1776 KB |
test_66.txt | AC | 62 ms | 1472 KB |
test_67.txt | AC | 70 ms | 1720 KB |
test_68.txt | AC | 71 ms | 1592 KB |
test_69.txt | AC | 82 ms | 1756 KB |
test_70.txt | AC | 92 ms | 1732 KB |