跳到正文

科技·工程

Adcfers - A Demo version of the CodeForces Elo Rating System

Gcc_Gdb_7_8_1约 7 分钟
原文
文章信息与版本

文章信息

收录
2025年12月12日
更新
2025年12月12日
篇幅
约 7 分钟

版本

  1. v1当前

Adcfers - A Demo version of the CodeForces Elo Rating System

Introduce

Adcfers,故名思意,它是一个可以模仿 CodeForces 的 Elo Rating 系统模拟器,它有着强大的功能,可以支持 CSV 导入和导出,批量修改,自动对 Rating 表格排序,显示用户名所对应 CodeForces 用户名颜色,自动将表格存储到你的电脑上。软件是免费的,你不需要花钱,便可获得 Adcfers,以创建独立的 Rating 表格及对其操作的权利。

version 1.0

Source Code

C++
/*

The Codeforces Elo Rating System

BY Gcc_Gdb_7_8_1 (luogu://user/1058410)

PS: Now the Software is free!

*/

#include <cstdio>
#include <ctime>
#include <cstring>
#include <windows.h>

#define gets(str) fgets(str, sizeof(str) / sizeof(str[0]), stdin)

time_t now;
struct tm *localtm;
int year, month, day, hour;

class OIer {
	char name[30];
};

void Clear()
{
	system("cls");
}

void AutoGetNowTime()
{
	now = time(NULL);
	localtm = localtime(&now);
	year = localtm -> tm_year + 1900;
	month = localtm -> tm_mon + 1;
	day = localtm -> tm_mday;
	hour = localtm -> tm_hour;
}

void Outstr(const char* str, int sleep = 50, char end = '\n')
{
	char *p = (char*)str;
	while (*p) {putchar(*(p++)); Sleep(sleep);}
	putchar(end);
}

void CopyRight()
{
	Outstr("Adcfers [Version 1.0]");
	Outstr("Developed by Gcc_Gdb_7_8_1 (luogu://user/1058410), All rights reserved.");
	char cpyrit[20];
	sprintf(cpyrit, "Copyright 2025-%d", year);
	Outstr(cpyrit);
}

void Welcome()
{
	if (hour >= 18) {
		Outstr("Good evening!");
	} else if (hour >= 13) {
		Outstr("Good afternoon!");
	} else {
		Outstr("Good morning!");
	}
	Outstr("Welcome to Adcfers - A Demo version of the CodeForces Elo Rating System!\n");
	CopyRight();
	Sleep(3000);
	Clear();
}

void Add()
{
	Outstr("Features are yet to be developed, so stay tuned...");
}

void Del()
{
	Outstr("Features are yet to be developed, so stay tuned...");
}

void Sort()
{
	Outstr("Features are yet to be developed, so stay tuned...");
}

void Inc()
{
	Outstr("Features are yet to be developed, so stay tuned...");
}

void Impt()
{
	Outstr("Features are yet to be developed, so stay tuned...");
}

void Expt()
{
	Outstr("Features are yet to be developed, so stay tuned...");
}

void Print()
{
	Outstr("Features are yet to be developed, so stay tuned...");
}

void GetRating()
{
	Outstr("Features are yet to be developed, so stay tuned...");
}

void GetNameColor()
{
	Outstr("Features are yet to be developed, so stay tuned...");
}

void Help()
{
	Outstr("Features are yet to be developed, so stay tuned...");
}

int main()
{
	AutoGetNowTime();
	Welcome();
	Outstr("Type the \"gethelp\" or \"copyright\" for more information.");
	while (1) {
		Outstr("Input the Command: ");
		char command[20];
		scanf("%s", command);
		int len = strlen(command);
		if (len > 12) {
			Outstr("Length limit of Command is 12 characters.\nPlease input again.");
		} else {
			if (!strcmp(command, "add")) {
				Add();
			} else if (!strcmp(command, "erase") || !strcmp(command, "del")) {
				Del();
			} else if (!strcmp(command, "sort")) {
				Sort();
			} else if (!strcmp(command, "increase") || !strcmp(command, "inc")) {
				Inc();
			} else if (!strcmp(command, "import") || !strcmp(command, "impt")) {
				Impt();
			} else if (!strcmp(command, "export") || !strcmp(command, "expt")) {
				Expt();
			} else if (!strcmp(command, "print")) {
				Print();
			} else if (!strcmp(command, "getrating") || !strcmp(command, "gr")) {
				GetRating();
			} else if (!strcmp(command, "getnamecolor") || !strcmp(command, "gnc")) {
				GetNameColor();
			} else if (!strcmp(command, "gethelp")) {
				Help();
			} else if (!strcmp(command, "copyright")) {
				CopyRight();
			} else if (!strcmp(command, "clear") || !strcmp(command, "cls")) {
				Clear();
			} else {
				Outstr("We don\'t know what you want to do.\nPlease input again.");
			}
		}
	}
	return 0;
}

Release

(No)

原文