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
T = input() | |
for t in range(T): | |
N, M = map(int, raw_input().split()) | |
R = [] | |
for _ in range(M): | |
X, Y, Z = map(int, raw_input().split()) | |
R += [(X-1, Y-1, Z)] | |
oo = 999999999 | |
G = [[oo]*N for _ in range(N)] |
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
OLL | |
・・・ | |
□□□ | |
・・・ | |
FRUR'U'F' | |
・・・ | |
・□□ | |
・□・ |
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
# coding: utf-8 | |
""" | |
https://www.facebook.com/hackercup/problem/656203948152907/ | |
βカエルの数をbとする。 | |
b=N-1のとき、葉Nが空いていないので不可。 | |
bを小さくすることを考えると、1個おきに並ぶのが最善で、2*b=N-1。 | |
""" |
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 <string> | |
#include <vector> | |
using namespace std; | |
class SpecificPolyominoCovering{public: | |
vector <string> findCovering( vector <string> region ) | |
{ | |
int w = (int)region[0].size(); | |
int h = (int)region.size(); |
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
import sys | |
import re | |
mail = [] | |
reform = re.compile(r"^From - \w{3} \w{3} \d\d \d\d:\d\d:\d\d \d\d\d\d\r?$") | |
restatus = re.compile(r"^(X-Mozilla-Status: )(\d\d\d\d)(\r?)$") | |
output = open("deleted", "wb") | |
def process(): |
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 "message.h" | |
#include "broken_memory.h" | |
#include <iostream> | |
#include <algorithm> | |
#include <map> | |
using namespace std; | |
int main() { | |
long long N = NumberOfNodes(); |
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 "message.h" | |
#include "weird_editor.h" | |
#include <iostream> | |
#include <algorithm> | |
using namespace std; | |
int main() { | |
long long N = NumberOfNodes(); | |
long long ID = MyNodeId(); |
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 <iostream> | |
#include <vector> | |
#include <string> | |
#include <cstdio> | |
using namespace std; | |
int main() | |
{ | |
int T; |
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
parameter N = 4; | |
reg [31:0] n [0:N-1]; | |
reg [31:0] count; | |
reg [31:0] max; | |
integer i; | |
always @(negedge rst or posedge clk) begin | |
if (rst==1'd0) begin | |
n[0] <= 32'd123; | |
n[1] <= 32'd456; |