Submission #111573
Source Code Expand
// Generated by CoffeeScript 1.5.0 var C1, CC, main; Array.Prototype.clone = function() { var ar, n, _i, _ref; if (this[0].constructor === Array) { ar = new Array(this.length); for (n = _i = 0, _ref = ar.length; 0 <= _ref ? _i < _ref : _i > _ref; n = 0 <= _ref ? ++_i : --_i) { ar[n] = this[n].clone(); } ar; } return Array.apply(null, this); }; main = function(input) { var d, i, l, m, n, result, x, y, _i, _j, _k, _ref; input = input.split("\n"); n = input[0][0] ^ 0; m = input[0][1] ^ 0; if (n === 1) { return console.log(1); } if (m < 2) { return console.log(1); } d = new Array(n); for (i = _i = 0; 0 <= n ? _i < n : _i > n; i = 0 <= n ? ++_i : --_i) { d[i] = new Array(n - 1); for (l = _j = 0, _ref = n - 1; 0 <= _ref ? _j < _ref : _j > _ref; l = 0 <= _ref ? ++_j : --_j) { d[i][l] = false; } } for (i = _k = 0; 0 <= m ? _k < m : _k > m; i = 0 <= m ? ++_k : --_k) { x = input[i + 1][0] ^ 0; y = input[i + 1][1] ^ 0; d[x][y] = true; d[y][x] = true; } result = CC(d, n); return console.log(result); }; C1 = function(arr, n) { var i, l, _i, _j, _ref; for (i = _i = 0; 0 <= n ? _i < n : _i > n; i = 0 <= n ? ++_i : --_i) { for (l = _j = 0, _ref = n - 1; 0 <= _ref ? _j < _ref : _j > _ref; l = 0 <= _ref ? ++_j : --_j) { if (arr[i][l] === false) { return false; } } } return true; }; CC = function(arr, n) { var darr, end, i, res, _i; if (C1(arr, n) === true) { return n; } end = 0; for (i = _i = 0; 0 <= n ? _i < n : _i > n; i = 0 <= n ? ++_i : --_i) { darr = arr.clone(); darr.splice(i, 1); res = CC(darr, n - 1); if (res > end) { end = res; } } return end; }; main(require("fs").readFileSync("/dev/stdin", "utf8"));
Submission Info
Submission Time | |
---|---|
Task | D - 派閥 |
User | rickytheta |
Language | JavaScript (Node.js 0.6.12) |
Score | 0 |
Code Size | 1880 Byte |
Status | RE |
Exec Time | 612 ms |
Memory | 11388 KB |
Judge Result
Set Name | all | ||
---|---|---|---|
Score / Max Score | 0 / 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 | RE | 612 ms | 11340 KB |
00_sample_02.txt | RE | 185 ms | 11216 KB |
00_sample_03.txt | RE | 185 ms | 11344 KB |
00_sample_04.txt | RE | 174 ms | 11212 KB |
test_01.txt | RE | 184 ms | 11216 KB |
test_02.txt | RE | 186 ms | 11200 KB |
test_03.txt | RE | 186 ms | 11340 KB |
test_04.txt | RE | 188 ms | 11220 KB |
test_05.txt | RE | 185 ms | 11220 KB |
test_06.txt | RE | 182 ms | 11340 KB |
test_07.txt | RE | 179 ms | 11212 KB |
test_08.txt | RE | 192 ms | 11212 KB |
test_09.txt | RE | 184 ms | 11212 KB |
test_10.txt | RE | 180 ms | 11220 KB |
test_11.txt | RE | 191 ms | 11332 KB |
test_12.txt | RE | 182 ms | 11336 KB |
test_13.txt | RE | 185 ms | 11340 KB |
test_14.txt | RE | 188 ms | 11328 KB |
test_15.txt | RE | 177 ms | 11212 KB |
test_16.txt | RE | 175 ms | 11344 KB |
test_17.txt | RE | 184 ms | 11216 KB |
test_18.txt | RE | 176 ms | 11212 KB |
test_19.txt | RE | 176 ms | 11208 KB |
test_20.txt | RE | 178 ms | 11212 KB |
test_21.txt | RE | 185 ms | 11188 KB |
test_22.txt | RE | 178 ms | 11216 KB |
test_23.txt | RE | 181 ms | 11208 KB |
test_24.txt | RE | 183 ms | 11216 KB |
test_25.txt | RE | 192 ms | 11216 KB |
test_26.txt | RE | 187 ms | 11212 KB |
test_27.txt | RE | 187 ms | 11344 KB |
test_28.txt | RE | 177 ms | 11212 KB |
test_29.txt | RE | 182 ms | 11216 KB |
test_30.txt | RE | 184 ms | 11200 KB |
test_31.txt | RE | 185 ms | 11336 KB |
test_32.txt | RE | 181 ms | 11208 KB |
test_33.txt | RE | 185 ms | 11208 KB |
test_34.txt | RE | 178 ms | 11212 KB |
test_35.txt | RE | 189 ms | 11332 KB |
test_36.txt | RE | 186 ms | 11216 KB |
test_37.txt | RE | 183 ms | 11212 KB |
test_38.txt | RE | 176 ms | 11196 KB |
test_39.txt | RE | 175 ms | 11216 KB |
test_40.txt | RE | 185 ms | 11388 KB |
test_41.txt | RE | 187 ms | 11220 KB |
test_42.txt | RE | 181 ms | 11200 KB |
test_43.txt | RE | 178 ms | 11220 KB |
test_44.txt | RE | 182 ms | 11212 KB |
test_45.txt | RE | 186 ms | 11340 KB |
test_46.txt | RE | 182 ms | 11212 KB |
test_47.txt | RE | 186 ms | 11320 KB |
test_48.txt | RE | 182 ms | 11216 KB |
test_49.txt | RE | 179 ms | 11216 KB |
test_50.txt | RE | 185 ms | 11212 KB |
test_51.txt | RE | 181 ms | 11264 KB |
test_52.txt | RE | 180 ms | 11220 KB |
test_53.txt | RE | 175 ms | 11220 KB |
test_54.txt | RE | 177 ms | 11344 KB |
test_55.txt | RE | 182 ms | 11216 KB |
test_56.txt | RE | 184 ms | 11328 KB |
test_57.txt | RE | 178 ms | 11304 KB |
test_58.txt | RE | 181 ms | 11308 KB |
test_59.txt | RE | 181 ms | 11340 KB |
test_60.txt | RE | 182 ms | 11216 KB |
test_61.txt | RE | 184 ms | 11216 KB |
test_62.txt | RE | 180 ms | 11208 KB |
test_63.txt | RE | 179 ms | 11304 KB |
test_64.txt | RE | 189 ms | 11216 KB |
test_65.txt | RE | 181 ms | 11216 KB |
test_66.txt | RE | 207 ms | 11208 KB |
test_67.txt | RE | 192 ms | 11200 KB |
test_68.txt | RE | 189 ms | 11208 KB |
test_69.txt | RE | 208 ms | 11212 KB |
test_70.txt | RE | 193 ms | 11216 KB |