提交记录 5551


用户 题目 状态 得分 用时 内存 语言 代码长度
denverjin 1000i. 【传统题】 A+B Problem Accepted 100 14.06 us 28 KB C++ 1.38 KB
提交时间 评测时间
2018-08-29 22:49:56 2020-08-01 00:19:22
#include <cstdio>
#define isdigit(c) ('0' <= c && c <= '9')
#define rep(i,n) for (int i = 0; i < int(n); ++ i)

namespace IO {
	const int BUF_SIZE = 1 << 15;
	char IBUF[BUF_SIZE], OBUF[BUF_SIZE];
	char *PIBUF = IBUF + BUF_SIZE - 1, *POBUF = OBUF;
	
	inline int getchar() {
		if (++ PIBUF == IBUF + BUF_SIZE)
			fread(PIBUF = IBUF, 1, BUF_SIZE, stdin);
		return *PIBUF;
	}
	
	inline void putchar(int x) {
		*POBUF = x;
		if (++ POBUF == OBUF + BUF_SIZE)
			fwrite(POBUF = OBUF, 1, BUF_SIZE, stdout);
	}
	
	inline void flush() {
		if (POBUF != OBUF)
			fwrite(OBUF, 1, POBUF - OBUF, stdout);
	}
}

#define getchar()  IO :: getchar()
#define putchar(x) IO :: putchar(x)

inline
int getint() {
	int a = 0, b = 1, c = getchar();
	for (;!isdigit(c); c = getchar()) if (c == '-') b = -b;
	for (; isdigit(c); c = getchar()) a = (a<<3) + (a<<1) + (c^48);
	return a * b;
}

template <typename T>
inline void putint(T x) {
	if (x < 0) putchar('-'), x = -x;
	if (x >= 10) putint(x / 10);
	putchar(x - x / 10 * 10 + 48);
}

const int Maxn = 1 << 10;
int n, a[Maxn], b[Maxn];

void Read() {
	n = getint();
	rep(i, n) {
		a[i] = getint();
		b[i] = getint();
	}
}

void Init() {
}

void Solve() {
	rep(i, n) putint(a[i] + b[i]), putchar('\n');
}

int main() {
#ifdef DEBUG
	freopen("/home/denverjin/input",  "r", stdin);
	freopen("/home/denverjin/output", "w", stdout);
#endif
	Read();
	Init();
	Solve();
	IO :: flush();
	return 0;
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #114.06 us28 KBAcceptedScore: 100


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