This file contains 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
--[[ | |
Conky theme from https://github.com/CSaratakij/i3-rice-rin-shelter/blob/master/conky/conky.conf | |
Modified for KDE neon | |
]] | |
conky.config = { | |
-- KDE hacks from https://www.reddit.com/r/kde/comments/7tp0u9/ | |
own_window = true, | |
own_window_type = 'dock', | |
own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager', |
This file contains 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
// Compile error: use __asm__ instead | |
uint64_t rdseed() | |
{ | |
uint64_t ret; | |
asm volatile("rdseed %0" : "=r"(ret) : : "cc"); | |
return ret; | |
} | |
uint64_t rdrand() | |
{ |
This file contains 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
use std::io; | |
use std::io::prelude::*; | |
// Read macro | |
macro_rules! read { | |
($input:ident, $($type: ty),+) => ({ | |
let mut s = String::new(); | |
$input.read_line(&mut s)?; | |
let mut it = s.split_whitespace(); | |
($( |
This file contains 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
// BOJ 15816 - 퀘스트 중인 모험가 | |
// https://www.acmicpc.net/problem/15816 | |
// 풀이는 맞지만 MLE가 나옴. BBST를 사용해야 하는 문제임. | |
#include <iostream> | |
constexpr int SL = -1'000'000'000; | |
constexpr int SR = +1'000'000'000; | |
struct Node { | |
Node *l, *r; |
This file contains 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://stackoverflow.com/questions/41922181/go-why-implicit-non-pointer-methods-not-satisfy-interface | |
// https://golang.org/doc/faq#different_method_sets | |
// https://golang.org/doc/faq#nil_error | |
package main | |
import "fmt" | |
type user struct { | |
id int | |
name string |
This file contains 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
package main | |
import ( | |
"bufio" | |
"fmt" | |
"os" | |
) | |
var ( | |
bufin = bufio.NewReader(os.Stdin) |
This file contains 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
// BOJ 13977 - 이항 계수와 쿼리 | |
// https://icpc.me/13977 | |
#include <cstdio> | |
#include <cstdint> | |
#include <cinttypes> | |
constexpr uint32_t X = 1'000'000'007; | |
uint32_t A[4'000'004]; | |
uint32_t B[4'000'004]; |
This file contains 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
// BOJ 12013 - 248 | |
// https://www.acmicpc.net/problem/12013 | |
#include <iostream> | |
#include <algorithm> | |
int main() { | |
static int N; | |
static int dp[248][248]; | |
using namespace std; |
This file contains 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 <cstdint> | |
#include <cstdio> | |
#include <initializer_list> | |
// Xoshiro256** 32bit | |
static uint64_t rotl(const uint64_t x, int k) { | |
return (x << k) | (x >> (64 - k)); | |
} | |
static uint32_t rng() { | |
static uint64_t s[4] = {123456789, 987654321, 999778844, 99999999}; |
This file contains 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
package main | |
import ( | |
"bufio" | |
"fmt" | |
"os" | |
) | |
var ( | |
bufin = bufio.NewReader(os.Stdin) |
NewerOlder