Integer Sequence Dividing CodeForces - 1102A (规律) You are given an integer sequence1,2,…,n1,2,…,n. You have to divide it into two setsAAandBB in such a way that each element belongs toexactly one set and|sum(A)−sum(B)||sum(A)−sum(B)| is minimum possible. The value|...
Breadcrumbs CodeForces / 1102A-IntegerSequenceDividing.cpp Latest commit DionysiosB 1102A-IntegerSequenceDividing 531038e· Jul 14, 2019 HistoryHistory File metadata and controls Code Blame 10 lines (7 loc) · 133 Bytes Raw #include <cstdio> int main(){ long n; scanf("%ld", &n); n %=...