Other

  1. github信息查看 https://api.github.com/users/名字
  2. 命令行编译 假设项目结构如下:
project_folder/
    src/
        file1.c
        file2.c
    include/
        header.h

编译命令

gcc -c -I../include file1.c -o file1.o
gcc -c -I../include file2.c -o file2.o
gcc file1.o file2.o -o my_executable
  1. 对拍 https://www.cnblogs.com/EdisonBa/p/13509379.html 一段出题代码
#include<bits/stdc++.h>
using namespace std;
const int N=100000;
int main()
{
	srand(time(NULL));
	int T=10;
	for(int i=1;i<=10;i++){
		string output_file=to_string(i)+".in";
		freopen(output_file.c_str(),"w",stdout);
		int n,m;
//		if(i<=3)
//			n=10,m=((rand()<<15)+rand())%(n*n)+1;
		n=1000,m=((rand()<<15)+rand())%(5*n)+1;
//		else n=100000,m=((rand()<<15)+rand())%N+1;
		printf("%d %d\n",n,m);
		for(int i=0;i<m;i++){
			int x=((rand()<<15)+rand())%n+1;
			int y=((rand()<<15)+rand())%n+1;
			printf("%d %d",x,y);
			if(i==m-1);
			else printf("\n");
		}
	}
	return 0;
}
Licensed under CC BY-NC-SA 4.0
Built with Hugo
主题 StackJimmy 设计