QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#536522 | #5745. Graph Isomorphism | UESTC_DECAYALI# | AC ✓ | 11ms | 4204kb | C++20 | 1.0kb | 2024-08-29 14:15:07 | 2024-08-29 14:15:09 |
Judging History
answer
#include<cstdio>
#include<iostream>
#define RI register int
#define CI const int&
using namespace std;
const int N=100005;
int t,n,m,x,y,deg[N];
int main()
{
for (scanf("%d",&t);t;--t)
{
scanf("%d%d",&n,&m);
for (RI i=1;i<=n;++i) deg[i]=0;
for (RI i=1;i<=m;++i)
scanf("%d%d",&x,&y),++deg[x],++deg[y];
if (n<=3) { puts("YES"); continue; }
if (n==4&&m==2&°[1]==1&°[2]==1&°[3]==1&°[4]==1) { puts("YES"); continue; }
if (n==4&&m==4&°[1]==2&°[2]==2&°[3]==2&°[4]==2) { puts("YES"); continue; }
if (m==1LL*n*(n-1)/2) { puts("YES"); continue; }
int center=0,outer=0;
for (RI i=1;i<=n;++i)
if (deg[i]==n-1) ++center; else if (deg[i]==1) ++outer;
if (center==1&&outer==n-1) { puts("YES"); continue; }
int iso=0,kernel=0;
for (RI i=1;i<=n;++i)
if (deg[i]==0) ++iso; else if (deg[i]==n-2) ++kernel;
if (iso==1&&kernel==n-1) { puts("YES"); continue; }
puts("NO");
}
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3780kb
input:
3 3 3 1 2 2 3 3 1 3 2 1 2 2 3 5 5 1 2 2 3 3 4 4 5 5 1
output:
YES YES NO
result:
ok 3 token(s): yes count is 2, no count is 1
Test #2:
score: 0
Accepted
time: 8ms
memory: 3660kb
input:
39982 3 2 2 1 3 2 2 1 1 2 2 1 2 1 3 3 3 1 2 3 1 2 2 1 1 2 3 3 3 1 3 2 2 1 2 1 1 2 3 2 1 2 3 1 3 3 2 1 3 1 2 3 2 1 1 2 3 2 2 1 3 2 3 3 2 3 3 1 2 1 3 3 2 1 1 3 2 3 3 3 3 1 3 2 1 2 2 1 2 1 2 1 2 1 3 1 3 1 2 1 2 1 2 1 1 2 3 2 1 3 3 2 3 2 1 2 1 3 3 2 3 2 1 3 2 1 1 2 3 2 3 2 3 1 3 3 2 3 3 1 1 2 2 1 1 2 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 39982 token(s): yes count is 39982, no count is 0
Test #3:
score: 0
Accepted
time: 6ms
memory: 3824kb
input:
33365 3 3 3 1 2 3 2 1 2 1 2 1 4 6 1 2 3 4 4 2 2 3 3 1 4 1 2 1 1 2 2 1 1 2 4 5 1 4 1 2 4 2 3 4 1 3 4 3 4 2 2 1 1 3 3 1 3 2 4 3 1 3 1 2 3 4 3 3 3 2 3 1 2 1 3 1 2 3 3 1 1 3 3 1 2 1 3 2 1 3 3 2 4 5 3 1 4 2 3 4 2 3 2 1 4 2 1 2 3 2 2 1 2 1 3 2 1 2 2 3 3 1 3 2 4 1 3 4 3 1 2 1 4 3 1 2 4 2 3 2 2 1 2 1 4 5 3 ...
output:
YES YES YES YES YES NO NO YES NO YES YES YES YES YES NO NO YES YES YES NO YES YES YES NO YES YES YES YES YES YES YES YES NO NO YES YES YES YES NO NO NO YES YES YES YES YES YES YES YES NO YES YES YES YES YES YES NO YES NO YES YES YES NO YES YES NO YES NO YES NO YES YES YES YES NO YES YES YES YES YES ...
result:
ok 33365 token(s): yes count is 25608, no count is 7757
Test #4:
score: 0
Accepted
time: 10ms
memory: 3684kb
input:
28572 3 3 1 3 2 1 3 2 2 1 1 2 4 1 4 2 3 2 1 2 2 3 5 2 4 3 4 2 2 1 2 1 3 1 1 3 5 10 1 3 3 5 1 2 4 3 4 5 4 1 5 1 4 2 2 5 3 2 4 4 2 1 1 3 2 4 1 4 2 1 1 2 4 4 1 3 4 2 4 1 2 1 4 3 1 4 3 1 4 2 5 2 2 1 4 5 4 1 3 4 5 5 2 5 3 1 4 1 2 3 1 5 5 3 5 4 3 5 2 3 4 1 4 3 3 2 2 3 1 2 2 1 2 1 4 5 3 2 3 4 4 1 3 1 2 1 3...
output:
YES YES NO YES NO YES YES YES NO YES NO NO NO NO NO NO NO YES YES NO YES NO YES YES YES NO YES YES NO YES YES YES NO YES YES NO YES YES NO NO YES NO YES NO YES YES YES YES NO YES YES YES NO NO YES YES NO YES YES NO YES YES YES YES YES YES YES YES YES YES YES YES YES NO YES YES YES NO NO NO YES YES Y...
result:
ok 28572 token(s): yes count is 19834, no count is 8738
Test #5:
score: 0
Accepted
time: 10ms
memory: 3816kb
input:
22864 5 8 4 1 2 3 5 2 1 2 1 5 5 3 4 2 5 4 4 5 4 3 2 1 4 2 1 4 3 1 4 5 3 2 1 4 1 2 4 2 3 1 5 5 2 5 1 2 5 4 5 3 1 5 5 4 1 5 4 5 2 5 3 5 6 1 6 1 3 3 3 2 2 1 3 1 6 10 4 2 5 4 3 2 6 2 5 6 5 2 6 3 4 6 3 4 3 5 3 2 1 3 1 2 2 1 2 1 3 1 1 2 3 3 2 1 3 2 3 1 6 3 4 5 2 3 6 3 4 3 2 4 2 1 3 4 5 1 2 3 4 2 4 2 3 1 6...
output:
NO NO NO NO YES NO YES YES YES YES YES YES NO NO NO YES YES YES YES YES YES YES YES YES NO NO YES YES NO YES NO YES YES YES YES NO YES YES YES YES YES YES NO NO YES YES NO YES NO YES YES YES NO NO NO YES YES YES YES NO YES YES YES YES YES YES YES YES YES YES YES YES YES YES NO NO NO YES NO NO NO YES...
result:
ok 22864 token(s): yes count is 14940, no count is 7924
Test #6:
score: 0
Accepted
time: 9ms
memory: 3632kb
input:
17284 5 7 2 3 4 5 5 2 2 1 1 5 3 5 1 3 4 4 4 3 1 3 2 4 4 1 2 1 2 1 2 1 1 2 3 2 2 1 3 2 2 1 1 2 3 1 3 1 7 15 3 7 7 6 2 5 1 5 1 7 3 6 2 7 5 6 1 6 3 5 6 2 2 3 5 7 3 1 1 2 7 18 2 7 1 5 4 7 5 4 4 3 1 7 4 1 7 3 1 3 3 2 1 2 2 5 1 6 2 4 7 6 5 6 6 4 2 6 5 4 2 4 4 3 4 1 5 4 3 1 2 3 3 1 1 3 7 15 7 3 7 5 5 4 4 1...
output:
NO NO YES YES YES YES YES YES NO YES YES YES YES YES NO YES YES NO YES YES NO YES YES YES YES YES NO NO YES YES YES YES YES YES NO YES YES NO YES NO YES YES NO YES YES YES YES YES YES YES NO NO NO NO NO NO NO YES NO NO YES YES YES NO YES NO YES YES NO NO NO NO YES YES NO YES YES YES NO YES YES YES Y...
result:
ok 17284 token(s): yes count is 10678, no count is 6606
Test #7:
score: 0
Accepted
time: 9ms
memory: 3692kb
input:
13601 5 6 1 2 2 4 1 4 5 1 4 5 5 2 3 3 1 2 3 2 1 3 4 4 4 1 1 2 3 1 3 2 5 5 3 2 2 1 3 1 2 4 5 4 4 5 1 3 2 4 3 4 4 1 1 2 3 3 2 3 2 1 3 1 7 7 7 2 6 3 1 7 7 4 2 3 1 4 4 2 7 20 7 1 2 7 1 5 2 5 6 2 2 3 2 1 5 3 1 6 4 7 6 4 1 4 7 3 4 5 3 6 2 4 5 6 5 7 3 4 7 6 6 15 2 4 1 4 2 3 1 3 2 6 1 2 6 1 3 5 4 5 3 4 5 1 ...
output:
YES YES NO NO NO YES NO NO YES YES YES NO YES YES YES NO YES NO YES NO YES NO NO NO YES NO NO YES YES YES YES NO NO NO YES YES NO YES YES YES YES YES YES YES YES YES NO YES YES YES YES YES YES YES YES YES NO NO YES YES YES YES NO YES YES NO NO YES YES NO YES YES NO YES YES YES NO NO YES NO YES YES N...
result:
ok 13601 token(s): yes count is 8194, no count is 5407
Test #8:
score: 0
Accepted
time: 8ms
memory: 3592kb
input:
11064 4 5 2 1 4 2 1 3 3 4 2 3 7 10 5 3 5 7 3 1 7 2 1 5 4 1 2 5 3 4 6 3 2 4 8 6 3 7 6 5 6 4 7 1 8 3 3 6 4 5 3 4 1 3 1 4 4 2 2 1 4 1 2 4 5 4 5 2 4 3 2 1 2 3 5 4 3 4 2 4 5 4 1 4 8 28 4 2 1 7 6 2 5 8 1 8 3 7 7 4 7 8 2 1 3 2 4 6 4 8 3 6 6 8 7 5 7 6 2 7 8 2 5 6 5 4 3 4 5 3 1 5 6 1 1 3 5 2 4 1 8 3 9 19 8 5...
output:
NO NO NO NO NO NO YES YES NO YES NO NO YES NO YES NO NO YES NO YES YES NO NO YES YES YES YES YES YES NO NO YES YES NO YES NO YES NO NO YES NO NO YES NO NO YES NO YES NO YES YES YES YES NO NO YES NO NO NO NO YES NO NO YES YES YES YES YES YES YES YES YES NO NO NO YES YES YES YES YES NO YES YES YES YES...
result:
ok 11064 token(s): yes count is 6312, no count is 4752
Test #9:
score: 0
Accepted
time: 8ms
memory: 3796kb
input:
9088 9 29 5 1 8 7 1 9 4 8 9 4 5 2 3 9 5 8 2 7 2 1 3 8 4 7 5 4 2 9 1 3 6 2 4 2 6 4 7 3 9 8 8 6 3 2 9 7 3 5 2 8 1 4 4 3 1 8 6 3 3 1 2 3 10 41 3 1 7 8 8 6 5 6 1 9 4 6 7 1 10 3 10 1 8 10 10 2 7 2 9 5 1 4 3 9 4 9 3 5 4 3 2 5 7 10 10 6 4 7 2 9 3 8 10 5 2 3 10 9 5 4 5 8 6 3 6 2 2 4 4 8 8 1 9 6 10 4 5 1 9 7...
output:
NO YES NO NO YES YES YES YES YES YES YES NO NO NO YES NO NO NO YES NO NO NO YES YES YES YES YES YES NO NO NO YES NO YES YES NO NO YES YES YES NO YES YES YES YES YES NO YES NO YES YES NO NO NO NO YES YES YES YES NO YES NO YES YES YES NO NO NO NO YES NO NO YES YES NO NO YES YES YES YES YES NO YES YES ...
result:
ok 9088 token(s): yes count is 5139, no count is 3949
Test #10:
score: 0
Accepted
time: 8ms
memory: 3628kb
input:
95 45 946 39 31 23 21 28 25 17 38 31 44 22 19 34 14 8 14 18 7 17 27 40 14 25 17 42 21 38 25 32 39 19 26 3 1 27 7 24 31 20 12 10 8 37 29 45 25 15 14 5 4 43 3 45 44 31 16 28 16 24 4 43 7 25 15 35 7 15 39 12 42 8 21 9 37 21 39 40 41 20 26 36 44 22 40 28 32 37 7 31 3 21 32 34 6 42 22 33 44 17 12 26 44 1...
output:
YES NO YES NO YES YES NO NO YES NO YES NO NO YES YES NO NO YES YES NO NO NO YES NO NO YES NO NO NO NO NO NO YES NO NO YES YES NO YES NO YES NO NO NO YES NO NO NO YES YES NO YES NO YES NO YES YES NO YES NO YES NO YES YES NO NO NO NO NO NO YES YES NO NO NO NO YES YES YES NO NO NO NO NO NO NO NO NO YES...
result:
ok 95 token(s): yes count is 38, no count is 57
Test #11:
score: 0
Accepted
time: 8ms
memory: 3672kb
input:
40 132 2755 82 71 85 95 17 22 92 12 101 36 65 91 64 105 95 44 98 37 58 39 25 64 90 109 128 59 9 75 48 30 115 24 132 47 86 59 121 35 125 38 119 43 65 88 93 7 103 22 115 15 53 50 57 125 43 73 60 39 5 65 57 118 70 36 132 129 113 4 132 70 2 23 16 90 44 43 119 91 126 11 106 118 20 78 44 131 99 132 56 119...
output:
NO YES NO NO NO NO YES NO YES NO YES YES YES NO NO NO YES YES YES YES YES YES NO NO YES YES NO YES YES YES NO YES NO YES NO NO NO YES NO YES
result:
ok 40 token(s): yes count is 21, no count is 19
Test #12:
score: 0
Accepted
time: 9ms
memory: 3796kb
input:
26 103 5152 20 96 88 76 43 13 3 42 21 64 88 22 41 71 7 73 20 35 3 81 48 85 94 18 70 93 70 82 80 20 41 20 63 29 29 96 61 87 10 45 37 101 35 78 50 46 26 69 52 30 10 3 16 96 66 58 85 84 96 100 65 46 9 90 2 36 39 21 79 42 35 44 98 37 74 43 101 79 45 64 17 24 83 97 31 63 4 98 74 46 82 88 66 39 66 98 15 7...
output:
NO YES NO NO YES YES NO YES YES NO NO NO NO YES YES YES YES YES YES YES NO YES YES YES NO NO
result:
ok 26 token(s): yes count is 15, no count is 11
Test #13:
score: 0
Accepted
time: 9ms
memory: 3740kb
input:
14 307 8793 292 159 91 228 119 33 255 290 295 218 92 88 258 286 84 193 194 223 159 147 17 277 82 285 168 227 280 262 276 214 74 172 293 190 294 241 263 122 171 181 48 39 29 231 51 180 104 4 250 17 37 107 244 112 296 87 139 218 115 239 227 157 37 144 81 93 66 140 160 142 140 6 171 292 221 265 90 262 ...
output:
NO NO YES YES YES NO NO NO YES YES YES NO YES YES
result:
ok 14 token(s): yes count is 8, no count is 6
Test #14:
score: 0
Accepted
time: 9ms
memory: 3720kb
input:
24 255 32132 213 148 39 82 95 192 24 155 118 227 235 127 182 123 120 124 226 220 202 233 106 26 211 25 52 9 7 196 28 82 47 203 31 38 169 215 27 11 108 109 175 70 203 200 124 162 183 76 25 168 132 177 237 162 213 173 188 189 153 243 145 12 50 128 197 32 8 6 175 195 51 180 244 83 45 138 92 212 170 179...
output:
NO NO NO YES NO NO NO YES NO YES NO YES YES NO YES YES NO NO YES NO NO NO NO YES
result:
ok 24 token(s): yes count is 9, no count is 15
Test #15:
score: 0
Accepted
time: 8ms
memory: 3812kb
input:
11 942 78200 189 599 626 941 178 899 372 673 378 657 808 484 492 325 308 549 551 106 130 568 2 70 817 606 199 789 702 370 234 58 437 305 103 673 224 769 539 659 478 474 197 924 130 251 746 878 75 35 836 143 290 563 875 546 255 603 795 249 482 885 80 698 894 498 182 299 175 154 761 525 685 862 664 80...
output:
NO YES NO YES YES NO YES YES YES YES YES
result:
ok 11 token(s): yes count is 8, no count is 3
Test #16:
score: 0
Accepted
time: 9ms
memory: 3692kb
input:
28 231 230 195 46 198 46 46 88 46 167 64 46 158 46 225 46 46 137 46 159 28 46 46 24 46 53 176 46 46 122 46 178 46 197 46 207 46 116 46 49 46 174 46 30 86 46 148 46 25 46 96 46 46 21 46 40 46 147 189 46 46 134 46 181 209 46 82 46 155 46 46 47 46 169 46 231 115 46 94 46 172 46 164 46 46 153 46 17 171 ...
output:
YES YES NO YES NO NO YES YES YES YES NO YES YES YES NO NO YES YES NO YES YES YES NO NO NO YES NO YES
result:
ok 28 token(s): yes count is 17, no count is 11
Test #17:
score: 0
Accepted
time: 9ms
memory: 3672kb
input:
10 2783 70178 2209 2014 1638 2561 941 515 806 1653 1081 28 759 2213 55 2253 1207 1681 278 1301 2509 227 2615 2281 2258 533 2607 580 1492 1333 1509 1654 2274 61 2725 422 1119 893 809 250 2715 416 513 1153 2607 329 1916 1335 588 2513 1831 530 2045 158 2496 427 2475 179 1932 804 1251 2507 2221 497 1745...
output:
NO YES YES NO YES NO NO YES NO YES
result:
ok 10 token(s): yes count is 5, no count is 5
Test #18:
score: 0
Accepted
time: 9ms
memory: 3640kb
input:
20 2580 55989 1258 610 948 1228 342 1091 857 659 373 1499 2385 390 1566 1518 1744 361 1621 1268 313 1123 516 2436 1195 430 1952 745 2159 1501 705 347 30 576 481 1294 1336 840 1072 981 1784 42 2505 1508 2458 1845 2066 2089 286 1273 1596 1772 2049 1409 799 277 2047 1734 1527 2294 1498 988 504 844 1728...
output:
NO YES YES NO NO YES YES YES YES YES YES YES YES NO NO YES YES NO NO YES
result:
ok 20 token(s): yes count is 13, no count is 7
Test #19:
score: 0
Accepted
time: 9ms
memory: 3648kb
input:
18 1912 1911 145 1347 145 1629 108 145 145 751 1708 145 1742 145 145 1375 1144 145 145 1242 145 1789 145 868 145 35 99 145 145 28 463 145 507 145 1224 145 705 145 1506 145 584 145 1303 145 145 1245 77 145 145 1143 145 549 510 145 853 145 1479 145 1358 145 145 85 145 1719 145 206 145 54 145 1654 145 ...
output:
YES NO YES YES NO YES YES YES NO YES YES YES NO NO YES YES NO YES
result:
ok 18 token(s): yes count is 12, no count is 6
Test #20:
score: 0
Accepted
time: 9ms
memory: 3852kb
input:
13 4370 4369 3144 916 916 1776 916 2095 595 916 916 104 916 4083 916 509 1990 916 916 655 281 916 2125 916 1406 916 916 131 503 916 916 4111 3499 916 916 1169 356 916 916 3317 916 4333 1503 916 2899 916 916 3027 2690 916 916 1032 2460 916 916 2782 916 2404 916 3353 920 916 916 2522 4197 916 582 916 ...
output:
YES NO YES NO YES NO NO YES NO NO YES YES YES
result:
ok 13 token(s): yes count is 7, no count is 6
Test #21:
score: 0
Accepted
time: 7ms
memory: 3688kb
input:
5 18499 80052 17497 6522 4127 2225 10053 4756 3308 8362 18427 3389 13328 18214 5221 13475 895 8931 12120 16146 18373 10822 8526 17921 14280 6762 15506 10692 6401 17491 7254 6732 2565 7614 2547 10298 13557 1816 11103 4380 15876 14783 3689 8534 345 5504 11872 17911 7261 7514 18037 2913 8717 222 17478 ...
output:
NO YES NO YES YES
result:
ok 5 token(s): yes count is 3, no count is 2
Test #22:
score: 0
Accepted
time: 10ms
memory: 3776kb
input:
8 11483 43879 7766 8671 11384 4228 3209 8346 4899 11014 3919 6985 6645 10859 2647 5796 237 6868 5673 1948 6364 3595 10626 8814 962 3984 4582 1025 1221 7860 11310 10714 1659 5427 11385 3108 11406 1886 6882 8914 2468 4564 3831 8845 3020 7377 4965 4213 8359 5002 9989 7234 2153 11199 7648 3594 11313 999...
output:
NO YES NO NO YES YES NO YES
result:
ok 8 token(s): yes count is 4, no count is 4
Test #23:
score: 0
Accepted
time: 9ms
memory: 3932kb
input:
6 8706 8706 3028 4536 3028 8225 6567 3028 3028 8280 3028 142 3028 118 715 3028 6254 3028 3028 4645 3028 1020 4619 3028 315 3028 3028 2827 3977 3028 7724 3028 3028 4397 3028 5156 4696 3028 3028 1818 3028 6655 2828 3028 3028 4526 7244 3028 4246 3028 3028 5602 3028 8616 5282 3028 3028 4376 2516 3028 66...
output:
NO YES NO YES YES YES
result:
ok 6 token(s): yes count is 4, no count is 2
Test #24:
score: 0
Accepted
time: 6ms
memory: 3852kb
input:
4 39030 39029 26827 21909 21909 13950 5168 21909 21909 36018 15539 21909 38869 21909 21909 11891 18641 21909 35851 21909 21909 15037 20505 21909 21909 6021 21909 1938 21909 36426 27685 21909 38012 21909 21909 23905 26158 21909 31003 21909 21909 28895 21909 28086 21909 33566 21909 16512 34360 21909 2...
output:
YES YES YES YES
result:
ok 4 token(s): yes count is 4, no count is 0
Test #25:
score: 0
Accepted
time: 6ms
memory: 4004kb
input:
5 49289 3975 43645 46477 47162 15332 17455 12612 19202 28185 6027 74 40221 21622 24054 40416 28775 48866 13737 43838 18850 44750 39848 21794 4085 37426 16876 15626 37373 27760 34314 14733 36912 4248 2313 43932 44705 37890 38831 23090 31370 32488 14178 4680 49250 41123 3787 16379 12463 31248 19044 78...
output:
NO YES NO YES NO
result:
ok 5 token(s): yes count is 2, no count is 3
Test #26:
score: 0
Accepted
time: 6ms
memory: 4044kb
input:
3 74531 26560 56153 27816 32498 16455 73520 6112 20141 60783 46926 31808 47444 27542 48947 32955 48780 45411 16470 21530 68678 58186 56857 61873 17873 34034 47738 17199 12938 4370 67959 13202 31901 4186 44561 40622 13268 49721 56477 39448 24473 36973 59233 35088 30265 64827 56961 69336 29233 18971 7...
output:
NO YES NO
result:
ok 3 token(s): yes count is 1, no count is 2
Test #27:
score: 0
Accepted
time: 2ms
memory: 3972kb
input:
3 78739 1386 75259 42802 53177 18944 47811 37367 12027 77892 50688 55109 42628 12669 21209 22195 10572 65958 48194 9014 50241 45219 28936 16959 33091 50143 7960 63771 379 5487 71179 75793 18440 7346 16946 27276 15913 40813 59810 60451 10953 7939 62409 40965 53878 73808 28031 8538 35303 37277 62063 3...
output:
NO YES YES
result:
ok 3 token(s): yes count is 2, no count is 1
Test #28:
score: 0
Accepted
time: 10ms
memory: 4040kb
input:
3 34619 34618 24348 30650 33206 24348 1083 24348 29829 24348 24348 25557 24348 31156 18651 24348 20076 24348 28741 24348 24348 18643 10960 24348 30014 24348 24348 28023 24348 20738 24348 9135 7241 24348 24348 26539 24348 34022 31306 24348 23561 24348 24348 4688 24348 19514 19056 24348 24348 23346 24...
output:
YES NO YES
result:
ok 3 token(s): yes count is 2, no count is 1
Test #29:
score: 0
Accepted
time: 6ms
memory: 3884kb
input:
3 50523 50522 24396 1392 36363 1392 1392 21252 49437 1392 1392 23901 4311 1392 9440 1392 1392 3096 1392 19135 1392 15724 25896 1392 1392 41148 12261 1392 1392 25847 1392 9901 1392 14290 1392 6217 24034 1392 1392 23912 32022 1392 1392 25254 28580 1392 43102 1392 19077 1392 15260 1392 31611 1392 42070...
output:
YES YES YES
result:
ok 3 token(s): yes count is 3, no count is 0
Test #30:
score: 0
Accepted
time: 6ms
memory: 3960kb
input:
6 9577 9577 4255 6480 8018 6480 6480 8015 7306 6480 7410 6480 5882 6480 6480 9459 2280 6480 7071 6480 6480 7518 9376 6480 6617 6480 6480 4412 6480 3828 7362 6480 6480 4048 4940 6480 6480 6669 6480 3953 8780 6480 6480 58 6480 7338 6480 4528 6480 6717 6480 5986 6480 492 366 6480 4185 6480 6480 3515 38...
output:
NO NO YES NO NO NO
result:
ok 6 token(s): yes count is 1, no count is 5
Test #31:
score: 0
Accepted
time: 10ms
memory: 3896kb
input:
4 30673 72312 25948 481 7596 16184 2319 15443 9833 22340 22528 27569 4904 14470 11900 8473 12655 7688 11543 12515 12386 10244 30097 8048 25521 29806 15663 7473 26246 17641 30646 28970 26512 27581 19785 30138 21403 10949 6420 22655 6157 14138 29886 22939 23109 7143 9647 2007 7074 10403 250 8136 19177...
output:
NO YES NO NO
result:
ok 4 token(s): yes count is 1, no count is 3
Test #32:
score: 0
Accepted
time: 9ms
memory: 3956kb
input:
4 84096 84095 32961 48621 48621 54091 48621 74733 51393 48621 18479 48621 48621 33323 55255 48621 52101 48621 48621 4738 5006 48621 1563 48621 52084 48621 47552 48621 48621 5411 48621 7786 35203 48621 48621 24516 80559 48621 48621 38627 20519 48621 15364 48621 56642 48621 48621 42636 12247 48621 486...
output:
YES YES YES YES
result:
ok 4 token(s): yes count is 4, no count is 0
Test #33:
score: 0
Accepted
time: 9ms
memory: 3872kb
input:
4 15754 75842 1613 15742 3569 5635 10910 13540 533 4843 9685 12759 4335 1892 4579 6358 13425 12807 6314 7041 8745 4713 6571 4767 14020 14939 14506 6189 8912 2404 5708 12279 13695 9315 8259 4780 5241 9763 8139 5308 8712 5828 8930 10842 4448 7904 10088 14855 5856 7126 2404 7657 8936 983 14247 8076 139...
output:
NO NO NO NO
result:
ok 4 token(s): yes count is 0, no count is 4
Test #34:
score: 0
Accepted
time: 11ms
memory: 3848kb
input:
4 4833 4833 576 4682 3620 4682 1047 4682 4682 2049 1670 4682 4682 3989 1989 4682 4682 3414 2108 4682 2574 4682 2085 4682 4231 4682 4345 4682 4682 2290 1157 4682 4682 567 1944 4682 4682 2267 1121 4682 202 4682 572 4682 1691 4682 4682 4667 2607 4682 4823 4682 1835 4682 1636 4682 1560 4682 4682 3915 22...
output:
NO NO YES YES
result:
ok 4 token(s): yes count is 2, no count is 2
Test #35:
score: 0
Accepted
time: 9ms
memory: 4180kb
input:
1 100000 94700 29925 70046 30689 85548 60407 97158 95623 85476 35008 89929 19475 3681 67246 89022 1499 26854 95282 85588 53537 92035 15101 94346 11342 26132 9444 70405 43108 23419 97004 62283 44850 13787 53407 41835 1514 72056 65102 4052 90277 83555 48998 48770 6528 27209 98470 36536 51930 1114 3980...
output:
NO
result:
ok NO
Test #36:
score: 0
Accepted
time: 10ms
memory: 4184kb
input:
1 100000 100000 71672 81970 37302 71672 71672 10722 2866 71672 71672 15891 79093 71672 71672 16088 10874 71672 23493 71672 92641 71672 71672 36032 71672 10003 48450 71672 71672 98185 23176 71672 71672 59335 39598 71672 75468 71672 53334 71672 11227 71672 71672 23918 71672 17026 34731 71672 19647 716...
output:
NO
result:
ok NO
Test #37:
score: 0
Accepted
time: 5ms
memory: 4016kb
input:
1 100000 49626 16241 47392 17396 4929 23038 87923 36558 64846 90446 48395 41856 2635 8115 34672 93093 85868 88331 62252 63794 89542 35168 29506 72661 80499 42257 52129 75164 97644 26445 27061 12164 27333 52379 74691 79820 59075 87317 44044 15788 43005 11050 5134 75894 76008 47545 90739 9361 71129 79...
output:
NO
result:
ok NO
Test #38:
score: 0
Accepted
time: 3ms
memory: 4128kb
input:
1 100000 20759 21717 35022 2327 90792 93801 91073 45203 31343 39512 27103 36217 45044 39355 60771 37460 2534 1400 57044 90414 2395 3531 89064 91574 79352 41826 79705 39823 73924 92203 62524 29628 29717 30593 35836 43273 20915 81688 1176 18682 23399 32817 67067 37304 6179 42431 85789 35848 54909 6953...
output:
NO
result:
ok NO
Test #39:
score: 0
Accepted
time: 6ms
memory: 4064kb
input:
1 100000 54160 39603 98669 94552 46057 24309 93794 41931 40543 48515 78965 60556 83183 13976 70852 48996 6472 66300 97524 17252 22117 72096 25437 12403 70761 25593 38583 40227 57988 14736 5663 33854 26855 15493 39537 4935 54764 11520 87600 69183 43277 90549 38509 76725 93265 27680 35815 52657 25913 ...
output:
NO
result:
ok NO
Test #40:
score: 0
Accepted
time: 7ms
memory: 4140kb
input:
1 100000 68738 93602 79230 82400 91841 37104 72568 70744 62525 1428 1374 83847 402 77120 87271 6506 61933 85931 4026 73948 2280 67370 81459 3390 72291 18062 18107 84701 34428 32580 26733 38518 8826 63230 37485 69052 29259 53311 63028 13638 59640 99595 67941 79205 12157 62837 106 83127 50045 8751 615...
output:
NO
result:
ok NO
Test #41:
score: 0
Accepted
time: 6ms
memory: 4148kb
input:
1 100000 99999 43573 86778 49866 43573 43573 92061 43573 14162 6185 43573 87622 43573 43573 18575 43573 48651 43573 25570 13205 43573 7865 43573 43573 23691 43573 46802 43573 6886 99005 43573 43573 40520 91874 43573 43573 38726 95461 43573 32679 43573 43573 9654 4671 43573 43573 80831 43573 31533 43...
output:
YES
result:
ok YES
Test #42:
score: 0
Accepted
time: 10ms
memory: 4204kb
input:
1 100000 99999 62418 35168 35168 50689 60156 35168 56622 35168 23386 35168 3927 35168 34834 35168 25552 35168 35168 39537 35168 52872 17053 35168 22476 35168 35168 19916 35168 1315 8382 35168 62573 35168 35168 34960 6875 35168 20065 35168 35168 40693 35168 34169 35168 39274 19193 35168 35168 91037 3...
output:
YES
result:
ok YES
Test #43:
score: 0
Accepted
time: 2ms
memory: 4192kb
input:
1 100000 11494 97522 23217 93114 42879 600 17535 76174 35573 92920 71821 48873 50580 25158 7224 97934 99231 36941 97953 33180 1444 85899 56068 22262 16746 95740 94920 89462 59053 52736 81952 87452 61365 35942 12180 47679 40028 50530 9721 34404 36777 40678 57863 44094 38812 61844 15877 18167 87343 53...
output:
NO
result:
ok NO
Test #44:
score: 0
Accepted
time: 10ms
memory: 4076kb
input:
1 100000 100000 32471 20948 20948 12366 62713 20948 20948 99528 67857 20948 70799 20948 20948 6525 82864 20948 8715 20948 49294 20948 20948 35378 20948 64279 20948 23859 58938 20948 20948 43978 99363 20948 79905 20948 22369 20948 20948 89044 20948 30365 20948 70576 20948 90572 76354 20948 88274 2094...
output:
NO
result:
ok NO