Skip to content

Commit

Permalink
Merge pull request #1041 from shinchankosen/master
Browse files Browse the repository at this point in the history
sharp p subset sum correct.cpp 修正
  • Loading branch information
maspypy authored Oct 11, 2023
2 parents d33afd0 + 94d04cd commit 76083b3
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 25 deletions.
48 changes: 24 additions & 24 deletions math/sharp_p_subset_sum/hash.json
Original file line number Diff line number Diff line change
@@ -1,50 +1,50 @@
{
"big_00.in": "50451a5a39a567ae3571029cefec8feef3a420a31ccecc787be33a834af0dd25",
"big_00.out": "aeb99f3da77d2f90a2e9c4dce50da327137ac5694dbf879c816640202ab4302c",
"big_00.out": "90bd5c21ee1b56fc4730a1e08fb9af45bd64de39ede666e73d980f2fa2626e61",
"big_01.in": "56e6ed0be42d9aca6b418e27db3f52dde6e88d2a3d681043e351dbcf42ed5747",
"big_01.out": "9fa38d7ea43ea5bd88985ae22beac72598f5cb31f0a21167079ca3a46549e979",
"big_01.out": "a1a73db290699e3fe7ed85d070ac14d1e511d900376c0b33a859e4851e486399",
"big_02.in": "681a6216423ccc496cc5fb7a7a75cec65b1df10d0a861253bcaa9af879fb9fc1",
"big_02.out": "c731db725da4c105caec527d9ccd53571998349ff64fde414ea4cdf6096ab2a9",
"big_02.out": "56dd9ad18748637f11050fa848a8345d38c09f9b63c92aebe5c7b59d950a79b4",
"big_03.in": "48ac9f3d78df0c537243e178939e5f442ab66e5e8b2264e7faf24edd31b63770",
"big_03.out": "09e9c2a701582fff00d8abd2adb5b2c0f5cc696e9881fbf9512c40f58f2107a5",
"big_03.out": "a2115fa348d31e0edf8c123f94e5dd54f203135794c6d2688940ff43f5593a3f",
"big_04.in": "2063a2a75064a73ecdf5b47f66f149968e8cba3982b619981fd00044033375be",
"big_04.out": "b6c1ed03effd299f2542f9729e00fc0a0149d435bf9ea09e3cc11f8b14442c3c",
"big_04.out": "b254d3bb8b9f6fd1692532285aedbb1315050c145b24488e0d7be8760ff5bb81",
"example_00.in": "14bf382e3740b284fbf7a77b6cbad9d3a4efd66b5441ee4187dd988f434056b9",
"example_00.out": "c6e2f1999b205966195183c6bcf6b87e5e44635a4fe3d242082d1f39a2b2920e",
"example_00.out": "c786d5cd70c1e9231d3f4a778f731eb0fd36fe0ff50f61c69056b33f3cc2910a",
"many_sets_00.in": "064860d6604a4f2a711bfb2b833e935ada2ddbef57b28b715e7dd0b3883862e5",
"many_sets_00.out": "0aac8ec48cbed3353bd09f0e13702b06b11624ab12ce62a94be5cfc741a13c9b",
"many_sets_00.out": "1f71d6bd360db413eb9589632ca040e9bca02008ae1c43d1fee9494a7090b8a4",
"many_sets_01.in": "e226f7ebab303fcdced6b367597d51d8524e49ee5d3a743f983e5d24e8922fd7",
"many_sets_01.out": "86290edf9135aa0f242967f4bfbe5dde6c40753efb71b5cb92a19deb40559831",
"many_sets_01.out": "53ade0fef6520e7024a62dc5502bf6283acc24940fd160bb38a658b0da9496a2",
"many_sets_02.in": "de0ebb9f40554476d0d9eebc3e6fc50c5ada01365628f8d33a3f1b2ca65655b1",
"many_sets_02.out": "9fa9e282c28e99e19fdd369e9944d799d088a66f5df2b7112a6523895f7d760f",
"many_sets_02.out": "8b01fb7e082e9a77dfb7fd2b535b78afc4634036c4140ddc03a8103b85190de8",
"many_sets_03.in": "49385ccb94227b1b510c9b68e8340c59e2b52b0ad1942c0f37ceb2a435a617a2",
"many_sets_03.out": "fade287eb7bb6fc6afe7f74302d1c7cf65bf9b4737af6b54687f793730ced438",
"many_sets_03.out": "5f899a0487d7a889f940052a5394d41a18e31f544adf96052c32f1c290091e8a",
"many_sets_04.in": "9eacb929bb249c7eefffbb3d10271db3e41e33e70503cc21d3ada94bf670744e",
"many_sets_04.out": "4f0e5c5ef3d261ae8f6195f47c5a05c1ea11acdc22fc21e4e06326737a98bb53",
"many_sets_04.out": "36755d3b0d0191e164215f3c918457b77fc7b10a410f9779b66d8955591795db",
"random_00.in": "8c2308fe7b2adc5c07ef4276f7d37263bb01aaa81b6cca3b870c9ed5ed445a3e",
"random_00.out": "78e016396f6caccacea1be685a222ae97723629039dc651f59c25df1259f4f2b",
"random_00.out": "e3f518327a7197be4f8f5097485334637087eebea0e24a51a3becb3ff4c25e85",
"random_01.in": "affce54ec7f05cd7f0e58de1d431a7bae5890550212136643b5e3f774f8bfb8a",
"random_01.out": "4b62d283c4e6b7f84205ce18213af22e00fa29dfa700a91a2c4558287a7d33cd",
"random_01.out": "697f083782218bc8b7dbd92931f884b72d04094739a8c0c80c9e6c6a8bb5c345",
"random_02.in": "f565cc402290128ef7a79f2c3b10dfe3b67896765a7b18c2bf672bc8c60b2166",
"random_02.out": "9ac2e5118a21cdd7b9ce858954c9f3a64062949020b5107607fbcd25e0d3e1da",
"random_02.out": "e2610db4d553acf684b94a07f8b6fb1a8c7c4d7fb964b95e6a5f97de7af8bcb7",
"random_03.in": "b6a130fab7eff8da039d815ce9df03a15de54d03eb0dbfa9f7c50dc4c4c8cc53",
"random_03.out": "03625ef1bc03ea313201f93d6e653e50e86a9d6e86c68d1bfdd65c833ac60c0f",
"random_03.out": "052325e33e591fbcbd0957b1df04459b1140eec9fa0fc43dff9d64989ef04d2e",
"random_04.in": "2f354dc76a61715b6299006f1ba15758a63efe9dad11c5f04386a830d32b8083",
"random_04.out": "0d1f38f7653dad53e49e2a1e9eb1a6404036f2d9cba010e6fd78a70588b3e4a9",
"random_04.out": "d84f376350505fda4cea28a7cc14470c18a75effe03cdd0d0747a3f31d89a745",
"small_00.in": "48421ad16ad0aec745f376b378ed07c13631f32e6606dbec76e332fa1314d352",
"small_00.out": "72b70e86767da81f9f5ec6da96657c3c7fc0b3b81a289e8095cc7c175a5d9615",
"small_00.out": "e7b27e0c999bcb06fdcf3c32a5a0d9d844423003b8075bb9354397152a7a6754",
"small_01.in": "6342d55b126c4c4a570c08491f7794e541261442782dc22cca72dbdde733fa77",
"small_01.out": "47963d30c17199b451b755c015c7a12b7d7b2eb35b89fba121134727f1845c42",
"small_01.out": "1684f5bf6166679f13e6b292b1fd9108e1142707721ff9f8546ba2f4f338743f",
"small_02.in": "b9f86b86337c450cb48d3c5019cba9c92308915c8d48ef4dd011355abee97426",
"small_02.out": "60d29c7c1011434822399d882e09f62590452b3ddcf7e86328825e056139f694",
"small_02.out": "e2c430654aae28ab43f3b6f9ced10548b913f959d2908fb640ff84a011fde8e4",
"small_03.in": "14932b02f5bf32318f44fddb93c0c9e3f9d48dda7c65a10331f3665d01346455",
"small_03.out": "6e471abacbe0bc38ecf84ae94a7d0950d698b5061679b7a6cd6d7fdbf53d80d0",
"small_03.out": "3b4e795c2a6cb86923a7f456c92ea5a023a3d86d007b513dfc29ed37e28c1f86",
"small_04.in": "f0744b7e10d21be515fbbc1353dc6dd15a7a3c16eb7fcf7fba9094da5c51c5fd",
"small_04.out": "29cf24941cd2ac99095799d31b8ef6e026cc4df6345b3f5d3829daea9df2e798",
"small_04.out": "7f7340989ed15271dd1cc548b78d1f379e4f1e5229d24b1426554485d8492c1e",
"small_N_large_T_00.in": "4d74d2e31476556c78c7839eb929f6a5f20287c5f99aca0aa6d75940c3bca59a",
"small_N_large_T_00.out": "6815be512ceb5568f609eeae2fcefb79c5defcb77cce2d92bedeaa3736ddfb51",
"small_N_large_T_00.out": "8aba7f57111639b97055915af4458753b795a88973824014aaad88d8878a9378",
"small_N_large_T_01.in": "d8187ef720a6336a96c0f4da2a48c8abfe25ee88c045c38ba5ed93366ba0eb34",
"small_N_large_T_01.out": "2ff9af9e0f155c87e2eabbf1cb47065a63bdfd996a74491feba142cbb86bb4b0",
"small_N_large_T_01.out": "6c742016c4e0530becf5d9c068965a49963e23d1aca9a1ff0d82c0bfc7019ccb",
"small_N_large_T_02.in": "8c5fe1489ff55d15158a696418e5adc088b4d284922b92b0140bef989ab878cb",
"small_N_large_T_02.out": "62ad6a9ce70c31ecdfb27207dd506b521a60fe4ecbebf1605f0aae6f8dfaf721"
"small_N_large_T_02.out": "3e5507adce2796e4b106ae680e558ebee8d36b77934ed707cb5d827edaa721b1"
}
6 changes: 5 additions & 1 deletion math/sharp_p_subset_sum/sol/correct.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,10 @@ int main(){
Mint add=fact.inv(j)*cnt[k];
if(j&1)f[k*j]+=add; else f[k*j]-=add;
} f=f.exp();
for(int i=1;i<=t;i++)printf("%d ",f[i].val);
for(int i=1;i<=t;i++) {
printf("%d",f[i].val);
if(i<t)printf(" ");
}
printf("\n");
return 0;
}

0 comments on commit 76083b3

Please sign in to comment.