提交记录 5199


用户 题目 状态 得分 用时 内存 语言 代码长度
TowardstheSun 1000i. 【传统题】 A+B Problem Accepted 100 13.95 us 32 KB C++ 1.14 KB
提交时间 评测时间
2018-08-11 10:59:29 2020-08-01 00:13:42
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")

#include <stdio.h>

struct IO_Tp {
	char _I_Buffer[1<<12],_O_Buffer[1<<12],*_I_pos,*_O_pos;

	IO_Tp(): _I_pos(_I_Buffer), _O_pos(_O_Buffer){fread(_I_Buffer, 1, 1<<12, stdin);}
	~IO_Tp() { fwrite(_O_Buffer, 1, _O_pos - _O_Buffer, stdout); }

	inline bool is_digit(register const char ch) { return '0'<=ch&&ch<='9';}

	inline IO_Tp& operator>>(int& x)
	{
		register int res = 0;
		int k = 1;
		while (!is_digit(*_I_pos)){if (*_I_pos == '-')k = -1;_I_pos++;}
		do (res = (res << 3) + (res << 1)) += (*_I_pos++) & 15;while (is_digit(*_I_pos));
		x = (k == -1 ? -res : res);
		return *this;
	}

	inline char getop(){while (!is_digit(*_I_pos))_I_pos++;return (*_I_pos++) & 15;}

	inline IO_Tp& operator<<(register int n)
	{
		if (n < 0) {*_O_pos++ = '-';n = -n;}
		static char _buf[20];
		register char* _pos(_buf);
		do *_pos++ = 48 + n % 10;while (n /= 10);
		while (_pos != _buf)*_O_pos++ = *--_pos;
		return *this;
	}
	inline IO_Tp& operator<<(register char ch){*_O_pos++ = ch;return *this;}
};
IO_Tp IO;
int main()
{
	int n,a,b;
	IO >> n;
	while (n--) {IO >> a >> b;IO << a + b << '\n';}
	return 0;
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #113.95 us32 KBAcceptedScore: 100


Judge Duck Online | 评测鸭在线
Server Time: 2026-04-12 06:22:48 | Loaded in 0 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠