diff --git a/S2OJ/1982/1982.cpp b/S2OJ/1982/1982.cpp new file mode 100644 index 00000000..412615fc --- /dev/null +++ b/S2OJ/1982/1982.cpp @@ -0,0 +1,54 @@ +#include +#include +#include + +using std::cin; +using std::cout; +const char endl = '\n'; + +void solve() { + int n, m, q; + + cin >> n >> m >> q; + + std::vector> g(n + 1), h(m + 1); + + for (int i = 1, op, x, c; i <= q; i++) { + cin >> op >> x >> c; + + if (op == 0) { + g[x] = std::make_pair(c, i); + } else { // op == 1 + h[x] = std::make_pair(c, i); + } + } + + for (int i = 1; i <= n; i++) { + for (int j = 1; j <= m; j++) { + if (g[i].second > h[j].second) { + cout << g[i].first; + } else { + cout << h[j].first; + } + + if (j < m) { + cout << ' '; + } else { // j == m + cout << endl; + } + } + } +} + +int main() { + std::ios::sync_with_stdio(false); + cin.tie(0); + + int t; + + cin >> t; + + while (t--) solve(); + + return 0; +} diff --git a/S2OJ/1982/data/ex_paint1.ans b/S2OJ/1982/data/ex_paint1.ans new file mode 100644 index 00000000..3e9b67c7 --- /dev/null +++ b/S2OJ/1982/data/ex_paint1.ans @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fcedd293fdc046643b2380ce276509938ea2656d33a56de7c931d85cffdb98c0 +size 68 diff --git a/S2OJ/1982/data/ex_paint1.in b/S2OJ/1982/data/ex_paint1.in new file mode 100644 index 00000000..2014add2 --- /dev/null +++ b/S2OJ/1982/data/ex_paint1.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3707a85a8f7bcf93352fafef8620810d693d4c0ecb522e423b08d32624a60a4b +size 86 diff --git a/S2OJ/1982/data/ex_paint2.ans b/S2OJ/1982/data/ex_paint2.ans new file mode 100644 index 00000000..2645cb6a --- /dev/null +++ b/S2OJ/1982/data/ex_paint2.ans @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b8eb9152c3a41fe68500551d33ae4f8d9934de066a21b458838c7499684b1b8f +size 77649 diff --git a/S2OJ/1982/data/ex_paint2.in b/S2OJ/1982/data/ex_paint2.in new file mode 100644 index 00000000..6e325f93 --- /dev/null +++ b/S2OJ/1982/data/ex_paint2.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aa217ec1447bde757e11a35964e550af63ce80b60ff8f07ec1d69942e5021da1 +size 5908 diff --git a/S2OJ/1982/data/paint1.ans b/S2OJ/1982/data/paint1.ans new file mode 100644 index 00000000..68262aee --- /dev/null +++ b/S2OJ/1982/data/paint1.ans @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aeec6cd696078c273d36ddb33500d5af1aeac51b1b65a725363f3ae5728dd8c6 +size 10 diff --git a/S2OJ/1982/data/paint1.in b/S2OJ/1982/data/paint1.in new file mode 100644 index 00000000..61bc1e37 --- /dev/null +++ b/S2OJ/1982/data/paint1.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:10110421f444731a98024619e958db5bb95b52c84ea1c29a0d5b152a138b439e +size 32 diff --git a/S2OJ/1982/data/paint10.ans b/S2OJ/1982/data/paint10.ans new file mode 100644 index 00000000..c4ad059a --- /dev/null +++ b/S2OJ/1982/data/paint10.ans @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:da6c0287b4e2ac3da30e5ca94b6ea6a5d0900cd7392c304fcc5d0ce0fe76533e +size 4366300 diff --git a/S2OJ/1982/data/paint10.in b/S2OJ/1982/data/paint10.in new file mode 100644 index 00000000..f19b497a --- /dev/null +++ b/S2OJ/1982/data/paint10.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:294d0c39eb08ce7c5bb913a4380b12ef41b88ea8a0c0d5ce6570513c6d04b93d +size 122767 diff --git a/S2OJ/1982/data/paint11.ans b/S2OJ/1982/data/paint11.ans new file mode 100644 index 00000000..8277a216 --- /dev/null +++ b/S2OJ/1982/data/paint11.ans @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:95e79f777d65e895306a26ea16be009db76b7f4921d602d000f1c33657d2fb04 +size 4301986 diff --git a/S2OJ/1982/data/paint11.in b/S2OJ/1982/data/paint11.in new file mode 100644 index 00000000..f27e97b6 --- /dev/null +++ b/S2OJ/1982/data/paint11.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c1568f62e03dc298baa4b97439b6375d695fdb672f730c5da7cf68b1bd01289b +size 121996 diff --git a/S2OJ/1982/data/paint12.ans b/S2OJ/1982/data/paint12.ans new file mode 100644 index 00000000..4f341809 --- /dev/null +++ b/S2OJ/1982/data/paint12.ans @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d827b62c1e4f5a4b987a85304f31c652b16af42a7d0645c90e45da1c6c8b57f0 +size 4270971 diff --git a/S2OJ/1982/data/paint12.in b/S2OJ/1982/data/paint12.in new file mode 100644 index 00000000..3832b949 --- /dev/null +++ b/S2OJ/1982/data/paint12.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a2896f88cc5d12e8bc97b67f38d5eb2a69b7c1c6717ce9ede2fa136a1c9e71c6 +size 122072 diff --git a/S2OJ/1982/data/paint13.ans b/S2OJ/1982/data/paint13.ans new file mode 100644 index 00000000..a00ee0b5 --- /dev/null +++ b/S2OJ/1982/data/paint13.ans @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0fc45761d588c4e7b098bca10d5f1d5e78f2f76ffb61d5cc7aacbcc017f9b0c2 +size 3432649 diff --git a/S2OJ/1982/data/paint13.in b/S2OJ/1982/data/paint13.in new file mode 100644 index 00000000..adf55624 --- /dev/null +++ b/S2OJ/1982/data/paint13.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7660bcd435d361703eb0f1c1ed26ac7685ba86791bff88180d7b728a91d29c4a +size 5947055 diff --git a/S2OJ/1982/data/paint14.ans b/S2OJ/1982/data/paint14.ans new file mode 100644 index 00000000..5d9ecdde --- /dev/null +++ b/S2OJ/1982/data/paint14.ans @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2c28a01f6ae285d3a9fc177f8f0f91f55b26e1902f3bc2b1866733d501d112d8 +size 3439963 diff --git a/S2OJ/1982/data/paint14.in b/S2OJ/1982/data/paint14.in new file mode 100644 index 00000000..c37c31ee --- /dev/null +++ b/S2OJ/1982/data/paint14.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c5bd735fe08fe6dcf4334057655835d977db7a4c622e41a566d6569331703d35 +size 5948369 diff --git a/S2OJ/1982/data/paint15.ans b/S2OJ/1982/data/paint15.ans new file mode 100644 index 00000000..9a3f7ac2 --- /dev/null +++ b/S2OJ/1982/data/paint15.ans @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a8e3eb9de35b85ae4398466337ad07a83b0f148fccb01771abfd9d3c0616b4c3 +size 5926998 diff --git a/S2OJ/1982/data/paint15.in b/S2OJ/1982/data/paint15.in new file mode 100644 index 00000000..99303f46 --- /dev/null +++ b/S2OJ/1982/data/paint15.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:23be1a5167837348f9d61491f0e91f89d78febafdf8ce1e62983983f95966524 +size 152343 diff --git a/S2OJ/1982/data/paint16.ans b/S2OJ/1982/data/paint16.ans new file mode 100644 index 00000000..137e5fad --- /dev/null +++ b/S2OJ/1982/data/paint16.ans @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5f08e8a6bba4c3f9c4f04aaa8222797d4278265b6af74e7ce48f1538ec73f683 +size 5932600 diff --git a/S2OJ/1982/data/paint16.in b/S2OJ/1982/data/paint16.in new file mode 100644 index 00000000..50401254 --- /dev/null +++ b/S2OJ/1982/data/paint16.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0d269b9cfc0eaed3b3712882b15798ef593721fb36a14ae1b00fe0fe82cd98da +size 152433 diff --git a/S2OJ/1982/data/paint17.ans b/S2OJ/1982/data/paint17.ans new file mode 100644 index 00000000..031cf1f7 --- /dev/null +++ b/S2OJ/1982/data/paint17.ans @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9194ca75400bb4b92822051434007d7e0b185098e97a052780c7cf75c4889775 +size 6936710 diff --git a/S2OJ/1982/data/paint17.in b/S2OJ/1982/data/paint17.in new file mode 100644 index 00000000..8f190602 --- /dev/null +++ b/S2OJ/1982/data/paint17.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3c310ded64a70dc24ee4247c3d2a4a41564e5654f8b4ad3b8c0f92013984f886 +size 151707 diff --git a/S2OJ/1982/data/paint18.ans b/S2OJ/1982/data/paint18.ans new file mode 100644 index 00000000..c12a3003 --- /dev/null +++ b/S2OJ/1982/data/paint18.ans @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dda63a6e24bd45bd8c0a4864fd606ac4f0757c1d0651227ab082c5deaa50bcc2 +size 6922495 diff --git a/S2OJ/1982/data/paint18.in b/S2OJ/1982/data/paint18.in new file mode 100644 index 00000000..0febbd62 --- /dev/null +++ b/S2OJ/1982/data/paint18.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6ba6433c98920d9dba3efd4f2bbcc16501ce0071f9efa59680ccddbf85997975 +size 151753 diff --git a/S2OJ/1982/data/paint19.ans b/S2OJ/1982/data/paint19.ans new file mode 100644 index 00000000..bcb77911 --- /dev/null +++ b/S2OJ/1982/data/paint19.ans @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:23809cbe00be8a3bbe6e8368537d80efb0409656bd909fb87cb46acca54b48bb +size 6924254 diff --git a/S2OJ/1982/data/paint19.in b/S2OJ/1982/data/paint19.in new file mode 100644 index 00000000..febab4f8 --- /dev/null +++ b/S2OJ/1982/data/paint19.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a2af7053a015fed5ea3b10345499a48ac1ef64b16a5997ef7d37b810926947f9 +size 5227127 diff --git a/S2OJ/1982/data/paint2.ans b/S2OJ/1982/data/paint2.ans new file mode 100644 index 00000000..dd162e5a --- /dev/null +++ b/S2OJ/1982/data/paint2.ans @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0f201b128598327047fffa0e3ace2949c23e1c51fdcd1656a1feabdd74b321dc +size 35 diff --git a/S2OJ/1982/data/paint2.in b/S2OJ/1982/data/paint2.in new file mode 100644 index 00000000..39685e03 --- /dev/null +++ b/S2OJ/1982/data/paint2.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b756400497868e561589938e8194055e8ade72f26e215db9abea14b3433d88b8 +size 87 diff --git a/S2OJ/1982/data/paint20.ans b/S2OJ/1982/data/paint20.ans new file mode 100644 index 00000000..107f351e --- /dev/null +++ b/S2OJ/1982/data/paint20.ans @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3a0696af7a28518f4d419329b61aa32e96fd00bac04df01db8ec41eb90bb0532 +size 6933077 diff --git a/S2OJ/1982/data/paint20.in b/S2OJ/1982/data/paint20.in new file mode 100644 index 00000000..de60e893 --- /dev/null +++ b/S2OJ/1982/data/paint20.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c1322fafd0b2b9d4139fa822b14ca4b5658a26ffbd05dc38d4aaae25b5238446 +size 5225736 diff --git a/S2OJ/1982/data/paint3.ans b/S2OJ/1982/data/paint3.ans new file mode 100644 index 00000000..90283a2f --- /dev/null +++ b/S2OJ/1982/data/paint3.ans @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:438726bf246b629a11ad665448d479174e44ec15052e2913271cb1f2dd5d2aab +size 326 diff --git a/S2OJ/1982/data/paint3.in b/S2OJ/1982/data/paint3.in new file mode 100644 index 00000000..95bb3431 --- /dev/null +++ b/S2OJ/1982/data/paint3.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:464fea3747e6a09705cf6ac206e19113c1c24e5b159c39103631a2381c07ef19 +size 1145 diff --git a/S2OJ/1982/data/paint4.ans b/S2OJ/1982/data/paint4.ans new file mode 100644 index 00000000..4120d92a --- /dev/null +++ b/S2OJ/1982/data/paint4.ans @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5fab995b58e9676e62b4ed164eca7affc478c3af82b7d53d797ec3243eae7204 +size 2543758 diff --git a/S2OJ/1982/data/paint4.in b/S2OJ/1982/data/paint4.in new file mode 100644 index 00000000..50a6f77e --- /dev/null +++ b/S2OJ/1982/data/paint4.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:44a056a7920052c780bd3d185dbd1a85ea0da1ce6b4ac82fa735d962460a2f52 +size 7388197 diff --git a/S2OJ/1982/data/paint5.ans b/S2OJ/1982/data/paint5.ans new file mode 100644 index 00000000..0d61b1cd --- /dev/null +++ b/S2OJ/1982/data/paint5.ans @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:18278b86402f663d09f1809e248ba302ebe083e762d7f6d15e98c37ed40cefc8 +size 2545814 diff --git a/S2OJ/1982/data/paint5.in b/S2OJ/1982/data/paint5.in new file mode 100644 index 00000000..52a5d1bd --- /dev/null +++ b/S2OJ/1982/data/paint5.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:de5b775bb516fd67ea886691f6251ec3bce37c37dc0c22042628b2fff0ebbca8 +size 7387988 diff --git a/S2OJ/1982/data/paint6.ans b/S2OJ/1982/data/paint6.ans new file mode 100644 index 00000000..c4cd60f3 --- /dev/null +++ b/S2OJ/1982/data/paint6.ans @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ec674f8256c4378e353bee6e99c748fa5db4cdeeb6dfa36ed36a433ff788438e +size 3421613 diff --git a/S2OJ/1982/data/paint6.in b/S2OJ/1982/data/paint6.in new file mode 100644 index 00000000..da3e8d48 --- /dev/null +++ b/S2OJ/1982/data/paint6.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4fa52f7bcd192ecd609e0a05a03049087a647c24a475f1c9c5ae4f4c52cee21c +size 7064993 diff --git a/S2OJ/1982/data/paint7.ans b/S2OJ/1982/data/paint7.ans new file mode 100644 index 00000000..a4b640b8 --- /dev/null +++ b/S2OJ/1982/data/paint7.ans @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8685e4c9ebce96679c82af8dc7fa9d5feb8e6b7f1829b6a18725d35664dafeea +size 3060 diff --git a/S2OJ/1982/data/paint7.in b/S2OJ/1982/data/paint7.in new file mode 100644 index 00000000..5b82a662 --- /dev/null +++ b/S2OJ/1982/data/paint7.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e6d71a8fbc3eaa66449b29f52aa1d4a87374649405df1c31d4caa7860cacd7fb +size 1145 diff --git a/S2OJ/1982/data/paint8.ans b/S2OJ/1982/data/paint8.ans new file mode 100644 index 00000000..2eba1a7d --- /dev/null +++ b/S2OJ/1982/data/paint8.ans @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f94b3e54172d07a4005887ba211962037634c66e35d23347cc8567e5c88bbef8 +size 76750 diff --git a/S2OJ/1982/data/paint8.in b/S2OJ/1982/data/paint8.in new file mode 100644 index 00000000..4f371c2f --- /dev/null +++ b/S2OJ/1982/data/paint8.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:da51840c07e55d94c062bf48467b000e68a1e1bf2bc07ef8de66a35ebca35271 +size 5891 diff --git a/S2OJ/1982/data/paint9.ans b/S2OJ/1982/data/paint9.ans new file mode 100644 index 00000000..1bbf4273 --- /dev/null +++ b/S2OJ/1982/data/paint9.ans @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a4de35dde74818090e0bbdc2635b467cc6ffc0ecf8487001edf14bf1c8216605 +size 77998 diff --git a/S2OJ/1982/data/paint9.in b/S2OJ/1982/data/paint9.in new file mode 100644 index 00000000..5b1a5787 --- /dev/null +++ b/S2OJ/1982/data/paint9.in @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:76f9ad050a92162f2ea7760ccd10e3384433a1abc917b32571c6f0f65ad2096e +size 5901 diff --git a/S2OJ/1982/data/problem.conf b/S2OJ/1982/data/problem.conf new file mode 100644 index 00000000..f8786277 --- /dev/null +++ b/S2OJ/1982/data/problem.conf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:31a272a631106d88eaca0fb656b7c72b0fbae6367fea3ee7702128a3da622232 +size 213