This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from dataclasses import dataclass | |
from ortools.sat.python import cp_model | |
from functools import reduce | |
### PARAMETERS | |
def get_available_area(): | |
# This is 5-star AGS-30, change it for different HOC/stars. | |
return Mask(""" | |
..xx.... |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Description | |
--- | |
Just matrix chain multiplication. | |
Input format | |
--- | |
There may be multiple test cases. | |
Each test case consists of two lines. | |
On the first line is an integer, $n$, the number of matrices. | |
On the second line are $n + 1$ integers, the dimension of the matrices. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -Nur linux-4.11-copy/drivers/char/Kconfig linux-4.11/drivers/char/Kconfig | |
--- linux-4.11-copy/drivers/char/Kconfig 2017-05-01 10:47:48.000000000 +0800 | |
+++ linux-4.11/drivers/char/Kconfig 2017-06-23 20:07:55.645195892 +0800 | |
@@ -548,6 +548,18 @@ | |
The mmtimer device allows direct userspace access to the | |
Altix system timer. | |
+config SOCKET_SERVER | |
+ tristate "Character-device that listen and write to a socket" | |
+ default m |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ tree | |
. | |
├── allsolution | |
│ ├── ac1.cpp | |
│ ├── tle1.cpp | |
│ └── wa1.cpp | |
├── generator.py | |
├── Makefile | |
├── solution.cpp | |
├── testdata |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define _GNU_SOURCE | |
#include <math.h> | |
#include <sched.h> | |
#include <signal.h> | |
#include <stdio.h> | |
#include <sys/wait.h> | |
#include <time.h> | |
#include <unistd.h> | |
#define CHILD_STACK_SIZE (1 << 15) | |
static int child_main(void *param) { (void) param; return 0; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <boost/coroutine2/coroutine.hpp> | |
#include <sys/select.h> | |
#include <list> | |
#include <utility> | |
namespace coselect { | |
struct tri_fd_set { | |
fd_set read, write, except; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Logs begin at Fri 2016-05-27 13:25:50 CST, end at Wed 2016-10-12 12:21:03 CST. -- | |
Oct 12 11:24:12 johnchen902-arch-4 systemd-journald[227]: Runtime journal (/run/log/journal/) is 8.0M, max 597.1M, 589.1M free. | |
Oct 12 11:24:13 johnchen902-arch-4 systemd-journald[227]: System journal (/var/log/journal/) is 1.0G, max 4.0G, 2.9G free. | |
Oct 12 11:24:13 johnchen902-arch-4 systemd-journald[227]: Time spent on flushing to /var is 886us for 2 entries. | |
Oct 12 11:24:13 johnchen902-arch-4 kernel: microcode: microcode updated early to revision 0x20, date = 2016-03-16 | |
Oct 12 11:24:13 johnchen902-arch-4 kernel: Linux version 4.7.6-1-ARCH (builduser@tobias) (gcc version 6.2.1 20160830 (GCC) ) #1 SMP PREEMPT Fri Sep 30 19:28:42 CEST 2016 | |
Oct 12 11:24:13 johnchen902-arch-4 kernel: Command line: BOOT_IMAGE=/vmlinuz-linux root=UUID=cea23e03-0fb9-4965-9e31-35fb06578423 rw verbose initcall_debug no_console_suspend | |
Oct 12 11:24:13 johnchen902-arch-4 kernel: x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256 | |
Oct 12 11:24:13 jo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
enum { unknown, is_false, is_true } dp[1 << 25]; | |
bool solve(int x, int mod, int mask) { | |
if(dp[mask] != unknown) | |
return dp[mask] == is_true; | |
if((x ^ mask) % mod == 0) { | |
dp[mask] = is_false; | |
return false; | |
} | |
for(int m = mask; m; m ^= m & -m) |
NewerOlder