NOI Linux Sublime Text 使用指南

感觉 noi linux 的vscode还是太鸡肋,所以用了用subline,莫名好用
下面是食用指难。
image

首先打开,不好看,我们可以点击这里更改相应主题
然后我们要点 file 打开文件夹
image

打开/关闭侧边栏的快捷键是 Ctrl+K+B (K和B同时按)
然后sublime不能输入,直接用文件输入输出。
所以这样的分屏比较优
image
打开Preferences中的Key Bindings,将左边内容粘贴到右边,然后搜索alt+shift+5,改成如下内容

"keys": ["alt+shift+5"],
"command": "set_layout",
"args":
{
	"cols": [0.0, 0.5, 1.0],
	"rows": [0.0, 0.5, 1.0],
	"cells":
	[
		[0, 0, 1, 2], [1, 0, 2, 1],
		[1, 1, 2, 2]
	]
}

image
然后快捷键alt+shift+5就可以分屏了。
接下来是C++的编译,我们打开Tools中的Build System中的New Build System
image
将以下代码放进去后保存命名(我的是MyC++)

{
	"shell_cmd": "g++ \"${file}\" -o \"${file_path}/${file_base_name}\"",
	"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
	"working_dir": "${file_path}",
	"selector": "source.c++",

	"variants":
	[
		{
			"name": "Run",
			"shell_cmd": "ulimit -s 8192000 && g++ \"${file}\" -o \"${file_path}/${file_base_name}\" -std=c++14 -O2 -Wall && size \"${file_path}/${file_base_name}\" && time \"${file_path}/${file_base_name}\""
		}
	]
}

然后在刚刚的Tools中的Build System选择就可以了。编译加运行按ctrl+B

缺省源打开tools的developer中的new snippet

<snippet>
  <content><![CDATA[
你的码头
]]></content>
  <tabTrigger>#i</tabTrigger>
  <scope>source.c++</scope>
</snippet>
自留
<snippet>
	<content><![CDATA[
#include<bits/stdc++.h>
#define fi first
#define se second
#define pii std::pair<int,int>
#define eb emplace_back
#define pb push_back
typedef long long ll;
typedef unsigned long long ull;
std::mt19937_64 myrand(std::chrono::high_resolution_clock::now().time_since_epoch().count());
inline int R(int n){return myrand()%n+1;}
inline int read(){char ch=getchar();int x=0,f=1;for(;ch<'0'||ch>'9';ch=getchar())if(ch=='-')f=-1;for(;ch>='0'&&ch<='9';ch=getchar())x=(x<<3)+(x<<1)+(ch^48);return x*f;}
const int N=2e5+10,inf=1e9;
inline void Min(int &x,int y){if(x>y)x=y;}
inline void Max(int &x,int y){if(x<y)x=y;}

signed main(){
    freopen("in.in","r",stdin);freopen("out.out","w",stdout);
    std::ios::sync_with_stdio(false);std::cin.tie(0);std::cout.tie(0);
    $2
}]]></content>
	<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
	<tabTrigger>#i</tabTrigger>
	<!-- Optional: Set a scope to limit where the snippet will trigger -->
	<scope>source.c++</scope>
</snippet>
 
 
 
 
点击查看代码
{
	// Place your snippets for cpp here. Each snippet is defined under a snippet name and has a prefix, body and 
	// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
	// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the 
	// same ids are connected.
	// Example:
	"Print to console": {
		"prefix": "#i",
		"body": [
			"#include<bits/stdc++.h>",
			"#define eb emplace_back",
			"#define fo(i,s,t) for(int i=s;i<=t;++i)",
			"typedef long long ll;",
			"typedef unsigned long long ull;",
			"inline int read(){char ch=getchar();int x=0,f=1;for(;ch<'0'||ch>'9';ch=getchar())if(ch=='-')f=-1;for(;ch>='0'&&ch<='9';ch=getchar())x=(x<<3)+(x<<1)+(ch^48);return x*f;}",
			"signed main(){",
			"    freopen(\"in.in\",\"r\",stdin);freopen(\"out.out\",\"w\",stdout);",
			"    std::ios::sync_with_stdio(false);std::cin.tie(0);std::cout.tie(0);",
			"    $2",
			"}"
		],
		"description": "Log output to console"
	}
}
点击查看代码
{
    "workbench.colorTheme": "Cobalt2",
    "files.autoSave": "afterDelay",
    "editor.mouseWheelZoom": true,
    "editor.cursorSmoothCaretAnimation": "on",
    "workbench.list.smoothScrolling": true,
    "editor.smoothScrolling": true,
    "terminal.integrated.smoothScrolling": true,
    "cph.general.autoShowJudge": false
}

update on 1.22
使用愉快

image

A

都是线性变换,大胆猜,首先三个点可以直接计算,然后枚举一个点,剩下两个点有多种可能性,注意到在单位圆上,只要两个点的中点确定,两个点就确定了,半径为 \(R\),中点向顶点方向移动 \(\frac{R}{2}\) 就是新圆心。

B

暴力了,对于 \(n\le 20\)

image

posted @ 2023-12-24 09:23  Ishar-zdl  阅读(396)  评论(7编辑  收藏  举报