Skip to content

Instantly share code, notes, and snippets.

View yjfvictor's full-sized avatar
💭
I may be slow to respond.

yjf_victor yjfvictor

💭
I may be slow to respond.
  • 13:40 (UTC +10:00)
View GitHub Profile
@yjfvictor
yjfvictor / daemon_utility.c
Created December 12, 2018 17:37
A tool to start a process in daemon mode
/**
* @file daemon_utility.c
* @brief A tool to start a process in daemon mode
* @author yjf_victor
* @version 1.0
* @date 2018-12-13
* @copyright CC0 1.0 Universal https://creativecommons.org/publicdomain/zero/1.0/
*/
#include <stdio.h>
/**
* @brief polymorphism test
* @file polymorphism_test.cpp
* @author yjf_victor
* @date 2018-04-08
* @copyright Creative Commons — CC0 1.0 Universal (https://creativecommons.org/publicdomain/zero/1.0/)
*/
#include <iostream>
#include <vector>
@yjfvictor
yjfvictor / gcd_lcm.c
Last active December 23, 2018 08:34
求两个数的最大公约数和最小公倍数
/**
* gcd_lcm.c - a program for greatest common divisors and least common multiples
* 用于计算最大公约数和最小公倍数的程序
*
* Written in 2014 by yjf_victor
*
* To the extent possible under law, the author has dedicated all copyright
* and related and neighboring rights to this software to the public domain
* worldwide. This software is distributed without any warranty.
*
@yjfvictor
yjfvictor / NT_shutdown.c
Last active December 23, 2018 08:38
Shut down and power off on Windows NT/2000/XP/7/8
/**
* NT_shutdown.c - Shut down and power off on Windows NT/2000/XP/7/8
* 用于给Windows NT/2000/XP/7/8关机的程序
*
* Written in 2014 by yjf_victor
*
* To the extent possible under law, the author has dedicated all copyright
* and related and neighboring rights to this software to the public domain
* worldwide. This software is distributed without any warranty.
*
@yjfvictor
yjfvictor / compiler_version_check.cpp
Last active November 16, 2021 03:47
C/C++ Compiler Version Check
/*
* This is free and unencumbered software released into the public domain.
*
* Anyone is free to copy, modify, publish, use, compile, sell, or
* distribute this software, either in source code form or as a compiled
* binary, for any purpose, commercial or non-commercial, and by any
* means.
*
* In jurisdictions that recognize copyright laws, the author or authors
* of this software dedicate any and all copyright interest in the
@yjfvictor
yjfvictor / standard_test.cpp
Last active August 22, 2022 07:51
Test the C/C++ standard version
/*
* This is free and unencumbered software released into the public domain.
*
* Anyone is free to copy, modify, publish, use, compile, sell, or
* distribute this software, either in source code form or as a compiled
* binary, for any purpose, commercial or non-commercial, and by any
* means.
*
* In jurisdictions that recognize copyright laws, the author or authors
* of this software dedicate any and all copyright interest in the
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <functional>
using namespace std;
#define MAX_LENGTH 1000
#include <cstdio>
#include <set>
using namespace std;
int main()
{
int case_count;
scanf("%d", &case_count);
for (int i = 1; i <= case_count; ++ i)
@yjfvictor
yjfvictor / 1273.c
Last active August 29, 2015 14:07
1273: 大数的位数
/**
* @author 叶剑飞
* @file 1273.c
* @brief 1273: 大数的位数
* @note http://125.221.232.253/JudgeOnline/problem.php?id=1273
*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
/**
* @author 叶剑飞
* @date 2014-10-03
* @brief Divided Land
* @note http://acm.hdu.edu.cn/showproblem.php?pid=5050
* @copyright To the extent possible under law, the author has dedicated all copyright
* and related and neighboring rights to this software to the public domain
* worldwide. This software is distributed without any warranty.
* You should have received a copy of the CC0 Public Domain Dedication along with
* this software. If not, see <https://creativecommons.org/publicdomain/zero/1.0/>.