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/python3 | |
from random import * | |
def rand_coord(): | |
return randint(0, coord_max) | |
def rand_pt(): | |
print(rand_coord(), rand_coord(), | |
randint(0, val_max)) |
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
/* | |
* $File: fast-read.cc | |
* $Date: Fri Dec 21 14:44:05 2012 +0800 | |
* $Author: Xinyu Zhou <zxytim[at]gmail[dot]com> | |
* | |
* A template for fast read of integer and string. | |
* | |
* This implementation is in MACRO format because it | |
* yields a slightly faster code that that of using | |
* function calls. |
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 <sys/time.h> | |
#include <cmath> | |
#include <cstdio> | |
typedef unsigned long long time_ms_t; | |
time_ms_t get_time() | |
{ | |
static timeval tv; | |
gettimeofday(&tv, 0); | |
return tv.tv_sec * 1000 + tv.tv_usec * 0.001; |
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
/************************************************************** | |
Problem: 1969 | |
User: zxytim | |
Language: C++ | |
Result: Accepted | |
Time:654 ms | |
Memory:7568 kb | |
****************************************************************/ | |
/* |
NewerOlder