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
slow queryで追いきれない場合、performance_schema.events_statements_summary_by_digestを利用するのが良い | |
performance_schemaの情報は | |
* 再起動 | |
* `CALL sys.ps_truncate_all_tables(FALSE);` | |
で更新される | |
https://github.com/takonomura/isucon14/blob/master/scripts/sql-performance.sh |
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 _CRT_SECURE_NO_WARNINGS | |
#include <cstdio> | |
#include <cstdlib> | |
#include <cstring> | |
#include <cmath> | |
#include <limits> | |
#include <ctime> | |
#include <cassert> | |
#include <map> |
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
// https://jsfiddle.net/bxqfL89j/1/ | |
/* | |
<div id="container"> | |
<button>Click To Show Message</button> | |
</div> | |
*/ | |
function callFnWithTimeout(fn, timeoutMilli) { | |
const waitPromise = new Promise(resolve => setTimeout(resolve, timeoutMilli)); |
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 <vector> | |
#include <string> | |
#include <iostream> | |
#include <sstream> | |
using namespace std; | |
#include <bits/stdc++.h> | |
#include <random> |
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 <bits/stdc++.h> | |
using namespace std; | |
struct PalindromicTree { | |
// | |
// private: | |
struct node { | |
map<char, int> link; | |
int suffix_link; |
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 <bits/stdc++.h> | |
using namespace std; | |
using ll = long long; | |
const int MOD = int(1e9) + 7; | |
//素数列挙 | |
bool prime[1000001]; //10^6 | |
vector<int> prs; |
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 <bits/stdc++.h> | |
using namespace std; | |
using ll = long long; | |
//素数列挙 | |
bool prime[1000001]; //10^6 | |
vector<int> prs; | |
void init_prime() { | |
memset(prime, 1, sizeof(prime)); |
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 <cstdio> | |
#include <cstdlib> | |
#include <cstring> | |
#include <cmath> | |
#include <limits> | |
#include <cfloat> | |
#include <ctime> | |
#include <cassert> | |
#include <map> | |
#include <utility> |
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 <cstdio> | |
#include <cassert> | |
#include <vector> | |
using namespace std; | |
typedef long long ll; | |
typedef pair<int, int> Pii; | |
#define FOR(i,n) for(int i = 0; i < (n); i++) |
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 hashlib | |
PRIME = 10162817389166932304743927803664677577393035849460315554227038992256439669168822924924642681859165915398841119695331997622323074382673543580118593098794075768017359068156207668418577358758037040886636583057751950491466568754968161402970164774854422196808968101372380404300325099055524339557705423721707 | |
G = 1323857230486534278 | |
def get_salt(m): | |
for _ in range(1000): | |
m = hashlib.sha512(m).hexdigest() | |
return m |
NewerOlder