提交记录 6257


用户 题目 状态 得分 用时 内存 语言 代码长度
negiizhao 1000i. 【传统题】 A+B Problem Accepted 100 13.1 us 28 KB C++11 1.09 KB
提交时间 评测时间
2018-10-04 13:49:53 2020-08-01 00:41:12
#pragma GCC optimize("Ofast,unroll-loops")

#include <cstdio>
#include <cctype>

typedef long long int64;

struct IO_Tp
{
	static const int _I_Buffer_Size = 3 << 10;
	char _I_Buffer[_I_Buffer_Size], *_I_pos;
	
	static const int _O_Buffer_Size = 3 << 10;
	char _O_Buffer[_O_Buffer_Size], *_O_pos;
	
	IO_Tp() : _I_pos(_I_Buffer), _O_pos(_O_Buffer)
	{
		fread(_I_Buffer, 1, _I_Buffer_Size, stdin);
	}
	
	~IO_Tp()
	{
		fwrite(_O_Buffer, 1, _O_pos - _O_Buffer, stdout);
	}
	
	IO_Tp &operator>>(int &res)
	{
		bool neg(false);
		while (!isdigit(*_I_pos))
			neg = *_I_pos++ == '-';
		res = *_I_pos++ & 15;
		while (isdigit(*_I_pos))
			(res *= 10) += *_I_pos++ & 15;
		neg ? res = -res : res;
		return *this;
	}
	
	IO_Tp &operator<<(int n)
	{
		static char _buf[10];
		char* _pos(_buf);
		if (n < 0)
			*_O_pos++ = '-', n = -n;
		do
			*_pos++ = '0' + n % 10;
		while (n /= 10);
		while (_pos != _buf)
			*_O_pos++ = *--_pos;
		return *this;
	}
	
	IO_Tp &operator<<(char ch)
	{
		*_O_pos++ = ch;
		return *this;
	}
} IO;

int T, A, B;

int main()
{
	IO >> T;
	while (T--)
		IO >> A >> B, IO << A + B << '\n';
	
	return 0;
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #113.1 us28 KBAcceptedScore: 100


Judge Duck Online | 评测鸭在线
Server Time: 2024-04-25 23:54:08 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用