QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#304390 | #5201. Cactus Meets Torus | LaStataleBlue | AC ✓ | 54ms | 49812kb | C++23 | 3.9kb | 2024-01-13 19:04:03 | 2024-01-13 19:04:03 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
#define rep(i, a, b) for(int i = a; i < (b); ++i)
#define all(x) begin(x), end(x)
#define sz(x) (int)(x).size()
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
vector<vector<int>> grafo;
vector<pair<int,int>> edges;
vi num, st; vector<vector<pii>> ed; int Time;
template<class F> int dfs(int at, int par, F& f) {
int me = num[at] = ++Time, e, y, top = me;
for (auto pa : ed[at]) if (pa.second != par) {
tie(y, e) = pa;
if (num[y]) {
top = min(top, num[y]);
if (num[y] < me)
st.push_back(e);
} else {
int si = sz(st); int up = dfs(y, e, f);
top = min(top, up);
if (up == me) {
st.push_back(e);
f(vi(st.begin() + si, st.end()));
st.resize(si);
}
else if (up < me) st.push_back(e);
else{
grafo[edges[e].first].push_back(edges[e].second);
grafo[edges[e].second].push_back(edges[e].first);
}
}
}
return top;//idea per block cut tree: collego ogni
} //nodo con un nodo che rappresenta la sua bicomp.
template<class F> void bicomps(F f) { //0-based
num.assign(sz(ed), 0);
rep(i,0,sz(ed)) if (!num[i]) dfs(i, -1, f);
}
void solve(){
int n,m;
cin>>n>>m;
if(n==0 && m==0)exit(0);
grafo = vector(n,vector<int>());
edges.clear();
ed.clear();
num.clear();st.clear();Time=0;
int eid = 0;
ed.resize(n);
for(int i=0;i<m;i++){
int s;
cin>>s;
int u;
cin>>u;
u--;
for(int j=0;j<s-1;j++){
int v;
cin>>v;
v--;
edges.push_back({u,v});
ed[u].emplace_back(v,eid);
ed[v].emplace_back(u,eid++);
u=v;
}
}
int cc = 0;
bicomps([&](const vi& edgelist){
grafo.push_back(vector<int>());
unordered_set<int> ds;
for(auto i : edgelist){
auto [u,v] = edges[i];
ds.insert(u);
ds.insert(v);
}
for(auto i : ds){
grafo[n+cc].push_back(i);
grafo[i].push_back(n+cc);
}
cc++;
});
if(cc<=1){
cout<<"Yes\n";
}else{
vector grafo2(n+cc,vector<int>());
auto dfs = [&](auto &dfs,int nodo,int last)->bool{
bool res=(nodo>=n);
for(auto i : grafo[nodo]){
if(i!=last){
if(dfs(dfs,i,nodo)){
res=true;
grafo2[nodo].push_back(i);
grafo2[i].push_back(nodo);
}
}
}
return res;
};
dfs(dfs,n,-1);
int centro = -1;
bool ok = true;
for(int i=0;i<n;i++){
for(auto j : grafo2[i]){
if(grafo2[j].size()==1)continue;
else{
if(centro==-1)centro=j;
else{
if(centro!=j){
ok=false;
}
}
}
}
}
if(ok){
cout<<"Yes\n";
return;
}
for(int i=0;i<n+cc;i++){
int cont=0;
for(auto j : grafo2[i]){
if(grafo2[j].size()>1)cont++;
}
if(cont>2){
cout<<"No\n";
return;
}
}
cout<<"Yes\n";
}
}
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
//cin>>t;
while(true)solve();
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3572kb
input:
6 1 8 1 2 3 1 4 5 6 4 10 2 9 1 2 3 1 10 4 5 6 4 5 7 8 9 7 10 0 0
output:
Yes No
result:
ok 2 token(s): yes count is 1, no count is 1
Test #2:
score: 0
Accepted
time: 0ms
memory: 3796kb
input:
15 3 9 1 2 3 4 5 6 7 8 3 7 2 9 10 11 12 13 10 5 2 14 9 15 10 15 7 3 1 2 3 3 4 2 5 3 6 2 7 3 8 2 9 3 10 2 11 3 12 2 13 3 14 2 15 1 0 2 1 2 1 2 2 1 2 2 1 3 1 4 1 3 2 1 4 2 3 1 2 3 2 2 4 6 2 5 1 2 3 4 5 2 4 6 7 3 5 1 2 3 4 5 2 4 6 2 4 7 7 2 6 1 2 3 4 5 6 2 5 7 8 3 6 1 2 3 4 5 6 2 5 7 2 5 8 9 4 5 1 2 3 ...
output:
Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
result:
ok 18 token(s): yes count is 18, no count is 0
Test #3:
score: 0
Accepted
time: 21ms
memory: 3532kb
input:
6 1 8 6 1 2 3 1 4 5 1 6 1 8 5 1 2 3 1 4 6 1 6 1 8 4 1 2 3 1 5 6 1 6 2 6 4 1 2 3 1 5 2 1 6 6 1 8 6 1 2 4 1 3 5 1 6 1 8 5 1 2 4 1 3 6 1 6 1 8 3 1 2 4 1 5 6 1 6 2 6 3 1 2 4 1 5 2 1 6 6 1 8 6 1 2 5 1 3 4 1 6 1 8 4 1 2 5 1 3 6 1 6 1 8 3 1 2 5 1 4 6 1 6 2 6 3 1 2 5 1 4 2 1 6 6 1 8 5 1 2 6 1 3 4 1 6 1 8 4 ...
output:
Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes ...
result:
ok 15304 token(s): yes count is 15304, no count is 0
Test #4:
score: 0
Accepted
time: 20ms
memory: 3572kb
input:
7 2 6 6 4 1 3 2 7 3 3 5 4 7 2 6 6 5 3 1 4 5 3 3 2 7 7 1 8 5 3 1 4 6 7 2 3 7 2 7 4 1 3 2 7 5 3 2 6 7 7 2 6 4 1 3 2 7 6 2 3 5 7 1 9 5 7 2 3 1 4 6 3 7 7 2 7 5 4 1 3 2 7 4 2 3 6 7 2 6 4 1 3 2 7 5 2 3 6 7 2 6 1 3 2 7 4 1 4 4 5 6 4 7 1 8 5 4 1 3 2 7 4 6 7 1 8 7 2 3 1 4 5 6 4 7 2 7 5 4 1 3 2 7 4 2 6 7 7 1 ...
output:
Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes ...
result:
ok 14334 token(s): yes count is 14334, no count is 0
Test #5:
score: 0
Accepted
time: 22ms
memory: 3532kb
input:
8 1 11 2 1 3 6 1 4 7 1 5 8 1 8 3 3 2 1 3 6 6 1 4 5 1 7 2 1 8 8 3 5 8 2 1 3 2 4 4 1 5 4 4 1 6 7 1 8 1 10 6 1 2 3 1 4 5 1 7 8 8 2 6 3 1 2 4 1 5 4 6 1 7 8 8 2 9 3 1 2 7 1 4 6 1 5 2 7 8 8 2 4 5 1 2 8 7 3 1 4 7 1 6 3 8 1 10 2 1 3 5 1 4 8 7 1 6 8 2 9 2 1 3 6 1 4 7 1 5 2 7 8 8 2 9 2 1 3 7 1 4 6 1 5 2 3 8 8...
output:
Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes ...
result:
ok 12577 token(s): yes count is 12577, no count is 0
Test #6:
score: 0
Accepted
time: 22ms
memory: 3792kb
input:
8 3 6 5 1 3 4 2 6 2 1 7 2 3 8 8 2 9 5 1 3 4 2 6 4 7 1 2 6 8 8 2 8 4 2 6 3 1 5 3 8 2 1 7 8 2 5 7 1 3 5 1 6 5 4 2 6 8 4 8 2 8 7 1 3 6 2 4 5 1 2 3 8 8 2 8 4 2 6 3 1 5 7 1 3 3 8 6 8 2 6 4 2 6 3 1 5 4 1 7 8 3 8 1 10 8 7 1 3 6 2 4 6 5 1 8 2 5 5 1 3 7 1 6 2 4 8 7 6 2 8 2 4 5 1 3 8 6 1 7 4 2 6 4 8 2 9 3 1 5...
output:
Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes ...
result:
ok 12574 token(s): yes count is 12574, no count is 0
Test #7:
score: 0
Accepted
time: 16ms
memory: 3576kb
input:
8 2 5 2 3 6 8 4 4 7 1 5 8 8 2 5 2 3 7 1 5 5 3 8 6 7 4 8 2 6 2 3 7 1 5 8 4 4 6 7 4 8 1 10 2 3 7 1 5 7 4 8 6 7 8 1 9 2 3 7 1 5 7 4 8 6 8 2 8 2 3 8 5 1 7 4 6 2 7 8 8 2 8 2 3 8 4 6 7 1 5 2 6 8 8 2 7 2 3 8 4 7 1 5 3 7 6 8 8 2 4 2 3 8 4 6 6 8 7 1 5 7 8 1 10 8 3 5 1 7 2 4 6 2 5 8 2 7 3 8 7 1 5 2 4 3 6 2 7 ...
output:
Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes ...
result:
ok 9303 token(s): yes count is 9303, no count is 0
Test #8:
score: 0
Accepted
time: 26ms
memory: 11888kb
input:
12 2 14 4 7 3 9 1 2 9 7 8 10 5 6 10 7 3 6 11 12 12 2 14 4 3 1 9 11 3 5 7 6 10 2 12 10 7 3 3 8 5 12 3 11 2 1 5 3 6 4 11 6 7 10 6 4 1 9 8 2 3 3 12 5 12 3 6 3 1 9 2 4 11 5 1 10 2 12 4 7 6 5 7 9 5 8 6 12 2 12 5 1 3 8 4 2 6 4 7 8 9 3 5 1 11 10 12 11 12 4 9 9 1 2 4 3 5 4 11 1 2 4 12 4 2 7 10 2 4 5 6 8 5 1...
output:
Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes No Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
result:
ok 49 token(s): yes count is 48, no count is 1
Test #9:
score: 0
Accepted
time: 11ms
memory: 3604kb
input:
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 ...
output:
Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes ...
result:
ok 100000 token(s): yes count is 100000, no count is 0
Test #10:
score: 0
Accepted
time: 24ms
memory: 31896kb
input:
99999 101 1000 32244 95762 78501 83348 28467 91360 9056 89392 19668 88412 17854 22939 28586 50945 99686 5037 36493 39188 55169 44342 5609 67886 75429 16887 19090 5142 55471 70565 88954 30200 78991 62882 40718 18280 19211 67683 61782 3813 8650 62009 63780 91011 87580 69637 63404 44755 24226 86479 454...
output:
Yes
result:
ok YES
Test #11:
score: 0
Accepted
time: 23ms
memory: 36232kb
input:
100000 101 1000 1268 22803 72399 51251 34812 59639 66482 5076 85073 10938 2213 94149 65550 73155 7656 56323 3567 24936 16065 37548 78194 71104 75693 29614 54036 46097 56204 28654 23308 60363 77057 57877 48994 61615 46123 28834 20547 29922 30913 75414 573 36668 84211 91263 50779 53800 81881 8389 9710...
output:
Yes
result:
ok YES
Test #12:
score: 0
Accepted
time: 32ms
memory: 46860kb
input:
99999 101 1000 1 64352 38715 51977 33810 97488 45697 11932 96106 59012 22440 62199 24493 62707 28483 1129 31851 80577 54501 4083 46574 85832 83256 89257 91622 12334 12465 42528 41984 14664 18782 86742 10584 5171 60877 39014 49267 35458 59165 21742 1036 11200 18551 43064 51056 4746 86570 64829 31611 ...
output:
Yes
result:
ok YES
Test #13:
score: 0
Accepted
time: 29ms
memory: 47032kb
input:
100000 101 1000 1 20725 17833 37876 16957 58488 8411 60387 97023 23633 82033 12135 16566 95657 37137 21897 17471 72536 29883 42443 66153 81475 43318 79742 30727 26648 16034 44155 60554 79523 4167 90407 85123 33828 49644 21223 13414 32645 1692 76171 61892 43126 97823 19655 80323 29524 27337 69560 856...
output:
Yes
result:
ok YES
Test #14:
score: 0
Accepted
time: 31ms
memory: 33480kb
input:
100000 101 1000 55214 75533 82447 47389 7945 73763 56950 77595 78642 85306 13676 69771 51692 5188 70327 79361 96969 97516 37069 6115 81265 54007 85765 24022 40769 42352 50119 78843 12908 78108 4232 63376 69341 53588 35107 41209 27448 12292 27344 9760 70350 19280 22606 11855 63952 97474 57684 24293 2...
output:
Yes
result:
ok YES
Test #15:
score: 0
Accepted
time: 24ms
memory: 46552kb
input:
100000 101 1000 72753 70910 16994 78972 55380 52821 2951 57632 25242 98287 77527 30294 30252 48894 63248 78413 10916 86664 10414 90810 96638 59543 43512 66718 21705 31626 10740 70152 45317 20236 48619 61501 36113 95902 85933 76233 55323 65769 50896 8032 21763 56134 50881 31179 38460 27509 17958 4372...
output:
Yes
result:
ok YES
Test #16:
score: 0
Accepted
time: 40ms
memory: 46540kb
input:
100000 102 1000 48421 50216 60946 92732 92233 46241 92240 20076 24193 1019 61486 66061 70009 42878 54063 11090 49735 22985 8563 12803 49603 959 14993 11700 46047 10159 35848 46268 96771 45634 90215 36823 89681 77631 64706 2246 83550 76953 42861 42697 81468 98367 3949 77477 49099 94637 92953 29152 35...
output:
Yes
result:
ok YES
Test #17:
score: 0
Accepted
time: 34ms
memory: 47728kb
input:
100000 102 1000 39867 42613 34985 40151 28 24745 10830 77784 46457 21479 73392 51776 32577 87886 26554 64904 13444 16026 93383 46521 38176 92746 32711 53188 86026 73346 88609 17438 18536 1819 48096 30574 35921 6402 23671 78804 57936 24371 58770 75212 25363 56504 15052 7476 67493 56978 50826 51933 61...
output:
Yes
result:
ok YES
Test #18:
score: 0
Accepted
time: 34ms
memory: 47244kb
input:
99987 105 5 2885 70456 49769 47250 69528 1000 5402 16766 76144 10698 23067 17325 65770 26750 31705 46704 81628 46195 15020 48087 58089 67312 63285 11443 65984 12653 71095 21352 72872 11520 14328 88017 45836 81818 64722 61373 5830 36294 25716 89533 59461 46486 58902 55478 19747 7861 62391 83177 66106...
output:
Yes
result:
ok YES
Test #19:
score: 0
Accepted
time: 24ms
memory: 45908kb
input:
99991 102 1000 41793 24585 4515 53323 97475 26379 80653 58447 5914 71764 21791 35586 22047 56184 40064 8994 40889 10663 74145 13527 26257 81759 6458 55827 57184 49511 8445 63001 26405 19205 20553 20241 3068 10375 61015 61103 66693 2054 37612 44457 36328 12020 54237 550 48847 18538 24191 39879 55188 ...
output:
Yes
result:
ok YES
Test #20:
score: 0
Accepted
time: 44ms
memory: 32508kb
input:
100000 50000 4 2 47985 61238 81132 4 3 91840 49987 53092 4 5 54673 9955 97332 9 8 46427 49957 46995 65810 27606 378 82741 67155 4 10 36084 3196 54978 4 12 46239 34564 65315 5 13 94596 73450 29577 2163 7 14 53889 92611 71394 54669 56788 20320 5 16 66580 76614 61620 83796 5 18 76923 91921 80020 28052 ...
output:
Yes
result:
ok YES
Test #21:
score: 0
Accepted
time: 22ms
memory: 25868kb
input:
60000 10000 13 8 42331 58855 3707 10727 997 35299 12352 3947 9966 23576 8429 24702 8 15 35530 45617 37773 27088 41049 37243 29636 13 17 43788 53127 42839 7183 37006 7343 34445 25091 9223 37839 27405 2821 28 19 44542 31140 28882 17546 48679 8338 27747 58835 50853 27868 28321 56156 783 5751 42846 9652...
output:
Yes
result:
ok YES
Test #22:
score: 0
Accepted
time: 43ms
memory: 44708kb
input:
99000 9000 23 2 82651 19425 10078 91204 37402 20341 73913 27541 81303 86307 388 45013 57074 95561 86281 17351 79048 4268 95169 23943 36264 93237 43 12 70814 12387 63381 35642 35015 59741 33917 11539 18622 7221 44059 3251 27367 77583 18520 7486 14231 47027 33948 90254 48477 12197 28174 72054 50707 53...
output:
Yes
result:
ok YES
Test #23:
score: 0
Accepted
time: 22ms
memory: 20648kb
input:
62500 25000 5 1 11039 42049 54769 28942 5 2 3076 22829 10332 31356 5 3 36706 43187 51825 16677 11 6 13260 24233 3612 26515 29410 38902 44338 60884 43970 28171 11 7 10690 48569 10007 29943 22673 6578 43086 33297 44828 41215 5 9 29163 25891 14402 42717 7 10 4276 10904 17288 4265 45020 29988 7 12 49337...
output:
Yes Yes
result:
ok 2 token(s): yes count is 2, no count is 0
Test #24:
score: 0
Accepted
time: 28ms
memory: 16136kb
input:
49998 52 1000 32550 531 22278 2229 48928 44235 7179 13657 46399 39504 24467 29876 39861 8711 29438 32621 21667 14846 44616 45392 46451 48831 45480 49856 40027 39060 38804 10079 1340 5035 9999 23597 20667 21705 34469 17602 27236 7107 28692 44514 33974 31390 44460 25688 38640 10803 32112 40982 10995 4...
output:
Yes Yes
result:
ok 2 token(s): yes count is 2, no count is 0
Test #25:
score: 0
Accepted
time: 26ms
memory: 16692kb
input:
49998 51 1000 34874 21893 36186 19308 41406 25776 17123 4873 39037 20327 40978 44442 35390 44186 15331 37469 12146 48325 11716 3532 26110 5172 11172 14839 13642 15868 40414 16906 36865 45700 46841 37509 18865 28983 48794 2682 37553 3583 28867 3985 17402 9691 3449 2307 36099 44410 33648 1700 45024 44...
output:
Yes Yes
result:
ok 2 token(s): yes count is 2, no count is 0
Test #26:
score: 0
Accepted
time: 35ms
memory: 14888kb
input:
40000 3440 5 1 25799 18334 36748 1 1000 2 11381 38098 6149 9911 35365 39464 6149 37037 21108 15637 20872 38333 21108 21819 7217 27706 17223 21819 39320 15906 2380 6676 39320 34219 30309 21985 37480 39377 30309 15939 22145 22452 26481 15939 33720 17875 3495 34981 20328 17875 11212 14947 33493 27283 3...
output:
Yes Yes
result:
ok 2 token(s): yes count is 2, no count is 0
Test #27:
score: 0
Accepted
time: 49ms
memory: 17924kb
input:
50000 5377 4 1 43610 11900 1 1000 2 358 164 31665 37012 164 49442 3233 31801 49442 40087 1120 49442 25833 43268 41815 25833 28998 44488 25833 16746 25857 48217 16746 23172 27586 46442 23172 7624 44127 23172 3048 28626 13292 3048 35545 48141 3048 33982 22210 16643 33982 567 42811 10236 567 30652 3283...
output:
Yes No
result:
ok 2 token(s): yes count is 1, no count is 1
Test #28:
score: 0
Accepted
time: 38ms
memory: 16400kb
input:
50000 10000 11 2 41717 27988 1601 47111 28146 37826 9122 44686 39517 17908 11 16 7571 21332 43457 45415 12577 40193 16705 47133 10492 24243 10 22 31331 11587 5541 22238 3188 42152 48494 1325 42632 11 26 40230 609 12945 20917 4585 11978 21638 4534 34756 19633 17 27 48409 7323 32000 46010 7104 14668 3...
output:
Yes No
result:
ok 2 token(s): yes count is 1, no count is 1
Test #29:
score: 0
Accepted
time: 43ms
memory: 14652kb
input:
50000 5001 9 1 5409 15774 18304 14479 15684 13525 14639 14479 14 1 19372 39107 23301 14245 30121 18596 40399 25888 10932 42417 9611 11782 10932 21 23301 40749 6969 47366 49713 36872 1729 5401 30628 25843 10897 8562 43475 45962 5335 12911 42083 21235 25932 43582 42083 11 1729 49389 39277 7115 22666 3...
output:
No No
result:
ok 2 token(s): yes count is 0, no count is 2
Test #30:
score: 0
Accepted
time: 49ms
memory: 14652kb
input:
50000 10000 7 5 32239 2631 817 37270 9113 817 20 62 40942 30817 49262 32408 24828 47752 37417 4765 22621 3042 22858 6218 21556 46855 35019 22574 36740 6626 5686 7 71 5710 4141 14054 39765 10288 14054 7 77 41362 12582 41433 32951 32320 41433 18 88 21375 6561 16401 34318 15566 8569 30537 43244 46131 9...
output:
No No
result:
ok 2 token(s): yes count is 0, no count is 2
Test #31:
score: 0
Accepted
time: 19ms
memory: 14984kb
input:
49738 10209 8 6 26794 44874 20375 13194 19194 2712 13031 7 8 21063 7470 32019 33690 25941 7470 7 12 8868 34522 46455 39769 27754 34522 11 13 17560 850 12117 7516 850 13723 14419 160 23505 25954 5 14 3794 46219 20121 32871 6 20 42327 16148 19339 19371 16148 13 26 13770 40690 12325 24326 23903 12325 6...
output:
Yes
result:
ok YES
Test #32:
score: 0
Accepted
time: 22ms
memory: 11536kb
input:
65535 32767 3 6 11368 35329 7 9 25627 61179 2600 24547 60324 61346 5 11 58658 11873 29937 15194 7 13 53401 26536 5617 34093 20835 44922 3 15 10333 50632 3 16 27166 63834 3 17 9783 33347 7 19 459 19353 25890 29269 35523 29969 3 22 15983 3202 3 23 54992 39960 3 26 34468 29741 3 27 16991 10244 3 28 566...
output:
Yes
result:
ok YES
Test #33:
score: 0
Accepted
time: 21ms
memory: 14376kb
input:
88573 29525 5 1 74925 56460 8498 26134 7 3 9472 85828 85268 67144 2883 7617 3 4 47881 21844 5 5 85344 22721 65187 74321 7 7 77652 84033 6881 2132 24322 11729 7 8 3494 88022 14649 85668 37222 50019 3 9 9361 85001 7 12 55150 24246 35293 5849 53379 66611 5 13 17220 50520 64248 49637 7 14 41791 51813 51...
output:
Yes
result:
ok YES
Test #34:
score: 0
Accepted
time: 27ms
memory: 15104kb
input:
87381 43690 3 1 10154 72227 3 3 63262 28452 3 6 75937 77636 9 7 73459 59042 73986 69990 35074 77924 21190 52689 3 9 16002 37220 3 10 68261 60529 3 11 41575 42855 5 12 44569 76138 54081 83442 5 13 65915 52419 323 34195 3 14 1168 77525 3 15 61846 71521 5 16 71310 68197 16197 79330 5 17 59465 43953 347...
output:
Yes
result:
ok YES
Test #35:
score: 0
Accepted
time: 24ms
memory: 16412kb
input:
97656 39063 5 1 92201 93345 46152 53588 3 2 72392 91173 3 3 89827 36801 3 4 78876 2515 3 5 96857 51121 3 6 23318 11474 3 7 77291 64180 3 8 80421 32290 5 9 26592 66817 61107 35458 3 12 51390 72134 3 13 79712 15093 3 15 32171 69610 3 18 93328 55828 5 19 45690 1607 57169 55188 3 23 78241 87926 3 25 591...
output:
Yes
result:
ok YES
Test #36:
score: 0
Accepted
time: 24ms
memory: 11324kb
input:
19608 8404 3 2 5792 3202 3 4 905 7634 3 5 17842 8180 3 6 5574 3314 5 7 12740 14321 18869 14100 3 8 16987 19441 5 9 14153 13954 1843 14018 3 10 19242 16594 3 11 13003 13251 3 12 11136 3783 9 13 2864 9925 18 4116 11873 12209 5220 417 3 14 12402 6785 3 15 1660 12609 3 16 1912 3010 7 17 13346 2833 18900...
output:
Yes Yes
result:
ok 2 token(s): yes count is 2, no count is 0
Test #37:
score: 0
Accepted
time: 23ms
memory: 18428kb
input:
65533 7293 4 1 20161 16028 1 25 2 5569 36466 19469 5569 55941 63555 57172 55941 20186 8493 37969 62625 30498 37969 16629 46222 37969 40008 8493 55941 56925 5569 30160 2 25 3 30549 34881 16430 30549 35108 57393 19992 38617 57393 35193 31916 57393 7775 35108 54331 30549 14839 30946 1815 38562 9268 181...
output:
No
result:
ok NO
Test #38:
score: 0
Accepted
time: 40ms
memory: 23476kb
input:
98299 6206 5 1 41745 3319 28915 1 105 2 23895 85363 86350 25073 79335 8578 93341 23300 79335 12027 86350 92433 46857 3041 48523 10116 81839 38640 48523 59016 81084 8494 48523 63343 46857 72534 65613 37780 83364 84727 65613 26772 55846 46590 65613 8654 46857 53436 86350 36807 23895 12329 96451 43986 ...
output:
No
result:
ok NO
Test #39:
score: 0
Accepted
time: 11ms
memory: 11872kb
input:
49974 24570 5 2 28210 44868 42691 13814 7 4 37644 2566 30977 25764 22104 25722 3 8 32479 17446 3 12 49632 40151 7 13 7412 49110 1432 26600 12868 29765 7 14 36533 29623 25236 41417 21367 44711 17 17 18946 40506 23129 45506 33638 46215 40849 4293 49009 43429 30136 4945 6201 39559 25432 7176 3 18 39506...
output:
Yes Yes
result:
ok 2 token(s): yes count is 2, no count is 0
Test #40:
score: 0
Accepted
time: 26ms
memory: 15240kb
input:
99857 158 633 558 94284 39506 47314 68800 8010 15802 21852 91519 35223 56259 13292 71948 67283 63843 25895 18037 45529 73070 91318 67802 27298 67480 64772 23536 51476 15861 81916 34149 79832 24013 21558 12487 49746 27049 12585 16375 19713 39080 36302 53348 59449 4755 70937 25346 19402 91386 20928 74...
output:
Yes
result:
ok YES
Test #41:
score: 0
Accepted
time: 18ms
memory: 16268kb
input:
100000 50000 3 1 42987 2 3 3 42987 4 3 5 42987 6 3 7 42987 8 3 9 42987 10 3 11 42987 12 3 13 42987 14 3 15 42987 16 3 17 42987 18 3 19 42987 20 3 21 42987 22 3 23 42987 24 3 25 42987 26 3 27 42987 28 3 29 42987 30 3 31 42987 32 3 33 42987 34 3 35 42987 36 3 37 42987 38 3 39 42987 40 3 41 42987 42 3 ...
output:
Yes
result:
ok YES
Test #42:
score: 0
Accepted
time: 27ms
memory: 15240kb
input:
99225 471 3 165 55974 25521 629 365 77807 31210 85618 35897 71130 160 28909 74547 90068 6112 53591 34949 19542 7718 84749 28898 51375 17005 39754 83832 64707 84666 53727 58227 36248 35653 52725 12111 19626 65735 75598 91820 68064 28354 98527 63811 70652 59995 24443 44496 39645 71960 46710 37310 1462...
output:
Yes
result:
ok YES
Test #43:
score: 0
Accepted
time: 26ms
memory: 15224kb
input:
99539 472 3 14 20092 64001 3 375 95562 42854 3 452 18681 31223 629 460 33144 93170 73451 20390 33663 47253 57272 70267 18112 15511 94378 88316 28631 86592 72873 14221 85126 9104 61231 54814 18365 43884 79928 21404 17579 3488 32661 33959 54694 724 15978 52170 41166 12260 64673 54145 44606 49917 73760...
output:
Yes
result:
ok YES
Test #44:
score: 0
Accepted
time: 11ms
memory: 11720kb
input:
68148 108 632 635 33819 58097 39837 56365 43181 49846 26788 5369 50961 20159 58923 46050 20470 22156 33613 7529 40315 10093 56318 12462 13136 37147 19380 49132 23878 52700 48721 62845 66196 20914 28429 65253 42371 25683 1134 21665 17786 28871 16288 67230 12398 850 13424 46711 25611 21822 29890 59113...
output:
Yes
result:
ok YES
Test #45:
score: 0
Accepted
time: 18ms
memory: 16112kb
input:
100000 35000 5 4 55174 82594 1 74648 5 5 73630 82594 2 65471 4 6 82594 3 19630 3 7 82594 8 3 9 82594 10 4 12 82594 11 62773 4 13 82594 15 33025 4 14 40794 82594 17 4 16 55353 82594 18 4 19 11886 82594 21 4 20 41598 82594 22 4 23 91052 82594 24 4 25 82594 26 34606 5 27 38712 82594 29 4608 4 28 24195 ...
output:
Yes
result:
ok YES
Test #46:
score: 0
Accepted
time: 27ms
memory: 15520kb
input:
99682 223 375 83 32452 29625 33112 84614 51349 65018 60505 69045 66762 54926 85893 72593 92945 35289 39080 71059 60380 20566 98088 98525 78314 42350 70717 80853 98587 80755 22013 17698 87554 15524 80843 62062 29932 28975 82436 74420 55126 25369 94020 2272 56067 31514 96472 80583 47960 79073 10267 76...
output:
Yes
result:
ok YES
Test #47:
score: 0
Accepted
time: 26ms
memory: 15276kb
input:
99541 315 223 142 95800 26595 42470 95963 23883 65656 80215 30549 25055 95917 98794 15864 87270 59207 78835 53010 14378 65271 58968 69063 89502 67086 45913 45271 80960 77665 82839 58200 72593 71948 69927 81524 2592 5803 30285 57686 54314 58441 39840 12707 23573 86149 42050 2946 20644 24713 5748 9438...
output:
Yes
result:
ok YES
Test #48:
score: 0
Accepted
time: 22ms
memory: 16744kb
input:
99235 49506 3 1 14079 82434 3 2 11152 69634 3 3 25901 74241 3 4 82810 98561 3 5 68136 81410 3 6 77316 53263 3 7 56940 3073 3 8 29026 78850 3 9 68977 58882 3 10 38413 37377 3 11 53939 71688 3 12 94841 33281 3 13 12621 46596 3 14 43181 40961 3 15 34062 7681 3 16 23340 58881 3 17 75368 61443 3 18 48977...
output:
Yes
result:
ok YES
Test #49:
score: 0
Accepted
time: 25ms
memory: 19476kb
input:
99232 49505 3 1 79958 91651 3 2 31084 69124 3 3 91941 73224 3 4 18309 16387 3 5 41963 32769 3 6 53607 44034 3 7 95367 50182 3 8 80648 6148 3 9 49447 33794 3 10 55804 46082 3 11 50566 13314 3 12 88330 40450 3 13 12595 64518 3 14 79893 30723 3 15 20966 94339 3 16 89225 68609 3 17 15221 90120 3 18 2305...
output:
Yes
result:
ok YES
Test #50:
score: 0
Accepted
time: 25ms
memory: 21312kb
input:
99534 49610 3 1 57461 61441 3 2 77269 34305 3 3 57372 15363 3 4 71139 1537 3 5 24289 75778 3 7 11088 46338 3 8 36300 30563 3 9 90052 73729 3 10 76957 90628 3 11 72692 22017 3 12 97680 94980 3 13 59941 25859 3 14 90357 71938 3 15 92728 32260 3 16 64949 4609 3 17 22174 64513 3 18 10899 75270 3 20 8290...
output:
Yes
result:
ok YES
Test #51:
score: 0
Accepted
time: 25ms
memory: 20268kb
input:
99856 170 317 1 74913 13147 46175 39402 37916 52935 18268 11547 95363 6959 60705 26801 70516 634 66524 40043 28150 19836 20906 39248 49886 38937 3959 34489 60360 85765 62431 40044 50417 50235 59199 55051 4186 22023 81306 92562 66446 57828 11034 18355 44432 88265 7954 40851 84760 91041 19820 47830 94...
output:
Yes
result:
ok YES
Test #52:
score: 0
Accepted
time: 31ms
memory: 20380kb
input:
99225 320 316 444 53315 80258 62204 91467 6831 10636 55070 77923 85424 26034 44211 92349 74583 52573 72359 96116 21966 87514 39289 50016 67523 86074 88318 60162 64964 2997 25818 93078 26899 54180 80997 20457 7658 20677 3700 95640 86397 52718 78974 74459 23194 57259 18655 26905 13911 65428 7254 16079...
output:
Yes
result:
ok YES
Test #53:
score: 0
Accepted
time: 34ms
memory: 20184kb
input:
99540 322 1000 32 2078 49665 48598 700 82848 49585 82409 90844 48092 13944 48401 82543 40972 70491 48934 71054 1517 260 7765 91757 57632 52007 76112 95545 7160 87439 598 93070 18486 74671 64226 54328 3635 11531 3420 17573 54027 37978 60833 6819 65842 27355 75412 50450 35278 4739 64070 93276 8724 562...
output:
Yes
result:
ok YES
Test #54:
score: 0
Accepted
time: 30ms
memory: 20004kb
input:
99541 101 1000 1 19364 82010 18742 29612 54005 24420 1437 41764 50084 22873 78590 12231 37048 47504 15966 17315 43381 26342 56412 18139 8676 35396 95940 46994 21832 92465 81487 8466 7910 55790 13483 16477 86208 48725 32640 39081 40534 90240 88145 40518 29926 67042 86409 38906 43427 65749 85589 65227...
output:
Yes
result:
ok YES
Test #55:
score: 0
Accepted
time: 27ms
memory: 19932kb
input:
98911 327 945 430 51105 1747 16655 5908 71436 26627 62159 50842 74967 49477 96722 75456 89523 8942 66729 54123 90031 3271 14540 70956 25677 48978 68838 24895 34592 65143 34448 91934 16551 83911 62906 15637 50044 43900 33165 44793 1725 19211 68501 24246 70053 35143 37205 40577 57603 12325 96027 8134 ...
output:
Yes
result:
ok YES
Test #56:
score: 0
Accepted
time: 33ms
memory: 19992kb
input:
99226 327 1000 239 81292 62285 97406 43322 61611 63580 64538 39581 35254 32954 73207 72456 39237 96693 50930 80222 76587 35367 15647 18522 21402 45824 29191 20183 12916 58223 90381 45007 83621 15705 79089 11842 76532 70908 93064 5814 26038 70465 8145 66844 68575 32438 30384 69504 51631 20984 95502 2...
output:
Yes
result:
ok YES
Test #57:
score: 0
Accepted
time: 19ms
memory: 19832kb
input:
46000 505 3 10 2642 8193 3 150 2642 28673 3 230 2642 22530 3 234 2642 10244 3 247 2642 4101 3 282 2642 16391 3 286 2642 45067 3 295 2642 22540 3 355 2642 18445 3 361 2642 36883 3 433 2642 24607 3 525 2642 43039 3 609 2642 32802 3 632 2642 22563 3 662 2642 28709 3 892 2642 38951 3 924 2642 36904 3 96...
output:
Yes Yes
result:
ok 2 token(s): yes count is 2, no count is 0
Test #58:
score: 0
Accepted
time: 22ms
memory: 20292kb
input:
48000 527 3 29 38681 12289 3 60 38681 8200 3 100 38681 16395 3 118 38681 32779 3 194 38681 40977 3 261 38681 28689 3 271 38681 12306 3 416 38681 26645 3 421 38681 30742 3 460 38681 20506 3 516 38681 10267 3 521 38681 16413 3 546 38681 2080 3 555 38681 30757 3 573 38681 10285 3 588 38681 43058 3 662 ...
output:
Yes Yes
result:
ok 2 token(s): yes count is 2, no count is 0
Test #59:
score: 0
Accepted
time: 13ms
memory: 19668kb
input:
50000 549 3 36 49679 34817 3 71 49679 43013 3 82 49679 4104 3 92 49679 16400 3 136 49679 49169 3 140 49679 12306 3 175 49679 30739 3 179 49679 49171 3 195 49679 43028 3 279 49679 6168 3 293 49679 2083 3 300 49679 34853 3 333 49679 28711 3 420 49679 26664 3 443 49679 34858 3 455 49679 8235 3 461 4967...
output:
Yes
result:
ok YES
Test #60:
score: 0
Accepted
time: 38ms
memory: 43524kb
input:
100000 29637 47 50001 50000 49999 49998 49997 49996 49995 49994 49993 49992 49991 49990 49989 49988 49987 49986 49985 99986 49986 99987 49987 99988 49988 99989 49989 99990 49990 99991 49991 99992 49992 99993 49993 99994 49994 99995 49995 99996 49996 99997 49997 99998 49998 99999 49999 100000 50000 4...
output:
Yes
result:
ok YES
Test #61:
score: 0
Accepted
time: 42ms
memory: 46512kb
input:
99999 28673 4 1 50001 2 1 4 2 50002 3 2 4 3 50003 4 3 4 4 50004 5 4 4 5 50005 6 5 4 6 50006 7 6 4 7 50007 8 7 4 8 50008 9 8 4 9 50009 10 9 4 10 50010 11 10 4 11 50011 12 11 4 12 50012 13 12 4 13 50013 14 13 4 14 50014 15 14 10 15 50015 16 17 50017 18 17 50016 16 15 4 18 50018 19 18 4 19 50019 20 19 ...
output:
Yes
result:
ok YES
Test #62:
score: 0
Accepted
time: 35ms
memory: 49812kb
input:
99996 25543 41 49999 49998 99996 49997 49996 99994 49995 49994 99992 49993 49992 99990 49991 49990 99988 49989 49988 99986 49987 49986 49985 99984 49986 99985 49987 49988 99987 49989 49990 99989 49991 49992 99991 49993 49994 99993 49995 49996 99995 49997 49998 7 1 2 50001 3 2 50000 1 4 3 50002 4 3 4...
output:
Yes
result:
ok YES
Test #63:
score: 0
Accepted
time: 42ms
memory: 25512kb
input:
100000 15803 23 100000 48573 29947 22370 22371 18564 37521 63646 63647 37521 37520 18564 22370 79204 79205 22370 29946 29947 48572 90966 90967 48572 48573 34 34 35 210 95201 95200 210 328 52422 79874 79875 52422 52423 328 92312 92313 328 31048 31049 328 329 210 24368 24369 210 211 17377 17376 211 19...
output:
No
result:
ok NO
Test #64:
score: 0
Accepted
time: 54ms
memory: 25604kb
input:
100000 15917 119 100000 22154 38406 38407 22154 3546 2242 53345 53344 2242 2243 48140 48141 72882 72883 48141 2243 1358 145 10 1 2 3 1 4 5 1 11 10 144 145 1359 1713 6550 79974 79975 6550 6551 1713 1712 12522 58214 58215 12522 12523 48424 48425 12523 1712 1359 87668 87669 1359 5336 37380 37381 5336 5...
output:
No
result:
ok NO
Test #65:
score: 0
Accepted
time: 52ms
memory: 26628kb
input:
100000 15830 107 100000 55397 55396 37181 17361 2375 2374 9332 9333 2374 1804 3042 3043 3434 3713 8833 15318 15319 8833 11242 11243 8833 8832 3713 58753 58752 3713 61604 61605 3713 4392 15121 26436 26437 15121 26378 69076 69077 26378 26379 15121 15120 4392 4393 3713 17164 17165 3713 3712 32388 32389...
output:
No
result:
ok NO
Test #66:
score: 0
Accepted
time: 36ms
memory: 40532kb
input:
100000 102 1000 5219 90730 14375 56732 52300 70662 85726 35922 15377 8218 5220 41613 34506 92723 43033 14378 43278 17626 50425 11204 71773 17367 37242 97334 72109 61948 44634 14354 49177 29602 24077 73045 39685 3786 57095 25371 42101 47320 26464 51602 47729 3032 15309 34315 1032 12403 80309 16204 10...
output:
Yes
result:
ok YES
Test #67:
score: 0
Accepted
time: 41ms
memory: 36784kb
input:
99999 104 1000 2072 67749 46986 12332 22648 36446 81509 36501 12504 66441 81037 44365 81749 72563 82366 86189 74254 80779 9785 60054 5389 65317 44457 14344 29087 11567 5024 7016 6282 610 99903 54500 92843 3188 89975 7208 59266 92242 60434 45458 17608 15703 42952 44651 7465 86741 98735 4654 391 20235...
output:
Yes
result:
ok YES
Test #68:
score: 0
Accepted
time: 40ms
memory: 42776kb
input:
100000 105 1000 19442 22483 14385 98338 65390 2824 12293 8558 13050 20669 72311 36462 99822 74045 1420 70806 69857 49191 43440 98854 478 22679 93679 51256 9803 19215 69092 11740 61427 56358 33476 25707 85271 45397 8630 42739 1057 24907 57565 43005 26889 34975 96709 96051 52802 23434 60957 89725 846 ...
output:
Yes
result:
ok YES
Test #69:
score: 0
Accepted
time: 43ms
memory: 40452kb
input:
100000 4439 1000 1 84385 43154 82825 84385 26026 30954 87181 26026 87004 69362 4356 26438 13510 62840 32340 37948 32840 55635 22006 25193 27181 98699 80218 28260 23613 80218 65290 4628 72748 94858 39276 66238 19255 53515 59625 15665 60561 55520 21090 85207 66030 53539 35634 95494 20934 66386 51639 7...
output:
Yes
result:
ok YES
Test #70:
score: 0
Accepted
time: 34ms
memory: 45928kb
input:
100000 100000 2 1 2 2 2 3 2 3 4 2 4 5 2 5 6 2 6 7 2 7 8 2 8 9 2 9 10 2 10 11 2 11 12 2 12 13 2 13 14 2 14 15 2 15 16 2 16 17 2 17 18 2 18 19 2 19 20 2 20 21 2 21 22 2 22 23 2 23 24 2 24 25 2 25 26 2 26 27 2 27 28 2 28 29 2 29 30 2 30 31 2 31 32 2 32 33 2 33 34 2 34 35 2 35 36 2 36 37 2 37 38 2 38 39...
output:
Yes
result:
ok YES
Test #71:
score: 0
Accepted
time: 21ms
memory: 3780kb
input:
10 4 3 1 4 2 5 3 10 6 4 5 3 7 6 8 2 6 9 11 2 9 1 7 3 4 9 5 11 8 10 3 2 6 9 12 4 3 1 3 2 4 3 12 4 7 5 5 10 8 12 9 3 6 11 12 13 4 4 1 4 8 2 3 4 13 12 7 6 7 3 8 9 5 11 2 9 10 14 5 4 2 11 3 13 3 4 11 5 3 6 11 8 5 9 11 14 1 10 3 12 7 14 15 6 4 1 2 3 7 4 4 13 2 6 2 2 8 4 5 12 3 9 3 10 15 12 3 11 13 14 16 ...
output:
Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes ...
result:
ok 437 token(s): yes count is 437, no count is 0
Test #72:
score: 0
Accepted
time: 20ms
memory: 3680kb
input:
447 190 4 1 364 307 230 3 2 190 216 3 3 228 438 3 4 345 20 3 6 396 146 3 7 39 259 3 8 402 114 3 10 39 393 3 11 264 433 3 13 112 132 3 15 112 388 4 16 130 337 108 3 17 156 385 3 18 336 260 5 19 68 39 266 405 3 21 112 103 3 22 445 414 3 23 264 194 3 24 356 374 3 26 411 53 3 27 54 386 4 28 215 307 72 3...
output:
Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes ...
result:
ok 185 token(s): yes count is 185, no count is 0
Test #73:
score: 0
Accepted
time: 20ms
memory: 3736kb
input:
632 265 3 1 298 580 4 4 566 453 354 3 5 481 516 3 7 350 305 4 8 175 3 129 4 9 228 82 194 3 10 453 291 4 11 530 2 386 3 12 29 613 3 13 530 515 5 14 554 210 481 72 4 15 149 481 458 3 16 565 147 3 17 403 482 3 18 481 202 3 19 142 435 3 20 82 132 4 21 269 66 102 3 22 299 387 3 23 388 578 4 24 350 263 50...
output:
Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes ...
result:
ok 142 token(s): yes count is 142, no count is 0
Test #74:
score: 0
Accepted
time: 16ms
memory: 3784kb
input:
774 264 5 3 496 726 325 629 6 5 27 497 178 134 289 6 7 416 612 618 340 524 11 10 198 193 733 675 38 393 706 33 41 316 5 12 267 502 241 204 6 14 538 446 595 530 389 6 16 705 100 334 761 242 5 17 168 681 471 357 7 18 686 638 199 146 468 53 4 19 237 178 136 4 21 581 250 760 4 22 493 214 418 5 23 107 47...
output:
Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes ...
result:
ok 119 token(s): yes count is 119, no count is 0
Test #75:
score: 0
Accepted
time: 20ms
memory: 3804kb
input:
893 282 6 3 542 889 298 503 661 5 7 201 440 803 306 2 9 201 4 10 733 147 814 7 11 363 609 81 294 449 839 5 13 221 586 637 312 4 16 228 865 146 7 17 689 62 83 714 165 48 5 20 200 708 430 229 6 23 262 373 663 42 189 4 25 430 535 69 6 27 488 284 259 243 786 5 29 150 417 102 827 9 32 580 866 609 184 180...
output:
Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes ...
result:
ok 105 token(s): yes count is 105, no count is 0
Test #76:
score: 0
Accepted
time: 26ms
memory: 15944kb
input:
100000 33464 7 2 90346 94968 90698 63035 97663 47506 6 3 95257 56324 94481 4756 43409 3 7 90643 39588 4 12 16798 32515 87841 6 15 43319 24907 33345 84277 82595 3 22 10553 29425 5 25 5613 12125 12081 73399 3 29 84303 48361 4 30 42769 20489 19957 3 35 39408 73617 5 38 97142 19946 39108 75009 6 41 4143...
output:
Yes
result:
ok YES
Test #77:
score: 0
Accepted
time: 25ms
memory: 16380kb
input:
100000 38609 3 1 11663 3925 3 2 91159 89448 7 3 65939 80136 18932 6951 24337 79962 5 4 7128 57882 42241 55091 3 5 95070 30228 3 8 56677 86328 4 9 11784 56482 71026 4 10 29113 84198 78129 3 11 95386 20294 3 12 26437 36261 3 13 66235 47289 4 15 30626 71694 43740 5 16 51745 55308 61986 83409 3 17 33124...
output:
Yes
result:
ok YES
Test #78:
score: 0
Accepted
time: 29ms
memory: 16340kb
input:
100000 42355 3 1 71305 28866 6 2 21951 29541 26321 19810 84396 4 4 26644 69474 11932 3 5 97212 70036 3 6 26027 29841 5 7 18591 74231 15428 69410 4 8 33264 67266 30785 4 9 16519 20738 31489 4 10 98390 35472 89915 4 11 57585 55233 21377 3 13 41631 66049 6 14 10970 58484 67073 31793 12357 3 15 65199 96...
output:
Yes
result:
ok YES
Test #79:
score: 0
Accepted
time: 24ms
memory: 16660kb
input:
100000 44781 4 1 57706 30889 20225 3 2 9306 71361 5 3 6213 28099 34689 22414 3 4 55209 18721 5 5 21698 93556 2562 6706 3 6 63746 46082 3 7 89972 89346 3 8 71671 9633 3 9 6725 40577 3 10 7252 46503 3 11 8288 65363 4 12 20179 41065 91558 3 14 44402 21825 3 15 77450 32490 4 16 10615 17410 77435 4 17 93...
output:
Yes
result:
ok YES
Test #80:
score: 0
Accepted
time: 23ms
memory: 16680kb
input:
100000 46523 4 1 43610 94755 29314 4 3 37890 93446 86006 5 4 56398 49540 9473 25449 4 5 11099 60684 88067 4 7 73990 98289 28676 3 8 16677 4135 3 9 71783 56081 3 10 48753 45574 3 11 98289 65542 3 12 47331 6722 3 13 97150 42244 5 14 10390 69122 55798 39720 3 16 58283 29185 3 17 66266 95235 3 18 37444 ...
output:
Yes
result:
ok YES
Test #81:
score: 0
Accepted
time: 25ms
memory: 16732kb
input:
100000 47635 3 1 91859 62789 3 2 66291 5889 3 3 38760 10706 3 4 98403 88065 3 5 18816 32322 3 6 52549 67201 4 7 16320 99333 14897 3 8 65308 69121 3 9 67405 82051 4 10 88660 6146 84661 3 12 3949 8195 3 13 5297 95494 3 14 62968 50951 3 15 98472 13762 3 17 8854 27813 3 18 1564 76289 3 19 27763 57906 3 ...
output:
Yes
result:
ok YES
Test #82:
score: 0
Accepted
time: 20ms
memory: 16688kb
input:
100000 48405 3 1 91350 68868 3 2 27860 61697 3 3 69523 7297 5 4 81419 24099 24578 51202 3 5 91653 70661 4 6 22557 24099 65537 3 7 50324 17410 3 8 13549 66532 3 9 45509 82180 3 10 74599 20481 3 11 56780 71682 3 12 80607 29698 3 13 74599 28675 3 14 16027 95235 3 15 49266 7810 3 16 24099 49156 3 17 240...
output:
Yes
result:
ok YES
Test #83:
score: 0
Accepted
time: 26ms
memory: 16836kb
input:
100000 48901 3 1 29801 28675 3 2 8770 65540 3 3 37685 4100 3 4 21432 57350 3 5 82172 81925 3 6 8770 98307 3 7 82172 81927 3 8 30058 22529 3 9 54458 65541 3 10 79833 4097 4 11 21323 65539 4099 3 13 51331 12801 3 14 96577 90114 3 15 79833 94209 3 16 99323 70404 3 17 82172 49160 3 18 4435 78850 3 19 98...
output:
Yes
result:
ok YES
Test #84:
score: 0
Accepted
time: 24ms
memory: 16632kb
input:
100000 49246 3 1 64932 61443 3 2 99909 89090 4 3 60946 7 321 3 4 16086 59905 3 5 47801 92165 3 6 74689 14082 3 8 15314 62145 3 9 10305 16390 4 10 42587 60946 11 3 12 10305 65541 3 13 33417 47105 3 14 60946 65556 3 15 98197 30722 3 16 13368 418 3 17 13830 75009 3 18 47801 97288 4 19 79286 60946 20 3 ...
output:
Yes
result:
ok YES
Test #85:
score: 0
Accepted
time: 20ms
memory: 7496kb
input:
15 3 14 14 8 1 5 7 3 13 15 4 2 12 11 10 4 3 1 6 8 3 5 9 15 6 1 8 1 3 2 5 6 3 4 1 14 2 11 2 6 1 4 7 11 9 3 10 8 4 7 1 13 6 5 14 12 2 19 3 5 12 3 4 16 3 8 16 7 2 11 1 14 5 7 11 11 9 19 18 8 10 17 6 15 13 9 22 4 8 3 17 12 22 1 18 14 1 6 3 11 7 13 15 22 8 14 2 19 21 9 5 4 2 7 18 16 6 8 20 10 16 34 5 15 ...
output:
Yes Yes Yes Yes No No Yes No Yes Yes No Yes Yes No No Yes No Yes Yes Yes Yes Yes No Yes No Yes No Yes Yes No Yes No Yes Yes No Yes No No Yes Yes Yes Yes Yes Yes No Yes No No No Yes Yes No No Yes Yes No Yes Yes Yes Yes No No Yes Yes Yes No No Yes Yes No Yes Yes Yes Yes No Yes No Yes Yes Yes No Yes No...
result:
ok 154 token(s): yes count is 83, no count is 71
Test #86:
score: 0
Accepted
time: 27ms
memory: 8876kb
input:
9460 12 1000 1 341 8816 2760 6108 9078 494 6417 4045 5223 821 485 3924 6340 3496 1940 7578 5013 1353 4795 5917 8101 8030 70 2736 2538 4181 8060 1503 7543 5540 1090 7440 8582 93 1322 4982 5980 3880 4167 195 7971 7920 8936 6510 9110 4165 3050 8064 25 7777 3128 7783 7442 5567 4400 1348 2257 5166 7327 1...
output:
No No No Yes No No Yes No No Yes
result:
ok 10 token(s): yes count is 3, no count is 7
Test #87:
score: 0
Accepted
time: 24ms
memory: 8168kb
input:
16249 19 1000 4797 7503 12081 12323 4664 8645 7243 14136 1873 12635 3864 4401 6747 13777 12918 11409 13469 13377 3966 70 10360 12212 974 10794 3275 11473 15732 6852 1865 16214 1713 15253 10502 15727 13164 2106 4753 14095 5758 12503 10561 3505 3760 5507 2879 117 9648 2353 10454 9811 3174 50 14568 155...
output:
No No No No No No No Yes
result:
ok 8 token(s): yes count is 1, no count is 7
Test #88:
score: 0
Accepted
time: 29ms
memory: 9332kb
input:
21974 26 1000 1 7489 998 1832 11092 411 18641 14229 4705 313 14994 3470 15741 3008 19013 153 15510 14410 7731 6805 15689 12791 8737 6241 8636 8754 2353 6609 2588 8538 15944 18504 17381 15120 19792 20913 526 17276 2585 20180 20309 15485 9852 11260 18686 189 13194 594 12856 19639 3004 17402 8359 16074...
output:
No No No No Yes No No Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Ye...
result:
ok 469 token(s): yes count is 463, no count is 6
Test #89:
score: 0
Accepted
time: 1ms
memory: 3580kb
input:
44 3 9 1 20 40 27 37 25 2 24 1 10 3 35 4 17 36 34 18 11 32 3 34 5 39 6 15 21 41 8 30 17 7 23 13 33 10 17 43 44 42 22 9 14 17 31 19 16 28 38 31 12 29 37 26 30 5 40 5 26 2 22 35 38 33 14 1 34 6 10 8 28 3 1 19 40 25 13 24 12 30 1 21 18 32 2 7 1 27 4 20 7 31 1 7 4 36 26 37 17 5 4 5 9 11 27 15 9 6 16 39 ...
output:
Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
result:
ok 39 token(s): yes count is 39, no count is 0