跳到正文

董乐山2020

379916

主页:https://www.luogu.com.cn/paste/xp35xeoi

在洛谷打开
资料、奖项与版本

资料

编号
379916
抓取

奖项

2025 CSP-S
二等奖
2024 CSP-J
一等奖
2024 CSP-S
二等奖
2023 CSP-J
一等奖
2023 CSP-S
一等奖

www.luogu.com.cn/paste/xp35xeoi\color{white}\text{www.luogu.com.cn/paste/xp35xeoi}

你就不会ctrl+a吗

快读快写1.0

C++
	in void write(T x,char t)
	{
		int y=0;if(x<0)y=1,x=-x;while(z[++Z]=x%10+48,x/=10);
		if(y)z[++Z]='-';while(sr[++C]=z[Z],--Z);sr[++C]=t;flush();
	}
	in void write(char *s) {int l=strlen(s);for(int i=0;i<l;i++)sr[++C]=*s++;sr[++C]='\n';flush();}
}
using namespace fast_io;



#define Min(a,b) (a)<(b)?(a):(b)
#define Max(a,b) (a)>(b)?(a):(b)

inline int read() {
	int f=1,x=0;
	char ch=getchar();
	while(!isdigit(ch)) { if(ch=='-') f=-1; ch=getchar(); }
	while(isdigit(ch)) { x=x*10+ch-'0'; ch=getchar(); }
	return f*x;
}
inline void write(int x) {
	if(x<0) putchar('-'),write(-x);
	else if(x<10) putchar(x+'0');
	else write(x/10),putchar(x%10+'0');
}

快读快写2.0

C++
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <ctime>
#include <iomanip>

namespace fastIO {
	inline int read() {
		int res = 0, f = 1;
		char ch = getchar();
		while( !(ch >= '0' && ch <= '9') ) {
			if(ch == '-') f = -1;
			ch = getchar();
		}
		while(ch >= '0' && ch <= '9') {
			res = (res << 1) + (res << 3) + (ch ^ 48);
			ch = getchar();
		}
		return res * f;
	}

	void write(int x) {
		static int sta[35];
		int top = 0;
		do {
			sta[top++] = x % 10;
			x /= 10;
		} while(x);
		while(top) putchar(sta[--top] ^ 48);
	}

	void writeln(int x) {
		write(x);
		putchar('\n');
	}
}

using namespace std;
using namespace fastIO;

不可以,总司令

C++
(double)clock() / CLOCKS_PER_SEC <= 1.2
共 1 篇
  1. 个人记录

    SN2023CSP-J迷惑行为大赏

    这些代码片段来自不同考生的CSP-J编程竞赛题解,主要存在以下特点: 常见错误:多数代码使用了错误的freopen函数拼写(如froepen),导致文件读写异常;部分代码存在语法错误或逻辑缺陷,如未正确处理数学问题(如二次方程判别式计算错误)。 注释风格:考生通过注释表达对题目的困惑(如“图论忘得一干二净”“10^9 ?? are you kidding?”)或对评委的调侃(如“我不会捏(喜)”“铁一怎么你了”),甚至包含网络用语和表情符号。 硬编码输出:部分代码通过特定条件判断直接输出固定答案(如if(n==5&&m==4)cout << 79),可能为应付评测而临时编写。 学校与考号:代码中包含考生所属学校及考号信息(如西安高新第三初级中学、西安交通大学附属中学初中部等),部分考生使用了“ZYZ”“TYOI”等特定称呼。 幽默与自嘲:注释中频繁出现“我不会捏(喜)”“wssb dsb”等自嘲性表达,反映考生对难题的无奈与压力。

    2 赞