Show all threads Hide all threads Show all messages Hide all messages | 24 orientations of cube + small test case | So Sui Ming | 1015. Test the Difference! | 7 May 2024 09:30 | 1 | for your convenience 24 orientations of cube: 1 2 3 4 5 6 1 2 4 5 6 3 1 2 5 6 3 4 1 2 6 3 4 5 2 1 3 6 5 4 2 1 4 3 6 5 2 1 5 4 3 6 2 1 6 5 4 3 3 5 1 6 2 4 3 5 2 4 1 6 3 5 4 1 6 2 3 5 6 2 4 1 4 6 1 3 2 5 4 6 2 5 1 3 4 6 3 2 5 1 4 6 5 1 3 2 5 3 1 4 2 6 5 3 2 6 1 4 5 3 4 2 6 1 5 3 6 1 4 2 6 4 1 5 2 3 6 4 2 3 1 5 6 4 3 1 5 2 6 4 5 2 3 1 test: 4 1 4 2 3 6 5 1 4 3 6 5 2 1 4 5 2 3 6 1 4 6 5 2 3 ans: 1 1 2 3 4 | java AC code snippet | esbybb | 1015. Test the Difference! | 8 Sep 2021 18:08 | 2 | there are 24 unique sequences of edges for the specific cube, i use 12 sequences and flip flop front with back for each of them static int R[][] = new int[][] { {1,2,3, 4,5, 6}, {5,3,1, 4,2, 6}, {2,1,5, 4,3, 6}, {3,5,2, 4,1, 6},
{6,4,3, 1,5, 2}, {5,3,6, 1,4, 2}, {4,6,5, 1,3, 2}, {3,5,4, 1,6, 2}, {1,2,6, 3,4, 5}, {6,4,2, 3,1, 5}, {2,1,4, 3,6, 5}, {4,6,1, 3,2, 5} }; static int front_back_rotate[][] = new int[][]{{0,1,2,3,4,5},{0,1,4,5,2,3}}; //left right top front bottom back //0 1 2 3 4 5 static boolean eqv(int a[], int b[]) { for (int[] r: R) { for (int[] I: front_back_rotate) { int front_back[] = new int[6]; for (int i=0; i<6; i++) { front_back[r[I[i]]-1] = a[i]; } if (Arrays.equals(front_back, b)) return true; } } return false; }
You don't need to try all rotation combinations. Just rotate left and rotate down, use recursion and all combinations will be generated easily. | The dice sides 2, 3 and 6 are (probably) not symmetrical. | Alexander Vasilyev`~ | 1015. Test the Difference! | 9 Jun 2018 22:33 | 1 | It must be mentioned that two dice are considered equal if the numbers of points on corresponding faces are equal regardless of the orientation of the points on each face. For example, if you superimpose two dice and the numbers of points coincide but two corresponding faces look like this: #.. ..# .#. and .#. ..# #.. then the dice have the same schemes. Edited by author 09.06.2018 22:36 | Can somebody give me some test data,plz?(-) | Ural_Happy New Year! | 1015. Test the Difference! | 30 Dec 2014 16:43 | 9 | when you output your data, this one is collect: 3 1 2 3 4 6 5 but this is not collect: 3 1 2 3 4 6 5 mind the last space in the last of every line. > when you output your data, > this one is collect: > 3 > 1 2 3 > 4 6 > 5 > but this is not collect: > 3 > 1 2 3 > 4 6 > 5 > > mind the last space in the last of every line. No, it's not true! I've simply written to output 3 1_2_3_ 4_5_ 6_ Where sing "_" means space " ". This is not important during writing output. Hello, here is my test data, generated randomly: <input> 1000 2 5 4 6 1 3 2 3 6 5 1 4 4 3 2 6 1 5 2 5 4 6 3 1 6 5 2 3 4 1 4 1 3 2 6 5 5 1 6 4 3 2 3 2 4 6 5 1 6 5 3 4 1 2 3 4 2 6 5 1 5 6 3 4 2 1 2 3 6 4 1 5 2 6 3 5 1 4 4 6 1 3 5 2 4 5 3 6 1 2 2 1 5 6 3 4 1 3 6 4 5 2 3 5 4 2 6 1 3 2 1 5 4 6 3 5 4 1 6 2 1 2 6 4 3 5 1 5 6 3 2 4 3 2 5 6 1 4 4 5 1 2 3 6 6 4 3 1 2 5 5 6 2 3 1 4 5 3 2 1 4 6 6 5 2 4 1 3 5 2 3 4 1 6 3 1 4 6 2 5 5 6 4 1 3 2 1 5 6 4 2 3 5 1 2 3 4 6 6 3 4 5 1 2 6 4 2 1 3 5 4 1 2 3 5 6 1 6 2 4 5 3 3 2 6 4 5 1 3 6 2 5 4 1 4 1 5 2 3 6 2 4 5 6 3 1 6 4 3 2 1 5 4 3 5 6 2 1 4 6 1 3 2 5 3 1 6 4 2 5 1 6 4 3 2 5 2 4 3 5 6 1 5 4 3 6 1 2 3 2 1 4 5 6 5 2 3 1 4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 3 2 1 3 5 1 2 6 4 2 3 6 1 4 5 5 1 6 3 4 2 2 3 6 4 5 1 3 1 5 6 4 2 6 1 5 2 3 4 5 6 4 2 1 3 2 6 4 5 3 1 1 2 6 4 3 5 5 1 4 6 2 3 5 4 6 1 2 3 </input> and the correct (Accepted) answer: <output> 30 1 34 36 54 114 130 170 216 310 315 326 331 401 421 437 448 470 478 602 654 689 708 737 762 764 776 777 789 825 841 856 872 916 946 956 986 2 55 123 145 147 177 300 302 349 353 357 359 391 432 450 489 542 562 609 655 668 675 769 774 804 835 862 925 943 966 3 31 61 99 106 138 192 297 301 312 325 332 344 348 386 397 403 490 517 586 703 738 754 780 786 790 811 820 821 847 850 857 884 906 908 923 929 981 4 10 43 62 63 70 113 140 181 236 268 270 306 345 368 422 436 454 472 536 539 563 589 608 631 678 688 704 743 748 802 940 947 5 9 17 30 88 94 125 155 178 263 267 280 293 381 399 426 509 518 558 593 603 635 637 641 650 697 710 718 730 758 828 839 849 854 873 888 926 954 978 983 6 92 122 131 144 172 213 299 323 334 343 392 626 656 772 773 816 870 922 987 7 39 51 82 115 117 161 183 218 222 223 227 237 248 283 311 321 356 410 415 429 452 458 483 521 551 554 621 651 662 680 719 740 801 813 843 851 866 868 883 887 889 901 921 942 8 12 53 134 135 163 194 207 246 253 317 378 383 529 597 605 607 619 639 712 742 755 761 779 824 848 874 959 963 975 11 38 93 107 119 137 159 220 260 407 442 462 467 502 505 540 627 636 707 739 745 750 753 766 795 817 836 965 996 13 48 83 112 132 148 156 167 200 219 224 243 250 254 273 294 322 340 361 366 412 465 519 525 565 581 596 600 644 645 663 674 683 726 759 788 864 899 964 967 1000 14 25 87 104 160 164 171 197 241 379 382 388 390 402 460 474 476 514 516 528 538 550 564 685 751 798 805 814 831 842 880 882 903 905 973 991 15 24 45 74 109 120 136 189 195 196 209 234 259 279 303 319 434 471 479 500 523 534 557 601 625 640 676 701 705 734 746 765 803 826 830 915 938 962 980 994 16 18 72 76 95 150 215 245 249 265 314 320 335 347 395 468 480 485 493 577 585 588 599 614 647 664 677 681 691 692 714 721 729 823 890 904 945 951 974 977 19 52 71 89 101 154 240 288 371 372 495 548 567 591 620 633 670 717 724 744 747 757 808 818 829 845 869 914 927 939 993 20 44 69 73 103 174 210 278 285 307 354 373 384 389 413 425 451 453 456 482 501 530 547 560 576 580 606 622 646 657 679 682 700 770 840 853 855 900 933 21 57 80 251 261 272 287 339 396 445 473 477 507 522 553 623 709 736 837 891 894 920 998 22 64 65 121 180 186 190 198 199 225 233 239 289 291 309 374 420 492 532 595 643 648 669 694 733 749 800 819 949 976 982 23 35 49 59 66 68 79 203 211 221 262 292 393 406 409 419 431 488 494 511 555 561 574 629 711 768 793 875 886 992 26 28 84 128 217 226 255 256 282 316 330 333 341 363 424 439 459 520 559 573 615 716 720 725 787 858 897 917 919 972 27 41 75 97 111 124 139 175 264 337 380 385 387 446 487 533 569 610 612 618 693 715 783 833 910 930 941 968 985 990 29 60 91 98 116 168 229 238 271 296 328 342 362 370 398 440 556 611 672 698 727 799 815 876 918 948 989 32 102 133 151 257 284 324 351 355 365 428 457 461 466 503 527 545 568 578 582 587 592 658 735 827 913 924 960 997 33 47 58 105 158 187 235 269 274 275 346 350 360 418 443 464 469 499 613 642 794 885 902 907 936 950 952 988 999 37 50 81 100 110 118 126 127 142 143 157 184 193 212 230 286 295 329 375 394 417 449 513 526 537 546 570 571 590 624 630 659 781 792 807 810 859 867 877 878 881 912 979 40 86 90 146 149 277 281 411 441 444 455 484 496 524 552 566 634 652 760 767 806 809 812 832 838 852 861 871 896 944 961 970 42 176 205 206 242 244 247 266 318 400 408 427 504 543 598 617 653 660 661 713 722 723 784 785 892 893 934 937 46 56 67 108 169 231 276 305 313 338 352 405 414 430 491 506 510 512 535 544 649 665 671 686 695 699 702 741 756 771 775 782 791 895 898 909 932 971 995 77 96 141 153 162 166 173 182 191 201 202 204 214 252 298 358 364 416 423 433 481 579 594 628 632 638 667 687 706 822 879 958 984 78 85 129 179 290 308 327 336 367 369 377 435 447 463 508 531 541 583 584 673 684 731 778 796 834 844 846 860 863 865 928 931 935 953 955 957 969 152 165 185 188 208 228 232 258 304 376 404 438 475 486 497 498 515 549 572 575 604 616 666 690 696 728 732 752 763 797 911 </output> Good luck, Alex PS: !!! please note, that there may be some newlines, mis-inserted by my browser !!! Thanks to this data,I got AC at last. Thank you! Thanks to many tests.I am glad.I was worked solution by you test.I got AC already. tryhard Edited by author 30.12.2014 16:44 | Wrong sample or output format | Geno Roupsky | 1015. Test the Difference! | 3 Jun 2012 08:05 | 5 | The output format says: Print Q And then Print Q lines of the form NumSheme Count But the sample output is written 2 1 2 3 Why there isn't any '1' after the 3. And what does the sentence: 'Numbers in each line of the output must be sorted in increasing order' mean? How can you sort NumSheme and Count when it is said that they should be ano after another in a strict way? > The output format says: > Print Q > And then Print Q lines of the form > NumSheme Count > > But the sample output is written > 2 > 1 2 > 3 > Why there isn't any '1' after the 3. > > And what does the sentence: > 'Numbers in each line of the output must be sorted in > increasing order' mean? How can you sort NumSheme and Count > when it is said that they should be ano after another in a > strict way? The output is wrong - but not in the way you describe. All three die are different - note 1 dot opposite 2 dots, 3 dots and 4 dots for the three die respectively. The output should read: 3 1 2 3 This is the number of different die types followed by the die in each type in increasing order. > The output is wrong - but not in the way you describe. > > All three die are different - note 1 dot opposite 2 dots, 3 > dots and 4 dots for the three die respectively. > > The output should read: > 3 > 1 > 2 > 3 > > This is the number of different die types followed by the > die in each type in increasing order.
No, sample output is correct. Sample input is wrong. Fixed. 'Next Q lines should contain the numbers of dice with the same scheme. ' It is the numbers, not the count. | I got WA at test 3 ,who can give me some test??? | bear-cat | 1015. Test the Difference! | 6 Feb 2012 19:46 | 4 | I got WA at test 3 ,who can give me some test??? Try the test data in previous posts, I get something wrong with this pair: 4 6 1 3 5 2 1 3 6 2 5 4 because I foget to compare the left right after the rotation. | wa 3 ...help..... | luohan51 | 1015. Test the Difference! | 25 Aug 2011 09:07 | 2 | who can give me a test which is similar to test 3? | WA 3 ?? | Manastireanu | 1015. Test the Difference! | 14 Apr 2011 18:52 | 4 | WA 3 ?? Manastireanu 22 Mar 2007 21:01 does anyone know what TEST 3 might contain ? figured out the max number of different dices, and how to compare them ... but WA on test 3 can anyone give me a tricky example ? lol... i had a typo :D i had a < instead of <=, and it gave wrong answer only when max no of different dices were in the input :) Thanks for this information. | WA 3 | ib18 | 1015. Test the Difference! | 5 Sep 2010 21:27 | 1 | WA 3 ib18 5 Sep 2010 21:27 Help me please! What's wrong with my program?? #include <iostream> using namespace std; #define ll unsigned long long ll f(ll* a) { swap(a[4], a[5]); for (int i=1; i<=3; i++) if (a[2*i-1]>a[2*i]) swap(a[2*i-1], a[2*i]); for (int c=1; c<=3; c++) for (int i=1; i<3; i++) if (a[2*i-1]>a[2*i+1]) { swap(a[2*i-1], a[2*i+1]); swap(a[2*i], a[2*i+2]); } return a[6]+10*a[5]+100*a[4]+1000*a[3]+10000*a[2]+100000*a[1]; } ll a[100001][7], sol[800][100010], sum; int main() { ll n, k=0, sum; cin>>n; for (ll i=1; i<=n; i++) { for (int j=1; j<=6; j++) cin>>a[i][j]; sum=f(a[i]); //cout<<"i="<<i<<" "<<sum<<endl; bool f=true; for (ll cnt=1; cnt<=k; cnt++) if (sol[cnt][100009]==sum) { f=false; ll tmp=++sol[cnt][0]; sol[cnt][tmp]=i; break; } if (f) { ++k; sol[k][0]=1; sol[k][1]=i; sol[k][100009]=sum; } } cout<<k<<endl; for (ll i=1; i<=k; i++) { for (ll j=1; j<=sol[i][0]; j++) cout<<sol[i][j]<<" "; cout<<endl; } } | My Accept Short Solution :D | brainail | 1015. Test the Difference! | 19 Jan 2010 01:07 | 1 | #include<iostream> #include<vector> using namespace std; #define forr(i,x,y) for(int i=(int)(x); i<=(int)(y); i++) int p[24][6]={ {1,2,3,4,5,6},{1,2,6,5,3,4},{1,2,4,3,6,5},{1,2,5,6,4,3},{2,1,4,3,5,6},{2,1,6,5,4,3},{2,1,3,4,6,5},{2,1,5,6,3,4}, {3,4,2,1,5,6},{3,4,6,5,2,1},{3,4,1,2,6,5},{3,4,5,6,1,2},{4,3,6,5,1,2},{4,3,2,1,6,5},{4,3,5,6,2,1},{4,3,1,2,5,6}, {5,6,3,4,2,1},{5,6,1,2,3,4},{5,6,4,3,1,2},{5,6,2,1,4,3},{6,5,3,4,1,2},{6,5,2,1,3,4},{6,5,4,3,2,1},{6,5,1,2,4,3}}; int n,a[7],b[7],id[7][7][7][7][7][7],m=0,x=0; vector< vector<int> > y(100100); int main() { scanf("%d",&n); forr(i,1,n) { scanf("%d %d %d %d %d %d",&a[3],&a[4],&a[2],&a[5],&a[1],&a[6]); forr(q,0,23) if(x=id[a[p[q][0]]][a[p[q][1]]][a[p[q][2]]][a[p[q][3]]][a[p[q][4]]][a[p[q][5]]])break; if(!x) { y[++m].push_back(i); id[a[1]][a[2]][a[3]][a[4]][a[5]][a[6]]=m; } else y[x].push_back(i); } printf("%d\n",m); forr(i,1,m) { forr(j,0,y[i].size()-1) printf("%d ",y[i][j]); printf("\n"); } } | Q_max = 30. Am I Right? (+) | Alexey | 1015. Test the Difference! | 7 Nov 2009 11:11 | 3 | I think that there is 6*4=24 kind of rotating and 6!=720 of all types. So, the Q_max=720/24=6!/4!=30. Am I right? Thanks. Yes, you are! (I think so) Edited by author 07.04.2007 00:06 Edited by author 07.11.2009 11:11 | This is very very strange... | Active User | 1015. Test the Difference! | 15 Jul 2009 22:07 | 3 | this C++ code work correctly on my machine and on Timus's: { a[b][c[b]++] = i; b++; } but this code work incorrectly on Timus: { a[b][c[b++]++] = i; } I have spent half-day to find this bug. I think it is not a good habbit to write a program like that. Edited by author 15.07.2009 22:08 | rotation | jagatsastry | 1015. Test the Difference! | 18 Jan 2008 22:55 | 2 | How do we check whether two permutations of dice belong to the same scheme or not? Just try all rotations of cube ;) | better logic | manishmmulani | 1015. Test the Difference! | 23 Dec 2007 23:13 | 1 | u can make use of the fact that there are only 30 different dice possible watever input is given would always equal to one of the 30 unique orientations on rotating( 10 possible rotations )... my soln O(n) got ac in 0.015 sec !!! Edited by author 23.12.2007 23:16 | Help!!What's wrong with my program? | cc | 1015. Test the Difference! | 24 Nov 2007 19:29 | 2 | #include<stdio.h> int n,total,note[100000][7]; void init() { int i,j; scanf("%d",&n); for(i=0;i<n;i++) { note[i][0]=0; for(j=1;j<7;j++) scanf("%d",¬e[i][j]); } } void right(int num) { int temp; temp=note[num][4]; note[num][4]=note[num][1]; note[num][1]=note[num][6]; note[num][6]=note[num][2]; note[num][2]=temp; } void left(int num) { int temp; temp=note[num][4]; note[num][4]=note[num][2]; note[num][2]=note[num][6]; note[num][6]=note[num][1]; note[num][1]=temp; } void up(int num) { int temp; temp=note[num][4]; note[num][4]=note[num][5]; note[num][5]=note[num][6]; note[num][6]=note[num][3]; note[num][3]=temp; } void down(int num) { int temp; temp=note[num][4]; note[num][4]=note[num][3]; note[num][3]=note[num][6]; note[num][6]=note[num][5]; note[num][5]=temp; } void change(int num) { if(note[num][1]==1)right(num); if(note[num][2]==1)left(num); if(note[num][3]==1)down(num); if(note[num][5]==1)up(num); if(note[num][6]==1){right(num);right(num);} } int compare(int num) { int i,j,k; for(i=0;i<num;i++) { k=1; for(j=1;j<7;j++) if(note[i][j]!=note[num][j])k=0; if(k){note[num][0]=note[i][0];return 0;} } total++;note[num][0]=total; return 0; } void work() { int i; if(note[0][4]!=1)change(0);note[0][0]=1;total=1; for(i=1;i<n;i++) { if(note[i][4]!=1)change(i); compare(i); } } void out() { int i,j; printf("%d\n",total);total++; for(i=1;i<total;i++) { for(j=0;j<n;j++) if(note[j][0]==i)printf("%d ",j+1); printf("\n"); } } void main() { init(); work(); out(); } #include<stdio.h> int n,total,note[100000][7]; void init() { int i,j; scanf("%d",&n); for(i=0;i<n;i++) { note[i][0]=0; for(j=1;j<7;j++) scanf("%d",¬e[i][j]); } } void right(int num) { int temp; temp=note[num][4]; note[num][4]=note[num][1]; note[num][1]=note[num][6]; note[num][6]=note[num][2]; note[num][2]=temp; } void left(int num) { int temp; temp=note[num][4]; note[num][4]=note[num][2]; note[num][2]=note[num][6]; note[num][6]=note[num][1]; note[num][1]=temp; } void up(int num) { int temp; temp=note[num][4]; note[num][4]=note[num][5]; note[num][5]=note[num][6]; note[num][6]=note[num][3]; note[num][3]=temp; } void down(int num) { int temp; temp=note[num][4]; note[num][4]=note[num][3]; note[num][3]=note[num][6]; note[num][6]=note[num][5]; note[num][5]=temp; } void change(int num) { if(note[num][1]==1)right(num); if(note[num][2]==1)left(num); if(note[num][3]==1)down(num); if(note[num][5]==1)up(num); if(note[num][6]==1){right(num);right(num);} } int compare(int num) { int i,j,k; for(i=0;i<num;i++) { k=1; for(j=1;j<7;j++) if(note[i][j]!=note[num][j])k=0; if(k){note[num][0]=note[i][0];return 0;} } total++;note[num][0]=total; return 0; } void work() { int i; if(note[0][4]!=1)change(0);note[0][0]=1;total=1; for(i=1;i<n;i++) { if(note[i][4]!=1)change(i); compare(i); } } void out() { int i,j; printf("%d\n",total);total++; for(i=1;i<total;i++) { for(j=0;j<n;j++) if(note[j][0]==i)printf("%d ",j+1); printf("\n"); } } void main() { init(); work(); out(); } nothing | who can show me the optimal memory strategy? | AlainDelon | 1015. Test the Difference! | 18 Nov 2007 20:41 | 1 | I got AC but used lots of memory. currently I use a very large lookup table such as int hash[7][7][7][7][7][7] for look up a given dice's scheme what's the optimal approach that can minimize the memory usage and also get 0.001s time result? Thanks! | No subject | Meni Packeou | 1015. Test the Difference! | 5 Oct 2007 16:20 | 3 | Edited by author 18.08.2008 17:51 Yor explanation is bad! It is theory of groop of cube problem and you should simply publicate array [24][6] of this groope without code. Edited by author 18.08.2008 17:53 | do u want my solution? | nicushor | 1015. Test the Difference! | 18 Jan 2007 16:19 | 3 | wrong answer.... :))))))))))) Please post it up here or email me privately drajmsadeq@yahoo.com Great joke :) wrong answer.... :))))))))))) | Compare your result with mine, pls ! P 1015 | Tran Nam Trung (trungduck@yahoo.com) | 1015. Test the Difference! | 2 Jul 2006 20:27 | 6 | if input is all 720 permutations then my solution output : 30 1 10 17 19 126 128 135 144 317 321 326 334 459 467 472 476 531 539 544 548 677 681 686 694 2 12 13 23 124 127 138 141 341 345 350 358 435 443 448 452 557 561 566 574 651 659 664 668 3 11 16 20 125 129 134 142 293 297 302 310 411 419 424 428 579 587 592 596 701 705 710 718 4 7 18 21 122 132 133 143 339 347 352 356 437 441 446 454 555 563 568 572 653 657 662 670 5 9 14 22 123 131 136 140 291 299 304 308 413 417 422 430 581 585 590 598 699 707 712 716 6 8 15 24 121 130 137 139 315 323 328 332 461 465 470 478 533 537 542 550 675 683 688 692 25 34 41 43 197 201 206 214 246 248 255 264 457 466 473 475 507 515 520 524 678 680 687 696 26 36 37 47 221 225 230 238 244 247 258 261 433 442 449 451 558 560 567 576 627 635 640 644 27 35 40 44 173 177 182 190 245 249 254 262 387 395 400 404 577 586 593 595 702 704 711 720 28 31 42 45 219 227 232 236 242 252 253 263 438 440 447 456 553 562 569 571 629 633 638 646 29 33 38 46 171 179 184 188 243 251 256 260 389 393 398 406 582 584 591 600 697 706 713 715 30 32 39 48 195 203 208 212 241 250 257 259 462 464 471 480 509 513 518 526 673 682 689 691 49 58 65 67 198 200 207 216 337 346 353 355 366 368 375 384 505 514 521 523 654 656 663 672 50 60 61 71 222 224 231 240 313 322 329 331 364 367 378 381 534 536 543 552 625 634 641 643 51 59 64 68 149 153 158 166 267 275 280 284 365 369 374 382 578 588 589 599 700 703 714 717 52 55 66 69 217 226 233 235 318 320 327 336 362 372 373 383 529 538 545 547 630 632 639 648 53 57 62 70 147 155 160 164 269 273 278 286 363 371 376 380 580 583 594 597 698 708 709 719 54 56 63 72 193 202 209 211 342 344 351 360 361 370 377 379 510 512 519 528 649 658 665 667 73 82 89 91 174 176 183 192 338 348 349 359 385 394 401 403 486 488 495 504 652 655 666 669 74 84 85 95 220 223 234 237 289 298 305 307 414 416 423 432 484 487 498 501 626 636 637 647 75 83 88 92 150 152 159 168 265 274 281 283 458 468 469 479 485 489 494 502 676 679 690 693 76 79 90 93 218 228 229 239 294 296 303 312 409 418 425 427 482 492 493 503 628 631 642 645 77 81 86 94 145 154 161 163 270 272 279 288 460 463 474 477 483 491 496 500 674 684 685 695 78 80 87 96 169 178 185 187 340 343 354 357 390 392 399 408 481 490 497 499 650 660 661 671 97 106 113 115 172 175 186 189 314 324 325 335 386 396 397 407 532 535 546 549 606 608 615 624 98 108 109 119 196 199 210 213 290 300 301 311 412 415 426 429 506 516 517 527 604 607 618 621 99 107 112 116 148 151 162 165 266 276 277 287 434 444 445 455 556 559 570 573 605 609 614 622 100 103 114 117 194 204 205 215 292 295 306 309 410 420 421 431 508 511 522 525 602 612 613 623 101 105 110 118 146 156 157 167 268 271 282 285 436 439 450 453 554 564 565 575 603 611 616 620 102 104 111 120 170 180 181 191 316 319 330 333 388 391 402 405 530 540 541 551 601 610 617 619 I think it is right but i get WA !!! 8-( Check for me, pls! Thank ! > if input is all 720 permutations then my solution output : > > 30 > 1 10 17 19 126 128 135 144 317 321 326 334 459 467 472 476 > 531 539 544 548 677 681 686 694 > 2 12 13 23 124 127 138 141 341 345 350 358 435 443 448 452 > 557 561 566 574 651 659 664 668 > 3 11 16 20 125 129 134 142 293 297 302 310 411 419 424 428 > 579 587 592 596 701 705 710 718 > 4 7 18 21 122 132 133 143 339 347 352 356 437 441 446 454 > 555 563 568 572 653 657 662 670 > 5 9 14 22 123 131 136 140 291 299 304 308 413 417 422 430 > 581 585 590 598 699 707 712 716 > 6 8 15 24 121 130 137 139 315 323 328 332 461 465 470 478 > 533 537 542 550 675 683 688 692 > 25 34 41 43 197 201 206 214 246 248 255 264 457 466 473 475 > 507 515 520 524 678 680 687 696 > 26 36 37 47 221 225 230 238 244 247 258 261 433 442 449 451 > 558 560 567 576 627 635 640 644 > 27 35 40 44 173 177 182 190 245 249 254 262 387 395 400 404 > 577 586 593 595 702 704 711 720 > 28 31 42 45 219 227 232 236 242 252 253 263 438 440 447 456 > 553 562 569 571 629 633 638 646 > 29 33 38 46 171 179 184 188 243 251 256 260 389 393 398 406 > 582 584 591 600 697 706 713 715 > 30 32 39 48 195 203 208 212 241 250 257 259 462 464 471 480 > 509 513 518 526 673 682 689 691 > 49 58 65 67 198 200 207 216 337 346 353 355 366 368 375 384 > 505 514 521 523 654 656 663 672 > 50 60 61 71 222 224 231 240 313 322 329 331 364 367 378 381 > 534 536 543 552 625 634 641 643 > 51 59 64 68 149 153 158 166 267 275 280 284 365 369 374 382 > 578 588 589 599 700 703 714 717 > 52 55 66 69 217 226 233 235 318 320 327 336 362 372 373 383 > 529 538 545 547 630 632 639 648 > 53 57 62 70 147 155 160 164 269 273 278 286 363 371 376 380 > 580 583 594 597 698 708 709 719 > 54 56 63 72 193 202 209 211 342 344 351 360 361 370 377 379 > 510 512 519 528 649 658 665 667 > 73 82 89 91 174 176 183 192 338 348 349 359 385 394 401 403 > 486 488 495 504 652 655 666 669 > 74 84 85 95 220 223 234 237 289 298 305 307 414 416 423 432 > 484 487 498 501 626 636 637 647 > 75 83 88 92 150 152 159 168 265 274 281 283 458 468 469 479 > 485 489 494 502 676 679 690 693 > 76 79 90 93 218 228 229 239 294 296 303 312 409 418 425 427 > 482 492 493 503 628 631 642 645 > 77 81 86 94 145 154 161 163 270 272 279 288 460 463 474 477 > 483 491 496 500 674 684 685 695 > 78 80 87 96 169 178 185 187 340 343 354 357 390 392 399 408 > 481 490 497 499 650 660 661 671 > 97 106 113 115 172 175 186 189 314 324 325 335 386 396 397 > 407 532 535 546 549 606 608 615 624 > 98 108 109 119 196 199 210 213 290 300 301 311 412 415 426 > 429 506 516 517 527 604 607 618 621 > 99 107 112 116 148 151 162 165 266 276 277 287 434 444 445 > 455 556 559 570 573 605 609 614 622 > 100 103 114 117 194 204 205 215 292 295 306 309 410 420 421 > 431 508 511 522 525 602 612 613 623 > 101 105 110 118 146 156 157 167 268 271 282 285 436 439 450 > 453 554 564 565 575 603 611 616 620 > 102 104 111 120 170 180 181 191 316 319 330 333 388 391 402 > 405 530 540 541 551 601 610 617 619 > > I think it is right but i get WA !!! 8-( > Check for me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 5 1 6 4 2 5 1 3 6 4 2 5 3 1 6 4 3 1 2 5 6 4 3 1 5 2 6 4 3 2 1 5 6 4 3 2 5 1 6 4 3 5 1 2 6 4 3 5 2 1 6 4 5 1 2 3 6 4 5 1 3 2 6 4 5 2 1 3 6 4 5 2 3 1 6 4 5 3 1 2 6 4 5 3 2 1 6 5 1 2 3 4 6 5 1 2 4 3 6 5 1 3 2 4 6 5 1 3 4 2 6 5 1 4 2 3 6 5 1 4 3 2 6 5 2 1 3 4 6 5 2 1 4 3 6 5 2 3 1 4 6 5 2 3 4 1 6 5 2 4 1 3 6 5 2 4 3 1 6 5 3 1 2 4 6 5 3 1 4 2 6 5 3 2 1 4 6 5 3 2 4 1 6 5 3 4 1 2 6 5 3 4 2 1 6 5 4 1 2 3 6 5 4 1 3 2 6 5 4 2 1 3 6 5 4 2 3 1 6 5 4 3 1 2 6 5 4 3 2 1 30 1 10 17 19 126 128 135 144 317 321 326 334 459 467 472 476 531 539 544 548 677 681 686 694 2 12 13 23 124 127 138 141 341 345 350 358 435 443 448 452 557 561 566 574 651 659 664 668 3 11 16 20 125 129 134 142 293 297 302 310 411 419 424 428 579 587 592 596 701 705 710 718 4 7 18 21 122 132 133 143 339 347 352 356 437 441 446 454 555 563 568 572 653 657 662 670 5 9 14 22 123 131 136 140 291 299 304 308 413 417 422 430 581 585 590 598 699 707 712 716 6 8 15 24 121 130 137 139 315 323 328 332 461 465 470 478 533 537 542 550 675 683 688 692 25 34 41 43 197 201 206 214 246 248 255 264 457 466 473 475 507 515 520 524 678 680 687 696 26 36 37 47 221 225 230 238 244 247 258 261 433 442 449 451 558 560 567 576 627 635 640 644 27 35 40 44 173 177 182 190 245 249 254 262 387 395 400 404 577 586 593 595 702 704 711 720 28 31 42 45 219 227 232 236 242 252 253 263 438 440 447 456 553 562 569 571 629 633 638 646 29 33 38 46 171 179 184 188 243 251 256 260 389 393 398 406 582 584 591 600 697 706 713 715 30 32 39 48 195 203 208 212 241 250 257 259 462 464 471 480 509 513 518 526 673 682 689 691 49 58 65 67 198 200 207 216 337 346 353 355 366 368 375 384 505 514 521 523 654 656 663 672 50 60 61 71 222 224 231 240 313 322 329 331 364 367 378 381 534 536 543 552 625 634 641 643 51 59 64 68 149 153 158 166 267 275 280 284 365 369 374 382 578 588 589 599 700 703 714 717 52 55 66 69 217 226 233 235 318 320 327 336 362 372 373 383 529 538 545 547 630 632 639 648 53 57 62 70 147 155 160 164 269 273 278 286 363 371 376 380 580 583 594 597 698 708 709 719 54 56 63 72 193 202 209 211 342 344 351 360 361 370 377 379 510 512 519 528 649 658 665 667 73 82 89 91 174 176 183 192 338 348 349 359 385 394 401 403 486 488 495 504 652 655 666 669 74 84 85 95 220 223 234 237 289 298 305 307 414 416 423 432 484 487 498 501 626 636 637 647 75 83 88 92 150 152 159 168 265 274 281 283 458 468 469 479 485 489 494 502 676 679 690 693 76 79 90 93 218 228 229 239 294 296 303 312 409 418 425 427 482 492 493 503 628 631 642 645 77 81 86 94 145 154 161 163 270 272 279 288 460 463 474 477 483 491 496 500 674 684 685 695 78 80 87 96 169 178 185 187 340 343 354 357 390 392 399 408 481 490 497 499 650 660 661 671 97 106 113 115 172 175 186 189 314 324 325 335 386 396 397 407 532 535 546 549 606 608 615 624 98 108 109 119 196 199 210 213 290 300 301 311 412 415 426 429 506 516 517 527 604 607 618 621 99 107 112 116 148 151 162 165 266 276 277 287 434 444 445 455 556 559 570 573 605 609 614 622 100 103 114 117 194 204 205 215 292 295 306 309 410 420 421 431 508 511 522 525 602 612 613 623 101 105 110 118 146 156 157 167 268 271 282 285 436 439 450 453 554 564 565 575 603 611 616 620 102 104 111 120 170 180 181 191 316 319 330 333 388 391 402 405 530 540 541 551 601 610 617 619 Good luck ! QH@ Thanks! It was very useful during debugging program! My program passes that test, but I have WA#4. Help me please! Edited by author 02.07.2006 20:43 | WA #4 | Anton [SUrSU#6] | 1015. Test the Difference! | 22 Jun 2006 15:40 | 1 | WA #4 Anton [SUrSU#6] 22 Jun 2006 15:40 I cann't find bug in my solution which passes all tests from this board. Please, help me! [code deleted] Edited by moderator 23.06.2006 17:16 |
|
|