QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#78527 | #5521. Excellent XOR Problem | yuto1115 | AC ✓ | 106ms | 14136kb | C++17 | 8.1kb | 2023-02-19 11:35:57 | 2023-02-19 11:36:04 |
Judging History
answer
#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
#include<ext/pb_ds/tag_and_trait.hpp>
#define overload4(_1, _2, _3, _4, name, ...) name
#define rep1(i, n) for (ll i = 0; i < ll(n); ++i)
#define rep2(i, s, n) for (ll i = ll(s); i < ll(n); ++i)
#define rep3(i, s, n, d) for(ll i = ll(s); i < ll(n); i+=d)
#define rep(...) overload4(__VA_ARGS__,rep3,rep2,rep1)(__VA_ARGS__)
#define rrep1(i, n) for (ll i = ll(n)-1; i >= 0; i--)
#define rrep2(i, n, t) for (ll i = ll(n)-1; i >= (ll)t; i--)
#define rrep3(i, n, t, d) for (ll i = ll(n)-1; i >= (ll)t; i-=d)
#define rrep(...) overload4(__VA_ARGS__,rrep3,rrep2,rrep1)(__VA_ARGS__)
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define SUM(a) accumulate(all(a),0LL)
#define MIN(a) *min_element(all(a))
#define MAX(a) *max_element(all(a))
#define SORT(a) sort(all(a));
#define REV(a) reverse(all(a));
#define SZ(a) int(a.size())
#define popcount(x) __builtin_popcountll(x)
#define pf push_front
#define pb push_back
#define ef emplace_front
#define eb emplace_back
#define ppf pop_front
#define ppb pop_back
#ifdef __LOCAL
#define debug(...) { cout << #__VA_ARGS__; cout << ": "; print(__VA_ARGS__); cout << flush; }
#else
#define debug(...) void(0);
#endif
#define INT(...) int __VA_ARGS__;scan(__VA_ARGS__)
#define LL(...) ll __VA_ARGS__;scan(__VA_ARGS__)
#define STR(...) string __VA_ARGS__;scan(__VA_ARGS__)
#define CHR(...) char __VA_ARGS__;scan(__VA_ARGS__)
#define DBL(...) double __VA_ARGS__;scan(__VA_ARGS__)
#define LD(...) ld __VA_ARGS__;scan(__VA_ARGS__)
using namespace std;
using namespace __gnu_pbds;
using ll = long long;
using ld = long double;
using P = pair<int, int>;
using LP = pair<ll, ll>;
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using vl = vector<ll>;
using vvl = vector<vl>;
using vvvl = vector<vvl>;
using vd = vector<double>;
using vvd = vector<vd>;
using vs = vector<string>;
using vc = vector<char>;
using vvc = vector<vc>;
using vb = vector<bool>;
using vvb = vector<vb>;
using vp = vector<P>;
using vvp = vector<vp>;
using vlp = vector<LP>;
using vvlp = vector<vlp>;
template<class T>
using PQ = priority_queue<T>;
template<class T>
using PQrev = priority_queue<T, vector<T>, greater<T>>;
template<class S, class T>
istream &operator>>(istream &is, pair<S, T> &p) { return is >> p.first >> p.second; }
template<class S, class T>
ostream &operator<<(ostream &os, const pair<S, T> &p) { return os << '{' << p.first << ", " << p.second << '}'; }
template<class S, class T, class U>
istream &operator>>(istream &is, tuple<S, T, U> &t) { return is >> get<0>(t) >> get<1>(t) >> get<2>(t); }
template<class S, class T, class U>
ostream &operator<<(ostream &os, const tuple<S, T, U> &t) {
return os << '{' << get<0>(t) << ", " << get<1>(t) << ", " << get<2>(t) << '}';
}
template<class T>
istream &operator>>(istream &is, vector<T> &v) {
for (T &t: v) { is >> t; }
return is;
}
template<class T>
ostream &operator<<(ostream &os, const vector<T> &v) {
os << '[';
rep(i, v.size()) os << v[i] << (i == int(v.size() - 1) ? "" : ", ");
return os << ']';
}
template<class T>
ostream &operator<<(ostream &os, const deque<T> &v) {
os << '[';
rep(i, v.size()) os << v[i] << (i == int(v.size() - 1) ? "" : ", ");
return os << ']';
}
template<class T>
ostream &operator<<(ostream &os, const set<T> &st) {
os << '{';
auto it = st.begin();
while (it != st.end()) {
os << (it == st.begin() ? "" : ", ") << *it;
it++;
}
return os << '}';
}
template<class T>
ostream &operator<<(ostream &os, const multiset<T> &st) {
os << '{';
auto it = st.begin();
while (it != st.end()) {
os << (it == st.begin() ? "" : ", ") << *it;
it++;
}
return os << '}';
}
template<class T, class U>
ostream &operator<<(ostream &os, const map<T, U> &mp) {
os << '{';
auto it = mp.begin();
while (it != mp.end()) {
os << (it == mp.begin() ? "" : ", ") << *it;
it++;
}
return os << '}';
}
template<class T>
void vecout(const vector<T> &v, char div = '\n') {
rep(i, v.size()) cout << v[i] << (i == int(v.size() - 1) ? '\n' : div);
}
template<class T>
bool constexpr chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template<class T>
bool constexpr chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
void scan() {}
template<class Head, class... Tail>
void scan(Head &head, Tail &... tail) {
cin >> head;
scan(tail...);
}
template<class T>
void print(const T &t) { cout << t << '\n'; }
template<class Head, class... Tail>
void print(const Head &head, const Tail &... tail) {
cout << head << ' ';
print(tail...);
}
template<class T>
vector<T> &operator+=(vector<T> &v, T x) {
for (T &t: v) t += x;
return v;
}
template<class T>
vector<T> &operator-=(vector<T> &v, T x) {
for (T &t: v) t -= x;
return v;
}
template<class T>
vector<T> &operator*=(vector<T> &v, T x) {
for (T &t: v) t *= x;
return v;
}
template<class T>
vector<T> &operator/=(vector<T> &v, T x) {
for (T &t: v) t /= x;
return v;
}
struct Init_io {
Init_io() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
cout << boolalpha << fixed << setprecision(15);
cerr << boolalpha << fixed << setprecision(15);
}
} init_io;
const string yes[] = {"no", "yes"};
const string Yes[] = {"No", "Yes"};
const string YES[] = {"NO", "YES"};
const int inf = 1001001001;
const ll linf = 1001001001001001001;
void rearrange(const vi &) {}
template<class T, class... Tail>
void rearrange(const vi &ord, vector<T> &head, Tail &...tail) {
assert(ord.size() == head.size());
vector<T> ori = head;
rep(i, ord.size()) head[i] = ori[ord[i]];
rearrange(ord, tail...);
}
template<class T, class... Tail>
void sort_by(vector<T> &head, Tail &... tail) {
vi ord(head.size());
iota(all(ord), 0);
sort(all(ord), [&](int i, int j) { return head[i] < head[j]; });
rearrange(ord, head, tail...);
}
bool in_rect(int i, int j, int h, int w) {
return 0 <= i and i < h and 0 <= j and j < w;
}
template<class T>
constexpr vector<T> pow_table(int n, T base) {
vector<T> res(n, 1);
rep(i, n - 1) res[i + 1] = res[i] * base;
return res;
}
template<class T, class S>
vector<T> cumsum(const vector<S> &v, bool shift_one = true) {
int n = v.size();
vector<T> res;
if (shift_one) {
res.resize(n + 1);
rep(i, n) res[i + 1] = res[i] + v[i];
} else {
res.resize(n);
if (n) {
res[0] = v[0];
rep(i, 1, n) res[i] = res[i - 1] + v[i];
}
}
return res;
}
vvi graph(int n, int m, bool directed = false, int origin = 1) {
vvi G(n);
rep(_, m) {
INT(u, v);
u -= origin, v -= origin;
G[u].pb(v);
if (!directed) G[v].pb(u);
}
return G;
}
template<class T>
vector<vector<pair<int, T>>> weighted_graph(int n, int m, bool directed = false, int origin = 1) {
vector<vector<pair<int, T>>> G(n);
rep(_, m) {
int u, v;
T w;
scan(u, v, w);
u -= origin, v -= origin;
G[u].eb(v, w);
if (!directed) G[v].eb(u, w);
}
return G;
}
void solve() {
INT(n);
vi a(n);
scan(a);
vi s(n + 1);
rep(i, n) s[i + 1] = s[i] ^ a[i];
if (s[0] != s[n]) {
print("YES");
print(2);
print(1, 1);
print(2, n);
return;
}
map<int, int> mp;
rep(i, n + 1) if (s[i]) mp[s[i]] = i;
if (SZ(mp) <= 1) {
print("NO");
return;
}
vi v = {0, n};
v.pb(mp.begin()->second);
v.pb(next(mp.begin())->second);
sort(all(v));
print("YES");
print(3);
rep(i, 3) print(v[i] + 1, v[i + 1]);
}
int main() {
int t;
cin >> t;
rep(i, t) solve();
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3416kb
input:
4 2 0 0 3 1 2 3 5 16 8 4 2 1 6 42 42 42 42 42 42
output:
NO YES 3 1 1 2 2 3 3 YES 2 1 1 2 5 NO
result:
ok Correct (4 test cases)
Test #2:
score: 0
Accepted
time: 13ms
memory: 4644kb
input:
1 200000 0 0 104990627 0 104990627 0 0 0 0 104990627 0 104990627 0 0 104990627 104990627 0 0 0 0 0 104990627 0 0 0 104990627 104990627 104990627 0 104990627 0 104990627 104990627 0 104990627 0 0 0 104990627 104990627 0 0 104990627 104990627 0 0 104990627 0 0 0 0 0 104990627 104990627 0 0 0 0 0 10499...
output:
YES 2 1 1 2 200000
result:
ok Correct (1 test case)
Test #3:
score: 0
Accepted
time: 106ms
memory: 14048kb
input:
1 200000 916550535 1039111536 183367143 845311658 473404911 844600350 249761080 860927112 268559756 661297994 448456545 184790162 804023458 655065019 442145717 130497524 509071033 644651807 1039510287 766490362 514960668 612238468 863513676 417538457 839195481 901404895 760875212 983171045 343221187...
output:
YES 3 1 95 96 21200 21201 200000
result:
ok Correct (1 test case)
Test #4:
score: 0
Accepted
time: 23ms
memory: 4648kb
input:
1 200000 697100980 63360185 3577101 75632048 903073319 644702701 1017474476 268785811 6091842 227390753 270800416 554896940 318364388 526066510 354510498 1034952286 613138496 176305121 384248064 715019967 999545181 91222841 1063728923 665773338 354670745 473570604 220064105 301115885 1038664738 3094...
output:
YES 2 1 1 2 200000
result:
ok Correct (1 test case)
Test #5:
score: 0
Accepted
time: 15ms
memory: 4576kb
input:
1 200000 446225258 446225258 446225258 446225258 0 0 446225258 446225258 0 446225258 0 0 446225258 0 446225258 0 446225258 446225258 446225258 0 446225258 0 0 446225258 0 0 446225258 446225258 446225258 446225258 0 0 0 446225258 0 446225258 446225258 0 0 0 0 446225258 446225258 446225258 446225258 0...
output:
YES 3 1 139152 139153 199999 200000 200000
result:
ok Correct (1 test case)
Test #6:
score: 0
Accepted
time: 16ms
memory: 4628kb
input:
1 200000 917884074 0 917884074 917884074 0 0 0 917884074 917884074 0 917884074 0 0 0 917884074 0 917884074 917884074 0 917884074 0 917884074 0 917884074 0 917884074 0 0 917884074 0 0 0 0 917884074 0 0 917884074 0 0 917884074 0 0 0 917884074 0 0 917884074 917884074 917884074 0 917884074 917884074 917...
output:
NO
result:
ok Correct (1 test case)
Test #7:
score: 0
Accepted
time: 100ms
memory: 14108kb
input:
1 200000 38752313 357331606 537948798 987818688 44594898 45009755 99389192 639845557 292429925 1073152680 811573855 591475451 1008870823 139070983 91604841 527091101 925340882 918748711 565945042 560608781 305815075 675659609 590632841 336736157 1048580186 263809556 745114432 402434054 977511741 738...
output:
YES 3 1 35909 35910 166360 166361 200000
result:
ok Correct (1 test case)
Test #8:
score: 0
Accepted
time: 19ms
memory: 4536kb
input:
1 200000 893044581 455322080 358158755 218139078 474263307 918853931 867102588 47704257 29962011 639245440 633917727 961582229 523211753 10072474 3969623 357804040 1029408344 450402025 984424643 509138385 790399588 154643982 790848088 584971038 564055450 909717089 204303325 794120719 599213467 16634...
output:
YES 2 1 1 2 200000
result:
ok Correct (1 test case)
Test #9:
score: 0
Accepted
time: 20ms
memory: 4620kb
input:
1 200000 0 185376886 185376886 0 0 185376886 0 0 0 185376886 185376886 185376886 0 185376886 0 185376886 0 0 0 185376886 0 185376886 0 0 185376886 0 0 185376886 185376886 0 0 0 0 185376886 185376886 185376886 185376886 0 185376886 185376886 185376886 0 185376886 185376886 185376886 0 185376886 18537...
output:
YES 3 1 66722 66723 199999 200000 200000
result:
ok Correct (1 test case)
Test #10:
score: 0
Accepted
time: 6ms
memory: 4572kb
input:
1 200000 657035701 657035701 657035701 0 657035701 0 0 0 657035701 0 0 657035701 0 657035701 657035701 657035701 657035701 657035701 0 0 657035701 0 0 657035701 657035701 657035701 657035701 0 657035701 0 0 0 657035701 657035701 657035701 657035701 657035701 657035701 657035701 657035701 657035701 0...
output:
YES 2 1 1 2 200000
result:
ok Correct (1 test case)
Test #11:
score: 0
Accepted
time: 19ms
memory: 4608kb
input:
1 200000 858422083 738133618 507317400 938167375 459497018 1044660423 463406796 381197927 222652382 320503882 227297869 94859048 1041849577 22395538 867727705 113746555 121033531 998839546 547321231 944047181 838316629 703306016 929065075 831702287 292242396 594475369 700537839 114951735 741004316 3...
output:
YES 2 1 1 2 200000
result:
ok Correct (1 test case)
Test #12:
score: 0
Accepted
time: 14ms
memory: 4572kb
input:
1 200000 0 0 0 0 159868366 0 0 0 0 159868366 0 159868366 159868366 0 159868366 159868366 0 0 0 0 0 159868366 0 159868366 159868366 0 159868366 0 0 159868366 0 159868366 0 0 0 0 159868366 0 0 159868366 0 159868366 0 0 159868366 159868366 0 0 0 159868366 0 159868366 0 159868366 0 159868366 159868366 0...
output:
YES 2 1 1 2 200000
result:
ok Correct (1 test case)
Test #13:
score: 0
Accepted
time: 6ms
memory: 4588kb
input:
1 200000 0 0 0 631527185 0 0 0 0 631527185 0 0 0 0 631527185 0 631527185 0 0 0 0 631527185 0 631527185 631527185 0 0 0 631527185 0 631527185 631527185 631527185 0 0 0 631527185 0 631527185 0 631527185 631527185 0 0 0 631527185 631527185 0 631527185 0 631527185 0 0 631527185 631527185 631527185 0 0 0...
output:
YES 2 1 1 2 200000
result:
ok Correct (1 test case)
Test #14:
score: 0
Accepted
time: 22ms
memory: 4608kb
input:
1 200000 200073416 1032105039 1041689097 776612191 674760420 444967477 619063336 752257673 508990464 92523985 768071308 131437559 658614189 709141835 604822048 679627194 433235918 667541312 729018209 789635995 144586522 214000960 455968993 502665106 986151837 384714321 151846341 216269904 679851319 ...
output:
YES 2 1 1 2 200000
result:
ok Correct (1 test case)
Test #15:
score: 0
Accepted
time: 21ms
memory: 4560kb
input:
1 200000 1054365685 56353689 861899055 6932581 30687005 245069829 313034908 160116373 246522551 732358569 590415180 501544337 172955118 580143326 517186829 510340133 537303380 199194626 73755986 738165599 629171036 766727158 656184240 750899987 501627101 1030621854 684777058 607956568 301553045 1962...
output:
YES 2 1 1 2 200000
result:
ok Correct (1 test case)
Test #16:
score: 0
Accepted
time: 9ms
memory: 4544kb
input:
1 200000 972761816 972761816 0 0 0 0 0 972761816 0 972761816 972761816 0 972761816 0 972761816 0 0 972761816 0 972761816 972761816 972761816 0 0 972761816 972761816 972761816 0 972761816 972761816 0 0 972761816 0 972761816 0 972761816 972761816 972761816 972761816 0 972761816 0 0 0 972761816 0 97276...
output:
YES 2 1 1 2 200000
result:
ok Correct (1 test case)
Test #17:
score: 0
Accepted
time: 95ms
memory: 14108kb
input:
1 200000 615466573 252334636 502318970 615057008 890023823 919016355 774719876 49575596 795328547 938285912 235102923 168016069 275378801 322146308 341916391 171766010 745438304 336243078 910715187 635224808 524598239 798437728 1056614735 173627925 606319454 174953272 676896668 317588073 618698322 1...
output:
YES 3 1 46556 46557 46946 46947 200000
result:
ok Correct (1 test case)
Test #18:
score: 0
Accepted
time: 82ms
memory: 14136kb
input:
1 200000 396017018 350325110 322528928 919119221 245950407 719118707 468691448 531176119 532860634 504378671 57446795 538122848 863461554 193147799 254281172 2478948 849505767 941638216 255452964 583754413 1009182753 277422102 183088158 421862806 121794718 820860806 136085561 709274737 240400048 625...
output:
YES 3 1 159983 159984 191239 191240 200000
result:
ok Correct (1 test case)
Test #19:
score: 0
Accepted
time: 19ms
memory: 4608kb
input:
1 200000 240254620 240254620 0 0 0 0 240254620 240254620 0 240254620 240254620 240254620 240254620 240254620 240254620 240254620 0 240254620 240254620 0 0 240254620 240254620 240254620 0 0 240254620 240254620 0 240254620 0 0 0 240254620 0 240254620 0 240254620 0 0 240254620 0 240254620 240254620 240...
output:
YES 3 1 36111 36112 199999 200000 200000
result:
ok Correct (1 test case)
Test #20:
score: 0
Accepted
time: 18ms
memory: 4548kb
input:
1 200000 711913436 711913436 711913436 711913436 711913436 0 0 0 711913436 0 0 711913436 711913436 0 711913436 711913436 0 0 0 0 0 0 0 711913436 0 711913436 0 711913436 711913436 0 711913436 711913436 0 711913436 0 711913436 711913436 0 0 711913436 711913436 711913436 711913436 711913436 0 711913436...
output:
YES 2 1 1 2 200000
result:
ok Correct (1 test case)
Test #21:
score: 0
Accepted
time: 17ms
memory: 4584kb
input:
1 200000 556496957 599491909 1064758529 195572743 122274978 164089666 171295779 399095216 771461740 455276133 667723649 166819107 744520439 855408620 629777826 1051765207 261024403 511573799 743922497 652011161 800590597 531579900 170198475 603500551 485391878 1044502886 944661988 665346837 11913824...
output:
YES 2 1 1 2 200000
result:
ok Correct (1 test case)
Test #22:
score: 0
Accepted
time: 44ms
memory: 8564kb
input:
2 100000 834074965 802479352 920598314 872396637 780256286 163927241 263678492 397223877 6095204 156235661 1066538453 960385267 992353390 543334786 291831058 164061413 544994443 625732746 817631952 525924738 1066391946 961527978 978173652 1014843663 443127874 705524878 472068645 68137659 99653388 54...
output:
YES 3 1 69 70 19251 19252 100000 YES 2 1 1 2 100000
result:
ok Correct (2 test cases)
Test #23:
score: 0
Accepted
time: 13ms
memory: 3856kb
input:
2 100000 909567027 0 0 909567027 909567027 909567027 909567027 0 0 0 0 0 909567027 909567027 909567027 909567027 909567027 0 0 909567027 909567027 909567027 0 0 0 909567027 0 909567027 909567027 0 909567027 0 909567027 0 0 0 909567027 909567027 0 0 909567027 909567027 0 909567027 909567027 0 9095670...
output:
YES 3 1 1373 1374 99999 100000 100000 YES 2 1 1 2 100000
result:
ok Correct (2 test cases)
Test #24:
score: 0
Accepted
time: 38ms
memory: 8888kb
input:
2 100000 0 307484032 307484032 0 0 0 0 0 0 307484032 307484032 307484032 0 0 0 307484032 0 0 307484032 0 307484032 307484032 307484032 307484032 307484032 0 0 0 0 307484032 307484032 0 0 307484032 0 307484032 0 0 307484032 307484032 307484032 307484032 307484032 307484032 0 307484032 0 307484032 0 3...
output:
YES 2 1 1 2 100000 YES 3 1 9885 9886 33097 33098 100000
result:
ok Correct (2 test cases)
Test #25:
score: 0
Accepted
time: 15ms
memory: 3812kb
input:
2 100000 779142847 779142847 0 779142847 779142847 0 0 779142847 0 0 779142847 0 779142847 779142847 779142847 779142847 0 779142847 779142847 0 0 0 0 779142847 0 779142847 0 779142847 0 0 0 779142847 779142847 779142847 779142847 0 0 779142847 0 779142847 0 779142847 0 779142847 0 779142847 0 0 0 7...
output:
YES 2 1 1 2 100000 YES 2 1 1 2 100000
result:
ok Correct (2 test cases)
Test #26:
score: 0
Accepted
time: 76ms
memory: 8548kb
input:
2 100000 1030018566 120699423 201438145 1014903668 351446274 438078471 113306604 176142323 29965373 568090348 355913940 293328732 123458931 27340750 1015032006 560654991 961264292 899829650 344066707 320043156 857246353 1024949120 705292817 934041363 652512579 67929539 456307864 561142492 733943941 ...
output:
YES 3 1 44453 44454 99067 99068 100000 YES 3 1 3392 3393 88536 88537 100000
result:
ok Correct (2 test cases)
Test #27:
score: 0
Accepted
time: 15ms
memory: 3836kb
input:
2 100000 648718659 0 648718659 0 648718659 0 0 648718659 0 0 648718659 0 648718659 0 0 0 0 648718659 0 648718659 0 0 0 648718659 0 0 648718659 0 0 648718659 648718659 0 648718659 648718659 648718659 648718659 0 0 0 0 648718659 648718659 648718659 0 648718659 648718659 0 648718659 648718659 0 0 0 0 0...
output:
YES 3 1 12194 12195 99999 100000 100000 YES 3 1 86932 86933 99999 100000 100000
result:
ok Correct (2 test cases)
Test #28:
score: 0
Accepted
time: 21ms
memory: 3796kb
input:
2 100000 46635647 0 0 46635647 0 46635647 0 0 46635647 0 0 0 0 0 0 46635647 0 0 46635647 0 46635647 46635647 46635647 46635647 46635647 0 0 0 0 46635647 46635647 46635647 46635647 0 46635647 46635647 0 0 0 0 46635647 0 0 46635647 46635647 0 46635647 46635647 46635647 0 0 46635647 0 0 46635647 0 0 46...
output:
YES 3 1 4911 4912 99998 99999 100000 NO
result:
ok Correct (2 test cases)
Test #29:
score: 0
Accepted
time: 22ms
memory: 3820kb
input:
2 100000 0 518294466 0 0 518294466 0 0 0 0 518294466 518294466 518294466 518294466 518294466 0 0 0 0 518294466 0 518294466 518294466 0 0 0 518294466 0 0 518294466 518294466 0 0 0 0 0 0 0 0 518294466 518294466 0 518294466 518294466 518294466 0 518294466 0 0 518294466 0 0 0 518294466 0 518294466 51829...
output:
YES 2 1 1 2 100000 YES 2 1 1 2 100000
result:
ok Correct (2 test cases)
Test #30:
score: 0
Accepted
time: 27ms
memory: 4196kb
input:
2 100000 152220344 512661318 556019799 83668874 996378085 712229700 1036676540 1028802593 53835542 979945034 719031251 700014021 328306296 585088538 664491130 957248569 303792317 100184730 944243286 114161574 648100760 14628437 432411982 853239063 861897284 504076024 440547084 1054147326 294492670 2...
output:
YES 2 1 1 2 100000 YES 3 1 4054 4055 99997 99998 100000
result:
ok Correct (2 test cases)
Test #31:
score: 0
Accepted
time: 47ms
memory: 8884kb
input:
2 100000 0 0 256091592 256091592 256091592 256091592 256091592 256091592 0 256091592 256091592 0 256091592 256091592 256091592 256091592 0 256091592 256091592 0 0 0 0 256091592 0 256091592 256091592 0 0 0 256091592 256091592 256091592 256091592 256091592 256091592 0 0 256091592 256091592 256091592 2...
output:
YES 2 1 1 2 100000 YES 3 1 29491 29492 73801 73802 100000
result:
ok Correct (2 test cases)
Test #32:
score: 0
Accepted
time: 25ms
memory: 4616kb
input:
10 20000 0 0 0 611548380 0 0 611548380 611548380 0 0 0 0 0 0 0 0 611548380 0 611548380 611548380 0 611548380 611548380 611548380 611548380 0 0 611548380 0 611548380 0 0 611548380 611548380 611548380 611548380 0 611548380 0 611548380 0 0 0 611548380 611548380 0 611548380 0 0 0 611548380 0 0 611548380...
output:
NO YES 2 1 1 2 20000 NO YES 2 1 1 2 20000 YES 3 1 3651 3652 9823 9824 20000 YES 3 1 16854 16855 19447 19448 20000 YES 3 1 11470 11471 15513 15514 20000 NO YES 2 1 1 2 20000 YES 2 1 1 2 20000
result:
ok Correct (10 test cases)
Test #33:
score: 0
Accepted
time: 16ms
memory: 3632kb
input:
100 2000 681949331 0 681949331 0 681949331 0 681949331 681949331 0 0 0 0 681949331 0 681949331 0 0 681949331 0 0 0 681949331 0 681949331 0 681949331 681949331 0 681949331 681949331 0 0 0 681949331 0 0 0 0 0 681949331 0 681949331 0 681949331 0 0 0 681949331 681949331 681949331 0 0 681949331 681949331...
output:
YES 3 1 1024 1025 1999 2000 2000 YES 2 1 1 2 2000 YES 2 1 1 2 2000 YES 2 1 1 2 2000 NO YES 3 1 1057 1058 1999 2000 2000 YES 2 1 1 2 2000 YES 2 1 1 2 2000 YES 2 1 1 2 2000 YES 2 1 1 2 2000 YES 3 1 1231 1232 1999 2000 2000 YES 3 1 889 890 1999 2000 2000 YES 3 1 382 383 1998 1999 2000 YES 2 1 1 2 2000 ...
result:
ok Correct (100 test cases)
Test #34:
score: 0
Accepted
time: 21ms
memory: 3452kb
input:
1000 200 0 857719523 857719523 0 0 0 0 857719523 857719523 857719523 857719523 857719523 857719523 857719523 857719523 857719523 0 857719523 857719523 857719523 0 0 0 857719523 0 0 0 0 857719523 0 857719523 0 857719523 857719523 857719523 0 857719523 857719523 0 857719523 857719523 0 857719523 0 857...
output:
NO YES 2 1 1 2 200 YES 3 1 80 81 135 136 200 NO YES 2 1 1 2 200 YES 3 1 97 98 101 102 200 YES 3 1 118 119 199 200 200 NO YES 3 1 29 30 186 187 200 YES 3 1 76 77 199 200 200 YES 3 1 29 30 146 147 200 YES 2 1 1 2 200 YES 3 1 164 165 197 198 200 YES 2 1 1 2 200 YES 2 1 1 2 200 YES 3 1 26 27 101 102 200...
result:
ok Correct (1000 test cases)
Test #35:
score: 0
Accepted
time: 13ms
memory: 3428kb
input:
10000 20 543900313 552726730 947126694 840978907 254176888 60122111 901884666 505199489 688914573 1003996438 620599360 398547760 887489086 4512916 32391303 303536170 870861026 605856275 261632530 688416256 20 284854977 921584855 161086236 339543341 933767136 929406209 381540152 92180425 339023172 87...
output:
YES 2 1 1 2 20 YES 2 1 1 2 20 YES 2 1 1 2 20 NO YES 3 1 9 10 13 14 20 YES 3 1 15 16 16 17 20 YES 2 1 1 2 20 YES 3 1 15 16 19 20 20 YES 3 1 15 16 18 19 20 YES 3 1 1 2 15 16 20 NO YES 3 1 5 6 9 10 20 YES 2 1 1 2 20 YES 2 1 1 2 20 YES 3 1 5 6 19 20 20 NO YES 2 1 1 2 20 NO YES 2 1 1 2 20 YES 3 1 14 15 1...
result:
ok Correct (10000 test cases)
Test #36:
score: 0
Accepted
time: 11ms
memory: 3744kb
input:
42 4761 0 406135131 0 0 406135131 0 0 0 406135131 0 406135131 0 406135131 406135131 406135131 406135131 406135131 406135131 406135131 406135131 0 0 406135131 406135131 406135131 0 0 406135131 0 0 406135131 406135131 0 0 0 0 0 0 0 0 0 0 406135131 406135131 0 0 0 0 0 0 0 406135131 0 0 406135131 0 0 0 ...
output:
YES 2 1 1 2 4761 YES 3 1 224 225 2811 2812 4761 NO NO NO YES 3 1 834 835 1409 1410 4761 YES 3 1 234 235 1420 1421 4761 YES 3 1 857 858 4430 4431 4761 NO YES 2 1 1 2 4761 YES 2 1 1 2 4761 YES 3 1 931 932 2499 2500 4761 YES 2 1 1 2 4761 YES 2 1 1 2 4761 YES 2 1 1 2 4761 YES 2 1 1 2 4761 NO YES 2 1 1 2...
result:
ok Correct (42 test cases)
Test #37:
score: 0
Accepted
time: 19ms
memory: 3580kb
input:
69 2898 1043469461 887549000 375976511 641202294 878960199 722023725 570188910 937161815 878558705 34638420 597411082 869488413 382147772 594460075 498438352 733654425 1067577882 331916040 1043788544 1014317250 332187708 695658657 836342240 856880689 101765274 605650836 28207929 123846822 992872560 ...
output:
YES 3 1 1308 1309 1811 1812 2898 YES 2 1 1 2 2898 YES 2 1 1 2 2898 YES 3 1 2068 2069 2897 2898 2898 NO NO YES 2 1 1 2 2898 NO YES 3 1 893 894 2613 2614 2898 YES 3 1 1108 1109 2897 2898 2898 YES 2 1 1 2 2898 YES 3 1 1301 1302 1836 1837 2898 NO YES 2 1 1 2 2898 YES 3 1 1217 1218 1808 1809 2898 YES 3 1...
result:
ok Correct (69 test cases)