1
已解决
李熙尧
新手光能
新手光能
在最好成绩截屏评论,前3名可获酷町豆!!
#pragma GCC optimize(3)
#pragma GCC target("avx")
#include<cstdio>
#define hello(VK_NONAME) ((GetAsyncKeyState(VK_NONAME) & 0x8000) ? 1:0)
#pragma GCC optimize("Ofast")
#pragma GCC optimize("inline")
#pragma GCC optimize("-fgcse")
#pragma GCC optimize("-fgcse-lm")
#pragma GCC optimize("-fipa-sra")
#pragma GCC optimize("-ftree-pre")
#pragma GCC optimize("-ftree-vrp")
#pragma GCC optimize("-fpeephole2")
#pragma GCC optimize("-ffast-math")
#pragma GCC optimize("-fsched-spec")
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("-falign-jumps")
#pragma GCC optimize("-falign-loops")
#pragma GCC optimize("-falign-labels")
#pragma GCC optimize("-fdevirtualize")
#pragma GCC optimize("-fcaller-saves")
#pragma GCC optimize("-fcrossjumping")
#pragma GCC optimize("-fthread-jumps")
#pragma GCC optimize("-funroll-loops")
#pragma GCC optimize("-fwhole-program")
#pragma GCC optimize("-freorder-blocks")
#pragma GCC optimize("-fschedule-insns")
#pragma GCC optimize("inline-functions")
#pragma GCC optimize("-ftree-tail-merge")
#pragma GCC optimize("-fschedule-insns2")
#pragma GCC optimize("-fstrict-aliasing")
#pragma GCC optimize("-fstrict-overflow")
#pragma GCC optimize("-falign-functions")
#pragma GCC optimize("-fcse-skip-blocks")
#pragma GCC optimize("-fcse-follow-jumps")
#pragma GCC optimize("-fsched-interblock")
#pragma GCC optimize("-fpartial-inlining")
#pragma GCC optimize("no-stack-protector")
#pragma GCC optimize("-freorder-functions")
#pragma GCC optimize("-helloirect-inlining")
#pragma GCC optimize("-fhoist-adjacent-loads")
#pragma GCC optimize("-frerun-cse-after-loop")
#pragma GCC optimize("inline-small-functions")
#pragma GCC optimize("-finline-small-functions")
#pragma GCC optimize("-ftree-switch-conversion")
#pragma GCC optimize("-foptimize-sibling-calls")
#pragma GCC optimize("-fexpensive-optimizations")
#pragma GCC optimize("-funsafe-loop-optimizations")
#pragma GCC optimize("inline-functions-called-once")
#pragma GCC optimize("-fdelete-null-pointer-checks")
#pragma GCC optimize(2)
#include<iomanip>
#include<stdio.h>
#include<cstdlib>
#include<ctime>
#include<map>
#include<cmath>
#include<cstdlib>
#include<queue>
#include<iostream>
#include<windows.h>
#define int long long
using namespace std;
POINT p;
double minn=0x3f3f3f3f;
string nam;
void pr(string s){
for(int i=0;i<s.size();i++){
cout<<s[i];
Sleep(40);
}
}
int gotoxy(int y, int x){
HANDLE handle;
COORD coord;
coord.X = x;
coord.Y = y;
handle = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleCursorPosition(handle, coord);
} void cls(){
HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
COORD coordScreen = { 0, 0 };
SetConsoleCursorPosition( hConsole, coordScreen );
}
void go1(){
HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_CURSOR_INFO CursorInfo;
GetConsoleCursorInfo(handle, &CursorInfo);
CursorInfo.bVisible = false;
SetConsoleCursorInfo(handle, &CursorInfo);
}
signed main(){
/*-------------------------基本内容设置开始-----------------------*/
go1();
system("title 时间****");
system("mode con cols=50 lines=10");
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED |FOREGROUND_GREEN);//设置红色和绿色相加
Sleep(1000);
/*-------------------------基本内容设置结束-----------------------*/
/*---------------------------主题程序开始-----------------------*/
loop:
gotoxy(1,5);
pr("根据你的手感,在10s按下空格键锁定");
Sleep(3000);
system("cls");
int h=4;
while(h--){
gotoxy(1,5);
cout<<h;
Sleep(1000);
system("cls");
}cout<<"开始!!!";
int f=0;
while(1){
if(hello(0x20)){
break;
}f++;
Sleep(10);
}
system("cls");
gotoxy(1,5);
pr(" 时间:");
cout<<(double)f/100;
pr(" 误差:");
cout<<abs((double)f/100-10)<<endl;
pr(" 最好成绩:");
minn=min(minn,abs((double)f/100-10));
cout<<minn;
Sleep(3000);
system("cls");
pr("是(空格)否(enter)重来?");
while(1){
if(hello(0x20)){
system("cls");
goto loop;
}
if(hello(0x0D)){
cout<<endl<<"bye";
return false;
}
}
return false;
}
李熙尧在2022-07-22 17:08:57追加了内容
****=管 理 大 师
李熙尧在2022-07-23 09:44:50追加了内容
7.23 排行榜(8.1截止)
1.刘意阳 0.00
2.李显晨 0.17
3.陈则霖 0.19
4.王耀斌 9.98
5.郝天尘 10.00
李熙尧在2022-07-24 20:07:29追加了内容
7.24排行榜
1.刘意阳 0.00
2.胡辰瑞 0.09
3.李显晨 0.17
4.陈则霖 0.19
5.王耀斌 9.98
6.郝天尘 10.00
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0