提交记录 6845


用户 题目 状态 得分 用时 内存 语言 代码长度
Xylodesu 1000i. 【传统题】 A+B Problem Accepted 100 68.65 us 40 KB C++ 981 B
提交时间 评测时间
2018-11-08 14:11:37 2020-08-01 00:50:45
#include <bits/stdc++.h>

using namespace std;

typedef double dd;
typedef long long ll;

#define fora(i, j, k) for (int i = j; i <= k; ++i)
#define lowbit(x) (x & (-x))

inline ll read() {
	ll s = 0; char c = getchar(); int tip = 1;
	for (; !isdigit(c); c = getchar())
		if (c == '-') tip *= -1;
	for (; isdigit(c); c = getchar())
		s = (s << 3) + (s << 1) + (c ^ 48);
	return s * tip;
}

const int maxn = 100000 + 10;

int i, j, k, m, n;
ll a[maxn], tr1[maxn], tr2[maxn];

void update(ll *arr, int x, ll y) {
	for (int xx = x; xx <= n; xx += lowbit(xx)) arr[xx] += y;
}

ll find(ll *arr, int x) {
	ll ssum = 0;
	for (int xx = x; xx > 0; xx -= lowbit(xx)) ssum += arr[xx];
	return ssum;
}

ll getsum(int x, int y) {
	ll sum1 = (ll)a[x-1] + (ll)x * find(tr1, x-1) - find(tr2, x-1);
	ll sum2 = (ll)a[y] + (ll)(y+1) * find(tr1, y) - find(tr2, y);
	return sum2 - sum1;
}

int main() {
	n = read();
	fora(i, 1, n) {
		ll u = read(), v = read();
		printf("%lld\n", u+v);
	}
	return 0;
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #168.65 us40 KBAcceptedScore: 100


Judge Duck Online | 评测鸭在线
Server Time: 2026-04-09 10:29:15 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠