tools

· · 个人记录

Vscode && bash

latest version

qwq.sh


echo lsy-cmake

cat > ~/.vimrc << EOF
set nu
set autoindent
set expandtab
set tabstop=2
set shiftwidth=2
inoremap [ []<LEFT>
inoremap ' ''<LEFT>
inoremap { {}<LEFT>
inoremap " ""<LEFT>
inoremap ( ()<LEFT>
EOF
echo .vimrc-processing

cat > /usr/bin/g+ << EOF
#!/bin/bash
g++ \$1.cpp -o \$1.exe -std=c++14 -Wall -Wextra -O2 -g
EOF
echo g+-processing

cat > /usr/bin/r+ << EOF
#!/bin/bash
g+ \$1;time ./\$1.exe
EOF
echo r+-processing

chmod a+x /usr/bin/g+
chmod a+x /usr/bin/r+
echo chmod-processing

echo lsy-Linux-init-finished
echo testing:

cat > qwq.cpp << EOF
#include<bits/stdc++.h>
#define ll long long
#define pb emplace_back
#define pir pair<int, ll>
#define fi first
#define se second
#define inv(x) qpow(x, mod - 2)
#define il inline
#define mkpir make_pair
using namespace std;

const int N = 2e5 + 10, M = 2e5 + 10;
const ll mod = 998244353;

/*
struct edge{
  int v, next;
}edges[M << 1];
int head[N], idx;

void add_edge(int u, int v){
  edges[++idx] = {v, head[u]};
  head[u] = idx;
}
*/

il ll qpow(ll& x, ll y){
  ll ret = 1;
  for(; y; y >>= 1, x = x * x % mod) if(y & 1) ret = ret * x % mod;
  return ret;
}
il void chkmin(ll& x, ll y){if(y < x) x = y;}
il void chkmax(ll& x, ll y){if(y > x) x = y;}
il void chkmin(int& x, int y){if(y < x) x = y;}
il void chkmax(int& x, int y){if(y > x) x = y;}
il void ADD(ll& x, ll y){x += y; (x >= mod) ? (x -= mod) : 0;}
il void MUL(ll& x, ll y){x = x * y % mod;}
//#define int long long

signed main(){
  ios::sync_with_stdio(0);
  cin.tie(0); cout.tie(0);

  return 0;
}
EOF

cat > init.sh << awa
cat > qwq.cpp << EOF
#include<bits/stdc++.h>
#define ll long long
#define pb emplace_back
#define pir pair<int, ll>
#define fi first
#define se second
#define inv(x) qpow(x, mod - 2)
#define il inline
#define mkpir make_pair
#define ull unsigned long long
#define umap unordered_map
using namespace std;

const int N = 2e5 + 10, M = 2e5 + 10;
const ll mod = 998244353;

/*
struct edge{
  int v, next;
}edges[M << 1];
int head[N], idx;

void add_edge(int u, int v){
  edges[++idx] = {v, head[u]};
  head[u] = idx;
}
*/

il ll qpow(ll x, ll y){
  ll ret = 1;
  for(; y; y >>= 1, x = x * x % mod) if(y & 1) ret = ret * x % mod;
  return ret;
}
il void chkmin(ll& x, ll y){if(y < x) x = y;}
il void chkmax(ll& x, ll y){if(y > x) x = y;}
il void chkmin(int& x, int y){if(y < x) x = y;}
il void chkmax(int& x, int y){if(y > x) x = y;}
il void chkmod(ll& x){x = (x + mod) % mod;}
il void ADD(ll& x, ll y){x += y; (x >= mod) ? (x -= mod) : 0;}
il void MUL(ll& x, ll y){x = x * y % mod;}
//#define int long long

void solve(){

}
void clr(){

}

signed main(){
  ios::sync_with_stdio(0);
  cin.tie(0); cout.tie(0);
  int T = 1; cin >> T; while(T--) solve(), clr();

  return 0;
}
EOF
awa

pai.sh

#!/usr/bin/bash
for((;;)){
    ./gen.exe >data.in;
    ./qwq.exe <data.in >qwq.out;
    ./sol.exe <data.in >sol.out;
    if !(diff -w sol.out qwq.out); then
        break;
    fi
}

install

Snippets:

#!/bin/bash
cat > qwq.cpp << EOF
#include<bits/stdc++.h>
#define ll long long
#define pb emplace_back
#define pir pair<int, ll>
#define fi first
#define se second
#define inv(x) qpow(x, mod - 2)
#define il inline
#define mkpir make_pair
#define ull unsigned long long
#define umap unordered_map
using namespace std;

const int N = 2e5 + 10, M = 2e5 + 10;
const ll mod = 998244353;

/*
struct edge{
  int v, next;
}edges[M << 1];
int head[N], idx;

void add_edge(int u, int v){
  edges[++idx] = {v, head[u]};
  head[u] = idx;
}
*/

il ll qpow(ll x, ll y){
  ll ret = 1;
  for(; y; y >>= 1, x = x * x % mod) if(y & 1) ret = ret * x % mod;
  return ret;
}
il void chkmin(ll& x, ll y){if(y < x) x = y;}
il void chkmax(ll& x, ll y){if(y > x) x = y;}
il void chkmin(int& x, int y){if(y < x) x = y;}
il void chkmax(int& x, int y){if(y > x) x = y;}
il void chkmod(ll& x){x = (x + mod) % mod;}
il void ADD(ll& x, ll y){x += y; (x >= mod) ? (x -= mod) : 0;}
il void MUL(ll& x, ll y){x = x * y % mod;}
//#define int long long

void solve(){

}
void clr(){

}

signed main(){
  ios::sync_with_stdio(0);
  cin.tie(0); cout.tie(0);
  int T = 1; cin >> T; while(T--) solve(), clr();

  return 0;
}
EOF

浅粉色 by QWEN

/* ==UserStyle==
@name         柔雾粉文本选择高亮
@namespace    userstyles.world
@description  将网页中文本选中高亮设为柔和半透明粉色,提升阅读美感
@author       Qwen
@version      1.0
@license      MIT
@preprocessor stylus

@var color highlight-bg "高亮背景色" #ffe6eb80
@var color highlight-text "高亮文字色" #222222
== */

::selection {
  background-color: rgba(255, 230, 235, 0.7) !important; /* 柔雾粉:#FFE6EB + 50% 透明 */
  color: #222222 !important; /* 深灰文字,确保可读 */
  /* 注意:不能使用 text-shadow / border / blur 等属性 */
}

/* 兼容旧版 Firefox(部分版本需加前缀) */
::-moz-selection {
  background-color: rgba(255, 230, 235, 0.7) !important;
  color: #222222 !important;
}