From d6789577b0ced902f62724f733829d27548e5a5a Mon Sep 17 00:00:00 2001 From: zhangzc Date: Fri, 10 Dec 2021 17:02:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96it=E5=86=B7=E7=9F=A5=E8=AF=86?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cpp_code_json/0.json | 0 .../cpp_code_json/1.json | 0 .../cpp_code_json/10.json | 0 .../cpp_code_json/100.json | 0 .../cpp_code_json/101.json | 0 .../cpp_code_json/102.json | 0 .../cpp_code_json/103.json | 0 .../cpp_code_json/104.json | 0 .../cpp_code_json/105.json | 0 .../cpp_code_json/106.json | 0 .../cpp_code_json/107.json | 0 .../cpp_code_json/108.json | 0 .../cpp_code_json/109.json | 0 .../cpp_code_json/11.json | 0 .../cpp_code_json/110.json | 0 .../cpp_code_json/111.json | 0 .../cpp_code_json/112.json | 0 .../cpp_code_json/113.json | 0 .../cpp_code_json/114.json | 0 .../cpp_code_json/115.json | 0 .../cpp_code_json/116.json | 0 .../cpp_code_json/117.json | 0 .../cpp_code_json/118.json | 0 .../cpp_code_json/119.json | 0 .../cpp_code_json/12.json | 0 .../cpp_code_json/120.json | 0 .../cpp_code_json/121.json | 0 .../cpp_code_json/122.json | 0 .../cpp_code_json/123.json | 0 .../cpp_code_json/124.json | 0 .../cpp_code_json/125.json | 0 .../cpp_code_json/126.json | 0 .../cpp_code_json/127.json | 0 .../cpp_code_json/128.json | 0 .../cpp_code_json/129.json | 0 .../cpp_code_json/13.json | 0 .../cpp_code_json/130.json | 0 .../cpp_code_json/131.json | 0 .../cpp_code_json/132.json | 0 .../cpp_code_json/133.json | 0 .../cpp_code_json/134.json | 0 .../cpp_code_json/135.json | 0 .../cpp_code_json/136.json | 0 .../cpp_code_json/137.json | 0 .../cpp_code_json/138.json | 0 .../cpp_code_json/139.json | 0 .../cpp_code_json/14.json | 0 .../cpp_code_json/140.json | 0 .../cpp_code_json/141.json | 0 .../cpp_code_json/142.json | 0 .../cpp_code_json/143.json | 0 .../cpp_code_json/144.json | 0 .../cpp_code_json/15.json | 0 .../cpp_code_json/16.json | 0 .../cpp_code_json/17.json | 0 .../cpp_code_json/18.json | 0 .../cpp_code_json/19.json | 0 .../cpp_code_json/2.json | 0 .../cpp_code_json/20.json | 0 .../cpp_code_json/21.json | 0 .../cpp_code_json/22.json | 0 .../cpp_code_json/23.json | 0 .../cpp_code_json/24.json | 0 .../cpp_code_json/25.json | 0 .../cpp_code_json/26.json | 0 .../cpp_code_json/27.json | 0 .../cpp_code_json/28.json | 0 .../cpp_code_json/29.json | 0 .../cpp_code_json/3.json | 0 .../cpp_code_json/30.json | 0 .../cpp_code_json/31.json | 0 .../cpp_code_json/32.json | 0 .../cpp_code_json/33.json | 0 .../cpp_code_json/34.json | 0 .../cpp_code_json/35.json | 0 .../cpp_code_json/36.json | 0 .../cpp_code_json/37.json | 0 .../cpp_code_json/38.json | 0 .../cpp_code_json/39.json | 0 .../cpp_code_json/4.json | 0 .../cpp_code_json/40.json | 0 .../cpp_code_json/41.json | 0 .../cpp_code_json/42.json | 0 .../cpp_code_json/43.json | 0 .../cpp_code_json/44.json | 0 .../cpp_code_json/45.json | 0 .../cpp_code_json/46.json | 0 .../cpp_code_json/47.json | 0 .../cpp_code_json/48.json | 0 .../cpp_code_json/49.json | 0 .../cpp_code_json/5.json | 0 .../cpp_code_json/50.json | 0 .../cpp_code_json/51.json | 0 .../cpp_code_json/52.json | 0 .../cpp_code_json/53.json | 0 .../cpp_code_json/54.json | 0 .../cpp_code_json/55.json | 0 .../cpp_code_json/56.json | 0 .../cpp_code_json/57.json | 0 .../cpp_code_json/58.json | 0 .../cpp_code_json/59.json | 0 .../cpp_code_json/6.json | 0 .../cpp_code_json/60.json | 0 .../cpp_code_json/61.json | 0 .../cpp_code_json/62.json | 0 .../cpp_code_json/63.json | 0 .../cpp_code_json/64.json | 0 .../cpp_code_json/65.json | 0 .../cpp_code_json/66.json | 0 .../cpp_code_json/67.json | 0 .../cpp_code_json/68.json | 0 .../cpp_code_json/69.json | 0 .../cpp_code_json/7.json | 0 .../cpp_code_json/70.json | 0 .../cpp_code_json/71.json | 0 .../cpp_code_json/72.json | 0 .../cpp_code_json/73.json | 0 .../cpp_code_json/74.json | 0 .../cpp_code_json/75.json | 0 .../cpp_code_json/76.json | 0 .../cpp_code_json/77.json | 0 .../cpp_code_json/78.json | 0 .../cpp_code_json/79.json | 0 .../cpp_code_json/8.json | 0 .../cpp_code_json/80.json | 0 .../cpp_code_json/81.json | 0 .../cpp_code_json/82.json | 0 .../cpp_code_json/83.json | 0 .../cpp_code_json/84.json | 0 .../cpp_code_json/85.json | 0 .../cpp_code_json/86.json | 0 .../cpp_code_json/87.json | 0 .../cpp_code_json/88.json | 0 .../cpp_code_json/89.json | 0 .../cpp_code_json/9.json | 0 .../cpp_code_json/90.json | 0 .../cpp_code_json/91.json | 0 .../cpp_code_json/92.json | 0 .../cpp_code_json/93.json | 0 .../cpp_code_json/94.json | 0 .../cpp_code_json/95.json | 0 .../cpp_code_json/96.json | 0 .../cpp_code_json/97.json | 0 .../cpp_code_json/98.json | 0 .../cpp_code_json/99.json | 0 .../1.cpp/1.exercises/config.json" | 22 + .../1.cpp/1.exercises/solution.json" | 48 + .../1.cpp/10.exercises/config.json" | 22 + .../1.cpp/10.exercises/solution.json" | 48 + .../1.cpp/11.exercises/config.json" | 22 + .../1.cpp/11.exercises/solution.json" | 48 + .../1.cpp/12.exercises/config.json" | 22 + .../1.cpp/12.exercises/solution.json" | 48 + .../1.cpp/13.exercises/config.json" | 22 + .../1.cpp/13.exercises/solution.json" | 48 + .../1.cpp/14.exercises/config.json" | 22 + .../1.cpp/14.exercises/solution.json" | 48 + .../1.cpp/15.exercises/config.json" | 22 + .../1.cpp/15.exercises/solution.json" | 48 + .../1.cpp/16.exercises/config.json" | 22 + .../1.cpp/16.exercises/solution.json" | 48 + .../1.cpp/17.exercises/config.json" | 22 + .../1.cpp/17.exercises/solution.json" | 48 + .../1.cpp/18.exercises/config.json" | 22 + .../1.cpp/18.exercises/solution.json" | 48 + .../1.cpp/19.exercises/config.json" | 22 + .../1.cpp/19.exercises/solution.json" | 48 + .../1.cpp/2.exercises/config.json" | 22 + .../1.cpp/2.exercises/solution.json" | 48 + .../1.cpp/20.exercises/config.json" | 22 + .../1.cpp/20.exercises/solution.json" | 48 + .../1.cpp/21.exercises/config.json" | 22 + .../1.cpp/21.exercises/solution.json" | 48 + .../1.cpp/22.exercises/config.json" | 22 + .../1.cpp/22.exercises/solution.json" | 48 + .../1.cpp/23.exercises/config.json" | 22 + .../1.cpp/23.exercises/solution.json" | 48 + .../1.cpp/24.exercises/config.json" | 22 + .../1.cpp/24.exercises/solution.json" | 48 + .../1.cpp/25.exercises/config.json" | 22 + .../1.cpp/25.exercises/solution.json" | 48 + .../1.cpp/26.exercises/config.json" | 22 + .../1.cpp/26.exercises/solution.json" | 48 + .../1.cpp/27.exercises/config.json" | 22 + .../1.cpp/27.exercises/solution.json" | 48 + .../1.cpp/28.exercises/config.json" | 22 + .../1.cpp/28.exercises/solution.json" | 48 + .../1.cpp/29.exercises/config.json" | 22 + .../1.cpp/29.exercises/solution.json" | 48 + .../1.cpp/3.exercises/config.json" | 22 + .../1.cpp/3.exercises/solution.json" | 48 + .../1.cpp/30.exercises/config.json" | 22 + .../1.cpp/30.exercises/solution.json" | 48 + .../1.cpp/31.exercises/config.json" | 22 + .../1.cpp/31.exercises/solution.json" | 48 + .../1.cpp/32.exercises/config.json" | 22 + .../1.cpp/32.exercises/solution.json" | 48 + .../1.cpp/33.exercises/config.json" | 22 + .../1.cpp/33.exercises/solution.json" | 48 + .../1.cpp/34.exercises/config.json" | 22 + .../1.cpp/34.exercises/solution.json" | 48 + .../1.cpp/35.exercises/config.json" | 22 + .../1.cpp/35.exercises/solution.json" | 48 + .../1.cpp/36.exercises/config.json" | 22 + .../1.cpp/36.exercises/solution.json" | 48 + .../1.cpp/37.exercises/config.json" | 22 + .../1.cpp/37.exercises/solution.json" | 48 + .../1.cpp/38.exercises/config.json" | 22 + .../1.cpp/38.exercises/solution.json" | 48 + .../1.cpp/39.exercises/config.json" | 22 + .../1.cpp/39.exercises/solution.json" | 48 + .../1.cpp/4.exercises/config.json" | 22 + .../1.cpp/4.exercises/solution.json" | 48 + .../1.cpp/40.exercises/config.json" | 22 + .../1.cpp/40.exercises/solution.json" | 48 + .../1.cpp/41.exercises/config.json" | 22 + .../1.cpp/41.exercises/solution.json" | 48 + .../1.cpp/42.exercises/config.json" | 22 + .../1.cpp/42.exercises/solution.json" | 48 + .../1.cpp/43.exercises/config.json" | 22 + .../1.cpp/43.exercises/solution.json" | 48 + .../1.cpp/44.exercises/config.json" | 22 + .../1.cpp/44.exercises/solution.json" | 48 + .../1.cpp/45.exercises/config.json" | 22 + .../1.cpp/45.exercises/solution.json" | 48 + .../1.cpp/46.exercises/config.json" | 22 + .../1.cpp/46.exercises/solution.json" | 48 + .../1.cpp/47.exercises/config.json" | 22 + .../1.cpp/47.exercises/solution.json" | 48 + .../1.cpp/48.exercises/config.json" | 22 + .../1.cpp/48.exercises/solution.json" | 48 + .../1.cpp/49.exercises/config.json" | 22 + .../1.cpp/49.exercises/solution.json" | 48 + .../1.cpp/5.exercises/config.json" | 22 + .../1.cpp/5.exercises/solution.json" | 48 + .../1.cpp/50.exercises/config.json" | 22 + .../1.cpp/50.exercises/solution.json" | 48 + .../1.cpp/51.exercises/config.json" | 22 + .../1.cpp/51.exercises/solution.json" | 48 + .../1.cpp/52.exercises/config.json" | 22 + .../1.cpp/52.exercises/solution.json" | 48 + .../1.cpp/53.exercises/config.json" | 22 + .../1.cpp/53.exercises/solution.json" | 48 + .../1.cpp/54.exercises/config.json" | 22 + .../1.cpp/54.exercises/solution.json" | 48 + .../1.cpp/55.exercises/config.json" | 22 + .../1.cpp/55.exercises/solution.json" | 48 + .../1.cpp/56.exercises/config.json" | 22 + .../1.cpp/56.exercises/solution.json" | 48 + .../1.cpp/57.exercises/config.json" | 22 + .../1.cpp/57.exercises/solution.json" | 48 + .../1.cpp/58.exercises/config.json" | 22 + .../1.cpp/58.exercises/solution.json" | 48 + .../1.cpp/59.exercises/config.json" | 22 + .../1.cpp/59.exercises/solution.json" | 48 + .../1.cpp/6.exercises/config.json" | 22 + .../1.cpp/6.exercises/solution.json" | 48 + .../1.cpp/60.exercises/config.json" | 22 + .../1.cpp/60.exercises/solution.json" | 48 + .../1.cpp/61.exercises/config.json" | 22 + .../1.cpp/61.exercises/solution.json" | 48 + .../1.cpp/62.exercises/config.json" | 22 + .../1.cpp/62.exercises/solution.json" | 48 + .../1.cpp/63.exercises/config.json" | 22 + .../1.cpp/63.exercises/solution.json" | 48 + .../1.cpp/64.exercises/config.json" | 22 + .../1.cpp/64.exercises/solution.json" | 48 + .../1.cpp/65.exercises/config.json" | 22 + .../1.cpp/65.exercises/solution.json" | 48 + .../1.cpp/66.exercises/config.json" | 22 + .../1.cpp/66.exercises/solution.json" | 48 + .../1.cpp/67.exercises/config.json" | 22 + .../1.cpp/67.exercises/solution.json" | 48 + .../1.cpp/68.exercises/config.json" | 22 + .../1.cpp/68.exercises/solution.json" | 48 + .../1.cpp/69.exercises/config.json" | 22 + .../1.cpp/69.exercises/solution.json" | 48 + .../1.cpp/7.exercises/config.json" | 22 + .../1.cpp/7.exercises/solution.json" | 48 + .../1.cpp/70.exercises/config.json" | 22 + .../1.cpp/70.exercises/solution.json" | 48 + .../1.cpp/71.exercises/config.json" | 22 + .../1.cpp/71.exercises/solution.json" | 48 + .../1.cpp/72.exercises/config.json" | 22 + .../1.cpp/72.exercises/solution.json" | 48 + .../1.cpp/73.exercises/config.json" | 22 + .../1.cpp/73.exercises/solution.json" | 48 + .../1.cpp/74.exercises/config.json" | 22 + .../1.cpp/74.exercises/solution.json" | 48 + .../1.cpp/75.exercises/config.json" | 22 + .../1.cpp/75.exercises/solution.json" | 48 + .../1.cpp/76.exercises/config.json" | 22 + .../1.cpp/76.exercises/solution.json" | 48 + .../1.cpp/77.exercises/config.json" | 22 + .../1.cpp/77.exercises/solution.json" | 48 + .../1.cpp/78.exercises/config.json" | 22 + .../1.cpp/78.exercises/solution.json" | 48 + .../1.cpp/79.exercises/config.json" | 22 + .../1.cpp/79.exercises/solution.json" | 48 + .../1.cpp/8.exercises/config.json" | 22 + .../1.cpp/8.exercises/solution.json" | 48 + .../1.cpp/80.exercises/config.json" | 22 + .../1.cpp/80.exercises/solution.json" | 48 + .../1.cpp/81.exercises/config.json" | 22 + .../1.cpp/81.exercises/solution.json" | 48 + .../1.cpp/82.exercises/config.json" | 22 + .../1.cpp/82.exercises/solution.json" | 48 + .../1.cpp/83.exercises/config.json" | 22 + .../1.cpp/83.exercises/solution.json" | 48 + .../1.cpp/84.exercises/config.json" | 22 + .../1.cpp/84.exercises/solution.json" | 116 + .../1.cpp/85.exercises/config.json" | 22 + .../1.cpp/85.exercises/solution.json" | 48 + .../1.cpp/86.exercises/config.json" | 22 + .../1.cpp/86.exercises/solution.json" | 48 + .../1.cpp/87.exercises/config.json" | 22 + .../1.cpp/87.exercises/solution.json" | 48 + .../1.cpp/88.exercises/config.json" | 22 + .../1.cpp/88.exercises/solution.json" | 124 + .../1.cpp/89.exercises/config.json" | 22 + .../1.cpp/89.exercises/solution.json" | 48 + .../1.cpp/9.exercises/config.json" | 22 + .../1.cpp/9.exercises/solution.json" | 48 + .../1.cpp/90.exercises/config.json" | 22 + .../1.cpp/90.exercises/solution.json" | 112 + .../1.cpp/91.exercises/config.json" | 22 + .../1.cpp/91.exercises/solution.json" | 48 + .../1.cpp/92.exercises/config.json" | 22 + .../1.cpp/92.exercises/solution.json" | 48 + .../1.cpp/93.exercises/config.json" | 22 + .../1.cpp/93.exercises/solution.json" | 48 + .../1.cpp/94.exercises/config.json" | 22 + .../1.cpp/94.exercises/solution.json" | 48 + .../1.cpp/95.exercises/config.json" | 22 + .../1.cpp/95.exercises/solution.json" | 48 + .../1.cpp/96.exercises/config.json" | 22 + .../1.cpp/96.exercises/solution.json" | 48 + .../1.cpp/97.exercises/config.json" | 22 + .../1.cpp/97.exercises/solution.json" | 48 + .../2.java/1.exercises/config.json" | 22 + .../2.java/1.exercises/solution.json" | 48 + .../2.java/10.exercises/config.json" | 22 + .../2.java/10.exercises/solution.json" | 48 + .../2.java/11.exercises/config.json" | 22 + .../2.java/11.exercises/solution.json" | 48 + .../2.java/12.exercises/config.json" | 22 + .../2.java/12.exercises/solution.json" | 48 + .../2.java/13.exercises/config.json" | 22 + .../2.java/13.exercises/solution.json" | 48 + .../2.java/14.exercises/config.json" | 22 + .../2.java/14.exercises/solution.json" | 48 + .../2.java/15.exercises/config.json" | 22 + .../2.java/15.exercises/solution.json" | 48 + .../2.java/16.exercises/config.json" | 22 + .../2.java/16.exercises/solution.json" | 48 + .../2.java/17.exercises/config.json" | 22 + .../2.java/17.exercises/solution.json" | 48 + .../2.java/18.exercises/config.json" | 22 + .../2.java/18.exercises/solution.json" | 48 + .../2.java/19.exercises/config.json" | 22 + .../2.java/19.exercises/solution.json" | 48 + .../2.java/2.exercises/config.json" | 22 + .../2.java/2.exercises/solution.json" | 48 + .../2.java/20.exercises/config.json" | 22 + .../2.java/20.exercises/solution.json" | 48 + .../2.java/21.exercises/config.json" | 22 + .../2.java/21.exercises/solution.json" | 48 + .../2.java/22.exercises/config.json" | 22 + .../2.java/22.exercises/solution.json" | 48 + .../2.java/23.exercises/config.json" | 22 + .../2.java/23.exercises/solution.json" | 48 + .../2.java/24.exercises/config.json" | 22 + .../2.java/24.exercises/solution.json" | 48 + .../2.java/25.exercises/config.json" | 22 + .../2.java/25.exercises/solution.json" | 48 + .../2.java/26.exercises/config.json" | 22 + .../2.java/26.exercises/solution.json" | 48 + .../2.java/27.exercises/config.json" | 22 + .../2.java/27.exercises/solution.json" | 48 + .../2.java/28.exercises/config.json" | 22 + .../2.java/28.exercises/solution.json" | 48 + .../2.java/29.exercises/config.json" | 22 + .../2.java/29.exercises/solution.json" | 48 + .../2.java/3.exercises/config.json" | 22 + .../2.java/3.exercises/solution.json" | 48 + .../2.java/30.exercises/config.json" | 22 + .../2.java/30.exercises/solution.json" | 48 + .../2.java/31.exercises/config.json" | 22 + .../2.java/31.exercises/solution.json" | 48 + .../2.java/32.exercises/config.json" | 22 + .../2.java/32.exercises/solution.json" | 48 + .../2.java/33.exercises/config.json" | 22 + .../2.java/33.exercises/solution.json" | 48 + .../2.java/34.exercises/config.json" | 22 + .../2.java/34.exercises/solution.json" | 48 + .../2.java/35.exercises/config.json" | 22 + .../2.java/35.exercises/solution.json" | 116 + .../2.java/36.exercises/config.json" | 22 + .../2.java/36.exercises/solution.json" | 48 + .../2.java/37.exercises/config.json" | 22 + .../2.java/37.exercises/solution.json" | 48 + .../2.java/38.exercises/config.json" | 22 + .../2.java/38.exercises/solution.json" | 48 + .../2.java/39.exercises/config.json" | 22 + .../2.java/39.exercises/solution.json" | 124 + .../2.java/4.exercises/config.json" | 22 + .../2.java/4.exercises/solution.json" | 48 + .../2.java/40.exercises/config.json" | 22 + .../2.java/40.exercises/solution.json" | 48 + .../2.java/41.exercises/config.json" | 22 + .../2.java/41.exercises/solution.json" | 112 + .../2.java/42.exercises/config.json" | 22 + .../2.java/42.exercises/solution.json" | 48 + .../2.java/43.exercises/config.json" | 22 + .../2.java/43.exercises/solution.json" | 48 + .../2.java/44.exercises/config.json" | 22 + .../2.java/44.exercises/solution.json" | 48 + .../2.java/45.exercises/config.json" | 22 + .../2.java/45.exercises/solution.json" | 48 + .../2.java/46.exercises/config.json" | 22 + .../2.java/46.exercises/solution.json" | 48 + .../2.java/47.exercises/config.json" | 22 + .../2.java/47.exercises/solution.json" | 48 + .../2.java/48.exercises/config.json" | 22 + .../2.java/48.exercises/solution.json" | 48 + .../2.java/5.exercises/config.json" | 22 + .../2.java/5.exercises/solution.json" | 48 + .../2.java/6.exercises/config.json" | 22 + .../2.java/6.exercises/solution.json" | 48 + .../2.java/7.exercises/config.json" | 22 + .../2.java/7.exercises/solution.json" | 48 + .../2.java/8.exercises/config.json" | 22 + .../2.java/8.exercises/solution.json" | 48 + .../2.java/9.exercises/config.json" | 22 + .../2.java/9.exercises/solution.json" | 48 + .../3.python/1.exercises/config.json" | 22 + .../3.python/1.exercises/solution.json" | 48 + .../3.python/10.exercises/config.json" | 22 + .../3.python/10.exercises/solution.json" | 48 + .../3.python/11.exercises/config.json" | 22 + .../3.python/11.exercises/solution.json" | 48 + .../3.python/12.exercises/config.json" | 22 + .../3.python/12.exercises/solution.json" | 48 + .../3.python/13.exercises/config.json" | 22 + .../3.python/13.exercises/solution.json" | 48 + .../3.python/14.exercises/config.json" | 22 + .../3.python/14.exercises/solution.json" | 48 + .../3.python/15.exercises/config.json" | 22 + .../3.python/15.exercises/solution.json" | 48 + .../3.python/16.exercises/config.json" | 22 + .../3.python/16.exercises/solution.json" | 48 + .../3.python/17.exercises/config.json" | 22 + .../3.python/17.exercises/solution.json" | 48 + .../3.python/18.exercises/config.json" | 22 + .../3.python/18.exercises/solution.json" | 48 + .../3.python/19.exercises/config.json" | 22 + .../3.python/19.exercises/solution.json" | 48 + .../3.python/2.exercises/config.json" | 22 + .../3.python/2.exercises/solution.json" | 48 + .../3.python/20.exercises/config.json" | 22 + .../3.python/20.exercises/solution.json" | 48 + .../3.python/21.exercises/config.json" | 22 + .../3.python/21.exercises/solution.json" | 48 + .../3.python/22.exercises/config.json" | 22 + .../3.python/22.exercises/solution.json" | 48 + .../3.python/23.exercises/config.json" | 22 + .../3.python/23.exercises/solution.json" | 48 + .../3.python/24.exercises/config.json" | 22 + .../3.python/24.exercises/solution.json" | 48 + .../3.python/25.exercises/config.json" | 22 + .../3.python/25.exercises/solution.json" | 48 + .../3.python/26.exercises/config.json" | 22 + .../3.python/26.exercises/solution.json" | 48 + .../3.python/27.exercises/config.json" | 22 + .../3.python/27.exercises/solution.json" | 48 + .../3.python/28.exercises/config.json" | 22 + .../3.python/28.exercises/solution.json" | 48 + .../3.python/29.exercises/config.json" | 22 + .../3.python/29.exercises/solution.json" | 48 + .../3.python/3.exercises/config.json" | 22 + .../3.python/3.exercises/solution.json" | 48 + .../3.python/30.exercises/config.json" | 22 + .../3.python/30.exercises/solution.json" | 48 + .../3.python/31.exercises/config.json" | 22 + .../3.python/31.exercises/solution.json" | 48 + .../3.python/32.exercises/config.json" | 22 + .../3.python/32.exercises/solution.json" | 48 + .../3.python/33.exercises/config.json" | 22 + .../3.python/33.exercises/solution.json" | 48 + .../3.python/34.exercises/config.json" | 22 + .../3.python/34.exercises/solution.json" | 48 + .../3.python/35.exercises/config.json" | 22 + .../3.python/35.exercises/solution.json" | 116 + .../3.python/36.exercises/config.json" | 22 + .../3.python/36.exercises/solution.json" | 48 + .../3.python/37.exercises/config.json" | 22 + .../3.python/37.exercises/solution.json" | 48 + .../3.python/38.exercises/config.json" | 22 + .../3.python/38.exercises/solution.json" | 48 + .../3.python/39.exercises/config.json" | 22 + .../3.python/39.exercises/solution.json" | 124 + .../3.python/4.exercises/config.json" | 22 + .../3.python/4.exercises/solution.json" | 48 + .../3.python/40.exercises/config.json" | 22 + .../3.python/40.exercises/solution.json" | 48 + .../3.python/41.exercises/config.json" | 22 + .../3.python/41.exercises/solution.json" | 112 + .../3.python/42.exercises/config.json" | 22 + .../3.python/42.exercises/solution.json" | 48 + .../3.python/43.exercises/config.json" | 22 + .../3.python/43.exercises/solution.json" | 48 + .../3.python/44.exercises/config.json" | 22 + .../3.python/44.exercises/solution.json" | 48 + .../3.python/45.exercises/config.json" | 22 + .../3.python/45.exercises/solution.json" | 48 + .../3.python/46.exercises/config.json" | 22 + .../3.python/46.exercises/solution.json" | 48 + .../3.python/47.exercises/config.json" | 22 + .../3.python/47.exercises/solution.json" | 48 + .../3.python/48.exercises/config.json" | 22 + .../3.python/48.exercises/solution.json" | 48 + .../3.python/5.exercises/config.json" | 22 + .../3.python/5.exercises/solution.json" | 48 + .../3.python/6.exercises/config.json" | 22 + .../3.python/6.exercises/solution.json" | 48 + .../3.python/7.exercises/config.json" | 22 + .../3.python/7.exercises/solution.json" | 48 + .../3.python/8.exercises/config.json" | 22 + .../3.python/8.exercises/solution.json" | 48 + .../3.python/9.exercises/config.json" | 22 + .../3.python/9.exercises/solution.json" | 48 + .../4.it_knowledge/1.exercises/config.json" | 22 + .../4.it_knowledge/1.exercises/solution.json" | 44 + .../4.it_knowledge/10.exercises/config.json" | 22 + .../10.exercises/solution.json" | 44 + .../4.it_knowledge/100.exercises/config.json" | 22 + .../100.exercises/solution.json" | 48 + .../4.it_knowledge/101.exercises/config.json" | 22 + .../101.exercises/solution.json" | 48 + .../4.it_knowledge/102.exercises/config.json" | 22 + .../102.exercises/solution.json" | 44 + .../4.it_knowledge/103.exercises/config.json" | 22 + .../103.exercises/solution.json" | 44 + .../4.it_knowledge/11.exercises/config.json" | 22 + .../11.exercises/solution.json" | 48 + .../4.it_knowledge/12.exercises/config.json" | 22 + .../12.exercises/solution.json" | 48 + .../4.it_knowledge/13.exercises/config.json" | 22 + .../13.exercises/solution.json" | 48 + .../4.it_knowledge/14.exercises/config.json" | 22 + .../14.exercises/solution.json" | 44 + .../4.it_knowledge/15.exercises/config.json" | 22 + .../15.exercises/solution.json" | 44 + .../4.it_knowledge/16.exercises/config.json" | 22 + .../16.exercises/solution.json" | 48 + .../4.it_knowledge/17.exercises/config.json" | 22 + .../17.exercises/solution.json" | 48 + .../4.it_knowledge/18.exercises/config.json" | 22 + .../18.exercises/solution.json" | 44 + .../4.it_knowledge/19.exercises/config.json" | 22 + .../19.exercises/solution.json" | 48 + .../4.it_knowledge/2.exercises/config.json" | 22 + .../4.it_knowledge/2.exercises/solution.json" | 48 + .../4.it_knowledge/20.exercises/config.json" | 22 + .../20.exercises/solution.json" | 48 + .../4.it_knowledge/21.exercises/config.json" | 22 + .../21.exercises/solution.json" | 48 + .../4.it_knowledge/22.exercises/config.json" | 22 + .../22.exercises/solution.json" | 48 + .../4.it_knowledge/23.exercises/config.json" | 22 + .../23.exercises/solution.json" | 48 + .../4.it_knowledge/24.exercises/config.json" | 22 + .../24.exercises/solution.json" | 48 + .../4.it_knowledge/25.exercises/config.json" | 22 + .../25.exercises/solution.json" | 48 + .../4.it_knowledge/26.exercises/config.json" | 22 + .../26.exercises/solution.json" | 48 + .../4.it_knowledge/27.exercises/config.json" | 22 + .../27.exercises/solution.json" | 44 + .../4.it_knowledge/28.exercises/config.json" | 22 + .../28.exercises/solution.json" | 48 + .../4.it_knowledge/29.exercises/config.json" | 22 + .../29.exercises/solution.json" | 48 + .../4.it_knowledge/3.exercises/config.json" | 22 + .../4.it_knowledge/3.exercises/solution.json" | 48 + .../4.it_knowledge/30.exercises/config.json" | 22 + .../30.exercises/solution.json" | 48 + .../4.it_knowledge/31.exercises/config.json" | 22 + .../31.exercises/solution.json" | 48 + .../4.it_knowledge/32.exercises/config.json" | 22 + .../32.exercises/solution.json" | 44 + .../4.it_knowledge/33.exercises/config.json" | 22 + .../33.exercises/solution.json" | 48 + .../4.it_knowledge/34.exercises/config.json" | 22 + .../34.exercises/solution.json" | 48 + .../4.it_knowledge/35.exercises/config.json" | 22 + .../35.exercises/solution.json" | 48 + .../4.it_knowledge/36.exercises/config.json" | 22 + .../36.exercises/solution.json" | 44 + .../4.it_knowledge/37.exercises/config.json" | 22 + .../37.exercises/solution.json" | 48 + .../4.it_knowledge/38.exercises/config.json" | 22 + .../38.exercises/solution.json" | 48 + .../4.it_knowledge/39.exercises/config.json" | 22 + .../39.exercises/solution.json" | 48 + .../4.it_knowledge/4.exercises/config.json" | 22 + .../4.it_knowledge/4.exercises/solution.json" | 44 + .../4.it_knowledge/40.exercises/config.json" | 22 + .../40.exercises/solution.json" | 48 + .../4.it_knowledge/41.exercises/config.json" | 22 + .../41.exercises/solution.json" | 44 + .../4.it_knowledge/42.exercises/config.json" | 22 + .../42.exercises/solution.json" | 48 + .../4.it_knowledge/43.exercises/config.json" | 22 + .../43.exercises/solution.json" | 48 + .../4.it_knowledge/44.exercises/config.json" | 22 + .../44.exercises/solution.json" | 48 + .../4.it_knowledge/45.exercises/config.json" | 22 + .../45.exercises/solution.json" | 44 + .../4.it_knowledge/46.exercises/config.json" | 22 + .../46.exercises/solution.json" | 48 + .../4.it_knowledge/47.exercises/config.json" | 22 + .../47.exercises/solution.json" | 48 + .../4.it_knowledge/48.exercises/config.json" | 22 + .../48.exercises/solution.json" | 48 + .../4.it_knowledge/49.exercises/config.json" | 22 + .../49.exercises/solution.json" | 48 + .../4.it_knowledge/5.exercises/config.json" | 22 + .../4.it_knowledge/5.exercises/solution.json" | 48 + .../4.it_knowledge/50.exercises/config.json" | 22 + .../50.exercises/solution.json" | 48 + .../4.it_knowledge/51.exercises/config.json" | 22 + .../51.exercises/solution.json" | 44 + .../4.it_knowledge/52.exercises/config.json" | 22 + .../52.exercises/solution.json" | 48 + .../4.it_knowledge/53.exercises/config.json" | 22 + .../53.exercises/solution.json" | 48 + .../4.it_knowledge/54.exercises/config.json" | 22 + .../54.exercises/solution.json" | 48 + .../4.it_knowledge/55.exercises/config.json" | 22 + .../55.exercises/solution.json" | 48 + .../4.it_knowledge/56.exercises/config.json" | 22 + .../56.exercises/solution.json" | 48 + .../4.it_knowledge/57.exercises/config.json" | 22 + .../57.exercises/solution.json" | 44 + .../4.it_knowledge/58.exercises/config.json" | 22 + .../58.exercises/solution.json" | 48 + .../4.it_knowledge/59.exercises/config.json" | 22 + .../59.exercises/solution.json" | 48 + .../4.it_knowledge/6.exercises/config.json" | 22 + .../4.it_knowledge/6.exercises/solution.json" | 44 + .../4.it_knowledge/60.exercises/config.json" | 22 + .../60.exercises/solution.json" | 48 + .../4.it_knowledge/61.exercises/config.json" | 22 + .../61.exercises/solution.json" | 48 + .../4.it_knowledge/62.exercises/config.json" | 22 + .../62.exercises/solution.json" | 48 + .../4.it_knowledge/63.exercises/config.json" | 22 + .../63.exercises/solution.json" | 48 + .../4.it_knowledge/64.exercises/config.json" | 22 + .../64.exercises/solution.json" | 48 + .../4.it_knowledge/65.exercises/config.json" | 22 + .../65.exercises/solution.json" | 48 + .../4.it_knowledge/66.exercises/config.json" | 22 + .../66.exercises/solution.json" | 44 + .../4.it_knowledge/67.exercises/config.json" | 22 + .../67.exercises/solution.json" | 48 + .../4.it_knowledge/68.exercises/config.json" | 22 + .../68.exercises/solution.json" | 48 + .../4.it_knowledge/69.exercises/config.json" | 22 + .../69.exercises/solution.json" | 48 + .../4.it_knowledge/7.exercises/config.json" | 22 + .../4.it_knowledge/7.exercises/solution.json" | 48 + .../4.it_knowledge/70.exercises/config.json" | 22 + .../70.exercises/solution.json" | 48 + .../4.it_knowledge/71.exercises/config.json" | 22 + .../71.exercises/solution.json" | 48 + .../4.it_knowledge/72.exercises/config.json" | 22 + .../72.exercises/solution.json" | 48 + .../4.it_knowledge/73.exercises/config.json" | 22 + .../73.exercises/solution.json" | 44 + .../4.it_knowledge/74.exercises/config.json" | 22 + .../74.exercises/solution.json" | 48 + .../4.it_knowledge/75.exercises/config.json" | 22 + .../75.exercises/solution.json" | 48 + .../4.it_knowledge/76.exercises/config.json" | 22 + .../76.exercises/solution.json" | 48 + .../4.it_knowledge/77.exercises/config.json" | 22 + .../77.exercises/solution.json" | 48 + .../4.it_knowledge/78.exercises/config.json" | 22 + .../78.exercises/solution.json" | 48 + .../4.it_knowledge/79.exercises/config.json" | 22 + .../79.exercises/solution.json" | 48 + .../4.it_knowledge/8.exercises/config.json" | 22 + .../4.it_knowledge/8.exercises/solution.json" | 48 + .../4.it_knowledge/80.exercises/config.json" | 22 + .../80.exercises/solution.json" | 48 + .../4.it_knowledge/81.exercises/config.json" | 22 + .../81.exercises/solution.json" | 48 + .../4.it_knowledge/82.exercises/config.json" | 22 + .../82.exercises/solution.json" | 44 + .../4.it_knowledge/83.exercises/config.json" | 22 + .../83.exercises/solution.json" | 48 + .../4.it_knowledge/84.exercises/config.json" | 22 + .../84.exercises/solution.json" | 48 + .../4.it_knowledge/85.exercises/config.json" | 22 + .../85.exercises/solution.json" | 48 + .../4.it_knowledge/86.exercises/config.json" | 22 + .../86.exercises/solution.json" | 48 + .../4.it_knowledge/87.exercises/config.json" | 22 + .../87.exercises/solution.json" | 48 + .../4.it_knowledge/88.exercises/config.json" | 22 + .../88.exercises/solution.json" | 44 + .../4.it_knowledge/89.exercises/config.json" | 22 + .../89.exercises/solution.json" | 48 + .../4.it_knowledge/9.exercises/config.json" | 22 + .../4.it_knowledge/9.exercises/solution.json" | 48 + .../4.it_knowledge/90.exercises/config.json" | 22 + .../90.exercises/solution.json" | 48 + .../4.it_knowledge/91.exercises/config.json" | 22 + .../91.exercises/solution.json" | 48 + .../4.it_knowledge/92.exercises/config.json" | 22 + .../92.exercises/solution.json" | 48 + .../4.it_knowledge/93.exercises/config.json" | 22 + .../93.exercises/solution.json" | 48 + .../4.it_knowledge/94.exercises/config.json" | 22 + .../94.exercises/solution.json" | 44 + .../4.it_knowledge/95.exercises/config.json" | 22 + .../95.exercises/solution.json" | 44 + .../4.it_knowledge/96.exercises/config.json" | 22 + .../96.exercises/solution.json" | 48 + .../4.it_knowledge/97.exercises/config.json" | 22 + .../97.exercises/solution.json" | 44 + .../4.it_knowledge/98.exercises/config.json" | 22 + .../98.exercises/solution.json" | 48 + .../4.it_knowledge/99.exercises/config.json" | 22 + .../99.exercises/solution.json" | 48 + .../1.cpp/1.exercises/config.json" | 22 + .../1.cpp/1.exercises/solution.json" | 48 + .../1.cpp/10.exercises/config.json" | 22 + .../1.cpp/10.exercises/solution.json" | 48 + .../1.cpp/11.exercises/config.json" | 22 + .../1.cpp/11.exercises/solution.json" | 48 + .../1.cpp/12.exercises/config.json" | 22 + .../1.cpp/12.exercises/solution.json" | 48 + .../1.cpp/13.exercises/config.json" | 22 + .../1.cpp/13.exercises/solution.json" | 48 + .../1.cpp/14.exercises/config.json" | 22 + .../1.cpp/14.exercises/solution.json" | 48 + .../1.cpp/15.exercises/config.json" | 22 + .../1.cpp/15.exercises/solution.json" | 48 + .../1.cpp/16.exercises/config.json" | 22 + .../1.cpp/16.exercises/solution.json" | 48 + .../1.cpp/17.exercises/config.json" | 22 + .../1.cpp/17.exercises/solution.json" | 48 + .../1.cpp/18.exercises/config.json" | 22 + .../1.cpp/18.exercises/solution.json" | 48 + .../1.cpp/19.exercises/config.json" | 22 + .../1.cpp/19.exercises/solution.json" | 48 + .../1.cpp/2.exercises/config.json" | 22 + .../1.cpp/2.exercises/solution.json" | 48 + .../1.cpp/20.exercises/config.json" | 22 + .../1.cpp/20.exercises/solution.json" | 48 + .../1.cpp/21.exercises/config.json" | 22 + .../1.cpp/21.exercises/solution.json" | 48 + .../1.cpp/22.exercises/config.json" | 22 + .../1.cpp/22.exercises/solution.json" | 48 + .../1.cpp/23.exercises/config.json" | 22 + .../1.cpp/23.exercises/solution.json" | 48 + .../1.cpp/24.exercises/config.json" | 22 + .../1.cpp/24.exercises/solution.json" | 48 + .../1.cpp/25.exercises/config.json" | 22 + .../1.cpp/25.exercises/solution.json" | 48 + .../1.cpp/26.exercises/config.json" | 22 + .../1.cpp/26.exercises/solution.json" | 48 + .../1.cpp/27.exercises/config.json" | 22 + .../1.cpp/27.exercises/solution.json" | 48 + .../1.cpp/28.exercises/config.json" | 22 + .../1.cpp/28.exercises/solution.json" | 48 + .../1.cpp/29.exercises/config.json" | 22 + .../1.cpp/29.exercises/solution.json" | 48 + .../1.cpp/3.exercises/config.json" | 22 + .../1.cpp/3.exercises/solution.json" | 48 + .../1.cpp/30.exercises/config.json" | 22 + .../1.cpp/30.exercises/solution.json" | 48 + .../1.cpp/31.exercises/config.json" | 22 + .../1.cpp/31.exercises/solution.json" | 48 + .../1.cpp/32.exercises/config.json" | 22 + .../1.cpp/32.exercises/solution.json" | 48 + .../1.cpp/33.exercises/config.json" | 22 + .../1.cpp/33.exercises/solution.json" | 76 + .../1.cpp/34.exercises/config.json" | 22 + .../1.cpp/34.exercises/solution.json" | 120 + .../1.cpp/35.exercises/config.json" | 22 + .../1.cpp/35.exercises/solution.json" | 76 + .../1.cpp/36.exercises/config.json" | 22 + .../1.cpp/36.exercises/solution.json" | 48 + .../1.cpp/37.exercises/config.json" | 22 + .../1.cpp/37.exercises/solution.json" | 48 + .../1.cpp/38.exercises/config.json" | 22 + .../1.cpp/38.exercises/solution.json" | 108 + .../1.cpp/39.exercises/config.json" | 22 + .../1.cpp/39.exercises/solution.json" | 48 + .../1.cpp/4.exercises/config.json" | 22 + .../1.cpp/4.exercises/solution.json" | 48 + .../1.cpp/40.exercises/config.json" | 22 + .../1.cpp/40.exercises/solution.json" | 48 + .../1.cpp/41.exercises/config.json" | 22 + .../1.cpp/41.exercises/solution.json" | 48 + .../1.cpp/42.exercises/config.json" | 22 + .../1.cpp/42.exercises/solution.json" | 48 + .../1.cpp/43.exercises/config.json" | 22 + .../1.cpp/43.exercises/solution.json" | 48 + .../1.cpp/44.exercises/config.json" | 22 + .../1.cpp/44.exercises/solution.json" | 48 + .../1.cpp/45.exercises/config.json" | 22 + .../1.cpp/45.exercises/solution.json" | 48 + .../1.cpp/46.exercises/config.json" | 22 + .../1.cpp/46.exercises/solution.json" | 48 + .../1.cpp/47.exercises/config.json" | 22 + .../1.cpp/47.exercises/solution.json" | 48 + .../1.cpp/48.exercises/config.json" | 22 + .../1.cpp/48.exercises/solution.json" | 48 + .../1.cpp/49.exercises/config.json" | 22 + .../1.cpp/49.exercises/solution.json" | 48 + .../1.cpp/5.exercises/config.json" | 22 + .../1.cpp/5.exercises/solution.json" | 48 + .../1.cpp/50.exercises/config.json" | 22 + .../1.cpp/50.exercises/solution.json" | 48 + .../1.cpp/51.exercises/config.json" | 22 + .../1.cpp/51.exercises/solution.json" | 124 + .../1.cpp/52.exercises/config.json" | 22 + .../1.cpp/52.exercises/solution.json" | 48 + .../1.cpp/53.exercises/config.json" | 22 + .../1.cpp/53.exercises/solution.json" | 48 + .../1.cpp/54.exercises/config.json" | 22 + .../1.cpp/54.exercises/solution.json" | 48 + .../1.cpp/55.exercises/config.json" | 22 + .../1.cpp/55.exercises/solution.json" | 48 + .../1.cpp/56.exercises/config.json" | 22 + .../1.cpp/56.exercises/solution.json" | 48 + .../1.cpp/57.exercises/config.json" | 22 + .../1.cpp/57.exercises/solution.json" | 48 + .../1.cpp/58.exercises/config.json" | 22 + .../1.cpp/58.exercises/solution.json" | 48 + .../1.cpp/59.exercises/config.json" | 22 + .../1.cpp/59.exercises/solution.json" | 48 + .../1.cpp/6.exercises/config.json" | 22 + .../1.cpp/6.exercises/solution.json" | 48 + .../1.cpp/60.exercises/config.json" | 22 + .../1.cpp/60.exercises/solution.json" | 48 + .../1.cpp/61.exercises/config.json" | 22 + .../1.cpp/61.exercises/solution.json" | 48 + .../1.cpp/62.exercises/config.json" | 22 + .../1.cpp/62.exercises/solution.json" | 48 + .../1.cpp/63.exercises/config.json" | 22 + .../1.cpp/63.exercises/solution.json" | 48 + .../1.cpp/64.exercises/config.json" | 22 + .../1.cpp/64.exercises/solution.json" | 48 + .../1.cpp/65.exercises/config.json" | 22 + .../1.cpp/65.exercises/solution.json" | 48 + .../1.cpp/66.exercises/config.json" | 22 + .../1.cpp/66.exercises/solution.json" | 48 + .../1.cpp/67.exercises/config.json" | 22 + .../1.cpp/67.exercises/solution.json" | 48 + .../1.cpp/68.exercises/config.json" | 22 + .../1.cpp/68.exercises/solution.json" | 48 + .../1.cpp/69.exercises/config.json" | 22 + .../1.cpp/69.exercises/solution.json" | 48 + .../1.cpp/7.exercises/config.json" | 22 + .../1.cpp/7.exercises/solution.json" | 48 + .../1.cpp/70.exercises/config.json" | 22 + .../1.cpp/70.exercises/solution.json" | 48 + .../1.cpp/71.exercises/config.json" | 22 + .../1.cpp/71.exercises/solution.json" | 48 + .../1.cpp/72.exercises/config.json" | 22 + .../1.cpp/72.exercises/solution.json" | 48 + .../1.cpp/73.exercises/config.json" | 22 + .../1.cpp/73.exercises/solution.json" | 48 + .../1.cpp/74.exercises/config.json" | 22 + .../1.cpp/74.exercises/solution.json" | 48 + .../1.cpp/75.exercises/config.json" | 22 + .../1.cpp/75.exercises/solution.json" | 48 + .../1.cpp/76.exercises/config.json" | 22 + .../1.cpp/76.exercises/solution.json" | 48 + .../1.cpp/77.exercises/config.json" | 22 + .../1.cpp/77.exercises/solution.json" | 48 + .../1.cpp/78.exercises/config.json" | 22 + .../1.cpp/78.exercises/solution.json" | 48 + .../1.cpp/79.exercises/config.json" | 22 + .../1.cpp/79.exercises/solution.json" | 80 + .../1.cpp/8.exercises/config.json" | 22 + .../1.cpp/8.exercises/solution.json" | 48 + .../1.cpp/80.exercises/config.json" | 22 + .../1.cpp/80.exercises/solution.json" | 48 + .../1.cpp/81.exercises/config.json" | 22 + .../1.cpp/81.exercises/solution.json" | 104 + .../1.cpp/82.exercises/config.json" | 22 + .../1.cpp/82.exercises/solution.json" | 48 + .../1.cpp/83.exercises/config.json" | 22 + .../1.cpp/83.exercises/solution.json" | 48 + .../1.cpp/84.exercises/config.json" | 22 + .../1.cpp/84.exercises/solution.json" | 48 + .../1.cpp/85.exercises/config.json" | 22 + .../1.cpp/85.exercises/solution.json" | 48 + .../1.cpp/86.exercises/config.json" | 22 + .../1.cpp/86.exercises/solution.json" | 48 + .../1.cpp/87.exercises/config.json" | 22 + .../1.cpp/87.exercises/solution.json" | 48 + .../1.cpp/9.exercises/config.json" | 22 + .../1.cpp/9.exercises/solution.json" | 48 + .../2.java/1.exercises/config.json" | 22 + .../2.java/1.exercises/solution.json" | 48 + .../2.java/10.exercises/config.json" | 22 + .../2.java/10.exercises/solution.json" | 76 + .../2.java/11.exercises/config.json" | 22 + .../2.java/11.exercises/solution.json" | 120 + .../2.java/12.exercises/config.json" | 22 + .../2.java/12.exercises/solution.json" | 76 + .../2.java/13.exercises/config.json" | 22 + .../2.java/13.exercises/solution.json" | 48 + .../2.java/14.exercises/config.json" | 22 + .../2.java/14.exercises/solution.json" | 48 + .../2.java/15.exercises/config.json" | 22 + .../2.java/15.exercises/solution.json" | 108 + .../2.java/16.exercises/config.json" | 22 + .../2.java/16.exercises/solution.json" | 48 + .../2.java/17.exercises/config.json" | 22 + .../2.java/17.exercises/solution.json" | 48 + .../2.java/18.exercises/config.json" | 22 + .../2.java/18.exercises/solution.json" | 48 + .../2.java/19.exercises/config.json" | 22 + .../2.java/19.exercises/solution.json" | 48 + .../2.java/2.exercises/config.json" | 22 + .../2.java/2.exercises/solution.json" | 48 + .../2.java/20.exercises/config.json" | 22 + .../2.java/20.exercises/solution.json" | 48 + .../2.java/21.exercises/config.json" | 22 + .../2.java/21.exercises/solution.json" | 48 + .../2.java/22.exercises/config.json" | 22 + .../2.java/22.exercises/solution.json" | 48 + .../2.java/23.exercises/config.json" | 22 + .../2.java/23.exercises/solution.json" | 48 + .../2.java/24.exercises/config.json" | 22 + .../2.java/24.exercises/solution.json" | 48 + .../2.java/25.exercises/config.json" | 22 + .../2.java/25.exercises/solution.json" | 48 + .../2.java/26.exercises/config.json" | 22 + .../2.java/26.exercises/solution.json" | 48 + .../2.java/27.exercises/config.json" | 22 + .../2.java/27.exercises/solution.json" | 48 + .../2.java/28.exercises/config.json" | 22 + .../2.java/28.exercises/solution.json" | 124 + .../2.java/29.exercises/config.json" | 22 + .../2.java/29.exercises/solution.json" | 48 + .../2.java/3.exercises/config.json" | 22 + .../2.java/3.exercises/solution.json" | 48 + .../2.java/30.exercises/config.json" | 22 + .../2.java/30.exercises/solution.json" | 48 + .../2.java/31.exercises/config.json" | 22 + .../2.java/31.exercises/solution.json" | 48 + .../2.java/32.exercises/config.json" | 22 + .../2.java/32.exercises/solution.json" | 48 + .../2.java/33.exercises/config.json" | 22 + .../2.java/33.exercises/solution.json" | 48 + .../2.java/34.exercises/config.json" | 22 + .../2.java/34.exercises/solution.json" | 48 + .../2.java/35.exercises/config.json" | 22 + .../2.java/35.exercises/solution.json" | 48 + .../2.java/36.exercises/config.json" | 22 + .../2.java/36.exercises/solution.json" | 48 + .../2.java/37.exercises/config.json" | 22 + .../2.java/37.exercises/solution.json" | 48 + .../2.java/38.exercises/config.json" | 22 + .../2.java/38.exercises/solution.json" | 48 + .../2.java/39.exercises/config.json" | 22 + .../2.java/39.exercises/solution.json" | 48 + .../2.java/4.exercises/config.json" | 22 + .../2.java/4.exercises/solution.json" | 48 + .../2.java/40.exercises/config.json" | 22 + .../2.java/40.exercises/solution.json" | 48 + .../2.java/41.exercises/config.json" | 22 + .../2.java/41.exercises/solution.json" | 48 + .../2.java/42.exercises/config.json" | 22 + .../2.java/42.exercises/solution.json" | 48 + .../2.java/43.exercises/config.json" | 22 + .../2.java/43.exercises/solution.json" | 48 + .../2.java/44.exercises/config.json" | 22 + .../2.java/44.exercises/solution.json" | 48 + .../2.java/45.exercises/config.json" | 22 + .../2.java/45.exercises/solution.json" | 48 + .../2.java/46.exercises/config.json" | 22 + .../2.java/46.exercises/solution.json" | 48 + .../2.java/47.exercises/config.json" | 22 + .../2.java/47.exercises/solution.json" | 48 + .../2.java/48.exercises/config.json" | 22 + .../2.java/48.exercises/solution.json" | 48 + .../2.java/49.exercises/config.json" | 22 + .../2.java/49.exercises/solution.json" | 48 + .../2.java/5.exercises/config.json" | 22 + .../2.java/5.exercises/solution.json" | 48 + .../2.java/50.exercises/config.json" | 22 + .../2.java/50.exercises/solution.json" | 48 + .../2.java/51.exercises/config.json" | 22 + .../2.java/51.exercises/solution.json" | 48 + .../2.java/52.exercises/config.json" | 22 + .../2.java/52.exercises/solution.json" | 48 + .../2.java/53.exercises/config.json" | 22 + .../2.java/53.exercises/solution.json" | 48 + .../2.java/54.exercises/config.json" | 22 + .../2.java/54.exercises/solution.json" | 48 + .../2.java/55.exercises/config.json" | 22 + .../2.java/55.exercises/solution.json" | 48 + .../2.java/56.exercises/config.json" | 22 + .../2.java/56.exercises/solution.json" | 80 + .../2.java/57.exercises/config.json" | 22 + .../2.java/57.exercises/solution.json" | 48 + .../2.java/58.exercises/config.json" | 22 + .../2.java/58.exercises/solution.json" | 104 + .../2.java/59.exercises/config.json" | 22 + .../2.java/59.exercises/solution.json" | 48 + .../2.java/6.exercises/config.json" | 22 + .../2.java/6.exercises/solution.json" | 48 + .../2.java/60.exercises/config.json" | 22 + .../2.java/60.exercises/solution.json" | 48 + .../2.java/61.exercises/config.json" | 22 + .../2.java/61.exercises/solution.json" | 48 + .../2.java/62.exercises/config.json" | 22 + .../2.java/62.exercises/solution.json" | 48 + .../2.java/63.exercises/config.json" | 22 + .../2.java/63.exercises/solution.json" | 48 + .../2.java/64.exercises/config.json" | 22 + .../2.java/64.exercises/solution.json" | 48 + .../2.java/7.exercises/config.json" | 22 + .../2.java/7.exercises/solution.json" | 48 + .../2.java/8.exercises/config.json" | 22 + .../2.java/8.exercises/solution.json" | 48 + .../2.java/9.exercises/config.json" | 22 + .../2.java/9.exercises/solution.json" | 48 + .../3.python/1.exercises/config.json" | 22 + .../3.python/1.exercises/solution.json" | 48 + .../3.python/10.exercises/config.json" | 22 + .../3.python/10.exercises/solution.json" | 120 + .../3.python/11.exercises/config.json" | 22 + .../3.python/11.exercises/solution.json" | 76 + .../3.python/12.exercises/config.json" | 22 + .../3.python/12.exercises/solution.json" | 48 + .../3.python/13.exercises/config.json" | 22 + .../3.python/13.exercises/solution.json" | 48 + .../3.python/14.exercises/config.json" | 22 + .../3.python/14.exercises/solution.json" | 108 + .../3.python/15.exercises/config.json" | 22 + .../3.python/15.exercises/solution.json" | 48 + .../3.python/16.exercises/config.json" | 22 + .../3.python/16.exercises/solution.json" | 48 + .../3.python/17.exercises/config.json" | 22 + .../3.python/17.exercises/solution.json" | 48 + .../3.python/18.exercises/config.json" | 22 + .../3.python/18.exercises/solution.json" | 48 + .../3.python/19.exercises/config.json" | 22 + .../3.python/19.exercises/solution.json" | 48 + .../3.python/2.exercises/config.json" | 22 + .../3.python/2.exercises/solution.json" | 48 + .../3.python/20.exercises/config.json" | 22 + .../3.python/20.exercises/solution.json" | 48 + .../3.python/21.exercises/config.json" | 22 + .../3.python/21.exercises/solution.json" | 48 + .../3.python/22.exercises/config.json" | 22 + .../3.python/22.exercises/solution.json" | 48 + .../3.python/23.exercises/config.json" | 22 + .../3.python/23.exercises/solution.json" | 48 + .../3.python/24.exercises/config.json" | 22 + .../3.python/24.exercises/solution.json" | 48 + .../3.python/25.exercises/config.json" | 22 + .../3.python/25.exercises/solution.json" | 48 + .../3.python/26.exercises/config.json" | 22 + .../3.python/26.exercises/solution.json" | 48 + .../3.python/27.exercises/config.json" | 22 + .../3.python/27.exercises/solution.json" | 124 + .../3.python/28.exercises/config.json" | 22 + .../3.python/28.exercises/solution.json" | 48 + .../3.python/29.exercises/config.json" | 22 + .../3.python/29.exercises/solution.json" | 48 + .../3.python/3.exercises/config.json" | 22 + .../3.python/3.exercises/solution.json" | 48 + .../3.python/30.exercises/config.json" | 22 + .../3.python/30.exercises/solution.json" | 48 + .../3.python/31.exercises/config.json" | 22 + .../3.python/31.exercises/solution.json" | 48 + .../3.python/32.exercises/config.json" | 22 + .../3.python/32.exercises/solution.json" | 48 + .../3.python/33.exercises/config.json" | 22 + .../3.python/33.exercises/solution.json" | 48 + .../3.python/34.exercises/config.json" | 22 + .../3.python/34.exercises/solution.json" | 48 + .../3.python/35.exercises/config.json" | 22 + .../3.python/35.exercises/solution.json" | 48 + .../3.python/36.exercises/config.json" | 22 + .../3.python/36.exercises/solution.json" | 48 + .../3.python/37.exercises/config.json" | 22 + .../3.python/37.exercises/solution.json" | 48 + .../3.python/38.exercises/config.json" | 22 + .../3.python/38.exercises/solution.json" | 48 + .../3.python/39.exercises/config.json" | 22 + .../3.python/39.exercises/solution.json" | 48 + .../3.python/4.exercises/config.json" | 22 + .../3.python/4.exercises/solution.json" | 48 + .../3.python/40.exercises/config.json" | 22 + .../3.python/40.exercises/solution.json" | 48 + .../3.python/41.exercises/config.json" | 22 + .../3.python/41.exercises/solution.json" | 48 + .../3.python/42.exercises/config.json" | 22 + .../3.python/42.exercises/solution.json" | 48 + .../3.python/43.exercises/config.json" | 22 + .../3.python/43.exercises/solution.json" | 48 + .../3.python/44.exercises/config.json" | 22 + .../3.python/44.exercises/solution.json" | 48 + .../3.python/45.exercises/config.json" | 22 + .../3.python/45.exercises/solution.json" | 48 + .../3.python/46.exercises/config.json" | 22 + .../3.python/46.exercises/solution.json" | 48 + .../3.python/47.exercises/config.json" | 22 + .../3.python/47.exercises/solution.json" | 48 + .../3.python/48.exercises/config.json" | 22 + .../3.python/48.exercises/solution.json" | 48 + .../3.python/49.exercises/config.json" | 22 + .../3.python/49.exercises/solution.json" | 48 + .../3.python/5.exercises/config.json" | 22 + .../3.python/5.exercises/solution.json" | 48 + .../3.python/50.exercises/config.json" | 22 + .../3.python/50.exercises/solution.json" | 48 + .../3.python/51.exercises/config.json" | 22 + .../3.python/51.exercises/solution.json" | 48 + .../3.python/52.exercises/config.json" | 22 + .../3.python/52.exercises/solution.json" | 48 + .../3.python/53.exercises/config.json" | 22 + .../3.python/53.exercises/solution.json" | 48 + .../3.python/54.exercises/config.json" | 22 + .../3.python/54.exercises/solution.json" | 48 + .../3.python/55.exercises/config.json" | 22 + .../3.python/55.exercises/solution.json" | 80 + .../3.python/56.exercises/config.json" | 22 + .../3.python/56.exercises/solution.json" | 48 + .../3.python/57.exercises/config.json" | 22 + .../3.python/57.exercises/solution.json" | 104 + .../3.python/58.exercises/config.json" | 22 + .../3.python/58.exercises/solution.json" | 48 + .../3.python/59.exercises/config.json" | 22 + .../3.python/59.exercises/solution.json" | 48 + .../3.python/6.exercises/config.json" | 22 + .../3.python/6.exercises/solution.json" | 48 + .../3.python/60.exercises/config.json" | 22 + .../3.python/60.exercises/solution.json" | 48 + .../3.python/61.exercises/config.json" | 22 + .../3.python/61.exercises/solution.json" | 48 + .../3.python/62.exercises/config.json" | 22 + .../3.python/62.exercises/solution.json" | 48 + .../3.python/63.exercises/config.json" | 22 + .../3.python/63.exercises/solution.json" | 48 + .../3.python/7.exercises/config.json" | 22 + .../3.python/7.exercises/solution.json" | 48 + .../3.python/8.exercises/config.json" | 22 + .../3.python/8.exercises/solution.json" | 48 + .../3.python/9.exercises/config.json" | 22 + .../3.python/9.exercises/solution.json" | 76 + .../1.cpp/1.exercises/config.json" | 22 + .../1.cpp/1.exercises/solution.json" | 48 + .../1.cpp/10.exercises/config.json" | 22 + .../1.cpp/10.exercises/solution.json" | 48 + .../1.cpp/11.exercises/config.json" | 22 + .../1.cpp/11.exercises/solution.json" | 48 + .../1.cpp/12.exercises/config.json" | 22 + .../1.cpp/12.exercises/solution.json" | 48 + .../1.cpp/13.exercises/config.json" | 22 + .../1.cpp/13.exercises/solution.json" | 48 + .../1.cpp/14.exercises/config.json" | 22 + .../1.cpp/14.exercises/solution.json" | 48 + .../1.cpp/15.exercises/config.json" | 22 + .../1.cpp/15.exercises/solution.json" | 48 + .../1.cpp/16.exercises/config.json" | 22 + .../1.cpp/16.exercises/solution.json" | 48 + .../1.cpp/17.exercises/config.json" | 22 + .../1.cpp/17.exercises/solution.json" | 48 + .../1.cpp/18.exercises/config.json" | 22 + .../1.cpp/18.exercises/solution.json" | 48 + .../1.cpp/19.exercises/config.json" | 22 + .../1.cpp/19.exercises/solution.json" | 48 + .../1.cpp/2.exercises/config.json" | 22 + .../1.cpp/2.exercises/solution.json" | 48 + .../1.cpp/20.exercises/config.json" | 22 + .../1.cpp/20.exercises/solution.json" | 48 + .../1.cpp/21.exercises/config.json" | 22 + .../1.cpp/21.exercises/solution.json" | 52 + .../1.cpp/22.exercises/config.json" | 22 + .../1.cpp/22.exercises/solution.json" | 48 + .../1.cpp/23.exercises/config.json" | 22 + .../1.cpp/23.exercises/solution.json" | 48 + .../1.cpp/24.exercises/config.json" | 22 + .../1.cpp/24.exercises/solution.json" | 48 + .../1.cpp/25.exercises/config.json" | 22 + .../1.cpp/25.exercises/solution.json" | 80 + .../1.cpp/26.exercises/config.json" | 22 + .../1.cpp/26.exercises/solution.json" | 48 + .../1.cpp/27.exercises/config.json" | 22 + .../1.cpp/27.exercises/solution.json" | 48 + .../1.cpp/28.exercises/config.json" | 22 + .../1.cpp/28.exercises/solution.json" | 92 + .../1.cpp/29.exercises/config.json" | 22 + .../1.cpp/29.exercises/solution.json" | 48 + .../1.cpp/3.exercises/config.json" | 22 + .../1.cpp/3.exercises/solution.json" | 48 + .../1.cpp/30.exercises/config.json" | 22 + .../1.cpp/30.exercises/solution.json" | 48 + .../1.cpp/31.exercises/config.json" | 22 + .../1.cpp/31.exercises/solution.json" | 92 + .../1.cpp/32.exercises/config.json" | 22 + .../1.cpp/32.exercises/solution.json" | 48 + .../1.cpp/33.exercises/config.json" | 22 + .../1.cpp/33.exercises/solution.json" | 48 + .../1.cpp/34.exercises/config.json" | 22 + .../1.cpp/34.exercises/solution.json" | 48 + .../1.cpp/35.exercises/config.json" | 22 + .../1.cpp/35.exercises/solution.json" | 48 + .../1.cpp/36.exercises/config.json" | 22 + .../1.cpp/36.exercises/solution.json" | 48 + .../1.cpp/37.exercises/config.json" | 22 + .../1.cpp/37.exercises/solution.json" | 48 + .../1.cpp/38.exercises/config.json" | 22 + .../1.cpp/38.exercises/solution.json" | 48 + .../1.cpp/39.exercises/config.json" | 22 + .../1.cpp/39.exercises/solution.json" | 48 + .../1.cpp/4.exercises/config.json" | 22 + .../1.cpp/4.exercises/solution.json" | 48 + .../1.cpp/40.exercises/config.json" | 22 + .../1.cpp/40.exercises/solution.json" | 48 + .../1.cpp/5.exercises/config.json" | 22 + .../1.cpp/5.exercises/solution.json" | 48 + .../1.cpp/6.exercises/config.json" | 22 + .../1.cpp/6.exercises/solution.json" | 48 + .../1.cpp/7.exercises/config.json" | 22 + .../1.cpp/7.exercises/solution.json" | 48 + .../1.cpp/8.exercises/config.json" | 22 + .../1.cpp/8.exercises/solution.json" | 48 + .../1.cpp/9.exercises/config.json" | 22 + .../1.cpp/9.exercises/solution.json" | 48 + .../2.java/1.exercises/config.json" | 22 + .../2.java/1.exercises/solution.json" | 52 + .../2.java/10.exercises/config.json" | 22 + .../2.java/10.exercises/solution.json" | 48 + .../2.java/11.exercises/config.json" | 22 + .../2.java/11.exercises/solution.json" | 92 + .../2.java/12.exercises/config.json" | 22 + .../2.java/12.exercises/solution.json" | 48 + .../2.java/13.exercises/config.json" | 22 + .../2.java/13.exercises/solution.json" | 48 + .../2.java/14.exercises/config.json" | 22 + .../2.java/14.exercises/solution.json" | 48 + .../2.java/15.exercises/config.json" | 22 + .../2.java/15.exercises/solution.json" | 48 + .../2.java/16.exercises/config.json" | 22 + .../2.java/16.exercises/solution.json" | 48 + .../2.java/17.exercises/config.json" | 22 + .../2.java/17.exercises/solution.json" | 48 + .../2.java/18.exercises/config.json" | 22 + .../2.java/18.exercises/solution.json" | 48 + .../2.java/19.exercises/config.json" | 22 + .../2.java/19.exercises/solution.json" | 48 + .../2.java/2.exercises/config.json" | 22 + .../2.java/2.exercises/solution.json" | 48 + .../2.java/20.exercises/config.json" | 22 + .../2.java/20.exercises/solution.json" | 48 + .../2.java/3.exercises/config.json" | 22 + .../2.java/3.exercises/solution.json" | 48 + .../2.java/4.exercises/config.json" | 22 + .../2.java/4.exercises/solution.json" | 48 + .../2.java/5.exercises/config.json" | 22 + .../2.java/5.exercises/solution.json" | 80 + .../2.java/6.exercises/config.json" | 22 + .../2.java/6.exercises/solution.json" | 48 + .../2.java/7.exercises/config.json" | 22 + .../2.java/7.exercises/solution.json" | 48 + .../2.java/8.exercises/config.json" | 22 + .../2.java/8.exercises/solution.json" | 92 + .../2.java/9.exercises/config.json" | 22 + .../2.java/9.exercises/solution.json" | 48 + .../3.python/1.exercises/config.json" | 22 + .../3.python/1.exercises/solution.json" | 48 + .../3.python/10.exercises/config.json" | 22 + .../3.python/10.exercises/solution.json" | 48 + .../3.python/11.exercises/config.json" | 22 + .../3.python/11.exercises/solution.json" | 48 + .../3.python/12.exercises/config.json" | 22 + .../3.python/12.exercises/solution.json" | 92 + .../3.python/13.exercises/config.json" | 22 + .../3.python/13.exercises/solution.json" | 48 + .../3.python/14.exercises/config.json" | 22 + .../3.python/14.exercises/solution.json" | 48 + .../3.python/15.exercises/config.json" | 22 + .../3.python/15.exercises/solution.json" | 48 + .../3.python/16.exercises/config.json" | 22 + .../3.python/16.exercises/solution.json" | 48 + .../3.python/17.exercises/config.json" | 22 + .../3.python/17.exercises/solution.json" | 48 + .../3.python/18.exercises/config.json" | 22 + .../3.python/18.exercises/solution.json" | 48 + .../3.python/19.exercises/config.json" | 22 + .../3.python/19.exercises/solution.json" | 48 + .../3.python/2.exercises/config.json" | 22 + .../3.python/2.exercises/solution.json" | 52 + .../3.python/20.exercises/config.json" | 22 + .../3.python/20.exercises/solution.json" | 48 + .../3.python/21.exercises/config.json" | 22 + .../3.python/21.exercises/solution.json" | 48 + .../3.python/3.exercises/config.json" | 22 + .../3.python/3.exercises/solution.json" | 48 + .../3.python/4.exercises/config.json" | 22 + .../3.python/4.exercises/solution.json" | 48 + .../3.python/5.exercises/config.json" | 22 + .../3.python/5.exercises/solution.json" | 48 + .../3.python/6.exercises/config.json" | 22 + .../3.python/6.exercises/solution.json" | 80 + .../3.python/7.exercises/config.json" | 22 + .../3.python/7.exercises/solution.json" | 48 + .../3.python/8.exercises/config.json" | 22 + .../3.python/8.exercises/solution.json" | 48 + .../3.python/9.exercises/config.json" | 22 + .../3.python/9.exercises/solution.json" | 92 + data_source/dailycode/tree.json | 4249 +++++++++++++++++ .../it_knowledge/0.md | 0 .../it_knowledge/1.md | 0 .../it_knowledge/10.md | 0 .../it_knowledge/100.md | 0 .../it_knowledge/101.md | 0 .../it_knowledge/102.md | 0 .../it_knowledge/103.md | 0 .../it_knowledge/104.md | 0 .../it_knowledge/105.md | 0 .../it_knowledge/106.md | 0 .../it_knowledge/107.md | 0 .../it_knowledge/108.md | 0 .../it_knowledge/109.md | 0 .../it_knowledge/11.md | 0 .../it_knowledge/110.md | 0 .../it_knowledge/111.md | 0 .../it_knowledge/112.md | 0 .../it_knowledge/12.md | 0 .../it_knowledge/13.md | 0 .../it_knowledge/14.md | 0 .../it_knowledge/15.md | 0 .../it_knowledge/16.md | 0 .../it_knowledge/17.md | 0 .../it_knowledge/18.md | 0 .../it_knowledge/19.md | 0 .../it_knowledge/2.md | 0 .../it_knowledge/20.md | 0 .../it_knowledge/21.md | 0 .../it_knowledge/22.md | 0 .../it_knowledge/23.md | 0 .../it_knowledge/24.md | 0 .../it_knowledge/25.md | 0 .../it_knowledge/26.md | 0 .../it_knowledge/27.md | 0 .../it_knowledge/28.md | 0 .../it_knowledge/29.md | 0 .../it_knowledge/3.md | 0 .../it_knowledge/30.md | 0 .../it_knowledge/31.md | 0 .../it_knowledge/32.md | 0 .../it_knowledge/33.md | 0 .../it_knowledge/34.md | 0 .../it_knowledge/35.md | 0 .../it_knowledge/36.md | 0 .../it_knowledge/37.md | 0 .../it_knowledge/38.md | 0 .../it_knowledge/39.md | 0 .../it_knowledge/4.md | 0 .../it_knowledge/40.md | 0 .../it_knowledge/41.md | 0 .../it_knowledge/42.md | 0 .../it_knowledge/43.md | 0 .../it_knowledge/44.md | 0 .../it_knowledge/45.md | 0 .../it_knowledge/46.md | 0 .../it_knowledge/47.md | 0 .../it_knowledge/48.md | 0 .../it_knowledge/49.md | 0 .../it_knowledge/5.md | 0 .../it_knowledge/50.md | 0 .../it_knowledge/51.md | 0 .../it_knowledge/52.md | 0 .../it_knowledge/53.md | 0 .../it_knowledge/54.md | 0 .../it_knowledge/55.md | 0 .../it_knowledge/56.md | 0 .../it_knowledge/57.md | 0 .../it_knowledge/58.md | 0 .../it_knowledge/59.md | 0 .../it_knowledge/6.md | 0 .../it_knowledge/60.md | 0 .../it_knowledge/61.md | 0 .../it_knowledge/62.md | 0 .../it_knowledge/63.md | 0 .../it_knowledge/64.md | 0 .../it_knowledge/65.md | 0 .../it_knowledge/66.md | 0 .../it_knowledge/67.md | 0 .../it_knowledge/68.md | 0 .../it_knowledge/69.md | 0 .../it_knowledge/7.md | 0 .../it_knowledge/70.md | 0 .../it_knowledge/71.md | 0 .../it_knowledge/72.md | 0 .../it_knowledge/73.md | 0 .../it_knowledge/74.md | 0 .../it_knowledge/75.md | 0 .../it_knowledge/76.md | 0 .../it_knowledge/77.md | 0 .../it_knowledge/78.md | 0 .../it_knowledge/79.md | 0 .../it_knowledge/8.md | 0 .../it_knowledge/80.md | 0 .../it_knowledge/81.md | 0 .../it_knowledge/82.md | 0 .../it_knowledge/83.md | 0 .../it_knowledge/84.md | 0 .../it_knowledge/85.md | 0 .../it_knowledge/86.md | 0 .../it_knowledge/87.md | 0 .../it_knowledge/88.md | 0 .../it_knowledge/89.md | 0 .../it_knowledge/9.md | 0 .../it_knowledge/90.md | 0 .../it_knowledge/91.md | 0 .../it_knowledge/92.md | 0 .../it_knowledge/93.md | 0 .../it_knowledge/94.md | 0 .../it_knowledge/95.md | 0 .../it_knowledge/96.md | 0 .../it_knowledge/97.md | 0 .../it_knowledge/98.md | 0 .../it_knowledge/99.md | 0 {data_backup => data_source}/it_mapping.json | 0 .../java_code_json/0.json | 0 .../java_code_json/1.json | 0 .../java_code_json/10.json | 0 .../java_code_json/11.json | 0 .../java_code_json/12.json | 0 .../java_code_json/13.json | 0 .../java_code_json/14.json | 0 .../java_code_json/15.json | 0 .../java_code_json/16.json | 0 .../java_code_json/17.json | 0 .../java_code_json/18.json | 0 .../java_code_json/19.json | 0 .../java_code_json/2.json | 0 .../java_code_json/20.json | 0 .../java_code_json/21.json | 0 .../java_code_json/22.json | 0 .../java_code_json/23.json | 0 .../java_code_json/24.json | 0 .../java_code_json/25.json | 0 .../java_code_json/26.json | 0 .../java_code_json/27.json | 0 .../java_code_json/28.json | 0 .../java_code_json/29.json | 0 .../java_code_json/3.json | 0 .../java_code_json/30.json | 0 .../java_code_json/31.json | 0 .../java_code_json/32.json | 0 .../java_code_json/33.json | 0 .../java_code_json/34.json | 0 .../java_code_json/35.json | 0 .../java_code_json/36.json | 0 .../java_code_json/37.json | 0 .../java_code_json/38.json | 0 .../java_code_json/39.json | 0 .../java_code_json/4.json | 0 .../java_code_json/40.json | 0 .../java_code_json/41.json | 0 .../java_code_json/42.json | 0 .../java_code_json/43.json | 0 .../java_code_json/44.json | 0 .../java_code_json/45.json | 0 .../java_code_json/46.json | 0 .../java_code_json/47.json | 0 .../java_code_json/48.json | 0 .../java_code_json/49.json | 0 .../java_code_json/5.json | 0 .../java_code_json/50.json | 0 .../java_code_json/6.json | 0 .../java_code_json/7.json | 0 .../java_code_json/8.json | 0 .../java_code_json/9.json | 0 {data_backup => data_source}/leetcode/0.json | 0 {data_backup => data_source}/leetcode/1.json | 0 {data_backup => data_source}/leetcode/10.json | 0 {data_backup => data_source}/leetcode/11.json | 0 {data_backup => data_source}/leetcode/12.json | 0 {data_backup => data_source}/leetcode/13.json | 0 {data_backup => data_source}/leetcode/14.json | 0 {data_backup => data_source}/leetcode/15.json | 0 {data_backup => data_source}/leetcode/16.json | 0 {data_backup => data_source}/leetcode/17.json | 0 {data_backup => data_source}/leetcode/18.json | 0 {data_backup => data_source}/leetcode/19.json | 0 {data_backup => data_source}/leetcode/2.json | 0 {data_backup => data_source}/leetcode/20.json | 0 {data_backup => data_source}/leetcode/21.json | 0 {data_backup => data_source}/leetcode/22.json | 0 {data_backup => data_source}/leetcode/23.json | 0 {data_backup => data_source}/leetcode/24.json | 0 {data_backup => data_source}/leetcode/25.json | 0 {data_backup => data_source}/leetcode/26.json | 0 {data_backup => data_source}/leetcode/27.json | 0 {data_backup => data_source}/leetcode/28.json | 0 {data_backup => data_source}/leetcode/29.json | 0 {data_backup => data_source}/leetcode/3.json | 0 {data_backup => data_source}/leetcode/30.json | 0 {data_backup => data_source}/leetcode/31.json | 0 {data_backup => data_source}/leetcode/32.json | 0 {data_backup => data_source}/leetcode/33.json | 0 {data_backup => data_source}/leetcode/34.json | 0 {data_backup => data_source}/leetcode/35.json | 0 {data_backup => data_source}/leetcode/36.json | 0 {data_backup => data_source}/leetcode/37.json | 0 {data_backup => data_source}/leetcode/38.json | 0 {data_backup => data_source}/leetcode/39.json | 0 {data_backup => data_source}/leetcode/4.json | 0 {data_backup => data_source}/leetcode/40.json | 0 {data_backup => data_source}/leetcode/41.json | 0 {data_backup => data_source}/leetcode/42.json | 0 {data_backup => data_source}/leetcode/43.json | 0 {data_backup => data_source}/leetcode/44.json | 0 {data_backup => data_source}/leetcode/45.json | 0 {data_backup => data_source}/leetcode/46.json | 0 {data_backup => data_source}/leetcode/47.json | 0 {data_backup => data_source}/leetcode/48.json | 0 {data_backup => data_source}/leetcode/49.json | 0 {data_backup => data_source}/leetcode/5.json | 0 {data_backup => data_source}/leetcode/50.json | 0 {data_backup => data_source}/leetcode/51.json | 0 {data_backup => data_source}/leetcode/52.json | 0 {data_backup => data_source}/leetcode/53.json | 0 {data_backup => data_source}/leetcode/54.json | 0 {data_backup => data_source}/leetcode/55.json | 0 {data_backup => data_source}/leetcode/56.json | 0 {data_backup => data_source}/leetcode/57.json | 0 {data_backup => data_source}/leetcode/58.json | 0 {data_backup => data_source}/leetcode/59.json | 0 {data_backup => data_source}/leetcode/6.json | 0 {data_backup => data_source}/leetcode/60.json | 0 {data_backup => data_source}/leetcode/61.json | 0 {data_backup => data_source}/leetcode/62.json | 0 {data_backup => data_source}/leetcode/63.json | 0 {data_backup => data_source}/leetcode/64.json | 0 {data_backup => data_source}/leetcode/65.json | 0 {data_backup => data_source}/leetcode/66.json | 0 {data_backup => data_source}/leetcode/67.json | 0 {data_backup => data_source}/leetcode/68.json | 0 {data_backup => data_source}/leetcode/69.json | 0 {data_backup => data_source}/leetcode/7.json | 0 {data_backup => data_source}/leetcode/70.json | 0 {data_backup => data_source}/leetcode/71.json | 0 {data_backup => data_source}/leetcode/72.json | 0 {data_backup => data_source}/leetcode/73.json | 0 {data_backup => data_source}/leetcode/74.json | 0 {data_backup => data_source}/leetcode/75.json | 0 {data_backup => data_source}/leetcode/76.json | 0 {data_backup => data_source}/leetcode/77.json | 0 {data_backup => data_source}/leetcode/78.json | 0 {data_backup => data_source}/leetcode/79.json | 0 {data_backup => data_source}/leetcode/8.json | 0 {data_backup => data_source}/leetcode/80.json | 0 {data_backup => data_source}/leetcode/81.json | 0 {data_backup => data_source}/leetcode/82.json | 0 {data_backup => data_source}/leetcode/83.json | 0 {data_backup => data_source}/leetcode/84.json | 0 {data_backup => data_source}/leetcode/85.json | 0 {data_backup => data_source}/leetcode/86.json | 0 {data_backup => data_source}/leetcode/87.json | 0 {data_backup => data_source}/leetcode/88.json | 0 {data_backup => data_source}/leetcode/89.json | 0 {data_backup => data_source}/leetcode/9.json | 0 {data_backup => data_source}/leetcode/90.json | 0 {data_backup => data_source}/leetcode/91.json | 0 {data_backup => data_source}/leetcode/92.json | 0 {data_backup => data_source}/leetcode/93.json | 0 {data_backup => data_source}/leetcode/94.json | 0 {data_backup => data_source}/leetcode/95.json | 0 {data_backup => data_source}/leetcode/96.json | 0 {data_backup => data_source}/leetcode/97.json | 0 {data_backup => data_source}/leetcode/98.json | 0 {data_backup => data_source}/leetcode/99.json | 0 .../python_code_json/0.json | 0 .../python_code_json/1.json | 0 .../python_code_json/10.json | 0 .../python_code_json/11.json | 0 .../python_code_json/12.json | 0 .../python_code_json/13.json | 0 .../python_code_json/14.json | 0 .../python_code_json/15.json | 0 .../python_code_json/16.json | 0 .../python_code_json/17.json | 0 .../python_code_json/18.json | 0 .../python_code_json/19.json | 0 .../python_code_json/2.json | 0 .../python_code_json/20.json | 0 .../python_code_json/21.json | 0 .../python_code_json/22.json | 0 .../python_code_json/23.json | 0 .../python_code_json/24.json | 0 .../python_code_json/25.json | 0 .../python_code_json/26.json | 0 .../python_code_json/27.json | 0 .../python_code_json/28.json | 0 .../python_code_json/29.json | 0 .../python_code_json/3.json | 0 .../python_code_json/30.json | 0 .../python_code_json/31.json | 0 .../python_code_json/32.json | 0 .../python_code_json/33.json | 0 .../python_code_json/34.json | 0 .../python_code_json/35.json | 0 .../python_code_json/36.json | 0 .../python_code_json/37.json | 0 .../python_code_json/38.json | 0 .../python_code_json/39.json | 0 .../python_code_json/4.json | 0 .../python_code_json/40.json | 0 .../python_code_json/41.json | 0 .../python_code_json/42.json | 0 .../python_code_json/43.json | 0 .../python_code_json/44.json | 0 .../python_code_json/45.json | 0 .../python_code_json/46.json | 0 .../python_code_json/47.json | 0 .../python_code_json/48.json | 0 .../python_code_json/49.json | 0 .../python_code_json/5.json | 0 .../python_code_json/50.json | 0 .../python_code_json/6.json | 0 .../python_code_json/7.json | 0 .../python_code_json/8.json | 0 .../python_code_json/9.json | 0 1644 files changed, 47579 insertions(+) rename {data_backup => data_source}/cpp_code_json/0.json (100%) rename {data_backup => data_source}/cpp_code_json/1.json (100%) rename {data_backup => data_source}/cpp_code_json/10.json (100%) rename {data_backup => data_source}/cpp_code_json/100.json (100%) rename {data_backup => data_source}/cpp_code_json/101.json (100%) rename {data_backup => data_source}/cpp_code_json/102.json (100%) rename {data_backup => data_source}/cpp_code_json/103.json (100%) rename {data_backup => data_source}/cpp_code_json/104.json (100%) rename {data_backup => data_source}/cpp_code_json/105.json (100%) rename {data_backup => data_source}/cpp_code_json/106.json (100%) rename {data_backup => data_source}/cpp_code_json/107.json (100%) rename {data_backup => data_source}/cpp_code_json/108.json (100%) rename {data_backup => data_source}/cpp_code_json/109.json (100%) rename {data_backup => data_source}/cpp_code_json/11.json (100%) rename {data_backup => data_source}/cpp_code_json/110.json (100%) rename {data_backup => data_source}/cpp_code_json/111.json (100%) rename {data_backup => data_source}/cpp_code_json/112.json (100%) rename {data_backup => data_source}/cpp_code_json/113.json (100%) rename {data_backup => data_source}/cpp_code_json/114.json (100%) rename {data_backup => data_source}/cpp_code_json/115.json (100%) rename {data_backup => data_source}/cpp_code_json/116.json (100%) rename {data_backup => data_source}/cpp_code_json/117.json (100%) rename {data_backup => data_source}/cpp_code_json/118.json (100%) rename {data_backup => data_source}/cpp_code_json/119.json (100%) rename {data_backup => data_source}/cpp_code_json/12.json (100%) rename {data_backup => data_source}/cpp_code_json/120.json (100%) rename {data_backup => data_source}/cpp_code_json/121.json (100%) rename {data_backup => data_source}/cpp_code_json/122.json (100%) rename {data_backup => data_source}/cpp_code_json/123.json (100%) rename {data_backup => data_source}/cpp_code_json/124.json (100%) rename {data_backup => data_source}/cpp_code_json/125.json (100%) rename {data_backup => data_source}/cpp_code_json/126.json (100%) rename {data_backup => data_source}/cpp_code_json/127.json (100%) rename {data_backup => data_source}/cpp_code_json/128.json (100%) rename {data_backup => data_source}/cpp_code_json/129.json (100%) rename {data_backup => data_source}/cpp_code_json/13.json (100%) rename {data_backup => data_source}/cpp_code_json/130.json (100%) rename {data_backup => data_source}/cpp_code_json/131.json (100%) rename {data_backup => data_source}/cpp_code_json/132.json (100%) rename {data_backup => data_source}/cpp_code_json/133.json (100%) rename {data_backup => data_source}/cpp_code_json/134.json (100%) rename {data_backup => data_source}/cpp_code_json/135.json (100%) rename {data_backup => data_source}/cpp_code_json/136.json (100%) rename {data_backup => data_source}/cpp_code_json/137.json (100%) rename {data_backup => data_source}/cpp_code_json/138.json (100%) rename {data_backup => data_source}/cpp_code_json/139.json (100%) rename {data_backup => data_source}/cpp_code_json/14.json (100%) rename {data_backup => data_source}/cpp_code_json/140.json (100%) rename {data_backup => data_source}/cpp_code_json/141.json (100%) rename {data_backup => data_source}/cpp_code_json/142.json (100%) rename {data_backup => data_source}/cpp_code_json/143.json (100%) rename {data_backup => data_source}/cpp_code_json/144.json (100%) rename {data_backup => data_source}/cpp_code_json/15.json (100%) rename {data_backup => data_source}/cpp_code_json/16.json (100%) rename {data_backup => data_source}/cpp_code_json/17.json (100%) rename {data_backup => data_source}/cpp_code_json/18.json (100%) rename {data_backup => data_source}/cpp_code_json/19.json (100%) rename {data_backup => data_source}/cpp_code_json/2.json (100%) rename {data_backup => data_source}/cpp_code_json/20.json (100%) rename {data_backup => data_source}/cpp_code_json/21.json (100%) rename {data_backup => data_source}/cpp_code_json/22.json (100%) rename {data_backup => data_source}/cpp_code_json/23.json (100%) rename {data_backup => data_source}/cpp_code_json/24.json (100%) rename {data_backup => data_source}/cpp_code_json/25.json (100%) rename {data_backup => data_source}/cpp_code_json/26.json (100%) rename {data_backup => data_source}/cpp_code_json/27.json (100%) rename {data_backup => data_source}/cpp_code_json/28.json (100%) rename {data_backup => data_source}/cpp_code_json/29.json (100%) rename {data_backup => data_source}/cpp_code_json/3.json (100%) rename {data_backup => data_source}/cpp_code_json/30.json (100%) rename {data_backup => data_source}/cpp_code_json/31.json (100%) rename {data_backup => data_source}/cpp_code_json/32.json (100%) rename {data_backup => data_source}/cpp_code_json/33.json (100%) rename {data_backup => data_source}/cpp_code_json/34.json (100%) rename {data_backup => data_source}/cpp_code_json/35.json (100%) rename {data_backup => data_source}/cpp_code_json/36.json (100%) rename {data_backup => data_source}/cpp_code_json/37.json (100%) rename {data_backup => data_source}/cpp_code_json/38.json (100%) rename {data_backup => data_source}/cpp_code_json/39.json (100%) rename {data_backup => data_source}/cpp_code_json/4.json (100%) rename {data_backup => data_source}/cpp_code_json/40.json (100%) rename {data_backup => data_source}/cpp_code_json/41.json (100%) rename {data_backup => data_source}/cpp_code_json/42.json (100%) rename {data_backup => data_source}/cpp_code_json/43.json (100%) rename {data_backup => data_source}/cpp_code_json/44.json (100%) rename {data_backup => data_source}/cpp_code_json/45.json (100%) rename {data_backup => data_source}/cpp_code_json/46.json (100%) rename {data_backup => data_source}/cpp_code_json/47.json (100%) rename {data_backup => data_source}/cpp_code_json/48.json (100%) rename {data_backup => data_source}/cpp_code_json/49.json (100%) rename {data_backup => data_source}/cpp_code_json/5.json (100%) rename {data_backup => data_source}/cpp_code_json/50.json (100%) rename {data_backup => data_source}/cpp_code_json/51.json (100%) rename {data_backup => data_source}/cpp_code_json/52.json (100%) rename {data_backup => data_source}/cpp_code_json/53.json (100%) rename {data_backup => data_source}/cpp_code_json/54.json (100%) rename {data_backup => data_source}/cpp_code_json/55.json (100%) rename {data_backup => data_source}/cpp_code_json/56.json (100%) rename {data_backup => data_source}/cpp_code_json/57.json (100%) rename {data_backup => data_source}/cpp_code_json/58.json (100%) rename {data_backup => data_source}/cpp_code_json/59.json (100%) rename {data_backup => data_source}/cpp_code_json/6.json (100%) rename {data_backup => data_source}/cpp_code_json/60.json (100%) rename {data_backup => data_source}/cpp_code_json/61.json (100%) rename {data_backup => data_source}/cpp_code_json/62.json (100%) rename {data_backup => data_source}/cpp_code_json/63.json (100%) rename {data_backup => data_source}/cpp_code_json/64.json (100%) rename {data_backup => data_source}/cpp_code_json/65.json (100%) rename {data_backup => data_source}/cpp_code_json/66.json (100%) rename {data_backup => data_source}/cpp_code_json/67.json (100%) rename {data_backup => data_source}/cpp_code_json/68.json (100%) rename {data_backup => data_source}/cpp_code_json/69.json (100%) rename {data_backup => data_source}/cpp_code_json/7.json (100%) rename {data_backup => data_source}/cpp_code_json/70.json (100%) rename {data_backup => data_source}/cpp_code_json/71.json (100%) rename {data_backup => data_source}/cpp_code_json/72.json (100%) rename {data_backup => data_source}/cpp_code_json/73.json (100%) rename {data_backup => data_source}/cpp_code_json/74.json (100%) rename {data_backup => data_source}/cpp_code_json/75.json (100%) rename {data_backup => data_source}/cpp_code_json/76.json (100%) rename {data_backup => data_source}/cpp_code_json/77.json (100%) rename {data_backup => data_source}/cpp_code_json/78.json (100%) rename {data_backup => data_source}/cpp_code_json/79.json (100%) rename {data_backup => data_source}/cpp_code_json/8.json (100%) rename {data_backup => data_source}/cpp_code_json/80.json (100%) rename {data_backup => data_source}/cpp_code_json/81.json (100%) rename {data_backup => data_source}/cpp_code_json/82.json (100%) rename {data_backup => data_source}/cpp_code_json/83.json (100%) rename {data_backup => data_source}/cpp_code_json/84.json (100%) rename {data_backup => data_source}/cpp_code_json/85.json (100%) rename {data_backup => data_source}/cpp_code_json/86.json (100%) rename {data_backup => data_source}/cpp_code_json/87.json (100%) rename {data_backup => data_source}/cpp_code_json/88.json (100%) rename {data_backup => data_source}/cpp_code_json/89.json (100%) rename {data_backup => data_source}/cpp_code_json/9.json (100%) rename {data_backup => data_source}/cpp_code_json/90.json (100%) rename {data_backup => data_source}/cpp_code_json/91.json (100%) rename {data_backup => data_source}/cpp_code_json/92.json (100%) rename {data_backup => data_source}/cpp_code_json/93.json (100%) rename {data_backup => data_source}/cpp_code_json/94.json (100%) rename {data_backup => data_source}/cpp_code_json/95.json (100%) rename {data_backup => data_source}/cpp_code_json/96.json (100%) rename {data_backup => data_source}/cpp_code_json/97.json (100%) rename {data_backup => data_source}/cpp_code_json/98.json (100%) rename {data_backup => data_source}/cpp_code_json/99.json (100%) create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/1.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/1.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/10.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/10.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/11.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/11.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/12.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/12.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/13.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/13.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/14.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/14.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/15.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/15.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/16.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/16.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/17.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/17.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/18.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/18.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/19.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/19.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/2.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/2.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/20.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/20.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/21.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/21.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/22.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/22.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/23.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/23.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/24.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/24.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/25.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/25.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/26.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/26.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/27.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/27.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/28.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/28.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/29.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/29.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/3.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/3.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/30.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/30.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/31.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/31.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/32.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/32.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/33.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/33.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/34.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/34.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/35.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/35.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/36.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/36.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/37.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/37.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/38.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/38.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/39.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/39.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/4.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/4.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/40.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/40.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/41.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/41.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/42.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/42.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/43.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/43.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/44.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/44.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/45.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/45.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/46.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/46.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/47.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/47.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/48.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/48.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/49.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/49.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/5.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/5.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/50.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/50.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/51.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/51.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/52.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/52.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/53.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/53.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/54.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/54.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/55.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/55.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/56.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/56.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/57.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/57.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/58.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/58.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/59.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/59.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/6.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/6.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/60.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/60.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/61.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/61.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/62.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/62.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/63.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/63.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/64.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/64.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/65.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/65.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/66.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/66.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/67.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/67.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/68.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/68.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/69.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/69.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/7.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/7.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/70.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/70.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/71.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/71.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/72.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/72.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/73.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/73.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/74.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/74.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/75.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/75.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/76.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/76.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/77.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/77.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/78.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/78.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/79.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/79.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/8.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/8.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/80.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/80.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/81.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/81.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/82.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/82.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/83.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/83.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/84.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/84.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/85.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/85.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/86.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/86.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/87.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/87.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/88.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/88.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/89.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/89.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/9.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/9.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/90.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/90.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/91.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/91.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/92.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/92.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/93.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/93.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/94.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/94.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/95.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/95.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/96.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/96.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/97.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/97.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/1.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/1.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/10.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/10.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/11.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/11.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/12.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/12.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/13.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/13.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/14.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/14.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/15.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/15.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/16.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/16.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/17.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/17.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/18.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/18.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/19.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/19.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/2.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/2.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/20.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/20.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/21.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/21.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/22.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/22.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/23.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/23.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/24.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/24.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/25.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/25.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/26.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/26.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/27.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/27.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/28.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/28.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/29.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/29.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/3.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/3.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/30.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/30.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/31.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/31.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/32.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/32.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/33.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/33.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/34.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/34.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/35.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/35.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/36.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/36.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/37.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/37.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/38.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/38.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/39.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/39.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/4.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/4.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/40.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/40.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/41.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/41.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/42.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/42.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/43.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/43.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/44.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/44.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/45.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/45.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/46.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/46.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/47.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/47.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/48.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/48.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/5.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/5.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/6.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/6.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/7.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/7.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/8.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/8.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/9.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/9.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/1.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/1.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/10.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/10.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/11.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/11.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/12.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/12.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/13.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/13.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/14.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/14.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/15.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/15.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/16.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/16.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/17.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/17.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/18.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/18.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/19.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/19.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/2.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/2.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/20.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/20.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/21.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/21.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/22.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/22.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/23.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/23.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/24.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/24.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/25.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/25.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/26.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/26.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/27.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/27.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/28.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/28.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/29.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/29.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/3.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/3.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/30.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/30.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/31.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/31.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/32.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/32.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/33.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/33.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/34.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/34.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/35.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/35.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/36.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/36.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/37.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/37.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/38.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/38.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/39.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/39.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/4.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/4.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/40.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/40.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/41.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/41.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/42.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/42.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/43.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/43.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/44.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/44.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/45.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/45.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/46.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/46.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/47.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/47.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/48.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/48.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/5.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/5.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/6.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/6.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/7.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/7.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/8.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/8.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/9.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/9.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/1.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/1.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/10.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/10.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/100.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/100.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/101.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/101.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/102.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/102.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/103.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/103.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/11.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/11.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/12.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/12.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/13.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/13.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/14.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/14.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/15.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/15.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/16.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/16.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/17.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/17.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/18.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/18.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/19.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/19.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/2.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/2.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/20.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/20.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/21.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/21.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/22.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/22.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/23.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/23.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/24.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/24.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/25.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/25.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/26.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/26.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/27.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/27.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/28.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/28.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/29.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/29.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/3.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/3.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/30.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/30.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/31.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/31.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/32.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/32.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/33.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/33.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/34.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/34.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/35.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/35.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/36.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/36.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/37.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/37.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/38.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/38.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/39.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/39.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/4.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/4.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/40.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/40.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/41.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/41.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/42.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/42.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/43.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/43.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/44.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/44.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/45.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/45.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/46.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/46.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/47.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/47.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/48.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/48.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/49.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/49.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/5.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/5.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/50.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/50.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/51.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/51.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/52.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/52.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/53.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/53.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/54.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/54.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/55.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/55.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/56.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/56.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/57.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/57.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/58.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/58.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/59.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/59.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/6.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/6.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/60.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/60.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/61.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/61.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/62.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/62.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/63.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/63.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/64.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/64.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/65.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/65.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/66.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/66.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/67.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/67.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/68.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/68.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/69.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/69.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/7.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/7.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/70.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/70.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/71.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/71.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/72.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/72.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/73.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/73.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/74.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/74.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/75.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/75.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/76.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/76.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/77.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/77.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/78.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/78.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/79.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/79.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/8.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/8.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/80.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/80.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/81.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/81.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/82.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/82.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/83.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/83.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/84.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/84.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/85.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/85.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/86.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/86.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/87.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/87.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/88.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/88.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/89.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/89.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/9.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/9.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/90.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/90.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/91.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/91.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/92.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/92.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/93.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/93.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/94.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/94.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/95.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/95.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/96.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/96.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/97.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/97.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/98.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/98.exercises/solution.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/99.exercises/config.json" create mode 100644 "data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/99.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/1.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/1.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/10.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/10.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/11.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/11.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/12.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/12.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/13.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/13.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/14.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/14.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/15.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/15.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/16.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/16.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/17.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/17.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/18.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/18.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/19.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/19.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/2.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/2.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/20.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/20.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/21.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/21.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/22.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/22.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/23.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/23.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/24.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/24.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/25.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/25.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/26.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/26.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/27.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/27.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/28.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/28.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/29.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/29.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/3.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/3.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/30.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/30.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/31.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/31.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/32.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/32.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/33.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/33.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/34.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/34.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/35.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/35.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/36.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/36.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/37.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/37.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/38.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/38.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/39.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/39.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/4.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/4.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/40.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/40.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/41.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/41.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/42.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/42.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/43.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/43.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/44.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/44.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/45.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/45.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/46.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/46.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/47.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/47.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/48.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/48.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/49.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/49.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/5.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/5.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/50.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/50.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/51.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/51.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/52.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/52.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/53.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/53.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/54.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/54.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/55.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/55.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/56.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/56.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/57.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/57.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/58.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/58.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/59.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/59.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/6.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/6.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/60.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/60.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/61.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/61.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/62.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/62.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/63.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/63.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/64.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/64.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/65.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/65.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/66.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/66.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/67.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/67.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/68.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/68.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/69.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/69.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/7.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/7.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/70.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/70.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/71.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/71.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/72.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/72.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/73.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/73.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/74.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/74.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/75.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/75.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/76.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/76.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/77.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/77.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/78.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/78.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/79.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/79.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/8.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/8.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/80.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/80.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/81.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/81.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/82.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/82.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/83.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/83.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/84.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/84.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/85.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/85.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/86.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/86.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/87.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/87.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/9.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/9.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/1.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/1.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/10.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/10.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/11.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/11.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/12.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/12.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/13.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/13.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/14.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/14.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/15.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/15.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/16.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/16.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/17.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/17.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/18.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/18.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/19.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/19.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/2.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/2.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/20.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/20.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/21.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/21.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/22.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/22.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/23.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/23.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/24.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/24.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/25.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/25.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/26.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/26.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/27.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/27.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/28.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/28.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/29.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/29.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/3.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/3.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/30.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/30.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/31.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/31.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/32.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/32.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/33.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/33.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/34.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/34.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/35.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/35.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/36.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/36.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/37.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/37.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/38.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/38.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/39.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/39.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/4.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/4.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/40.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/40.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/41.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/41.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/42.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/42.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/43.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/43.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/44.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/44.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/45.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/45.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/46.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/46.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/47.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/47.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/48.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/48.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/49.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/49.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/5.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/5.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/50.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/50.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/51.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/51.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/52.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/52.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/53.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/53.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/54.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/54.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/55.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/55.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/56.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/56.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/57.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/57.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/58.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/58.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/59.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/59.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/6.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/6.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/60.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/60.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/61.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/61.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/62.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/62.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/63.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/63.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/64.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/64.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/7.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/7.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/8.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/8.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/9.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/9.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/1.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/1.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/10.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/10.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/11.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/11.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/12.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/12.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/13.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/13.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/14.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/14.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/15.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/15.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/16.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/16.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/17.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/17.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/18.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/18.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/19.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/19.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/2.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/2.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/20.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/20.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/21.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/21.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/22.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/22.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/23.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/23.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/24.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/24.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/25.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/25.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/26.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/26.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/27.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/27.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/28.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/28.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/29.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/29.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/3.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/3.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/30.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/30.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/31.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/31.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/32.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/32.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/33.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/33.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/34.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/34.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/35.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/35.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/36.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/36.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/37.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/37.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/38.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/38.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/39.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/39.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/4.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/4.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/40.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/40.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/41.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/41.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/42.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/42.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/43.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/43.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/44.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/44.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/45.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/45.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/46.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/46.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/47.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/47.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/48.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/48.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/49.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/49.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/5.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/5.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/50.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/50.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/51.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/51.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/52.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/52.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/53.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/53.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/54.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/54.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/55.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/55.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/56.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/56.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/57.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/57.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/58.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/58.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/59.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/59.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/6.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/6.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/60.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/60.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/61.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/61.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/62.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/62.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/63.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/63.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/7.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/7.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/8.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/8.exercises/solution.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/9.exercises/config.json" create mode 100644 "data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/9.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/1.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/1.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/10.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/10.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/11.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/11.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/12.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/12.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/13.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/13.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/14.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/14.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/15.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/15.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/16.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/16.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/17.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/17.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/18.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/18.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/19.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/19.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/2.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/2.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/20.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/20.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/21.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/21.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/22.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/22.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/23.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/23.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/24.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/24.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/25.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/25.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/26.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/26.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/27.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/27.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/28.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/28.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/29.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/29.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/3.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/3.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/30.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/30.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/31.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/31.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/32.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/32.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/33.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/33.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/34.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/34.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/35.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/35.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/36.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/36.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/37.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/37.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/38.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/38.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/39.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/39.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/4.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/4.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/40.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/40.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/5.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/5.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/6.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/6.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/7.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/7.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/8.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/8.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/9.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/9.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/1.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/1.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/10.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/10.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/11.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/11.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/12.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/12.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/13.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/13.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/14.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/14.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/15.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/15.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/16.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/16.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/17.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/17.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/18.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/18.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/19.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/19.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/2.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/2.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/20.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/20.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/3.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/3.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/4.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/4.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/5.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/5.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/6.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/6.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/7.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/7.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/8.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/8.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/9.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/9.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/1.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/1.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/10.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/10.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/11.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/11.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/12.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/12.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/13.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/13.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/14.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/14.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/15.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/15.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/16.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/16.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/17.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/17.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/18.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/18.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/19.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/19.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/2.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/2.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/20.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/20.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/21.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/21.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/3.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/3.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/4.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/4.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/5.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/5.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/6.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/6.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/7.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/7.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/8.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/8.exercises/solution.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/9.exercises/config.json" create mode 100644 "data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/9.exercises/solution.json" create mode 100644 data_source/dailycode/tree.json rename {data_backup => data_source}/it_knowledge/0.md (100%) rename {data_backup => data_source}/it_knowledge/1.md (100%) rename {data_backup => data_source}/it_knowledge/10.md (100%) rename {data_backup => data_source}/it_knowledge/100.md (100%) rename {data_backup => data_source}/it_knowledge/101.md (100%) rename {data_backup => data_source}/it_knowledge/102.md (100%) rename {data_backup => data_source}/it_knowledge/103.md (100%) rename {data_backup => data_source}/it_knowledge/104.md (100%) rename {data_backup => data_source}/it_knowledge/105.md (100%) rename {data_backup => data_source}/it_knowledge/106.md (100%) rename {data_backup => data_source}/it_knowledge/107.md (100%) rename {data_backup => data_source}/it_knowledge/108.md (100%) rename {data_backup => data_source}/it_knowledge/109.md (100%) rename {data_backup => data_source}/it_knowledge/11.md (100%) rename {data_backup => data_source}/it_knowledge/110.md (100%) rename {data_backup => data_source}/it_knowledge/111.md (100%) rename {data_backup => data_source}/it_knowledge/112.md (100%) rename {data_backup => data_source}/it_knowledge/12.md (100%) rename {data_backup => data_source}/it_knowledge/13.md (100%) rename {data_backup => data_source}/it_knowledge/14.md (100%) rename {data_backup => data_source}/it_knowledge/15.md (100%) rename {data_backup => data_source}/it_knowledge/16.md (100%) rename {data_backup => data_source}/it_knowledge/17.md (100%) rename {data_backup => data_source}/it_knowledge/18.md (100%) rename {data_backup => data_source}/it_knowledge/19.md (100%) rename {data_backup => data_source}/it_knowledge/2.md (100%) rename {data_backup => data_source}/it_knowledge/20.md (100%) rename {data_backup => data_source}/it_knowledge/21.md (100%) rename {data_backup => data_source}/it_knowledge/22.md (100%) rename {data_backup => data_source}/it_knowledge/23.md (100%) rename {data_backup => data_source}/it_knowledge/24.md (100%) rename {data_backup => data_source}/it_knowledge/25.md (100%) rename {data_backup => data_source}/it_knowledge/26.md (100%) rename {data_backup => data_source}/it_knowledge/27.md (100%) rename {data_backup => data_source}/it_knowledge/28.md (100%) rename {data_backup => data_source}/it_knowledge/29.md (100%) rename {data_backup => data_source}/it_knowledge/3.md (100%) rename {data_backup => data_source}/it_knowledge/30.md (100%) rename {data_backup => data_source}/it_knowledge/31.md (100%) rename {data_backup => data_source}/it_knowledge/32.md (100%) rename {data_backup => data_source}/it_knowledge/33.md (100%) rename {data_backup => data_source}/it_knowledge/34.md (100%) rename {data_backup => data_source}/it_knowledge/35.md (100%) rename {data_backup => data_source}/it_knowledge/36.md (100%) rename {data_backup => data_source}/it_knowledge/37.md (100%) rename {data_backup => data_source}/it_knowledge/38.md (100%) rename {data_backup => data_source}/it_knowledge/39.md (100%) rename {data_backup => data_source}/it_knowledge/4.md (100%) rename {data_backup => data_source}/it_knowledge/40.md (100%) rename {data_backup => data_source}/it_knowledge/41.md (100%) rename {data_backup => data_source}/it_knowledge/42.md (100%) rename {data_backup => data_source}/it_knowledge/43.md (100%) rename {data_backup => data_source}/it_knowledge/44.md (100%) rename {data_backup => data_source}/it_knowledge/45.md (100%) rename {data_backup => data_source}/it_knowledge/46.md (100%) rename {data_backup => data_source}/it_knowledge/47.md (100%) rename {data_backup => data_source}/it_knowledge/48.md (100%) rename {data_backup => data_source}/it_knowledge/49.md (100%) rename {data_backup => data_source}/it_knowledge/5.md (100%) rename {data_backup => data_source}/it_knowledge/50.md (100%) rename {data_backup => data_source}/it_knowledge/51.md (100%) rename {data_backup => data_source}/it_knowledge/52.md (100%) rename {data_backup => data_source}/it_knowledge/53.md (100%) rename {data_backup => data_source}/it_knowledge/54.md (100%) rename {data_backup => data_source}/it_knowledge/55.md (100%) rename {data_backup => data_source}/it_knowledge/56.md (100%) rename {data_backup => data_source}/it_knowledge/57.md (100%) rename {data_backup => data_source}/it_knowledge/58.md (100%) rename {data_backup => data_source}/it_knowledge/59.md (100%) rename {data_backup => data_source}/it_knowledge/6.md (100%) rename {data_backup => data_source}/it_knowledge/60.md (100%) rename {data_backup => data_source}/it_knowledge/61.md (100%) rename {data_backup => data_source}/it_knowledge/62.md (100%) rename {data_backup => data_source}/it_knowledge/63.md (100%) rename {data_backup => data_source}/it_knowledge/64.md (100%) rename {data_backup => data_source}/it_knowledge/65.md (100%) rename {data_backup => data_source}/it_knowledge/66.md (100%) rename {data_backup => data_source}/it_knowledge/67.md (100%) rename {data_backup => data_source}/it_knowledge/68.md (100%) rename {data_backup => data_source}/it_knowledge/69.md (100%) rename {data_backup => data_source}/it_knowledge/7.md (100%) rename {data_backup => data_source}/it_knowledge/70.md (100%) rename {data_backup => data_source}/it_knowledge/71.md (100%) rename {data_backup => data_source}/it_knowledge/72.md (100%) rename {data_backup => data_source}/it_knowledge/73.md (100%) rename {data_backup => data_source}/it_knowledge/74.md (100%) rename {data_backup => data_source}/it_knowledge/75.md (100%) rename {data_backup => data_source}/it_knowledge/76.md (100%) rename {data_backup => data_source}/it_knowledge/77.md (100%) rename {data_backup => data_source}/it_knowledge/78.md (100%) rename {data_backup => data_source}/it_knowledge/79.md (100%) rename {data_backup => data_source}/it_knowledge/8.md (100%) rename {data_backup => data_source}/it_knowledge/80.md (100%) rename {data_backup => data_source}/it_knowledge/81.md (100%) rename {data_backup => data_source}/it_knowledge/82.md (100%) rename {data_backup => data_source}/it_knowledge/83.md (100%) rename {data_backup => data_source}/it_knowledge/84.md (100%) rename {data_backup => data_source}/it_knowledge/85.md (100%) rename {data_backup => data_source}/it_knowledge/86.md (100%) rename {data_backup => data_source}/it_knowledge/87.md (100%) rename {data_backup => data_source}/it_knowledge/88.md (100%) rename {data_backup => data_source}/it_knowledge/89.md (100%) rename {data_backup => data_source}/it_knowledge/9.md (100%) rename {data_backup => data_source}/it_knowledge/90.md (100%) rename {data_backup => data_source}/it_knowledge/91.md (100%) rename {data_backup => data_source}/it_knowledge/92.md (100%) rename {data_backup => data_source}/it_knowledge/93.md (100%) rename {data_backup => data_source}/it_knowledge/94.md (100%) rename {data_backup => data_source}/it_knowledge/95.md (100%) rename {data_backup => data_source}/it_knowledge/96.md (100%) rename {data_backup => data_source}/it_knowledge/97.md (100%) rename {data_backup => data_source}/it_knowledge/98.md (100%) rename {data_backup => data_source}/it_knowledge/99.md (100%) rename {data_backup => data_source}/it_mapping.json (100%) rename {data_backup => data_source}/java_code_json/0.json (100%) rename {data_backup => data_source}/java_code_json/1.json (100%) rename {data_backup => data_source}/java_code_json/10.json (100%) rename {data_backup => data_source}/java_code_json/11.json (100%) rename {data_backup => data_source}/java_code_json/12.json (100%) rename {data_backup => data_source}/java_code_json/13.json (100%) rename {data_backup => data_source}/java_code_json/14.json (100%) rename {data_backup => data_source}/java_code_json/15.json (100%) rename {data_backup => data_source}/java_code_json/16.json (100%) rename {data_backup => data_source}/java_code_json/17.json (100%) rename {data_backup => data_source}/java_code_json/18.json (100%) rename {data_backup => data_source}/java_code_json/19.json (100%) rename {data_backup => data_source}/java_code_json/2.json (100%) rename {data_backup => data_source}/java_code_json/20.json (100%) rename {data_backup => data_source}/java_code_json/21.json (100%) rename {data_backup => data_source}/java_code_json/22.json (100%) rename {data_backup => data_source}/java_code_json/23.json (100%) rename {data_backup => data_source}/java_code_json/24.json (100%) rename {data_backup => data_source}/java_code_json/25.json (100%) rename {data_backup => data_source}/java_code_json/26.json (100%) rename {data_backup => data_source}/java_code_json/27.json (100%) rename {data_backup => data_source}/java_code_json/28.json (100%) rename {data_backup => data_source}/java_code_json/29.json (100%) rename {data_backup => data_source}/java_code_json/3.json (100%) rename {data_backup => data_source}/java_code_json/30.json (100%) rename {data_backup => data_source}/java_code_json/31.json (100%) rename {data_backup => data_source}/java_code_json/32.json (100%) rename {data_backup => data_source}/java_code_json/33.json (100%) rename {data_backup => data_source}/java_code_json/34.json (100%) rename {data_backup => data_source}/java_code_json/35.json (100%) rename {data_backup => data_source}/java_code_json/36.json (100%) rename {data_backup => data_source}/java_code_json/37.json (100%) rename {data_backup => data_source}/java_code_json/38.json (100%) rename {data_backup => data_source}/java_code_json/39.json (100%) rename {data_backup => data_source}/java_code_json/4.json (100%) rename {data_backup => data_source}/java_code_json/40.json (100%) rename {data_backup => data_source}/java_code_json/41.json (100%) rename {data_backup => data_source}/java_code_json/42.json (100%) rename {data_backup => data_source}/java_code_json/43.json (100%) rename {data_backup => data_source}/java_code_json/44.json (100%) rename {data_backup => data_source}/java_code_json/45.json (100%) rename {data_backup => data_source}/java_code_json/46.json (100%) rename {data_backup => data_source}/java_code_json/47.json (100%) rename {data_backup => data_source}/java_code_json/48.json (100%) rename {data_backup => data_source}/java_code_json/49.json (100%) rename {data_backup => data_source}/java_code_json/5.json (100%) rename {data_backup => data_source}/java_code_json/50.json (100%) rename {data_backup => data_source}/java_code_json/6.json (100%) rename {data_backup => data_source}/java_code_json/7.json (100%) rename {data_backup => data_source}/java_code_json/8.json (100%) rename {data_backup => data_source}/java_code_json/9.json (100%) rename {data_backup => data_source}/leetcode/0.json (100%) rename {data_backup => data_source}/leetcode/1.json (100%) rename {data_backup => data_source}/leetcode/10.json (100%) rename {data_backup => data_source}/leetcode/11.json (100%) rename {data_backup => data_source}/leetcode/12.json (100%) rename {data_backup => data_source}/leetcode/13.json (100%) rename {data_backup => data_source}/leetcode/14.json (100%) rename {data_backup => data_source}/leetcode/15.json (100%) rename {data_backup => data_source}/leetcode/16.json (100%) rename {data_backup => data_source}/leetcode/17.json (100%) rename {data_backup => data_source}/leetcode/18.json (100%) rename {data_backup => data_source}/leetcode/19.json (100%) rename {data_backup => data_source}/leetcode/2.json (100%) rename {data_backup => data_source}/leetcode/20.json (100%) rename {data_backup => data_source}/leetcode/21.json (100%) rename {data_backup => data_source}/leetcode/22.json (100%) rename {data_backup => data_source}/leetcode/23.json (100%) rename {data_backup => data_source}/leetcode/24.json (100%) rename {data_backup => data_source}/leetcode/25.json (100%) rename {data_backup => data_source}/leetcode/26.json (100%) rename {data_backup => data_source}/leetcode/27.json (100%) rename {data_backup => data_source}/leetcode/28.json (100%) rename {data_backup => data_source}/leetcode/29.json (100%) rename {data_backup => data_source}/leetcode/3.json (100%) rename {data_backup => data_source}/leetcode/30.json (100%) rename {data_backup => data_source}/leetcode/31.json (100%) rename {data_backup => data_source}/leetcode/32.json (100%) rename {data_backup => data_source}/leetcode/33.json (100%) rename {data_backup => data_source}/leetcode/34.json (100%) rename {data_backup => data_source}/leetcode/35.json (100%) rename {data_backup => data_source}/leetcode/36.json (100%) rename {data_backup => data_source}/leetcode/37.json (100%) rename {data_backup => data_source}/leetcode/38.json (100%) rename {data_backup => data_source}/leetcode/39.json (100%) rename {data_backup => data_source}/leetcode/4.json (100%) rename {data_backup => data_source}/leetcode/40.json (100%) rename {data_backup => data_source}/leetcode/41.json (100%) rename {data_backup => data_source}/leetcode/42.json (100%) rename {data_backup => data_source}/leetcode/43.json (100%) rename {data_backup => data_source}/leetcode/44.json (100%) rename {data_backup => data_source}/leetcode/45.json (100%) rename {data_backup => data_source}/leetcode/46.json (100%) rename {data_backup => data_source}/leetcode/47.json (100%) rename {data_backup => data_source}/leetcode/48.json (100%) rename {data_backup => data_source}/leetcode/49.json (100%) rename {data_backup => data_source}/leetcode/5.json (100%) rename {data_backup => data_source}/leetcode/50.json (100%) rename {data_backup => data_source}/leetcode/51.json (100%) rename {data_backup => data_source}/leetcode/52.json (100%) rename {data_backup => data_source}/leetcode/53.json (100%) rename {data_backup => data_source}/leetcode/54.json (100%) rename {data_backup => data_source}/leetcode/55.json (100%) rename {data_backup => data_source}/leetcode/56.json (100%) rename {data_backup => data_source}/leetcode/57.json (100%) rename {data_backup => data_source}/leetcode/58.json (100%) rename {data_backup => data_source}/leetcode/59.json (100%) rename {data_backup => data_source}/leetcode/6.json (100%) rename {data_backup => data_source}/leetcode/60.json (100%) rename {data_backup => data_source}/leetcode/61.json (100%) rename {data_backup => data_source}/leetcode/62.json (100%) rename {data_backup => data_source}/leetcode/63.json (100%) rename {data_backup => data_source}/leetcode/64.json (100%) rename {data_backup => data_source}/leetcode/65.json (100%) rename {data_backup => data_source}/leetcode/66.json (100%) rename {data_backup => data_source}/leetcode/67.json (100%) rename {data_backup => data_source}/leetcode/68.json (100%) rename {data_backup => data_source}/leetcode/69.json (100%) rename {data_backup => data_source}/leetcode/7.json (100%) rename {data_backup => data_source}/leetcode/70.json (100%) rename {data_backup => data_source}/leetcode/71.json (100%) rename {data_backup => data_source}/leetcode/72.json (100%) rename {data_backup => data_source}/leetcode/73.json (100%) rename {data_backup => data_source}/leetcode/74.json (100%) rename {data_backup => data_source}/leetcode/75.json (100%) rename {data_backup => data_source}/leetcode/76.json (100%) rename {data_backup => data_source}/leetcode/77.json (100%) rename {data_backup => data_source}/leetcode/78.json (100%) rename {data_backup => data_source}/leetcode/79.json (100%) rename {data_backup => data_source}/leetcode/8.json (100%) rename {data_backup => data_source}/leetcode/80.json (100%) rename {data_backup => data_source}/leetcode/81.json (100%) rename {data_backup => data_source}/leetcode/82.json (100%) rename {data_backup => data_source}/leetcode/83.json (100%) rename {data_backup => data_source}/leetcode/84.json (100%) rename {data_backup => data_source}/leetcode/85.json (100%) rename {data_backup => data_source}/leetcode/86.json (100%) rename {data_backup => data_source}/leetcode/87.json (100%) rename {data_backup => data_source}/leetcode/88.json (100%) rename {data_backup => data_source}/leetcode/89.json (100%) rename {data_backup => data_source}/leetcode/9.json (100%) rename {data_backup => data_source}/leetcode/90.json (100%) rename {data_backup => data_source}/leetcode/91.json (100%) rename {data_backup => data_source}/leetcode/92.json (100%) rename {data_backup => data_source}/leetcode/93.json (100%) rename {data_backup => data_source}/leetcode/94.json (100%) rename {data_backup => data_source}/leetcode/95.json (100%) rename {data_backup => data_source}/leetcode/96.json (100%) rename {data_backup => data_source}/leetcode/97.json (100%) rename {data_backup => data_source}/leetcode/98.json (100%) rename {data_backup => data_source}/leetcode/99.json (100%) rename {data_backup => data_source}/python_code_json/0.json (100%) rename {data_backup => data_source}/python_code_json/1.json (100%) rename {data_backup => data_source}/python_code_json/10.json (100%) rename {data_backup => data_source}/python_code_json/11.json (100%) rename {data_backup => data_source}/python_code_json/12.json (100%) rename {data_backup => data_source}/python_code_json/13.json (100%) rename {data_backup => data_source}/python_code_json/14.json (100%) rename {data_backup => data_source}/python_code_json/15.json (100%) rename {data_backup => data_source}/python_code_json/16.json (100%) rename {data_backup => data_source}/python_code_json/17.json (100%) rename {data_backup => data_source}/python_code_json/18.json (100%) rename {data_backup => data_source}/python_code_json/19.json (100%) rename {data_backup => data_source}/python_code_json/2.json (100%) rename {data_backup => data_source}/python_code_json/20.json (100%) rename {data_backup => data_source}/python_code_json/21.json (100%) rename {data_backup => data_source}/python_code_json/22.json (100%) rename {data_backup => data_source}/python_code_json/23.json (100%) rename {data_backup => data_source}/python_code_json/24.json (100%) rename {data_backup => data_source}/python_code_json/25.json (100%) rename {data_backup => data_source}/python_code_json/26.json (100%) rename {data_backup => data_source}/python_code_json/27.json (100%) rename {data_backup => data_source}/python_code_json/28.json (100%) rename {data_backup => data_source}/python_code_json/29.json (100%) rename {data_backup => data_source}/python_code_json/3.json (100%) rename {data_backup => data_source}/python_code_json/30.json (100%) rename {data_backup => data_source}/python_code_json/31.json (100%) rename {data_backup => data_source}/python_code_json/32.json (100%) rename {data_backup => data_source}/python_code_json/33.json (100%) rename {data_backup => data_source}/python_code_json/34.json (100%) rename {data_backup => data_source}/python_code_json/35.json (100%) rename {data_backup => data_source}/python_code_json/36.json (100%) rename {data_backup => data_source}/python_code_json/37.json (100%) rename {data_backup => data_source}/python_code_json/38.json (100%) rename {data_backup => data_source}/python_code_json/39.json (100%) rename {data_backup => data_source}/python_code_json/4.json (100%) rename {data_backup => data_source}/python_code_json/40.json (100%) rename {data_backup => data_source}/python_code_json/41.json (100%) rename {data_backup => data_source}/python_code_json/42.json (100%) rename {data_backup => data_source}/python_code_json/43.json (100%) rename {data_backup => data_source}/python_code_json/44.json (100%) rename {data_backup => data_source}/python_code_json/45.json (100%) rename {data_backup => data_source}/python_code_json/46.json (100%) rename {data_backup => data_source}/python_code_json/47.json (100%) rename {data_backup => data_source}/python_code_json/48.json (100%) rename {data_backup => data_source}/python_code_json/49.json (100%) rename {data_backup => data_source}/python_code_json/5.json (100%) rename {data_backup => data_source}/python_code_json/50.json (100%) rename {data_backup => data_source}/python_code_json/6.json (100%) rename {data_backup => data_source}/python_code_json/7.json (100%) rename {data_backup => data_source}/python_code_json/8.json (100%) rename {data_backup => data_source}/python_code_json/9.json (100%) diff --git a/data_backup/cpp_code_json/0.json b/data_source/cpp_code_json/0.json similarity index 100% rename from data_backup/cpp_code_json/0.json rename to data_source/cpp_code_json/0.json diff --git a/data_backup/cpp_code_json/1.json b/data_source/cpp_code_json/1.json similarity index 100% rename from data_backup/cpp_code_json/1.json rename to data_source/cpp_code_json/1.json diff --git a/data_backup/cpp_code_json/10.json b/data_source/cpp_code_json/10.json similarity index 100% rename from data_backup/cpp_code_json/10.json rename to data_source/cpp_code_json/10.json diff --git a/data_backup/cpp_code_json/100.json b/data_source/cpp_code_json/100.json similarity index 100% rename from data_backup/cpp_code_json/100.json rename to data_source/cpp_code_json/100.json diff --git a/data_backup/cpp_code_json/101.json b/data_source/cpp_code_json/101.json similarity index 100% rename from data_backup/cpp_code_json/101.json rename to data_source/cpp_code_json/101.json diff --git a/data_backup/cpp_code_json/102.json b/data_source/cpp_code_json/102.json similarity index 100% rename from data_backup/cpp_code_json/102.json rename to data_source/cpp_code_json/102.json diff --git a/data_backup/cpp_code_json/103.json b/data_source/cpp_code_json/103.json similarity index 100% rename from data_backup/cpp_code_json/103.json rename to data_source/cpp_code_json/103.json diff --git a/data_backup/cpp_code_json/104.json b/data_source/cpp_code_json/104.json similarity index 100% rename from data_backup/cpp_code_json/104.json rename to data_source/cpp_code_json/104.json diff --git a/data_backup/cpp_code_json/105.json b/data_source/cpp_code_json/105.json similarity index 100% rename from data_backup/cpp_code_json/105.json rename to data_source/cpp_code_json/105.json diff --git a/data_backup/cpp_code_json/106.json b/data_source/cpp_code_json/106.json similarity index 100% rename from data_backup/cpp_code_json/106.json rename to data_source/cpp_code_json/106.json diff --git a/data_backup/cpp_code_json/107.json b/data_source/cpp_code_json/107.json similarity index 100% rename from data_backup/cpp_code_json/107.json rename to data_source/cpp_code_json/107.json diff --git a/data_backup/cpp_code_json/108.json b/data_source/cpp_code_json/108.json similarity index 100% rename from data_backup/cpp_code_json/108.json rename to data_source/cpp_code_json/108.json diff --git a/data_backup/cpp_code_json/109.json b/data_source/cpp_code_json/109.json similarity index 100% rename from data_backup/cpp_code_json/109.json rename to data_source/cpp_code_json/109.json diff --git a/data_backup/cpp_code_json/11.json b/data_source/cpp_code_json/11.json similarity index 100% rename from data_backup/cpp_code_json/11.json rename to data_source/cpp_code_json/11.json diff --git a/data_backup/cpp_code_json/110.json b/data_source/cpp_code_json/110.json similarity index 100% rename from data_backup/cpp_code_json/110.json rename to data_source/cpp_code_json/110.json diff --git a/data_backup/cpp_code_json/111.json b/data_source/cpp_code_json/111.json similarity index 100% rename from data_backup/cpp_code_json/111.json rename to data_source/cpp_code_json/111.json diff --git a/data_backup/cpp_code_json/112.json b/data_source/cpp_code_json/112.json similarity index 100% rename from data_backup/cpp_code_json/112.json rename to data_source/cpp_code_json/112.json diff --git a/data_backup/cpp_code_json/113.json b/data_source/cpp_code_json/113.json similarity index 100% rename from data_backup/cpp_code_json/113.json rename to data_source/cpp_code_json/113.json diff --git a/data_backup/cpp_code_json/114.json b/data_source/cpp_code_json/114.json similarity index 100% rename from data_backup/cpp_code_json/114.json rename to data_source/cpp_code_json/114.json diff --git a/data_backup/cpp_code_json/115.json b/data_source/cpp_code_json/115.json similarity index 100% rename from data_backup/cpp_code_json/115.json rename to data_source/cpp_code_json/115.json diff --git a/data_backup/cpp_code_json/116.json b/data_source/cpp_code_json/116.json similarity index 100% rename from data_backup/cpp_code_json/116.json rename to data_source/cpp_code_json/116.json diff --git a/data_backup/cpp_code_json/117.json b/data_source/cpp_code_json/117.json similarity index 100% rename from data_backup/cpp_code_json/117.json rename to data_source/cpp_code_json/117.json diff --git a/data_backup/cpp_code_json/118.json b/data_source/cpp_code_json/118.json similarity index 100% rename from data_backup/cpp_code_json/118.json rename to data_source/cpp_code_json/118.json diff --git a/data_backup/cpp_code_json/119.json b/data_source/cpp_code_json/119.json similarity index 100% rename from data_backup/cpp_code_json/119.json rename to data_source/cpp_code_json/119.json diff --git a/data_backup/cpp_code_json/12.json b/data_source/cpp_code_json/12.json similarity index 100% rename from data_backup/cpp_code_json/12.json rename to data_source/cpp_code_json/12.json diff --git a/data_backup/cpp_code_json/120.json b/data_source/cpp_code_json/120.json similarity index 100% rename from data_backup/cpp_code_json/120.json rename to data_source/cpp_code_json/120.json diff --git a/data_backup/cpp_code_json/121.json b/data_source/cpp_code_json/121.json similarity index 100% rename from data_backup/cpp_code_json/121.json rename to data_source/cpp_code_json/121.json diff --git a/data_backup/cpp_code_json/122.json b/data_source/cpp_code_json/122.json similarity index 100% rename from data_backup/cpp_code_json/122.json rename to data_source/cpp_code_json/122.json diff --git a/data_backup/cpp_code_json/123.json b/data_source/cpp_code_json/123.json similarity index 100% rename from data_backup/cpp_code_json/123.json rename to data_source/cpp_code_json/123.json diff --git a/data_backup/cpp_code_json/124.json b/data_source/cpp_code_json/124.json similarity index 100% rename from data_backup/cpp_code_json/124.json rename to data_source/cpp_code_json/124.json diff --git a/data_backup/cpp_code_json/125.json b/data_source/cpp_code_json/125.json similarity index 100% rename from data_backup/cpp_code_json/125.json rename to data_source/cpp_code_json/125.json diff --git a/data_backup/cpp_code_json/126.json b/data_source/cpp_code_json/126.json similarity index 100% rename from data_backup/cpp_code_json/126.json rename to data_source/cpp_code_json/126.json diff --git a/data_backup/cpp_code_json/127.json b/data_source/cpp_code_json/127.json similarity index 100% rename from data_backup/cpp_code_json/127.json rename to data_source/cpp_code_json/127.json diff --git a/data_backup/cpp_code_json/128.json b/data_source/cpp_code_json/128.json similarity index 100% rename from data_backup/cpp_code_json/128.json rename to data_source/cpp_code_json/128.json diff --git a/data_backup/cpp_code_json/129.json b/data_source/cpp_code_json/129.json similarity index 100% rename from data_backup/cpp_code_json/129.json rename to data_source/cpp_code_json/129.json diff --git a/data_backup/cpp_code_json/13.json b/data_source/cpp_code_json/13.json similarity index 100% rename from data_backup/cpp_code_json/13.json rename to data_source/cpp_code_json/13.json diff --git a/data_backup/cpp_code_json/130.json b/data_source/cpp_code_json/130.json similarity index 100% rename from data_backup/cpp_code_json/130.json rename to data_source/cpp_code_json/130.json diff --git a/data_backup/cpp_code_json/131.json b/data_source/cpp_code_json/131.json similarity index 100% rename from data_backup/cpp_code_json/131.json rename to data_source/cpp_code_json/131.json diff --git a/data_backup/cpp_code_json/132.json b/data_source/cpp_code_json/132.json similarity index 100% rename from data_backup/cpp_code_json/132.json rename to data_source/cpp_code_json/132.json diff --git a/data_backup/cpp_code_json/133.json b/data_source/cpp_code_json/133.json similarity index 100% rename from data_backup/cpp_code_json/133.json rename to data_source/cpp_code_json/133.json diff --git a/data_backup/cpp_code_json/134.json b/data_source/cpp_code_json/134.json similarity index 100% rename from data_backup/cpp_code_json/134.json rename to data_source/cpp_code_json/134.json diff --git a/data_backup/cpp_code_json/135.json b/data_source/cpp_code_json/135.json similarity index 100% rename from data_backup/cpp_code_json/135.json rename to data_source/cpp_code_json/135.json diff --git a/data_backup/cpp_code_json/136.json b/data_source/cpp_code_json/136.json similarity index 100% rename from data_backup/cpp_code_json/136.json rename to data_source/cpp_code_json/136.json diff --git a/data_backup/cpp_code_json/137.json b/data_source/cpp_code_json/137.json similarity index 100% rename from data_backup/cpp_code_json/137.json rename to data_source/cpp_code_json/137.json diff --git a/data_backup/cpp_code_json/138.json b/data_source/cpp_code_json/138.json similarity index 100% rename from data_backup/cpp_code_json/138.json rename to data_source/cpp_code_json/138.json diff --git a/data_backup/cpp_code_json/139.json b/data_source/cpp_code_json/139.json similarity index 100% rename from data_backup/cpp_code_json/139.json rename to data_source/cpp_code_json/139.json diff --git a/data_backup/cpp_code_json/14.json b/data_source/cpp_code_json/14.json similarity index 100% rename from data_backup/cpp_code_json/14.json rename to data_source/cpp_code_json/14.json diff --git a/data_backup/cpp_code_json/140.json b/data_source/cpp_code_json/140.json similarity index 100% rename from data_backup/cpp_code_json/140.json rename to data_source/cpp_code_json/140.json diff --git a/data_backup/cpp_code_json/141.json b/data_source/cpp_code_json/141.json similarity index 100% rename from data_backup/cpp_code_json/141.json rename to data_source/cpp_code_json/141.json diff --git a/data_backup/cpp_code_json/142.json b/data_source/cpp_code_json/142.json similarity index 100% rename from data_backup/cpp_code_json/142.json rename to data_source/cpp_code_json/142.json diff --git a/data_backup/cpp_code_json/143.json b/data_source/cpp_code_json/143.json similarity index 100% rename from data_backup/cpp_code_json/143.json rename to data_source/cpp_code_json/143.json diff --git a/data_backup/cpp_code_json/144.json b/data_source/cpp_code_json/144.json similarity index 100% rename from data_backup/cpp_code_json/144.json rename to data_source/cpp_code_json/144.json diff --git a/data_backup/cpp_code_json/15.json b/data_source/cpp_code_json/15.json similarity index 100% rename from data_backup/cpp_code_json/15.json rename to data_source/cpp_code_json/15.json diff --git a/data_backup/cpp_code_json/16.json b/data_source/cpp_code_json/16.json similarity index 100% rename from data_backup/cpp_code_json/16.json rename to data_source/cpp_code_json/16.json diff --git a/data_backup/cpp_code_json/17.json b/data_source/cpp_code_json/17.json similarity index 100% rename from data_backup/cpp_code_json/17.json rename to data_source/cpp_code_json/17.json diff --git a/data_backup/cpp_code_json/18.json b/data_source/cpp_code_json/18.json similarity index 100% rename from data_backup/cpp_code_json/18.json rename to data_source/cpp_code_json/18.json diff --git a/data_backup/cpp_code_json/19.json b/data_source/cpp_code_json/19.json similarity index 100% rename from data_backup/cpp_code_json/19.json rename to data_source/cpp_code_json/19.json diff --git a/data_backup/cpp_code_json/2.json b/data_source/cpp_code_json/2.json similarity index 100% rename from data_backup/cpp_code_json/2.json rename to data_source/cpp_code_json/2.json diff --git a/data_backup/cpp_code_json/20.json b/data_source/cpp_code_json/20.json similarity index 100% rename from data_backup/cpp_code_json/20.json rename to data_source/cpp_code_json/20.json diff --git a/data_backup/cpp_code_json/21.json b/data_source/cpp_code_json/21.json similarity index 100% rename from data_backup/cpp_code_json/21.json rename to data_source/cpp_code_json/21.json diff --git a/data_backup/cpp_code_json/22.json b/data_source/cpp_code_json/22.json similarity index 100% rename from data_backup/cpp_code_json/22.json rename to data_source/cpp_code_json/22.json diff --git a/data_backup/cpp_code_json/23.json b/data_source/cpp_code_json/23.json similarity index 100% rename from data_backup/cpp_code_json/23.json rename to data_source/cpp_code_json/23.json diff --git a/data_backup/cpp_code_json/24.json b/data_source/cpp_code_json/24.json similarity index 100% rename from data_backup/cpp_code_json/24.json rename to data_source/cpp_code_json/24.json diff --git a/data_backup/cpp_code_json/25.json b/data_source/cpp_code_json/25.json similarity index 100% rename from data_backup/cpp_code_json/25.json rename to data_source/cpp_code_json/25.json diff --git a/data_backup/cpp_code_json/26.json b/data_source/cpp_code_json/26.json similarity index 100% rename from data_backup/cpp_code_json/26.json rename to data_source/cpp_code_json/26.json diff --git a/data_backup/cpp_code_json/27.json b/data_source/cpp_code_json/27.json similarity index 100% rename from data_backup/cpp_code_json/27.json rename to data_source/cpp_code_json/27.json diff --git a/data_backup/cpp_code_json/28.json b/data_source/cpp_code_json/28.json similarity index 100% rename from data_backup/cpp_code_json/28.json rename to data_source/cpp_code_json/28.json diff --git a/data_backup/cpp_code_json/29.json b/data_source/cpp_code_json/29.json similarity index 100% rename from data_backup/cpp_code_json/29.json rename to data_source/cpp_code_json/29.json diff --git a/data_backup/cpp_code_json/3.json b/data_source/cpp_code_json/3.json similarity index 100% rename from data_backup/cpp_code_json/3.json rename to data_source/cpp_code_json/3.json diff --git a/data_backup/cpp_code_json/30.json b/data_source/cpp_code_json/30.json similarity index 100% rename from data_backup/cpp_code_json/30.json rename to data_source/cpp_code_json/30.json diff --git a/data_backup/cpp_code_json/31.json b/data_source/cpp_code_json/31.json similarity index 100% rename from data_backup/cpp_code_json/31.json rename to data_source/cpp_code_json/31.json diff --git a/data_backup/cpp_code_json/32.json b/data_source/cpp_code_json/32.json similarity index 100% rename from data_backup/cpp_code_json/32.json rename to data_source/cpp_code_json/32.json diff --git a/data_backup/cpp_code_json/33.json b/data_source/cpp_code_json/33.json similarity index 100% rename from data_backup/cpp_code_json/33.json rename to data_source/cpp_code_json/33.json diff --git a/data_backup/cpp_code_json/34.json b/data_source/cpp_code_json/34.json similarity index 100% rename from data_backup/cpp_code_json/34.json rename to data_source/cpp_code_json/34.json diff --git a/data_backup/cpp_code_json/35.json b/data_source/cpp_code_json/35.json similarity index 100% rename from data_backup/cpp_code_json/35.json rename to data_source/cpp_code_json/35.json diff --git a/data_backup/cpp_code_json/36.json b/data_source/cpp_code_json/36.json similarity index 100% rename from data_backup/cpp_code_json/36.json rename to data_source/cpp_code_json/36.json diff --git a/data_backup/cpp_code_json/37.json b/data_source/cpp_code_json/37.json similarity index 100% rename from data_backup/cpp_code_json/37.json rename to data_source/cpp_code_json/37.json diff --git a/data_backup/cpp_code_json/38.json b/data_source/cpp_code_json/38.json similarity index 100% rename from data_backup/cpp_code_json/38.json rename to data_source/cpp_code_json/38.json diff --git a/data_backup/cpp_code_json/39.json b/data_source/cpp_code_json/39.json similarity index 100% rename from data_backup/cpp_code_json/39.json rename to data_source/cpp_code_json/39.json diff --git a/data_backup/cpp_code_json/4.json b/data_source/cpp_code_json/4.json similarity index 100% rename from data_backup/cpp_code_json/4.json rename to data_source/cpp_code_json/4.json diff --git a/data_backup/cpp_code_json/40.json b/data_source/cpp_code_json/40.json similarity index 100% rename from data_backup/cpp_code_json/40.json rename to data_source/cpp_code_json/40.json diff --git a/data_backup/cpp_code_json/41.json b/data_source/cpp_code_json/41.json similarity index 100% rename from data_backup/cpp_code_json/41.json rename to data_source/cpp_code_json/41.json diff --git a/data_backup/cpp_code_json/42.json b/data_source/cpp_code_json/42.json similarity index 100% rename from data_backup/cpp_code_json/42.json rename to data_source/cpp_code_json/42.json diff --git a/data_backup/cpp_code_json/43.json b/data_source/cpp_code_json/43.json similarity index 100% rename from data_backup/cpp_code_json/43.json rename to data_source/cpp_code_json/43.json diff --git a/data_backup/cpp_code_json/44.json b/data_source/cpp_code_json/44.json similarity index 100% rename from data_backup/cpp_code_json/44.json rename to data_source/cpp_code_json/44.json diff --git a/data_backup/cpp_code_json/45.json b/data_source/cpp_code_json/45.json similarity index 100% rename from data_backup/cpp_code_json/45.json rename to data_source/cpp_code_json/45.json diff --git a/data_backup/cpp_code_json/46.json b/data_source/cpp_code_json/46.json similarity index 100% rename from data_backup/cpp_code_json/46.json rename to data_source/cpp_code_json/46.json diff --git a/data_backup/cpp_code_json/47.json b/data_source/cpp_code_json/47.json similarity index 100% rename from data_backup/cpp_code_json/47.json rename to data_source/cpp_code_json/47.json diff --git a/data_backup/cpp_code_json/48.json b/data_source/cpp_code_json/48.json similarity index 100% rename from data_backup/cpp_code_json/48.json rename to data_source/cpp_code_json/48.json diff --git a/data_backup/cpp_code_json/49.json b/data_source/cpp_code_json/49.json similarity index 100% rename from data_backup/cpp_code_json/49.json rename to data_source/cpp_code_json/49.json diff --git a/data_backup/cpp_code_json/5.json b/data_source/cpp_code_json/5.json similarity index 100% rename from data_backup/cpp_code_json/5.json rename to data_source/cpp_code_json/5.json diff --git a/data_backup/cpp_code_json/50.json b/data_source/cpp_code_json/50.json similarity index 100% rename from data_backup/cpp_code_json/50.json rename to data_source/cpp_code_json/50.json diff --git a/data_backup/cpp_code_json/51.json b/data_source/cpp_code_json/51.json similarity index 100% rename from data_backup/cpp_code_json/51.json rename to data_source/cpp_code_json/51.json diff --git a/data_backup/cpp_code_json/52.json b/data_source/cpp_code_json/52.json similarity index 100% rename from data_backup/cpp_code_json/52.json rename to data_source/cpp_code_json/52.json diff --git a/data_backup/cpp_code_json/53.json b/data_source/cpp_code_json/53.json similarity index 100% rename from data_backup/cpp_code_json/53.json rename to data_source/cpp_code_json/53.json diff --git a/data_backup/cpp_code_json/54.json b/data_source/cpp_code_json/54.json similarity index 100% rename from data_backup/cpp_code_json/54.json rename to data_source/cpp_code_json/54.json diff --git a/data_backup/cpp_code_json/55.json b/data_source/cpp_code_json/55.json similarity index 100% rename from data_backup/cpp_code_json/55.json rename to data_source/cpp_code_json/55.json diff --git a/data_backup/cpp_code_json/56.json b/data_source/cpp_code_json/56.json similarity index 100% rename from data_backup/cpp_code_json/56.json rename to data_source/cpp_code_json/56.json diff --git a/data_backup/cpp_code_json/57.json b/data_source/cpp_code_json/57.json similarity index 100% rename from data_backup/cpp_code_json/57.json rename to data_source/cpp_code_json/57.json diff --git a/data_backup/cpp_code_json/58.json b/data_source/cpp_code_json/58.json similarity index 100% rename from data_backup/cpp_code_json/58.json rename to data_source/cpp_code_json/58.json diff --git a/data_backup/cpp_code_json/59.json b/data_source/cpp_code_json/59.json similarity index 100% rename from data_backup/cpp_code_json/59.json rename to data_source/cpp_code_json/59.json diff --git a/data_backup/cpp_code_json/6.json b/data_source/cpp_code_json/6.json similarity index 100% rename from data_backup/cpp_code_json/6.json rename to data_source/cpp_code_json/6.json diff --git a/data_backup/cpp_code_json/60.json b/data_source/cpp_code_json/60.json similarity index 100% rename from data_backup/cpp_code_json/60.json rename to data_source/cpp_code_json/60.json diff --git a/data_backup/cpp_code_json/61.json b/data_source/cpp_code_json/61.json similarity index 100% rename from data_backup/cpp_code_json/61.json rename to data_source/cpp_code_json/61.json diff --git a/data_backup/cpp_code_json/62.json b/data_source/cpp_code_json/62.json similarity index 100% rename from data_backup/cpp_code_json/62.json rename to data_source/cpp_code_json/62.json diff --git a/data_backup/cpp_code_json/63.json b/data_source/cpp_code_json/63.json similarity index 100% rename from data_backup/cpp_code_json/63.json rename to data_source/cpp_code_json/63.json diff --git a/data_backup/cpp_code_json/64.json b/data_source/cpp_code_json/64.json similarity index 100% rename from data_backup/cpp_code_json/64.json rename to data_source/cpp_code_json/64.json diff --git a/data_backup/cpp_code_json/65.json b/data_source/cpp_code_json/65.json similarity index 100% rename from data_backup/cpp_code_json/65.json rename to data_source/cpp_code_json/65.json diff --git a/data_backup/cpp_code_json/66.json b/data_source/cpp_code_json/66.json similarity index 100% rename from data_backup/cpp_code_json/66.json rename to data_source/cpp_code_json/66.json diff --git a/data_backup/cpp_code_json/67.json b/data_source/cpp_code_json/67.json similarity index 100% rename from data_backup/cpp_code_json/67.json rename to data_source/cpp_code_json/67.json diff --git a/data_backup/cpp_code_json/68.json b/data_source/cpp_code_json/68.json similarity index 100% rename from data_backup/cpp_code_json/68.json rename to data_source/cpp_code_json/68.json diff --git a/data_backup/cpp_code_json/69.json b/data_source/cpp_code_json/69.json similarity index 100% rename from data_backup/cpp_code_json/69.json rename to data_source/cpp_code_json/69.json diff --git a/data_backup/cpp_code_json/7.json b/data_source/cpp_code_json/7.json similarity index 100% rename from data_backup/cpp_code_json/7.json rename to data_source/cpp_code_json/7.json diff --git a/data_backup/cpp_code_json/70.json b/data_source/cpp_code_json/70.json similarity index 100% rename from data_backup/cpp_code_json/70.json rename to data_source/cpp_code_json/70.json diff --git a/data_backup/cpp_code_json/71.json b/data_source/cpp_code_json/71.json similarity index 100% rename from data_backup/cpp_code_json/71.json rename to data_source/cpp_code_json/71.json diff --git a/data_backup/cpp_code_json/72.json b/data_source/cpp_code_json/72.json similarity index 100% rename from data_backup/cpp_code_json/72.json rename to data_source/cpp_code_json/72.json diff --git a/data_backup/cpp_code_json/73.json b/data_source/cpp_code_json/73.json similarity index 100% rename from data_backup/cpp_code_json/73.json rename to data_source/cpp_code_json/73.json diff --git a/data_backup/cpp_code_json/74.json b/data_source/cpp_code_json/74.json similarity index 100% rename from data_backup/cpp_code_json/74.json rename to data_source/cpp_code_json/74.json diff --git a/data_backup/cpp_code_json/75.json b/data_source/cpp_code_json/75.json similarity index 100% rename from data_backup/cpp_code_json/75.json rename to data_source/cpp_code_json/75.json diff --git a/data_backup/cpp_code_json/76.json b/data_source/cpp_code_json/76.json similarity index 100% rename from data_backup/cpp_code_json/76.json rename to data_source/cpp_code_json/76.json diff --git a/data_backup/cpp_code_json/77.json b/data_source/cpp_code_json/77.json similarity index 100% rename from data_backup/cpp_code_json/77.json rename to data_source/cpp_code_json/77.json diff --git a/data_backup/cpp_code_json/78.json b/data_source/cpp_code_json/78.json similarity index 100% rename from data_backup/cpp_code_json/78.json rename to data_source/cpp_code_json/78.json diff --git a/data_backup/cpp_code_json/79.json b/data_source/cpp_code_json/79.json similarity index 100% rename from data_backup/cpp_code_json/79.json rename to data_source/cpp_code_json/79.json diff --git a/data_backup/cpp_code_json/8.json b/data_source/cpp_code_json/8.json similarity index 100% rename from data_backup/cpp_code_json/8.json rename to data_source/cpp_code_json/8.json diff --git a/data_backup/cpp_code_json/80.json b/data_source/cpp_code_json/80.json similarity index 100% rename from data_backup/cpp_code_json/80.json rename to data_source/cpp_code_json/80.json diff --git a/data_backup/cpp_code_json/81.json b/data_source/cpp_code_json/81.json similarity index 100% rename from data_backup/cpp_code_json/81.json rename to data_source/cpp_code_json/81.json diff --git a/data_backup/cpp_code_json/82.json b/data_source/cpp_code_json/82.json similarity index 100% rename from data_backup/cpp_code_json/82.json rename to data_source/cpp_code_json/82.json diff --git a/data_backup/cpp_code_json/83.json b/data_source/cpp_code_json/83.json similarity index 100% rename from data_backup/cpp_code_json/83.json rename to data_source/cpp_code_json/83.json diff --git a/data_backup/cpp_code_json/84.json b/data_source/cpp_code_json/84.json similarity index 100% rename from data_backup/cpp_code_json/84.json rename to data_source/cpp_code_json/84.json diff --git a/data_backup/cpp_code_json/85.json b/data_source/cpp_code_json/85.json similarity index 100% rename from data_backup/cpp_code_json/85.json rename to data_source/cpp_code_json/85.json diff --git a/data_backup/cpp_code_json/86.json b/data_source/cpp_code_json/86.json similarity index 100% rename from data_backup/cpp_code_json/86.json rename to data_source/cpp_code_json/86.json diff --git a/data_backup/cpp_code_json/87.json b/data_source/cpp_code_json/87.json similarity index 100% rename from data_backup/cpp_code_json/87.json rename to data_source/cpp_code_json/87.json diff --git a/data_backup/cpp_code_json/88.json b/data_source/cpp_code_json/88.json similarity index 100% rename from data_backup/cpp_code_json/88.json rename to data_source/cpp_code_json/88.json diff --git a/data_backup/cpp_code_json/89.json b/data_source/cpp_code_json/89.json similarity index 100% rename from data_backup/cpp_code_json/89.json rename to data_source/cpp_code_json/89.json diff --git a/data_backup/cpp_code_json/9.json b/data_source/cpp_code_json/9.json similarity index 100% rename from data_backup/cpp_code_json/9.json rename to data_source/cpp_code_json/9.json diff --git a/data_backup/cpp_code_json/90.json b/data_source/cpp_code_json/90.json similarity index 100% rename from data_backup/cpp_code_json/90.json rename to data_source/cpp_code_json/90.json diff --git a/data_backup/cpp_code_json/91.json b/data_source/cpp_code_json/91.json similarity index 100% rename from data_backup/cpp_code_json/91.json rename to data_source/cpp_code_json/91.json diff --git a/data_backup/cpp_code_json/92.json b/data_source/cpp_code_json/92.json similarity index 100% rename from data_backup/cpp_code_json/92.json rename to data_source/cpp_code_json/92.json diff --git a/data_backup/cpp_code_json/93.json b/data_source/cpp_code_json/93.json similarity index 100% rename from data_backup/cpp_code_json/93.json rename to data_source/cpp_code_json/93.json diff --git a/data_backup/cpp_code_json/94.json b/data_source/cpp_code_json/94.json similarity index 100% rename from data_backup/cpp_code_json/94.json rename to data_source/cpp_code_json/94.json diff --git a/data_backup/cpp_code_json/95.json b/data_source/cpp_code_json/95.json similarity index 100% rename from data_backup/cpp_code_json/95.json rename to data_source/cpp_code_json/95.json diff --git a/data_backup/cpp_code_json/96.json b/data_source/cpp_code_json/96.json similarity index 100% rename from data_backup/cpp_code_json/96.json rename to data_source/cpp_code_json/96.json diff --git a/data_backup/cpp_code_json/97.json b/data_source/cpp_code_json/97.json similarity index 100% rename from data_backup/cpp_code_json/97.json rename to data_source/cpp_code_json/97.json diff --git a/data_backup/cpp_code_json/98.json b/data_source/cpp_code_json/98.json similarity index 100% rename from data_backup/cpp_code_json/98.json rename to data_source/cpp_code_json/98.json diff --git a/data_backup/cpp_code_json/99.json b/data_source/cpp_code_json/99.json similarity index 100% rename from data_backup/cpp_code_json/99.json rename to data_source/cpp_code_json/99.json diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/1.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/1.exercises/config.json" new file mode 100644 index 000000000..6baa28b17 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/1.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-e6f4640190ed47628252f04040268ad8", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/1.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/1.exercises/solution.json" new file mode 100644 index 000000000..dc34f5bed --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/1.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "2081a5fe4b7a48a19ee2cbab00388ec7", + "keywords": "算法高阶,数论算法,算法问题选编,整数的因子分解", + "title": "存了多少零钱", + "desc": [ + { + "content": "\n

小林和小树兄弟俩相约存零钱。眼看到年底了,兄弟俩决定算算一共存了多少钱,请帮他们算出来。

输入:

两行,第一行三个整数分别对应元、角、分,表示小林存的零钱数;

第二行三个整数分别对应元、角、分,表示小树存的零钱数。

输出:

两人存的钱数(单位:元,保留2位小数)

样例输入:

30 5 5

45 7 4

样例输出:

76.29

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nint main()\n{\n\tint y1,j1,f1,y2,j2,f2;\n\tint y,j,f;\n\tint shiftj = 0;\n\tint shifty = 0;\n\tfloat ss ;\n\tscanf(\"%d %d %d\",&y1,&j1,&f1);\n\tscanf(\"%d %d %d\",&y2,&j2,&f2);\n\tf = f1 + f2;\n\tif(f>=10)\n\t{\n\t\tf = f-10;\n\t\tshiftj = 1;\n\t}\n\tj = j1 + j2 + shiftj;\n\tif(j >= 10)\n\t{\n\t\tj = j - 10;\n\t\tshifty = 1;\n\t}\n\ty = y1 + y2 + shifty;\n\tss = y + j/10.0 + f/100.0;\n\tprintf(\"%.2f\\n\",ss);\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-e6f4640190ed47628252f04040268ad8", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470175" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/10.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/10.exercises/config.json" new file mode 100644 index 000000000..24e7bd6d6 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/10.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-194ea4a62b2448fdb6199ff24fe4b792", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/10.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/10.exercises/solution.json" new file mode 100644 index 000000000..7809e2d48 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/10.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "18d1a3976bb4424bb4d8fae27a8de3f5", + "keywords": "算法初阶,排序和顺序统计量,中位数和顺序统计量", + "title": "工龄问题求解,工龄 人数", + "desc": [ + { + "content": "\n

给定公司N名员工的工龄,要求按工龄增序输出每个工龄段有多少员工。输入首先给出正整数N,即员工总人数;\n随后给出N个整数,即每个员工的工龄,范围在[0, 99]。其中,0-9为第1个工龄段,10-19为第2个工龄段,…,90-99为第10个工龄段。按工龄的递增顺序输出每个工龄的员工个数,格式为:“工龄:人数”。每项占一行。如果人数为0则不输出该项。

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nint main()\n{\n\tint i,n,a[11]= {0},x;\n\tscanf(\"%d\",&n);\n\tfor(i=0; i9&&x<=19)\n\t\t\ta[2]++;\n\t\telse if(x>19&&x<=29)\n\t\t\ta[3]++;\n\t\telse if(x>29&&x<=39)\n\t\t\ta[4]++;\n\t\telse if(x>39&&x<=49)\n\t\t\ta[5]++;\n\t\telse if(x>49&&x<=59)\n\t\t\ta[6]++;\n\t\telse if(x>59&&x<=69)\n\t\t\ta[7]++;\n\t\telse if(x>69&&x<=79)\n\t\t\ta[8]++;\n\t\telse if(x>79&&x<=89)\n\t\t\ta[9]++;\n\t\telse\n\t\t\ta[10]++;\n\t}\n\tfor(i=1;i<=10;i++){\n\t\tif(a[i]>0){\n\t\t\tprintf(\"%d-%d:%d\\n\",i*10-10,i*10-1,a[i]);\n\t\t}\n\t}\n}", + "language": "cpp" + }, + "node_id": "dailycode-194ea4a62b2448fdb6199ff24fe4b792", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470245" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/11.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/11.exercises/config.json" new file mode 100644 index 000000000..95caf9d38 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/11.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-93ac67f3484a450782766cb42d60c7d9", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/11.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/11.exercises/solution.json" new file mode 100644 index 000000000..a513539d5 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/11.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "07b64188801e410c82dbb0a4cfe65013", + "keywords": "算法初阶,基础知识,特征序列,概率分析和随机算法,概率分析和指示器随机变量的进一步使用", + "title": "求分数数列的前N项和", + "desc": [ + { + "content": "\n有一分数序列:2/1,-3/2,5/3,-8/5,13/8,-21/13,…, 由用户输入项目数N,求这个数列的前N 项之和", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include\nint main(){\n\tint n;\n\tscanf(\"%d\",&n);\n\tint i;\n\tdouble a1 = 2, b1 = 1;\n\tdouble a2 = 3, b2 = 2;\n\tdouble sum = a1/b1 - a2/b2;\n\tif(n==1) printf(\"%f\\n\",a1/b1);\n\telse if (n==2) printf(\"%f\\n\",sum);\n\telse{\n\t\tfor(i = 0;i\n#include\n#include\n#include\n#include\nusing namespace std;\nint main() {\n\tint n;\n\tcin>>n;\n\tvector a(n,\"\"),b(n,\"\");\n\tint m=(n+1)/2;\n\tint p=0;\n\tfor(int i=m-1;i>=0;i--){\n\t\tfor(int j=0;j<=i;j++)\n\t\t\ta[i].push_back('A'+j+p);\n\t\tb[i]=a[i];\n\t\treverse(b[i].begin(),b[i].end());\n\t\tfor(int j=i+1;j=m;i--){\n\t\ta[i]=a[p];\n\t\tb[i]=b[p++];\n\t}\n\tfor(int i=0;i0)个整数,在不允许使用另外数组的前提下,将每个整数循环向右移M(≥0)个位置(最后M个数循环移至最前面的M个位置)。如果需要考虑程序移动数据的次数尽量少,要如何设计移动的方法?\n输入格式:\n每个输入包含一个测试用例,第1行输入N(1≤N≤100)和M(≥0);第2行输入N个整数,之间用空格分隔。\n输出格式:\n在一行中输出循环右移M位以后的整数序列,之间用空格分隔,序列结尾不能有多余空格。\n输入样例:\n6 2\n1 2 3 4 5 6\n输出样例:\n5 6 1 2 3 4", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include\nint main()\n{\n\tint n,m,a[1000];\n\tscanf(\"%d %d\",&n,&m);\n\tm = m % n;\n\tint count=m;\n\twhile(m在一个数组A中存放100个数据,用子函数判断该数组中哪些是素数,并统计该素数的个数,在主函数中输出该素数的个数

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \nint isPrime(int n)\n{\n\tint i = 2;\n\tif(n<2) return 0;\n\tfor (i=2;i商品优惠计算器\n使用if语句编程实现输入购货金额,输出实际付款金额。购货折扣率如下:\n购货金额≤500元 不打折\n500元<购货金额≤1000元 9折\n1000元<购货金额 8折

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \n#include \n#include \n#include \n#include \nint main()\n{\n\tfloat money=0.0;\n\tfloat pay=0.0;\n\tbool run = true;\n\twhile(run)\n\t{\n\t\tprintf(\"\\n请输入购货金额:\\n\");\n\t\tscanf(\"%f\", &money);\n\t\tif(money >1000)\n\t\t{\n\t\t\tpay=money*0.8;\n\t\t\tprintf(\"打八折,应付金额:%.2f\\n\",pay);\n\t\t}\n\t\telse if((money >500)&&(money <=1000))\n\t\t{\n\t\t\tpay=money*0.9;\n\t\t\tprintf(\"打九折,应付金额:%.2f\\n\",pay);\n\t\t}\n\t\telse if(money <=500)\n\t\t{\n\t\t\tprintf(\"不打折,应付金额:%.2f\\n\",money);\n\t\t}\n\t}\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-9b2837c3037b460e9a6fef477307ca55", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470151" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/16.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/16.exercises/config.json" new file mode 100644 index 000000000..7ef8c0a59 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/16.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-6a3894fe143f469f9229536c8807448d", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/16.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/16.exercises/solution.json" new file mode 100644 index 000000000..8c4836fa2 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/16.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "3dc7b8659623455cbb5edb5d911490b5", + "keywords": "算法高阶,数论算法,元素的幂,算法问题选编", + "title": "移动数组中的元素", + "desc": [ + { + "content": "\n题目描述\n将一维数组中的元素循环左移 k 个位置\n输入描述\n第 1 行是一维数组元素的个数 n (数组大小)\n第 2 行是一个整数 k , 表示移动的位置\n下面 n 行为数组的元素个数\n输出描述\n输出 n 行,表示移动后的数字", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include\n#define N 10000\nint main()\n{\n\tint k,a[N],b[N],n,t,w,i;\n\tscanf(\"%d\",&n);\n\tscanf(\"%d\",&k);\n\tfor(i=0;i要求:\n1、必须包含循环结构、顺序结构、选择分支结构。\n2、必须包含数组\n3、必须包含一个以上函数\n4、可以包含方针

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nvoid search1(){\n\tint i,t=0;\n\tfor(i=10000;i<=99999;i++){\n\t\tif(i%3==0&&i%10==6)\n\t\t\tt++;\n\t}\n\tcout<一个整数的序列,要求对其重新排序。排序要求:\n1.奇数在前,偶数在后;\n2.奇数按从大到小排序;\n3.偶数按从小到大排序。
\n输入一行,包含整数个数n, n个整数值,彼此以一个空格分开。\n按照要求排序后输出一行,包含排序后的n 个整数。\n

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \nusing namespace std;\nbool cmp(int a, int b){\n    int x = a % 2;\n    int y = b % 2;\n    if(x == y)\n        if(x == 0)\n            return a < b;\n        else\n            return a > b;\n    else\n        return x > y;\n}\nint main()\n{\n    int n, i;\n    cin >> n;\n    int a[n];\n    for(i = 0; i < n; i++)\n        cin >> a[i];\n    sort(a, a+n, cmp);\n    for(i = 0; i < n; i++)\n        cout << a[i] << \" \";\n}", + "language": "cpp" + }, + "node_id": "dailycode-18b330b06c254136bf00850f53290b0b", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470146" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/19.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/19.exercises/config.json" new file mode 100644 index 000000000..4199a4e48 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/19.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-81cb97919cb0454d898a43fe8d41f2db", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/19.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/19.exercises/solution.json" new file mode 100644 index 000000000..51df60956 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/19.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "cd1c7b8656184bc182464888f93f178a", + "keywords": "算法初阶,排序和顺序统计量,中位数和顺序统计量", + "title": "给出一个由O和X组成的串,长度为1~80,统计得分", + "desc": [ + { + "content": "\n给出一个由O和X组成的串,长度为1~80,统计得分,每个O的得分为目前连续出现的O的个数,X的得分为0,例如OOXXO的得分为1+2+0+0+1.", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include\"stdlib.h\"\n#include\"string.h\"\n#include\"stdio.h\"\nint main()\n{\n\tchar s[85];\n\tint score = 0,x;\n\tscanf(\"%s\",&s);\n\tfor (int i = 0;s[i];i++)\n\t{\n\t\tif (s[i] == 'X')\n\t\tscore += 0;\n\t\tif (s[i] == 'O')\n\t\t{\n\t\t\tint temp = 1;\n\t\t\tif (i == 0)score += 1;\n\t\t\telse\n\t\t\t{\n\t\t\t\tx=i;\n\t\t\t\twhile (x > 0)\n\t\t\t\t{\n\t\t\t\t\tif (s[x - 1] == 'O')temp++;\n\t\t\t\t\telse break; \n\t\t\t\t\tx--;\n\t\t\t\t}\n\t\t\t\tscore += temp;\n\t\t\t}\n\t\t}\n\t}\n\tprintf(\"%d\\n\", score);\n\tsystem(\"pause\");\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-81cb97919cb0454d898a43fe8d41f2db", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600469970" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/2.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/2.exercises/config.json" new file mode 100644 index 000000000..0caf56102 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/2.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-b5d53da6929b4a0abe12a37e1d7cc77d", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/2.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/2.exercises/solution.json" new file mode 100644 index 000000000..1100d3ac0 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/2.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "337b3f0460f140e0a2e1984f78f1cbb2", + "keywords": "算法初阶,基础知识,算法基础,设计算法,分析分治算法", + "title": "一个班有10个同学,通过键盘输入成绩,并打印输出,每行输出5个同学的成绩。并求出平均成绩,最高分、最低分并输出。", + "desc": [ + { + "content": "\n

一个班有10个同学,通过键盘输入成绩,\n并打印输出,每行输出5个同学的成绩。并求出平均成绩,最高分、最低分并输出。算法分析:\n(1)定义一个数组用来存放10个成绩数据。\n(2)用循环结构实现成绩输入;\n(3)用循环结构实现成绩输出,并控制换行;\n(4)使用循环结构求平均成绩、最高分、最低分并输出。

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nint main(){\n\tint x,i,max=0,min=0;\n\tdouble sum=0,ave=0;\n\tint a[10];\n\tfor(i=0;i<10;i++){\n\t\tscanf(\"%d\",&a[i]);\n\t\tif(i==0)\n\t\t\tmin = a[i];\n\t\tsum+=a[i];\n\t\tif(maxa[i])\n\t\t\tmin=a[i];\n\t}\n\tave=sum/10;\n\tfor(i=0;i<5;i++)\n\t\tprintf(\"%d \",a[i]);\n\t printf(\"\\n\");\n\tfor(i=5;i<10;i++)\n\t\tprintf(\"%d \",a[i]);\n\tprintf(\"平均成绩%f,最高分%d,最低分%d \",ave,max,min);\n}", + "language": "cpp" + }, + "node_id": "dailycode-b5d53da6929b4a0abe12a37e1d7cc77d", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470145" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/20.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/20.exercises/config.json" new file mode 100644 index 000000000..bdd785e08 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/20.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-e8317165a816402db457837074d998f8", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/20.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/20.exercises/solution.json" new file mode 100644 index 000000000..668d0a192 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/20.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "37e3b85ac0fd4586ae7e18a4cac5a70f", + "keywords": "算法高阶,计算几何学,算法问题选编,确定任意一对线段是否相交", + "title": "实现五则运算", + "desc": [ + { + "content": "\n

设计一个可以完成任意五则运算(加法/减法/乘法/除法/取余)的程序。除法按照计算机中整型相除来计算。\n输入格式\n多行输入,每输入一行数据对应输出一行。\n每行输入格式为 a # b,其中 #∈{+,−,∗,/,%}\na,b均为自然数\n输出格式\n每行输出对应的计算结果;\n当运算为除法/取余的时候,如果除数为 0 ,输出 WA 。

\n

输入样例

\n
\n2+2\n4*5\n6/7\n4%3\n4%0
\n

输出样例

\n
\n4\n20\n0\n1\nWA
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include\nint main()\n{\n\tint a;\n\tint b;\n\tchar operation;\n\tint num;\n\twhile (scanf(\"%d\", &a) != EOF)\n\t{\n\t\tscanf(\"%c\", &operation);\n\t\tscanf(\"%d\", &b);\n\t\tif (operation == '+')\n\t\t{\n\t\t\tnum = a + b;\n\t\t\tprintf(\"%d\\n\", num);\n\t\t}\n\t\telse if (operation == '-') {\n\t\t\tnum = a - b;\n\t\t\tprintf(\"%d\\n\", num);\n\t\t}\n\t\telse if (operation == '*') {\n\t\t\tnum = a * b;\n\t\t\tprintf(\"%d\\n\", num);\n\t\t}\n\t\telse if (operation == '/' && b != 0) {\n\t\t\tnum = a / b;\n\t\t\tprintf(\"%d\\n\", num);\n\t\t}\n\t\telse {\n\t\t\tprintf(\"%s\\n\", \"WA\");\n\t\t}\n\t}\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-e8317165a816402db457837074d998f8", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470274" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/21.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/21.exercises/config.json" new file mode 100644 index 000000000..b654c74b1 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/21.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-8d63cf73e9b24854a41cdf3f51c89418", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/21.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/21.exercises/solution.json" new file mode 100644 index 000000000..c03686dd8 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/21.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "bb8ae5765727421eb08c5de7e9699fc3", + "keywords": "B树,算法高阶,高级数据结构,B树上的基本操作", + "title": "输入两个小写英语字母后, 输出两个字母的差", + "desc": [ + { + "content": "\n两个小写字母的差用整数输出。\n但是,输入小写以外的文字就结束程序。\n比较两个字母的部分用diff这个名字的函数书写。执行结果\n请输入两个小写:a b\n字母a和字母b的区别是1。\n请输入两个小写:f b\n字母f和字母b的差异是4。\n请输入两个小写:0 a\n退出程序。", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nint diff(char ch1, char ch2)\n{\n\tif (ch1 > ch2) return ch1 - ch2; else return ch2 - ch1;\n}\nint main()\n{\n\tchar a, b;\n\twhile (1)\n\t{\n\t\tcout << \"请输入两个小写:\";\n\t\tcin >> a >> b;\n\t\tif (a > 'z' || a < 'a' || b > 'z' || b < 'a') break;\n\t\tcout << \"文字\" << a << \"和文字\" << b << \"的差异是\" << diff(a, b) << \"。\\n\";\n\t}\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-8d63cf73e9b24854a41cdf3f51c89418", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470248" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/22.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/22.exercises/config.json" new file mode 100644 index 000000000..def4c32cd --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/22.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-576049e4d5e9473fb838a71d21ebf8e7", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/22.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/22.exercises/solution.json" new file mode 100644 index 000000000..b18a9f9db --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/22.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "95b95d395fef41e390d3b512a7c62705", + "keywords": "算法初阶,快速排序,快速排序的描述,排序和顺序统计量", + "title": "排序", + "desc": [ + { + "content": "\n试题描述\n由键盘上输入n个整数,请将这些数从大到小排序,然后输出排序后的数列。\n输入\n输入包含两行:\n第一行是n(1 <= n <= 1000)。\n第二行是n个整数,邻近两数之间用一个空格隔开。\n输出\n输出排序后的n个整数,邻近两数之间用一个空格隔开。\n输入示例\n5\n8 2 5 1 2\n输出示例\n8 5 2 2 1\n数据范围\n输入和输出均为int范围的整数", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": " #include\nusing namespace std;\nint main() {\n\tint n,tmp;\n\tcin >> n;\n\tint *a = new int[n];\n\tfor (int i = 0; i < n; i++)\n\t\tcin >> a[i];\n\tfor (int i = 0; i < n - 1; i++) {\t\t\n\t\tfor (int j = i + 1; j < n; j++) {\n\t\t\tif (a[i] < a[j]) {\n\t\t\t\ttmp = a[i];\n\t\t\t\ta[i] = a[j];\n\t\t\t\ta[j] = tmp;\n\t\t\t}\n\t\t}\n\t}\n\tfor (int i = 0; i < n; i++) {\n\t\tcout << a[i];\n\t\tif (i != n - 1)\n\t\t\tcout << \" \";\n\t}\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-576049e4d5e9473fb838a71d21ebf8e7", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470259" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/23.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/23.exercises/config.json" new file mode 100644 index 000000000..84394747c --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/23.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-f0faa8edc8874ab2a4f4a761afe12be3", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/23.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/23.exercises/solution.json" new file mode 100644 index 000000000..0c9eaca18 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/23.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "43b13523e05540b7a3e1315f981d47af", + "keywords": "算法初阶,基础知识,函数的增长,标准记号与常用函数", + "title": "字符数组", + "desc": [ + { + "content": "\n

编写一个以两个字符数组作为输入的函数。\n如果第二个数组包含在第一个数组中,则函数返回第一个数组中第二个数组开始的第一个索引。\n如果第二个数组不被包含在第一个数组,然后函数应该return -1\n输入 [’c’,’a’,’l’,’l’,’i’,’n’,’g’] 和 [’a’,’l’,’l’]  就 return 1.\n输入 [’c’,’a’,’l’,’l’,’i’,’n’,’g’] 和 [’a’,’n’] 就 return -1.

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \nusing namespace std;\nint main()\n{\n\tchar a[128],b[128];\n\tint numA, numB;\n\tcout << \"请输入第一个数组元素个数:\";\n\tcin >> numA;\n\tcout << \"请输入第一个数组元素:\";\n\tfor (int i = 0; i < numA; ++i)\n\t\tcin >> a[i];\n\tcin.clear();\n\tcin.sync();\n\tcout << \"请输入第二个数组元素个数:\";\n\tcin >> numB;\n\tcout << \"请输入第二个数组元素:\";\n\tfor (int i = 0; i < numB; ++i)\n\t\tcin >> b[i];\n\tint num = 0;\t\t\n\tstring index;\t\t\n\tfor (int j = 0; j < numB; j++)\t\t\n\t{\n\t\tfor (int k = 0; k < numA; k++)\n\t\t{\n\t\t\tif (b[j] == a[k])\n\t\t\t{\n\t\t\t\tindex += to_string(k);\n\t\t\t\tnum++;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\tif (num == numB)\t\n\t{\n\t\tcout << \"第二个数组包含在第一个数组中\" << endl;\n\t\tcout << \"第一个数组中第二个数组开始的第一个索引为:\" << index.substr(0,1) << endl;\n\t}\n\telse\n\t\tcout << \"第二个数组不被包含在第一个数组\";\n\tsystem(\"pause\");\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-f0faa8edc8874ab2a4f4a761afe12be3", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600469954" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/24.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/24.exercises/config.json" new file mode 100644 index 000000000..34c52ce5f --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/24.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-ed083cfb659044dda203cc8c52aac153", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/24.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/24.exercises/solution.json" new file mode 100644 index 000000000..84716207e --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/24.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "74677d031c15454ba08620f7584d319c", + "keywords": "B树,算法高阶,高级数据结构,B树上的基本操作", + "title": "从键盘输入任意一个大写英文字母,要求它在26个字母表中的位置和其后面的第四个字母", + "desc": [ + { + "content": "\n例如:程序运行\n输入:B<回车>。\n输出:B在第2个位置,其后面第四个字母是F", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nint main(){\n\tchar c,c2;\n\tprintf(\"输入:\");\n\tc = getchar();\n\tint m=0,n=0;\n\tif(c>='A'&& c<='z')\n\t{\n\t\tm = c - 'A' + 1;\n\t\tif(m < 23)\n\t\t{\n\t\t\tc2 = c + 4;\n\t\t\tn = m+4;\n\t\t}\n\t}\n\tif(n > 0)\n\t\tprintf(\"%c在第%d个位置,其后面第四个字母是%c\\n\",c,m,c2);\n\telse\n\t\tprintf(\"%c在第%d个位置,其后面没有第四个字母\\n\",c,m);\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-ed083cfb659044dda203cc8c52aac153", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470277" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/25.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/25.exercises/config.json" new file mode 100644 index 000000000..af7ccde3c --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/25.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-8e7e471646514e55a8f6339debaba0c2", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/25.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/25.exercises/solution.json" new file mode 100644 index 000000000..91d61363a --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/25.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "261703b256274305a629bee39fa0a25d", + "keywords": "桶排序,算法初阶,线性时间排序,排序和顺序统计量", + "title": "按要求排序数组", + "desc": [ + { + "content": "\n

 给你一个整数数组 arr 。请你将数组中的元素按照其二进制表示中,数字 1 的数目升序排序。 如果存在多个数字二进制中 1 的数目相同,则必须将它们按照数值大小升序排列。请你返回排序后的数组。

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include\n#include\nint oneNum(int x)\n{\n\tint cnt = 0;\n\twhile(x)\n\t{\n\t\tcnt++;\n\t\tx = x&(x-1);\n\t}\n\treturn cnt;\n}\nint cmp(const void *a,const void*b)\n{\n\tint al,bl;\n\tint ret;\n\tal = *(int*)a;\n\tbl = *(int*)b;\n\tret = oneNum(al) - oneNum(bl);\n\treturn ret ? ret : al - bl;\n}\nint main()\n{\n\tint s[]={1,2,3,5,6,7,8},i;\n\tint len = sizeof(s)/sizeof(*s);\n\tqsort(s,len,4,cmp);\n\tfor(i = 0 ; i < len ; i++)\n\t{\n\t\tprintf(\"%d\\n\",s[i]);\n\t}\n}", + "language": "cpp" + }, + "node_id": "dailycode-8e7e471646514e55a8f6339debaba0c2", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600469952" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/26.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/26.exercises/config.json" new file mode 100644 index 000000000..402c35027 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/26.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-3e1477a0b53d4f95861e171bb145edfa", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/26.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/26.exercises/solution.json" new file mode 100644 index 000000000..02e1a9b08 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/26.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "952b11e4fca244409f82bc96502ffaf6", + "keywords": "数学,算法", + "title": "检查一个3位数是否是水仙花数", + "desc": [ + { + "content": "\n检查一个3位数是否是水仙花数。\n输入:一个数字,比如 371,输出:x是水仙花数,\n如果不是,则输出:x不是水仙花数。\n注:x为输入的数字", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nint main()\n{\n\tint a, b, c, y, n = 0;\n\tcout << \"请输入三位数字:\" << endl;\n\tcin >> n;\n\ta = n % 1000 / 100; \n\tb = n % 100 / 10;\t\n\tc = n % 10 / 1;\t \n\ty = a*a*a + b*b*b + c*c*c;\n\tif (y == n) cout << n << \"是水仙花数\" << endl;\n\telse cout << n << \"不是水仙花数\" << endl;\n\tsystem(\"pause\");\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-3e1477a0b53d4f95861e171bb145edfa", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600469841" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/27.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/27.exercises/config.json" new file mode 100644 index 000000000..5322e8bf4 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/27.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-7361c99af21f41d7afc9ef2a7d0c59e2", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/27.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/27.exercises/solution.json" new file mode 100644 index 000000000..2ad145cab --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/27.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "6b4490cf046f4376a882eef5bda4d59a", + "keywords": "时间转换", + "title": "秒数转换", + "desc": [ + { + "content": "\n输入一个秒数,转换成HH:MM:SS的格式输出。\n输入样例 \n365\n输出样例 \n00:06:05", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include\nint n;\nvoid print(int x){\n\tif(x==0)printf(\"00\");\n\telse if(x<10)printf(\"0%d\",x);\n\telse printf(\"%d\",x);\n\treturn;\n}\nint main(){\n\tscanf(\"%d\",&n);\n\tint s,f,m;\n\ts=n/3600;\n\tf=n/60%60;\n\tm=n%60;\n\tprint(s);\n\tprintf(\":\");\n\tprint(f);\n\tprintf(\":\");\n\tprint(m);\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-7361c99af21f41d7afc9ef2a7d0c59e2", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470176" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/28.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/28.exercises/config.json" new file mode 100644 index 000000000..1ca9136b7 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/28.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-6d96a821994d46f8a4c62dfe46b82481", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/28.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/28.exercises/solution.json" new file mode 100644 index 000000000..5db15df32 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/28.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "dfcde76c90054b1eb7b5ed66d00acb4a", + "keywords": "算法,字符串", + "title": "找出string中只出现过一次的字符", + "desc": [ + { + "content": "\n找出string中只出现过一次的字符\n例如\"abcdef abcd\"中需要得到ef", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \nusing namespace std;\nint main()\n{\n    string temp = \"\";\n    cout << \"请输入字符串:\";\n    cin >> temp;\n    string str = \"\";        \n    string str1 = \"\";        \n    for (int i = 0; i < temp.length(); i++)\n    {\n        string tempSub = temp.substr(i, 1);    \n        int b = temp.rfind(tempSub);                \n        if (i == b && str1.find(tempSub) == -1)        \n            str +=temp.substr(i, 1);\n        else if (str1.find(tempSub) == -1)\n            str1 += temp.substr(i, 1);\n    }\n    cout << \"只出现一次的字符:\" << str << endl;\n    cout << \"重复出现的字符的字符:\" << str1 << endl;\n    system(\"pause\");\n    return 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-6d96a821994d46f8a4c62dfe46b82481", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470278" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/29.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/29.exercises/config.json" new file mode 100644 index 000000000..00e25ed7b --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/29.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-eaf833a2755343bd8b00dd67e8473e59", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/29.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/29.exercises/solution.json" new file mode 100644 index 000000000..31c487328 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/29.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "a27288a39f4b4bcb96316f366f386b4f", + "keywords": "算法初阶,排序和顺序统计量,中位数和顺序统计量", + "title": "找出小于平均值的数。", + "desc": [ + { + "content": "\n

从键盘输入一个正整数存入变量n中,再输入n个整数,然后找出所有小于平均值的数,并按输入顺序输出。\n

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include\nint main()\n{\n\tint i,n,sum=0,a[100];\n\tfloat ave;\n\tscanf(\"%d\",&n);\n\tfor(i=0;i本关任务:编写程序,有五种水果,apple、banana、orage、strawberry、pear,每一种有一个价格(浮点小数),由老板输入,请提示用户选择什么水果,购买数量(按照斤两),然后将总价显示出来。

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include\nint main(){\n\ttypedef enum {apple, banana, orange, strawberry, pear} fruits;\n\tdouble prices[5];\t\t\t \n\tfruits purchase;\t\t\t \n\tint fruit;\t\t\t\t \n\tdouble amount;\t\t\t \n\tfor(int i = 0; i < 5; i++)\n\t\tscanf(\"%lf\", &prices[i]);\n\tprintf(\"水果编号:1.苹果 2.香蕉 3.橘子 4.草莓 5.梨\\n\");\n\tprintf(\"请输入购买的水果(1~5),以及购买数量(按照斤两):\\n\");\n\tscanf(\"%d %lf\", &fruit, &amount);\n\tpurchase = (fruits)fruit;\t \n\tprintf(\"总价为:%.3lf\", prices[purchase-1]*amount);\n\treturn 0; \n}", + "language": "cpp" + }, + "node_id": "dailycode-f40f4ecc0b244fa186aff0bfb9976b7c", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470173" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/30.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/30.exercises/config.json" new file mode 100644 index 000000000..cda728766 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/30.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-42e8e695908b45c9ac0372043073d584", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/30.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/30.exercises/solution.json" new file mode 100644 index 000000000..501d39601 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/30.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "8517fe2b3ab94ebfaefe815949da2d20", + "keywords": "数列,递归,数学运算", + "title": "用递归求第n项的值", + "desc": [ + { + "content": "\n1,2,4,2,3,6,12,6,3,....求第n项值", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nint fun(int n,int *x,int *y)\n{\n\tint sum = 0,i;\n\tint size = 0;\n\tint dd = 1;\n\tfor (i = 1; i <= (*x);i++)\n\t{\n\t\tsum += (2*i-1);\n\t}\n\tif (sum == n)\n\t{\n\t\t*y = 2*(*x) -1;\n\t\treturn (*x);\n\t}else if (sum > n)\n\t{\n\t\t(*y) = n - (sum - (2 * (*x) -1));\n\t\tsize = 2* (*x) -1;\n\t\tdd = (*x); \n\t\tfor (i = 2; i <= (*y);i++)\n\t\t{\n\t\t\tif(i <= (*x))\n\t\t\t\tdd *= 2;\n\t\t\telse\n\t\t\t\tdd /= 2;\n\t\t}\n\t\treturn dd;\n\t}else\n\t{\n\t\t(*x)++;\n\t\treturn fun(n,x,y);\n\t}\n}\nint main()\n{\n\tint n;\t\t\n\tint row = 1,col = 0;\n\tint val;\n\trow = 1;\n\tcol = 0;\n\tprintf(\"请输入n:\");\n\tscanf(\"%d\",&n);\n\tval = fun(n,&row,&col);\n\tprintf(\"第%d项是:%d\\n\",n,val);\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-42e8e695908b45c9ac0372043073d584", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470270" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/31.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/31.exercises/config.json" new file mode 100644 index 000000000..1a23d364a --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/31.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-9054271f126f49929fe1552a8017408a", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/31.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/31.exercises/solution.json" new file mode 100644 index 000000000..c526aad12 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/31.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "97926ffce4134ed2a2317cfdd0378175", + "keywords": "B树,算法高阶,高级数据结构,B树上的基本操作", + "title": "计算字符串逆序数", + "desc": [ + { + "content": "\n例如:字符串中的内容为:a1Ab1D2,1\n#include \nusing namespace std;\nint solve(string s)\n{\n\tif (s.length() == 0) return 0;\n\tint n = 0;\n\tfor (int i = 1; i < s.length(); i++)\n\t\tif (s.c_str()[i] < s.c_str()[i - 1]) n++;\n\treturn n;\n}\nint main()\n{\n\tstring s = \"a1Ab1D2\";\n\tint n = solve(s);\n\tcout << n << endl;\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-9054271f126f49929fe1552a8017408a", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600469851" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/32.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/32.exercises/config.json" new file mode 100644 index 000000000..0a5fd53df --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/32.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-76e2e197fa8044a5939dc87d01245e2d", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/32.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/32.exercises/solution.json" new file mode 100644 index 000000000..2527577c3 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/32.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "2b2ef20f0be545bf89115f683d131db8", + "keywords": "B树,算法高阶,高级数据结构,B树上的基本操作", + "title": "if else 和 switch 使用", + "desc": [ + { + "content": "\n

输入学生成绩,\n若成绩在95分以上,输出“A”;\n若成绩在85~94分,输出“B”;\n若成绩在75~84分,输出“C”;\n若成绩在65~74分,输出“D”;\n若成绩在65分以下,输出“E”。(分别用if else 和 switch 语句完成)

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \"stdio.h\" \nint main(){\n\tint score;\n\tscanf(\"%d\",&score);\n\tif(score>=95){\n\t\tprintf(\"A\\n\");\t\n\t}else if(score>=85 && score<=94){\n\t\tprintf(\"B\\n\");\n\t}else if(score>=75 && score<=84){\n\t\tprintf(\"C\\n\");\n\t}else if(score>=65 && score<=74){\n\t\tprintf(\"D\\n\");\n\t}else{\n\t\tprintf(\"E\\n\");\n\t}\n\tprintf(\"以下用switch语句实现相同功能\\n\");\n\tscore = score-5;\n\tscore = score/10;\n\tswitch(score){\n\t\tcase 9:\n\t\t\tprintf(\"A\\n\");\t\n\t\t\tbreak;\n\t\tcase 8:\n\t\t\tprintf(\"B\");\t\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\tprintf(\"C\\n\");\t\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\tprintf(\"D\\n\");\t\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tprintf(\"E\\n\");\n\t\t\tbreak;\n\t}\n}", + "language": "cpp" + }, + "node_id": "dailycode-76e2e197fa8044a5939dc87d01245e2d", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470148" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/33.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/33.exercises/config.json" new file mode 100644 index 000000000..09551598c --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/33.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-e44f156234144b6fa859e5ed82d6bc4b", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/33.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/33.exercises/solution.json" new file mode 100644 index 000000000..915ca25d2 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/33.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "6ce02858aefa4a0ea1909954c57ce3b2", + "keywords": "图算法,算法高阶,最小生成树,最小生成树的形成", + "title": "将字符串2小写字母复制到字符串1", + "desc": [ + { + "content": "\n

编写程序,输入字符串s2,将其中所有小写字母复制到字符串数组strl中。例如
\naal1bb22cc33de4AA55BB”,生成的strl为"aabbccde"。

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include\nint main()\n{\n\tint sum=0,t=0,i;\n\tchar s[50],s1[50];\n\tscanf(\"%s\",s);\n\tfor(i=0;s[i]!='\\0';i++)\n\t{\n\t\tif(s[i]>='a'&&s[i]<='z'){\n\t\t\ts1[t++]=s[i];\n\t\t}\n\t}\n\ts1[t]='\\0';\n\tprintf(\"%s\",s1);\n}", + "language": "cpp" + }, + "node_id": "dailycode-e44f156234144b6fa859e5ed82d6bc4b", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600469859" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/34.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/34.exercises/config.json" new file mode 100644 index 000000000..6ca8ed9a3 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/34.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-23f2d2d00dca43bc80d5f4426c190250", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/34.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/34.exercises/solution.json" new file mode 100644 index 000000000..aac32ddee --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/34.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "021cb62e7da84d569ace7e3036cb19c5", + "keywords": "递归,算法", + "title": "编写递归函数和非递归函数", + "desc": [ + { + "content": "\n

编写一个递归函数和一个非递归函数,分别实现求1+2+3+...+n

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nint sum(int n)\n{\n\tif(n == 1)\n\t\treturn 1;\n\telse\n\t\treturn n + sum(n-1);\n}\nint sum_2(int n)\n{\n\tint ss = 0;\n\tfor (int i = 1; i <=n;i++)\n\t{\n\t\tss += i; \n\t}\n\treturn ss;\n}\nint main()\n{\n\tint n;\n\tprintf(\"请输入n:\");\n\tscanf(\"%d\",&n);\n\tif(n == 0)\n\t\t{\n\t\t\tprintf(\"请输入正整数n\");\n\t\t\treturn -1;\n\t\t}\n\tint s1 = sum(n);\n\tint s2 = sum_2(n);\n\tprintf(\"递归计算=%d;循环计算=%d\\n\",s1,s2);\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-23f2d2d00dca43bc80d5f4426c190250", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470242" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/35.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/35.exercises/config.json" new file mode 100644 index 000000000..caac3c77a --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/35.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-9662f082ecb24eafbabd9cc73d7a5847", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/35.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/35.exercises/solution.json" new file mode 100644 index 000000000..530828561 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/35.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "ce9c2b5715b9442288e0e56552087acf", + "keywords": "数列,数学运算", + "title": "求数列第n项值", + "desc": [ + { + "content": "\n

求数列第n项值:1,2,3,6,11,20,37,68,125,230,.....例如:第7项为37,第9项为125。

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nint main(void) { \n\tint n;\n\tprintf(\"请输入n的值:\");\n\tscanf(\"%d\",&n);\n\tif(n==1){\n\t\tprintf(\"第1项为1\\n\");\n\t}else if(n==2){\n\t\tprintf(\"第2项为2\\n\");\n\t}else if(n==3){\n\t\tprintf(\"第3项为3\\n\");\n\t}else{\n\t\tint f1=1,f2=2,f3=3;\n\t\tint i,fn;\n\t\tfor(i=4;i<=n;i++){\n\t\t\tfn=f1+f2+f3;\n\t\t\tf1=f2;\n\t\t\tf2=f3;\n\t\t\tf3=fn;\n\t\t}\n\t\tprintf(\"第%d项为%d\\n\",n,fn);\n\t}\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-9662f082ecb24eafbabd9cc73d7a5847", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600469855" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/36.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/36.exercises/config.json" new file mode 100644 index 000000000..727669b4e --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/36.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-41a61041f452440ba9cc47d98c9b5087", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/36.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/36.exercises/solution.json" new file mode 100644 index 000000000..53650a0c2 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/36.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "89d9e179bea44370ab0c829bb40b6b76", + "keywords": "图算法,算法高阶,最小生成树,最小生成树的形成", + "title": "找出字符串中出现最多的字母", + "desc": [ + { + "content": "\nDescription\n钟Sir是一个迷信的(superstitious)家伙。他相信每一个字符串(string)里都有一个幸运字符。我们可以通过以下方法找到这个字符。例如,在字符串abbccc中,c 出现的次数最多,所以这个幸运字符就是 c 啦!(>_<)  (钟Sir的想法好简单啊…)\nInput\n第一行是测试数据的组数n,接下来的每组测试数据占一行,每行数据不超过1000个字符且非空。\n字符串里只含小写字母。\nOutput\n每组数据对应输出一行,包括出现次数最多的字符和该字符出现的次数,中间是一个空格。如果有多个字符出现的次数相同且最多,那么输出ASCII码最小的那一个字符。\nSample Input\n2\nabbccc\nadfadffasdf\nSample Output\nc 3\nf 4", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": " #include \n#include\"stdio.h\"\nint main(void)\n{\n\tint n,i, z[26], max, xia;\n\tchar c[1050], ch;\n\tscanf(\"%d\",&n);\n\twhile(n>0)\n\t{\n\t\tn--;\n\t\tscanf(\"%s\", c);\n\t\tfor(i=0; i<26; i++)\n\t\t\tz[i]=0;\n\t\txia=strlen(c);\n\t\tfor(i=0; imax){ \n\t\t\tmax=z[i];\n\t\t\txia=i;\n\t\t}\n\t\tch='a'+xia;\n\t\tprintf(\"%c %d\\n\", ch, max);\n\t}\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-41a61041f452440ba9cc47d98c9b5087", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600469966" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/37.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/37.exercises/config.json" new file mode 100644 index 000000000..ff5d8cda8 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/37.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-50a57ff04dbd44e19752bef441bb988b", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/37.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/37.exercises/solution.json" new file mode 100644 index 000000000..fc21a4743 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/37.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "a9b93d1decbc46a0b40aa01f35b02ea3", + "keywords": "循环", + "title": "不同方式求n的阶乘", + "desc": [ + { + "content": "\n

求n的阶乘(用三种不同的循环实现,提示:先从键盘输入n的值)while、do while和for

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nint main(void) { \n\tint n;\n\tprintf(\"请输入n的值:\");\n\tscanf(\"%d\",&n);\n\tint temp=n,sum=1;\n\twhile(temp>1){\n\t\tsum*=temp;\n\t\ttemp--;\n\t}\n\tprintf(\"%d的阶乘是%d\\n\",n,sum);\n\ttemp=n;\n\tsum=1;\n\tdo{\n\t\tsum*=temp;\n\t\ttemp--;\n\t}while(temp>1);\n\tprintf(\"%d的阶乘是%d\\n\",n,sum);\n\ttemp=n;\n\tsum=1;\n\tfor(;temp>1;temp--){\n\t\tsum*=temp;;\n\t}\n\tprintf(\"%d的阶乘是%d\\n\",n,sum);\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-50a57ff04dbd44e19752bef441bb988b", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600469955" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/38.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/38.exercises/config.json" new file mode 100644 index 000000000..8eb10804f --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/38.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-0ebac8b47771430ab733f371d755a8c8", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/38.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/38.exercises/solution.json" new file mode 100644 index 000000000..ebc9f6b99 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/38.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "2643e10921c54ac283bdb73499243c5d", + "keywords": "算法高阶,字符串匹配,算法问题选编,利用有限自动机进行字符串匹配", + "title": "字符串的处理", + "desc": [ + { + "content": "\n

给定一个正整数N和一个由小写英文字母组成的长度N的字符串S。确定该字符串是否是某个字符串的两个副本的连接。也就是说,确定是否存在一个字符串T使S=T+T。如果S是某个字符串的两个副本的连接,则输出Yes;否则,直接输出No。\n例如,输入6(回车)abcabc,输出Yes(回车)Let T=abc,and S=T+T。\n或者输入4(回车)abac,输出No(回车)结束。

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nint main() {\n\tint len,i,judge=0;\n\tscanf(\"%d\", &len);\n\tchar a[len+1];\n\tscanf(\"%s\", a);\n\tif(len%2==0) {\n\t\tfor(i=0;i<(len/2);i++)\n\t\t\tif(a[i]!=a[(len/2)+i]){\n\t\t\t\tjudge=1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\tif(judge==1)\n\t\t\tprintf(\"No\");\n\t\telse {\n\t\t\tprintf(\"Yes\");\n\t\t}\n\t} else\n\t\tprintf(\"No\");\n\tprintf(\"\\n\");\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-0ebac8b47771430ab733f371d755a8c8", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470157" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/39.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/39.exercises/config.json" new file mode 100644 index 000000000..f956f18dc --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/39.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-0d0995dc614d484ca466036511232672", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/39.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/39.exercises/solution.json" new file mode 100644 index 000000000..27bf80f67 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/39.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "470a59d0ed744d55b36a9fbe8ed76198", + "keywords": "数列", + "title": "怎么求尾数与常数之和?", + "desc": [ + { + "content": "\n

数列的前3项都为1,从第4项开始,每项都是其前3项的和:1, 1, 1, 3, 5, 9, 17, … 请你编程求出数列第N项的4位尾数与90000之和。输入一个正整数N,输出所求的和。

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nusing namespace std;\n#define NUM 10000\nlong long dp[1000000];\nint main(){\n    int n;\n    cin>>n;\n    dp[1]=1;\n    dp[2]=1;\n    dp[3]=1;\n    for(int i=4;i<=n;i++){\n        dp[i]=dp[i-1]+dp[i-2]+dp[i-3];\n    }\n    cout<\nint isp(int n)\n{\n\tint i;\n\tif (n<2)\n\t\treturn 0;\n\tfor (i=2;i*i<=n;++i)\n\t{\n\t\tif (n%i==0)\n\t\t\treturn 0;\n\t}\n\treturn 1;\n}\nint main()\n{\n\tint i=17;\n\twhile (i<=100)\n\t{\n\t\tif (isp(i))\n\t\t\tprintf(\"%d \",i);\n\t\ti+=10; \n\t}\n\tprintf(\"\\n\"); \n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-8f4a328fa32542cfbab686f197492c17", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470167" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/40.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/40.exercises/config.json" new file mode 100644 index 000000000..6cfa9c854 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/40.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-4928f8d1cc754a6e99023dfe6fcc645c", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/40.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/40.exercises/solution.json" new file mode 100644 index 000000000..61b48f4ce --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/40.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "9e99f632c7254a3386832c055749196f", + "keywords": "算法高阶,数论算法,算法问题选编,整数的因子分解", + "title": "整数分解", + "desc": [ + { + "content": "\n

输入一个整数,将其按7进制位分解为各乘式的累加和(下图为输出结果)

\n

\"\"\n

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include\n#define X 7\nint main()\n{\n\tint i=0;\n\tint mod,num=720;\n\twhile(num)\n\t{\n\t\tmod=num%X;\n\t\tnum/=X;\n\t\tif(mod!=0)\n\t\t\tprintf(\"%d*7^%d%c\",mod,i,(num>0)?'+':'\\n');\n\t\ti++;\n\t}\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-4928f8d1cc754a6e99023dfe6fcc645c", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470155" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/41.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/41.exercises/config.json" new file mode 100644 index 000000000..6ddd8538c --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/41.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-58a48a2a35404ef68df4d1d487615e2a", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/41.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/41.exercises/solution.json" new file mode 100644 index 000000000..2ba5dcdcc --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/41.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "1cc2af8b030c41f687a7d0308bcbd9be", + "keywords": "算法初阶,基础知识,函数的增长,标准记号与常用函数", + "title": "按要求完成数据的输入输出", + "desc": [ + { + "content": "\n

有6个学生,每个学生的数据包括学号、姓名、3门课的成绩、平均成绩,输入每个学生的信息,平均成绩需通过计算得出,输出学生的信息。要求:输入、输出不使用函数。

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include\n#include\n#include\nint n;\nstruct person\n{\n\tchar id [20];\n\tchar name [20];\n\tint s1,s2,s3;\n\tint sum;\n\tfloat ave;\n} p[100];\nint main()\n{\n\tint i,j,t,m;\n\tscanf(\"%d\",&n);\n\tfor(int i=0; i\nint main()\n{\n\tint a[256][256];\n\tint n,m,i,j,sum=0;\n\tscanf(\"%d %d\",&n,&m);\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tfor(j=1;j<=m;j++)\n\t\t{\n\t\t\tscanf(\"%d\",&a[i][j]);\n\t\t\tif (i == 1 || i == n || j == 1 || j == m) sum += a[i][j];\n\t\t}\n\t}\n\tprintf(\"%d\",sum);\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-6b6cb108231247e8a0d25180f162718b", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470181" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/43.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/43.exercises/config.json" new file mode 100644 index 000000000..da47b2714 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/43.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-1ef5eb82d2104bb499ae0d7c160eca08", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/43.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/43.exercises/solution.json" new file mode 100644 index 000000000..d43d6b415 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/43.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "a691200feb064addb5299c796864fb54", + "keywords": "算法高阶,字符串匹配,算法问题选编,利用有限自动机进行字符串匹配", + "title": "从指定位置插入字符串", + "desc": [ + { + "content": "\n编写程序,输入字符串S1和S2以及插入位置n,在字符串S1中的指定位置n处插入字符串S2。例如,输入“jiangsu”、“123”和位置3,则输出“ji123angsu”。", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \nusing namespace std;\nint main()\n{\n\tstring str1;\n\tstring str2;\n\tint pos;\n\tdo\n\t{\n\t\tif ((cin >> str1 >> str2 >> pos) && (pos >= 1))\n\t\t{\n\t\t\tstr1.insert(pos - 1, str2);\n\t\t\tcout << str1 << endl;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcout << \"Invalid Input\" << endl;\n\t\t\tbreak;\n\t\t}\n\t} while (false);\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-1ef5eb82d2104bb499ae0d7c160eca08", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600469953" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/44.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/44.exercises/config.json" new file mode 100644 index 000000000..d4734cd22 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/44.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-c38e888a041e4ee59422318293d9fc97", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/44.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/44.exercises/solution.json" new file mode 100644 index 000000000..cb8df56ca --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/44.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "0f46f7cc63a64195a69ecf894966c670", + "keywords": "算法高阶,字符串匹配,算法问题选编,利用有限自动机进行字符串匹配", + "title": "字符串匹配", + "desc": [ + { + "content": "\n

输入两个字符串s1和s2,在s1中查找s2对应的字符串是否存在,若存在则输出它第一次出现的位置;若不存在,则输出“没有找到该字符串”。

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \nusing namespace std;\nint main()\n{\n\tstring s1, s2;\n\tcout << \"请输入第一个字符串:\";\n\tcin >> s1;\n\tcout << \"请输入第二个字符串:\";\n\tcin >> s2;\n\tif (s1.find(s2) != -1)\n\t\tcout << s1.find(s2)<创建一个大小为 100 的整型数组,数组元素由数值大小在闭区间[0,1000]内的\n随机数组成。在控制台窗口中输出数组内数值为 7 的倍数,且除以 3 余数为 2 的\n元素。若数组中不存在符合规则的元素,则在控制台中给出相应提示

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \nint main()\n{\n\tint a[100];\n\tint i,nmb = 0;\n\tfor(i = 0;i<100;i++)\n\t\ta[i] = rand()%1001;\n\tfor (i = 0;i<100;i++)\n\t{\n\t\tif( (a[i]%7 == 0) && (a[i]%3 ==2) )\n\t\t{\n\t\t\tprintf(\"%5d\",a[i]);\n\t\t\tnmb++;\n\t\t}\n\t}\n\tprintf(\"\\n\");\n\tif(nmb == 0)\n\t\tprintf(\"没有符合条件的数\\n\");\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-64982f9ba8dd444da2c236c7f074dab0", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600469937" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/46.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/46.exercises/config.json" new file mode 100644 index 000000000..d6c2e3cd1 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/46.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-a210905d5f7e4bfe9f46bb1b3400b70f", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/46.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/46.exercises/solution.json" new file mode 100644 index 000000000..f6496900c --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/46.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "2868e7b62db247d8b3800d43ebff571b", + "keywords": "算法高阶,数论算法,素数的测试,算法问题选编", + "title": "找出所有三位素数", + "desc": [ + { + "content": "\n题目描述\n一个n位超级素数是指一个n位正整数,它的前1位,前2位,......,前n位均为素数,例如,733是个3位超级素数,因为7,73,733均为素数。输出全部的3位数超级素数。 \n输入\n输出\n全部的3位数超级素数,每行一个数", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nint isprime(int x)\n{\n\tif (x == 0 || x == 1) return 0;\n\tfor (int i = 2; i <= x / 2; i++)\n\t\tif (!(x % i)) return 0;\n\treturn 1;\n}\nint isallprime(int x)\n{\n\tdo\n\t{\n\t\tif (!isprime(x)) return 0;\n\t\tx /= 10;\n\t}\n\twhile (x > 0);\n\treturn 1;\n}\nint main()\n{\n\tfor (int i = 111; i <= 1000; i++)\n\t\tif (isallprime(i)) printf(\"%d\\n\", i);\n}", + "language": "cpp" + }, + "node_id": "dailycode-a210905d5f7e4bfe9f46bb1b3400b70f", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600469948" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/47.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/47.exercises/config.json" new file mode 100644 index 000000000..cebab0297 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/47.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-39f31fa6e3b74d95bcfccf7c3f06c192", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/47.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/47.exercises/solution.json" new file mode 100644 index 000000000..78673d310 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/47.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "0a56db6452f24e50933fff9480245e2f", + "keywords": "算法高阶,数论算法,算法问题选编,整数的因子分解", + "title": "数学题", + "desc": [ + { + "content": "\n编程求1-200中能被2、3、5除余1的前10个整数。", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nint main()\n{\n\tint n=0,i;\n\tfor(i=1; i<=200; i++)\n\t{\n\t\tif((i%2==1)&&(i%3==1)&&(i%5==1))\n\t\t{\n\t\t\tn++;\n\t\t\tif(n<=10)\n\t\t\t\tprintf(\"%d \",i);\n\t\t\tif(n==10)\n\t\t\t\tbreak;\n\t\t}\n\t}\n}", + "language": "cpp" + }, + "node_id": "dailycode-39f31fa6e3b74d95bcfccf7c3f06c192", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600469938" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/48.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/48.exercises/config.json" new file mode 100644 index 000000000..fe3390c9e --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/48.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-3770668fea9a4a22987320b43d573fd4", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/48.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/48.exercises/solution.json" new file mode 100644 index 000000000..f3ad60633 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/48.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "2ba1fb6b11e2484ab4d3b77e77e71f5e", + "keywords": "算法初阶,快速排序,快速排序的描述,排序和顺序统计量", + "title": "采用插入排序,按照字符顺序从小到大进行排序", + "desc": [ + { + "content": "\n【问题描述】\n编写一个程序,从键盘接收一个字符串(长度不超过20),采用插入排序,按照字符顺序从小到大进行排序,最后输出排序后的字符串。\n【输入形式】\n输入一行字符串,长度不超过20。\n【输出形式】\n输出排序后的字符串。\n【样例输入】\nH2e3L*Lo,Wor#Ld.\n【样例输出】\n#*,.23HLLLWdeoor", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \nint main()\n{\n\tchar a[21];\n\tscanf(\"%s\",a);\n\tint t,j=0,i=0;\n\tint n = strlen(a);\n\tfor(j=1;j < n; j++){\n\t\tfor(i=0;i a[j]) break;\n\t\t}\n\t\tint t=a[j];\n\t\tint t1;\n\t\tfor(;i<=j;i++){\n\t\t\tt1=a[i];\n\t\t\ta[i]=t;\n\t\t\tt=t1;\n\t\t}\n\t}\n\tprintf(\"%s\",a);\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-3770668fea9a4a22987320b43d573fd4", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470272" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/49.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/49.exercises/config.json" new file mode 100644 index 000000000..739ba01ca --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/49.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-5b71b02dd5694fccae63bdaaa74c208c", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/49.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/49.exercises/solution.json" new file mode 100644 index 000000000..09d6a754b --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/49.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "784938343cda4c629b52000ba7981f24", + "keywords": "数学运算", + "title": "计算第n项的值", + "desc": [ + { + "content": "\n计算 s=(1+1)+(1+2)+(1+2+3)+````+(1+2+3+...+n) 第n项的值", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nint main()\n{\n\tint n; \n\tstatic int\tsum=1;\n\tcout << \"请输入N:\" << endl;\n\tcin >> n;\n\tfor (int i = 1; i <= n; i++)\n\t{\n\t\tfor (int j = 1; j <= i; j++)\n\t\t{\n\t\t\tsum = sum + j;\n\t\t}\n\t}\n\tcout << \"结果为:\" << sum;\n\tsystem(\"pause\");\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-5b71b02dd5694fccae63bdaaa74c208c", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600469946" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/5.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/5.exercises/config.json" new file mode 100644 index 000000000..629d862ea --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/5.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-5595559543584bc69a5db8ee9eaa3956", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/5.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/5.exercises/solution.json" new file mode 100644 index 000000000..85edafbb0 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/5.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "a13a0ee7f65e4635847c39aa35ad12dd", + "keywords": "算法初阶,排序和顺序统计量,中位数和顺序统计量", + "title": "数据合并", + "desc": [ + { + "content": "\n题目描述\n将两个从小到大排列的一维数组 (维长分别为 m,n , 其中 m,n≤100) 仍按从小到大的排列顺序合并到一个新的一维数组中,输出新的数组.\n输入描述\n第 1行一个正整数 m , 表示第一个要合并的一维数组中的元素个数\n第 2 行一个正整数 n , 表示第二个要合并的一维数组中的元素个数\n第 3 行输入 m 个整数 (每个数用空格分开) , 表示第一个数组元素的值.\n第 4 行输入 n 个整数 (每个数用空格分开) , 表示第二个数组元素的值.\n输出描述\n一行,表示合并后的数据,共 m +n 个数\n样例输入\n3\n4\n1 3 5\n2 4 6 8\n样例输出\n1 2 3 4 5 6 8\n要多组输入输出", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nvoid merge(int * a1, int m, int * a2, int n)\n{\n\tint m1 = m - 1;\n\tint n1 = n - 1;\n\tfor (int i = m + n - 1; i >= 0; i--)\n\t{\n\t\tif (m1 < 0) a1[i] = a2[n1--];\n\t\telse if (n1 < 0) a1[i] = a1[m1--];\n\t\telse if (a1[m1] < a2[n1]) a1[i] = a2[n1--];\n\t\telse a1[i] = a1[m1--];\n\t}\n}\nint main()\n{\n\tint m;\n\tint n;\n\tcin >> m;\n\tcin >> n;\n\tint a1[201];\n\tint a2[101];\n\tfor (int i = 0; i < m; i++) cin >> a1[i];\n\tfor (int i = 0; i < n; i++) cin >> a2[i];\n\tmerge(a1, m, a2, n);\n\tfor (int i = 0; i < m + n; i++) cout << a1[i] << \" \";\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-5595559543584bc69a5db8ee9eaa3956", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470263" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/50.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/50.exercises/config.json" new file mode 100644 index 000000000..e9b0f199e --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/50.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-00acbdbae41242b1ab11f3f2a18db473", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/50.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/50.exercises/solution.json" new file mode 100644 index 000000000..c92def2b5 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/50.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "64cdf149702648d08e72882e5a4b194e", + "keywords": "图算法,算法高阶,最小生成树,最小生成树的形成", + "title": "最小公倍数", + "desc": [ + { + "content": "\n

从键盘输入两个正整数,求出它们的最小公倍数并输出所求结果。

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include\nint main() {\n    int m,n,temp,i;\n    scanf(\"%d%d\",&m,&n);\n    if(m0; i++)  \n        if(i%m==0 && i%n==0)\n        {\n            printf(\"%d 和 %d 的最小公倍数是: %d\\n\", m, n, i);\n            break;\n        }\n    return 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-00acbdbae41242b1ab11f3f2a18db473", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470147" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/51.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/51.exercises/config.json" new file mode 100644 index 000000000..dc94a4cca --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/51.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-7f4ffa5e3eaa4012b0eb71d6930387ba", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/51.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/51.exercises/solution.json" new file mode 100644 index 000000000..55a72891c --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/51.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "3d029d11c3e84465a0a62b1e960cc2bb", + "keywords": "算法高阶,数论算法,算法问题选编,RSA公钥加密系统", + "title": "编写一万年历系统(2021年)", + "desc": [ + { + "content": "\n

要求:模仿现实生活中的挂历。\n当前页以系统当前日期的月份为准显示当前月的每一天(显示出日及对应的星期几)。\n当系统日期变到下一月时,系统自动翻页到下一月。\n

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nint year(int y)\n{\n\tif ((y%4==0) && (y%100!=0) || y%400==0)\n\t\treturn 366;\n\telse\n\t\treturn 365;\n}\nint main()\n{\n\tint y;\n\tint i,j,sum=0;\t\n\tint begin,week;\n\tint days[12]={31,28,31,30,31,30,31,31,30,31,30,31};\n\tscanf(\"%d\",&y);\n\tfor(i=1;i\n#define N (int)5\nint main()\n{\n\tint a[N] = {1,5,3,92,6};\n\tint tmp;\n\tfor (int i = 0; i < N-1; i++)\n\t{\n\t\tfor (int j = 0;j < N-1-i;j++)\n\t\t{\n\t\t\tif (a[j] > a[j+1])\n\t\t\t{\n\t\t\t\ttmp = a[j];\n\t\t\t\ta[j] = a[j+1];\n\t\t\t\ta[j+1] = tmp;\n\t\t\t}\n\t\t}\n\t}\n\tfor (int i = 0; i < N; i++)\n\t{\n\t\tprintf(\"%d \",a[i]);\n\t}\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-d4b456f961584157aa5e8a1d39710971", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470264" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/53.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/53.exercises/config.json" new file mode 100644 index 000000000..84f83e883 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/53.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-4eb06a6ddce54064adf5c37ab70cc96e", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/53.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/53.exercises/solution.json" new file mode 100644 index 000000000..c91920012 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/53.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "7a01b1256de14c1b8ad5e331d1fae735", + "keywords": "算法高阶,矩阵运算,矩阵求逆,算法问题选编", + "title": "成绩问题", + "desc": [ + { + "content": "\n八个同学的语文数学成绩\n每位同学的语文数学成绩比较,如果成绩都大于等于,则输出1;否则输出0.\n最后形成一个八行八列的矩阵", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nint main()\n{\n\tint ch[8];\n\tint ma[8];\n\tfor (int i = 0; i < 8; i++)\n\t\tscanf(\"%d%d\", &ch[i], &ma[i]);\n\tfor (int i = 0; i< 8; i++)\n\t{\n\t\tfor (int j = 0; j < 8; j++)\n\t\t\tif (ma[i] >= ma[j] && ch[i] >= ch[j])\n\t\t\t\tprintf(\"1 \");\n\t\t\telse\n\t\t\t\tprintf(\"0 \");\n\t\tprintf(\"\\n\");\n\t}\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-4eb06a6ddce54064adf5c37ab70cc96e", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600469846" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/54.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/54.exercises/config.json" new file mode 100644 index 000000000..50925e4d5 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/54.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-e90b3773494b484a95cc912b8b46f4cc", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/54.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/54.exercises/solution.json" new file mode 100644 index 000000000..0ecd4cba1 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/54.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "5d8658bd3bf54a3eb80aa8073f45ff9b", + "keywords": "动态表,表扩张,算法中阶,摊还分析,高级设计和分析技术", + "title": "商家商品销售量统计", + "desc": [ + { + "content": "\n

现在有一个网站上半年的商品销售量,请你写一段代码帮助店主统计前半年的总销量和平均销量。\n商品销售表\n1月份\t2月份\t3月份\t4月份\t5月份\t6月份\t总销量\t平均销量\n64\t53\t77\t59\t61\t42\t0\t0\n(1)函数中应定义一个包含8个元素的一维数据,用来存放6个月的商品销量和统计后的总销量及平均销量;\n(2)完成6个月销量的输入;\n(3)计算半年的总销量及平均销量;\n(4)按照程序运行效果图,输出商品销量表。\n![图片说明](https://img-ask.csdn.net/upload/202005/16/1589596638_852927.jpg)

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include\nint main()\n{\n\tint a[8],s=0;\n\tprintf(\"----------商家商品销售统计----------\\n\");\n\tprintf(\"\\n\");\n\tprintf(\"请输入商品6个月的销售量:\");\n\tfor (int i = 0; i < 6; i++)\n\t{\n\t\tscanf(\"%d\", &a[i]);\n\t\ts += a[i];\n\t}\n\tprintf(\"\\n\\t\\t\\t商品销量表\\t\\t\\t\\n\");\n\tprintf(\"——————————————————————————————————————————————\\n\");\n\tfor (int i = 1; i <= 8; i++)\n\t{\n\t\tif (i <= 6)\n\t\t\tprintf(\"\t%d月份 \", i);\n\t\telse if (i == 7)\n\t\t\tprintf(\"\t总销售 \");\n\t\telse\n\t\t\tprintf(\"\t平均销售 \\n\");\n\t}\n\tfor (int i = 0; i < 8; i++)\n\t{\n\t\tif (i < 6)\n\t\t\tprintf(\"\t %d |\", a[i]);\n\t\telse if (i == 6)\n\t\t{\n\t\t\ta[i] = s;\n\t\t\tprintf(\"\t %d |\", a[i]);\n\t\t}\n\t\telse\n\t\t{\n\t\t\ta[i] = s / 6;\n\t\t\tprintf(\"\t %d |\",a[i]);\n\t\t}\n\t}\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-e90b3773494b484a95cc912b8b46f4cc", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470258" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/55.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/55.exercises/config.json" new file mode 100644 index 000000000..61a6021dd --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/55.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-a530e610620e44b4b389ef63e0b238cc", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/55.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/55.exercises/solution.json" new file mode 100644 index 000000000..0143441e7 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/55.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "d421a78bd062493383fff7b3dbb32b05", + "keywords": "递归,数学运算", + "title": "求数列的第n项的值", + "desc": [ + { + "content": "\n已知数列:2,4,4,4,6,6,6,6,6,8,8,8,8,8,8,8,...求第n项的值", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nint main()\n{\n\tunsigned int N;\n\tstd::cout << \"Please enter the value of N: \";\n\tstd::cin >> N;\n\tif (N % 2 != 0)\n\t{\n\t\tstd::cout << \"Please enter an even number greater than zero!\" << std::endl;\n\t\treturn -1;\n\t}\n\tint oddCount = 1;\n\tint printCount = 0;\n\tfor (int i = 2; i <= N; i += 2)\n\t{\n\t\tfor (int j = 0; j < oddCount; j++)\n\t\t{\n\t\t\tstd::cout << i << \" \";\n\t\t\tprintCount++;\n\t\t\tif (printCount == N)\n\t\t\t{\n\t\t\t\tstd::cout << \"<---这个就是第N = \" << N << \"个数。\" << std::endl;\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t\toddCount += 2;\n\t}\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-a530e610620e44b4b389ef63e0b238cc", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470260" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/56.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/56.exercises/config.json" new file mode 100644 index 000000000..527cda8d2 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/56.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-f8b6fc2e76794fa78ddc5af2c95f9835", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/56.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/56.exercises/solution.json" new file mode 100644 index 000000000..bdba51f31 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/56.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "3fa9f3d1423842008b789a377afdbab8", + "keywords": "算法初阶,基础知识,函数的增长,标准记号与常用函数", + "title": "计算函数的值", + "desc": [ + { + "content": "\n

编程输入实数x,计算下面函数的值,并输出y的值,并输出y的值;\nx2         x<1\n3x-1      1≦x≦10\nx/5        x>10

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "# include\n# include\nint main(void)\n{\n\tfloat x,y;\n\tprintf(\"请输入x的值:\\n\");\n\tscanf(\"%f\",&x);\n\tif(x<1)\n\t{\n\t\ty = x * x;\n\t}\n\telse if(x<=10)\n\t{\n\t\ty=3*x-1;\n\t}\n\telse\n\t{\n\t\ty= x / 5;\n\t}\n\tprintf(\"y的值为:%f\\n\",y);\n\tsystem(\"pause\");\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-f8b6fc2e76794fa78ddc5af2c95f9835", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470171" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/57.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/57.exercises/config.json" new file mode 100644 index 000000000..d0cfdef03 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/57.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-2d0e9720703440b89c4c78bc0eac8cb4", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/57.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/57.exercises/solution.json" new file mode 100644 index 000000000..cf808b70e --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/57.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "dc4363e2790746529e70010a643e343d", + "keywords": "算法初阶,基础知识,随机算法,概率分析和随机算法", + "title": "统计某一单科成绩各分数段的分布人数", + "desc": [ + { + "content": "\n设某班有若干人,写一程序统计某一单科成绩各分数段的分布人数,每人的成绩随机输入,输入负数表示输入结束。要求按下面的格式输出统计结果(“**”表示实际分布人数)\n0~39\t**\n40~49\t**\n50~59\t**\n……\n90~100\t**", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \nusing namespace std;\nint main()\n{\n\tint result[12] = {0};\n\tint gold;\n\twhile (cin>>gold) {\n\t\tif (gold < 0) {\n\t\t\tbreak;\n\t\t}\n\t\tint code = gold / 10;\n\t\tif (code < 4) {\n\t\t\tresult[3] ++;\n\t\t}\n\t\telse if(code == 10) {\n\t\t\tresult[9] ++;\n\t\t}\n\t\telse {\n\t\t\tresult[code] ++;\n\t\t}\n\t}\n\tstring word[] = {\"0~39\",\n\t\"40~49\",\n\t\"50~59\",\n\t\"60~69\",\n\t\"70~79\",\n\t\"80~89\",\n\t\"90~100\"};\n\tfor (int i=0; i<7; i++) {\n\t\tcout<\nint main()\n{\n\tint a[10],i,max,maxindex;\n\tfor(i =0;i<10;i++)\n\t\tscanf(\"%d\",&a[i]);\n\tmax = a[0]; \n\tmaxindex = 0;\n\tfor (i =1;i<10;i++)\n\t{\n\t\tif(a[i] > max)\n\t\t{\n\t\t\tmax = a[i];\t\n\t\t\tmaxindex = i; \n\t\t}\n\t}\n\tprintf(\"最大值%d,索引:%d\\n\",max,maxindex);\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-ae5a4a9413e849e4825de0a930c4649a", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600469936" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/59.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/59.exercises/config.json" new file mode 100644 index 000000000..7355ef51c --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/59.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-6aef4822e3c54d95b4bb480d4242e5f1", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/59.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/59.exercises/solution.json" new file mode 100644 index 000000000..6904b92c4 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/59.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "ce51c2a42ff44e23a4ff61e60774103f", + "keywords": "算法高阶,字符串匹配,算法问题选编,利用有限自动机进行字符串匹配", + "title": "回文串", + "desc": [ + { + "content": "\n题目描述\n回文串是从左到右或者从右到左读起来都一样的字符串,试编程判别一个字符串是否为回文串。\n输入\n输入一个字符串。串长度<255.\n输出\n判别输入的字符串是否为回文串,是回文串输出\"Y\",否则输出\"N\"。\n样例输入\nabcba\n样例输出\nY", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include\n#include\nusing namespace std;\nint main(void)\n{\n\tchar *p=\"abcba\";\n\tint n=strlen(p);\n\tbool flag=1;\n\tint i;\n\tfor(i=0;i计算所有4位正整数中同时能被13和20整除的数的和, 并同时做到如下显示:\n①显示这些数:\n②显示这些数的个数:\n③显示这些数的和。

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \"stdio.h\"\nint main()\n{\n\tint i = 1000;\n\tint count = 0;\n\tint sum = 0;\n\tprintf(\"所有4位正整数中同时能被13和20整除的数:\\n\");\n\tfor(i = 1000;i<10000;i++)\n\t{\n\t\tif(i % 13 == 0 && i % 20 == 0)\n\t\t{\n\t\t\tcount++;\n\t\t\tsum = sum + i;\n\t\t\tprintf(\"%d、\",i);\n\t\t}\n\t}\n\tprintf(\"\\n这些数一共有%d个\\n\",count);\n\tprintf(\"这些数的和是:%d\\n\",sum);\n}", + "language": "cpp" + }, + "node_id": "dailycode-d83f9085634b418e80229a2b5a9cb63c", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600469942" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/60.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/60.exercises/config.json" new file mode 100644 index 000000000..e45b7a2bd --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/60.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-0824e8c594e842248af440381b6aacd2", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/60.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/60.exercises/solution.json" new file mode 100644 index 000000000..aa434955b --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/60.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "026cef91deb8490fbdfefb164bf020bf", + "keywords": "算法初阶,基础知识,函数的增长,标准记号与常用函数", + "title": "输入某人的身高(厘米)和体重(公斤),按下式确定此人的体重是否标准、过胖或过瘦", + "desc": [ + { + "content": "\n

(1)标准体重=(身高-110)公斤;\n(2)超过标准体重5公斤为过胖;\n(3)低于标准体重5公斤为过瘦。\n例如:输入身高和体重分别为160,60,输出为过胖\n输入身高和体重分别为160,50,输出为标准\n输入身高和体重分别是160,40,输出为过瘦

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nint main() \n{ \n\tint h,w;\n\tprintf(\"请输入身高(厘米)和体重(公斤)\");\n\tscanf(\"%d %d\",&h,&w);\n\tint s = h - 110;\n\tif( (w-s) > 5)\n\t\tprintf(\"过胖\\n\");\n\telse if( s - w > 5)\n\t\tprintf(\"过瘦\");\n\telse\n\t\tprintf(\"标准\\n\");\n\treturn 0; \n} ", + "language": "cpp" + }, + "node_id": "dailycode-0824e8c594e842248af440381b6aacd2", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600469850" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/61.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/61.exercises/config.json" new file mode 100644 index 000000000..569bb3ae4 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/61.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-292dcb01772448409f0093e9ac99b7be", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/61.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/61.exercises/solution.json" new file mode 100644 index 000000000..e1ab7d2e4 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/61.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "76e7efc2f3e348388926bb242343fcfe", + "keywords": "回文,数学运算", + "title": "筛选10到1000的回文数", + "desc": [ + { + "content": "\n筛选出10到1000的回文数", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nint main() \n{ \n\tint m,n,k; \n\tfor(m=1;m<=1000;m++) \n\t{ \n\t\tk=m; \n\t\tn=0; \n\t\twhile(k>0) \n\t\t{ \n\t\t\tn=n*10+(k%10); \n\t\t\tk=k/10; \n\t\t} \n\t\tif(m==n) printf(\"%d \", m); \n\t}\n\treturn 0;\t \n}", + "language": "cpp" + }, + "node_id": "dailycode-292dcb01772448409f0093e9ac99b7be", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470162" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/62.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/62.exercises/config.json" new file mode 100644 index 000000000..5021a5932 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/62.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-6ee8ab461708427d9f8200b2ead72d59", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/62.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/62.exercises/solution.json" new file mode 100644 index 000000000..076b285e4 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/62.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "42b687b25f34427f9645a1c027620a59", + "keywords": "算法高阶,字符串匹配,算法问题选编,利用有限自动机进行字符串匹配", + "title": "统计各类字符个数", + "desc": [ + { + "content": "\n

分别统计一个字符串中出现小写字母、大写字母、数字和空格的个数。\n输入格式:\n在一行中输入长度不超过40的字符串。\n输出格式:\n第一行中输出“小写字母=x“ 第二行中输出“大写字母=y“ 第三行中输出“数字=z” 第四行中输出“空格=m” 所有结果均原样输出,没有列宽控制。

\n

输入样例:

\nsd2h b57 sA\n

输出样例:

\n
\n小写字母=5\n大写字母=1\n数字=3\n空格=2
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include\nint main()\n{\n\tint a=0,b=0,c=0,d=0,e=0;\n\tchar *p,str[80];\n\tp=str;\n\tgets(str);\n\twhile(*p)\n\tif(*p>='A' && *p <='Z')\n\t\t{a++;p++;}\n\telse if(*p>='a' && *p <='z')\n\t\t{b++;p++;}\n\telse if(*p==' ')\n\t\t{c++;p++;}\n\telse if(*p>='0' && *p <='9')\n\t\t{d++;p++;}\n\telse\n\t\t{e++;p++;}\n\tprintf(\"%d %d %d %d %d\\n\",a,b,c,d,e);\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-6ee8ab461708427d9f8200b2ead72d59", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470174" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/63.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/63.exercises/config.json" new file mode 100644 index 000000000..047128cf2 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/63.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-543bcaa53c544c4fb98725e053e59643", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/63.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/63.exercises/solution.json" new file mode 100644 index 000000000..36642c82d --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/63.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "25fe83471079488494b2a35897a7ea41", + "keywords": "B树,算法高阶,高级数据结构,B树上的基本操作", + "title": "请问如何实现这个代码的多组输入输出?", + "desc": [ + { + "content": "\n

给定 2 个正整数 a, b ,a 和 b 最多可能有 40 位,求出 a + b 的和。\n输入描述\n两个正整数 a, b,a 和 b 最多可能有 40 位。一行表示一个数。\n输出描述\na + b 的和。

样例输入

111111111111111111111111111111111111111\n222222222222222222222222222222222222222\n

样例输出

333333333333333333333333333333333333333\n
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \nusing namespace std;\nint main(){\n\twhile (1)\n\t{\n\t\tchar s1[200],s2[200];\n\t\tint a[200]={0},b[200]={0},l1,l2,c,k,i;\n\t\tgets(s1);\n\t\tl1=strlen(s1);\n\t\tif (l1 == 0) break;\n\t\tgets(s2);\n\t\tl2=strlen(s2);\n\t\tif(l1=0;i--){\n\t\t\ta[i]+=b[i];\n\t\t\tif(a[i]>=10){\n\t\t\t\ta[i]=10;\n\t\t\t\ta[i-1]++;\n\t\t\t}\n\t\t}\n\t\tif(a[0]!=0){\n\t\t\tfor(i=0;i<=c;i++)\n\t\t\t\tcout<\n#include \n#include \n#include \nusing namespace std;\nbool compare(string a,string b) {\n\tif (a.length() != b.length()) {\n\t return a.length() < b.length();\n\t}\n\treturn a < b;\n}\nint main()\n{\n\tvectorlist;\n\tstring inputString;\n\twhile (cin>>inputString) {\n\t\tif (inputString == \"0\") {\n\t\t\tbreak;\n\t\t}\n\t\tlist.push_back(inputString);\n\t}\n\tsort(list.begin(),list.end(),compare);\n\tfor (int i=0; i\n#define ARR_LEN 255 \n#define elemType int \nvoid bubbleSort (elemType arr[], int len) {\n\telemType temp;\n\tint i, j;\n\tfor (i=0; i arr[j+1]) { \n\t\t\t\ttemp = arr[j];\n\t\t\t\tarr[j] = arr[j+1];\n\t\t\t\tarr[j+1] = temp;\n\t\t\t}\n\t\t}\n}\nint main (void) {\n\telemType arr[ARR_LEN] = {4286,3185,2895,3550,2745};\n\tint len = 5;\n\tint i;\n\tbubbleSort (arr, len);\n\tfor (i=0; i\nusing namespace std;\nvoid revert(int n)\n{\n\tif ( n>= 0 && n<= 9 )\n\t{\n\t\tcout<【问题描述】规定26个英文字符的能量值分别是1-26,键盘输入一个英文单词,输出它的能量值。字符不区分大小写。\n【输入形式】在提示语后面输入一个单词\n【输出形式】输出energy=计算值\n【样例输入1】Input a word:Integrity\n【样例输出1】energy=127\n【样例输入2】Input a word:Upset\n【样例输出2】energy=81\n【样例说明】下划线上是输入输出的数据,其余是程序的提示信息

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \nusing namespace std;\n#pragma warning(disable:4996)\nint main()\n{\n\tint i;\n\tint sum = 0;\n\tchar arrs[1000];\n\tprintf(\"Input a word:\");\n\twhile (scanf(\"%s\", &arrs) != EOF) {\n\t\tsum = 0;\n\t\tfor (i = 0; i < strlen(arrs); i++) {\n\t\t\tif (arrs[i] >= 'a') {\n\t\t\t\tsum += arrs[i] - 'a' + 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsum += arrs[i] - 'A' + 1;\n\t\t\t}\n\t\t}\n\t\tprintf(\"energy=%d\\n\", sum);\n\t\tprintf(\"Input a word:\");\n\t}\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-cbca6fcbc4ab4dbabee8b7376d875e60", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600469864" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/68.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/68.exercises/config.json" new file mode 100644 index 000000000..01fd70585 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/68.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-3ca87741ab2a4756b5cfc06351fe7944", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/68.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/68.exercises/solution.json" new file mode 100644 index 000000000..5822e44e7 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/68.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "f29824db6c66441296e9fa9229ae8e23", + "keywords": "桶排序,算法初阶,线性时间排序,排序和顺序统计量", + "title": "选择排序法", + "desc": [ + { + "content": "\n

使用选择排序法对10个整数进行由大到小排序。

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nint main() {\n\tint a[10];\n\tint i,j,temp=0;\n\tint k,x=0;\n\tprintf(\"输入10个数:\\n\");\n\tfor(i=0; i<10; i++)\n\t\tscanf(\"%d\",&a[i]);\n\tfor(i=0; i<9; i++) {\n\t\tk = i;\n\t\tfor(j=i+1; j<10; j++)\n\t\t\tif(a[j]初始化一个字符数组为"The best or nothing",并将其中每个单词的字母顺序翻转后打印输出到屏幕。要求:\n1、字符数组的初始化在程序运行时由用户输入;\n2、字符数组的翻转和结果输出功能通过函数实现;\n3、字符数组不能定义成全局变量。

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \nvoid trans(char* p,int len)\n{\n\tchar* s = new char[len];\n\tmemcpy(s,p,len);\n\tfor (int i = 0; i < len; i++)\n\t{\n\t\tp[i] = s[len-1-i];\n\t}\n\tdelete[] s;\n\ts = 0;\n}\nvoid transfun(char* p,int len)\n{\n\tint start = 0;\n\tint i = 0;\n\tint shift = 0;\n\twhile(i < len)\n\t{\n\t\tfor (i = start; i < len;i++)\n\t\t{\n\t\t\tif(p[i] == ' ')\n\t\t\t\tbreak;\n\t\t}\n\t\ttrans(p+shift,i-start);\n\t\tshift += i-start+1;\n\t\tstart = i+1;\n\t\ti +=1;\n\t}\n}\nvoid output(char* p)\n{\n\tprintf(\"%s\\n\",p);\n}\nint main()\n{\n\tchar buf[1000] = {0};\n\tprintf(\"请输入字符串:\");\n\tgets(buf);\n\ttransfun(buf,strlen(buf));\n\toutput(buf);\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-d8fb51f903054d09b3e3e8c23c3c0036", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470153" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/7.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/7.exercises/config.json" new file mode 100644 index 000000000..597f3757f --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/7.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-aacd972c55d1448d89528565d5f3e971", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/7.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/7.exercises/solution.json" new file mode 100644 index 000000000..175a693d8 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/7.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "1ecf2a2118ca48b59e5eaaf8df2c0a2a", + "keywords": "算法高阶,递归结构,高级数据结构,van Emde Boas树,原型van Emde Boas结构", + "title": "分支结构问题 ", + "desc": [ + { + "content": "\n

实现从键盘输入一个字符时,如果该字符为小写字母,则转换为大写字母输出;如果该字符为大写字母,则转换为小写字母输出;如果为其他字符,则原样输出。

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include\nint main()\n{\n\tchar x,y;\n\tprintf(\"请输入一个字符:\");\n\tscanf(\"%c\",&x);\n\tif(x>='A'&&x<='Z')\n\t{\n\t\ty=x+32;\n\t\tprintf(\"此字母是一个大写字母,转换后的小写字母是:%c\",y);\n\t}\n\telse if(x>='a'&&x<='z')\n\t{\n\t\ty=x-32;\n\t\tprintf(\"此字母是一个小写字母,转换后的大写字母是%c\",y);\n\t}\n\telse\n\t{\n\t\tprintf(\"%c\",x);\n\t}\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-aacd972c55d1448d89528565d5f3e971", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600469945" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/70.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/70.exercises/config.json" new file mode 100644 index 000000000..4cc448316 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/70.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-e4b3395dbb454921b2844885d5edee8b", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/70.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/70.exercises/solution.json" new file mode 100644 index 000000000..9bdbf6ccb --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/70.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "08e20ff0063245f98a1255e995fd9d4f", + "keywords": "动态表,表扩张,算法中阶,摊还分析,高级设计和分析技术", + "title": "从键盘输入一组数据建立单链表,然后输出奇数位上的元素。", + "desc": [ + { + "content": "\n输入\n第一行输入单链表长度n。\n第二行输入字符串。\n输出\n第一行:输出各奇数位元素\n样例输入\n7\nABCDEFG\n样例输出\nACEG", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \"stdio.h\"\n#include \"stdlib.h\"\ntypedef struct node\n{\n\tchar x;\n\tnode * next;\n} LList;\nint main()\n{\n\tLList * header = NULL;\n\tnode * p;\n\tint n;\n\tscanf(\"%d\", &n);\n\tfflush(stdin);\n\tfor (int i = 0; i < n; i++)\n\t{\n\t\tif (!header) \n\t\t{\n\t\t\theader = (node *)malloc(sizeof(node));\n\t\t\tp = header;\n\t\t\tscanf(\"%c\", &(header->x));\n\t\t\theader->next = NULL;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tp->next = (node *)malloc(sizeof(node));\n\t\t\tp = p->next;\n\t\t\tscanf(\"%c\", &(p->x));\n\t\t\tp->next = NULL;\n\t\t}\n\t}\n\tp = header;\n\tint i = 0;\n\twhile (p)\n\t{\n\t\tif (i++ % 2 == 0)\n\t\t\tprintf(\"%c\", p->x);\n\t\tp = p->next;\n\t}\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-e4b3395dbb454921b2844885d5edee8b", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470152" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/71.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/71.exercises/config.json" new file mode 100644 index 000000000..ebad74401 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/71.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-776b17acb3624028aa64d4ab4f22589f", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/71.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/71.exercises/solution.json" new file mode 100644 index 000000000..c0fff2917 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/71.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "40a27b38addc4fd49fc7e11b732d690b", + "keywords": "算法高阶,字符串匹配,算法问题选编,利用有限自动机进行字符串匹配", + "title": "查找书籍", + "desc": [ + { + "content": "\n给定n本书的名称和定价,本题要求编写程序,查找并输出其中定价最高和最低的书的名称和定价。\n输入格式:\n输入第一行给出正整数n(<10),随后给出n本书的信息。每本书在一行中给出书名,即长度不超过30的字符串,随后一行中给出正实数价格。题目保证没有同样价格的书。\n输出格式:\n在一行中按照“价格, 书名”的格式先后输出价格最高和最低的书。价格保留2位小数。\n输入样例:\n3\nProgramming in C\n21.5\nProgramming in VB\n18.5\nProgramming in Delphi\n25.0\n输出样例:\n25.00, Programming in Delphi\n18.50, Programming in VB", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include\nstruct book\n{\n\tfloat price;\n\tchar a[30];\n};\nint main()\n{\n\tint n;\n\tscanf(\"%d\",&n);\n\tchar a[30];\n\tint i,k,maxi=0,mini=0;\n\tbook b[10];\n\tfor(i=0;ib[maxi].price)\n\t\t{\n\t\t\tmaxi=i;\n\t\t}\n\t\tif(b[i].price计算1!-2!+3!-4!+5!-6!+7!-8!+9!-10!,并输出计算结果

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \"stdio.h\"\ndouble fun(int n)\n{\n\tdouble sum=1.0;\n\tint i;\n\tfor(i=1;i<=n;i++)\n\t\tsum*=i;\n\treturn sum;\n}\nint main()\n{\n\tint i,mark=1;\n\tdouble sum=0,item=0;\n\tfor(i=1;i<=10;i++)\n\t{\n\t\titem=mark*fun(i);\n\t\tsum+=item;\n\t\tmark=-mark;\n\t}\n\tprintf(\"1!-2!+3!-4!+5!-6!+7!-8!+9!-10!=%.0lf\\n\",sum);\n}", + "language": "cpp" + }, + "node_id": "dailycode-fc25afd2c08745858aec1f80a7c630d6", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600469867" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/73.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/73.exercises/config.json" new file mode 100644 index 000000000..2d3eff25e --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/73.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-c2ecfa9c0205486dbee24ece017d6df8", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/73.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/73.exercises/solution.json" new file mode 100644 index 000000000..dfd423239 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/73.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "e2f076d8948c4d889c4350d98a9aa7cd", + "keywords": "算法初阶,基础知识,算法基础,设计算法,分析分治算法", + "title": "对数组中所有的数据按照输入先后顺序进行显示输出", + "desc": [ + { + "content": "\n

定义整数数组x,用键盘向数组输入10个数,输入之后,对数组中所有的数据按照输入先后顺序进行显示输出,最后设计一种算法,对数组中的数据进行升序排序,并输出排序后的数

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nvoid Sortfun(double a[],int n)\n{\n\tint i,j;\n\tdouble tmp;\n\tfor (i=0;i a[j+1])\n\t\t\t{\n\t\t\t\ttmp = a[j];\n\t\t\t\ta[j] = a[j+1];\n\t\t\t\ta[j+1]= tmp;\n\t\t\t}\n\t\t}\n\t}\n}\nint main()\n{\n\tint i;\n\tdouble a[10];\n\tprintf(\"请输入10个数:\");\n\tfor(i =0;i<10;i++)\n\t\tscanf(\"%lf\",&a[i]);\n\tprintf(\"原顺序:\\n\");\n\tfor(i=0;i<10;i++)\n\t\tprintf(\"%g \",a[i]);\n\tprintf(\"\\n\");\n\tSortfun(a,10);\n\tprintf(\"排序后:\\n\");\n\tfor(i=0;i<10;i++)\n\t\tprintf(\"%g \",a[i]);\n\tprintf(\"\\n\");\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-c2ecfa9c0205486dbee24ece017d6df8", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470244" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/74.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/74.exercises/config.json" new file mode 100644 index 000000000..e614190d7 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/74.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-a3c6d1ba3eff44589c32c36ce4d9d666", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/74.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/74.exercises/solution.json" new file mode 100644 index 000000000..5501c6921 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/74.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "462fb7f7f607424488dab204267caa1d", + "keywords": "算法高阶,数论算法,算法问题选编,整数的因子分解", + "title": "1,3,3,5,5,5,7,7,7,7,9,9,9,9,9,.....", + "desc": [ + { + "content": "\n

简单数列5
\n 已知一数列:1,3,3,5,5,5,7,7,7,7,9,9,9,9,9,11,11,11,11,11,11,11.....请根据规律求出第n项的值。例如:n=4 项时,其值为5,n=11时,其值为9.\n输入格式 一个自然数n,(0<n<1000)
\n
\n输出格式 一个整数,即第n项的值。
\n样例输入:4
\n样例输出 :5

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nint main(){\n\tint a,b;\n\tcin>>a;\n\tint n=1,count=1,num=1;\n\tfor(int i=0;i n)\n\t\t{\n\t\t\tnum+=2;\n\t\t\tn++;\n\t\t\tcount=1;\n\t\t\ti--;\n\t\t}\n\t\telse\n\t\t{\n\t\tcout << num << \",\";\t\n\t\tcount++;\n\t\t}\n\t}\n\tcout << endl;\n\tcout << num;\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-a3c6d1ba3eff44589c32c36ce4d9d666", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470254" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/75.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/75.exercises/config.json" new file mode 100644 index 000000000..7bbb9fb2b --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/75.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-b0c64306cabb407cab1133d28d2fa2ec", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/75.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/75.exercises/solution.json" new file mode 100644 index 000000000..a8f9d4056 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/75.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "d8b00b5b1ce84bcc8d20180a7372a780", + "keywords": "算法初阶,最小值和最大值,排序和顺序统计量,中位数和顺序统计量", + "title": "找最大数和最小数", + "desc": [ + { + "content": "\n编写程序,设置正整数n的值,其中n取值为小于等于10的正整数,再继续输入n个整数数值,从n个整数中找出最大数和最小数,并将它们输出。\n输入格式:\nn的数值(取值为1-10整数)\nn个具体整数值\n输出格式:\n最大值\n最小值\n输入样例1:\n4 \n8 3 4 1 \n输出样例1:\n8\n1\n输入样例2:\n5\n-1 6 3 2 0\n输出样例2:\n6\n-1", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nint main()\n{\n\tint n;\n\tcin >> n;\n\tint ma, mi, a;\n\tcin >> a;\n\tmi = ma = a;\n\tfor (int i = 1; i < n; i++)\n\t{\n\t\tcin >> a;\n\t\tif (ma < a) ma = a;\n\t\tif (mi > a) mi = a;\n\t}\n\tcout << ma << endl << mi << endl;\n}", + "language": "cpp" + }, + "node_id": "dailycode-b0c64306cabb407cab1133d28d2fa2ec", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470161" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/76.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/76.exercises/config.json" new file mode 100644 index 000000000..7a50c17ce --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/76.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-6141961c2aea43338135ba51d2542d23", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/76.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/76.exercises/solution.json" new file mode 100644 index 000000000..d78feed5b --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/76.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "91f425ad15174f85978143e8db3ae5f6", + "keywords": "数学,三角形", + "title": "判断是否能组成三角形", + "desc": [ + { + "content": "\n

根据输入的三角形的三边判断是否能组成三角形,若可以则输出它的周长和三角的类型

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include\n#include\nint main(void)\n{\n\tint num1,num2,num3;\n\tprintf(\"请输入第一条边:\");\n\tscanf(\"%d\",&num1);\n\tprintf(\"请输入第二条边:\");\n\tscanf(\"%d\",&num2);\n\tprintf(\"请输入第三条边:\");\n\tscanf(\"%d\",&num3);\n\tif(num1+num2>num3&&num2+num3>num1&&num1+num3>num2)\n\t{\n\t\tif (num1*num1+num2*num2==num3*num3||num2*num2+num3*num3==num1*num1||num1*num1+num3*num3==num2*num2){\n\t\t\tprintf ( \"%d、%d和%d可以组成直角三角形。\\n \" ,num1,num2,num3);\n\t\t\tprintf (\"三角形周长:%d\\n\",num1+num2+num3);\n\t\t}\n\telse if (num1*num1+num2*num2设计一个“石头剪刀布”游戏程序。用户和程序分别扮演猜拳双方,用户选择

石头、剪刀和布中的一项,程序随机选择另一项,与用户选择作比较,在界面中

显示最终的胜负判定。

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \nint main()\n{\n\tint id;\n\tint a[3]={1,2,3};\n\tint au = 0;\n\twhile(1)\n\t{\n\t\tprintf(\"1.剪刀,2.石头,3.布,0.退出\\n\");\n\t\tscanf(\"%d\",&id);\n\t\tif(id == 0)\n\t\t\tbreak;\n\t\tau = a[rand()%3]; \n\t\tif (au == 1)\n\t\t{\n\t\t\tprintf(\"机器:剪刀\\t\");\n\t\t\tif(id == 1)\n\t\t\t\tprintf(\"玩家:剪刀\\t平局\\n\");\n\t\t\telse if(id == 2)\n\t\t\t\tprintf(\"玩家:石头\\t玩家赢\\n\");\n\t\t\telse\n\t\t\t\tprintf(\"玩家:布\\t机器赢\\n\");\n\t\t}\n\t\telse if(au == 2)\n\t\t{\n\t\t\tprintf(\"机器:石头\\t\");\n\t\t\tif(id == 1)\n\t\t\t\tprintf(\"玩家:剪刀\\t机器赢\\n\");\n\t\t\telse if(id == 2)\n\t\t\t\tprintf(\"玩家:石头\\t平局\\n\");\n\t\t\telse\n\t\t\t\tprintf(\"玩家:布\\t玩家赢\\n\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tprintf(\"机器:布\\t\");\n\t\t\tif(id == 1)\n\t\t\t\tprintf(\"玩家:剪刀\\t玩家赢\\n\");\n\t\t\telse if(id == 2)\n\t\t\t\tprintf(\"玩家:石头\\t机器赢\\n\");\n\t\t\telse\n\t\t\t\tprintf(\"玩家:布\\t平局\\n\");\n\t\t}\n\t}\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-f74d4a8827134b95be99a1cc4e069db0", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470247" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/78.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/78.exercises/config.json" new file mode 100644 index 000000000..bf2f684d6 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/78.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-077c4588ce144b738c311ecd56b6c249", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/78.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/78.exercises/solution.json" new file mode 100644 index 000000000..20955384a --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/78.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "8cd00cecce4e49c591d9a8b83a7eed59", + "keywords": "递归,链表", + "title": "合并两个有序链表", + "desc": [ + { + "content": "\n

将两个升序链表合并为一个新的 升序 链表并返回。新链表是通过拼接给定的两个链表的所有节点组成的。 

 

示例 1:

\"\"
输入:l1 = [1,2,4], l2 = [1,3,4]
输出:
[1,1,2,3,4,4]

示例 2:

输入:l1 = [], l2 = []
输出:
[]

示例 3:

输入:l1 = [], l2 = [0]
输出:
[0]

 

提示:

    \t
  • 两个链表的节点数目范围是 [0, 50]
  • \t
  • -100 <= Node.val <= 100
  • \t
  • l1l2 均按 非递减顺序 排列
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "struct ListNode\n{\n\tint val;\n\tListNode *next;\n\tListNode(int x) : val(x), next(NULL) {}\n};\nclass Solution\n{\npublic:\n\tListNode *mergeTwoLists(ListNode *l1, ListNode *l2)\n\t{\n\t\tListNode h(0, nullptr);\n\t\tListNode *p = &h;\n\t\twhile (l1 && l2)\n\t\t{\n\t\t\tListNode **t;\n\t\t\tif (l1->val < l2->val)\n\t\t\t\tt = &l1;\n\t\t\telse\n\t\t\t\tt = &l2;\n\t\t\tp->next = *t;\n\t\t\tp = *t;\n\t\t\t*t = (*t)->next;\n\t\t}\n\t\tif (l1)\n\t\t\tp->next = l1;\n\t\telse\n\t\t\tp->next = l2;\n\t\treturn h.next;\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-077c4588ce144b738c311ecd56b6c249", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600469819" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/79.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/79.exercises/config.json" new file mode 100644 index 000000000..e3ce5dcb8 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/79.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-1f7753ab85df4d1d9a4479becc5c6b4d", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/79.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/79.exercises/solution.json" new file mode 100644 index 000000000..12d300aab --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/79.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "a32346e4fd59416c86e6fa9fabaa217a", + "keywords": "字符串", + "title": "最后一个单词的长度", + "desc": [ + { + "content": "\n

给你一个字符串 s,由若干单词组成,单词之间用空格隔开。返回字符串中最后一个单词的长度。如果不存在最后一个单词,请返回 0 。

单词 是指仅由字母组成、不包含任何空格字符的最大子字符串。

 

示例 1:

输入:s = \"Hello World\"
输出:
5

示例 2:

输入:s = \" \"
输出:
0

 

提示:

    \t
  • 1 <= s.length <= 104
  • \t
  • s 仅有英文字母和空格 ' ' 组成
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \nint lengthOfLastWord(char *s)\n{\n\tint len = 0;\n\twhile (*s != '\\0')\n\t{\n\t\tif (s[-1] == ' ' && s[0] != ' ')\n\t\t{\n\t\t\tlen = 1;\n\t\t}\n\t\telse if (*s != ' ')\n\t\t{\n\t\t\tlen++;\n\t\t}\n\t\ts++;\n\t}\n\treturn len;\n}\nint main(int argc, char **argv)\n{\n\tif (argc != 2)\n\t{\n\t\tfprintf(stderr, \"Usage: ./test word\\n\");\n\t\texit(-1);\n\t}\n\tprintf(\"%d\\n\", lengthOfLastWord(argv[1]));\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-1f7753ab85df4d1d9a4479becc5c6b4d", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470793" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/8.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/8.exercises/config.json" new file mode 100644 index 000000000..671d1e389 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/8.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-9de7041eccbf40b2bfb816106179b47e", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/8.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/8.exercises/solution.json" new file mode 100644 index 000000000..3c99644c8 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/8.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "9dc91baa80a849b283cfd7d314ec0882", + "keywords": "算法高阶,数论算法,素数的测试,算法问题选编", + "title": "n个素数的求和问题。", + "desc": [ + { + "content": "\n

给定n(n≤100)个正整数,所有正整数均≤1000000;求其中所有素数的和。\n例如给定序列: 2 3 4 5 6,素数和为:10\n给定序列: 3 4 5 6 7, 素数和为:15\n给定序列: 12 19 23 35 68 71, 素数和为: 113\n输入格式:\n输入为两行。第一行是一个正整数n,表示有多少个数据。第二行是n个正整数组成的序列。\n输出格式:\n输出一个正整数,是上述序列中所有素数之和。

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nint isprime( int n);\nint main()\n{\n\tint i,n,m,s=0;\n\tscanf(\"%d\", &n);\n\tfor( i=0; i存在一个按升序排列的链表,给你这个链表的头节点 head ,请你删除所有重复的元素,使每个元素 只出现一次

返回同样按升序排列的结果链表。

 

示例 1:

\"\"
输入:head = [1,1,2]
输出:
[1,2]

示例 2:

\"\"
输入:head = [1,1,2,3,3]
输出:
[1,2,3]

 

提示:

    \t
  • 链表中节点数目在范围 [0, 300]
  • \t
  • -100 <= Node.val <= 100
  • \t
  • 题目数据保证链表已经按升序排列
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nstruct ListNode\n{\n\tint val;\n\tListNode *next;\n\tListNode() : val(0), next(nullptr) {}\n\tListNode(int x) : val(x), next(nullptr) {}\n\tListNode(int x, ListNode *next) : val(x), next(next) {}\n};\nclass Solution\n{\npublic:\n\tListNode *deleteDuplicates(ListNode *head)\n\t{\n\t\tif (head == nullptr)\n\t\t{\n\t\t\treturn nullptr;\n\t\t}\n\t\tListNode *prev = head;\n\t\tListNode *p = prev->next;\n\t\twhile (p != nullptr)\n\t\t{\n\t\t\tif (p->val != prev->val)\n\t\t\t{\n\t\t\t\tprev->next = p;\n\t\t\t\tprev = p;\n\t\t\t}\n\t\t\tp = p->next;\n\t\t}\n\t\tprev->next = p;\n\t\treturn head;\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-384fb1db2ac047899eea58d0ca0a468f", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470129" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/81.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/81.exercises/config.json" new file mode 100644 index 000000000..c12762ff4 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/81.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-efad5e20482b4988ba117fa63d173a43", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/81.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/81.exercises/solution.json" new file mode 100644 index 000000000..d1362337c --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/81.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "b7a9ed62953d44fca37177fd5327d548", + "keywords": "数学", + "title": "整数反转", + "desc": [ + { + "content": "\n

给你一个 32 位的有符号整数 x ,返回将 x 中的数字部分反转后的结果。

如果反转后整数超过 32 位的有符号整数的范围 [−231,  231 − 1] ,就返回 0。

假设环境不允许存储 64 位整数(有符号或无符号)。

 

示例 1:

输入:x = 123
输出:
321

示例 2:

输入:x = -123
输出:
-321

示例 3:

输入:x = 120
输出:
21

示例 4:

输入:x = 0
输出:
0

 

提示:

    \t
  • -231 <= x <= 231 - 1
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "int reverse(int x)\n{\n\tlong long int r = 0;\n\twhile (x)\n\t{\n\t\tr = r * 10 + (x % 10);\n\t\tx /= 10;\n\t}\n\tif (r > 2147483647)\n\t\treturn 0;\n\tif (r < -2147483648)\n\t\treturn 0;\n\treturn (int)r;\n}", + "language": "cpp" + }, + "node_id": "dailycode-efad5e20482b4988ba117fa63d173a43", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600469815" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/82.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/82.exercises/config.json" new file mode 100644 index 000000000..f2498fd05 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/82.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-23f90fd7082f4f6ab37a2f1df0d084d8", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/82.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/82.exercises/solution.json" new file mode 100644 index 000000000..321c3d971 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/82.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "3dab732122934bb1b85db4da70e5f921", + "keywords": "树,深度优先搜索,广度优先搜索,二叉树", + "title": "相同的树", + "desc": [ + { + "content": "\n

给你两棵二叉树的根节点 pq ,编写一个函数来检验这两棵树是否相同。

如果两个树在结构上相同,并且节点具有相同的值,则认为它们是相同的。

 

示例 1:

\"\"
输入:p = [1,2,3], q = [1,2,3]
输出:
true

示例 2:

\"\"
输入:p = [1,2], q = [1,null,2]
输出:
false

示例 3:

\"\"
输入:p = [1,2,1], q = [1,1,2]
输出:
false

 

提示:

    \t
  • 两棵树上的节点数目都在范围 [0, 100]
  • \t
  • -104 <= Node.val <= 104
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nstruct TreeNode\n{\n\tint val;\n\tTreeNode *left;\n\tTreeNode *right;\n\tTreeNode() : val(0), left(nullptr), right(nullptr) {}\n\tTreeNode(int x) : val(x), left(nullptr), right(nullptr) {}\n\tTreeNode(int x, TreeNode *left, TreeNode *right) : val(x), left(left), right(right) {}\n};\nclass Solution\n{\npublic:\n\tbool isSameTree(TreeNode *p, TreeNode *q)\n\t{\n\t\tif (p == nullptr && q == nullptr)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\tif (p == nullptr || q == nullptr)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tif (p->val != q->val)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\treturn isSameTree(p->left, q->left) && isSameTree(p->right, q->right);\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-23f90fd7082f4f6ab37a2f1df0d084d8", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600469927" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/83.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/83.exercises/config.json" new file mode 100644 index 000000000..5b78dffb3 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/83.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-cfd7bb9455e644749ffc5204d9012feb", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/83.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/83.exercises/solution.json" new file mode 100644 index 000000000..1245e7d6f --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/83.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "3b908215610d47689b9c2463e30ba9b6", + "keywords": "数组,哈希表", + "title": "两数之和", + "desc": [ + { + "content": "\n

给定一个整数数组 nums 和一个整数目标值 target,请你在该数组中找出 和为目标值 的那 两个 整数,并返回它们的数组下标。

你可以假设每种输入只会对应一个答案。但是,数组中同一个元素在答案里不能重复出现。

你可以按任意顺序返回答案。

 

示例 1:

输入:nums = [2,7,11,15], target = 9
输出:
[0,1]
解释:
因为 nums[0] + nums[1] == 9 ,返回 [0, 1] 。

示例 2:

输入:nums = [3,2,4], target = 6
输出:
[1,2]

示例 3:

输入:nums = [3,3], target = 6
输出:
[0,1]

 

提示:

    \t
  • 2 <= nums.length <= 103
  • \t
  • -109 <= nums[i] <= 109
  • \t
  • -109 <= target <= 109
  • \t
  • 只会存在一个有效答案
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nclass Solution\n{\npublic:\n\tvector twoSum(vector &nums, int target)\n\t{\n\t\tstd::unordered_map hset;\n\t\tvector r;\n\t\tfor (int i = 0; i < nums.size(); ++i)\n\t\t{\n\t\t\tint c = target - nums[i];\n\t\t\tauto iter = hset.find(c);\n\t\t\tif (iter != hset.end() && iter->second != i)\n\t\t\t{\n\t\t\t\tr.push_back(i);\n\t\t\t\tr.push_back(iter->second);\n\t\t\t\treturn r;\n\t\t\t}\n\t\t\thset.insert(std::make_pair(nums[i], i));\n\t\t}\n\t\treturn r;\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-cfd7bb9455e644749ffc5204d9012feb", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470217" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/84.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/84.exercises/config.json" new file mode 100644 index 000000000..2ab4ec2a3 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/84.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-93bea2166c9f4473bbebded26b678bb7", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/84.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/84.exercises/solution.json" new file mode 100644 index 000000000..d49965fad --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/84.exercises/solution.json" @@ -0,0 +1,116 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "92e577553712419db2d534bfbd18736a", + "keywords": "数组,双指针", + "title": "移除元素", + "desc": [ + { + "content": "\n
\n

给你一个数组 nums 和一个值 val,你需要 原地\n移除所有数值等于 val 的元素,并返回移除后数组的新长度。

", + "language": "markdown" + }, + { + "content": "\n

不要使用额外的数组空间,你必须仅使用 O(1) 额外空间并 原地 修改输入数组

", + "language": "markdown" + }, + { + "content": "\n

元素的顺序可以改变。你不需要考虑数组中超出新长度后面的元素。

", + "language": "markdown" + }, + { + "content": "\n

 

", + "language": "markdown" + }, + { + "content": "\n

说明:

", + "language": "markdown" + }, + { + "content": "\n

为什么返回数值是整数,但输出的答案是数组呢?

", + "language": "markdown" + }, + { + "content": "\n

请注意,输入数组是以「引用」方式传递的,这意味着在函数里修改输入数组对于调用者是可见的。

", + "language": "markdown" + }, + { + "content": "\n

你可以想象内部操作如下:

", + "language": "markdown" + }, + { + "content": "\n
// nums 是以“引用”方式传递的。也就是说,不对实参作任何拷贝\nint len = removeElement(nums, val);",
+      "language": "markdown"
+    },
+    {
+      "content": "\n// 在函数里修改输入数组对于调用者是可见的。\n// 根据你的函数返回的长度, 它会打印出数组中 该长度范围内 的所有元素。\nfor (int i = 0; i < len; i++) {\n    print(nums[i]);\n}\n
", + "language": "markdown" + }, + { + "content": "\n

 

", + "language": "markdown" + }, + { + "content": "\n

示例 1:

", + "language": "markdown" + }, + { + "content": "\n
输入:nums = [3,2,2,3], val = 3\n
输出:
2, nums = [2,2]\n
解释:
函数应该返回新的长度 2, 并且 nums 中的前两个元素均为 2。你不需要考虑数组中超出新长度后面的元素。例如,函数返回的新长度为 2 ,而 nums = [2,2,3,3] 或 nums = [2,2,0,0],也会被视作正确答案。\n
", + "language": "markdown" + }, + { + "content": "\n

示例 2:

", + "language": "markdown" + }, + { + "content": "\n
输入:nums = [0,1,2,2,3,0,4,2], val = 2\n
输出:
5, nums = [0,1,4,0,3]\n
解释:
函数应该返回新的长度 5, 并且 nums 中的前五个元素为 0, 1, 3, 0, 4。注意这五个元素可为任意顺序。你不需要考虑数组中超出新长度后面的元素。\n
", + "language": "markdown" + }, + { + "content": "\n

 

", + "language": "markdown" + }, + { + "content": "\n

提示:

", + "language": "markdown" + }, + { + "content": "\n
    \n
  • 0 <= nums.length <= 100
  • \n
  • 0 <= nums[i] <= 50
  • \n
  • 0 <= val <= 100
  • \n
\n
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nclass Solution\n{\npublic:\n\tint removeElement(vector &nums, int val)\n\t{\n\t\tint count = 0;\n\t\tfor (int i = 0; i < nums.size(); i++)\n\t\t{\n\t\t\tif (nums[i] != val)\n\t\t\t{\n\t\t\t\tnums[count++] = nums[i];\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-93bea2166c9f4473bbebded26b678bb7", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470219" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/85.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/85.exercises/config.json" new file mode 100644 index 000000000..c787806f6 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/85.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-248bac1e9f8049a797197ed6b8d08f56", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/85.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/85.exercises/solution.json" new file mode 100644 index 000000000..1c829c652 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/85.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "06b1f69f839848c8ba12203ff5b602cc", + "keywords": "位运算,数学,字符串,模拟", + "title": "二进制求和", + "desc": [ + { + "content": "\n

给你两个二进制字符串,返回它们的和(用二进制表示)。

输入为 非空 字符串且只包含数字 1 和 0

 

示例 1:

输入: a = "11", b = "1"
输出:
"100"

示例 2:

输入: a = "1010", b = "1011"
输出:
"10101"

 

提示:

    \t
  • 每个字符串仅由字符 '0''1' 组成。
  • \t
  • 1 <= a.length, b.length <= 10^4
  • \t
  • 字符串如果不是 "0" ,就都不含前导零。
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nclass Solution\n{\npublic:\n\tstring addBinary(string a, string b)\n\t{\n\t\tstring res;\n\t\tint carry = 0;\n\t\tint i = a.length() - 1;\n\t\tint j = b.length() - 1;\n\t\tfor (; i >= 0 && j >= 0; i--, j--)\n\t\t{\n\t\t\tif (a[i] == '1' && b[j] == '1')\n\t\t\t{\n\t\t\t\tif (carry > 0)\n\t\t\t\t{\n\t\t\t\t\tres.push_back('1');\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tres.push_back('0');\n\t\t\t\t}\n\t\t\t\tcarry = 1;\n\t\t\t}\n\t\t\telse if (a[i] == '0' && b[j] == '0')\n\t\t\t{\n\t\t\t\tif (carry > 0)\n\t\t\t\t{\n\t\t\t\t\tres.push_back('1');\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tres.push_back('0');\n\t\t\t\t}\n\t\t\t\tcarry = 0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (carry > 0)\n\t\t\t\t{\n\t\t\t\t\tres.push_back('0');\n\t\t\t\t\tcarry = 1;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tres.push_back('1');\n\t\t\t\t\tcarry = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\twhile (i >= 0)\n\t\t{\n\t\t\tif (a[i--] == '1')\n\t\t\t{\n\t\t\t\tif (carry > 0)\n\t\t\t\t{\n\t\t\t\t\tres.push_back('0');\n\t\t\t\t\tcarry = 1;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tres.push_back('1');\n\t\t\t\t\tcarry = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tres.push_back(carry + '0');\n\t\t\t\tcarry = 0;\n\t\t\t}\n\t\t}\n\t\twhile (j >= 0)\n\t\t{\n\t\t\tif (b[j--] == '1')\n\t\t\t{\n\t\t\t\tif (carry > 0)\n\t\t\t\t{\n\t\t\t\t\tres.push_back('0');\n\t\t\t\t\tcarry = 1;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tres.push_back('1');\n\t\t\t\t\tcarry = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tres.push_back(carry + '0');\n\t\t\t\tcarry = 0;\n\t\t\t}\n\t\t}\n\t\tif (carry > 0)\n\t\t{\n\t\t\tres.push_back('1');\n\t\t}\n\t\treverse(res.begin(), res.end());\n\t\treturn res;\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-248bac1e9f8049a797197ed6b8d08f56", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600471009" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/86.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/86.exercises/config.json" new file mode 100644 index 000000000..7bdc828c5 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/86.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-fc5373cfcfb541a1b12ec0dbe29f74cf", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/86.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/86.exercises/solution.json" new file mode 100644 index 000000000..a2677803d --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/86.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "2bb10d9cca474fc09519c3f275b27a15", + "keywords": "栈,树,深度优先搜索,二叉树", + "title": "二叉树的中序遍历", + "desc": [ + { + "content": "\n

给定一个二叉树的根节点 root ,返回它的 中序 遍历。

 

示例 1:

\"\"
输入:root = [1,null,2,3]
输出:
[1,3,2]

示例 2:

输入:root = []
输出:
[]

示例 3:

输入:root = [1]
输出:
[1]

示例 4:

\"\"
输入:root = [1,2]
输出:
[2,1]

示例 5:

\"\"
输入:root = [1,null,2]
输出:
[1,2]

 

提示:

    \t
  • 树中节点数目在范围 [0, 100]
  • \t
  • -100 <= Node.val <= 100

 

进阶: 递归算法很简单,你可以通过迭代算法完成吗?

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \nstruct TreeNode\n{\n\tint val;\n\tstruct TreeNode *left;\n\tstruct TreeNode *right;\n};\nstatic void traverse(struct TreeNode *node, int *result, int *count)\n{\n\tif (node == NULL)\n\t{\n\t\treturn;\n\t}\n\ttraverse(node->left, result, count);\n\tresult[*count] = node->val;\n\t(*count)++;\n\ttraverse(node->right, result, count);\n}\nstatic int *inorderTraversal(struct TreeNode *root, int *returnSize)\n{\n\tif (root == NULL)\n\t{\n\t\t*returnSize = 0;\n\t\treturn NULL;\n\t}\n\tint count = 0;\n\tint *result = malloc(5000 * sizeof(int));\n\ttraverse(root, result, &count);\n\t*returnSize = count;\n\treturn result;\n}\nint main()\n{\n\tint count = 0;\n\tinorderTraversal(NULL, &count);\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-fc5373cfcfb541a1b12ec0dbe29f74cf", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600471010" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/87.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/87.exercises/config.json" new file mode 100644 index 000000000..edeb8c2a4 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/87.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-9cb6069c227e49d59ff1dc8f968e7444", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/87.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/87.exercises/solution.json" new file mode 100644 index 000000000..c7861e2a7 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/87.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "e39ca369150f4f62949d81a9701a1399", + "keywords": "记忆化搜索,数学,动态规划", + "title": "爬楼梯", + "desc": [ + { + "content": "\n

假设你正在爬楼梯。需要 n 阶你才能到达楼顶。

每次你可以爬 1 或 2 个台阶。你有多少种不同的方法可以爬到楼顶呢?

注意:给定 n 是一个正整数。

示例 1:

输入: 2
输出:
2
解释:
有两种方法可以爬到楼顶。1. 1 阶 + 1 阶2. 2 阶

示例 2:

输入: 3
输出:
3
解释:
有三种方法可以爬到楼顶。1. 1 阶 + 1 阶 + 1 阶2. 1 阶 + 2 阶3. 2 阶 + 1 阶
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nclass Solution\n{\npublic:\n\tint climbStairs(int n)\n\t{\n\t\tint a = 1;\n\t\tint b = 2;\n\t\tint c = 0;\n\t\tfor (int i = 3; i <= n; i++)\n\t\t{\n\t\t\tc = a + b;\n\t\t\ta = b;\n\t\t\tb = c;\n\t\t}\n\t\treturn n == 1 ? a : (n == 2 ? b : c);\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-9cb6069c227e49d59ff1dc8f968e7444", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470125" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/88.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/88.exercises/config.json" new file mode 100644 index 000000000..6bfbd9df1 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/88.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-9e2570888c7f4ba7a4514a64f9d837b0", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/88.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/88.exercises/solution.json" new file mode 100644 index 000000000..9b62ba08c --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/88.exercises/solution.json" @@ -0,0 +1,124 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "7805dfcc4453460e80a12d82389332fa", + "keywords": "哈希表,数学,字符串", + "title": "罗马数字转整数", + "desc": [ + { + "content": "\n
\n

罗马数字包含以下七种字符: I, V, X, LCD 和 M。\n

", + "language": "markdown" + }, + { + "content": "\n
字符          数值\nI             1\nV             5\nX             10\nL             50\nC             100\nD             500\nM             1000
", + "language": "markdown" + }, + { + "content": "\n

例如, 罗马数字 2 写做 II ,即为两个并列的 1。12\n写做 XII ,即为 X + II 。 27\n写做  XXVII,\n即为 XX + V + II 。

", + "language": "markdown" + }, + { + "content": "\n

通常情况下,罗马数字中小的数字在大的数字的右边。但也存在特例,例如 4 不写做 IIII,而是 IV。数字 1 在数字 5 的左边,所表示的数等于大数 5\n减小数 1 得到的数值 4 。同样地,数字 9 表示为 IX。这个特殊的规则只适用于以下六种情况:

", + "language": "markdown" + }, + { + "content": "\n
    \n
  • I 可以放在 V (5) 和 X (10) 的左边,来表示 4 和 9。
  • \n
  • X 可以放在 L (50) 和 C (100) 的左边,来表示 40\n和 90。 
  • \n
  • C 可以放在 D (500) 和 M (1000) 的左边,来表示 400\n和 900。
  • \n
", + "language": "markdown" + }, + { + "content": "\n

给你一个整数,将其转为罗马数字。

", + "language": "markdown" + }, + { + "content": "\n

 

", + "language": "markdown" + }, + { + "content": "\n

示例 1:

", + "language": "markdown" + }, + { + "content": "\n
输入: num = 3\n
输出:
\"III\"
", + "language": "markdown" + }, + { + "content": "\n

示例 2:

", + "language": "markdown" + }, + { + "content": "\n
输入: num = 4\n
输出:
\"IV\"
", + "language": "markdown" + }, + { + "content": "\n

示例 3:

", + "language": "markdown" + }, + { + "content": "\n
输入: num = 9\n
输出:
\"IX\"
", + "language": "markdown" + }, + { + "content": "\n

示例 4:

", + "language": "markdown" + }, + { + "content": "\n
输入: num = 58\n
输出:
\"LVIII\"\n
解释:
L = 50, V = 5, III = 3.\n
", + "language": "markdown" + }, + { + "content": "\n

示例 5:

", + "language": "markdown" + }, + { + "content": "\n
输入: num = 1994\n
输出:
\"MCMXCIV\"\n
解释:
M = 1000, CM = 900, XC = 90, IV = 4.
", + "language": "markdown" + }, + { + "content": "\n

 

", + "language": "markdown" + }, + { + "content": "\n

提示:

", + "language": "markdown" + }, + { + "content": "\n
    \n
  • 1 <= num <= 3999
  • \n
\n
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "struct rmap\n{\n\tchar *r;\n\tint v;\n\tint l;\n} units[] = {\n\t{\"M\", 1000, 1},\n\t{\"CM\", 900, 2},\n\t{\"D\", 500, 1},\n\t{\"CD\", 400, 2},\n\t{\"C\", 100, 1},\n\t{\"XC\", 90, 2},\n\t{\"L\", 50, 1},\n\t{\"XL\", 40, 2},\n\t{\"X\", 10, 1},\n\t{\"IX\", 9, 2},\n\t{\"V\", 5, 1},\n\t{\"IV\", 4, 2},\n\t{\"I\", 1, 1}};\n#include \nint romanToInt(char *s)\n{\n\tint len = strlen(s);\n\tchar *end = s + len;\n\tint i = 0;\n\tint r = 0;\n\twhile (i < 13)\n\t{\n\t\tif (end - s >= units[i].l && memcmp(s, units[i].r, units[i].l) == 0)\n\t\t{\n\t\t\tr += units[i].v;\n\t\t\ts += units[i].l;\n\t\t}\n\t\telse\n\t\t\ti++;\n\t}\n\treturn r;\n}", + "language": "cpp" + }, + "node_id": "dailycode-9e2570888c7f4ba7a4514a64f9d837b0", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470218" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/89.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/89.exercises/config.json" new file mode 100644 index 000000000..8eaf42dad --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/89.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-f5e6dbdb903048868b02fc2916a4c8b3", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/89.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/89.exercises/solution.json" new file mode 100644 index 000000000..89a49254c --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/89.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "3e790bfc8db24efb9e633e09abfa98b4", + "keywords": "数组,数学", + "title": "加一", + "desc": [ + { + "content": "\n

给定一个由 整数 组成的 非空 数组所表示的非负整数,在该数的基础上加一。

最高位数字存放在数组的首位, 数组中每个元素只存储单个数字。

你可以假设除了整数 0 之外,这个整数不会以零开头。

 

示例 1:

输入:digits = [1,2,3]
输出:
[1,2,4]
解释:
输入数组表示数字 123。

示例 2:

输入:digits = [4,3,2,1]
输出:
[4,3,2,2]
解释:
输入数组表示数字 4321。

示例 3:

输入:digits = [0]
输出:
[1]

 

提示:

    \t
  • 1 <= digits.length <= 100
  • \t
  • 0 <= digits[i] <= 9
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nclass Solution\n{\npublic:\n\tvector plusOne(vector &digits)\n\t{\n\t\tint carry = 1;\n\t\tvector res;\n\t\tfor (int i = digits.size() - 1; i >= 0; i--)\n\t\t{\n\t\t\tint d = digits[i] + carry;\n\t\t\tres.push_back(d % 10);\n\t\t\tcarry = d / 10;\n\t\t}\n\t\tif (carry > 0)\n\t\t{\n\t\t\tres.push_back(carry);\n\t\t}\n\t\treverse(res.begin(), res.end());\n\t\treturn res;\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-f5e6dbdb903048868b02fc2916a4c8b3", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600469823" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/9.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/9.exercises/config.json" new file mode 100644 index 000000000..94dd0c85f --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/9.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-0646f44208424631aff031ba6ac25524", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/9.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/9.exercises/solution.json" new file mode 100644 index 000000000..2d765d08a --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/9.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "e4e50444317049bab4a6f63b3f631c59", + "keywords": "算法高阶,计算几何学,算法问题选编,寻找最近点对", + "title": "总分数最大", + "desc": [ + { + "content": "\n

每位同学都有自己的一个幸运数,乐乐所在班级共有n位同学,因此有编号为1至n的n块标牌,标牌的编号与自己的幸运数相乘,就是这位同学的分数。你的工作就是帮乐乐寻找一种方案,使得班级总分数最大。\n输入\n第一行只有一个整数n\n第二行共有n个不超过10000的正整数,中间有一个空格隔开。\n输出\n只有一行且只有一个整数,乐乐班级的总分数。

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include\nint main()\n{\n\tint a[10005];\n\tlong long t=0;\n\tint n,i,j,x;\n\tscanf(\"%d\",&n);\n\tfor(i=0;ia[j]){\n\t\t\t\tx=a[i];\n\t\t\t\ta[i]=a[j];\n\t\t\t\ta[j]=x;\n\t\t\t}\n\t\t}\n\t}\n\tfor(i=0;i\n

给你一个有序数组 nums ,请你\n原地 删除重复出现的元素,使每个元素 只出现一次 ,返回删除后数组的新长度。

", + "language": "markdown" + }, + { + "content": "\n

不要使用额外的数组空间,你必须在 原地\n修改输入数组 并在使用 O(1) 额外空间的条件下完成。

", + "language": "markdown" + }, + { + "content": "\n

 

", + "language": "markdown" + }, + { + "content": "\n

说明:

", + "language": "markdown" + }, + { + "content": "\n

为什么返回数值是整数,但输出的答案是数组呢?

", + "language": "markdown" + }, + { + "content": "\n

请注意,输入数组是以「引用」方式传递的,这意味着在函数里修改输入数组对于调用者是可见的。

", + "language": "markdown" + }, + { + "content": "\n

你可以想象内部操作如下:

", + "language": "markdown" + }, + { + "content": "\n
// nums 是以“引用”方式传递的。也就是说,不对实参做任何拷贝\nint len = removeDuplicates(nums);",
+      "language": "markdown"
+    },
+    {
+      "content": "\n// 在函数里修改输入数组对于调用者是可见的。\n// 根据你的函数返回的长度, 它会打印出数组中 该长度范围内 的所有元素。\nfor (int i = 0; i < len; i++) {\n    print(nums[i]);\n}\n
\n ", + "language": "markdown" + }, + { + "content": "\n

示例 1:

", + "language": "markdown" + }, + { + "content": "\n
输入:nums = [1,1,2]\n
输出:
2, nums = [1,2]\n
解释:
函数应该返回新的长度 2 ,并且原数组 nums 的前两个元素被修改为 1, 2 。不需要考虑数组中超出新长度后面的元素。\n
", + "language": "markdown" + }, + { + "content": "\n

示例 2:

", + "language": "markdown" + }, + { + "content": "\n
输入:nums = [0,0,1,1,1,2,2,3,3,4]\n
输出:
5, nums = [0,1,2,3,4]\n
解释:
函数应该返回新的长度 5 , 并且原数组 nums 的前五个元素被修改为 0, 1, 2, 3, 4 。不需要考虑数组中超出新长度后面的元素。\n
", + "language": "markdown" + }, + { + "content": "\n

 

", + "language": "markdown" + }, + { + "content": "\n

提示:

", + "language": "markdown" + }, + { + "content": "\n
    \n
  • 0 <= nums.length <= 3 * 104
  • \n
  • -104 <= nums[i] <= 104
  • \n
  • nums 已按升序排列
  • \n
", + "language": "markdown" + }, + { + "content": "\n

 

\n", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nclass Solution\n{\npublic:\n\tint removeDuplicates(vector &nums)\n\t{\n\t\tif (nums.size() == 0)\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t\tint count = 1;\n\t\tfor (int i = 1; i < nums.size(); i++)\n\t\t{\n\t\t\tif (nums[i - 1] != nums[i])\n\t\t\t{\n\t\t\t\tnums[count++] = nums[i];\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-0a98fea56e2241aebeede7b2f502bca7", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470118" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/91.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/91.exercises/config.json" new file mode 100644 index 000000000..89384feb5 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/91.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-a56baed6a62a46eebdc8c20b2ca8fa0f", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/91.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/91.exercises/solution.json" new file mode 100644 index 000000000..3771f40e1 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/91.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "5ac00270616644e09618039fd1ded545", + "keywords": "字符串", + "title": "最长公共前缀", + "desc": [ + { + "content": "\n

编写一个函数来查找字符串数组中的最长公共前缀。

如果不存在公共前缀,返回空字符串 \"\"

 

示例 1:

输入:strs = [\"flower\",\"flow\",\"flight\"]
输出:
\"fl\"

示例 2:

输入:strs = [\"dog\",\"racecar\",\"car\"]
输出:
\"\"
解释:
输入不存在公共前缀。

 

提示:

    \t
  • 0 <= strs.length <= 200
  • \t
  • 0 <= strs[i].length <= 200
  • \t
  • strs[i] 仅由小写英文字母组成
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "class Solution\n{\npublic:\n\tstring longestCommonPrefix(vector &strs)\n\t{\n\t\tstring lcp;\n\t\tif (strs.size() == 0)\n\t\t\treturn lcp;\n\t\tint min_len = INT_MAX;\n\t\tint min_idx = 0;\n\t\tfor (int i = 0; i < strs.size(); ++i)\n\t\t{\n\t\t\tauto &s = strs[i];\n\t\t\tif (s.size() < min_len)\n\t\t\t{\n\t\t\t\tmin_len = s.size();\n\t\t\t\tmin_idx = i;\n\t\t\t}\n\t\t}\n\t\tauto &smin = strs[min_idx];\n\t\tfor (int i = 0; i < min_len; ++i)\n\t\t{\n\t\t\tchar c = smin[i];\n\t\t\tint j;\n\t\t\tfor (j = 0; j < strs.size(); ++j)\n\t\t\t{\n\t\t\t\tauto &cs = strs[j];\n\t\t\t\tif (c != cs[i])\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (j == strs.size())\n\t\t\t\tlcp += c;\n\t\t\telse\n\t\t\t\tbreak;\n\t\t}\n\t\treturn lcp;\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-a56baed6a62a46eebdc8c20b2ca8fa0f", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600469918" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/92.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/92.exercises/config.json" new file mode 100644 index 000000000..d99db7b71 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/92.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-ec47904e86d843648adbe57362e3fb25", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/92.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/92.exercises/solution.json" new file mode 100644 index 000000000..0c49a20da --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/92.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "1227f881a77741199e38d9fa69318778", + "keywords": "数组,分治,动态规划", + "title": "最大子序和", + "desc": [ + { + "content": "\n

给定一个整数数组 nums ,找到一个具有最大和的连续子数组(子数组最少包含一个元素),返回其最大和。

 

示例 1:

输入:nums = [-2,1,-3,4,-1,2,1,-5,4]
输出:
6
解释:
连续子数组 [4,-1,2,1] 的和最大,为 6 。

示例 2:

输入:nums = [1]
输出:
1

示例 3:

输入:nums = [0]
输出:
0

示例 4:

输入:nums = [-1]
输出:
-1

示例 5:

输入:nums = [-100000]
输出:
-100000

 

提示:

    \t
  • 1 <= nums.length <= 3 * 104
  • \t
  • -105 <= nums[i] <= 105

 

进阶:如果你已经实现复杂度为 O(n) 的解法,尝试使用更为精妙的 分治法 求解。

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nclass Solution\n{\npublic:\n\tint maxSubArray(vector &nums)\n\t{\n\t\tint sum = 0, max_sum = INT_MIN;\n\t\tfor (int i = 0; i < nums.size(); i++)\n\t\t{\n\t\t\tif (sum < 0)\n\t\t\t{\n\t\t\t\tsum = nums[i];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tsum += nums[i];\n\t\t\t}\n\t\t\tmax_sum = max(sum, max_sum);\n\t\t}\n\t\treturn max_sum;\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-ec47904e86d843648adbe57362e3fb25", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600469821" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/93.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/93.exercises/config.json" new file mode 100644 index 000000000..49023d65f --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/93.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-14c9f2ce4a074e43958cde1273f03140", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/93.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/93.exercises/solution.json" new file mode 100644 index 000000000..314ec95e3 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/93.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "3b5534cc405947d595b17441f3433545", + "keywords": "数学,二分查找", + "title": "x 的平方根", + "desc": [ + { + "content": "\n

实现 int sqrt(int x) 函数。

\n

计算并返回 x 的平方根,其中 x 是非负整数。

\n

由于返回类型是整数,结果只保留整数的部分,小数部分将被舍去。

\n

示例 1:

\n
输入: 4
输出:
2
\n

示例 2:

\n
输入: 8
输出:
2
说明:
8 的平方根是 2.82842..., 由于返回类型是整数,小数部分将被舍去。
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nclass Solution\n{\npublic:\n\tint mySqrt(int x)\n\t{\n\t\tif (x == 0)\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t\tunsigned int lo = 1, hi = x;\n\t\tunsigned int mid = (lo + hi) / 2;\n\t\tfor (;;)\n\t\t{\n\t\t\tif (mid > x / mid)\n\t\t\t{\n\t\t\t\thi = mid;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (mid + 1 > x / (mid + 1))\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tlo = mid;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmid = (lo + hi) / 2;\n\t\t}\n\t\treturn mid;\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-14c9f2ce4a074e43958cde1273f03140", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470124" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/94.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/94.exercises/config.json" new file mode 100644 index 000000000..ed214aa8a --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/94.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-673456a32b054f3498baff05d33b8a23", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/94.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/94.exercises/solution.json" new file mode 100644 index 000000000..65a66137a --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/94.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "dc0bf68a76dc453a868c0a58681e3d5a", + "keywords": "数组,双指针,排序", + "title": "合并两个有序数组", + "desc": [ + { + "content": "\n

给你两个有序整数数组 nums1 nums2,请你将 nums2 合并到 nums1 使 nums1 成为一个有序数组。

初始化 nums1nums2 的元素数量分别为 mn 。你可以假设 nums1 的空间大小等于 m + n,这样它就有足够的空间保存来自 nums2 的元素。

 

示例 1:

输入:nums1 = [1,2,3,0,0,0], m = 3, nums2 = [2,5,6], n = 3
输出:
[1,2,2,3,5,6]

示例 2:

输入:nums1 = [1], m = 1, nums2 = [], n = 0
输出:
[1]

 

提示:

    \t
  • nums1.length == m + n
  • \t
  • nums2.length == n
  • \t
  • 0 <= m, n <= 200
  • \t
  • 1 <= m + n <= 200
  • \t
  • -109 <= nums1[i], nums2[i] <= 109
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nclass Solution\n{\npublic:\n\tvoid merge(vector &nums1, int m, vector &nums2, int n)\n\t{\n\t\tint i = m - 1;\n\t\tint j = n - 1;\n\t\tint k = nums1.size() - 1;\n\t\twhile (i >= 0 && j >= 0)\n\t\t{\n\t\t\tif (nums1[i] < nums2[j])\n\t\t\t{\n\t\t\t\tnums1[k--] = nums2[j--];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tnums1[k--] = nums1[i--];\n\t\t\t}\n\t\t}\n\t\twhile (j >= 0)\n\t\t{\n\t\t\tnums1[k--] = nums2[j--];\n\t\t}\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-673456a32b054f3498baff05d33b8a23", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470926" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/95.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/95.exercises/config.json" new file mode 100644 index 000000000..33fe621fd --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/95.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-c0d349cc79bc43b6b66a4e561c11adb4", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/95.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/95.exercises/solution.json" new file mode 100644 index 000000000..2e8911a76 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/95.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "2a48f3f173ad4d5eb687f2b17a53d8ac", + "keywords": "数组,二分查找", + "title": "搜索插入位置", + "desc": [ + { + "content": "\n

给定一个排序数组和一个目标值,在数组中找到目标值,并返回其索引。如果目标值不存在于数组中,返回它将会被按顺序插入的位置。

你可以假设数组中无重复元素。

示例 1:

输入: [1,3,5,6], 5
输出:
2

示例 2:

输入: [1,3,5,6], 2
输出:
1

示例 3:

输入: [1,3,5,6], 7
输出:
4

示例 4:

输入: [1,3,5,6], 0
输出:
0
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nclass Solution\n{\npublic:\n\tint searchInsert(vector &nums, int target)\n\t{\n\t\tint lo = -1;\n\t\tint hi = nums.size();\n\t\twhile (lo + 1 < hi)\n\t\t{\n\t\t\tint mid = lo + (hi - lo) / 2;\n\t\t\tif (target > nums[mid])\n\t\t\t{\n\t\t\t\tlo = mid;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\thi = mid;\n\t\t\t}\n\t\t}\n\t\treturn hi;\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-c0d349cc79bc43b6b66a4e561c11adb4", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470222" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/96.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/96.exercises/config.json" new file mode 100644 index 000000000..c987080c1 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/96.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-da77f23647504d0d8105ba49f9e7c3d9", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/96.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/96.exercises/solution.json" new file mode 100644 index 000000000..7cb250dd5 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/96.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "ed12c78eeaaa4be48f0df44b75ae9c2d", + "keywords": "数学", + "title": "回文数", + "desc": [ + { + "content": "\n

给你一个整数 x ,如果 x 是一个回文整数,返回 true ;否则,返回 false

回文数是指正序(从左向右)和倒序(从右向左)读都是一样的整数。例如,121 是回文,而 123 不是。

 

示例 1:

输入:x = 121
输出:
true

示例 2:

输入:x = -121
输出:
false
解释:
从左向右读, 为 -121 。 从右向左读, 为 121- 。因此它不是一个回文数。

示例 3:

输入:x = 10
输出:
false
解释:
从右向左读, 为 01 。因此它不是一个回文数。

示例 4:

输入:x = -101
输出:
false

 

提示:

    \t
  • -231 <= x <= 231 - 1

 

进阶:你能不将整数转为字符串来解决这个问题吗?

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "bool isPalindrome(int x)\n{\n\tif (x < 0)\n\t\treturn false;\n\tchar r[11];\n\tint n = snprintf(r, 11, \"%d\", x);\n\tint i;\n\tfor (i = 0; i < n / 2; i++)\n\t{\n\t\tif (r[i] != r[n - i - 1])\n\t\t\treturn false;\n\t}\n\treturn true;\n}", + "language": "cpp" + }, + "node_id": "dailycode-da77f23647504d0d8105ba49f9e7c3d9", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600471100" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/97.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/97.exercises/config.json" new file mode 100644 index 000000000..b76624086 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/97.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-5a79db90959f499e9cffd301f9cb1554", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/97.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/97.exercises/solution.json" new file mode 100644 index 000000000..04cc56e18 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/1.cpp/97.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "23e1a80294844a3b9c03b1e3f05fd40a", + "keywords": "栈,字符串", + "title": "有效的括号", + "desc": [ + { + "content": "\n

给定一个只包括 '('')''{''}''['']' 的字符串 s ,判断字符串是否有效。

有效字符串需满足:

    \t
  1. 左括号必须用相同类型的右括号闭合。
  2. \t
  3. 左括号必须以正确的顺序闭合。

 

示例 1:

输入:s = \"()\"
输出:
true

示例 2:

输入:s = \"()[]{}\"
输出:
true

示例 3:

输入:s = \"(]\"
输出:
false

示例 4:

输入:s = \"([)]\"
输出:
false

示例 5:

输入:s = \"{[]}\"
输出:
true

 

提示:

    \t
  • 1 <= s.length <= 104
  • \t
  • s 仅由括号 '()[]{}' 组成
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nchar ascii_tab[128];\nclass Solution\n{\npublic:\n\tbool isValid(string s)\n\t{\n\t\tif (s.size() == 0)\n\t\t\treturn true;\n\t\tstd::stack st;\n\t\tascii_tab['('] = 11;\n\t\tascii_tab['{'] = 12;\n\t\tascii_tab['['] = 13;\n\t\tascii_tab[')'] = 21;\n\t\tascii_tab['}'] = 22;\n\t\tascii_tab[']'] = 23;\n\t\tfor (auto c : s)\n\t\t{\n\t\t\tchar n = ascii_tab[c];\n\t\t\tif (n < 20)\n\t\t\t\tst.push(n);\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (st.empty())\n\t\t\t\t\treturn false;\n\t\t\t\tif (n != st.top() + 10)\n\t\t\t\t\treturn false;\n\t\t\t\tst.pop();\n\t\t\t}\n\t\t}\n\t\tif (st.empty())\n\t\t\treturn true;\n\t\treturn false;\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-5a79db90959f499e9cffd301f9cb1554", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470114" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/1.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/1.exercises/config.json" new file mode 100644 index 000000000..c34140840 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/1.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-6800f6713d5a4e85aa6db48e6c5a8d97", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/1.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/1.exercises/solution.json" new file mode 100644 index 000000000..caa506a78 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/1.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "db433b9b23c3428da71be4db3d42bd7a", + "keywords": "算法", + "title": "拆分数字", + "desc": [ + { + "content": "\n比如99 可以拆分为 9和9 9*9=81 81可以拆分为8和1 8*1=8 不能拆分了,得出结果为2\n65可以拆分为6和5,6*5=30 30可以拆分为3和0,3*0=0 不能拆分了,得出结果也为2\n实现这个功能 返回结果(结果为可拆分的次数)", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "public class HelloWorld {\n\tpublic static int splitmul(int n) {\n\t\tint r = 1;\n\t\twhile (n > 0) {\n\t\t\tr *= (n % 10);\n\t\t\tn /= 10;\n\t\t}\n\t\treturn r;\n\t}\n\tpublic static void main(String[] args) {\n\t\tint n = 99;\n\t\tint x = n;\n\t\tint t = 0;\n\t\twhile (x >= 10) {\n\t\t\tx = splitmul(n);\n\t\t\tSystem.out.println(x);\n\t\t\tn = x;\n\t\t\tt++;\n\t\t}\n\t\tSystem.out.println(t + \"次\");\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-6800f6713d5a4e85aa6db48e6c5a8d97", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600469974" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/10.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/10.exercises/config.json" new file mode 100644 index 000000000..5ace33d9f --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/10.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-b1d024a612ef4995986230770db68e62", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/10.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/10.exercises/solution.json" new file mode 100644 index 000000000..26f8daad1 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/10.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "517921eb39ac410daba02fb3929b3eda", + "keywords": "算法高阶,数论算法,素数的测试,算法问题选编", + "title": "打印1000以内的所有素数,并从键盘输入一个正整数,判断是否为素数。", + "desc": [ + { + "content": "\n

1、主类内至少两个方法,boolean prime(int p)方法和main()方法,prime方法判断参数p是否为素数。 \n2、1000以内的素数放入一个数组再打印。 \n3、单行风格,良好可读性,运行结果正确。

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "import java.util.*;\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tList numList = new ArrayList<>();\n\t\tfor(int i= 2;i<=1000;i++){\n\t\t\tfor(int j=2;j<=i;j++){\n\t\t\t\tif(i%j==0&&j!=i){\n\t\t\t\t\tbreak;\n\t\t\t\t}else if(j==i){\n\t\t\t\t\tnumList.add(i);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"1000以内的素数\");\n\t\tfor(Integer integer : numList){\n\t\t\tSystem.out.print(integer+\" \");\n\t\t}\n\t\tSystem.out.println();\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint i = scanner.nextInt();\n\t\tfunction function = new function();\n\t\tSystem.out.println(function.prime(i));\n\t}\n}\nclass function{\n\tpublic boolean prime(int p){\n\t\tfor(int i = 2;i<=(p/2);i++){\n\t\t\tif(p%i==0&&p!=i){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-b1d024a612ef4995986230770db68e62", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600469870" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/11.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/11.exercises/config.json" new file mode 100644 index 000000000..8ab9073f3 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/11.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-bfa08919a0914b6092a54578c976c2db", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/11.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/11.exercises/solution.json" new file mode 100644 index 000000000..ab4ed3676 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/11.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "4f48e2c5da0e4ac0ba8a9aa09f2bc7a8", + "keywords": "数学,阶乘,算法", + "title": "求公式的值", + "desc": [ + { + "content": "\n求 1-1/2!-1/3! -... -1/10! ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "public class TEST {\n\tpublic static double jiecheng(int n) {\n\t\tdouble s = 1;\n\t\tfor (int i = 1; i <= n; i++)\n\t\t\ts *= i;\n\t\treturn s;\n\t}\n\tpublic static double sum(int n) {\n\t\tdouble sum = 0.0;\n\t\tint s = 1;\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tsum += s / jiecheng(i);\n\t\t\ts = -s;\n\t\t}\n\t\treturn sum;\n\t}\n\tpublic static void main(String[] args) throws Exception {\n\t\tint n = 10;\n\t\tdouble ss = sum(n);\n\t\tSystem.out.println(ss);\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-bfa08919a0914b6092a54578c976c2db", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600470282" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/12.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/12.exercises/config.json" new file mode 100644 index 000000000..766f34e55 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/12.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-0eb0d6cdc41643e89bb5683c139216bb", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/12.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/12.exercises/solution.json" new file mode 100644 index 000000000..337322b31 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/12.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "0120fa66c9424a8fb367615492018524", + "keywords": "算法初阶,基础知识,算法基础,设计算法", + "title": "设计学生类Student和它的一个子类Undergraduate", + "desc": [ + { + "content": "\n

设计一个学生类Student和它的一个子类Undergraduate,要求如下:\n(1)Student类有name和age属性,一个包含两个人参数的构造器,用于给两属性赋值,一个show()方法打印Student的属性信息。\n(2)本科生类Undergraduate增加一个degree(学位)属性。有一个包含三参数的构造器,前两个参数用于给集成的属性赋值,第三个参数给degree专业见值,一个show()方法用于打印Undergraduate的属性信息。\n(3)在测试类中分别打印Undergraduate和Student对象,调用它们的show()\n

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "package T1;\npublic class Test {\n\tpublic static void main(String[] args) {\n\t\tStudent stu = new Student(\"student\", 100);\n\t\tstu.show();\n\t\tUndergraduate undergraduate = new Undergraduate(\"Undergraduate\", 20, \"本科\");\n\t\tundergraduate.show();\n\t}\n}\nclass Student {\n\tprivate String name;\n\tprivate int age;\n\tpublic Student() {\n\t\tsuper();\n\t}\n\tpublic Student(String name, int age) {\n\t\tthis.name = name;\n\t\tthis.age = age;\n\t}\n\tpublic String getName() {\n\t\treturn name;\n\t}\n\tpublic void setName(String name) {\n\t\tthis.name = name;\n\t}\n\tpublic double getAge() {\n\t\treturn age;\n\t}\n\tpublic void setAge(int age) {\n\t\tthis.age = age;\n\t}\n\tpublic void show() {\n\t\tSystem.out.println(\"名字:\" + this.name + \"\\t年龄:\" + this.age);\n\t}\n}\nclass Undergraduate extends Student {\n\tprivate String degree;\n\tpublic Undergraduate(String name, int age, String degree) {\n\t\tsuper(name, age);\n\t\tthis.degree = degree;\n\t}\n\tpublic void show() {\n\t\tSystem.out.println(\"名字:\" + super.getName() + \"\\t年龄:\" + super.getAge() + \"\\t学位:\" + this.degree);\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-0eb0d6cdc41643e89bb5683c139216bb", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470293" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/13.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/13.exercises/config.json" new file mode 100644 index 000000000..3ad0a2493 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/13.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-0cf6927a16a24e268a24657d6960a95a", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/13.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/13.exercises/solution.json" new file mode 100644 index 000000000..832243cdd --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/13.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "de83b7d7036b49fe9c0bc8128810f14e", + "keywords": "散列表,散列表,算法中阶,数据结构", + "title": "定义一个类Generator", + "desc": [ + { + "content": "\n

定义一个类 Generator(生成器类),它可以在每次调用其 next()方法时,产生由你 最喜欢的电影(如 Snow White 或 Star Wars)的字符构成的名字(作为 String 对象)。在字 符列表中的电影名用完之后,循环到这个字符列表的开始处。使用这个生成器来填充数组、 ArrayList、LinkedList、HashSet,然后打印每一个容器。

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "import java.util.*;\npublic class MovieGenerator {\n\tprivate String[] movies = new String[] { \"SS\", \"DD\", \"HH\", \"FF\", \"XX\", \"ZZ\" };\n\tprivate int i = 0;\n\tpublic String next() {\n\t\treturn movies[i++ % movies.length];\n\t}\n\tpublic String[] getMovies() {\n\t\treturn movies;\n\t}\n\tpublic Collection fill(Collection collection) {\n\t\tfor (int i = 0; i < 8; i++) {\n\t\t\tcollection.add(next());\n\t\t}\n\t\treturn collection;\n\t}\n\tpublic static void main(String[] args) {\n\t\tMovieGenerator generator = new MovieGenerator();\n\t\tSystem.out.println(Arrays.toString(generator.getMovies()));\n\t\tSystem.out.println(generator.fill(new ArrayList()));\n\t\tSystem.out.println(generator.fill(new LinkedList()));\n\t\tSystem.out.println(generator.fill(new HashSet()));\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-0cf6927a16a24e268a24657d6960a95a", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600469978" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/14.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/14.exercises/config.json" new file mode 100644 index 000000000..94152a1b6 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/14.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-f212de10cac247a4bab00cb73e61b645", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/14.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/14.exercises/solution.json" new file mode 100644 index 000000000..889766797 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/14.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "86be439d4197480e82a4fb53964fe650", + "keywords": "算法高阶,计算几何学,算法问题选编", + "title": "计算阶乘的和", + "desc": [ + { + "content": "\n编写程序计算1!+2!+3!+...+n!,并输出计算结果。(要求:n从键盘输入,0<=n<=50,如果输入的n值不在此范围,提示再次输入)", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "import java.util.*;\nimport java.lang.*;\nimport java.io.*;\nclass Ideone {\n\tpublic static double p(int x) {\n\t\tdouble r = 1.0;\n\t\tfor (int i = 2; i <= x; i++)\n\t\t\tr *= i;\n\t\treturn r;\n\t}\n\tpublic static void main(String[] args) throws java.lang.Exception {\n\t\tScanner s = new Scanner(System.in);\n\t\tint n = s.nextInt();\n\t\tif (n > 50 || n < 0) {\n\t\t\tSystem.out.println(\"不在范围!\");\n\t\t} else {\n\t\t\tdouble d = 0;\n\t\t\tfor (int i = 1; i <= n; i++)\n\t\t\t\td += p(i);\n\t\t\tSystem.out.println(\"结果=\" + d);\n\t\t}\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-f212de10cac247a4bab00cb73e61b645", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600469976" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/15.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/15.exercises/config.json" new file mode 100644 index 000000000..89d437ce8 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/15.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-4373e77e72654321846d4cb7d92b7935", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/15.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/15.exercises/solution.json" new file mode 100644 index 000000000..8df420fc8 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/15.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "f6d4bb136fef4aae992e14e46832cdcb", + "keywords": "计算机", + "title": "获取硬盘信息", + "desc": [ + { + "content": "\n获取硬盘的分区信息,以及每个分区的磁盘空间及剩余空间", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "import java.io.File;\nimport java.text.DecimalFormat;\npublic class Ypxx {\n\tpublic static void main(String[] args) {\n\t\tFile[] roots = File.listRoots();\n\t\tfor (File file : roots) {\n\t\t\tSystem.out.println(file.getPath() + \"信息如下:\");\n\t\t\tlong free = file.getFreeSpace();\n\t\t\tlong total = file.getTotalSpace();\n\t\t\tlong use = total - free;\n\t\t\tSystem.out.println(\"空闲未使用 = \" + change(free) + \"G\");\n\t\t\tSystem.out.println(\"已经使用 = \" + change(use) + \"G\");\n\t\t\tSystem.out.println(\"总容量 = \" + change(total) + \"G\");\n\t\t\tSystem.out.println(\"使用百分比 = \" + bfb(use, total));\n\t\t\tSystem.out.println();\n\t\t}\n\t}\n\tpublic static long change(long num) {\n\t\treturn num / 1024 / 1024 / 1024;\n\t}\n\tpublic static String bfb(Object num1, Object num2) {\n\t\tdouble val1 = Double.valueOf(num1.toString());\n\t\tdouble val2 = Double.valueOf(num2.toString());\n\t\tif (val2 == 0) {\n\t\t\treturn \"0.0%\";\n\t\t} else {\n\t\t\tDecimalFormat df = new DecimalFormat(\"#0.00\");\n\t\t\treturn df.format(val1 / val2 * 100) + \"%\";\n\t\t}\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-4373e77e72654321846d4cb7d92b7935", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470294" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/16.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/16.exercises/config.json" new file mode 100644 index 000000000..cc70415eb --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/16.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-91a33b05aa5342848cafc5816a49e0d4", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/16.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/16.exercises/solution.json" new file mode 100644 index 000000000..015f6cd88 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/16.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "f03f64b19771450cbd73e10f1d38a4b1", + "keywords": "图算法,算法高阶,最小生成树,最小生成树的形成", + "title": "用0到9生成十位数的所有排列组合", + "desc": [ + { + "content": "\n用 0到9 生成 十位数的所有排列组合,数字0不能在第一个,这个生成的十位数,不能有重复的数字。", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class java_234859 {\n public static void main(String[] args) {\n\t String str[] = { \"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\" };\n\t permutation(str, 0, str.length);\n }\n static void swap(String[] str, int start, int end) {\n\t String tmep = str[start];\n\t str[start] = str[end];\n\t str[end] = tmep;\n }\n static void permutation(String[] str, int start, int end) {\n\t if (start == end - 1) {\n\t\t for (int i = 0; i < end; i++) {\n\t\t\tSystem.out.print(str[i]);\n\t\t }\n\t\t System.out.println();\n\t } else {\n\t\t for (int i = start; i < end; i++) {\n\t\t\tif (i == 0 && str[0].equals(\"0\"))\n\t\t\t continue;\n\t\t\tswap(str, start, i);\n\t\t\tpermutation(str, start + 1, end);\n\t\t\tswap(str, start, i);\n\t\t }\n\t }\n }\n}", + "language": "java" + }, + "node_id": "dailycode-91a33b05aa5342848cafc5816a49e0d4", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600470287" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/17.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/17.exercises/config.json" new file mode 100644 index 000000000..c902eee2e --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/17.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-a9a7e4b9222e4162853a11cfdf80ee99", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/17.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/17.exercises/solution.json" new file mode 100644 index 000000000..940ceb626 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/17.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "9bae5eb668d742cc94366b2f419e55d1", + "keywords": "算法初阶,排序和顺序统计量,中位数和顺序统计量", + "title": "字符串统计", + "desc": [ + { + "content": "\n编写一个程序,对于输入的一段英语文本,可以统计:\n1、该文本中有多少英语单词;\n2、该文本中有多少不同的英语单词。\n如,输入 I am a good student. I am in Zhengzhou.\n则可以统计出有9个英语单词、7个不同的英语单词。", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "import java.util.HashMap;\nimport java.util.Map;\npublic class Tee {\n\tpublic static String formatInput(String input) {\n\t\tif (input == null) {\n\t\t\treturn null;\n\t\t}\n\t\treturn input.replaceAll(\"[.|;|\\\\?]\", \" \");\n\t}\n\tpublic static Map countWords(String input) {\n\t\tMap result = new HashMap();\n\t\tif (input == null || input.length() == 0) {\n\t\t\treturn result;\n\t\t}\n\t\tString[] split = input.split(\" \");\n\t\tif (split == null || split.length == 0) {\n\t\t\treturn result;\n\t\t}\n\t\tfor (String value : split) {\n\t\t\tif (result.containsKey(value)) {\n\t\t\t\tresult.put(value, result.get(value) + 1);\n\t\t\t} else {\n\t\t\t\tresult.put(value, 1);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\tpublic static void main(String[] args) {\n\t\tString value = \"I am a good student.I am in Zhengzhou.Ha?\";\n\t\tString format = formatInput(value);\n\t\tSystem.out.println(format);\n\t\tMap r = countWords(format);\n\t\tSystem.out.println(r.toString());\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-a9a7e4b9222e4162853a11cfdf80ee99", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600469878" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/18.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/18.exercises/config.json" new file mode 100644 index 000000000..45a688be9 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/18.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-60a6ce1c2d794a2bbe410465d3a02887", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/18.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/18.exercises/solution.json" new file mode 100644 index 000000000..17186e3fb --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/18.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "3576db7f962d40d09401af1997fa4566", + "keywords": "图算法,算法高阶,最小生成树,最小生成树的形成", + "title": "找质数", + "desc": [ + { + "content": "\n找出大于200的最小的质数", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "import java.util.*;\nimport java.lang.*;\nimport java.io.*;\nclass Ideone {\n\tpublic static void main(String[] args) throws java.lang.Exception {\n\t\tint n = 201;\n\t\twhile (true) {\n\t\t\tboolean b = true;\n\t\t\tfor (int i = 2; i < n / 2; i++) {\n\t\t\t\tif (n % i == 0)\n\t\t\t\t\tb = false;\n\t\t\t}\n\t\t\tif (b)\n\t\t\t\tbreak;\n\t\t\tn++;\n\t\t}\n\t\tSystem.out.println(n);\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-60a6ce1c2d794a2bbe410465d3a02887", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600469980" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/19.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/19.exercises/config.json" new file mode 100644 index 000000000..426cb5805 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/19.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-1cd0efc5eab8483ca912341f4320382f", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/19.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/19.exercises/solution.json" new file mode 100644 index 000000000..9fa3c9a5a --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/19.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "061d051da6994ef4aad7ea7053f48e4e", + "keywords": "算法高阶,数论算法,算法问题选编,整数的因子分解", + "title": "用数组写水仙花数", + "desc": [ + { + "content": "\n定义一个整型数组 a[7],在控制台输入任意的 7 个整数给数组赋值,输出数组中所 有的“水仙花数”。“水仙花数”是指一个三位数其各位数字的立方和等于该数本身。", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "import java.util.Scanner;\npublic class Test {\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint arr[] = new int[7];\n\t\tSystem.out.println(\"请输入7个三位数:\");\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tarr[i] = in.nextInt();\n\t\t}\n\t\tSystem.out.println(\"数组中的水花仙数为:\");\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tint x = arr[i] / 100;\n\t\t\tint y = arr[i] / 10 % 10;\n\t\t\tint z = arr[i] % 10;\n\t\t\tif (arr[i] == x * x * x + y * y * y + z * z * z)\n\t\t\t\tSystem.out.println(i);\n\t\t}\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-1cd0efc5eab8483ca912341f4320382f", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470189" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/2.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/2.exercises/config.json" new file mode 100644 index 000000000..c1c8797d7 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/2.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-a56e385c4b5c46aca7f4e809ca7d9c2f", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/2.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/2.exercises/solution.json" new file mode 100644 index 000000000..b56cd324d --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/2.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "f7328cb8610e442b869fd26020904955", + "keywords": "数学", + "title": "输出每天是应该学习还是休息还是锻炼", + "desc": [ + { + "content": "\n

30天中,从第一天开始五天学习,一天休息、一天锻炼,输出每天是应该学习还是休息还是锻炼

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "public class HelloWorld {\n\tpublic static void main(String []args) {\n\t\tint n1=0,n2=0,n3=0,i;\n\t\tfor(i=1;i<=30;i++){\n\t\t\tif(n1<5){\n\t\t\t\tSystem.out.println(\"学习\");\n\t\t\t\tn1++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.println(\"休息\");\n\t\t\t\tSystem.out.println(\"锻炼\");\n\t\t\t\tn1=0;\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-a56e385c4b5c46aca7f4e809ca7d9c2f", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600470187" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/20.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/20.exercises/config.json" new file mode 100644 index 000000000..5e5d01322 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/20.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-8c4886e800094c849c6eec647e0c04b7", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/20.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/20.exercises/solution.json" new file mode 100644 index 000000000..32ceca6d8 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/20.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "f5e2e3b7527d490a85584780762a813f", + "keywords": "桶排序,算法初阶,线性时间排序,排序和顺序统计量", + "title": "按以下要求实现程序功能", + "desc": [ + { + "content": "\n

从键盘输入5个整型值\n1)按从大到小顺序排序方法;\n2)计算这些数的平均值的方法;\n3)在主方法中调用这些方法,并输出相应的值。

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "import java.util.*;\nclass java_7445932 {\n\tpublic static void main(String[] args) {\n\t\tList list = new ArrayList<>();\n\t\tScanner scanner = new Scanner(System.in);\n\t\tfor (int a = 1; a < 6; a++) {\n\t\t\tSystem.out.print(\"请输入第 \" + a + \" 个值:\");\n\t\t\tlist.add(scanner.nextInt());\n\t\t}\n\t\tSystem.out.println(descending(list));\n\t\tSystem.out.println(getAvg(list));\n\t}\n\tpublic static List descending(List list) {\n\t\tlist.sort(Collections.reverseOrder());\n\t\treturn list;\n\t}\n\tpublic static Double getAvg(List list) {\n\t\treturn list.stream().mapToInt(Integer::new).average().getAsDouble();\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-8c4886e800094c849c6eec647e0c04b7", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600469877" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/21.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/21.exercises/config.json" new file mode 100644 index 000000000..d65c82278 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/21.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-9f809286599941568b67aa96b36c603d", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/21.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/21.exercises/solution.json" new file mode 100644 index 000000000..53550f0e0 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/21.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "c2629a9c980e4fd6a5da7c8179b0363f", + "keywords": "图算法,算法高阶,最小生成树,最小生成树的形成", + "title": "数组排序", + "desc": [ + { + "content": "\n

编写一个JavaApplication程序,将随机生成的无序数组使用冒泡排序,将这个混乱的数组变成一个从小到大排列的有序的数组并输出。

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class demo_sort {\n\tpublic static void main(String[] args) {\n\t\tint[] numbers = new int[] { 1, 5, 8, 2, 3, 9, 4 };\n\t\tfor (int i = 0; i < numbers.length - 1; i++) {\n\t\t\tfor (int j = 0; j < numbers.length - 1 - i; j++) {\n\t\t\t\tif (numbers[j] > numbers[j + 1]) {\n\t\t\t\t\tint temp = numbers[j];\n\t\t\t\t\tnumbers[j] = numbers[j + 1];\n\t\t\t\t\tnumbers[j + 1] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"从小到大排序后的结果是:\");\n\t\tfor (int i = 0; i < numbers.length; i++)\n\t\t\tSystem.out.print(numbers[i] + \" \");\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-9f809286599941568b67aa96b36c603d", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470289" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/22.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/22.exercises/config.json" new file mode 100644 index 000000000..49204c0f6 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/22.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-f0382b88c43f411fbf4bf8273bec3247", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/22.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/22.exercises/solution.json" new file mode 100644 index 000000000..74c957e51 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/22.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "d99b0c96e52342ec9c55e02652371148", + "keywords": "算法初阶,基础知识,随机算法,概率分析和随机算法", + "title": "用随机数相关知识解答随机分组问题", + "desc": [ + { + "content": "\n已知有16只男子足球队参加2008年奥运会。写一段程序将球队随机分成4组", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "import java.util.*;\nclass StringToDateDemo {\n\tpublic static void main(String args[]) {\n\t\tArrayList teams = new ArrayList() {\n\t\t\t{\n\t\t\t\tadd(\"a\");\n\t\t\t\tadd(\"b\");\n\t\t\t\tadd(\"c\");\n\t\t\t\tadd(\"d\");\n\t\t\t\tadd(\"e\");\n\t\t\t\tadd(\"f\");\n\t\t\t\tadd(\"g\");\n\t\t\t\tadd(\"h\");\n\t\t\t\tadd(\"i\");\n\t\t\t\tadd(\"j\");\n\t\t\t\tadd(\"k\");\n\t\t\t\tadd(\"l\");\n\t\t\t\tadd(\"m\");\n\t\t\t\tadd(\"n\");\n\t\t\t\tadd(\"o\");\n\t\t\t\tadd(\"p\");\n\t\t\t}\n\t\t};\n\t\tCollections.shuffle(teams);\n\t\tArrayList group1 = new ArrayList();\n\t\tArrayList group2 = new ArrayList();\n\t\tArrayList group3 = new ArrayList();\n\t\tArrayList group4 = new ArrayList();\n\t\tgroup1.addAll(teams.subList(0, teams.size() / 4 + teams.size() % 4));\n\t\tgroup2.addAll(teams.subList(teams.size() / 4 + teams.size() % 4, 2 * teams.size() / 4 + teams.size() % 4));\n\t\tgroup3.addAll(teams.subList(2*teams.size() / 4 + teams.size() % 4, 3 * teams.size() / 4 + teams.size() % 4));\n\t\tgroup4.addAll(teams.subList(3*teams.size() / 4 + teams.size() % 4, teams.size()));\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-f0382b88c43f411fbf4bf8273bec3247", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600469872" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/23.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/23.exercises/config.json" new file mode 100644 index 000000000..deb011f3e --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/23.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-996228f46e754a58b78d9567bb808499", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/23.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/23.exercises/solution.json" new file mode 100644 index 000000000..c49ae923f --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/23.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "1261b1dc25094bcbb3038acde60e41cb", + "keywords": "算法初阶,基础知识,随机算法,概率分析和随机算法", + "title": "数组元素统计", + "desc": [ + { + "content": "\n

定义一个长度为5的数组arr1,用于存放5个1~9的随机整数(范围包含1和9),再定义一个长度为2的数组arr2,统计arr1中的元素对2求余等于0的个数,保存到arr2[0], 统计arr1中的元素对3求余等于0的个数,保存到arr2[1],在控制台打印输出arr2的所有元素

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "package com.auskat.demo.cc;\nimport java.util.Random;\npublic class RandomTest {\n\tpublic static void main(String[] args) {\n\t\tint arr1[] = new int[5];\n\t\tfor (int i = 0; i < arr1.length; i++) {\n\t\t\tarr1[i] = new Random().nextInt(9) + 1;\n\t\t}\n\t\tint i2 = 0;\n\t\tint j3 = 0;\n\t\tfor (int i = 0; i < arr1.length; i++) {\n\t\t\tif (arr1[i] % 2 == 0) {\n\t\t\t\ti2++;\n\t\t\t}\n\t\t\tif (arr1[i] % 3 == 0) {\n\t\t\t\tj3++;\n\t\t\t}\n\t\t}\n\t\tint arr2[] = new int[2];\n\t\tarr2[0] = i2;\n\t\tarr2[1] = j3;\n\t\tfor (int i = 0; i < arr2.length; i++) {\n\t\t\tSystem.out.println(arr2[i]);\n\t\t}\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-996228f46e754a58b78d9567bb808499", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600469875" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/24.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/24.exercises/config.json" new file mode 100644 index 000000000..968242140 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/24.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-9c270d6326d3421c974562ddce0e3a56", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/24.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/24.exercises/solution.json" new file mode 100644 index 000000000..e4525cb7b --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/24.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "55656322f3944cb79f0d37a097b877bf", + "keywords": "算法初阶,最小值和最大值,排序和顺序统计量,中位数和顺序统计量", + "title": "求输入数字的平均值、最大值", + "desc": [ + { + "content": "\n

输入若干个数,设输入的第一个数n为后面要输入的数的个数,求平均值及最大值,并在屏幕输出来

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "import java.util.Scanner;\npublic class Test{\n\tpublic static void main(String[] args) {\n\t\tScanner in=new Scanner(System.in);\n\t\tSystem.out.println(\"输入n:\");\n\t\tint n=in.nextInt();\n\t\tint temp,max=0,sum=0;\n\t\tfor(int i=0;imax){\n\t\t\t\tmax=temp;\n\t\t\t}\n\t\t\tsum+=temp;\n\t\t}\n\t\tSystem.out.println(\"最大值为:\"+max+\",平均值为:\"+sum*1.0/n);\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-9c270d6326d3421c974562ddce0e3a56", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600469973" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/25.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/25.exercises/config.json" new file mode 100644 index 000000000..f50327f63 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/25.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-4756dcc742414555aafd768d88b1b5a0", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/25.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/25.exercises/solution.json" new file mode 100644 index 000000000..e8689e295 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/25.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "959f627ef9dc4756b005ec647428533d", + "keywords": "遍历", + "title": "对给定的两个日期之间的日期进行遍历", + "desc": [ + { + "content": "\n对给定的两个日期之间的日期进行遍历,比如startTime 是 2014-07-11;endTime 是 2014-08-11 如何把他们之间的日期获取并遍历出来。", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "import java.text.ParseException;\nimport java.text.SimpleDateFormat;\nimport java.util.ArrayList;\nimport java.util.Date;\nimport java.util.List;\npublic class SplitTime {\n\tprivate static List dateSplit(Date startDate, Date endDate) throws Exception {\n\t\tif (!startDate.before(endDate))\n\t\t\tthrow new Exception(\"开始时间应该在结束时间之后\");\n\t\tLong spi = endDate.getTime() - startDate.getTime();\n\t\tLong step = spi / (24 * 60 * 60 * 1000);\n\t\tList dateList = new ArrayList();\n\t\tdateList.add(endDate);\n\t\tfor (int i = 1; i <= step; i++) {\n\t\t\tdateList.add(new Date(dateList.get(i - 1).getTime() - (24 * 60 * 60 * 1000)));\n\t\t}\n\t\treturn dateList;\n\t}\n\tpublic static void main(String[] args) throws ParseException {\n\t\ttry {\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\t\tDate start = sdf.parse(\"2015-4-20\");\n\t\t\tDate end = sdf.parse(\"2015-5-2\");\n\t\t\tList lists = dateSplit(start, end);\n\t\t\tif (!lists.isEmpty()) {\n\t\t\t\tfor (Date date : lists) {\n\t\t\t\t\tSystem.out.println(sdf.format(date));\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t}\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-4756dcc742414555aafd768d88b1b5a0", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600470283" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/26.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/26.exercises/config.json" new file mode 100644 index 000000000..6545475df --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/26.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-d3e5bdffa99e4c26a254dac53bab6424", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/26.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/26.exercises/solution.json" new file mode 100644 index 000000000..8f7c189be --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/26.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "40c109e9bf714724a757a5a423c4c529", + "keywords": "算法高阶,计算几何学,算法问题选编,确定任意一对线段是否相交", + "title": "找出出现次数最多的字符并计算次数", + "desc": [ + { + "content": "\n给定一个字符串“today is a special day”,长度任意,要求找出其出现次数最多的字符及计算次数。", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "import java.util.HashMap;\nimport java.util.Map;\nclass java_256052 {\n public static void main(String[] args) {\n\t String string = \"Thinking in Java\";\n\t char[] ch = string.toCharArray();\n\t Map result = new HashMap();\n\t for (int i = 0; i < ch.length; i++) {\n\t\t if (result.containsKey(ch[i])) {\n\t\t\tint count = result.get(ch[i]) + 1;\n\t\t\tresult.put(ch[i], count);\n\t\t } else {\n\t\t\tresult.put(ch[i], 1);\n\t\t }\n\t }\n\t Character maxChar = null;\n\t Integer maxCount = 0;\n\t for (java.util.Map.Entry entry : result.entrySet()) {\n\t\t if (entry.getValue() > maxCount) {\n\t\t\tmaxChar = entry.getKey();\n\t\t\tmaxCount = entry.getValue();\n\t\t }\n\t }\n\t System.out.println(\"字符: \" + maxChar + \" 出现的字数最多,为 \" + maxCount + \" 次\");\n }\n}", + "language": "java" + }, + "node_id": "dailycode-d3e5bdffa99e4c26a254dac53bab6424", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600469881" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/27.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/27.exercises/config.json" new file mode 100644 index 000000000..0c7e77d6a --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/27.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-2bd314f30cd143a5acaf9847ce64e8d1", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/27.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/27.exercises/solution.json" new file mode 100644 index 000000000..89084805b --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/27.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "81a61e783574465a8a4caad87533ac75", + "keywords": "算法初阶,快速排序,快速排序分析,排序和顺序统计量", + "title": "字符串排序", + "desc": [ + { + "content": "\n用main方法排序(按首字母或按字符串长度)\n要求:\n①输出原数组和排序后的数组\n②若有“,”“.”不能进行排序,并将不符合排序要求的数组打印出来\n③不能用API,可用选择、冒泡、快速", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "import java.util.Scanner;\nclass Untitled {\n public static void main(String[] args) {\n\t int num;\n\t System.out.println(\"请输入数组元素长度:\");\n\t Scanner in = new Scanner(System.in);\n\t num = in.nextInt();\n\t System.out.println(\"请输入字符串:\");\n\t String str[] = new String[num];\n\t for (int count = 0; count < num; count++) {\n\t\t str[count] = in.next();\n\t }\n\t in.close();\n\t System.out.println(\"before sorting:\");\n\t int c = 0;\n\t for (int i = 0; i < num; i++) {\n\t\t if (str[i].contains(\",\") || str[i].contains(\".\"))\n\t\t\tc++;\n\t\t System.out.println(str[i]);\n\t }\n\t for (int i = 0; i < num - 1; i++) {\n\t\t int min = i;\n\t\t for (int j = i + 1; j < num; j++) {\n\t\t\tif (str[min].contains(\",\") || str[min].contains(\".\"))\n\t\t\t min = j;\n\t\t\telse if (str[j].compareTo(str[min]) < 0 && !str[j].contains(\",\") && !str[j].contains(\".\"))\n\t\t\t min = j;\n\t\t }\n\t\t if (min != i) {\n\t\t\tString t = str[i];\n\t\t\tstr[i] = str[min];\n\t\t\tstr[min] = t;\n\t\t }\n\t }\n\t System.out.println(\"after sorting:\");\n\t for (int i = 0; i < num - c; i++)\n\t\t System.out.println(str[i]);\n\t System.out.println(\"invalid items:\");\n\t for (int i = num - c; i < num; i++)\n\t\t System.out.println(str[i]);\n }\n}", + "language": "java" + }, + "node_id": "dailycode-2bd314f30cd143a5acaf9847ce64e8d1", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470190" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/28.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/28.exercises/config.json" new file mode 100644 index 000000000..d3a1791ca --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/28.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-199440179d394fafb06dc367103b6359", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/28.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/28.exercises/solution.json" new file mode 100644 index 000000000..5b61ce7f1 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/28.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "76497293532545198c02900e03da83b8", + "keywords": "算法", + "title": "买蛋", + "desc": [ + { + "content": "\n100元怎么买100个蛋,鸡蛋1毛一个,鸭蛋3元一个,鹅蛋6元一个", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "public class Egg {\n\tpublic static void main(String[] args) {\n\t\tint chicken = 0, duck = 0, goose = 0;\n\t\tfor (int i = 0; i < 100; i++) {\n\t\t\tchicken = i;\n\t\t\tfor (int j = 0; j < 100; j++) {\n\t\t\t\tduck = j;\n\t\t\t\tgoose = 100 - duck - chicken;\n\t\t\t\tif (chicken + duck * 30 + goose * 60 == 1000 && chicken > 0 && duck > 0 && goose > 0) {\n\t\t\t\t\tSystem.out.println(\"鸡:\" + chicken + \" 鸭:\" + duck + \" 鹅:\" + goose);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-199440179d394fafb06dc367103b6359", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600469876" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/29.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/29.exercises/config.json" new file mode 100644 index 000000000..9c21d6d74 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/29.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-e7a3cf5d0ffe48a6ae751e69c884fe5f", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/29.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/29.exercises/solution.json" new file mode 100644 index 000000000..b07323ec2 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/29.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "92219efb4fef47779e50e27675c3fc08", + "keywords": "递归,链表", + "title": "合并两个有序链表", + "desc": [ + { + "content": "\n

将两个升序链表合并为一个新的 升序 链表并返回。新链表是通过拼接给定的两个链表的所有节点组成的。 

 

示例 1:

\"\"
输入:l1 = [1,2,4], l2 = [1,3,4]
输出:
[1,1,2,3,4,4]

示例 2:

输入:l1 = [], l2 = []
输出:
[]

示例 3:

输入:l1 = [], l2 = [0]
输出:
[0]

 

提示:

    \t
  • 两个链表的节点数目范围是 [0, 50]
  • \t
  • -100 <= Node.val <= 100
  • \t
  • l1l2 均按 非递减顺序 排列
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "public class ListNode {\n\tint val;\n\tListNode next;\n\tListNode() {\n\t}\n\tListNode(int val) {\n\t\tthis.val = val;\n\t}\n\tListNode(int val, ListNode next) {\n\t\tthis.val = val;\n\t\tthis.next = next;\n\t}\n}\nclass Solution {\n\tpublic ListNode mergeTwoLists(ListNode l1, ListNode l2) {\n\t\tListNode h = new ListNode(0, null);\n\t\tListNode p = h;\n\t\twhile (l1 != null && l2 != null) {\n\t\t\tif (l1.val < l2.val) {\n\t\t\t\tp.next = l1;\n\t\t\t\tp = l1;\n\t\t\t\tl1 = l1.next;\n\t\t\t} else {\n\t\t\t\tp.next = l2;\n\t\t\t\tp = l2;\n\t\t\t\tl2 = l2.next;\n\t\t\t}\n\t\t}\n\t\tif (l1 != null) {\n\t\t\tp.next = l1;\n\t\t} else {\n\t\t\tp.next = l2;\n\t\t}\n\t\treturn h.next;\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-e7a3cf5d0ffe48a6ae751e69c884fe5f", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600469819" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/3.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/3.exercises/config.json" new file mode 100644 index 000000000..ea646fb16 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/3.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-3d37655535b94c67973752f1082916b1", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/3.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/3.exercises/solution.json" new file mode 100644 index 000000000..d107745e4 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/3.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "4d7e67df30b441d4ab27995957d4ce62", + "keywords": "算法初阶,基础知识,随机算法,概率分析和随机算法", + "title": "随机抽样", + "desc": [ + { + "content": "\n从数组a[]={1,2,3,4,5,6,7,8,9,10}中随机抽取5个数且不重复", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "import java.util.HashSet;\nimport java.util.Random;\nimport java.util.Set;\nclass java_803899 {\n\tpublic static void main(String[] args) {\n\t\tint a[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };\n\t\tRandom r = new Random();\n\t\tint count = 10;\n\t\twhile (count-- > 0) {\n\t\t\tSet result = new HashSet(5);\n\t\t\twhile (result.size() < 5) {\n\t\t\t\tint index = r.nextInt(10) % 10;\n\t\t\t\tint currentData = a[index];\n\t\t\t\tif (result.contains(currentData)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tSystem.out.print(\"随机加入:\" + currentData);\n\t\t\t\tresult.add(currentData);\n\t\t\t}\n\t\t\tSystem.out.println(\"第\" + count + \"次,last随机数:\" + result);\n\t\t}\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-3d37655535b94c67973752f1082916b1", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600470284" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/30.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/30.exercises/config.json" new file mode 100644 index 000000000..d3cc603c9 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/30.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-d733ec126a274808bc4085078f5f93df", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/30.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/30.exercises/solution.json" new file mode 100644 index 000000000..775b5ea19 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/30.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "33a2e1cc570f49b5a2eb1507fd06ff93", + "keywords": "字符串", + "title": "最后一个单词的长度", + "desc": [ + { + "content": "\n

给你一个字符串 s,由若干单词组成,单词之间用空格隔开。返回字符串中最后一个单词的长度。如果不存在最后一个单词,请返回 0 。

单词 是指仅由字母组成、不包含任何空格字符的最大子字符串。

 

示例 1:

输入:s = \"Hello World\"
输出:
5

示例 2:

输入:s = \" \"
输出:
0

 

提示:

    \t
  • 1 <= s.length <= 104
  • \t
  • s 仅有英文字母和空格 ' ' 组成
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic int lengthOfLastWord(String s) {\n\t\tint count = 0;\n\t\tfor (int i = s.length() - 1; i >= 0; i--) {\n\t\t\tif (s.charAt(i) != ' ') {\n\t\t\t\tcount++;\n\t\t\t} else if (count > 0) {\n\t\t\t\treturn count;\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-d733ec126a274808bc4085078f5f93df", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600470793" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/31.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/31.exercises/config.json" new file mode 100644 index 000000000..238a5c608 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/31.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-2adfe208aeec4d2fa3eb42cb8361e417", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/31.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/31.exercises/solution.json" new file mode 100644 index 000000000..b766df4ca --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/31.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "417f0b913c0a43d6aed69cf4e2b2411c", + "keywords": "链表", + "title": "删除排序链表中的重复元素", + "desc": [ + { + "content": "\n

存在一个按升序排列的链表,给你这个链表的头节点 head ,请你删除所有重复的元素,使每个元素 只出现一次

返回同样按升序排列的结果链表。

 

示例 1:

\"\"
输入:head = [1,1,2]
输出:
[1,2]

示例 2:

\"\"
输入:head = [1,1,2,3,3]
输出:
[1,2,3]

 

提示:

    \t
  • 链表中节点数目在范围 [0, 300]
  • \t
  • -100 <= Node.val <= 100
  • \t
  • 题目数据保证链表已经按升序排列
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "public class ListNode {\n\tint val;\n\tListNode next;\n\tListNode(int x) {\n\t\tval = x;\n\t}\n}\nclass Solution {\n\tpublic ListNode deleteDuplicates(ListNode head) {\n\t\tif (head == null || head.next == null) {\n\t\t\treturn head;\n\t\t}\n\t\thead.next = deleteDuplicates(head.next);\n\t\tif (head.val == head.next.val)\n\t\t\thead = head.next;\n\t\treturn head;\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-2adfe208aeec4d2fa3eb42cb8361e417", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600470129" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/32.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/32.exercises/config.json" new file mode 100644 index 000000000..483faf176 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/32.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-1aec7acacc4e431e9761929aa7a04af3", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/32.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/32.exercises/solution.json" new file mode 100644 index 000000000..37d666d0b --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/32.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "ba22712f140940d78024eba6e982edc9", + "keywords": "数学", + "title": "整数反转", + "desc": [ + { + "content": "\n

给你一个 32 位的有符号整数 x ,返回将 x 中的数字部分反转后的结果。

如果反转后整数超过 32 位的有符号整数的范围 [−231,  231 − 1] ,就返回 0。

假设环境不允许存储 64 位整数(有符号或无符号)。

 

示例 1:

输入:x = 123
输出:
321

示例 2:

输入:x = -123
输出:
-321

示例 3:

输入:x = 120
输出:
21

示例 4:

输入:x = 0
输出:
0

 

提示:

    \t
  • -231 <= x <= 231 - 1
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic int reverse(int x) {\n\t\tlong xx = x;\n\t\tlong r;\n\t\tlong y = 0;\n\t\tboolean sign = xx < 0;\n\t\twhile (xx != 0) {\n\t\t\tr = xx % 10;\n\t\t\ty = y * 10 + r;\n\t\t\tif (sign) {\n\t\t\t\txx = (long) Math.ceil(xx / 10);\n\t\t\t} else {\n\t\t\t\txx = (long) Math.floor(xx / 10);\n\t\t\t}\n\t\t}\n\t\treturn y > Integer.MAX_VALUE || y < Integer.MIN_VALUE ? 0 : (int) y;\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-1aec7acacc4e431e9761929aa7a04af3", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600469815" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/33.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/33.exercises/config.json" new file mode 100644 index 000000000..b61f97251 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/33.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-5fc81f3203724e6bbc28969923a64495", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/33.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/33.exercises/solution.json" new file mode 100644 index 000000000..98432c2c3 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/33.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "3e1078cb13894e2f8d6ea870bd43f907", + "keywords": "树,深度优先搜索,广度优先搜索,二叉树", + "title": "相同的树", + "desc": [ + { + "content": "\n

给你两棵二叉树的根节点 pq ,编写一个函数来检验这两棵树是否相同。

如果两个树在结构上相同,并且节点具有相同的值,则认为它们是相同的。

 

示例 1:

\"\"
输入:p = [1,2,3], q = [1,2,3]
输出:
true

示例 2:

\"\"
输入:p = [1,2], q = [1,null,2]
输出:
false

示例 3:

\"\"
输入:p = [1,2,1], q = [1,1,2]
输出:
false

 

提示:

    \t
  • 两棵树上的节点数目都在范围 [0, 100]
  • \t
  • -104 <= Node.val <= 104
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "public class TreeNode {\n\tint val;\n\tTreeNode left;\n\tTreeNode right;\n\n\tTreeNode() {\n\t}\n\n\tTreeNode(int val) {\n\t\tthis.val = val;\n\t}\n\n\tTreeNode(int val, TreeNode left, TreeNode right) {\n\t\tthis.val = val;\n\t\tthis.left = left;\n\t\tthis.right = right;\n\t}\n}\n\nclass Solution {\n\tpublic boolean isSameTree(TreeNode p, TreeNode q) {\n\t\tif (p == null && q == null) {\n\t\t\treturn true;\n\t\t}\n\t\tif (p != null && q != null && p.val == q.val) {\n\t\t\treturn isSameTree(p.left, q.left) && isSameTree(p.right, q.right);\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-5fc81f3203724e6bbc28969923a64495", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600469927" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/34.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/34.exercises/config.json" new file mode 100644 index 000000000..c59eb6c47 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/34.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-b99fbefc0fd34ea9b5a17db12f45f1c5", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/34.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/34.exercises/solution.json" new file mode 100644 index 000000000..801d9a37b --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/34.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "82aaf8b8a58b48538f12023fb9c12101", + "keywords": "数组,哈希表", + "title": "两数之和", + "desc": [ + { + "content": "\n

给定一个整数数组 nums 和一个整数目标值 target,请你在该数组中找出 和为目标值 的那 两个 整数,并返回它们的数组下标。

你可以假设每种输入只会对应一个答案。但是,数组中同一个元素在答案里不能重复出现。

你可以按任意顺序返回答案。

 

示例 1:

输入:nums = [2,7,11,15], target = 9
输出:
[0,1]
解释:
因为 nums[0] + nums[1] == 9 ,返回 [0, 1] 。

示例 2:

输入:nums = [3,2,4], target = 6
输出:
[1,2]

示例 3:

输入:nums = [3,3], target = 6
输出:
[0,1]

 

提示:

    \t
  • 2 <= nums.length <= 103
  • \t
  • -109 <= nums[i] <= 109
  • \t
  • -109 <= target <= 109
  • \t
  • 只会存在一个有效答案
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic int[] twoSum(int[] nums, int target) {\n\t\tMap cache = new HashMap<>();\n\t\tfor (int i = 0; i < nums.length; i++) {\n\t\t\tint distance = target - nums[i];\n\t\t\tif (cache.containsKey(distance)) {\n\t\t\t\treturn new int[] { cache.get(distance), i };\n\t\t\t} else {\n\t\t\t\tcache.put(nums[i], i);\n\t\t\t}\n\t\t}\n\t\treturn new int[] {};\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-b99fbefc0fd34ea9b5a17db12f45f1c5", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470217" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/35.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/35.exercises/config.json" new file mode 100644 index 000000000..1c8c9bd92 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/35.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-31d9a5c7f596454a800d98f4ffec6e67", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/35.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/35.exercises/solution.json" new file mode 100644 index 000000000..fd5a640a1 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/35.exercises/solution.json" @@ -0,0 +1,116 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "36890a914732484c9078d992ee2e732a", + "keywords": "数组,双指针", + "title": "移除元素", + "desc": [ + { + "content": "\n
\n

给你一个数组 nums 和一个值 val,你需要 原地\n移除所有数值等于 val 的元素,并返回移除后数组的新长度。

", + "language": "markdown" + }, + { + "content": "\n

不要使用额外的数组空间,你必须仅使用 O(1) 额外空间并 原地 修改输入数组

", + "language": "markdown" + }, + { + "content": "\n

元素的顺序可以改变。你不需要考虑数组中超出新长度后面的元素。

", + "language": "markdown" + }, + { + "content": "\n

 

", + "language": "markdown" + }, + { + "content": "\n

说明:

", + "language": "markdown" + }, + { + "content": "\n

为什么返回数值是整数,但输出的答案是数组呢?

", + "language": "markdown" + }, + { + "content": "\n

请注意,输入数组是以「引用」方式传递的,这意味着在函数里修改输入数组对于调用者是可见的。

", + "language": "markdown" + }, + { + "content": "\n

你可以想象内部操作如下:

", + "language": "markdown" + }, + { + "content": "\n
// nums 是以“引用”方式传递的。也就是说,不对实参作任何拷贝\nint len = removeElement(nums, val);",
+      "language": "markdown"
+    },
+    {
+      "content": "\n// 在函数里修改输入数组对于调用者是可见的。\n// 根据你的函数返回的长度, 它会打印出数组中 该长度范围内 的所有元素。\nfor (int i = 0; i < len; i++) {\n    print(nums[i]);\n}\n
", + "language": "markdown" + }, + { + "content": "\n

 

", + "language": "markdown" + }, + { + "content": "\n

示例 1:

", + "language": "markdown" + }, + { + "content": "\n
输入:nums = [3,2,2,3], val = 3\n
输出:
2, nums = [2,2]\n
解释:
函数应该返回新的长度 2, 并且 nums 中的前两个元素均为 2。你不需要考虑数组中超出新长度后面的元素。例如,函数返回的新长度为 2 ,而 nums = [2,2,3,3] 或 nums = [2,2,0,0],也会被视作正确答案。\n
", + "language": "markdown" + }, + { + "content": "\n

示例 2:

", + "language": "markdown" + }, + { + "content": "\n
输入:nums = [0,1,2,2,3,0,4,2], val = 2\n
输出:
5, nums = [0,1,4,0,3]\n
解释:
函数应该返回新的长度 5, 并且 nums 中的前五个元素为 0, 1, 3, 0, 4。注意这五个元素可为任意顺序。你不需要考虑数组中超出新长度后面的元素。\n
", + "language": "markdown" + }, + { + "content": "\n

 

", + "language": "markdown" + }, + { + "content": "\n

提示:

", + "language": "markdown" + }, + { + "content": "\n
    \n
  • 0 <= nums.length <= 100
  • \n
  • 0 <= nums[i] <= 50
  • \n
  • 0 <= val <= 100
  • \n
\n
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic int removeElement(int[] nums, int val) {\n\n\t\tint len = nums.length;\n\t\tfor (int i = 0; i < len;) {\n\t\t\tif (nums[i] == val) {\n\t\t\t\tnums[i] = nums[len - 1];\n\t\t\t\tlen--;\n\t\t\t} else {\n\t\t\t\ti++;\n\t\t\t}\n\n\t\t}\n\t\treturn len;\n\t}\n}\n", + "language": "java" + }, + "node_id": "dailycode-31d9a5c7f596454a800d98f4ffec6e67", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470219" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/36.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/36.exercises/config.json" new file mode 100644 index 000000000..d942ba860 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/36.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-8fcebe8098d040f7a3dbbb9a40d79501", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/36.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/36.exercises/solution.json" new file mode 100644 index 000000000..97932f124 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/36.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "2627bbe764734181a8fea0dfd6b97207", + "keywords": "位运算,数学,字符串,模拟", + "title": "二进制求和", + "desc": [ + { + "content": "\n

给你两个二进制字符串,返回它们的和(用二进制表示)。

输入为 非空 字符串且只包含数字 1 和 0

 

示例 1:

输入: a = "11", b = "1"
输出:
"100"

示例 2:

输入: a = "1010", b = "1011"
输出:
"10101"

 

提示:

    \t
  • 每个字符串仅由字符 '0''1' 组成。
  • \t
  • 1 <= a.length, b.length <= 10^4
  • \t
  • 字符串如果不是 "0" ,就都不含前导零。
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic String addBinary(String a, String b) {\n\n\t\tStringBuffer s1 = new StringBuffer(a);\n\t\ts1.reverse();\n\t\tStringBuffer s2 = new StringBuffer(b);\n\t\ts2.reverse();\n\n\t\tif (s1.length() > s2.length()) {\n\t\t\tint n = s1.length() - s2.length();\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\ts2.append('0');\n\t\t\t}\n\t\t} else if (s1.length() < s2.length()) {\n\t\t\tint n = s2.length() - s1.length();\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\ts1.append('0');\n\t\t\t}\n\t\t}\n\n\t\tStringBuffer stringBuffer = new StringBuffer(\"\");\n\t\tint i = 0;\n\t\tchar flag = '0';\n\t\twhile (i < s1.length() && i < s2.length()) {\n\t\t\tif (flag == '0') {\n\t\t\t\tif (s1.charAt(i) == s2.charAt(i) && s1.charAt(i) == '1') {\n\t\t\t\t\tflag = '1';\n\t\t\t\t\tstringBuffer.append('0');\n\t\t\t\t} else if (s1.charAt(i) == s2.charAt(i) && s1.charAt(i) == '0') {\n\t\t\t\t\tstringBuffer.append('0');\n\t\t\t\t} else {\n\t\t\t\t\tstringBuffer.append('1');\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (s1.charAt(i) == s2.charAt(i) && s1.charAt(i) == '1') {\n\t\t\t\t\tflag = '1';\n\t\t\t\t\tstringBuffer.append('1');\n\t\t\t\t} else if (s1.charAt(i) == s2.charAt(i) && s1.charAt(i) == '0') {\n\t\t\t\t\tflag = '0';\n\t\t\t\t\tstringBuffer.append('1');\n\t\t\t\t} else {\n\t\t\t\t\tflag = '1';\n\t\t\t\t\tstringBuffer.append('0');\n\t\t\t\t}\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\tif (flag == '1') {\n\t\t\tstringBuffer.append(flag);\n\t\t}\n\t\tstringBuffer.reverse();\n\t\treturn stringBuffer.toString();\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-8fcebe8098d040f7a3dbbb9a40d79501", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600471009" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/37.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/37.exercises/config.json" new file mode 100644 index 000000000..f91e444d1 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/37.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-4b8e2ba0678440539ca1fc73c8852103", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/37.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/37.exercises/solution.json" new file mode 100644 index 000000000..337d006c7 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/37.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "bf4e99852b054ed98d78964a6eca8ed5", + "keywords": "栈,树,深度优先搜索,二叉树", + "title": "二叉树的中序遍历", + "desc": [ + { + "content": "\n

给定一个二叉树的根节点 root ,返回它的 中序 遍历。

 

示例 1:

\"\"
输入:root = [1,null,2,3]
输出:
[1,3,2]

示例 2:

输入:root = []
输出:
[]

示例 3:

输入:root = [1]
输出:
[1]

示例 4:

\"\"
输入:root = [1,2]
输出:
[2,1]

示例 5:

\"\"
输入:root = [1,null,2]
输出:
[1,2]

 

提示:

    \t
  • 树中节点数目在范围 [0, 100]
  • \t
  • -100 <= Node.val <= 100

 

进阶: 递归算法很简单,你可以通过迭代算法完成吗?

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "\npublic class TreeNode {\n\tint val;\n\tTreeNode left;\n\tTreeNode right;\n\n\tTreeNode(int x) {\n\t\tval = x;\n\t}\n}\n\nclass Solution {\n\tpublic List inorderTraversal(TreeNode root) {\n\t\tList list = new ArrayList<>();\n\t\tStack stack = new Stack<>();\n\t\tTreeNode cur = root;\n\t\twhile (cur != null || !stack.isEmpty()) {\n\t\t\tif (cur != null) {\n\t\t\t\tstack.push(cur);\n\t\t\t\tcur = cur.left;\n\t\t\t} else {\n\t\t\t\tcur = stack.pop();\n\t\t\t\tlist.add(cur.val);\n\t\t\t\tcur = cur.right;\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}\n}\n", + "language": "java" + }, + "node_id": "dailycode-4b8e2ba0678440539ca1fc73c8852103", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600471010" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/38.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/38.exercises/config.json" new file mode 100644 index 000000000..38ad7f66a --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/38.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-69d51623b58146baa7164733d16a104a", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/38.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/38.exercises/solution.json" new file mode 100644 index 000000000..60903b7ae --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/38.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "6c7ce7b18722435fb30547af551dd756", + "keywords": "记忆化搜索,数学,动态规划", + "title": "爬楼梯", + "desc": [ + { + "content": "\n

假设你正在爬楼梯。需要 n 阶你才能到达楼顶。

每次你可以爬 1 或 2 个台阶。你有多少种不同的方法可以爬到楼顶呢?

注意:给定 n 是一个正整数。

示例 1:

输入: 2
输出:
2
解释:
有两种方法可以爬到楼顶。1. 1 阶 + 1 阶2. 2 阶

示例 2:

输入: 3
输出:
3
解释:
有三种方法可以爬到楼顶。1. 1 阶 + 1 阶 + 1 阶2. 1 阶 + 2 阶3. 2 阶 + 1 阶
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic int climbStairs(int n) {\n\t\tint[] num = new int[n + 1];\n\t\tnum[0] = 1;\n\t\tnum[1] = 1;\n\t\tfor (int i = 2; i <= n; i++) {\n\t\t\tnum[i] = num[i - 1] + num[i - 2];\n\t\t}\n\t\treturn num[n];\n\t}\n}\n", + "language": "java" + }, + "node_id": "dailycode-69d51623b58146baa7164733d16a104a", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470125" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/39.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/39.exercises/config.json" new file mode 100644 index 000000000..df4fda0ef --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/39.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-f82947171c0b4413b5364fc8d0a9abc2", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/39.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/39.exercises/solution.json" new file mode 100644 index 000000000..5741f59e3 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/39.exercises/solution.json" @@ -0,0 +1,124 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "5f2f366695ff481bb1208fa2539172ba", + "keywords": "哈希表,数学,字符串", + "title": "罗马数字转整数", + "desc": [ + { + "content": "\n
\n

罗马数字包含以下七种字符: I, V, X, LCD 和 M。\n

", + "language": "markdown" + }, + { + "content": "\n
字符          数值\nI             1\nV             5\nX             10\nL             50\nC             100\nD             500\nM             1000
", + "language": "markdown" + }, + { + "content": "\n

例如, 罗马数字 2 写做 II ,即为两个并列的 1。12\n写做 XII ,即为 X + II 。 27\n写做  XXVII,\n即为 XX + V + II 。

", + "language": "markdown" + }, + { + "content": "\n

通常情况下,罗马数字中小的数字在大的数字的右边。但也存在特例,例如 4 不写做 IIII,而是 IV。数字 1 在数字 5 的左边,所表示的数等于大数 5\n减小数 1 得到的数值 4 。同样地,数字 9 表示为 IX。这个特殊的规则只适用于以下六种情况:

", + "language": "markdown" + }, + { + "content": "\n
    \n
  • I 可以放在 V (5) 和 X (10) 的左边,来表示 4 和 9。
  • \n
  • X 可以放在 L (50) 和 C (100) 的左边,来表示 40\n和 90。 
  • \n
  • C 可以放在 D (500) 和 M (1000) 的左边,来表示 400\n和 900。
  • \n
", + "language": "markdown" + }, + { + "content": "\n

给你一个整数,将其转为罗马数字。

", + "language": "markdown" + }, + { + "content": "\n

 

", + "language": "markdown" + }, + { + "content": "\n

示例 1:

", + "language": "markdown" + }, + { + "content": "\n
输入: num = 3\n
输出:
\"III\"
", + "language": "markdown" + }, + { + "content": "\n

示例 2:

", + "language": "markdown" + }, + { + "content": "\n
输入: num = 4\n
输出:
\"IV\"
", + "language": "markdown" + }, + { + "content": "\n

示例 3:

", + "language": "markdown" + }, + { + "content": "\n
输入: num = 9\n
输出:
\"IX\"
", + "language": "markdown" + }, + { + "content": "\n

示例 4:

", + "language": "markdown" + }, + { + "content": "\n
输入: num = 58\n
输出:
\"LVIII\"\n
解释:
L = 50, V = 5, III = 3.\n
", + "language": "markdown" + }, + { + "content": "\n

示例 5:

", + "language": "markdown" + }, + { + "content": "\n
输入: num = 1994\n
输出:
\"MCMXCIV\"\n
解释:
M = 1000, CM = 900, XC = 90, IV = 4.
", + "language": "markdown" + }, + { + "content": "\n

 

", + "language": "markdown" + }, + { + "content": "\n

提示:

", + "language": "markdown" + }, + { + "content": "\n
    \n
  • 1 <= num <= 3999
  • \n
\n
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic int romanToInt(String s) {\n\t\tint n = 0;\n\t\tfor (int i = 0; i < s.length();) {\n\t\t\tchar c = s.charAt(i);\n\t\t\tif (c == 'I') {\n\t\t\t\tif (i + 1 < s.length()) {\n\t\t\t\t\tif (s.charAt(i + 1) == 'V') {\n\t\t\t\t\t\tn += 4;\n\t\t\t\t\t\ti += 2;\n\t\t\t\t\t} else if (s.charAt(i + 1) == 'X') {\n\t\t\t\t\t\tn += 9;\n\t\t\t\t\t\ti += 2;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tn += 1;\n\t\t\t\t\t\ti++;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tn += 1;\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t} else if (c == 'X') {\n\t\t\t\tif (i + 1 < s.length()) {\n\t\t\t\t\tif (s.charAt(i + 1) == 'L') {\n\t\t\t\t\t\tn += 40;\n\t\t\t\t\t\ti += 2;\n\t\t\t\t\t} else if (s.charAt(i + 1) == 'C') {\n\t\t\t\t\t\tn += 90;\n\t\t\t\t\t\ti += 2;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tn += 10;\n\t\t\t\t\t\ti++;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tn += 10;\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t} else if (c == 'C') {\n\t\t\t\tif (i + 1 < s.length()) {\n\t\t\t\t\tif (s.charAt(i + 1) == 'D') {\n\t\t\t\t\t\tn += 400;\n\t\t\t\t\t\ti += 2;\n\t\t\t\t\t} else if (s.charAt(i + 1) == 'M') {\n\t\t\t\t\t\tn += 900;\n\t\t\t\t\t\ti += 2;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tn += 100;\n\t\t\t\t\t\ti++;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tn += 100;\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t} else if (c == 'V') {\n\t\t\t\tn += 5;\n\t\t\t\ti++;\n\t\t\t} else if (c == 'L') {\n\t\t\t\tn += 50;\n\t\t\t\ti++;\n\t\t\t} else if (c == 'D') {\n\t\t\t\tn += 500;\n\t\t\t\ti++;\n\t\t\t} else if (c == 'M') {\n\t\t\t\tn += 1000;\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\treturn n;\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-f82947171c0b4413b5364fc8d0a9abc2", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470218" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/4.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/4.exercises/config.json" new file mode 100644 index 000000000..bd751b2c1 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/4.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-1ca616758e884630bac67b234def92c8", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/4.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/4.exercises/solution.json" new file mode 100644 index 000000000..f83b4aeac --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/4.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "17dcafe1edc8444ea6cea1bb82bbac67", + "keywords": "算法初阶,最小值和最大值,排序和顺序统计量,中位数和顺序统计量", + "title": "按要求编写字符界面", + "desc": [ + { + "content": "\n编写一个字符界面的Java Application 程序,接受用户输入的10个整数,并输出这10个整数的最大值和最小值。", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "import java.util.Scanner;\npublic class MaxMin {\n\tpublic static void main(String[] args) {\n\t\tArrays array = new Arrays();\n\t\tarray.setArr();\n\t\tint max=array.getMax();\n\t\tint min=array.getMin();\n\t\tSystem.out.println(\"数组中最大值=\"+max);\n\t\tSystem.out.println(\"数组中最小值=\"+min);\n\t}\n}\nclass Arrays {\n\tprivate int[] arr;\n\tpublic Arrays() {\n\t\tarr = new int[10] ;\n\t\tfor(int i = 0; i i)\n\t\t\t\tmin= i;\n\t\t}\n\t\treturn min; \n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-1ca616758e884630bac67b234def92c8", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600470281" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/40.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/40.exercises/config.json" new file mode 100644 index 000000000..f0575d958 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/40.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-4a30eebe19474c4fb0a387ab45a684de", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/40.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/40.exercises/solution.json" new file mode 100644 index 000000000..88e76be16 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/40.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "5095334c03264298b61cdf36a5f3602d", + "keywords": "数组,数学", + "title": "加一", + "desc": [ + { + "content": "\n

给定一个由 整数 组成的 非空 数组所表示的非负整数,在该数的基础上加一。

最高位数字存放在数组的首位, 数组中每个元素只存储单个数字。

你可以假设除了整数 0 之外,这个整数不会以零开头。

 

示例 1:

输入:digits = [1,2,3]
输出:
[1,2,4]
解释:
输入数组表示数字 123。

示例 2:

输入:digits = [4,3,2,1]
输出:
[4,3,2,2]
解释:
输入数组表示数字 4321。

示例 3:

输入:digits = [0]
输出:
[1]

 

提示:

    \t
  • 1 <= digits.length <= 100
  • \t
  • 0 <= digits[i] <= 9
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic int[] plusOne(int[] digits) {\n\t\tint i = digits.length - 1;\n\t\twhile (i >= 0 && (digits[i] = digits[i] + 1) == 10) {\n\t\t\tdigits[i] = 0;\n\t\t\ti--;\n\t\t}\n\t\tif (digits[0] == 0) {\n\t\t\tint[] temp = new int[digits.length + 1];\n\t\t\ttemp[0] = 1;\n\t\t\treturn temp;\n\t\t}\n\t\treturn digits;\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-4a30eebe19474c4fb0a387ab45a684de", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600469823" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/41.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/41.exercises/config.json" new file mode 100644 index 000000000..5370240ff --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/41.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-2ab0d6770e5f46889d71ba2f4b2e1fb1", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/41.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/41.exercises/solution.json" new file mode 100644 index 000000000..cf15792a4 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/41.exercises/solution.json" @@ -0,0 +1,112 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "521d27470d934267b7faf7d0cc2212c0", + "keywords": "数组,双指针", + "title": "删除有序数组中的重复项", + "desc": [ + { + "content": "\n
\n

给你一个有序数组 nums ,请你\n原地 删除重复出现的元素,使每个元素 只出现一次 ,返回删除后数组的新长度。

", + "language": "markdown" + }, + { + "content": "\n

不要使用额外的数组空间,你必须在 原地\n修改输入数组 并在使用 O(1) 额外空间的条件下完成。

", + "language": "markdown" + }, + { + "content": "\n

 

", + "language": "markdown" + }, + { + "content": "\n

说明:

", + "language": "markdown" + }, + { + "content": "\n

为什么返回数值是整数,但输出的答案是数组呢?

", + "language": "markdown" + }, + { + "content": "\n

请注意,输入数组是以「引用」方式传递的,这意味着在函数里修改输入数组对于调用者是可见的。

", + "language": "markdown" + }, + { + "content": "\n

你可以想象内部操作如下:

", + "language": "markdown" + }, + { + "content": "\n
// nums 是以“引用”方式传递的。也就是说,不对实参做任何拷贝\nint len = removeDuplicates(nums);",
+      "language": "markdown"
+    },
+    {
+      "content": "\n// 在函数里修改输入数组对于调用者是可见的。\n// 根据你的函数返回的长度, 它会打印出数组中 该长度范围内 的所有元素。\nfor (int i = 0; i < len; i++) {\n    print(nums[i]);\n}\n
\n ", + "language": "markdown" + }, + { + "content": "\n

示例 1:

", + "language": "markdown" + }, + { + "content": "\n
输入:nums = [1,1,2]\n
输出:
2, nums = [1,2]\n
解释:
函数应该返回新的长度 2 ,并且原数组 nums 的前两个元素被修改为 1, 2 。不需要考虑数组中超出新长度后面的元素。\n
", + "language": "markdown" + }, + { + "content": "\n

示例 2:

", + "language": "markdown" + }, + { + "content": "\n
输入:nums = [0,0,1,1,1,2,2,3,3,4]\n
输出:
5, nums = [0,1,2,3,4]\n
解释:
函数应该返回新的长度 5 , 并且原数组 nums 的前五个元素被修改为 0, 1, 2, 3, 4 。不需要考虑数组中超出新长度后面的元素。\n
", + "language": "markdown" + }, + { + "content": "\n

 

", + "language": "markdown" + }, + { + "content": "\n

提示:

", + "language": "markdown" + }, + { + "content": "\n
    \n
  • 0 <= nums.length <= 3 * 104
  • \n
  • -104 <= nums[i] <= 104
  • \n
  • nums 已按升序排列
  • \n
", + "language": "markdown" + }, + { + "content": "\n

 

\n
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic int removeDuplicates(int[] nums) {\n\t\tif (nums == null || nums.length == 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tint a = 0;\n\t\tfor (int b = 1; b < nums.length; b++) {\n\t\t\tif (nums[a] != nums[b]) {\n\t\t\t\ta++;\n\t\t\t\tnums[a] = nums[b];\n\t\t\t}\n\t\t}\n\t\treturn a + 1;\n\t}\n}\n", + "language": "java" + }, + "node_id": "dailycode-2ab0d6770e5f46889d71ba2f4b2e1fb1", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600470118" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/42.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/42.exercises/config.json" new file mode 100644 index 000000000..0d3297744 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/42.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-df2108c0132f4f87a1db8b491de4dc79", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/42.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/42.exercises/solution.json" new file mode 100644 index 000000000..ad9bd6f65 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/42.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "9a0992991f5b49779b019c87b3bdbcb2", + "keywords": "字符串", + "title": "最长公共前缀", + "desc": [ + { + "content": "\n

编写一个函数来查找字符串数组中的最长公共前缀。

如果不存在公共前缀,返回空字符串 \"\"

 

示例 1:

输入:strs = [\"flower\",\"flow\",\"flight\"]
输出:
\"fl\"

示例 2:

输入:strs = [\"dog\",\"racecar\",\"car\"]
输出:
\"\"
解释:
输入不存在公共前缀。

 

提示:

    \t
  • 0 <= strs.length <= 200
  • \t
  • 0 <= strs[i].length <= 200
  • \t
  • strs[i] 仅由小写英文字母组成
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic String longestCommonPrefix(String[] strs) {\n\t\tif (strs.length == 0) {\n\t\t\treturn \"\";\n\t\t}\n\t\tint i = 0;\n\t\tStringBuilder lcp = new StringBuilder();\n\t\twhile (true) {\n\t\t\tboolean done = false;\n\t\t\tif (i >= strs[0].length()) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor (int j = 0; j < strs.length; j++) {\n\t\t\t\tif (i < strs[j].length()) {\n\t\t\t\t\tif (strs[j].charAt(i) != strs[0].charAt(i)) {\n\t\t\t\t\t\tdone = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tdone = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (done) {\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tlcp.append(strs[0].charAt(i));\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\treturn lcp.toString();\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-df2108c0132f4f87a1db8b491de4dc79", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600469918" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/43.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/43.exercises/config.json" new file mode 100644 index 000000000..da992948b --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/43.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-3cd29560f5674e679333d243e81115c0", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/43.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/43.exercises/solution.json" new file mode 100644 index 000000000..739074335 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/43.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "a53ecd2c41fa4c10ae30759ef1229b6f", + "keywords": "数组,分治,动态规划", + "title": "最大子序和", + "desc": [ + { + "content": "\n

给定一个整数数组 nums ,找到一个具有最大和的连续子数组(子数组最少包含一个元素),返回其最大和。

 

示例 1:

输入:nums = [-2,1,-3,4,-1,2,1,-5,4]
输出:
6
解释:
连续子数组 [4,-1,2,1] 的和最大,为 6 。

示例 2:

输入:nums = [1]
输出:
1

示例 3:

输入:nums = [0]
输出:
0

示例 4:

输入:nums = [-1]
输出:
-1

示例 5:

输入:nums = [-100000]
输出:
-100000

 

提示:

    \t
  • 1 <= nums.length <= 3 * 104
  • \t
  • -105 <= nums[i] <= 105

 

进阶:如果你已经实现复杂度为 O(n) 的解法,尝试使用更为精妙的 分治法 求解。

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic int maxSubArray(int[] nums) {\n\t\tint maxSum = nums[0];\n\t\tint curSum = 0;\n\n\t\tfor (int n : nums) {\n\t\t\tcurSum += n;\n\t\t\tif (curSum > maxSum) {\n\t\t\t\tmaxSum = curSum;\n\t\t\t}\n\t\t\tif (curSum < 0) {\n\t\t\t\tcurSum = 0;\n\t\t\t}\n\t\t}\n\n\t\treturn maxSum;\n\t}\n}\n", + "language": "java" + }, + "node_id": "dailycode-3cd29560f5674e679333d243e81115c0", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600469821" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/44.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/44.exercises/config.json" new file mode 100644 index 000000000..9c19682c8 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/44.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-cd10c107bc354eef83e1b81a46b78db5", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/44.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/44.exercises/solution.json" new file mode 100644 index 000000000..e5d7ec026 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/44.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "1a3c7b78b2934efd89a842dfa71f79ff", + "keywords": "数学,二分查找", + "title": "x 的平方根", + "desc": [ + { + "content": "\n

实现 int sqrt(int x) 函数。

\n

计算并返回 x 的平方根,其中 x 是非负整数。

\n

由于返回类型是整数,结果只保留整数的部分,小数部分将被舍去。

\n

示例 1:

\n
输入: 4
输出:
2
\n

示例 2:

\n
输入: 8
输出:
2
说明:
8 的平方根是 2.82842..., 由于返回类型是整数,小数部分将被舍去。
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic int mySqrt(int x) {\n\t\tint left = 0, right = 46340;\n\t\twhile (left < right) {\n\t\t\tint mid = (left + right) / 2;\n\t\t\tif (mid * mid < x)\n\t\t\t\tleft = mid + 1;\n\t\t\telse if (mid * mid > x)\n\t\t\t\tif ((mid - 1) * (mid - 1) <= x)\n\t\t\t\t\treturn mid - 1;\n\t\t\t\telse\n\t\t\t\t\tright = mid - 1;\n\t\t\telse\n\t\t\t\treturn mid;\n\t\t}\n\t\tif (left * left > x)\n\t\t\treturn left - 1;\n\t\treturn left;\n\t}\n}\n", + "language": "java" + }, + "node_id": "dailycode-cd10c107bc354eef83e1b81a46b78db5", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470124" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/45.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/45.exercises/config.json" new file mode 100644 index 000000000..6cea2448c --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/45.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-77f941ad05c44053af905fd80f942bd5", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/45.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/45.exercises/solution.json" new file mode 100644 index 000000000..4d91e17be --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/45.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "be127eb3d2ef453ab35df80d16cdcd73", + "keywords": "数组,双指针,排序", + "title": "合并两个有序数组", + "desc": [ + { + "content": "\n

给你两个有序整数数组 nums1 nums2,请你将 nums2 合并到 nums1 使 nums1 成为一个有序数组。

初始化 nums1nums2 的元素数量分别为 mn 。你可以假设 nums1 的空间大小等于 m + n,这样它就有足够的空间保存来自 nums2 的元素。

 

示例 1:

输入:nums1 = [1,2,3,0,0,0], m = 3, nums2 = [2,5,6], n = 3
输出:
[1,2,2,3,5,6]

示例 2:

输入:nums1 = [1], m = 1, nums2 = [], n = 0
输出:
[1]

 

提示:

    \t
  • nums1.length == m + n
  • \t
  • nums2.length == n
  • \t
  • 0 <= m, n <= 200
  • \t
  • 1 <= m + n <= 200
  • \t
  • -109 <= nums1[i], nums2[i] <= 109
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic void merge(int[] nums1, int m, int[] nums2, int n) {\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tnums1[m] = nums2[i];\n\t\t\tm++;\n\t\t}\n\t\tint temp = 0;\n\t\tfor (int i = 0; i < m; i++) {\n\t\t\tfor (int j = i; j < m; j++) {\n\t\t\t\tif (nums1[i] > nums1[j]) {\n\t\t\t\t\ttemp = nums1[j];\n\t\t\t\t\tnums1[j] = nums1[i];\n\t\t\t\t\tnums1[i] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n", + "language": "java" + }, + "node_id": "dailycode-77f941ad05c44053af905fd80f942bd5", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470926" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/46.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/46.exercises/config.json" new file mode 100644 index 000000000..f000cf2b5 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/46.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-00a267eca7a84efdac846774beeb5766", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/46.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/46.exercises/solution.json" new file mode 100644 index 000000000..daf56a481 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/46.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "383deea124124fc3af6f677fa1cf9305", + "keywords": "数组,二分查找", + "title": "搜索插入位置", + "desc": [ + { + "content": "\n

给定一个排序数组和一个目标值,在数组中找到目标值,并返回其索引。如果目标值不存在于数组中,返回它将会被按顺序插入的位置。

你可以假设数组中无重复元素。

示例 1:

输入: [1,3,5,6], 5
输出:
2

示例 2:

输入: [1,3,5,6], 2
输出:
1

示例 3:

输入: [1,3,5,6], 7
输出:
4

示例 4:

输入: [1,3,5,6], 0
输出:
0
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic int searchInsert(int[] nums, int target) {\n\t\tint left = 0, right = nums.length - 1;\n\t\tif (target < nums[left])\n\t\t\treturn 0;\n\t\tif (target > nums[right])\n\t\t\treturn nums.length;\n\t\twhile (left <= right) {\n\t\t\tint mid = (right - left) / 2 + left;\n\t\t\tif (target < nums[mid]) {\n\t\t\t\tright = mid - 1;\n\t\t\t} else if (target > nums[mid]) {\n\t\t\t\tleft = mid + 1;\n\t\t\t} else {\n\t\t\t\treturn mid;\n\t\t\t}\n\t\t}\n\t\treturn left;\n\t}\n}\n", + "language": "java" + }, + "node_id": "dailycode-00a267eca7a84efdac846774beeb5766", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600470222" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/47.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/47.exercises/config.json" new file mode 100644 index 000000000..901966439 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/47.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-a0ba50f39b734de284a9d868affd00a5", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/47.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/47.exercises/solution.json" new file mode 100644 index 000000000..b2a97c335 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/47.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "d027b4d8ed9e4cf8bf94deb1c90d6320", + "keywords": "数学", + "title": "回文数", + "desc": [ + { + "content": "\n

给你一个整数 x ,如果 x 是一个回文整数,返回 true ;否则,返回 false

回文数是指正序(从左向右)和倒序(从右向左)读都是一样的整数。例如,121 是回文,而 123 不是。

 

示例 1:

输入:x = 121
输出:
true

示例 2:

输入:x = -121
输出:
false
解释:
从左向右读, 为 -121 。 从右向左读, 为 121- 。因此它不是一个回文数。

示例 3:

输入:x = 10
输出:
false
解释:
从右向左读, 为 01 。因此它不是一个回文数。

示例 4:

输入:x = -101
输出:
false

 

提示:

    \t
  • -231 <= x <= 231 - 1

 

进阶:你能不将整数转为字符串来解决这个问题吗?

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic boolean isPalindrome(int x) {\n\t\tlong r;\n\t\tlong o = x;\n\t\tlong y = 0;\n\t\twhile (x > 0) {\n\t\t\tr = x % 10;\n\t\t\ty = y * 10 + r;\n\t\t\tx = (int) Math.floor(x / 10);\n\t\t}\n\t\treturn y == o;\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-a0ba50f39b734de284a9d868affd00a5", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600471100" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/48.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/48.exercises/config.json" new file mode 100644 index 000000000..e1662dce7 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/48.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-d1b9ca19b0a24258833ae33eac8f8ee6", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/48.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/48.exercises/solution.json" new file mode 100644 index 000000000..d70eb3f07 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/48.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "6b15cf2f03a14e478ddc2c2d135852e4", + "keywords": "栈,字符串", + "title": "有效的括号", + "desc": [ + { + "content": "\n

给定一个只包括 '('')''{''}''['']' 的字符串 s ,判断字符串是否有效。

有效字符串需满足:

    \t
  1. 左括号必须用相同类型的右括号闭合。
  2. \t
  3. 左括号必须以正确的顺序闭合。

 

示例 1:

输入:s = \"()\"
输出:
true

示例 2:

输入:s = \"()[]{}\"
输出:
true

示例 3:

输入:s = \"(]\"
输出:
false

示例 4:

输入:s = \"([)]\"
输出:
false

示例 5:

输入:s = \"{[]}\"
输出:
true

 

提示:

    \t
  • 1 <= s.length <= 104
  • \t
  • s 仅由括号 '()[]{}' 组成
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic boolean isValid(String s) {\n\t\tchar[] parentheses = { '(', '[', '{', ')', ']', '}' };\n\t\tint i = 0;\n\t\tchar c;\n\t\tint[] sum = { 0, 0, 0 };\n\t\tStack top = new Stack();\n\t\twhile (i < s.length()) {\n\t\t\tc = s.charAt(i);\n\t\t\tfor (int j = 0; j <= 2; j++) {\n\t\t\t\tif (c == parentheses[j]) {\n\t\t\t\t\ttop.push(j);\n\t\t\t\t\tsum[j]++;\n\t\t\t\t} else if (c == parentheses[j + 3]) {\n\t\t\t\t\tif (top.size() == 0 || top.peek() != j) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\ttop.pop();\n\t\t\t\t\tsum[j]--;\n\t\t\t\t} else {\n\t\t\t\t}\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\tfor (int j = 0; j <= 2; j++) {\n\t\t\tif (sum[j] != 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-d1b9ca19b0a24258833ae33eac8f8ee6", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600470114" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/5.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/5.exercises/config.json" new file mode 100644 index 000000000..2ede53292 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/5.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-76e2da179b144ee88079177af1baae8c", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/5.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/5.exercises/solution.json" new file mode 100644 index 000000000..07b908ff4 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/5.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "90db1431b3b0440ab4b6368a5053f42d", + "keywords": "算法高阶,字符串匹配,算法问题选编,利用有限自动机进行字符串匹配", + "title": "改写字符串", + "desc": [ + { + "content": "\n键盘录入一个字符串,将字符串中的大写改成小写,小写改成大写,数字改成*。例如heLLO123,输出后为HEllo***", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "import java.util.Scanner;\npublic class Transfer {\n\tpublic static void main(String[] args) {\n\tString str = \"\";\n\tScanner s = new Scanner(System.in);\n\tSystem.out.println(\"请输入您想输入的字符串:\");\n\tstr = s.next();\n\tStringBuffer sb = new StringBuffer();\n\tint i;\n\tfor (i = 0; i <= str.length() - 1; i++) {\n\t\tchar ch;\n\t\tif (str.charAt(i) >= 'a' && str.charAt(i) <= 'z') {\n\t\t\tch = (char) (str.charAt(i) - 32); \n\t\t} else if (str.charAt(i) >= 'A' && str.charAt(i) <= 'Z') {\n\t\t\tch = (char) (str.charAt(i) + 32); \n\t\t} else if (str.charAt(i) >= '0' && str.charAt(i) <= '9') {\n\t\t\tch = '*'; \n\t\t} else {\n\t\t\tch = str.charAt(i); \n\t\t}\n\t\tsb.append(ch); \n\t}\n\tString trStr = sb.toString(); \n\tSystem.out.println(sb.toString());\n }\n}", + "language": "java" + }, + "node_id": "dailycode-76e2da179b144ee88079177af1baae8c", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600469971" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/6.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/6.exercises/config.json" new file mode 100644 index 000000000..36f178f6c --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/6.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-f0884125382f41c592c2346b73f34e30", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/6.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/6.exercises/solution.json" new file mode 100644 index 000000000..bd68fb240 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/6.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "12524157eec6409ab1b5e93fc9141608", + "keywords": "算法高阶,数论算法,素数的测试,算法问题选编", + "title": "求素数", + "desc": [ + { + "content": "\n求1-100内的素数", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "public static void main(String[] args){\n\t\tfor(int i=0;i<100;i++) {\n\t\t\tcheckPrime(i);\n\t\t}\n\t}\n\tprivate static void checkPrime(int x){\n\t\tboolean isPrime = true;\n\t\tif(x ==1 || x %2 ==0 && x !=2 )\n\t\t{\n\t\t\tisPrime = false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor( int i =3; i< Math.sqrt(x); i+=2)\n\t\t\t{\n\t\t\t\tif( x % i == 0)\n\t\t\t\t{\n\t\t\t\t\tisPrime = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif( isPrime)\n\t\t{\n\t\t\tSystem.out.println(x +\"是素数\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(x+ \"不是素数\");\n\t\t}\n\t}", + "language": "java" + }, + "node_id": "dailycode-f0884125382f41c592c2346b73f34e30", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470193" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/7.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/7.exercises/config.json" new file mode 100644 index 000000000..7cce28cd1 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/7.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-642fd7e4d1d94f50b103667b52e349de", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/7.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/7.exercises/solution.json" new file mode 100644 index 000000000..516b3f12e --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/7.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "98907681bd8443f1b226bd2fe6710cf8", + "keywords": "排序", + "title": "逆序输出", + "desc": [ + { + "content": "\n如:abcd1234,逆序输出:4321dcba", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "import java.lang.*;\nimport java.io.*;\nimport java.util.*;\nclass ReverseString {\n\tpublic static void main(String[] args) {\n\t\tString input = \"abcd1234\";\n\t\tchar[] try1 = input.toCharArray();\n\t\tfor (int i = try1.length - 1; i >= 0; i--)\n\t\t\tSystem.out.print(try1[i]);\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-642fd7e4d1d94f50b103667b52e349de", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470192" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/8.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/8.exercises/config.json" new file mode 100644 index 000000000..56a1f00a2 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/8.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-a97f6434fd15477d982f9ef33297caff", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/8.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/8.exercises/solution.json" new file mode 100644 index 000000000..99e5203bd --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/8.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "7896b88027e34a4ea6de980d35e10418", + "keywords": "算法初阶,基础知识,分治策略,用主方法求解递归式", + "title": "模拟计算器", + "desc": [ + { + "content": "\n模拟简单的计算器。\n要求:\n(1)定义名为Number的类,在其中定义两个私有的整型数据成员n1和n2;\n(2)在Number类中编写构造方法,赋予n1和n2初始值;\n(3)再为Number类定义加(addition)、减(subtration)、乘(multiplication)、除(division)四个公有成员方法,分别对两个成员变量执行加、减、乘、除的运算。注意:除法运算时要抛出除数为0的异常。\n(4)在主方法中创建Number类的对象,调用上述各个方法,测试并输出计算结果,注意进行必要的异常捕获与处理。", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "public class Number {\n\tprivate int n1;\n\tprivate int n2;\n\tpublic Number(int n1, int n2) {\n\t\tthis.n1 = n1;\n\t\tthis.n2 = n2;\n\t}\n\tpublic int addition() {\n\t\treturn n1 + n2;\n\t}\n\tpublic int subtration() {\n\t\treturn n1 - n2;\n\t}\n\tpublic int multiplication() {\n\t\treturn n1 * n2;\n\t}\n\tprivate int division() {\n\t\tif (n2 == 0) {\n\t\t\tthrow new IllegalArgumentException(\"除数参数不合法\");\n\t\t}\n\t\treturn n1 / n2;\n\t}\n\tpublic static void main(String[] args) {\n\t\tNumber number = new Number(6, 0);\n\t\tSystem.out.println(number.addition());\n\t\tSystem.out.println(number.subtration());\n\t\tSystem.out.println(number.multiplication());\n\t\ttry {\n\t\t\tSystem.out.println(number.division());\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-a97f6434fd15477d982f9ef33297caff", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600469981" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/9.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/9.exercises/config.json" new file mode 100644 index 000000000..7055141ef --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/9.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-4599bbc177164a5fbac3c9116aee0c05", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/9.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/9.exercises/solution.json" new file mode 100644 index 000000000..782216925 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/2.java/9.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "1815b9aa7eeb4aec927a3b93ad258801", + "keywords": "图算法,算法高阶,最小生成树,最小生成树的形成", + "title": "生成随机字符串", + "desc": [ + { + "content": "\n生成一个由大写字母和数字组成的6位随机字符串,并且字符串不重复", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class java_384519 {\n\tpublic static char[] generate() {\n\tchar[] letters = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S',\n\t\t'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' };\n\tboolean[] flags = new boolean[letters.length];\n\tchar[] chs = new char[6];\n\tfor (int i = 0; i < chs.length; i++) {\n\t int index;\n\t do {\n\t\tindex = (int) (Math.random() * (letters.length));\n\t } while (flags[index]);\n\t chs[i] = letters[index];\n\t flags[index] = true;\n\t}\n\treturn chs;\n }\n}", + "language": "java" + }, + "node_id": "dailycode-4599bbc177164a5fbac3c9116aee0c05", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600470188" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/1.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/1.exercises/config.json" new file mode 100644 index 000000000..96b348c64 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/1.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-2eebebfff6fa4188a9711c043407e25f", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/1.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/1.exercises/solution.json" new file mode 100644 index 000000000..c89cc3b6e --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/1.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "6c50862d32324cd692f96c3d58c51115", + "keywords": "算法高阶,数论算法,素数的测试,算法问题选编", + "title": "找出素数对", + "desc": [ + { + "content": "\n任意输入一个大于10的偶数编程找出所有和等于该偶数的素数对", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "h = 0\ndef a(h):\n\tx = 0\n\tfor j in range(2, h):\n\t\tif h % j == 0:\n\t\t\tx = 1\n\t\t\tbreak\n\tif x == 0:\n\t\treturn 1\nn = int(input(\"输入任意大于10的偶数:\"))\nfor i in range(n,n+1):\n\th = 0\n\tif i % 2 == 0:\n\t\tfor k in range(2, i):\n\t\t\tif a(k) == 1 and a(i - k) == 1:\n\t\t\t\th = 1\n\t\t\t\tif h == 0:\n\t\t\t\t\tprint(\"%d can't\" % i)\n\t\t\t\t\tbreak\n\t\t\t\telse:\n\t\t\t\t\tprint(\"%d=%d+%d\" % (i, k, i - k))\n\t\t\t\t\tbreak", + "language": "python" + }, + "node_id": "dailycode-2eebebfff6fa4188a9711c043407e25f", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600470404" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/10.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/10.exercises/config.json" new file mode 100644 index 000000000..f8780de10 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/10.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-95f5fc9c54d0497ab2c97dd8c49b8629", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/10.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/10.exercises/solution.json" new file mode 100644 index 000000000..cf336b453 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/10.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "d6b1bd5d6de4490288108c61d739ee4f", + "keywords": "算法初阶,基础知识,函数的增长,标准记号与常用函数", + "title": "要求编写函数fn(a,n) 求a+aa+aaa++⋯+aa⋯aa(n个a)之和,fn须返回的是数列和", + "desc": [ + { + "content": "\n

要求编写函数fn(a,n) 求a+aa+aaa++⋯+aa⋯aa(n个a)之和,fn须返回的是数列和。\n从控制台输入正整数a和n的值(两个值都不超过9),并输出fn(a,n)的结果值。

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "def fun(a,n):\n\ts = 1\n\tsum = 1\n\tfor i in range(1,n):\n\t\ts = 1 + s*10\n\t\tsum+=s\n\ty = a *sum\n\tprint(y)\ndef main():\n\twhile(1):\n\t\ta = int(input('请输入a:'))\n\t\tif a>9 or a<0: \n\t\t\tprint('a的值输入错误,请重新输入:')\n\t\telse:\n\t\t\tbreak\n\twhile(1):\n\t\tn = int(input('请输入n:'))\n\t\tif n>9 or n<0: \n\t\t\tprint('n的值输入错误,请重新输入:')\n\t\telse:\n\t\t\tbreak\n\tfun(a,n)\nif __name__ == '__main__':\n\tmain()", + "language": "python" + }, + "node_id": "dailycode-95f5fc9c54d0497ab2c97dd8c49b8629", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600469890" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/11.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/11.exercises/config.json" new file mode 100644 index 000000000..3fc74fb93 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/11.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-4e18b0172b18463dadaf46362740d7d0", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/11.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/11.exercises/solution.json" new file mode 100644 index 000000000..9e2f0059e --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/11.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "ba09366f2adf449c8dbb2f90b7033d1b", + "keywords": "算法初阶,基础知识,随机算法,概率分析和随机算法", + "title": "统计成绩分布", + "desc": [ + { + "content": "\n

随机产生10个[0,100]之间的整数,模拟5名学生的考试成绩。\n要求:输出成绩,计算平均分,统计高于平均分的人数

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "import random\na=[]\nsum=0\ncnt=0\nfor i in range(10):\n\tx=random.randint(0,100)\n\tsum+=x\n\tprint(x,end=\" \")\n\ta.append(x)\nave=sum/10\nprint()\nprint(ave)\nfor i in range(10):\n\tif a[i]>ave:\n\t\tcnt+=1\nprint(cnt)", + "language": "python" + }, + "node_id": "dailycode-4e18b0172b18463dadaf46362740d7d0", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600470405" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/12.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/12.exercises/config.json" new file mode 100644 index 000000000..c18d45e62 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/12.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-2bef970158ef4ce2bc686d63ee943610", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/12.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/12.exercises/solution.json" new file mode 100644 index 000000000..b54f0a5fc --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/12.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "e87e276f38b048e8889e2fe7fe79b084", + "keywords": "算法高阶,数论算法,算法问题选编,整数的因子分解", + "title": "输出整数的全排列", + "desc": [ + { + "content": "\n输入整数n(3<=n<=7),编写程序输出1,2,....,n整数的全排列,按字典序输出。\n输入样例:\n输入:3\n输出:123 132 213 231 312 321", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "import random\nn = int(input())\nt = list()\nt1 = set()\nfor i in range(1,n+1):\n\tt.append(str(i))\nwhile True:\n\tsum = 1\n\tfor i in range(1, n + 1):\n\t\tsum *= i\n\tif len(t1) >= sum:\n\t\tbreak\n\trandom.shuffle(t)\n\tt1.add(\"\".join(t))\ns = sorted(t1)\nfor i in s:\n\tprint(i,end=\" \")", + "language": "python" + }, + "node_id": "dailycode-2bef970158ef4ce2bc686d63ee943610", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600470295" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/13.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/13.exercises/config.json" new file mode 100644 index 000000000..090170128 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/13.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-d722f2ee79964c4ba0ff10be006ed793", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/13.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/13.exercises/solution.json" new file mode 100644 index 000000000..1c8a5a9f6 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/13.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "3a3ccc34f57f4f07892bdf339e218f48", + "keywords": "数学,奇偶数", + "title": "输入起始和结束的正整数,求其两个正整数之间的偶数和。", + "desc": [ + { + "content": "\n

输入起始和结束的正整数,求其两个正整数之间的偶数和。

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "x1 = input(\"请输入起始数:\")\nx2 = input(\"请输入结束数:\")\na = int(x1)\nb = int(x2)\nsum1 = 0\nfor i in range(a, b+1):\n\tif i % 2 == 0:\n\t\tsum1 += i\n\t\ti += 2\n\telse:\n\t\ti += 1\nsum2 = 0\nfor i in range(a+1, b):\n\tif i % 2 == 0:\n\t\tsum2 += i\n\t\ti += 2\n\telse:\n\t\ti += 1\nprint(str(a)+\"到\"+str(b)+\"之间的偶数和(边界是偶数时算这两个边界)是:\"+str(sum1))\nprint(str(a)+\"到\"+str(b)+\"之间的偶数和(边界是偶数时不算两个边界)是:\"+str(sum2))", + "language": "python" + }, + "node_id": "dailycode-d722f2ee79964c4ba0ff10be006ed793", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600470507" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/14.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/14.exercises/config.json" new file mode 100644 index 000000000..f169d655f --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/14.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-5e0a54189fd843a8954fa9ae5aac50a0", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/14.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/14.exercises/solution.json" new file mode 100644 index 000000000..ca9a20fd6 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/14.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "3da60a14561e42a0abd5e52778d30ec3", + "keywords": "图算法,算法高阶,图的表示,基本的图算法", + "title": "随机生成车牌号", + "desc": [ + { + "content": "\n

某市随机生成车辆号牌的规则是:号牌字头为\"某A-\",\"某B-\"等(字母为除了C以外的A~H范围内的大写字母),字头后面由5位字符组成,第1位必须是数字;第2、3、4、5位可以是任意数字或不含字母\"O\"的大写英文字母。\n程序功能为:调用自己设计的函数license_plate(),随机生成5个车辆号牌,等待输入一个心仪号码的序号选择号牌,并将其打印输出。\n程序运行结果如下图所示:\n![图片说明](https://img-ask.csdn.net/upload/201912/08/1575761967_651946.jpg)

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "import random\ndef genrndchar(metachar):\n\treturn metachar[int(random.random() * len(metachar))]\ndef license_plate():\n\ts = \"某\"\n\ts = s + genrndchar(['A', 'B', 'C', 'D', 'E', 'H'])\n\ts = s + '-'\n\ts = s + genrndchar(['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'])\n\tfor i in range(4):\n\t\ts = s + genrndchar(['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'])\n\treturn s\nlst = []\nfor i in range(5):\n\tplate = license_plate()\n\tlst.append(plate)\n\tprint(str(i + 1) + \":\" + plate)\nx = int(input(\"请输入您心仪的号牌序号:\")) - 1\nprint(\"您选中的号牌为:\" + lst[x])", + "language": "python" + }, + "node_id": "dailycode-5e0a54189fd843a8954fa9ae5aac50a0", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600470298" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/15.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/15.exercises/config.json" new file mode 100644 index 000000000..738dcb120 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/15.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-a9142d5aeaa848daac6817cae5a08bb1", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/15.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/15.exercises/solution.json" new file mode 100644 index 000000000..1b864a384 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/15.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "17f01393a3a241609477ad9b49eae5d7", + "keywords": "算法初阶,基础知识,随机算法,概率分析和随机算法", + "title": "循环随机取数组直到得出指定数字?", + "desc": [ + { + "content": "\n举个例子:\n随机数字范围:0~100\n每组数字量:6(s1,s2,s3,s4,s5,s6)\n第二轮开始随机数字范围:新s1和新s2取值为旧s1和s2之间,新s3和新s4取值为旧s3和s4之间,新s5和新s6取值为旧s5和s6之间。\n跳出循环条件:任意数字=37\n如因s1=s2!=37&&s3=s4!=37&&s5=s6!=37使数组进入无意义无限循环,则重新取0~100六个数字并开始如上述第二轮随机的随机取值。", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "import random\ndef random_test():\n\trst_list = [random.randint(0,100) for i in range(0, 6)]\n\tprint(rst_list)\n\twhile 1:\n\t\ttemp = []\n\t\tfor k,v in enumerate(rst_list):\n\t\t\tif k%2==0:\n\t\t\t\ttemp.append(random.randint(min([rst_list[k],rst_list[k+1]]),max([rst_list[k],rst_list[k+1]])))\n\t\t\telse:\n\t\t\t\ttemp.append(random.randint(min(rst_list[k-1], rst_list[k]),max(rst_list[k-1], rst_list[k])))\n\t\trst_list = temp\n\t\tprint(rst_list)\n\t\tif 37 in rst_list:\n\t\t\tprint('rst_list:',rst_list)\n\t\t\treturn rst_list\n\t\telse:\n\t\t\tif rst_list[0]==rst_list[1] and rst_list[2]==rst_list[3] and rst_list[4]==rst_list[5]:\n\t\t\t\trst_list = [random.randint(0, 100) for i in range(0, 6)]\ndef main():\n\trandom_test()\nif __name__ == '__main__':\n\tmain()", + "language": "python" + }, + "node_id": "dailycode-a9142d5aeaa848daac6817cae5a08bb1", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600469992" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/16.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/16.exercises/config.json" new file mode 100644 index 000000000..1d677a22d --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/16.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-b3bc51803cda4223ad95594ff9597d61", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/16.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/16.exercises/solution.json" new file mode 100644 index 000000000..755d10111 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/16.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "f9b2a164ce2a4d7f8820a5d690b69389", + "keywords": "散列表,散列表,算法中阶,数据结构", + "title": "将一个列表中字典字段相同的元素合并并且值相加", + "desc": [ + { + "content": "\n如下两个列表,需要将oldList转化为newList,去掉相同字段的字典,并且去掉的参数里面的值要相加\noldList = [{'0-0': 0, '0-1': 0, '0-2': 0, '0-3': 1972},\n{'3-3': 203, '3-2': 0, '3-1': 0, '3-0': 0},\n{'0-0': 0, '0-1': 0, '0-2': 0, '0-3': 1450},\n{'3-3': 203, '3-2': 0, '3-1': 0, '3-0': 0},\n{'0-0': 0, '0-1': 0, '0-2': 0, '0-3': 1334}]\nnewList = [{'0-0': 0, '0-1': 0, '0-2': 0, '0-3': 4756},\n{'3-3': 406, '3-2': 0, '3-1': 0, '3-0': 0}]", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "import operator\noldList = [{'0-0': 0, '0-1': 0, '0-2': 0, '0-3': 1972},\n\t\t {'3-3': 203, '3-2': 0, '3-1': 0, '3-0': 0},\n\t\t {'0-0': 0, '0-1': 0, '0-2': 0, '0-3': 1450},\n\t\t {'3-3': 203, '3-2': 0, '3-1': 0, '3-0': 0},\n\t\t {'0-0': 0, '0-1': 0, '0-2': 0, '0-3': 1334}]\nnewList = []\nnewList.append(oldList[0])\nfor t in range(1,len(oldList)):\n\tfor li in newList:\n\t\tif operator.eq(li.keys(), oldList[t].keys()):\n\t\t\tfor key in li.keys():\n\t\t\t\tli[key] += oldList[t][key]\n\t\t\tbreak\n\t\telif operator.eq(li,newList[-1]):\n\t\t\tnewList.append(oldList[t])\n\t\t\tbreak\nprint(newList)", + "language": "python" + }, + "node_id": "dailycode-b3bc51803cda4223ad95594ff9597d61", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600469989" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/17.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/17.exercises/config.json" new file mode 100644 index 000000000..d88797908 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/17.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-be86731880ca4fb99657c3f64cd64235", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/17.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/17.exercises/solution.json" new file mode 100644 index 000000000..6a2748ac1 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/17.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "1cd4d9de21f34c9e921c06dc12d6fa1e", + "keywords": "算法高阶,字符串匹配,算法问题选编,利用有限自动机进行字符串匹配", + "title": "python 输出不重复的字符", + "desc": [ + { + "content": "\n

输入一个字符串,把最左边的10个不重复的字符(大小写算不同字符)挑选出来。 如不重复的字符不到10个,则按实际数目输出。\n输入格式:\n输入一个字符串s。\n输出格式:\n输出一个字符串,包含字符串s最左边10个不重复的字符。不到10个按实际输出。

\n输入样例1:

\nHello world, hello python\n

输出样例1:

\n
\nHelo wrd,h
\n

输入样例2:

\n
\nsucceed
\n

输出样例2:

\n
\nsuced
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "def unique(s):\n\tset1 = set([])\n\tout = \"\"\n\tfor i in range(len(s)):\n\t\tc = s[i]\n\t\tif c not in set1:\n\t\t\tout = out + c\n\t\t\tset1.add(c)\n\treturn out[0:10]\ndef main():\n\tstrin = \"Hello world, hello python\"\n\tret = unique(strin)\n\tprint(ret)\nif __name__ == '__main__':\n\tmain()", + "language": "python" + }, + "node_id": "dailycode-be86731880ca4fb99657c3f64cd64235", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600470410" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/18.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/18.exercises/config.json" new file mode 100644 index 000000000..cd3c72a6f --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/18.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-a348977e517f4b358abaf20c42988cbf", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/18.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/18.exercises/solution.json" new file mode 100644 index 000000000..7822849a2 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/18.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "efb125b11d0d4507b438f6441c32718a", + "keywords": "排序", + "title": "以特殊格式处理连续增加的数字", + "desc": [ + { + "content": "\n给出一串数字, 程序要把数字按照这样的格式输出,把连续增加的数字用 [x-y] 的形式表示,只显示这一组顺序数字的首位两个数字,不连续增加的数字单独列出。 例如:\n输入:1, 2, 3, 4, 5, 8, 10, 11, 12, 13, 20, 21, 22; \n输出:[1-5] [8] [10-13] [20-22]。", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "seq = list(map(int, input().split(',')))\ntmp = [seq[0]]\nall_list = []\nfor n in range(len(seq)):\n\tif n == len(seq) - 1:\n\t\tall_list.append(tmp)\n\t\tbreak\n\tif seq[n + 1] - seq[n] == 1:\n\t\ttmp.append(seq[n + 1])\n\telse:\n\t\tall_list.append(tmp)\n\t\ttmp = [seq[n + 1]]\nfor a in all_list:\n\tif len(a) > 1:\n\t\tprint('[%s-%s]' % (a[0], a[-1]))\n\telse:\n\t\tprint('[%s]' % a[0])", + "language": "python" + }, + "node_id": "dailycode-a348977e517f4b358abaf20c42988cbf", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600469994" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/19.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/19.exercises/config.json" new file mode 100644 index 000000000..b14f52271 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/19.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-495106c5ee4543a98d00295b797e3982", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/19.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/19.exercises/solution.json" new file mode 100644 index 000000000..886e9e48a --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/19.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "03803ff6da3b419e8e9b650e8635444a", + "keywords": "桶排序,算法初阶,线性时间排序,排序和顺序统计量", + "title": "冒泡排序", + "desc": [ + { + "content": "\n

用冒泡排序编写一个函数,允许接受多个数字的输入,不使用sort方法,给数字从小到大排序,最终输出从小到大的列表。

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "#!/usr/bin/python3\ndef bubbleSort(arr):\n\tn = len(arr)\n\tfor i in range(n):\n\t\tfor j in range(0, n-i-1):\n\t\t\tif arr[j] > arr[j+1] :\n\t\t\t\tarr[j], arr[j+1] = arr[j+1], arr[j]\nx=input(\"请输入数字,空格分隔:\")\nxlist=x.split(\" \")\narr = [int(xlist[i]) for i in range(len(xlist))]\nbubbleSort(arr)\nprint (\"排序后的数组:\")\nfor i in range(len(arr)):\n\tprint (\"%d\" %arr[i]),", + "language": "python" + }, + "node_id": "dailycode-495106c5ee4543a98d00295b797e3982", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600469986" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/2.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/2.exercises/config.json" new file mode 100644 index 000000000..133652fa9 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/2.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-d23a2d27d45a49b197d1cd6eea72f56a", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/2.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/2.exercises/solution.json" new file mode 100644 index 000000000..f06c81023 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/2.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "92020885fd7041279222c4dfd3ac8a17", + "keywords": "算法高阶,数论算法,算法问题选编,整数的因子分解", + "title": "计算出因子里面4和7的个数", + "desc": [ + { + "content": "\n

输入一个正数n,计算出因子里面分别有几个4和7,输出因子中4和7的个位数

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "n = int(input(\"输入数字:\"))\nfactor = [n] \nnum = 1\nwhile num <= n/2+1:\n\tif n % num == 0:\n\t\tfactor.append(num)\n\tnum = num + 1\nprint(factor)\nm = [str(i) for i in factor]\ncount4 = 0\ncount7 = 0\nfor i in m:\n\tif '4' in i:\n\t\tcount4 += 1\n\t\tprint('以4结尾的因子的个位数:', int(i)%10)\n\tif '7' in i:\n\t\tcount7 += 1\n\t\tprint('以7结尾的因子的个位数:', int(i)%10)\nprint('因子里面分别有{0}个4和{1}个7'.format(count4,count7))", + "language": "python" + }, + "node_id": "dailycode-d23a2d27d45a49b197d1cd6eea72f56a", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600470505" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/20.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/20.exercises/config.json" new file mode 100644 index 000000000..22475bfdb --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/20.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-654c59b4c5de4a82af30051c65b06181", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/20.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/20.exercises/solution.json" new file mode 100644 index 000000000..c4be849c1 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/20.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "aa3c40dc84814f449fdc18c66141d8a4", + "keywords": "算法高阶,字符串匹配,算法问题选编,利用有限自动机进行字符串匹配", + "title": "字符串统计", + "desc": [ + { + "content": "\n

从键盘输入一个包含有英文字母、数字、空格和其它字符的字符串,并分别实现下面的功能:统计字符串中出现2次的英文字母(区分大小写)\n统计字符串中出现n次的数字,n从键盘输入

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "#第一题\ns=input('input a string:\\n')\ndict1={}\nfor c in s:\n\tif c.isalpha():\n\t\tif c not in dict1.keys():\n\t\t\tdict1[c] = 1\n\t\telse:\n\t\t\tdict1[c] += 1\nfor key in dict1.keys():\n\tif dict1[key]==2:\n\t\tprint(key)\n#第二题\ns=input('input a string:\\n')\nn=int(input('input a n:\\n'))\ndict2={}\nfor c in s:\n\tif c.isdigit():\n\t\tif c not in dict2.keys():\n\t\t\tdict2[c] = 1\n\t\telse:\n\t\t\tdict2[c] += 1\nfor key in dict2.keys():\n\tif dict2[key]==n:\n\t\tprint(key)", + "language": "python" + }, + "node_id": "dailycode-654c59b4c5de4a82af30051c65b06181", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600470406" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/21.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/21.exercises/config.json" new file mode 100644 index 000000000..01ab884c8 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/21.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-1dc9532947e14e2aaa9274f1ba3e093e", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/21.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/21.exercises/solution.json" new file mode 100644 index 000000000..dc44b7901 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/21.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "0a8280c70cfd4d1da288432aa3ef5f8e", + "keywords": "散列表,散列表,算法中阶,数据结构", + "title": "根据指定值从一个列表中查找所有匹配元素的位置,要求使用列表中的index方法进行查找。", + "desc": [ + { + "content": "\n

题目内容:\n编写程序实现以下功能:根据指定值从一个列表中查找所有匹配元素的位置,要求使用列表中的index方法进行查找。\n输入格式:\n先输入待查找元素的值。\n再输入一个整数,表示列表中的元素个数。\n最后依次输入列表中的元素。\n输出格式:\n输出一个列表,各元素值为匹配元素的位置。如果没有匹配元素,则输出一个空列表。\n输入样例:\n10\n5\n5\n10\n15\n10\n20\n输出样例:\n[1, 3]\n输入样例:\n30\n5\n5\n10\n15\n10\n20\n输出样例:\n[]

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "check = input()\nnum = int(input())\nlist1 = []\nfor i in range(num):\n\tx = input()\n\tlist1.append(x)\nindices = []\nstart = 0\nwhile 1:\n\ttry:\n\t\tx = list1.index(check,start)\n\t\tindices.append(x)\n\t\tstart = x+1\n\texcept:\n\t\tbreak\nprint(indices)", + "language": "python" + }, + "node_id": "dailycode-1dc9532947e14e2aaa9274f1ba3e093e", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600469987" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/22.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/22.exercises/config.json" new file mode 100644 index 000000000..a3d995cb1 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/22.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-bb13d528854f425581da02db1f7f053b", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/22.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/22.exercises/solution.json" new file mode 100644 index 000000000..8514f9107 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/22.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "3409457ad91d4b4e96d77dfef1cc52cc", + "keywords": "图算法,算法高阶,最小生成树,最小生成树的形成", + "title": "生成100个2位随机正整数", + "desc": [ + { + "content": "\n

生成100个2位随机正整数,按每行十个输出,并求出个位数字分别为0,1,2,3,4,5,6,7,8,9的正整数的个数

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "import random\ndef fun():\n\trandom_list = [random.randint(10, 99) for n in range(100)]\n\tstatistics = {n: 0 for n in range(10)}\n\tfor index, x in enumerate(random_list):\n\t\tprint(x, end=' ')\n\t\tstatistics[int(x % 10)] = statistics[int(x % 10)] + 1\n\t\tif ((index + 1) % 10 == 0):\n\t\t\tprint()\n\tprint(statistics)\nif __name__ == '__main__':\n\tfun()", + "language": "python" + }, + "node_id": "dailycode-bb13d528854f425581da02db1f7f053b", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600470401" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/23.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/23.exercises/config.json" new file mode 100644 index 000000000..b4a04131b --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/23.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-45221df1b0024a78bfef72b49e99492c", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/23.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/23.exercises/solution.json" new file mode 100644 index 000000000..9ee9ee965 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/23.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "5a97ea92895d4fdda13359eeae09f284", + "keywords": "算法高阶,字符串匹配,算法问题选编,利用有限自动机进行字符串匹配", + "title": "任意多行字符串拆分数值求和", + "desc": [ + { + "content": "\n

编写程序,统计每行字符串中若干整数的和。每行字符串中整数间的分隔符可能有逗号“,”、分号“ ;”和空格,有多少行就求多少行。\n输入格式:\n任意输入若干行由整数构成的字符串(回车换行),整数间以逗号或空格或分号分隔。测试数确保至少有一行数据,字符串中的整数数据均合法有效。最后以一个回车结束输入。\n输出格式:\n对应输出原输入串(一行中的字符序列),冒号后输出各个整数之和。\n

输入样例:

\n
\n1; 2 ,3\n2 3; 4\n10,20 30; 40\n9
\n

输出样例:

\n
\n1; 2 ,3:6\n2 3; 4:9\n10,20 30; 40:100
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "stopword = '' \ns = ''\nprint('请输入内容,输入空行回车结束输入:')\nfor line in iter(input, stopword):\n\ts = s + line + \"\\n\"\nprint(s)\nl = s.splitlines()\nfor num in range(0, len(l)):\n\tone = l[num].replace(',', ' ').replace(';', ' ').split()\n\tonesum = 0\n\tfor i in range(0, len(one)):\n\t\tonesum = onesum + int(one[i])\n\tprint(l[num] + \":\" + str(onesum))", + "language": "python" + }, + "node_id": "dailycode-45221df1b0024a78bfef72b49e99492c", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600470501" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/24.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/24.exercises/config.json" new file mode 100644 index 000000000..e972e32e6 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/24.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-6a1541c03bbf441a9f896331a5d4cba1", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/24.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/24.exercises/solution.json" new file mode 100644 index 000000000..2ca90dae4 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/24.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "53be93ad31624900a621d8a1980e3d15", + "keywords": "猜大小", + "title": "python 编程 猜数字", + "desc": [ + { + "content": "\n

游戏(猜数字):随机生成一个数字(取值范围[1,100])。让用户猜数字,并给出相应的提示:\n如果用户输入比答案大,提示‘Too big, try again’;\n反之,提示‘Too small, try again’;\n如果猜中了,提示‘Congratulations!’。\n最后,要给出反馈(答案,猜的次数,猜的历史)。\n

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "import random\nv=random.randint(1,100)\ncount=0\nhis=[]\nwhile 1:\n\tvi=input(\"输入猜测值:\")\n\tcount+=1\n\this.append(vi)\n\tif int(vi)>v:\n\t\tprint(\"Too big,try again\")\n\tif int(vi)编写Python程序实现素数处理的功能,要求如下:

(1)从键盘输入一个整数X,编写一个函数Find(x=100),找出1—X之间的所有的素数(即质数),并将这些素数按照升序存放在列表 prime_list []中。

(2)在程序中编写一个函数delete_seven( prime_list),将 prime_list []中个位含有7的素数删除;

【程序要求:】

(1)有引导用户键盘输入的提示信息,言语要恰当;

(2)函数Find(x=100)实现要正确,实现列表 prime_list []中查询到的素数的输出;

(3)函数delete_seven( prime_list)实现正确,输出删除指定素数后的相关数据信息。

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "def find(x=100):\n\tpl = []\n\tfor m in range(2,x+1):\n\t\tfor k in pl:\n\t\t\tif m % k == 0:\n\t\t\t\tbreak\n\t\telse:\n\t\t\tpl.append(m)\n\treturn pl\ndef delete_seven(pl):\n\treturn [x for x in pl if x%10!=7]\nx = int(input('输入一个整数:'))\nprime_list = find(x)\nprint(prime_list)\nprint(delete_seven(prime_list))", + "language": "python" + }, + "node_id": "dailycode-5d456f7d55404cf799b24bcc882a1553", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600470199" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/26.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/26.exercises/config.json" new file mode 100644 index 000000000..8dac83487 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/26.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-309fe024bfc848f0b91a68fe6b953057", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/26.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/26.exercises/solution.json" new file mode 100644 index 000000000..201e7e6da --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/26.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "f735d40d184d4dc0a216d0365dca8e0e", + "keywords": "图算法,算法高阶,最小生成树,最小生成树的形成", + "title": "新浪微博热门话题", + "desc": [ + { + "content": "\n

新浪微博可以在发言中嵌入“话题”,即将发言中的话题文字写在一对“#”之间,就可以生成话题链接,点击链接可以看到有多少人在跟自己讨论相同或者相似的话题。新浪微博还会随时更新热门话题列表,并将最热门的话题放在醒目的位置推荐大家关注。\n本题目要求实现一个简化的热门话题推荐功能,从大量英文(因为中文分词处理比较麻烦)微博中解析出话题,找出被最多条微博提到的话题。\n输入格式:\n输入说明:输入首先给出一个正整数N(≤10​5​​),随后N行,每行给出一条英文微博,其长度不超过140个字符。任何包含在一对最近的#中的内容均被认为是一个话题,输入保证#成对出现。\n输出格式:\n第一行输出被最多条微博提到的话题,第二行输出其被提到的微博条数。如果这样的话题不唯一,则输出按字母序最小的话题,并在第三行输出And k more ...,其中k是另外几条热门话题的条数。输入保证至少存在一条话题。\n注意:两条话题被认为是相同的,如果在去掉所有非英文字母和数字的符号、并忽略大小写区别后,它们是相同的字符串;同时它们有完全相同的分词。输出时除首字母大写外,只保留小写英文字母和数字,并用一个空格分隔原文中的单词。\n输入样例:\n4\nThis is a #test of topic#.\nAnother #Test of topic.#\nThis is a #Hot# #Hot# topic\nAnother #hot!# #Hot# topic\n输出样例:\nHot\n2\nAnd 1 more

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "import re\na = int(input('输入微博数量(小于等于105的正整数):'))\nb = []\nc = []\nwhile len(b)随机生成一个具有 20 个元素的元素值在 1-10 之间的列表,输出连续最长数的个数。

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "import random\na = [random.randint(1,10) for i in range(20)]\nprint(a)\nl = rl = 1\nn = rn = a[0]\nfor v in a[1:]:\n\tif v==n:\n\t\tl += 1\n\t\tif l>rl:\n\t\t\trl = l\n\t\t\trn = v\n\telse:\n\t\tl = 1\n\t\tn = v\nprint(f'连续最长的数是{rn},连续了{rl}次')", + "language": "python" + }, + "node_id": "dailycode-286abc7bb8fd4a43bba78b881258b513", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600469892" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/28.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/28.exercises/config.json" new file mode 100644 index 000000000..67aae564c --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/28.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-9beb2eba588841a6b73e635b2c9fad46", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/28.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/28.exercises/solution.json" new file mode 100644 index 000000000..e197bddb8 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/28.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "30270280c9354fe1b8a8eb60e6da45d0", + "keywords": "算法中阶,贪心算法,活动选择问题,高级设计和分析技术", + "title": "用Python来创造一个提示用户输入数字的乘法表?", + "desc": [ + { + "content": "\n

如果用户选择菜单选项1,提示用户输入1到10之间的整数,并打印一个乘法表,显示整数1与输入整数相乘的结果,如下面的示例所示。注意:不需要检查输入的数字是否在1到10之间。如果用户选择菜单选项2,退出程序。如果用户在菜单选择中输入了1或2以外的任何内容,输出信息“菜单选择错误,请重试并继续程序。”\n结果应该如下:\n1)创建乘法表\n2)退出程序\n请从以上菜单中选择一个选项:1\n输入一个介于1到10之间的整数:3

\n

1  2  3 

\n

2  4  6 

\n

3  6  9 

\n

 \n1)创建乘法表\n2)退出程序\n请从以上菜单中选择一个选项:4\n菜单选择错误,请重试\n1)创建乘法表\n2)退出程序\n请从以上菜单中选择一个选项:2\n谢谢你使用乘法表\n

\n

 

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "while True:\n\tprint('1)创建乘法表')\n\tprint('2)退出程序')\n\tn = input('请从以上菜单中选择一个选项:').strip()\n\tif n=='1':\n\t\tx = int(input('输入一个介于1到10之间的整数:'))\n\t\tfor i in range(1,x+1):\n\t\t\tfor j in range(1,x+1):\n\t\t\t\tprint(\"{:>4}\".format(i*j),end=\"\")\n\t\t\tprint()\n\telif n=='2':\n\t\tprint('谢谢你使用乘法表')\n\t\tbreak\n\telse:\n\t\tprint('菜单选择错误,请重试')\n\tprint('-----------------------------')", + "language": "python" + }, + "node_id": "dailycode-9beb2eba588841a6b73e635b2c9fad46", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600469886" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/29.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/29.exercises/config.json" new file mode 100644 index 000000000..f5f324505 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/29.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-899d89e48f1148048fa4618b855c92cc", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/29.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/29.exercises/solution.json" new file mode 100644 index 000000000..9b47cb6e9 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/29.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "74c9a9ce0e374c2583088e960f41214d", + "keywords": "递归,链表", + "title": "合并两个有序链表", + "desc": [ + { + "content": "\n

将两个升序链表合并为一个新的 升序 链表并返回。新链表是通过拼接给定的两个链表的所有节点组成的。 

 

示例 1:

\"\"
输入:l1 = [1,2,4], l2 = [1,3,4]
输出:
[1,1,2,3,4,4]

示例 2:

输入:l1 = [], l2 = []
输出:
[]

示例 3:

输入:l1 = [], l2 = [0]
输出:
[0]

 

提示:

    \t
  • 两个链表的节点数目范围是 [0, 50]
  • \t
  • -100 <= Node.val <= 100
  • \t
  • l1l2 均按 非递减顺序 排列
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class ListNode:\n\tdef __init__(self, val=0, next=None):\n\t\tself.val = val\n\t\tself.next = next\nclass LinkList:\n\tdef __init__(self):\n\t\tself.head=None\n\tdef initList(self, data):\n\t\tself.head = ListNode(data[0])\n\t\tr=self.head\n\t\tp = self.head\n\t\tfor i in data[1:]:\n\t\t\tnode = ListNode(i)\n\t\t\tp.next = node\n\t\t\tp = p.next\n\t\treturn r\n\tdef\tconvert_list(self,head):\n\t\tret = []\n\t\tif head == None:\n\t\t\treturn\n\t\tnode = head\n\t\twhile node != None:\n\t\t\tret.append(node.val)\n\t\t\tnode = node.next\n\t\treturn ret\nclass Solution:\n\tdef mergeTwoLists(self, l1: ListNode, l2: ListNode) -> ListNode:\n\t\th = ListNode(0, None)\n\t\tp = h\n\t\twhile l1 and l2:\n\t\t\tif l1.val < l2.val:\n\t\t\t\tp.next = l1\n\t\t\t\tp = l1\n\t\t\t\tl1 = l1.next\n\t\t\telse:\n\t\t\t\tp.next = l2\n\t\t\t\tp = l2\n\t\t\t\tl2 = l2.next\n\t\tif l1:\n\t\t\tp.next = l1\n\t\telse:\n\t\t\tp.next = l2\n\t\treturn h.next\n# %%\nl = LinkList()\nlist1 = [1,2,4]\nlist2 = [1,3,4]\nl1 = l.initList(list1)\nl2 = l.initList(list2)\ns = Solution()\nprint(l.convert_list(s.mergeTwoLists(l1, l2)))", + "language": "python" + }, + "node_id": "dailycode-899d89e48f1148048fa4618b855c92cc", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600469819" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/3.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/3.exercises/config.json" new file mode 100644 index 000000000..b1a2fb0bd --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/3.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-6d903ddd2bbf4473b7d0e9d6c0b0c2c8", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/3.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/3.exercises/solution.json" new file mode 100644 index 000000000..40089d4df --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/3.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "ceb695b85bf048399856af31d1c47871", + "keywords": "图算法,算法高阶,最小生成树,最小生成树的形成", + "title": "python 编写函数计算圆周率", + "desc": [ + { + "content": "\n

计算圆周率。存在圆心在直角坐标系原点且半径为 1 的圆及其外切正方形。为计算方便,仅考虑位于第一象限的四分之一正方形和四分之一圆。随机生成该四分之一正方形中一系列点,散布于四分之一圆内比例即为圆周率四分之一。散步点越多,结果越精确,耗时也越长。

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "from random import random\nfrom math import sqrt\nN=eval(input(\"请输入次数:\"))\nK=0 \nfor i in range(1,N+1):\n\tx,y=random(),random()\n\tdist =sqrt(x**2+y**2)\n\tif dist<=1.0:\n\t\tK=K+1\npi=4*(K/N)\t\nprint(\"圆周率值:{}\".format(pi))", + "language": "python" + }, + "node_id": "dailycode-6d903ddd2bbf4473b7d0e9d6c0b0c2c8", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600469893" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/30.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/30.exercises/config.json" new file mode 100644 index 000000000..2e52d17dd --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/30.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-4047f84489c9453eb082e3e15cf6ad39", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/30.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/30.exercises/solution.json" new file mode 100644 index 000000000..c77a66157 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/30.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "5bac8a7cc669449f8c4f98f86335f84e", + "keywords": "字符串", + "title": "最后一个单词的长度", + "desc": [ + { + "content": "\n

给你一个字符串 s,由若干单词组成,单词之间用空格隔开。返回字符串中最后一个单词的长度。如果不存在最后一个单词,请返回 0 。

单词 是指仅由字母组成、不包含任何空格字符的最大子字符串。

 

示例 1:

输入:s = \"Hello World\"
输出:
5

示例 2:

输入:s = \" \"
输出:
0

 

提示:

    \t
  • 1 <= s.length <= 104
  • \t
  • s 仅有英文字母和空格 ' ' 组成
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution(object):\n\tdef lengthOfLastWord(self, s):\n\t\t\"\"\"\n\t\t:type s: str\n\t\t:rtype: int\n\t\t\"\"\"\n\t\tif len(s) == 0:\n\t\t\treturn 0\n\t\ttemp = s.split(' ')\n\t\ttemp = [t for t in temp if len(t) > 0]\n\t\tif len(temp) == 0:\n\t\t\treturn 0\n\t\telse:\n\t\t\treturn len(temp[-1])\n# %%\ns = Solution()\nprint(s.lengthOfLastWord(s = \"Hello World\"))", + "language": "python" + }, + "node_id": "dailycode-4047f84489c9453eb082e3e15cf6ad39", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600470793" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/31.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/31.exercises/config.json" new file mode 100644 index 000000000..322e97caa --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/31.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-45ad704b5bf2410f91065df96249a035", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/31.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/31.exercises/solution.json" new file mode 100644 index 000000000..3b8df0483 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/31.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "2a8059789b8a4bb6b8ddcff5c8a39778", + "keywords": "链表", + "title": "删除排序链表中的重复元素", + "desc": [ + { + "content": "\n

存在一个按升序排列的链表,给你这个链表的头节点 head ,请你删除所有重复的元素,使每个元素 只出现一次

返回同样按升序排列的结果链表。

 

示例 1:

\"\"
输入:head = [1,1,2]
输出:
[1,2]

示例 2:

\"\"
输入:head = [1,1,2,3,3]
输出:
[1,2,3]

 

提示:

    \t
  • 链表中节点数目在范围 [0, 300]
  • \t
  • -100 <= Node.val <= 100
  • \t
  • 题目数据保证链表已经按升序排列
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class ListNode(object):\n\tdef __init__(self, x):\n\t\tself.val = x\n\t\tself.next = None\nclass LinkList:\n\tdef __init__(self):\n\t\tself.head=None\n\tdef initList(self, data):\n\t\tself.head = ListNode(data[0])\n\t\tr=self.head\n\t\tp = self.head\n\t\tfor i in data[1:]:\n\t\t\tnode = ListNode(i)\n\t\t\tp.next = node\n\t\t\tp = p.next\n\t\treturn r\n\tdef\tconvert_list(self,head):\n\t\tret = []\n\t\tif head == None:\n\t\t\treturn\n\t\tnode = head\n\t\twhile node != None:\n\t\t\tret.append(node.val)\n\t\t\tnode = node.next\n\t\treturn ret\nclass Solution(object):\n\tdef deleteDuplicates(self, head):\n\t\tif head is None:\n\t\t\treturn None\n\t\tpos = head\n\t\twhile pos is not None and pos.next is not None:\n\t\t\tif pos.val == pos.next.val:\n\t\t\t\tpos.next = pos.next.next\n\t\t\telse:\n\t\t\t\tpos = pos.next\n\t\treturn head\n# %%\nl = LinkList()\nlist1 = [1,1,2]\nl1 = l.initList(list1)\ns = Solution()\nprint(l.convert_list(s.deleteDuplicates(l1)))", + "language": "python" + }, + "node_id": "dailycode-45ad704b5bf2410f91065df96249a035", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600470129" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/32.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/32.exercises/config.json" new file mode 100644 index 000000000..629c07c49 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/32.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-cc53b8c00c3b47e49acec679ed77a9a8", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/32.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/32.exercises/solution.json" new file mode 100644 index 000000000..63d97f7cd --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/32.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "a29d470cdea24c7ab191ffe82e9aacf6", + "keywords": "数学", + "title": "整数反转", + "desc": [ + { + "content": "\n

给你一个 32 位的有符号整数 x ,返回将 x 中的数字部分反转后的结果。

如果反转后整数超过 32 位的有符号整数的范围 [−231,  231 − 1] ,就返回 0。

假设环境不允许存储 64 位整数(有符号或无符号)。

 

示例 1:

输入:x = 123
输出:
321

示例 2:

输入:x = -123
输出:
-321

示例 3:

输入:x = 120
输出:
21

示例 4:

输入:x = 0
输出:
0

 

提示:

    \t
  • -231 <= x <= 231 - 1
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "import math\nclass Solution:\n\tdef reverse(self, x: int) -> int:\n\t\tr = 0\n\t\ty = 0\n\t\tabs_x = abs(x)\n\t\tnegative = x < 0\n\t\twhile abs_x != 0:\n\t\t\tr = abs_x % 10\n\t\t\ty = y*10+r\n\t\t\tabs_x = int(math.floor(abs_x/10))\n\t\tif negative:\n\t\t\ty = -y\n\t\treturn 0 if (y > 2147483647 or y < -2147483648) else y\n# %%\ns = Solution()\nprint(s.reverse(x = 123))\nprint(s.reverse(x = -123))", + "language": "python" + }, + "node_id": "dailycode-cc53b8c00c3b47e49acec679ed77a9a8", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600469815" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/33.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/33.exercises/config.json" new file mode 100644 index 000000000..f93777e54 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/33.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-cd394beaa1464dbbac796050086c3f6c", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/33.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/33.exercises/solution.json" new file mode 100644 index 000000000..2d72e80e1 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/33.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "f63bd834c1f340dba184219bdb307d37", + "keywords": "树,深度优先搜索,广度优先搜索,二叉树", + "title": "相同的树", + "desc": [ + { + "content": "\n

给你两棵二叉树的根节点 pq ,编写一个函数来检验这两棵树是否相同。

如果两个树在结构上相同,并且节点具有相同的值,则认为它们是相同的。

 

示例 1:

\"\"
输入:p = [1,2,3], q = [1,2,3]
输出:
true

示例 2:

\"\"
输入:p = [1,2], q = [1,null,2]
输出:
false

示例 3:

\"\"
输入:p = [1,2,1], q = [1,1,2]
输出:
false

 

提示:

    \t
  • 两棵树上的节点数目都在范围 [0, 100]
  • \t
  • -104 <= Node.val <= 104
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class TreeNode(object):\n\tdef __init__(self, x):\n\t\tself.val = x\n\t\tself.left = None\n\t\tself.right = None\nclass Solution(object):\n\tdef isSameTree(self, p, q):\n\t\t\"\"\"\n\t\t:type p: TreeNode\n\t\t:type q: TreeNode\n\t\t:rtype: bool\n\t\t\"\"\"\n\t\tif p == q:\n\t\t\treturn True\n\t\ttry:\n\t\t\tleft = right = True\n\t\t\tif p.val == q.val:\n\t\t\t\tleft = self.isSameTree(p.left, q.left)\n\t\t\t\tright = self.isSameTree(p.right, q.right)\n\t\t\t\treturn (left and right)\n\t\texcept:\n\t\t\treturn False\n\t\treturn False\n# %%\ns = Solution()\nprint(s.isSameTree(p = [1,2,3], q = [1,2,3]))", + "language": "python" + }, + "node_id": "dailycode-cd394beaa1464dbbac796050086c3f6c", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600469927" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/34.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/34.exercises/config.json" new file mode 100644 index 000000000..321fa8311 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/34.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-dd6c58cbe89a48799101af843c45a7c4", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/34.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/34.exercises/solution.json" new file mode 100644 index 000000000..c3e2339b4 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/34.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "03338ca436f84699997212fdeadd9f63", + "keywords": "数组,哈希表", + "title": "两数之和", + "desc": [ + { + "content": "\n

给定一个整数数组 nums 和一个整数目标值 target,请你在该数组中找出 和为目标值 的那 两个 整数,并返回它们的数组下标。

你可以假设每种输入只会对应一个答案。但是,数组中同一个元素在答案里不能重复出现。

你可以按任意顺序返回答案。

 

示例 1:

输入:nums = [2,7,11,15], target = 9
输出:
[0,1]
解释:
因为 nums[0] + nums[1] == 9 ,返回 [0, 1] 。

示例 2:

输入:nums = [3,2,4], target = 6
输出:
[1,2]

示例 3:

输入:nums = [3,3], target = 6
输出:
[0,1]

 

提示:

    \t
  • 2 <= nums.length <= 103
  • \t
  • -109 <= nums[i] <= 109
  • \t
  • -109 <= target <= 109
  • \t
  • 只会存在一个有效答案
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "def twoSum(nums, target):\n\tcache = {}\n\ti = 0\n\twhile i < len(nums):\n\t\tright = target-nums[i]\n\t\tif cache.get(right) is not None:\n\t\t\treturn [cache[right], i]\n\t\telse:\n\t\t\tcache[nums[i]] = i\n\t\ti += 1\n\treturn [] \n# %%\nprint(twoSum([2,7,11,15], 9))\nprint(twoSum([3,2,4], 6))", + "language": "python" + }, + "node_id": "dailycode-dd6c58cbe89a48799101af843c45a7c4", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600470217" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/35.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/35.exercises/config.json" new file mode 100644 index 000000000..06c2e68a0 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/35.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-f46ab61031ab4af6926cc6db067d1b78", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/35.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/35.exercises/solution.json" new file mode 100644 index 000000000..1956c3f0f --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/35.exercises/solution.json" @@ -0,0 +1,116 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "af25ce9a4f4c425b8c900b3345aef661", + "keywords": "数组,双指针", + "title": "移除元素", + "desc": [ + { + "content": "\n
\n

给你一个数组 nums 和一个值 val,你需要 原地\n移除所有数值等于 val 的元素,并返回移除后数组的新长度。

", + "language": "markdown" + }, + { + "content": "\n

不要使用额外的数组空间,你必须仅使用 O(1) 额外空间并 原地 修改输入数组

", + "language": "markdown" + }, + { + "content": "\n

元素的顺序可以改变。你不需要考虑数组中超出新长度后面的元素。

", + "language": "markdown" + }, + { + "content": "\n

 

", + "language": "markdown" + }, + { + "content": "\n

说明:

", + "language": "markdown" + }, + { + "content": "\n

为什么返回数值是整数,但输出的答案是数组呢?

", + "language": "markdown" + }, + { + "content": "\n

请注意,输入数组是以「引用」方式传递的,这意味着在函数里修改输入数组对于调用者是可见的。

", + "language": "markdown" + }, + { + "content": "\n

你可以想象内部操作如下:

", + "language": "markdown" + }, + { + "content": "\n
// nums 是以“引用”方式传递的。也就是说,不对实参作任何拷贝\nint len = removeElement(nums, val);",
+      "language": "markdown"
+    },
+    {
+      "content": "\n// 在函数里修改输入数组对于调用者是可见的。\n// 根据你的函数返回的长度, 它会打印出数组中 该长度范围内 的所有元素。\nfor (int i = 0; i < len; i++) {\n    print(nums[i]);\n}\n
", + "language": "markdown" + }, + { + "content": "\n

 

", + "language": "markdown" + }, + { + "content": "\n

示例 1:

", + "language": "markdown" + }, + { + "content": "\n
输入:nums = [3,2,2,3], val = 3\n
输出:
2, nums = [2,2]\n
解释:
函数应该返回新的长度 2, 并且 nums 中的前两个元素均为 2。你不需要考虑数组中超出新长度后面的元素。例如,函数返回的新长度为 2 ,而 nums = [2,2,3,3] 或 nums = [2,2,0,0],也会被视作正确答案。\n
", + "language": "markdown" + }, + { + "content": "\n

示例 2:

", + "language": "markdown" + }, + { + "content": "\n
输入:nums = [0,1,2,2,3,0,4,2], val = 2\n
输出:
5, nums = [0,1,4,0,3]\n
解释:
函数应该返回新的长度 5, 并且 nums 中的前五个元素为 0, 1, 3, 0, 4。注意这五个元素可为任意顺序。你不需要考虑数组中超出新长度后面的元素。\n
", + "language": "markdown" + }, + { + "content": "\n

 

", + "language": "markdown" + }, + { + "content": "\n

提示:

", + "language": "markdown" + }, + { + "content": "\n
    \n
  • 0 <= nums.length <= 100
  • \n
  • 0 <= nums[i] <= 50
  • \n
  • 0 <= val <= 100
  • \n
\n
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution(object):\n\tdef removeElement(self, nums, val):\n\t\tls = len(nums)\n\t\tif ls == 0:\n\t\t\treturn ls\n\t\tcount = 0\n\t\tindex = 0\n\t\twhile index < ls - count:\n\t\t\tif nums[index] == val:\n\t\t\t\tnums[index] = nums[ls - 1 - count]\n\t\t\t\tcount += 1\n\t\t\telse:\n\t\t\t\tindex += 1\n\t\treturn ls - count\nif __name__ == '__main__':\n\ts = Solution()\n\tprint(s.removeElement([3,2,2,3], 3))", + "language": "python" + }, + "node_id": "dailycode-f46ab61031ab4af6926cc6db067d1b78", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600470219" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/36.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/36.exercises/config.json" new file mode 100644 index 000000000..05107d6d0 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/36.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-bb67ad165b7640ba9bc5888f3d4a2647", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/36.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/36.exercises/solution.json" new file mode 100644 index 000000000..ef575f582 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/36.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "b86b5967c10d40aa825dc4a9c1624d9c", + "keywords": "位运算,数学,字符串,模拟", + "title": "二进制求和", + "desc": [ + { + "content": "\n

给你两个二进制字符串,返回它们的和(用二进制表示)。

输入为 非空 字符串且只包含数字 1 和 0

 

示例 1:

输入: a = "11", b = "1"
输出:
"100"

示例 2:

输入: a = "1010", b = "1011"
输出:
"10101"

 

提示:

    \t
  • 每个字符串仅由字符 '0''1' 组成。
  • \t
  • 1 <= a.length, b.length <= 10^4
  • \t
  • 字符串如果不是 "0" ,就都不含前导零。
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution(object):\n\tdef addBinary(self, a, b):\n\t\tres = ''\n\t\tlsa, lsb = len(a), len(b)\n\t\tpos, plus, curr = -1, 0, 0\n\t\twhile (lsa + pos) >= 0 or (lsb + pos) >= 0:\n\t\t\tif (lsa + pos) >= 0:\n\t\t\t\tcurr += int(a[pos])\n\t\t\tif (lsb + pos) >= 0:\n\t\t\t\tcurr += int(b[pos])\n\t\t\tres = str(curr % 2) + res\n\t\t\tcurr //= 2\n\t\t\tpos -= 1\n\t\tif curr == 1:\n\t\t\tres = '1' + res\n\t\treturn res\n# %%\ns = Solution()\nprint(s.addBinary(a = \"1010\", b = \"1011\"))", + "language": "python" + }, + "node_id": "dailycode-bb67ad165b7640ba9bc5888f3d4a2647", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600471009" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/37.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/37.exercises/config.json" new file mode 100644 index 000000000..2db5131ac --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/37.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-8d314c28e1e44f6e8b8c85d1ddc064fb", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/37.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/37.exercises/solution.json" new file mode 100644 index 000000000..417be9689 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/37.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "1f488d8bd1d2415e8e24ede9f742f962", + "keywords": "栈,树,深度优先搜索,二叉树", + "title": "二叉树的中序遍历", + "desc": [ + { + "content": "\n

给定一个二叉树的根节点 root ,返回它的 中序 遍历。

 

示例 1:

\"\"
输入:root = [1,null,2,3]
输出:
[1,3,2]

示例 2:

输入:root = []
输出:
[]

示例 3:

输入:root = [1]
输出:
[1]

示例 4:

\"\"
输入:root = [1,2]
输出:
[2,1]

示例 5:

\"\"
输入:root = [1,null,2]
输出:
[1,2]

 

提示:

    \t
  • 树中节点数目在范围 [0, 100]
  • \t
  • -100 <= Node.val <= 100

 

进阶: 递归算法很简单,你可以通过迭代算法完成吗?

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class TreeNode(object):\n\tdef __init__(self, x):\n\t\tself.val = x\n\t\tself.left = None\n\t\tself.right = None\nclass List2Tree(object):\n\tdef __init__(self, nums: list):\n\t\tself.nums = nums\n\t\tself.queue = []\n\t\tif len(nums) == 1:\n\t\t\tself.root = TreeNode(self.nums.pop(0))\n\t\telse:\n\t\t\ta = self.nums.pop(0)\n\t\t\tb = self.nums.pop(0)\n\t\t\tc = self.nums.pop(0)\n\t\t\tself.root = TreeNode(a)\n\t\t\tif b is not None:\n\t\t\t\tself.root.left = TreeNode(b)\n\t\t\telse:\n\t\t\t\tself.root.left = b\n\t\t\tif c is not None:\n\t\t\t\tself.root.right = TreeNode(c)\n\t\t\telse:\n\t\t\t\tself.root.right = c\n\t\t\tself.queue.append(self.root.left)\n\t\t\tself.queue.append(self.root.right)\n\tdef convert(self):\n\t\twhile len(self.nums) > 0 and len(self.queue)> 0:\n\t\t\tnode = self.queue.pop(0)\n\t\t\tif node is not None:\n\t\t\t\tnum= self.nums.pop(0)\n\t\t\t\tif num is not None:\n\t\t\t\t\tnode.left = TreeNode(num)\n\t\t\t\telse:\n\t\t\t\t\tnode.left = num\n\t\t\t\tif len(self.nums) > 0:\n\t\t\t\t\tnum = self.nums.pop(0)\n\t\t\t\telse:\n\t\t\t\t\tnum = None\n\t\t\t\tif num is not None:\n\t\t\t\t\tnode.right = TreeNode(num)\n\t\t\t\telse:\n\t\t\t\t\tnode.right = num\n\t\t\t\tself.queue.append(node.left)\n\t\t\t\tself.queue.append(node.right)\n\t\treturn self.root\nclass Solution(object):\n\tdef inorderTraversal(self, root):\n\t\tif root is None:\n\t\t\treturn []\n\t\troot = List2Tree(root).convert()\n\t\tres = []\n\t\tstack = [root]\n\t\twhile len(stack) > 0:\n\t\t\tcurr = stack.pop()\n\t\t\tif not isinstance(curr, TreeNode):\n\t\t\t\tres.append(curr)\n\t\t\t\tcontinue\n\t\t\tif curr.right is not None:\n\t\t\t\tstack.append(curr.right)\n\t\t\tstack.append(curr.val)\n\t\t\tif curr.left is not None:\n\t\t\t\tstack.append(curr.left)\n\t\treturn res\n# %%\ns = Solution()\nprint(s.inorderTraversal(root = [1,None,2,3]))", + "language": "python" + }, + "node_id": "dailycode-8d314c28e1e44f6e8b8c85d1ddc064fb", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600471010" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/38.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/38.exercises/config.json" new file mode 100644 index 000000000..45fd293aa --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/38.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-40b9002d2beb42aeabf9947bc8af5932", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/38.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/38.exercises/solution.json" new file mode 100644 index 000000000..51d2ef28f --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/38.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "0a12ae6577704d18b37db6956fe16aa8", + "keywords": "记忆化搜索,数学,动态规划", + "title": "爬楼梯", + "desc": [ + { + "content": "\n

假设你正在爬楼梯。需要 n 阶你才能到达楼顶。

每次你可以爬 1 或 2 个台阶。你有多少种不同的方法可以爬到楼顶呢?

注意:给定 n 是一个正整数。

示例 1:

输入: 2
输出:
2
解释:
有两种方法可以爬到楼顶。1. 1 阶 + 1 阶2. 2 阶

示例 2:

输入: 3
输出:
3
解释:
有三种方法可以爬到楼顶。1. 1 阶 + 1 阶 + 1 阶2. 1 阶 + 2 阶3. 2 阶 + 1 阶
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution(object):\n\tdef climbStairs(self, n):\n\t\tif n <= 1:\n\t\t\treturn 1\n\t\tdp = [1] * 2\n\t\tfor i in range(2, n + 1):\n\t\t\tdp[1], dp[0] = dp[1] + dp[0], dp[1]\n\t\treturn dp[1]\n# %%\ns = Solution()\nprint(s.climbStairs(2))", + "language": "python" + }, + "node_id": "dailycode-40b9002d2beb42aeabf9947bc8af5932", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600470125" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/39.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/39.exercises/config.json" new file mode 100644 index 000000000..f1f9bccda --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/39.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-97cf74ce017444f1aa65cfa6a8ae7451", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/39.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/39.exercises/solution.json" new file mode 100644 index 000000000..00b61b7c2 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/39.exercises/solution.json" @@ -0,0 +1,124 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "810f4644697941d9894b88099b1bd39c", + "keywords": "哈希表,数学,字符串", + "title": "罗马数字转整数", + "desc": [ + { + "content": "\n
\n

罗马数字包含以下七种字符: I, V, X, LCD 和 M。\n

", + "language": "markdown" + }, + { + "content": "\n
字符          数值\nI             1\nV             5\nX             10\nL             50\nC             100\nD             500\nM             1000
", + "language": "markdown" + }, + { + "content": "\n

例如, 罗马数字 2 写做 II ,即为两个并列的 1。12\n写做 XII ,即为 X + II 。 27\n写做  XXVII,\n即为 XX + V + II 。

", + "language": "markdown" + }, + { + "content": "\n

通常情况下,罗马数字中小的数字在大的数字的右边。但也存在特例,例如 4 不写做 IIII,而是 IV。数字 1 在数字 5 的左边,所表示的数等于大数 5\n减小数 1 得到的数值 4 。同样地,数字 9 表示为 IX。这个特殊的规则只适用于以下六种情况:

", + "language": "markdown" + }, + { + "content": "\n
    \n
  • I 可以放在 V (5) 和 X (10) 的左边,来表示 4 和 9。
  • \n
  • X 可以放在 L (50) 和 C (100) 的左边,来表示 40\n和 90。 
  • \n
  • C 可以放在 D (500) 和 M (1000) 的左边,来表示 400\n和 900。
  • \n
", + "language": "markdown" + }, + { + "content": "\n

给你一个整数,将其转为罗马数字。

", + "language": "markdown" + }, + { + "content": "\n

 

", + "language": "markdown" + }, + { + "content": "\n

示例 1:

", + "language": "markdown" + }, + { + "content": "\n
输入: num = 3\n
输出:
\"III\"
", + "language": "markdown" + }, + { + "content": "\n

示例 2:

", + "language": "markdown" + }, + { + "content": "\n
输入: num = 4\n
输出:
\"IV\"
", + "language": "markdown" + }, + { + "content": "\n

示例 3:

", + "language": "markdown" + }, + { + "content": "\n
输入: num = 9\n
输出:
\"IX\"
", + "language": "markdown" + }, + { + "content": "\n

示例 4:

", + "language": "markdown" + }, + { + "content": "\n
输入: num = 58\n
输出:
\"LVIII\"\n
解释:
L = 50, V = 5, III = 3.\n
", + "language": "markdown" + }, + { + "content": "\n

示例 5:

", + "language": "markdown" + }, + { + "content": "\n
输入: num = 1994\n
输出:
\"MCMXCIV\"\n
解释:
M = 1000, CM = 900, XC = 90, IV = 4.
", + "language": "markdown" + }, + { + "content": "\n

 

", + "language": "markdown" + }, + { + "content": "\n

提示:

", + "language": "markdown" + }, + { + "content": "\n
    \n
  • 1 <= num <= 3999
  • \n
\n
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution:\n\tdef romanToInt(self, s: str) -> int:\n\t\tunits = [\n\t\t\t[\"M\", 1000, 1],\n\t\t\t[\"CM\", 900, 2],\n\t\t\t[\"D\", 500, 1],\n\t\t\t[\"CD\", 400, 2],\n\t\t\t[\"C\", 100, 1],\n\t\t\t[\"XC\", 90, 2],\n\t\t\t[\"L\", 50, 1],\n\t\t\t[\"XL\", 40, 2],\n\t\t\t[\"X\", 10, 1],\n\t\t\t[\"IX\", 9, 2],\n\t\t\t[\"V\", 5, 1],\n\t\t\t[\"IV\", 4, 2],\n\t\t\t[\"I\", 1, 1]\n\t\t]\n\t\tend = len(s)\n\t\tstart = 0\n\t\ti = 0\n\t\tr = 0\n\t\twhile i < len(units):\n\t\t\tunit = units[i][0]\n\t\t\tvalue = units[i][1]\n\t\t\tstep = units[i][2]\n\t\t\tif end-start >= step and s[start:start+step] == unit:\n\t\t\t\tr += value\n\t\t\t\tstart += step\n\t\t\telse:\n\t\t\t\ti += 1\n\t\treturn r\n# %%\ns = Solution()\nprint(s.romanToInt(\"III\"))", + "language": "python" + }, + "node_id": "dailycode-97cf74ce017444f1aa65cfa6a8ae7451", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600470218" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/4.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/4.exercises/config.json" new file mode 100644 index 000000000..ba48fa554 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/4.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-32ce873ede9141efaa8c63975adf1561", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/4.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/4.exercises/solution.json" new file mode 100644 index 000000000..99a2b7f19 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/4.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "05afe850f47545f0a825d1df5315fff5", + "keywords": "散列表,散列表,算法中阶,数据结构", + "title": "列表奇偶拆分", + "desc": [ + { + "content": "\n

【问题描述】\n输入一个列表,包含若干个整数(允许为空),然后将其中的奇数和偶数单独放置在一个列表中,保持原有顺序\n【输入形式】\n【输出形式】\n分两行输出,第一行输出偶数序列,第二行输出奇数序列\n【样例输入1】\n[48,82,47,54,55,57,27,73,86,14]\n【样例输出1】\n48, 82, 54, 86, 14\n47, 55, 57, 27, 73\n【样例输入2】\n[10, 22, 40]\n【样例输出2】\n10, 22, 40\nNONE\n【样例说明】\n如果奇偶拆分后,奇数列表,或者偶数列表为空,请直接输出NONE表示\n

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "x = input()\nx1 = x.strip('[]') \nx2 = x1.split(\",\") \na = []\nb = []\nfor i in x2:\n\tif int(i) % 2 == 0:\n\t\ta.append(i)\n\telse:\n\t\tb.append(i)\nif a == []:\n\tprint(\"NONE\")\nelse:\n\tprint(a)\nif b == []:\n\tprint(\"NONE\")\nelse:\n\tprint(b)", + "language": "python" + }, + "node_id": "dailycode-32ce873ede9141efaa8c63975adf1561", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600470297" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/40.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/40.exercises/config.json" new file mode 100644 index 000000000..ef591f7a9 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/40.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-7f49212df36b49e78915b9f27d2c4387", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/40.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/40.exercises/solution.json" new file mode 100644 index 000000000..335ee6c92 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/40.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "7ba27bc1a0b144f992860e885820382e", + "keywords": "数组,数学", + "title": "加一", + "desc": [ + { + "content": "\n

给定一个由 整数 组成的 非空 数组所表示的非负整数,在该数的基础上加一。

最高位数字存放在数组的首位, 数组中每个元素只存储单个数字。

你可以假设除了整数 0 之外,这个整数不会以零开头。

 

示例 1:

输入:digits = [1,2,3]
输出:
[1,2,4]
解释:
输入数组表示数字 123。

示例 2:

输入:digits = [4,3,2,1]
输出:
[4,3,2,2]
解释:
输入数组表示数字 4321。

示例 3:

输入:digits = [0]
输出:
[1]

 

提示:

    \t
  • 1 <= digits.length <= 100
  • \t
  • 0 <= digits[i] <= 9
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution(object):\n\tdef plusOne(self, digits):\n\t\tls = len(digits)\n\t\tfor index in reversed(range(ls)):\n\t\t\tif digits[index] < 9:\n\t\t\t\tdigits[index] += 1\n\t\t\t\treturn digits\n\t\t\telse:\n\t\t\t\tdigits[index] = 0\n\t\tdigits.insert(0, 1)\n\t\treturn digits\n# %%\ns = Solution()\nprint(s.plusOne(digits = [1,2,3]))", + "language": "python" + }, + "node_id": "dailycode-7f49212df36b49e78915b9f27d2c4387", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600469823" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/41.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/41.exercises/config.json" new file mode 100644 index 000000000..691c3bd67 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/41.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-5ca24290c093492b987b122e8cb2acd8", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/41.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/41.exercises/solution.json" new file mode 100644 index 000000000..76f343577 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/41.exercises/solution.json" @@ -0,0 +1,112 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "02dce007329c4e84a7762ff88219341f", + "keywords": "数组,双指针", + "title": "删除有序数组中的重复项", + "desc": [ + { + "content": "\n
\n

给你一个有序数组 nums ,请你\n原地 删除重复出现的元素,使每个元素 只出现一次 ,返回删除后数组的新长度。

", + "language": "markdown" + }, + { + "content": "\n

不要使用额外的数组空间,你必须在 原地\n修改输入数组 并在使用 O(1) 额外空间的条件下完成。

", + "language": "markdown" + }, + { + "content": "\n

 

", + "language": "markdown" + }, + { + "content": "\n

说明:

", + "language": "markdown" + }, + { + "content": "\n

为什么返回数值是整数,但输出的答案是数组呢?

", + "language": "markdown" + }, + { + "content": "\n

请注意,输入数组是以「引用」方式传递的,这意味着在函数里修改输入数组对于调用者是可见的。

", + "language": "markdown" + }, + { + "content": "\n

你可以想象内部操作如下:

", + "language": "markdown" + }, + { + "content": "\n
// nums 是以“引用”方式传递的。也就是说,不对实参做任何拷贝\nint len = removeDuplicates(nums);",
+      "language": "markdown"
+    },
+    {
+      "content": "\n// 在函数里修改输入数组对于调用者是可见的。\n// 根据你的函数返回的长度, 它会打印出数组中 该长度范围内 的所有元素。\nfor (int i = 0; i < len; i++) {\n    print(nums[i]);\n}\n
\n ", + "language": "markdown" + }, + { + "content": "\n

示例 1:

", + "language": "markdown" + }, + { + "content": "\n
输入:nums = [1,1,2]\n
输出:
2, nums = [1,2]\n
解释:
函数应该返回新的长度 2 ,并且原数组 nums 的前两个元素被修改为 1, 2 。不需要考虑数组中超出新长度后面的元素。\n
", + "language": "markdown" + }, + { + "content": "\n

示例 2:

", + "language": "markdown" + }, + { + "content": "\n
输入:nums = [0,0,1,1,1,2,2,3,3,4]\n
输出:
5, nums = [0,1,2,3,4]\n
解释:
函数应该返回新的长度 5 , 并且原数组 nums 的前五个元素被修改为 0, 1, 2, 3, 4 。不需要考虑数组中超出新长度后面的元素。\n
", + "language": "markdown" + }, + { + "content": "\n

 

", + "language": "markdown" + }, + { + "content": "\n

提示:

", + "language": "markdown" + }, + { + "content": "\n
    \n
  • 0 <= nums.length <= 3 * 104
  • \n
  • -104 <= nums[i] <= 104
  • \n
  • nums 已按升序排列
  • \n
", + "language": "markdown" + }, + { + "content": "\n

 

\n
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution(object):\n\tdef removeDuplicates(self, nums):\n\t\tif len(nums) == 0:\n\t\t\treturn 0\n\t\tleft = 0\n\t\tfor i in range(1, len(nums)):\n\t\t\tif nums[left] == nums[i]:\n\t\t\t\tcontinue\n\t\t\telse:\n\t\t\t\tleft += 1\n\t\t\t\tnums[left] = nums[i]\n\t\treturn left + 1\n# %%\ns = Solution()\nprint(s.removeDuplicates(nums = [1,1,2]))", + "language": "python" + }, + "node_id": "dailycode-5ca24290c093492b987b122e8cb2acd8", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600470118" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/42.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/42.exercises/config.json" new file mode 100644 index 000000000..4631fc541 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/42.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-2c643620e7db4198b4799fb816be0bf9", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/42.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/42.exercises/solution.json" new file mode 100644 index 000000000..72c731a83 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/42.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "96784621fdde4987acb6c7f1d43c37c5", + "keywords": "字符串", + "title": "最长公共前缀", + "desc": [ + { + "content": "\n

编写一个函数来查找字符串数组中的最长公共前缀。

如果不存在公共前缀,返回空字符串 \"\"

 

示例 1:

输入:strs = [\"flower\",\"flow\",\"flight\"]
输出:
\"fl\"

示例 2:

输入:strs = [\"dog\",\"racecar\",\"car\"]
输出:
\"\"
解释:
输入不存在公共前缀。

 

提示:

    \t
  • 0 <= strs.length <= 200
  • \t
  • 0 <= strs[i].length <= 200
  • \t
  • strs[i] 仅由小写英文字母组成
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "from typing import List\nclass Solution:\n\tdef longestCommonPrefix(self, strs: List[str]) -> str:\n\t\tif len(strs) == 0:\n\t\t\treturn ''\n\t\ti = 0\n\t\tlcp = []\n\t\twhile True:\n\t\t\tdone = False\n\t\t\tif i >= len(strs[0]):\n\t\t\t\tbreak\n\t\t\tj = 0\n\t\t\twhile j < len(strs):\n\t\t\t\tif i < len(strs[j]):\n\t\t\t\t\tif strs[j][i] != strs[0][i]:\n\t\t\t\t\t\tdone = True\n\t\t\t\t\t\tbreak\n\t\t\t\telse:\n\t\t\t\t\tdone = True\n\t\t\t\t\tbreak\n\t\t\t\tj += 1\n\t\t\tif not done:\n\t\t\t\tlcp.append(strs[0][i])\n\t\t\t\ti += 1\n\t\t\telse:\n\t\t\t\tbreak\n\t\treturn ''.join(lcp)\n# %%\ns = Solution()\nprint(s.longestCommonPrefix(strs = [\"flower\",\"flow\",\"flight\"]))", + "language": "python" + }, + "node_id": "dailycode-2c643620e7db4198b4799fb816be0bf9", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600469918" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/43.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/43.exercises/config.json" new file mode 100644 index 000000000..e0116e0f4 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/43.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-5bdf8ba742d641e29ecca718a5fcaab6", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/43.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/43.exercises/solution.json" new file mode 100644 index 000000000..e3cd73645 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/43.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "a0d58370128f47f09f23c7af3c83d23d", + "keywords": "数组,分治,动态规划", + "title": "最大子序和", + "desc": [ + { + "content": "\n

给定一个整数数组 nums ,找到一个具有最大和的连续子数组(子数组最少包含一个元素),返回其最大和。

 

示例 1:

输入:nums = [-2,1,-3,4,-1,2,1,-5,4]
输出:
6
解释:
连续子数组 [4,-1,2,1] 的和最大,为 6 。

示例 2:

输入:nums = [1]
输出:
1

示例 3:

输入:nums = [0]
输出:
0

示例 4:

输入:nums = [-1]
输出:
-1

示例 5:

输入:nums = [-100000]
输出:
-100000

 

提示:

    \t
  • 1 <= nums.length <= 3 * 104
  • \t
  • -105 <= nums[i] <= 105

 

进阶:如果你已经实现复杂度为 O(n) 的解法,尝试使用更为精妙的 分治法 求解。

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution(object):\n\tdef maxSubArray(self, nums):\n\t\tmaxEndingHere = maxSofFar = nums[0]\n\t\tfor i in range(1, len(nums)):\n\t\t\tmaxEndingHere = max(maxEndingHere + nums[i], nums[i])\n\t\t\tmaxSofFar = max(maxEndingHere, maxSofFar)\n\t\treturn maxSofFar\n# %%\ns = Solution()\nprint(s.maxSubArray(nums = [-2,1,-3,4,-1,2,1,-5,4]))", + "language": "python" + }, + "node_id": "dailycode-5bdf8ba742d641e29ecca718a5fcaab6", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600469821" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/44.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/44.exercises/config.json" new file mode 100644 index 000000000..de0a99f36 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/44.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-d5d81e058c794c00ad9824c7649d4168", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/44.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/44.exercises/solution.json" new file mode 100644 index 000000000..8a91916f2 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/44.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "30e3315d78704fd089eb9bccc0680b27", + "keywords": "数学,二分查找", + "title": "x 的平方根", + "desc": [ + { + "content": "\n

实现 int sqrt(int x) 函数。

\n

计算并返回 x 的平方根,其中 x 是非负整数。

\n

由于返回类型是整数,结果只保留整数的部分,小数部分将被舍去。

\n

示例 1:

\n
输入: 4
输出:
2
\n

示例 2:

\n
输入: 8
输出:
2
说明:
8 的平方根是 2.82842..., 由于返回类型是整数,小数部分将被舍去。
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution:\n\tdef mySqrt(self, x):\n\t\tif x == 0:\n\t\t\treturn 0\n\t\tif x < 4:\n\t\t\treturn 1\n\t\tres = 2 * self.mySqrt(x / 4)\n\t\tif (res + 1) * (res + 1) <= x and (res + 1) * (res + 1) >= 0:\n\t\t\treturn res + 1\n\t\treturn res\n# %%\ns = Solution()\nprint(s.mySqrt(4))", + "language": "python" + }, + "node_id": "dailycode-d5d81e058c794c00ad9824c7649d4168", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600470124" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/45.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/45.exercises/config.json" new file mode 100644 index 000000000..3b4ff7617 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/45.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-8c71087921b345cd8aceed9913f3cea3", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/45.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/45.exercises/solution.json" new file mode 100644 index 000000000..3ae68c614 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/45.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "6ac5ec62fe274644980c8fbc4bcb5612", + "keywords": "数组,双指针,排序", + "title": "合并两个有序数组", + "desc": [ + { + "content": "\n

给你两个有序整数数组 nums1 nums2,请你将 nums2 合并到 nums1 使 nums1 成为一个有序数组。

初始化 nums1nums2 的元素数量分别为 mn 。你可以假设 nums1 的空间大小等于 m + n,这样它就有足够的空间保存来自 nums2 的元素。

 

示例 1:

输入:nums1 = [1,2,3,0,0,0], m = 3, nums2 = [2,5,6], n = 3
输出:
[1,2,2,3,5,6]

示例 2:

输入:nums1 = [1], m = 1, nums2 = [], n = 0
输出:
[1]

 

提示:

    \t
  • nums1.length == m + n
  • \t
  • nums2.length == n
  • \t
  • 0 <= m, n <= 200
  • \t
  • 1 <= m + n <= 200
  • \t
  • -109 <= nums1[i], nums2[i] <= 109
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution(object):\n\tdef merge(self, nums1, m, nums2, n):\n\t\t\"\"\"\n\t\t:type nums1: List[int]\n\t\t:type m: int\n\t\t:type nums2: List[int]\n\t\t:type n: int\n\t\t:rtype: void Do not return anything, modify nums1 in-place instead.\n\t\t\"\"\"\n\t\tp1, p2 = m - 1, n - 1\n\t\tpos = m + n - 1\n\t\twhile p1 >= 0 and p2 >= 0:\n\t\t\tif nums1[p1] >= nums2[p2]:\n\t\t\t\tnums1[pos] = nums1[p1]\n\t\t\t\tp1 -= 1\n\t\t\telse:\n\t\t\t\tnums1[pos] = nums2[p2]\n\t\t\t\tp2 -= 1\n\t\t\tpos -= 1\n\t\twhile p2 >= 0:\n\t\t\tnums1[pos] = nums2[p2]\n\t\t\tp2 -= 1\n\t\t\tpos -= 1\n\t\treturn nums1\n# %%\ns = Solution()\nprint(s.merge(nums1 = [1,2,3,0,0,0], m = 3, nums2 = [2,5,6], n = 3))", + "language": "python" + }, + "node_id": "dailycode-8c71087921b345cd8aceed9913f3cea3", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600470926" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/46.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/46.exercises/config.json" new file mode 100644 index 000000000..dfaa161fd --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/46.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-9290d8e155064971b7dac798bc6e3b30", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/46.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/46.exercises/solution.json" new file mode 100644 index 000000000..0f0922944 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/46.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "63f84e83edcc43819d0650cd2fc897d9", + "keywords": "数组,二分查找", + "title": "搜索插入位置", + "desc": [ + { + "content": "\n

给定一个排序数组和一个目标值,在数组中找到目标值,并返回其索引。如果目标值不存在于数组中,返回它将会被按顺序插入的位置。

你可以假设数组中无重复元素。

示例 1:

输入: [1,3,5,6], 5
输出:
2

示例 2:

输入: [1,3,5,6], 2
输出:
1

示例 3:

输入: [1,3,5,6], 7
输出:
4

示例 4:

输入: [1,3,5,6], 0
输出:
0
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution:\n\tdef searchInsert(self, nums, target):\n\t\tl, r = int(0), len(nums) - 1\n\t\twhile l < r:\n\t\t\tmid = int((l + r) / 2)\n\t\t\tif nums[mid] < target:\n\t\t\t\tl = mid + 1\n\t\t\telse:\n\t\t\t\tr = mid\n\t\tif nums[l] < target:\n\t\t\treturn l + 1\n\t\treturn l \nif __name__ == '__main__':\n\ts = Solution()\n\tprint (s.searchInsert([1,3,5,6],5))\t", + "language": "python" + }, + "node_id": "dailycode-9290d8e155064971b7dac798bc6e3b30", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600470222" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/47.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/47.exercises/config.json" new file mode 100644 index 000000000..8dbe30845 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/47.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-87c05af61eca47f899c58a92805fb9db", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/47.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/47.exercises/solution.json" new file mode 100644 index 000000000..f3cd79d3c --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/47.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "a6489253236344e493b4d6b1b00fc19d", + "keywords": "数学", + "title": "回文数", + "desc": [ + { + "content": "\n

给你一个整数 x ,如果 x 是一个回文整数,返回 true ;否则,返回 false

回文数是指正序(从左向右)和倒序(从右向左)读都是一样的整数。例如,121 是回文,而 123 不是。

 

示例 1:

输入:x = 121
输出:
true

示例 2:

输入:x = -121
输出:
false
解释:
从左向右读, 为 -121 。 从右向左读, 为 121- 。因此它不是一个回文数。

示例 3:

输入:x = 10
输出:
false
解释:
从右向左读, 为 01 。因此它不是一个回文数。

示例 4:

输入:x = -101
输出:
false

 

提示:

    \t
  • -231 <= x <= 231 - 1

 

进阶:你能不将整数转为字符串来解决这个问题吗?

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "import math\nclass Solution:\n\tdef isPalindrome(self, x: int) -> bool:\n\t\to = x\n\t\ty = 0\n\t\twhile x > 0:\n\t\t\tr = x % 10\n\t\t\ty = y*10+r\n\t\t\tx = int(math.floor(x/10))\n\t\treturn y == o\n# %%\ns = Solution()\nprint(s.isPalindrome(x = 121))", + "language": "python" + }, + "node_id": "dailycode-87c05af61eca47f899c58a92805fb9db", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600471100" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/48.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/48.exercises/config.json" new file mode 100644 index 000000000..a8f3cddeb --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/48.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-c4157a6e02994060aa622e2fb33eda35", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/48.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/48.exercises/solution.json" new file mode 100644 index 000000000..7c92bc9cf --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/48.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "b32f322d76c744d8b7b99c4c00710077", + "keywords": "栈,字符串", + "title": "有效的括号", + "desc": [ + { + "content": "\n

给定一个只包括 '('')''{''}''['']' 的字符串 s ,判断字符串是否有效。

有效字符串需满足:

    \t
  1. 左括号必须用相同类型的右括号闭合。
  2. \t
  3. 左括号必须以正确的顺序闭合。

 

示例 1:

输入:s = \"()\"
输出:
true

示例 2:

输入:s = \"()[]{}\"
输出:
true

示例 3:

输入:s = \"(]\"
输出:
false

示例 4:

输入:s = \"([)]\"
输出:
false

示例 5:

输入:s = \"{[]}\"
输出:
true

 

提示:

    \t
  • 1 <= s.length <= 104
  • \t
  • s 仅由括号 '()[]{}' 组成
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution:\n\tdef isValid(self, s: str) -> bool:\n\t\tparentheses = [\n\t\t\t'(', '[', '{',\n\t\t\t')', ']', '}'\n\t\t]\n\t\ti = 0\n\t\tsum = [0, 0, 0]\n\t\ttop = []\n\t\twhile i < len(s):\n\t\t\tc = s[i]\n\t\t\tj = 0\n\t\t\twhile j <= 2:\n\t\t\t\tif c == parentheses[j]:\n\t\t\t\t\ttop.append(j)\n\t\t\t\t\tsum[j] += 1\n\t\t\t\telif c == parentheses[j+3]:\n\t\t\t\t\tif len(top) == 0 or top[len(top)-1] != j:\n\t\t\t\t\t\treturn False\n\t\t\t\t\ttop.pop()\n\t\t\t\t\tsum[j] -= 1\n\t\t\t\tj += 1\n\t\t\ti += 1\n\t\tif sum[0] != 0 or sum[1] != 0 or sum[2] != 0:\n\t\t\treturn False\n\t\telse:\n\t\t\treturn True\n# %%\ns = Solution()\nprint(s.isValid(s = \"()[]{}\"))", + "language": "python" + }, + "node_id": "dailycode-c4157a6e02994060aa622e2fb33eda35", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600470114" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/5.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/5.exercises/config.json" new file mode 100644 index 000000000..5e5ba2295 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/5.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-94df85e9dbd04a8cb60cec11aa9b170a", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/5.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/5.exercises/solution.json" new file mode 100644 index 000000000..e71e136e4 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/5.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "5ff96998f4e641eaa92a22aff18f151d", + "keywords": "算法初阶,基础知识,分治策略,最大子数组问题", + "title": "请问如何用python做两个数组逐位判断?", + "desc": [ + { + "content": "\n比如有以下数组:\na1: 1,0,0,1,0,0,0,1\na2: 0,0,0,0,1,1,1,1\na3: 0,1,0,1,0,1,0,0\na4: 1,0,1,1,1,1,0,0\na5: .......\n抓取三个数组进行判断,\nif ((a1第一位or a2第一位 or a3第一位=1 )and (a1第二位 or a2 第二位 or a3第二位=1)and....\n直到判断完所有位数为止,所有位都有了1的话就输出当前这三个数组,已输出的数组不参与之后的判断。", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "# -*- coding: UTF-8 -*-\nfrom itertools import combinations\na1=[ 1,0,0,1,0,0,0,1]\na2=[ 0,0,0,0,1,1,1,1]\na3=[ 0,1,0,1,0,1,0,0]\na4=[ 1,0,1,1,1,1,0,0]\na5=[ 1,1,1,1,1,1,1,0]\na6=[ 0,0,0,0,0,0,0,1]\na=[a1,a2,a3,a4,a5,a6]\nal = list(combinations(a,3))\nfor i in al:\n\tflag = True\n\tfor j in range(len(i[0])):\n\t\tif (i[0][j] + i[1][j] + i[2][j] == 0):\n\t\t\tflag = False\n\t\t\tbreak\n\tif flag:\n\t\tprint(i)\t", + "language": "python" + }, + "node_id": "dailycode-94df85e9dbd04a8cb60cec11aa9b170a", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600469990" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/6.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/6.exercises/config.json" new file mode 100644 index 000000000..916e27891 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/6.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-2e6302bf718d46598da5024957c605a0", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/6.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/6.exercises/solution.json" new file mode 100644 index 000000000..3ec37594c --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/6.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "0a3ddcde88eb4f6181853a678ebf45ea", + "keywords": "算法初阶,基础知识,函数的增长,标准记号与常用函数", + "title": "检查密码强度", + "desc": [ + { + "content": "\n

定义一个名为“isStrongPassword”的函数,该函数将字符串作为参数。功能然后将检查所提供的字符串是否满足以下条件,以检查是否为强 \n密码:\n1.必须至少包含1个大写和小写字母的组合\n2.必须至少包含3位数字\n3.必须至少包含3个特殊字符(包括空格)\n4.密码长度必须至少12个字符\n该函数将返回一个布尔值,即如果满足所有条件则返回True或返回False\n确保使用可能返回False值的每个可能的输入来测试函数也一样

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "def isStrongPassword(pwd):\n\tchars = list(pwd)\n\tupper = [c for c in chars if 'A' <= c and c <= 'Z']\n\tlower = [c for c in chars if 'a' <= c and c <= 'z']\n\tdigit = [c for c in chars if '0' <= c and c <= '9' ]\n\tsymbol = [c for c in chars if not ('A' <= c and c <= 'Z' or 'a' <= c and c <= 'z' or '0' <= c and c <= '9')] \n\tstrong = len(upper) >= 1 and len(lower) >= 1 and len(digit) >= 3 and len(symbol) >= 3 and len(pwd) >= 12\n\treturn strong\nprint(isStrongPassword(\"Str0n9P@$$w0rd\"))\nprint(isStrongPassword(\"StrongPassword\"))\nprint(isStrongPassword(\"Stron9P@$$0rd\"))\nprint(isStrongPassword(\"Str0n9Pass0rd\"))\nprint(isStrongPassword(\"str0n9p@$$0rd\"))\nprint(isStrongPassword(\"Str0n9P@$$\"))\nprint(isStrongPassword(\"12345678\"))\nprint(isStrongPassword(\"~!@#$$%^&*()_+\"))\nprint(isStrongPassword(\"STRONGPASSWORD\"))", + "language": "python" + }, + "node_id": "dailycode-2e6302bf718d46598da5024957c605a0", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600469891" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/7.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/7.exercises/config.json" new file mode 100644 index 000000000..bd8d5baec --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/7.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-37725ca16b9f48d7a618ebe5d654955d", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/7.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/7.exercises/solution.json" new file mode 100644 index 000000000..dae779071 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/7.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "eb2de64e11fb45be92fbe9382ff09710", + "keywords": "算法初阶,排序和顺序统计量,中位数和顺序统计量", + "title": "编程通过键盘输入每一位运动员", + "desc": [ + { + "content": "\n

体操比赛成绩统计。多名运动员,多个评委打分,去掉一个最高分和去掉一个最低分,对其余分数求平均分作为一个运动员成绩。\n编程通过键盘输入每位运动员编号和每个评委的成绩,求出运动员的最终成绩,并将运动员编号和最终成绩保存在一个字典中,形如{编号1:最终成绩1,学号2:最终成绩2.....,并将结果输出。

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "t = int(input('请输入评委人数(不得少于3人):'))\ns = int(input('请输入学生人数(不得少于1人):'))\nstus = []\nfor i in range(s):\n\tstu = {'score':[]}\n\tstu.update({'sn':str(input('----\\n请输入学生学号:'))})\n\tfor j in range(t):\n\t\tstu['score'].append(input('请输入评委'+str(j+1)+'的评分:'))\n\tstu['score'].sort()\n\tstu.update({'min':stu['score'].pop(0)})\n\tstu.update({'max':stu['score'].pop()})\n\tstu.update({'avg':eval('+'.join(stu['score']))/len(stu['score'])})\n\tstus.append(stu)\nr = {n['sn']:n['avg'] for n in stus}\nprint(r)", + "language": "python" + }, + "node_id": "dailycode-37725ca16b9f48d7a618ebe5d654955d", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600469993" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/8.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/8.exercises/config.json" new file mode 100644 index 000000000..baadb2f3c --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/8.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-eb8c1b6d542e4aa6aa9b722336978115", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/8.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/8.exercises/solution.json" new file mode 100644 index 000000000..514227e91 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/8.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "9bcfaba804d84dbf9ee53401b14c70fb", + "keywords": "算法初阶,基础知识,算法基础,设计算法,分析分治算法", + "title": "求最大公约数和最小公倍数", + "desc": [ + { + "content": "\n

输入两个数x 和y,如果x 或y 小于等于0,提示请输入正整数,求这两个数的最大公约数和最小公倍数。\n注意:可以采用欧几里得辗转相除算法来求最大公约数。最小公倍数的计算方法是两数的乘积除以两数最大公约数的结果。

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "x = int(input(\"输入x:\"))\ny = int(input(\"输入y:\"))\nif x <= 0 or y <= 0:\n\tprint(\"请输入正整数\")\nif x < y:\n\tx,y=y,x\n\tv1 = x*y\n\tv2 = x%y\n\twhile v2 != 0:\n\t\tx=y\n\t\ty = v2\n\t\tv2 = x % y\n\tv1 =v1/ y\n\tprint(\"最大公约数为:%d\" % y) \n\tprint(\"最小公倍数为:%d\" % v1) ", + "language": "python" + }, + "node_id": "dailycode-eb8c1b6d542e4aa6aa9b722336978115", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600469983" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/9.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/9.exercises/config.json" new file mode 100644 index 000000000..a82d406fd --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/9.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-0e465e8d70a1454a8aac9dd2da5f9325", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/9.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/9.exercises/solution.json" new file mode 100644 index 000000000..8b389a753 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/3.python/9.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "651ea1f7b5d946e28d7a22d2b856fd26", + "keywords": "散列表,算法中阶,数据结构,散列函数", + "title": "按要求实现程序功能", + "desc": [ + { + "content": "\n

(1)定义一个函数prime判断某个整数是否为素数;\n(2)然后从键盘输入一行字符串,将其中的连续数字依次提取出来形成一个列表。例如,字符串“ab12cd34fg67”按要求提取后形成列表[12,34,67];\n(3)将列表中的所有非素数改为0(要求用prime函数判断列表中的元素是否为素 数);\n(4)输出原始字符串及修改前、修改后的列表。\n提示:可以用s.isdigit()判断s是否为数字字符(串)

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "import math,re\ndef prime(num):\n\tflag = False\n\tif num > 1:\n\t\tfor i in range(2, math.floor(math.sqrt(num))):\n\t\t\tif (num % i) == 0:\n\t\t\t\tflag = True\n\t\t\t\tbreak\n\tif flag:\n\t\tprint(num, \"不是素数\")\n\telse:\n\t\tprint(num, \"是素数\")\n\treturn flag\ns = input(\"请输入字符串:\")\nsList = re.findall(r'(\\d+)', s)\nsNum = [int(x) for x in sList]\ny = lambda x: 0 if prime(x) else x\nsNew = [y(x) for x in sNum]\nprint(sNum) \nprint(sNew) ", + "language": "python" + }, + "node_id": "dailycode-0e465e8d70a1454a8aac9dd2da5f9325", + "license": "csdn.net", + "created_at": 1637894161, + "topic_link": "https://bbs.csdn.net/topics/600470198" +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/1.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/1.exercises/config.json" new file mode 100644 index 000000000..c765101be --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/1.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-7d322d7680364e9eb8bd499d459b5830", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/1.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/1.exercises/solution.json" new file mode 100644 index 000000000..31bf2fb99 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/1.exercises/solution.json" @@ -0,0 +1,44 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "c823b1ea488847a4a1ec2b6060bba0d6", + "keywords": "PC,老电脑", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120031215", + "title": "80年代性价比最高的电脑是哪个?", + "desc": [ + { + "content": "\n1977 年 9 月,世界上第一批大规模生产的个人电脑在美国发布了, 售价 600 美元。 它的名字是:", + "language": "markdown" + } + ], + "answer": [ + { + "content": "Tandy 公司的 TRS-80", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "苹果公司的 Apple I", + "language": "json" + } + ], + [ + { + "content": "Xerox 公司的 Alto", + "language": "json" + } + ], + [ + { + "content": "IBM 的IBM PC", + "language": "json" + } + ] + ], + "node_id": "dailycode-7d322d7680364e9eb8bd499d459b5830", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/10.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/10.exercises/config.json" new file mode 100644 index 000000000..0face0abf --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/10.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-d830455981d94370b9c1d8818f9be557", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/10.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/10.exercises/solution.json" new file mode 100644 index 000000000..e55fe030d --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/10.exercises/solution.json" @@ -0,0 +1,44 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "c11359bc93be4a8f88e7441bea5a7edc", + "keywords": "晶体管,半导体", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120521028", + "title": "晶体管的专利之谜", + "desc": [ + { + "content": "\n晶体管引发了计算机工程的一场革命,导致了现代计算机中常见的半导体、微处理器和集成电路的发展。助听器、收音机、唱机、计算机、交换设备、卫星和月球火箭都因为晶体管的应用而有了新的突破。\n你觉得晶体管的专利最有可能是在哪一年获得?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "1950", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "1945", + "language": "json" + } + ], + [ + { + "content": "1955", + "language": "json" + } + ], + [ + { + "content": "1960", + "language": "json" + } + ] + ], + "node_id": "dailycode-d830455981d94370b9c1d8818f9be557", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/100.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/100.exercises/config.json" new file mode 100644 index 000000000..e36eb1285 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/100.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-6bfa7f2885694ab09f5b71d25d15bc31", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/100.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/100.exercises/solution.json" new file mode 100644 index 000000000..638e9adac --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/100.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "2b1ce6d3e6d043f0806dd3540c70ceae", + "keywords": "新闻,程序员", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/121287366", + "title": "程序员的新闻网", + "desc": [ + { + "content": "\n美国著名程序员 Paul Graham 出生于 1964 年 11 月 13 日,他以 Lisp 方面的工作而知名,开发了最早的 Web 应用 Viaweb ,后来被雅虎收购。Graham 与人共同创建了著名的创业投资公司 Y Combinator,并弄了一个新闻网站,是如今访问量最高的技术新闻信息来源之一。", + "language": "markdown" + }, + { + "content": "\nY Combinator 创办的新闻网站叫什么?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "Hacker News", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "Cracker News", + "language": "json" + } + ], + [ + { + "content": "Programmer News", + "language": "json" + } + ], + [ + { + "content": "Modern News", + "language": "json" + } + ] + ], + "node_id": "dailycode-6bfa7f2885694ab09f5b71d25d15bc31", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/101.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/101.exercises/config.json" new file mode 100644 index 000000000..e85b46dd4 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/101.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-70e64d37dbd04624a69892967e525415", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/101.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/101.exercises/solution.json" new file mode 100644 index 000000000..2b9e40a2a --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/101.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "80183aca1cd54b5d8a72e7093738a024", + "keywords": "计算机,打字机,", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/121386559", + "title": "实业父子", + "desc": [ + { + "content": "\n在 19 世纪至 20 世纪有一对同名同姓的父子,他们在唱片、办公设备、打字机到计算机制造业之间辗转,并创建了美国最早和最大的计算机制造公司之一 Sperry Corporation;这家公司后面演变成的雷明顿兰德公司沉重地打击 IBM,使他们成为了新计算机行业的主要参与者。", + "language": "markdown" + }, + { + "content": "\n这对同名同姓的父子叫什么名字?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "詹姆斯·兰德(James Rand)", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "迈克尔·戴尔(Michael Dell)", + "language": "json" + } + ], + [ + { + "content": "史蒂夫·乔布斯(Steve Jobs)", + "language": "json" + } + ], + [ + { + "content": "戴维·帕卡德(David Packard)", + "language": "json" + } + ] + ], + "node_id": "dailycode-70e64d37dbd04624a69892967e525415", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/102.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/102.exercises/config.json" new file mode 100644 index 000000000..642bc3223 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/102.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-0a97930729d84311a82d05cfe4c18d5d", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/102.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/102.exercises/solution.json" new file mode 100644 index 000000000..4415baa3f --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/102.exercises/solution.json" @@ -0,0 +1,44 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "ac4baea4cab64a3d9ff185aa20c3afd3", + "keywords": "硅谷,半导体,仙童", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120521000", + "title": "“八叛逆”秘辛", + "desc": [ + { + "content": "\n美国硅谷的仙童公司为硅谷孕育了成千上万的技术人才和管理人才,被称为电子、电脑业界的“西点军校”,是名副其实的“人才摇篮”。一批又一批精英人才从这里走出和创业,书写了硅谷一段辉煌的历史;然而,正因为人才的大量流失,也造成了这家公司历经坎坷的商海沉浮。 下面关于仙童公司的描述,哪一个是不正确的:", + "language": "markdown" + } + ], + "answer": [ + { + "content": "这八个技术专家找了各自的家人朋友筹措了八万美金作为天使投资资金。", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "仙童公司的八个技术专家都是半导体专家肖克利招募到肖克利半导体实验室的。", + "language": "json" + } + ], + [ + { + "content": "肖克利是技术天才,但是管理能力很差,导致这八个技术专家离职,并被肖克利称为 “八个叛徒” (traitorous eight) ”", + "language": "json" + } + ], + [ + { + "content": "仙童公司的第一个重要客户是 IBM 公司,订单是 100 个硅管。", + "language": "json" + } + ] + ], + "node_id": "dailycode-0a97930729d84311a82d05cfe4c18d5d", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/103.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/103.exercises/config.json" new file mode 100644 index 000000000..f09013c26 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/103.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-8afbcaa167c84350ac71132140fde05b", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/103.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/103.exercises/solution.json" new file mode 100644 index 000000000..88a199668 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/103.exercises/solution.json" @@ -0,0 +1,44 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "b76ae2cf7a4a439abb86d6394eaf93d6", + "keywords": "3D打印,3D建模", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120521028", + "title": "3D打印是怎么诞生的?", + "desc": [ + { + "content": "\n在这一年,3D 打印的概念首次出现。 戴维·E.H.琼斯在《新科学家》杂志首次阐述了 3D 打印的概念。10 年后,查克·赫尔真正实现了 3D 打印(立体光刻)。3D 打印(3D printing)是将三维模型或其他电子数据输入计算机,在计算机控制下层叠原材料,打印出可具有任意形状或几何特征的三维物体。\n这一年是:", + "language": "markdown" + } + ], + "answer": [ + { + "content": "1974", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "1969", + "language": "json" + } + ], + [ + { + "content": "1979", + "language": "json" + } + ], + [ + { + "content": "1984", + "language": "json" + } + ] + ], + "node_id": "dailycode-8afbcaa167c84350ac71132140fde05b", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/11.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/11.exercises/config.json" new file mode 100644 index 000000000..e287b1767 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/11.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-5768a004640642f4a6d8ad05da14c6ee", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/11.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/11.exercises/solution.json" new file mode 100644 index 000000000..4b40da62b --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/11.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "0afe0fdc4a9445599ed83048be986c96", + "keywords": "C,C++", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120756123", + "title": "C++ 的类型是什么?", + "desc": [ + { + "content": "\n1985 年 10 月 14 日,第一个 C++ 编译器 CFront 发布。C++ 是比雅尼·斯特劳斯特鲁普在贝尔实验室工作期间设计并实现的;C++ 基于 C 语言开发,增加了很多现代编程语言特性。", + "language": "markdown" + }, + { + "content": "\nC++ 语言是一种什么类型的语言?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "静态类型编译式编程语言", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "动态类型编译式编程语言", + "language": "json" + } + ], + [ + { + "content": "强类型定义语言", + "language": "json" + } + ], + [ + { + "content": "弱类型定义语言", + "language": "json" + } + ] + ], + "node_id": "dailycode-5768a004640642f4a6d8ad05da14c6ee", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/12.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/12.exercises/config.json" new file mode 100644 index 000000000..f07e909c2 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/12.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-6bbef4141e7a49a4bdf572a75f0da5a6", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/12.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/12.exercises/solution.json" new file mode 100644 index 000000000..9232d867d --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/12.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "5b0b5de535f64169924d1fd5cdaa80cf", + "keywords": "苹果,ipod", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120912959", + "title": "ipod 之父", + "desc": [ + { + "content": "\n2021 年是 ipod 发布的二十周年。乔布斯在 1997 年重返苹果公司,靠着在 2001 年通过推出 iPod 进军手持设备和音乐娱乐市场,大大减少了苹果未来对 Mac 销售的依赖,颠覆了人们购买和听音乐的方式,颠覆了 MP3 音乐播放器,为自己打了一记翻身仗。", + "language": "markdown" + }, + { + "content": "\n“ipod 之父”是谁?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "安东尼·法戴尔(Anthony Fadell)", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "史蒂夫·乔布斯(Steve Jobs)", + "language": "json" + } + ], + [ + { + "content": "斯蒂夫·盖瑞·沃兹尼亚克(Stephen Gary Wozniak)", + "language": "json" + } + ], + [ + { + "content": "罗恩·韦恩(Ron Wayne)", + "language": "json" + } + ] + ], + "node_id": "dailycode-6bbef4141e7a49a4bdf572a75f0da5a6", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/13.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/13.exercises/config.json" new file mode 100644 index 000000000..5c32bbb0e --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/13.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-a4c3a6f260b243dba3a75bbee1ddd3a0", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/13.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/13.exercises/solution.json" new file mode 100644 index 000000000..4f8eecf38 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/13.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "9964a5a0795a486f9fa170c0151029b7", + "keywords": "Linux,RHEL", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/121003565", + "title": "Linux 和红帽子", + "desc": [ + { + "content": "\n1990 年代末期,Linux 以自由软件且开放源代码为号召,试图挑战商业且闭源的 Windows 在操作系统市场的霸主地位之际,Red Hat 所推出的 Linux 系统与软件集成包 Red Hat Linux 适时回应了市场的需求,从而奠定了 Red Hat 在 Linux 业界的旗手地位。", + "language": "markdown" + }, + { + "content": "\nRed Hat 如今被哪家公司所收购?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "IBM", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "Google", + "language": "json" + } + ], + [ + { + "content": "Microsoft", + "language": "json" + } + ], + [ + { + "content": "阿里巴巴", + "language": "json" + } + ] + ], + "node_id": "dailycode-a4c3a6f260b243dba3a75bbee1ddd3a0", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/14.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/14.exercises/config.json" new file mode 100644 index 000000000..5cd1b96c8 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/14.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-cba3c9a6ed1f460ba5b586eb0a232e62", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/14.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/14.exercises/solution.json" new file mode 100644 index 000000000..2a630b2f9 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/14.exercises/solution.json" @@ -0,0 +1,44 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "696bb6cfcc6d484f8aae22dec6a6f5de", + "keywords": "网络空间,互联网生态", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120521028", + "title": "网络空间和现实社会的关系?", + "desc": [ + { + "content": "\n约翰·佩里·巴洛(John Perry Barlow)生于 1947 - 2018 。巴洛是电子边界基金会副董事长、网络空间独立宣言之父,也是全球最著名的黑客之一。巴洛一生致力于推动互联网的去政治化,是这一事业的标志人物。\n下面哪一个观点最符合他的看法:", + "language": "markdown" + } + ], + "answer": [ + { + "content": "网络空间的管理应该独立于现实社会", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "网络是人类社会的自然延申,应该从一开始就应用人类社区所有现有法律", + "language": "json" + } + ], + [ + { + "content": "网络空间的法律应该由权威组织和专家来制定", + "language": "json" + } + ], + [ + { + "content": "网络空间应该逐步和现实社会的法制结合", + "language": "json" + } + ] + ], + "node_id": "dailycode-cba3c9a6ed1f460ba5b586eb0a232e62", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/15.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/15.exercises/config.json" new file mode 100644 index 000000000..302d58473 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/15.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-84c9b65036c845e8a77148e5f344a4b7", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/15.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/15.exercises/solution.json" new file mode 100644 index 000000000..3a56aa313 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/15.exercises/solution.json" @@ -0,0 +1,44 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "9e75b8b52e8343d1873dcbb0734e0377", + "keywords": "网吧", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120031215", + "title": "世界上第一家网吧", + "desc": [ + { + "content": "\n世界上第一家网吧是哪年在什么地方开张的?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "1994, 英国伦敦", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "1995, 中国上海", + "language": "json" + } + ], + [ + { + "content": "1996, 美国波士顿", + "language": "json" + } + ], + [ + { + "content": "1993, 法国巴黎", + "language": "json" + } + ] + ], + "node_id": "dailycode-84c9b65036c845e8a77148e5f344a4b7", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/16.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/16.exercises/config.json" new file mode 100644 index 000000000..6104c9959 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/16.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-9b16c89cbe7e434aad1c5465eb2b6da9", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/16.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/16.exercises/solution.json" new file mode 100644 index 000000000..ecdddd020 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/16.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "d44976dbd1044b3fa982e89d116b659b", + "keywords": "Twitter,微博", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/121187528", + "title": "字符限制", + "desc": [ + { + "content": "\n微博是我们熟知的社交媒体,在 2016 年以前,微博使用的字数规则一直沿袭自 Twitter 的 140 字符限制,而如今微博早已开放了 140 字的限制,让用户可以畅快的写文章。但是作为现今全球新闻、娱乐和评论的重要来源,Twitter 似乎并没有像微博一样解除限制……", + "language": "markdown" + }, + { + "content": "\n2021 年的 Twitter 现在有多少字符限制?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "280 个字符", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "140 个字符", + "language": "json" + } + ], + [ + { + "content": "420 个字符", + "language": "json" + } + ], + [ + { + "content": "没有限制", + "language": "json" + } + ] + ], + "node_id": "dailycode-9b16c89cbe7e434aad1c5465eb2b6da9", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/17.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/17.exercises/config.json" new file mode 100644 index 000000000..a5e107a93 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/17.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-0d3635aab75f48beabfddb5726669e18", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/17.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/17.exercises/solution.json" new file mode 100644 index 000000000..583d356b4 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/17.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "8e2aa99395064399921bc236c0c8e994", + "keywords": "Twitter,社交网络", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/121409512", + "title": "Twitter 的创始人", + "desc": [ + { + "content": "\nTwitter(推特)是一家美国社交网络及微博客服务的公司,致力于服务公众对话。Twitter 的几位共同创始人里,有一位也是移动支付公司 Square 的创始人,如今的他留着显眼的大胡子。", + "language": "markdown" + }, + { + "content": "\nTwitter 的这位创始人是谁?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "杰克·多西(Jack Dorsey)", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "伊万·威廉姆斯(Evan Williams)", + "language": "json" + } + ], + [ + { + "content": "比兹·斯通(Biz Stone)", + "language": "json" + } + ], + [ + { + "content": "马克·扎克伯格(Mark Zuckerberg)", + "language": "json" + } + ] + ], + "node_id": "dailycode-0d3635aab75f48beabfddb5726669e18", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/18.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/18.exercises/config.json" new file mode 100644 index 000000000..3ec737687 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/18.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-ebb4b625582b406184b9338718c47c7f", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/18.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/18.exercises/solution.json" new file mode 100644 index 000000000..7b89fcab8 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/18.exercises/solution.json" @@ -0,0 +1,44 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "36c2b78adf7943f3b4486722cdb5b4e6", + "keywords": "密码学,网络安全,图灵奖", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120521025", + "title": "密码学先驱", + "desc": [ + { + "content": "\n赫尔曼和 Diffie 在 1976 年的开创性论文《密码学的新方向》( New Directions in Cryptography),介绍了公钥和电子签名的方法,这是今天大多数互联网安全协议的基础。\n下面哪个说法是错的:", + "language": "markdown" + } + ], + "answer": [ + { + "content": "公钥和私钥都可以分享", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "公钥可以自由分享,私钥用来进行解密", + "language": "json" + } + ], + [ + { + "content": "在 2002 年,Rivest、Shamir 和 Adleman 就因共同提出了 RSA 算法而得到图灵奖", + "language": "json" + } + ], + [ + { + "content": "在 2015 年,Diffie 和 Hellman 获得了图灵奖", + "language": "json" + } + ] + ], + "node_id": "dailycode-ebb4b625582b406184b9338718c47c7f", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/19.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/19.exercises/config.json" new file mode 100644 index 000000000..bc4a94a49 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/19.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-c4ea7b5d22024757bccb60adbd5ef2ef", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/19.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/19.exercises/solution.json" new file mode 100644 index 000000000..c226065d0 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/19.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "14de4bf96851420180df87ecce3240e9", + "keywords": "NP问题,计算机", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/121090690", + "title": "世纪难题", + "desc": [ + { + "content": "\nP/NP 问题包含了复杂度类 P 与 NP 的关系,是一个在理论信息学中计算复杂度理论领域里至今未被解决的问题,也是克雷数学研究所七个千禧年大奖难题之一。NP 问题的发现者分别有两位,其中一位是图灵奖得主 Stephen A. Cook 。", + "language": "markdown" + }, + { + "content": "\nNP 问题的另一位发现者是谁?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "Leonid Levin", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "Simon Levin", + "language": "json" + } + ], + [ + { + "content": "Peter Levin", + "language": "json" + } + ], + [ + { + "content": "Kleine Levin", + "language": "json" + } + ] + ], + "node_id": "dailycode-c4ea7b5d22024757bccb60adbd5ef2ef", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/2.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/2.exercises/config.json" new file mode 100644 index 000000000..06679e90f --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/2.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-fda12588f1f240ba9e6a0d68a5988930", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/2.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/2.exercises/solution.json" new file mode 100644 index 000000000..97fbb6c93 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/2.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "85e8dc573aad46d8a0cd2c7bb3b852ec", + "keywords": "Markdown,RSS", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/121196929", + "title": "互联网的流星", + "desc": [ + { + "content": "\n亚伦·斯沃茨(Aaron Swartz)出生于 1986 年 11 月 8 日,他被称为互联网之子,他参与构建的超轻量标记语言 Markdown、RSS 和 web.py 对我们影响颇深;但斯沃茨所坚持的互联网共享精神为自己带来了版权诉讼和百万罚款,最终在家里结束了 27 年的为自由而燃烧的生命。", + "language": "markdown" + }, + { + "content": "\n亚伦·斯沃茨是用什么语言编写 Markdown 的?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "Python", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "C ++", + "language": "json" + } + ], + [ + { + "content": "Java", + "language": "json" + } + ], + [ + { + "content": "Go", + "language": "json" + } + ] + ], + "node_id": "dailycode-fda12588f1f240ba9e6a0d68a5988930", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/20.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/20.exercises/config.json" new file mode 100644 index 000000000..2c01ea2c6 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/20.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-2dcd0aea6e1e4402aace9e6aa5302c85", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/20.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/20.exercises/solution.json" new file mode 100644 index 000000000..d33ca9a52 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/20.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "0859ed3e7d59492b94e55982810a3b0f", + "keywords": "Microsoft,浏览器,IE", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120815589", + "title": "浏览器选项卡的起源", + "desc": [ + { + "content": "\n我们现在使用浏览器的时候都很喜欢“选项卡”这个功能,选项卡可以让我们在不同的网页之间快速切换和定位,大大方便了浏览和办公。", + "language": "markdown" + }, + { + "content": "\n选项卡最早出现在 IE 浏览器的第几代?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "Internet Explorer 7", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "Internet Explorer 5", + "language": "json" + } + ], + [ + { + "content": "Internet Explorer 6", + "language": "json" + } + ], + [ + { + "content": "Internet Explorer 8", + "language": "json" + } + ] + ], + "node_id": "dailycode-2dcd0aea6e1e4402aace9e6aa5302c85", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/21.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/21.exercises/config.json" new file mode 100644 index 000000000..a6b279001 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/21.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-eea138527d38484791eb791963f43112", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/21.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/21.exercises/solution.json" new file mode 100644 index 000000000..7581c4096 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/21.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "4875eaae155d426da83fae6b5f0c62bf", + "keywords": "微软,Windows", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120896267", + "title": "不是第七代的 Win 7", + "desc": [ + { + "content": "\nWindows 7 是由微软公司(Microsoft)2009 年 10 月 22 日发布的桌面端操作系统,它影响了每个行业的方方面面,以至于很多人仍然在日常生活和工作中使用它。不过,Win 7 事实上是对 Vista 在界面和用户体验上的一次改良,不是真正意义上的第七代 Windows。", + "language": "markdown" + }, + { + "content": "\nWindows 7 的内核版本号是多少?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "Windows NT 6.1", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "Windows Server 2008 R2", + "language": "json" + } + ], + [ + { + "content": "Windows Vista R2", + "language": "json" + } + ], + [ + { + "content": "Windows NT 7", + "language": "json" + } + ] + ], + "node_id": "dailycode-eea138527d38484791eb791963f43112", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/22.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/22.exercises/config.json" new file mode 100644 index 000000000..869ab9a25 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/22.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-3af8b35b6d2d428ea3854f422ee39a39", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/22.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/22.exercises/solution.json" new file mode 100644 index 000000000..a61e249d7 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/22.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "038ea79da46341f1a3389642546812f4", + "keywords": "乔布斯,苹果,NeXT", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120715397", + "title": "被忽视的传奇", + "desc": [ + { + "content": "\n在 1985 年,史蒂夫·乔布斯(Steve Jobs)离开了苹果公司,并先后成立了皮克斯动画公司和 NeXT 电脑公司;NeXT 是乔布斯离开苹果后构想的电脑,在乔布斯 1996 年回归苹果公司后被苹果收购,其硬件和软件成为了后续 Mac 电脑和 Mac OS X 系统的基础。", + "language": "markdown" + }, + { + "content": "\nNeXT 电脑平台上诞生了许多伟大的软件,以下哪个软件不是首发在 NeXT 电脑上的?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "电子数据表软件 Vp-Planner", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "世界上首个万维网浏览器 World Wide Web", + "language": "json" + } + ], + [ + { + "content": "PC 模拟器 SoftPC", + "language": "json" + } + ], + [ + { + "content": "经典游戏《毁灭战士》 (DOOM)", + "language": "json" + } + ] + ], + "node_id": "dailycode-3af8b35b6d2d428ea3854f422ee39a39", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/23.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/23.exercises/config.json" new file mode 100644 index 000000000..d6b863af3 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/23.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-9d9d7fb673444ab080b7202400e04a7b", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/23.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/23.exercises/solution.json" new file mode 100644 index 000000000..85e8f726d --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/23.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "0da89a21672a49f2ab070c5b4dc737d1", + "keywords": "LeNet,杨立昆", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/121196929", + "title": "LeNet", + "desc": [ + { + "content": "\n1998 年 11 月 8 日,杨立昆(Yann LeCun)为世界带来了第一个正式的卷积神经网络,他是一名知名计算机科学家,Facebook 首席人工智能科学家,2018 年图灵奖得主;他在机器学习、计算机视觉、移动机器人等领域都有贡献。", + "language": "markdown" + }, + { + "content": "\n杨立昆创造的这个早期经典卷积神经网络叫什么名字?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "LeNet-5", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "LeNet-2", + "language": "json" + } + ], + [ + { + "content": "LeNet-3", + "language": "json" + } + ], + [ + { + "content": "LeNet-4", + "language": "json" + } + ] + ], + "node_id": "dailycode-9d9d7fb673444ab080b7202400e04a7b", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/24.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/24.exercises/config.json" new file mode 100644 index 000000000..abb0cdcfd --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/24.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-1874bb8928ca44d6a48d32b9bf947f1b", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/24.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/24.exercises/solution.json" new file mode 100644 index 000000000..e65fa170e --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/24.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "50f88dae8813427bba15bb16f8f54d22", + "keywords": "编程语言,Fortran", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120757806", + "title": "理论总是早于实践", + "desc": [ + { + "content": "\nFORTRAN 语言是 Formula Translation 的缩写,意为“公式翻译”。它是为科学、工程问题或企事业管理中的那些能够用数学公式表达的问题而设计的,其数值计算的功能较强。FORTRAN 语言是世界上第一个被正式推广使用的高级语言,于 1954 年被提出,并在 1956 年推出第一本使用手册。", + "language": "markdown" + }, + { + "content": "\n1956 年 10 月 15 日诞生的第一本 FORTRAN 语言参考手册,和第一个 FORTRAN 编译器的诞生相差了多少时间?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "六个月", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "三个月", + "language": "json" + } + ], + [ + { + "content": "一年", + "language": "json" + } + ], + [ + { + "content": "两年", + "language": "json" + } + ] + ], + "node_id": "dailycode-1874bb8928ca44d6a48d32b9bf947f1b", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/25.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/25.exercises/config.json" new file mode 100644 index 000000000..cc8d1f3a4 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/25.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-2a111fcaba4341f7a65a09a7ede5a48c", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/25.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/25.exercises/solution.json" new file mode 100644 index 000000000..9e6d6750b --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/25.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "7c93e59e7cce41b48ee72cb3f937c5c1", + "keywords": "Google,Android", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/121153445", + "title": "安卓起源", + "desc": [ + { + "content": "\n2007 年 11 月 5 日,谷歌与 84 家硬件制造商、软件开发商及电信营运商成立开放手持设备联盟(OHA)来共同研发 Android,随后,谷歌以 Apache 免费开放源代码许可证的授权方式,发布了安卓系统的源代码。", + "language": "markdown" + }, + { + "content": "\nAndroid 一词最早诞生于什么地方?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "科幻小说", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "科研论文", + "language": "json" + } + ], + [ + { + "content": "科幻电影", + "language": "json" + } + ], + [ + { + "content": "安迪鲁宾的脑海", + "language": "json" + } + ] + ], + "node_id": "dailycode-2a111fcaba4341f7a65a09a7ede5a48c", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/26.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/26.exercises/config.json" new file mode 100644 index 000000000..cd8ccac7d --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/26.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-20e735ce3b6940bbac5869f49fa2ffae", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/26.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/26.exercises/solution.json" new file mode 100644 index 000000000..4069dc02e --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/26.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "27a0bd060ef740d0b9c2a65f2c630aad", + "keywords": "图灵奖,姚期智", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/121058239", + "title": "姚班传奇", + "desc": [ + { + "content": "\n图灵奖(Turing Award)是计算机界最负盛名的奖项,有“计算机界诺贝尔奖”之称,而 2000 年图灵奖得主姚期智是目前为止唯一一位获得此奖项的华人。姚期智是中国计算机科学家,北京清华大学交叉信息研究院院长,于 1967 年至 2004 年奔赴美国在多所顶尖大学担任计算机教授。", + "language": "markdown" + }, + { + "content": "\n姚期智的母校是哪所大学?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "哈佛大学", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "牛津大学", + "language": "json" + } + ], + [ + { + "content": "清华大学", + "language": "json" + } + ], + [ + { + "content": "剑桥大学", + "language": "json" + } + ] + ], + "node_id": "dailycode-20e735ce3b6940bbac5869f49fa2ffae", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/27.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/27.exercises/config.json" new file mode 100644 index 000000000..8e06c6fb1 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/27.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-82042adf0ebe41d2afb1c38e03eae895", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/27.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/27.exercises/solution.json" new file mode 100644 index 000000000..3bc4efe98 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/27.exercises/solution.json" @@ -0,0 +1,44 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "c1390502fde448c19caa9984714b324b", + "keywords": "人工智能,LISP", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120094247", + "title": "人工智能科学家不关心什么?", + "desc": [ + { + "content": "\n约翰·麦卡锡(John McCarthy)(1927 - 2011),他是计算机科学家和认知科学家。 下面哪个计算机的技术和他最没有关系:", + "language": "markdown" + } + ], + "answer": [ + { + "content": "计算机图形学", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "LISP 语言", + "language": "json" + } + ], + [ + { + "content": "人工智能", + "language": "json" + } + ], + [ + { + "content": "程序逻辑研究", + "language": "json" + } + ] + ], + "node_id": "dailycode-82042adf0ebe41d2afb1c38e03eae895", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/28.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/28.exercises/config.json" new file mode 100644 index 000000000..054488984 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/28.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-ed83b0d2e44b4b3b9792ffdc3edc7c82", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/28.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/28.exercises/solution.json" new file mode 100644 index 000000000..83a1697a6 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/28.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "43cfb1f508214c4b995ef511818f64dc", + "keywords": "浏览器,互联网", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/121287366", + "title": "网络的第一页", + "desc": [ + { + "content": "\n万维网(www)是 World Wide Web 的简称,在 30 年前,即 1991 年 8 月 23 日,万维网首次面向公众开放,由计算机科学家蒂姆·伯纳斯·李设计和部署。万维网的出现推动了互联网的兴起,并发展成为今天我们所熟知的样子。万维网诞生后,网页浏览器也应运而生。", + "language": "markdown" + }, + { + "content": "\n世界上第一个网页浏览器叫什么?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "World Wide Web", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "Netscape Navigator", + "language": "json" + } + ], + [ + { + "content": "Mosaic", + "language": "json" + } + ], + [ + { + "content": "Internet Explorer", + "language": "json" + } + ] + ], + "node_id": "dailycode-ed83b0d2e44b4b3b9792ffdc3edc7c82", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/29.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/29.exercises/config.json" new file mode 100644 index 000000000..411416909 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/29.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-645f76afea594faf899ac96fed1d29b7", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/29.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/29.exercises/solution.json" new file mode 100644 index 000000000..8fe90e4fa --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/29.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "3be0dfc2b9ea4958bedccd2e799c8137", + "keywords": "HTML,H5", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/121003565", + "title": "H5 的坎坷之路", + "desc": [ + { + "content": "\nHTML5 是 HTML 最新的修订版本,由万维网联盟(W3C)于 2014 年 10 月 28 日完成标准制定;目标是取代 1999 年所制定的 HTML 4.01 和 XHTML 1.0 标准,以期能在互联网应用迅速发展的时候,使网络标准达到符合当代的网络需求。", + "language": "markdown" + }, + { + "content": "\nHTML5 的标准制定最早从哪一年开始立项?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "2004 年", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "2014 年", + "language": "json" + } + ], + [ + { + "content": "2012 年", + "language": "json" + } + ], + [ + { + "content": "2008 年", + "language": "json" + } + ] + ], + "node_id": "dailycode-645f76afea594faf899ac96fed1d29b7", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/3.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/3.exercises/config.json" new file mode 100644 index 000000000..e6b86e60c --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/3.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-4f67dc4da72a41f6b12c2ea744c12dda", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/3.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/3.exercises/solution.json" new file mode 100644 index 000000000..c5c42aae9 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/3.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "dceb1e8e031a4356a53f7940619e3830", + "keywords": "微软,比尔·盖茨", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/121386559", + "title": "铭记一生的悲剧", + "desc": [ + { + "content": "\n1970 年 11 月 18 日,比尔·盖茨在西雅图的湖畔中学开始了他的计算机编程生涯;当时,学校里拥有一些早期的计算机,盖茨和他的朋友们几乎把所有的时间都花在了推动这些机器的发展上。", + "language": "markdown" + }, + { + "content": "\n这几位朋友影响了盖茨的一生,其中一位和他共同创建了微软公司;而还有一位是他最好的朋友,为缓解编程压力开始迷上爬山,却不幸在一次登山事故中丧生,这位好朋友的名字是?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "肯特·埃文斯(Kent Evans)", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "保罗·艾伦(Paul Allen)", + "language": "json" + } + ], + [ + { + "content": "里克·韦兰(Rick Welland)", + "language": "json" + } + ], + [ + { + "content": "史蒂夫·鲍尔默(Steve Ballmer)", + "language": "json" + } + ] + ], + "node_id": "dailycode-4f67dc4da72a41f6b12c2ea744c12dda", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/30.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/30.exercises/config.json" new file mode 100644 index 000000000..1419e7fe9 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/30.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-f1bc4c2a0701401a867657c88bfd47e9", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/30.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/30.exercises/solution.json" new file mode 100644 index 000000000..3afa58a90 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/30.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "cd41545d986a4bcaad20b8d617411057", + "keywords": "Golang,Google", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/121240560", + "title": "Go 语言的诞生", + "desc": [ + { + "content": "\nGo 语言又称 Golang,是谷歌(Google)开发的一种静态强类型、编译型、并发型的编程语言。2009 年 11 月 10 日,Go 语言以开源方式向全球发布,如今许多大公司纷纷选择使用 Go 语言来开发服务应用项目。", + "language": "markdown" + }, + { + "content": "\nGo 语言最初的开发者不包括以下的哪一位?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "丹尼斯·里奇(Dennis M. Ritche)", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "罗伯特·格瑞史莫(Robert Griesemer)", + "language": "json" + } + ], + [ + { + "content": "罗伯·派克(Rob Pike)", + "language": "json" + } + ], + [ + { + "content": "肯·汤普森(Kenneth Lane Thompson)", + "language": "json" + } + ] + ], + "node_id": "dailycode-f1bc4c2a0701401a867657c88bfd47e9", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/31.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/31.exercises/config.json" new file mode 100644 index 000000000..0e8ba5934 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/31.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-7dbb8f79dec54d63917d654a988af3d6", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/31.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/31.exercises/solution.json" new file mode 100644 index 000000000..f0ac1953e --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/31.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "10df1013a90f4381943d66f7c025da15", + "keywords": "图灵奖,计算机", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/121187528", + "title": "巾帼英雄", + "desc": [ + { + "content": "\n图灵奖是 1966 年由美国计算机协会设立的奖项,名字来自于著名的英国科学家——艾伦·图灵。图灵奖地位相当于计算机界的诺贝尔奖,一般一年只授予一位计算机科学家,可见审核流程和要求极高。", + "language": "markdown" + }, + { + "content": "\n至今只有三位女性科学家获得过图灵奖,其中**不包括**以下的哪一位?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "阿达·洛芙莱斯(Ada Lovelace)", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "芭芭拉·利斯科夫(Barbara Liskov)", + "language": "json" + } + ], + [ + { + "content": "法兰·艾伦(Frances E. Allen)", + "language": "json" + } + ], + [ + { + "content": "莎菲·戈德瓦瑟(Shafi Goldwasser)", + "language": "json" + } + ] + ], + "node_id": "dailycode-7dbb8f79dec54d63917d654a988af3d6", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/32.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/32.exercises/config.json" new file mode 100644 index 000000000..092cf254f --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/32.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-43ec2f7700d443ef860de334584a26e5", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/32.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/32.exercises/solution.json" new file mode 100644 index 000000000..9ecf79c5f --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/32.exercises/solution.json" @@ -0,0 +1,44 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "409cd315027f4e63887d757ed923ef1d", + "keywords": "视频网站,社交网站", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120779471", + "title": "那个以有趣视频为口号的网站", + "desc": [ + { + "content": "\n中国大陆最早的大规模视频网站是?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "土豆网", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "哔哩哔哩", + "language": "json" + } + ], + [ + { + "content": "爱奇艺", + "language": "json" + } + ], + [ + { + "content": "优酷网", + "language": "json" + } + ] + ], + "node_id": "dailycode-43ec2f7700d443ef860de334584a26e5", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/33.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/33.exercises/config.json" new file mode 100644 index 000000000..59d43766d --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/33.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-5ec33b3b364b406e87fcc94a91078a77", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/33.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/33.exercises/solution.json" new file mode 100644 index 000000000..536419d5a --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/33.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "cdd76779bac54a06b0de021dc4f83f85", + "keywords": "Google,Javascript,Dart", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120682111", + "title": "JS时代的逆行者", + "desc": [ + { + "content": "\n2011 年 10 月 10 日,谷歌推出 Dart 预览版。Dart 由谷歌的拉尔斯·巴克主持开发,目标是成为下一代结构化 Web 开发语言。跟 JavaScript 一样,Dart 也是一种面向对象编程语言,但采用基于类的编程,它只允许单一继承,语法风格接近 C 语言。用 Dart 开发的 Flutter 是近年最受欢迎的跨端技术。", + "language": "markdown" + }, + { + "content": "\n以下哪个中国 App 团队没有选择 Javascript,而是使用了 Dart 语言编写的 Flutter 框架?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "闲鱼", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "QQ", + "language": "json" + } + ], + [ + { + "content": "鱼多多", + "language": "json" + } + ], + [ + { + "content": "天才段子手", + "language": "json" + } + ] + ], + "node_id": "dailycode-5ec33b3b364b406e87fcc94a91078a77", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/34.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/34.exercises/config.json" new file mode 100644 index 000000000..ec99a306a --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/34.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-6f46c79e24064da68c8274135b4e7bb2", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/34.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/34.exercises/solution.json" new file mode 100644 index 000000000..f4891eb5d --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/34.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "e1cc9985b6904c7093607a28a41a51f1", + "keywords": "搜索引擎", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120828788", + "title": "Ask.com用过什么名字?", + "desc": [ + { + "content": "\n搜索引擎 Ask.com 曾是美国第三,世界第六大公网搜索引擎,仅次于 Google 搜索、Bing 和百度、NAVER、Yandex。", + "language": "markdown" + }, + { + "content": "\nAsk.com 曾经用过什么名字?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "Ask Jeeves", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "Ask Jetson", + "language": "json" + } + ], + [ + { + "content": "Ask Java", + "language": "json" + } + ], + [ + { + "content": "Ask Jelly", + "language": "json" + } + ] + ], + "node_id": "dailycode-6f46c79e24064da68c8274135b4e7bb2", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/35.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/35.exercises/config.json" new file mode 100644 index 000000000..67c210cbd --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/35.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-2662cb46d3c74a52845c31c044f25d64", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/35.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/35.exercises/solution.json" new file mode 100644 index 000000000..bafc4669f --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/35.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "02920e5a3618415f84ef698e38eeee20", + "keywords": "Unix,NetBSD", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120962054", + "title": "NetBSD 的口号", + "desc": [ + { + "content": "\nNetBSD 是一份自由、安全的具有高度可定制性的类 Unix 操作系统,适用于多种平台,从 64 位 AMD Athlon 服务器和桌面系统到手持设备和嵌入式设备。", + "language": "markdown" + }, + { + "content": "\nNetBSD 项目的口号是什么?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "Of course it runs NetBSD", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "一次编译,到处运行", + "language": "json" + } + ], + [ + { + "content": "Life is short, use NetBSD", + "language": "json" + } + ], + [ + { + "content": "Life is short, use Unix", + "language": "json" + } + ] + ], + "node_id": "dailycode-2662cb46d3c74a52845c31c044f25d64", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/36.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/36.exercises/config.json" new file mode 100644 index 000000000..c306b2648 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/36.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-fa9ed9743c364d24864df3456b151572", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/36.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/36.exercises/solution.json" new file mode 100644 index 000000000..917eb210f --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/36.exercises/solution.json" @@ -0,0 +1,44 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "ab0a9fbf9b624951a9fa8cfd7fd8abc1", + "keywords": "Perl,网络编程", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120804305", + "title": "四个Larry", + "desc": [ + { + "content": "\nPerl 语言的设计者是?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "拉里·沃尔(Larry Wall)", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "拉里·埃里森(Larry Ellison)", + "language": "json" + } + ], + [ + { + "content": "拉里·特斯勒(Larry Tesler)", + "language": "json" + } + ], + [ + { + "content": "拉里·奈霍夫(Larry Nyhoff)", + "language": "json" + } + ] + ], + "node_id": "dailycode-fa9ed9743c364d24864df3456b151572", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/37.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/37.exercises/config.json" new file mode 100644 index 000000000..426392eba --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/37.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-b92c284f681b44608a543e612537b351", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/37.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/37.exercises/solution.json" new file mode 100644 index 000000000..ab825aacb --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/37.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "ff6b2209183446bda9a4ef86e7589684", + "keywords": "病毒,蠕虫", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/121090690", + "title": "蠕虫起源", + "desc": [ + { + "content": "\n1988 年 11 月 2 日,最早通过互联网传播的计算机蠕虫之一莫里斯蠕虫(Morris worm)诞生。莫里斯蠕虫由康奈尔大学的研究生罗伯特·塔潘·莫里斯(Robert Tappan Morris)编写,首先于麻省理工学院的计算机系统发布;莫里斯的父亲是贝尔实验室的科学家,Unix 的合著者,NCSC(国家计算机安全中心)的前首席科学家。", + "language": "markdown" + }, + { + "content": "\n罗伯特·莫里斯的父亲叫什么名字?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "罗伯特·莫里斯(Robert Morris)", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "德斯蒙德·莫里斯(Desmond Morris)", + "language": "json" + } + ], + [ + { + "content": "切斯塔特·莫里斯(Chestnut Morris)", + "language": "json" + } + ], + [ + { + "content": "威廉·莫里斯(William Morris)", + "language": "json" + } + ] + ], + "node_id": "dailycode-b92c284f681b44608a543e612537b351", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/38.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/38.exercises/config.json" new file mode 100644 index 000000000..a8056fb8a --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/38.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-1f7abd44fd63465f90d5874249906d97", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/38.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/38.exercises/solution.json" new file mode 100644 index 000000000..e29719dfc --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/38.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "5e7253f45fe448b5be33532a6918e68e", + "keywords": "电子游戏,微软,Xbox", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/121325474", + "title": "盖茨的游戏梦", + "desc": [ + { + "content": "\nXbox 是由微软(Microsoft)公司开发的一款家用电视游戏机。在当时,Xbox 和 SONY 的 PlayStation 2,以及任天堂公司的 NGC 形成了三足鼎立的局面,属于当时的“三大主机”。微软为了模糊代际区别,同时也在数字上不低于索尼的游戏机,经常剑走偏锋,不按正常方式命名历代主机。", + "language": "markdown" + }, + { + "content": "\n截至 2021 年,以下哪一项不属于 Xbox 游戏机的历代命名?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "Xbox 4", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "Xbox 360", + "language": "json" + } + ], + [ + { + "content": "Xbox ONE", + "language": "json" + } + ], + [ + { + "content": "Xbox Series", + "language": "json" + } + ] + ], + "node_id": "dailycode-1f7abd44fd63465f90d5874249906d97", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/39.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/39.exercises/config.json" new file mode 100644 index 000000000..d1ab6bb0e --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/39.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-1ab4e305968f4caeab0af3453504084f", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/39.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/39.exercises/solution.json" new file mode 100644 index 000000000..0f2eee2e7 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/39.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "1886700188b443d382178a2d4208773a", + "keywords": "密码学,程序员", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/121259792", + "title": "战火中的程序员", + "desc": [ + { + "content": "\nDonald Michie 是一位英国的人工智能先驱,他开发了 MENACE,世界上最早的井字游戏程序之一。Michie 年轻时赴牛津大学学习古典文学,但时逢二战爆发,为了做点贡献,Michie 转而在学院报名参加日语课程,但他很快发现了学日语对战争的帮助不大。", + "language": "markdown" + }, + { + "content": "\n随后,Michie 换到密码学专业,最终获得了破译德国电传密码“Tunny”的机会;历史上,还有一位大名鼎鼎的程序员参与并主导了 Tunny 密码的破解,这位程序员是?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "艾伦·图灵(Alan Turing)", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "约翰·冯·诺依曼(John von Neumann)", + "language": "json" + } + ], + [ + { + "content": "查尔斯·巴贝奇(Charles Babbage)", + "language": "json" + } + ], + [ + { + "content": "约翰·阿塔那索夫(John Vincent Atanasoff)", + "language": "json" + } + ] + ], + "node_id": "dailycode-1ab4e305968f4caeab0af3453504084f", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/4.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/4.exercises/config.json" new file mode 100644 index 000000000..8fb428fbb --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/4.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-d27e122b8e6b406383a640fe29f0d801", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/4.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/4.exercises/solution.json" new file mode 100644 index 000000000..57c081cd8 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/4.exercises/solution.json" @@ -0,0 +1,44 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "410d190f565644d1a3afb181801a57c5", + "keywords": "C,C++,Java", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120521025", + "title": "编程牛人的盲点", + "desc": [ + { + "content": "\nGuy Steele 从 70 年代起就活跃于编程语言领域,他是 Scheme 的创始人、Sun Java 团队的成员、Emacs 部分命令的最初设计者;他也是《Common Lisp: the Language》的作者。 下面哪个计算机语言是他最不熟悉的:", + "language": "markdown" + } + ], + "answer": [ + { + "content": "C#", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "C", + "language": "json" + } + ], + [ + { + "content": "C++", + "language": "json" + } + ], + [ + { + "content": "COBOL", + "language": "json" + } + ] + ], + "node_id": "dailycode-d27e122b8e6b406383a640fe29f0d801", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/40.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/40.exercises/config.json" new file mode 100644 index 000000000..691f4e16b --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/40.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-de7ff98a55c4460cada3f34683a4681e", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/40.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/40.exercises/solution.json" new file mode 100644 index 000000000..1da883ad4 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/40.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "93704efe09e54517a9366979633389d7", + "keywords": "Fedora,Linux", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/121172168", + "title": "Linux 的软呢帽", + "desc": [ + { + "content": "\nFedora Linux 是较具知名度的 Linux 发行版本之一,由 Fedora 项目社群开发、红帽(RedHat)公司赞助,目标是创建一套新颖、多功能并且自由(开放源代码)的操作系统。截至 2016 年 2 月,Fedora 大约有 120 万用户,其中就包括了 Linux 内核的作者林纳斯·托瓦兹。", + "language": "markdown" + }, + { + "content": "\nFedora Linux 最初的名字叫什么?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "Fedora Core", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "Red Hat Linux", + "language": "json" + } + ], + [ + { + "content": "Fedora BSD", + "language": "json" + } + ], + [ + { + "content": "Red Hat Fedora", + "language": "json" + } + ] + ], + "node_id": "dailycode-de7ff98a55c4460cada3f34683a4681e", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/41.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/41.exercises/config.json" new file mode 100644 index 000000000..46ae4ace5 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/41.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-7ce70a8d2a144e0d93c8d243a3eba9e1", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/41.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/41.exercises/solution.json" new file mode 100644 index 000000000..2b43e1285 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/41.exercises/solution.json" @@ -0,0 +1,44 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "16e1252ae211435699b721a0b27f5f64", + "keywords": "算法,数据结构,程序", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120031215", + "title": "计算机的名人名句", + "desc": [ + { + "content": "\nAlgorithms + Data Structures = Programs(算法+数据结构=程序)是计算机科学的名句。 这是谁的名言?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "尼克劳斯 · 维尔特 (Niklaus Wirth)", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "高德纳 (Donald Knuth)", + "language": "json" + } + ], + [ + { + "content": "比尔 盖茨 (Bill Gates)", + "language": "json" + } + ], + [ + { + "content": "图灵 (Alan Turing)", + "language": "json" + } + ] + ], + "node_id": "dailycode-7ce70a8d2a144e0d93c8d243a3eba9e1", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/42.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/42.exercises/config.json" new file mode 100644 index 000000000..64f22ba58 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/42.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-7ec5c3aa458e4858b4b6b40ef7912f62", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/42.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/42.exercises/solution.json" new file mode 100644 index 000000000..309ae56d8 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/42.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "65e404bc68ce4e31b38dc0f66881631e", + "keywords": "搜索引擎,百度", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120695661", + "title": "“五常”的漏网之鱼", + "desc": [ + { + "content": "\n1999 年 10 月 11 日:域名 baidu.com 上线;次年 1 月 1 日,百度公司正式成立,百度搜索瞬间爆火,成为全球第二大、中国第一的独立搜索引擎;当时,很多个人电脑,包括网吧的电脑浏览器,都被百度搜索所占据。", + "language": "markdown" + }, + { + "content": "\n百度让中国成为了世界上少数拥有独立的、完全自主自研的搜索引擎核心技术的国家。除了中国以外,以下哪个国家不具有自己的搜索引擎核心技术?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "英国", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "韩国", + "language": "json" + } + ], + [ + { + "content": "俄罗斯", + "language": "json" + } + ], + [ + { + "content": "法国", + "language": "json" + } + ] + ], + "node_id": "dailycode-7ec5c3aa458e4858b4b6b40ef7912f62", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/43.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/43.exercises/config.json" new file mode 100644 index 000000000..1b19460a5 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/43.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-5daa7f0d16044577887902bb1d7fe631", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/43.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/43.exercises/solution.json" new file mode 100644 index 000000000..75039a839 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/43.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "7c1fb6870ef849a1a6924ef71f396a39", + "keywords": "Linux,Ubuntu", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120856601", + "title": "Ubuntu 的第一个正式版本于什么时候公布?", + "desc": [ + { + "content": "\nUbuntu Linux 是由南非人马克·沙特尔沃思(Mark Shuttleworth)创办的基于 Debian Linux 的操作系统,是目前最流行的 Linux 发行版之一,是个人和专业用户的热门选择。", + "language": "markdown" + }, + { + "content": "\nUbuntu 的第一个正式版本于什么时候公布?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "2004 年 10 月 20 日", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "2002 年 10 月 21 日", + "language": "json" + } + ], + [ + { + "content": "2003 年 10 月 20 日", + "language": "json" + } + ], + [ + { + "content": "2004 年 10 月 21 日", + "language": "json" + } + ] + ], + "node_id": "dailycode-5daa7f0d16044577887902bb1d7fe631", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/44.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/44.exercises/config.json" new file mode 100644 index 000000000..e27727442 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/44.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-2ad04575e5514b26b1fa814eb860c470", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/44.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/44.exercises/solution.json" new file mode 100644 index 000000000..598a48ec9 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/44.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "1c6f03419e544908b3cc94bc9f5b6a1a", + "keywords": "编程语言,ALGOL,BNF 范式", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120940621", + "title": "编程艺术的构图人", + "desc": [ + { + "content": "\n彼得·诺尔(Peter Naur)1928 年 10 月 25 日诞生于丹麦,他是计算机科学先驱、BNF 范式的共同发明者,也是 2005 年的图灵奖得主。BNF 范式在编写准确程序的方法学上作出了先驱性的贡献,它的名字(Backus-Naur Form)便是由两位计算机科学家命名,其中一位便是诺尔(Naur)。", + "language": "markdown" + }, + { + "content": "\nBNF 范式名字中的另一位科学家(Backus)指的是谁?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "约翰·巴克斯(John Backus)", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "阿诺德·巴克斯(Arnold Backus)", + "language": "json" + } + ], + [ + { + "content": "乔治亚·巴克斯(Georgia Backus)", + "language": "json" + } + ], + [ + { + "content": "林肯·巴克斯(Linkin Backus)", + "language": "json" + } + ] + ], + "node_id": "dailycode-2ad04575e5514b26b1fa814eb860c470", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/45.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/45.exercises/config.json" new file mode 100644 index 000000000..ff3b66353 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/45.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-76f76e1c35fe4e8bb39c9b74184ca7b6", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/45.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/45.exercises/solution.json" new file mode 100644 index 000000000..638fac56f --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/45.exercises/solution.json" @@ -0,0 +1,44 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "f8e099fef82f4113b72836aece50b568", + "keywords": "Microsoft,Windows", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120804305", + "title": "微软激进派的卷土重来", + "desc": [ + { + "content": "\n从 1993 到 2021 年,哪一代 Windows 系统没有开始菜单?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "Windows 8", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "Windows 8.1", + "language": "json" + } + ], + [ + { + "content": "Windows ME", + "language": "json" + } + ], + [ + { + "content": "Windows 95", + "language": "json" + } + ] + ], + "node_id": "dailycode-76f76e1c35fe4e8bb39c9b74184ca7b6", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/46.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/46.exercises/config.json" new file mode 100644 index 000000000..a17ede2b9 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/46.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-8d92677f51f148debc7fab5c5580c0c1", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/46.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/46.exercises/solution.json" new file mode 100644 index 000000000..54a8afe04 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/46.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "b5a86dbdeda04120943be44e94e1bb5a", + "keywords": "比特币,P2P", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/121070968", + "title": "神秘来客", + "desc": [ + { + "content": "\n比特币(Bitcoin)的概念在 2008 年 11 月 1 日提出,一名神秘男子带着一份比特币白皮书出现在密码学邮件列表中;在一年多的时间里,他发布和更新了十多个版本的比特币客户端,但他的真实身份一直不为人所知。", + "language": "markdown" + }, + { + "content": "\n提出比特币概念的人,其网名是什么?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "中本聪(Satoshi Nakamoto)", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "宫本茂(Shigeru Miyamoto)", + "language": "json" + } + ], + [ + { + "content": "山本武(Yamamoto Takeshi)", + "language": "json" + } + ], + [ + { + "content": "松本清(Matsumoto Kiyoshi)", + "language": "json" + } + ] + ], + "node_id": "dailycode-8d92677f51f148debc7fab5c5580c0c1", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/47.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/47.exercises/config.json" new file mode 100644 index 000000000..b6e5cfe87 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/47.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-bf70aecc1ea446cbb690ee7b999f5464", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/47.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/47.exercises/solution.json" new file mode 100644 index 000000000..8239729d3 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/47.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "e61df619aca34e2b99a470250c7c1b9c", + "keywords": "CPL,语言设计", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/121335096", + "title": "贵族中的程序员", + "desc": [ + { + "content": "\nChristopher Strachey 是一名在英国伦敦长大的计算机学者,是指称语义最早的提出者之一,也是编程语言设计的先驱,发展了编程语言 CPL。Strachey 是第一男爵亨利·斯特雷奇爵士的曾孙,所在的斯特雷奇家族是伦敦的名门望族,在科技、艺术、行政和学术界都十分突出。", + "language": "markdown" + }, + { + "content": "\nChristopher Strachey 毕业于哪所大学?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "剑桥大学国王学院", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "牛津大学", + "language": "json" + } + ], + [ + { + "content": "麻省理工学院", + "language": "json" + } + ], + [ + { + "content": "加州大学洛杉矶分校", + "language": "json" + } + ] + ], + "node_id": "dailycode-bf70aecc1ea446cbb690ee7b999f5464", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/48.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/48.exercises/config.json" new file mode 100644 index 000000000..0fa5bd35a --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/48.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-98c411255a4a4cb19daf3b8c4b26f169", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/48.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/48.exercises/solution.json" new file mode 100644 index 000000000..0003f05c2 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/48.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "82ebdc3b8a2c44209d05eadc844a01c4", + "keywords": "英特尔,CPU", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120896267", + "title": "不那么正经的图片工厂", + "desc": [ + { + "content": "\n世界上第一枚微处理器 Intel 4004 在 1971 年正式推出,英特尔反复重启这项芯片的生产计划,以至于它其实一共拥有四个设计者。", + "language": "markdown" + }, + { + "content": "\n以下四个人名中,哪一个不是 Intel 4004 的设计者?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "Chester Carlson", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "Masatoshi Shima", + "language": "json" + } + ], + [ + { + "content": "Stanley Mazor", + "language": "json" + } + ], + [ + { + "content": "Ted Hoff", + "language": "json" + } + ] + ], + "node_id": "dailycode-98c411255a4a4cb19daf3b8c4b26f169", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/49.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/49.exercises/config.json" new file mode 100644 index 000000000..4f99850d6 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/49.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-70f7f6a456bb462dbb55aeecadadf626", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/49.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/49.exercises/solution.json" new file mode 100644 index 000000000..21310c441 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/49.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "72868e61542947f38bdfce33823e0a32", + "keywords": "超级计算机,ENIAC", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120735888", + "title": "巾帼英雄有多少", + "desc": [ + { + "content": "\nENIAC 是继 ABC(阿塔纳索夫-贝瑞计算机)之后的第二台电子计算机和第一台通用计算机;它是完全的电子计算机,能够重新编程,解决各种计算问题。ENIAC 于 1946 年 2 月 14 日在美国宣告诞生, 承担开发任务的人员由科学家约翰·冯·诺依曼和“莫尔小组”的工程师埃克特、莫克利、戈尔斯坦以及华人科学家朱传榘等人组成。", + "language": "markdown" + }, + { + "content": "\nENIAC 的开发团队里有几位女性程序员?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "6 位", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "4 位", + "language": "json" + } + ], + [ + { + "content": "5 位", + "language": "json" + } + ], + [ + { + "content": "没有女性", + "language": "json" + } + ] + ], + "node_id": "dailycode-70f7f6a456bb462dbb55aeecadadf626", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/5.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/5.exercises/config.json" new file mode 100644 index 000000000..30476f67b --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/5.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-d532c487ab864bf2b1a89733541daa2a", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/5.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/5.exercises/solution.json" new file mode 100644 index 000000000..d5cc67698 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/5.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "134d8827bbc74a18af65ec5a9bd8f9f5", + "keywords": "电子游戏,steam", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/121110776", + "title": "“G胖”的过去", + "desc": [ + { + "content": "\nGabe Newell 诞生于 1962 年 11 月 3 日,有不少的中国电脑游戏玩家都认识他,因为他是知名游戏公司 Valve 和主流游戏平台 Steam 的创始人,被亲切地称为“G胖”。Steam 平台是 Valve 公司亲自开发设计的游戏和软件平台,是全球最大的综合性数字发行平台之一。", + "language": "markdown" + }, + { + "content": "\n在走入游戏行业前,Gabe Newell 还做过什么事?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "开发了 Windows 操作系统的第一代", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "参与了贝尔实验室的最后一个项目", + "language": "json" + } + ], + [ + { + "content": "创建了维基百科", + "language": "json" + } + ], + [ + { + "content": "协助开发了 C++ 编译器", + "language": "json" + } + ] + ], + "node_id": "dailycode-d532c487ab864bf2b1a89733541daa2a", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/50.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/50.exercises/config.json" new file mode 100644 index 000000000..02e6d3a8b --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/50.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-12a2e7d208a34209ae453b06633584d4", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/50.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/50.exercises/solution.json" new file mode 100644 index 000000000..f1de79a15 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/50.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "1a23639f365544c0b6126117a3eddf45", + "keywords": "微软,Intel", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/121213157", + "title": "微软的灾难", + "desc": [ + { + "content": "\n微软反垄断案又称微软反托拉斯案,是指 1997 年 10 月开始微软涉及的一系列反垄断案件;这起案件导致了微软和 Intel 公开分裂,还使得微软开源了自己的部分技术,让美国司法部打出了“推动创新”的旗号,掀起了第一波 PC 软件产业发展高潮。", + "language": "markdown" + }, + { + "content": "\nWindows XP 诞生后的某一年,比尔·盖茨首次出庭为微软辩护,这是历史上的哪一年?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "2002 年", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "2001 年", + "language": "json" + } + ], + [ + { + "content": "1998 年", + "language": "json" + } + ], + [ + { + "content": "2006 年", + "language": "json" + } + ] + ], + "node_id": "dailycode-12a2e7d208a34209ae453b06633584d4", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/51.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/51.exercises/config.json" new file mode 100644 index 000000000..254d7151a --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/51.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-3a4af76d4d6348139205ea2b8874fbe6", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/51.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/51.exercises/solution.json" new file mode 100644 index 000000000..e30f3994e --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/51.exercises/solution.json" @@ -0,0 +1,44 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "54bd30a003c7460e93aa7ebd06c9f56c", + "keywords": "网络传输,网络工具,网络优化", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120779471", + "title": "你了解你身边的这个工具吗?", + "desc": [ + { + "content": "\nPing 是一个常用的网络工具, 它Ping 是一个著名的命令行实用工具,用于测试 LAN 和 WAN 中设备之间的连接性和可达性,Ping 可以向指定的 URL 或 IP 地址发送一个 ICMP (Internet Control Message Protocol)回显请求包,并期望目标主机发送一个 ICMP 回显应答。如果收到目标主机的应答,则表明该主机仍在运行。\nPing 的全名是什么?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "Packet InterNet Groper", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "Ping", + "language": "json" + } + ], + [ + { + "content": "Ping Is Not Groper", + "language": "json" + } + ], + [ + { + "content": "Probe Internet NG", + "language": "json" + } + ] + ], + "node_id": "dailycode-3a4af76d4d6348139205ea2b8874fbe6", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/52.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/52.exercises/config.json" new file mode 100644 index 000000000..76325c0ab --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/52.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-d689d8cd98cf4c6ab0db382d775cf3f8", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/52.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/52.exercises/solution.json" new file mode 100644 index 000000000..33d742464 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/52.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "07554c8c75564e19b5cf6fa0f855070e", + "keywords": "Google,智能家居", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/121131852", + "title": "谷歌的智能家居", + "desc": [ + { + "content": "\n2016 年,亚马逊推出了智能家居产品 Amazon Echo,一时风靡全美。谷歌很快便注意到这一商机,推出了 Google Home 进军智能家居市场,且微软、Facebook 和苹果都对此虎视眈眈。", + "language": "markdown" + }, + { + "content": "\nGoogle Home 最初是什么形式的家居产品?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "智能音箱", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "智能开关", + "language": "json" + } + ], + [ + { + "content": "智能电视", + "language": "json" + } + ], + [ + { + "content": "智能沙发", + "language": "json" + } + ] + ], + "node_id": "dailycode-d689d8cd98cf4c6ab0db382d775cf3f8", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/53.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/53.exercises/config.json" new file mode 100644 index 000000000..670fac067 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/53.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-b1f359376f0948de9214b9a9114c983b", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/53.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/53.exercises/solution.json" new file mode 100644 index 000000000..7888d38f6 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/53.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "e185da4c18354cde89c8fb696083f854", + "keywords": "电子游戏", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/121044111", + "title": "第一次冒险", + "desc": [ + { + "content": "\n冒险游戏是一种电子游戏类型,1980 年,美国的一对夫妇 Roberta Williams 和 Ken Williams 打破了冒险游戏的格局,推出了世界上第一款有图像,而非纯文字画面的冒险游戏《谜之屋》(Mystery House)。", + "language": "markdown" + }, + { + "content": "\n在这款游戏的设计过程中,这对夫妇是怎么分工的?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "妻子设计,丈夫编程", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "妻子编程,丈夫宣传", + "language": "json" + } + ], + [ + { + "content": "妻子宣传,丈夫设计", + "language": "json" + } + ], + [ + { + "content": "两人共同编程", + "language": "json" + } + ] + ], + "node_id": "dailycode-b1f359376f0948de9214b9a9114c983b", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/54.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/54.exercises/config.json" new file mode 100644 index 000000000..78ac34710 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/54.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-4e899355f25e44f3bd5411bbafe1db2f", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/54.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/54.exercises/solution.json" new file mode 100644 index 000000000..9b8087b72 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/54.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "e5192e63e55241a1b4ace82aa31176eb", + "keywords": "Paypal,移动支付", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120779471", + "title": "反抗黑帮的人", + "desc": [ + { + "content": "\n1999 年,Paypal 正式上线,这家初创公司刚上线就被多家互联网公司狙击,在四年的“支付战争”中活了下来并卖给 eBay。Paypal 的创始成员在收购后离开了公司,并创立了许多具有影响力的新公司,这些人被称为“PayPal 黑帮”。", + "language": "markdown" + }, + { + "content": "\n问题:“PayPal 黑帮”不包括以下的哪一位?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "帕特里克·克里森(Patrick Collison)", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "埃隆·马斯克(Elon Musk)", + "language": "json" + } + ], + [ + { + "content": "陈士骏(Steve Chen)", + "language": "json" + } + ], + [ + { + "content": "里德·霍夫曼(Reid Hoffman)", + "language": "json" + } + ] + ], + "node_id": "dailycode-4e899355f25e44f3bd5411bbafe1db2f", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/55.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/55.exercises/config.json" new file mode 100644 index 000000000..3c38ef575 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/55.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-162687a20eff465e9380c51be73134aa", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/55.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/55.exercises/solution.json" new file mode 100644 index 000000000..ee58f9e3e --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/55.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "e83ac1a541d24ef1888ee5d6d2f46d2f", + "keywords": "网络安全,杀毒软件", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/121313480", + "title": "讽刺的名字", + "desc": [ + { + "content": "\nSymantec 公司曾发布一款个人信息安全产品 Norton Antivirus,也便是大名鼎鼎的诺顿杀毒;在美国,诺顿是市场占有率第一的杀毒软件。但事实上,诺顿杀毒软件的名字却来源于一个不相信电脑病毒存在的程序员,这个程序员曾出版《计算机概论》,为计算机的发展带来了许多贡献。", + "language": "markdown" + }, + { + "content": "\n这位程序员的名字叫什么?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "彼得·诺顿(Peter Norton)", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "玛丽·诺顿(Mary Norton)", + "language": "json" + } + ], + [ + { + "content": "爱德华·诺顿(Edward Norton)", + "language": "json" + } + ], + [ + { + "content": "詹姆·诺顿(Jame Norton)", + "language": "json" + } + ] + ], + "node_id": "dailycode-162687a20eff465e9380c51be73134aa", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/56.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/56.exercises/config.json" new file mode 100644 index 000000000..6c412d376 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/56.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-d4ca484c2c2c4851ae05f24efa69387a", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/56.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/56.exercises/solution.json" new file mode 100644 index 000000000..70dd1823d --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/56.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "7fac3a6d1f594315b26351ea9e5d0327", + "keywords": "流媒体,短视频", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120983128", + "title": "短视频鼻祖", + "desc": [ + { + "content": "\n短视频是指在各种新媒体平台上播放的、适合在移动状态和短时休闲状态下观看的、高频推送的视频内容,几秒到几分钟不等。如今短视频这一流媒体形式火爆全球,仅在中国就有 8.73 亿用户(截至 2020 年),占网民整体的 88.3%。", + "language": "markdown" + }, + { + "content": "\n短视频的鼻祖是哪个软件?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "Vine", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "抖音", + "language": "json" + } + ], + [ + { + "content": "Instagram", + "language": "json" + } + ], + [ + { + "content": "Lasso", + "language": "json" + } + ] + ], + "node_id": "dailycode-d4ca484c2c2c4851ae05f24efa69387a", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/57.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/57.exercises/config.json" new file mode 100644 index 000000000..1e5c19423 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/57.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-3f3d19b3a7dd432780f957e0e72457c1", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/57.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/57.exercises/solution.json" new file mode 100644 index 000000000..b20d5a6a7 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/57.exercises/solution.json" @@ -0,0 +1,44 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "bb53cd430e7a4692b17d7f9edef68804", + "keywords": "IBM,计算机", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120779471", + "title": "IBM 最头疼的人是谁?", + "desc": [ + { + "content": "\n在 1950年代末到1960 年代,IBM 公司在计算机行业的主要竞争对手是?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "CDC (Control Data Corp.)", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "HP (Hewlett Packard)", + "language": "json" + } + ], + [ + { + "content": "Dell", + "language": "json" + } + ], + [ + { + "content": "Wang (王安电脑)", + "language": "json" + } + ] + ], + "node_id": "dailycode-3f3d19b3a7dd432780f957e0e72457c1", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/58.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/58.exercises/config.json" new file mode 100644 index 000000000..2e83bafed --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/58.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-9cba35f3c300452c8ff82045b0fbfe6f", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/58.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/58.exercises/solution.json" new file mode 100644 index 000000000..00fa2347e --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/58.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "cf49a23577bb46e69d613c79c130e2e5", + "keywords": "Yahoo", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/121172168", + "title": "雅虎酋长", + "desc": [ + { + "content": "\n杨致远(Jerry Yang)是知名门户网站雅虎(Yahoo!)的共同创始人,他于 1968 年 11 月 6 日出生于中国台湾省台北市;那时,虽然杨致远创办了雅虎,但他并没有匆忙涉足具体的经营事务,于是他给自己起的头衔是“酋长 ”(Chief)。", + "language": "markdown" + }, + { + "content": "\n除了杨致远,雅虎的另一个创办人也叫作“雅虎酋长”,这个人的名字是?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "大卫·费罗", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "大卫·马尔", + "language": "json" + } + ], + [ + { + "content": "大卫·席尔瓦", + "language": "json" + } + ], + [ + { + "content": "大卫·帕特森", + "language": "json" + } + ] + ], + "node_id": "dailycode-9cba35f3c300452c8ff82045b0fbfe6f", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/59.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/59.exercises/config.json" new file mode 100644 index 000000000..e7eeaf6bb --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/59.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-7359c47192094def92008a17778d76bf", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/59.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/59.exercises/solution.json" new file mode 100644 index 000000000..a8587197e --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/59.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "6e2ad06078c547c28988f7f98a5aadc2", + "keywords": "腾讯,QQ", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/121259792", + "title": "企鹅帝国", + "desc": [ + { + "content": "\n腾讯公司是我国规模最大的互联网公司,于 1998 年 11 月由马化腾、张志东、陈一丹、许晨晔、曾李青 5 位创始人共同创立,总部位于深圳南山区腾讯滨海大厦。", + "language": "markdown" + }, + { + "content": "\n腾讯公司推出的第一个产品是什么?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "OICQ", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "ICQ", + "language": "json" + } + ], + [ + { + "content": "QQ", + "language": "json" + } + ], + [ + { + "content": "微信(WeChat)", + "language": "json" + } + ] + ], + "node_id": "dailycode-7359c47192094def92008a17778d76bf", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/6.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/6.exercises/config.json" new file mode 100644 index 000000000..1b4d90d2f --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/6.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-6db64e6fef8c41979a0e555a73904772", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/6.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/6.exercises/solution.json" new file mode 100644 index 000000000..0645ddef3 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/6.exercises/solution.json" @@ -0,0 +1,44 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "a38c6b8a4db34a2886ac24ab5f451530", + "keywords": "任天堂,电视游戏", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120815589", + "title": "“红白机”到底叫什么?", + "desc": [ + { + "content": "\n“红白机”是许多人童年流行的游戏机,由硬件开发公司任天堂发行,“红白机”在美国的名字叫什么?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "NES", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "FC", + "language": "json" + } + ], + [ + { + "content": "GBA", + "language": "json" + } + ], + [ + { + "content": "SFC", + "language": "json" + } + ] + ], + "node_id": "dailycode-6db64e6fef8c41979a0e555a73904772", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/60.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/60.exercises/config.json" new file mode 100644 index 000000000..ac2a8bd62 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/60.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-a6e79afb743b483d86f9e071f878b420", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/60.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/60.exercises/solution.json" new file mode 100644 index 000000000..a919ce406 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/60.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "5b39d9e337c74e30aebaff805c9403a6", + "keywords": "Linux,Slackware", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120856601", + "title": "发明Linux的帕特里克", + "desc": [ + { + "content": "\nSlackware Linux 是目前市场存活时间最长的 Linux 发行版之一,它基于一个叫做 SLS(Soft Landing Systems)的 Linux 项目而设计,易于使用和稳定。", + "language": "markdown" + }, + { + "content": "\nSlackware Linux 的创始人是谁?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "Patrick Volkerding", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "Patrick Schueffel", + "language": "json" + } + ], + [ + { + "content": "Patrick Loubert", + "language": "json" + } + ], + [ + { + "content": "Patrick Drahi", + "language": "json" + } + ] + ], + "node_id": "dailycode-a6e79afb743b483d86f9e071f878b420", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/61.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/61.exercises/config.json" new file mode 100644 index 000000000..82fccba88 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/61.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-30cd8f8325714a92982bd2cf0630afc4", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/61.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/61.exercises/solution.json" new file mode 100644 index 000000000..0a0597c4c --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/61.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "097f16f76a5249ee9587742d2a98d99e", + "keywords": "中关村,程序人生", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120645802", + "title": "京城创业圈", + "desc": [ + { + "content": "\n北四环西路以南、海淀南路以北,苏州街以东、中关村大街以西,这四条路围成的方圆一公里左右的方形地块,成就了大名鼎鼎的中关村。中关村被媒体称为“中国的硅谷”,这个科技园里有着国内著名的大学和科研机构,人才比较集中,还有名扬国内外的电子企业和电子贸易。", + "language": "markdown" + }, + { + "content": "\n以下哪一家公司是起源于中关村的?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "京东", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "拼多多", + "language": "json" + } + ], + [ + { + "content": "饿了么", + "language": "json" + } + ], + [ + { + "content": "哔哩哔哩", + "language": "json" + } + ] + ], + "node_id": "dailycode-30cd8f8325714a92982bd2cf0630afc4", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/62.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/62.exercises/config.json" new file mode 100644 index 000000000..4be0b260f --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/62.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-7881e4a81e864c7bac1abf1e2bdf4da2", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/62.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/62.exercises/solution.json" new file mode 100644 index 000000000..bef93745c --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/62.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "75264b2f071f4d0da87f214e2c40d175", + "keywords": "微软,Windows", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120940621", + "title": "最初的代号", + "desc": [ + { + "content": "\nWindows XP 是微软公司生产的用于个人电脑的 32 位和 64 位操作系统系列,于 2001 年 10 月 25 日正式发布。Win XP 的默认桌面是一张纳帕县郊外的风景照片,照片中包括了高低起伏的绿山及有层积云和卷云的蓝天,承载了无数开发者的回忆。", + "language": "markdown" + }, + { + "content": "\nWindows XP 最初的代号是什么?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "Whistler(惠斯勒)", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "Odyssey(奥德赛)", + "language": "json" + } + ], + [ + { + "content": "Janus(双面神)", + "language": "json" + } + ], + [ + { + "content": "Zeus(宙斯)", + "language": "json" + } + ] + ], + "node_id": "dailycode-7881e4a81e864c7bac1abf1e2bdf4da2", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/63.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/63.exercises/config.json" new file mode 100644 index 000000000..f5c8e368a --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/63.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-0624b49dc8e44aadb007ba6d2715c137", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/63.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/63.exercises/solution.json" new file mode 100644 index 000000000..62543744f --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/63.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "09600077fad04d3b8b688ce100d6aa45", + "keywords": "超级计算机,电子计算机", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120645802", + "title": "扑朔迷离", + "desc": [ + { + "content": "\n1947 年起,第一批计算机被集中使用,其特点是机电结构和部分程序设计;在此期间,ISO 成立,并在标准化编程语言和其他通用计算类别(如操作系统)中发挥了重要作用。同年 10 月 9 日,诺斯罗普飞机公司和电子控制公司签署了一份建造二进制自动计算机的合同;它是人类的第二台存储程序计算机(如今被称为“通用计算机”),也是美国的第一台通用计算机。", + "language": "markdown" + }, + { + "content": "\n这台计算机的名字叫:", + "language": "markdown" + } + ], + "answer": [ + { + "content": "BINAC", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "EDSAC", + "language": "json" + } + ], + [ + { + "content": "EDVAC", + "language": "json" + } + ], + [ + { + "content": "ENIAC", + "language": "json" + } + ] + ], + "node_id": "dailycode-0624b49dc8e44aadb007ba6d2715c137", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/64.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/64.exercises/config.json" new file mode 100644 index 000000000..4c1c081e1 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/64.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-a6d8223f903a4e40ab87582765198156", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/64.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/64.exercises/solution.json" new file mode 100644 index 000000000..1c892952f --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/64.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "6b6607565e3c40788a07af9a12ca3844", + "keywords": "开源,RISC-V", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/121335096", + "title": "RISC-V 的掌门人", + "desc": [ + { + "content": "\nRISC-V 是一个基于精简指令集(RISC)原则的开源指令集架构(ISA),简单解释为开源软件运动相对应的一种“开源硬件”;如今 RISC-V 基金会的创始人在广东的清华-伯克利深圳学院(TBSI)建立了 RISC-V 的国际开源实验室,而这个人也是 2017 年的图灵奖得主。", + "language": "markdown" + }, + { + "content": "\n这个人是谁?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "大卫·帕特森(David Patterson)", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "约翰·轩尼诗(John Hennessy)", + "language": "json" + } + ], + [ + { + "content": "唐纳德·克努特(Donald ErvinKnuth)", + "language": "json" + } + ], + [ + { + "content": "约翰·巴克斯(John Backus)", + "language": "json" + } + ] + ], + "node_id": "dailycode-a6d8223f903a4e40ab87582765198156", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/65.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/65.exercises/config.json" new file mode 100644 index 000000000..018f2ebc0 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/65.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-251b5a16ba714934a8a7fa216307fa6d", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/65.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/65.exercises/solution.json" new file mode 100644 index 000000000..5dbed2255 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/65.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "f350c4e611094ee6a8a6be5ead160580", + "keywords": "Apple,iphone", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/121070968", + "title": "苹果的厨子", + "desc": [ + { + "content": "\n蒂姆·库克出生于 1960 年 11 月 1 日,他于 1998 年 3 月加入苹果公司,并在 2011 年正式执掌苹果公司;在他担任 CEO 期间,他主张对国际和国内的通信监控、网络安全和环境保护进行改革,并通过关闭世界各地帮助提高利润率的仓库和工厂,让苹果退出了制造业。到了 2020 年,苹果的收入和利润翻了一番,成为了名副其实的科技巨头。", + "language": "markdown" + }, + { + "content": "\n库克在担任首席执行官(CEO)之前,一直担任什么职位?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "COO(首席运营官)", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "CSO(首席营销官)", + "language": "json" + } + ], + [ + { + "content": "CTO(首席技术官)", + "language": "json" + } + ], + [ + { + "content": "CFO(首席财务官)", + "language": "json" + } + ] + ], + "node_id": "dailycode-251b5a16ba714934a8a7fa216307fa6d", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/66.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/66.exercises/config.json" new file mode 100644 index 000000000..ae8d304cd --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/66.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-97b847e683774717bd5cce6bf5c6f009", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/66.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/66.exercises/solution.json" new file mode 100644 index 000000000..e5faacfd1 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/66.exercises/solution.json" @@ -0,0 +1,44 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "03170ead7ae944d3becd3186140f9ee2", + "keywords": "反间谍,网络安全,信息安全", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120779471", + "title": "“间谍软件”一词的诞生", + "desc": [ + { + "content": "\n世界上第一种反间谍软件产品是?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "Optout", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "SpyZero", + "language": "json" + } + ], + [ + { + "content": "Trackware", + "language": "json" + } + ], + [ + { + "content": "PeerPoints", + "language": "json" + } + ] + ], + "node_id": "dailycode-97b847e683774717bd5cce6bf5c6f009", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/67.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/67.exercises/config.json" new file mode 100644 index 000000000..3bfd07516 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/67.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-dbfc9553f0754363921f59cf92d01440", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/67.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/67.exercises/solution.json" new file mode 100644 index 000000000..759edfcbe --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/67.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "d92fcb7ce8624e22a4f5df1aa837ee5c", + "keywords": "Google,Google Play,应用商店", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120695661", + "title": "Google Play 以前的名字叫什么?", + "desc": [ + { + "content": "\nGoogle Play 又称 Play Store(Play 商店),是由 Google 公司经营开发的数字化应用发布平台。Google Play 是运行 Android 操作系统设备的官方应用程序商店,允许用户浏览、下载和使用 Android SDK 开发并通过 Google 发布的应用程序。", + "language": "markdown" + }, + { + "content": "\nGoogle Play 的前身叫什么名字?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "Android Market", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "Google Store", + "language": "json" + } + ], + [ + { + "content": "Android Store", + "language": "json" + } + ], + [ + { + "content": "Google Market", + "language": "json" + } + ] + ], + "node_id": "dailycode-dbfc9553f0754363921f59cf92d01440", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/68.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/68.exercises/config.json" new file mode 100644 index 000000000..c11e63478 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/68.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-6e51f330d8694426add5c311f6ceef7b", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/68.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/68.exercises/solution.json" new file mode 100644 index 000000000..b977bb32e --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/68.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "6e756d6939654591b645c0458629e3b9", + "keywords": "图片分享网站,网络社区", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120875612", + "title": "不那么正经的图片工厂", + "desc": [ + { + "content": "\n免费的图片分享网站 Imgur 创办于2009年,提供了简单直接、带编辑功能的图片在线分享服务,如果 说 Facebook 或者 Flickr 是正规相册、照片的聚集地的话,Imgur 就是类似截图、PS 图以及各种搞笑图的归属之地。", + "language": "markdown" + }, + { + "content": "\nImgur 的创始人是?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "Alan Schaaf", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "Alan Eustace", + "language": "json" + } + ], + [ + { + "content": "Alan Patricof", + "language": "json" + } + ], + [ + { + "content": "Alan Walker", + "language": "json" + } + ] + ], + "node_id": "dailycode-6e51f330d8694426add5c311f6ceef7b", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/69.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/69.exercises/config.json" new file mode 100644 index 000000000..45a899b5a --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/69.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-a4e1e718a2454c02acf68d29536aeb0e", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/69.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/69.exercises/solution.json" new file mode 100644 index 000000000..dee18869f --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/69.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "6539c17fae3240a38b12cf929d610001", + "keywords": "个性推荐,大数据", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/121131852", + "title": "大学生开辟的时代", + "desc": [ + { + "content": "\n2001 年 11 月 4 日,四名大学生创建了 StumbleUpon,这是一个网站内容推荐服务引擎,可以根据用户的个人偏好,把符合偏好的、被最多人所推荐的网站进行推荐;在美国,很多人把 StumbleUpon 称作是 Web 3.0 的先驱,因为它把用户个性数据巧妙的融合到搜索技术之中,为用户提供更加贴身的搜索服务。", + "language": "markdown" + }, + { + "content": "\n这四名大学生来自哪所大学?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "卡尔加里大学", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "剑桥大学", + "language": "json" + } + ], + [ + { + "content": "哈佛大学", + "language": "json" + } + ], + [ + { + "content": "康奈尔大学", + "language": "json" + } + ] + ], + "node_id": "dailycode-a4e1e718a2454c02acf68d29536aeb0e", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/7.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/7.exercises/config.json" new file mode 100644 index 000000000..ac87bc838 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/7.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-ae3f4c23378d488fae3eef5e1ea5b9d6", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/7.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/7.exercises/solution.json" new file mode 100644 index 000000000..6f2871b45 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/7.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "56c12df0b497401582d9ccc82b248801", + "keywords": "大众点评,社交网站", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120735888", + "title": "中美点评谁更早?", + "desc": [ + { + "content": "\n美国最大的点评网站是 Yelp,它于 2004 年的 10 月 13 日在旧金山起步,囊括各地餐馆、购物中心、酒店、旅游等领域的商户,用户可以在 Yelp 网站中给商户打分,提交评论,交流购物体验等。", + "language": "markdown" + }, + { + "content": "\nYelp 网的诞生时间和中国的大众点评相差几年?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "比大众点评晚 1 年", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "比大众点评早 1 年", + "language": "json" + } + ], + [ + { + "content": "和大众点评同年诞生", + "language": "json" + } + ], + [ + { + "content": "比大众点评晚 2 年", + "language": "json" + } + ] + ], + "node_id": "dailycode-ae3f4c23378d488fae3eef5e1ea5b9d6", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/70.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/70.exercises/config.json" new file mode 100644 index 000000000..edf0f130b --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/70.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-6f559fe983984cfa972d8898e37d9e65", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/70.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/70.exercises/solution.json" new file mode 100644 index 000000000..d89b7e931 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/70.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "df501fa6a22744838866ac2a6c87acd3", + "keywords": "乔布斯,苹果,iOS", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120756123", + "title": "iOS 变迁史", + "desc": [ + { + "content": "\n2011 年 10 月 14 日,乔布斯的遗作 iPhone 4S 发售;2020 年 10 月 14 日,恰恰是同一日,iPhone 12 发布。", + "language": "markdown" + }, + { + "content": "\niPhone 4S 一共经历了几个版本的 iOS 系统更新?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "五个", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "三个", + "language": "json" + } + ], + [ + { + "content": "四个", + "language": "json" + } + ], + [ + { + "content": "六个", + "language": "json" + } + ] + ], + "node_id": "dailycode-6f559fe983984cfa972d8898e37d9e65", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/71.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/71.exercises/config.json" new file mode 100644 index 000000000..0f8ef2d08 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/71.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-5090ab3ccc5b43cfaec61d71920b575c", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/71.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/71.exercises/solution.json" new file mode 100644 index 000000000..499450c4f --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/71.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "4b6a160120784a4196f633c972e93e57", + "keywords": "TensorFlow,Google", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/121213157", + "title": "微软的灾难", + "desc": [ + { + "content": "\nTensorFlow 是一个开源软件库,用于各种感知和语言理解任务的机器学习,在 2015 年 11 月 9 日正式发布;TensorFlow 目前被 50 个团队用于研究和生产许多 Google 商业产品,是数学、机器学习和深度学习领域应用最广泛的开源工具之一。", + "language": "markdown" + }, + { + "content": "\nTensorFlow 是由谷歌的哪一支团队研发而出?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "谷歌大脑(Google Brain)", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "谷歌团队(Google Teamwork)", + "language": "json" + } + ], + [ + { + "content": "谷歌舰队(Google Armada)", + "language": "json" + } + ], + [ + { + "content": "谷歌智囊(Google Truster)", + "language": "json" + } + ] + ], + "node_id": "dailycode-5090ab3ccc5b43cfaec61d71920b575c", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/72.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/72.exercises/config.json" new file mode 100644 index 000000000..e864e436a --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/72.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-d4f63b8f23874b9c8f7a5a8cd91dcbe7", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/72.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/72.exercises/solution.json" new file mode 100644 index 000000000..6726b5710 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/72.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "6a9b05cf049d4f58bd6b3390fc22a55a", + "keywords": "浏览器,网景", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/121313480", + "title": "分庭抗礼", + "desc": [ + { + "content": "\n世界上第一个被广泛使用的互联网浏览器是网景公司(Netscape)开发的 Netscape Nevigator,它在 20 世纪 90 年代中期时市场占有率曾一度高达90%。事实上,网景浏览器最初不叫这个名字,因为当时市场上最火的浏览器是 NCSA Mosaic,因此取了一个和 Mosaic 息息相关的名字,狙击当时的浏览器霸主 Mosaic。", + "language": "markdown" + }, + { + "content": "\nNetscape Nevigator 最初的名字叫什么?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "Mosaic Netscape", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "Mozilla Nevigator", + "language": "json" + } + ], + [ + { + "content": "Mosaic Mozilla", + "language": "json" + } + ], + [ + { + "content": "Netscape Mosaic", + "language": "json" + } + ] + ], + "node_id": "dailycode-d4f63b8f23874b9c8f7a5a8cd91dcbe7", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/73.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/73.exercises/config.json" new file mode 100644 index 000000000..f3f86d5a7 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/73.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-77a791d530dc402db72d691e6b89d3c3", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/73.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/73.exercises/solution.json" new file mode 100644 index 000000000..38ea59a4b --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/73.exercises/solution.json" @@ -0,0 +1,44 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "693b2693f853471986818554b4312d64", + "keywords": "程序人生,计算机名人", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120052713", + "title": "只有偏执狂才能生存", + "desc": [ + { + "content": "\n“成功滋生自满,自满滋生失败。只有偏执狂才能生存。” “Success breeds complacency. Complacency breeds failure. Only the paranoid survive.” 这句名言来自于哪个 IT 界的领袖:", + "language": "markdown" + } + ], + "answer": [ + { + "content": "安迪·葛洛夫 Andy Grove", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "比尔·盖茨 Bill Gates", + "language": "json" + } + ], + [ + { + "content": "史蒂夫·乔布斯 Steve Jobs", + "language": "json" + } + ], + [ + { + "content": "伊隆·马斯克 Elon Musk", + "language": "json" + } + ] + ], + "node_id": "dailycode-77a791d530dc402db72d691e6b89d3c3", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/74.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/74.exercises/config.json" new file mode 100644 index 000000000..b6855c743 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/74.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-a48d3d86c52344df91d358ecd2f8f63f", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/74.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/74.exercises/solution.json" new file mode 100644 index 000000000..239a65dd6 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/74.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "0aac16d6f8624c1389ec12dd6bfa0306", + "keywords": "计算机,布尔逻辑", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/121044111", + "title": "布尔逻辑", + "desc": [ + { + "content": "\n布尔逻辑(Boolean algebra)得名于乔治·布尔(George Boole),他是英国数学家,在十九世纪首次定义了逻辑代数系统。今天,所有现代通用计算机都使用二值布尔逻辑来执行其功能,布尔逻辑在电子学、计算机硬件和软件中都有很多应用。", + "language": "markdown" + }, + { + "content": "\n乔治·布尔是通过什么方式发表布尔逻辑的?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "书籍", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "论文", + "language": "json" + } + ], + [ + { + "content": "电报", + "language": "json" + } + ], + [ + { + "content": "演讲", + "language": "json" + } + ] + ], + "node_id": "dailycode-a48d3d86c52344df91d358ecd2f8f63f", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/75.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/75.exercises/config.json" new file mode 100644 index 000000000..cb9b60e1d --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/75.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-274f3810ac424f81b3b6db4196775141", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/75.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/75.exercises/solution.json" new file mode 100644 index 000000000..5c852bfbd --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/75.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "80631f6b3f4544a886fcf9a5072533dd", + "keywords": "网络,网络安全", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120983128", + "title": "史上第一次网络瘫痪", + "desc": [ + { + "content": "\n阿帕网(ARPANET)是现代互联网的前身,由美国国防部高级研究计划局(DARPA)建立。1980 年 10 月 27 日,阿帕网遭遇事故而彻底瘫痪了四个小时,这是历史上的第一次网络瘫痪。", + "language": "markdown" + }, + { + "content": "\n历史上第一次网络瘫痪的原因是什么?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "感染病毒", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "人为破坏", + "language": "json" + } + ], + [ + { + "content": "程序出Bug", + "language": "json" + } + ], + [ + { + "content": "设计失误", + "language": "json" + } + ] + ], + "node_id": "dailycode-274f3810ac424f81b3b6db4196775141", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/76.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/76.exercises/config.json" new file mode 100644 index 000000000..8394b5909 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/76.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-32c5d067cfda4c76964bd82da5387288", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/76.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/76.exercises/solution.json" new file mode 100644 index 000000000..551b9c048 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/76.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "f06d7b7c5eb74a6099385fbf7430dc02", + "keywords": "C,Unix", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120715397", + "title": "C语言之父还做了什么?", + "desc": [ + { + "content": "\nC 语言之父丹尼斯·里奇(Dennis Ritchie)出生于 1941 年 9 月 9 日,逝世于 2011 年 10 月 12 日。他开发了 C 语言和 UNIX 操作系统,奠定了现代大多数电子产品的基础。", + "language": "markdown" + }, + { + "content": "\n除了 C 语言和 Unix 系统,以下哪一项是丹尼斯·里奇的成就?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "Multics 系统", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "C++ 语言", + "language": "json" + } + ], + [ + { + "content": "Minix 系统", + "language": "json" + } + ], + [ + { + "content": "C# 语言", + "language": "json" + } + ] + ], + "node_id": "dailycode-32c5d067cfda4c76964bd82da5387288", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/77.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/77.exercises/config.json" new file mode 100644 index 000000000..0eae37ccc --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/77.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-89f52ebc8a4b47739d97a12253077695", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/77.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/77.exercises/solution.json" new file mode 100644 index 000000000..d2dff9f09 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/77.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "c3f783ab3d0f4f6cbdfef8c1cb24832e", + "keywords": "流媒体,短视频", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120875612", + "title": "最短命的流媒体网站", + "desc": [ + { + "content": "\n好莱坞传奇制片人杰弗里·卡森伯格(Jeffery Katzenberg)与前惠普/eBay CEO Meg Whitman 曾共同推出一个短视频平台 Quibi,这个融资 17 亿美元的平台受到万众瞩目,却因疫情和多方因素宣告失败。", + "language": "markdown" + }, + { + "content": "\n短视频平台 Quibi 运营了多长时间便关闭了?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "六个月", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "三个月", + "language": "json" + } + ], + [ + { + "content": "四个月", + "language": "json" + } + ], + [ + { + "content": "一年", + "language": "json" + } + ] + ], + "node_id": "dailycode-89f52ebc8a4b47739d97a12253077695", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/78.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/78.exercises/config.json" new file mode 100644 index 000000000..e4dc3229d --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/78.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-ee85ae278fd44d9da846fbbf5ed4c7a4", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/78.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/78.exercises/solution.json" new file mode 100644 index 000000000..4cd284b15 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/78.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "4315b09d93f74c67bbcdae387a377c11", + "keywords": "Unix", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/121110776", + "title": "Unix 诞生", + "desc": [ + { + "content": "\nUnix 是一个多任务、多用户的计算机操作系统家族,前身为 1964 年启动的 Multics;由于 Multics 项目缓慢,1969 年贝尔实验室退出项目,由三名程序员完成了对其衍生作品 Unix 的自研。Unix 直接影响了如今流行的所有操作系统。", + "language": "markdown" + }, + { + "content": "\n以下哪一位程序员没有参与开发 Unix?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "蒂姆·伯纳斯·李", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "丹尼斯·里奇", + "language": "json" + } + ], + [ + { + "content": "肯·汤普森", + "language": "json" + } + ], + [ + { + "content": "道格拉斯·麦克罗伊", + "language": "json" + } + ] + ], + "node_id": "dailycode-ee85ae278fd44d9da846fbbf5ed4c7a4", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/79.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/79.exercises/config.json" new file mode 100644 index 000000000..ce2602621 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/79.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-c0aed0c58957433cb8f1868a22055cfb", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/79.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/79.exercises/solution.json" new file mode 100644 index 000000000..94ac3a7b7 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/79.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "5f208f2625274f0488f6efa26442d59a", + "keywords": "支付宝,阿里巴巴", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120757806", + "title": "支付宝第一笔交易用来做什么了?", + "desc": [ + { + "content": "\n2003 年 10 月 15 日,支付宝诞生第一笔交易。从此,中国互联网掀起了移动支付的浪潮,支付宝在中国第三方支付市场占比过半,是当前全球最大的移动支付厂商。", + "language": "markdown" + }, + { + "content": "\n支付宝第一笔交易的内容是什么?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "富士数码相机", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "尼康望远镜", + "language": "json" + } + ], + [ + { + "content": "卡西欧电子手表", + "language": "json" + } + ], + [ + { + "content": "索尼爱立信 T618 手机", + "language": "json" + } + ] + ], + "node_id": "dailycode-c0aed0c58957433cb8f1868a22055cfb", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/8.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/8.exercises/config.json" new file mode 100644 index 000000000..636818f7d --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/8.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-c1e34791df744e9aa80e2170f6165279", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/8.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/8.exercises/solution.json" new file mode 100644 index 000000000..316414c1d --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/8.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "2dd17bcd69dc45baafccb6b820b3680c", + "keywords": "人机交互,计算机教育", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120912959", + "title": "最后一课", + "desc": [ + { + "content": "\n1960 年 10 月 23 日,兰迪·波什(Randy Pausch)出生;他一生奋斗在人机交互领域,并在生命的最后时光里发表了一场脍炙人口的演讲,讲述了自己的程序人生;数百万人观看了网上的视频,这场“最后一课”在网上立刻火爆,同名书籍至今仍然排在\"畅销书(建议类)\"的榜首。", + "language": "markdown" + }, + { + "content": "\n“最后一课”的演讲发表在什么地方?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "CMU(卡耐基梅隆大学)", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "MIT(麻省理工学院)", + "language": "json" + } + ], + [ + { + "content": "CU(康奈尔大学)", + "language": "json" + } + ], + [ + { + "content": "GWU(乔治华盛顿大学)", + "language": "json" + } + ] + ], + "node_id": "dailycode-c1e34791df744e9aa80e2170f6165279", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/80.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/80.exercises/config.json" new file mode 100644 index 000000000..37aa2c76f --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/80.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-9a0780174e694f9bbe241fd378e0562e", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/80.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/80.exercises/solution.json" new file mode 100644 index 000000000..36b175616 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/80.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "0ecf21a140f649f1a1dfebd073c991ea", + "keywords": "微软,Microsoft Office", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/121240560", + "title": "高山流水遇知音", + "desc": [ + { + "content": "\nMicrosoft Word 软件的创作者叫 Richard Brodie,他是比尔·盖茨的技术助理,也是微软应用部门的创始成员;除了 Word 以外,Brodie 还编写了家喻户晓的记事本软件。", + "language": "markdown" + }, + { + "content": "\nBrodie 的恩师是“所见即所得”的发明人,这是微软赖以独霸天下的 Windows 系统的核心;这位恩师和 Brodie 曾在一家公司,后来将 Brodie 聘请到了微软,他的名字是?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "查尔斯·西蒙尼(Charles Simonyi)", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "比尔·盖茨(Bill Gates)", + "language": "json" + } + ], + [ + { + "content": "鲍勃·麦特卡尔夫(Bob Metcalfe)", + "language": "json" + } + ], + [ + { + "content": "保罗·艾伦(Paul Allen)", + "language": "json" + } + ] + ], + "node_id": "dailycode-9a0780174e694f9bbe241fd378e0562e", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/81.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/81.exercises/config.json" new file mode 100644 index 000000000..37eae537f --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/81.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-01b9b605fcb04130aef43a9bb66e220d", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/81.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/81.exercises/solution.json" new file mode 100644 index 000000000..b5d5da80e --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/81.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "5a4bc3bb36ba4f0daac8aaedb3b0413a", + "keywords": "ICQ,通讯软件", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/121325474", + "title": "I seek you", + "desc": [ + { + "content": "\nICQ 诞生于 1996 年 11 月 15 日,是世界上最早出现的即时通信软件之一。随着版本的更新,ICQ 变得十分臃肿,以至于太多的功能几乎没有用到过,加上 MSN 和 Skype 的 诞生,ICQ 最终淡出了历史舞台。", + "language": "markdown" + }, + { + "content": "\n以下哪家公司曾收购过 ICQ?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "美国在线(AOL)", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "腾讯", + "language": "json" + } + ], + [ + { + "content": "微软(Microsoft)", + "language": "json" + } + ], + [ + { + "content": "贝尔公司", + "language": "json" + } + ] + ], + "node_id": "dailycode-01b9b605fcb04130aef43a9bb66e220d", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/82.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/82.exercises/config.json" new file mode 100644 index 000000000..c3b272cc5 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/82.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-f4e17b152b314f12900cb6e56461075e", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/82.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/82.exercises/solution.json" new file mode 100644 index 000000000..3b8a7ccd1 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/82.exercises/solution.json" @@ -0,0 +1,44 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "577d0f5498fc4bf0a2aab2df1adfa150", + "keywords": "相机,数码相机", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120094247", + "title": "相机帝国的开始", + "desc": [ + { + "content": "\n哪个公司在哪一年取得了第一个数码相机的专利?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "柯达公司, 1978 年", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "施乐公司, 1988 年", + "language": "json" + } + ], + [ + { + "content": "佳能公司, 1989 年", + "language": "json" + } + ], + [ + { + "content": "索尼公司, 1990 年", + "language": "json" + } + ] + ], + "node_id": "dailycode-f4e17b152b314f12900cb6e56461075e", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/83.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/83.exercises/config.json" new file mode 100644 index 000000000..14c095110 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/83.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-87e44019fa8e4b3b96f8d574f854c559", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/83.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/83.exercises/solution.json" new file mode 100644 index 000000000..0ee9db85e --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/83.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "73242dcb99064f5c814404a50801513f", + "keywords": "数据库,MariaDB,MySQL", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/121024799", + "title": "玛利亚", + "desc": [ + { + "content": "\nMariaDB 数据库管理系统是 MySQL 的一个分支,主要由开源社区在维护,采用 GPL 授权许可;MariaDB 的目的是完全兼容 MySQL,包括 API 和命令行,使之能轻松成为 MySQL 的代替品。MariaDB 的首席开发人员是米卡埃尔·维德纽斯,他是 MySQL AB 的创始人之一。", + "language": "markdown" + }, + { + "content": "\n米卡埃尔·维德纽斯为什么要用 Maria 命名自己的数据库?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "Maria 是他女儿的名字", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "Maria 是他母校的名字", + "language": "json" + } + ], + [ + { + "content": "Maria 是他妻子的名字", + "language": "json" + } + ], + [ + { + "content": "Maria 是他祖母的名字", + "language": "json" + } + ] + ], + "node_id": "dailycode-87e44019fa8e4b3b96f8d574f854c559", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/84.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/84.exercises/config.json" new file mode 100644 index 000000000..c8fe401ec --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/84.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-9b6195cf8bcc4bc68defa82c9d54710c", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/84.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/84.exercises/solution.json" new file mode 100644 index 000000000..dc668b149 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/84.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "7882842b6f5c447f94c2f4a44e2d4bea", + "keywords": "Microsoft,Windows", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120962054", + "title": "Win 8 保留的东西", + "desc": [ + { + "content": "\nWindows 8 是微软于 2012 年推出的电脑操作系统,较前代操作系统相比在界面、启动、应用程序等多个方面增加新功能,同时也移除一些功能,是微软推陈革新的一次大胆尝试。", + "language": "markdown" + }, + { + "content": "\n以下哪项功能是 Windows 8 相比 Windows 7 仍保留的?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "ISO 光盘刻录功能", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "开始按钮", + "language": "json" + } + ], + [ + { + "content": "Windows Aero 效果", + "language": "json" + } + ], + [ + { + "content": "系统小工具", + "language": "json" + } + ] + ], + "node_id": "dailycode-9b6195cf8bcc4bc68defa82c9d54710c", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/85.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/85.exercises/config.json" new file mode 100644 index 000000000..532c65b02 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/85.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-5970022817174efd8c186ac98355e556", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/85.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/85.exercises/solution.json" new file mode 100644 index 000000000..00f8ebe3e --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/85.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "f77684f9bfcc48108867bee552182b41", + "keywords": "移动支付,电子支付", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120779471", + "title": "“美国支付宝”是哪一家?", + "desc": [ + { + "content": "\n第三方支付公司专门提供线上支付服务,它们让用户仅仅凭借电子邮件账户,可以完成收付款——这在2000年前后可谓革命性的服务。 ", + "language": "markdown" + }, + { + "content": "\n美国第一个上市的第三方支付公司是:", + "language": "markdown" + } + ], + "answer": [ + { + "content": "Paypal", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "X.com", + "language": "json" + } + ], + [ + { + "content": "Confinity", + "language": "json" + } + ], + [ + { + "content": "eBay", + "language": "json" + } + ] + ], + "node_id": "dailycode-5970022817174efd8c186ac98355e556", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/86.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/86.exercises/config.json" new file mode 100644 index 000000000..33f5edc01 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/86.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-0aa83a4f75ec442f985f2804991a6f9e", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/86.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/86.exercises/solution.json" new file mode 100644 index 000000000..fc7acb861 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/86.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "a0bd920b92504505974b775f61350d78", + "keywords": "Microsoft,Nokia", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/121153445", + "title": "王朝的覆灭", + "desc": [ + { + "content": "\n2014 年 10 月 22 日,微软宣布将诺基亚手机品牌改为“Microsoft Lumia”,为诺基亚手机品牌写下休止符;同年的 11 月 5 日,诺基亚正式更名,官方的新浪微博账号同步发声,所有 Lumia 手机的 Logo 都将由“Nokia”变为“Microsoft”,并且所有官方社交媒体、渠道也都遵循这一改名规则。", + "language": "markdown" + }, + { + "content": "\n微软从哪一年开始就再也没有了更新 Lumia 的动作?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "2017 年", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "2015 年", + "language": "json" + } + ], + [ + { + "content": "2016 年", + "language": "json" + } + ], + [ + { + "content": "2018 年", + "language": "json" + } + ] + ], + "node_id": "dailycode-0aa83a4f75ec442f985f2804991a6f9e", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/87.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/87.exercises/config.json" new file mode 100644 index 000000000..56d2eb565 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/87.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-697ff18599bb4706827ddd35c5894dfa", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/87.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/87.exercises/solution.json" new file mode 100644 index 000000000..97c388c40 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/87.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "c2b5f01f03e8431db472c0396bac012a", + "keywords": "图灵", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/121272891", + "title": "计算机起源", + "desc": [ + { + "content": "\n1936 年 11 月 12 日,艾伦·图灵(Alan Turing) 发表了题为 On Computable Numbers with an Application to the Entscheidungs-problem 的论文,定义了一种“通用机器”的概念,由一个虚拟的机器替代人类进行数学运算。", + "language": "markdown" + }, + { + "content": "\n这个概念如今被称为什么?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "图灵机", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "齿轮计数器", + "language": "json" + } + ], + [ + { + "content": "积分计算机", + "language": "json" + } + ], + [ + { + "content": "分析引擎", + "language": "json" + } + ] + ], + "node_id": "dailycode-697ff18599bb4706827ddd35c5894dfa", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/88.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/88.exercises/config.json" new file mode 100644 index 000000000..aeaf3a5f1 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/88.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-d8ecab5a68b24f72a87ed9eb9d4c3eb1", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/88.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/88.exercises/solution.json" new file mode 100644 index 000000000..25d3a2946 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/88.exercises/solution.json" @@ -0,0 +1,44 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "7452848485e14ab1b0b7da7b67a6348a", + "keywords": "触摸屏,触控技术", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120828788", + "title": "指尖上的液晶板", + "desc": [ + { + "content": "\n1965 年 10 月,英国皇家雷达研究所工程师 E.A.约翰逊首次提出触摸屏的概念,他当时发明的是一块怎么样的触摸屏?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "电容式触摸屏", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "红外线式触摸屏", + "language": "json" + } + ], + [ + { + "content": "电阻式触摸屏", + "language": "json" + } + ], + [ + { + "content": "表面声波式触摸屏", + "language": "json" + } + ] + ], + "node_id": "dailycode-d8ecab5a68b24f72a87ed9eb9d4c3eb1", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/89.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/89.exercises/config.json" new file mode 100644 index 000000000..bc37c909b --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/89.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-00dac97bf0af46d4b20e08f62b95a31c", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/89.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/89.exercises/solution.json" new file mode 100644 index 000000000..9ea7b1c17 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/89.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "750a725f387342308a33c5066cd7d563", + "keywords": "搜索引擎,社交网站", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120682111", + "title": "俄罗斯人用什么搜索引擎?", + "desc": [ + { + "content": "\n有这么一家网站,它成立于 2006 年,是俄罗斯最大的社交网站,也是仅次于搜索引擎 Yandex 的俄罗斯第二大网站,在全球拥有超过 2 亿注册用户,目前支持包括中文在内的 86 种语言。", + "language": "markdown" + }, + { + "content": "\n这家网站的名字是:", + "language": "markdown" + } + ], + "answer": [ + { + "content": "VKontakte", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "Gosuslugi", + "language": "json" + } + ], + [ + { + "content": "Avito", + "language": "json" + } + ], + [ + { + "content": "Ok", + "language": "json" + } + ] + ], + "node_id": "dailycode-00dac97bf0af46d4b20e08f62b95a31c", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/9.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/9.exercises/config.json" new file mode 100644 index 000000000..1f1d2ecee --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/9.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-e8bc1d68ff894091b1bcce5f3902fd77", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/9.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/9.exercises/solution.json" new file mode 100644 index 000000000..c71d0b4ff --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/9.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "6068c569d4c94dfd8950896f34c46821", + "keywords": "腾讯,QQ", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/121024799", + "title": "QQ 之父", + "desc": [ + { + "content": "\n1971 年 10 月 29 日是马化腾的生日,他于 1998 年 11 月创办腾讯,创造了在中国大陆范围内影响力最大的个人网络即时通信软件之一,腾讯 QQ,一般外界称他“QQ 之父”。", + "language": "markdown" + }, + { + "content": "\n马化腾毕业于哪所大学?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "深圳大学", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "中山大学", + "language": "json" + } + ], + [ + { + "content": "香港中文大学", + "language": "json" + } + ], + [ + { + "content": "IBM", + "language": "json" + } + ] + ], + "node_id": "dailycode-e8bc1d68ff894091b1bcce5f3902fd77", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/90.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/90.exercises/config.json" new file mode 100644 index 000000000..799010669 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/90.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-29e3d0033a9e467f84bb1a11d9469f4e", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/90.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/90.exercises/solution.json" new file mode 100644 index 000000000..63390fbcf --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/90.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "5fbb6aef7d7448c5943f3983f498a2c0", + "keywords": "程序员,程序员节", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120927533", + "title": "程序员的狂欢节", + "desc": [ + { + "content": "\n10 月 24 日是中国程序员共同的节日,1024 是 2 的 10 次方,二进制计数的基本单位之一。而程序员专业从事前端和后端程序开发、系统运维、测试,这个职业就像 1024 这个数字,用最低调的、坚固的、核心的功能模块构建技术世界。", + "language": "markdown" + }, + { + "content": "\n除了 1024 以外,一年中还有哪一天被许多国家认为是程序员日?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "9 月 13 日", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "1 月 6 日", + "language": "json" + } + ], + [ + { + "content": "11 月 11 日", + "language": "json" + } + ], + [ + { + "content": "5 月 12 日", + "language": "json" + } + ] + ], + "node_id": "dailycode-29e3d0033a9e467f84bb1a11d9469f4e", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/91.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/91.exercises/config.json" new file mode 100644 index 000000000..a3ece4274 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/91.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-0e6c90044ce443ae98492ad6dd571771", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/91.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/91.exercises/solution.json" new file mode 100644 index 000000000..5de3e587a --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/91.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "d0b9d3dd95194f8ebc154cc128d02f4a", + "keywords": "流媒体,视频网站", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120643664", + "title": "《纸牌屋》是谁制作的?", + "desc": [ + { + "content": "\n1960 年 10 月 8 日,里德·哈斯廷斯(Reed Hastings)出生于波士顿的一个律师世家,他是一名计算机科学家、企业家和教育慈善家。他作为流媒体领域的全球领导者而出名,从一位工程师变成了如今的流媒体领军者。", + "language": "markdown" + }, + { + "content": "\n他所打造的视频网站名字叫:", + "language": "markdown" + } + ], + "answer": [ + { + "content": "Netflix", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "Youtube", + "language": "json" + } + ], + [ + { + "content": "Twitch", + "language": "json" + } + ], + [ + { + "content": "Twitter", + "language": "json" + } + ] + ], + "node_id": "dailycode-0e6c90044ce443ae98492ad6dd571771", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/92.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/92.exercises/config.json" new file mode 100644 index 000000000..f5d47c29b --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/92.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-052601f2bab7422b910fb2099fe48ecf", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/92.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/92.exercises/solution.json" new file mode 100644 index 000000000..7368f47ae --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/92.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "7f03e078fef340e9938ff4944e859c7f", + "keywords": "OpenVMS,纪元时间", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/121364896", + "title": "格式化后的时钟", + "desc": [ + { + "content": "\nOpenVMS(开放虚拟内存系统)前身为 VAX-11 / VMS 和 VAX / VMS ,是 DEC 公司于 1977 年为其 VAX 计算机创建的专有操作系统,该系统后来被移植到 DEC Alpha 处理器。", + "language": "markdown" + }, + { + "content": "\n众所周知,Unix 时间是从1970 年 1 月 1 日开始的,所以手机、平板、电脑的初始日期最早只能设置到 1970 年 1 月 1 日;那么,OpenVMS 时间是什么时候呢?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "1858 年 11 月 17 日", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "1970 年 1 月 1 日", + "language": "json" + } + ], + [ + { + "content": "1980 年 1 月 1 日", + "language": "json" + } + ], + [ + { + "content": "1538 年 12 月 25 日", + "language": "json" + } + ] + ], + "node_id": "dailycode-052601f2bab7422b910fb2099fe48ecf", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/93.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/93.exercises/config.json" new file mode 100644 index 000000000..bae77e43a --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/93.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-be4e2071c24b48578065de9eadb4beea", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/93.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/93.exercises/solution.json" new file mode 100644 index 000000000..c1da82f49 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/93.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "fd80f8e2b7734146ae2e42ec27bea8dc", + "keywords": "Gzip,Zip", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/121058239", + "title": "Gzip", + "desc": [ + { + "content": "\nGzip 是 GNUzip 的缩写,由 Jean-loup Gailly 和 Mark Adler 创建。我们在 Linux 中经常会用到后缀为.gz 的文件,它们就是 GZIP 格式的。Gzip 现今已经成为 Internet 上使用非常普遍的一种数据压缩格式,或者说一种文件格式。", + "language": "markdown" + }, + { + "content": "\nGzip 格式最开始被用来在什么操作系统上工作?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "Unix", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "Linux", + "language": "json" + } + ], + [ + { + "content": "Windows", + "language": "json" + } + ], + [ + { + "content": "DOS", + "language": "json" + } + ] + ], + "node_id": "dailycode-be4e2071c24b48578065de9eadb4beea", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/94.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/94.exercises/config.json" new file mode 100644 index 000000000..9330d0c5a --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/94.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-6f2accb7ee4047be818220aa04bffc98", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/94.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/94.exercises/solution.json" new file mode 100644 index 000000000..769d9427e --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/94.exercises/solution.json" @@ -0,0 +1,44 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "db4c69ed5768492f83cd23d9a64450c5", + "keywords": "数据库,IMDb", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120804305", + "title": "谁拥有着这个大数据库?", + "desc": [ + { + "content": "\n互联网电影资料库(IMDb)是一个关于电影演员、电影、电视节目、电视明星和电影制作的在线数据库,它隶属于哪个公司?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "亚马逊(Amazon)", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "Facebook", + "language": "json" + } + ], + [ + { + "content": "Youtube", + "language": "json" + } + ], + [ + { + "content": "雅虎(Yahoo)", + "language": "json" + } + ] + ], + "node_id": "dailycode-6f2accb7ee4047be818220aa04bffc98", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/95.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/95.exercises/config.json" new file mode 100644 index 000000000..b54ca92a5 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/95.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-546b01ceba0b4ed7b4110b7b54f5dea2", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/95.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/95.exercises/solution.json" new file mode 100644 index 000000000..cd407d675 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/95.exercises/solution.json" @@ -0,0 +1,44 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "5634f3884ac04205bf08d07ce65f06f7", + "keywords": "科技,电气工程", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120521025", + "title": "神奇魔盒", + "desc": [ + { + "content": "\n1925 年 10 月 2 日,John. L. Baird 制造出了世界上第一台 ___________", + "language": "markdown" + } + ], + "answer": [ + { + "content": "能传输图像的机械式电视机", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "能解多项式方程的计算器", + "language": "json" + } + ], + [ + { + "content": "能每分钟印刷 100 页的油印机", + "language": "json" + } + ], + [ + { + "content": "能近距离传输图像的传真机", + "language": "json" + } + ] + ], + "node_id": "dailycode-546b01ceba0b4ed7b4110b7b54f5dea2", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/96.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/96.exercises/config.json" new file mode 100644 index 000000000..452524e10 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/96.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-aea1e1a0b8194ca3a4e4a6d499734159", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/96.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/96.exercises/solution.json" new file mode 100644 index 000000000..c9d47ca87 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/96.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "1a66dcef71eb4f70a6bc588b4b7e968f", + "keywords": "USB,数据存储", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/121272891", + "title": "定制标准的公司", + "desc": [ + { + "content": "\n2008 年 11 月 12 日,USB 3.0 标准发布;USB 3.0 极大提高了带宽,实现了更好的电源管理,使得数据处理的效率更高。如今市面上的大部分智能手机都使用着 USB Type-C 的充电传输接口。", + "language": "markdown" + }, + { + "content": "\nUSB 标准最早由哪家公司主导联合推出?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "英特尔(Intel)", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "苹果(Apple)", + "language": "json" + } + ], + [ + { + "content": "联想(Lenovo)", + "language": "json" + } + ], + [ + { + "content": "谷歌(Google)", + "language": "json" + } + ] + ], + "node_id": "dailycode-aea1e1a0b8194ca3a4e4a6d499734159", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/97.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/97.exercises/config.json" new file mode 100644 index 000000000..287ff5447 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/97.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-9d17dc8bf5a948ccab1eb31f11d0c4c5", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/97.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/97.exercises/solution.json" new file mode 100644 index 000000000..bfd0328e2 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/97.exercises/solution.json" @@ -0,0 +1,44 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "50d907edf7ba451e89aa4d3353840f72", + "keywords": "Google,Chrome", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/121409512", + "title": "Chromium", + "desc": [ + { + "content": "\nChrome OS 是由 Google 设计的基于 Linux 内核的操作系统,并使用 Google Chrome 浏览器作为其主要用户界面,因此,Chrome OS 主要支持 Web 应用程序;Google 于 2009 年 7 月宣布 Chrome OS 项目,将其视为操作系统,并在同年以 Chromium 的名义将其开源,这是在哪一个月发生的?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "11 月", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "8 月", + "language": "json" + } + ], + [ + { + "content": "9 月", + "language": "json" + } + ], + [ + { + "content": "10 月", + "language": "json" + } + ] + ], + "node_id": "dailycode-9d17dc8bf5a948ccab1eb31f11d0c4c5", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/98.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/98.exercises/config.json" new file mode 100644 index 000000000..996dc3fbb --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/98.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-07916c627dea406983fa4f459e35bb3c", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/98.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/98.exercises/solution.json" new file mode 100644 index 000000000..ca1bbb7a8 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/98.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "0c7eec5476ff461fbb7f86d5d3f583e2", + "keywords": "电脑设备,鼠标", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/121364896", + "title": "世界上的第一个鼠标", + "desc": [ + { + "content": "\n为了替代繁琐的键盘指令,简化计算机操作,美国斯坦福大学的发明家道格拉斯·恩格尔巴特设计了首个鼠标,并在 1970 年申请了专利;因为在人机交互领域做出的卓越贡献,恩格尔巴特获得了 1997 年图灵奖。", + "language": "markdown" + }, + { + "content": "\n如今我们见到的鼠标外壳大多是塑料或 ABS 材质,那世界上的第一个鼠标外壳是用什么做的呢?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "木头", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "金属", + "language": "json" + } + ], + [ + { + "content": "橡胶", + "language": "json" + } + ], + [ + { + "content": "塑料", + "language": "json" + } + ] + ], + "node_id": "dailycode-07916c627dea406983fa4f459e35bb3c", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/99.exercises/config.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/99.exercises/config.json" new file mode 100644 index 000000000..daab255d2 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/99.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-8235273c8c81448fb35275281f81d775", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/99.exercises/solution.json" "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/99.exercises/solution.json" new file mode 100644 index 000000000..de40adae6 --- /dev/null +++ "b/data_source/dailycode/1.dailycode\345\210\235\351\230\266/4.it_knowledge/99.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "Byeweiyang", + "source": "solution.md", + "exercise_id": "f6af0c1c3446442787ca8d39d34a69f8", + "keywords": "Android,智能手机,Google", + "topic_link": "https://blog.csdn.net/Byeweiyang/article/details/120643664", + "title": "冰淇淋三明治缺少的馅料", + "desc": [ + { + "content": "\nAndroid 4.0 是安卓系统历代最重要的一次更新,因为它统一了 Android 系统各个版本,彻底打破 Android 平板电脑和智能手机两个不同平台之间的隔阂。", + "language": "markdown" + }, + { + "content": "\n请问,以下哪一项特性不是 Android 4.0 的首创?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "底部虚拟按键", + "language": "json" + } + ], + "prepared": [ + [ + { + "content": "在锁屏界面也可以下拉通知栏查看新通知", + "language": "json" + } + ], + [ + { + "content": "人脸识别解锁", + "language": "json" + } + ], + [ + { + "content": "拖动程序到另一个程序图标上会生成文件夹", + "language": "json" + } + ] + ], + "node_id": "dailycode-8235273c8c81448fb35275281f81d775", + "license": "csdn.net", + "created_at": 1637894160 +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/1.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/1.exercises/config.json" new file mode 100644 index 000000000..06892d58d --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/1.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-ac3df0d6b8e540ac9cfdf9c074c33b33", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/1.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/1.exercises/solution.json" new file mode 100644 index 000000000..937bec359 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/1.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "fafdfa2e8e56437ea642dfb3d21e95b4", + "keywords": "算法高阶,字符串匹配,算法问题选编,利用有限自动机进行字符串匹配", + "title": "移动字符串", + "desc": [ + { + "content": "\n给定一个字符串长度为 nn 的字符串 s1 (10\n#include \nusing namespace std;\nvoid reverse(char *a,int start, int end)\n{\n\tint i ,j,temp;\n\tfor(i = start,j = end; i < j; i++,j--)\n\t{\n\t\ttemp = a[i];\n\t\ta[i] = a[j];\n\t\ta[j] = temp;\n\t} \n}\nvoid turnleft(char *a,int i,int n)\n{\n\tint left = i % n;\n\tif(left == 0)\n\t\treturn ;\n\treverse(a,0,left-1);\n\treverse(a,left,n-1);\n\treverse(a,0,n-1);\n\treturn ;\n}\nint main()\n{\n\tchar a[1024];\n\tint i;\t\n\tcin>>i;\n\tcin>>a;\n\tint n = strlen(a);\n\tturnleft(a,i,n);\n\tcout<一个数如果恰好等于它的所有因子之和,这个数就称为“完数”。统计自然数 1 — 100 间完数的个数。", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include\nint perfect()\n{\n\tint i,x,sum,cnt=0;\n\tfor(i=1;i<=100;i++)\n\t{\n\t\tsum=0;\n\t\tfor(x=1;x\n#include \nint main()\n{\n\tint n,i,j,t;\n\tscanf(\"%d\",&n);\n\tint* a = (int*)malloc(n*sizeof(int));\n\tfor(i=0;i\n#include \n#include \n#include \n#include \n#include \n#include \nusing namespace std;\nint main(){\n\tint i,j,k=1;\n\tint n,m;\n\tint num[1010]={0};\n\tint num_cmp=0;\n\tint flag=1;\n\tint led[1005][1005];\n\tcin >> n >> m;\n\tfor(i=1;i<=n;i++){\n\t\tfor(j=1;j<=m;j++){\n\t\t\tcin >> led[i][j];\n\t\t\tif(led[i][j]==1) num[k]++;\n\t\t}\n\t\tif(num[k]!=0)k++;\n\t}\n\tnum_cmp=num[k-1];\n\tfor(i=k-1;i>0;i--){\n\t\tif(num[i]\n#include\nint main()\n{\n\tint a,b,x,y,c;\n\tprintf(\"输入一个分式:\");\n\tscanf(\"%d/%d\",&a,&b);\n\tif(a\n#include \n#include \nint cmp(const void * a, const void * b)\n{\n\treturn strcmp(*(char **)a, *(char **)b);\n}\nint main(int argc, char* argv[])\n{\n\tint n = 0;\n\tint i;\n\tprintf(\"how many words?\\n\");\n\tscanf(\"%d\", &n);\n\tchar ** s = new char *[n];\n\tfor (i = 0; i < n; i++)\n\t{\n\t\ts[i] = new char[100];\n\t\tscanf(\"%s\", s[i]);\n\t\tchar * t = s[i];\n\t\twhile (*t != '\\0')\n\t\t{\n\t\t\tif (t == s[i] && (*t >= 'a' && *t <= 'z')) *t = *t - 'a' + 'A';\n\t\t\tif (t > s[i] && (*t >= 'A' && *t <= 'Z')) *t = *t - 'A' + 'a';\n\t\t\tt++;\n\t\t}\n\t}\n\tqsort(s, n, sizeof(char *), cmp);\n\tfor (i = 0; i < n; i++)\n\t{\n\t\tprintf(\"%s\\n\", s[i]);\n\t}\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-dab42155788f4df992f7bee3d2ceaff3", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470273" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/15.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/15.exercises/config.json" new file mode 100644 index 000000000..634a93f63 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/15.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-b930e3c023e1440ebb20130a7a2d188b", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/15.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/15.exercises/solution.json" new file mode 100644 index 000000000..d37473c0e --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/15.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "de64fd3104cf4997b51ff9481e68741e", + "keywords": "桶排序,算法初阶,线性时间排序,排序和顺序统计量", + "title": "国名排序", + "desc": [ + { + "content": "\n【字符数组】国名排序\nDescription:\n小李在准备明天的广交会,明天有来自世界各国的客房跟他们谈生意,小李要尽快的整理出名单给经理,你能帮他把客户来自的国家按英文字典次序排好吗?\n例如小李手上有来自加拿大,美国,中国的名单,排好的名单应是美国,加拿大,中国\nInput\n第一行为一个n(n<=100)表示n个国家,第2行到第n+1行分别为n个国家的名字.\nOutput\n输出共计n行,为n个国家按字典顺序的排列,每行为一个国家\nSample Input:\n3\nChina\nCanada\nAmerica\nSample Output:\nAmerica\nCanada\nChina", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \nusing namespace std;\nstring a[1000];\nint main()\n{\n\tint i,n;\n\tcin>>n;\n\tfor(i=1; i<=n; i++)\n\t{\n\t\tcin>>a[i];\n\t}\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tfor(int j=i+1;j<=n;j++)\n\t\t{\n\t\t\tif(a[i]>a[j])\n\t\t\t\tswap(a[i],a[j]);\n\t\t}\n\t}\n\tfor(int i=1;i<=n;i++)\n\t\tcout<\nint main()\n{\n\tint n;\n\tint cnt = 0;\n\tscanf(\"%d\", &n);\n\tfor (int a = 1; a < n; a++)\n\t\tfor (int b = a; b < n - a; b++)\n\t\t\tfor (int c = 1; c < n; c++)\n\t\t\t{\n\t\t\t\tif ((a+b)*(a+b)+c*c==n*n)\n\t\t\t\t{\n\t\t\t\t\tprintf(\"a=%d b=%d c=%d\\n\", a, b, c);\n\t\t\t\t\tcnt++;\n\t\t\t\t}\n\t\t\t}\n\tprintf(\"一共有%d种方案\", cnt);\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-0cef0ea9a9464eb8acb4a439fde7c351", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600469852" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/17.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/17.exercises/config.json" new file mode 100644 index 000000000..7897c0cf0 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/17.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-707a9a26d46749e9a9e2dde825d0421c", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/17.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/17.exercises/solution.json" new file mode 100644 index 000000000..f9012c465 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/17.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "13364b60933343cf82bdee276b57df98", + "keywords": "动态表,表扩张,算法中阶,摊还分析,高级设计和分析技术", + "title": "报数游戏", + "desc": [ + { + "content": "\n

题目描述
报数游戏\n首先,会给他们一人一个编号,并且每个人的编号都不相同。接下来的每一回合,会给一个数,编号超过它的最小编号的人要报出自己的编号。如果没有人的编号比给出的数要大,那么编号最大的人要报出自己的编号。每个人可以重复报号。\n会按照一个列表顺次报出每个回合的数,朋友们想知道每回合报出的编号应该是多少。\n输入
输入数据共 3 行。\n第一行有两个整数 n,m(1≤n≤100,000,1≤m≤100,000),分别表示参与游戏的朋友的个数,和游戏的回合数。 \n第二行 n个整数 ai(1≤ai≤100,000,000),表示朋友们每个人的编号。对于 0≤i<j<n,都有 ai<aj,即他们的编号递增排列。 \n第三行 m 个整数 qi(1≤qi≤100,000,000),表示每回合给的数字。\n输出
\n输出共一行 m 个整数,表示每回合报出的编号,每两个整数之间一个空格,最后一个数后面没有空格。

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include\n#include\n#include\n#include\nusing namespace std;\nint ai[100010], qi[100010];\nint main()\n{\n\tint a, q;\n\twhile (cin >> a >> q)\n\t{\n\t\tfor (int i = 0; i < a; i++)cin >> ai[i];\n\t\tfor (int i = 0; i < q; i++)cin >> qi[i];\n\t\tfor (int i = 0; i < q; i++) {\n\t\t\tint left = 0, right = a - 1, mid;\n\t\t\twhile (left < right) {\n\t\t\t\tmid = (left + right) >> 1;\n\t\t\t\tif (ai[mid] <= qi[i])left = mid + 1;\n\t\t\t\telse right = mid;\n\t\t\t}\n\t\t\tif (left - 1 < 0 || ai[left] < qi[i])left++;\n\t\t\ti ? cout << \" \" << ai[left - 1] : cout << ai[left - 1];\t\t\t\n\t\t}\n\t\tcout << endl;\n\t}\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-707a9a26d46749e9a9e2dde825d0421c", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600469965" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/18.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/18.exercises/config.json" new file mode 100644 index 000000000..f0897c889 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/18.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-f5bede05c3a2454090a4bccc0479462f", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/18.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/18.exercises/solution.json" new file mode 100644 index 000000000..c05cbe970 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/18.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "c9741339e3e148d8bb36f4dedc4ee64e", + "keywords": "算法高阶,数论算法,算法问题选编,整数的因子分解", + "title": "不喜欢带钱的小C", + "desc": [ + { + "content": "\n题目描述:\n小C不喜欢带钱,有一次竟被他碰上了一家不能使用移动支付(也不能找钱)的神秘商店。请问小C至少准备多少张RMB才能恰好支付n元。RMB的面额有100元,50元,20元,10元,5元,1元。\n输入格式:\n输入一个整数n\n输出格式:\n最少带几张。\n样例输入1:\n50\n样例输出1:\n1\n约定:\n1<=n<=100", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nint solve(int tar, int * meta, int metan, int * seed = NULL, int seedn = 0)\n{\n\tif (tar == 0)\n\t{\n\t\treturn seedn;\n\t}\n\tint min = -1;\n\tint m;\n\tint * seed1 = new int[seedn + 1];\n\tif (seed)\n\t\tmemcpy(seed1, seed, sizeof(int) * seedn);\n\tfor (int i = 0; i < metan; i++)\n\t{\n\t\tif (meta[i] <= tar)\n\t\t{\n\t\t\tseed1[seedn] = meta[i];\n\t\t\tm = solve(tar - meta[i], meta, metan, seed1, seedn + 1);\n\t\t\tif (m != -1 && (min == -1 || min > m))\n\t\t\t\tmin = m;\n\t\t\tbreak;\n\t\t}\n\t}\n\tdelete[] seed1;\n\treturn min;\n}\nint main()\n{\n\tint arr[] = { 100, 50, 20, 10, 5, 1 };\n\tint n = 6;\n\tint total;\n\tcin >> total;\n\tint result = solve(total, arr, n);\n\tcout << result << endl;\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-f5bede05c3a2454090a4bccc0479462f", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600469951" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/19.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/19.exercises/config.json" new file mode 100644 index 000000000..6abe2f936 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/19.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-390b583c367d440f80eaa10524618444", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/19.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/19.exercises/solution.json" new file mode 100644 index 000000000..6930a8756 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/19.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "658692f122d849e5820bbfcafe79cea4", + "keywords": "B树,算法高阶,高级数据结构,B树上的基本操作", + "title": "字符图形输出", + "desc": [ + { + "content": "\n编程实现把输入任意整数n后,可打印出n行三角字符阵列图形。例如,输入整数5时,程序运行结果如下:\nENTER A NUMBER:5<回车>\nA C F J O\nB E I N\nD H M\nG L\nK", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": " #include \nusing namespace std;\nchar a[100][100];\nint main()\n{\n\tchar c = 'A';\n\tint n = 5;\n\tfor (int i = 0; i < n; i++)\n\t{\n\t\tfor (int j = i; j >= 0; j--)\n\t\t{\n\t\t\ta[j][i - j] = c++;\n\t\t}\n\t}\n\tfor (int i = 0; i < n; i++)\n\t{\n\t\tfor (int j = 0; j < n - i; j++)\n\t\t{\n\t\t\tcout << a[i][j] << \" \";\n\t\t}\n\t\tcout << endl;\n\t}\n}", + "language": "cpp" + }, + "node_id": "dailycode-390b583c367d440f80eaa10524618444", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600469861" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/2.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/2.exercises/config.json" new file mode 100644 index 000000000..e28780248 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/2.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-04771a9a92f54cb1b4125e4528c6a193", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/2.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/2.exercises/solution.json" new file mode 100644 index 000000000..e0ba71df6 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/2.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "6fe0402a3ed24db89b062d4facb32c96", + "keywords": "算法初阶,快速排序,快速排序的描述,排序和顺序统计量", + "title": "数字归类", + "desc": [ + { + "content": "\n题目描述\n一个数里面若含有数字1,则归类到1字类,含有数字2,则归类到2字类,所以一个数可能同时归类到不同的数字类。对于0、1、2、3、4、5、6、7、8、9这十个数字类,因研究需要,急于想知道某一堆数中,究竟归类到这些数字类的个数。\n样例输入\n123 456 175 2 61 9998 12 5053 382\n样例输出\n0: 1\n1: 4\n2: 4\n3: 3\n4: 1\n5: 3\n6: 2\n7: 1\n8: 2\n9: 1\n提示\n注意:输出结果中冒号后面有空格", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \nint result[10];\nint main(void) {\n\tmemset(result, 0, sizeof(int) * 10);\n\tint n;\n\tint arr[10];\n\twhile (scanf(\"%d\", &n) != EOF)\n\t{\n\t\tmemset(arr, 0, sizeof(int) * 10);\n\t\tif (n == 0) arr[0] = 1;\n\t\twhile (n > 0)\n\t\t{\n\t\t\tarr[n % 10] = 1;\n\t\t\tn = n / 10;\n\t\t}\n\t\tfor (int i = 0; i < 10; i++)\n\t\t\tresult[i] += arr[i];\n\t}\n\tfor (int i = 0; i < 10; i++)\n\t\tprintf(\"%d: %d\\n\", i, result[i]);\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-04771a9a92f54cb1b4125e4528c6a193", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600469856" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/20.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/20.exercises/config.json" new file mode 100644 index 000000000..2c1722f24 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/20.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-2d92b024f38245afa28cec2ec78b78cf", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/20.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/20.exercises/solution.json" new file mode 100644 index 000000000..369c2f63c --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/20.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "adaafd274929424bbc919eeecf16104f", + "keywords": "算法高阶,字符串匹配,算法问题选编,利用有限自动机进行字符串匹配", + "title": "输出最长的递增数字字符串", + "desc": [ + { + "content": "\n

如何在一亿位整数组成的字符串中找到最长的递增数字字符串?

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \n#define MAX_SIZE 100000\nint main()\n{\n\tchar buf[MAX_SIZE] = {0};\n\tint i = 0,len = 0,index = 0;\n\tchar maxbuf[12] = {0}; \n\tchar maxbuf2[12] = {0};\n\tint maxlen = 0;\n\tgets(buf); \n\tlen = strlen(buf); \n\tmaxbuf2[0] = buf[0];\n\ti = 1;\n\tindex = 1;\n\twhile(i < len)\n\t{\n\t\tif (buf[i] > buf[i-1])\n\t\t{\n\t\t\tmaxbuf2[index] = buf[i];\n\t\t\tindex++;\n\t\t}else\n\t\t{\n\t\t\tif (index > maxlen)\n\t\t\t{\n\t\t\t\tmaxlen = index;\n\t\t\t\tstrcpy(maxbuf,maxbuf2);\n\t\t\t\tmaxbuf[index] = '\\0';\n\t\t\t\tmaxbuf2[0] = buf[i];\n\t\t\t\tindex = 1;\n\t\t\t}else\n\t\t\t{\n\t\t\t\tmaxbuf2[0] = buf[i];\n\t\t\t\tindex = 1;\n\t\t\t}\n\t\t}\n\t\ti++;\n\t}\n\tif (index > maxlen)\n\t{\n\t\tmaxlen = index;\n\t\tstrcpy(maxbuf,maxbuf2);\n\t\tmaxbuf[index] = '\\0';\n\t}\n\tprintf(\"最大串长度:%d,字符串:%s\\n\",maxlen,maxbuf);\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-2d92b024f38245afa28cec2ec78b78cf", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600469968" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/21.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/21.exercises/config.json" new file mode 100644 index 000000000..b60116ed0 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/21.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-d42952ba501a46e5a121004d2f62e724", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/21.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/21.exercises/solution.json" new file mode 100644 index 000000000..0596e5fd0 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/21.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "15f66b0e55ac4032adb5988691b42b98", + "keywords": "算法高阶,数论算法,元素的幂,算法问题选编", + "title": "目标值与数组所有元素去比对,找出最接近的元素,输出下标", + "desc": [ + { + "content": "\n举例如下:一个数组{915,941,960,976,992,1015,1034,1050,1073,1089,1115,1131,1150,1166,1182,1208,1227};目标值假设是1000,最接近元素为992,下标为4", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nint main()\n{\n\tint min = (1 << 31) - 1;\n\tint idx = 0;\n\tint arr[] = {915,941,960,976,992,1015,1034,1050,1073,1089,1115,1131,1150,1166,1182,1208,1227};\n\tint n = 1000;\n\tfor (int i = 0; i < sizeof(arr) / sizeof(int); i++)\n\t{\n\t\tint diff = arr[i] - n;\n\t\tif (diff < 0) diff = -diff;\n\t\tif (diff < min)\n\t\t{\n\t\t\tmin = diff;\n\t\t\tidx = i;\n\t\t}\n\t}\n\tprintf(\"最接近的是%d 下标是%d\", arr[idx], idx);\n \treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-d42952ba501a46e5a121004d2f62e724", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470168" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/22.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/22.exercises/config.json" new file mode 100644 index 000000000..4a992d837 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/22.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-0c1bff5243bc4c4fbb688b0c8e1d1bc0", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/22.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/22.exercises/solution.json" new file mode 100644 index 000000000..402e572a1 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/22.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "4b667dd8e9684cf0b6803199b4dea008", + "keywords": "数学运算,图形输出", + "title": "输入一个正整数n(代表图形的行数),输出如样例形式的图形", + "desc": [ + { + "content": "\n输入:5\n输出:\nA\nABA \nABCBA \nABCDCBA \nABCDEDCBA", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \nusing namespace std;\nint main() {\n\tint N;\n\tcin >> N;\n\tfor (int i = 0; i < N; i++)\n\t{\n\t\tfor (int j = 0; j < N - i; j++) printf(\" \");\n\t\tfor (int j = 0; j < i; j++) printf(\"%c\", (char)(j + 'A'));\n\t\tfor (int j = i; j >= 0; j--) printf(\"%c\", (char)(j + 'A'));\n\t\tprintf(\"\\n\");\n\t}\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-0c1bff5243bc4c4fbb688b0c8e1d1bc0", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470266" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/23.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/23.exercises/config.json" new file mode 100644 index 000000000..3913b3f4e --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/23.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-33f647ff549d4301a57cd82b9872bbf8", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/23.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/23.exercises/solution.json" new file mode 100644 index 000000000..38bc61c52 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/23.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "9f1a313a18104a15a16993dc67f8da0d", + "keywords": "算法高阶,数论算法,元素的幂,算法问题选编", + "title": "逆序存放数组中的数据,并输出指定元素", + "desc": [ + { + "content": "\n

将给定的n个整数存入数组中,将数组中的这n个数逆序存放,再按要求输出指定的数组元素。\n输入格式:\n在第一行中给出一个正整数n(1≤n≤10)。第二行输入n个整数,用空格分开。第三行输入一个非负整数m(m<n)。\n输出格式:\n在一行中输出逆序存放后下标为m的数组元素。行末无空格。

\n输入样例:

\n
\n6\n10 8 1 2 3 4\n2
\n

输出样例:

\n
\n2
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \nint main()\n{\n\tint n,m;\n\tscanf(\"%d\",&n);\n\tif(n<1||n>10){\n\t printf(\"1≤n≤10\");\n\t return 0;\n\t}\n\tint *a = (int*)malloc(sizeof(int)*n);\n\tfor(int i=n-1; i>=0; i-- ){\n\t\tscanf(\"%d\",&a[i]);\n\t}\n\tscanf(\"%d\",&m);\n\tif(m<0||m>=n){\n\t printf(\"0≤m\nusing namespace std;\nvoid funShift(int m,char *p,int n)\n{\n\tchar c;\n\tfor (int j = 0; j < m;j++)\n\t{\n\t\tc = p[n-1];\n\t\tfor (int i = n-1; i > 0; i--)\n\t\t{\n\t\t\tp[i] = p[i-1];\n\t\t}\n\t\tp[0] = c;\n\t}\n}\nint main() \n{ \n\tint i,m,n; \n\tcin >> m >> n; \n\tchar *p =new char[n+1];\n\tp[n] = 0;\n\tfor(i = 0; i < n; ++i) \n\t\tcin >> p[i]; \n\tfunShift(m,p,n); \n\tfor(i = 0; i < n; ++i) \n\t\tcout << p[i] << ' '; \n\tcout << endl; \n\tdelete [] p; \n\tgetchar();\n\tgetchar();\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-7077b339c1ef498ca92107cbc966a652", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470169" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/25.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/25.exercises/config.json" new file mode 100644 index 000000000..e28b05d90 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/25.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-8159c79d4b6e4544bf44d1f7b9a57ff9", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/25.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/25.exercises/solution.json" new file mode 100644 index 000000000..f11f963b0 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/25.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "7b4639bc58ec40cba62d0e7025d4600d", + "keywords": "算法高阶,数论算法,素数的测试,算法问题选编", + "title": "求前n个素数之和", + "desc": [ + { + "content": "\n题目描述\n求前n个素数的和。 \n例如,前5个素数是2、3、5、7、11,它们的和是28。 \n输入\n一个整数n,1<=n<=1000。 \n输出\n前n个素数的和 \n样例输入\n5\n样例输出\n28\n提示\n第1000个素数是7919。", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nint main()\n{\n\tint n,i,j,sum,a;\n\tcin>>n;\n\ta = 0;\n\ti = 2;\n\tsum=0;\n\twhile(a请编写一个fun函数,实现如下功能:将一个字符串中第一个连续数字转换成整数,作为函数值返回,否则返回0(程序的输入输出要有提示)\n比如:字符串中的内容为:"abc123 def45gh",则函数的返回值为123。

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \nusing namespace std;\nint fun(string str);\nint main(void) {\n\tstring str = \"abc123 def45gh\";\n\tcout << fun(str);\n\treturn 0;\n}\nint fun(string str) {\n\tint index = -1;\n\tint score = 0;\n\tfor (int i = 0; i < str.length(); i++) {\n\t\tif ((str[i] >= 48 && str[i] <= 57) && (i + 1 < str.length()) && (str[i + 1] >= 48 && str[i + 1] <= 57)) {\n\t\t\tindex = i;\n\t\t\tbreak;\n\t\t}\n\t}\n\tif (index == -1) {\n\t\treturn score;\n\t}\n\tscore = str[index] - '0';\n\tfor (int i = index + 1; i < str.length(); i++) {\n\t\tif (str[i] >= 48 && str[i] <= 57) {\n\t\t\tscore *= 10;\n\t\t\tscore += str[i] - '0';\n\t\t} else {\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn score;\n}", + "language": "cpp" + }, + "node_id": "dailycode-d44bd3f0766b4d3b92ff5b5ded112675", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600469963" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/27.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/27.exercises/config.json" new file mode 100644 index 000000000..c41055d47 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/27.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-69ef472d89dd4a86ba769fd50d0ad909", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/27.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/27.exercises/solution.json" new file mode 100644 index 000000000..08111b9ea --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/27.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "ad89713d26b348c6ab72d1b227cb5a8b", + "keywords": "算法初阶,快速排序,快速排序的描述,排序和顺序统计量", + "title": "计算sin(x)", + "desc": [ + { + "content": "\n描述\n计算sin(x)=x-x^3/3!+x^5/5!-X^7/7!+......,直到最后一项的绝对值小于10-7时停止计算。其中-2Π<=x<=2Π,^表示次方,如x^3表示x的3次方。\n输入\n一个实数x,-2Π<=x<=2Π\n输出\nsin(x)的值\n输入样例 1 \n3.142\n输出样例 1\n-0.000407347", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include\n#include\ndouble sin(double);\ndouble nResult(double,double);\nint main()\n{\n\tdouble x=0;\n\tscanf(\"%lf\",&x);\n\tprintf(\"sin(%lf)=%lf\\n\",x,sin(x));\n\treturn 0;\n}\ndouble sin(double x)\n{\n\tint i=0;\n\tdouble result=0,n=0;\n\twhile( fabs( n=nResult(x,2*++i-1) ) > 0e-7 )\n\t\tresult+=(i%2==1)?n:-n;\n\treturn result;\n}\ndouble nResult(double x,double n)\n{\n\treturn n==1?x:nResult(x,n-1)*x/n;\n}", + "language": "cpp" + }, + "node_id": "dailycode-69ef472d89dd4a86ba769fd50d0ad909", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470166" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/28.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/28.exercises/config.json" new file mode 100644 index 000000000..8fa905f53 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/28.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-022a4daf03b444b1b4fed08a83b469cd", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/28.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/28.exercises/solution.json" new file mode 100644 index 000000000..ecd6e2b1b --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/28.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "9f7b44bc0ca244a5b5d910902921af69", + "keywords": "算法高阶,NP完全性,算法问题选编,多项式时间的验证", + "title": "猴子吃桃", + "desc": [ + { + "content": "\n问题:猴子第一天摘了若干个桃子,吃了一半,不过瘾,又多吃了1个。第二天早上将剩余的桃子又吃掉一半,并且又多吃了1个。此后每天都是吃掉前一天剩下的一半零一个。到第n天再想吃时,发现只剩下1个桃子,问第一天它摘了多少桃子?为了加强交互性,由用户输入不同的天数n进行递推,即假设第n天的桃子数为1。同时还要增加对用户输入数据的合法性验证(如:不允许输入的天数是0和负数)", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nint main()\n{\n\tint ret,day,i=1,sum=1;\n\twhile (1)\n\t{\n\t\tprintf(\"Input days:\\n\");\n\t\tret=scanf(\"%d\",&day);\n\t\tif ((ret!=1)||(day<=0))\n\t\t{\n\t\t\tfflush(stdin);\n\t\t\tcontinue;\n\t\t}\n\t\tbreak;\n\t}\n\tdo\n\t{\n\t\tsum=(sum+1)*2;\n\t\ti++;\n\t}while(i给你二叉搜索树的根节点 root ,该树中的两个节点被错误地交换。请在不改变其结构的情况下,恢复这棵树。

进阶:使用 O(n) 空间复杂度的解法很容易实现。你能想出一个只使用常数空间的解决方案吗?

 

示例 1:

\"\"
输入:root = [1,3,null,null,2]
输出:
[3,1,null,null,2]
解释:
3 不能是 1 左孩子,因为 3 > 1 。交换 1 和 3 使二叉搜索树有效。

示例 2:

\"\"
输入:root = [3,1,4,null,null,2]
输出:
[2,1,4,null,null,3]
解释:
2 不能在 3 的右子树中,因为 2 < 3 。交换 2 和 3 使二叉搜索树有效。

 

提示:

    \t
  • 树上节点的数目在范围 [2, 1000]
  • \t
  • -231 <= Node.val <= 231 - 1
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nstruct TreeNode\n{\n\tint val;\n\tTreeNode *left;\n\tTreeNode *right;\n\tTreeNode() : val(0), left(nullptr), right(nullptr) {}\n\tTreeNode(int x) : val(x), left(nullptr), right(nullptr) {}\n\tTreeNode(int x, TreeNode *left, TreeNode *right) : val(x), left(left), right(right) {}\n};\nclass Solution\n{\npublic:\n\tvoid recoverTree(TreeNode *root)\n\t{\n\t\tdfs(root);\n\t\tint tmp = p0_->val;\n\t\tp0_->val = p1_->val;\n\t\tp1_->val = tmp;\n\t}\nprivate:\n\tint wrong_ = 0;\n\tTreeNode *prev_ = nullptr;\n\tTreeNode *p0_ = nullptr;\n\tTreeNode *p1_ = nullptr;\n\tvoid dfs(TreeNode *root)\n\t{\n\t\tif (root == nullptr || wrong_ == 2)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tdfs(root->left);\n\t\tif (prev_ != nullptr && prev_->val > root->val)\n\t\t{\n\t\t\tif (++wrong_ == 1)\n\t\t\t{\n\t\t\t\tp0_ = prev_;\n\t\t\t\tp1_ = root;\n\t\t\t}\n\t\t\telse if (wrong_ == 2)\n\t\t\t{\n\t\t\t\tp1_ = root;\n\t\t\t}\n\t\t}\n\t\tprev_ = root;\n\t\tdfs(root->right);\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-22d0c66ac13e492ab38799ba4281480b", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470826" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/3.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/3.exercises/config.json" new file mode 100644 index 000000000..2d9ef0a01 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/3.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-e140a9b572594a378231e0b69e615f00", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/3.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/3.exercises/solution.json" new file mode 100644 index 000000000..aa16074f6 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/3.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "5cb9e1d5145d47fab87b6f8e0c239c15", + "keywords": "算法高阶,数论算法,算法问题选编,整数的因子分解", + "title": "利用字母组成图形", + "desc": [ + { + "content": "\n利用字母可以组成一些美丽的图形,下面给出了一个例子:\nABCDEFG\nBABCDEF\nCBABCDE\nDCBABCD\nEDCBABC\n这是一个5行7列的图形,请找出这个图形的规律,并输出一个n行m列的图形。\n输入一行,包含两个整数n和m,分别表示你要输出的图形的行数的列数。", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include\n#include\nint main()\n{\n\tint m,n;\n\tscanf(\"%d%d\",&n,&m);\n\tint i,j;\n\tfor(i=0;i给你一个整数数组 nums ,数组中的元素 互不相同 。返回该数组所有可能的子集(幂集)。

解集 不能 包含重复的子集。你可以按 任意顺序 返回解集。

 

示例 1:

输入:nums = [1,2,3]
输出:
[[],[1],[2],[1,2],[3],[1,3],[2,3],[1,2,3]]

示例 2:

输入:nums = [0]
输出:
[[],[0]]

 

提示:

    \t
  • 1 <= nums.length <= 10
  • \t
  • -10 <= nums[i] <= 10
  • \t
  • nums 中的所有元素 互不相同
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nclass Solution\n{\npublic:\n\tvector> subsets(vector &nums)\n\t{\n\t\tvector> res;\n\t\tdfs(nums, 0, res);\n\t\treturn res;\n\t}\nprivate:\n\tvector stack;\n\tvoid dfs(vector &nums, int start, vector> &res)\n\t{\n\t\tres.push_back(stack);\n\t\tfor (int i = start; i < nums.size(); i++)\n\t\t{\n\t\t\tstack.push_back(nums[i]);\n\t\t\tdfs(nums, i + 1, res);\n\t\t\tstack.pop_back();\n\t\t}\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-6a239526fac34bcc9894cfee622ca3a4", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600469824" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/31.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/31.exercises/config.json" new file mode 100644 index 000000000..2596576d0 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/31.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-7529fd6dd7004bc6842a048dbe5f25cc", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/31.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/31.exercises/solution.json" new file mode 100644 index 000000000..6a65463ea --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/31.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "31bb7bc11f944fe7b47650cfcbb7376b", + "keywords": "数学,动态规划,组合数学", + "title": "不同路径", + "desc": [ + { + "content": "\n

一个机器人位于一个 m x n 网格的左上角 (起始点在下图中标记为 “Start” )。

\n

机器人每次只能向下或者向右移动一步。机器人试图达到网格的右下角(在下图中标记为 “Finish” )。

\n

问总共有多少条不同的路径?

\n

 

\n

示例 1:

\n
输入:m = 3, n = 7
输出:
28
\n

示例 2:

\n
输入:m = 3, n = 2
输出:
3
解释:
从左上角开始,总共有 3 条路径可以到达右下角。
1. 向右 -> 向下 -> 向下
2. 向下 -> 向下 -> 向右
3. 向下 -> 向右 -> 向下
\n

示例 3:

\n
输入:m = 7, n = 3
输出:
28
\n

示例 4:

\n
输入:m = 3, n = 3
输出:
6
\n

 

\n

提示:

\n
    \n
  • 1 <= m, n <= 100
  • \n
  • 题目数据保证答案小于等于 2 * 109
  • \n
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \nstatic int uniquePaths(int m, int n)\n{\n\tint row, col;\n\tint *grids = malloc(m * n * sizeof(int));\n\tfor (col = 0; col < m; col++)\n\t{\n\t\tgrids[col] = 1;\n\t}\n\tfor (row = 0; row < n; row++)\n\t{\n\t\tgrids[row * m] = 1;\n\t}\n\tfor (row = 1; row < n; row++)\n\t{\n\t\tfor (col = 1; col < m; col++)\n\t\t{\n\t\t\tgrids[row * m + col] = grids[row * m + col - 1] + grids[(row - 1) * m + col];\n\t\t}\n\t}\n\treturn grids[m * n - 1];\n}\nint main(int argc, char **argv)\n{\n\tif (argc != 3)\n\t{\n\t\tfprintf(stderr, \"Usage: ./test m n\\n\");\n\t\texit(-1);\n\t}\n\tprintf(\"%d\\n\", uniquePaths(atoi(argv[1]), atoi(argv[2])));\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-7529fd6dd7004bc6842a048dbe5f25cc", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600469822" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/32.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/32.exercises/config.json" new file mode 100644 index 000000000..a09368ef9 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/32.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-11e24a6aacb34945ba8db8b0a1f76088", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/32.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/32.exercises/solution.json" new file mode 100644 index 000000000..f98da7647 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/32.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "baa3bacd331e4371b700887e567f1fa3", + "keywords": "哈希表,字符串,回溯", + "title": "电话号码的字母组合", + "desc": [ + { + "content": "\n

给定一个仅包含数字 2-9 的字符串,返回所有它能表示的字母组合。答案可以按 任意顺序 返回。

给出数字到字母的映射如下(与电话按键相同)。注意 1 不对应任何字母。

 

示例 1:

输入:digits = \"23\"
输出:
[\"ad\",\"ae\",\"af\",\"bd\",\"be\",\"bf\",\"cd\",\"ce\",\"cf\"]

示例 2:

输入:digits = \"\"
输出:
[]

示例 3:

输入:digits = \"2\"
输出:
[\"a\",\"b\",\"c\"]

 

提示:

    \t
  • 0 <= digits.length <= 4
  • \t
  • digits[i] 是范围 ['2', '9'] 的一个数字。
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "class Solution\n{\npublic:\n\tvector letterCombinations(string digits)\n\t{\n\t\tvector nummap({\" \",\n\t\t\t\t\t\t\t \"\",\n\t\t\t\t\t\t\t \"abc\",\n\t\t\t\t\t\t\t \"def\",\n\t\t\t\t\t\t\t \"ghi\",\n\t\t\t\t\t\t\t \"jkl\",\n\t\t\t\t\t\t\t \"mno\",\n\t\t\t\t\t\t\t \"pqrs\",\n\t\t\t\t\t\t\t \"tuv\",\n\t\t\t\t\t\t\t \"wxyz\"});\n\t\tvector rs;\n\t\tvector empty;\n\t\tif (digits.size() == 0)\n\t\t\treturn empty;\n\t\tfor (auto d : digits)\n\t\t{\n\t\t\tif (d == '0')\n\t\t\t\treturn empty;\n\t\t\tif (d == '1')\n\t\t\t\treturn empty;\n\t\t\tauto &s = nummap[d - '0'];\n\t\t\tif (s.size() == 0)\n\t\t\t\tcontinue;\n\t\t\tif (rs.size() == 0)\n\t\t\t\tfor (auto c : s)\n\t\t\t\t{\n\t\t\t\t\tstring t;\n\t\t\t\t\tt.push_back(c);\n\t\t\t\t\trs.emplace_back(t);\n\t\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tvector rn;\n\t\t\t\tfor (auto c : s)\n\t\t\t\t{\n\t\t\t\t\tfor (auto r : rs)\n\t\t\t\t\t{\n\t\t\t\t\t\tr.push_back(c);\n\t\t\t\t\t\trn.emplace_back(std::move(r));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstd::swap(rs, rn);\n\t\t\t}\n\t\t}\n\t\treturn rs;\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-11e24a6aacb34945ba8db8b0a1f76088", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600471003" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/33.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/33.exercises/config.json" new file mode 100644 index 000000000..43264d418 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/33.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-b1ac676f141f4700bf7a6461416bf409", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/33.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/33.exercises/solution.json" new file mode 100644 index 000000000..891d08bd0 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/33.exercises/solution.json" @@ -0,0 +1,76 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "93f4a20c10584a4aa9a52d08e6f1df50", + "keywords": "树,二叉搜索树,动态规划,回溯,二叉树", + "title": "不同的二叉搜索树 II", + "desc": [ + { + "content": "\n
\n

给你一个整数 n ,请你生成并返回所有由 n 个节点组成且节点值从 1n 互不相同的不同\n二叉搜索树 。可以按 任意顺序 返回答案。\n

", + "language": "markdown" + }, + { + "content": "\n

 

", + "language": "markdown" + }, + { + "content": "\n
\n
\n

示例 1:

\n\"\"\n
输入:n = 3\n输出:[[1,null,2,null,3],[1,null,3,2],[2,1,3],[3,1,null,null,2],[3,2,null,1]]\n
", + "language": "markdown" + }, + { + "content": "\n

示例 2:

", + "language": "markdown" + }, + { + "content": "\n
输入:n = 1\n输出:[[1]]\n
", + "language": "markdown" + }, + { + "content": "\n

 

", + "language": "markdown" + }, + { + "content": "\n

提示:

", + "language": "markdown" + }, + { + "content": "\n
    \n
  • 1 <= n <= 8
  • \n
\n
\n
\n
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \nstruct TreeNode\n{\n\tint val;\n\tstruct TreeNode *left;\n\tstruct TreeNode *right;\n};\nstatic struct TreeNode *dfs(int low, int high, int *count)\n{\n\tint i, j, k;\n\tif (low > high)\n\t{\n\t\t*count = 0;\n\t\treturn NULL;\n\t}\n\telse if (low == high)\n\t{\n\t\tstruct TreeNode *node = malloc(sizeof(*node));\n\t\tnode->val = low;\n\t\tnode->left = NULL;\n\t\tnode->right = NULL;\n\t\t*count = 1;\n\t\treturn node;\n\t}\n\telse\n\t{\n\t\t*count = 0;\n\t\tint capacity = 5;\n\t\tstruct TreeNode *roots = malloc(capacity * sizeof(struct TreeNode));\n\t\tfor (i = low; i <= high; i++)\n\t\t{\n\t\t\tint left_cnt, right_cnt;\n\t\t\tstruct TreeNode *left_subs = dfs(low, i - 1, &left_cnt);\n\t\t\tstruct TreeNode *right_subs = dfs(i + 1, high, &right_cnt);\n\t\t\tif (left_cnt == 0)\n\t\t\t\tleft_cnt = 1;\n\t\t\tif (right_cnt == 0)\n\t\t\t\tright_cnt = 1;\n\t\t\tif (*count + (left_cnt * right_cnt) >= capacity)\n\t\t\t{\n\t\t\t\tcapacity *= 2;\n\t\t\t\tcapacity += left_cnt * right_cnt;\n\t\t\t\troots = realloc(roots, capacity * sizeof(struct TreeNode));\n\t\t\t}\n\t\t\tfor (j = 0; j < left_cnt; j++)\n\t\t\t{\n\t\t\t\tfor (k = 0; k < right_cnt; k++)\n\t\t\t\t{\n\t\t\t\t\troots[*count].val = i;\n\t\t\t\t\troots[*count].left = left_subs == NULL ? NULL : &left_subs[j];\n\t\t\t\t\troots[*count].right = right_subs == NULL ? NULL : &right_subs[k];\n\t\t\t\t\t(*count)++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn roots;\n\t}\n}\nstatic struct TreeNode **generateTrees(int n, int *returnSize)\n{\n\tint i, count = 0;\n\tstruct TreeNode *roots = dfs(1, n, &count);\n\tstruct TreeNode **results = malloc(count * sizeof(struct TreeNode *));\n\tfor (i = 0; i < count; i++)\n\t{\n\t\tresults[i] = &roots[i];\n\t}\n\t*returnSize = count;\n\treturn results;\n}\nstatic void dump(struct TreeNode *node)\n{\n\tprintf(\"%d \", node->val);\n\tif (node->left != NULL)\n\t{\n\t\tdump(node->left);\n\t}\n\telse\n\t{\n\t\tprintf(\"# \");\n\t}\n\tif (node->right != NULL)\n\t{\n\t\tdump(node->right);\n\t}\n\telse\n\t{\n\t\tprintf(\"# \");\n\t}\n}\nint main(int argc, char **argv)\n{\n\tif (argc != 2)\n\t{\n\t\tfprintf(stderr, \"Usage: ./test n\\n\");\n\t\texit(-1);\n\t}\n\tint i, count = 0;\n\tstruct TreeNode **results = generateTrees(atoi(argv[1]), &count);\n\tfor (i = 0; i < count; i++)\n\t{\n\t\tdump(results[i]);\n\t\tprintf(\"\\n\");\n\t}\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-b1ac676f141f4700bf7a6461416bf409", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600471004" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/34.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/34.exercises/config.json" new file mode 100644 index 000000000..0e8912811 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/34.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-cf3b107ef2f143bf9071cd2d97d83a02", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/34.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/34.exercises/solution.json" new file mode 100644 index 000000000..90241ef46 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/34.exercises/solution.json" @@ -0,0 +1,120 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "82e92bc6457a45cd8a6890a7dcae7483", + "keywords": "字符串", + "title": "字符串转换整数 (atoi)", + "desc": [ + { + "content": "\n
\n

请你来实现一个 myAtoi(string s) 函数,使其能将字符串转换成一个 32 位有符号整数(类似 C/C++ 中的 atoi 函数)。

", + "language": "markdown" + }, + { + "content": "\n

函数 myAtoi(string s) 的算法如下:

", + "language": "markdown" + }, + { + "content": "\n
    \n
  • 读入字符串并丢弃无用的前导空格
  • \n
  • 检查下一个字符(假设还未到字符末尾)为正还是负号,读取该字符(如果有)。 确定最终结果是负数还是正数。 如果两者都不存在,则假定结果为正。
  • \n
  • 读入下一个字符,直到到达下一个非数字字符或到达输入的结尾。字符串的其余部分将被忽略。
  • \n
  • 将前面步骤读入的这些数字转换为整数(即,\"123\" -> 123, \"0032\" -> 32)。如果没有读入数字,则整数为 0 。必要时更改符号(从步骤 2 开始)。
  • \n
  • 如果整数数超过 32 位有符号整数范围 [−231,  231 − 1]\n,需要截断这个整数,使其保持在这个范围内。具体来说,小于 −231 的整数应该被固定为 −231 ,大于\n231 − 1 的整数应该被固定为 231 − 1 。\n
  • \n
  • 返回整数作为最终结果。
  • \n
", + "language": "markdown" + }, + { + "content": "\n

注意:

", + "language": "markdown" + }, + { + "content": "\n
    \n
  • 本题中的空白字符只包括空格字符 ' '
  • \n
  • 除前导空格或数字后的其余字符串外,请勿忽略 任何其他字符。
  • \n
", + "language": "markdown" + }, + { + "content": "\n

 

", + "language": "markdown" + }, + { + "content": "\n

示例 1:

", + "language": "markdown" + }, + { + "content": "\n
输入:s = \"42\"\n输出:42\n解释:加粗的字符串为已经读入的字符,插入符号是当前读取的字符。\n第 1 步:\"42\"(当前没有读入字符,因为没有前导空格)\n^\n第 2 步:\"42\"(当前没有读入字符,因为这里不存在 '-' 或者 '+')\n^\n第 3 步:\"42\"(读入 \"42\")\n^\n解析得到整数 42 。\n由于 \"42\" 在范围 [-231, 231 - 1] 内,最终结果为 42 。
", + "language": "markdown" + }, + { + "content": "\n

示例 2:

", + "language": "markdown" + }, + { + "content": "\n
输入:s = \"   -42\"\n输出:-42\n解释:\n第 1 步:\"   -42\"(读入前导空格,但忽视掉)\n^\n第 2 步:\"   -42\"(读入 '-' 字符,所以结果应该是负数)\n^\n第 3 步:\"   -42\"(读入 \"42\")\n^\n解析得到整数 -42 。\n由于 \"-42\" 在范围 [-231, 231 - 1] 内,最终结果为 -42 。\n
", + "language": "markdown" + }, + { + "content": "\n

示例 3:

", + "language": "markdown" + }, + { + "content": "\n
输入:s = \"4193 with words\"\n输出:4193\n解释:\n第 1 步:\"4193 with words\"(当前没有读入字符,因为没有前导空格)\n^\n第 2 步:\"4193 with words\"(当前没有读入字符,因为这里不存在 '-' 或者 '+')\n^\n第 3 步:\"4193 with words\"(读入 \"4193\";由于下一个字符不是一个数字,所以读入停止)\n^\n解析得到整数 4193 。\n由于 \"4193\" 在范围 [-231, 231 - 1] 内,最终结果为 4193 。\n
", + "language": "markdown" + }, + { + "content": "\n

示例 4:

", + "language": "markdown" + }, + { + "content": "\n
输入:s = \"words and 987\"\n输出:0\n解释:\n第 1 步:\"words and 987\"(当前没有读入字符,因为没有前导空格)\n^\n第 2 步:\"words and 987\"(当前没有读入字符,因为这里不存在 '-' 或者 '+')\n^\n第 3 步:\"words and 987\"(由于当前字符 'w' 不是一个数字,所以读入停止)\n^\n解析得到整数 0 ,因为没有读入任何数字。\n由于 0 在范围 [-231, 231 - 1] 内,最终结果为 0 。
", + "language": "markdown" + }, + { + "content": "\n

示例 5:

", + "language": "markdown" + }, + { + "content": "\n
输入:s = \"-91283472332\"\n输出:-2147483648\n解释:\n第 1 步:\"-91283472332\"(当前没有读入字符,因为没有前导空格)\n^\n第 2 步:\"-91283472332\"(读入 '-' 字符,所以结果应该是负数)\n^\n第 3 步:\"-91283472332\"(读入 \"91283472332\")\n^\n解析得到整数 -91283472332 。\n由于 -91283472332 小于范围 [-231, 231 - 1] 的下界,最终结果被截断为 -231 = -2147483648 。
", + "language": "markdown" + }, + { + "content": "\n

 

", + "language": "markdown" + }, + { + "content": "\n

提示:

", + "language": "markdown" + }, + { + "content": "\n
    \n
  • 0 <= s.length <= 200
  • \n
  • s 由英文字母(大写和小写)、数字(0-9)、' ''+''-' 和\n'.' 组成\n
  • \n
\n
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "int myAtoi(char *str)\n{\n\tint i = 0;\n\tint sign = 0;\n\twhile (str[i] && str[i] == ' ')\n\t\ti++;\n\tif (str[i] == NULL)\n\t\treturn 0;\n\tif (str[i] == '-')\n\t{\n\t\tsign = 1;\n\t\ti++;\n\t}\n\telse if (str[i] == '+')\n\t{\n\t\tsign = 0;\n\t\ti++;\n\t}\n\telse if (str[i] < '0')\n\t\treturn 0;\n\telse if (str[i] > '9')\n\t\treturn 0;\n\tlong long int r = 0;\n\twhile (str[i])\n\t{\n\t\tif (str[i] < '0')\n\t\t\tbreak;\n\t\telse if (str[i] > '9')\n\t\t\tbreak;\n\t\telse\n\t\t\tr = r * 10 + str[i++] - '0';\n\t\tif (r > INT_MAX)\n\t\t\tbreak;\n\t}\n\tr = sign ? -r : r;\n\tif (r < INT_MIN)\n\t\treturn INT_MIN;\n\tif (r > INT_MAX)\n\t\treturn INT_MAX;\n\treturn (int)r;\n}", + "language": "cpp" + }, + "node_id": "dailycode-cf3b107ef2f143bf9071cd2d97d83a02", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470794" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/35.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/35.exercises/config.json" new file mode 100644 index 000000000..3f8c2f259 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/35.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-86063bc2e4f9408c90a68336b7d0b233", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/35.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/35.exercises/solution.json" new file mode 100644 index 000000000..3894c0e71 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/35.exercises/solution.json" @@ -0,0 +1,76 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "b83b2c495c46406e8776d85e98306307", + "keywords": "树,二叉搜索树,数学,动态规划,二叉树", + "title": "不同的二叉搜索树", + "desc": [ + { + "content": "\n
\n

给你一个整数 n ,求恰由 n 个节点组成且节点值从 1n 互不相同的 二叉搜索树\n有多少种?返回满足题意的二叉搜索树的种数。

", + "language": "markdown" + }, + { + "content": "\n

 

", + "language": "markdown" + }, + { + "content": "\n

示例 1:

\n\n
输入:n = 3\n输出:5\n
", + "language": "markdown" + }, + { + "content": "\n

示例 2:

", + "language": "markdown" + }, + { + "content": "\n
输入:n = 1\n输出:1\n
", + "language": "markdown" + }, + { + "content": "\n

 

", + "language": "markdown" + }, + { + "content": "\n

提示:

", + "language": "markdown" + }, + { + "content": "\n
    \n
  • 1 <= n <= 19
  • \n
\n
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nclass Solution\n{\npublic:\n\tint numTrees(int n)\n\t{\n\t\tvector sum(n + 1);\n\t\tsum[0] = 1;\n\t\tfor (int i = 1; i <= n; i++)\n\t\t{\n\t\t\tfor (int j = 0; j < i; j++)\n\t\t\t{\n\t\t\t\tsum[i] += sum[j] * sum[i - j - 1];\n\t\t\t}\n\t\t}\n\t\treturn sum[n];\n\t}\n}", + "language": "cpp" + }, + "node_id": "dailycode-86063bc2e4f9408c90a68336b7d0b233", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600469926" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/36.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/36.exercises/config.json" new file mode 100644 index 000000000..220ff1358 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/36.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-38ec094e925c4284a95356064aa65287", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/36.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/36.exercises/solution.json" new file mode 100644 index 000000000..98cf36606 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/36.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "166b639fcb7c4523896615e6ea790a5b", + "keywords": "数组", + "title": "插入区间", + "desc": [ + { + "content": "\n

给你一个 无重叠的按照区间起始端点排序的区间列表。

\n

在列表中插入一个新的区间,你需要确保列表中的区间仍然有序且不重叠(如果有必要的话,可以合并区间)。

\n

 

\n

示例 1:

\n
输入:intervals = [[1,3],[6,9]], newInterval = [2,5]
输出:
[[1,5],[6,9]]
\n

示例 2:

\n
输入:intervals = [[1,2],[3,5],[6,7],[8,10],[12,16]], newInterval = [4,8]
输出:
[[1,2],[3,10],[12,16]]
解释:
这是因为新的区间 [4,8] 与 [3,5],[6,7],[8,10] 重叠。
\n

示例 3:

\n
输入:intervals = [], newInterval = [5,7]
输出:
[[5,7]]
\n

示例 4:

\n
输入:intervals = [[1,5]], newInterval = [2,3]
输出:
[[1,5]]
\n

示例 5:

\n
输入:intervals = [[1,5]], newInterval = [2,7]
输出:
[[1,7]]
\n

 

\n

提示:

\n
    \n
  • 0 <= intervals.length <= 104
  • \n
  • intervals[i].length == 2
  • \n
  • 0 <= intervals[i][0] <= intervals[i][1] <= 105
  • \n
  • intervals 根据 intervals[i][0]升序 排列
  • \n
  • newInterval.length == 2
  • \n
  • 0 <= newInterval[0] <= newInterval[1] <= 105
  • \n
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \nstatic int compare(const void *a, const void *b)\n{\n\treturn ((int *)a)[0] - ((int *)b)[0];\n}\nint **insert(int **intervals, int intervalsSize, int *intervalsColSize, int *newInterval,\n\t\t\t int newIntervalSize, int *returnSize, int **returnColumnSizes)\n{\n\tint i, len = 0;\n\tint *tmp = malloc((intervalsSize + 1) * 2 * sizeof(int));\n\tfor (i = 0; i < intervalsSize; i++)\n\t{\n\t\ttmp[i * 2] = intervals[i][0];\n\t\ttmp[i * 2 + 1] = intervals[i][1];\n\t}\n\ttmp[i * 2] = newInterval[0];\n\ttmp[i * 2 + 1] = newInterval[1];\n\tqsort(tmp, intervalsSize + 1, 2 * sizeof(int), compare);\n\tint **results = malloc((intervalsSize + 1) * sizeof(int *));\n\tresults[0] = malloc(2 * sizeof(int));\n\tresults[0][0] = tmp[0];\n\tresults[0][1] = tmp[1];\n\tfor (i = 1; i < intervalsSize + 1; i++)\n\t{\n\t\tresults[i] = malloc(2 * sizeof(int));\n\t\tif (tmp[i * 2] > results[len][1])\n\t\t{\n\t\t\tlen++;\n\t\t\tresults[len][0] = tmp[i * 2];\n\t\t\tresults[len][1] = tmp[i * 2 + 1];\n\t\t}\n\t\telse if (tmp[i * 2 + 1] > results[len][1])\n\t\t{\n\t\t\tresults[len][1] = tmp[i * 2 + 1];\n\t\t}\n\t}\n\tlen += 1;\n\t*returnSize = len;\n\t*returnColumnSizes = malloc(len * sizeof(int));\n\tfor (i = 0; i < len; i++)\n\t{\n\t\t(*returnColumnSizes)[i] = 2;\n\t}\n\treturn results;\n}\nint main(int argc, char **argv)\n{\n\tif (argc < 3 || argc % 2 == 0)\n\t{\n\t\tfprintf(stderr, \"Usage: ./test new_s new_e s0 e0 s1 e1...\");\n\t\texit(-1);\n\t}\n\tint new_interv[2];\n\tnew_interv[0] = atoi(argv[1]);\n\tnew_interv[1] = atoi(argv[2]);\n\tint i, count = 0;\n\tint *size = malloc((argc - 3) / 2 * sizeof(int));\n\tint **intervals = malloc((argc - 3) / 2 * sizeof(int *));\n\tfor (i = 0; i < (argc - 3) / 2; i++)\n\t{\n\t\tintervals[i] = malloc(2 * sizeof(int));\n\t\tintervals[i][0] = atoi(argv[i * 2 + 3]);\n\t\tintervals[i][1] = atoi(argv[i * 2 + 4]);\n\t}\n\tint *col_sizes;\n\tint **results = insert(intervals, (argc - 3) / 2, size, new_interv, 2, &count, &col_sizes);\n\tfor (i = 0; i < count; i++)\n\t{\n\t\tprintf(\"[%d,%d]\\n\", results[i][0], results[i][1]);\n\t}\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-38ec094e925c4284a95356064aa65287", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470920" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/37.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/37.exercises/config.json" new file mode 100644 index 000000000..30cb61f2a --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/37.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-015937d27ef34a46b5ef9f61bde201e1", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/37.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/37.exercises/solution.json" new file mode 100644 index 000000000..044d19a49 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/37.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "019e45cad3ba412aa84ebbc18cba97aa", + "keywords": "数组,双指针,排序", + "title": "四数之和", + "desc": [ + { + "content": "\n

给定一个包含 n 个整数的数组 nums 和一个目标值 target,判断 nums 中是否存在四个元素 a,b,c 和 d ,使得 a + b + c + d 的值与 target 相等?找出所有满足条件且不重复的四元组。

注意:答案中不可以包含重复的四元组。

 

示例 1:

输入:nums = [1,0,-1,0,-2,2], target = 0
输出:
[[-2,-1,1,2],[-2,0,0,2],[-1,0,0,1]]

示例 2:

输入:nums = [], target = 0
输出:
[]

 

提示:

    \t
  • 0 <= nums.length <= 200
  • \t
  • -109 <= nums[i] <= 109
  • \t
  • -109 <= target <= 109
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "class Solution\n{\npublic:\n\tvector> fourSum(vector &nums, int target)\n\t{\n\t\tlong long l_target = target;\n\t\tsort(nums.begin(), nums.end());\n\t\tvector> results;\n\t\tint N = nums.size();\n\t\tfor (int i = 0; i < N - 3; i++)\n\t\t{\n\t\t\tif (i > 0 && nums[i] == nums[i - 1])\n\t\t\t\tcontinue;\n\t\t\tfor (int j = i + 1; j < N - 2; j++)\n\t\t\t{\n\t\t\t\tif (j > i + 1 && nums[j] == nums[j - 1])\n\t\t\t\t\tcontinue;\n\t\t\t\tfor (int k = j + 1, l = N - 1; k < l; k++)\n\t\t\t\t{\n\t\t\t\t\tif (k > j + 1 && nums[k] == nums[k - 1])\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\twhile (k < l &&\n\t\t\t\t\t\t (l_target - nums[i] - nums[j] - nums[k] - nums[l]) < 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tl--;\n\t\t\t\t\t}\n\t\t\t\t\tif (k >= l)\n\t\t\t\t\t{\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((target - nums[i] - nums[j] - nums[k] - nums[l]) == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tresults.emplace_back(\n\t\t\t\t\t\t\tvector({nums[i], nums[j], nums[k], nums[l]}));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-015937d27ef34a46b5ef9f61bde201e1", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600469919" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/38.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/38.exercises/config.json" new file mode 100644 index 000000000..15d1f04ea --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/38.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-476afc7e273347f9bd276d7b148cf931", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/38.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/38.exercises/solution.json" new file mode 100644 index 000000000..e2d80040d --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/38.exercises/solution.json" @@ -0,0 +1,108 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "c6f46d0c1b2f482fa29cf08bd6cf0215", + "keywords": "字符串", + "title": "外观数列", + "desc": [ + { + "content": "\n
\n

给定一个正整数 n ,输出外观数列的第 n 项。

", + "language": "markdown" + }, + { + "content": "\n

「外观数列」是一个整数序列,从数字 1 开始,序列中的每一项都是对前一项的描述。

", + "language": "markdown" + }, + { + "content": "\n

你可以将其视作是由递归公式定义的数字字符串序列:

", + "language": "markdown" + }, + { + "content": "\n
    \n
  • countAndSay(1) = \"1\"
  • \n
  • countAndSay(n) 是对 countAndSay(n-1) 的描述,然后转换成另一个数字字符串。
  • \n
", + "language": "markdown" + }, + { + "content": "\n

前五项如下:

", + "language": "markdown" + }, + { + "content": "\n
\n1.     1\n2.     11\n3.     21\n4.     1211\n5.     111221\n第一项是数字 1 \n描述前一项,这个数是 1 即 “ 一 个 1 ”,记作 \"11\"\n描述前一项,这个数是 11 即 “ 二 个 1 ” ,记作 \"21\"\n描述前一项,这个数是 21 即 “ 一 个 2 + 一 个 1 ” ,记作 \"1211\"\n描述前一项,这个数是 1211 即 “ 一 个 1 + 一 个 2 + 二 个 1 ” ,记作 \"111221\"\n
", + "language": "markdown" + }, + { + "content": "\n

描述 一个数字字符串,首先要将字符串分割为 最小 数量的组,每个组都由连续的最多 相同字符\n组成。然后对于每个组,先描述字符的数量,然后描述字符,形成一个描述组。要将描述转换为数字字符串,先将每组中的字符数量用数字替换,再将所有描述组连接起来。

", + "language": "markdown" + }, + { + "content": "\n

例如,数字字符串 \"3322251\" 的描述如下图:

\n\"\"\nsrc=\"https://cdn.jsdelivr.net/gh/doocs/leetcode@main/solution/0000-0099/0038.Count%20and%20Say/images/countandsay.jpg\"\nstyle=\"width:\n
    \n
", + "language": "markdown" + }, + { + "content": "\n

 

", + "language": "markdown" + }, + { + "content": "\n

示例 1:

", + "language": "markdown" + }, + { + "content": "\n
输入:n = 1\n输出:\"1\"\n解释:这是一个基本样例。\n
", + "language": "markdown" + }, + { + "content": "\n

示例 2:

", + "language": "markdown" + }, + { + "content": "\n
输入:n = 4\n输出:\"1211\"\n解释:\ncountAndSay(1) = \"1\"\ncountAndSay(2) = 读 \"1\" = 一 个 1 = \"11\"\ncountAndSay(3) = 读 \"11\" = 二 个 1 = \"21\"\ncountAndSay(4) = 读 \"21\" = 一 个 2 + 一 个 1 = \"12\" + \"11\" = \"1211\"\n
", + "language": "markdown" + }, + { + "content": "\n

 

", + "language": "markdown" + }, + { + "content": "\n

提示:

", + "language": "markdown" + }, + { + "content": "\n
    \n
  • 1 <= n <= 30
  • \n
\n
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \n#include \nstatic void parse(char *input, char *output)\n{\n\tchar *p = input;\n\tchar *q = output;\n\twhile (*p != '\\0')\n\t{\n\t\tint count = 1;\n\t\twhile (p[0] == p[1])\n\t\t{\n\t\t\tcount++;\n\t\t\tp++;\n\t\t}\n\t\tint n = 0;\n\t\twhile (count > 0)\n\t\t{\n\t\t\tn += count % 10;\n\t\t\tcount /= 10;\n\t\t}\n\t\twhile (n > 0)\n\t\t{\n\t\t\t*q++ = (n % 10) + '0';\n\t\t\tn /= 10;\n\t\t}\n\t\t*q++ = p[0];\n\t\tp++;\n\t}\n\t*q = '\\0';\n}\nstatic char *countAndSay(int n)\n{\n\tif (n < 1)\n\t{\n\t\treturn NULL;\n\t}\n\tchar *result;\n\tchar *prev = malloc(10000);\n\tchar *next = malloc(10000);\n\tstrcpy(prev, \"1\");\n\tif (n == 1)\n\t{\n\t\treturn prev;\n\t}\n\tint i;\n\tfor (i = 2; i <= n; i++)\n\t{\n\t\tif (i & 0x1)\n\t\t{\n\t\t\tparse(next, prev);\n\t\t\tresult = prev;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tparse(prev, next);\n\t\t\tresult = next;\n\t\t}\n\t}\n\treturn result;\n}\nint main(int argc, char **argv)\n{\n\tif (argc != 2)\n\t{\n\t\tfprintf(stderr, \"Usage: ./test n\\n\");\n\t\texit(-1);\n\t}\n\tprintf(\"%s\\n\", countAndSay(atoi(argv[1])));\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-476afc7e273347f9bd276d7b148cf931", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470795" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/39.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/39.exercises/config.json" new file mode 100644 index 000000000..3a72dcc6a --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/39.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-1d70b9eb3b884de6b1e5b8b30a25f2b4", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/39.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/39.exercises/solution.json" new file mode 100644 index 000000000..c9fc84335 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/39.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "1307e303d169493b8d5e46cd3133404d", + "keywords": "链表,双指针", + "title": "旋转链表", + "desc": [ + { + "content": "\n

给你一个链表的头节点 head ,旋转链表,将链表每个节点向右移动 k 个位置。

 

示例 1:

\"\"
输入:head = [1,2,3,4,5], k = 2
输出:
[4,5,1,2,3]

示例 2:

\"\"
输入:head = [0,1,2], k = 4
输出:
[2,0,1]

 

提示:

    \t
  • 链表中节点的数目在范围 [0, 500]
  • \t
  • -100 <= Node.val <= 100
  • \t
  • 0 <= k <= 2 * 109
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nstruct ListNode\n{\n\tint val;\n\tListNode *next;\n\tListNode() : val(0), next(nullptr) {}\n\tListNode(int x) : val(x), next(nullptr) {}\n\tListNode(int x, ListNode *next) : val(x), next(next) {}\n};\nclass Solution\n{\npublic:\n\tListNode *rotateRight(ListNode *head, int k)\n\t{\n\t\tif (head == nullptr)\n\t\t{\n\t\t\treturn head;\n\t\t}\n\t\tint len = 0;\n\t\tListNode dummy;\n\t\tdummy.next = head;\n\t\tListNode *tail = &dummy;\n\t\twhile (tail->next != nullptr)\n\t\t{\n\t\t\tlen++;\n\t\t\ttail = tail->next;\n\t\t}\n\t\tListNode *prev = &dummy;\n\t\tListNode *p = head;\n\t\tk = k % len;\n\t\tfor (int i = 0; i < len - k; i++)\n\t\t{\n\t\t\tprev = p;\n\t\t\tp = p->next;\n\t\t}\n\t\tif (p != nullptr)\n\t\t{\n\t\t\tprev->next = tail->next;\n\t\t\ttail->next = head;\n\t\t\thead = p;\n\t\t}\n\t\treturn head;\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-1d70b9eb3b884de6b1e5b8b30a25f2b4", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600469922" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/4.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/4.exercises/config.json" new file mode 100644 index 000000000..23a999e4a --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/4.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-fe4cced5cecb47dba951613f6b186850", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/4.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/4.exercises/solution.json" new file mode 100644 index 000000000..0d8c0a85b --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/4.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "16bf643a88c848a1835904baa99cce89", + "keywords": "算法高阶,数论算法,元素的幂,算法问题选编", + "title": "输入一个数查找比它小的元素", + "desc": [ + { + "content": "\n

一个整型数组有10元素,请先给这10个元素赋值,然后随便输入一个数,最后输出数组中比这个数小的所有元素,每个数用空格隔开,如果没有找到,则输出not find。
\n

\n

\"\"\n

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nint main()\n{\n\tint a[10],i,n;\n\tint isfind = 0;\n\tprintf(\"please set array values:\");\n\tfor(i=0;i<10;i++)\n\t\tscanf(\"%d\",&a[i]);\n\tprintf(\"please enter one num:\");\n\tscanf(\"%d\",&n);\n\tfor (i=0;i<10;i++)\n\t{\n\t\tif(a[i] < n)\n\t\t{\n\t\t\tisfind = 1;\n\t\t\tprintf(\"%d \",a[i]);\n\t\t}\n\t}\n\tif(isfind)\n\t\tprintf(\"\\n\");\n\telse\n\t\tprintf(\"not find\\n\");\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-fe4cced5cecb47dba951613f6b186850", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470172" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/40.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/40.exercises/config.json" new file mode 100644 index 000000000..08f60a08b --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/40.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-66904ffb7b03468eaac045c49a84d854", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/40.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/40.exercises/solution.json" new file mode 100644 index 000000000..f5d4b010f --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/40.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "ee4e57be8bf44e5aa1032d69b3fe55b2", + "keywords": "数组,回溯", + "title": "组合", + "desc": [ + { + "content": "\n

给定两个整数 nk,返回 1 ... n 中所有可能的 k 个数的组合。

\n

示例:

\n
输入: n = 4, k = 2
输出:
[[2,4],[3,4],[2,3],[1,2],[1,3],[1,4],]
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nclass Solution\n{\npublic:\n\tvector> combine(int n, int k)\n\t{\n\t\tvector> res;\n\t\tdfs(n, k, 1, res);\n\t\treturn res;\n\t}\nprivate:\n\tvector stack;\n\tvoid dfs(int n, int k, int start, vector> &res)\n\t{\n\t\tif (stack.size() == k)\n\t\t{\n\t\t\tres.push_back(stack);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor (int i = start; i <= n; i++)\n\t\t\t{\n\t\t\t\tstack.push_back(i);\n\t\t\t\tdfs(n, k, i + 1, res);\n\t\t\t\tstack.pop_back();\n\t\t\t}\n\t\t}\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-66904ffb7b03468eaac045c49a84d854", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470921" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/41.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/41.exercises/config.json" new file mode 100644 index 000000000..e35993df5 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/41.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-9399618c5b70447fa35668bbe36d2da8", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/41.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/41.exercises/solution.json" new file mode 100644 index 000000000..e6e61bab7 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/41.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "57af5c6123504bd884409d603dd5f7f3", + "keywords": "字符串,动态规划,回溯", + "title": "括号生成", + "desc": [ + { + "content": "\n

数字 n 代表生成括号的对数,请你设计一个函数,用于能够生成所有可能的并且 有效的 括号组合。

 

示例 1:

输入:n = 3
输出:
[\"((()))\",\"(()())\",\"(())()\",\"()(())\",\"()()()\"]

示例 2:

输入:n = 1
输出:
[\"()\"]

 

提示:

    \t
  • 1 <= n <= 8
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "class Solution\n{\npublic:\n\tvoid gen(string &p, int lc, int rc, vector &r, int n)\n\t{\n\t\tif (lc > n)\n\t\t\treturn;\n\t\tif (lc == n && rc == n)\n\t\t{\n\t\t\tr.push_back(p);\n\t\t\treturn;\n\t\t}\n\t\tp.push_back('(');\n\t\tlc++;\n\t\tgen(p, lc, rc, r, n);\n\t\tp.pop_back();\n\t\tlc--;\n\t\tif (lc > rc)\n\t\t{\n\t\t\tp.push_back(')');\n\t\t\trc++;\n\t\t\tgen(p, lc, rc, r, n);\n\t\t\tp.pop_back();\n\t\t\trc--;\n\t\t}\n\t}\n\tvector generateParenthesis(int n)\n\t{\n\t\tstring p;\n\t\tint lc = 0, rc = 0;\n\t\tvector r;\n\t\tgen(p, lc, rc, r, n);\n\t\treturn r;\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-9399618c5b70447fa35668bbe36d2da8", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470115" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/42.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/42.exercises/config.json" new file mode 100644 index 000000000..3535538b0 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/42.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-cb4872e5db3e4e259d3f87e69917426c", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/42.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/42.exercises/solution.json" new file mode 100644 index 000000000..5248bb389 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/42.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "2ccf0ab29b484a67a42e6aa7b5387498", + "keywords": "数组,数学,矩阵", + "title": "旋转图像", + "desc": [ + { + "content": "\n

给定一个 × n 的二维矩阵 matrix 表示一个图像。请你将图像顺时针旋转 90 度。

你必须在 原地 旋转图像,这意味着你需要直接修改输入的二维矩阵。请不要 使用另一个矩阵来旋转图像。

 

示例 1:

\"\"
输入:matrix = [[1,2,3],[4,5,6],[7,8,9]]
输出:
[[7,4,1],[8,5,2],[9,6,3]]

示例 2:

\"\"
输入:matrix = [[5,1,9,11],[2,4,8,10],[13,3,6,7],[15,14,12,16]]
输出:
[[15,13,2,5],[14,3,4,1],[12,6,8,9],[16,7,10,11]]

示例 3:

输入:matrix = [[1]]
输出:
[[1]]

示例 4:

输入:matrix = [[1,2],[3,4]]
输出:
[[3,1],[4,2]]

 

提示:

    \t
  • matrix.length == n
  • \t
  • matrix[i].length == n
  • \t
  • 1 <= n <= 20
  • \t
  • -1000 <= matrix[i][j] <= 1000
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nclass Solution\n{\npublic:\n\tvoid rotate(vector> &matrix)\n\t{\n\t\tint size = matrix.size();\n\t\tfor (int i = 0; i < size / 2; i++)\n\t\t{\n\t\t\tint low = i, high = size - i - 1;\n\t\t\tfor (int j = low; j < high; j++)\n\t\t\t{\n\t\t\t\tint tmp = matrix[i][j];\n\t\t\t\tmatrix[i][j] = matrix[size - 1 - j][i];\n\t\t\t\tmatrix[size - 1 - j][i] = matrix[size - 1 - i][size - 1 - j];\n\t\t\t\tmatrix[size - 1 - i][size - 1 - j] = matrix[j][size - 1 - i];\n\t\t\t\tmatrix[j][size - 1 - i] = tmp;\n\t\t\t}\n\t\t}\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-cb4872e5db3e4e259d3f87e69917426c", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470225" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/43.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/43.exercises/config.json" new file mode 100644 index 000000000..405a17523 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/43.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-14099290be73415196ac10c7668e7aaf", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/43.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/43.exercises/solution.json" new file mode 100644 index 000000000..2f519f56e --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/43.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "f46a96dc0f3243df927e534ab3659466", + "keywords": "贪心,数组,双指针", + "title": "盛最多水的容器", + "desc": [ + { + "content": "\n

给你 n 个非负整数 a1,a2,...,an每个数代表坐标中的一个点 (i, ai) 。在坐标内画 n 条垂直线,垂直线 i 的两个端点分别为 (i, ai)(i, 0) 。找出其中的两条线,使得它们与 x 轴共同构成的容器可以容纳最多的水。

说明:你不能倾斜容器。

 

示例 1:

\"\"

输入:[1,8,6,2,5,4,8,3,7]
输出:
49
解释:
图中垂直线代表输入数组 [1,8,6,2,5,4,8,3,7]。在此情况下,容器能够容纳水(表示为蓝色部分)的最大值为 49。

示例 2:

输入:height = [1,1]
输出:
1

示例 3:

输入:height = [4,3,2,1,4]
输出:
16

示例 4:

输入:height = [1,2,1]
输出:
2

 

提示:

    \t
  • n = height.length
  • \t
  • 2 <= n <= 3 * 104
  • \t
  • 0 <= height[i] <= 3 * 104
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#define MAX(a, b) (((a) < (b)) ? (b) : (a))\n#define MIN(a, b) (((a) > (b)) ? (b) : (a))\nint maxArea(int *height, int heightSize)\n{\n\tint max = 0;\n\tint i = 0, j = heightSize - 1;\n\tint a;\n\twhile (i < j)\n\t{\n\t\ta = MIN(height[i], height[j]) * (j - i);\n\t\tmax = MAX(max, a);\n\t\tif (height[i] > height[j])\n\t\t\t--j;\n\t\telse\n\t\t\t++i;\n\t}\n\treturn max;\n}", + "language": "cpp" + }, + "node_id": "dailycode-14099290be73415196ac10c7668e7aaf", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600469816" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/44.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/44.exercises/config.json" new file mode 100644 index 000000000..59bbdc77b --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/44.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-bc7ff3f59cfd44729a2396f96ae5506c", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/44.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/44.exercises/solution.json" new file mode 100644 index 000000000..b7e7772fd --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/44.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "cc1b8932f88e4cc49bedde7f1da4b00a", + "keywords": "字符串,回溯", + "title": "复原 IP 地址", + "desc": [ + { + "content": "\n

给定一个只包含数字的字符串,用以表示一个 IP 地址,返回所有可能从 s 获得的 有效 IP 地址 。你可以按任何顺序返回答案。

有效 IP 地址 正好由四个整数(每个整数位于 0 到 255 之间组成,且不能含有前导 0),整数之间用 '.' 分隔。

例如:\"0.1.2.201\" 和 \"192.168.1.1\" 是 有效 IP 地址,但是 \"0.011.255.245\"、\"192.168.1.312\" 和 \"192.168@1.1\" 是 无效 IP 地址。

 

示例 1:

输入:s = \"25525511135\"
输出:
[\"255.255.11.135\",\"255.255.111.35\"]

示例 2:

输入:s = \"0000\"
输出:
[\"0.0.0.0\"]

示例 3:

输入:s = \"1111\"
输出:
[\"1.1.1.1\"]

示例 4:

输入:s = \"010010\"
输出:
[\"0.10.0.10\",\"0.100.1.0\"]

示例 5:

输入:s = \"101023\"
输出:
[\"1.0.10.23\",\"1.0.102.3\",\"10.1.0.23\",\"10.10.2.3\",\"101.0.2.3\"]

 

提示:

    \t
  • 0 <= s.length <= 3000
  • \t
  • s 仅由数字组成
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \n#include \n#include \nstatic bool valid(char *ip, int len)\n{\n\tif (len > 1 && ip[0] == '0')\n\t{\n\t\treturn false;\n\t}\n\tif (len == 3)\n\t{\n\t\tint n = (ip[0] - '0') * 100 + (ip[1] - '0') * 10 + (ip[2] - '0');\n\t\tif (n > 255)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n#define WIDTH 4\nstatic void dfs(char *s, int start, char *stack, int num, char **results, int *count)\n{\n\tint i, j;\n\tif (num == 4)\n\t{\n\t\tif (s[start] == '\\0')\n\t\t{\n\t\t\tresults[*count] = malloc(3 * 4 + 3 + 1);\n\t\t\tchar *p = results[*count];\n\t\t\tfor (j = 0; j < num; j++)\n\t\t\t{\n\t\t\t\tchar *q = stack + j * WIDTH;\n\t\t\t\twhile ((*p++ = *q++) != '\\0')\n\t\t\t\t{\n\t\t\t\t}\n\t\t\t\tif (j != 3)\n\t\t\t\t{\n\t\t\t\t\t*(p - 1) = '.';\n\t\t\t\t}\n\t\t\t}\n\t\t\t(*count)++;\n\t\t}\n\t}\n\telse\n\t{\n\t\tchar *p = stack + num * WIDTH;\n\t\tchar *q = p;\n\t\tfor (i = start; s[i] != '\\0' && i < start + 3; i++)\n\t\t{\n\t\t\t*q++ = s[i];\n\t\t\t*q = '\\0';\n\t\t\tif (!valid(p, q - p))\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tdfs(s, i + 1, stack, num + 1, results, count);\n\t\t\tif (num + 1 < 4)\n\t\t\t{\n\t\t\t\tmemset(stack + (num + 1) * WIDTH, 0, WIDTH);\n\t\t\t}\n\t\t}\n\t}\n}\nstatic char **restoreIpAddresses(char *s, int *returnSize)\n{\n\tint count = 0;\n\tchar **results = malloc(100 * sizeof(char *));\n\tchar addr[16] = {'\\0'};\n\tdfs(s, 0, addr, 0, results, &count);\n\t*returnSize = count;\n\treturn results;\n}\nint main(int argc, char **argv)\n{\n\tif (argc != 2)\n\t{\n\t\tfprintf(stderr, \"Usage: ./test num\\n\");\n\t\texit(-1);\n\t}\n\tint i, count = 0;\n\tchar **list = restoreIpAddresses(argv[1], &count);\n\tfor (i = 0; i < count; i++)\n\t{\n\t\tprintf(\"%s\\n\", list[i]);\n\t}\n}", + "language": "cpp" + }, + "node_id": "dailycode-bc7ff3f59cfd44729a2396f96ae5506c", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470923" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/45.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/45.exercises/config.json" new file mode 100644 index 000000000..72d3d084b --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/45.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-5a4d869e768940439c9c3f0672b4f188", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/45.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/45.exercises/solution.json" new file mode 100644 index 000000000..3026d358e --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/45.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "458f6358d7514fb6bcdfd7f9238c3d7a", + "keywords": "位运算,数学,回溯", + "title": "格雷编码", + "desc": [ + { + "content": "\n

格雷编码是一个二进制数字系统,在该系统中,两个连续的数值仅有一个位数的差异。

\n

给定一个代表编码总位数的非负整数 n,打印其格雷编码序列。即使有多个不同答案,你也只需要返回其中一种。

\n

格雷编码序列必须以 0 开头。

\n

 

\n

示例 1:

\n
输入: 2
输出:
 [0,1,3,2]
解释:
00 - 001 - 111 - 310 - 2对于给定的 n,其格雷编码序列并不唯一。例如,[0,2,3,1] 也是一个有效的格雷编码序列。00 - 010 - 211 - 301 - 1
\n

示例 2:

\n
输入: 0
输出:
 [0]
解释:
我们定义格雷编码序列必须以 0 开头。给定编码总位数为 n 的格雷编码序列,其长度为 2n。当 n = 0 时,长度为 20 = 1。因此,当 n = 0 时,其格雷编码序列为 [0]。
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \nint *grayCode(int n, int *returnSize)\n{\n\tif (n < 0)\n\t{\n\t\treturn NULL;\n\t}\n\tint i, count = 1 << n;\n\tint *codes = malloc(count * sizeof(int));\n\tfor (i = 0; i < count; i++)\n\t{\n\t\tcodes[i] = (i >> 1) ^ i;\n\t}\n\t*returnSize = 1 << n;\n\treturn codes;\n}\nint main(int argc, char **argv)\n{\n\tif (argc != 2)\n\t{\n\t\tfprintf(stderr, \"Usage: ./test n\\n\");\n\t\texit(-1);\n\t}\n\tint i, count;\n\tint *list = grayCode(atoi(argv[1]), &count);\n\tfor (i = 0; i < count; i++)\n\t{\n\t\tprintf(\"%d \", list[i]);\n\t}\n\tprintf(\"\\n\");\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-5a4d869e768940439c9c3f0672b4f188", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470797" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/46.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/46.exercises/config.json" new file mode 100644 index 000000000..79a02da96 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/46.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-106a2c55943a4191b61ee447cf14797b", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/46.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/46.exercises/solution.json" new file mode 100644 index 000000000..2064b99ab --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/46.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "7a6f6ca9a3c04afca7db080c109ad995", + "keywords": "数组,双指针", + "title": "下一个排列", + "desc": [ + { + "content": "\n

实现获取 下一个排列 的函数,算法需要将给定数字序列重新排列成字典序中下一个更大的排列。

如果不存在下一个更大的排列,则将数字重新排列成最小的排列(即升序排列)。

必须 原地 修改,只允许使用额外常数空间。

 

示例 1:

输入:nums = [1,2,3]
输出:
[1,3,2]

示例 2:

输入:nums = [3,2,1]
输出:
[1,2,3]

示例 3:

输入:nums = [1,1,5]
输出:
[1,5,1]

示例 4:

输入:nums = [1]
输出:
[1]

 

提示:

    \t
  • 1 <= nums.length <= 100
  • \t
  • 0 <= nums[i] <= 100
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nclass Solution\n{\npublic:\n\tvoid nextPermutation(vector &nums)\n\t{\n\t\tif (nums.size() < 2)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tint i = nums.size() - 2;\n\t\twhile (i >= 0 && nums[i] >= nums[i + 1])\n\t\t{\n\t\t\ti--;\n\t\t}\n\t\tif (i >= 0)\n\t\t{\n\t\t\tint j = nums.size() - 1;\n\t\t\twhile (j >= 0 && nums[j] >= nums[i])\n\t\t\t{\n\t\t\t\tj--;\n\t\t\t}\n\t\t\tswap(nums.begin() + i, nums.begin() + j);\n\t\t}\n\t\treverse(nums.begin() + i + 1, nums.end());\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-106a2c55943a4191b61ee447cf14797b", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600471007" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/47.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/47.exercises/config.json" new file mode 100644 index 000000000..5c5ceab2f --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/47.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-04de312db7184d038e58eb517b6b4977", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/47.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/47.exercises/solution.json" new file mode 100644 index 000000000..763654e5b --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/47.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "79def0a76b1546459f90832b72be77f8", + "keywords": "位运算,数组,回溯", + "title": "子集 II", + "desc": [ + { + "content": "\n

给你一个整数数组 nums ,其中可能包含重复元素,请你返回该数组所有可能的子集(幂集)。

解集 不能 包含重复的子集。返回的解集中,子集可以按 任意顺序 排列。

 

示例 1:

输入:nums = [1,2,2]
输出:
[[],[1],[1,2],[1,2,2],[2],[2,2]]

示例 2:

输入:nums = [0]
输出:
[[],[0]]

 

提示:

    \t
  • 1 <= nums.length <= 10
  • \t
  • -10 <= nums[i] <= 10
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nclass Solution\n{\npublic:\n\tvector> subsetsWithDup(vector &nums)\n\t{\n\t\tvector> res;\n\t\tsort(nums.begin(), nums.end());\n\t\tdfs(nums, 0, res);\n\t\treturn res;\n\t}\nprivate:\n\tvector stack;\n\tvoid dfs(vector &nums, int start, vector> &res)\n\t{\n\t\tres.push_back(stack);\n\t\tint last = INT_MIN;\n\t\tfor (int i = start; i < nums.size(); i++)\n\t\t{\n\t\t\tif (last != nums[i])\n\t\t\t{\n\t\t\t\tstack.push_back(nums[i]);\n\t\t\t\tdfs(nums, i + 1, res);\n\t\t\t\tstack.pop_back();\n\t\t\t}\n\t\t\tlast = nums[i];\n\t\t}\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-04de312db7184d038e58eb517b6b4977", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600469825" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/48.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/48.exercises/config.json" new file mode 100644 index 000000000..7437cd7b5 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/48.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-c3c6ea1a42034a1abe5bbb20adff156d", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/48.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/48.exercises/solution.json" new file mode 100644 index 000000000..730d59b15 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/48.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "4f4a298d07b14920a0c442fae663c09c", + "keywords": "栈,字符串", + "title": "简化路径", + "desc": [ + { + "content": "\n

给你一个字符串 path ,表示指向某一文件或目录的 Unix 风格 绝对路径 (以 '/' 开头),请你将其转化为更加简洁的规范路径。

在 Unix 风格的文件系统中,一个点(.)表示当前目录本身;此外,两个点 (..) 表示将目录切换到上一级(指向父目录);两者都可以是复杂相对路径的组成部分。任意多个连续的斜杠(即,'//')都被视为单个斜杠 '/' 。 对于此问题,任何其他格式的点(例如,'...')均被视为文件/目录名称。

请注意,返回的 规范路径 必须遵循下述格式:

    \t
  • 始终以斜杠 '/' 开头。
  • \t
  • 两个目录名之间必须只有一个斜杠 '/'
  • \t
  • 最后一个目录名(如果存在)不能 '/' 结尾。
  • \t
  • 此外,路径仅包含从根目录到目标文件或目录的路径上的目录(即,不含 '.''..')。

返回简化后得到的 规范路径

 

示例 1:

输入:path = \"/home/\"
输出:
\"/home\"
解释:
注意,最后一个目录名后面没有斜杠。

示例 2:

输入:path = \"/../\"
输出:
\"/\"
解释:
从根目录向上一级是不可行的,因为根目录是你可以到达的最高级。

示例 3:

输入:path = \"/home//foo/\"
输出:
\"/home/foo\"
解释:
在规范路径中,多个连续斜杠需要用一个斜杠替换。

示例 4:

输入:path = \"/a/./b/../../c/\"
输出:
\"/c\"

 

提示:

    \t
  • 1 <= path.length <= 3000
  • \t
  • path 由英文字母,数字,'.''/''_' 组成。
  • \t
  • path 是一个有效的 Unix 风格绝对路径。
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \n#include \nstatic char *simplifyPath(char *path)\n{\n\tint len = strlen(path);\n\tif (len == 0)\n\t{\n\t\treturn path;\n\t}\n\tchar *p = path;\n\tint *indexes = malloc(len * sizeof(int));\n\tint depth = 0;\n\tint name_start = 1;\n\twhile (*p != '\\0')\n\t{\n\t\tif (*p == '/')\n\t\t{\n\t\t\tif (p > path && *(p - 1) != '/' && *(p - 1) != '.')\n\t\t\t{\n\t\t\t\tname_start = 1;\n\t\t\t}\n\t\t}\n\t\telse if (*p == '.')\n\t\t{\n\t\t\tif (*(p + 1) == '\\0' || *(p + 1) == '/')\n\t\t\t{\n\t\t\t\tp += 1;\n\t\t\t}\n\t\t\telse if (*(p + 1) == '.' && (*(p + 2) == '\\0' || *(p + 2) == '/'))\n\t\t\t{\n\t\t\t\tif (depth > 0)\n\t\t\t\t{\n\t\t\t\t\tdepth--;\n\t\t\t\t\tname_start = 1;\n\t\t\t\t}\n\t\t\t\tp += 2;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tindexes[depth++] = p - path;\n\t\t\t\twhile (*p != '/' && *p != '\\0')\n\t\t\t\t{\n\t\t\t\t\tp++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (*p == '\\0')\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (name_start && depth >= 0)\n\t\t\t{\n\t\t\t\tindexes[depth++] = p - path;\n\t\t\t\tname_start = 0;\n\t\t\t}\n\t\t}\n\t\tp++;\n\t}\n\tint i;\n\tchar *result = malloc(len + 1);\n\tchar *q = result;\n\tif (depth <= 0)\n\t{\n\t\t*q++ = '/';\n\t}\n\telse\n\t{\n\t\tfor (i = 0; i < depth; i++)\n\t\t{\n\t\t\tp = path + indexes[i];\n\t\t\t*q++ = '/';\n\t\t\twhile (*p != '/')\n\t\t\t{\n\t\t\t\t*q++ = *p++;\n\t\t\t}\n\t\t}\n\t}\n\t*q = '\\0';\n\treturn result;\n}\nint main(int argc, char **argv)\n{\n\tif (argc != 2)\n\t{\n\t\tfprintf(stderr, \"Usage: ./test path\\n\");\n\t\texit(-1);\n\t}\n\tprintf(\"%s\\n\", simplifyPath(argv[1]));\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-c3c6ea1a42034a1abe5bbb20adff156d", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470830" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/49.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/49.exercises/config.json" new file mode 100644 index 000000000..3b7cca083 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/49.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-ac2a4675e933469195468c03c2062381", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/49.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/49.exercises/solution.json" new file mode 100644 index 000000000..7854044e0 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/49.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "fc109d2e803d4682bc8c90bff1aa9428", + "keywords": "递归,链表,数学", + "title": "两数相加", + "desc": [ + { + "content": "\n

给你两个 非空 的链表,表示两个非负的整数。它们每位数字都是按照 逆序 的方式存储的,并且每个节点只能存储 一位 数字。

请你将两个数相加,并以相同形式返回一个表示和的链表。

你可以假设除了数字 0 之外,这两个数都不会以 0 开头。

 

示例 1:

\"\"
输入:l1 = [2,4,3], l2 = [5,6,4]
输出:
[7,0,8]
解释:
342 + 465 = 807.

示例 2:

输入:l1 = [0], l2 = [0]
输出:
[0]

示例 3:

输入:l1 = [9,9,9,9,9,9,9], l2 = [9,9,9,9]
输出:
[8,9,9,9,0,0,0,1]

 

提示:

    \t
  • 每个链表中的节点数在范围 [1, 100]
  • \t
  • 0 <= Node.val <= 9
  • \t
  • 题目数据保证列表表示的数字不含前导零
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "struct ListNode\n{\n\tint val;\n\tstruct ListNode *next;\n};\nstruct ListNode *addTwoNumbers(struct ListNode *l1, struct ListNode *l2)\n{\n\tstruct ListNode *pp = NULL, *p = l1;\n\tstruct ListNode *qp = NULL, *q = l2;\n\tint carry = 0;\n\twhile (p != NULL && q != NULL)\n\t{\n\t\tp->val += q->val + carry;\n\t\tcarry = 0;\n\t\tif (p->val >= 10)\n\t\t{\n\t\t\tcarry = 1;\n\t\t\tp->val -= 10;\n\t\t}\n\t\tpp = p;\n\t\tp = p->next;\n\t\tqp = q;\n\t\tq = q->next;\n\t}\n\tif (q)\n\t{\n\t\tpp->next = p = q;\n\t\tqp->next = NULL;\n\t}\n\twhile (carry && p)\n\t{\n\t\tp->val += carry;\n\t\tcarry = 0;\n\t\tif (p->val >= 10)\n\t\t{\n\t\t\tcarry = 1;\n\t\t\tp->val -= 10;\n\t\t}\n\t\tpp = p;\n\t\tp = p->next;\n\t}\n\tif (carry)\n\t{\n\t\tstruct ListNode *n = (struct ListNode *)malloc(sizeof(struct ListNode));\n\t\tn->val = 1;\n\t\tn->next = NULL;\n\t\tpp->next = n;\n\t}\n\treturn l1;\n}", + "language": "cpp" + }, + "node_id": "dailycode-ac2a4675e933469195468c03c2062381", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600469916" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/5.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/5.exercises/config.json" new file mode 100644 index 000000000..4d7f0ee3c --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/5.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-5afc633f3ca1461e858b1cde58b04b68", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/5.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/5.exercises/solution.json" new file mode 100644 index 000000000..9b97918dc --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/5.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "4583002df4554ecd90bef873754b79e1", + "keywords": "算法初阶,最小值和最大值,排序和顺序统计量,中位数和顺序统计量", + "title": "二维数组找最值", + "desc": [ + { + "content": "\n

从键盘输入m(2<=m<=6)行n(2<=n<=6)列整型数据,编程找出其中的最大值及其所在位置的行列下标值并输出。\n输入格式:\n在第一行输入数据的行数m和列数n的值,从第二行开始以二维数组的形式依次输入m行n列整型数据。\n输出格式:\n依次输出最大值及其所在位置的行列下标值,中间以逗号,分隔,最后换行。\n

输入样例:

\n
\n3 4\n1 2 3 4\n8 9 7 6\n5 6 7 0
\n

输出样例:

\n
\n9,1,1
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nint main ()\n{\n\tint a[6][6];\n\tint m,n;\n\tint i,j;\n\tint max;\n\tint indexx=0,indexy=0;\n\tscanf(\"%d %d\",&m,&n);\n\tfor (i = 0;i max)\n\t\t\t\t{\n\t\t\t\t\tmax = a[i][j];\n\t\t\t\t\tindexx = i;\n\t\t\t\t\tindexy = j;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tprintf(\"%d,%d,%d\\n\",max,indexx,indexy);\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-5afc633f3ca1461e858b1cde58b04b68", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470252" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/50.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/50.exercises/config.json" new file mode 100644 index 000000000..a3613fc67 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/50.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-4b7ce801ab4b4c89baa38f79b25c873b", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/50.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/50.exercises/solution.json" new file mode 100644 index 000000000..471c907dd --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/50.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "227a6d828db449378c393687dc7973b6", + "keywords": "链表,双指针", + "title": "分隔链表", + "desc": [ + { + "content": "\n

给你一个链表的头节点 head 和一个特定值 x ,请你对链表进行分隔,使得所有 小于 x 的节点都出现在 大于或等于 x 的节点之前。

你应当 保留 两个分区中每个节点的初始相对位置。

 

示例 1:

\"\"
输入:head = [1,4,3,2,5,2], x = 3
输出
:[1,2,2,4,3,5]

示例 2:

输入:head = [2,1], x = 2
输出
:[1,2]

 

提示:

    \t
  • 链表中节点的数目在范围 [0, 200]
  • \t
  • -100 <= Node.val <= 100
  • \t
  • -200 <= x <= 200
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \nstruct ListNode\n{\n\tint val;\n\tstruct ListNode *next;\n};\nstruct ListNode *partition(struct ListNode *head, int x)\n{\n\tstruct ListNode dummy;\n\tstruct ListNode *prev1 = &dummy, *pivot;\n\tdummy.next = head;\n\tfor (pivot = head; pivot != NULL; pivot = pivot->next)\n\t{\n\t\tif (pivot->val >= x)\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t\tprev1 = pivot;\n\t}\n\tstruct ListNode *p = pivot->next;\n\tstruct ListNode *prev2 = pivot;\n\twhile (p != NULL)\n\t{\n\t\tif (p->val < x)\n\t\t{\n\t\t\tprev2->next = p->next;\n\t\t\tp->next = prev1->next;\n\t\t\tprev1->next = p;\n\t\t\tprev1 = p;\n\t\t\tp = prev2->next;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tprev2 = p;\n\t\t\tp = p->next;\n\t\t}\n\t}\n\treturn dummy.next;\n}\nint main(int argc, char **argv)\n{\n\tif (argc < 2)\n\t{\n\t\tfprintf(stderr, \"Usage: ./test target n1 n2 n3...\\n\");\n\t\texit(-1);\n\t}\n\tint i, target = atoi(argv[1]);\n\tstruct ListNode *head = NULL;\n\tstruct ListNode *prev = NULL;\n\tstruct ListNode *p;\n\tfor (i = 0; i < argc - 2; i++)\n\t{\n\t\tp = malloc(sizeof(*p));\n\t\tp->val = atoi(argv[i + 2]);\n\t\tp->next = NULL;\n\t\tif (head == NULL)\n\t\t{\n\t\t\thead = p;\n\t\t\tprev = head;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tprev->next = p;\n\t\t\tprev = p;\n\t\t}\n\t}\n\tp = partition(head, target);\n\twhile (p != NULL)\n\t{\n\t\tprintf(\"%d \", p->val);\n\t\tp = p->next;\n\t}\n\tprintf(\"\\n\");\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-4b7ce801ab4b4c89baa38f79b25c873b", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470229" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/51.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/51.exercises/config.json" new file mode 100644 index 000000000..3a6a87df9 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/51.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-eb10661e86af495b8acef4aac7e1af86", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/51.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/51.exercises/solution.json" new file mode 100644 index 000000000..7803d1579 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/51.exercises/solution.json" @@ -0,0 +1,124 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "ca49a1a190c646e99b6681637db6af05", + "keywords": "哈希表,数学,字符串", + "title": "整数转罗马数字", + "desc": [ + { + "content": "\n
\n

罗马数字包含以下七种字符: I, V, X, LCD 和 M。\n

", + "language": "markdown" + }, + { + "content": "\n
字符          数值\nI             1\nV             5\nX             10\nL             50\nC             100\nD             500\nM             1000
", + "language": "markdown" + }, + { + "content": "\n

例如, 罗马数字 2 写做 II ,即为两个并列的 1。12\n写做 XII ,即为 X + II 。 27\n写做  XXVII,\n即为 XX + V + II 。

", + "language": "markdown" + }, + { + "content": "\n

通常情况下,罗马数字中小的数字在大的数字的右边。但也存在特例,例如 4 不写做 IIII,而是 IV。数字 1 在数字 5 的左边,所表示的数等于大数 5\n减小数 1 得到的数值 4 。同样地,数字 9 表示为 IX。这个特殊的规则只适用于以下六种情况:

", + "language": "markdown" + }, + { + "content": "\n
    \n
  • I 可以放在 V (5) 和 X (10) 的左边,来表示 4 和 9。
  • \n
  • X 可以放在 L (50) 和 C (100) 的左边,来表示 40\n和 90。 
  • \n
  • C 可以放在 D (500) 和 M (1000) 的左边,来表示 400\n和 900。
  • \n
", + "language": "markdown" + }, + { + "content": "\n

给你一个整数,将其转为罗马数字。

", + "language": "markdown" + }, + { + "content": "\n

 

", + "language": "markdown" + }, + { + "content": "\n

示例 1:

", + "language": "markdown" + }, + { + "content": "\n
输入: num = 3\n
输出:
\"III\"
", + "language": "markdown" + }, + { + "content": "\n

示例 2:

", + "language": "markdown" + }, + { + "content": "\n
输入: num = 4\n
输出:
\"IV\"
", + "language": "markdown" + }, + { + "content": "\n

示例 3:

", + "language": "markdown" + }, + { + "content": "\n
输入: num = 9\n
输出:
\"IX\"
", + "language": "markdown" + }, + { + "content": "\n

示例 4:

", + "language": "markdown" + }, + { + "content": "\n
输入: num = 58\n
输出:
\"LVIII\"\n
解释:
L = 50, V = 5, III = 3.\n
", + "language": "markdown" + }, + { + "content": "\n

示例 5:

", + "language": "markdown" + }, + { + "content": "\n
输入: num = 1994\n
输出:
\"MCMXCIV\"\n
解释:
M = 1000, CM = 900, XC = 90, IV = 4.
", + "language": "markdown" + }, + { + "content": "\n

 

", + "language": "markdown" + }, + { + "content": "\n

提示:

", + "language": "markdown" + }, + { + "content": "\n
    \n
  • 1 <= num <= 3999
  • \n
\n
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "struct rmap\n{\n\tchar *r;\n\tint v;\n} units[] = {\n\t{\"M\", 1000},\n\t{\"CM\", 900},\n\t{\"D\", 500},\n\t{\"CD\", 400},\n\t{\"C\", 100},\n\t{\"XC\", 90},\n\t{\"L\", 50},\n\t{\"XL\", 40},\n\t{\"X\", 10},\n\t{\"IX\", 9},\n\t{\"V\", 5},\n\t{\"IV\", 4},\n\t{\"I\", 1}};\n#include \nchar result[64];\nchar *intToRoman(int num)\n{\n\tresult[0] = 0;\n\tint ri = 0;\n\tint i = 0;\n\twhile (num)\n\t{\n\t\tif (num >= units[i].v)\n\t\t{\n\t\t\tstrcat(result, units[i].r);\n\t\t\tnum -= units[i].v;\n\t\t}\n\t\telse\n\t\t{\n\t\t\ti++;\n\t\t}\n\t}\n\treturn result;\n}", + "language": "cpp" + }, + "node_id": "dailycode-eb10661e86af495b8acef4aac7e1af86", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600469817" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/52.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/52.exercises/config.json" new file mode 100644 index 000000000..207ff0c9a --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/52.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-2d11d0b5706c470bb25b9eb3ec8ab140", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/52.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/52.exercises/solution.json" new file mode 100644 index 000000000..636cec3a0 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/52.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "bef2ebd0a073475684a90db3e02ab3bd", + "keywords": "数组,回溯", + "title": "全排列 II", + "desc": [ + { + "content": "\n

给定一个可包含重复数字的序列 nums按任意顺序 返回所有不重复的全排列。

 

示例 1:

输入:nums = [1,1,2]
输出:
[[1,1,2], [1,2,1], [2,1,1]]

示例 2:

输入:nums = [1,2,3]
输出:
[[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]

 

提示:

    \t
  • 1 <= nums.length <= 8
  • \t
  • -10 <= nums[i] <= 10
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nclass Solution\n{\npublic:\n\tvector> permuteUnique(vector &nums)\n\t{\n\t\tvector> res;\n\t\tvector used(nums.size());\n\t\tsort(nums.begin(), nums.end());\n\t\tdfs(nums, used, res);\n\t\treturn res;\n\t}\nprivate:\n\tvector stack;\n\tvoid dfs(vector &nums, vector &used, vector> &res)\n\t{\n\t\tif (stack.size() == nums.size())\n\t\t{\n\t\t\tres.push_back(stack);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor (int i = 0; i < nums.size(); i++)\n\t\t\t{\n\t\t\t\tif (!used[i])\n\t\t\t\t{\n\t\t\t\t\tif (i > 0 && !used[i - 1] && nums[i - 1] == nums[i])\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tstack.push_back(nums[i]);\n\t\t\t\t\tused[i] = true;\n\t\t\t\t\tdfs(nums, used, res);\n\t\t\t\t\tstack.pop_back();\n\t\t\t\t\tused[i] = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-2d11d0b5706c470bb25b9eb3ec8ab140", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470224" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/53.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/53.exercises/config.json" new file mode 100644 index 000000000..01fd5bf16 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/53.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-5916246072a346c986fd14202099c13e", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/53.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/53.exercises/solution.json" new file mode 100644 index 000000000..1e10bef8b --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/53.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "c999971e21ad43e3aae8542f7740dd5c", + "keywords": "哈希表,字符串,滑动窗口", + "title": "无重复字符的最长子串", + "desc": [ + { + "content": "\n

给定一个字符串,请你找出其中不含有重复字符的 最长子串 的长度。

 

示例 1:

输入: s = \"abcabcbb\"
输出:
3
解释:
因为无重复字符的最长子串是 \"abc\",所以其长度为 3。

示例 2:

输入: s = \"bbbbb\"
输出:
1
解释:
因为无重复字符的最长子串是 \"b\",所以其长度为 1。

示例 3:

输入: s = \"pwwkew\"
输出:
3
解释:
因为无重复字符的最长子串是 \"wke\",所以其长度为 3。 \n请注意,你的答案必须是 子串 的长度,\"pwke\" 是一个子序列,不是子串。

示例 4:

输入: s = \"\"
输出:
0

 

提示:

    \t
  • 0 <= s.length <= 5 * 104
  • \t
  • s 由英文字母、数字、符号和空格组成
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "int hset[128];\nint lengthOfLongestSubstring(char *s)\n{\n\tint i = 0, j = 0;\n\tint m = 0;\n\tmemset(hset, 0, sizeof hset);\n\tfor (; s[j]; j++)\n\t{\n\t\ti = hset[s[j]] > i ? hset[s[j]] : i;\n\t\tm = m > j - i + 1 ? m : j - i + 1;\n\t\thset[s[j]] = j + 1;\n\t}\n\treturn m;\n}", + "language": "cpp" + }, + "node_id": "dailycode-5916246072a346c986fd14202099c13e", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600471011" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/54.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/54.exercises/config.json" new file mode 100644 index 000000000..d970ce80e --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/54.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-51ab560c60e241f9ba4b1f449db8f4fc", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/54.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/54.exercises/solution.json" new file mode 100644 index 000000000..177be82d0 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/54.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "d9fd29e18762417cbf523fbf4fb0aa5b", + "keywords": "字符串,动态规划", + "title": "解码方法", + "desc": [ + { + "content": "\n

一条包含字母 A-Z 的消息通过以下映射进行了 编码

\n
'A' -> 1'B' -> 2...'Z' -> 26
\n

解码 已编码的消息,所有数字必须基于上述映射的方法,反向映射回字母(可能有多种方法)。例如,\"11106\" 可以映射为:

\n
    \n
  • \"AAJF\" ,将消息分组为 (1 1 10 6)
  • \n
  • \"KJF\" ,将消息分组为 (11 10 6)
  • \n
\n

注意,消息不能分组为  (1 11 06) ,因为 \"06\" 不能映射为 \"F\" ,这是由于 \"6\" 和\n\"06\" 在映射中并不等价。\n

\n

给你一个只含数字的 非空 字符串 s ,请计算并返回 解码 方法的 总数

\n

题目数据保证答案肯定是一个 32 位 的整数。

\n

 

\n

示例 1:

\n
输入:s = \"12\"
输出:
2
解释:
它可以解码为 \"AB\"(1 2)或者 \"L\"(12)。
\n

示例 2:

\n
输入:s = \"226\"
输出:
3
解释:
它可以解码为 \"BZ\" (2 26), \"VF\" (22 6), 或者 \"BBF\" (2 2 6) 。
\n

示例 3:

\n
输入:s = \"0\"
输出:
0
解释:
没有字符映射到以 0 开头的数字。含有 0 的有效映射是 'J' -> \"10\" 和 'T'-> \"20\" 。由于没有字符,因此没有有效的方法对此进行解码,因为所有数字都需要映射。
\n

示例 4:

\n
输入:s = \"06\"
输出:
0
解释:
\"06\" 不能映射到 \"F\" ,因为字符串含有前导 0(\"6\" 和 \"06\" 在映射中并不等价)。
\n

 

\n

提示:

\n
    \n
  • 1 <= s.length <= 100
  • \n
  • s 只包含数字,并且可能包含前导零。
  • \n
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \n#include \nstatic int numDecodings(char *s)\n{\n\tint len = strlen(s);\n\tif (len == 0)\n\t{\n\t\treturn 0;\n\t}\n\tint a = 1;\n\tint b = s[0] == '0' ? 0 : a;\n\tint c = b;\n\tfor (int i = 2; i <= len; i++)\n\t{\n\t\tc = s[i - 1] == '0' ? 0 : b;\n\t\tint num = (s[i - 2] - '0') * 10 + (s[i - 1] - '0');\n\t\tif (num >= 10 && num <= 26)\n\t\t{\n\t\t\tc += a;\n\t\t}\n\t\ta = b;\n\t\tb = c;\n\t}\n\treturn c;\n}\nint main(int argc, char **argv)\n{\n\tif (argc != 2)\n\t{\n\t\tfprintf(stderr, \"Usage: ./test number\\n\");\n\t\texit(-1);\n\t}\n\tprintf(\"%d\\n\", numDecodings(argv[1]));\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-51ab560c60e241f9ba4b1f449db8f4fc", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600469925" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/55.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/55.exercises/config.json" new file mode 100644 index 000000000..5ec5a8fd0 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/55.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-a6beddb2efc64ddc8a28e593dfefc807", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/55.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/55.exercises/solution.json" new file mode 100644 index 000000000..ac6ab6ba3 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/55.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "7d7aea05317f4fa29074594e49a0cccc", + "keywords": "位运算,数学", + "title": "两数相除", + "desc": [ + { + "content": "\n

给定两个整数,被除数 dividend 和除数 divisor。将两数相除,要求不使用乘法、除法和 mod 运算符。

返回被除数 dividend 除以除数 divisor 得到的商。

整数除法的结果应当截去(truncate)其小数部分,例如:truncate(8.345) = 8 以及 truncate(-2.7335) = -2

 

示例 1:

输入: dividend = 10, divisor = 3
输出:
3
解释:
10/3 = truncate(3.33333..) = truncate(3) = 3

示例 2:

输入: dividend = 7, divisor = -3
输出:
-2
解释:
7/-3 = truncate(-2.33333..) = -2

 

提示:

    \t
  • 被除数和除数均为 32 位有符号整数。
  • \t
  • 除数不为 0。
  • \t
  • 假设我们的环境只能存储 32 位有符号整数,其数值范围是 [−231,  231 − 1]。本题中,如果除法结果溢出,则返回 231 − 1。
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nclass Solution\n{\npublic:\n\tint divide(int dividend, int divisor)\n\t{\n\t\tint signal = 1;\n\t\tunsigned int dvd = dividend;\n\t\tif (dividend < 0)\n\t\t{\n\t\t\tsignal *= -1;\n\t\t\tdvd = ~dvd + 1;\n\t\t}\n\t\tunsigned int dvs = divisor;\n\t\tif (divisor < 0)\n\t\t{\n\t\t\tsignal *= -1;\n\t\t\tdvs = ~dvs + 1;\n\t\t}\n\t\tint shift = 0;\n\t\twhile (dvd > dvs << shift)\n\t\t{\n\t\t\tshift++;\n\t\t}\n\t\tunsigned int res = 0;\n\t\twhile (dvd >= dvs)\n\t\t{\n\t\t\twhile (dvd < dvs << shift)\n\t\t\t{\n\t\t\t\tshift--;\n\t\t\t}\n\t\t\tres |= (unsigned int)1 << shift;\n\t\t\tdvd -= dvs << shift;\n\t\t}\n\t\tif (signal == 1 && res >= INT_MAX)\n\t\t{\n\t\t\treturn INT_MAX;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn res * signal;\n\t\t}\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-a6beddb2efc64ddc8a28e593dfefc807", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470833" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/56.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/56.exercises/config.json" new file mode 100644 index 000000000..100f9a380 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/56.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-1b393b30506f43f6874f85036d16a3de", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/56.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/56.exercises/solution.json" new file mode 100644 index 000000000..9cfb18ff6 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/56.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "0f48bea424f74cc99e0a9923a379de7b", + "keywords": "数组,矩阵,模拟", + "title": "螺旋矩阵", + "desc": [ + { + "content": "\n

给你一个 mn 列的矩阵 matrix ,请按照 顺时针螺旋顺序 ,返回矩阵中的所有元素。

 

示例 1:

\"\"
输入:matrix = [[1,2,3],[4,5,6],[7,8,9]]
输出:
[1,2,3,6,9,8,7,4,5]

示例 2:

\"\"
输入:matrix = [[1,2,3,4],[5,6,7,8],[9,10,11,12]]
输出:
[1,2,3,4,8,12,11,10,9,5,6,7]

 

提示:

    \t
  • m == matrix.length
  • \t
  • n == matrix[i].length
  • \t
  • 1 <= m, n <= 10
  • \t
  • -100 <= matrix[i][j] <= 100
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nclass Solution\n{\npublic:\n\tvector spiralOrder(vector> &matrix)\n\t{\n\t\tvector res;\n\t\tint hor_top = 0;\n\t\tint hor_bottom = matrix.size() - 1;\n\t\tint ver_left = 0;\n\t\tint ver_right = matrix[0].size() - 1;\n\t\tint direction = 0;\n\t\twhile (hor_top <= hor_bottom && ver_left <= ver_right)\n\t\t{\n\t\t\tswitch (direction)\n\t\t\t{\n\t\t\tcase 0:\n\t\t\t\tfor (int i = ver_left; i <= ver_right; i++)\n\t\t\t\t{\n\t\t\t\t\tres.push_back(matrix[hor_top][i]);\n\t\t\t\t}\n\t\t\t\thor_top++;\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tfor (int i = hor_top; i <= hor_bottom; i++)\n\t\t\t\t{\n\t\t\t\t\tres.push_back(matrix[i][ver_right]);\n\t\t\t\t}\n\t\t\t\tver_right--;\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tfor (int i = ver_right; i >= ver_left; i--)\n\t\t\t\t{\n\t\t\t\t\tres.push_back(matrix[hor_bottom][i]);\n\t\t\t\t}\n\t\t\t\thor_bottom--;\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tfor (int i = hor_bottom; i >= hor_top; i--)\n\t\t\t\t{\n\t\t\t\t\tres.push_back(matrix[i][ver_left]);\n\t\t\t\t}\n\t\t\t\tver_left++;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tdirection++;\n\t\t\tdirection %= 4;\n\t\t}\n\t\treturn res;\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-1b393b30506f43f6874f85036d16a3de", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470121" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/57.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/57.exercises/config.json" new file mode 100644 index 000000000..45dad5a1f --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/57.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-6c74549bf696457084ef66af3c8ab6e0", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/57.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/57.exercises/solution.json" new file mode 100644 index 000000000..2608ece29 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/57.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "e9241eeeec6b4b34895f4660e3c63ec1", + "keywords": "数组,回溯", + "title": "全排列", + "desc": [ + { + "content": "\n

给定一个 没有重复 数字的序列,返回其所有可能的全排列。

示例:

输入: [1,2,3]
输出:
[ [1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], [3,2,1]]
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nclass Solution\n{\npublic:\n\tvector> permute(vector &nums)\n\t{\n\t\tvector> res;\n\t\tvector used(nums.size());\n\t\tdfs(nums, used, res);\n\t\treturn res;\n\t}\nprivate:\n\tvector stack;\n\tvoid dfs(vector &nums, vector &used, vector> &res)\n\t{\n\t\tif (stack.size() == nums.size())\n\t\t{\n\t\t\tres.push_back(stack);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor (int i = 0; i < nums.size(); i++)\n\t\t\t{\n\t\t\t\tif (!used[i])\n\t\t\t\t{\n\t\t\t\t\tused[i] = true;\n\t\t\t\t\tstack.push_back(nums[i]);\n\t\t\t\t\tdfs(nums, used, res);\n\t\t\t\t\tstack.pop_back();\n\t\t\t\t\tused[i] = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-6c74549bf696457084ef66af3c8ab6e0", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600469820" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/58.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/58.exercises/config.json" new file mode 100644 index 000000000..3f6cc8e96 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/58.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-9480f3a882734848aeea80c4b8e0fa7c", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/58.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/58.exercises/solution.json" new file mode 100644 index 000000000..a9dd7c31f --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/58.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "a3020da0581c42f6b867cc64c1144d75", + "keywords": "数组,二分查找", + "title": "搜索旋转排序数组", + "desc": [ + { + "content": "\n

整数数组 nums 按升序排列,数组中的值 互不相同

\n

在传递给函数之前,nums 在预先未知的某个下标 k0 <= k < nums.length)上进行了 旋转,使数组变为\n[nums[k], nums[k+1], ..., nums[n-1], nums[0], nums[1], ..., nums[k-1]](下标 从 0 开始\n计数)。例如, [0,1,2,4,5,6,7] 在下标 3 处经旋转后可能变为 [4,5,6,7,0,1,2] 。\n

\n

给你 旋转后 的数组 nums 和一个整数 target ,如果 nums 中存在这个目标值\ntarget ,则返回它的下标,否则返回 -1 。\n

\n

 

\n

示例 1:

\n
输入:nums = [4,5,6,7,0,1,2], target = 0
输出:
4
\n

示例 2:

\n
输入:nums = [4,5,6,7,0,1,2], target = 3
输出:
-1
\n

示例 3:

\n
输入:nums = [1], target = 0
输出:
-1
\n

 

\n

提示:

\n
    \n
  • 1 <= nums.length <= 5000
  • \n
  • -10^4 <= nums[i] <= 10^4
  • \n
  • nums 中的每个值都 独一无二
  • \n
  • 题目数据保证 nums 在预先未知的某个下标上进行了旋转
  • \n
  • -10^4 <= target <= 10^4
  • \n
\n

 

\n

进阶:你可以设计一个时间复杂度为 O(log n) 的解决方案吗?

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nclass Solution\n{\npublic:\n\tint search(vector &nums, int target)\n\t{\n\t\tint lo = 0;\n\t\tint hi = nums.size() - 1;\n\t\tfor (lo <= hi)\n\t\t{\n\t\t\tint mid = lo + (hi - lo) / 2;\n\t\t\tif (nums[mid] == target)\n\t\t\t{\n\t\t\t\treturn mid;\n\t\t\t}\n\t\t\tif (nums[lo] <= nums[mid])\n\t\t\t{\n\t\t\t\tif (nums[lo] <= target && target < nums[mid])\n\t\t\t\t{\n\t\t\t\t\thi = mid - 1;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tlo = mid + 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (nums[mid] < target && target <= nums[hi])\n\t\t\t\t{\n\t\t\t\t\tlo = mid + 1;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\thi = mid - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-9480f3a882734848aeea80c4b8e0fa7c", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470220" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/59.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/59.exercises/config.json" new file mode 100644 index 000000000..51a022f37 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/59.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-73f719eb3c124f11933e47c2cbcf4c7c", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/59.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/59.exercises/solution.json" new file mode 100644 index 000000000..6ae492a6b --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/59.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "c3bad4cbaf914741b47c8e84ba7c40a7", + "keywords": "数组,二分查找,矩阵", + "title": "搜索二维矩阵", + "desc": [ + { + "content": "\n

编写一个高效的算法来判断 m x n 矩阵中,是否存在一个目标值。该矩阵具有如下特性:

    \t
  • 每行中的整数从左到右按升序排列。
  • \t
  • 每行的第一个整数大于前一行的最后一个整数。

 

示例 1:

\"\"
输入:matrix = [[1,3,5,7],[10,11,16,20],[23,30,34,60]], target = 3
输出:
true

示例 2:

\"\"
输入:matrix = [[1,3,5,7],[10,11,16,20],[23,30,34,60]], target = 13
输出:
false

 

提示:

    \t
  • m == matrix.length
  • \t
  • n == matrix[i].length
  • \t
  • 1 <= m, n <= 100
  • \t
  • -104 <= matrix[i][j], target <= 104
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \n#include \nstatic int binary_search(int *nums, int len, int target)\n{\n\tint low = -1;\n\tint high = len;\n\twhile (low + 1 < high)\n\t{\n\t\tint mid = low + (high - low) / 2;\n\t\tif (target > nums[mid])\n\t\t{\n\t\t\tlow = mid;\n\t\t}\n\t\telse\n\t\t{\n\t\t\thigh = mid;\n\t\t}\n\t}\n\tif (high == len || nums[high] != target)\n\t{\n\t\treturn -high - 1;\n\t}\n\telse\n\t{\n\t\treturn high;\n\t}\n}\nstatic bool searchMatrix(int **matrix, int matrixRowSize, int matrixColSize, int target)\n{\n\tif (matrixRowSize == 0 || matrixColSize == 0)\n\t{\n\t\treturn false;\n\t}\n\tif (target < matrix[0][0] || target > matrix[matrixRowSize - 1][matrixColSize - 1])\n\t{\n\t\treturn false;\n\t}\n\tint row = 0;\n\tint *nums = NULL;\n\tif (matrixRowSize > 0)\n\t{\n\t\tnums = malloc(matrixRowSize * sizeof(int));\n\t\tfor (row = 0; row < matrixRowSize; row++)\n\t\t{\n\t\t\tnums[row] = matrix[row][0];\n\t\t}\n\t\trow = binary_search(nums, matrixRowSize, target);\n\t\tif (row >= 0)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\trow = -row - 1;\n\t\t\tif (row == 0)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\trow--;\n\t\t\t}\n\t\t}\n\t}\n\tint col = binary_search(matrix[row], matrixColSize, target);\n\treturn col >= 0;\n}\nint main(int argc, char **argv)\n{\n\tint row = 3;\n\tint col = 4;\n\tint **mat = malloc(row * sizeof(int *));\n\tmat[0] = malloc(col * sizeof(int));\n\tmat[0][0] = 1;\n\tmat[0][1] = 3;\n\tmat[0][2] = 5;\n\tmat[0][3] = 7;\n\tmat[1] = malloc(col * sizeof(int));\n\tmat[1][0] = 10;\n\tmat[1][1] = 11;\n\tmat[1][2] = 16;\n\tmat[1][3] = 20;\n\tmat[2] = malloc(col * sizeof(int));\n\tmat[2][0] = 23;\n\tmat[2][1] = 30;\n\tmat[2][2] = 34;\n\tmat[2][3] = 50;\n\tprintf(\"%s\\n\", searchMatrix(mat, row, col, atoi(argv[1])) ? \"true\" : \"false\");\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-73f719eb3c124f11933e47c2cbcf4c7c", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600469923" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/6.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/6.exercises/config.json" new file mode 100644 index 000000000..408cb2d30 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/6.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-a196808cff7b4cd1b5bfbd1d5020ca31", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/6.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/6.exercises/solution.json" new file mode 100644 index 000000000..2b7f3eca0 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/6.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "b167d2a52cdb4eaa8594b1ae719c5a84", + "keywords": "B树,算法高阶,高级数据结构,B树上的基本操作", + "title": "已知一个浮点数A(0\n#include \nint main () {\n\tfloat A = 0.2f;\n\tint x = 0;\n\tif (A < 0) { x = 1; A = 1/A; }\n\tfloat delta = 1;\n\tint B = 1, C = 1;\n\tdo\n\t{\n\t\tC = (int)(B * A);\n\t\tdelta = fabs(C/(float)B-A);\n\t\tB++;\n\t}\n\twhile (delta > 0.000001); \n\tif (x == 0)\n\t\tprintf(\"%d / %d\", C, B - 1);\n\telse\n\t\tprintf(\"%d / %d\", B - 1, C);\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-a196808cff7b4cd1b5bfbd1d5020ca31", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600469957" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/60.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/60.exercises/config.json" new file mode 100644 index 000000000..f2365b81b --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/60.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-d1ede2d2c5a54e91a19273b3f31978c5", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/60.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/60.exercises/solution.json" new file mode 100644 index 000000000..da66574ac --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/60.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "a3f9980b1e51486dbe5eb11c49d13295", + "keywords": "递归,数学", + "title": "Pow(x, n)", + "desc": [ + { + "content": "\n

实现 pow(x, n) ,即计算 x 的 n 次幂函数(即,xn)。

 

示例 1:

输入:x = 2.00000, n = 10
输出:
1024.00000

示例 2:

输入:x = 2.10000, n = 3
输出:
9.26100

示例 3:

输入:x = 2.00000, n = -2
输出:
0.25000
解释:
2-2 = 1/22 = 1/4 = 0.25

 

提示:

    \t
  • -100.0 < x < 100.0
  • \t
  • -231 <= n <= 231-1
  • \t
  • -104 <= xn <= 104
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nclass Solution\n{\npublic:\n\tdouble myPow(double x, int n)\n\t{\n\t\tif (n == INT_MIN)\n\t\t{\n\t\t\tdouble t = dfs(x, -(n / 2));\n\t\t\treturn 1 / t * 1 / t;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn n < 0 ? 1 / dfs(x, -n) : dfs(x, n);\n\t\t}\n\t}\nprivate:\n\tdouble dfs(double x, int n)\n\t{\n\t\tif (n == 0)\n\t\t{\n\t\t\treturn 1;\n\t\t}\n\t\telse if (n == 1)\n\t\t{\n\t\t\treturn x;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdouble t = dfs(x, n / 2);\n\t\t\treturn (n % 2) ? (x * t * t) : (t * t);\n\t\t}\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-d1ede2d2c5a54e91a19273b3f31978c5", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600471013" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/61.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/61.exercises/config.json" new file mode 100644 index 000000000..d040837b3 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/61.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-3880837d907340c9a9e96939e9fbae92", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/61.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/61.exercises/solution.json" new file mode 100644 index 000000000..9666b9c4b --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/61.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "6cf8646d7f0540569d46a883e4795dfa", + "keywords": "哈希表,字符串,排序", + "title": "字母异位词分组", + "desc": [ + { + "content": "\n

给定一个字符串数组,将字母异位词组合在一起。字母异位词指字母相同,但排列不同的字符串。

\n

示例:

\n
输入:[eat", "tea", "tan", "ate", "nat", "bat"]
输出:
[[ate","eat","tea"],["nat","tan"],["bat"]]
\n

说明:

\n
    \n
  • 所有输入均为小写字母。
  • \n
  • 不考虑答案输出的顺序。
  • \n
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nclass Solution\n{\npublic:\n\tvector> groupAnagrams(vector &strs)\n\t{\n\t\tvector> res;\n\t\tunordered_map> ht;\n\t\tfor (const auto &str : strs)\n\t\t{\n\t\t\tint counts[26] = {0};\n\t\t\tfor (char c : str)\n\t\t\t{\n\t\t\t\tcounts[c - 'a']++;\n\t\t\t}\n\t\t\tstring key;\n\t\t\tfor (int i : counts)\n\t\t\t{\n\t\t\t\tkey.push_back('#');\n\t\t\t\tkey.push_back(i + '0');\n\t\t\t}\n\t\t\tht[key].push_back(str);\n\t\t}\n\t\tfor (const auto &t : ht)\n\t\t{\n\t\t\tres.push_back(t.second);\n\t\t}\n\t\treturn res;\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-3880837d907340c9a9e96939e9fbae92", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470799" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/62.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/62.exercises/config.json" new file mode 100644 index 000000000..99ae459a0 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/62.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-ba756fd53d6f45139d2d818d4a555fb7", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/62.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/62.exercises/solution.json" new file mode 100644 index 000000000..bfaefe6ee --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/62.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "a5cbb63775bb4b6d80ebcb4b2dc0ca66", + "keywords": "数组,哈希表,矩阵", + "title": "矩阵置零", + "desc": [ + { + "content": "\n

给定一个 m x n 的矩阵,如果一个元素为 0 ,则将其所在行和列的所有元素都设为 0 。请使用 原地 算法

进阶:

    \t
  • 一个直观的解决方案是使用  O(mn) 的额外空间,但这并不是一个好的解决方案。
  • \t
  • 一个简单的改进方案是使用 O(m + n) 的额外空间,但这仍然不是最好的解决方案。
  • \t
  • 你能想出一个仅使用常量空间的解决方案吗?

 

示例 1:

\"\"
输入:matrix = [[1,1,1],[1,0,1],[1,1,1]]
输出:
[[1,0,1],[0,0,0],[1,0,1]]

示例 2:

\"\"
输入:matrix = [[0,1,2,0],[3,4,5,2],[1,3,1,5]]
输出:
[[0,0,0,0],[0,4,5,0],[0,3,1,0]]

 

提示:

    \t
  • m == matrix.length
  • \t
  • n == matrix[0].length
  • \t
  • 1 <= m, n <= 200
  • \t
  • -231 <= matrix[i][j] <= 231 - 1
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\npublic:\nvoid setZeroes(vector> &matrix)\n{\n\tbool bRow = false, bCol = false;\n\tfor (int row = 0; row < matrix.size(); row++)\n\t{\n\t\tfor (int col = 0; col < matrix[row].size(); col++)\n\t\t{\n\t\t\tif (matrix[row][col] == 0)\n\t\t\t{\n\t\t\t\tif (row == 0)\n\t\t\t\t{\n\t\t\t\t\tbRow = true;\n\t\t\t\t}\n\t\t\t\tif (col == 0)\n\t\t\t\t{\n\t\t\t\t\tbCol = true;\n\t\t\t\t}\n\t\t\t\tmatrix[0][col] = matrix[row][0] = 0;\n\t\t\t}\n\t\t}\n\t}\n\tfor (int row = 1; row < matrix.size(); row++)\n\t{\n\t\tfor (int col = 1; col < matrix[row].size(); col++)\n\t\t{\n\t\t\tif (matrix[0][col] == 0 || matrix[row][0] == 0)\n\t\t\t{\n\t\t\t\tmatrix[row][col] = 0;\n\t\t\t}\n\t\t}\n\t}\n\tif (bRow)\n\t{\n\t\tfor (auto &m : matrix[0])\n\t\t{\n\t\t\tm = 0;\n\t\t}\n\t}\n\tif (bCol)\n\t{\n\t\tfor (int row = 0; row < matrix.size(); row++)\n\t\t{\n\t\t\tmatrix[row][0] = 0;\n\t\t}\n\t}\n}\n}\n;", + "language": "cpp" + }, + "node_id": "dailycode-ba756fd53d6f45139d2d818d4a555fb7", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470228" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/63.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/63.exercises/config.json" new file mode 100644 index 000000000..6907e252a --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/63.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-09529ae417314d8cb84c07be9aec2849", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/63.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/63.exercises/solution.json" new file mode 100644 index 000000000..f397e6912 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/63.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "b79586225ee645c59544bd27132cb5dc", + "keywords": "数组,二分查找", + "title": "在排序数组中查找元素的第一个和最后一个位置", + "desc": [ + { + "content": "\n

给定一个按照升序排列的整数数组 nums,和一个目标值 target。找出给定目标值在数组中的开始位置和结束位置。

\n

如果数组中不存在目标值 target,返回 [-1, -1]

\n

进阶:

\n
    \n
  • 你可以设计并实现时间复杂度为 O(log n) 的算法解决此问题吗?
  • \n
\n

 

\n

示例 1:

\n
输入:nums = [5,7,7,8,8,10], target = 8
输出:
[3,4]
\n

示例 2:

\n
输入:nums = [5,7,7,8,8,10], target = 6
输出:
[-1,-1]
\n

示例 3:

\n
输入:nums = [], target = 0
输出:
[-1,-1]
\n

 

\n

提示:

\n
    \n
  • 0 <= nums.length <= 105
  • \n
  • -109 <= nums[i] <= 109
  • \n
  • nums 是一个非递减数组
  • \n
  • -109 <= target <= 109
  • \n
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nclass Solution\n{\npublic:\n\tvector searchRange(vector &nums, int target)\n\t{\n\t\tvector res;\n\t\tres.push_back(binary_search_begin(nums, target));\n\t\tres.push_back(binary_search_end(nums, target));\n\t\treturn res;\n\t}\nprivate:\n\tint binary_search_begin(vector nums, int target)\n\t{\n\t\tint lo = -1;\n\t\tint hi = nums.size();\n\t\twhile (lo + 1 < hi)\n\t\t{\n\t\t\tint mid = lo + (hi - lo) / 2;\n\t\t\tif (target > nums[mid])\n\t\t\t{\n\t\t\t\tlo = mid;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\thi = mid;\n\t\t\t}\n\t\t}\n\t\tif (hi == nums.size() || nums[hi] != target)\n\t\t{\n\t\t\treturn -1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn hi;\n\t\t}\n\t}\n\tint binary_search_end(vector nums, int target)\n\t{\n\t\tint lo = -1;\n\t\tint hi = nums.size();\n\t\twhile (lo + 1 < hi)\n\t\t{\n\t\t\tint mid = lo + (hi - lo) / 2;\n\t\t\tif (target < nums[mid])\n\t\t\t{\n\t\t\t\thi = mid;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tlo = mid;\n\t\t\t}\n\t\t}\n\t\tif (lo == -1 || nums[lo] != target)\n\t\t{\n\t\t\treturn -1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn lo;\n\t\t}\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-09529ae417314d8cb84c07be9aec2849", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470221" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/64.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/64.exercises/config.json" new file mode 100644 index 000000000..dec881e16 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/64.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-a6c3e70f1c0045c1b2929f56cc5ce02f", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/64.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/64.exercises/solution.json" new file mode 100644 index 000000000..fa1810354 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/64.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "837128c8eb2c481ba2cb3ca390a5df10", + "keywords": "贪心,数组,动态规划", + "title": "跳跃游戏 II", + "desc": [ + { + "content": "\n

给定一个非负整数数组,你最初位于数组的第一个位置。

\n

数组中的每个元素代表你在该位置可以跳跃的最大长度。

\n

你的目标是使用最少的跳跃次数到达数组的最后一个位置。

\n

示例:

\n
输入: [2,3,1,1,4]
输出:
2
解释:
跳到最后一个位置的最小跳跃数是 2。从下标为 0 跳到下标为 1 的位置,跳 1 步,然后跳 3 步到达数组的最后一个位置。
\n

说明:

\n

假设你总是可以到达数组的最后一个位置。

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nclass Solution\n{\npublic:\n\tint jump(vector &nums)\n\t{\n\t\tint steps = 0;\n\t\tint lo = 0, hi = 0;\n\t\twhile (hi < nums.size() - 1)\n\t\t{\n\t\t\tint right = 0;\n\t\t\tfor (int i = lo; i <= hi; i++)\n\t\t\t{\n\t\t\t\tright = max(i + nums[i], right);\n\t\t\t}\n\t\t\tlo = hi + 1;\n\t\t\thi = right;\n\t\t\tsteps++;\n\t\t}\n\t\treturn steps;\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-a6c3e70f1c0045c1b2929f56cc5ce02f", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600469921" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/65.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/65.exercises/config.json" new file mode 100644 index 000000000..96f552a4e --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/65.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-eef49c9c9f0943f2a27bb9f4dfb22718", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/65.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/65.exercises/solution.json" new file mode 100644 index 000000000..5baa207dc --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/65.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "04e3a587f60c4cc5aeb21d77711430f7", + "keywords": "链表", + "title": "反转链表 II", + "desc": [ + { + "content": "\n给你单链表的头指针 head 和两个整数 leftright ,其中 left <= right 。请你反转从位置 left 到位置 right 的链表节点,返回 反转后的链表

 

示例 1:

\"\"
输入:head = [1,2,3,4,5], left = 2, right = 4
输出:
[1,4,3,2,5]

示例 2:

输入:head = [5], left = 1, right = 1
输出:
[5]

 

提示:

    \t
  • 链表中节点数目为 n
  • \t
  • 1 <= n <= 500
  • \t
  • -500 <= Node.val <= 500
  • \t
  • 1 <= left <= right <= n

 

进阶: 你可以使用一趟扫描完成反转吗?

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \nstruct ListNode\n{\n\tint val;\n\tstruct ListNode *next;\n};\nstatic struct ListNode *reverseBetween(struct ListNode *head, int m, int n)\n{\n\tint i;\n\tstruct ListNode dummy;\n\tstruct ListNode *prev = &dummy;\n\tprev->next = head;\n\tfor (i = 1; i < m; i++)\n\t{\n\t\tprev = prev->next;\n\t}\n\tstruct ListNode *p = prev->next;\n\tfor (i = m; i < n; i++)\n\t{\n\t\tstruct ListNode *q = p->next;\n\t\tp->next = q->next;\n\t\tq->next = prev->next;\n\t\tprev->next = q;\n\t}\n\treturn dummy.next;\n}\nint main(int argc, char **argv)\n{\n\tif (argc < 3)\n\t{\n\t\tfprintf(stderr, \"Usage: ./test m n 1 2 3...\\n\");\n\t\texit(-1);\n\t}\n\tint i, count = argc - 3;\n\tstruct ListNode dummy;\n\tstruct ListNode *prev = &dummy;\n\tstruct ListNode *p;\n\tfor (i = 0; i < count; i++)\n\t{\n\t\tp = malloc(sizeof(*p));\n\t\tp->val = atoi(argv[i + 3]);\n\t\tp->next = NULL;\n\t\tprev->next = p;\n\t\tprev = p;\n\t}\n\tint m = atoi(argv[1]);\n\tint n = atoi(argv[2]);\n\tstruct ListNode *head = reverseBetween(dummy.next, m, n);\n\tfor (p = head; p != NULL; p = p->next)\n\t{\n\t\tprintf(\"%d \", p->val);\n\t}\n\tprintf(\"\\n\");\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-eef49c9c9f0943f2a27bb9f4dfb22718", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600469826" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/66.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/66.exercises/config.json" new file mode 100644 index 000000000..c3a18e736 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/66.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-81f91206205e431f9ce2fa179955ecfa", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/66.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/66.exercises/solution.json" new file mode 100644 index 000000000..f911ce0e5 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/66.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "0e7ad87cf9d74d31b2f292832b782fe9", + "keywords": "数组,动态规划,矩阵", + "title": "最小路径和", + "desc": [ + { + "content": "\n

给定一个包含非负整数的 m x n 网格 grid ,请找出一条从左上角到右下角的路径,使得路径上的数字总和为最小。

说明:每次只能向下或者向右移动一步。

 

示例 1:

\"\"
输入:grid = [[1,3,1],[1,5,1],[4,2,1]]
输出:
7
解释:
因为路径 1→3→1→1→1 的总和最小。

示例 2:

输入:grid = [[1,2,3],[4,5,6]]
输出:
12

 

提示:

    \t
  • m == grid.length
  • \t
  • n == grid[i].length
  • \t
  • 1 <= m, n <= 200
  • \t
  • 0 <= grid[i][j] <= 100
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \n#include \nstatic inline int min(int a, int b)\n{\n\treturn a < b ? a : b;\n}\nint minPathSum(int **grid, int gridRowSize, int gridColSize)\n{\n\tint i, j;\n\tint **dp = malloc(gridRowSize * sizeof(int *));\n\tfor (i = 0; i < gridRowSize; i++)\n\t{\n\t\tdp[i] = malloc(gridColSize * sizeof(int));\n\t}\n\tdp[0][0] = grid[0][0];\n\tint sum = dp[0][0];\n\tfor (i = 1; i < gridRowSize; i++)\n\t{\n\t\tsum += grid[i][0];\n\t\tdp[i][0] = sum;\n\t}\n\tsum = dp[0][0];\n\tfor (i = 1; i < gridColSize; i++)\n\t{\n\t\tsum += grid[0][i];\n\t\tdp[0][i] = sum;\n\t}\n\tfor (i = 1; i < gridRowSize; i++)\n\t{\n\t\tfor (j = 1; j < gridColSize; j++)\n\t\t{\n\t\t\tdp[i][j] = grid[i][j] + min(dp[i - 1][j], dp[i][j - 1]);\n\t\t}\n\t}\n\treturn dp[gridRowSize - 1][gridColSize - 1];\n}\nint main(int argc, char **argv)\n{\n\tint i, j;\n\tint row = argc - 1;\n\tint col = strlen(argv[1]);\n\tint **grid = malloc(row * sizeof(int *));\n\tfor (i = 0; i < row; i++)\n\t{\n\t\tgrid[i] = malloc(col * sizeof(int));\n\t\tfor (j = 0; j < col; j++)\n\t\t{\n\t\t\tgrid[i][j] = argv[i + 1][j] - '0';\n\t\t\tprintf(\"%d \", grid[i][j]);\n\t\t}\n\t\tprintf(\"\\n\");\n\t}\n\tprintf(\"%d\\n\", minPathSum(grid, row, col));\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-81f91206205e431f9ce2fa179955ecfa", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470227" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/67.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/67.exercises/config.json" new file mode 100644 index 000000000..fc64cd29d --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/67.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-b2dbc54134bf4e8a961f1b155e8c665b", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/67.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/67.exercises/solution.json" new file mode 100644 index 000000000..1e69521d7 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/67.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "dc13813782b9433eb72a016d587bbf85", + "keywords": "链表,双指针", + "title": "删除链表的倒数第 N 个结点", + "desc": [ + { + "content": "\n

给你一个链表,删除链表的倒数第 n 个结点,并且返回链表的头结点。

进阶:你能尝试使用一趟扫描实现吗?

 

示例 1:

\"\"
输入:head = [1,2,3,4,5], n = 2
输出:
[1,2,3,5]

示例 2:

输入:head = [1], n = 1
输出:
[]

示例 3:

输入:head = [1,2], n = 1
输出:
[1]

 

提示:

    \t
  • 链表中结点的数目为 sz
  • \t
  • 1 <= sz <= 30
  • \t
  • 0 <= Node.val <= 100
  • \t
  • 1 <= n <= sz
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "struct ListNode\n{\n\tint val;\n\tListNode *next;\n\tListNode() : val(0), next(nullptr) {}\n\tListNode(int x) : val(x), next(nullptr) {}\n\tListNode(int x, ListNode *next) : val(x), next(next) {}\n};\n#include \nclass Solution\n{\npublic:\n\tListNode *removeNthFromEnd(ListNode *head, int n)\n\t{\n\t\tListNode empty_node(0, head);\n\t\tListNode *p = &empty_node;\n\t\tstd::vector pv;\n\t\twhile (p != nullptr)\n\t\t{\n\t\t\tpv.push_back(p);\n\t\t\tp = p->next;\n\t\t}\n\t\tp = pv[pv.size() - 1 - n];\n\t\tp->next = p->next->next;\n\t\treturn empty_node.next;\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-b2dbc54134bf4e8a961f1b155e8c665b", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600469818" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/68.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/68.exercises/config.json" new file mode 100644 index 000000000..f62a2fd12 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/68.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-58550dadc0174b719c8769c5d87c8814", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/68.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/68.exercises/solution.json" new file mode 100644 index 000000000..df77c47be --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/68.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "28697aa8d9b94ea4877b314637b97fbe", + "keywords": "数组,回溯", + "title": "组合总和", + "desc": [ + { + "content": "\n

给定一个无重复元素的数组 candidates 和一个目标数 target ,找出 candidates 中所有可以使数字和为 target 的组合。\n

\n

candidates 中的数字可以无限制重复被选取。

\n

说明:

\n
    \n
  • 所有数字(包括 target)都是正整数。
  • \n
  • 解集不能包含重复的组合。 
  • \n
\n

示例 1:

\n
输入:candidates = [2,3,6,7], target = 7,
输出:
[[7],[2,2,3]]
\n

示例 2:

\n
输入:candidates = [2,3,5], target = 8,
输出:
[[2,2,2,2],[2,3,3],[3,5]]
\n

 

\n

提示:

\n
    \n
  • 1 <= candidates.length <= 30
  • \n
  • 1 <= candidates[i] <= 200
  • \n
  • candidate 中的每个元素都是独一无二的。
  • \n
  • 1 <= target <= 500
  • \n
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nclass Solution\n{\npublic:\n\tvector> combinationSum(vector &candidates, int target)\n\t{\n\t\tvector> res;\n\t\tdfs(candidates, 0, target, res);\n\t\treturn res;\n\t}\nprivate:\n\tvector stack;\n\tvoid dfs(vector &candidates, int start, int target, vector> &res)\n\t{\n\t\tif (target < 0)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\telse if (target == 0)\n\t\t{\n\t\t\tres.push_back(stack);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor (int i = start; i < candidates.size(); i++)\n\t\t\t{\n\t\t\t\tstack.push_back(candidates[i]);\n\t\t\t\tdfs(candidates, i, target - candidates[i], res);\n\t\t\t\tstack.pop_back();\n\t\t\t}\n\t\t}\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-58550dadc0174b719c8769c5d87c8814", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600471017" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/69.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/69.exercises/config.json" new file mode 100644 index 000000000..fe88e2ede --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/69.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-74b60540beef43f7b8e98cf2d1a4580c", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/69.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/69.exercises/solution.json" new file mode 100644 index 000000000..7514c6061 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/69.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "9bc368a018d24c3f9ea1cf543c783c0c", + "keywords": "字符串,动态规划", + "title": "最长回文子串", + "desc": [ + { + "content": "\n

给你一个字符串 s,找到 s 中最长的回文子串。

 

示例 1:

输入:s = \"babad\"
输出:
\"bab\"
解释:
\"aba\" 同样是符合题意的答案。

示例 2:

输入:s = \"cbbd\"
输出:
\"bb\"

示例 3:

输入:s = \"a\"
输出:
\"a\"

示例 4:

输入:s = \"ac\"
输出:
\"a\"

 

提示:

    \t
  • 1 <= s.length <= 1000
  • \t
  • s 仅由数字和英文字母(大写和/或小写)组成
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "class Solution\n{\npublic:\n\tstring longestPalindrome(string s)\n\t{\n\t\tint ti = 0, maxlen = 0, i, t;\n\t\tfor (i = 0; s[i]; i++)\n\t\t{\n\t\t\tt = 1;\n\t\t\twhile (t <= i && s[i + t])\n\t\t\t{\n\t\t\t\tif (s[i + t] == s[i - t])\n\t\t\t\t\tt++;\n\t\t\t\telse\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tt--;\n\t\t\tif (2 * t + 1 > maxlen)\n\t\t\t{\n\t\t\t\tti = i - t;\n\t\t\t\tmaxlen = 2 * t + 1;\n\t\t\t}\n\t\t}\n\t\tfor (i = 0; s[i]; i++)\n\t\t{\n\t\t\tt = 1;\n\t\t\twhile (t <= i + 1 && s[i + t])\n\t\t\t{\n\t\t\t\tif (s[i - t + 1] == s[i + t])\n\t\t\t\t\tt++;\n\t\t\t\telse\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tt--;\n\t\t\tif (2 * t > maxlen)\n\t\t\t{\n\t\t\t\tti = i - t + 1;\n\t\t\t\tmaxlen = 2 * t;\n\t\t\t}\n\t\t}\n\t\ts[ti + maxlen] = 0;\n\t\treturn s.c_str() + ti;\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-74b60540beef43f7b8e98cf2d1a4580c", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470834" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/7.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/7.exercises/config.json" new file mode 100644 index 000000000..3ce31f1bc --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/7.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-5d88f5aea60b4d6e9dbd83c13e22993f", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/7.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/7.exercises/solution.json" new file mode 100644 index 000000000..2d913ef1d --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/7.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "83ff4228dbc34fa3b8d9ebad0abda73b", + "keywords": "算法初阶,基础知识,分治策略,证明主定理,对b的幂证明主定理", + "title": "矩阵问题", + "desc": [ + { + "content": "\n题目描述\n编写以下函数:\n(1)在一个二维数组中形成以下形式的n阶矩阵:\n[1 1 1 1 1\n2 1 1 1 1\n3 2 1 1 1\n4 3 2 1 1\n5 4 3 2 1]\n(2)去掉靠边的元素,生成新的n-2阶矩阵;\n(3)求生成的n阶矩阵主对角线上的元素之和;\n(4)以方阵形式输出数组。\n在main函数中调用以上函数进行测试。\n输入\n输入生成矩阵的阶数(n>=2)\n输出\n以方阵形式输出生成的n阶矩阵、去掉靠边的元素生成的新的n-2阶矩阵、以及生成的n阶矩阵主对角线上的元素之和,最后一行要回车\n样例输入\n5\n样例输出\nGenerated matrix:\n1 1 1 1 1\n2 1 1 1 1\n3 2 1 1 1\n4 3 2 1 1\n5 4 3 2 1\ndel the elements on the side:\n1 1 1\n2 1 1\n3 2 1\nThe sum of the diagonal:5", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std; \nint main() {\n\twhile(1){\n\t\tint a;\n\t\tcin>>a;\n\t\tint array[a][a];\n\t\tfor (int i=0;i= 1 ; i-- , j++)\n\t\t{\t\n\t\t\tsum+=array[i][j];\n\t\t}\n\t\tcout<<\"The sum of the diagonal:\"<已知存在一个按非降序排列的整数数组 nums ,数组中的值不必互不相同。

\n

在传递给函数之前,nums 在预先未知的某个下标 k0 <= k < nums.length)上进行了 旋转\n,使数组变为 [nums[k], nums[k+1], ..., nums[n-1], nums[0], nums[1], ..., nums[k-1]](下标 从 0\n开始 计数)。例如, [0,1,2,4,4,4,5,6,6,7] 在下标 5 处经旋转后可能变为\n[4,5,6,6,7,0,1,2,4,4] 。\n

\n

给你 旋转后 的数组 nums 和一个整数 target ,请你编写一个函数来判断给定的目标值是否存在于数组中。如果\nnums 中存在这个目标值 target ,则返回 true ,否则返回 false 。\n

\n

 

\n

示例 1:

\n
输入:nums = [2,5,6,0,0,1,2], target = 0
输出:
true
\n

示例 2:

\n
输入:nums = [2,5,6,0,0,1,2], target = 3
输出:
false
\n

 

\n

提示:

\n
    \n
  • 1 <= nums.length <= 5000
  • \n
  • -104 <= nums[i] <= 104
  • \n
  • 题目数据保证 nums 在预先未知的某个下标上进行了旋转
  • \n
  • -104 <= target <= 104
  • \n
\n

 

\n

进阶:

\n
    \n
  • 这是 搜索旋转排序数组 的延伸题目,本题中的 nums \n可能包含重复元素。
  • \n
  • 这会影响到程序的时间复杂度吗?会有怎样的影响,为什么?
  • \n
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \n#include \nstatic bool search(int *nums, int numsSize, int target)\n{\n\tint lo = 0;\n\tint hi = numsSize - 1;\n\twhile (lo <= hi)\n\t{\n\t\tint mid = lo + (hi - lo) / 2;\n\t\tif (nums[mid] == target)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\tif (nums[lo] == nums[mid] && nums[mid] == nums[hi])\n\t\t{\n\t\t\tlo++;\n\t\t\thi--;\n\t\t}\n\t\telse if (nums[lo] <= nums[mid])\n\t\t{\n\t\t\tif (nums[lo] <= target && target < nums[mid])\n\t\t\t{\n\t\t\t\thi = mid - 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tlo = mid + 1;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (nums[mid] < target && target <= nums[hi])\n\t\t\t{\n\t\t\t\tlo = mid + 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\thi = mid - 1;\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n}\nint main(int argc, char **argv)\n{\n\tint i;\n\tint target = atoi(argv[1]);\n\tint size = argc - 2;\n\tint *nums = malloc(size * sizeof(int));\n\tfor (i = 0; i < argc - 2; i++)\n\t{\n\t\tnums[i] = atoi(argv[i + 2]);\n\t}\n\tprintf(\"%d\\n\", search(nums, size, target));\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-248163efec6747ce852e85ea2dbe3c15", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600469924" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/71.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/71.exercises/config.json" new file mode 100644 index 000000000..021768f42 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/71.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-f16026ed484a444fb95e3d6698f5f119", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/71.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/71.exercises/solution.json" new file mode 100644 index 000000000..3f0089605 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/71.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "31c007d8e92d45df854f76b2da1cb73a", + "keywords": "数组,双指针", + "title": "删除有序数组中的重复项 II", + "desc": [ + { + "content": "\n

给你一个有序数组 nums ,请你 原地 删除重复出现的元素,使每个元素 最多出现两次 ,返回删除后数组的新长度。

\n

不要使用额外的数组空间,你必须在 原地 修改输入数组 并在使用 O(1) 额外空间的条件下完成。

\n

 

\n

说明:

\n

为什么返回数值是整数,但输出的答案是数组呢?

\n

请注意,输入数组是以「引用」方式传递的,这意味着在函数里修改输入数组对于调用者是可见的。

\n

你可以想象内部操作如下:

\n
\n// nums 是以“引用”方式传递的。也就是说,不对实参做任何拷贝\nint len = removeDuplicates(nums);// 在函数里修改输入数组对于调用者是可见的。\n// 根据你的函数返回的长度, 它会打印出数组中 该长度范围内 的所有元素。\nfor (int i = 0; i < len; i++) {\nprint(nums[i]);\n}
\n

 

\n

示例 1:

\n
输入:nums = [1,1,1,2,2,3]
输出:
5, nums = [1,1,2,2,3]
解释:
函数应返回新长度 length = 5, 并且原数组的前五个元素被修改为 1, 1, 2, 2, 3 。 不需要考虑数组中超出新长度后面的元素。
\n

示例 2:

\n
输入:nums = [0,0,1,1,1,1,2,3,3]
输出:
7, nums = [0,0,1,1,2,3,3]
解释:
函数应返回新长度 length = 7, 并且原数组的前五个元素被修改为 0, 0, 1, 1, 2, 3, 3 。 不需要考虑数组中超出新长度后面的元素。
\n

 

\n

提示:

\n
    \n
  • 1 <= nums.length <= 3 * 104
  • \n
  • -104 <= nums[i] <= 104
  • \n
  • nums 已按升序排列
  • \n
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \nstatic int removeDuplicates(int *nums, int numsSize)\n{\n\tif (numsSize == 0)\n\t{\n\t\treturn 0;\n\t}\n\tint i;\n\tint len = 0;\n\tint count = 1;\n\tfor (i = 1; i < numsSize; i++)\n\t{\n\t\tif (nums[len] == nums[i])\n\t\t{\n\t\t\tif (count < 2)\n\t\t\t{\n\t\t\t\tcount++;\n\t\t\t\tnums[++len] = nums[i];\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcount = 1;\n\t\t\tnums[++len] = nums[i];\n\t\t}\n\t}\n\treturn len + 1;\n}\nint main(int argc, char **argv)\n{\n\tint i, count = argc - 1;\n\tint *nums = malloc(count * sizeof(int));\n\tfor (i = 0; i < count; i++)\n\t{\n\t\tnums[i] = atoi(argv[i + 1]);\n\t}\n\tcount = removeDuplicates(nums, count);\n\tfor (i = 0; i < count; i++)\n\t{\n\t\tprintf(\"%d \", nums[i]);\n\t}\n\tprintf(\"\\n\");\n}", + "language": "cpp" + }, + "node_id": "dailycode-f16026ed484a444fb95e3d6698f5f119", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470127" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/72.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/72.exercises/config.json" new file mode 100644 index 000000000..c122afbeb --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/72.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-841814f7ce5d4aa18c3caecf27c8c494", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/72.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/72.exercises/solution.json" new file mode 100644 index 000000000..0fe4440b2 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/72.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "7dbac7048db7411aa3b443a245a2b4b6", + "keywords": "字符串,动态规划", + "title": "交错字符串", + "desc": [ + { + "content": "\n

给定三个字符串 s1s2s3,请你帮忙验证 s3 是否是由 s1 和 s2 交错 组成的。

两个字符串 st 交错 的定义与过程如下,其中每个字符串都会被分割成若干 非空 子字符串:

    \t
  • s = s1 + s2 + ... + sn
  • \t
  • t = t1 + t2 + ... + tm
  • \t
  • |n - m| <= 1
  • \t
  • 交错s1 + t1 + s2 + t2 + s3 + t3 + ... 或者 t1 + s1 + t2 + s2 + t3 + s3 + ...

提示:a + b 意味着字符串 ab 连接。

 

示例 1:

\"\"
输入:s1 = \"aabcc\", s2 = \"dbbca\", s3 = \"aadbbcbcac\"
输出:
true

示例 2:

输入:s1 = \"aabcc\", s2 = \"dbbca\", s3 = \"aadbbbaccc\"
输出:
false

示例 3:

输入:s1 = \"\", s2 = \"\", s3 = \"\"
输出:
true

 

提示:

    \t
  • 0 <= s1.length, s2.length <= 100
  • \t
  • 0 <= s3.length <= 200
  • \t
  • s1s2、和 s3 都由小写英文字母组成
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \n#include \n#include \nstatic bool isInterleave(char *s1, char *s2, char *s3)\n{\n\tint i, j;\n\tint len1 = strlen(s1);\n\tint len2 = strlen(s2);\n\tint len3 = strlen(s3);\n\tif (len1 + len2 != len3)\n\t{\n\t\treturn false;\n\t}\n\tbool *table = malloc((len1 + 1) * (len2 + 1) * sizeof(bool));\n\tbool **dp = malloc((len1 + 1) * sizeof(bool *));\n\tfor (i = 0; i < len1 + 1; i++)\n\t{\n\t\tdp[i] = &table[i * (len2 + 1)];\n\t}\n\tdp[0][0] = true;\n\tfor (i = 1; i < len1 + 1; i++)\n\t{\n\t\tdp[i][0] = dp[i - 1][0] && s1[i - 1] == s3[i - 1];\n\t}\n\tfor (i = 1; i < len2 + 1; i++)\n\t{\n\t\tdp[0][i] = dp[0][i - 1] && s2[i - 1] == s3[i - 1];\n\t}\n\tfor (i = 1; i < len1 + 1; i++)\n\t{\n\t\tfor (j = 1; j < len2 + 1; j++)\n\t\t{\n\t\t\tbool up = dp[i - 1][j] && s1[i - 1] == s3[i + j - 1];\n\t\t\tbool left = dp[i][j - 1] && s2[j - 1] == s3[i + j - 1];\n\t\t\tdp[i][j] = up || left;\n\t\t}\n\t}\n\treturn dp[len1][len2];\n}\nint main(int argc, char **argv)\n{\n\tif (argc != 4)\n\t{\n\t\tfprintf(stderr, \"Usage: ./test s1 s2 s3\\n\");\n\t\texit(-1);\n\t}\n\tprintf(\"%s\\n\", isInterleave(argv[1], argv[2], argv[3]) ? \"true\" : \"false\");\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-841814f7ce5d4aa18c3caecf27c8c494", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600471101" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/73.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/73.exercises/config.json" new file mode 100644 index 000000000..6b1472152 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/73.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-70f141b3ad9d46febf18fbdbaf90c0f4", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/73.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/73.exercises/solution.json" new file mode 100644 index 000000000..f0d9bbe5b --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/73.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "d6e56bd60df4435b9f47c04b4374b804", + "keywords": "数组,排序", + "title": "合并区间", + "desc": [ + { + "content": "\n

以数组 intervals 表示若干个区间的集合,其中单个区间为 intervals[i] = [starti, endi] 。请你合并所有重叠的区间,并返回一个不重叠的区间数组,该数组需恰好覆盖输入中的所有区间。

 

示例 1:

输入:intervals = [[1,3],[2,6],[8,10],[15,18]]
输出:
[[1,6],[8,10],[15,18]]
解释:
区间 [1,3] 和 [2,6] 重叠, 将它们合并为 [1,6].

示例 2:

输入:intervals = [[1,4],[4,5]]
输出:
[[1,5]]
解释:
区间 [1,4] 和 [4,5] 可被视为重叠区间。

 

提示:

    \t
  • 1 <= intervals.length <= 104
  • \t
  • intervals[i].length == 2
  • \t
  • 0 <= starti <= endi <= 104
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \n#include \nstatic int compare(const void *a, const void *b)\n{\n\treturn ((int *)a)[0] - ((int *)b)[0];\n}\nint **merge(int **intervals, int intervalsSize, int *intervalsColSize, int *returnSize, int **returnColumnSizes)\n{\n\tif (intervalsSize == 0)\n\t{\n\t\t*returnSize = 0;\n\t\treturn intervals;\n\t}\n\tint i, len = 0;\n\tint *tmp = malloc(intervalsSize * 2 * sizeof(int));\n\tfor (i = 0; i < intervalsSize; i++)\n\t{\n\t\ttmp[i * 2] = intervals[i][0];\n\t\ttmp[i * 2 + 1] = intervals[i][1];\n\t}\n\tqsort(tmp, intervalsSize, 2 * sizeof(int), compare);\n\tintervals[0][0] = tmp[0];\n\tintervals[0][1] = tmp[1];\n\tfor (i = 1; i < intervalsSize; i++)\n\t{\n\t\tif (tmp[i * 2] > intervals[len][1])\n\t\t{\n\t\t\tlen++;\n\t\t\tintervals[len][0] = tmp[i * 2];\n\t\t\tintervals[len][1] = tmp[i * 2 + 1];\n\t\t}\n\t\telse if (tmp[i * 2 + 1] > intervals[len][1])\n\t\t{\n\t\t\tintervals[len][1] = tmp[i * 2 + 1];\n\t\t}\n\t}\n\tlen += 1;\n\t*returnSize = len;\n\t*returnColumnSizes = malloc(len * sizeof(int));\n\tfor (i = 0; i < len; i++)\n\t{\n\t\t(*returnColumnSizes)[i] = 2;\n\t}\n\treturn intervals;\n}\nint main(int argc, char **argv)\n{\n\tif (argc < 1 || argc % 2 == 0)\n\t{\n\t\tfprintf(stderr, \"Usage: ./test s0 e0 s1 e1...\");\n\t\texit(-1);\n\t}\n\tint i, count = 0;\n\tint *sizes = malloc((argc - 1) / 2 * sizeof(int));\n\tint **intervals = malloc((argc - 1) / 2 * sizeof(int *));\n\tfor (i = 0; i < (argc - 1) / 2; i++)\n\t{\n\t\tsizes[i] = 2;\n\t\tintervals[i] = malloc(2 * sizeof(int));\n\t\tintervals[i][0] = atoi(argv[i * 2 + 1]);\n\t\tintervals[i][1] = atoi(argv[i * 2 + 2]);\n\t}\n\tint *col_sizes;\n\tint **results = merge(intervals, (argc - 1) / 2, sizes, &count, &col_sizes);\n\tfor (i = 0; i < count; i++)\n\t{\n\t\tprintf(\"[%d,%d]\\n\", results[i][0], results[i][1]);\n\t}\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-70f141b3ad9d46febf18fbdbaf90c0f4", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600471018" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/74.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/74.exercises/config.json" new file mode 100644 index 000000000..f472540a1 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/74.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-2d3f4293f7a84ff2a372da173fcdd96e", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/74.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/74.exercises/solution.json" new file mode 100644 index 000000000..a91a27e1d --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/74.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "2eba61039fad45a7a13c83b2fc41058b", + "keywords": "数组,双指针,排序", + "title": "三数之和", + "desc": [ + { + "content": "\n

给你一个包含 n 个整数的数组 nums,判断 nums 中是否存在三个元素 a,b,c ,使得 a + b + c = 0 ?请你找出所有和为 0 且不重复的三元组。

注意:答案中不可以包含重复的三元组。

 

示例 1:

输入:nums = [-1,0,1,2,-1,-4]
输出:
[[-1,-1,2],[-1,0,1]]

示例 2:

输入:nums = []
输出:
[]

示例 3:

输入:nums = [0]
输出:
[]

 

提示:

    \t
  • 0 <= nums.length <= 3000
  • \t
  • -105 <= nums[i] <= 105
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \nclass Solution\n{\npublic:\n\tvector> threeSum(vector &nums)\n\t{\n\t\tvector> r;\n\t\tif (nums.size() == 0)\n\t\t\treturn r;\n\t\tsort(nums.begin(), nums.end());\n\t\tint cur, left, right;\n\t\tcur = 0;\n\t\twhile (cur < nums.size())\n\t\t{\n\t\t\tif (nums[cur] > 0)\n\t\t\t\tbreak;\n\t\t\tleft = cur + 1;\n\t\t\tright = nums.size() - 1;\n\t\t\twhile (left < right)\n\t\t\t{\n\t\t\t\tint n = nums[cur] + nums[left] + nums[right];\n\t\t\t\tif (n == 0)\n\t\t\t\t{\n\t\t\t\t\tr.emplace_back(vector({nums[cur], nums[left], nums[right]}));\n\t\t\t\t\tint t = left + 1;\n\t\t\t\t\twhile (t < right && nums[t] == nums[left])\n\t\t\t\t\t\tt++;\n\t\t\t\t\tleft = t;\n\t\t\t\t\tt = right - 1;\n\t\t\t\t\twhile (t > left && nums[t] == nums[right])\n\t\t\t\t\t\tt--;\n\t\t\t\t\tright = t;\n\t\t\t\t}\n\t\t\t\telse if (n > 0)\n\t\t\t\t{\n\t\t\t\t\tint t = right - 1;\n\t\t\t\t\twhile (t > left && nums[t] == nums[right])\n\t\t\t\t\t\tt--;\n\t\t\t\t\tright = t;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tint t = left + 1;\n\t\t\t\t\twhile (t < right && nums[t] == nums[left])\n\t\t\t\t\t\tt++;\n\t\t\t\t\tleft = t;\n\t\t\t\t}\n\t\t\t}\n\t\t\tint t = cur + 1;\n\t\t\twhile (t < nums.size() && nums[t] == nums[cur])\n\t\t\t\tt++;\n\t\t\tcur = t;\n\t\t}\n\t\treturn r;\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-2d3f4293f7a84ff2a372da173fcdd96e", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470113" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/75.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/75.exercises/config.json" new file mode 100644 index 000000000..266a75d0e --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/75.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-042b2c59e8c44737861a74454b50c22a", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/75.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/75.exercises/solution.json" new file mode 100644 index 000000000..edac97321 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/75.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "81767d7398f748a8a652eaec95975385", + "keywords": "数学,字符串,模拟", + "title": "字符串相乘", + "desc": [ + { + "content": "\n

给定两个以字符串形式表示的非负整数 num1 和 num2,返回 num1 和 num2 的乘积,它们的乘积也表示为字符串形式。

示例 1:

输入: num1 = "2", num2 = "3"
输出:
"6"

示例 2:

输入: num1 = "123", num2 = "456"
输出:
"56088"

说明:

    \t
  1. num1 和 num2 的长度小于110。
  2. \t
  3. num1 和 num2 只包含数字 0-9
  4. \t
  5. num1 和 num2 均不以零开头,除非是数字 0 本身。
  6. \t
  7. 不能使用任何标准库的大数类型(比如 BigInteger)直接将输入转换为整数来处理
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nclass Solution\n{\npublic:\n\tstring multiply(string num1, string num2)\n\t{\n\t\tstring res(num1.length() + num2.length(), '0');\n\t\tfor (int i = num2.length() - 1; i >= 0; i--)\n\t\t{\n\t\t\tint j, carry = 0;\n\t\t\tfor (j = num1.length() - 1; j >= 0; j--)\n\t\t\t{\n\t\t\t\tcarry += (num1[j] - '0') * (num2[i] - '0') + (res[i + j + 1] - '0');\n\t\t\t\tres[i + j + 1] = carry % 10 + '0';\n\t\t\t\tcarry /= 10;\n\t\t\t}\n\t\t\tres[i + j + 1] = carry + '0';\n\t\t}\n\t\tint i;\n\t\tfor (i = 0; i < res.length() - 1; i++)\n\t\t{\n\t\t\tif (res[i] != '0')\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn res.substr(i);\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-042b2c59e8c44737861a74454b50c22a", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600471020" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/76.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/76.exercises/config.json" new file mode 100644 index 000000000..32b017bc9 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/76.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-c32c095cff5545278e9e9e51bb3cdbe1", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/76.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/76.exercises/solution.json" new file mode 100644 index 000000000..c3c39c94a --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/76.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "85e648677c4a4d2f91b670310348f77a", + "keywords": "数组,双指针,排序", + "title": "最接近的三数之和", + "desc": [ + { + "content": "\n

给定一个包括 n 个整数的数组 nums 和 一个目标值 target。找出 nums 中的三个整数,使得它们的和与 target 最接近。返回这三个数的和。假定每组输入只存在唯一答案。

 

示例:

输入:nums = [-1,2,1,-4], target = 1
输出:
2
解释:
与 target 最接近的和是 2 (-1 + 2 + 1 = 2) 。

 

提示:

    \t
  • 3 <= nums.length <= 10^3
  • \t
  • -10^3 <= nums[i] <= 10^3
  • \t
  • -10^4 <= target <= 10^4
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nclass Solution\n{\npublic:\n\tint threeSumClosest(vector &nums, int target)\n\t{\n\t\tsort(nums.begin(), nums.end());\n\t\tint cur, left, right;\n\t\tcur = 0;\n\t\tint closest = nums[0] + nums[1] + nums[2];\n\t\twhile (cur < nums.size() - 2)\n\t\t{\n\t\t\tleft = cur + 1;\n\t\t\tright = nums.size() - 1;\n\t\t\tint n;\n\t\t\twhile (left < right)\n\t\t\t{\n\t\t\t\tn = nums[cur] + nums[left] + nums[right];\n\t\t\t\tif (abs(target - n) < abs(target - closest))\n\t\t\t\t{\n\t\t\t\t\tclosest = n;\n\t\t\t\t}\n\t\t\t\tif (n == target)\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse if (n > target)\n\t\t\t\t{\n\t\t\t\t\tint t = right - 1;\n\t\t\t\t\twhile (t > left && nums[t] == nums[right])\n\t\t\t\t\t\tt--;\n\t\t\t\t\tright = t;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tint t = left + 1;\n\t\t\t\t\twhile (t < right && nums[t] == nums[left])\n\t\t\t\t\t\tt++;\n\t\t\t\t\tleft = t;\n\t\t\t\t}\n\t\t\t}\n\t\t\tint t = cur + 1;\n\t\t\twhile (t < nums.size() && nums[t] == nums[cur])\n\t\t\t\tt++;\n\t\t\tcur = t;\n\t\t}\n\t\treturn closest;\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-c32c095cff5545278e9e9e51bb3cdbe1", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600471102" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/77.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/77.exercises/config.json" new file mode 100644 index 000000000..09afebd04 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/77.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-d5fa1747371e4789932aeed9ee27bcdb", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/77.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/77.exercises/solution.json" new file mode 100644 index 000000000..4a6fcb14d --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/77.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "6b2821c095b94e7499a60edc54515517", + "keywords": "贪心,数组,动态规划", + "title": "跳跃游戏", + "desc": [ + { + "content": "\n

给定一个非负整数数组 nums ,你最初位于数组的 第一个下标

数组中的每个元素代表你在该位置可以跳跃的最大长度。

判断你是否能够到达最后一个下标。

 

示例 1:

输入:nums = [2,3,1,1,4]
输出:
true
解释:
可以先跳 1 步,从下标 0 到达下标 1, 然后再从下标 1 跳 3 步到达最后一个下标。

示例 2:

输入:nums = [3,2,1,0,4]
输出:
false
解释:
无论怎样,总会到达下标为 3 的位置。但该下标的最大跳跃长度是 0 , 所以永远不可能到达最后一个下标。

 

提示:

    \t
  • 1 <= nums.length <= 3 * 104
  • \t
  • 0 <= nums[i] <= 105
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \n#include \nstatic inline int max(int a, int b)\n{\n\treturn a > b ? a : b;\n}\nstatic bool canJump(int *nums, int numsSize)\n{\n\tint i, pos = 0;\n\tfor (i = 0; i < numsSize - 1; i++)\n\t{\n\t\tif (pos < i || pos >= numsSize - 1)\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t\tpos = max(i + nums[i], pos);\n\t}\n\treturn pos >= numsSize - 1;\n}\nint main(int argc, char **argv)\n{\n\tint i, count = argc - 1;\n\tint *nums = malloc(count * sizeof(int));\n\tfor (i = 0; i < count; i++)\n\t{\n\t\tnums[i] = atoi(argv[i + 1]);\n\t}\n\tprintf(\"%s\\n\", canJump(nums, count) ? \"true\" : \"false\");\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-d5fa1747371e4789932aeed9ee27bcdb", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470122" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/78.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/78.exercises/config.json" new file mode 100644 index 000000000..d87767a7d --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/78.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-b3f62c12a2624288bb79b4210b44e046", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/78.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/78.exercises/solution.json" new file mode 100644 index 000000000..6b6a3a7cc --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/78.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "485511cc5a7a4c6e8fdb39cd60d07047", + "keywords": "数组,回溯,矩阵", + "title": "单词搜索", + "desc": [ + { + "content": "\n

给定一个 m x n 二维字符网格 board 和一个字符串单词 word 。如果 word 存在于网格中,返回 true ;否则,返回 false

单词必须按照字母顺序,通过相邻的单元格内的字母构成,其中“相邻”单元格是那些水平相邻或垂直相邻的单元格。同一个单元格内的字母不允许被重复使用。

 

示例 1:

\"\"
输入:board = [[\"A\",\"B\",\"C\",\"E\"],[\"S\",\"F\",\"C\",\"S\"],[\"A\",\"D\",\"E\",\"E\"]], word = \"ABCCED\"
输出:
true

示例 2:

\"\"
输入:board = [[\"A\",\"B\",\"C\",\"E\"],[\"S\",\"F\",\"C\",\"S\"],[\"A\",\"D\",\"E\",\"E\"]], word = \"SEE\"
输出:
true

示例 3:

\"\"
输入:board = [[\"A\",\"B\",\"C\",\"E\"],[\"S\",\"F\",\"C\",\"S\"],[\"A\",\"D\",\"E\",\"E\"]], word = \"ABCB\"
输出:
false

 

提示:

    \t
  • m == board.length
  • \t
  • n = board[i].length
  • \t
  • 1 <= m, n <= 6
  • \t
  • 1 <= word.length <= 15
  • \t
  • boardword 仅由大小写英文字母组成

 

进阶:你可以使用搜索剪枝的技术来优化解决方案,使其在 board 更大的情况下可以更快解决问题?

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \n#include \n#include \nstatic bool dfs(char *word, char **board, bool *used,\n\t\t\t\tint row, int col, int row_size, int col_size)\n{\n\tif (board[row][col] != *word)\n\t{\n\t\treturn false;\n\t}\n\tused[row * col_size + col] = true;\n\tif (*(word + 1) == '\\0')\n\t{\n\t\treturn true;\n\t}\n\tbool result = false;\n\tif (row > 0 && !used[(row - 1) * col_size + col])\n\t{\n\t\tresult = dfs(word + 1, board, used, row - 1, col, row_size, col_size);\n\t}\n\tif (!result && row < row_size - 1 && !used[(row + 1) * col_size + col])\n\t{\n\t\tresult = dfs(word + 1, board, used, row + 1, col, row_size, col_size);\n\t}\n\tif (!result && col > 0 && !used[row * col_size + col - 1])\n\t{\n\t\tresult = dfs(word + 1, board, used, row, col - 1, row_size, col_size);\n\t}\n\tif (!result && col < col_size - 1 && !used[row * col_size + col + 1])\n\t{\n\t\tresult = dfs(word + 1, board, used, row, col + 1, row_size, col_size);\n\t}\n\tused[row * col_size + col] = false;\n\treturn result;\n}\nstatic bool exist(char **board, int boardRowSize, int boardColSize, char *word)\n{\n\tint i, j;\n\tint len = strlen(word);\n\tif (len > boardRowSize * boardColSize)\n\t{\n\t\treturn false;\n\t}\n\tbool *used = malloc(boardRowSize * boardColSize);\n\tfor (i = 0; i < boardRowSize; i++)\n\t{\n\t\tfor (j = 0; j < boardColSize; j++)\n\t\t{\n\t\t\tmemset(used, false, boardRowSize * boardColSize);\n\t\t\tif (dfs(word, board, used, i, j, boardRowSize, boardColSize))\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n}\nint main(int argc, char **argv)\n{\n\tif (argc < 3)\n\t{\n\t\tfprintf(stderr, \"Usage: ./test word row1 row2...\\n\");\n\t\texit(-1);\n\t}\n\tprintf(\"%s\\n\", exist(argv + 2, argc - 2, strlen(argv[2]), argv[1]) ? \"true\" : \"false\");\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-b3f62c12a2624288bb79b4210b44e046", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470927" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/79.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/79.exercises/config.json" new file mode 100644 index 000000000..f36144cc6 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/79.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-afe07aa3dd7c45bc9d6ceb91b6349f93", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/79.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/79.exercises/solution.json" new file mode 100644 index 000000000..153e6cf7c --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/79.exercises/solution.json" @@ -0,0 +1,80 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "4655300e1df74e79ae306dd06c7c4cbe", + "keywords": "树,深度优先搜索,二叉搜索树,二叉树", + "title": "验证二叉搜索树", + "desc": [ + { + "content": "\n
\n

给你一个二叉树的根节点 root ,判断其是否是一个有效的二叉搜索树。

", + "language": "markdown" + }, + { + "content": "\n

有效 二叉搜索树定义如下:

", + "language": "markdown" + }, + { + "content": "\n
    \n
  • 节点的左子树只包含 小于 当前节点的数。
  • \n
  • 节点的右子树只包含 大于 当前节点的数。
  • \n
  • 所有左子树和右子树自身必须也是二叉搜索树。
  • \n
", + "language": "markdown" + }, + { + "content": "\n

 

", + "language": "markdown" + }, + { + "content": "\n

示例 1:

\n\"\"\n
输入:root = [2,1,3]\n输出:true\n
", + "language": "markdown" + }, + { + "content": "\n

示例 2:

\n\"\"\n
输入:root = [5,1,4,null,null,3,6]\n输出:false\n解释:根节点的值是 5 ,但是右子节点的值是 4 。\n
", + "language": "markdown" + }, + { + "content": "\n

 

", + "language": "markdown" + }, + { + "content": "\n

提示:

", + "language": "markdown" + }, + { + "content": "\n
    \n
  • 树中节点数目范围在[1, 104]
  • \n
  • -231 <= Node.val <= 231 - 1
  • \n
\n
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nstruct TreeNode\n{\n\tint val;\n\tTreeNode *left;\n\tTreeNode *right;\n\tTreeNode() : val(0), left(nullptr), right(nullptr) {}\n\tTreeNode(int x) : val(x), left(nullptr), right(nullptr) {}\n\tTreeNode(int x, TreeNode *left, TreeNode *right) : val(x), left(left), right(right) {}\n};\nclass Solution\n{\npublic:\n\tbool isValidBST(TreeNode *root)\n\t{\n\t\tstack stk;\n\t\tint prev = INT_MIN;\n\t\tbool first = true;\n\t\twhile (!stk.empty() || root != nullptr)\n\t\t{\n\t\t\tif (root != nullptr)\n\t\t\t{\n\t\t\t\tstk.push(root);\n\t\t\t\troot = root->left;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\troot = stk.top();\n\t\t\t\tstk.pop();\n\t\t\t\tif (!first && prev >= root->val)\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tfirst = false;\n\t\t\t\tprev = root->val;\n\t\t\t\troot = root->right;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-afe07aa3dd7c45bc9d6ceb91b6349f93", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600469827" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/8.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/8.exercises/config.json" new file mode 100644 index 000000000..0311a5043 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/8.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-04711f16d9ef4c92a4b8c611f05fa4d4", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/8.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/8.exercises/solution.json" new file mode 100644 index 000000000..86fbd4b96 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/8.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "8e6b1f337d77412d8cbfc256ba0e5f6e", + "keywords": "算法初阶,排序和顺序统计量,中位数和顺序统计量,期望为线性时间的选择算法", + "title": "偶数 or 奇数", + "desc": [ + { + "content": "\n偶数 or 奇数\n时间限制: 1 Sec 内存限制: 128 MB\n题目描述\n编程班老师搞了一个有 N (1 <= N <= 100) 个正整数 I (1 <= I <= 10^60) 的表,叫 同学们去统计每个数里面数字(0,1,2,3,4,5,6,7,8,9)(注 0 为偶数)的奇偶数 字个数。写一个程序读入 N 个整数,统计每个整数的数字奇偶个数。\n输入\n第 1 行: 一个单独的整数: N \n第 2 到第 N+1 行: 每行一个长长(小于等于 60 位)的整数,需要统计数字奇偶个数。\n输出\n1..N 行: 第 j 行根据第 j 个整数输出奇数个数与偶数个数。\n样例输入\n2\n1024\n5931\n样例输出\n1 3\n4 0", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include\n#include\nusing namespace std;\nstring a[105];\nint b[105],c[105];\nint qiujishu(string x){\n\tint jishu=0;\n\tfor(int i = 0; x.c_str()[i]; i++){\n\t\tif ((x.c_str()[i] - '0') % 2 == 1) jishu++;\n\t}\n\treturn jishu;\n}\nint qiuoushu(string x){\n\tint oushu=0;\n\tfor(int i = 0; x.c_str()[i]; i++){\n\t\tif ((x.c_str()[i] - '0') % 2 == 0) oushu++;\n\t}\n\treturn oushu;\n}\nint main()\n{\n\tint n;\n\tcin>>n;\n\tfor(int i=1;i<=n;i++){\n\t\tcin>>a[i];\n\t\tb[i]=qiujishu(a[i]);\n\t\tc[i]=qiuoushu(a[i]);\n\t}\n\tfor(int i=1;i<=n;i++){\n\t\tcout<存在一个按升序排列的链表,给你这个链表的头节点 head ,请你删除链表中所有存在数字重复情况的节点,只保留原始链表中 没有重复出现 的数字。

返回同样按升序排列的结果链表。

 

示例 1:

\"\"
输入:head = [1,2,3,3,4,4,5]
输出:
[1,2,5]

示例 2:

\"\"
输入:head = [1,1,1,2,3]
输出:
[2,3]

 

提示:

    \t
  • 链表中节点数目在范围 [0, 300]
  • \t
  • -100 <= Node.val <= 100
  • \t
  • 题目数据保证链表已经按升序排列
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \nstruct ListNode\n{\n\tint val;\n\tstruct ListNode *next;\n};\nstruct ListNode *deleteDuplicates(struct ListNode *head)\n{\n\tstruct ListNode dummy;\n\tstruct ListNode *p, *q, *prev;\n\tprev = &dummy;\n\tdummy.next = head;\n\tp = q = head;\n\twhile (p != NULL)\n\t{\n\t\twhile (q != NULL && q->val == p->val)\n\t\t{\n\t\t\tq = q->next;\n\t\t}\n\t\tif (p->next == q)\n\t\t{\n\t\t\tprev = p;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tprev->next = q;\n\t\t}\n\t\tp = q;\n\t}\n\treturn dummy.next;\n}\nint main(int argc, char **argv)\n{\n\tint i;\n\tstruct ListNode *head = NULL;\n\tstruct ListNode *prev = NULL;\n\tstruct ListNode *p;\n\tfor (i = 0; i < argc - 1; i++)\n\t{\n\t\tp = malloc(sizeof(*p));\n\t\tp->val = atoi(argv[i + 1]);\n\t\tp->next = NULL;\n\t\tif (head == NULL)\n\t\t{\n\t\t\thead = p;\n\t\t\tprev = head;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tprev->next = p;\n\t\t\tprev = p;\n\t\t}\n\t}\n\tp = deleteDuplicates(head);\n\twhile (p != NULL)\n\t{\n\t\tprintf(\"%d \", p->val);\n\t\tp = p->next;\n\t}\n\tprintf(\"\\n\");\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-c93700cb5c094f74a66dfef7fa2ab6b3", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470128" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/81.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/81.exercises/config.json" new file mode 100644 index 000000000..08a89d91a --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/81.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-5566db3ee0444562987747d551bcd75f", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/81.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/81.exercises/solution.json" new file mode 100644 index 000000000..d73edad6b --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/81.exercises/solution.json" @@ -0,0 +1,104 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "f2711df719de488dbaada64188994f74", + "keywords": "字符串", + "title": "Z 字形变换", + "desc": [ + { + "content": "\n
\n

将一个给定字符串 s 根据给定的行数 numRows ,以从上往下、从左到右进行 Z 字形排列。

", + "language": "markdown" + }, + { + "content": "\n

比如输入字符串为 \"PAYPALISHIRING\" 行数为 3 时,排列如下:

", + "language": "markdown" + }, + { + "content": "\n
\nP   A   H   N\nA P L S I I G\nY   I   R
", + "language": "markdown" + }, + { + "content": "\n

之后,你的输出需要从左往右逐行读取,产生出一个新的字符串,比如:\"PAHNAPLSIIGYIR\"

", + "language": "markdown" + }, + { + "content": "\n

请你实现这个将字符串进行指定行数变换的函数:

", + "language": "markdown" + }, + { + "content": "\n
string convert(string s, int numRows);
", + "language": "markdown" + }, + { + "content": "\n

 

", + "language": "markdown" + }, + { + "content": "\n

示例 1:

", + "language": "markdown" + }, + { + "content": "\n
输入:s = \"PAYPALISHIRING\", numRows = 3\n输出:\"PAHNAPLSIIGYIR\"\n
\n示例 2:", + "language": "markdown" + }, + { + "content": "\n
输入:s = \"PAYPALISHIRING\", numRows = 4\n输出:\"PINALSIGYAHRPI\"\n解释:\nP     I    N\nA   L S  I G\nY A   H R\nP     I\n
", + "language": "markdown" + }, + { + "content": "\n

示例 3:

", + "language": "markdown" + }, + { + "content": "\n
输入:s = \"A\", numRows = 1\n输出:\"A\"\n
", + "language": "markdown" + }, + { + "content": "\n

 

", + "language": "markdown" + }, + { + "content": "\n

提示:

", + "language": "markdown" + }, + { + "content": "\n
    \n
  • 1 <= s.length <= 1000
  • \n
  • s 由英文字母(小写和大写)、',''.' 组成
  • \n
  • 1 <= numRows <= 1000
  • \n
\n
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "class Solution\n{\npublic:\n\tstring convert(string s, int numRows)\n\t{\n\t\tif (numRows == 1)\n\t\t\treturn s;\n\t\tint len = s.size();\n\t\tif (len <= numRows)\n\t\t\treturn s;\n\t\tint cycle_len = 2 * numRows - 2;\n\t\tint full_cycles = len / cycle_len;\n\t\tint left = len % cycle_len;\n\t\tstring r;\n\t\tint i;\n\t\tfor (i = 0; i < full_cycles; ++i)\n\t\t{\n\t\t\tr += s[i * cycle_len];\n\t\t}\n\t\tif (left)\n\t\t\tr += s[i * cycle_len];\n\t\tfor (i = 0; i < numRows - 2; ++i)\n\t\t{\n\t\t\tint j;\n\t\t\tfor (j = 0; j < full_cycles; ++j)\n\t\t\t{\n\t\t\t\tr += s[j * cycle_len + i + 1];\n\t\t\t\tr += s[j * cycle_len + i + 1 + cycle_len - 2 * (i + 1)];\n\t\t\t}\n\t\t\tif (left)\n\t\t\t{\n\t\t\t\tif (j * cycle_len + i + 1 < len)\n\t\t\t\t\tr += s[j * cycle_len + i + 1];\n\t\t\t\tif (j * cycle_len + i + 1 + cycle_len - 2 * (i + 1) < len)\n\t\t\t\t\tr += s[j * cycle_len + i + 1 + cycle_len - 2 * (i + 1)];\n\t\t\t}\n\t\t}\n\t\tfor (i = 0; i < full_cycles; ++i)\n\t\t\tr += s[i * cycle_len + numRows - 1];\n\t\tif (left >= numRows)\n\t\t\tr += s[i * cycle_len + numRows - 1];\n\t\treturn r;\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-5566db3ee0444562987747d551bcd75f", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600469917" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/82.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/82.exercises/config.json" new file mode 100644 index 000000000..6b95f56c5 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/82.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-afaa892994bc4a7c920701ff7efc3384", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/82.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/82.exercises/solution.json" new file mode 100644 index 000000000..06dacaff8 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/82.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "3e719cb3f4dc4965869967acc997108d", + "keywords": "数组,回溯", + "title": "组合总和 II", + "desc": [ + { + "content": "\n

给定一个数组 candidates 和一个目标数 target ,找出 candidates 中所有可以使数字和为 target 的组合。\n

\n

candidates 中的每个数字在每个组合中只能使用一次。

\n

说明:

\n
    \n
  • 所有数字(包括目标数)都是正整数。
  • \n
  • 解集不能包含重复的组合。 
  • \n
\n

示例 1:

\n
输入: candidates = [10,1,2,7,6,1,5], target = 8,
所求解集为:
[[1, 7],[1, 2, 5],[2, 6],[1, 1, 6]]
\n

示例 2:

\n
输入: candidates = [2,5,2,1,2], target = 5,
所求解集为:
[[1,2,2],[5]]
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nclass Solution\n{\npublic:\n\tvector> combinationSum2(vector &candidates, int target)\n\t{\n\t\tvector> res;\n\t\tsort(candidates.begin(), candidates.end());\n\t\tdfs(candidates, 0, target, res);\n\t\treturn res;\n\t}\nprivate:\n\tvector stack;\n\tvoid dfs(vector &candidates, int start, int target, vector> &res)\n\t{\n\t\tif (target < 0)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\telse if (target == 0)\n\t\t{\n\t\t\tres.push_back(stack);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tint last = INT_MIN;\n\t\t\tfor (int i = start; i < candidates.size(); i++)\n\t\t\t{\n\t\t\t\tif (last != candidates[i])\n\t\t\t\t{\n\t\t\t\t\tstack.push_back(candidates[i]);\n\t\t\t\t\tdfs(candidates, i + 1, target - candidates[i], res);\n\t\t\t\t\tstack.pop_back();\n\t\t\t\t}\n\t\t\t\tlast = candidates[i];\n\t\t\t}\n\t\t}\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-afaa892994bc4a7c920701ff7efc3384", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470928" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/83.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/83.exercises/config.json" new file mode 100644 index 000000000..c6989ae9c --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/83.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-93f92073f6254a549ac8e0010c008337", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/83.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/83.exercises/solution.json" new file mode 100644 index 000000000..8810711d9 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/83.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "03ce5873e9874d519a639d13cbafda4f", + "keywords": "数组,矩阵,模拟", + "title": "螺旋矩阵 II", + "desc": [ + { + "content": "\n

给你一个正整数 n ,生成一个包含 1 到 n2 所有元素,且元素按顺时针顺序螺旋排列的 n x n 正方形矩阵 matrix

 

示例 1:

\"\"
输入:n = 3
输出:
[[1,2,3],[8,9,4],[7,6,5]]

示例 2:

输入:n = 1
输出:
[[1]]

 

提示:

    \t
  • 1 <= n <= 20
", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nclass Solution\n{\npublic:\n\tvector> generateMatrix(int n)\n\t{\n\t\tvector> matrix(n, vector(n));\n\t\tint direction = 0;\n\t\tint hor_top = 0;\n\t\tint hor_bottom = n - 1;\n\t\tint ver_left = 0;\n\t\tint ver_right = n - 1;\n\t\tint num = 0;\n\t\twhile (num < n * n)\n\t\t{\n\t\t\tswitch (direction)\n\t\t\t{\n\t\t\tcase 0:\n\t\t\t\tfor (int i = ver_left; i <= ver_right; i++)\n\t\t\t\t{\n\t\t\t\t\tmatrix[hor_top][i] = ++num;\n\t\t\t\t}\n\t\t\t\thor_top++;\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tfor (int i = hor_top; i <= hor_bottom; i++)\n\t\t\t\t{\n\t\t\t\t\tmatrix[i][ver_right] = ++num;\n\t\t\t\t}\n\t\t\t\tver_right--;\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tfor (int i = ver_right; i >= ver_left; i--)\n\t\t\t\t{\n\t\t\t\t\tmatrix[hor_bottom][i] = ++num;\n\t\t\t\t}\n\t\t\t\thor_bottom--;\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tfor (int i = hor_bottom; i >= hor_top; i--)\n\t\t\t\t{\n\t\t\t\t\tmatrix[i][ver_left] = ++num;\n\t\t\t\t}\n\t\t\t\tver_left++;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tdirection++;\n\t\t\tdirection %= 4;\n\t\t}\n\t\treturn matrix;\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-93f92073f6254a549ac8e0010c008337", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470226" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/84.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/84.exercises/config.json" new file mode 100644 index 000000000..1befb7950 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/84.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-c35251e8f87a49a7a4b5e149f073dea8", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/84.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/84.exercises/solution.json" new file mode 100644 index 000000000..2d73234ed --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/84.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "cb4c24a331b64c8c91916b1d751fa87d", + "keywords": "递归,链表", + "title": "两两交换链表中的节点", + "desc": [ + { + "content": "\n

给定一个链表,两两交换其中相邻的节点,并返回交换后的链表。

你不能只是单纯的改变节点内部的值,而是需要实际的进行节点交换。

 

示例 1:

\"\"
输入:head = [1,2,3,4]
输出:
[2,1,4,3]

示例 2:

输入:head = []
输出:
[]

示例 3:

输入:head = [1]
输出:
[1]

 

提示:

    \t
  • 链表中节点的数目在范围 [0, 100]
  • \t
  • 0 <= Node.val <= 100

 

进阶:你能在不修改链表节点值的情况下解决这个问题吗?(也就是说,仅修改节点本身。)

", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nstruct ListNode\n{\n\tint val;\n\tListNode *next;\n\tListNode() : val(0), next(nullptr) {}\n\tListNode(int x) : val(x), next(nullptr) {}\n\tListNode(int x, ListNode *next) : val(x), next(next) {}\n};\nclass Solution\n{\npublic:\n\tListNode *swapPairs(ListNode *head)\n\t{\n\t\tstruct ListNode dummy, *prev = &dummy, *p = head;\n\t\tdummy.next = head;\n\t\twhile (p != nullptr && p->next != nullptr)\n\t\t{\n\t\t\tstruct ListNode *q = p->next;\n\t\t\tp->next = q->next;\n\t\t\tq->next = prev->next;\n\t\t\tprev->next = q;\n\t\t\tprev = p;\n\t\t\tp = p->next;\n\t\t}\n\t\treturn dummy.next;\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-c35251e8f87a49a7a4b5e149f073dea8", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470117" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/85.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/85.exercises/config.json" new file mode 100644 index 000000000..28025b413 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/85.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-826dfcaf541147bb8be5b8a3103697ad", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/85.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/85.exercises/solution.json" new file mode 100644 index 000000000..808897979 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/85.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "85a319fbe4b643e0b11939d9434f8a3e", + "keywords": "数组,双指针,排序", + "title": "颜色分类", + "desc": [ + { + "content": "\n

给定一个包含红色、白色和蓝色,一共 n 个元素的数组,原地对它们进行排序,使得相同颜色的元素相邻,并按照红色、白色、蓝色顺序排列。

此题中,我们使用整数 0、 12 分别表示红色、白色和蓝色。

     

    示例 1:

    输入:nums = [2,0,2,1,1,0]
    输出:
    [0,0,1,1,2,2]

    示例 2:

    输入:nums = [2,0,1]
    输出:
    [0,1,2]

    示例 3:

    输入:nums = [0]
    输出:
    [0]

    示例 4:

    输入:nums = [1]
    输出:
    [1]

     

    提示:

      \t
    • n == nums.length
    • \t
    • 1 <= n <= 300
    • \t
    • nums[i]012

     

    进阶:

      \t
    • 你可以不使用代码库中的排序函数来解决这道题吗?
    • \t
    • 你能想出一个仅使用常数空间的一趟扫描算法吗?
    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nclass Solution\n{\npublic:\n\tvoid sortColors(vector &nums)\n\t{\n\t\tint i = 0, j = nums.size() - 1;\n\t\twhile (i < j)\n\t\t{\n\t\t\tif (nums[i] == 0)\n\t\t\t{\n\t\t\t\ti++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (nums[j] != 0)\n\t\t\t{\n\t\t\t\tj--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tswap(nums[i], nums[j]);\n\t\t}\n\t\tj = nums.size() - 1;\n\t\twhile (i < j)\n\t\t{\n\t\t\tif (nums[i] == 1)\n\t\t\t{\n\t\t\t\ti++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (nums[j] != 1)\n\t\t\t{\n\t\t\t\tj--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tswap(nums[i], nums[j]);\n\t\t}\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-826dfcaf541147bb8be5b8a3103697ad", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470126" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/86.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/86.exercises/config.json" new file mode 100644 index 000000000..961e3bf34 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/86.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-4636efcd81dd4e2a9f8f83ab23b80ffe", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/86.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/86.exercises/solution.json" new file mode 100644 index 000000000..8a827845e --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/86.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "49a32f00b67543ec98399a8e3266b20e", + "keywords": "数组,动态规划,矩阵", + "title": "不同路径 II", + "desc": [ + { + "content": "\n

    一个机器人位于一个 m x n 网格的左上角 (起始点在下图中标记为“Start” )。

    \n

    机器人每次只能向下或者向右移动一步。机器人试图达到网格的右下角(在下图中标记为“Finish”)。

    \n

    现在考虑网格中有障碍物。那么从左上角到右下角将会有多少条不同的路径?

    \n

    \n

    网格中的障碍物和空位置分别用 10 来表示。

    \n

     

    \n

    示例 1:

    \"\"\nsrc=\"https://cdn.jsdelivr.net/gh/doocs/leetcode@main/solution/0000-0099/0063.Unique%20Paths%20II/images/robot1.jpg\"\nstyle=\"width:\n
    输入:obstacleGrid = [[0,0,0],[0,1,0],[0,0,0]]
    输出:
    2
    解释:
    3x3 网格的正中间有一个障碍物。从左上角到右下角一共有 2 条不同的路径:
    1. 向右 -> 向右 -> 向下 -> 向下
    2. 向下 -> 向下 -> 向右 -> 向右
    \n

    示例 2:

    \"\"\nsrc=\"https://cdn.jsdelivr.net/gh/doocs/leetcode@main/solution/0000-0099/0063.Unique%20Paths%20II/images/robot2.jpg\"\nstyle=\"width:\n
    输入:obstacleGrid = [[0,1],[0,0]]
    输出:
    1
    \n

     

    \n

    提示:

    \n
      \n
    • m == obstacleGrid.length
    • \n
    • n == obstacleGrid[i].length
    • \n
    • 1 <= m, n <= 100
    • \n
    • obstacleGrid[i][j]01
    • \n
    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \nstatic int uniquePathsWithObstacles(int **obstacleGrid, int obstacleGridRowSize, int obstacleGridColSize)\n{\n\tint row, col;\n\tint reset = 0;\n\tfor (row = 0; row < obstacleGridRowSize; row++)\n\t{\n\t\tif (reset)\n\t\t{\n\t\t\tobstacleGrid[row][0] = 1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (obstacleGrid[row][0] == 1)\n\t\t\t{\n\t\t\t\treset = 1;\n\t\t\t}\n\t\t}\n\t}\n\treset = 0;\n\tfor (col = 0; col < obstacleGridColSize; col++)\n\t{\n\t\tif (reset)\n\t\t{\n\t\t\tobstacleGrid[0][col] = 1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (obstacleGrid[0][col] == 1)\n\t\t\t{\n\t\t\t\treset = 1;\n\t\t\t}\n\t\t}\n\t}\n\tfor (row = 0; row < obstacleGridRowSize; row++)\n\t{\n\t\tint *line = obstacleGrid[row];\n\t\tfor (col = 0; col < obstacleGridColSize; col++)\n\t\t{\n\t\t\tline[col] ^= 1;\n\t\t}\n\t}\n\tfor (row = 1; row < obstacleGridRowSize; row++)\n\t{\n\t\tint *last_line = obstacleGrid[row - 1];\n\t\tint *line = obstacleGrid[row];\n\t\tfor (col = 1; col < obstacleGridColSize; col++)\n\t\t{\n\t\t\tif (line[col] != 0)\n\t\t\t{\n\t\t\t\tline[col] = line[col - 1] + last_line[col];\n\t\t\t}\n\t\t}\n\t}\n\treturn obstacleGrid[obstacleGridRowSize - 1][obstacleGridColSize - 1];\n}\nint main(int argc, char **argv)\n{\n\tif (argc < 3)\n\t{\n\t\tfprintf(stderr, \"Usage: ./test m n\\n\");\n\t\texit(-1);\n\t}\n\tint i, j, k = 3;\n\tint row_size = atoi(argv[1]);\n\tint col_size = atoi(argv[2]);\n\tint **grids = malloc(row_size * sizeof(int *));\n\tfor (i = 0; i < row_size; i++)\n\t{\n\t\tgrids[i] = malloc(col_size * sizeof(int));\n\t\tint *line = grids[i];\n\t\tfor (j = 0; j < col_size; j++)\n\t\t{\n\t\t\tline[j] = atoi(argv[k++]);\n\t\t\tprintf(\"%d \", line[j]);\n\t\t}\n\t\tprintf(\"\\n\");\n\t}\n\tprintf(\"%d\\n\", uniquePathsWithObstacles(grids, row_size, col_size));\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-4636efcd81dd4e2a9f8f83ab23b80ffe", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470123" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/87.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/87.exercises/config.json" new file mode 100644 index 000000000..b59069baf --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/87.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-1964e4bf97984234a14f997bb1352fcb", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/87.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/87.exercises/solution.json" new file mode 100644 index 000000000..205067c28 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/87.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "46cd4f2a4d904b3e8e261a2904f5b9e6", + "keywords": "数组,哈希表,矩阵", + "title": "有效的数独", + "desc": [ + { + "content": "\n

    请你判断一个 9x9 的数独是否有效。只需要 根据以下规则 ,验证已经填入的数字是否有效即可。

    \n
      \n
    1. 数字 1-9 在每一行只能出现一次。
    2. \n
    3. 数字 1-9 在每一列只能出现一次。
    4. \n
    5. 数字 1-9 在每一个以粗实线分隔的 3x3 宫内只能出现一次。(请参考示例图)
    6. \n
    \n

    数独部分空格内已填入了数字,空白格用 '.' 表示。

    \n

    注意:

    \n
      \n
    • 一个有效的数独(部分已被填充)不一定是可解的。
    • \n
    • 只需要根据以上规则,验证已经填入的数字是否有效即可。
    • \n
    \n

     

    \n

    示例 1:

    \n
    输入:board = \n[[\"5\",\"3\",\".\",\".\",\"7\",\".\",\".\",\".\",\".\"]\n,[\"6\",\".\",\".\",\"1\",\"9\",\"5\",\".\",\".\",\".\"]\n,[\".\",\"9\",\"8\",\".\",\".\",\".\",\".\",\"6\",\".\"]\n,[\"8\",\".\",\".\",\".\",\"6\",\".\",\".\",\".\",\"3\"]\n,[\"4\",\".\",\".\",\"8\",\".\",\"3\",\".\",\".\",\"1\"]\n,[\"7\",\".\",\".\",\".\",\"2\",\".\",\".\",\".\",\"6\"]\n,[\".\",\"6\",\".\",\".\",\".\",\".\",\"2\",\"8\",\".\"]\n,[\".\",\".\",\".\",\"4\",\"1\",\"9\",\".\",\".\",\"5\"]\n,[\".\",\".\",\".\",\".\",\"8\",\".\",\".\",\"7\",\"9\"]]\n输出:true\n
    \n

    示例 2:

    \n
    输入:board = \n[[\"8\",\"3\",\".\",\".\",\"7\",\".\",\".\",\".\",\".\"]\n,[\"6\",\".\",\".\",\"1\",\"9\",\"5\",\".\",\".\",\".\"]\n,[\".\",\"9\",\"8\",\".\",\".\",\".\",\".\",\"6\",\".\"]\n,[\"8\",\".\",\".\",\".\",\"6\",\".\",\".\",\".\",\"3\"]\n,[\"4\",\".\",\".\",\"8\",\".\",\"3\",\".\",\".\",\"1\"]\n,[\"7\",\".\",\".\",\".\",\"2\",\".\",\".\",\".\",\"6\"]\n,[\".\",\"6\",\".\",\".\",\".\",\".\",\"2\",\"8\",\".\"]\n,[\".\",\".\",\".\",\"4\",\"1\",\"9\",\".\",\".\",\"5\"]\n,[\".\",\".\",\".\",\".\",\"8\",\".\",\".\",\"7\",\"9\"]]\n输出:false\n解释:除了第一行的第一个数字从 5 改为 8 以外,空格内其他数字均与 示例1 相同。 但由于位于左上角的 3x3 宫内有两个 8 存在, 因此这个数独是无效的。
    \n

     

    \n

    提示:

    \n
      \n
    • board.length == 9
    • \n
    • board[i].length == 9
    • \n
    • board[i][j] 是一位数字或者 '.'
    • \n
    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nclass Solution\n{\npublic:\n\tbool isValidSudoku(vector> &board)\n\t{\n\t\tfor (int i = 0; i < board.size(); i++)\n\t\t{\n\t\t\tvector mark(10);\n\t\t\tfor (int j = 0; j < board.size(); j++)\n\t\t\t{\n\t\t\t\tif (!valid(board, mark, i, j))\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (int j = 0; j < board.size(); j++)\n\t\t{\n\t\t\tvector mark(10);\n\t\t\tfor (int i = 0; i < board.size(); i++)\n\t\t\t{\n\t\t\t\tif (!valid(board, mark, i, j))\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (int k = 0; k < board.size(); k++)\n\t\t{\n\t\t\tint sr = k / 3 * 3;\n\t\t\tint sc = (k % 3) * 3;\n\t\t\tvector mark(10);\n\t\t\tfor (int i = sr; i < sr + 3; i++)\n\t\t\t{\n\t\t\t\tfor (int j = sc; j < sc + 3; j++)\n\t\t\t\t{\n\t\t\t\t\tif (!valid(board, mark, i, j))\n\t\t\t\t\t{\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\nprivate:\n\tbool valid(vector> &board, vector &mark, int i, int j)\n\t{\n\t\tif (board[i][j] != '.')\n\t\t{\n\t\t\tint index = board[i][j] - '0';\n\t\t\tif (mark[index])\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tmark[index] = 1;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-1964e4bf97984234a14f997bb1352fcb", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600469920" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/9.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/9.exercises/config.json" new file mode 100644 index 000000000..177520c7e --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/9.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-7f4aaca343fc40549296badcaa53bf03", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/9.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/9.exercises/solution.json" new file mode 100644 index 000000000..2a91f7e5f --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/1.cpp/9.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "90d989a6c03b4d1190c2a5a512d4c3bb", + "keywords": "图算法,算法高阶,图的表示,基本的图算法", + "title": "卖树苗", + "desc": [ + { + "content": "\n

    题目描述\n植树节又到了,商家A和商家B为了卖出更多的树苗。
    \n商家A有了新的决定:
    \n购买树苗数量小于等于10棵,所有树苗按正常价格10元一棵收费;
    \n购买树苗数量大于10且小于等于20棵,超出10棵以上的树苗按8.2元一棵收费,其余树苗按正常价格收费;
    \n购买树苗数量大于20棵,超出20棵以上的树苗按7.5元一棵收费,10至20棵部分树苗按8.2元一棵收费,其余树苗按正常价格收费。
    \n商家B决定:
    \n所有树苗12元一棵,但是均打七折卖出。

    图图要代表班级去买树苗,要求输入图图需要购买的树苗棵数,输出在哪家商家购买更加划算及其所要花费的钱数。\n输入要求\n1 行,一个整数,表示图图需要购买的树苗数量。\n输出要求\n1 行,如果商家A的树苗比较划算,输出:A,否则输出:B,同时输出图图购买树苗最优惠的钱数(文字和数字间用空格隔开)。
    \n样例输入

    \n
    \n30
    \n

    样例输出 

    \n
    \nB 252
    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nint main() {\n\tdouble n, A, B;\t\n\tcin >> n;\n\tB = 12 * 0.7 * n;\n\tif (n <= 10) {\n\t\tA = 10 * n;\n\t}\n\telse if (n > 10 && n <= 20) {\n\t\tA = 10 * 10 + (n - 10) * 8.2;\n\t}\n\telse {\n\t\tA = 10 * 8.2 + (n - 20) * 7.5 + 10 * 10;\n\t}\n\tif (A < B) {\n\t\tcout << \"A \" << A;\n\t}\n\telse {\n\t\tcout << \"B \" << B;\n\t}\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-7f4aaca343fc40549296badcaa53bf03", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600469866" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/1.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/1.exercises/config.json" new file mode 100644 index 000000000..fbe7e9f80 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/1.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-e4f08941ea62439cb49087bb21e1fdb1", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/1.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/1.exercises/solution.json" new file mode 100644 index 000000000..575e197c1 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/1.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "853c9f5792e8437ba59bafcd5804f968", + "keywords": "算法高阶,多线程算法,算法问题选编,动态多线程基础", + "title": "多线程问题", + "desc": [ + { + "content": "\n1.程序中需要开启两个线程(线程1和线程2)\n2.线程1固定5秒钟执行一次\n3.线程2固定10秒钟执行一次\n4.开启程序如何做到线程1执行完成后再执行线程2并且在之后无论谁先执行都需等待对方执行完成后才可以开始执行", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "public class TestThreadJoin {\n\tpublic static void main(String[] args) {\n\t\tfinal Object lock = new Object();\n\t\tRunnable r1 = () -> {\n\t\t\twhile (true) {\n\t\t\t\tsynchronized (lock) {\n\t\t\t\t\tSystem.out.println(\"线程1执行。\");\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(5000);\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tRunnable r2 = () -> {\n\t\t\twhile (true) {\n\t\t\t\tsynchronized (lock) {\n\t\t\t\t\tSystem.out.println(\"线程2执行。\");\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(10000);\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tnew Thread(r1).start();\n\t\tnew Thread(r2).start();\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-e4f08941ea62439cb49087bb21e1fdb1", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470290" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/10.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/10.exercises/config.json" new file mode 100644 index 000000000..a1d59ac38 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/10.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-b97a45db1664450db39afacc504f65c7", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/10.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/10.exercises/solution.json" new file mode 100644 index 000000000..b4e2ca13b --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/10.exercises/solution.json" @@ -0,0 +1,76 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "5856e70cd3a5422dbad072f18477ed35", + "keywords": "树,二叉搜索树,动态规划,回溯,二叉树", + "title": "不同的二叉搜索树 II", + "desc": [ + { + "content": "\n
    \n

    给你一个整数 n ,请你生成并返回所有由 n 个节点组成且节点值从 1n 互不相同的不同\n二叉搜索树 。可以按 任意顺序 返回答案。\n

    ", + "language": "markdown" + }, + { + "content": "\n

     

    ", + "language": "markdown" + }, + { + "content": "\n
    \n
    \n

    示例 1:

    \n\"\"\n
    输入:n = 3\n输出:[[1,null,2,null,3],[1,null,3,2],[2,1,3],[3,1,null,null,2],[3,2,null,1]]\n
    ", + "language": "markdown" + }, + { + "content": "\n

    示例 2:

    ", + "language": "markdown" + }, + { + "content": "\n
    输入:n = 1\n输出:[[1]]\n
    ", + "language": "markdown" + }, + { + "content": "\n

     

    ", + "language": "markdown" + }, + { + "content": "\n

    提示:

    ", + "language": "markdown" + }, + { + "content": "\n
      \n
    • 1 <= n <= 8
    • \n
    \n
    \n
    \n
    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class TreeNode {\n\tint val;\n\tTreeNode left;\n\tTreeNode right;\n\n\tTreeNode(int x) {\n\t\tval = x;\n\t}\n}\n\nclass Solution {\n\tpublic List generateTrees(int n) {\n\n\t\tif (n == 0)\n\t\t\treturn new LinkedList();\n\n\t\treturn generate_trees(1, n);\n\t}\n\n\tprivate LinkedList generate_trees(int start, int end) {\n\t\tLinkedList all_trees = new LinkedList();\n\n\t\tif (start > end) {\n\t\t\tall_trees.add(null);\n\t\t\treturn all_trees;\n\t\t}\n\n\t\tfor (int i = start; i <= end; i++) {\n\t\t\tLinkedList left_trees = generate_trees(start, i - 1);\n\t\t\tLinkedList right_trees = generate_trees(i + 1, end);\n\n\t\t\tfor (TreeNode l : left_trees)\n\t\t\t\tfor (TreeNode r : right_trees) {\n\t\t\t\t\tTreeNode current_tree = new TreeNode(i);\n\t\t\t\t\tcurrent_tree.left = l;\n\t\t\t\t\tcurrent_tree.right = r;\n\t\t\t\t\tall_trees.add(current_tree);\n\t\t\t\t}\n\t\t}\n\n\t\treturn all_trees;\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-b97a45db1664450db39afacc504f65c7", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600471004" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/11.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/11.exercises/config.json" new file mode 100644 index 000000000..3d2f90505 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/11.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-cba3b9fdcdbc447981e98ac7d67b82c6", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/11.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/11.exercises/solution.json" new file mode 100644 index 000000000..88cf22676 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/11.exercises/solution.json" @@ -0,0 +1,120 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "801e487f54b446efb2aee528636f5484", + "keywords": "字符串", + "title": "字符串转换整数 (atoi)", + "desc": [ + { + "content": "\n
    \n

    请你来实现一个 myAtoi(string s) 函数,使其能将字符串转换成一个 32 位有符号整数(类似 C/C++ 中的 atoi 函数)。

    ", + "language": "markdown" + }, + { + "content": "\n

    函数 myAtoi(string s) 的算法如下:

    ", + "language": "markdown" + }, + { + "content": "\n
      \n
    • 读入字符串并丢弃无用的前导空格
    • \n
    • 检查下一个字符(假设还未到字符末尾)为正还是负号,读取该字符(如果有)。 确定最终结果是负数还是正数。 如果两者都不存在,则假定结果为正。
    • \n
    • 读入下一个字符,直到到达下一个非数字字符或到达输入的结尾。字符串的其余部分将被忽略。
    • \n
    • 将前面步骤读入的这些数字转换为整数(即,\"123\" -> 123, \"0032\" -> 32)。如果没有读入数字,则整数为 0 。必要时更改符号(从步骤 2 开始)。
    • \n
    • 如果整数数超过 32 位有符号整数范围 [−231,  231 − 1]\n,需要截断这个整数,使其保持在这个范围内。具体来说,小于 −231 的整数应该被固定为 −231 ,大于\n231 − 1 的整数应该被固定为 231 − 1 。\n
    • \n
    • 返回整数作为最终结果。
    • \n
    ", + "language": "markdown" + }, + { + "content": "\n

    注意:

    ", + "language": "markdown" + }, + { + "content": "\n
      \n
    • 本题中的空白字符只包括空格字符 ' '
    • \n
    • 除前导空格或数字后的其余字符串外,请勿忽略 任何其他字符。
    • \n
    ", + "language": "markdown" + }, + { + "content": "\n

     

    ", + "language": "markdown" + }, + { + "content": "\n

    示例 1:

    ", + "language": "markdown" + }, + { + "content": "\n
    输入:s = \"42\"\n输出:42\n解释:加粗的字符串为已经读入的字符,插入符号是当前读取的字符。\n第 1 步:\"42\"(当前没有读入字符,因为没有前导空格)\n^\n第 2 步:\"42\"(当前没有读入字符,因为这里不存在 '-' 或者 '+')\n^\n第 3 步:\"42\"(读入 \"42\")\n^\n解析得到整数 42 。\n由于 \"42\" 在范围 [-231, 231 - 1] 内,最终结果为 42 。
    ", + "language": "markdown" + }, + { + "content": "\n

    示例 2:

    ", + "language": "markdown" + }, + { + "content": "\n
    输入:s = \"   -42\"\n输出:-42\n解释:\n第 1 步:\"   -42\"(读入前导空格,但忽视掉)\n^\n第 2 步:\"   -42\"(读入 '-' 字符,所以结果应该是负数)\n^\n第 3 步:\"   -42\"(读入 \"42\")\n^\n解析得到整数 -42 。\n由于 \"-42\" 在范围 [-231, 231 - 1] 内,最终结果为 -42 。\n
    ", + "language": "markdown" + }, + { + "content": "\n

    示例 3:

    ", + "language": "markdown" + }, + { + "content": "\n
    输入:s = \"4193 with words\"\n输出:4193\n解释:\n第 1 步:\"4193 with words\"(当前没有读入字符,因为没有前导空格)\n^\n第 2 步:\"4193 with words\"(当前没有读入字符,因为这里不存在 '-' 或者 '+')\n^\n第 3 步:\"4193 with words\"(读入 \"4193\";由于下一个字符不是一个数字,所以读入停止)\n^\n解析得到整数 4193 。\n由于 \"4193\" 在范围 [-231, 231 - 1] 内,最终结果为 4193 。\n
    ", + "language": "markdown" + }, + { + "content": "\n

    示例 4:

    ", + "language": "markdown" + }, + { + "content": "\n
    输入:s = \"words and 987\"\n输出:0\n解释:\n第 1 步:\"words and 987\"(当前没有读入字符,因为没有前导空格)\n^\n第 2 步:\"words and 987\"(当前没有读入字符,因为这里不存在 '-' 或者 '+')\n^\n第 3 步:\"words and 987\"(由于当前字符 'w' 不是一个数字,所以读入停止)\n^\n解析得到整数 0 ,因为没有读入任何数字。\n由于 0 在范围 [-231, 231 - 1] 内,最终结果为 0 。
    ", + "language": "markdown" + }, + { + "content": "\n

    示例 5:

    ", + "language": "markdown" + }, + { + "content": "\n
    输入:s = \"-91283472332\"\n输出:-2147483648\n解释:\n第 1 步:\"-91283472332\"(当前没有读入字符,因为没有前导空格)\n^\n第 2 步:\"-91283472332\"(读入 '-' 字符,所以结果应该是负数)\n^\n第 3 步:\"-91283472332\"(读入 \"91283472332\")\n^\n解析得到整数 -91283472332 。\n由于 -91283472332 小于范围 [-231, 231 - 1] 的下界,最终结果被截断为 -231 = -2147483648 。
    ", + "language": "markdown" + }, + { + "content": "\n

     

    ", + "language": "markdown" + }, + { + "content": "\n

    提示:

    ", + "language": "markdown" + }, + { + "content": "\n
      \n
    • 0 <= s.length <= 200
    • \n
    • s 由英文字母(大写和小写)、数字(0-9)、' ''+''-' 和\n'.' 组成\n
    • \n
    \n
    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic int myAtoi(String s) {\n\t\tlong y = 0;\n\t\tint i = 0;\n\t\tboolean w = false;\n\t\tboolean sign = false;\n\t\tint offset = 0;\n\t\tchar[] ints = new char[] { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' };\n\t\twhile (i < s.length()) {\n\t\t\tchar c = s.charAt(i);\n\t\t\tboolean isSign = false;\n\t\t\tif (w == false && c != ' ') {\n\t\t\t\tw = true;\n\t\t\t\tif (c == '-') {\n\t\t\t\t\tsign = true;\n\t\t\t\t\tisSign = true;\n\t\t\t\t}\n\t\t\t\tif (c == '+') {\n\t\t\t\t\tisSign = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (w && (!isSign)) {\n\t\t\t\tint v = Arrays.binarySearch(ints, c);\n\t\t\t\tif (v < 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\ty = y * 10 + v;\n\t\t\t\tif (y > 0x7FFFFFFF) {\n\t\t\t\t\ty = 0x7FFFFFFF;\n\t\t\t\t\toffset = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\treturn sign ? -(int) (y + offset) : (int) y;\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-cba3b9fdcdbc447981e98ac7d67b82c6", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470794" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/12.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/12.exercises/config.json" new file mode 100644 index 000000000..14afd2415 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/12.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-2b9e60620fe645f883040218b22a8d76", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/12.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/12.exercises/solution.json" new file mode 100644 index 000000000..b7377fda3 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/12.exercises/solution.json" @@ -0,0 +1,76 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "117c1490fa86467bb299835aa5d0b3e4", + "keywords": "树,二叉搜索树,数学,动态规划,二叉树", + "title": "不同的二叉搜索树", + "desc": [ + { + "content": "\n
    \n

    给你一个整数 n ,求恰由 n 个节点组成且节点值从 1n 互不相同的 二叉搜索树\n有多少种?返回满足题意的二叉搜索树的种数。

    ", + "language": "markdown" + }, + { + "content": "\n

     

    ", + "language": "markdown" + }, + { + "content": "\n

    示例 1:

    \n\n
    输入:n = 3\n输出:5\n
    ", + "language": "markdown" + }, + { + "content": "\n

    示例 2:

    ", + "language": "markdown" + }, + { + "content": "\n
    输入:n = 1\n输出:1\n
    ", + "language": "markdown" + }, + { + "content": "\n

     

    ", + "language": "markdown" + }, + { + "content": "\n

    提示:

    ", + "language": "markdown" + }, + { + "content": "\n
      \n
    • 1 <= n <= 19
    • \n
    \n
    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic int numTrees(int n) {\n\t\tif (n < 2) {\n\t\t\treturn 1;\n\t\t}\n\n\t\tint[] count = new int[n + 1];\n\t\tcount[0] = 1;\n\t\tcount[1] = 1;\n\t\tfor (int i = 2; i <= n; i++) {\n\t\t\tint sum = 0;\n\t\t\tfor (int root = 1; root <= i; root++) {\n\t\t\t\tsum = sum + count[root - 1] * count[i - root];\n\t\t\t}\n\t\t\tcount[i] = sum;\n\t\t}\n\n\t\treturn count[n];\n\t}\n}\n", + "language": "java" + }, + "node_id": "dailycode-2b9e60620fe645f883040218b22a8d76", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600469926" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/13.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/13.exercises/config.json" new file mode 100644 index 000000000..89b23af13 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/13.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-150f426952d9492f81925cff61127646", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/13.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/13.exercises/solution.json" new file mode 100644 index 000000000..6c0323d68 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/13.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "a6d92383b9494df9871ae265f38784b4", + "keywords": "数组", + "title": "插入区间", + "desc": [ + { + "content": "\n

    给你一个 无重叠的按照区间起始端点排序的区间列表。

    \n

    在列表中插入一个新的区间,你需要确保列表中的区间仍然有序且不重叠(如果有必要的话,可以合并区间)。

    \n

     

    \n

    示例 1:

    \n
    输入:intervals = [[1,3],[6,9]], newInterval = [2,5]
    输出:
    [[1,5],[6,9]]
    \n

    示例 2:

    \n
    输入:intervals = [[1,2],[3,5],[6,7],[8,10],[12,16]], newInterval = [4,8]
    输出:
    [[1,2],[3,10],[12,16]]
    解释:
    这是因为新的区间 [4,8] 与 [3,5],[6,7],[8,10] 重叠。
    \n

    示例 3:

    \n
    输入:intervals = [], newInterval = [5,7]
    输出:
    [[5,7]]
    \n

    示例 4:

    \n
    输入:intervals = [[1,5]], newInterval = [2,3]
    输出:
    [[1,5]]
    \n

    示例 5:

    \n
    输入:intervals = [[1,5]], newInterval = [2,7]
    输出:
    [[1,7]]
    \n

     

    \n

    提示:

    \n
      \n
    • 0 <= intervals.length <= 104
    • \n
    • intervals[i].length == 2
    • \n
    • 0 <= intervals[i][0] <= intervals[i][1] <= 105
    • \n
    • intervals 根据 intervals[i][0]升序 排列
    • \n
    • newInterval.length == 2
    • \n
    • 0 <= newInterval[0] <= newInterval[1] <= 105
    • \n
    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "\npublic class Interval {\n\tint start;\n\tint end;\n\n\tInterval() {\n\t\tstart = 0;\n\t\tend = 0;\n\t}\n\n\tInterval(int s, int e) {\n\t\tstart = s;\n\t\tend = e;\n\t}\n}\n\nclass Solution {\n\tpublic int[][] insert(int[][] intervals, int[] newInterval) {\n\t\tint[][] newIntervals = new int[intervals.length + 1][];\n\t\tSystem.arraycopy(intervals, 0, newIntervals, 0, intervals.length);\n\t\tnewIntervals[intervals.length] = newInterval;\n\n\t\tArrays.sort(newIntervals, (a, b) -> a[0] - b[0]);\n\t\tStack stack = new Stack<>();\n\t\tfor (int[] num : newIntervals) {\n\t\t\tif (stack.isEmpty()) {\n\t\t\t\tstack.push(num);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tint[] arr = stack.peek();\n\t\t\tif (arr[1] >= num[0]) {\n\t\t\t\tint[] combine = { arr[0], Math.max(arr[1], num[1]) };\n\t\t\t\tstack.pop();\n\t\t\t\tstack.push(combine);\n\t\t\t} else {\n\t\t\t\tstack.push(num);\n\t\t\t}\n\t\t}\n\t\treturn stack.toArray(new int[0][]);\n\t}\n}\n", + "language": "java" + }, + "node_id": "dailycode-150f426952d9492f81925cff61127646", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470920" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/14.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/14.exercises/config.json" new file mode 100644 index 000000000..19097cfa7 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/14.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-e7dd2c02e6b94b02a2cba6cb32b0c0dc", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/14.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/14.exercises/solution.json" new file mode 100644 index 000000000..c7a52e128 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/14.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "b83f11e3c3994e3c9d5d2668998c6d47", + "keywords": "数组,双指针,排序", + "title": "四数之和", + "desc": [ + { + "content": "\n

    给定一个包含 n 个整数的数组 nums 和一个目标值 target,判断 nums 中是否存在四个元素 a,b,c 和 d ,使得 a + b + c + d 的值与 target 相等?找出所有满足条件且不重复的四元组。

    注意:答案中不可以包含重复的四元组。

     

    示例 1:

    输入:nums = [1,0,-1,0,-2,2], target = 0
    输出:
    [[-2,-1,1,2],[-2,0,0,2],[-1,0,0,1]]

    示例 2:

    输入:nums = [], target = 0
    输出:
    []

     

    提示:

      \t
    • 0 <= nums.length <= 200
    • \t
    • -109 <= nums[i] <= 109
    • \t
    • -109 <= target <= 109
    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic List> fourSum(int[] nums, int target) {\n\t\tlong l_target = target;\n\t\tArrays.sort(nums);\n\t\tList> results = new ArrayList<>();\n\t\tint N = nums.length;\n\t\tfor (int i = 0; i < N - 3; i++) {\n\t\t\tif (i > 0 && nums[i] == nums[i - 1])\n\t\t\t\tcontinue;\n\t\t\tfor (int j = i + 1; j < N - 2; j++) {\n\t\t\t\tif (j > i + 1 && nums[j] == nums[j - 1])\n\t\t\t\t\tcontinue;\n\t\t\t\tfor (int k = j + 1, l = N - 1; k < l; k++) {\n\t\t\t\t\tif (k > j + 1 && nums[k] == nums[k - 1])\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\twhile (k < l && (l_target - nums[i] - nums[j] - nums[k] - nums[l]) < 0) {\n\t\t\t\t\t\tl--;\n\t\t\t\t\t}\n\t\t\t\t\tif (k >= l) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((target - nums[i] - nums[j] - nums[k] - nums[l]) == 0) {\n\t\t\t\t\t\tList item = new ArrayList<>();\n\t\t\t\t\t\titem.add(nums[i]);\n\t\t\t\t\t\titem.add(nums[j]);\n\t\t\t\t\t\titem.add(nums[k]);\n\t\t\t\t\t\titem.add(nums[l]);\n\t\t\t\t\t\tresults.add(item);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-e7dd2c02e6b94b02a2cba6cb32b0c0dc", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600469919" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/15.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/15.exercises/config.json" new file mode 100644 index 000000000..d27a933f7 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/15.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-a176e82f286443f5a97e226011b84a70", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/15.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/15.exercises/solution.json" new file mode 100644 index 000000000..299d113c8 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/15.exercises/solution.json" @@ -0,0 +1,108 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "ea5545b1b16a43f48a2a587e7ffc89ad", + "keywords": "字符串", + "title": "外观数列", + "desc": [ + { + "content": "\n
    \n

    给定一个正整数 n ,输出外观数列的第 n 项。

    ", + "language": "markdown" + }, + { + "content": "\n

    「外观数列」是一个整数序列,从数字 1 开始,序列中的每一项都是对前一项的描述。

    ", + "language": "markdown" + }, + { + "content": "\n

    你可以将其视作是由递归公式定义的数字字符串序列:

    ", + "language": "markdown" + }, + { + "content": "\n
      \n
    • countAndSay(1) = \"1\"
    • \n
    • countAndSay(n) 是对 countAndSay(n-1) 的描述,然后转换成另一个数字字符串。
    • \n
    ", + "language": "markdown" + }, + { + "content": "\n

    前五项如下:

    ", + "language": "markdown" + }, + { + "content": "\n
    \n1.     1\n2.     11\n3.     21\n4.     1211\n5.     111221\n第一项是数字 1 \n描述前一项,这个数是 1 即 “ 一 个 1 ”,记作 \"11\"\n描述前一项,这个数是 11 即 “ 二 个 1 ” ,记作 \"21\"\n描述前一项,这个数是 21 即 “ 一 个 2 + 一 个 1 ” ,记作 \"1211\"\n描述前一项,这个数是 1211 即 “ 一 个 1 + 一 个 2 + 二 个 1 ” ,记作 \"111221\"\n
    ", + "language": "markdown" + }, + { + "content": "\n

    描述 一个数字字符串,首先要将字符串分割为 最小 数量的组,每个组都由连续的最多 相同字符\n组成。然后对于每个组,先描述字符的数量,然后描述字符,形成一个描述组。要将描述转换为数字字符串,先将每组中的字符数量用数字替换,再将所有描述组连接起来。

    ", + "language": "markdown" + }, + { + "content": "\n

    例如,数字字符串 \"3322251\" 的描述如下图:

    \n\"\"\nsrc=\"https://cdn.jsdelivr.net/gh/doocs/leetcode@main/solution/0000-0099/0038.Count%20and%20Say/images/countandsay.jpg\"\nstyle=\"width:\n
      \n
    ", + "language": "markdown" + }, + { + "content": "\n

     

    ", + "language": "markdown" + }, + { + "content": "\n

    示例 1:

    ", + "language": "markdown" + }, + { + "content": "\n
    输入:n = 1\n输出:\"1\"\n解释:这是一个基本样例。\n
    ", + "language": "markdown" + }, + { + "content": "\n

    示例 2:

    ", + "language": "markdown" + }, + { + "content": "\n
    输入:n = 4\n输出:\"1211\"\n解释:\ncountAndSay(1) = \"1\"\ncountAndSay(2) = 读 \"1\" = 一 个 1 = \"11\"\ncountAndSay(3) = 读 \"11\" = 二 个 1 = \"21\"\ncountAndSay(4) = 读 \"21\" = 一 个 2 + 一 个 1 = \"12\" + \"11\" = \"1211\"\n
    ", + "language": "markdown" + }, + { + "content": "\n

     

    ", + "language": "markdown" + }, + { + "content": "\n

    提示:

    ", + "language": "markdown" + }, + { + "content": "\n
      \n
    • 1 <= n <= 30
    • \n
    \n
    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic String countAndSay(int n) {\n\t\tString pre = \"1\";\n\t\tfor (int i = 1; i < n; i++) {\n\t\t\tStringBuilder temp = new StringBuilder();\n\t\t\tchar c = pre.charAt(0);\n\t\t\tint cnt = 1;\n\t\t\tfor (int j = 1; j < pre.length(); j++) {\n\t\t\t\tchar cc = pre.charAt(j);\n\t\t\t\tif (c == cc) {\n\t\t\t\t\tcnt++;\n\t\t\t\t} else {\n\t\t\t\t\ttemp.append(cnt).append(c);\n\t\t\t\t\tcnt = 1;\n\t\t\t\t\tc = cc;\n\t\t\t\t}\n\t\t\t}\n\t\t\ttemp.append(cnt).append(c);\n\t\t\tpre = temp.toString();\n\t\t}\n\t\treturn pre;\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-a176e82f286443f5a97e226011b84a70", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470795" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/16.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/16.exercises/config.json" new file mode 100644 index 000000000..ba1e0fa53 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/16.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-c49e020840b741d485bc11bf0855b4e8", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/16.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/16.exercises/solution.json" new file mode 100644 index 000000000..cafa61dc7 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/16.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "bc75e6257bb7439881a9db2871ac4a95", + "keywords": "链表,双指针", + "title": "旋转链表", + "desc": [ + { + "content": "\n

    给你一个链表的头节点 head ,旋转链表,将链表每个节点向右移动 k 个位置。

     

    示例 1:

    \"\"
    输入:head = [1,2,3,4,5], k = 2
    输出:
    [4,5,1,2,3]

    示例 2:

    \"\"
    输入:head = [0,1,2], k = 4
    输出:
    [2,0,1]

     

    提示:

      \t
    • 链表中节点的数目在范围 [0, 500]
    • \t
    • -100 <= Node.val <= 100
    • \t
    • 0 <= k <= 2 * 109
    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "public class ListNode {\n\tint val;\n\tListNode next;\n\tListNode(int x) {\n\t\tval = x;\n\t}\n}\nclass Solution {\n\tpublic ListNode rotateRight(ListNode head, int k) {\n\t\tif (head == null || k == 0) {\n\t\t\treturn head;\n\t\t}\n\t\tListNode cursor = head;\n\t\tListNode tail = null;\n\t\tint length = 1;\n\t\twhile (cursor.next != null) {\n\t\t\tcursor = cursor.next;\n\t\t\tlength++;\n\t\t}\n\t\tint loop = length - (k % length);\n\t\ttail = cursor;\n\t\tcursor.next = head;\n\t\tcursor = head;\n\t\tfor (int i = 0; i < loop; i++) {\n\t\t\tcursor = cursor.next;\n\t\t\ttail = tail.next;\n\t\t}\n\t\ttail.next = null;\n\t\treturn cursor;\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-c49e020840b741d485bc11bf0855b4e8", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600469922" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/17.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/17.exercises/config.json" new file mode 100644 index 000000000..fa27c7bd9 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/17.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-5d5d68a0fee64164be313bddd528142f", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/17.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/17.exercises/solution.json" new file mode 100644 index 000000000..5638094eb --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/17.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "0ae6182c437147868b6d3b219fa6dd63", + "keywords": "数组,回溯", + "title": "组合", + "desc": [ + { + "content": "\n

    给定两个整数 nk,返回 1 ... n 中所有可能的 k 个数的组合。

    \n

    示例:

    \n
    输入: n = 4, k = 2
    输出:
    [[2,4],[3,4],[2,3],[1,2],[1,3],[1,4],]
    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "\nimport java.util.*;\n\npublic class Solution77 {\n\tList> output = new LinkedList<>();\n\tint n;\n\tint k;\n\n\tpublic void traceback(int first, LinkedList current) {\n\t\tif (current.size() == k) {\n\n\t\t\toutput.add(new LinkedList(current));\n\t\t\tSystem.out.println(output);\n\t\t\treturn;\n\t\t}\n\n\t\tfor (int i = first; i <= n; i++) {\n\n\t\t\tcurrent.add(i);\n\t\t\ttraceback(i + 1, current);\n\n\t\t\tcurrent.removeLast();\n\t\t}\n\t}\n\n\tpublic List> combine(int n, int k) {\n\t\tthis.n = n;\n\t\tthis.k = k;\n\t\ttraceback(1, new LinkedList<>());\n\t\treturn output;\n\t}\n}\n", + "language": "java" + }, + "node_id": "dailycode-5d5d68a0fee64164be313bddd528142f", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470921" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/18.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/18.exercises/config.json" new file mode 100644 index 000000000..77b62ace3 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/18.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-2b4e10e9e01a4775a03f2a7bd8cac54c", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/18.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/18.exercises/solution.json" new file mode 100644 index 000000000..f73637895 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/18.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "5de6d3a947ce4b77b1cc47813751d999", + "keywords": "字符串,动态规划,回溯", + "title": "括号生成", + "desc": [ + { + "content": "\n

    数字 n 代表生成括号的对数,请你设计一个函数,用于能够生成所有可能的并且 有效的 括号组合。

     

    示例 1:

    输入:n = 3
    输出:
    [\"((()))\",\"(()())\",\"(())()\",\"()(())\",\"()()()\"]

    示例 2:

    输入:n = 1
    输出:
    [\"()\"]

     

    提示:

      \t
    • 1 <= n <= 8
    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tvoid gen(Stack p, int lc, int rc, List r, int n) {\n\t\tif (lc > n) {\n\t\t\treturn;\n\t\t}\n\t\tif (lc == n && rc == n) {\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tfor (String l : p) {\n\t\t\t\tsb.append(l);\n\t\t\t}\n\t\t\tr.add(sb.toString());\n\t\t}\n\t\tp.push(\"(\");\n\t\tlc++;\n\t\tgen(p, lc, rc, r, n);\n\t\tp.pop();\n\t\tlc--;\n\t\tif (lc > rc) {\n\t\t\tp.push(\")\");\n\t\t\trc++;\n\t\t\tgen(p, lc, rc, r, n);\n\t\t\tp.pop();\n\t\t\trc--;\n\t\t}\n\t}\n\tpublic List generateParenthesis(int n) {\n\t\tList results = new ArrayList();\n\t\tStack p = new Stack();\n\t\tgen(p, 0, 0, results, n);\n\t\treturn results;\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-2b4e10e9e01a4775a03f2a7bd8cac54c", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470115" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/19.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/19.exercises/config.json" new file mode 100644 index 000000000..3210e3eb0 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/19.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-0fc1b6a999914e309d0a0e484e5e0c85", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/19.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/19.exercises/solution.json" new file mode 100644 index 000000000..d91b3c63f --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/19.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "9dcdf90f0efc43c49b06654f23a87092", + "keywords": "数组,数学,矩阵", + "title": "旋转图像", + "desc": [ + { + "content": "\n

    给定一个 × n 的二维矩阵 matrix 表示一个图像。请你将图像顺时针旋转 90 度。

    你必须在 原地 旋转图像,这意味着你需要直接修改输入的二维矩阵。请不要 使用另一个矩阵来旋转图像。

     

    示例 1:

    \"\"
    输入:matrix = [[1,2,3],[4,5,6],[7,8,9]]
    输出:
    [[7,4,1],[8,5,2],[9,6,3]]

    示例 2:

    \"\"
    输入:matrix = [[5,1,9,11],[2,4,8,10],[13,3,6,7],[15,14,12,16]]
    输出:
    [[15,13,2,5],[14,3,4,1],[12,6,8,9],[16,7,10,11]]

    示例 3:

    输入:matrix = [[1]]
    输出:
    [[1]]

    示例 4:

    输入:matrix = [[1,2],[3,4]]
    输出:
    [[3,1],[4,2]]

     

    提示:

      \t
    • matrix.length == n
    • \t
    • matrix[i].length == n
    • \t
    • 1 <= n <= 20
    • \t
    • -1000 <= matrix[i][j] <= 1000
    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\n\tpublic void rotate(int[][] matrix) {\n\t\tint len = matrix.length;\n\t\tint le = len - 1;\n\t\tfor (int i = 0; i < len / 2; i++) {\n\t\t\tfor (int j = 0; j < (len + 1) / 2; j++) {\n\t\t\t\tint temp = matrix[i][j];\n\t\t\t\tmatrix[i][j] = matrix[le - j][i];\n\t\t\t\tmatrix[le - j][i] = matrix[le - i][le - j];\n\t\t\t\tmatrix[le - i][le - j] = matrix[j][le - i];\n\t\t\t\tmatrix[j][le - i] = temp;\n\t\t\t}\n\t\t}\n\t}\n}\n", + "language": "java" + }, + "node_id": "dailycode-0fc1b6a999914e309d0a0e484e5e0c85", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470225" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/2.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/2.exercises/config.json" new file mode 100644 index 000000000..aea42c25e --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/2.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-2c34fdc356ec41e1ae1c01be149ec729", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/2.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/2.exercises/solution.json" new file mode 100644 index 000000000..a13255d59 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/2.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "bd4f39d2c4c94041a17bd273dbdfde6f", + "keywords": "算法初阶,排序和顺序统计量,中位数和顺序统计量,最坏情况为线性时间的选择算法", + "title": "外出采摘的日本人", + "desc": [ + { + "content": "\n二战后的某一天,N个日本人来到了一个山洞休息,为了派出一个日本人去外面充满危险的丛林中采摘食物,他们设置如下游戏产生外出采摘的人: \n1、首先,所有参加游戏的日本人按顺序编号为1、2、3…N; \n2、接下来每个日本人心里产生一个数字,这个数字称为序号为 N的人的密码P; \n3、所有参加游戏的人按照编号站成一个圈,长老为游戏设置初始密码K,从编号为 1的人开始报数,报到 K的人退出队伍,然后将自己心中的密码P说出来,由下一个人继续从 1开始报数,报到P的人退出队伍,以此类推; \n4、当队伍中剩下一个人的时候,这个人就是今天要出去采摘的日本人,他可能回不来了! \n请各位同学设计程序并使用Java语言实现改程序,在用户输入了人数N、每个人的密码P和初始密码K的情况下,自动完成上面的选择过程,输出先后离开队伍的人的序号序列,最后输出要去采摘的日本人,输出他的编号。", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "import java.util.ArrayList;\nimport java.util.List;\nimport java.util.Scanner;\npublic class JosephCircle {\n\tpublic int newJoseph(int n, int[] p, int k) {\n\t\tList num = new ArrayList();\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tnum.add(i);\n\t\tint t = k, index = 0;\n\t\tfor (int i = 0; i < n - 1; i++) {\n\t\t\tindex = (index + t) % num.size();\n\t\t\tnum.remove(index);\n\t\t\tt = p[index];\n\t\t\tif (index == num.size())\n\t\t\t\tindex = 0;\n\t\t}\n\t\treturn num.get(0) + 1;\n\t}\n\tpublic int oldJoseph(int n, int k) {\n\t\tint w = 0;\n\t\tfor (int i = 2; i <= n; i++) {\n\t\t\tw = (w + k) % i;\n\t\t}\n\t\treturn w;\n\t}\n\tpublic static void main(String[] args) {\n\t\tJosephCircle jc = new JosephCircle();\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n, k;\n\t\tint[] p = new int[100];\n\t\tSystem.out.print(\"Enter N = \");\n\t\tn = scan.nextInt();\n\t\tSystem.out.print(\"Enter P[] = \");\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tp[i] = scan.nextInt();\n\t\t}\n\t\tSystem.out.print(\"Enter K = \");\n\t\tk = scan.nextInt();\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Survivor is No.\" + jc.newJoseph(n, p, k));\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-2c34fdc356ec41e1ae1c01be149ec729", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600469977" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/20.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/20.exercises/config.json" new file mode 100644 index 000000000..93508370c --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/20.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-b087bfd39b6949ab8e67326033d74792", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/20.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/20.exercises/solution.json" new file mode 100644 index 000000000..132d4321a --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/20.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "e53e28eea076409c9f0bf72a7cf601f2", + "keywords": "贪心,数组,双指针", + "title": "盛最多水的容器", + "desc": [ + { + "content": "\n

    给你 n 个非负整数 a1,a2,...,an每个数代表坐标中的一个点 (i, ai) 。在坐标内画 n 条垂直线,垂直线 i 的两个端点分别为 (i, ai)(i, 0) 。找出其中的两条线,使得它们与 x 轴共同构成的容器可以容纳最多的水。

    说明:你不能倾斜容器。

     

    示例 1:

    \"\"

    输入:[1,8,6,2,5,4,8,3,7]
    输出:
    49
    解释:
    图中垂直线代表输入数组 [1,8,6,2,5,4,8,3,7]。在此情况下,容器能够容纳水(表示为蓝色部分)的最大值为 49。

    示例 2:

    输入:height = [1,1]
    输出:
    1

    示例 3:

    输入:height = [4,3,2,1,4]
    输出:
    16

    示例 4:

    输入:height = [1,2,1]
    输出:
    2

     

    提示:

      \t
    • n = height.length
    • \t
    • 2 <= n <= 3 * 104
    • \t
    • 0 <= height[i] <= 3 * 104
    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic int maxArea(int[] height) {\n\t\tint N = height.length;\n\t\tint i = 0;\n\t\tint j = N - 1;\n\t\tint max = 0;\n\t\twhile (i < j) {\n\t\t\tint c = (j - i) * Math.min(height[i], height[j]);\n\t\t\tif (c > max) {\n\t\t\t\tmax = c;\n\t\t\t}\n\t\t\tif (height[i] > height[j]) {\n\t\t\t\tj--;\n\t\t\t} else {\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\treturn max;\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-b087bfd39b6949ab8e67326033d74792", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600469816" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/21.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/21.exercises/config.json" new file mode 100644 index 000000000..9c11aaafd --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/21.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-512d40c59a874474a237294910486e0a", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/21.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/21.exercises/solution.json" new file mode 100644 index 000000000..e3e5a0b6b --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/21.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "430f8bebba4f4c008f88ca876bb703b3", + "keywords": "字符串,回溯", + "title": "复原 IP 地址", + "desc": [ + { + "content": "\n

    给定一个只包含数字的字符串,用以表示一个 IP 地址,返回所有可能从 s 获得的 有效 IP 地址 。你可以按任何顺序返回答案。

    有效 IP 地址 正好由四个整数(每个整数位于 0 到 255 之间组成,且不能含有前导 0),整数之间用 '.' 分隔。

    例如:\"0.1.2.201\" 和 \"192.168.1.1\" 是 有效 IP 地址,但是 \"0.011.255.245\"、\"192.168.1.312\" 和 \"192.168@1.1\" 是 无效 IP 地址。

     

    示例 1:

    输入:s = \"25525511135\"
    输出:
    [\"255.255.11.135\",\"255.255.111.35\"]

    示例 2:

    输入:s = \"0000\"
    输出:
    [\"0.0.0.0\"]

    示例 3:

    输入:s = \"1111\"
    输出:
    [\"1.1.1.1\"]

    示例 4:

    输入:s = \"010010\"
    输出:
    [\"0.10.0.10\",\"0.100.1.0\"]

    示例 5:

    输入:s = \"101023\"
    输出:
    [\"1.0.10.23\",\"1.0.102.3\",\"10.1.0.23\",\"10.10.2.3\",\"101.0.2.3\"]

     

    提示:

      \t
    • 0 <= s.length <= 3000
    • \t
    • s 仅由数字组成
    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tprivate List res = new ArrayList<>();\n\n\tpublic List restoreIpAddresses(String s) {\n\t\tif (s.length() < 4)\n\t\t\treturn res;\n\t\tbacktrack(s, 0, new StringBuilder(), 0);\n\t\treturn res;\n\t}\n\n\tprivate void backtrack(String s, int start, StringBuilder sb, int pointNumOfSb) {\n\t\tif (pointNumOfSb > 4)\n\t\t\treturn;\n\t\tif (start == s.length() && pointNumOfSb == 4) {\n\t\t\tres.add(sb.toString().substring(1));\n\t\t\treturn;\n\t\t}\n\t\tfor (int i = start; i < s.length() && i - start < 3; i++) {\n\t\t\tString x = s.substring(start, i + 1);\n\t\t\tif (x.charAt(0) == '0' && x.length() > 1)\n\t\t\t\treturn;\n\t\t\tif (Integer.parseInt(x) <= 255) {\n\t\t\t\tsb.append(\".\" + x);\n\t\t\t\tbacktrack(s, i + 1, sb, pointNumOfSb + 1);\n\t\t\t\tsb.delete(sb.lastIndexOf(\".\"), sb.length());\n\t\t\t}\n\t\t}\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-512d40c59a874474a237294910486e0a", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470923" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/22.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/22.exercises/config.json" new file mode 100644 index 000000000..e17e3c995 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/22.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-7fa5cb6f690545fc865aece3cd1a74a9", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/22.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/22.exercises/solution.json" new file mode 100644 index 000000000..a80a8dc91 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/22.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "3592b4ef75784657938f540c1b5fadc9", + "keywords": "位运算,数学,回溯", + "title": "格雷编码", + "desc": [ + { + "content": "\n

    格雷编码是一个二进制数字系统,在该系统中,两个连续的数值仅有一个位数的差异。

    \n

    给定一个代表编码总位数的非负整数 n,打印其格雷编码序列。即使有多个不同答案,你也只需要返回其中一种。

    \n

    格雷编码序列必须以 0 开头。

    \n

     

    \n

    示例 1:

    \n
    输入: 2
    输出:
     [0,1,3,2]
    解释:
    00 - 001 - 111 - 310 - 2对于给定的 n,其格雷编码序列并不唯一。例如,[0,2,3,1] 也是一个有效的格雷编码序列。00 - 010 - 211 - 301 - 1
    \n

    示例 2:

    \n
    输入: 0
    输出:
     [0]
    解释:
    我们定义格雷编码序列必须以 0 开头。给定编码总位数为 n 的格雷编码序列,其长度为 2n。当 n = 0 时,长度为 20 = 1。因此,当 n = 0 时,其格雷编码序列为 [0]。
    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic List grayCode(int n) {\n\t\tList res = new ArrayList<>();\n\t\tres.add(0);\n\t\tint cur;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint change = 1 << i;\n\t\t\tcur = res.size() - 1;\n\t\t\twhile (cur >= 0) {\n\t\t\t\tres.add(res.get(cur) ^ change);\n\t\t\t\tcur--;\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-7fa5cb6f690545fc865aece3cd1a74a9", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470797" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/23.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/23.exercises/config.json" new file mode 100644 index 000000000..29eee8945 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/23.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-06979d4bde9b4d048a028977d9bee368", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/23.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/23.exercises/solution.json" new file mode 100644 index 000000000..8ab458823 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/23.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "1ad31701c625447eb34e16636233d8c5", + "keywords": "数组,双指针", + "title": "下一个排列", + "desc": [ + { + "content": "\n

    实现获取 下一个排列 的函数,算法需要将给定数字序列重新排列成字典序中下一个更大的排列。

    如果不存在下一个更大的排列,则将数字重新排列成最小的排列(即升序排列)。

    必须 原地 修改,只允许使用额外常数空间。

     

    示例 1:

    输入:nums = [1,2,3]
    输出:
    [1,3,2]

    示例 2:

    输入:nums = [3,2,1]
    输出:
    [1,2,3]

    示例 3:

    输入:nums = [1,1,5]
    输出:
    [1,5,1]

    示例 4:

    输入:nums = [1]
    输出:
    [1]

     

    提示:

      \t
    • 1 <= nums.length <= 100
    • \t
    • 0 <= nums[i] <= 100
    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic void nextPermutation(int[] nums) {\n\t\tint i = nums.length - 1;\n\t\twhile (i > 0 && nums[i] <= nums[i - 1]) {\n\t\t\ti--;\n\t\t}\n\t\tif (i > 0) {\n\t\t\tint j = nums.length - 1;\n\t\t\twhile (j >= 0 && nums[j] <= nums[i - 1]) {\n\t\t\t\tj--;\n\t\t\t}\n\t\t\tswap(nums, i - 1, j);\n\t\t}\n\t\treverse(nums, i);\n\t}\n\tprivate void reverse(int[] nums, int i) {\n\t\tint j = nums.length - 1;\n\t\twhile (i < j) {\n\t\t\tswap(nums, i, j);\n\t\t\ti++;\n\t\t\tj--;\n\t\t}\n\t}\n\tprivate void swap(int[] nums, int i, int j) {\n\t\tint temp = nums[i];\n\t\tnums[i] = nums[j];\n\t\tnums[j] = temp;\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-06979d4bde9b4d048a028977d9bee368", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600471007" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/24.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/24.exercises/config.json" new file mode 100644 index 000000000..53dab4727 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/24.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-6defda4fbc254df7a3a4f2f78233091a", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/24.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/24.exercises/solution.json" new file mode 100644 index 000000000..93045cdc0 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/24.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "d88d2666c123412ebb2ee25570fd1c99", + "keywords": "位运算,数组,回溯", + "title": "子集 II", + "desc": [ + { + "content": "\n

    给你一个整数数组 nums ,其中可能包含重复元素,请你返回该数组所有可能的子集(幂集)。

    解集 不能 包含重复的子集。返回的解集中,子集可以按 任意顺序 排列。

     

    示例 1:

    输入:nums = [1,2,2]
    输出:
    [[],[1],[1,2],[1,2,2],[2],[2,2]]

    示例 2:

    输入:nums = [0]
    输出:
    [[],[0]]

     

    提示:

      \t
    • 1 <= nums.length <= 10
    • \t
    • -10 <= nums[i] <= 10
    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic List> subsetsWithDup(int[] nums) {\n\t\tList> retList = new ArrayList<>();\n\t\tretList.add(new ArrayList<>());\n\t\tif (nums == null || nums.length == 0)\n\t\t\treturn retList;\n\t\tArrays.sort(nums);\n\t\tList tmp = new ArrayList<>();\n\t\ttmp.add(nums[0]);\n\t\tretList.add(tmp);\n\t\tif (nums.length == 1)\n\t\t\treturn retList;\n\t\tint lastLen = 1;\n\t\tfor (int i = 1; i < nums.length; i++) {\n\t\t\tint size = retList.size();\n\t\t\tif (nums[i] != nums[i - 1]) {\n\t\t\t\tlastLen = size;\n\t\t\t}\n\t\t\tfor (int j = size - lastLen; j < size; j++) {\n\t\t\t\tList inner = new ArrayList(retList.get(j));\n\t\t\t\tinner.add(nums[i]);\n\t\t\t\tretList.add(inner);\n\t\t\t}\n\t\t}\n\t\treturn retList;\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-6defda4fbc254df7a3a4f2f78233091a", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600469825" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/25.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/25.exercises/config.json" new file mode 100644 index 000000000..3e86d38fe --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/25.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-f7794a1f875c4fbdb5c90aa69bbb1d1c", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/25.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/25.exercises/solution.json" new file mode 100644 index 000000000..5cfa354ff --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/25.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "8232cb862b314d8690c5c5c7f315f1a7", + "keywords": "栈,字符串", + "title": "简化路径", + "desc": [ + { + "content": "\n

    给你一个字符串 path ,表示指向某一文件或目录的 Unix 风格 绝对路径 (以 '/' 开头),请你将其转化为更加简洁的规范路径。

    在 Unix 风格的文件系统中,一个点(.)表示当前目录本身;此外,两个点 (..) 表示将目录切换到上一级(指向父目录);两者都可以是复杂相对路径的组成部分。任意多个连续的斜杠(即,'//')都被视为单个斜杠 '/' 。 对于此问题,任何其他格式的点(例如,'...')均被视为文件/目录名称。

    请注意,返回的 规范路径 必须遵循下述格式:

      \t
    • 始终以斜杠 '/' 开头。
    • \t
    • 两个目录名之间必须只有一个斜杠 '/'
    • \t
    • 最后一个目录名(如果存在)不能 '/' 结尾。
    • \t
    • 此外,路径仅包含从根目录到目标文件或目录的路径上的目录(即,不含 '.''..')。

    返回简化后得到的 规范路径

     

    示例 1:

    输入:path = \"/home/\"
    输出:
    \"/home\"
    解释:
    注意,最后一个目录名后面没有斜杠。

    示例 2:

    输入:path = \"/../\"
    输出:
    \"/\"
    解释:
    从根目录向上一级是不可行的,因为根目录是你可以到达的最高级。

    示例 3:

    输入:path = \"/home//foo/\"
    输出:
    \"/home/foo\"
    解释:
    在规范路径中,多个连续斜杠需要用一个斜杠替换。

    示例 4:

    输入:path = \"/a/./b/../../c/\"
    输出:
    \"/c\"

     

    提示:

      \t
    • 1 <= path.length <= 3000
    • \t
    • path 由英文字母,数字,'.''/''_' 组成。
    • \t
    • path 是一个有效的 Unix 风格绝对路径。
    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic String simplifyPath(String path) {\n\n\t\tDeque stack = new ArrayDeque<>();\n\n\t\tfor (String str : path.split(\"/\")) {\n\n\t\t\tif (\"\".equals(str) || \".\".equals(str))\n\t\t\t\tcontinue;\n\t\t\tstack.push(str);\n\t\t}\n\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint count = 0;\n\t\twhile (!stack.isEmpty()) {\n\t\t\tString str = stack.pop();\n\n\t\t\tif (\"..\".equals(str))\n\t\t\t\tcount++;\n\t\t\telse {\n\n\t\t\t\tif (count > 0) {\n\t\t\t\t\tcount--;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tsb.insert(0, str);\n\t\t\t\tsb.insert(0, \"/\");\n\t\t\t}\n\t\t}\n\n\t\tif (sb.length() == 0)\n\t\t\tsb.append(\"/\");\n\n\t\treturn sb.toString();\n\t}\n}\n", + "language": "java" + }, + "node_id": "dailycode-f7794a1f875c4fbdb5c90aa69bbb1d1c", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470830" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/26.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/26.exercises/config.json" new file mode 100644 index 000000000..3145ff1c9 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/26.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-8df6b07a74a3448ab4d1ed17cd59ece4", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/26.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/26.exercises/solution.json" new file mode 100644 index 000000000..c9311bafd --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/26.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "5f1220332ae647a8baa4dac2d224246d", + "keywords": "递归,链表,数学", + "title": "两数相加", + "desc": [ + { + "content": "\n

    给你两个 非空 的链表,表示两个非负的整数。它们每位数字都是按照 逆序 的方式存储的,并且每个节点只能存储 一位 数字。

    请你将两个数相加,并以相同形式返回一个表示和的链表。

    你可以假设除了数字 0 之外,这两个数都不会以 0 开头。

     

    示例 1:

    \"\"
    输入:l1 = [2,4,3], l2 = [5,6,4]
    输出:
    [7,0,8]
    解释:
    342 + 465 = 807.

    示例 2:

    输入:l1 = [0], l2 = [0]
    输出:
    [0]

    示例 3:

    输入:l1 = [9,9,9,9,9,9,9], l2 = [9,9,9,9]
    输出:
    [8,9,9,9,0,0,0,1]

     

    提示:

      \t
    • 每个链表中的节点数在范围 [1, 100]
    • \t
    • 0 <= Node.val <= 9
    • \t
    • 题目数据保证列表表示的数字不含前导零
    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class ListNode {\n\tint val;\n\tListNode next;\n\tListNode() {\n\t}\n\tListNode(int val) {\n\t\tthis.val = val;\n\t}\n\tListNode(int val, ListNode next) {\n\t\tthis.val = val;\n\t\tthis.next = next;\n\t}\n}\nclass Solution {\n\tpublic ListNode addTwoNumbers(ListNode l1, ListNode l2) {\n\t\tListNode lrr = l1;\n\t\twhile (true) {\n\t\t\tl1.val = l1.val + l2.val;\n\t\t\tif (l1.next == null && l2.next == null && l1.val < 10) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (l1.next == null) {\n\t\t\t\tl1.next = new ListNode(0);\n\t\t\t}\n\t\t\tif (l2.next == null) {\n\t\t\t\tl2.next = new ListNode(0);\n\t\t\t}\n\t\t\tif (l1.val >= 10) {\n\t\t\t\tl1.val = l1.val - 10;\n\t\t\t\tl1.next.val += 1;\n\t\t\t}\n\t\t\tl1 = l1.next;\n\t\t\tl2 = l2.next;\n\t\t}\n\t\treturn lrr;\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-8df6b07a74a3448ab4d1ed17cd59ece4", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600469916" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/27.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/27.exercises/config.json" new file mode 100644 index 000000000..78e34951f --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/27.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-63f1dfb5737e4d0eb3afba4a75fecd8e", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/27.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/27.exercises/solution.json" new file mode 100644 index 000000000..34c3a1a6d --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/27.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "fcc35be3fee74a98956c3c13721ce600", + "keywords": "链表,双指针", + "title": "分隔链表", + "desc": [ + { + "content": "\n

    给你一个链表的头节点 head 和一个特定值 x ,请你对链表进行分隔,使得所有 小于 x 的节点都出现在 大于或等于 x 的节点之前。

    你应当 保留 两个分区中每个节点的初始相对位置。

     

    示例 1:

    \"\"
    输入:head = [1,4,3,2,5,2], x = 3
    输出
    :[1,2,2,4,3,5]

    示例 2:

    输入:head = [2,1], x = 2
    输出
    :[1,2]

     

    提示:

      \t
    • 链表中节点的数目在范围 [0, 200]
    • \t
    • -100 <= Node.val <= 100
    • \t
    • -200 <= x <= 200
    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "public class ListNode {\n\tint val;\n\tListNode next;\n\tListNode(int x) {\n\t\tval = x;\n\t}\n}\nclass Solution {\n\tpublic ListNode partition(ListNode head, int x) {\n\t\tListNode dummyHead1 = new ListNode(0);\n\t\tListNode dummyHead2 = new ListNode(0);\n\t\tListNode node1 = dummyHead1;\n\t\tListNode node2 = dummyHead2;\n\t\twhile (head != null) {\n\t\t\tif (head.val < x) {\n\t\t\t\tnode1.next = head;\n\t\t\t\thead = head.next;\n\t\t\t\tnode1 = node1.next;\n\t\t\t\tnode1.next = null;\n\t\t\t} else {\n\t\t\t\tnode2.next = head;\n\t\t\t\thead = head.next;\n\t\t\t\tnode2 = node2.next;\n\t\t\t\tnode2.next = null;\n\t\t\t}\n\t\t}\n\t\tnode1.next = dummyHead2.next;\n\t\treturn dummyHead1.next;\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-63f1dfb5737e4d0eb3afba4a75fecd8e", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470229" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/28.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/28.exercises/config.json" new file mode 100644 index 000000000..c6afd4505 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/28.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-290dbf6b65274179954a9f182f7a2f98", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/28.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/28.exercises/solution.json" new file mode 100644 index 000000000..d08cba8cf --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/28.exercises/solution.json" @@ -0,0 +1,124 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "03052a5d4420480f8193ce6f608fc9ff", + "keywords": "哈希表,数学,字符串", + "title": "整数转罗马数字", + "desc": [ + { + "content": "\n
    \n

    罗马数字包含以下七种字符: I, V, X, LCD 和 M。\n

    ", + "language": "markdown" + }, + { + "content": "\n
    字符          数值\nI             1\nV             5\nX             10\nL             50\nC             100\nD             500\nM             1000
    ", + "language": "markdown" + }, + { + "content": "\n

    例如, 罗马数字 2 写做 II ,即为两个并列的 1。12\n写做 XII ,即为 X + II 。 27\n写做  XXVII,\n即为 XX + V + II 。

    ", + "language": "markdown" + }, + { + "content": "\n

    通常情况下,罗马数字中小的数字在大的数字的右边。但也存在特例,例如 4 不写做 IIII,而是 IV。数字 1 在数字 5 的左边,所表示的数等于大数 5\n减小数 1 得到的数值 4 。同样地,数字 9 表示为 IX。这个特殊的规则只适用于以下六种情况:

    ", + "language": "markdown" + }, + { + "content": "\n
      \n
    • I 可以放在 V (5) 和 X (10) 的左边,来表示 4 和 9。
    • \n
    • X 可以放在 L (50) 和 C (100) 的左边,来表示 40\n和 90。 
    • \n
    • C 可以放在 D (500) 和 M (1000) 的左边,来表示 400\n和 900。
    • \n
    ", + "language": "markdown" + }, + { + "content": "\n

    给你一个整数,将其转为罗马数字。

    ", + "language": "markdown" + }, + { + "content": "\n

     

    ", + "language": "markdown" + }, + { + "content": "\n

    示例 1:

    ", + "language": "markdown" + }, + { + "content": "\n
    输入: num = 3\n
    输出:
    \"III\"
    ", + "language": "markdown" + }, + { + "content": "\n

    示例 2:

    ", + "language": "markdown" + }, + { + "content": "\n
    输入: num = 4\n
    输出:
    \"IV\"
    ", + "language": "markdown" + }, + { + "content": "\n

    示例 3:

    ", + "language": "markdown" + }, + { + "content": "\n
    输入: num = 9\n
    输出:
    \"IX\"
    ", + "language": "markdown" + }, + { + "content": "\n

    示例 4:

    ", + "language": "markdown" + }, + { + "content": "\n
    输入: num = 58\n
    输出:
    \"LVIII\"\n
    解释:
    L = 50, V = 5, III = 3.\n
    ", + "language": "markdown" + }, + { + "content": "\n

    示例 5:

    ", + "language": "markdown" + }, + { + "content": "\n
    输入: num = 1994\n
    输出:
    \"MCMXCIV\"\n
    解释:
    M = 1000, CM = 900, XC = 90, IV = 4.
    ", + "language": "markdown" + }, + { + "content": "\n

     

    ", + "language": "markdown" + }, + { + "content": "\n

    提示:

    ", + "language": "markdown" + }, + { + "content": "\n
      \n
    • 1 <= num <= 3999
    • \n
    \n
    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic String intToRoman(int num) {\n\t\tint f = 1000;\n\t\tint f2 = 1000;\n\t\tchar[] sym = new char[] { 'M', 'D', 'C', 'L', 'X', 'V', 'I' };\n\t\tint fsi = 0;\n\t\tint[] s = new int[] { 2, 5 };\n\t\tint si = 0;\n\t\tint[] s2 = new int[] { 10, 1 };\n\t\tint si2 = 0;\n\t\tStringBuilder roman = new StringBuilder();\n\t\twhile (num > 0) {\n\t\t\tint d = (int) Math.floor(num / f);\n\t\t\tint r = num % f;\n\t\t\tint d2 = (int) Math.floor(num / f2);\n\t\t\tint r2 = num % f2;\n\t\t\tif (d > 0) {\n\t\t\t\tif (d == 4) {\n\t\t\t\t\troman.append(sym[fsi]);\n\t\t\t\t\troman.append(sym[fsi - 1]);\n\t\t\t\t\tnum = r;\n\t\t\t\t} else if (d2 == 9) {\n\t\t\t\t\troman.append(sym[fsi + 1]);\n\t\t\t\t\troman.append(sym[fsi - 1]);\n\t\t\t\t\tnum = r2;\n\t\t\t\t} else {\n\t\t\t\t\tfor (int i = 0; i < d; i++) {\n\t\t\t\t\t\troman.append(sym[fsi]);\n\t\t\t\t\t}\n\t\t\t\t\tnum = r;\n\t\t\t\t}\n\t\t\t}\n\t\t\tf = f / s[si];\n\t\t\tsi++;\n\t\t\tsi %= 2;\n\t\t\tf2 = f2 / s2[si2];\n\t\t\tsi2++;\n\t\t\tsi2 %= 2;\n\t\t\tfsi++;\n\t\t}\n\t\treturn roman.toString();\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-290dbf6b65274179954a9f182f7a2f98", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600469817" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/29.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/29.exercises/config.json" new file mode 100644 index 000000000..f75920516 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/29.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-423001ac26c44d20a3572064866b8a29", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/29.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/29.exercises/solution.json" new file mode 100644 index 000000000..f4e3eb6fd --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/29.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "02c66ed919a64658b723d5e7e8928b0e", + "keywords": "数组,回溯", + "title": "全排列 II", + "desc": [ + { + "content": "\n

    给定一个可包含重复数字的序列 nums按任意顺序 返回所有不重复的全排列。

     

    示例 1:

    输入:nums = [1,1,2]
    输出:
    [[1,1,2], [1,2,1], [2,1,1]]

    示例 2:

    输入:nums = [1,2,3]
    输出:
    [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]

     

    提示:

      \t
    • 1 <= nums.length <= 8
    • \t
    • -10 <= nums[i] <= 10
    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tList> ans = new ArrayList<>();\n\n\tpublic List> permuteUnique(int[] nums) {\n\t\tdfs(nums, 0);\n\t\treturn ans;\n\t}\n\n\tprivate void dfs(int[] nums, int cur) {\n\t\tif (cur == nums.length) {\n\t\t\tList line = new ArrayList<>();\n\t\t\tfor (int i : nums) {\n\t\t\t\tline.add(i);\n\t\t\t}\n\t\t\tans.add(line);\n\t\t} else {\n\t\t\tfor (int i = cur; i < nums.length; i++) {\n\t\t\t\tif (canSwap(nums, cur, i)) {\n\t\t\t\t\tswap(nums, cur, i);\n\t\t\t\t\tdfs(nums, cur + 1);\n\t\t\t\t\tswap(nums, cur, i);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate boolean canSwap(int nums[], int begin, int end) {\n\t\tfor (int i = begin; i < end; i++) {\n\t\t\tif (nums[i] == nums[end]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tprivate void swap(int nums[], int i, int j) {\n\t\tint temp = nums[i];\n\t\tnums[i] = nums[j];\n\t\tnums[j] = temp;\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-423001ac26c44d20a3572064866b8a29", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470224" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/3.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/3.exercises/config.json" new file mode 100644 index 000000000..2be55d1e0 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/3.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-bc6b2d6511254a5f98339f5f75c558a6", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/3.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/3.exercises/solution.json" new file mode 100644 index 000000000..927e0497f --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/3.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "441c30924add4c18b110cca521fa7736", + "keywords": "算法高阶,数论算法,素数的测试,算法问题选编", + "title": "求素数和", + "desc": [ + { + "content": "\n求第m个到第n个素数之间的素数和", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "import java.util.Scanner;\npublic class All {\n public static void main(String[] args) {\n\t int a[] = new int[200];\n\t int index = 0;\n\t for (int i = 1; i < 200; i++) {\n\t\t boolean isPrime = true;\n\t\t for (int k = 2; k < i; k++) {\n\t\t\tif (i % k == 0) {\n\t\t\t isPrime = false;\n\t\t\t break;\n\t\t\t}\n\t\t }\n\t\t if (isPrime) {\n\t\t\ta[index++] = i;\n\t\t\tSystem.out.println(a[index - 1]);\n\t\t }\n\t }\n\t Scanner small = new Scanner(System.in);\n\t Scanner large = new Scanner(System.in);\n\t int m = small.nextInt();\n\t int n = large.nextInt();\n\t int sums = 0;\n\t int suml = 0;\n\t int sum = 0;\n\t for (int i = 0; i < m; i++) {\n\t\t sums += a[i];\n\t\t System.out.print(a[i] + \"*\");\n\t }\n\t for (int i = 0; i < n; i++) {\n\t\t suml += a[i];\n\t\t System.out.print(a[i] + \" \");\n\t }\n\t sum = suml - sums;\n\t System.out.println(sum);\n }\n}", + "language": "java" + }, + "node_id": "dailycode-bc6b2d6511254a5f98339f5f75c558a6", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470196" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/30.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/30.exercises/config.json" new file mode 100644 index 000000000..37f259502 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/30.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-ce734aa4eff1425fab72592000d1eaba", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/30.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/30.exercises/solution.json" new file mode 100644 index 000000000..2376e5382 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/30.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "3811b4bc0ee248018c22605381ba608c", + "keywords": "哈希表,字符串,滑动窗口", + "title": "无重复字符的最长子串", + "desc": [ + { + "content": "\n

    给定一个字符串,请你找出其中不含有重复字符的 最长子串 的长度。

     

    示例 1:

    输入: s = \"abcabcbb\"
    输出:
    3
    解释:
    因为无重复字符的最长子串是 \"abc\",所以其长度为 3。

    示例 2:

    输入: s = \"bbbbb\"
    输出:
    1
    解释:
    因为无重复字符的最长子串是 \"b\",所以其长度为 1。

    示例 3:

    输入: s = \"pwwkew\"
    输出:
    3
    解释:
    因为无重复字符的最长子串是 \"wke\",所以其长度为 3。 \n请注意,你的答案必须是 子串 的长度,\"pwke\" 是一个子序列,不是子串。

    示例 4:

    输入: s = \"\"
    输出:
    0

     

    提示:

      \t
    • 0 <= s.length <= 5 * 104
    • \t
    • s 由英文字母、数字、符号和空格组成
    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic int lengthOfLongestSubstring(String s) {\n\t\tint i = 0;\n\t\tint j = 0;\n\t\tint m = 0;\n\t\tMap hset = new HashMap<>();\n\t\tfor (; j < s.length(); j++) {\n\t\t\tint code = s.codePointAt(j);\n\t\t\tInteger o = hset.get(code);\n\t\t\tif (o != null && o > i) {\n\t\t\t\ti = o;\n\t\t\t}\n\t\t\tm = m > j - i + 1 ? m : j - i + 1;\n\t\t\thset.put(code, j + 1);\n\t\t}\n\t\treturn m;\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-ce734aa4eff1425fab72592000d1eaba", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600471011" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/31.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/31.exercises/config.json" new file mode 100644 index 000000000..a04590da3 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/31.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-f73b6a74269147239eb2e60bb9b1bec0", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/31.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/31.exercises/solution.json" new file mode 100644 index 000000000..a5661c6e5 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/31.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "be7a8c28b2b44247a2957dda4523fadb", + "keywords": "字符串,动态规划", + "title": "解码方法", + "desc": [ + { + "content": "\n

    一条包含字母 A-Z 的消息通过以下映射进行了 编码

    \n
    'A' -> 1'B' -> 2...'Z' -> 26
    \n

    解码 已编码的消息,所有数字必须基于上述映射的方法,反向映射回字母(可能有多种方法)。例如,\"11106\" 可以映射为:

    \n
      \n
    • \"AAJF\" ,将消息分组为 (1 1 10 6)
    • \n
    • \"KJF\" ,将消息分组为 (11 10 6)
    • \n
    \n

    注意,消息不能分组为  (1 11 06) ,因为 \"06\" 不能映射为 \"F\" ,这是由于 \"6\" 和\n\"06\" 在映射中并不等价。\n

    \n

    给你一个只含数字的 非空 字符串 s ,请计算并返回 解码 方法的 总数

    \n

    题目数据保证答案肯定是一个 32 位 的整数。

    \n

     

    \n

    示例 1:

    \n
    输入:s = \"12\"
    输出:
    2
    解释:
    它可以解码为 \"AB\"(1 2)或者 \"L\"(12)。
    \n

    示例 2:

    \n
    输入:s = \"226\"
    输出:
    3
    解释:
    它可以解码为 \"BZ\" (2 26), \"VF\" (22 6), 或者 \"BBF\" (2 2 6) 。
    \n

    示例 3:

    \n
    输入:s = \"0\"
    输出:
    0
    解释:
    没有字符映射到以 0 开头的数字。含有 0 的有效映射是 'J' -> \"10\" 和 'T'-> \"20\" 。由于没有字符,因此没有有效的方法对此进行解码,因为所有数字都需要映射。
    \n

    示例 4:

    \n
    输入:s = \"06\"
    输出:
    0
    解释:
    \"06\" 不能映射到 \"F\" ,因为字符串含有前导 0(\"6\" 和 \"06\" 在映射中并不等价)。
    \n

     

    \n

    提示:

    \n
      \n
    • 1 <= s.length <= 100
    • \n
    • s 只包含数字,并且可能包含前导零。
    • \n
    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic int numDecodings(String s) {\n\t\tif (s == null || s.length() == 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tint n = s.length();\n\t\tint[] dp = new int[n + 1];\n\t\tdp[0] = 1;\n\t\tdp[1] = (s.charAt(0) == '0' ? 0 : 1);\n\t\tfor (int i = 1; i < n; i++) {\n\t\t\tchar c = s.charAt(i);\n\t\t\tchar pre = s.charAt(i - 1);\n\t\t\tdp[i + 1] = c == '0' ? 0 : dp[i];\n\t\t\tif (pre == '1' || (pre == '2' && c <= '6')) {\n\t\t\t\tdp[i + 1] += dp[i - 1];\n\t\t\t}\n\t\t}\n\t\treturn dp[n];\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-f73b6a74269147239eb2e60bb9b1bec0", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600469925" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/32.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/32.exercises/config.json" new file mode 100644 index 000000000..aad37d7f9 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/32.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-38686faac5e447d8b52391e777bd15b5", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/32.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/32.exercises/solution.json" new file mode 100644 index 000000000..11c00d041 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/32.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "04eb6e04293b450d8a2149cd4b65c1a0", + "keywords": "位运算,数学", + "title": "两数相除", + "desc": [ + { + "content": "\n

    给定两个整数,被除数 dividend 和除数 divisor。将两数相除,要求不使用乘法、除法和 mod 运算符。

    返回被除数 dividend 除以除数 divisor 得到的商。

    整数除法的结果应当截去(truncate)其小数部分,例如:truncate(8.345) = 8 以及 truncate(-2.7335) = -2

     

    示例 1:

    输入: dividend = 10, divisor = 3
    输出:
    3
    解释:
    10/3 = truncate(3.33333..) = truncate(3) = 3

    示例 2:

    输入: dividend = 7, divisor = -3
    输出:
    -2
    解释:
    7/-3 = truncate(-2.33333..) = -2

     

    提示:

      \t
    • 被除数和除数均为 32 位有符号整数。
    • \t
    • 除数不为 0。
    • \t
    • 假设我们的环境只能存储 32 位有符号整数,其数值范围是 [−231,  231 − 1]。本题中,如果除法结果溢出,则返回 231 − 1。
    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic int divide(int dividend, int divisor) {\n\t\tif (dividend == 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tif (dividend == Integer.MIN_VALUE && divisor == -1) {\n\t\t\treturn Integer.MAX_VALUE;\n\t\t}\n\t\tboolean negative;\n\t\tnegative = (dividend ^ divisor) < 0;\n\t\tlong t = Math.abs((long) dividend);\n\t\tlong d = Math.abs((long) divisor);\n\t\tint result = 0;\n\t\tfor (int i = 31; i >= 0; i--) {\n\t\t\tif ((t >> i) >= d) {\n\t\t\t\tresult += 1 << i;\n\t\t\t\tt -= d << i;\n\t\t\t}\n\t\t}\n\t\treturn negative ? -result : result;\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-38686faac5e447d8b52391e777bd15b5", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470833" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/33.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/33.exercises/config.json" new file mode 100644 index 000000000..638f79111 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/33.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-b797b4502b324dbcb41cc7d3ddb2bdbd", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/33.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/33.exercises/solution.json" new file mode 100644 index 000000000..45472eece --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/33.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "04b27688798f49a8b07f36892f6e1b6d", + "keywords": "数组,矩阵,模拟", + "title": "螺旋矩阵", + "desc": [ + { + "content": "\n

    给你一个 mn 列的矩阵 matrix ,请按照 顺时针螺旋顺序 ,返回矩阵中的所有元素。

     

    示例 1:

    \"\"
    输入:matrix = [[1,2,3],[4,5,6],[7,8,9]]
    输出:
    [1,2,3,6,9,8,7,4,5]

    示例 2:

    \"\"
    输入:matrix = [[1,2,3,4],[5,6,7,8],[9,10,11,12]]
    输出:
    [1,2,3,4,8,12,11,10,9,5,6,7]

     

    提示:

      \t
    • m == matrix.length
    • \t
    • n == matrix[i].length
    • \t
    • 1 <= m, n <= 10
    • \t
    • -100 <= matrix[i][j] <= 100
    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic List spiralOrder(int[][] matrix) {\n\t\tList res = new ArrayList();\n\t\tif (matrix.length == 0 || (matrix.length == 1 && matrix[0].length == 0))\n\t\t\treturn res;\n\t\tint left = 0;\n\t\tint right = matrix[0].length - 1;\n\t\tint top = 0;\n\t\tint bottom = matrix.length - 1;\n\t\tint num = (right + 1) * (bottom + 1);\n\t\twhile (num > 0) {\n\t\t\tfor (int j = left; j <= right; j++) {\n\t\t\t\tres.add(matrix[top][j]);\n\t\t\t\tnum--;\n\t\t\t}\n\t\t\tif (num <= 0)\n\t\t\t\tbreak;\n\t\t\ttop++;\n\t\t\tfor (int i = top; i <= bottom; i++) {\n\t\t\t\tres.add(matrix[i][right]);\n\t\t\t\tnum--;\n\t\t\t}\n\t\t\tif (num <= 0)\n\t\t\t\tbreak;\n\t\t\tright--;\n\t\t\tfor (int j = right; j >= left; j--) {\n\t\t\t\tres.add(matrix[bottom][j]);\n\t\t\t\tnum--;\n\t\t\t}\n\t\t\tif (num <= 0)\n\t\t\t\tbreak;\n\t\t\tbottom--;\n\t\t\tfor (int i = bottom; i >= top; i--) {\n\t\t\t\tres.add(matrix[i][left]);\n\t\t\t\tnum--;\n\t\t\t}\n\t\t\tif (num <= 0)\n\t\t\t\tbreak;\n\t\t\tleft++;\n\t\t}\n\t\treturn res;\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-b797b4502b324dbcb41cc7d3ddb2bdbd", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470121" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/34.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/34.exercises/config.json" new file mode 100644 index 000000000..14eb26d39 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/34.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-4a27c74c6807494493bee7bc2b275d32", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/34.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/34.exercises/solution.json" new file mode 100644 index 000000000..87f99deee --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/34.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "91c6730282074a3ba8f208b7c7574dda", + "keywords": "数组,回溯", + "title": "全排列", + "desc": [ + { + "content": "\n

    给定一个 没有重复 数字的序列,返回其所有可能的全排列。

    示例:

    输入: [1,2,3]
    输出:
    [ [1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], [3,2,1]]
    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic List> permute(int[] nums) {\n\n\t\tList> result = new ArrayList>();\n\t\tArrays.sort(nums);\n\t\tList first = new ArrayList();\n\t\tfor (int r = 0; r < nums.length; r++) {\n\t\t\tfirst.add(nums[r]);\n\t\t}\n\t\tresult.add(first);\n\t\tint i = nums.length - 2;\n\t\twhile (i >= 0) {\n\t\t\tif (nums[i] < nums[i + 1]) {\n\t\t\t\tint temp = nums[i];\n\t\t\t\tfor (int j = nums.length - 1; j > i; j--) {\n\t\t\t\t\tif (nums[j] > temp) {\n\t\t\t\t\t\tnums[i] = nums[j];\n\t\t\t\t\t\tnums[j] = temp;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tnums = quick_sort(nums, i + 1, nums.length - 1);\n\t\t\t\tList sub = new ArrayList();\n\t\t\t\tfor (int t = 0; t < nums.length; t++) {\n\t\t\t\t\tsub.add(nums[t]);\n\t\t\t\t}\n\t\t\t\tresult.add(sub);\n\t\t\t\ti = nums.length - 2;\n\n\t\t\t} else {\n\t\t\t\ti--;\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\n\t}\n\n\tpublic int[] quick_sort(int[] a, int left, int right) {\n\t\tif (left < right) {\n\t\t\tint l = left;\n\t\t\tint r = right;\n\t\t\tint temp = a[l];\n\t\t\twhile (l != r) {\n\t\t\t\twhile (l < r && a[r] > temp) {\n\t\t\t\t\tr--;\n\t\t\t\t}\n\t\t\t\tif (l < r) {\n\t\t\t\t\ta[l] = a[r];\n\t\t\t\t\tl++;\n\t\t\t\t}\n\n\t\t\t\twhile (l < r && a[l] < temp) {\n\t\t\t\t\tl++;\n\t\t\t\t}\n\t\t\t\tif (l < r) {\n\t\t\t\t\ta[r] = a[l];\n\t\t\t\t\tr--;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\ta[l] = temp;\n\t\t\tquick_sort(a, left, l - 1);\n\t\t\tquick_sort(a, l + 1, right);\n\t\t}\n\t\treturn a;\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-4a27c74c6807494493bee7bc2b275d32", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600469820" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/35.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/35.exercises/config.json" new file mode 100644 index 000000000..a1763b1df --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/35.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-596c3dac8f6c4d31a61477304a726299", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/35.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/35.exercises/solution.json" new file mode 100644 index 000000000..bda6220de --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/35.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "09924b24ed5447ab879f4865eb20b515", + "keywords": "数组,二分查找", + "title": "搜索旋转排序数组", + "desc": [ + { + "content": "\n

    整数数组 nums 按升序排列,数组中的值 互不相同

    \n

    在传递给函数之前,nums 在预先未知的某个下标 k0 <= k < nums.length)上进行了 旋转,使数组变为\n[nums[k], nums[k+1], ..., nums[n-1], nums[0], nums[1], ..., nums[k-1]](下标 从 0 开始\n计数)。例如, [0,1,2,4,5,6,7] 在下标 3 处经旋转后可能变为 [4,5,6,7,0,1,2] 。\n

    \n

    给你 旋转后 的数组 nums 和一个整数 target ,如果 nums 中存在这个目标值\ntarget ,则返回它的下标,否则返回 -1 。\n

    \n

     

    \n

    示例 1:

    \n
    输入:nums = [4,5,6,7,0,1,2], target = 0
    输出:
    4
    \n

    示例 2:

    \n
    输入:nums = [4,5,6,7,0,1,2], target = 3
    输出:
    -1
    \n

    示例 3:

    \n
    输入:nums = [1], target = 0
    输出:
    -1
    \n

     

    \n

    提示:

    \n
      \n
    • 1 <= nums.length <= 5000
    • \n
    • -10^4 <= nums[i] <= 10^4
    • \n
    • nums 中的每个值都 独一无二
    • \n
    • 题目数据保证 nums 在预先未知的某个下标上进行了旋转
    • \n
    • -10^4 <= target <= 10^4
    • \n
    \n

     

    \n

    进阶:你可以设计一个时间复杂度为 O(log n) 的解决方案吗?

    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic int search(int[] nums, int target) {\n\t\tint start = 0;\n\t\tint end = nums.length - 1;\n\n\t\twhile (start <= end) {\n\t\t\tint mid = start + (end - start) / 2;\n\t\t\tif (nums[mid] == target) {\n\t\t\t\treturn mid;\n\t\t\t}\n\n\t\t\tif (nums[start] <= nums[mid]) {\n\t\t\t\tif (target >= nums[start] && target <= nums[mid]) {\n\t\t\t\t\tend = mid - 1;\n\t\t\t\t} else {\n\t\t\t\t\tstart = start + 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (nums[mid] <= nums[end]) {\n\t\t\t\tif (target >= nums[mid] && target <= nums[end]) {\n\t\t\t\t\tstart = mid + 1;\n\t\t\t\t} else {\n\t\t\t\t\tend = end - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}\n}\n", + "language": "java" + }, + "node_id": "dailycode-596c3dac8f6c4d31a61477304a726299", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470220" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/36.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/36.exercises/config.json" new file mode 100644 index 000000000..6607eec12 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/36.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-50818484f6ab4ab08262ca694785cdbb", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/36.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/36.exercises/solution.json" new file mode 100644 index 000000000..12cc5cd66 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/36.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "181b049b41c7428f88cbd0f1458c2482", + "keywords": "数组,二分查找,矩阵", + "title": "搜索二维矩阵", + "desc": [ + { + "content": "\n

    编写一个高效的算法来判断 m x n 矩阵中,是否存在一个目标值。该矩阵具有如下特性:

      \t
    • 每行中的整数从左到右按升序排列。
    • \t
    • 每行的第一个整数大于前一行的最后一个整数。

     

    示例 1:

    \"\"
    输入:matrix = [[1,3,5,7],[10,11,16,20],[23,30,34,60]], target = 3
    输出:
    true

    示例 2:

    \"\"
    输入:matrix = [[1,3,5,7],[10,11,16,20],[23,30,34,60]], target = 13
    输出:
    false

     

    提示:

      \t
    • m == matrix.length
    • \t
    • n == matrix[i].length
    • \t
    • 1 <= m, n <= 100
    • \t
    • -104 <= matrix[i][j], target <= 104
    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic boolean searchMatrix(int[][] matrix, int target) {\n\t\tif (matrix.length == 0 || matrix[0].length == 0)\n\t\t\treturn false;\n\t\tint begin, mid, end;\n\t\tbegin = mid = 0;\n\t\tint len1 = matrix.length, len2 = matrix[0].length;\n\t\tend = len1 * len2 - 1;\n\t\twhile (begin < end) {\n\t\t\tmid = (begin + end) / 2;\n\t\t\tif (matrix[mid / len2][mid % len2] < target)\n\t\t\t\tbegin = mid + 1;\n\t\t\telse\n\t\t\t\tend = mid;\n\t\t}\n\t\treturn matrix[begin / len2][begin % len2] == target;\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-50818484f6ab4ab08262ca694785cdbb", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600469923" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/37.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/37.exercises/config.json" new file mode 100644 index 000000000..3d7eeda04 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/37.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-aa14a10d3dbc4e2a983c7cffd4eca240", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/37.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/37.exercises/solution.json" new file mode 100644 index 000000000..1a548b67a --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/37.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "096ba255d3f74daca6719e44801429dd", + "keywords": "递归,数学", + "title": "Pow(x, n)", + "desc": [ + { + "content": "\n

    实现 pow(x, n) ,即计算 x 的 n 次幂函数(即,xn)。

     

    示例 1:

    输入:x = 2.00000, n = 10
    输出:
    1024.00000

    示例 2:

    输入:x = 2.10000, n = 3
    输出:
    9.26100

    示例 3:

    输入:x = 2.00000, n = -2
    输出:
    0.25000
    解释:
    2-2 = 1/22 = 1/4 = 0.25

     

    提示:

      \t
    • -100.0 < x < 100.0
    • \t
    • -231 <= n <= 231-1
    • \t
    • -104 <= xn <= 104
    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "public class Solution {\n\tpublic double myPow(double x, int n) {\n\t\tif (n < 0) {\n\n\t\t\treturn 1 / pow(x, -n);\n\t\t} else {\n\n\t\t\treturn pow(x, n);\n\t\t}\n\t}\n\n\tprivate double pow(double x, int n) {\n\n\t\tif (n == 0) {\n\t\t\treturn 1.0;\n\t\t}\n\t\tif (n == 1) {\n\t\t\treturn x;\n\t\t}\n\t\tdouble val = pow(x, n / 2);\n\n\t\tif (n % 2 == 0) {\n\t\t\treturn val * val;\n\t\t} else {\n\t\t\treturn val * val * x;\n\t\t}\n\t}\n}\n", + "language": "java" + }, + "node_id": "dailycode-aa14a10d3dbc4e2a983c7cffd4eca240", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600471013" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/38.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/38.exercises/config.json" new file mode 100644 index 000000000..1de62ae63 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/38.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-e782222cd8894664b3febf53492cbc11", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/38.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/38.exercises/solution.json" new file mode 100644 index 000000000..225827af4 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/38.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "35663731ec004bcb83bb0dddab7cec8e", + "keywords": "哈希表,字符串,排序", + "title": "字母异位词分组", + "desc": [ + { + "content": "\n

    给定一个字符串数组,将字母异位词组合在一起。字母异位词指字母相同,但排列不同的字符串。

    \n

    示例:

    \n
    输入:[eat", "tea", "tan", "ate", "nat", "bat"]
    输出:
    [[ate","eat","tea"],["nat","tan"],["bat"]]
    \n

    说明:

    \n
      \n
    • 所有输入均为小写字母。
    • \n
    • 不考虑答案输出的顺序。
    • \n
    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "\nimport java.util.*;\n\npublic class GroupAnagrams {\n\n\tpublic List> groupAnagrams(String[] strs) {\n\t\tHashMap> map = new HashMap<>();\n\t\tfor (String str : strs) {\n\t\t\tchar[] cs = str.toCharArray();\n\t\t\tArrays.sort(cs);\n\n\t\t\tString key = String.valueOf(cs);\n\t\t\tif (!map.containsKey(key)) {\n\t\t\t\tmap.put(key, new ArrayList<>());\n\t\t\t}\n\t\t\tmap.get(key).add(str);\n\t\t}\n\t\treturn new ArrayList(map.values());\n\t}\n\n\tpublic List> groupAnagrams2(String[] strs) {\n\t\tif (strs.length <= 0) {\n\t\t\treturn new ArrayList<>();\n\t\t}\n\t\tHashMap> map = new HashMap<>();\n\t\tfor (String str : strs) {\n\t\t\tchar[] cs = str.toCharArray();\n\t\t\tint[] count = new int[26];\n\t\t\tfor (char c : cs) {\n\t\t\t\t++count[c - 'a'];\n\t\t\t}\n\t\t\tStringBuilder s = new StringBuilder(\"\");\n\t\t\tfor (int num : count) {\n\t\t\t\ts.append(num);\n\t\t\t}\n\n\t\t\tString key = String.valueOf(s);\n\n\t\t\tif (!map.containsKey(key)) {\n\t\t\t\tmap.put(key, new ArrayList<>());\n\t\t\t}\n\t\t\tmap.get(key).add(str);\n\t\t}\n\t\treturn new ArrayList(map.values());\n\t}\n}\n", + "language": "java" + }, + "node_id": "dailycode-e782222cd8894664b3febf53492cbc11", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470799" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/39.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/39.exercises/config.json" new file mode 100644 index 000000000..6b2b00c0e --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/39.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-68a4069880464d59a2b217ebc248c3b7", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/39.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/39.exercises/solution.json" new file mode 100644 index 000000000..88a5e6417 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/39.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "047e5bcd86cc49b6916e8736ab3dbcc3", + "keywords": "数组,哈希表,矩阵", + "title": "矩阵置零", + "desc": [ + { + "content": "\n

    给定一个 m x n 的矩阵,如果一个元素为 0 ,则将其所在行和列的所有元素都设为 0 。请使用 原地 算法

    进阶:

      \t
    • 一个直观的解决方案是使用  O(mn) 的额外空间,但这并不是一个好的解决方案。
    • \t
    • 一个简单的改进方案是使用 O(m + n) 的额外空间,但这仍然不是最好的解决方案。
    • \t
    • 你能想出一个仅使用常量空间的解决方案吗?

     

    示例 1:

    \"\"
    输入:matrix = [[1,1,1],[1,0,1],[1,1,1]]
    输出:
    [[1,0,1],[0,0,0],[1,0,1]]

    示例 2:

    \"\"
    输入:matrix = [[0,1,2,0],[3,4,5,2],[1,3,1,5]]
    输出:
    [[0,0,0,0],[0,4,5,0],[0,3,1,0]]

     

    提示:

      \t
    • m == matrix.length
    • \t
    • n == matrix[0].length
    • \t
    • 1 <= m, n <= 200
    • \t
    • -231 <= matrix[i][j] <= 231 - 1
    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic void setZeroes(int[][] matrix) {\n\t\tint[] xNum = new int[matrix[0].length];\n\t\tint[] yNum = new int[matrix.length];\n\t\tfor (int i = 0; i < matrix.length; i++) {\n\t\t\tfor (int j = 0; j < matrix[i].length; j++) {\n\t\t\t\tif (matrix[i][j] == 0) {\n\t\t\t\t\txNum[j] = 1;\n\t\t\t\t\tyNum[i] = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < matrix.length; i++) {\n\t\t\tfor (int j = 0; j < matrix[i].length; j++) {\n\t\t\t\tif (xNum[j] == 1 || yNum[i] == 1) {\n\t\t\t\t\tmatrix[i][j] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-68a4069880464d59a2b217ebc248c3b7", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470228" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/4.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/4.exercises/config.json" new file mode 100644 index 000000000..75c7a8b8a --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/4.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-5bd0909b7195425cb8eb7497477bdc33", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/4.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/4.exercises/solution.json" new file mode 100644 index 000000000..4fa6b4888 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/4.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "91477a6531ff44c0a056b7905db6b9f7", + "keywords": "算法", + "title": "发奖金问题", + "desc": [ + { + "content": "\n过年了,村里要庆祝。村长说,村里有一笔钱作为奖金,让每个人写一个纸条上来,谁写的数目与奖金最接近,就算猜中,这笔奖金就归谁,如果多人猜中,则平分。编写程序,算算都有哪些人得到奖金?多少?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "import java.util.Collections;\nimport java.util.Comparator;\nimport java.util.Arrays;\nclass Q707984 {\n\tpublic static void main(String[] args) {\n\t\tint award = 100;\n\t\tString[] people = { \"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\", \"h\" };\n\t\tInteger[] guess = { 75, 70, 80, 120, 100, 110, 100, 45 };\n\t\tInteger[] ordered = new Integer[people.length];\n\t\tfor (int i = 0; i < ordered.length; i++)\n\t\t\tordered[i] = i;\n\t\tArrays.sort(ordered, new Comparator() {\n\t\t\t@Override\n\t\t\tpublic int compare(Integer a, Integer b) {\n\t\t\t\tint x = guess[a] - award > 0 ? guess[a] - award : award - guess[a];\n\t\t\t\tint y = guess[b] - award > 0 ? guess[b] - award : award - guess[b];\n\t\t\t\treturn x - y;\n\t\t\t}\n\t\t});\n\t\tint maxp = 0;\n\t\tint i = 0;\n\t\twhile (guess[ordered[i++]] == award)\n\t\t\tmaxp++;\n\t\tif (maxp <= 1)\n\t\t\tSystem.out.println(people[ordered[0]] + \"一人得奖\" + award + \"元。\");\n\t\telse {\n\t\t\tfor (i = 0; i < maxp; i++)\n\t\t\t\tSystem.out.print(people[ordered[i]] + \" \");\n\t\t\tSystem.out.println(\"共同得奖\" + award / (float) (maxp) + \"元。\");\n\t\t}\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-5bd0909b7195425cb8eb7497477bdc33", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600469975" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/40.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/40.exercises/config.json" new file mode 100644 index 000000000..a5ad14150 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/40.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-c4d4538cdb4544b1871d8b2c95d3893b", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/40.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/40.exercises/solution.json" new file mode 100644 index 000000000..cc7d84c05 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/40.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "4294bb2752c44a4a89d523d5639101bf", + "keywords": "数组,二分查找", + "title": "在排序数组中查找元素的第一个和最后一个位置", + "desc": [ + { + "content": "\n

    给定一个按照升序排列的整数数组 nums,和一个目标值 target。找出给定目标值在数组中的开始位置和结束位置。

    \n

    如果数组中不存在目标值 target,返回 [-1, -1]

    \n

    进阶:

    \n
      \n
    • 你可以设计并实现时间复杂度为 O(log n) 的算法解决此问题吗?
    • \n
    \n

     

    \n

    示例 1:

    \n
    输入:nums = [5,7,7,8,8,10], target = 8
    输出:
    [3,4]
    \n

    示例 2:

    \n
    输入:nums = [5,7,7,8,8,10], target = 6
    输出:
    [-1,-1]
    \n

    示例 3:

    \n
    输入:nums = [], target = 0
    输出:
    [-1,-1]
    \n

     

    \n

    提示:

    \n
      \n
    • 0 <= nums.length <= 105
    • \n
    • -109 <= nums[i] <= 109
    • \n
    • nums 是一个非递减数组
    • \n
    • -109 <= target <= 109
    • \n
    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "public class Solution {\n\n\tpublic int[] searchRange(int[] nums, int target) {\n\t\tint[] result = new int[2];\n\t\tresult[0] = floor(nums, target);\n\t\tresult[1] = ceil(nums, target);\n\t\treturn result;\n\t}\n\n\tprivate int floor(int[] nums, int target) {\n\t\tint left = -1;\n\t\tint right = nums.length - 1;\n\t\twhile (left < right) {\n\t\t\tint mid = left + (right - left + 1) / 2;\n\t\t\tif (target <= nums[mid]) {\n\t\t\t\tright = mid - 1;\n\t\t\t} else {\n\t\t\t\tleft = mid;\n\t\t\t}\n\t\t}\n\t\tif (left + 1 < nums.length && nums[left + 1] == target) {\n\t\t\treturn left + 1;\n\t\t} else {\n\t\t\treturn -1;\n\t\t}\n\t}\n\n\tprivate int ceil(int[] nums, int target) {\n\t\tint left = 0;\n\t\tint right = nums.length;\n\t\twhile (left < right) {\n\t\t\tint mid = left + (right - left) / 2;\n\t\t\tif (target >= nums[mid]) {\n\t\t\t\tleft = mid + 1;\n\t\t\t} else {\n\t\t\t\tright = mid;\n\t\t\t}\n\t\t}\n\t\tif (right - 1 >= 0 && nums[right - 1] == target) {\n\t\t\treturn right - 1;\n\t\t} else {\n\t\t\treturn -1;\n\t\t}\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-c4d4538cdb4544b1871d8b2c95d3893b", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470221" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/41.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/41.exercises/config.json" new file mode 100644 index 000000000..bdd7b6795 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/41.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-7873feae482441e5abe2a0319821f44c", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/41.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/41.exercises/solution.json" new file mode 100644 index 000000000..27f903c1a --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/41.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "eb6e56ffd9af41c89664397add922658", + "keywords": "贪心,数组,动态规划", + "title": "跳跃游戏 II", + "desc": [ + { + "content": "\n

    给定一个非负整数数组,你最初位于数组的第一个位置。

    \n

    数组中的每个元素代表你在该位置可以跳跃的最大长度。

    \n

    你的目标是使用最少的跳跃次数到达数组的最后一个位置。

    \n

    示例:

    \n
    输入: [2,3,1,1,4]
    输出:
    2
    解释:
    跳到最后一个位置的最小跳跃数是 2。从下标为 0 跳到下标为 1 的位置,跳 1 步,然后跳 3 步到达数组的最后一个位置。
    \n

    说明:

    \n

    假设你总是可以到达数组的最后一个位置。

    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic int jump(int[] nums) {\n\t\tint end = 0;\n\t\tint steps = 0;\n\t\tint maxPosition = 0;\n\t\tfor (int i = 0; i < nums.length - 1; i++) {\n\n\t\t\tmaxPosition = Math.max(maxPosition, i + nums[i]);\n\n\t\t\tif (i == end) {\n\t\t\t\tend = maxPosition;\n\t\t\t\tsteps++;\n\t\t\t}\n\t\t}\n\t\treturn steps;\n\t}\n}\n", + "language": "java" + }, + "node_id": "dailycode-7873feae482441e5abe2a0319821f44c", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600469921" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/42.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/42.exercises/config.json" new file mode 100644 index 000000000..cca16fe04 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/42.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-e9998c9054be454eb2a0a4f69e129830", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/42.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/42.exercises/solution.json" new file mode 100644 index 000000000..c0884f133 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/42.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "a016a78c17504575bda8bf1cdb6274b2", + "keywords": "链表", + "title": "反转链表 II", + "desc": [ + { + "content": "\n给你单链表的头指针 head 和两个整数 leftright ,其中 left <= right 。请你反转从位置 left 到位置 right 的链表节点,返回 反转后的链表

     

    示例 1:

    \"\"
    输入:head = [1,2,3,4,5], left = 2, right = 4
    输出:
    [1,4,3,2,5]

    示例 2:

    输入:head = [5], left = 1, right = 1
    输出:
    [5]

     

    提示:

      \t
    • 链表中节点数目为 n
    • \t
    • 1 <= n <= 500
    • \t
    • -500 <= Node.val <= 500
    • \t
    • 1 <= left <= right <= n

     

    进阶: 你可以使用一趟扫描完成反转吗?

    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic ListNode reverseBetween(ListNode head, int m, int n) {\n\t\tListNode dummy = new ListNode(0);\n\t\tdummy.next = head;\n\t\tListNode pre = dummy;\n\t\tfor (int i = 1; i < m; i++) {\n\t\t\tpre = pre.next;\n\t\t}\n\t\thead = pre.next;\n\t\tfor (int i = m; i < n; i++) {\n\t\t\tListNode nex = head.next;\n\t\t\thead.next = nex.next;\n\t\t\tnex.next = pre.next;\n\t\t\tpre.next = nex;\n\t\t}\n\t\treturn dummy.next;\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-e9998c9054be454eb2a0a4f69e129830", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600469826" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/43.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/43.exercises/config.json" new file mode 100644 index 000000000..6a2514da0 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/43.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-40c4c366546a44b5930491db827d2c14", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/43.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/43.exercises/solution.json" new file mode 100644 index 000000000..69f8f97fd --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/43.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "96ce3e837e5c4135b4375ce9e8b29754", + "keywords": "数组,动态规划,矩阵", + "title": "最小路径和", + "desc": [ + { + "content": "\n

    给定一个包含非负整数的 m x n 网格 grid ,请找出一条从左上角到右下角的路径,使得路径上的数字总和为最小。

    说明:每次只能向下或者向右移动一步。

     

    示例 1:

    \"\"
    输入:grid = [[1,3,1],[1,5,1],[4,2,1]]
    输出:
    7
    解释:
    因为路径 1→3→1→1→1 的总和最小。

    示例 2:

    输入:grid = [[1,2,3],[4,5,6]]
    输出:
    12

     

    提示:

      \t
    • m == grid.length
    • \t
    • n == grid[i].length
    • \t
    • 1 <= m, n <= 200
    • \t
    • 0 <= grid[i][j] <= 100
    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic int minPathSum(int[][] grid) {\n\t\tint m = grid.length;\n\t\tint n = grid[0].length;\n\n\t\tint sum = 0;\n\n\t\tif (m < 1 || n < 1)\n\t\t\treturn 0;\n\t\tif (m == 1) {\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tsum = sum + grid[0][i];\n\t\t\t}\n\t\t\treturn sum;\n\t\t}\n\t\tif (n == 1) {\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tsum = sum + grid[i][0];\n\t\t\t}\n\t\t\treturn sum;\n\t\t}\n\n\t\tint[][] dp = new int[m][n];\n\t\tdp[0][0] = grid[0][0];\n\n\t\tfor (int k = 1; k < m; k++) {\n\t\t\tdp[k][0] = grid[k][0] + dp[k - 1][0];\n\t\t}\n\n\t\tfor (int l = 1; l < n; l++) {\n\t\t\tdp[0][l] = grid[0][l] + dp[0][l - 1];\n\t\t}\n\n\t\tfor (int k = 1; k < m; k++) {\n\t\t\tfor (int l = 1; l < n; l++) {\n\t\t\t\tdp[k][l] = grid[k][l] + Math.min(dp[k - 1][l], dp[k][l - 1]);\n\t\t\t}\n\t\t}\n\t\treturn dp[m - 1][n - 1];\n\t}\n}\n", + "language": "java" + }, + "node_id": "dailycode-40c4c366546a44b5930491db827d2c14", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470227" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/44.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/44.exercises/config.json" new file mode 100644 index 000000000..9694d48c7 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/44.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-ccc2cd1afb9b4c05abec6e80d581bfd2", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/44.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/44.exercises/solution.json" new file mode 100644 index 000000000..cefad09ff --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/44.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "a4a05fa8ae2043028026f1aeb8d31b26", + "keywords": "链表,双指针", + "title": "删除链表的倒数第 N 个结点", + "desc": [ + { + "content": "\n

    给你一个链表,删除链表的倒数第 n 个结点,并且返回链表的头结点。

    进阶:你能尝试使用一趟扫描实现吗?

     

    示例 1:

    \"\"
    输入:head = [1,2,3,4,5], n = 2
    输出:
    [1,2,3,5]

    示例 2:

    输入:head = [1], n = 1
    输出:
    []

    示例 3:

    输入:head = [1,2], n = 1
    输出:
    [1]

     

    提示:

      \t
    • 链表中结点的数目为 sz
    • \t
    • 1 <= sz <= 30
    • \t
    • 0 <= Node.val <= 100
    • \t
    • 1 <= n <= sz
    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "public class ListNode {\n\tint val;\n\tListNode next;\n\tListNode() {\n\t}\n\tListNode(int val) {\n\t\tthis.val = val;\n\t}\n\tListNode(int val, ListNode next) {\n\t\tthis.val = val;\n\t\tthis.next = next;\n\t}\n}\nclass Solution {\n\tpublic ListNode removeNthFromEnd(ListNode head, int n) {\n\t\tListNode v = new ListNode(0, head);\n\t\tListNode handle = v;\n\t\tList index = new ArrayList<>();\n\t\twhile (v != null) {\n\t\t\tindex.add(v);\n\t\t\tv = v.next;\n\t\t}\n\t\tint pre = index.size() - n - 1;\n\t\tint next = index.size() - n + 1;\n\t\tindex.get(pre).next = next >= 0 && next < index.size() ? index.get(next) : null;\n\t\treturn handle.next;\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-ccc2cd1afb9b4c05abec6e80d581bfd2", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600469818" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/45.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/45.exercises/config.json" new file mode 100644 index 000000000..0ffab4a37 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/45.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-47ce044c35bd436a8c83976d0f209db9", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/45.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/45.exercises/solution.json" new file mode 100644 index 000000000..6529a4430 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/45.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "264371637c0441b48907513cc8860a32", + "keywords": "数组,回溯", + "title": "组合总和", + "desc": [ + { + "content": "\n

    给定一个无重复元素的数组 candidates 和一个目标数 target ,找出 candidates 中所有可以使数字和为 target 的组合。\n

    \n

    candidates 中的数字可以无限制重复被选取。

    \n

    说明:

    \n
      \n
    • 所有数字(包括 target)都是正整数。
    • \n
    • 解集不能包含重复的组合。 
    • \n
    \n

    示例 1:

    \n
    输入:candidates = [2,3,6,7], target = 7,
    输出:
    [[7],[2,2,3]]
    \n

    示例 2:

    \n
    输入:candidates = [2,3,5], target = 8,
    输出:
    [[2,2,2,2],[2,3,3],[3,5]]
    \n

     

    \n

    提示:

    \n
      \n
    • 1 <= candidates.length <= 30
    • \n
    • 1 <= candidates[i] <= 200
    • \n
    • candidate 中的每个元素都是独一无二的。
    • \n
    • 1 <= target <= 500
    • \n
    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic List> combinationSum(int[] candiates, int target) {\n\n\t\tList> resultList = new ArrayList<>();\n\n\t\tList result = new ArrayList<>();\n\n\t\tArrays.sort(candiates);\n\n\t\tdfs(candiates, resultList, result, 0, target);\n\t\treturn resultList;\n\n\t}\n\n\tprivate void dfs(int[] candiates, List> resultList, List result, int start, int target) {\n\n\t\tif (target < 0) {\n\t\t\treturn;\n\t\t}\n\n\t\telse if (target == 0) {\n\n\t\t\tresultList.add(new ArrayList<>(result));\n\t\t} else {\n\t\t\tfor (int i = start; i < candiates.length; i++) {\n\t\t\t\tresult.add(candiates[i]);\n\n\t\t\t\tdfs(candiates, resultList, result, i, target - candiates[i]);\n\n\t\t\t\tresult.remove(result.size() - 1);\n\t\t\t}\n\t\t}\n\t}\n}\n", + "language": "java" + }, + "node_id": "dailycode-47ce044c35bd436a8c83976d0f209db9", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600471017" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/46.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/46.exercises/config.json" new file mode 100644 index 000000000..263ef8af4 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/46.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-68cfc35ac6174d01bfb5751c70035252", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/46.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/46.exercises/solution.json" new file mode 100644 index 000000000..498927fa5 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/46.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "3927c7b6932c47789bf5dce8b98e6f25", + "keywords": "字符串,动态规划", + "title": "最长回文子串", + "desc": [ + { + "content": "\n

    给你一个字符串 s,找到 s 中最长的回文子串。

     

    示例 1:

    输入:s = \"babad\"
    输出:
    \"bab\"
    解释:
    \"aba\" 同样是符合题意的答案。

    示例 2:

    输入:s = \"cbbd\"
    输出:
    \"bb\"

    示例 3:

    输入:s = \"a\"
    输出:
    \"a\"

    示例 4:

    输入:s = \"ac\"
    输出:
    \"a\"

     

    提示:

      \t
    • 1 <= s.length <= 1000
    • \t
    • s 仅由数字和英文字母(大写和/或小写)组成
    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic String longestPalindrome(String s) {\n\t\tint ti = 0, maxlen = 0, i, t;\n\t\tfor (i = 0; i < s.length(); i++) {\n\t\t\tt = 1;\n\t\t\twhile (t <= i && i + t < s.length()) {\n\t\t\t\tif (s.charAt(i + t) == s.charAt(i - t))\n\t\t\t\t\tt++;\n\t\t\t\telse\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tt--;\n\t\t\tif (2 * t + 1 > maxlen) {\n\t\t\t\tti = i - t;\n\t\t\t\tmaxlen = 2 * t + 1;\n\t\t\t}\n\t\t}\n\t\tfor (i = 0; i < s.length(); i++) {\n\t\t\tt = 1;\n\t\t\twhile (t <= i + 1 && i + t < s.length()) {\n\t\t\t\tif (s.charAt(i - t + 1) == s.charAt(i + t))\n\t\t\t\t\tt++;\n\t\t\t\telse\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tt--;\n\t\t\tif (2 * t > maxlen) {\n\t\t\t\tti = i - t + 1;\n\t\t\t\tmaxlen = 2 * t;\n\t\t\t}\n\t\t}\n\t\treturn s.substring(ti, ti + maxlen);\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-68cfc35ac6174d01bfb5751c70035252", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470834" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/47.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/47.exercises/config.json" new file mode 100644 index 000000000..73da96561 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/47.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-97b59f64908e447ca8f6cc62c7d69b2a", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/47.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/47.exercises/solution.json" new file mode 100644 index 000000000..eb93632e1 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/47.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "e082f85c05944fadb19a3fa01a518afb", + "keywords": "数组,二分查找", + "title": "搜索旋转排序数组 II", + "desc": [ + { + "content": "\n

    已知存在一个按非降序排列的整数数组 nums ,数组中的值不必互不相同。

    \n

    在传递给函数之前,nums 在预先未知的某个下标 k0 <= k < nums.length)上进行了 旋转\n,使数组变为 [nums[k], nums[k+1], ..., nums[n-1], nums[0], nums[1], ..., nums[k-1]](下标 从 0\n开始 计数)。例如, [0,1,2,4,4,4,5,6,6,7] 在下标 5 处经旋转后可能变为\n[4,5,6,6,7,0,1,2,4,4] 。\n

    \n

    给你 旋转后 的数组 nums 和一个整数 target ,请你编写一个函数来判断给定的目标值是否存在于数组中。如果\nnums 中存在这个目标值 target ,则返回 true ,否则返回 false 。\n

    \n

     

    \n

    示例 1:

    \n
    输入:nums = [2,5,6,0,0,1,2], target = 0
    输出:
    true
    \n

    示例 2:

    \n
    输入:nums = [2,5,6,0,0,1,2], target = 3
    输出:
    false
    \n

     

    \n

    提示:

    \n
      \n
    • 1 <= nums.length <= 5000
    • \n
    • -104 <= nums[i] <= 104
    • \n
    • 题目数据保证 nums 在预先未知的某个下标上进行了旋转
    • \n
    • -104 <= target <= 104
    • \n
    \n

     

    \n

    进阶:

    \n
      \n
    • 这是 搜索旋转排序数组 的延伸题目,本题中的 nums \n可能包含重复元素。
    • \n
    • 这会影响到程序的时间复杂度吗?会有怎样的影响,为什么?
    • \n
    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic boolean search(int[] nums, int target) {\n\t\tint low = 0;\n\t\tint high = nums.length - 1;\n\t\twhile (low <= high) {\n\t\t\twhile (low < high && nums[low] == nums[low + 1]) {\n\t\t\t\tlow++;\n\t\t\t}\n\t\t\twhile (low < high && nums[high] == nums[high - 1]) {\n\t\t\t\thigh--;\n\t\t\t}\n\t\t\tint mid = (low + high) / 2;\n\t\t\tif (nums[mid] == target) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif (nums[mid] >= nums[0] && (target > nums[mid] || target < nums[0])) {\n\t\t\t\tlow = mid + 1;\n\t\t\t} else if (nums[mid] < nums[0] && target > nums[mid] && target < nums[0]) {\n\t\t\t\tlow = mid + 1;\n\t\t\t} else {\n\t\t\t\thigh = mid - 1;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-97b59f64908e447ca8f6cc62c7d69b2a", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600469924" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/48.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/48.exercises/config.json" new file mode 100644 index 000000000..59bfd25d6 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/48.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-0da11b12c20540a69a7df7f71bc052af", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/48.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/48.exercises/solution.json" new file mode 100644 index 000000000..4d93e605b --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/48.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "e619fbd7e7ed4861a730cf2a2b434ded", + "keywords": "数组,双指针", + "title": "删除有序数组中的重复项 II", + "desc": [ + { + "content": "\n

    给你一个有序数组 nums ,请你 原地 删除重复出现的元素,使每个元素 最多出现两次 ,返回删除后数组的新长度。

    \n

    不要使用额外的数组空间,你必须在 原地 修改输入数组 并在使用 O(1) 额外空间的条件下完成。

    \n

     

    \n

    说明:

    \n

    为什么返回数值是整数,但输出的答案是数组呢?

    \n

    请注意,输入数组是以「引用」方式传递的,这意味着在函数里修改输入数组对于调用者是可见的。

    \n

    你可以想象内部操作如下:

    \n
    \n// nums 是以“引用”方式传递的。也就是说,不对实参做任何拷贝\nint len = removeDuplicates(nums);// 在函数里修改输入数组对于调用者是可见的。\n// 根据你的函数返回的长度, 它会打印出数组中 该长度范围内 的所有元素。\nfor (int i = 0; i < len; i++) {\nprint(nums[i]);\n}
    \n

     

    \n

    示例 1:

    \n
    输入:nums = [1,1,1,2,2,3]
    输出:
    5, nums = [1,1,2,2,3]
    解释:
    函数应返回新长度 length = 5, 并且原数组的前五个元素被修改为 1, 1, 2, 2, 3 。 不需要考虑数组中超出新长度后面的元素。
    \n

    示例 2:

    \n
    输入:nums = [0,0,1,1,1,1,2,3,3]
    输出:
    7, nums = [0,0,1,1,2,3,3]
    解释:
    函数应返回新长度 length = 7, 并且原数组的前五个元素被修改为 0, 0, 1, 1, 2, 3, 3 。 不需要考虑数组中超出新长度后面的元素。
    \n

     

    \n

    提示:

    \n
      \n
    • 1 <= nums.length <= 3 * 104
    • \n
    • -104 <= nums[i] <= 104
    • \n
    • nums 已按升序排列
    • \n
    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic int removeDuplicates(int[] nums) {\n\t\tint i = 0;\n\t\tfor (int n : nums)\n\t\t\tif (i < 2 || n > nums[i - 2])\n\t\t\t\tnums[i++] = n;\n\t\treturn i;\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-0da11b12c20540a69a7df7f71bc052af", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470127" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/49.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/49.exercises/config.json" new file mode 100644 index 000000000..ee97f3e1c --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/49.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-a4f351932be94d9388ffb510d2ff8dc4", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/49.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/49.exercises/solution.json" new file mode 100644 index 000000000..a42cd8b59 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/49.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "7017d7f1a56842878210bfc80b093faa", + "keywords": "字符串,动态规划", + "title": "交错字符串", + "desc": [ + { + "content": "\n

    给定三个字符串 s1s2s3,请你帮忙验证 s3 是否是由 s1 和 s2 交错 组成的。

    两个字符串 st 交错 的定义与过程如下,其中每个字符串都会被分割成若干 非空 子字符串:

      \t
    • s = s1 + s2 + ... + sn
    • \t
    • t = t1 + t2 + ... + tm
    • \t
    • |n - m| <= 1
    • \t
    • 交错s1 + t1 + s2 + t2 + s3 + t3 + ... 或者 t1 + s1 + t2 + s2 + t3 + s3 + ...

    提示:a + b 意味着字符串 ab 连接。

     

    示例 1:

    \"\"
    输入:s1 = \"aabcc\", s2 = \"dbbca\", s3 = \"aadbbcbcac\"
    输出:
    true

    示例 2:

    输入:s1 = \"aabcc\", s2 = \"dbbca\", s3 = \"aadbbbaccc\"
    输出:
    false

    示例 3:

    输入:s1 = \"\", s2 = \"\", s3 = \"\"
    输出:
    true

     

    提示:

      \t
    • 0 <= s1.length, s2.length <= 100
    • \t
    • 0 <= s3.length <= 200
    • \t
    • s1s2、和 s3 都由小写英文字母组成
    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic boolean isInterleave(String s1, String s2, String s3) {\n\t\tif ((s1.length() + s2.length()) != s3.length())\n\t\t\treturn false;\n\t\tboolean[][] dp = new boolean[s2.length() + 1][s1.length() + 1];\n\t\tdp[0][0] = true;\n\t\tfor (int i = 1; i <= s1.length(); i++) {\n\t\t\tdp[0][i] = dp[0][i - 1] && s1.charAt(i - 1) == s3.charAt(i - 1) ? true : false;\n\t\t}\n\t\tfor (int i = 1; i <= s2.length(); i++) {\n\t\t\tdp[i][0] = dp[i - 1][0] && s2.charAt(i - 1) == s3.charAt(i - 1) ? true : false;\n\t\t}\n\t\tfor (int i = 1; i < dp.length; i++) {\n\t\t\tfor (int j = 1; j < dp[0].length; j++) {\n\t\t\t\tdp[i][j] = (dp[i][j - 1] && s1.charAt(j - 1) == s3.charAt(i + j - 1))\n\t\t\t\t\t\t|| (dp[i - 1][j] && s2.charAt(i - 1) == s3.charAt(i + j - 1));\n\t\t\t}\n\t\t}\n\t\treturn dp[s2.length()][s1.length()];\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-a4f351932be94d9388ffb510d2ff8dc4", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600471101" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/5.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/5.exercises/config.json" new file mode 100644 index 000000000..a1eeb8b2f --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/5.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-adbef0040dc440618bed1f48bef2c16c", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/5.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/5.exercises/solution.json" new file mode 100644 index 000000000..793b63e81 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/5.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "b156f0a0d59d4e3da115cc80043ef958", + "keywords": "算法高阶,字符串匹配,算法问题选编,利用有限自动机进行字符串匹配", + "title": "单词反转", + "desc": [ + { + "content": "\n随便输出一个字符串\nString str =\"45abc,+de==fg\";\n里面含有 abc,de,fg 三个单词\n怎么处理能让单词反转,其他顺序不变呢\n输出 “45cba,+ed==gf”;", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "public class HelloWorld {\n\tpublic static String revstr(String s) {\n\t\tchar[] ch = s.toCharArray();\n\t\tfor (int i = 0; i < ch.length; i++) {\n\t\t\tif ((ch[i] >= 'A' && ch[i] <= 'Z') || (ch[i] >= 'a' && ch[i] <= 'z')) {\n\t\t\t\tint j = i + 1;\n\t\t\t\twhile (j < ch.length && ((ch[j] >= 'A' && ch[j] <= 'Z') || (ch[j] >= 'a' && ch[j] <= 'z')))\n\t\t\t\t\tj++;\n\t\t\t\tj--;\n\t\t\t\tif (i != j) {\n\t\t\t\t\tfor (int k = i; k <= (j - i) / 2 + i; k++) {\n\t\t\t\t\t\tchar temp = ch[k];\n\t\t\t\t\t\tch[k] = ch[j - k + i];\n\t\t\t\t\t\tch[j - k + i] = temp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ti = j;\n\t\t\t}\n\t\t}\n\t\treturn new String(ch);\n\t}\n\tpublic static void main(String[] args) {\n\t\tSystem.out.println(revstr(\"45abc,+de==fg\"));\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-adbef0040dc440618bed1f48bef2c16c", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600469879" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/50.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/50.exercises/config.json" new file mode 100644 index 000000000..fdd1f2658 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/50.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-620f5bfe852e4cbd9ce5c2eb848eba27", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/50.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/50.exercises/solution.json" new file mode 100644 index 000000000..2ebf55bca --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/50.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "69fafd79ab244be48cf5e2d71def6ae6", + "keywords": "数组,排序", + "title": "合并区间", + "desc": [ + { + "content": "\n

    以数组 intervals 表示若干个区间的集合,其中单个区间为 intervals[i] = [starti, endi] 。请你合并所有重叠的区间,并返回一个不重叠的区间数组,该数组需恰好覆盖输入中的所有区间。

     

    示例 1:

    输入:intervals = [[1,3],[2,6],[8,10],[15,18]]
    输出:
    [[1,6],[8,10],[15,18]]
    解释:
    区间 [1,3] 和 [2,6] 重叠, 将它们合并为 [1,6].

    示例 2:

    输入:intervals = [[1,4],[4,5]]
    输出:
    [[1,5]]
    解释:
    区间 [1,4] 和 [4,5] 可被视为重叠区间。

     

    提示:

      \t
    • 1 <= intervals.length <= 104
    • \t
    • intervals[i].length == 2
    • \t
    • 0 <= starti <= endi <= 104
    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic int[][] merge(int[][] intervals) {\n\t\tList res = new ArrayList<>();\n\t\tif (intervals == null) {\n\t\t\treturn res.toArray(new int[0][]);\n\t\t}\n\t\tArrays.sort(intervals, (a, b) -> a[0] - b[0]);\n\t\tint i = 0;\n\t\tint left = 0;\n\t\tint right = 0;\n\t\twhile (i < intervals.length) {\n\t\t\tleft = intervals[i][0];\n\t\t\tright = intervals[i][1];\n\t\t\twhile (i < intervals.length - 1 && right >= intervals[i + 1][0]) {\n\t\t\t\ti++;\n\t\t\t\tright = Math.max(right, intervals[i][1]);\n\t\t\t}\n\t\t\tres.add(new int[] { left, right });\n\t\t\ti++;\n\t\t}\n\t\treturn res.toArray(new int[0][]);\n\t}\n}\n", + "language": "java" + }, + "node_id": "dailycode-620f5bfe852e4cbd9ce5c2eb848eba27", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600471018" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/51.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/51.exercises/config.json" new file mode 100644 index 000000000..9255041d3 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/51.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-7c1a5ad714c441d7a0ccdee3c819e4c6", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/51.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/51.exercises/solution.json" new file mode 100644 index 000000000..f99a35b09 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/51.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "7f235698f48c4268b1712d39303f1fef", + "keywords": "数组,双指针,排序", + "title": "三数之和", + "desc": [ + { + "content": "\n

    给你一个包含 n 个整数的数组 nums,判断 nums 中是否存在三个元素 a,b,c ,使得 a + b + c = 0 ?请你找出所有和为 0 且不重复的三元组。

    注意:答案中不可以包含重复的三元组。

     

    示例 1:

    输入:nums = [-1,0,1,2,-1,-4]
    输出:
    [[-1,-1,2],[-1,0,1]]

    示例 2:

    输入:nums = []
    输出:
    []

    示例 3:

    输入:nums = [0]
    输出:
    []

     

    提示:

      \t
    • 0 <= nums.length <= 3000
    • \t
    • -105 <= nums[i] <= 105
    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic List> threeSum(int[] nums) {\n\t\tArrays.sort(nums);\n\t\tList> result = new ArrayList<>();\n\t\tint cur, left, right;\n\t\tcur = 0;\n\t\twhile (cur < nums.length) {\n\t\t\tif (nums[cur] > 0)\n\t\t\t\tbreak;\n\t\t\tleft = cur + 1;\n\t\t\tright = nums.length - 1;\n\t\t\twhile (left < right) {\n\t\t\t\tint n = nums[cur] + nums[left] + nums[right];\n\t\t\t\tif (n == 0) {\n\t\t\t\t\tList r = new ArrayList();\n\t\t\t\t\tr.add(nums[cur]);\n\t\t\t\t\tr.add(nums[left]);\n\t\t\t\t\tr.add(nums[right]);\n\t\t\t\t\tresult.add(r);\n\t\t\t\t\tint t = left + 1;\n\t\t\t\t\twhile (t < right && nums[t] == nums[left])\n\t\t\t\t\t\tt++;\n\t\t\t\t\tleft = t;\n\t\t\t\t\tt = right - 1;\n\t\t\t\t\twhile (t > left && nums[t] == nums[right])\n\t\t\t\t\t\tt--;\n\t\t\t\t\tright = t;\n\t\t\t\t} else if (n > 0) {\n\t\t\t\t\tint t = right - 1;\n\t\t\t\t\twhile (t > left && nums[t] == nums[right])\n\t\t\t\t\t\tt--;\n\t\t\t\t\tright = t;\n\t\t\t\t} else {\n\t\t\t\t\tint t = left + 1;\n\t\t\t\t\twhile (t < right && nums[t] == nums[left])\n\t\t\t\t\t\tt++;\n\t\t\t\t\tleft = t;\n\t\t\t\t}\n\t\t\t}\n\t\t\tint t = cur + 1;\n\t\t\twhile (t < nums.length && nums[t] == nums[cur])\n\t\t\t\tt++;\n\t\t\tcur = t;\n\t\t}\n\t\treturn result;\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-7c1a5ad714c441d7a0ccdee3c819e4c6", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470113" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/52.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/52.exercises/config.json" new file mode 100644 index 000000000..5aed1087e --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/52.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-a51891de4bbd4992a1ca2d8d786bbc10", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/52.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/52.exercises/solution.json" new file mode 100644 index 000000000..d34cd4613 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/52.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "f90adb739a29462880a0c6fdb1b6bd49", + "keywords": "数学,字符串,模拟", + "title": "字符串相乘", + "desc": [ + { + "content": "\n

    给定两个以字符串形式表示的非负整数 num1 和 num2,返回 num1 和 num2 的乘积,它们的乘积也表示为字符串形式。

    示例 1:

    输入: num1 = "2", num2 = "3"
    输出:
    "6"

    示例 2:

    输入: num1 = "123", num2 = "456"
    输出:
    "56088"

    说明:

      \t
    1. num1 和 num2 的长度小于110。
    2. \t
    3. num1 和 num2 只包含数字 0-9
    4. \t
    5. num1 和 num2 均不以零开头,除非是数字 0 本身。
    6. \t
    7. 不能使用任何标准库的大数类型(比如 BigInteger)直接将输入转换为整数来处理
    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic String multiply(String num1, String num2) {\n\t\tif (num1.equals(\"0\") || num2.equals(\"0\"))\n\t\t\treturn \"0\";\n\n\t\tint m = num1.length();\n\t\tint n = num2.length();\n\n\t\tint[] intRes = new int[m + n - 1];\n\n\t\tfor (int i = 0; i < m; i++) {\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\tintRes[i + j] += (num1.charAt(i) - 48) * (num2.charAt(j) - 48);\n\t\t\t}\n\t\t}\n\n\t\tfor (int i = intRes.length - 1; i > 0; i--) {\n\t\t\tif (intRes[i] >= 10) {\n\t\t\t\tintRes[i - 1] += intRes[i] / 10;\n\t\t\t\tintRes[i] %= 10;\n\t\t\t}\n\t\t}\n\n\t\tString res = \"\";\n\t\tfor (int i = 0; i < intRes.length; i++) {\n\t\t\tres += String.valueOf(intRes[i]);\n\t\t}\n\t\treturn res;\n\t}\n}\n", + "language": "java" + }, + "node_id": "dailycode-a51891de4bbd4992a1ca2d8d786bbc10", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600471020" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/53.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/53.exercises/config.json" new file mode 100644 index 000000000..b83c0a638 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/53.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-c1da5b7b32894b2691bf58b40188b67c", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/53.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/53.exercises/solution.json" new file mode 100644 index 000000000..57e922f3d --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/53.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "865068ce13da4c65a64a67e89770cd65", + "keywords": "数组,双指针,排序", + "title": "最接近的三数之和", + "desc": [ + { + "content": "\n

    给定一个包括 n 个整数的数组 nums 和 一个目标值 target。找出 nums 中的三个整数,使得它们的和与 target 最接近。返回这三个数的和。假定每组输入只存在唯一答案。

     

    示例:

    输入:nums = [-1,2,1,-4], target = 1
    输出:
    2
    解释:
    与 target 最接近的和是 2 (-1 + 2 + 1 = 2) 。

     

    提示:

      \t
    • 3 <= nums.length <= 10^3
    • \t
    • -10^3 <= nums[i] <= 10^3
    • \t
    • -10^4 <= target <= 10^4
    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tint oneSumCloset(int[] nums, int i, int j, int start, int end, int target) {\n\t\tif (start == i || start == j)\n\t\t\tstart = start + 1;\n\t\tif (end == i || end == j)\n\t\t\tend = end - 1;\n\t\tif (start == end) {\n\t\t\treturn nums[start];\n\t\t} else if (end == start + 1 || end == start - 1) {\n\t\t\tif (Math.abs(nums[end] - target) > Math.abs(nums[start] - target)) {\n\t\t\t\treturn nums[start];\n\t\t\t} else {\n\t\t\t\treturn nums[end];\n\t\t\t}\n\t\t} else {\n\t\t\tint middle = (int) Math.floor((start + end) / 2);\n\t\t\tif (nums[middle] > target) {\n\t\t\t\tend = middle;\n\t\t\t} else {\n\t\t\t\tstart = middle;\n\t\t\t}\n\t\t\treturn oneSumCloset(nums, i, j, start, end, target);\n\t\t}\n\t}\n\tpublic int threeSumClosest(int[] nums, int target) {\n\t\tArrays.sort(nums);\n\t\tint minValue = 0;\n\t\tboolean hasMin = false;\n\t\tfor (int i = 0; i < nums.length - 2; i++) {\n\t\t\tfor (int j = i + 1; j < nums.length - 1; j++) {\n\t\t\t\tint twoSum = nums[i] + nums[j];\n\t\t\t\tint rest = target - twoSum;\n\t\t\t\tint restClost = oneSumCloset(nums, i, j, j + 1, nums.length - 1, rest);\n\t\t\t\tint newValue = restClost + twoSum;\n\t\t\t\t;\n\t\t\t\tif (!hasMin) {\n\t\t\t\t\tminValue = newValue;\n\t\t\t\t\thasMin = true;\n\t\t\t\t} else {\n\t\t\t\t\tint d1 = Math.abs(minValue - target);\n\t\t\t\t\tint d2 = Math.abs(newValue - target);\n\t\t\t\t\tif (d1 > d2) {\n\t\t\t\t\t\tminValue = newValue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn minValue;\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-c1da5b7b32894b2691bf58b40188b67c", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600471102" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/54.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/54.exercises/config.json" new file mode 100644 index 000000000..e2f906b11 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/54.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-6a33231763734cb28a58cca9e68d7ecd", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/54.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/54.exercises/solution.json" new file mode 100644 index 000000000..090da0d20 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/54.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "a32132b49f1d40f7aa942262349aa4be", + "keywords": "贪心,数组,动态规划", + "title": "跳跃游戏", + "desc": [ + { + "content": "\n

    给定一个非负整数数组 nums ,你最初位于数组的 第一个下标

    数组中的每个元素代表你在该位置可以跳跃的最大长度。

    判断你是否能够到达最后一个下标。

     

    示例 1:

    输入:nums = [2,3,1,1,4]
    输出:
    true
    解释:
    可以先跳 1 步,从下标 0 到达下标 1, 然后再从下标 1 跳 3 步到达最后一个下标。

    示例 2:

    输入:nums = [3,2,1,0,4]
    输出:
    false
    解释:
    无论怎样,总会到达下标为 3 的位置。但该下标的最大跳跃长度是 0 , 所以永远不可能到达最后一个下标。

     

    提示:

      \t
    • 1 <= nums.length <= 3 * 104
    • \t
    • 0 <= nums[i] <= 105
    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic boolean canJump(int[] nums) {\n\t\tboolean can = true;\n\t\tif (nums.length < 2) {\n\t\t\treturn can;\n\t\t}\n\t\tint n = nums.length;\n\t\tint stride = 1;\n\t\tfor (int i = n - 2; i >= 0; i--) {\n\t\t\tif (nums[i] < stride) {\n\t\t\t\tstride++;\n\t\t\t\tcan = false;\n\t\t\t} else {\n\t\t\t\tcan = true;\n\t\t\t\tstride = 1;\n\t\t\t}\n\t\t}\n\t\treturn can;\n\t}\n}\n", + "language": "java" + }, + "node_id": "dailycode-6a33231763734cb28a58cca9e68d7ecd", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470122" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/55.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/55.exercises/config.json" new file mode 100644 index 000000000..efc9e2adf --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/55.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-d433cef163fe4e2fbdf5bef441506da8", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/55.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/55.exercises/solution.json" new file mode 100644 index 000000000..c50ee94e8 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/55.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "0080108f11a948a9b13c5fd11952b680", + "keywords": "数组,回溯,矩阵", + "title": "单词搜索", + "desc": [ + { + "content": "\n

    给定一个 m x n 二维字符网格 board 和一个字符串单词 word 。如果 word 存在于网格中,返回 true ;否则,返回 false

    单词必须按照字母顺序,通过相邻的单元格内的字母构成,其中“相邻”单元格是那些水平相邻或垂直相邻的单元格。同一个单元格内的字母不允许被重复使用。

     

    示例 1:

    \"\"
    输入:board = [[\"A\",\"B\",\"C\",\"E\"],[\"S\",\"F\",\"C\",\"S\"],[\"A\",\"D\",\"E\",\"E\"]], word = \"ABCCED\"
    输出:
    true

    示例 2:

    \"\"
    输入:board = [[\"A\",\"B\",\"C\",\"E\"],[\"S\",\"F\",\"C\",\"S\"],[\"A\",\"D\",\"E\",\"E\"]], word = \"SEE\"
    输出:
    true

    示例 3:

    \"\"
    输入:board = [[\"A\",\"B\",\"C\",\"E\"],[\"S\",\"F\",\"C\",\"S\"],[\"A\",\"D\",\"E\",\"E\"]], word = \"ABCB\"
    输出:
    false

     

    提示:

      \t
    • m == board.length
    • \t
    • n = board[i].length
    • \t
    • 1 <= m, n <= 6
    • \t
    • 1 <= word.length <= 15
    • \t
    • boardword 仅由大小写英文字母组成

     

    进阶:你可以使用搜索剪枝的技术来优化解决方案,使其在 board 更大的情况下可以更快解决问题?

    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic boolean exist(char[][] board, String word) {\n\t\tint cl = board.length;\n\t\tint rl = board[0].length;\n\t\tboolean[][] flag = new boolean[cl][rl];\n\t\tfor (int i = 0; i < cl; i++) {\n\t\t\tfor (int j = 0; j < rl; j++) {\n\t\t\t\tif (find(board, word, flag, i, j, 0))\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tpublic boolean find(char[][] board, String word, boolean[][] flag, int i, int j, int index) {\n\t\tint cl = board.length;\n\t\tint rl = board[0].length;\n\t\tif (word.length() == index)\n\t\t\treturn true;\n\t\tif (i < 0 || i >= cl || j >= rl || j < 0)\n\t\t\treturn false;\n\t\tif (flag[i][j] || word.charAt(index) != board[i][j])\n\t\t\treturn false;\n\t\tflag[i][j] = true;\n\t\tboolean judge = find(board, word, flag, i - 1, j, index + 1) || find(board, word, flag, i + 1, j, index + 1)\n\t\t\t\t|| find(board, word, flag, i, j - 1, index + 1) || find(board, word, flag, i, j + 1, index + 1);\n\t\tflag[i][j] = false;\n\t\treturn judge;\n\n\t}\n}\n", + "language": "java" + }, + "node_id": "dailycode-d433cef163fe4e2fbdf5bef441506da8", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470927" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/56.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/56.exercises/config.json" new file mode 100644 index 000000000..7eb155517 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/56.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-7422725251434d6f802d5c3c67d3d8b2", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/56.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/56.exercises/solution.json" new file mode 100644 index 000000000..d02b79210 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/56.exercises/solution.json" @@ -0,0 +1,80 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "7ba666264c0047b5b2d260b9887a86d1", + "keywords": "树,深度优先搜索,二叉搜索树,二叉树", + "title": "验证二叉搜索树", + "desc": [ + { + "content": "\n
    \n

    给你一个二叉树的根节点 root ,判断其是否是一个有效的二叉搜索树。

    ", + "language": "markdown" + }, + { + "content": "\n

    有效 二叉搜索树定义如下:

    ", + "language": "markdown" + }, + { + "content": "\n
      \n
    • 节点的左子树只包含 小于 当前节点的数。
    • \n
    • 节点的右子树只包含 大于 当前节点的数。
    • \n
    • 所有左子树和右子树自身必须也是二叉搜索树。
    • \n
    ", + "language": "markdown" + }, + { + "content": "\n

     

    ", + "language": "markdown" + }, + { + "content": "\n

    示例 1:

    \n\"\"\n
    输入:root = [2,1,3]\n输出:true\n
    ", + "language": "markdown" + }, + { + "content": "\n

    示例 2:

    \n\"\"\n
    输入:root = [5,1,4,null,null,3,6]\n输出:false\n解释:根节点的值是 5 ,但是右子节点的值是 4 。\n
    ", + "language": "markdown" + }, + { + "content": "\n

     

    ", + "language": "markdown" + }, + { + "content": "\n

    提示:

    ", + "language": "markdown" + }, + { + "content": "\n
      \n
    • 树中节点数目范围在[1, 104]
    • \n
    • -231 <= Node.val <= 231 - 1
    • \n
    \n
    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "\npublic class TreeNode {\n\tint val;\n\tTreeNode left;\n\tTreeNode right;\n\n\tTreeNode(int x) {\n\t\tval = x;\n\t}\n}\n\nclass Solution {\n\tpublic boolean isValidBST(TreeNode root) {\n\n\t\tif (root == null)\n\t\t\treturn true;\n\t\tif (root.left == null && root.right == null) {\n\t\t\treturn true;\n\t\t}\n\t\tif (root.left != null) {\n\t\t\tTreeNode cur = root.left;\n\t\t\twhile (cur.right != null) {\n\t\t\t\tcur = cur.right;\n\t\t\t}\n\t\t\tif (cur.val >= root.val) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tif (root.right != null) {\n\t\t\tTreeNode cur = root.right;\n\t\t\twhile (cur.left != null) {\n\t\t\t\tcur = cur.left;\n\t\t\t}\n\t\t\tif (cur.val <= root.val) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tboolean left = isValidBST(root.left);\n\t\tboolean right = isValidBST(root.right);\n\n\t\treturn left && right;\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-7422725251434d6f802d5c3c67d3d8b2", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600469827" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/57.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/57.exercises/config.json" new file mode 100644 index 000000000..d0afe9ded --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/57.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-6007336fac224f659d45e9b3829c6726", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/57.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/57.exercises/solution.json" new file mode 100644 index 000000000..d4b62e60a --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/57.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "8ce93ea1bbcc46d3802dac945e1bb600", + "keywords": "链表,双指针", + "title": "删除排序链表中的重复元素 II", + "desc": [ + { + "content": "\n

    存在一个按升序排列的链表,给你这个链表的头节点 head ,请你删除链表中所有存在数字重复情况的节点,只保留原始链表中 没有重复出现 的数字。

    返回同样按升序排列的结果链表。

     

    示例 1:

    \"\"
    输入:head = [1,2,3,3,4,4,5]
    输出:
    [1,2,5]

    示例 2:

    \"\"
    输入:head = [1,1,1,2,3]
    输出:
    [2,3]

     

    提示:

      \t
    • 链表中节点数目在范围 [0, 300]
    • \t
    • -100 <= Node.val <= 100
    • \t
    • 题目数据保证链表已经按升序排列
    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "public class ListNode {\n\tint val;\n\tListNode next;\n\tListNode(int x) { val = x; }\n}\nclass Solution {\n\tpublic ListNode deleteDuplicates(ListNode head) {\n\t\tif (head == null || head.next == null) {\n\t\t\treturn head;\n\t\t}\n\t\tListNode next = head.next;\n\t\tif (head.val == next.val) {\n\t\t\twhile (next != null && head.val == next.val) {\n\t\t\t\tnext = next.next;\n\t\t\t}\n\t\t\thead = deleteDuplicates(next);\n\t\t} else {\n\t\t\thead.next = deleteDuplicates(next);\n\t\t}\n\t\treturn head;\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-6007336fac224f659d45e9b3829c6726", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470128" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/58.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/58.exercises/config.json" new file mode 100644 index 000000000..62b58d691 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/58.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-bcd5c08f84344295bc2f185d6944f7c2", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/58.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/58.exercises/solution.json" new file mode 100644 index 000000000..886526ce1 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/58.exercises/solution.json" @@ -0,0 +1,104 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "1f3bdab9bd094d6e911da6bcb99cc804", + "keywords": "字符串", + "title": "Z 字形变换", + "desc": [ + { + "content": "\n
    \n

    将一个给定字符串 s 根据给定的行数 numRows ,以从上往下、从左到右进行 Z 字形排列。

    ", + "language": "markdown" + }, + { + "content": "\n

    比如输入字符串为 \"PAYPALISHIRING\" 行数为 3 时,排列如下:

    ", + "language": "markdown" + }, + { + "content": "\n
    \nP   A   H   N\nA P L S I I G\nY   I   R
    ", + "language": "markdown" + }, + { + "content": "\n

    之后,你的输出需要从左往右逐行读取,产生出一个新的字符串,比如:\"PAHNAPLSIIGYIR\"

    ", + "language": "markdown" + }, + { + "content": "\n

    请你实现这个将字符串进行指定行数变换的函数:

    ", + "language": "markdown" + }, + { + "content": "\n
    string convert(string s, int numRows);
    ", + "language": "markdown" + }, + { + "content": "\n

     

    ", + "language": "markdown" + }, + { + "content": "\n

    示例 1:

    ", + "language": "markdown" + }, + { + "content": "\n
    输入:s = \"PAYPALISHIRING\", numRows = 3\n输出:\"PAHNAPLSIIGYIR\"\n
    \n示例 2:", + "language": "markdown" + }, + { + "content": "\n
    输入:s = \"PAYPALISHIRING\", numRows = 4\n输出:\"PINALSIGYAHRPI\"\n解释:\nP     I    N\nA   L S  I G\nY A   H R\nP     I\n
    ", + "language": "markdown" + }, + { + "content": "\n

    示例 3:

    ", + "language": "markdown" + }, + { + "content": "\n
    输入:s = \"A\", numRows = 1\n输出:\"A\"\n
    ", + "language": "markdown" + }, + { + "content": "\n

     

    ", + "language": "markdown" + }, + { + "content": "\n

    提示:

    ", + "language": "markdown" + }, + { + "content": "\n
      \n
    • 1 <= s.length <= 1000
    • \n
    • s 由英文字母(小写和大写)、',''.' 组成
    • \n
    • 1 <= numRows <= 1000
    • \n
    \n
    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic String convert(String s, int numRows) {\n\t\tif (numRows == 1)\n\t\t\treturn s;\n\t\tint len = s.length();\n\t\tif (len <= numRows)\n\t\t\treturn s;\n\t\tint cycle_len = 2 * numRows - 2;\n\t\tint full_cycles = len / cycle_len;\n\t\tint left = len % cycle_len;\n\t\tStringBuilder r = new StringBuilder();\n\t\tint i;\n\t\tfor (i = 0; i < full_cycles; ++i) {\n\t\t\tr.append(s.charAt(i * cycle_len));\n\t\t}\n\t\tif (left > 0) {\n\t\t\tr.append(s.charAt(i * cycle_len));\n\t\t}\n\t\tfor (i = 0; i < numRows - 2; ++i) {\n\t\t\tint j;\n\t\t\tfor (j = 0; j < full_cycles; ++j) {\n\t\t\t\tr.append(s.charAt(j * cycle_len + i + 1));\n\t\t\t\tr.append(s.charAt(j * cycle_len + i + 1 + cycle_len - 2 * (i + 1)));\n\t\t\t}\n\t\t\tif (left > 0) {\n\t\t\t\tif (j * cycle_len + i + 1 < len)\n\t\t\t\t\tr.append(s.charAt(j * cycle_len + i + 1));\n\t\t\t\tif (j * cycle_len + i + 1 + cycle_len - 2 * (i + 1) < len)\n\t\t\t\t\tr.append(s.charAt(j * cycle_len + i + 1 + cycle_len - 2 * (i + 1)));\n\t\t\t}\n\t\t}\n\t\tfor (i = 0; i < full_cycles; ++i)\n\t\t\tr.append(s.charAt(i * cycle_len + numRows - 1));\n\t\tif (left >= numRows)\n\t\t\tr.append(s.charAt(i * cycle_len + numRows - 1));\n\t\treturn r.toString();\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-bcd5c08f84344295bc2f185d6944f7c2", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600469917" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/59.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/59.exercises/config.json" new file mode 100644 index 000000000..0bcd40a8b --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/59.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-16ecbc0a44ff4036aaf4be01fd07e40f", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/59.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/59.exercises/solution.json" new file mode 100644 index 000000000..bfaaff72c --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/59.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "b7ff6789440e4fdabdd0841c6adb97e6", + "keywords": "数组,回溯", + "title": "组合总和 II", + "desc": [ + { + "content": "\n

    给定一个数组 candidates 和一个目标数 target ,找出 candidates 中所有可以使数字和为 target 的组合。\n

    \n

    candidates 中的每个数字在每个组合中只能使用一次。

    \n

    说明:

    \n
      \n
    • 所有数字(包括目标数)都是正整数。
    • \n
    • 解集不能包含重复的组合。 
    • \n
    \n

    示例 1:

    \n
    输入: candidates = [10,1,2,7,6,1,5], target = 8,
    所求解集为:
    [[1, 7],[1, 2, 5],[2, 6],[1, 1, 6]]
    \n

    示例 2:

    \n
    输入: candidates = [2,5,2,1,2], target = 5,
    所求解集为:
    [[1,2,2],[5]]
    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic List> combinationSum2(int[] candidates, int target) {\n\t\tArrays.sort(candidates);\n\t\tList> res = new ArrayList>();\n\t\tif (candidates.length == 0 || target < candidates[0])\n\t\t\treturn res;\n\t\tList tmp = new ArrayList();\n\t\thelper(candidates, target, 0, tmp, res);\n\t\treturn res;\n\t}\n\n\tpublic void helper(int[] a, int target, int start, List tmp, List> res) {\n\t\tif (target < 0)\n\t\t\treturn;\n\t\tif (target == 0) {\n\t\t\tres.add(new ArrayList(tmp));\n\t\t\treturn;\n\t\t}\n\t\tfor (int i = start; i < a.length; i++) {\n\t\t\ttmp.add(a[i]);\n\t\t\tint newtarget = target - a[i];\n\t\t\thelper(a, newtarget, i + 1, tmp, res);\n\t\t\ttmp.remove(tmp.size() - 1);\n\t\t\tif (newtarget <= 0)\n\t\t\t\tbreak;\n\t\t\twhile (i + 1 < a.length && a[i] == a[i + 1])// 组合中有重复元素,不要重复开头\n\t\t\t\ti++;\n\t\t}\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-16ecbc0a44ff4036aaf4be01fd07e40f", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470928" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/6.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/6.exercises/config.json" new file mode 100644 index 000000000..16eb0cadf --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/6.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-77a803dcb98440b7a136a24276b6854d", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/6.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/6.exercises/solution.json" new file mode 100644 index 000000000..63dacce07 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/6.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "51c26bca89994c5ba6ce2432f84304ee", + "keywords": "树,深度优先搜索,二叉搜索树,二叉树", + "title": "恢复二叉搜索树", + "desc": [ + { + "content": "\n

    给你二叉搜索树的根节点 root ,该树中的两个节点被错误地交换。请在不改变其结构的情况下,恢复这棵树。

    进阶:使用 O(n) 空间复杂度的解法很容易实现。你能想出一个只使用常数空间的解决方案吗?

     

    示例 1:

    \"\"
    输入:root = [1,3,null,null,2]
    输出:
    [3,1,null,null,2]
    解释:
    3 不能是 1 左孩子,因为 3 > 1 。交换 1 和 3 使二叉搜索树有效。

    示例 2:

    \"\"
    输入:root = [3,1,4,null,null,2]
    输出:
    [2,1,4,null,null,3]
    解释:
    2 不能在 3 的右子树中,因为 2 < 3 。交换 2 和 3 使二叉搜索树有效。

     

    提示:

      \t
    • 树上节点的数目在范围 [2, 1000]
    • \t
    • -231 <= Node.val <= 231 - 1
    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "public class TreeNode {\n\tint val;\n\tTreeNode left;\n\tTreeNode right;\n\n\tTreeNode() {\n\t}\n\n\tTreeNode(int val) {\n\t\tthis.val = val;\n\t}\n\n\tTreeNode(int val, TreeNode left, TreeNode right) {\n\t\tthis.val = val;\n\t\tthis.left = left;\n\t\tthis.right = right;\n\t}\n}\n\nclass Solution {\n\tTreeNode t1, t2, pre;\n\n\tpublic void recoverTree(TreeNode root) {\n\t\tinorder(root);\n\t\tint temp = t1.val;\n\t\tt1.val = t2.val;\n\t\tt2.val = temp;\n\t}\n\n\tpublic void inorder(TreeNode root) {\n\t\tif (root == null)\n\t\t\treturn;\n\t\tinorder(root.left);\n\t\tif (pre != null && pre.val > root.val) {\n\t\t\tif (t1 == null)\n\t\t\t\tt1 = pre;\n\t\t\tt2 = root;\n\t\t}\n\t\tpre = root;\n\t\tinorder(root.right);\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-77a803dcb98440b7a136a24276b6854d", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470826" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/60.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/60.exercises/config.json" new file mode 100644 index 000000000..be81f0174 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/60.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-b6ed4d3d6d31409fb7f1fcc072ce4295", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/60.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/60.exercises/solution.json" new file mode 100644 index 000000000..a2b6a5478 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/60.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "b978d7fd3bbc475ca00fd3b34424ba02", + "keywords": "数组,矩阵,模拟", + "title": "螺旋矩阵 II", + "desc": [ + { + "content": "\n

    给你一个正整数 n ,生成一个包含 1 到 n2 所有元素,且元素按顺时针顺序螺旋排列的 n x n 正方形矩阵 matrix

     

    示例 1:

    \"\"
    输入:n = 3
    输出:
    [[1,2,3],[8,9,4],[7,6,5]]

    示例 2:

    输入:n = 1
    输出:
    [[1]]

     

    提示:

      \t
    • 1 <= n <= 20
    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "package LeetCode;\n\npublic class GenerateMatrix {\n\tpublic int[][] generateMatrix(int n) {\n\t\tint[][] res = new int[n][n];\n\t\tif (n == 0) {\n\t\t\treturn res;\n\t\t}\n\t\tint left = 0;\n\t\tint right = n - 1;\n\t\tint up = 0;\n\t\tint down = n - 1;\n\t\tint i = 1;\n\t\twhile (i <= n * n) {\n\n\t\t\tfor (int col = left; col <= right; col++) {\n\t\t\t\tres[up][col] = i;\n\t\t\t\ti++;\n\t\t\t}\n\n\t\t\tup++;\n\t\t\tif (i <= n * n) {\n\t\t\t\tfor (int j = up; j <= down; j++) {\n\t\t\t\t\tres[j][right] = i;\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t\tright--;\n\t\t\t}\n\t\t\tif (i <= n * n) {\n\t\t\t\tfor (int j = right; j >= left; j--) {\n\t\t\t\t\tres[down][j] = i;\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t\tdown--;\n\t\t\t}\n\t\t\tif (i <= n * n) {\n\t\t\t\tfor (int j = down; j >= up; j--) {\n\t\t\t\t\tres[j][left] = i;\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t\tleft++;\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}\n\n\tpublic static void main(String[] args) {\n\t\tGenerateMatrix a = new GenerateMatrix();\n\t\ta.generateMatrix(3);\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-b6ed4d3d6d31409fb7f1fcc072ce4295", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470226" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/61.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/61.exercises/config.json" new file mode 100644 index 000000000..65d58c248 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/61.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-06dec96ef4e941b5b10c3a4feae74ddb", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/61.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/61.exercises/solution.json" new file mode 100644 index 000000000..bea9fa981 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/61.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "eb4ac806d99843129fee885ae9dcf5b0", + "keywords": "递归,链表", + "title": "两两交换链表中的节点", + "desc": [ + { + "content": "\n

    给定一个链表,两两交换其中相邻的节点,并返回交换后的链表。

    你不能只是单纯的改变节点内部的值,而是需要实际的进行节点交换。

     

    示例 1:

    \"\"
    输入:head = [1,2,3,4]
    输出:
    [2,1,4,3]

    示例 2:

    输入:head = []
    输出:
    []

    示例 3:

    输入:head = [1]
    输出:
    [1]

     

    提示:

      \t
    • 链表中节点的数目在范围 [0, 100]
    • \t
    • 0 <= Node.val <= 100

     

    进阶:你能在不修改链表节点值的情况下解决这个问题吗?(也就是说,仅修改节点本身。)

    ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "public class ListNode {\n\tint val;\n\tListNode next;\n\tListNode(int x) {\n\t\tval = x;\n\t}\n}\nclass Solution {\n\tpublic ListNode swapPairs(ListNode head) {\n\t\tListNode list1 = new ListNode(0);\n\t\tlist1.next = head;\n\t\tListNode list2 = list1;\n\t\twhile (head != null && head.next != null) {\n\t\t\tlist2.next = head.next;\n\t\t\thead.next = list2.next.next;\n\t\t\tlist2.next.next = head;\n\t\t\tlist2 = list2.next.next;\n\t\t\thead = list2.next;\n\t\t}\n\t\treturn list1.next;\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-06dec96ef4e941b5b10c3a4feae74ddb", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470117" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/62.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/62.exercises/config.json" new file mode 100644 index 000000000..7375e602d --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/62.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-ed11e080bba44d2bb7ec98bbddac3ffc", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/62.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/62.exercises/solution.json" new file mode 100644 index 000000000..a98677b64 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/62.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "cc85402dd5174c09af33e29f6f8909c4", + "keywords": "数组,双指针,排序", + "title": "颜色分类", + "desc": [ + { + "content": "\n

    给定一个包含红色、白色和蓝色,一共 n 个元素的数组,原地对它们进行排序,使得相同颜色的元素相邻,并按照红色、白色、蓝色顺序排列。

    此题中,我们使用整数 0、 12 分别表示红色、白色和蓝色。

       

      示例 1:

      输入:nums = [2,0,2,1,1,0]
      输出:
      [0,0,1,1,2,2]

      示例 2:

      输入:nums = [2,0,1]
      输出:
      [0,1,2]

      示例 3:

      输入:nums = [0]
      输出:
      [0]

      示例 4:

      输入:nums = [1]
      输出:
      [1]

       

      提示:

        \t
      • n == nums.length
      • \t
      • 1 <= n <= 300
      • \t
      • nums[i]012

       

      进阶:

        \t
      • 你可以不使用代码库中的排序函数来解决这道题吗?
      • \t
      • 你能想出一个仅使用常数空间的一趟扫描算法吗?
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic void sortColors(int[] nums) {\n\t\tint low = 0, high = nums.length - 1;\n\t\tint i = 0;\n\t\twhile (i <= high) {\n\t\t\tif (nums[i] == 0) {\n\t\t\t\tint tmp = nums[i];\n\t\t\t\tnums[i] = nums[low];\n\t\t\t\tnums[low] = tmp;\n\t\t\t\t++low;\n\t\t\t\t++i;\n\t\t\t} else if (nums[i] == 1) {\n\t\t\t\t++i;\n\t\t\t} else if (i <= high && nums[i] == 2) {\n\t\t\t\tint tmp = nums[i];\n\t\t\t\tnums[i] = nums[high];\n\t\t\t\tnums[high] = tmp;\n\t\t\t\t--high;\n\t\t\t}\n\t\t}\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-ed11e080bba44d2bb7ec98bbddac3ffc", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470126" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/63.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/63.exercises/config.json" new file mode 100644 index 000000000..51f0513c7 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/63.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-da11ba53a9bb4e6b8880a2cd184933d4", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/63.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/63.exercises/solution.json" new file mode 100644 index 000000000..54e930a2d --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/63.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "9ce6c7c1b6dc41de8dad7206025b89ae", + "keywords": "数组,动态规划,矩阵", + "title": "不同路径 II", + "desc": [ + { + "content": "\n

      一个机器人位于一个 m x n 网格的左上角 (起始点在下图中标记为“Start” )。

      \n

      机器人每次只能向下或者向右移动一步。机器人试图达到网格的右下角(在下图中标记为“Finish”)。

      \n

      现在考虑网格中有障碍物。那么从左上角到右下角将会有多少条不同的路径?

      \n

      \n

      网格中的障碍物和空位置分别用 10 来表示。

      \n

       

      \n

      示例 1:

      \"\"\nsrc=\"https://cdn.jsdelivr.net/gh/doocs/leetcode@main/solution/0000-0099/0063.Unique%20Paths%20II/images/robot1.jpg\"\nstyle=\"width:\n
      输入:obstacleGrid = [[0,0,0],[0,1,0],[0,0,0]]
      输出:
      2
      解释:
      3x3 网格的正中间有一个障碍物。从左上角到右下角一共有 2 条不同的路径:
      1. 向右 -> 向右 -> 向下 -> 向下
      2. 向下 -> 向下 -> 向右 -> 向右
      \n

      示例 2:

      \"\"\nsrc=\"https://cdn.jsdelivr.net/gh/doocs/leetcode@main/solution/0000-0099/0063.Unique%20Paths%20II/images/robot2.jpg\"\nstyle=\"width:\n
      输入:obstacleGrid = [[0,1],[0,0]]
      输出:
      1
      \n

       

      \n

      提示:

      \n
        \n
      • m == obstacleGrid.length
      • \n
      • n == obstacleGrid[i].length
      • \n
      • 1 <= m, n <= 100
      • \n
      • obstacleGrid[i][j]01
      • \n
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "public class Solution {\n\tpublic int uniquePathsWithObstacles(int[][] obstacleGrid) {\n\t\tint m = obstacleGrid.length;\n\t\tint n = obstacleGrid[0].length;\n\t\tif (obstacleGrid[0][0] == 1) {\n\t\t\treturn 0;\n\t\t} else if (m == 1 && n == 1) {\n\t\t\treturn 1;\n\t\t}\n\t\tint[][] paths = new int[m][n];\n\t\tfor (int i = 0; i < m; ++i) {\n\t\t\tif (obstacleGrid[i][0] == 1) {\n\t\t\t\twhile (i < m) {\n\t\t\t\t\tpaths[i][0] = 0;\n\t\t\t\t\t++i;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tpaths[i][0] = 1;\n\t\t\t}\n\t\t}\n\t\tfor (int j = 1; j < n; ++j) {\n\t\t\tif (obstacleGrid[0][j] == 1) {\n\t\t\t\twhile (j < n) {\n\t\t\t\t\tpaths[0][j] = 0;\n\t\t\t\t\t++j;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tpaths[0][j] = 1;\n\t\t\t}\n\t\t}\n\t\tfor (int i = 1; i < m; ++i)\n\t\t\tfor (int j = 1; j < n; ++j) {\n\t\t\t\tif (obstacleGrid[i][j] == 1) {\n\t\t\t\t\tpaths[i][j] = 0;\n\t\t\t\t} else {\n\t\t\t\t\tpaths[i][j] = paths[i][j - 1] + paths[i - 1][j];\n\t\t\t\t}\n\t\t\t}\n\t\treturn paths[m - 1][n - 1];\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-da11ba53a9bb4e6b8880a2cd184933d4", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600470123" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/64.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/64.exercises/config.json" new file mode 100644 index 000000000..ee60371bd --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/64.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-56e99b722b5641bc884da20f47a9386f", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/64.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/64.exercises/solution.json" new file mode 100644 index 000000000..d6266c11e --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/64.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "aced446ee0d3416997ee08d685f70cb0", + "keywords": "数组,哈希表,矩阵", + "title": "有效的数独", + "desc": [ + { + "content": "\n

      请你判断一个 9x9 的数独是否有效。只需要 根据以下规则 ,验证已经填入的数字是否有效即可。

      \n
        \n
      1. 数字 1-9 在每一行只能出现一次。
      2. \n
      3. 数字 1-9 在每一列只能出现一次。
      4. \n
      5. 数字 1-9 在每一个以粗实线分隔的 3x3 宫内只能出现一次。(请参考示例图)
      6. \n
      \n

      数独部分空格内已填入了数字,空白格用 '.' 表示。

      \n

      注意:

      \n
        \n
      • 一个有效的数独(部分已被填充)不一定是可解的。
      • \n
      • 只需要根据以上规则,验证已经填入的数字是否有效即可。
      • \n
      \n

       

      \n

      示例 1:

      \n
      输入:board = \n[[\"5\",\"3\",\".\",\".\",\"7\",\".\",\".\",\".\",\".\"]\n,[\"6\",\".\",\".\",\"1\",\"9\",\"5\",\".\",\".\",\".\"]\n,[\".\",\"9\",\"8\",\".\",\".\",\".\",\".\",\"6\",\".\"]\n,[\"8\",\".\",\".\",\".\",\"6\",\".\",\".\",\".\",\"3\"]\n,[\"4\",\".\",\".\",\"8\",\".\",\"3\",\".\",\".\",\"1\"]\n,[\"7\",\".\",\".\",\".\",\"2\",\".\",\".\",\".\",\"6\"]\n,[\".\",\"6\",\".\",\".\",\".\",\".\",\"2\",\"8\",\".\"]\n,[\".\",\".\",\".\",\"4\",\"1\",\"9\",\".\",\".\",\"5\"]\n,[\".\",\".\",\".\",\".\",\"8\",\".\",\".\",\"7\",\"9\"]]\n输出:true\n
      \n

      示例 2:

      \n
      输入:board = \n[[\"8\",\"3\",\".\",\".\",\"7\",\".\",\".\",\".\",\".\"]\n,[\"6\",\".\",\".\",\"1\",\"9\",\"5\",\".\",\".\",\".\"]\n,[\".\",\"9\",\"8\",\".\",\".\",\".\",\".\",\"6\",\".\"]\n,[\"8\",\".\",\".\",\".\",\"6\",\".\",\".\",\".\",\"3\"]\n,[\"4\",\".\",\".\",\"8\",\".\",\"3\",\".\",\".\",\"1\"]\n,[\"7\",\".\",\".\",\".\",\"2\",\".\",\".\",\".\",\"6\"]\n,[\".\",\"6\",\".\",\".\",\".\",\".\",\"2\",\"8\",\".\"]\n,[\".\",\".\",\".\",\"4\",\"1\",\"9\",\".\",\".\",\"5\"]\n,[\".\",\".\",\".\",\".\",\"8\",\".\",\".\",\"7\",\"9\"]]\n输出:false\n解释:除了第一行的第一个数字从 5 改为 8 以外,空格内其他数字均与 示例1 相同。 但由于位于左上角的 3x3 宫内有两个 8 存在, 因此这个数独是无效的。
      \n

       

      \n

      提示:

      \n
        \n
      • board.length == 9
      • \n
      • board[i].length == 9
      • \n
      • board[i][j] 是一位数字或者 '.'
      • \n
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic boolean isValidSudoku(char[][] board) {\n\t\tboolean[][] row = new boolean[9][9];\n\t\tboolean[][] col = new boolean[9][9];\n\t\tboolean[][] block = new boolean[9][9];\n\t\tfor (int i = 0; i < 9; i++) {\n\t\t\tfor (int j = 0; j < 9; j++) {\n\t\t\t\tif (board[i][j] != '.') {\n\t\t\t\t\tint num = board[i][j] - '1';\n\t\t\t\t\tint blockIndex = i / 3 * 3 + j / 3;\n\t\t\t\t\tif (row[i][num] || col[j][num] || block[blockIndex][num]) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\trow[i][num] = true;\n\t\t\t\t\t\tcol[j][num] = true;\n\t\t\t\t\t\tblock[blockIndex][num] = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-56e99b722b5641bc884da20f47a9386f", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600469920" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/7.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/7.exercises/config.json" new file mode 100644 index 000000000..894c5218b --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/7.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-9d0fc0cf99704e4684d62717fcf0025e", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/7.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/7.exercises/solution.json" new file mode 100644 index 000000000..f9c6445e0 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/7.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "27b64952c3664c57937b088669d428f6", + "keywords": "位运算,数组,回溯", + "title": "子集", + "desc": [ + { + "content": "\n

      给你一个整数数组 nums ,数组中的元素 互不相同 。返回该数组所有可能的子集(幂集)。

      解集 不能 包含重复的子集。你可以按 任意顺序 返回解集。

       

      示例 1:

      输入:nums = [1,2,3]
      输出:
      [[],[1],[2],[1,2],[3],[1,3],[2,3],[1,2,3]]

      示例 2:

      输入:nums = [0]
      输出:
      [[],[0]]

       

      提示:

        \t
      • 1 <= nums.length <= 10
      • \t
      • -10 <= nums[i] <= 10
      • \t
      • nums 中的所有元素 互不相同
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic List> subsets(int[] nums) {\n\t\tList> res = new ArrayList>();\n\t\tList tmp = new ArrayList<>();\n\t\tres.add(tmp);\n\t\tif (nums.length == 0)\n\t\t\treturn res;\n\t\thelper(nums, 0, tmp, res);\n\t\treturn res;\n\t}\n\n\tpublic void helper(int[] nums, int start, List tmp, List> res) {\n\t\tfor (int i = start; i < nums.length; i++) {\n\t\t\ttmp.add(nums[i]);\n\t\t\thelper(nums, i + 1, tmp, res);\n\t\t\tres.add(new ArrayList(tmp));\n\t\t\ttmp.remove(tmp.size() - 1);\n\t\t}\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-9d0fc0cf99704e4684d62717fcf0025e", + "license": "csdn.net", + "created_at": 1637894158, + "topic_link": "https://bbs.csdn.net/topics/600469824" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/8.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/8.exercises/config.json" new file mode 100644 index 000000000..c67ff8b37 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/8.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-21945d925ace44438887c1e03e5fa8ca", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/8.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/8.exercises/solution.json" new file mode 100644 index 000000000..893b98ab5 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/8.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "0d48d2626c8148519dfce95b56830925", + "keywords": "数学,动态规划,组合数学", + "title": "不同路径", + "desc": [ + { + "content": "\n

      一个机器人位于一个 m x n 网格的左上角 (起始点在下图中标记为 “Start” )。

      \n

      机器人每次只能向下或者向右移动一步。机器人试图达到网格的右下角(在下图中标记为 “Finish” )。

      \n

      问总共有多少条不同的路径?

      \n

       

      \n

      示例 1:

      \n
      输入:m = 3, n = 7
      输出:
      28
      \n

      示例 2:

      \n
      输入:m = 3, n = 2
      输出:
      3
      解释:
      从左上角开始,总共有 3 条路径可以到达右下角。
      1. 向右 -> 向下 -> 向下
      2. 向下 -> 向下 -> 向右
      3. 向下 -> 向右 -> 向下
      \n

      示例 3:

      \n
      输入:m = 7, n = 3
      输出:
      28
      \n

      示例 4:

      \n
      输入:m = 3, n = 3
      输出:
      6
      \n

       

      \n

      提示:

      \n
        \n
      • 1 <= m, n <= 100
      • \n
      • 题目数据保证答案小于等于 2 * 109
      • \n
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic int uniquePaths(int m, int n) {\n\t\tint[][] route = new int[m][n];\n\t\tfor (int i = 0; i < m; i++) {\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\tif (i == 0 || j == 0) {\n\t\t\t\t\troute[i][j] = 1;\n\t\t\t\t} else {\n\t\t\t\t\troute[i][j] = route[i - 1][j] + route[i][j - 1];\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn route[m - 1][n - 1];\n\t}\n}\n", + "language": "java" + }, + "node_id": "dailycode-21945d925ace44438887c1e03e5fa8ca", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600469822" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/9.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/9.exercises/config.json" new file mode 100644 index 000000000..c2d19b7ca --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/9.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-cdfa1a7c19ef4e879fcab664e5c47371", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/9.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/9.exercises/solution.json" new file mode 100644 index 000000000..a394f2b7f --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/2.java/9.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "442117a940ec48eb9cd2269475ae2a1d", + "keywords": "哈希表,字符串,回溯", + "title": "电话号码的字母组合", + "desc": [ + { + "content": "\n

      给定一个仅包含数字 2-9 的字符串,返回所有它能表示的字母组合。答案可以按 任意顺序 返回。

      给出数字到字母的映射如下(与电话按键相同)。注意 1 不对应任何字母。

       

      示例 1:

      输入:digits = \"23\"
      输出:
      [\"ad\",\"ae\",\"af\",\"bd\",\"be\",\"bf\",\"cd\",\"ce\",\"cf\"]

      示例 2:

      输入:digits = \"\"
      输出:
      []

      示例 3:

      输入:digits = \"2\"
      输出:
      [\"a\",\"b\",\"c\"]

       

      提示:

        \t
      • 0 <= digits.length <= 4
      • \t
      • digits[i] 是范围 ['2', '9'] 的一个数字。
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic List letterCombinations(String digits) {\n\t\tCharacter[][] letters = { {}, {}, { 'a', 'b', 'c' }, { 'd', 'e', 'f' }, { 'g', 'h', 'i' }, { 'j', 'k', 'l' },\n\t\t\t\t{ 'm', 'n', 'o' }, { 'p', 'q', 'r', 's' }, { 't', 'u', 'v' }, { 'w', 'x', 'y', 'z' }, };\n\t\tList> combinations = new ArrayList<>();\n\t\tfor (int i = 0; i < digits.length(); i++) {\n\t\t\tCharacter d = digits.charAt(i);\n\t\t\tint index = Character.getNumericValue(d);\n\t\t\tCharacter[] letter = letters[index];\n\t\t\tSystem.out.println(d);\n\t\t\tif (i == 0) {\n\t\t\t\tfor (int j = 0; j < letter.length; j++) {\n\t\t\t\t\tList c = new ArrayList<>();\n\t\t\t\t\tc.add(letter[j]);\n\t\t\t\t\tcombinations.add(c);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tList> added = new ArrayList<>();\n\t\t\t\tfor (int j = 0; j < combinations.size(); j++) {\n\t\t\t\t\tList c = combinations.get(j);\n\t\t\t\t\tList origin_c = new ArrayList<>(c);\n\t\t\t\t\tfor (int k = 0; k < letter.length; k++) {\n\t\t\t\t\t\tCharacter l = letter[k];\n\t\t\t\t\t\tif (k == 0) {\n\t\t\t\t\t\t\tc.add(l);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tList new_c = new ArrayList<>(origin_c);\n\t\t\t\t\t\t\tnew_c.add(l);\n\t\t\t\t\t\t\tadded.add(new_c);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcombinations.addAll(added);\n\t\t\t}\n\t\t}\n\t\tList output = new ArrayList<>();\n\t\tfor (int i = 0; i < combinations.size(); i++) {\n\t\t\tList c = combinations.get(i);\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tfor (Character l : c) {\n\t\t\t\tsb.append(l);\n\t\t\t}\n\t\t\toutput.add(sb.toString());\n\t\t}\n\t\treturn output;\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-cdfa1a7c19ef4e879fcab664e5c47371", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600471003" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/1.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/1.exercises/config.json" new file mode 100644 index 000000000..07cf1a478 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/1.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-c4bd91e863e346e8860401ab6914732e", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/1.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/1.exercises/solution.json" new file mode 100644 index 000000000..6460701d3 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/1.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "8f2b8850ce1c42439df5b706d8c39256", + "keywords": "算法初阶,基础知识,算法基础,设计算法,分析分治算法", + "title": "将一组数尽可能均匀地分成两堆,使两个堆中的数的和尽可能相等", + "desc": [ + { + "content": "\n

      麦克叔叔去世了,他在遗嘱中给他的两个孙子阿贝和鲍勃留下了一堆珍贵的口袋妖怪卡片。遗嘱中唯一的方向是“尽可能均匀地分配纸牌的价值”。作为Mike遗嘱的执行人,你已经为每一张口袋妖怪卡片定价,以获得准确的货币价值。你要决定如何将口袋妖怪卡片分成两堆,以尽量减少每一堆卡片的价值总和的差异。\n例如,你有下列n=8 个口袋妖怪卡片:\n![图片说明](https://img-ask.csdn.net/upload/202006/27/1593264517_917706.png)\n经过大量的工作,你发现你可以用下面的方法来划分卡片:\n![图片说明](https://img-ask.csdn.net/upload/202006/27/1593264556_309804.png)\n这给了安倍10美元的牌给了鲍勃11美元的牌。这是最好的除法吗?\n你要做的是解决n张牌的问题其中每张牌ci都有一个正整数值vi.你的解决方法是计算牌应该如何被分割以及每摞牌的价值。\n输入输出示例如下:\n![图片说明](https://img-ask.csdn.net/upload/202006/27/1593264585_763892.png)\n1.通过检查所有可能的桩以蛮力解决此问题。 对这种蛮力算法的时间复杂度进行分析,并通过实施和实验验证您的分析结果(既写出来算法的设计思路等),并用python算法实现编程\n2.通过动态编程开发更有效的算法。 您应该首先通过动态编程的思想来分析此问题,并编写相应的递归属性。 对这种算法的时间复杂度进行分析,并通过实施和实验验证您的分析结果。并用python代码实现动态编程

      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "def deal(data,flag):\n\ta=[]\n\tfor i in data:\n\t\tif i>=flag:\n\t\t\treturn [i]\n\t\telif a==[]:\n\t\t\ta.append([i])\n\t\telse:\n\t\t\ta=a+[k+[i] for k in a if sum(k)+i<=flag]\n\t\t\ta.append([i])\n\ttarget=sum(max(a,key=sum))\n\treturn list(filter(lambda x:sum(x)==target,a))\nif __name__=='__main__':\n\tc=[2,1,3,1,5,2,3,4]\n\tflag=sum(c)//2\n\tres=deal(c,flag)\n\tprint(res)", + "language": "python" + }, + "node_id": "dailycode-c4bd91e863e346e8860401ab6914732e", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600469887" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/10.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/10.exercises/config.json" new file mode 100644 index 000000000..fc0f62d70 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/10.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-69fd78974192450ebe5d6fe0bbdbfa67", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/10.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/10.exercises/solution.json" new file mode 100644 index 000000000..4224d9705 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/10.exercises/solution.json" @@ -0,0 +1,120 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "eb0e9b7945fe4582a83d7f8627ec98b0", + "keywords": "字符串", + "title": "字符串转换整数 (atoi)", + "desc": [ + { + "content": "\n
      \n

      请你来实现一个 myAtoi(string s) 函数,使其能将字符串转换成一个 32 位有符号整数(类似 C/C++ 中的 atoi 函数)。

      ", + "language": "markdown" + }, + { + "content": "\n

      函数 myAtoi(string s) 的算法如下:

      ", + "language": "markdown" + }, + { + "content": "\n
        \n
      • 读入字符串并丢弃无用的前导空格
      • \n
      • 检查下一个字符(假设还未到字符末尾)为正还是负号,读取该字符(如果有)。 确定最终结果是负数还是正数。 如果两者都不存在,则假定结果为正。
      • \n
      • 读入下一个字符,直到到达下一个非数字字符或到达输入的结尾。字符串的其余部分将被忽略。
      • \n
      • 将前面步骤读入的这些数字转换为整数(即,\"123\" -> 123, \"0032\" -> 32)。如果没有读入数字,则整数为 0 。必要时更改符号(从步骤 2 开始)。
      • \n
      • 如果整数数超过 32 位有符号整数范围 [−231,  231 − 1]\n,需要截断这个整数,使其保持在这个范围内。具体来说,小于 −231 的整数应该被固定为 −231 ,大于\n231 − 1 的整数应该被固定为 231 − 1 。\n
      • \n
      • 返回整数作为最终结果。
      • \n
      ", + "language": "markdown" + }, + { + "content": "\n

      注意:

      ", + "language": "markdown" + }, + { + "content": "\n
        \n
      • 本题中的空白字符只包括空格字符 ' '
      • \n
      • 除前导空格或数字后的其余字符串外,请勿忽略 任何其他字符。
      • \n
      ", + "language": "markdown" + }, + { + "content": "\n

       

      ", + "language": "markdown" + }, + { + "content": "\n

      示例 1:

      ", + "language": "markdown" + }, + { + "content": "\n
      输入:s = \"42\"\n输出:42\n解释:加粗的字符串为已经读入的字符,插入符号是当前读取的字符。\n第 1 步:\"42\"(当前没有读入字符,因为没有前导空格)\n^\n第 2 步:\"42\"(当前没有读入字符,因为这里不存在 '-' 或者 '+')\n^\n第 3 步:\"42\"(读入 \"42\")\n^\n解析得到整数 42 。\n由于 \"42\" 在范围 [-231, 231 - 1] 内,最终结果为 42 。
      ", + "language": "markdown" + }, + { + "content": "\n

      示例 2:

      ", + "language": "markdown" + }, + { + "content": "\n
      输入:s = \"   -42\"\n输出:-42\n解释:\n第 1 步:\"   -42\"(读入前导空格,但忽视掉)\n^\n第 2 步:\"   -42\"(读入 '-' 字符,所以结果应该是负数)\n^\n第 3 步:\"   -42\"(读入 \"42\")\n^\n解析得到整数 -42 。\n由于 \"-42\" 在范围 [-231, 231 - 1] 内,最终结果为 -42 。\n
      ", + "language": "markdown" + }, + { + "content": "\n

      示例 3:

      ", + "language": "markdown" + }, + { + "content": "\n
      输入:s = \"4193 with words\"\n输出:4193\n解释:\n第 1 步:\"4193 with words\"(当前没有读入字符,因为没有前导空格)\n^\n第 2 步:\"4193 with words\"(当前没有读入字符,因为这里不存在 '-' 或者 '+')\n^\n第 3 步:\"4193 with words\"(读入 \"4193\";由于下一个字符不是一个数字,所以读入停止)\n^\n解析得到整数 4193 。\n由于 \"4193\" 在范围 [-231, 231 - 1] 内,最终结果为 4193 。\n
      ", + "language": "markdown" + }, + { + "content": "\n

      示例 4:

      ", + "language": "markdown" + }, + { + "content": "\n
      输入:s = \"words and 987\"\n输出:0\n解释:\n第 1 步:\"words and 987\"(当前没有读入字符,因为没有前导空格)\n^\n第 2 步:\"words and 987\"(当前没有读入字符,因为这里不存在 '-' 或者 '+')\n^\n第 3 步:\"words and 987\"(由于当前字符 'w' 不是一个数字,所以读入停止)\n^\n解析得到整数 0 ,因为没有读入任何数字。\n由于 0 在范围 [-231, 231 - 1] 内,最终结果为 0 。
      ", + "language": "markdown" + }, + { + "content": "\n

      示例 5:

      ", + "language": "markdown" + }, + { + "content": "\n
      输入:s = \"-91283472332\"\n输出:-2147483648\n解释:\n第 1 步:\"-91283472332\"(当前没有读入字符,因为没有前导空格)\n^\n第 2 步:\"-91283472332\"(读入 '-' 字符,所以结果应该是负数)\n^\n第 3 步:\"-91283472332\"(读入 \"91283472332\")\n^\n解析得到整数 -91283472332 。\n由于 -91283472332 小于范围 [-231, 231 - 1] 的下界,最终结果被截断为 -231 = -2147483648 。
      ", + "language": "markdown" + }, + { + "content": "\n

       

      ", + "language": "markdown" + }, + { + "content": "\n

      提示:

      ", + "language": "markdown" + }, + { + "content": "\n
        \n
      • 0 <= s.length <= 200
      • \n
      • s 由英文字母(大写和小写)、数字(0-9)、' ''+''-' 和\n'.' 组成\n
      • \n
      \n
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution:\n\tdef myAtoi(self, s: str) -> int:\n\t\ty = 0\n\t\ti = 0\n\t\tw = False\n\t\tsign = False\n\t\tints = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']\n\t\twhile i < len(s):\n\t\t\tc = s[i]\n\t\t\tisSign = False\n\t\t\tif w == False and c != ' ':\n\t\t\t\tw = True\n\t\t\t\tif c == '-':\n\t\t\t\t\tsign = True\n\t\t\t\t\tisSign = True\n\t\t\t\tif c == '+':\n\t\t\t\t\tisSign = True\n\t\t\tif w and not isSign:\n\t\t\t\ttry:\n\t\t\t\t\tv = ints.index(c)\n\t\t\t\t\ty = y*10+v\n\t\t\t\texcept:\n\t\t\t\t\tbreak\n\t\t\ti += 1\n\t\toffset = 0\n\t\tif y > 2147483647:\n\t\t\ty = 2147483647\n\t\t\toffset = 1\n\t\treturn -(y+offset) if sign else y\n# %%\ns = Solution()\nprint(s.myAtoi(s = \"42\"))", + "language": "python" + }, + "node_id": "dailycode-69fd78974192450ebe5d6fe0bbdbfa67", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470794" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/11.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/11.exercises/config.json" new file mode 100644 index 000000000..d240a899a --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/11.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-061ac0473af848a6aea1b1d7380686f7", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/11.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/11.exercises/solution.json" new file mode 100644 index 000000000..a71ccac68 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/11.exercises/solution.json" @@ -0,0 +1,76 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "3c4e98aed0c84e57a07ff32e815e3029", + "keywords": "树,二叉搜索树,数学,动态规划,二叉树", + "title": "不同的二叉搜索树", + "desc": [ + { + "content": "\n
      \n

      给你一个整数 n ,求恰由 n 个节点组成且节点值从 1n 互不相同的 二叉搜索树\n有多少种?返回满足题意的二叉搜索树的种数。

      ", + "language": "markdown" + }, + { + "content": "\n

       

      ", + "language": "markdown" + }, + { + "content": "\n

      示例 1:

      \n\n
      输入:n = 3\n输出:5\n
      ", + "language": "markdown" + }, + { + "content": "\n

      示例 2:

      ", + "language": "markdown" + }, + { + "content": "\n
      输入:n = 1\n输出:1\n
      ", + "language": "markdown" + }, + { + "content": "\n

       

      ", + "language": "markdown" + }, + { + "content": "\n

      提示:

      ", + "language": "markdown" + }, + { + "content": "\n
        \n
      • 1 <= n <= 19
      • \n
      \n
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution(object):\n\tdef numTrees(self, n):\n\t\t\"\"\"\n\t\t:type n: int\n\t\t:rtype: int\n\t\t\"\"\"\n\t\tdp = [0] * (n + 1)\n\t\tdp[0] = 1\n\t\tdp[1] = 1\n\t\tfor level in range(2, n + 1):\n\t\t\tfor root in range(1, level + 1):\n\t\t\t\tdp[level] += dp[level - root] * dp[root - 1]\n\t\treturn dp[n]\n# %%\ns = Solution()\nprint(s.numTrees(n = 3))", + "language": "python" + }, + "node_id": "dailycode-061ac0473af848a6aea1b1d7380686f7", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600469926" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/12.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/12.exercises/config.json" new file mode 100644 index 000000000..20ac5e28d --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/12.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-ebc866b086ae44a79c65cb99235a170a", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/12.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/12.exercises/solution.json" new file mode 100644 index 000000000..55514df53 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/12.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "e13e25e7e45440858e26bb2effaac800", + "keywords": "数组", + "title": "插入区间", + "desc": [ + { + "content": "\n

      给你一个 无重叠的按照区间起始端点排序的区间列表。

      \n

      在列表中插入一个新的区间,你需要确保列表中的区间仍然有序且不重叠(如果有必要的话,可以合并区间)。

      \n

       

      \n

      示例 1:

      \n
      输入:intervals = [[1,3],[6,9]], newInterval = [2,5]
      输出:
      [[1,5],[6,9]]
      \n

      示例 2:

      \n
      输入:intervals = [[1,2],[3,5],[6,7],[8,10],[12,16]], newInterval = [4,8]
      输出:
      [[1,2],[3,10],[12,16]]
      解释:
      这是因为新的区间 [4,8] 与 [3,5],[6,7],[8,10] 重叠。
      \n

      示例 3:

      \n
      输入:intervals = [], newInterval = [5,7]
      输出:
      [[5,7]]
      \n

      示例 4:

      \n
      输入:intervals = [[1,5]], newInterval = [2,3]
      输出:
      [[1,5]]
      \n

      示例 5:

      \n
      输入:intervals = [[1,5]], newInterval = [2,7]
      输出:
      [[1,7]]
      \n

       

      \n

      提示:

      \n
        \n
      • 0 <= intervals.length <= 104
      • \n
      • intervals[i].length == 2
      • \n
      • 0 <= intervals[i][0] <= intervals[i][1] <= 105
      • \n
      • intervals 根据 intervals[i][0]升序 排列
      • \n
      • newInterval.length == 2
      • \n
      • 0 <= newInterval[0] <= newInterval[1] <= 105
      • \n
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Interval(object):\n\tdef __init__(self, s=0, e=0):\n\t\tself.start = s\n\t\tself.end = e\nclass Solution(object):\n\tdef list2interval(self, list_interval):\n\t\tret = []\n\t\tfor i in list_interval:\n\t\t\tinterval = Interval(i[0], i[1])\n\t\t\tret.append(interval)\n\t\treturn ret\n\tdef interval2list(self, interval):\n\t\tret = []\n\t\tx = [0,0]\n\t\tfor i in interval:\n\t\t\tx[0] = i.start\n\t\t\tx[1] = i.end\n\t\t\tret.append(x)\n\t\t\tx = [0,0]\n\t\treturn ret\n\tdef insert(self, intervals, newInterval):\n\t\t\"\"\"\n\t\t:type intervals: List[Interval]\n\t\t:type newInterval: Interval\n\t\t:rtype: List[Interval]\n\t\t\"\"\"\n\t\tif intervals is None or len(intervals) == 0:\n\t\t\treturn [newInterval]\n\t\tintervals = self.list2interval(intervals)\n\t\tnewInterval = Interval(newInterval[0], newInterval[1])\n\t\tintervals.sort(key=lambda x:x.start)\n\t\tpos = 0\n\t\twhile pos < len(intervals):\n\t\t\tif newInterval.end < intervals[pos].start:\n\t\t\t\tintervals.insert(pos, newInterval)\n\t\t\t\tintervals = self.interval2list(intervals)\n\t\t\t\treturn intervals\n\t\t\tif self.check_overlap(intervals[pos], newInterval):\n\t\t\t\ttemp = intervals.pop(pos)\n\t\t\t\tnewInterval = self.merge_intervals(temp, newInterval)\n\t\t\telse:\n\t\t\t\tpos += 1\n\t\tif len(intervals) == 0 or pos == len(intervals):\n\t\t\tintervals.append(newInterval)\n\t\tintervals = self.interval2list(intervals)\n\t\treturn intervals\n\tdef check_overlap(self, curr_int, new_int):\n\t\tif curr_int.start <= new_int.start:\n\t\t if curr_int.end > new_int.start:\n\t\t\t return True\n\t\telse:\n\t\t\tif curr_int.start <= new_int.end:\n\t\t\t\treturn True\n\t\treturn False\n\tdef merge_intervals(self, int1, int2):\n\t\ttemp_int = Interval()\n\t\ttemp_int.start = min([int1.start, int2.start])\n\t\ttemp_int.end = max([int1.end, int2.end])\n\t\treturn temp_int\n# %%\ns = Solution()\nprint(s.insert(intervals = [[1,3],[6,9]], newInterval = [2,5]))", + "language": "python" + }, + "node_id": "dailycode-ebc866b086ae44a79c65cb99235a170a", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470920" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/13.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/13.exercises/config.json" new file mode 100644 index 000000000..b78b893d5 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/13.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-0da6d95ed1b54b8e83d0193c88e6c237", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/13.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/13.exercises/solution.json" new file mode 100644 index 000000000..b52012209 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/13.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "37dad61aaba04eb3ac75b4d6b503d5b9", + "keywords": "数组,双指针,排序", + "title": "四数之和", + "desc": [ + { + "content": "\n

      给定一个包含 n 个整数的数组 nums 和一个目标值 target,判断 nums 中是否存在四个元素 a,b,c 和 d ,使得 a + b + c + d 的值与 target 相等?找出所有满足条件且不重复的四元组。

      注意:答案中不可以包含重复的四元组。

       

      示例 1:

      输入:nums = [1,0,-1,0,-2,2], target = 0
      输出:
      [[-2,-1,1,2],[-2,0,0,2],[-1,0,0,1]]

      示例 2:

      输入:nums = [], target = 0
      输出:
      []

       

      提示:

        \t
      • 0 <= nums.length <= 200
      • \t
      • -109 <= nums[i] <= 109
      • \t
      • -109 <= target <= 109
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution(object):\n\tdef fourSum(self, nums, target):\n\t\t\"\"\"\n\t\t:type nums: List[int]\n\t\t:type target: int\n\t\t:rtype: List[List[int]]\n\t\t\"\"\"\n\t\tnums.sort()\n\t\tresults = []\n\t\tN = len(nums)\n\t\ti = 0\n\t\twhile i < N-3:\n\t\t\tif i > 0 and nums[i] == nums[i-1]:\n\t\t\t\ti += 1\n\t\t\t\tcontinue\n\t\t\tj = i+1\n\t\t\twhile j < N-2:\n\t\t\t\tif j > i+1 and nums[j] == nums[j-1]:\n\t\t\t\t\tj += 1\n\t\t\t\t\tcontinue\n\t\t\t\tk = j+1\n\t\t\t\tl = N-1\n\t\t\t\twhile k < l:\n\t\t\t\t\tif k > j+1 and nums[k] == nums[k-1]:\n\t\t\t\t\t\tk += 1\n\t\t\t\t\t\tcontinue\n\t\t\t\t\twhile k < l and (target - nums[i] - nums[j] - nums[k] - nums[l]) < 0:\n\t\t\t\t\t\tl -= 1\n\t\t\t\t\tif k >= l:\n\t\t\t\t\t\tbreak\n\t\t\t\t\tif target == nums[i] + nums[j] + nums[k] + nums[l]:\n\t\t\t\t\t\tresults.append([\n\t\t\t\t\t\t\tnums[i],\n\t\t\t\t\t\t\tnums[j],\n\t\t\t\t\t\t\tnums[k],\n\t\t\t\t\t\t\tnums[l]\n\t\t\t\t\t\t])\n\t\t\t\t\tk += 1\n\t\t\t\tj += 1\n\t\t\ti += 1\n\t\treturn results\n# %%\ns = Solution()\nprint(s.fourSum(nums = [1,0,-1,0,-2,2], target = 0))", + "language": "python" + }, + "node_id": "dailycode-0da6d95ed1b54b8e83d0193c88e6c237", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600469919" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/14.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/14.exercises/config.json" new file mode 100644 index 000000000..d44a3d05f --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/14.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-89a4d210cf6b4a96ab49088e293fdd9f", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/14.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/14.exercises/solution.json" new file mode 100644 index 000000000..3df54b626 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/14.exercises/solution.json" @@ -0,0 +1,108 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "cc5dccee574d40d1b46dba4b524fdca4", + "keywords": "字符串", + "title": "外观数列", + "desc": [ + { + "content": "\n
      \n

      给定一个正整数 n ,输出外观数列的第 n 项。

      ", + "language": "markdown" + }, + { + "content": "\n

      「外观数列」是一个整数序列,从数字 1 开始,序列中的每一项都是对前一项的描述。

      ", + "language": "markdown" + }, + { + "content": "\n

      你可以将其视作是由递归公式定义的数字字符串序列:

      ", + "language": "markdown" + }, + { + "content": "\n
        \n
      • countAndSay(1) = \"1\"
      • \n
      • countAndSay(n) 是对 countAndSay(n-1) 的描述,然后转换成另一个数字字符串。
      • \n
      ", + "language": "markdown" + }, + { + "content": "\n

      前五项如下:

      ", + "language": "markdown" + }, + { + "content": "\n
      \n1.     1\n2.     11\n3.     21\n4.     1211\n5.     111221\n第一项是数字 1 \n描述前一项,这个数是 1 即 “ 一 个 1 ”,记作 \"11\"\n描述前一项,这个数是 11 即 “ 二 个 1 ” ,记作 \"21\"\n描述前一项,这个数是 21 即 “ 一 个 2 + 一 个 1 ” ,记作 \"1211\"\n描述前一项,这个数是 1211 即 “ 一 个 1 + 一 个 2 + 二 个 1 ” ,记作 \"111221\"\n
      ", + "language": "markdown" + }, + { + "content": "\n

      描述 一个数字字符串,首先要将字符串分割为 最小 数量的组,每个组都由连续的最多 相同字符\n组成。然后对于每个组,先描述字符的数量,然后描述字符,形成一个描述组。要将描述转换为数字字符串,先将每组中的字符数量用数字替换,再将所有描述组连接起来。

      ", + "language": "markdown" + }, + { + "content": "\n

      例如,数字字符串 \"3322251\" 的描述如下图:

      \n\"\"\nsrc=\"https://cdn.jsdelivr.net/gh/doocs/leetcode@main/solution/0000-0099/0038.Count%20and%20Say/images/countandsay.jpg\"\nstyle=\"width:\n
        \n
      ", + "language": "markdown" + }, + { + "content": "\n

       

      ", + "language": "markdown" + }, + { + "content": "\n

      示例 1:

      ", + "language": "markdown" + }, + { + "content": "\n
      输入:n = 1\n输出:\"1\"\n解释:这是一个基本样例。\n
      ", + "language": "markdown" + }, + { + "content": "\n

      示例 2:

      ", + "language": "markdown" + }, + { + "content": "\n
      输入:n = 4\n输出:\"1211\"\n解释:\ncountAndSay(1) = \"1\"\ncountAndSay(2) = 读 \"1\" = 一 个 1 = \"11\"\ncountAndSay(3) = 读 \"11\" = 二 个 1 = \"21\"\ncountAndSay(4) = 读 \"21\" = 一 个 2 + 一 个 1 = \"12\" + \"11\" = \"1211\"\n
      ", + "language": "markdown" + }, + { + "content": "\n

       

      ", + "language": "markdown" + }, + { + "content": "\n

      提示:

      ", + "language": "markdown" + }, + { + "content": "\n
        \n
      • 1 <= n <= 30
      • \n
      \n
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution:\n\tdef countAndSay(self, n):\n\t\tif n == 1:\n\t\t\treturn '1'\n\t\tx = '1'\n\t\twhile n > 1:\n\t\t\tx = self.count(x)\n\t\t\tn -= 1\n\t\treturn x\n\tdef count(self, x):\n\t\tm = list(x)\n\t\tres = []\n\t\tm.append(None)\n\t\ti , j = 0 , 0\n\t\twhile i < len(m) - 1:\n\t\t\tj += 1\n\t\t\tif m[j] != m[i]:\n\t\t\t\tres += [j - i, m[i]]\n\t\t\t\ti = j\n\t\treturn ''.join(str(s) for s in res)\n# %%\ns = Solution()\nprint(s.countAndSay(n = 4))", + "language": "python" + }, + "node_id": "dailycode-89a4d210cf6b4a96ab49088e293fdd9f", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470795" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/15.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/15.exercises/config.json" new file mode 100644 index 000000000..369bfbcb1 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/15.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-74272d3291224f24af9d13e734d733f5", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/15.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/15.exercises/solution.json" new file mode 100644 index 000000000..87b88d99e --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/15.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "c7708cf22e8d42dd8ca2dd501b24bc2a", + "keywords": "链表,双指针", + "title": "旋转链表", + "desc": [ + { + "content": "\n

      给你一个链表的头节点 head ,旋转链表,将链表每个节点向右移动 k 个位置。

       

      示例 1:

      \"\"
      输入:head = [1,2,3,4,5], k = 2
      输出:
      [4,5,1,2,3]

      示例 2:

      \"\"
      输入:head = [0,1,2], k = 4
      输出:
      [2,0,1]

       

      提示:

        \t
      • 链表中节点的数目在范围 [0, 500]
      • \t
      • -100 <= Node.val <= 100
      • \t
      • 0 <= k <= 2 * 109
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class ListNode(object):\n\tdef __init__(self, x):\n\t\tself.val = x\n\t\tself.next = None\nclass LinkList:\n\tdef __init__(self):\n\t\tself.head=None\n\tdef initList(self, data):\n\t\tself.head = ListNode(data[0])\n\t\tr=self.head\n\t\tp = self.head\n\t\tfor i in data[1:]:\n\t\t\tnode = ListNode(i)\n\t\t\tp.next = node\n\t\t\tp = p.next\n\t\treturn r\n\tdef\tconvert_list(self,head):\n\t\tret = []\n\t\tif head == None:\n\t\t\treturn\n\t\tnode = head\n\t\twhile node != None:\n\t\t\tret.append(node.val)\n\t\t\tnode = node.next\n\t\treturn ret\nclass Solution(object):\n\tdef rotateRight(self, head, k):\n\t\t\"\"\"\n\t\t:type head: ListNode\n\t\t:type k: int\n\t\t:rtype: ListNode\n\t\t\"\"\"\n\t\tif not head or k == 0:\n\t\t\treturn head\n\t\tslow = fast = head\n\t\tlength = 1\n\t\twhile k and fast.next:\n\t\t\tfast = fast.next\n\t\t\tlength += 1\n\t\t\tk -= 1\n\t\tif k != 0:\n\t\t\tk = (k + length - 1) % length \n\t\t\treturn self.rotateRight(head, k)\n\t\telse:\n\t\t\twhile fast.next:\n\t\t\t\tfast = fast.next\n\t\t\t\tslow = slow.next\n\t\t\treturn self.rotate(head, fast, slow)\n\tdef rotate(self, head, fast, slow):\n\t\tfast.next = head\n\t\thead = slow.next\n\t\tslow.next = None\n\t\treturn head\n# %%\nl = LinkList()\nlist1 = [0,1,2]\nk = 4\nl1 = l.initList(list1)\ns = Solution()\nprint(l.convert_list(s.rotateRight(l1, k)))", + "language": "python" + }, + "node_id": "dailycode-74272d3291224f24af9d13e734d733f5", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600469922" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/16.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/16.exercises/config.json" new file mode 100644 index 000000000..9239fbf22 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/16.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-1cb29400682c421faa8d5b7cb588faef", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/16.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/16.exercises/solution.json" new file mode 100644 index 000000000..76af0aed7 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/16.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "076fa5cfeb7f4adca7fc812b5a58edc5", + "keywords": "数组,回溯", + "title": "组合", + "desc": [ + { + "content": "\n

      给定两个整数 nk,返回 1 ... n 中所有可能的 k 个数的组合。

      \n

      示例:

      \n
      输入: n = 4, k = 2
      输出:
      [[2,4],[3,4],[2,3],[1,2],[1,3],[1,4],]
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution(object):\n\tdef combine(self, n, k):\n\t\tres = []\n\t\tself.get_combine(res, [], n, k, 1)\n\t\treturn res\n\tdef get_combine(self, res, prefix, n, k, start):\n\t\tif k == 0:\n\t\t\tres.append(list(prefix))\n\t\telif start <= n:\n\t\t\tprefix.append(start)\n\t\t\tself.get_combine(res, prefix,\n\t\t\t\t\t\t\t n, k - 1, start + 1)\n\t\t\tprefix.pop()\n\t\t\tself.get_combine(res, prefix,\n\t\t\t\t\t\t\t n, k, start + 1)\nif __name__ == \"__main__\":\n\ts = Solution()\n\tprint (s.combine(4, 2))", + "language": "python" + }, + "node_id": "dailycode-1cb29400682c421faa8d5b7cb588faef", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470921" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/17.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/17.exercises/config.json" new file mode 100644 index 000000000..3ba7c24a9 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/17.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-fe3d45a08a0f47858df48e044d0ae2f9", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/17.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/17.exercises/solution.json" new file mode 100644 index 000000000..2301cbd38 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/17.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "c0471513553c477a823351c3c93b7b37", + "keywords": "字符串,动态规划,回溯", + "title": "括号生成", + "desc": [ + { + "content": "\n

      数字 n 代表生成括号的对数,请你设计一个函数,用于能够生成所有可能的并且 有效的 括号组合。

       

      示例 1:

      输入:n = 3
      输出:
      [\"((()))\",\"(()())\",\"(())()\",\"()(())\",\"()()()\"]

      示例 2:

      输入:n = 1
      输出:
      [\"()\"]

       

      提示:

        \t
      • 1 <= n <= 8
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "from typing import List\nclass Solution:\n\tdef generateParenthesis(self, n: int) -> List[str]:\n\t\tdef gen(p, lc, rc, r, n):\n\t\t\tif lc > n:\n\t\t\t\treturn\n\t\t\tif lc == n and rc == n:\n\t\t\t\tr.append(''.join(p))\n\t\t\tp.append('(')\n\t\t\tlc += 1\n\t\t\tgen(p, lc, rc, r, n)\n\t\t\tp.pop()\n\t\t\tlc -= 1\n\t\t\tif lc > rc:\n\t\t\t\tp.append(')')\n\t\t\t\trc += 1\n\t\t\t\tgen(p, lc, rc, r, n)\n\t\t\t\tp.pop()\n\t\t\t\trc -= 1\n\t\tresults = []\n\t\tgen([], 0, 0, results, n)\n\t\treturn results\n# %%\ns = Solution()\nprint(s.generateParenthesis(n = 3))", + "language": "python" + }, + "node_id": "dailycode-fe3d45a08a0f47858df48e044d0ae2f9", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470115" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/18.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/18.exercises/config.json" new file mode 100644 index 000000000..fd182a0ad --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/18.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-8c22cff947234df7a45ae4e553106499", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/18.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/18.exercises/solution.json" new file mode 100644 index 000000000..7aad64aa4 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/18.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "c3f41a2455904f5592df1ff3aa5e3519", + "keywords": "数组,数学,矩阵", + "title": "旋转图像", + "desc": [ + { + "content": "\n

      给定一个 × n 的二维矩阵 matrix 表示一个图像。请你将图像顺时针旋转 90 度。

      你必须在 原地 旋转图像,这意味着你需要直接修改输入的二维矩阵。请不要 使用另一个矩阵来旋转图像。

       

      示例 1:

      \"\"
      输入:matrix = [[1,2,3],[4,5,6],[7,8,9]]
      输出:
      [[7,4,1],[8,5,2],[9,6,3]]

      示例 2:

      \"\"
      输入:matrix = [[5,1,9,11],[2,4,8,10],[13,3,6,7],[15,14,12,16]]
      输出:
      [[15,13,2,5],[14,3,4,1],[12,6,8,9],[16,7,10,11]]

      示例 3:

      输入:matrix = [[1]]
      输出:
      [[1]]

      示例 4:

      输入:matrix = [[1,2],[3,4]]
      输出:
      [[3,1],[4,2]]

       

      提示:

        \t
      • matrix.length == n
      • \t
      • matrix[i].length == n
      • \t
      • 1 <= n <= 20
      • \t
      • -1000 <= matrix[i][j] <= 1000
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution(object):\n\tdef rotate(self, matrix):\n\t\tif matrix is None or len(matrix) == 1:\n\t\t\treturn\n\t\tls = len(matrix)\n\t\tfor i in range(int(ls / 2)):\n\t\t\tbegin, end = i, ls - 1 - i\n\t\t\tfor k in range(ls - 2 * i - 1):\n\t\t\t\ttemp = matrix[end - k][begin]\n\t\t\t\tmatrix[end - k][begin] = matrix[end][end - k]\n\t\t\t\tmatrix[end][end - k] = matrix[begin + k][end]\n\t\t\t\tmatrix[begin + k][end] = matrix[begin][begin + k]\n\t\t\t\tmatrix[begin][begin + k] = temp\n\t\treturn matrix\nif __name__ == '__main__':\n\ts = Solution()\n\tprint(s.rotate([[1,2,3,4],[5,6,7,8],[9,10,11,12],[13,14,15,16]]))\n\tprint(s.rotate( [[1,2],[3,4]]))", + "language": "python" + }, + "node_id": "dailycode-8c22cff947234df7a45ae4e553106499", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470225" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/19.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/19.exercises/config.json" new file mode 100644 index 000000000..ebf16033b --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/19.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-3e9f6ff35d514b77a9785d61386e9093", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/19.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/19.exercises/solution.json" new file mode 100644 index 000000000..05533330d --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/19.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "b347b524c4bf4811a0a490945fdb324e", + "keywords": "贪心,数组,双指针", + "title": "盛最多水的容器", + "desc": [ + { + "content": "\n

      给你 n 个非负整数 a1,a2,...,an每个数代表坐标中的一个点 (i, ai) 。在坐标内画 n 条垂直线,垂直线 i 的两个端点分别为 (i, ai)(i, 0) 。找出其中的两条线,使得它们与 x 轴共同构成的容器可以容纳最多的水。

      说明:你不能倾斜容器。

       

      示例 1:

      \"\"

      输入:[1,8,6,2,5,4,8,3,7]
      输出:
      49
      解释:
      图中垂直线代表输入数组 [1,8,6,2,5,4,8,3,7]。在此情况下,容器能够容纳水(表示为蓝色部分)的最大值为 49。

      示例 2:

      输入:height = [1,1]
      输出:
      1

      示例 3:

      输入:height = [4,3,2,1,4]
      输出:
      16

      示例 4:

      输入:height = [1,2,1]
      输出:
      2

       

      提示:

        \t
      • n = height.length
      • \t
      • 2 <= n <= 3 * 104
      • \t
      • 0 <= height[i] <= 3 * 104
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "from typing import List\nclass Solution:\n\tdef maxArea(self, height: List[int]) -> int:\n\t\tN = len(height)\n\t\ti = 0\n\t\tj = N-1\n\t\tmax_area = 0\n\t\twhile i < j:\n\t\t\tc = (j-i)*min(height[i], height[j])\n\t\t\tif c > max_area:\n\t\t\t\tmax_area = c\n\t\t\tif height[i] > height[j]:\n\t\t\t\tj -= 1\n\t\t\telse:\n\t\t\t\ti += 1\n\t\treturn max_area\n# %%\ns = Solution()\nprint(s.maxArea([1,8,6,2,5,4,8,3,7]))", + "language": "python" + }, + "node_id": "dailycode-3e9f6ff35d514b77a9785d61386e9093", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600469816" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/2.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/2.exercises/config.json" new file mode 100644 index 000000000..baeb534b3 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/2.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-10743c3216c44bb1a4acda922204abf7", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/2.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/2.exercises/solution.json" new file mode 100644 index 000000000..b18ae6939 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/2.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "226a3e3e1d564f45aeb6e475d269a13d", + "keywords": "图算法,算法高阶,最小生成树,最小生成树的形成", + "title": "求两个给定正整数的最大公约数和最小公倍数", + "desc": [ + { + "content": "\n

      本题要求两个给定正整数的最大公约数和最小公倍数。\n输入格式:\n输入在两行中分别输入正整数x和y。\n输出格式:\n在一行中输出最大公约数和最小公倍数的值。\n

      输入样例1:\n在这里给出一组输入。\n例如:

      100\n1520

      输出样例1:\n在这里给出相应的输出。\n例如:

      20 7600
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "def hcf(x, y):\n if x > y:\n\t smaller = y\n else:\n\t smaller = x \n for i in range(1,smaller + 1):\n\t if((x % i == 0) and (y % i == 0)):\n\t\t hcf = i \n return hcf\ndef lcm(x, y): \n if x > y:\n\t greater = x\n else:\n\t greater = y\n while(True):\n\t if((greater % x == 0) and (greater % y == 0)):\n\t\t lcm = greater\n\t\t break\n\t greater += 1\n return lcm\nnum1 = int(input(\"输入第一个数字: \"))\nnum2 = int(input(\"输入第二个数字: \"))\nprint(\"最大公约数为\",hcf(num1, num2),\"最小公倍数为\",lcm(num1,num2))", + "language": "python" + }, + "node_id": "dailycode-10743c3216c44bb1a4acda922204abf7", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600469988" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/20.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/20.exercises/config.json" new file mode 100644 index 000000000..d30590845 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/20.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-f5007b90ce784459a128ea75d2f74143", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/20.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/20.exercises/solution.json" new file mode 100644 index 000000000..2881c14cb --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/20.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "9f9ae60bd464481d9f430ae229754d44", + "keywords": "字符串,回溯", + "title": "复原 IP 地址", + "desc": [ + { + "content": "\n

      给定一个只包含数字的字符串,用以表示一个 IP 地址,返回所有可能从 s 获得的 有效 IP 地址 。你可以按任何顺序返回答案。

      有效 IP 地址 正好由四个整数(每个整数位于 0 到 255 之间组成,且不能含有前导 0),整数之间用 '.' 分隔。

      例如:\"0.1.2.201\" 和 \"192.168.1.1\" 是 有效 IP 地址,但是 \"0.011.255.245\"、\"192.168.1.312\" 和 \"192.168@1.1\" 是 无效 IP 地址。

       

      示例 1:

      输入:s = \"25525511135\"
      输出:
      [\"255.255.11.135\",\"255.255.111.35\"]

      示例 2:

      输入:s = \"0000\"
      输出:
      [\"0.0.0.0\"]

      示例 3:

      输入:s = \"1111\"
      输出:
      [\"1.1.1.1\"]

      示例 4:

      输入:s = \"010010\"
      输出:
      [\"0.10.0.10\",\"0.100.1.0\"]

      示例 5:

      输入:s = \"101023\"
      输出:
      [\"1.0.10.23\",\"1.0.102.3\",\"10.1.0.23\",\"10.10.2.3\",\"101.0.2.3\"]

       

      提示:

        \t
      • 0 <= s.length <= 3000
      • \t
      • s 仅由数字组成
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution(object):\n\tdef restoreIpAddresses(self, s):\n\t\tls = len(s)\n\t\tif ls == 0 or ls > 12:\n\t\t\treturn []\n\t\tres = []\n\t\tfor i in range(1, 4):\n\t\t\tfor j in range(1, 4):\n\t\t\t\tfor k in range(1, 4):\n\t\t\t\t\tm = ls - i - j - k\n\t\t\t\t\tif m > 0 and m <= 3:\n\t\t\t\t\t\tadd1 = s[0:i]\n\t\t\t\t\t\tadd2 = s[i:i + j]\n\t\t\t\t\t\tadd3 = s[i + j:i + j + k]\n\t\t\t\t\t\tadd4 = s[i + j + k:]\n\t\t\t\t\t\tif self.isValid(add1) and self.isValid(add2) and \\\n\t\t\t\t\t\t\t\t\t\tself.isValid(add3) and self.isValid(add4):\n\t\t\t\t\t\t\tres.append(add1 + '.' + add2 + '.' + add3 + '.' + add4)\n\t\treturn res\n\tdef isValid(self, add):\n\t\tif len(add) == 1:\n\t\t\treturn True\n\t\tif add[0] == '0':\n\t\t\treturn False\n\t\tif int(add) <= 255:\n\t\t\treturn True\n\t\treturn False\nif __name__ == '__main__':\n\ts = Solution()\n\tprint (s.restoreIpAddresses('25525511135'))", + "language": "python" + }, + "node_id": "dailycode-f5007b90ce784459a128ea75d2f74143", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470923" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/21.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/21.exercises/config.json" new file mode 100644 index 000000000..01911798d --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/21.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-bdac8c45d3904849856e3a056ee32977", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/21.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/21.exercises/solution.json" new file mode 100644 index 000000000..0a2576df5 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/21.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "0337596b175e45568b2ddc0a22d1e8e3", + "keywords": "位运算,数学,回溯", + "title": "格雷编码", + "desc": [ + { + "content": "\n

      格雷编码是一个二进制数字系统,在该系统中,两个连续的数值仅有一个位数的差异。

      \n

      给定一个代表编码总位数的非负整数 n,打印其格雷编码序列。即使有多个不同答案,你也只需要返回其中一种。

      \n

      格雷编码序列必须以 0 开头。

      \n

       

      \n

      示例 1:

      \n
      输入: 2
      输出:
       [0,1,3,2]
      解释:
      00 - 001 - 111 - 310 - 2对于给定的 n,其格雷编码序列并不唯一。例如,[0,2,3,1] 也是一个有效的格雷编码序列。00 - 010 - 211 - 301 - 1
      \n

      示例 2:

      \n
      输入: 0
      输出:
       [0]
      解释:
      我们定义格雷编码序列必须以 0 开头。给定编码总位数为 n 的格雷编码序列,其长度为 2n。当 n = 0 时,长度为 20 = 1。因此,当 n = 0 时,其格雷编码序列为 [0]。
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution(object):\n\tdef grayCode(self, n):\n\t\t\"\"\"\n\t\t:type n: int\n\t\t:rtype: List[int]\n\t\t\"\"\"\n\t\tres = [0]\n\t\tfor i in range(n):\n\t\t\tfor j in reversed(range(len(res))):\n\t\t\t\tres.append(res[j] + (1 << i))\n\t\treturn res\nif __name__ == \"__main__\":\n\ts = Solution()\n\tprint (s.grayCode(2))", + "language": "python" + }, + "node_id": "dailycode-bdac8c45d3904849856e3a056ee32977", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470797" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/22.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/22.exercises/config.json" new file mode 100644 index 000000000..6816e1829 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/22.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-7e632cf98b404ccba54e61ca0a59ca24", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/22.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/22.exercises/solution.json" new file mode 100644 index 000000000..c95e440ec --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/22.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "9e9cc102f27d4b99b46a5563bff193f0", + "keywords": "数组,双指针", + "title": "下一个排列", + "desc": [ + { + "content": "\n

      实现获取 下一个排列 的函数,算法需要将给定数字序列重新排列成字典序中下一个更大的排列。

      如果不存在下一个更大的排列,则将数字重新排列成最小的排列(即升序排列)。

      必须 原地 修改,只允许使用额外常数空间。

       

      示例 1:

      输入:nums = [1,2,3]
      输出:
      [1,3,2]

      示例 2:

      输入:nums = [3,2,1]
      输出:
      [1,2,3]

      示例 3:

      输入:nums = [1,1,5]
      输出:
      [1,5,1]

      示例 4:

      输入:nums = [1]
      输出:
      [1]

       

      提示:

        \t
      • 1 <= nums.length <= 100
      • \t
      • 0 <= nums[i] <= 100
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution(object):\n\tdef nextPermutation(self, nums):\n\t\tls = len(nums)\n\t\tif ls <= 1:\n\t\t\treturn\n\t\tpair = []\n\t\tfor i in range(ls):\n\t\t\tfor j in range(i + 1, ls):\n\t\t\t\tif nums[i] < nums[j]:\n\t\t\t\t\tpair.append([i,j])\n\t\tpos = 0\n\t\tif len(pair) > 0:\n\t\t\tself.swap(nums, pair[-1][0], pair[-1][1])\n\t\t\tpos = pair[-1][0] + 1\n\t\tfor i in range(pos, ls):\n\t\t\tfor j in range(i + 1, ls):\n\t\t\t\tif nums[i] > nums[j]:\n\t\t\t\t\tself.swap(nums, i, j)\n\t\treturn nums\n\tdef swap(self, nums, index1, index2):\n\t\tif index1 == index2:\n\t\t\treturn\n\t\tnums[index1], nums[index2] = nums[index2], nums[index1]\n# %%\ns = Solution()\nprint(s.nextPermutation(nums = [1,2,3]))", + "language": "python" + }, + "node_id": "dailycode-7e632cf98b404ccba54e61ca0a59ca24", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600471007" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/23.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/23.exercises/config.json" new file mode 100644 index 000000000..ef9ae77b6 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/23.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-0c3fe32641404f16be867b3a3b4777a8", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/23.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/23.exercises/solution.json" new file mode 100644 index 000000000..c3bd6e66e --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/23.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "2e066ff930634af69f5fbfabeb2432da", + "keywords": "位运算,数组,回溯", + "title": "子集 II", + "desc": [ + { + "content": "\n

      给你一个整数数组 nums ,其中可能包含重复元素,请你返回该数组所有可能的子集(幂集)。

      解集 不能 包含重复的子集。返回的解集中,子集可以按 任意顺序 排列。

       

      示例 1:

      输入:nums = [1,2,2]
      输出:
      [[],[1],[1,2],[1,2,2],[2],[2,2]]

      示例 2:

      输入:nums = [0]
      输出:
      [[],[0]]

       

      提示:

        \t
      • 1 <= nums.length <= 10
      • \t
      • -10 <= nums[i] <= 10
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution(object):\n\tdef subsetsWithDup(self, nums):\n\t\tnums.sort()\n\t\tres = [[]]\n\t\tbegin = 0\n\t\tfor index in range(len(nums)):\n\t\t\tif index == 0 or nums[index] != nums[index - 1]:\n\t\t\t\tbegin = 0\n\t\t\tsize = len(res)\n\t\t\tfor j in range(begin, size):\n\t\t\t\tcurr = list(res[j])\n\t\t\t\tcurr.append(nums[index])\n\t\t\t\tres.append(curr)\n\t\t\tbegin = size\n\t\treturn res\n# %%\ns = Solution()\nprint(s.subsetsWithDup(nums = [1,2,2]))", + "language": "python" + }, + "node_id": "dailycode-0c3fe32641404f16be867b3a3b4777a8", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600469825" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/24.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/24.exercises/config.json" new file mode 100644 index 000000000..3030956f2 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/24.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-c35f1b8b4df24f2a9203047c0d6474c6", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/24.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/24.exercises/solution.json" new file mode 100644 index 000000000..75635f409 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/24.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "8d369d50d5824166a6dfafcf90a58892", + "keywords": "栈,字符串", + "title": "简化路径", + "desc": [ + { + "content": "\n

      给你一个字符串 path ,表示指向某一文件或目录的 Unix 风格 绝对路径 (以 '/' 开头),请你将其转化为更加简洁的规范路径。

      在 Unix 风格的文件系统中,一个点(.)表示当前目录本身;此外,两个点 (..) 表示将目录切换到上一级(指向父目录);两者都可以是复杂相对路径的组成部分。任意多个连续的斜杠(即,'//')都被视为单个斜杠 '/' 。 对于此问题,任何其他格式的点(例如,'...')均被视为文件/目录名称。

      请注意,返回的 规范路径 必须遵循下述格式:

        \t
      • 始终以斜杠 '/' 开头。
      • \t
      • 两个目录名之间必须只有一个斜杠 '/'
      • \t
      • 最后一个目录名(如果存在)不能 '/' 结尾。
      • \t
      • 此外,路径仅包含从根目录到目标文件或目录的路径上的目录(即,不含 '.''..')。

      返回简化后得到的 规范路径

       

      示例 1:

      输入:path = \"/home/\"
      输出:
      \"/home\"
      解释:
      注意,最后一个目录名后面没有斜杠。

      示例 2:

      输入:path = \"/../\"
      输出:
      \"/\"
      解释:
      从根目录向上一级是不可行的,因为根目录是你可以到达的最高级。

      示例 3:

      输入:path = \"/home//foo/\"
      输出:
      \"/home/foo\"
      解释:
      在规范路径中,多个连续斜杠需要用一个斜杠替换。

      示例 4:

      输入:path = \"/a/./b/../../c/\"
      输出:
      \"/c\"

       

      提示:

        \t
      • 1 <= path.length <= 3000
      • \t
      • path 由英文字母,数字,'.''/''_' 组成。
      • \t
      • path 是一个有效的 Unix 风格绝对路径。
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution(object):\n\tdef simplifyPath(self, path):\n\t\t\"\"\"\n\t\t:type path: str\n\t\t:rtype: str\n\t\t\"\"\"\n\t\tresult = []\n\t\tplist = path.split('/')\n\t\tfor pos in plist:\n\t\t\tif pos:\n\t\t\t\tif pos == '..':\n\t\t\t\t\ttry:\n\t\t\t\t\t\tresult.pop()\n\t\t\t\t\texcept:\n\t\t\t\t\t\tresult = []\n\t\t\t\telif pos != '.':\n\t\t\t\t\tresult.append(pos)\n\t\treturn '/'+'/'.join(result)\n# %%\ns = Solution()\nprint(s.simplifyPath(path = \"/home/\"))", + "language": "python" + }, + "node_id": "dailycode-c35f1b8b4df24f2a9203047c0d6474c6", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470830" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/25.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/25.exercises/config.json" new file mode 100644 index 000000000..50ca3660e --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/25.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-d806ed41ab324a0582401a2c7b2a3da7", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/25.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/25.exercises/solution.json" new file mode 100644 index 000000000..e5888faed --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/25.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "452811b643cd4c9f8f98931e543a0050", + "keywords": "递归,链表,数学", + "title": "两数相加", + "desc": [ + { + "content": "\n

      给你两个 非空 的链表,表示两个非负的整数。它们每位数字都是按照 逆序 的方式存储的,并且每个节点只能存储 一位 数字。

      请你将两个数相加,并以相同形式返回一个表示和的链表。

      你可以假设除了数字 0 之外,这两个数都不会以 0 开头。

       

      示例 1:

      \"\"
      输入:l1 = [2,4,3], l2 = [5,6,4]
      输出:
      [7,0,8]
      解释:
      342 + 465 = 807.

      示例 2:

      输入:l1 = [0], l2 = [0]
      输出:
      [0]

      示例 3:

      输入:l1 = [9,9,9,9,9,9,9], l2 = [9,9,9,9]
      输出:
      [8,9,9,9,0,0,0,1]

       

      提示:

        \t
      • 每个链表中的节点数在范围 [1, 100]
      • \t
      • 0 <= Node.val <= 9
      • \t
      • 题目数据保证列表表示的数字不含前导零
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class ListNode:\n\tdef __init__(self, val=0, next=None):\n\t\tself.val = val\n\t\tself.next = next\nclass LinkList:\n\tdef __init__(self):\n\t\tself.head=None\n\tdef initList(self, data):\n\t\tself.head = ListNode(data[0])\n\t\tr=self.head\n\t\tp = self.head\n\t\tfor i in data[1:]:\n\t\t\tnode = ListNode(i)\n\t\t\tp.next = node\n\t\t\tp = p.next\n\t\treturn r\n\tdef\tconvert_list(self,head):\n\t\tret = []\n\t\tif head == None:\n\t\t\treturn\n\t\tnode = head\n\t\twhile node != None:\n\t\t\tret.append(node.val)\n\t\t\tnode = node.next\n\t\treturn ret\nclass Solution:\n\tdef addTwoNumbers(self, l1: ListNode, l2: ListNode) -> ListNode:\n\t\tlrr = l1\n\t\twhile True:\n\t\t\tl1.val = l1.val + l2.val\n\t\t\tif l1.next is None and l2.next is None and l1.val < 10:\n\t\t\t\tbreak\n\t\t\tif l1.next is None:\n\t\t\t\tl1.next = ListNode(0)\n\t\t\tif l2.next is None:\n\t\t\t\tl2.next = ListNode(0)\n\t\t\tif l1.val >= 10:\n\t\t\t\tl1.val = l1.val - 10\n\t\t\t\tl1.next.val += 1\n\t\t\tl1 = l1.next\n\t\t\tl2 = l2.next\n\t\treturn lrr\n# %%\nl = LinkList()\nlist1 = [2,4,3]\nlist2 = [5,6,4]\nl1 = l.initList(list1)\nl2 = l.initList(list2)\ns = Solution()\nprint(l.convert_list(s.addTwoNumbers(l1, l2)))", + "language": "python" + }, + "node_id": "dailycode-d806ed41ab324a0582401a2c7b2a3da7", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600469916" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/26.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/26.exercises/config.json" new file mode 100644 index 000000000..13dab74f7 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/26.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-178fdec62bcd41b0ab5d6d59b0ab1b74", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/26.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/26.exercises/solution.json" new file mode 100644 index 000000000..1ad07ad1b --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/26.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "4c70eba19b9e4343ac41d5eb062da79a", + "keywords": "链表,双指针", + "title": "分隔链表", + "desc": [ + { + "content": "\n

      给你一个链表的头节点 head 和一个特定值 x ,请你对链表进行分隔,使得所有 小于 x 的节点都出现在 大于或等于 x 的节点之前。

      你应当 保留 两个分区中每个节点的初始相对位置。

       

      示例 1:

      \"\"
      输入:head = [1,4,3,2,5,2], x = 3
      输出
      :[1,2,2,4,3,5]

      示例 2:

      输入:head = [2,1], x = 2
      输出
      :[1,2]

       

      提示:

        \t
      • 链表中节点的数目在范围 [0, 200]
      • \t
      • -100 <= Node.val <= 100
      • \t
      • -200 <= x <= 200
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class ListNode(object):\n\tdef __init__(self, x):\n\t\tself.val = x\n\t\tself.next = None\nclass LinkList:\n\tdef __init__(self):\n\t\tself.head=None\n\tdef initList(self, data):\n\t\tself.head = ListNode(data[0])\n\t\tr=self.head\n\t\tp = self.head\n\t\tfor i in data[1:]:\n\t\t\tnode = ListNode(i)\n\t\t\tp.next = node\n\t\t\tp = p.next\n\t\treturn r\n\tdef\tconvert_list(self,head):\n\t\tret = []\n\t\tif head == None:\n\t\t\treturn\n\t\tnode = head\n\t\twhile node != None:\n\t\t\tret.append(node.val)\n\t\t\tnode = node.next\n\t\treturn ret\nclass Solution(object):\n\tdef partition(self, head, x):\n\t\t\"\"\"\n\t\t:type head: ListNode\n\t\t:type x: int\n\t\t:rtype: ListNode\n\t\t\"\"\"\n\t\tif head is None:\n\t\t\treturn None\n\t\tless = lesshead = None\n\t\tlast = pos = head\n\t\twhile pos is not None:\n\t\t\tif pos.val < x:\n\t\t\t\tif lesshead is None:\n\t\t\t\t\tlesshead = pos\n\t\t\t\telse:\n\t\t\t\t\tless.next = pos\n\t\t\t\tless = pos\n\t\t\t\tif head == pos:\n\t\t\t\t\tlast = head = pos.next\n\t\t\t\telse:\n\t\t\t\t\tlast.next = pos.next\n\t\t\telse:\n\t\t\t\tlast = pos\n\t\t\tpos = pos.next\n\t\tif lesshead is not None:\n\t\t\tless.next = head\n\t\telse:\n\t\t\tlesshead = head\n\t\treturn lesshead\n# %%\nl = LinkList()\nlist1 = [1,4,3,2,5,2]\nl1 = l.initList(list1)\nx = 3\ns = Solution()\nprint(l.convert_list(s.partition(l1, x)))", + "language": "python" + }, + "node_id": "dailycode-178fdec62bcd41b0ab5d6d59b0ab1b74", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470229" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/27.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/27.exercises/config.json" new file mode 100644 index 000000000..8075bcf7e --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/27.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-38889c9cdaae42f4a0f4a8c8a9c710c4", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/27.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/27.exercises/solution.json" new file mode 100644 index 000000000..50d3ac939 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/27.exercises/solution.json" @@ -0,0 +1,124 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "1a84c27cd01946f48fed4895199846d8", + "keywords": "哈希表,数学,字符串", + "title": "整数转罗马数字", + "desc": [ + { + "content": "\n
      \n

      罗马数字包含以下七种字符: I, V, X, LCD 和 M。\n

      ", + "language": "markdown" + }, + { + "content": "\n
      字符          数值\nI             1\nV             5\nX             10\nL             50\nC             100\nD             500\nM             1000
      ", + "language": "markdown" + }, + { + "content": "\n

      例如, 罗马数字 2 写做 II ,即为两个并列的 1。12\n写做 XII ,即为 X + II 。 27\n写做  XXVII,\n即为 XX + V + II 。

      ", + "language": "markdown" + }, + { + "content": "\n

      通常情况下,罗马数字中小的数字在大的数字的右边。但也存在特例,例如 4 不写做 IIII,而是 IV。数字 1 在数字 5 的左边,所表示的数等于大数 5\n减小数 1 得到的数值 4 。同样地,数字 9 表示为 IX。这个特殊的规则只适用于以下六种情况:

      ", + "language": "markdown" + }, + { + "content": "\n
        \n
      • I 可以放在 V (5) 和 X (10) 的左边,来表示 4 和 9。
      • \n
      • X 可以放在 L (50) 和 C (100) 的左边,来表示 40\n和 90。 
      • \n
      • C 可以放在 D (500) 和 M (1000) 的左边,来表示 400\n和 900。
      • \n
      ", + "language": "markdown" + }, + { + "content": "\n

      给你一个整数,将其转为罗马数字。

      ", + "language": "markdown" + }, + { + "content": "\n

       

      ", + "language": "markdown" + }, + { + "content": "\n

      示例 1:

      ", + "language": "markdown" + }, + { + "content": "\n
      输入: num = 3\n
      输出:
      \"III\"
      ", + "language": "markdown" + }, + { + "content": "\n

      示例 2:

      ", + "language": "markdown" + }, + { + "content": "\n
      输入: num = 4\n
      输出:
      \"IV\"
      ", + "language": "markdown" + }, + { + "content": "\n

      示例 3:

      ", + "language": "markdown" + }, + { + "content": "\n
      输入: num = 9\n
      输出:
      \"IX\"
      ", + "language": "markdown" + }, + { + "content": "\n

      示例 4:

      ", + "language": "markdown" + }, + { + "content": "\n
      输入: num = 58\n
      输出:
      \"LVIII\"\n
      解释:
      L = 50, V = 5, III = 3.\n
      ", + "language": "markdown" + }, + { + "content": "\n

      示例 5:

      ", + "language": "markdown" + }, + { + "content": "\n
      输入: num = 1994\n
      输出:
      \"MCMXCIV\"\n
      解释:
      M = 1000, CM = 900, XC = 90, IV = 4.
      ", + "language": "markdown" + }, + { + "content": "\n

       

      ", + "language": "markdown" + }, + { + "content": "\n

      提示:

      ", + "language": "markdown" + }, + { + "content": "\n
        \n
      • 1 <= num <= 3999
      • \n
      \n
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "from math import floor\nclass Solution:\n\tdef intToRoman(self, num: int) -> str:\n\t\tf = 1000\n\t\tf2 = 1000\n\t\tsym = ['M', 'D', 'C', 'L', 'X', 'V', 'I']\n\t\tfsi = 0\n\t\ts = [2, 5]\n\t\tsi = 0\n\t\ts2 = [10, 1]\n\t\tsi2 = 0\n\t\troman = []\n\t\twhile num > 0:\n\t\t\td = floor(num/f)\n\t\t\tr = num % f\n\t\t\td2 = floor(num/f2)\n\t\t\tr2 = num % f2\n\t\t\tif d > 0:\n\t\t\t\tif d == 4:\n\t\t\t\t\troman.append(sym[fsi])\n\t\t\t\t\troman.append(sym[fsi-1])\n\t\t\t\t\tnum = r\n\t\t\t\telif d2 == 9:\n\t\t\t\t\troman.append(sym[fsi+1])\n\t\t\t\t\troman.append(sym[fsi-1])\n\t\t\t\t\tnum = r2\n\t\t\t\telse:\n\t\t\t\t\ti = 0\n\t\t\t\t\twhile i < d:\n\t\t\t\t\t\troman.append(sym[fsi])\n\t\t\t\t\t\ti += 1\n\t\t\t\t\tnum = r\n\t\t\tf = f/s[si]\n\t\t\tsi += 1\n\t\t\tsi %= 2\n\t\t\tf2 = f2/s2[si2]\n\t\t\tsi2 += 1\n\t\t\tsi2 %= 2\n\t\t\tfsi += 1\n\t\treturn ''.join(roman)\n# %%\ns = Solution()\nprint(s.intToRoman(num = 3))", + "language": "python" + }, + "node_id": "dailycode-38889c9cdaae42f4a0f4a8c8a9c710c4", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600469817" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/28.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/28.exercises/config.json" new file mode 100644 index 000000000..302c700de --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/28.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-3caea3b49b034e598bc0fbc44f533451", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/28.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/28.exercises/solution.json" new file mode 100644 index 000000000..c0fb2076e --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/28.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "6e91a9599b784a6887d11d64b628d446", + "keywords": "数组,回溯", + "title": "全排列 II", + "desc": [ + { + "content": "\n

      给定一个可包含重复数字的序列 nums按任意顺序 返回所有不重复的全排列。

       

      示例 1:

      输入:nums = [1,1,2]
      输出:
      [[1,1,2], [1,2,1], [2,1,1]]

      示例 2:

      输入:nums = [1,2,3]
      输出:
      [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]

       

      提示:

        \t
      • 1 <= nums.length <= 8
      • \t
      • -10 <= nums[i] <= 10
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "from typing import List\nclass Solution:\n\tdef permuteUnique(self, nums: List[int]) -> List[List[int]]:\n\t\tans = []\n\t\tif len(nums) == 0:\n\t\t\treturn\n\t\tif len(nums) == 1:\n\t\t\treturn [nums]\n\t\tfor index,item in enumerate(nums):\n\t\t\tres = nums[:index]+nums[index+1:]\n\t\t\tfor j in self.permuteUnique(res): \n\t\t\t\tans.append(j+[item])\n\t\trel = []\n\t\tfor i in ans:\n\t\t\tif i not in rel:\n\t\t\t\trel.append(i)\n\t\treturn rel\n# %%\ns = Solution()\nprint(s.permuteUnique(nums = [1,2,3]))", + "language": "python" + }, + "node_id": "dailycode-3caea3b49b034e598bc0fbc44f533451", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470224" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/29.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/29.exercises/config.json" new file mode 100644 index 000000000..d416366ff --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/29.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-b502a08a7c5c452b98a10f067e5ac1cb", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/29.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/29.exercises/solution.json" new file mode 100644 index 000000000..0b0817889 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/29.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "258071360f4d49dda7bcf35265f11865", + "keywords": "哈希表,字符串,滑动窗口", + "title": "无重复字符的最长子串", + "desc": [ + { + "content": "\n

      给定一个字符串,请你找出其中不含有重复字符的 最长子串 的长度。

       

      示例 1:

      输入: s = \"abcabcbb\"
      输出:
      3
      解释:
      因为无重复字符的最长子串是 \"abc\",所以其长度为 3。

      示例 2:

      输入: s = \"bbbbb\"
      输出:
      1
      解释:
      因为无重复字符的最长子串是 \"b\",所以其长度为 1。

      示例 3:

      输入: s = \"pwwkew\"
      输出:
      3
      解释:
      因为无重复字符的最长子串是 \"wke\",所以其长度为 3。 \n请注意,你的答案必须是 子串 的长度,\"pwke\" 是一个子序列,不是子串。

      示例 4:

      输入: s = \"\"
      输出:
      0

       

      提示:

        \t
      • 0 <= s.length <= 5 * 104
      • \t
      • s 由英文字母、数字、符号和空格组成
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution:\n\tdef lengthOfLongestSubstring(self, s: str) -> int:\n\t\ti = 0\n\t\tj = 0\n\t\tm = 0\n\t\thset = {}\n\t\twhile j < len(s):\n\t\t\tchar = s[j]\n\t\t\tindex = hset.get(char)\n\t\t\tif index is not None and index > i:\n\t\t\t\ti = index\n\t\t\tm = m if m > j - i + 1 else j - i + 1\n\t\t\thset[char] = j + 1\n\t\t\tj += 1\n\t\treturn m\n# %%\ns = Solution()\nprint(s.lengthOfLongestSubstring('abcabcbb'))", + "language": "python" + }, + "node_id": "dailycode-b502a08a7c5c452b98a10f067e5ac1cb", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600471011" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/3.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/3.exercises/config.json" new file mode 100644 index 000000000..560d3ab47 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/3.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-df5089b6b16346dcb5d24198a0eb1e37", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/3.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/3.exercises/solution.json" new file mode 100644 index 000000000..00efc240d --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/3.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "9f42a4ea1918468eb54d950bcfcb81aa", + "keywords": "数学,算法", + "title": "实现保留3位有效数字(四舍六入五成双规则)", + "desc": [ + { + "content": "\n输入:1234 输出:1234\n12 12.0\n4 4.00\n0.2 0.200\n0.32 0.320\n1.3 1.30\n1.235 1.24\n1.245 1.24\n1.2451 1.25", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "a = input()\nif '.' in a:\n\ta = float(a)\n\tif a*1000%10!=5:\n\t\ta = '%.2f'%(a)\n\telse:\n\t\tif len(str(a).split(\".\")[1])>3:\n\t\t\ta = '%.2f'%(a)\n\t\telse:\n\t\t\tif int(a*100%10%2)==1:\n\t\t\t\ta = float('%.2f'%float(int(a*100)/100))+0.01\n\t\t\telse:\n\t\t\t\ta = '%.2f'%float(int(a*100)/100)\n\tprint(a)\nelse:\n\ta = int(a)\n\tif a>99:\n\t\tprint(a)\n\telse:\n\t\tif 0 < a < 10: \n\t\t\tprint('%.2f'%a)\n\t\telse:\n\t\t\tprint(float(a))", + "language": "python" + }, + "node_id": "dailycode-df5089b6b16346dcb5d24198a0eb1e37", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600469884" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/30.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/30.exercises/config.json" new file mode 100644 index 000000000..5df8b9598 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/30.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-f705496a584747d69e1008f88a6e4bf8", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/30.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/30.exercises/solution.json" new file mode 100644 index 000000000..cd058e33e --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/30.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "88def27bcaee46c4915df546be00d843", + "keywords": "字符串,动态规划", + "title": "解码方法", + "desc": [ + { + "content": "\n

      一条包含字母 A-Z 的消息通过以下映射进行了 编码

      \n
      'A' -> 1'B' -> 2...'Z' -> 26
      \n

      解码 已编码的消息,所有数字必须基于上述映射的方法,反向映射回字母(可能有多种方法)。例如,\"11106\" 可以映射为:

      \n
        \n
      • \"AAJF\" ,将消息分组为 (1 1 10 6)
      • \n
      • \"KJF\" ,将消息分组为 (11 10 6)
      • \n
      \n

      注意,消息不能分组为  (1 11 06) ,因为 \"06\" 不能映射为 \"F\" ,这是由于 \"6\" 和\n\"06\" 在映射中并不等价。\n

      \n

      给你一个只含数字的 非空 字符串 s ,请计算并返回 解码 方法的 总数

      \n

      题目数据保证答案肯定是一个 32 位 的整数。

      \n

       

      \n

      示例 1:

      \n
      输入:s = \"12\"
      输出:
      2
      解释:
      它可以解码为 \"AB\"(1 2)或者 \"L\"(12)。
      \n

      示例 2:

      \n
      输入:s = \"226\"
      输出:
      3
      解释:
      它可以解码为 \"BZ\" (2 26), \"VF\" (22 6), 或者 \"BBF\" (2 2 6) 。
      \n

      示例 3:

      \n
      输入:s = \"0\"
      输出:
      0
      解释:
      没有字符映射到以 0 开头的数字。含有 0 的有效映射是 'J' -> \"10\" 和 'T'-> \"20\" 。由于没有字符,因此没有有效的方法对此进行解码,因为所有数字都需要映射。
      \n

      示例 4:

      \n
      输入:s = \"06\"
      输出:
      0
      解释:
      \"06\" 不能映射到 \"F\" ,因为字符串含有前导 0(\"6\" 和 \"06\" 在映射中并不等价)。
      \n

       

      \n

      提示:

      \n
        \n
      • 1 <= s.length <= 100
      • \n
      • s 只包含数字,并且可能包含前导零。
      • \n
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution(object):\n\tdef numDecodings(self, s):\n\t\t\"\"\"\n\t\t:type s: str\n\t\t:rtype: int\n\t\t\"\"\"\n\t\tls = len(s)\n\t\tif ls == 0:\n\t\t\treturn 0\n\t\tdp = [0] * ls\n\t\tfor index in range(ls):\n\t\t\tif index >= 1 and int(s[index - 1:index + 1]) < 27 and int(s[index - 1:index + 1]) >= 10:\n\t\t\t\tif index == 1:\n\t\t\t\t\tdp[index] = 1\n\t\t\t\telse:\n\t\t\t\t\tdp[index] += dp[index - 2]\n\t\t\tif int(s[index]) != 0:\n\t\t\t\tif index == 0:\n\t\t\t\t\tdp[index] = 1\n\t\t\t\telse:\n\t\t\t\t\tdp[index] += dp[index - 1]\n\t\treturn dp[ls - 1]\n# %%\ns = Solution()\nprint(s.numDecodings(s = \"12\"))", + "language": "python" + }, + "node_id": "dailycode-f705496a584747d69e1008f88a6e4bf8", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600469925" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/31.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/31.exercises/config.json" new file mode 100644 index 000000000..fd41a9774 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/31.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-8f5f2e3476d345f0995743a1a93b93b5", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/31.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/31.exercises/solution.json" new file mode 100644 index 000000000..7152cfff5 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/31.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "a856468392d54174a9468867390a6497", + "keywords": "位运算,数学", + "title": "两数相除", + "desc": [ + { + "content": "\n

      给定两个整数,被除数 dividend 和除数 divisor。将两数相除,要求不使用乘法、除法和 mod 运算符。

      返回被除数 dividend 除以除数 divisor 得到的商。

      整数除法的结果应当截去(truncate)其小数部分,例如:truncate(8.345) = 8 以及 truncate(-2.7335) = -2

       

      示例 1:

      输入: dividend = 10, divisor = 3
      输出:
      3
      解释:
      10/3 = truncate(3.33333..) = truncate(3) = 3

      示例 2:

      输入: dividend = 7, divisor = -3
      输出:
      -2
      解释:
      7/-3 = truncate(-2.33333..) = -2

       

      提示:

        \t
      • 被除数和除数均为 32 位有符号整数。
      • \t
      • 除数不为 0。
      • \t
      • 假设我们的环境只能存储 32 位有符号整数,其数值范围是 [−231,  231 − 1]。本题中,如果除法结果溢出,则返回 231 − 1。
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "import math\nclass Solution(object):\n\tdef divide(self, dividend, divisor):\n\t\tif divisor == 0:\n\t\t\treturn MAX_INT\n\t\tif dividend == 0:\n\t\t\treturn 0\n\t\tisPositive = (dividend < 0) == (divisor < 0)\n\t\tm = abs(dividend)\n\t\tn = abs(divisor)\n\t\tres = math.log(m) - math.log(n)\n\t\tres = int(math.exp(res))\n\t\tif isPositive:\n\t\t\treturn min(res, 2147483647)\n\t\treturn max(0 - res, -2147483648)\nif __name__ == '__main__':\n\ts = Solution()\n\tprint(s.divide(1, 1))", + "language": "python" + }, + "node_id": "dailycode-8f5f2e3476d345f0995743a1a93b93b5", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470833" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/32.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/32.exercises/config.json" new file mode 100644 index 000000000..2329c63b0 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/32.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-6d9dbe9c0db5433dbf81e522dbfedeb0", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/32.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/32.exercises/solution.json" new file mode 100644 index 000000000..a967a4213 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/32.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "283dc07c5cdf4aedb15f3ecfffcaa9eb", + "keywords": "数组,矩阵,模拟", + "title": "螺旋矩阵", + "desc": [ + { + "content": "\n

      给你一个 mn 列的矩阵 matrix ,请按照 顺时针螺旋顺序 ,返回矩阵中的所有元素。

       

      示例 1:

      \"\"
      输入:matrix = [[1,2,3],[4,5,6],[7,8,9]]
      输出:
      [1,2,3,6,9,8,7,4,5]

      示例 2:

      \"\"
      输入:matrix = [[1,2,3,4],[5,6,7,8],[9,10,11,12]]
      输出:
      [1,2,3,4,8,12,11,10,9,5,6,7]

       

      提示:

        \t
      • m == matrix.length
      • \t
      • n == matrix[i].length
      • \t
      • 1 <= m, n <= 10
      • \t
      • -100 <= matrix[i][j] <= 100
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution(object):\n\tdef spiralOrder(self, matrix):\n\t\t\"\"\"\n\t\t:type matrix: List[List[int]]\n\t\t:rtype: List[int]\n\t\t\"\"\"\n\t\tif matrix is None or len(matrix) == 0:\n\t\t\treturn matrix\n\t\tm, n = len(matrix), len(matrix[0])\n\t\treturn self.get_spiralOrder(matrix, 0, m - 1, 0, n - 1)\n\tdef get_spiralOrder(self, matrix, r_start, r_end, c_start, c_end):\n\t\tif r_start > r_end or c_start > c_end:\n\t\t\treturn []\n\t\telif r_start == r_end:\n\t\t\treturn matrix[r_start][c_start:c_end + 1]\n\t\telif c_start == c_end:\n\t\t\treturn [matrix[j][c_end] for j in range(r_start, r_end + 1)]\n\t\tcurr = matrix[r_start][c_start:c_end + 1] + [matrix[j][c_end] for j in range(r_start + 1, r_end)] +\\\n\t\t\t\tmatrix[r_end][c_start:c_end + 1][::-1] +\\\n\t\t\t\t[matrix[j][c_start] for j in reversed(range(r_start + 1, r_end))]\n\t\tres = curr + self.get_spiralOrder(matrix, r_start + 1, r_end - 1, c_start + 1, c_end - 1)\n\t\treturn res\nif __name__ == '__main__':\n\ts = Solution()\n\tprint (s.spiralOrder([[1,2,3,4],[5,6,7,8],[9,10,11,12],[13,14,15,16]]))", + "language": "python" + }, + "node_id": "dailycode-6d9dbe9c0db5433dbf81e522dbfedeb0", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470121" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/33.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/33.exercises/config.json" new file mode 100644 index 000000000..0abf31559 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/33.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-fdb0c6ff79bb497cbb659d0c0cd3aa0e", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/33.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/33.exercises/solution.json" new file mode 100644 index 000000000..310e8db85 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/33.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "90285104c9554381b189cbea114cada2", + "keywords": "数组,回溯", + "title": "全排列", + "desc": [ + { + "content": "\n

      给定一个 没有重复 数字的序列,返回其所有可能的全排列。

      示例:

      输入: [1,2,3]
      输出:
      [ [1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], [3,2,1]]
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution:\n\t def permute(self, nums):\n\t\t\te=[]\n\t\t\tif(len(nums)==1):\n\t\t\t\treturn [nums]\n\t\t\tfor i in range(len(nums)):\n\t\t\t\tq=self.permute(nums[:i]+nums[i+1:])\n\t\t\t\tfor c in q:\n\t\t\t\t\te.append([nums[i]]+c)\n\t\t\treturn e\n# %%\ns = Solution()\nprint(s.permute(nums = [1,2,3]))", + "language": "python" + }, + "node_id": "dailycode-fdb0c6ff79bb497cbb659d0c0cd3aa0e", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600469820" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/34.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/34.exercises/config.json" new file mode 100644 index 000000000..c2ebecd13 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/34.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-0a11733c91fa474bb7a32059c929f5f2", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/34.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/34.exercises/solution.json" new file mode 100644 index 000000000..cea496fd0 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/34.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "621940a959c64dc58077351c662c97b4", + "keywords": "数组,二分查找", + "title": "搜索旋转排序数组", + "desc": [ + { + "content": "\n

      整数数组 nums 按升序排列,数组中的值 互不相同

      \n

      在传递给函数之前,nums 在预先未知的某个下标 k0 <= k < nums.length)上进行了 旋转,使数组变为\n[nums[k], nums[k+1], ..., nums[n-1], nums[0], nums[1], ..., nums[k-1]](下标 从 0 开始\n计数)。例如, [0,1,2,4,5,6,7] 在下标 3 处经旋转后可能变为 [4,5,6,7,0,1,2] 。\n

      \n

      给你 旋转后 的数组 nums 和一个整数 target ,如果 nums 中存在这个目标值\ntarget ,则返回它的下标,否则返回 -1 。\n

      \n

       

      \n

      示例 1:

      \n
      输入:nums = [4,5,6,7,0,1,2], target = 0
      输出:
      4
      \n

      示例 2:

      \n
      输入:nums = [4,5,6,7,0,1,2], target = 3
      输出:
      -1
      \n

      示例 3:

      \n
      输入:nums = [1], target = 0
      输出:
      -1
      \n

       

      \n

      提示:

      \n
        \n
      • 1 <= nums.length <= 5000
      • \n
      • -10^4 <= nums[i] <= 10^4
      • \n
      • nums 中的每个值都 独一无二
      • \n
      • 题目数据保证 nums 在预先未知的某个下标上进行了旋转
      • \n
      • -10^4 <= target <= 10^4
      • \n
      \n

       

      \n

      进阶:你可以设计一个时间复杂度为 O(log n) 的解决方案吗?

      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution:\n\tdef search(self, nums, target):\n\t\tdef get(start, end):\n\t\t\tif start > end:\n\t\t\t\treturn -1\n\t\t\tmid = (start + end) / 2\n\t\t\tmid = int(mid)\n\t\t\tif nums[mid] == target:\n\t\t\t\treturn mid\n\t\t\telif nums[mid] >= nums[start]: \n\t\t\t\tif target >= nums[start] and target < nums[mid]:\n\t\t\t\t\treturn get(start, mid - 1)\n\t\t\t\telse:\n\t\t\t\t\treturn get(mid + 1, end)\n\t\t\telif nums[mid] <= nums[end]: \n\t\t\t\tif target > nums[mid] and target <= nums[end]:\n\t\t\t\t\treturn get(mid + 1, end)\n\t\t\t\telse:\n\t\t\t\t\treturn get(start, mid - 1)\n\t\treturn get(0, len(nums) - 1)\n# %%\ns = Solution()\nprint(s.search(nums = [4,5,6,7,0,1,2], target = 0))", + "language": "python" + }, + "node_id": "dailycode-0a11733c91fa474bb7a32059c929f5f2", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470220" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/35.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/35.exercises/config.json" new file mode 100644 index 000000000..de43165a1 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/35.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-a80939d1f7bf47458f330cb20db27c6d", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/35.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/35.exercises/solution.json" new file mode 100644 index 000000000..5d64fed12 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/35.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "9e26f434eaf846cc9a66e332ab8ec58f", + "keywords": "数组,二分查找,矩阵", + "title": "搜索二维矩阵", + "desc": [ + { + "content": "\n

      编写一个高效的算法来判断 m x n 矩阵中,是否存在一个目标值。该矩阵具有如下特性:

        \t
      • 每行中的整数从左到右按升序排列。
      • \t
      • 每行的第一个整数大于前一行的最后一个整数。

       

      示例 1:

      \"\"
      输入:matrix = [[1,3,5,7],[10,11,16,20],[23,30,34,60]], target = 3
      输出:
      true

      示例 2:

      \"\"
      输入:matrix = [[1,3,5,7],[10,11,16,20],[23,30,34,60]], target = 13
      输出:
      false

       

      提示:

        \t
      • m == matrix.length
      • \t
      • n == matrix[i].length
      • \t
      • 1 <= m, n <= 100
      • \t
      • -104 <= matrix[i][j], target <= 104
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution(object):\n\tdef searchMatrix(self, matrix, target):\n\t\t\"\"\"\n\t\t:type matrix: List[List[int]]\n\t\t:type target: int\n\t\t:rtype: bool\n\t\t\"\"\"\n\t\tif not matrix or not matrix[0]:\n\t\t\treturn False\n\t\trows = len(matrix)\n\t\tcols = len(matrix[0])\n\t\trow, col = 0, cols - 1\n\t\twhile True:\n\t\t\tif row < rows and col >= 0:\n\t\t\t\tif matrix[row][col] == target:\n\t\t\t\t\treturn True\n\t\t\t\telif matrix[row][col] < target:\n\t\t\t\t\trow += 1\n\t\t\t\telse:\n\t\t\t\t\tcol -= 1\n\t\t\telse:\n\t\t\t\treturn False\n# %%\ns = Solution()\nprint(s.searchMatrix(matrix = [[1,3,5,7],[10,11,16,20],[23,30,34,60]], target = 3))", + "language": "python" + }, + "node_id": "dailycode-a80939d1f7bf47458f330cb20db27c6d", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600469923" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/36.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/36.exercises/config.json" new file mode 100644 index 000000000..ec1b0f360 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/36.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-ab955e0c23904c6d8b3dd32fc4d80da1", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/36.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/36.exercises/solution.json" new file mode 100644 index 000000000..823d03d5c --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/36.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "e81cc158a5d9484fa246307417ee9eeb", + "keywords": "递归,数学", + "title": "Pow(x, n)", + "desc": [ + { + "content": "\n

      实现 pow(x, n) ,即计算 x 的 n 次幂函数(即,xn)。

       

      示例 1:

      输入:x = 2.00000, n = 10
      输出:
      1024.00000

      示例 2:

      输入:x = 2.10000, n = 3
      输出:
      9.26100

      示例 3:

      输入:x = 2.00000, n = -2
      输出:
      0.25000
      解释:
      2-2 = 1/22 = 1/4 = 0.25

       

      提示:

        \t
      • -100.0 < x < 100.0
      • \t
      • -231 <= n <= 231-1
      • \t
      • -104 <= xn <= 104
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution:\n\tdef myPow(self, x, n):\n\t\tif n == 0:\n\t\t\treturn 1\n\t\tres ,curr = 1, abs(n)\n\t\twhile curr > 0:\n\t\t\tif curr & 1 == 1:\n\t\t\t\tres *= x\n\t\t\tcurr >>= 1\n\t\t\tx *= x\n\t\tif n < 0:\n\t\t\treturn 1 / res\n\t\treturn res\n# %%\ns = Solution()\nprint(s.myPow(x = 2.00000, n = 10))", + "language": "python" + }, + "node_id": "dailycode-ab955e0c23904c6d8b3dd32fc4d80da1", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600471013" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/37.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/37.exercises/config.json" new file mode 100644 index 000000000..879a8ebb1 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/37.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-9f59a4bafe424c768dc1883a7edfb04b", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/37.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/37.exercises/solution.json" new file mode 100644 index 000000000..defbc7c6a --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/37.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "689d088dff924b3dba06a66fc6014101", + "keywords": "哈希表,字符串,排序", + "title": "字母异位词分组", + "desc": [ + { + "content": "\n

      给定一个字符串数组,将字母异位词组合在一起。字母异位词指字母相同,但排列不同的字符串。

      \n

      示例:

      \n
      输入:[eat", "tea", "tan", "ate", "nat", "bat"]
      输出:
      [[ate","eat","tea"],["nat","tan"],["bat"]]
      \n

      说明:

      \n
        \n
      • 所有输入均为小写字母。
      • \n
      • 不考虑答案输出的顺序。
      • \n
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution(object):\n\tdef groupAnagrams(self, strs):\n\t\tstrs.sort()\n\t\thash = {}\n\t\tfor s in strs:\n\t\t\tkey = self.hash_key(s)\n\t\t\ttry:\n\t\t\t\thash[key].append(s)\n\t\t\texcept KeyError:\n\t\t\t\thash[key] = [s]\n\t\treturn hash.values()\n\tdef hash_key(self, s):\n\t\ttable = [0] * 26\n\t\tfor ch in s:\n\t\t\tindex = ord(ch) - ord('a')\n\t\t\ttable[index] += 1\n\t\treturn str(table)\n# %%\ns = Solution()\nprint(s.groupAnagrams(strs = [\"eat\", \"tea\", \"tan\", \"ate\", \"nat\", \"bat\"]))", + "language": "python" + }, + "node_id": "dailycode-9f59a4bafe424c768dc1883a7edfb04b", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470799" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/38.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/38.exercises/config.json" new file mode 100644 index 000000000..c1e5470f5 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/38.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-950e34d34dc94847975e1ca56e54c574", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/38.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/38.exercises/solution.json" new file mode 100644 index 000000000..603f65f6e --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/38.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "cf5287cf5a0b48f2bad71ab49b950532", + "keywords": "数组,哈希表,矩阵", + "title": "矩阵置零", + "desc": [ + { + "content": "\n

      给定一个 m x n 的矩阵,如果一个元素为 0 ,则将其所在行和列的所有元素都设为 0 。请使用 原地 算法

      进阶:

        \t
      • 一个直观的解决方案是使用  O(mn) 的额外空间,但这并不是一个好的解决方案。
      • \t
      • 一个简单的改进方案是使用 O(m + n) 的额外空间,但这仍然不是最好的解决方案。
      • \t
      • 你能想出一个仅使用常量空间的解决方案吗?

       

      示例 1:

      \"\"
      输入:matrix = [[1,1,1],[1,0,1],[1,1,1]]
      输出:
      [[1,0,1],[0,0,0],[1,0,1]]

      示例 2:

      \"\"
      输入:matrix = [[0,1,2,0],[3,4,5,2],[1,3,1,5]]
      输出:
      [[0,0,0,0],[0,4,5,0],[0,3,1,0]]

       

      提示:

        \t
      • m == matrix.length
      • \t
      • n == matrix[0].length
      • \t
      • 1 <= m, n <= 200
      • \t
      • -231 <= matrix[i][j] <= 231 - 1
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution(object):\n\tdef setZeroes(self, matrix):\n\t\t\"\"\"\n\t\t:type matrix: List[List[int]]\n\t\t:rtype: void Do not return anything, modify matrix in-place instead.\n\t\t\"\"\"\n\t\tif not matrix:\n\t\t\treturn\n\t\tm = len(matrix)\n\t\tif m == 0:\n\t\t\treturn\n\t\tr = []\n\t\tc = []\n\t\tn = len(matrix[0])\n\t\tfor i in range(m):\n\t\t\tfor j in range(n):\n\t\t\t\tif matrix[i][j] == 0:\n\t\t\t\t\tr.append(i)\n\t\t\t\t\tc.append(j)\n\t\tr = set(r)\n\t\tc = set(c)\n\t\tfor i in r:\n\t\t\tfor j in range(n):\n\t\t\t\tmatrix[i][j] = 0\n\t\tfor i in range(m):\n\t\t\tfor j in c:\n\t\t\t\tmatrix[i][j] = 0\n\t\treturn matrix\n# %%\ns = Solution()\nprint(s.setZeroes(matrix = [[0,1,2,0],[3,4,5,2],[1,3,1,5]]))", + "language": "python" + }, + "node_id": "dailycode-950e34d34dc94847975e1ca56e54c574", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470228" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/39.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/39.exercises/config.json" new file mode 100644 index 000000000..4a7c21426 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/39.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-9dc6613c2af04b408404e0c407aaa7c6", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/39.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/39.exercises/solution.json" new file mode 100644 index 000000000..559168982 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/39.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "5c3fc04cab7e4336b1d589b82d2ddf89", + "keywords": "数组,二分查找", + "title": "在排序数组中查找元素的第一个和最后一个位置", + "desc": [ + { + "content": "\n

      给定一个按照升序排列的整数数组 nums,和一个目标值 target。找出给定目标值在数组中的开始位置和结束位置。

      \n

      如果数组中不存在目标值 target,返回 [-1, -1]

      \n

      进阶:

      \n
        \n
      • 你可以设计并实现时间复杂度为 O(log n) 的算法解决此问题吗?
      • \n
      \n

       

      \n

      示例 1:

      \n
      输入:nums = [5,7,7,8,8,10], target = 8
      输出:
      [3,4]
      \n

      示例 2:

      \n
      输入:nums = [5,7,7,8,8,10], target = 6
      输出:
      [-1,-1]
      \n

      示例 3:

      \n
      输入:nums = [], target = 0
      输出:
      [-1,-1]
      \n

       

      \n

      提示:

      \n
        \n
      • 0 <= nums.length <= 105
      • \n
      • -109 <= nums[i] <= 109
      • \n
      • nums 是一个非递减数组
      • \n
      • -109 <= target <= 109
      • \n
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution(object):\n\tdef searchRange(self, nums, target):\n\t\tlength = len(nums)\n\t\tif length == 0:\n\t\t\treturn [-1, -1]\n\t\tmin = 0\n\t\tmax = length - 1\n\t\twhile min <= max:\n\t\t\tpos = (min + max) / 2\n\t\t\tpos = int(pos)\n\t\t\tif nums[pos] > target:\n\t\t\t\tmax = pos - 1\n\t\t\telif nums[pos] < target:\n\t\t\t\tmin = pos + 1\n\t\t\telse:\n\t\t\t\tfor i in range(min, max + 1):\n\t\t\t\t\tif nums[i] == target:\n\t\t\t\t\t\tif min < i and nums[min] != nums[i]:\n\t\t\t\t\t\t\tmin = i\n\t\t\t\t\t\tmax = i\n\t\t\t\treturn [min, max]\n\t\treturn [-1, -1]\n# %%\ns = Solution()\nprint(s.searchRange(nums = [5,7,7,8,8,10], target = 8))", + "language": "python" + }, + "node_id": "dailycode-9dc6613c2af04b408404e0c407aaa7c6", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470221" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/4.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/4.exercises/config.json" new file mode 100644 index 000000000..d1a54382e --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/4.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-e255b434da964a3e8c1104d1242677a5", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/4.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/4.exercises/solution.json" new file mode 100644 index 000000000..d6e2eed9a --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/4.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "4077f0dced7149508a7104c84c7eb01d", + "keywords": "散列表,散列表,算法中阶,数据结构", + "title": "求列表(整数列表)的平衡点", + "desc": [ + { + "content": "\n对于一个整数列表,如果有一个切分位置使其前面的元素之和等于后面的元素之和,就称该位置是平衡点\n请编写程序求列表(整数列表)的平衡点,不存在时给出提示。\n思路:\n1.确定一个位置\n2.求在这个位置前面的元素之和,与在这个位置后面的元素之和,做比较,判断是否相等\n2.1 怎么求前面元素之和:\n假设这个位置是[i],那么前面元素就是[0]~[i-1], 后面元素为[i+1]~[len(list)-1]\n进行求和:累加求和\n2.2判断是否相等:相等,给出这个平衡位置;不相等,输出“该列表不存在平衡点”", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "a=input('请输入一个整数列表:').split(\",\")\nflag=0\nfor i in range(0,len(a)-1):\n\ts1=0\n\tfor m in range(0,i):\n\t\ts1+=int(a[m])\n\ts2=0\n\tfor n in range(i+1,len(a)):\n\t\ts2+=int(a[n])\n\tif s1==s2:\n\t\tprint('该整数列表存在平衡点,且平衡点为:',a[i])\n\t\tflag=1\n\t\tbreak\nif flag==0:\n\tprint('该整数列表不存在平衡点')", + "language": "python" + }, + "node_id": "dailycode-e255b434da964a3e8c1104d1242677a5", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470504" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/40.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/40.exercises/config.json" new file mode 100644 index 000000000..51f5318c9 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/40.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-bc3eb1c20a03474e83551d80ab9725c7", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/40.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/40.exercises/solution.json" new file mode 100644 index 000000000..f25bd6d8d --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/40.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "84136d3c63b047249adb53ffcfd69532", + "keywords": "贪心,数组,动态规划", + "title": "跳跃游戏 II", + "desc": [ + { + "content": "\n

      给定一个非负整数数组,你最初位于数组的第一个位置。

      \n

      数组中的每个元素代表你在该位置可以跳跃的最大长度。

      \n

      你的目标是使用最少的跳跃次数到达数组的最后一个位置。

      \n

      示例:

      \n
      输入: [2,3,1,1,4]
      输出:
      2
      解释:
      跳到最后一个位置的最小跳跃数是 2。从下标为 0 跳到下标为 1 的位置,跳 1 步,然后跳 3 步到达数组的最后一个位置。
      \n

      说明:

      \n

      假设你总是可以到达数组的最后一个位置。

      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution:\n\tdef jump(self, nums):\n\t\tif len(nums) <= 1:\n\t\t\treturn 0\n\t\tend = 0 + nums[0]\n\t\tstart = 0\n\t\tstep = 1\n\t\tmaxDis = 0 + nums[0]\n\t\twhile end < len(nums) - 1:\n\t\t\tfor i in range(start + 1, end + 1):\n\t\t\t\tmaxDis = max(maxDis, nums[i] + i)\n\t\t\tstart = end\n\t\t\tend = maxDis\n\t\t\tstep += 1\n\t\treturn step\n# %%\ns = Solution()\nprint(s.jump(nums = [2,3,0,1,4]))", + "language": "python" + }, + "node_id": "dailycode-bc3eb1c20a03474e83551d80ab9725c7", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600469921" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/41.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/41.exercises/config.json" new file mode 100644 index 000000000..1268e01f9 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/41.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-5e08f34544f041569745d22d11919871", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/41.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/41.exercises/solution.json" new file mode 100644 index 000000000..166bc8565 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/41.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "f6e4d27cc81543159b689e2dc81085c9", + "keywords": "链表", + "title": "反转链表 II", + "desc": [ + { + "content": "\n给你单链表的头指针 head 和两个整数 leftright ,其中 left <= right 。请你反转从位置 left 到位置 right 的链表节点,返回 反转后的链表

       

      示例 1:

      \"\"
      输入:head = [1,2,3,4,5], left = 2, right = 4
      输出:
      [1,4,3,2,5]

      示例 2:

      输入:head = [5], left = 1, right = 1
      输出:
      [5]

       

      提示:

        \t
      • 链表中节点数目为 n
      • \t
      • 1 <= n <= 500
      • \t
      • -500 <= Node.val <= 500
      • \t
      • 1 <= left <= right <= n

       

      进阶: 你可以使用一趟扫描完成反转吗?

      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class ListNode(object):\n\tdef __init__(self, x):\n\t\tself.val = x\n\t\tself.next = None\nclass LinkList:\n\tdef __init__(self):\n\t\tself.head=None\n\tdef initList(self, data):\n\t\tself.head = ListNode(data[0])\n\t\tr=self.head\n\t\tp = self.head\n\t\tfor i in data[1:]:\n\t\t\tnode = ListNode(i)\n\t\t\tp.next = node\n\t\t\tp = p.next\n\t\treturn r\n\tdef\tconvert_list(self,head):\n\t\tret = []\n\t\tif head == None:\n\t\t\treturn\n\t\tnode = head\n\t\twhile node != None:\n\t\t\tret.append(node.val)\n\t\t\tnode = node.next\n\t\treturn ret\nclass Solution(object):\n\tdef reverseBetween(self, head, m, n):\n\t\t\"\"\"\n\t\t:type head: ListNode\n\t\t:type m: int\n\t\t:type n: int\n\t\t:rtype: ListNode\n\t\t\"\"\"\n\t\tif m == n:\n\t\t\treturn head\n\t\tsplit_node, prev, curr = None, None, head\n\t\tcount = 1\n\t\twhile count <= m and curr is not None:\n\t\t\tif count == m:\n\t\t\t\tsplit_node = prev\n\t\t\tprev = curr\n\t\t\tcurr = curr.next\n\t\t\tcount += 1\n\t\ttail, next_node = prev, None\n\t\twhile curr is not None and count <= n:\n\t\t\tnext_temp = curr.next\n\t\t\tcurr.next = prev\n\t\t\tprev = curr\n\t\t\tcurr = next_temp\n\t\t\tcount += 1\n\t\tif split_node is not None:\n\t\t\tsplit_node.next = prev\n\t\tif tail is not None:\n\t\t\ttail.next = curr\n\t\tif m == 1:\n\t\t\treturn prev\n\t\treturn head\n# %%\nl = LinkList()\nlist1 = [1,2,3,4,5]\nl1 = l.initList(list1)\nleft = 2\nright = 4\ns = Solution()\nprint(l.convert_list(s.reverseBetween(l1, left, right)))", + "language": "python" + }, + "node_id": "dailycode-5e08f34544f041569745d22d11919871", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600469826" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/42.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/42.exercises/config.json" new file mode 100644 index 000000000..e2d24a0d6 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/42.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-6afc8fbcc3f245aeb6bfea64f87d53ee", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/42.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/42.exercises/solution.json" new file mode 100644 index 000000000..8ca566455 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/42.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "62b3b65b60fc494283c75e4fdecd2221", + "keywords": "数组,动态规划,矩阵", + "title": "最小路径和", + "desc": [ + { + "content": "\n

      给定一个包含非负整数的 m x n 网格 grid ,请找出一条从左上角到右下角的路径,使得路径上的数字总和为最小。

      说明:每次只能向下或者向右移动一步。

       

      示例 1:

      \"\"
      输入:grid = [[1,3,1],[1,5,1],[4,2,1]]
      输出:
      7
      解释:
      因为路径 1→3→1→1→1 的总和最小。

      示例 2:

      输入:grid = [[1,2,3],[4,5,6]]
      输出:
      12

       

      提示:

        \t
      • m == grid.length
      • \t
      • n == grid[i].length
      • \t
      • 1 <= m, n <= 200
      • \t
      • 0 <= grid[i][j] <= 100
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution(object):\n\tdef minPathSum(self, grid):\n\t\t\"\"\"\n\t\t:type grid: List[List[int]]\n\t\t:rtype: int\n\t\t\"\"\"\n\t\theight = len(grid)\n\t\tif height == 0:\n\t\t\treturn 0\n\t\twidth = len(grid[0])\n\t\tpathmap = []\n\t\tfor i in range(height):\n\t\t\tpathmap.append([100000000000] * width)\n\t\tpathmap[0][0] = grid[0][0]\n\t\tfor i in range(height):\n\t\t\tfor j in range(width):\n\t\t\t\tcompare = [pathmap[i][j]]\n\t\t\t\tif i - 1 >= 0:\n\t\t\t\t\tcompare.append(pathmap[i - 1][j] + grid[i][j])\n\t\t\t\tif j - 1 >= 0:\n\t\t\t\t\tcompare.append(pathmap[i][j - 1] + grid[i][j])\n\t\t\t\tpathmap[i][j] = min(compare)\n\t\treturn pathmap[-1][-1]\n# %%\ns = Solution()\nprint(s.minPathSum(grid = [[1,3,1],[1,5,1],[4,2,1]]))", + "language": "python" + }, + "node_id": "dailycode-6afc8fbcc3f245aeb6bfea64f87d53ee", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470227" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/43.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/43.exercises/config.json" new file mode 100644 index 000000000..926f00fef --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/43.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-15dfcfc57f144a59b0745657fd22e7de", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/43.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/43.exercises/solution.json" new file mode 100644 index 000000000..235de44e2 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/43.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "7f3fdaec1a3d4246b86533764656de26", + "keywords": "链表,双指针", + "title": "删除链表的倒数第 N 个结点", + "desc": [ + { + "content": "\n

      给你一个链表,删除链表的倒数第 n 个结点,并且返回链表的头结点。

      进阶:你能尝试使用一趟扫描实现吗?

       

      示例 1:

      \"\"
      输入:head = [1,2,3,4,5], n = 2
      输出:
      [1,2,3,5]

      示例 2:

      输入:head = [1], n = 1
      输出:
      []

      示例 3:

      输入:head = [1,2], n = 1
      输出:
      [1]

       

      提示:

        \t
      • 链表中结点的数目为 sz
      • \t
      • 1 <= sz <= 30
      • \t
      • 0 <= Node.val <= 100
      • \t
      • 1 <= n <= sz
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class ListNode:\n\tdef __init__(self, val=0, next=None):\n\t\tself.val = val\n\t\tself.next = next\nclass LinkList:\n\tdef __init__(self):\n\t\tself.head=None\n\tdef initList(self, data):\n\t\tself.head = ListNode(data[0])\n\t\tr=self.head\n\t\tp = self.head\n\t\tfor i in data[1:]:\n\t\t\tnode = ListNode(i)\n\t\t\tp.next = node\n\t\t\tp = p.next\n\t\treturn r\n\tdef\tconvert_list(self,head):\n\t\tret = []\n\t\tif head == None:\n\t\t\treturn\n\t\tnode = head\n\t\twhile node != None:\n\t\t\tret.append(node.val)\n\t\t\tnode = node.next\n\t\treturn ret\nclass Solution:\n\tdef removeNthFromEnd(self, head: ListNode, n: int) -> ListNode:\n\t\tv = ListNode(0, head)\n\t\thandle = v\n\t\tindex = []\n\t\twhile v is not None:\n\t\t\tindex.append(v)\n\t\t\tv = v.next\n\t\tpre = len(index)-n-1\n\t\tnext = len(index)-n+1\n\t\tindex[pre].next = index[next] if next >= 0 and next < len(\n\t\t\tindex) else None\n\t\treturn handle.next\n# %%\nl = LinkList()\nlist1 = [1,2,3,4,5]\nhead = l.initList(list1)\nn = 2\ns = Solution()\nprint(l.convert_list(s.removeNthFromEnd(head, n)))", + "language": "python" + }, + "node_id": "dailycode-15dfcfc57f144a59b0745657fd22e7de", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600469818" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/44.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/44.exercises/config.json" new file mode 100644 index 000000000..764927dcd --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/44.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-55947e6bb1d6408ca60413a7d03f7e38", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/44.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/44.exercises/solution.json" new file mode 100644 index 000000000..9ee17a421 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/44.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "73cb72426b5641b3b80c60652041a104", + "keywords": "数组,回溯", + "title": "组合总和", + "desc": [ + { + "content": "\n

      给定一个无重复元素的数组 candidates 和一个目标数 target ,找出 candidates 中所有可以使数字和为 target 的组合。\n

      \n

      candidates 中的数字可以无限制重复被选取。

      \n

      说明:

      \n
        \n
      • 所有数字(包括 target)都是正整数。
      • \n
      • 解集不能包含重复的组合。 
      • \n
      \n

      示例 1:

      \n
      输入:candidates = [2,3,6,7], target = 7,
      输出:
      [[7],[2,2,3]]
      \n

      示例 2:

      \n
      输入:candidates = [2,3,5], target = 8,
      输出:
      [[2,2,2,2],[2,3,3],[3,5]]
      \n

       

      \n

      提示:

      \n
        \n
      • 1 <= candidates.length <= 30
      • \n
      • 1 <= candidates[i] <= 200
      • \n
      • candidate 中的每个元素都是独一无二的。
      • \n
      • 1 <= target <= 500
      • \n
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution(object):\n\tdef combinationSum(self, candidates, target):\n\t\tcandidates.sort()\n\t\tdp = [[] for _ in range(target + 1)]\n\t\tdp[0].append([])\n\t\tfor i in range(1, target + 1):\n\t\t\tfor j in range(len(candidates)):\n\t\t\t\tif candidates[j] > i:\n\t\t\t\t\tbreak\n\t\t\t\tfor k in range(len(dp[i - candidates[j]])):\n\t\t\t\t\ttemp = dp[i - candidates[j]][k][:]\n\t\t\t\t\tif len(temp) > 0 and temp[-1] > candidates[j]:\n\t\t\t\t\t\tcontinue\n\t\t\t\t\ttemp.append(candidates[j])\n\t\t\t\t\tdp[i].append(temp)\n\t\treturn dp[target]\nif __name__ == '__main__':\n\ts = Solution()\n\tprint (s.combinationSum([8,7,4,3], 11))", + "language": "python" + }, + "node_id": "dailycode-55947e6bb1d6408ca60413a7d03f7e38", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600471017" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/45.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/45.exercises/config.json" new file mode 100644 index 000000000..17e63cb49 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/45.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-c7d55f870c9244b6a627dcdd0e13dc35", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/45.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/45.exercises/solution.json" new file mode 100644 index 000000000..260e161aa --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/45.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "bc7e5006bbc347a29f5815727ab2cc26", + "keywords": "字符串,动态规划", + "title": "最长回文子串", + "desc": [ + { + "content": "\n

      给你一个字符串 s,找到 s 中最长的回文子串。

       

      示例 1:

      输入:s = \"babad\"
      输出:
      \"bab\"
      解释:
      \"aba\" 同样是符合题意的答案。

      示例 2:

      输入:s = \"cbbd\"
      输出:
      \"bb\"

      示例 3:

      输入:s = \"a\"
      输出:
      \"a\"

      示例 4:

      输入:s = \"ac\"
      输出:
      \"a\"

       

      提示:

        \t
      • 1 <= s.length <= 1000
      • \t
      • s 仅由数字和英文字母(大写和/或小写)组成
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution:\n\tdef longestPalindrome(self, s: str) -> str:\n\t\tti = 0\n\t\tmaxlen = 0\n\t\ti = 0\n\t\twhile i < len(s):\n\t\t\tt = 1\n\t\t\twhile t <= i and i + t < len(s):\n\t\t\t\tif s[i + t] == s[i - t]:\n\t\t\t\t\tt += 1\n\t\t\t\telse:\n\t\t\t\t\tbreak\n\t\t\tt -= 1\n\t\t\tif 2 * t + 1 > maxlen:\n\t\t\t\tti = i - t\n\t\t\t\tmaxlen = 2 * t + 1\n\t\t\ti += 1\n\t\ti = 0\n\t\twhile i < len(s):\n\t\t\tt = 1\n\t\t\twhile t <= i + 1 and i + t < len(s):\n\t\t\t\tif s[i - t + 1] == s[i + t]:\n\t\t\t\t\tt += 1\n\t\t\t\telse:\n\t\t\t\t\tbreak\n\t\t\tt -= 1\n\t\t\tif 2 * t > maxlen:\n\t\t\t\tti = i - t + 1\n\t\t\t\tmaxlen = 2 * t\n\t\t\ti += 1\n\t\treturn s[ti:ti+maxlen]\n# %%\ns = Solution()\nprint(s.longestPalindrome('babad'))\nprint(s.longestPalindrome('cbbd'))", + "language": "python" + }, + "node_id": "dailycode-c7d55f870c9244b6a627dcdd0e13dc35", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470834" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/46.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/46.exercises/config.json" new file mode 100644 index 000000000..4448fc353 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/46.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-a76adb81a0c14ce6ae16b18421469984", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/46.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/46.exercises/solution.json" new file mode 100644 index 000000000..2754479ed --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/46.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "4296c87b043a4c909a7910782aa5901c", + "keywords": "数组,二分查找", + "title": "搜索旋转排序数组 II", + "desc": [ + { + "content": "\n

      已知存在一个按非降序排列的整数数组 nums ,数组中的值不必互不相同。

      \n

      在传递给函数之前,nums 在预先未知的某个下标 k0 <= k < nums.length)上进行了 旋转\n,使数组变为 [nums[k], nums[k+1], ..., nums[n-1], nums[0], nums[1], ..., nums[k-1]](下标 从 0\n开始 计数)。例如, [0,1,2,4,4,4,5,6,6,7] 在下标 5 处经旋转后可能变为\n[4,5,6,6,7,0,1,2,4,4] 。\n

      \n

      给你 旋转后 的数组 nums 和一个整数 target ,请你编写一个函数来判断给定的目标值是否存在于数组中。如果\nnums 中存在这个目标值 target ,则返回 true ,否则返回 false 。\n

      \n

       

      \n

      示例 1:

      \n
      输入:nums = [2,5,6,0,0,1,2], target = 0
      输出:
      true
      \n

      示例 2:

      \n
      输入:nums = [2,5,6,0,0,1,2], target = 3
      输出:
      false
      \n

       

      \n

      提示:

      \n
        \n
      • 1 <= nums.length <= 5000
      • \n
      • -104 <= nums[i] <= 104
      • \n
      • 题目数据保证 nums 在预先未知的某个下标上进行了旋转
      • \n
      • -104 <= target <= 104
      • \n
      \n

       

      \n

      进阶:

      \n
        \n
      • 这是 搜索旋转排序数组 的延伸题目,本题中的 nums \n可能包含重复元素。
      • \n
      • 这会影响到程序的时间复杂度吗?会有怎样的影响,为什么?
      • \n
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution(object):\n\tdef search(self, nums, target):\n\t\t\"\"\"\n\t\t:type nums: List[int]\n\t\t:type target: int\n\t\t:rtype: bool\n\t\t\"\"\"\n\t\tdef get(start, end):\n\t\t\tif start > end:\n\t\t\t\treturn False\n\t\t\tmid = (start + end) / 2\n\t\t\tmid = int(mid)\n\t\t\twhile mid < end and nums[mid + 1] == nums[mid]:\n\t\t\t\tmid += 1\n\t\t\twhile start < mid and nums[start + 1] == nums[start]:\n\t\t\t\tstart += 1\n\t\t\tif nums[mid] == target:\n\t\t\t\treturn True\n\t\t\telif mid == end:\n\t\t\t\treturn get(start, mid - 1)\n\t\t\telif start == mid:\n\t\t\t\treturn get(mid + 1, end)\n\t\t\telif nums[mid] >= nums[start]:\n\t\t\t\tif target >= nums[start] and target < nums[mid]:\n\t\t\t\t\treturn get(start, mid - 1)\n\t\t\t\telse:\n\t\t\t\t\treturn get(mid + 1, end)\n\t\t\telif nums[mid] <= nums[end]:\n\t\t\t\tif target > nums[mid] and target <= nums[end]:\n\t\t\t\t\treturn get(mid + 1, end)\n\t\t\t\telse:\n\t\t\t\t\treturn get(start, mid - 1)\n\t\treturn get(0, len(nums) - 1)\n# %%\ns = Solution()\nprint(s.search(nums = [2,5,6,0,0,1,2], target = 0))", + "language": "python" + }, + "node_id": "dailycode-a76adb81a0c14ce6ae16b18421469984", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600469924" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/47.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/47.exercises/config.json" new file mode 100644 index 000000000..9cb987313 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/47.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-f403ab092a4b4c709a21aaa49c497197", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/47.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/47.exercises/solution.json" new file mode 100644 index 000000000..1233e7c2d --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/47.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "61473748d3584d9da80dc81685349d2f", + "keywords": "数组,双指针", + "title": "删除有序数组中的重复项 II", + "desc": [ + { + "content": "\n

      给你一个有序数组 nums ,请你 原地 删除重复出现的元素,使每个元素 最多出现两次 ,返回删除后数组的新长度。

      \n

      不要使用额外的数组空间,你必须在 原地 修改输入数组 并在使用 O(1) 额外空间的条件下完成。

      \n

       

      \n

      说明:

      \n

      为什么返回数值是整数,但输出的答案是数组呢?

      \n

      请注意,输入数组是以「引用」方式传递的,这意味着在函数里修改输入数组对于调用者是可见的。

      \n

      你可以想象内部操作如下:

      \n
      \n// nums 是以“引用”方式传递的。也就是说,不对实参做任何拷贝\nint len = removeDuplicates(nums);// 在函数里修改输入数组对于调用者是可见的。\n// 根据你的函数返回的长度, 它会打印出数组中 该长度范围内 的所有元素。\nfor (int i = 0; i < len; i++) {\nprint(nums[i]);\n}
      \n

       

      \n

      示例 1:

      \n
      输入:nums = [1,1,1,2,2,3]
      输出:
      5, nums = [1,1,2,2,3]
      解释:
      函数应返回新长度 length = 5, 并且原数组的前五个元素被修改为 1, 1, 2, 2, 3 。 不需要考虑数组中超出新长度后面的元素。
      \n

      示例 2:

      \n
      输入:nums = [0,0,1,1,1,1,2,3,3]
      输出:
      7, nums = [0,0,1,1,2,3,3]
      解释:
      函数应返回新长度 length = 7, 并且原数组的前五个元素被修改为 0, 0, 1, 1, 2, 3, 3 。 不需要考虑数组中超出新长度后面的元素。
      \n

       

      \n

      提示:

      \n
        \n
      • 1 <= nums.length <= 3 * 104
      • \n
      • -104 <= nums[i] <= 104
      • \n
      • nums 已按升序排列
      • \n
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution:\n\tdef removeDuplicates(self, nums):\n\t\t\"\"\"\n\t\t:type nums: List[int]\n\t\t:rtype: int\n\t\t\"\"\"\n\t\tif nums is None:\n\t\t\treturn 0\n\t\tlength = len(nums)\n\t\tresult = 0\n\t\ti = j = 0\n\t\twhile i < length:\n\t\t\tj = i\n\t\t\twhile j < length:\n\t\t\t\tif nums[j] != nums[i]:\n\t\t\t\t\tbreak\n\t\t\t\tj += 1\n\t\t\tif j-i > 2:\n\t\t\t\tlength -= j-i-2\n\t\t\t\tfor k in range(j-i-2):\n\t\t\t\t\tdel nums[i]\n\t\t\t\tresult += 2\n\t\t\t\tj = i+2\n\t\t\telse:\n\t\t\t\tresult += (j-i)\n\t\t\ti = j\n\t\treturn result\n# %%\ns = Solution()\nprint(s.removeDuplicates(nums = [1,1,1,2,2,3]))", + "language": "python" + }, + "node_id": "dailycode-f403ab092a4b4c709a21aaa49c497197", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470127" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/48.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/48.exercises/config.json" new file mode 100644 index 000000000..711b65ccb --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/48.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-026eee6137c34799ac0a1fe8e3cefc1a", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/48.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/48.exercises/solution.json" new file mode 100644 index 000000000..81764f44e --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/48.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "ba9fc2ac3cc240ed95c9d30953f8166f", + "keywords": "字符串,动态规划", + "title": "交错字符串", + "desc": [ + { + "content": "\n

      给定三个字符串 s1s2s3,请你帮忙验证 s3 是否是由 s1 和 s2 交错 组成的。

      两个字符串 st 交错 的定义与过程如下,其中每个字符串都会被分割成若干 非空 子字符串:

        \t
      • s = s1 + s2 + ... + sn
      • \t
      • t = t1 + t2 + ... + tm
      • \t
      • |n - m| <= 1
      • \t
      • 交错s1 + t1 + s2 + t2 + s3 + t3 + ... 或者 t1 + s1 + t2 + s2 + t3 + s3 + ...

      提示:a + b 意味着字符串 ab 连接。

       

      示例 1:

      \"\"
      输入:s1 = \"aabcc\", s2 = \"dbbca\", s3 = \"aadbbcbcac\"
      输出:
      true

      示例 2:

      输入:s1 = \"aabcc\", s2 = \"dbbca\", s3 = \"aadbbbaccc\"
      输出:
      false

      示例 3:

      输入:s1 = \"\", s2 = \"\", s3 = \"\"
      输出:
      true

       

      提示:

        \t
      • 0 <= s1.length, s2.length <= 100
      • \t
      • 0 <= s3.length <= 200
      • \t
      • s1s2、和 s3 都由小写英文字母组成
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution(object):\n\tdef isInterleave(self, s1, s2, s3):\n\t\t\"\"\"\n\t\t:type s1: str\n\t\t:type s2: str\n\t\t:type s3: str\n\t\t:rtype: bool\n\t\t\"\"\"\n\t\tif len(s1) + len(s2) != len(s3):\n\t\t\treturn False\n\t\tqueue = [(0, 0), (-1, -1)]\n\t\tvisited = set()\n\t\tisSuccess = False\n\t\tindex = 0\n\t\twhile len(queue) != 1 or queue[0][0] != -1:\n\t\t\tp = queue.pop(0)\n\t\t\tif p[0] == len(s1) and p[1] == len(s2):\n\t\t\t\treturn True\n\t\t\tif p[0] == -1:\n\t\t\t\tqueue.append(p)\n\t\t\t\tindex += 1\n\t\t\t\tcontinue\n\t\t\tif p in visited:\n\t\t\t\tcontinue\n\t\t\tvisited.add(p)\n\t\t\tif p[0] < len(s1):\n\t\t\t\tif s1[p[0]] == s3[index]:\n\t\t\t\t\tqueue.append((p[0] + 1, p[1]))\n\t\t\tif p[1] < len(s2):\n\t\t\t\tif s2[p[1]] == s3[index]:\n\t\t\t\t\tqueue.append((p[0], p[1] + 1))\n\t\treturn False\n# %%\ns = Solution()\nprint(s.isInterleave(s1 = \"aabcc\", s2 = \"dbbca\", s3 = \"aadbbcbcac\"))", + "language": "python" + }, + "node_id": "dailycode-026eee6137c34799ac0a1fe8e3cefc1a", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600471101" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/49.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/49.exercises/config.json" new file mode 100644 index 000000000..8def3448c --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/49.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-71504d078d39443c801ae99bf0d81fa1", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/49.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/49.exercises/solution.json" new file mode 100644 index 000000000..47216aa6a --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/49.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "4091d8bdf76f4dde9c2d6aacf65da8cd", + "keywords": "数组,排序", + "title": "合并区间", + "desc": [ + { + "content": "\n

      以数组 intervals 表示若干个区间的集合,其中单个区间为 intervals[i] = [starti, endi] 。请你合并所有重叠的区间,并返回一个不重叠的区间数组,该数组需恰好覆盖输入中的所有区间。

       

      示例 1:

      输入:intervals = [[1,3],[2,6],[8,10],[15,18]]
      输出:
      [[1,6],[8,10],[15,18]]
      解释:
      区间 [1,3] 和 [2,6] 重叠, 将它们合并为 [1,6].

      示例 2:

      输入:intervals = [[1,4],[4,5]]
      输出:
      [[1,5]]
      解释:
      区间 [1,4] 和 [4,5] 可被视为重叠区间。

       

      提示:

        \t
      • 1 <= intervals.length <= 104
      • \t
      • intervals[i].length == 2
      • \t
      • 0 <= starti <= endi <= 104
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Interval(object):\n\tdef __init__(self, s=0, e=0):\n\t\tself.start = s\n\t\tself.end = e\nclass Solution(object):\n\tdef list2interval(self, list_interval):\n\t\tret = []\n\t\tfor i in list_interval:\n\t\t\tinterval = Interval(i[0], i[1])\n\t\t\tret.append(interval)\n\t\treturn ret\n\tdef interval2list(self, interval):\n\t\tret = []\n\t\tx = [0,0]\n\t\tfor i in interval:\n\t\t\tx[0] = i.start\n\t\t\tx[1] = i.end\n\t\t\tret.append(x)\n\t\t\tx = [0,0]\n\t\treturn ret\n\tdef merge(self, intervals):\n\t\t\"\"\"\n\t\t:type intervals: List[Interval]\n\t\t:rtype: List[Interval]\n\t\t\"\"\"\n\t\tif intervals is None:\n\t\t\treturn\n\t\tls = len(intervals)\n\t\tif ls <= 1:\n\t\t\treturn intervals\n\t\tintervals = self.list2interval(intervals)\t\t\n\t\tintervals.sort(key=lambda x: x.start)\n\t\tpos = 0\n\t\twhile pos < len(intervals) - 1:\n\t\t\tif intervals[pos].end >= intervals[pos + 1].start:\n\t\t\t\tnext = intervals.pop(pos + 1)\n\t\t\t\tif next.end > intervals[pos].end:\n\t\t\t\t\tintervals[pos].end = next.end\n\t\t\telse:\n\t\t\t\tpos += 1\n\t\tintervals = self.interval2list(intervals)\n\t\treturn intervals\nif __name__ == '__main__':\n\ts = Solution()\n\tprint (s.merge(intervals = [[1,4],[4,5]]))", + "language": "python" + }, + "node_id": "dailycode-71504d078d39443c801ae99bf0d81fa1", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600471018" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/5.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/5.exercises/config.json" new file mode 100644 index 000000000..9581324c8 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/5.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-d23d7c0418f84280a2ef890bb4fb1757", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/5.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/5.exercises/solution.json" new file mode 100644 index 000000000..e0d778bba --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/5.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "03503e53da684a1ea3ce91190a6fa91a", + "keywords": "树,深度优先搜索,二叉搜索树,二叉树", + "title": "恢复二叉搜索树", + "desc": [ + { + "content": "\n

      给你二叉搜索树的根节点 root ,该树中的两个节点被错误地交换。请在不改变其结构的情况下,恢复这棵树。

      进阶:使用 O(n) 空间复杂度的解法很容易实现。你能想出一个只使用常数空间的解决方案吗?

       

      示例 1:

      \"\"
      输入:root = [1,3,null,null,2]
      输出:
      [3,1,null,null,2]
      解释:
      3 不能是 1 左孩子,因为 3 > 1 。交换 1 和 3 使二叉搜索树有效。

      示例 2:

      \"\"
      输入:root = [3,1,4,null,null,2]
      输出:
      [2,1,4,null,null,3]
      解释:
      2 不能在 3 的右子树中,因为 2 < 3 。交换 2 和 3 使二叉搜索树有效。

       

      提示:

        \t
      • 树上节点的数目在范围 [2, 1000]
      • \t
      • -231 <= Node.val <= 231 - 1
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "import sys\nclass TreeNode(object):\n\tdef __init__(self, x):\n\t\tself.val = x\n\t\tself.left = None\n\t\tself.right = None\n\tdef to_list(self, count):\n\t\tqueue = []\n\t\tqueue.append(self)\n\t\tresult = []\n\t\twhile len(queue) > 0:\n\t\t\tif count == 0:\n\t\t\t\tbreak\n\t\t\tnode = queue.pop(0)\n\t\t\tif node is None:\n\t\t\t\tresult.append('null')\n\t\t\telse:\n\t\t\t\tcount -= 1\n\t\t\t\tresult.append(node.val)\n\t\t\t\tqueue.append(node.left)\n\t\t\t\tqueue.append(node.right)\n\t\treturn result\nclass List2Tree(object):\n\tdef __init__(self, nums: list):\n\t\tself.nums = nums\n\t\tself.queue = []\n\t\tif len(nums) == 1:\n\t\t\tself.root = TreeNode(self.nums.pop(0))\n\t\telse:\n\t\t\ta = self.nums.pop(0)\n\t\t\tb = self.nums.pop(0)\n\t\t\tc = self.nums.pop(0)\n\t\t\tself.root = TreeNode(a)\n\t\t\tif b is not None:\n\t\t\t\tself.root.left = TreeNode(b)\n\t\t\telse:\n\t\t\t\tself.root.left = b\n\t\t\tif c is not None:\n\t\t\t\tself.root.right = TreeNode(c)\n\t\t\telse:\n\t\t\t\tself.root.right = c\n\t\t\tself.queue.append(self.root.left)\n\t\t\tself.queue.append(self.root.right)\n\tdef convert(self):\n\t\twhile len(self.nums) > 0 and len(self.queue) > 0:\n\t\t\tnode = self.queue.pop(0)\n\t\t\tif node is not None:\n\t\t\t\tnum = self.nums.pop(0)\n\t\t\t\tif num is not None:\n\t\t\t\t\tnode.left = TreeNode(num)\n\t\t\t\telse:\n\t\t\t\t\tnode.left = num\n\t\t\t\tif len(self.nums) > 0:\n\t\t\t\t\tnum = self.nums.pop(0)\n\t\t\t\telse:\n\t\t\t\t\tnum = None\n\t\t\t\tif num is not None:\n\t\t\t\t\tnode.right = TreeNode(num)\n\t\t\t\telse:\n\t\t\t\t\tnode.right = num\n\t\t\t\tself.queue.append(node.left)\n\t\t\t\tself.queue.append(node.right)\n\t\treturn self.root\nclass Solution(object):\n\tdef __init__(self):\n\t\tself.first = self.second = None\n\t\tself.pre = TreeNode(-sys.maxsize - 1)\n\tdef recoverTree(self, root):\n\t\tlength = len(root)\n\t\troot = List2Tree(root).convert()\n\t\tself.traverse(root)\n\t\tself.first.val, self.second.val = self.second.val, self.first.val\n\t\treturn root.to_list(length)\n\tdef traverse(self, root):\n\t\tif root is None:\n\t\t\treturn\n\t\tself.traverse(root.left)\n\t\tif self.pre.val >= root.val:\n\t\t\tif self.first is None:\n\t\t\t\tself.first = self.pre\n\t\t\tif self.first is not None:\n\t\t\t\tself.second = root\n\t\tself.pre = root\n\t\tself.traverse(root.right)\n# %%\ns = Solution()\nprint(s.recoverTree(root=[1, 3, None, None, 2]))", + "language": "python" + }, + "node_id": "dailycode-d23d7c0418f84280a2ef890bb4fb1757", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470826" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/50.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/50.exercises/config.json" new file mode 100644 index 000000000..d3104d981 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/50.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-7a8871cf181c497388f30abbc0b603d9", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/50.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/50.exercises/solution.json" new file mode 100644 index 000000000..6611da23c --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/50.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "144800badeea4a3a9a99aad37ba59a6c", + "keywords": "数组,双指针,排序", + "title": "三数之和", + "desc": [ + { + "content": "\n

      给你一个包含 n 个整数的数组 nums,判断 nums 中是否存在三个元素 a,b,c ,使得 a + b + c = 0 ?请你找出所有和为 0 且不重复的三元组。

      注意:答案中不可以包含重复的三元组。

       

      示例 1:

      输入:nums = [-1,0,1,2,-1,-4]
      输出:
      [[-1,-1,2],[-1,0,1]]

      示例 2:

      输入:nums = []
      输出:
      []

      示例 3:

      输入:nums = [0]
      输出:
      []

       

      提示:

        \t
      • 0 <= nums.length <= 3000
      • \t
      • -105 <= nums[i] <= 105
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "from typing import List\nclass Solution:\n\tdef threeSum(self, nums: List[int]) -> List[List[int]]:\n\t\tif len(nums) == 0:\n\t\t\treturn []\n\t\tresult = []\n\t\tunique = {}\n\t\tinv = {}\n\t\tleft = None\n\t\tright = None\n\t\tnums.sort()\n\t\ti = 0\n\t\twhile i < len(nums):\n\t\t\tif left == None and nums[i] >= 0:\n\t\t\t\tleft = i\n\t\t\tif right == None and nums[i] > 0:\n\t\t\t\tright = i\n\t\t\tinv[nums[i]] = i\n\t\t\ti += 1\n\t\tif left == 0:\n\t\t\tright = len(nums)\n\t\tif right is None:\n\t\t\treturn []\n\t\ti = 0\n\t\twhile i < right:\n\t\t\tj = i+1\n\t\t\twhile j < len(nums) and (-nums[i] >= nums[j] * 2):\n\t\t\t\tlast = 0-nums[i]-nums[j]\n\t\t\t\tk = inv.get(last)\n\t\t\t\tif k and k > j:\n\t\t\t\t\tlist = [nums[i], nums[j], last]\n\t\t\t\t\thash = f'{list[0]}_{list[1]}_{list[2]}'\n\t\t\t\t\tif unique.get(hash) is None:\n\t\t\t\t\t\tunique[hash] = True\n\t\t\t\t\t\tresult.append(list)\n\t\t\t\tj += 1\n\t\t\ti += 1\n\t\treturn result\n# %%\ns = Solution()\nprint(s.threeSum(nums = [-1,0,1,2,-1,-4]))", + "language": "python" + }, + "node_id": "dailycode-7a8871cf181c497388f30abbc0b603d9", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470113" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/51.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/51.exercises/config.json" new file mode 100644 index 000000000..8ed2bbc16 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/51.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-054c08399a624f7b823f3b8f5f4e612b", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/51.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/51.exercises/solution.json" new file mode 100644 index 000000000..32833b7bd --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/51.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "e0fdd6ed18ff4fb1923977e49edb897e", + "keywords": "数学,字符串,模拟", + "title": "字符串相乘", + "desc": [ + { + "content": "\n

      给定两个以字符串形式表示的非负整数 num1 和 num2,返回 num1 和 num2 的乘积,它们的乘积也表示为字符串形式。

      示例 1:

      输入: num1 = "2", num2 = "3"
      输出:
      "6"

      示例 2:

      输入: num1 = "123", num2 = "456"
      输出:
      "56088"

      说明:

        \t
      1. num1 和 num2 的长度小于110。
      2. \t
      3. num1 和 num2 只包含数字 0-9
      4. \t
      5. num1 和 num2 均不以零开头,除非是数字 0 本身。
      6. \t
      7. 不能使用任何标准库的大数类型(比如 BigInteger)直接将输入转换为整数来处理
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution(object):\n\tdef multiply(self, num1, num2):\n\t\tif num1 == '0' or num2 == '0':\n\t\t\treturn '0'\n\t\tres = ''\n\t\tls1, ls2, = len(num1), len(num2)\n\t\tls = ls1 + ls2\n\t\tarr = [0] * ls\n\t\tfor i in reversed(range(ls1)):\n\t\t\tfor j in reversed(range(ls2)):\n\t\t\t\tarr[i + j + 1] += int(num1[i]) * int(num2[j])\n\t\tfor i in reversed(range(1, ls)):\n\t\t\tarr[i - 1] += arr[i] / 10\n\t\t\tarr[i] %= 10\n\t\tpos = 0\n\t\tif arr[pos] == 0:\n\t\t\tpos += 1\n\t\twhile pos < ls:\n\t\t\tres = res + str(arr[pos])\n\t\t\tpos += 1\n\t\treturn res\nif __name__ == '__main__':\n\ts = Solution()\n\tprint (s.multiply(\"98\", \"9\"))", + "language": "python" + }, + "node_id": "dailycode-054c08399a624f7b823f3b8f5f4e612b", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600471020" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/52.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/52.exercises/config.json" new file mode 100644 index 000000000..edb5c3a1c --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/52.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-27bae4c0ba27468eb2c6e09a7251d16d", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/52.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/52.exercises/solution.json" new file mode 100644 index 000000000..26d267d7b --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/52.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "437cd0cbaa864a4b8508cee52bf793cb", + "keywords": "数组,双指针,排序", + "title": "最接近的三数之和", + "desc": [ + { + "content": "\n

      给定一个包括 n 个整数的数组 nums 和 一个目标值 target。找出 nums 中的三个整数,使得它们的和与 target 最接近。返回这三个数的和。假定每组输入只存在唯一答案。

       

      示例:

      输入:nums = [-1,2,1,-4], target = 1
      输出:
      2
      解释:
      与 target 最接近的和是 2 (-1 + 2 + 1 = 2) 。

       

      提示:

        \t
      • 3 <= nums.length <= 10^3
      • \t
      • -10^3 <= nums[i] <= 10^3
      • \t
      • -10^4 <= target <= 10^4
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "from typing import List\nclass Solution:\n\tdef threeSumClosest(self, nums: List[int], target: int) -> int:\n\t\tnums.sort()\n\t\tcur = 0\n\t\tclosest = nums[0] + nums[1] + nums[2]\n\t\twhile cur < len(nums) - 2:\n\t\t\tleft = cur + 1\n\t\t\tright = len(nums) - 1\n\t\t\twhile left < right:\n\t\t\t\tn = nums[cur] + nums[left] + nums[right]\n\t\t\t\tif abs(target - n) < abs(target - closest):\n\t\t\t\t\tclosest = n\n\t\t\t\tif n == target:\n\t\t\t\t\tbreak\n\t\t\t\telif n > target:\n\t\t\t\t\tt = right - 1\n\t\t\t\t\twhile (t > left and nums[t] == nums[right]):\n\t\t\t\t\t\tt -= 1\n\t\t\t\t\tright = t\n\t\t\t\telse:\n\t\t\t\t\tt = left + 1\n\t\t\t\t\twhile (t < right and nums[t] == nums[left]):\n\t\t\t\t\t\tt += 1\n\t\t\t\t\tleft = t\n\t\t\tt = cur + 1\n\t\t\twhile (t < len(nums) and nums[t] == nums[cur]):\n\t\t\t\tt += 1\n\t\t\tcur = t\n\t\treturn closest\n# %%\ns = Solution()\nprint(s.threeSumClosest(nums = [-1,2,1,-4], target = 1))", + "language": "python" + }, + "node_id": "dailycode-27bae4c0ba27468eb2c6e09a7251d16d", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600471102" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/53.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/53.exercises/config.json" new file mode 100644 index 000000000..946639ccd --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/53.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-a8944f7f59b943228d64d83b7428caa0", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/53.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/53.exercises/solution.json" new file mode 100644 index 000000000..39a605bc6 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/53.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "2a0c9ca788f9488d8bd946dc1a1e3795", + "keywords": "贪心,数组,动态规划", + "title": "跳跃游戏", + "desc": [ + { + "content": "\n

      给定一个非负整数数组 nums ,你最初位于数组的 第一个下标

      数组中的每个元素代表你在该位置可以跳跃的最大长度。

      判断你是否能够到达最后一个下标。

       

      示例 1:

      输入:nums = [2,3,1,1,4]
      输出:
      true
      解释:
      可以先跳 1 步,从下标 0 到达下标 1, 然后再从下标 1 跳 3 步到达最后一个下标。

      示例 2:

      输入:nums = [3,2,1,0,4]
      输出:
      false
      解释:
      无论怎样,总会到达下标为 3 的位置。但该下标的最大跳跃长度是 0 , 所以永远不可能到达最后一个下标。

       

      提示:

        \t
      • 1 <= nums.length <= 3 * 104
      • \t
      • 0 <= nums[i] <= 105
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution(object):\n\tdef canJump(self, nums):\n\t\t\"\"\"\n\t\t:type nums: List[int]\n\t\t:rtype: bool\n\t\t\"\"\"\n\t\tlength = len(nums)\n\t\tbegin = length - 1\n\t\tfor i in reversed(range(length - 1)):\n\t\t\tif i + nums[i] >= begin:\n\t\t\t\tbegin = i\n\t\treturn not begin\n# %%\ns = Solution()\nprint(s.canJump(nums = [2,3,1,1,4]))", + "language": "python" + }, + "node_id": "dailycode-a8944f7f59b943228d64d83b7428caa0", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470122" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/54.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/54.exercises/config.json" new file mode 100644 index 000000000..af2c2359c --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/54.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-305b624c7612402fa0b7c7c2464694cc", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/54.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/54.exercises/solution.json" new file mode 100644 index 000000000..b300ef313 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/54.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "1f0946dd838b405484813e7849fb7325", + "keywords": "数组,回溯,矩阵", + "title": "单词搜索", + "desc": [ + { + "content": "\n

      给定一个 m x n 二维字符网格 board 和一个字符串单词 word 。如果 word 存在于网格中,返回 true ;否则,返回 false

      单词必须按照字母顺序,通过相邻的单元格内的字母构成,其中“相邻”单元格是那些水平相邻或垂直相邻的单元格。同一个单元格内的字母不允许被重复使用。

       

      示例 1:

      \"\"
      输入:board = [[\"A\",\"B\",\"C\",\"E\"],[\"S\",\"F\",\"C\",\"S\"],[\"A\",\"D\",\"E\",\"E\"]], word = \"ABCCED\"
      输出:
      true

      示例 2:

      \"\"
      输入:board = [[\"A\",\"B\",\"C\",\"E\"],[\"S\",\"F\",\"C\",\"S\"],[\"A\",\"D\",\"E\",\"E\"]], word = \"SEE\"
      输出:
      true

      示例 3:

      \"\"
      输入:board = [[\"A\",\"B\",\"C\",\"E\"],[\"S\",\"F\",\"C\",\"S\"],[\"A\",\"D\",\"E\",\"E\"]], word = \"ABCB\"
      输出:
      false

       

      提示:

        \t
      • m == board.length
      • \t
      • n = board[i].length
      • \t
      • 1 <= m, n <= 6
      • \t
      • 1 <= word.length <= 15
      • \t
      • boardword 仅由大小写英文字母组成

       

      进阶:你可以使用搜索剪枝的技术来优化解决方案,使其在 board 更大的情况下可以更快解决问题?

      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution(object):\n\tdef exist(self, board, word):\n\t\t\"\"\"\n\t\t:type board: List[List[str]]\n\t\t:type word: str\n\t\t:rtype: bool\n\t\t\"\"\"\n\t\tcheck_board = [[True] * len(board[0]) for _ in range(len(board))]\n\t\tfor i in range(len(board)):\n\t\t\tfor j in range(len(board[0])):\n\t\t\t\tif board[i][j] == word[0] and check_board:\n\t\t\t\t\tcheck_board[i][j] = False\n\t\t\t\t\tres = self.check_exist(check_board, board, word, 1, len(word), i, j)\n\t\t\t\t\tif res:\n\t\t\t\t\t\treturn True\n\t\t\t\t\tcheck_board[i][j] = True\n\t\treturn False\n\tdef check_exist(self, check_board, board, word, index, ls, row, col):\n\t\tif index == ls:\n\t\t\treturn True\n\t\tfor temp in [(0, 1),(0, -1),(1, 0),(-1, 0)]:\n\t\t\tcurr_row = row + temp[0]\n\t\t\tcurr_col = col + temp[1]\n\t\t\tif curr_row >= 0 and curr_row < len(board) and curr_col >= 0 and curr_col < len(board[0]):\n\t\t\t\tif check_board[curr_row][curr_col] and board[curr_row][curr_col] == word[index]:\n\t\t\t\t\tcheck_board[curr_row][curr_col] = False\n\t\t\t\t\tres = self.check_exist(check_board, board, word, index + 1, len(word), curr_row, curr_col)\n\t\t\t\t\tif res:\n\t\t\t\t\t\treturn res\n\t\t\t\t\tcheck_board[curr_row][curr_col] = True\n\t\treturn False\nif __name__ == \"__main__\":\n\ts = Solution()\n\tprint (s.exist(board = [[\"A\",\"B\",\"C\",\"E\"],[\"S\",\"F\",\"C\",\"S\"],[\"A\",\"D\",\"E\",\"E\"]], word = \"ABCCED\"))", + "language": "python" + }, + "node_id": "dailycode-305b624c7612402fa0b7c7c2464694cc", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470927" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/55.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/55.exercises/config.json" new file mode 100644 index 000000000..cbc613831 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/55.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-27c2c1b4db8748f394d7ec612bf0ac33", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/55.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/55.exercises/solution.json" new file mode 100644 index 000000000..2acd998f3 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/55.exercises/solution.json" @@ -0,0 +1,80 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "2733703c7dd4468e999179f0bfa8be0b", + "keywords": "树,深度优先搜索,二叉搜索树,二叉树", + "title": "验证二叉搜索树", + "desc": [ + { + "content": "\n
      \n

      给你一个二叉树的根节点 root ,判断其是否是一个有效的二叉搜索树。

      ", + "language": "markdown" + }, + { + "content": "\n

      有效 二叉搜索树定义如下:

      ", + "language": "markdown" + }, + { + "content": "\n
        \n
      • 节点的左子树只包含 小于 当前节点的数。
      • \n
      • 节点的右子树只包含 大于 当前节点的数。
      • \n
      • 所有左子树和右子树自身必须也是二叉搜索树。
      • \n
      ", + "language": "markdown" + }, + { + "content": "\n

       

      ", + "language": "markdown" + }, + { + "content": "\n

      示例 1:

      \n\"\"\n
      输入:root = [2,1,3]\n输出:true\n
      ", + "language": "markdown" + }, + { + "content": "\n

      示例 2:

      \n\"\"\n
      输入:root = [5,1,4,null,null,3,6]\n输出:false\n解释:根节点的值是 5 ,但是右子节点的值是 4 。\n
      ", + "language": "markdown" + }, + { + "content": "\n

       

      ", + "language": "markdown" + }, + { + "content": "\n

      提示:

      ", + "language": "markdown" + }, + { + "content": "\n
        \n
      • 树中节点数目范围在[1, 104]
      • \n
      • -231 <= Node.val <= 231 - 1
      • \n
      \n
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "import sys\nclass TreeNode(object):\n\tdef __init__(self, x):\n\t\tself.val = x\n\t\tself.left = None\n\t\tself.right = None\nclass List2Tree(object):\n\tdef __init__(self, nums: list):\n\t\tself.nums = nums\n\t\tself.queue = []\n\t\tif len(nums) == 1:\n\t\t\tself.root = TreeNode(self.nums.pop(0))\n\t\telse:\n\t\t\ta = self.nums.pop(0)\n\t\t\tb = self.nums.pop(0)\n\t\t\tc = self.nums.pop(0)\n\t\t\tself.root = TreeNode(a)\n\t\t\tif b is not None:\n\t\t\t\tself.root.left = TreeNode(b)\n\t\t\telse:\n\t\t\t\tself.root.left = b\n\t\t\tif c is not None:\n\t\t\t\tself.root.right = TreeNode(c)\n\t\t\telse:\n\t\t\t\tself.root.right = c\n\t\t\tself.queue.append(self.root.left)\n\t\t\tself.queue.append(self.root.right)\n\tdef convert(self):\n\t\twhile len(self.nums) > 0 and len(self.queue)> 0:\n\t\t\tnode = self.queue.pop(0)\n\t\t\tif node is not None:\n\t\t\t\tnum= self.nums.pop(0)\n\t\t\t\tif num is not None:\n\t\t\t\t\tnode.left = TreeNode(num)\n\t\t\t\telse:\n\t\t\t\t\tnode.left = num\n\t\t\t\tif len(self.nums) > 0:\n\t\t\t\t\tnum = self.nums.pop(0)\n\t\t\t\telse:\n\t\t\t\t\tnum = None\n\t\t\t\tif num is not None:\n\t\t\t\t\tnode.right = TreeNode(num)\n\t\t\t\telse:\n\t\t\t\t\tnode.right = num\n\t\t\t\tself.queue.append(node.left)\n\t\t\t\tself.queue.append(node.right)\n\t\treturn self.root\nclass Solution(object):\n\tdef isValidBST(self, root):\n\t\troot = List2Tree(root).convert()\n\t\treturn self.isVaild_helper(root, -sys.maxsize - 1, sys.maxsize)\n\tdef isVaild_helper(self, root, minVal, maxVal):\n\t\tif root is None:\n\t\t\treturn True\n\t\tif root.val >= maxVal or root.val <= minVal:\n\t\t\treturn False\n\t\treturn self.isVaild_helper(root.left, minVal, root.val) and self.isVaild_helper(root.right, root.val, maxVal)\n# %%\ns = Solution()\nprint(s.isValidBST([5,1,4,None,None,3,6]))", + "language": "python" + }, + "node_id": "dailycode-27c2c1b4db8748f394d7ec612bf0ac33", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600469827" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/56.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/56.exercises/config.json" new file mode 100644 index 000000000..4ab80a9d7 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/56.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-00212162ec234e81a8f9274d7c9a85d2", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/56.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/56.exercises/solution.json" new file mode 100644 index 000000000..6aac6b103 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/56.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "fb80bffeb84e4af98e68afa1b7bfe0e4", + "keywords": "链表,双指针", + "title": "删除排序链表中的重复元素 II", + "desc": [ + { + "content": "\n

      存在一个按升序排列的链表,给你这个链表的头节点 head ,请你删除链表中所有存在数字重复情况的节点,只保留原始链表中 没有重复出现 的数字。

      返回同样按升序排列的结果链表。

       

      示例 1:

      \"\"
      输入:head = [1,2,3,3,4,4,5]
      输出:
      [1,2,5]

      示例 2:

      \"\"
      输入:head = [1,1,1,2,3]
      输出:
      [2,3]

       

      提示:

        \t
      • 链表中节点数目在范围 [0, 300]
      • \t
      • -100 <= Node.val <= 100
      • \t
      • 题目数据保证链表已经按升序排列
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class ListNode(object):\n\tdef __init__(self, x):\n\t\tself.val = x\n\t\tself.next = None\nclass LinkList:\n\tdef __init__(self):\n\t\tself.head=None\n\tdef initList(self, data):\n\t\tself.head = ListNode(data[0])\n\t\tr=self.head\n\t\tp = self.head\n\t\tfor i in data[1:]:\n\t\t\tnode = ListNode(i)\n\t\t\tp.next = node\n\t\t\tp = p.next\n\t\treturn r\n\tdef\tconvert_list(self,head):\n\t\tret = []\n\t\tif head == None:\n\t\t\treturn\n\t\tnode = head\n\t\twhile node != None:\n\t\t\tret.append(node.val)\n\t\t\tnode = node.next\n\t\treturn ret\nclass Solution(object):\n\tdef deleteDuplicates(self, head):\n\t\t\"\"\"\n\t\t:type head: ListNode\n\t\t:rtype: ListNode\n\t\t\"\"\"\n\t\tnewnodehead = None\n\t\tnewnode = None\n\t\tnode = head\n\t\twhile node:\n\t\t\tlastval = node.val\n\t\t\tif node.next and node.next.val == lastval:\n\t\t\t\twhile node and node.val == lastval:\n\t\t\t\t\tnode=node.next\n\t\t\t\tcontinue\n\t\t\tif not newnodehead:\n\t\t\t\tnewnode=ListNode(node.val)\n\t\t\t\tnewnodehead=newnode\n\t\t\telse:\n\t\t\t\tnewnode.next=ListNode(node.val)\n\t\t\t\tnewnode=newnode.next\n\t\t\tnode = node.next\n\t\treturn newnodehead\n# %%\nl = LinkList()\nlist1 = [1,2,3,3,4,4,5]\nl1 = l.initList(list1)\ns = Solution()\nprint(l.convert_list(s.deleteDuplicates(l1)))", + "language": "python" + }, + "node_id": "dailycode-00212162ec234e81a8f9274d7c9a85d2", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470128" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/57.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/57.exercises/config.json" new file mode 100644 index 000000000..90965e89a --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/57.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-671c6173f6cf4b489c1cd9bee0cca519", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/57.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/57.exercises/solution.json" new file mode 100644 index 000000000..b25dacc32 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/57.exercises/solution.json" @@ -0,0 +1,104 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "231f8c7a519643f287013f6b88005276", + "keywords": "字符串", + "title": "Z 字形变换", + "desc": [ + { + "content": "\n
      \n

      将一个给定字符串 s 根据给定的行数 numRows ,以从上往下、从左到右进行 Z 字形排列。

      ", + "language": "markdown" + }, + { + "content": "\n

      比如输入字符串为 \"PAYPALISHIRING\" 行数为 3 时,排列如下:

      ", + "language": "markdown" + }, + { + "content": "\n
      \nP   A   H   N\nA P L S I I G\nY   I   R
      ", + "language": "markdown" + }, + { + "content": "\n

      之后,你的输出需要从左往右逐行读取,产生出一个新的字符串,比如:\"PAHNAPLSIIGYIR\"

      ", + "language": "markdown" + }, + { + "content": "\n

      请你实现这个将字符串进行指定行数变换的函数:

      ", + "language": "markdown" + }, + { + "content": "\n
      string convert(string s, int numRows);
      ", + "language": "markdown" + }, + { + "content": "\n

       

      ", + "language": "markdown" + }, + { + "content": "\n

      示例 1:

      ", + "language": "markdown" + }, + { + "content": "\n
      输入:s = \"PAYPALISHIRING\", numRows = 3\n输出:\"PAHNAPLSIIGYIR\"\n
      \n示例 2:", + "language": "markdown" + }, + { + "content": "\n
      输入:s = \"PAYPALISHIRING\", numRows = 4\n输出:\"PINALSIGYAHRPI\"\n解释:\nP     I    N\nA   L S  I G\nY A   H R\nP     I\n
      ", + "language": "markdown" + }, + { + "content": "\n

      示例 3:

      ", + "language": "markdown" + }, + { + "content": "\n
      输入:s = \"A\", numRows = 1\n输出:\"A\"\n
      ", + "language": "markdown" + }, + { + "content": "\n

       

      ", + "language": "markdown" + }, + { + "content": "\n

      提示:

      ", + "language": "markdown" + }, + { + "content": "\n
        \n
      • 1 <= s.length <= 1000
      • \n
      • s 由英文字母(小写和大写)、',''.' 组成
      • \n
      • 1 <= numRows <= 1000
      • \n
      \n
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "import math\nclass Solution:\n\tdef convert(self, s: str, numRows: int) -> str:\n\t\tn = len(s)\n\t\tN = numRows\n\t\tif n == 1 or N == 1:\n\t\t\treturn s\n\t\tS = N-2\n\t\tC = 2*N-2\n\t\tR = int(math.floor(n/C))\n\t\tRS = n % (C)\n\t\tCE = n-R*C\n\t\tRR = 1 if (RS <= N) else 1+(RS-N)\n\t\tRX = R*(N-1) + RR\n\t\toutput = []\n\t\ti = 0\n\t\twhile i < N:\n\t\t\tj = 0\n\t\t\tk = (N-1-i)\n\t\t\twhile j < RX:\n\t\t\t\tr = int(math.floor(j/(N-1)))\n\t\t\t\trs = j % (N-1)\n\t\t\t\toffset = i if rs == 0 else N+rs-1\n\t\t\t\tindex = r*C+offset\n\t\t\t\tif index < len(s):\n\t\t\t\t\toutput.append(s[index])\n\t\t\t\tif i > 0 and i < N-1:\n\t\t\t\t\tr = int(math.floor(k/(N-1)))\n\t\t\t\t\trs = k % (N-1)\n\t\t\t\t\toffset = i if rs == 0 else N+rs-1\n\t\t\t\t\tindex = r*C+offset\n\t\t\t\t\tif index < len(s):\n\t\t\t\t\t\toutput.append(s[index])\n\t\t\t\tj += (N-1)\n\t\t\t\tk += (N-1)\n\t\t\ti += 1\n\t\treturn ''.join(output)\n# %%\ns = Solution()\nprint(s.convert('PAYPALISHIRING', 3))", + "language": "python" + }, + "node_id": "dailycode-671c6173f6cf4b489c1cd9bee0cca519", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600469917" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/58.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/58.exercises/config.json" new file mode 100644 index 000000000..687dae1ec --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/58.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-237fc188faa44250a488a2ae809d34e8", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/58.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/58.exercises/solution.json" new file mode 100644 index 000000000..ace82d465 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/58.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "e3ee6d55eb8c45bc84201e59c85c5a01", + "keywords": "数组,回溯", + "title": "组合总和 II", + "desc": [ + { + "content": "\n

      给定一个数组 candidates 和一个目标数 target ,找出 candidates 中所有可以使数字和为 target 的组合。\n

      \n

      candidates 中的每个数字在每个组合中只能使用一次。

      \n

      说明:

      \n
        \n
      • 所有数字(包括目标数)都是正整数。
      • \n
      • 解集不能包含重复的组合。 
      • \n
      \n

      示例 1:

      \n
      输入: candidates = [10,1,2,7,6,1,5], target = 8,
      所求解集为:
      [[1, 7],[1, 2, 5],[2, 6],[1, 1, 6]]
      \n

      示例 2:

      \n
      输入: candidates = [2,5,2,1,2], target = 5,
      所求解集为:
      [[1,2,2],[5]]
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution(object):\n\tdef combinationSum2(self, candidates, target):\n\t\t\"\"\"\n\t\t:type candidates: List[int]\n\t\t:type target: int\n\t\t:rtype: List[List[int]]\n\t\t\"\"\"\n\t\tcandidates.sort()\n\t\tdp = [[] for _ in range(target + 1)]\n\t\tdp[0].append([])\n\t\tfor i in range(1, target + 1):\n\t\t\tfor j in range(len(candidates)):\n\t\t\t\tif candidates[j] > i:\n\t\t\t\t\tbreak\n\t\t\t\tfor k in range(len(dp[i - candidates[j]])):\n\t\t\t\t\ttemp = dp[i - candidates[j]][k][:]\n\t\t\t\t\tif len(temp) > 0 and temp[-1] >= j:\n\t\t\t\t\t\tcontinue\n\t\t\t\t\ttemp.append(j)\n\t\t\t\t\tdp[i].append(temp)\n\t\tres = []\n\t\tcheck = {}\n\t\tfor temp in dp[target]:\n\t\t\tvalue = [candidates[t] for t in temp]\n\t\t\ttry:\n\t\t\t\tcheck[str(value)] += 1\n\t\t\texcept KeyError:\n\t\t\t\tcheck[str(value)] = 1\n\t\t\t\tres.append(value)\n\t\treturn res\n# %%\ns = Solution()\nprint(s.combinationSum2(candidates = [2,5,2,1,2], target = 5))", + "language": "python" + }, + "node_id": "dailycode-237fc188faa44250a488a2ae809d34e8", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470928" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/59.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/59.exercises/config.json" new file mode 100644 index 000000000..3cafe4d87 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/59.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-6248a779002b4454b3493e7553b99d49", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/59.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/59.exercises/solution.json" new file mode 100644 index 000000000..8e5f14971 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/59.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "b29c970537ca4755b87b125bea842657", + "keywords": "数组,矩阵,模拟", + "title": "螺旋矩阵 II", + "desc": [ + { + "content": "\n

      给你一个正整数 n ,生成一个包含 1 到 n2 所有元素,且元素按顺时针顺序螺旋排列的 n x n 正方形矩阵 matrix

       

      示例 1:

      \"\"
      输入:n = 3
      输出:
      [[1,2,3],[8,9,4],[7,6,5]]

      示例 2:

      输入:n = 1
      输出:
      [[1]]

       

      提示:

        \t
      • 1 <= n <= 20
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution(object):\n\tdef generateMatrix(self, n):\n\t\t\"\"\"\n\t\t:type n: int\n\t\t:rtype: List[List[int]]\n\t\t\"\"\"\n\t\tres = [[0] * n for _ in range(n)]\n\t\tpos = [0, 0]\n\t\tmove = (0, 1)\n\t\tfor index in range(1, n * n + 1):\n\t\t\tres[pos[0]][pos[1]] = index\n\t\t\tif res[(pos[0] + move[0]) % n][(pos[1] + move[1]) % n] > 0:\n\t\t\t\tmove = (move[1], -1 * move[0])\n\t\t\tpos[0] = pos[0] + move[0]\n\t\t\tpos[1] = pos[1] + move[1]\n\t\treturn res\nif __name__ == '__main__':\n\ts = Solution()\n\tprint (s.generateMatrix(2))", + "language": "python" + }, + "node_id": "dailycode-6248a779002b4454b3493e7553b99d49", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470226" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/6.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/6.exercises/config.json" new file mode 100644 index 000000000..079c0a68c --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/6.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-a7329b367a72496381d22bcbc15b0ab1", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/6.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/6.exercises/solution.json" new file mode 100644 index 000000000..b7f24eb1b --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/6.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "391c144d469846e0be425191669a4f33", + "keywords": "位运算,数组,回溯", + "title": "子集", + "desc": [ + { + "content": "\n

      给你一个整数数组 nums ,数组中的元素 互不相同 。返回该数组所有可能的子集(幂集)。

      解集 不能 包含重复的子集。你可以按 任意顺序 返回解集。

       

      示例 1:

      输入:nums = [1,2,3]
      输出:
      [[],[1],[2],[1,2],[3],[1,3],[2,3],[1,2,3]]

      示例 2:

      输入:nums = [0]
      输出:
      [[],[0]]

       

      提示:

        \t
      • 1 <= nums.length <= 10
      • \t
      • -10 <= nums[i] <= 10
      • \t
      • nums 中的所有元素 互不相同
      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution(object):\n\tdef subsets(self, nums):\n\t\tnums.sort()\n\t\tres = [[]]\n\t\tfor index in range(len(nums)):\n\t\t\tsize = len(res)\n\t\t\tfor j in range(size):\n\t\t\t\tcurr = list(res[j])\n\t\t\t\tcurr.append(nums[index])\n\t\t\t\tres.append(curr)\n\t\treturn res\nif __name__ == \"__main__\":\n\ts = Solution()\n\tprint (s.subsets([1,2,3]))", + "language": "python" + }, + "node_id": "dailycode-a7329b367a72496381d22bcbc15b0ab1", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600469824" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/60.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/60.exercises/config.json" new file mode 100644 index 000000000..93ef2b12e --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/60.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-a23959a66506488a952c2aace7627c39", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/60.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/60.exercises/solution.json" new file mode 100644 index 000000000..df9db5703 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/60.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "1adcc2813fb04141b5bc11a3f7dc88f0", + "keywords": "递归,链表", + "title": "两两交换链表中的节点", + "desc": [ + { + "content": "\n

      给定一个链表,两两交换其中相邻的节点,并返回交换后的链表。

      你不能只是单纯的改变节点内部的值,而是需要实际的进行节点交换。

       

      示例 1:

      \"\"
      输入:head = [1,2,3,4]
      输出:
      [2,1,4,3]

      示例 2:

      输入:head = []
      输出:
      []

      示例 3:

      输入:head = [1]
      输出:
      [1]

       

      提示:

        \t
      • 链表中节点的数目在范围 [0, 100]
      • \t
      • 0 <= Node.val <= 100

       

      进阶:你能在不修改链表节点值的情况下解决这个问题吗?(也就是说,仅修改节点本身。)

      ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class ListNode(object):\n\tdef __init__(self, x):\n\t\tself.val = x\n\t\tself.next = None\nclass LinkList:\n\tdef __init__(self):\n\t\tself.head=None\n\tdef initList(self, data):\n\t\tself.head = ListNode(data[0])\n\t\tr=self.head\n\t\tp = self.head\n\t\tfor i in data[1:]:\n\t\t\tnode = ListNode(i)\n\t\t\tp.next = node\n\t\t\tp = p.next\n\t\treturn r\n\tdef\tconvert_list(self,head):\n\t\tret = []\n\t\tif head == None:\n\t\t\treturn\n\t\tnode = head\n\t\twhile node != None:\n\t\t\tret.append(node.val)\n\t\t\tnode = node.next\n\t\treturn ret\nclass Solution(object):\n\tdef swapPairs(self, head):\n\t\tdummyHead = ListNode(-1)\n\t\tdummyHead.next = head\n\t\tprev, p = dummyHead, head\n\t\twhile p != None and p.next != None:\n\t\t\tq, r = p.next, p.next.next\n\t\t\tprev.next = q\n\t\t\tq.next = p\n\t\t\tp.next = r\n\t\t\tprev = p\n\t\t\tp = r\n\t\treturn dummyHead.next\n# %%\nl = LinkList()\nhead = [1,2,3,4]\nl1 = l.initList(head)\ns = Solution()\nprint(l.convert_list(s.swapPairs(l1)))", + "language": "python" + }, + "node_id": "dailycode-a23959a66506488a952c2aace7627c39", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470117" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/61.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/61.exercises/config.json" new file mode 100644 index 000000000..7a8880c93 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/61.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-3ea29a0e480449b6afcf0106f48e3d83", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/61.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/61.exercises/solution.json" new file mode 100644 index 000000000..a44b483d1 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/61.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "02ab71216bfe43cb8027c1e3d19f26b7", + "keywords": "数组,双指针,排序", + "title": "颜色分类", + "desc": [ + { + "content": "\n

      给定一个包含红色、白色和蓝色,一共 n 个元素的数组,原地对它们进行排序,使得相同颜色的元素相邻,并按照红色、白色、蓝色顺序排列。

      此题中,我们使用整数 0、 12 分别表示红色、白色和蓝色。

         

        示例 1:

        输入:nums = [2,0,2,1,1,0]
        输出:
        [0,0,1,1,2,2]

        示例 2:

        输入:nums = [2,0,1]
        输出:
        [0,1,2]

        示例 3:

        输入:nums = [0]
        输出:
        [0]

        示例 4:

        输入:nums = [1]
        输出:
        [1]

         

        提示:

          \t
        • n == nums.length
        • \t
        • 1 <= n <= 300
        • \t
        • nums[i]012

         

        进阶:

          \t
        • 你可以不使用代码库中的排序函数来解决这道题吗?
        • \t
        • 你能想出一个仅使用常数空间的一趟扫描算法吗?
        ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution(object):\n\tdef sortColors(self, nums):\n\t\tlow, mid, high = 0, 0, len(nums) - 1\n\t\twhile mid <= high:\n\t\t\tif nums[mid] == 0:\n\t\t\t\tnums[low], nums[mid] = nums[mid], nums[low]\n\t\t\t\tlow += 1\n\t\t\t\tmid += 1\n\t\t\telif nums[mid] == 1:\n\t\t\t\tmid += 1\n\t\t\telse:\n\t\t\t\tnums[high], nums[mid] = nums[mid], nums[high]\n\t\t\t\thigh -= 1\n\t\treturn nums\n# %%\ns = Solution()\nprint(s.sortColors(nums = [2,0,2,1,1,0]))", + "language": "python" + }, + "node_id": "dailycode-3ea29a0e480449b6afcf0106f48e3d83", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470126" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/62.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/62.exercises/config.json" new file mode 100644 index 000000000..6ea3862d5 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/62.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-325bf433414c4b698ce5e6ec41e1a44d", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/62.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/62.exercises/solution.json" new file mode 100644 index 000000000..2e542c406 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/62.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "849c5599454d40f98d785961bd69d368", + "keywords": "数组,动态规划,矩阵", + "title": "不同路径 II", + "desc": [ + { + "content": "\n

        一个机器人位于一个 m x n 网格的左上角 (起始点在下图中标记为“Start” )。

        \n

        机器人每次只能向下或者向右移动一步。机器人试图达到网格的右下角(在下图中标记为“Finish”)。

        \n

        现在考虑网格中有障碍物。那么从左上角到右下角将会有多少条不同的路径?

        \n

        \n

        网格中的障碍物和空位置分别用 10 来表示。

        \n

         

        \n

        示例 1:

        \"\"\nsrc=\"https://cdn.jsdelivr.net/gh/doocs/leetcode@main/solution/0000-0099/0063.Unique%20Paths%20II/images/robot1.jpg\"\nstyle=\"width:\n
        输入:obstacleGrid = [[0,0,0],[0,1,0],[0,0,0]]
        输出:
        2
        解释:
        3x3 网格的正中间有一个障碍物。从左上角到右下角一共有 2 条不同的路径:
        1. 向右 -> 向右 -> 向下 -> 向下
        2. 向下 -> 向下 -> 向右 -> 向右
        \n

        示例 2:

        \"\"\nsrc=\"https://cdn.jsdelivr.net/gh/doocs/leetcode@main/solution/0000-0099/0063.Unique%20Paths%20II/images/robot2.jpg\"\nstyle=\"width:\n
        输入:obstacleGrid = [[0,1],[0,0]]
        输出:
        1
        \n

         

        \n

        提示:

        \n
          \n
        • m == obstacleGrid.length
        • \n
        • n == obstacleGrid[i].length
        • \n
        • 1 <= m, n <= 100
        • \n
        • obstacleGrid[i][j]01
        • \n
        ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution(object):\n\tdef uniquePathsWithObstacles(self, obstacleGrid):\n\t\tm, n = len(obstacleGrid), len(obstacleGrid[0])\n\t\tif m == 0:\n\t\t\treturn 0\n\t\tdmap = [[0] * (n + 1) for _ in range(m + 1)]\n\t\tdmap[m - 1][n] = 1\n\t\tfor i in range(m - 1, -1, -1):\n\t\t\tfor j in range(n - 1, -1, -1):\n\t\t\t\tif obstacleGrid[i][j] == 1:\n\t\t\t\t\tdmap[i][j] = 0\n\t\t\t\telse:\n\t\t\t\t\tdmap[i][j] = dmap[i][j + 1] + dmap[i + 1][j]\n\t\treturn dmap[0][0]\n# %%\ns = Solution()\nprint(s.uniquePathsWithObstacles(obstacleGrid = [[0,1],[0,0]]))", + "language": "python" + }, + "node_id": "dailycode-325bf433414c4b698ce5e6ec41e1a44d", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470123" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/63.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/63.exercises/config.json" new file mode 100644 index 000000000..24c691bcb --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/63.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-ce77e5bfde1d4560969cbcbafc93a241", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/63.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/63.exercises/solution.json" new file mode 100644 index 000000000..c24cbbacc --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/63.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "70d2aed25c32405c8e1dd08ea627a93c", + "keywords": "数组,哈希表,矩阵", + "title": "有效的数独", + "desc": [ + { + "content": "\n

        请你判断一个 9x9 的数独是否有效。只需要 根据以下规则 ,验证已经填入的数字是否有效即可。

        \n
          \n
        1. 数字 1-9 在每一行只能出现一次。
        2. \n
        3. 数字 1-9 在每一列只能出现一次。
        4. \n
        5. 数字 1-9 在每一个以粗实线分隔的 3x3 宫内只能出现一次。(请参考示例图)
        6. \n
        \n

        数独部分空格内已填入了数字,空白格用 '.' 表示。

        \n

        注意:

        \n
          \n
        • 一个有效的数独(部分已被填充)不一定是可解的。
        • \n
        • 只需要根据以上规则,验证已经填入的数字是否有效即可。
        • \n
        \n

         

        \n

        示例 1:

        \n
        输入:board = \n[[\"5\",\"3\",\".\",\".\",\"7\",\".\",\".\",\".\",\".\"]\n,[\"6\",\".\",\".\",\"1\",\"9\",\"5\",\".\",\".\",\".\"]\n,[\".\",\"9\",\"8\",\".\",\".\",\".\",\".\",\"6\",\".\"]\n,[\"8\",\".\",\".\",\".\",\"6\",\".\",\".\",\".\",\"3\"]\n,[\"4\",\".\",\".\",\"8\",\".\",\"3\",\".\",\".\",\"1\"]\n,[\"7\",\".\",\".\",\".\",\"2\",\".\",\".\",\".\",\"6\"]\n,[\".\",\"6\",\".\",\".\",\".\",\".\",\"2\",\"8\",\".\"]\n,[\".\",\".\",\".\",\"4\",\"1\",\"9\",\".\",\".\",\"5\"]\n,[\".\",\".\",\".\",\".\",\"8\",\".\",\".\",\"7\",\"9\"]]\n输出:true\n
        \n

        示例 2:

        \n
        输入:board = \n[[\"8\",\"3\",\".\",\".\",\"7\",\".\",\".\",\".\",\".\"]\n,[\"6\",\".\",\".\",\"1\",\"9\",\"5\",\".\",\".\",\".\"]\n,[\".\",\"9\",\"8\",\".\",\".\",\".\",\".\",\"6\",\".\"]\n,[\"8\",\".\",\".\",\".\",\"6\",\".\",\".\",\".\",\"3\"]\n,[\"4\",\".\",\".\",\"8\",\".\",\"3\",\".\",\".\",\"1\"]\n,[\"7\",\".\",\".\",\".\",\"2\",\".\",\".\",\".\",\"6\"]\n,[\".\",\"6\",\".\",\".\",\".\",\".\",\"2\",\"8\",\".\"]\n,[\".\",\".\",\".\",\"4\",\"1\",\"9\",\".\",\".\",\"5\"]\n,[\".\",\".\",\".\",\".\",\"8\",\".\",\".\",\"7\",\"9\"]]\n输出:false\n解释:除了第一行的第一个数字从 5 改为 8 以外,空格内其他数字均与 示例1 相同。 但由于位于左上角的 3x3 宫内有两个 8 存在, 因此这个数独是无效的。
        \n

         

        \n

        提示:

        \n
          \n
        • board.length == 9
        • \n
        • board[i].length == 9
        • \n
        • board[i][j] 是一位数字或者 '.'
        • \n
        ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "from typing import List\nclass Solution:\n\tdef isValidSudoku(self, board):\n\t\t\"\"\"\n\t\t:type board: List[List[str]]\n\t\t:rtype: bool\n\t\t\"\"\"\n\t\traw = [{},{},{},{},{},{},{},{},{}]\n\t\tcol = [{},{},{},{},{},{},{},{},{}]\n\t\tcell = [{},{},{},{},{},{},{},{},{}]\n\t\tfor i in range(9):\n\t\t\tfor j in range(9):\t\t\t\t\t\t\t\t \n\t\t\t\tnum = (3*(i//3) + j//3)\n\t\t\t\ttemp = board[i][j]\n\t\t\t\tif temp != \".\":\n\t\t\t\t\tif temp not in raw[i] and temp not in col[j] and temp not in cell[num]:\n\t\t\t\t\t\traw [i][temp] = 1\n\t\t\t\t\t\tcol [j][temp] = 1\n\t\t\t\t\t\tcell [num][temp] =1\n\t\t\t\t\telse:\n\t\t\t\t\t\treturn False\t\n\t\treturn True\n# %%\ns = Solution()\nboard = [[\"5\",\"3\",\".\",\".\",\"7\",\".\",\".\",\".\",\".\"]\n\t\t,[\"6\",\".\",\".\",\"1\",\"9\",\"5\",\".\",\".\",\".\"]\n\t\t,[\".\",\"9\",\"8\",\".\",\".\",\".\",\".\",\"6\",\".\"]\n\t\t,[\"8\",\".\",\".\",\".\",\"6\",\".\",\".\",\".\",\"3\"]\n\t\t,[\"4\",\".\",\".\",\"8\",\".\",\"3\",\".\",\".\",\"1\"]\n\t\t,[\"7\",\".\",\".\",\".\",\"2\",\".\",\".\",\".\",\"6\"]\n\t\t,[\".\",\"6\",\".\",\".\",\".\",\".\",\"2\",\"8\",\".\"]\n\t\t,[\".\",\".\",\".\",\"4\",\"1\",\"9\",\".\",\".\",\"5\"]\n\t\t,[\".\",\".\",\".\",\".\",\"8\",\".\",\".\",\"7\",\"9\"]]\nprint(s.isValidSudoku(board))", + "language": "python" + }, + "node_id": "dailycode-ce77e5bfde1d4560969cbcbafc93a241", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600469920" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/7.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/7.exercises/config.json" new file mode 100644 index 000000000..6ffff6220 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/7.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-b1f1ffa8aa944017bc6c7f4d7b9cece2", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/7.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/7.exercises/solution.json" new file mode 100644 index 000000000..63405a28e --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/7.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "31cbe7a951d24234b431f5e1985ed2ca", + "keywords": "数学,动态规划,组合数学", + "title": "不同路径", + "desc": [ + { + "content": "\n

        一个机器人位于一个 m x n 网格的左上角 (起始点在下图中标记为 “Start” )。

        \n

        机器人每次只能向下或者向右移动一步。机器人试图达到网格的右下角(在下图中标记为 “Finish” )。

        \n

        问总共有多少条不同的路径?

        \n

         

        \n

        示例 1:

        \n
        输入:m = 3, n = 7
        输出:
        28
        \n

        示例 2:

        \n
        输入:m = 3, n = 2
        输出:
        3
        解释:
        从左上角开始,总共有 3 条路径可以到达右下角。
        1. 向右 -> 向下 -> 向下
        2. 向下 -> 向下 -> 向右
        3. 向下 -> 向右 -> 向下
        \n

        示例 3:

        \n
        输入:m = 7, n = 3
        输出:
        28
        \n

        示例 4:

        \n
        输入:m = 3, n = 3
        输出:
        6
        \n

         

        \n

        提示:

        \n
          \n
        • 1 <= m, n <= 100
        • \n
        • 题目数据保证答案小于等于 2 * 109
        • \n
        ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution:\n\tdef uniquePaths(self, m, n):\n\t\t\"\"\"\n\t\t:type m: int\n\t\t:type n: int\n\t\t:rtype: int\n\t\t\"\"\"\n\t\tdmap = [[0] * n for _ in range(m)]\n\t\tfor i in range(m):\n\t\t\tdmap[i][0] = 1\n\t\tfor j in range(n):\n\t\t\tdmap[0][j] = 1\n\t\tfor i in range(1, m):\n\t\t\tfor j in range(1, n):\n\t\t\t\tl = u = 0\n\t\t\t\tif i-1 >= 0:\n\t\t\t\t\tu = dmap[i-1][j]\n\t\t\t\tif j-1>= 0:\n\t\t\t\t\tl = dmap[i][j-1]\n\t\t\t\tdmap[i][j] = l + u\n\t\treturn dmap[m-1][n-1]\n# %%\ns = Solution()\nprint(s.uniquePaths(m = 3, n = 7))", + "language": "python" + }, + "node_id": "dailycode-b1f1ffa8aa944017bc6c7f4d7b9cece2", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600469822" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/8.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/8.exercises/config.json" new file mode 100644 index 000000000..e2a5ccecf --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/8.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-62b760478e454f309a425bf1da91ecd9", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/8.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/8.exercises/solution.json" new file mode 100644 index 000000000..9617b56c3 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/8.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "02e1c1c9c9a54a26ba43bc933e73b77f", + "keywords": "哈希表,字符串,回溯", + "title": "电话号码的字母组合", + "desc": [ + { + "content": "\n

        给定一个仅包含数字 2-9 的字符串,返回所有它能表示的字母组合。答案可以按 任意顺序 返回。

        给出数字到字母的映射如下(与电话按键相同)。注意 1 不对应任何字母。

         

        示例 1:

        输入:digits = \"23\"
        输出:
        [\"ad\",\"ae\",\"af\",\"bd\",\"be\",\"bf\",\"cd\",\"ce\",\"cf\"]

        示例 2:

        输入:digits = \"\"
        输出:
        []

        示例 3:

        输入:digits = \"2\"
        输出:
        [\"a\",\"b\",\"c\"]

         

        提示:

          \t
        • 0 <= digits.length <= 4
        • \t
        • digits[i] 是范围 ['2', '9'] 的一个数字。
        ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "from typing import List\nclass Solution:\n\tdef letterCombinations(self, digits: str) -> List[str]:\n\t\tletters = [\n\t\t\t[],\n\t\t\t[],\n\t\t\t['a', 'b', 'c'],\n\t\t\t['d', 'e', 'f'],\n\t\t\t['g', 'h', 'i'],\n\t\t\t['j', 'k', 'l'],\n\t\t\t['m', 'n', 'o'],\n\t\t\t['p', 'q', 'r', 's'],\n\t\t\t['t', 'u', 'v'],\n\t\t\t['w', 'x', 'y', 'z'],\n\t\t]\n\t\tcombinations = []\n\t\ti = 0\n\t\tfor d in digits:\n\t\t\tletter = letters[int(d)]\n\t\t\tif i == 0:\n\t\t\t\tfor l in letter:\n\t\t\t\t\tcombinations.append([l])\n\t\t\telse:\n\t\t\t\tadded = []\n\t\t\t\tfor c in combinations:\n\t\t\t\t\tj = 0\n\t\t\t\t\torigin_c = []\n\t\t\t\t\torigin_c += c\n\t\t\t\t\tfor l in letter:\n\t\t\t\t\t\tif j == 0:\n\t\t\t\t\t\t\tc.append(l)\n\t\t\t\t\t\telse:\n\t\t\t\t\t\t\tnew_c = []\n\t\t\t\t\t\t\tnew_c += origin_c\n\t\t\t\t\t\t\tnew_c.append(l)\n\t\t\t\t\t\t\tadded.append(new_c)\n\t\t\t\t\t\tj += 1\n\t\t\t\tcombinations += added\n\t\t\ti += 1\n\t\toutput = []\n\t\tfor c in combinations:\n\t\t\toutput.append(''.join(c))\n\t\treturn output\n# %%\ns = Solution()\nprint(s.letterCombinations(digits = \"23\"))", + "language": "python" + }, + "node_id": "dailycode-62b760478e454f309a425bf1da91ecd9", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600471003" +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/9.exercises/config.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/9.exercises/config.json" new file mode 100644 index 000000000..a6aaf141f --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/9.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-527f1c40eca54c19be59eb9d93305dc3", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/9.exercises/solution.json" "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/9.exercises/solution.json" new file mode 100644 index 000000000..e64885163 --- /dev/null +++ "b/data_source/dailycode/2.dailycode\344\270\255\351\230\266/3.python/9.exercises/solution.json" @@ -0,0 +1,76 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "55102e8ea1ca4b7abadbc1595fcef085", + "keywords": "树,二叉搜索树,动态规划,回溯,二叉树", + "title": "不同的二叉搜索树 II", + "desc": [ + { + "content": "\n
        \n

        给你一个整数 n ,请你生成并返回所有由 n 个节点组成且节点值从 1n 互不相同的不同\n二叉搜索树 。可以按 任意顺序 返回答案。\n

        ", + "language": "markdown" + }, + { + "content": "\n

         

        ", + "language": "markdown" + }, + { + "content": "\n
        \n
        \n

        示例 1:

        \n\"\"\n
        输入:n = 3\n输出:[[1,null,2,null,3],[1,null,3,2],[2,1,3],[3,1,null,null,2],[3,2,null,1]]\n
        ", + "language": "markdown" + }, + { + "content": "\n

        示例 2:

        ", + "language": "markdown" + }, + { + "content": "\n
        输入:n = 1\n输出:[[1]]\n
        ", + "language": "markdown" + }, + { + "content": "\n

         

        ", + "language": "markdown" + }, + { + "content": "\n

        提示:

        ", + "language": "markdown" + }, + { + "content": "\n
          \n
        • 1 <= n <= 8
        • \n
        \n
        \n
        \n
        ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class TreeNode(object):\n\tdef __init__(self, x):\n\t\tself.val = x\n\t\tself.left = None\n\t\tself.right = None\n\tdef to_list(self, count):\n\t\tqueue = []\n\t\tqueue.append(self)\n\t\tresult = []\n\t\twhile len(queue) > 0:\n\t\t\tif count == 0:\n\t\t\t\tbreak\n\t\t\tnode = queue.pop(0)\n\t\t\tif node is None:\n\t\t\t\tresult.append('null')\n\t\t\telse:\n\t\t\t\tcount -= 1\n\t\t\t\tresult.append(node.val)\n\t\t\t\tqueue.append(node.left)\n\t\t\t\tqueue.append(node.right)\n\t\treturn result\nclass Solution(object):\n\tdef generateTrees(self, n):\n\t\t\"\"\"\n\t\t:type n: int\n\t\t:rtype: List[TreeNode]\n\t\t\"\"\"\n\t\tif n == 0:\n\t\t\treturn []\n\t\treturn self.get_trees(1, n)\n\tdef get_trees_impl(self, start, end):\n\t\ttrees = []\n\t\tif start > end:\n\t\t\ttrees.append(None)\n\t\t\treturn trees\n\t\tfor i in range(start, end + 1):\n\t\t\tlefts = self.get_trees_impl(start, i - 1)\n\t\t\trights = self.get_trees_impl(i + 1, end)\n\t\t\tfor j in range(len(lefts)):\n\t\t\t\tfor k in range(len(rights)):\n\t\t\t\t\troot = TreeNode(i)\n\t\t\t\t\troot.left = lefts[j]\n\t\t\t\t\troot.right = rights[k]\n\t\t\t\t\ttrees.append(root)\n\t\treturn trees\n\tdef get_trees(self, start, end):\n\t\ttrees = self.get_trees_impl(start, end)\n\t\tresults = []\n\t\tfor tree in trees:\n\t\t\tif tree is None:\n\t\t\t\tresults.append([])\n\t\t\telse:\n\t\t\t\tresults.append(tree.to_list(end))\n\t\treturn results\n# %%\ns = Solution()\nprint(s.generateTrees(n=3))", + "language": "python" + }, + "node_id": "dailycode-527f1c40eca54c19be59eb9d93305dc3", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600471004" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/1.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/1.exercises/config.json" new file mode 100644 index 000000000..eb29fac22 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/1.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-b6d28853f68d4a5c842f4d1329b51b95", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/1.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/1.exercises/solution.json" new file mode 100644 index 000000000..aacb824cc --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/1.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "2dd2a3c6c5ca42c38a57aab0e56eb758", + "keywords": "图算法,算法高阶,最小生成树,最小生成树的形成", + "title": "最小花费", + "desc": [ + { + "content": "\n

        题目描述

        乐乐做好了一二三等奖奖品费用预算方案之后,决定到市场上具体咨询一下三种奖品的具体价格,发现各个商家的报价还是有差别的,乐乐决定哪家所有奖品总金额最少就在哪家购买,假设每家货源是充足的。乐乐咨询了n个店家,几乎跑遍了整个市场,才得到各个商家的最低报价清单。现在请你计算出乐乐会在哪家商家购买奖品以及费用是多少。\n输入

        共 n+1 行 

        第一行,有四个整数 n,x,y,z,数与数之间用一个空格隔开,n 表示乐乐咨询的商家数,x,y,z 分别表示要购买一等奖奖品数量、二等奖奖品数量、三等奖奖品数量。 

        接下来的 n 行,每行都有三个数,数与数之间用一个空格隔开,第 i+1 行分别表示编号为 i 的商家对一、二、三等奖奖品的报价(单价) \n输出

        共有两个整数,第一个数表示购买奖品的商家编号(如果有多家总费用最少,输出编号最小的商家),第二个数是购买奖品的总费用。 \n样例输入

        \n3 1 2 3\n70 50 30\n60 40 20\n80 55 33\n

        样例输出

        \n2 200

        提示

        【样例解释】

        乐乐咨询了 3 个商家,打算购买一二三等奖奖品数量分别是 1 个、2 个、3 个,编号为 1 的商家一二三等奖奖品报价分别是 70、50、30 元,编号为 2 的商家报价分别是 60、40、20 元,编号为 3 的商家报价分别是 80、55、20 元,乐乐在编号为 2 的商家购买总费用最低,为200 元。

        【数据范围】

        40%数据:1≤n≤5000 

        100%数据:1≤n≤100000,1≤x,y,z≤1000,奖品报价都是 1000 范围以内的正整数。

        ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \nusing namespace std;\nint main(){\n\tint n,x,y,z,i,min=1000000,n1,n2,n3,temp,t=0;\n\tcin>>n>>x>>y>>z;\n\tfor(i=0;i>n1>>n2>>n3;\n\t\ttemp+=n1*x+n2*y+n3*z;\n\t\tif(temp设有n种不同面值的硬币,第i种硬币的币值是Vi(其中V1=1),重量是Wi,i=1,2,...n且现在购买某种总币值为y的商品,需要用这些硬币付款,如果每种钱币使用的个数不限,那么如何选择付款的方法使得付出钱币的总重量最轻?使用动态规划设计策略设计一个求解该问题的算法。假设问题的输入实例是:

        V1=1, V2=4, V3=6, V4=8

        W1=1, W2=2,W3=4,W4=6

        Y=12

        要求输出优化函数表和标记函数表、以及硬币支付方式。

        ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include\nvoid strcpy(int *a, int *b, int Y){\n\tfor(int i=0;i<=Y;i++) *(a+i) = *(b+i);\n}\nvoid solve(){\n\tint n; scanf(\"%d\",&n);\n\tint type[n], weight[n], Y, i, j, k;\n\tfor(i=0;i Min[i-type[j]]+weight[j]){\n\t\t\t\tMin_Path[i] = type[j];\n\t\t\t\tMin[i] = Min[i-type[j]]+weight[j];\n\t\t\t}\n\t\tfor(k=1;k<=Y;k++) printf(\"%-3d\",Min[k]);\n\t\tprintf(\"\\n\");\n\t\tstrcpy(path[j],Min_Path,Y);\n\t}\n\tprintf(\"\\n\");\n\tfor(i=0;i\nusing namespace std;\nint main() {\n\tint n = 0;\n\tcin >> n;\n\tint* ptr = new(nothrow) int[n];\n\tfor (auto i = 0; i < n; i++) {\n\t\tcin >> ptr[i];\n\t}\n\tint x = 0;\n\tcin >> x;\n\tauto j = 0;\n\tauto status = 0;\n\tfor (; j < n; ++j) {\n\t\tif (ptr[j] == x) {\n\t\t\tstatus = 1;\n\t\t\tbreak;\n\t\t}\n\t}\n\tif (status == 0) {\n\t\tj = -1;\n\t}\n\tcout << j << endl;\n\tdelete[] ptr;\n\tcin.get();\n\tcin.get();\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-43ca27b263d047aebb7b4cb0e86d7f8a", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470177" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/12.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/12.exercises/config.json" new file mode 100644 index 000000000..3b0238bcf --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/12.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-ea953e17f9ec4cd7aa1341f7892c60f6", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/12.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/12.exercises/solution.json" new file mode 100644 index 000000000..cc246c1f6 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/12.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "204d5999cb8e4cdc81dbedfabd98fc40", + "keywords": "算法初阶,快速排序,快速排序分析,期望运行时间,排序和顺序统计量", + "title": "可怕的流感 ", + "desc": [ + { + "content": "\n

        Ø 问题描述:已知一只家禽得了流感,流感的传播时间为 24 小时,在这 24 小时内最多能将流感传给其它 M 只家禽,农场主需要购买紧急药品,假设发现时已经过了 N 天,那么农场主需要至少买多少包药呢?(一包药为一只家禽用量)

        Ø 输入:一行,两个整数,第一个表示流感传染家禽的数量 M,第二个表示发现时已过的天数。

        Ø 输出:一行,一个整数,表示需要药的包数。

        Ø 样例输入:

        10 2

        Ø 样例输出:

        121

        ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nint total(int x);\t\t\t \nint m;\t\t\t\t\t\t \nint main() {\n\tint x;\t\t\t\t\t \n\tcin >> m >> x;\n\tint to = total(x);\t\t \n\tcout << to;\n\treturn 0;\n}\nint total(int x) {\n\tif (x > 0)\n\t{\n\t\treturn (m + 1) * total(x - 1);\n\t}\n\telse return 1;\n}", + "language": "cpp" + }, + "node_id": "dailycode-ea953e17f9ec4cd7aa1341f7892c60f6", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600469842" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/13.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/13.exercises/config.json" new file mode 100644 index 000000000..d3c85828c --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/13.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-c11894f51cc0474ba829f36a11133691", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/13.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/13.exercises/solution.json" new file mode 100644 index 000000000..adea5f0b6 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/13.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "006fd652d9f644dd865b45b8571e9c8d", + "keywords": "算法高阶,字符串匹配,算法问题选编,利用有限自动机进行字符串匹配", + "title": "优雅的字符串", + "desc": [ + { + "content": "\n

        对于一个字符串,如果这个字符串在ASCII码的意义上是有序的,即升序或降序,则称该字符串为“优雅的字符串”。一个长为n的字符串s,对于1<= i <= n - 1,如果总有s[i] <= s[i+1],则字符串为升序;如果总有s[i] >= s[i+1],则字符串降序。现给定一个字符串,请你判断该字符串是否“优雅”,如果该字符串是“优雅”的,则判断是“正优雅”(升序)还是“负优雅”(降序)。\n输入描述\n一个非空,不包含空格的字符串s,保证字符串中的字符都是ASCII标准中的字符。数据保证不会出现所有字符相同的字符串。(2<= length(s) <=1e5)\n输出描述\n如果字符串“正优雅”,则输出“Positive elegance”,如果“负优雅”,则输出“Negative elegance”,否则输出“Non elegance”(均不含引号)。\n样例输入 (*+12356ASdfz\n样例输出\nPositive elegance

        ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \nint main()\n{\n\tchar a[100] = {0};\n\tint i;\n\tint zyy = 1;\n\tint fyy = 1;\n\tprintf(\"请输入字符串:\");\n\tgets(a);\n\tfor (i=1;i a[i-1])\n\t\t{\n\t\t\tfyy = 0;\n\t\t\tbreak;\n\t\t}\n\t}\n\tif (zyy && !fyy)\n\t{\n\t\tprintf(\"Positive elegance\\n\");\n\t}else if (!zyy && fyy)\n\t{\n\t\tprintf(\"Negative elegance\\n\");\n\t}else\n\t\tprintf(\"Non elegance\\n\");\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-c11894f51cc0474ba829f36a11133691", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470165" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/14.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/14.exercises/config.json" new file mode 100644 index 000000000..7f296332f --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/14.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-8190a9a91ce54eef9e371ce1dcecad04", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/14.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/14.exercises/solution.json" new file mode 100644 index 000000000..6db932b24 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/14.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "e73bfd9784bc4eb8ae7118bac4855223", + "keywords": "算法中阶,贪心算法,活动选择问题,高级设计和分析技术", + "title": "蓝桥杯Candy Store", + "desc": [ + { + "content": "\n

        问题描述\n经营一家糖果店是非常困难的,你需要优化各种各样的东西。最近你在销售一种非常时髦的糖果,叫做Whizboppers。这种糖果变质非常迅速,所以:
        \n·你必须每天早上从供应商买来新的Whizboppers。
        \n·你必须用当天早上从供应商买来的盒子装着糖果出售。
        \n你可以从你的供应商处买来装有任意整数克糖果的盒子。
        \n每天有至多k位顾客到你的店里来。从第1个人开始,每个人会选择花费整数分的钱来买Whizboppers,钱数在1分到C分之间(包含1分和C分)。你打算以1分钱每克的价格出售;所以如果一个人想要花4分钱,你会给他恰好4克糖果。你可以给他1个4克的盒子,也可能是1个2克的盒子和2个1克的盒子。
        \n你最少需要买几个盒子才能保证,不管每个人想花多少钱买糖,你总是可以给他们对应质量的糖果?\n
          注意:当一个人选择自己想买多少糖果后,你知道之前的人已经买了多少糖,但不能预知之后的人打算买多少糖。
        \n举个例子,如果每天至多有2位顾客到你的店里,每个人至多花2分钱(k=2,C=2),你可以从你的供应商买4个1克的盒子。但是你可以做的更好:只要买2个1克的盒子和1个2克的盒子,就可以满足你的顾客。如下所示:
        \n第一个人给第一个人的盒子第二个人给第二个人的盒子2分1 个 2克2分
        \n1分2 个 1克
        \n1 个 1克1分1 个 1克2分
        \n1分1 个 2克
        \n1 个 1克
          不论第一个人怎么买,你都可以给他对应质量的盒子,同时保证第二个人也能拿到正确质量的糖果。所以对于k=2,C=2,你用3个盒子就可以满足任意的顾客需求。\n输入格式\n第一行一个整数T,表示询问数量。\n接下来T行,每行包含两个整数k和C,分别表示最大人数和每个人花费的最多钱数。\n输出格式\n对于每一个询问,输出一行包含"Case #x: y",x是询问编号(从1开始标号),y是你每天最少需要的盒子数量。

        ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include\n#include\nusing namespace std;\nint main()\n{\n\tint n, k, count = 1;\n\tlong long c;\n\tcin >> n;\n\twhile (n--)\n\t{\n\t\tcin >> k >> c;\n\t\tint num = k; \n\t\tlong long sum = k;\n\t\tfor (long long i = 2; i <= c; i = sum / k + 1)\n\t\t{\n\t\t\tint t = num;\n\t\t\tnum += ceil((k * i - sum) * 1.0 / i);\n\t\t\tsum += i * (num - t);\n\t\t}\n\t\tcout << \"Case #\" << count++ <<\": \" << num << endl;\n\t}\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-8190a9a91ce54eef9e371ce1dcecad04", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470178" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/15.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/15.exercises/config.json" new file mode 100644 index 000000000..cf399ab9b --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/15.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-4dd43c582c5f499b9f30071512adce42", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/15.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/15.exercises/solution.json" new file mode 100644 index 000000000..83c7f142c --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/15.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "c7da4e1c24674f1592dc1527d6b5bbde", + "keywords": "图算法,算法高阶,最小生成树,最小生成树的形成", + "title": "寻找孪生素数", + "desc": [ + { + "content": "\n数学家希尔伯特在1900年国际数学家大会的报告上提出一个“孪生素数猜想”,即: 存在无穷多个素数p,使得p + 2是素数。p和p+2这一对差为2的素数,被称为“孪生素数”。\n看起来,这个猜想是成立的,我们总能找到很多对孪生素数,例如:3和5,5和7,11和13…… 这一猜想至今还未被证明。\n现在,对于给定的整数n, 请寻找大于n的最小的一对孪生素数p和q(q=p+2)。", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \nusing namespace std;\nint sushu(int x)\n{\n\tif (x <= 1) return 0;\n\tint i,j=1;\n\tfor(i=2;i<=sqrt(x);i++)\n\t{\n\t\tif(x%i==0){j=0;break;}\n\t}\n\treturn j;\n}\nint main()\n{\n\tint x;\n\tcin>>x;\n\tint i=x+1;\n\tfor(;;i++)\n\t{\n\t\tif (sushu(i)&&sushu(i+2))\n\t\t\tbreak;\n\t}\n\tcout<\nint binary( int *a, int key, int n )\n{\n\tint left = 0, right = n - 1, mid = 0;\n\tmid = ( left + right ) / 2;\n\twhile( left < right && a[mid] != key )\n\t{\n\t\tif( a[mid] < key )\n\t\tleft = mid + 1;\n\t\telse if( a[mid] > key )\n\t\tright = mid - 1;\n\t\tmid = ( left + right ) / 2;\n\t}\n\tif( a[mid] == key ) return mid;\n\treturn -1;\n}\nint main (void)\n{\n\tint Base_a[20] = {1,3,5,8,9,40,120,123,125,150,199,200,1250,1255,1900,2000,2001,3000,3950,5000};\n\tint Search_a[5] = {12,199,9,2001,3500};\n\tint result = 0x00;\n\tfor(int i = 0;i < sizeof(Search_a)/sizeof(Search_a[0]);i++)\n\t{\n\t\tresult = binary(Base_a,Search_a[i],sizeof(Base_a)/sizeof(Base_a[0]));\n\t\tprintf(\"[%d %d] \",Search_a[i],result);\n\t}\n\tprintf(\"\\n\");\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-9a4408230ad9414ca2c6ae393d6dfc0c", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470249" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/17.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/17.exercises/config.json" new file mode 100644 index 000000000..3ab5c7ce6 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/17.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-ef701b1245294488a29c1d7609ccc901", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/17.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/17.exercises/solution.json" new file mode 100644 index 000000000..726afd7ff --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/17.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "9fc1fa0c4a6941a5af8c58f8a17072b6", + "keywords": "图算法,算法高阶,图的表示,基本的图算法", + "title": "最优路线", + "desc": [ + { + "content": "\n题目描述\n探险队要穿越泥潭,必须选择可踩踏的落脚点。可是泥潭面积很大,落脚点又实在少得可怜,一不小心就会深陷泥潭而无法脱身。侦查员费尽周折才从老乡手里弄到了一份地图,图中标出了落脚点的位置,而且令人震惊的是:泥潭只有一条穿越路线,且对于 n×m 的地图,路线长度为 n+m-1!请编程为探险队找出穿越路线。\n输入描述\n两个整数 n 和 m,表示泥潭的长和宽。下面 n 行 m 列表示地形(0 表示泥潭,1 表示落脚点)\n输出描述\n用坐标表示穿越路线,坐标之间用 > 分隔\n样例输入\n6 9\n1 1 1 0 0 0 0 0 0\n0 0 1 1 1 0 0 0 0\n0 0 0 0 1 0 0 0 0\n0 0 0 0 1 1 0 0 0\n0 0 0 0 0 1 1 1 1\n0 0 0 0 0 0 0 0 1\n样例输出\n(1,1)>(1,2)>(1,3)>(2,3)>(2,4)>(2,5)>(3,5)>(4,5)>(4,6)>(5,6)>(5,7)>(5,8)>(5,9)>(6,9)", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \nconst int N=101;\nint map[N][N];\nint n,m;\nstruct point{\n\tint l,r;\n}node[N];\nint ans;\nvoid DFS(int x,int y)\n{\n\tif(x==n&&y==m)\n\t{\n\t\tfor(int i=1;i\", node[i].l, node[i].r);\n\t\tprintf(\"(%d,%d)\\n\", x, y);\n\t}\n\telse{\n\t\tif(map[x][y]==1&&x<=n&&y<=m)\n\t\t{\n\t\t\tnode[ans].l=x;\n\t\t\tnode[ans].r=y;\n\t\t\tans++;\n\t\t\tDFS(x+1,y);\n\t\t\tDFS(x,y+1);\n\t\t}\n\t}\n}\nint main()\n{\n\twhile(scanf(\"%d%d\", &n, &m) != EOF)\n\t{\n\t\tans=1;\n\t\tmemset(map,0,sizeof(map));\n\t\tfor(int i=1;i<=n;i++)\n\t\t\tfor(int j=1;j<=m;j++)\n\t\t\t\tscanf(\"%d\", &map[i][j]);\n\t\tDFS(1,1);\t\n\t}\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-ef701b1245294488a29c1d7609ccc901", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470149" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/18.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/18.exercises/config.json" new file mode 100644 index 000000000..2faf6dd69 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/18.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-c03b1ceef1b24852b191ba1208ae6903", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/18.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/18.exercises/solution.json" new file mode 100644 index 000000000..c30699076 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/18.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "ca3dd3d533904c13b864ed2bd73dbbe2", + "keywords": "桶排序,算法初阶,线性时间排序,排序和顺序统计量", + "title": "指针排序问题", + "desc": [ + { + "content": "\n

        输入10个数,按绝对值从大到小排序输出。\n输入形式:输入10个float实数\n输出形式:保留小数点后两位有效数字;输出从大到小排列\n

        ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \nvoid paixu(float *p,int n)\n{\n\tint i,j;\n\tfor (i = 0; i\n#include \nusing namespace std;\nvoid shuchu(char *a,int m, int n)\n{\n\tif(n<=0||m<=0||m>n)\n\t{\n\t\treturn;\n\t}\n\telse\n\t{\n\t\tcout << a[(m+n)/2];\n\t\tshuchu(a,m,(m+n)/2-1);\n\t\tshuchu(a,(m+n)/2+1,n);\n\t}\n}\nint main()\n{\n\tchar a[20000];\n\tchar b[20001];\n\tcin >> a;\n\tfor(int i=0; i<20000; i++)\n\t{\n\t\tb[i+1] = a[i];\n\t}\n\tint n = strlen(a);\n\tshuchu(b,1,n);\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-931e77e54385459da6bd004f6f13b187", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600469956" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/2.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/2.exercises/config.json" new file mode 100644 index 000000000..02798a802 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/2.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-11c2226bae91486682a9bd27df4047b5", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/2.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/2.exercises/solution.json" new file mode 100644 index 000000000..39a165986 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/2.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "44e3bbff868547b6b84567fefdd5bdae", + "keywords": "算法高阶,数论算法,算法问题选编,整数的因子分解", + "title": "约瑟夫问题", + "desc": [ + { + "content": "\n

        有n人(编号分别为1到n号)围成一圈,从第s人开始报数,报到第m的人出列,然后从出列的下一人重新开始报数,报到第m的人又出列,……,如此重复直到n-1全部出列,只剩最后一个人为止。求剩下的最后一人是谁?\n输入\n一行,三个整数n,m,s,(0<=n,m,s<=1000)意义如上。\n输出\n一行,一个正整数,表示最后剩下的人的编号。\n输入样例

        \n
        \n8 3 1
        \n

        输出样例

        \n
        \n7\n
        \n

        要求从第s个数开始,数m个出列,第s个不出列

        ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nvoid JosePhus(int n, int m, int start) {\n    int i, *arr = new int[n]; \n    int count = 1;; \n    for(i = 0;i < n; i++) \n        arr[i] = i + 1;\n    int sum = n;\n    while(count < n) { \n        start--; \n        int index = (start+m-1) % sum;\n        for(i = index; i < sum-1; i++)\n            arr[i] = arr[i+1]; \n        start = index + 1;\n        sum--;\n        count++;\n    }\n    std::cout<< arr[0] <<\"\\n\";\n}\nint main(int argc, const char * argv[]) {\n    int n, m, start; \n    std::cout << \"请输入n,m,start:\\n\";\n    while(std::cin >> n >> m >> start) {\n        JosePhus(n, m, start); \n        std::cout << \"请输入n,m,start:\\n\";\n    }\n    return 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-11c2226bae91486682a9bd27df4047b5", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600469969" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/20.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/20.exercises/config.json" new file mode 100644 index 000000000..02d648e71 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/20.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-12154716a86a4a3996629c7ffe33e922", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/20.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/20.exercises/solution.json" new file mode 100644 index 000000000..bfcf03238 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/20.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "9dace54a9e2647268c089328cbc0f352", + "keywords": "B树,算法高阶,高级数据结构,B树上的基本操作", + "title": "求解一元二次方程组根问题", + "desc": [ + { + "content": "\n
        利用公式x1 = (-b + sqrt(b*b-4*a*c))/(2*a), x2 = (-b - sqrt(b*b-4*a*c))/(2*a)求一元二次方程ax2 + bx + c =0 的根,其中a不等于0。\n输入一行,包含三个浮点数a, b, c(它们之间以一个空格分开),分别表示方程ax2 + bx + c =0 的系数。输出一行,表示方程的解。\n若两个实根相等,则输出形式为:x1=x2=...。\n若两个实根不等,则输出形式为:x1=...;x2 = ...,其中x1若是两个虚根,则输出:x1=实部+虚部i; x2=实部-虚部i,其中x1,x2满足以下两个条件中的一个:\n1. x1的实部大于x2的实部\n2. x1的实部等于x2的实部且x1的虚部大于等于x2的虚部\n所有实数部分要求精确到小数点后5位,数字、符号之间没有空格。\n样例输入:1.0 2.0 8.0\n样例输出:x1=-1.00000+2.64575i;x2=-1.00000-2.64575i
        ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include\n#include \n#include \nusing namespace std;\nstatic const double e = 1e-12;\nbool operator == (complex c1, complex c2) { return abs(c1-c2) < e;}\nint main()\n{\n\tcomplex a,b,c;\n\tcomplex x1,x2;\n\tcin >> a >> b >> c;\n\tx1 = (-b + sqrt(b*b-a*c*4.0))/(a*2.0);\n\tx2 = (-b - sqrt(b*b-a*c*4.0))/(a*2.0);\n\tcout << setiosflags(ios::fixed);\n\tcout.precision(6);\n\tif ( abs(x1.imag()) < e ) \n\t{\n\t\tif (x1 == x2) {\n\t\t\tcout << \"x1=x2=\" << x1.real();\n\t\t} else {\n\t\t\tcout << \"x1=\" << x1.real() <<\";x2=\" << x1.real();\n\t\t}\n\t}\n\telse {\n\t\tcout << \"x1=\" << x1.real()<<\"+\"<编写一个程序,通过填充空格来解决数独问题。

        \n

        数独的解法需 遵循如下规则

        \n
          \n
        1. 数字 1-9 在每一行只能出现一次。
        2. \n
        3. 数字 1-9 在每一列只能出现一次。
        4. \n
        5. 数字 1-9 在每一个以粗实线分隔的 3x3 宫内只能出现一次。(请参考示例图)
        6. \n
        \n

        数独部分空格内已填入了数字,空白格用 '.' 表示。

        \n

         

        \n
        \n
        \n
        \n

        示例:

        \n
        输入:board = \n[[\"5\",\"3\",\".\",\".\",\"7\",\".\",\".\",\".\",\".\"],\n[\"6\",\".\",\".\",\"1\",\"9\",\"5\",\".\",\".\",\".\"],\n[\".\",\"9\",\"8\",\".\",\".\",\".\",\".\",\"6\",\".\"],\n[\"8\",\".\",\".\",\".\",\"6\",\".\",\".\",\".\",\"3\"],\n[\"4\",\".\",\".\",\"8\",\".\",\"3\",\".\",\".\",\"1\"],\n[\"7\",\".\",\".\",\".\",\"2\",\".\",\".\",\".\",\"6\"],\n[\".\",\"6\",\".\",\".\",\".\",\".\",\"2\",\"8\",\".\"],\n[\".\",\".\",\".\",\"4\",\"1\",\"9\",\".\",\".\",\"5\"],\n[\".\",\".\",\".\",\".\",\"8\",\".\",\".\",\"7\",\"9\"]]\n输出:\n[[\"5\",\"3\",\"4\",\"6\",\"7\",\"8\",\"9\",\"1\",\"2\"],\n[\"6\",\"7\",\"2\",\"1\",\"9\",\"5\",\"3\",\"4\",\"8\"],\n[\"1\",\"9\",\"8\",\"3\",\"4\",\"2\",\"5\",\"6\",\"7\"],\n[\"8\",\"5\",\"9\",\"7\",\"6\",\"1\",\"4\",\"2\",\"3\"],\n[\"4\",\"2\",\"6\",\"8\",\"5\",\"3\",\"7\",\"9\",\"1\"],\n[\"7\",\"1\",\"3\",\"9\",\"2\",\"4\",\"8\",\"5\",\"6\"],\n[\"9\",\"6\",\"1\",\"5\",\"3\",\"7\",\"2\",\"8\",\"4\"],\n[\"2\",\"8\",\"7\",\"4\",\"1\",\"9\",\"6\",\"3\",\"5\"],\n[\"3\",\"4\",\"5\",\"2\",\"8\",\"6\",\"1\",\"7\",\"9\"]]\n解释:输入的数独如上图所示,唯一有效的解决方案如下所示:\n

         

        \n
        \n", + "language": "markdown" + }, + { + "content": "\n

         

        \n

        提示:

        \n
          \n
        • board.length == 9
        • \n
        • board[i].length == 9
        • \n
        • board[i][j] 是一位数字或者 '.'
        • \n
        • 题目数据 保证 输入数独仅有一个解
        • \n
        \n
        \n
        \n
        ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nclass Solution\n{\npublic:\n\tvoid solveSudoku(vector> &board)\n\t{\n\t\tint size = board.size();\n\t\tvector> rows(size, vector(10));\n\t\tvector> cols(size, vector(10));\n\t\tvector> boxes(size, vector(10));\n\t\tfor (int i = 0; i < size; i++)\n\t\t{\n\t\t\tfor (int j = 0; j < size; j++)\n\t\t\t{\n\t\t\t\tif (board[i][j] != '.')\n\t\t\t\t{\n\t\t\t\t\tint num = board[i][j] - '0';\n\t\t\t\t\tint idx = i / 3 * 3 + j / 3;\n\t\t\t\t\trows[i][num] = true;\n\t\t\t\t\tcols[j][num] = true;\n\t\t\t\t\tboxes[idx][num] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tdfs(board, 0, rows, cols, boxes);\n\t}\nprivate:\n\tbool valid(int num, int row, int col, int idx, vector> &rows,\n\t\t\t vector> &cols, vector> &boxes)\n\t{\n\t\treturn !rows[row][num] && !cols[col][num] && !boxes[idx][num];\n\t}\n\tbool dfs(vector> &board, int size, vector> &rows,\n\t\t\t vector> &cols, vector> &boxes)\n\t{\n\t\tif (size == 9 * 9)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tbool ok = false;\n\t\t\tint row = size / 9;\n\t\t\tint col = size % 9;\n\t\t\tint idx = row / 3 * 3 + col / 3;\n\t\t\tif (board[row][col] == '.')\n\t\t\t{\n\t\t\t\tfor (int i = 1; i <= 9; i++)\n\t\t\t\t{\n\t\t\t\t\tif (valid(i, row, col, idx, rows, cols, boxes))\n\t\t\t\t\t{\n\t\t\t\t\t\tboard[row][col] = i + '0';\n\t\t\t\t\t\trows[row][i] = true;\n\t\t\t\t\t\tcols[col][i] = true;\n\t\t\t\t\t\tboxes[idx][i] = true;\n\t\t\t\t\t\tok = dfs(board, size + 1, rows, cols, boxes);\n\t\t\t\t\t\tif (!ok)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\trows[row][i] = false;\n\t\t\t\t\t\t\tcols[col][i] = false;\n\t\t\t\t\t\t\tboxes[idx][i] = false;\n\t\t\t\t\t\t\tboard[row][col] = '.';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tok = dfs(board, size + 1, rows, cols, boxes);\n\t\t\t}\n\t\t\treturn ok;\n\t\t}\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-6c1fc61550b048c696cf72b285cbca33", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470827" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/22.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/22.exercises/config.json" new file mode 100644 index 000000000..49e7fa423 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/22.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-379fe0110ce244ed9109860976c01206", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/22.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/22.exercises/solution.json" new file mode 100644 index 000000000..c3506b00a --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/22.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "b0bdaa3932ce4195b936e641c3f715fe", + "keywords": "栈,数组,双指针,动态规划,单调栈", + "title": "接雨水", + "desc": [ + { + "content": "\n

        给定 n 个非负整数表示每个宽度为 1 的柱子的高度图,计算按此排列的柱子,下雨之后能接多少雨水。

         

        示例 1:

        输入:height = [0,1,0,2,1,0,1,3,2,1,2,1]
        输出:
        6
        解释:
        上面是由数组 [0,1,0,2,1,0,1,3,2,1,2,1] 表示的高度图,在这种情况下,可以接 6 个单位的雨水(蓝色部分表示雨水)。

        示例 2:

        输入:height = [4,2,0,3,2,5]
        输出:
        9

         

        提示:

          \t
        • n == height.length
        • \t
        • 0 <= n <= 3 * 104
        • \t
        • 0 <= height[i] <= 105
        ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nclass Solution\n{\npublic:\n\tint trap(vector &height)\n\t{\n\t\tint res = 0;\n\t\tint left = 0, left_max = 0;\n\t\tint right = height.size() - 1, right_max = 0;\n\t\twhile (left < right)\n\t\t{\n\t\t\tif (height[left] < height[right])\n\t\t\t{\n\t\t\t\tif (height[left] > left_max)\n\t\t\t\t{\n\t\t\t\t\tleft_max = height[left];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tres += left_max - height[left];\n\t\t\t\t}\n\t\t\t\tleft++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (height[right] > right_max)\n\t\t\t\t{\n\t\t\t\t\tright_max = height[right];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tres += right_max - height[right];\n\t\t\t\t}\n\t\t\t\tright--;\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-379fe0110ce244ed9109860976c01206", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470120" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/23.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/23.exercises/config.json" new file mode 100644 index 000000000..85eabd7ca --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/23.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-71a29d2d4ba84ef5862dbcd1547a8d0c", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/23.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/23.exercises/solution.json" new file mode 100644 index 000000000..474b4e3f2 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/23.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "cb77daf1d0f443c092f414b87f37be04", + "keywords": "栈,数组,单调栈", + "title": "柱状图中最大的矩形", + "desc": [ + { + "content": "\n

        给定 n 个非负整数,用来表示柱状图中各个柱子的高度。每个柱子彼此相邻,且宽度为 1 。

        求在该柱状图中,能够勾勒出来的矩形的最大面积。

         

        以上是柱状图的示例,其中每个柱子的宽度为 1,给定的高度为 [2,1,5,6,2,3]

         

        图中阴影部分为所能勾勒出的最大矩形面积,其面积为 10 个单位。

         

        示例:

        输入: [2,1,5,6,2,3]
        输出:
        10
        ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \nstatic int largestRectangleArea(int *heights, int heightsSize)\n{\n\tint *indexes = malloc(heightsSize * sizeof(int));\n\tint *left = malloc(heightsSize * sizeof(int));\n\tint *right = malloc(heightsSize * sizeof(int));\n\tint i, pos = 0;\n\tfor (i = 0; i < heightsSize; i++)\n\t{\n\t\twhile (pos > 0 && heights[indexes[pos - 1]] >= heights[i])\n\t\t{\n\t\t\tpos--;\n\t\t}\n\t\tleft[i] = pos == 0 ? -1 : indexes[pos - 1];\n\t\tindexes[pos++] = i;\n\t}\n\tpos = 0;\n\tfor (i = heightsSize - 1; i >= 0; i--)\n\t{\n\t\twhile (pos > 0 && heights[indexes[pos - 1]] >= heights[i])\n\t\t{\n\t\t\tpos--;\n\t\t}\n\t\tright[i] = pos == 0 ? heightsSize : indexes[pos - 1];\n\t\tindexes[pos++] = i;\n\t}\n\tint max_area = 0;\n\tfor (i = 0; i < heightsSize; i++)\n\t{\n\t\tint area = heights[i] * (right[i] - left[i] - 1);\n\t\tmax_area = area > max_area ? area : max_area;\n\t}\n\treturn max_area;\n}\nint main(void)\n{\n\tint nums[] = {2, 1, 5, 6, 2, 3};\n\tint count = sizeof(nums) / sizeof(*nums);\n\tprintf(\"%d\\n\", largestRectangleArea(nums, count));\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-71a29d2d4ba84ef5862dbcd1547a8d0c", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600471006" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/24.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/24.exercises/config.json" new file mode 100644 index 000000000..99abea1a7 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/24.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-ec2dc76044e44a3ca30eabe97355ea63", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/24.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/24.exercises/solution.json" new file mode 100644 index 000000000..368483e46 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/24.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "64b7d91db75249b2b9952b7c85e8b362", + "keywords": "数组,哈希表", + "title": "缺失的第一个正数", + "desc": [ + { + "content": "\n

        给你一个未排序的整数数组 nums ,请你找出其中没有出现的最小的正整数。

         

        进阶:你可以实现时间复杂度为 O(n) 并且只使用常数级别额外空间的解决方案吗?

         

        示例 1:

        输入:nums = [1,2,0]
        输出:
        3

        示例 2:

        输入:nums = [3,4,-1,1]
        输出:
        2

        示例 3:

        输入:nums = [7,8,9,11,12]
        输出:
        1

         

        提示:

          \t
        • 0 <= nums.length <= 300
        • \t
        • -231 <= nums[i] <= 231 - 1
        ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nclass Solution\n{\npublic:\n\tint firstMissingPositive(vector &nums)\n\t{\n\t\tif (nums.size() == 0)\n\t\t{\n\t\t\treturn 1;\n\t\t}\n\t\tint i = 0;\n\t\twhile (i < nums.size())\n\t\t{\n\t\t\tif (nums[i] > 0 && nums[i] != i + 1 && nums[i] - 1 < nums.size() && nums[nums[i] - 1] != nums[i])\n\t\t\t{\n\t\t\t\tswap(nums[i], nums[nums[i] - 1]);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\tfor (i = 0; i < nums.size(); i++)\n\t\t{\n\t\t\tif (nums[i] != i + 1)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn i + 1;\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-ec2dc76044e44a3ca30eabe97355ea63", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470223" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/25.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/25.exercises/config.json" new file mode 100644 index 000000000..f29c0a973 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/25.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-4522f669896d4e32bae4b5a741d160ad", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/25.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/25.exercises/solution.json" new file mode 100644 index 000000000..0c85a587d --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/25.exercises/solution.json" @@ -0,0 +1,80 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "3716ea4367754f8f959faa56b01429e1", + "keywords": "回溯", + "title": "N皇后 II", + "desc": [ + { + "content": "\n
        \n

        n 皇后问题 研究的是如何将 n 个皇后放置在 n×n 的棋盘上,并且使皇后彼此之间不能相互攻击。

        ", + "language": "markdown" + }, + { + "content": "\n

        给你一个整数 n ,返回 n 皇后问题 不同的解决方案的数量。

        ", + "language": "markdown" + }, + { + "content": "\n

         

        ", + "language": "markdown" + }, + { + "content": "\n
        \n
        \n

        示例 1:

        \n\n
        输入:n = 4\n输出:2\n解释:如上图所示,4 皇后问题存在两个不同的解法。\n
        ", + "language": "markdown" + }, + { + "content": "\n

        示例 2:

        ", + "language": "markdown" + }, + { + "content": "\n
        输入:n = 1\n输出:1\n
        ", + "language": "markdown" + }, + { + "content": "\n

         

        ", + "language": "markdown" + }, + { + "content": "\n

        提示:

        ", + "language": "markdown" + }, + { + "content": "\n
          \n
        • 1 <= n <= 9
        • \n
        • 皇后彼此不能相互攻击,也就是说:任何两个皇后都不能处于同一条横行、纵行或斜线上。
        • \n
        \n
        \n
        \n
        ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nclass Solution\n{\npublic:\n\tint totalNQueens(int n)\n\t{\n\t\tvector stack(n);\n\t\treturn dfs(n, 0, stack);\n\t}\nprivate:\n\tint dfs(int n, int row, vector &stack)\n\t{\n\t\tint count = 0;\n\t\tif (row == n)\n\t\t{\n\t\t\treturn count + 1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t{\n\t\t\t\tif (row == 0 || !conflict(stack, row, i))\n\t\t\t\t{\n\t\t\t\t\tstack[row] = i;\n\t\t\t\t\tcount += dfs(n, row + 1, stack);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn count;\n\t\t}\n\t}\n\tbool conflict(vector &stack, int row, int col)\n\t{\n\t\tfor (int i = 0; i < row; i++)\n\t\t{\n\t\t\tif (col == stack[i] || abs(row - i) == abs(col - stack[i]))\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n}", + "language": "cpp" + }, + "node_id": "dailycode-4522f669896d4e32bae4b5a741d160ad", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470922" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/26.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/26.exercises/config.json" new file mode 100644 index 000000000..cf9e79fb7 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/26.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-569fed9589644294ae5ef549b7babf31", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/26.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/26.exercises/solution.json" new file mode 100644 index 000000000..d99290ff5 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/26.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "1dfcbc2e42034d68a9cb9bca18c32f96", + "keywords": "栈,数组,动态规划,矩阵,单调栈", + "title": "最大矩形", + "desc": [ + { + "content": "\n

        给定一个仅包含 01 、大小为 rows x cols 的二维二进制矩阵,找出只包含 1 的最大矩形,并返回其面积。

         

        示例 1:

        \"\"
        输入:matrix = [[\"1\",\"0\",\"1\",\"0\",\"0\"],[\"1\",\"0\",\"1\",\"1\",\"1\"],[\"1\",\"1\",\"1\",\"1\",\"1\"],[\"1\",\"0\",\"0\",\"1\",\"0\"]]
        输出:
        6
        解释:
        最大矩形如上图所示。

        示例 2:

        输入:matrix = []
        输出:
        0

        示例 3:

        输入:matrix = [[\"0\"]]
        输出:
        0

        示例 4:

        输入:matrix = [[\"1\"]]
        输出:
        1

        示例 5:

        输入:matrix = [[\"0\",\"0\"]]
        输出:
        0

         

        提示:

          \t
        • rows == matrix.length
        • \t
        • cols == matrix[0].length
        • \t
        • 0 <= row, cols <= 200
        • \t
        • matrix[i][j]'0''1'
        ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \n#include \n#include \nstatic inline int max(int a, int b)\n{\n\treturn a > b ? a : b;\n}\nstatic int area_calc(int *heights, int size)\n{\n\tint *indexes = malloc(size * sizeof(int));\n\tint *lhist = malloc(size * sizeof(int));\n\tint *rhist = malloc(size * sizeof(int));\n\tint i, pos = 0;\n\tfor (i = 0; i < size; i++)\n\t{\n\t\twhile (pos > 0 && heights[indexes[pos - 1]] >= heights[i])\n\t\t{\n\t\t\tpos--;\n\t\t}\n\t\tlhist[i] = pos == 0 ? -1 : indexes[pos - 1];\n\t\tindexes[pos++] = i;\n\t}\n\tpos = 0;\n\tfor (i = size - 1; i >= 0; i--)\n\t{\n\t\twhile (pos > 0 && heights[indexes[pos - 1]] >= heights[i])\n\t\t{\n\t\t\tpos--;\n\t\t}\n\t\trhist[i] = pos == 0 ? size : indexes[pos - 1];\n\t\tindexes[pos++] = i;\n\t}\n\tint max_area = 0;\n\tfor (i = 0; i < size; i++)\n\t{\n\t\tint area = heights[i] * (rhist[i] - lhist[i] - 1);\n\t\tmax_area = max(area, max_area);\n\t}\n\treturn max_area;\n}\nstatic int maximalRectangle(char **matrix, int matrixRowSize, int matrixColSize)\n{\n\tint i, j, max_area = 0;\n\tint *heights = malloc(matrixColSize * sizeof(int));\n\tmemset(heights, 0, matrixColSize * sizeof(int));\n\tfor (i = 0; i < matrixRowSize; i++)\n\t{\n\t\tfor (j = 0; j < matrixColSize; j++)\n\t\t{\n\t\t\theights[j] = matrix[i][j] == '1' ? heights[j] + 1 : 0;\n\t\t}\n\t\tmax_area = max(max_area, area_calc(heights, matrixColSize));\n\t}\n\treturn max_area;\n}\nint main(int argc, char **argv)\n{\n\tif (argc < 2)\n\t{\n\t\tfprintf(stderr, \"Usage: ./test row1 row2...\\n\");\n\t\texit(-1);\n\t}\n\tint i, j;\n\tint row_size = argc - 1;\n\tint col_size = strlen(argv[1]);\n\tfor (i = 0; i < row_size; i++)\n\t{\n\t\tprintf(\"%s\\n\", argv[i + 1]);\n\t}\n\tprintf(\"%d\\n\", maximalRectangle(argv + 1, argc - 1, strlen(argv[1])));\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-569fed9589644294ae5ef549b7babf31", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470828" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/27.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/27.exercises/config.json" new file mode 100644 index 000000000..ce1ebbd30 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/27.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-9f07bfe91c6f4ca484f92a7a49912a66", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/27.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/27.exercises/solution.json" new file mode 100644 index 000000000..07d4c3796 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/27.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "9da825dca95641ec9169bf3ab57db40b", + "keywords": "字符串,动态规划", + "title": "编辑距离", + "desc": [ + { + "content": "\n

        给你两个单词 word1 和 word2,请你计算出将 word1 转换成 word2 所使用的最少操作数 。

        你可以对一个单词进行如下三种操作:

          \t
        • 插入一个字符
        • \t
        • 删除一个字符
        • \t
        • 替换一个字符

         

        示例 1:

        输入:word1 = \"horse\", word2 = \"ros\"
        输出:
        3
        解释:
        horse -> rorse (将 'h' 替换为 'r')rorse -> rose (删除 'r')rose -> ros (删除 'e')

        示例 2:

        输入:word1 = \"intention\", word2 = \"execution\"
        输出:
        5
        解释:
        intention -> inention (删除 't')inention -> enention (将 'i' 替换为 'e')enention -> exention (将 'n' 替换为 'x')exention -> exection (将 'n' 替换为 'c')exection -> execution (插入 'u')

         

        提示:

          \t
        • 0 <= word1.length, word2.length <= 500
        • \t
        • word1word2 由小写英文字母组成
        ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nclass Solution\n{\npublic:\n\tint minDistance(string word1, string word2)\n\t{\n\t\tint l1 = word1.length();\n\t\tint l2 = word2.length();\n\t\tvector dp(l2 + 1);\n\t\tfor (int i = 0; i <= l2; i++)\n\t\t{\n\t\t\tdp[i] = i;\n\t\t}\n\t\tint up = 0;\n\t\tfor (int i = 1; i <= l1; i++)\n\t\t{\n\t\t\tint left_up = dp[0];\n\t\t\tdp[0] = i;\n\t\t\tfor (int j = 1; j <= l2; j++)\n\t\t\t{\n\t\t\t\tup = dp[j];\n\t\t\t\tif (word1[i - 1] == word2[j - 1])\n\t\t\t\t{\n\t\t\t\t\tdp[j] = left_up;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tdp[j] = 1 + min(left_up, min(up, dp[j - 1]));\n\t\t\t\t}\n\t\t\t\tleft_up = up;\n\t\t\t}\n\t\t}\n\t\treturn dp[l2];\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-9f07bfe91c6f4ca484f92a7a49912a66", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470829" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/28.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/28.exercises/config.json" new file mode 100644 index 000000000..ece3bd089 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/28.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-b7c191c627974320b5a16024eb016358", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/28.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/28.exercises/solution.json" new file mode 100644 index 000000000..93e3b98a5 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/28.exercises/solution.json" @@ -0,0 +1,92 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "00593f4b57704a038b0429d5fe708031", + "keywords": "字符串,模拟", + "title": "文本左右对齐", + "desc": [ + { + "content": "\n
        \n

        给定一个单词数组和一个长度 maxWidth,重新排版单词,使其成为每行恰好有 maxWidth 个字符,且左右两端对齐的文本。

        ", + "language": "markdown" + }, + { + "content": "\n

        你应该使用“贪心算法”来放置给定的单词;也就是说,尽可能多地往每行中放置单词。必要时可用空格 ' ' 填充,使得每行恰好有 maxWidth 个字符。\n

        ", + "language": "markdown" + }, + { + "content": "\n

        要求尽可能均匀分配单词间的空格数量。如果某一行单词间的空格不能均匀分配,则左侧放置的空格数要多于右侧的空格数。

        ", + "language": "markdown" + }, + { + "content": "\n

        文本的最后一行应为左对齐,且单词之间不插入额外的空格。

        ", + "language": "markdown" + }, + { + "content": "\n

        说明:

        ", + "language": "markdown" + }, + { + "content": "\n
          \n
        • 单词是指由非空格字符组成的字符序列。
        • \n
        • 每个单词的长度大于 0,小于等于 maxWidth
        • \n
        • 输入单词数组 words 至少包含一个单词。
        • \n
        ", + "language": "markdown" + }, + { + "content": "\n

        示例:

        ", + "language": "markdown" + }, + { + "content": "\n
        输入:\nwords = [\"This\", \"is\", \"an\", \"example\", \"of\", \"text\", \"justification.\"]\nmaxWidth = 16\n输出:\n[\n   \"This    is    an\",\n   \"example  of text\",\n   \"justification.  \"\n]\n
        ", + "language": "markdown" + }, + { + "content": "\n

        示例 2:

        ", + "language": "markdown" + }, + { + "content": "\n
        输入:\nwords = [\"What\",\"must\",\"be\",\"acknowledgment\",\"shall\",\"be\"]\nmaxWidth = 16\n输出:\n[\n  \"What   must   be\",\n  \"acknowledgment  \",\n  \"shall be        \"\n]\n解释: 注意最后一行的格式应为 \"shall be    \" 而不是 \"shall     be\"\n因为最后一行应为左对齐,而不是左右两端对齐,第二行同样为左对齐,这是因为这行只包含一个单词。\n
        ", + "language": "markdown" + }, + { + "content": "\n

        示例 3:

        ", + "language": "markdown" + }, + { + "content": "\n
        输入:\nwords = [\"Science\",\"is\",\"what\",\"we\",\"understand\",\"well\",\"enough\",\"to\",\"explain\",\n         \"to\",\"a\",\"computer.\",\"Art\",\"is\",\"everything\",\"else\",\"we\",\"do\"]\nmaxWidth = 20\n输出:\n[\n  \"Science  is  what we\",\n\"understand      well\",\n  \"enough to explain to\",\n  \"a  computer.  Art is\",\n  \"everything  else  we\",\n  \"do                  \"\n]\n
        \n
        ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \n#include \nstatic void line_fill(char *line, int len, char **words, int *word_lens, int max_size,\n\t\t\t\t\t int even_spaces, int remain_spaces, int start, int end)\n{\n\tint i, j;\n\tchar *p = line;\n\tfor (i = start; i < end; i++)\n\t{\n\t\tmemcpy(p, words[i], word_lens[i]);\n\t\tp += word_lens[i];\n\t\tif (i < end - 1)\n\t\t{\n\t\t\tfor (j = 0; j < even_spaces; j++)\n\t\t\t{\n\t\t\t\t*p++ = ' ';\n\t\t\t}\n\t\t\tif (remain_spaces > 0)\n\t\t\t{\n\t\t\t\t*p++ = ' ';\n\t\t\t\tremain_spaces--;\n\t\t\t}\n\t\t}\n\t}\n\twhile (p - line < max_size)\n\t{\n\t\t*p++ = ' ';\n\t}\n\t*p++ = '\\0';\n}\nstatic char **fullJustify(char **words, int wordsSize, int maxWidth, int *returnSize)\n{\n\tint i, j, k, cap = 100, count = 0;\n\tchar **lines = malloc(cap * sizeof(char *));\n\tchar *buf = malloc(cap * (maxWidth + 1));\n\tfor (i = 0; i < cap; i++)\n\t{\n\t\tlines[i] = buf + i * (maxWidth + 1);\n\t}\n\tint *word_lens = malloc(wordsSize * sizeof(int));\n\tfor (i = 0; i < wordsSize; i++)\n\t{\n\t\tword_lens[i] = strlen(words[i]);\n\t}\n\tint wc = 0;\n\tint len = 0;\n\tint start = 0;\n\tint chars = 0;\n\tfor (i = 0, j = 0; i < wordsSize; i++)\n\t{\n\t\tif (len + word_lens[i] > maxWidth)\n\t\t{\n\t\t\tint even_spaces = wc == 1 ? 0 : (maxWidth - chars) / (wc - 1);\n\t\t\tint remain_spaces = wc == 1 ? 0 : (maxWidth - chars) % (wc - 1);\n\t\t\tline_fill(lines[count], len, words, word_lens, maxWidth, even_spaces, remain_spaces, start, i);\n\t\t\tcount++;\n\t\t\twc = 1;\n\t\t\tlen = word_lens[i] + 1;\n\t\t\tchars = word_lens[i];\n\t\t\tstart = i;\n\t\t}\n\t\telse if (len + word_lens[i] == maxWidth)\n\t\t{\n\t\t\tchars += word_lens[i];\n\t\t\tint even_spaces = wc == 0 ? 0 : (maxWidth - chars) / wc;\n\t\t\tint remain_spaces = wc == 0 ? 0 : (maxWidth - chars) % wc;\n\t\t\tline_fill(lines[count], len, words, word_lens, maxWidth, even_spaces, remain_spaces, start, i + 1);\n\t\t\tcount++;\n\t\t\twc = 0;\n\t\t\tlen = 0;\n\t\t\tchars = 0;\n\t\t\tstart = i + 1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tchars += word_lens[i];\n\t\t\tlen += word_lens[i] + 1;\n\t\t\twc++;\n\t\t}\n\t}\n\tif (wc > 0)\n\t{\n\t\tchar *p = lines[count];\n\t\tfor (i = start; i < start + wc; i++)\n\t\t{\n\t\t\tmemcpy(p, words[i], word_lens[i]);\n\t\t\tp += word_lens[i];\n\t\t\tif (i < start + wc - 1)\n\t\t\t{\n\t\t\t\t*p++ = ' ';\n\t\t\t}\n\t\t}\n\t\twhile (p - lines[count] < maxWidth)\n\t\t{\n\t\t\t*p++ = ' ';\n\t\t}\n\t\t*p++ = '\\0';\n\t\tcount++;\n\t}\n\t*returnSize = count;\n\treturn lines;\n}\nint main(int argc, char **argv)\n{\n\tif (argc <= 2)\n\t{\n\t\tfprintf(stderr, \"Usage: ./test maxsize words...\\n\");\n\t\texit(-1);\n\t}\n\tint i, count;\n\tchar **lines = fullJustify(argv + 2, argc - 2, atoi(argv[1]), &count);\n\tfor (i = 0; i < count; i++)\n\t{\n\t\tprintf(\"%s\\n\", lines[i]);\n\t}\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-b7c191c627974320b5a16024eb016358", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470798" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/29.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/29.exercises/config.json" new file mode 100644 index 000000000..32ff74158 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/29.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-a1becf27311a4e77a4c9cc59c8847eef", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/29.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/29.exercises/solution.json" new file mode 100644 index 000000000..63e2dfb98 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/29.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "328698d1b0f24616a305fb22259b2146", + "keywords": "栈,字符串,动态规划", + "title": "最长有效括号", + "desc": [ + { + "content": "\n

        给你一个只包含 '(' 和 ')' 的字符串,找出最长有效(格式正确且连续)括号子串的长度。

         

        示例 1:

        输入:s = \"(()\"
        输出:
        2
        解释:
        最长有效括号子串是 \"()\"

        示例 2:

        输入:s = \")()())\"
        输出:
        4
        解释:
        最长有效括号子串是 \"()()\"

        示例 3:

        输入:s = \"\"
        输出:
        0

         

        提示:

          \t
        • 0 <= s.length <= 3 * 104
        • \t
        • s[i]'('')'
        ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nclass Solution\n{\npublic:\n\tint longestValidParentheses(string s)\n\t{\n\t\tstack stk;\n\t\tint invalid = -1;\n\t\tint len = 0, max_len = 0;\n\t\tfor (int i = 0; i < s.length(); i++)\n\t\t{\n\t\t\tif (s[i] == '(')\n\t\t\t{\n\t\t\t\tstk.push(i);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (stk.empty())\n\t\t\t\t{\n\t\t\t\t\tinvalid = i;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tstk.pop();\n\t\t\t\t\tif (stk.empty())\n\t\t\t\t\t{\n\t\t\t\t\t\tmax_len = max(i - invalid, max_len);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tmax_len = max(i - stk.top(), max_len);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn max_len;\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-a1becf27311a4e77a4c9cc59c8847eef", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600471008" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/3.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/3.exercises/config.json" new file mode 100644 index 000000000..1a0bb4a7d --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/3.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-f77c8eab81bd4f33b5a86ef896683c1a", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/3.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/3.exercises/solution.json" new file mode 100644 index 000000000..c6c7f89be --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/3.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "7cde4f4717e94c5bbf58bfa899802561", + "keywords": "算法初阶,排序和顺序统计量,中位数和顺序统计量,最坏情况为线性时间的选择算法", + "title": "海港(port)", + "desc": [ + { + "content": "\n海港(port)\n【问题描述】\n小谢是海港的海关工作人员,每天都有许多船只到达海港,船上通常有很多来自不同国家的乘客。\n小谢对这些到达海港的船只非常感兴趣,他按照时间记录下了到达海港的每一艘船只情况;对于第i艘到达的船,他记录了这艘船只到达的时间ti(单位:秒),船上的乘客数量Ki,以及每名乘客的国籍x(i,1),x(i,2),···,x(i,k)。\n小谢统计了n艘船的信息,希望你帮忙计算出以每一艘船到达时间为止的24小时(24小时=86400秒)内所有乘船到达的乘客来自多少个不同的国家。\n形式化的讲,你需要计算n条信息。对于输出的第i条信息,你需要统计满足:ti-86400=1,∑ki<=3×105,1<=x(i,j)<=105,1<=ti-1\n#include \n#include \n#include \n#include \n#include \nusing namespace std;\nint a[100100];\nint people[500100];\nstruct node{\n\tint country;\n\tint time;\n};\nqueueq;\nint main(){\n\tint n,sum=0;\n\tscanf(\"%d\",&n);\n\tfor(int i=1;i<=n;i++){\n\t\tint t,p;\n\t\tscanf(\"%d%d\",&t,&p);\n\t\tnode temp;\n\t\ttemp.time=t;\n\t\tfor(int i=1;i<=p;i++){\n\t\t\tint cty;\n\t\t\tscanf(\"%d\",&cty);\n\t\t\ttemp.country=cty;\n\t\t\tq.push(temp);\n\t\t\tif(!people[cty]) sum++;\n\t\t\tpeople[cty]++;\n\t\t}\n\t\twhile(1){\n\t\t\tnode old;\n\t\t\told=q.front();\n\t\t\tif(temp.time-86400>=old.time)\n\t\t\t{\n\t\t\t\tint tc=old.country;\n\t\t\t\tpeople[tc]--;\n\t\t\t\tif(!people[tc]) sum--;\n\t\t\t\tq.pop();\n\t\t\t}\n\t\t\telse break; \n\t\t}\n\t\tcout<n 皇后问题 研究的是如何将 n 个皇后放置在 n×n 的棋盘上,并且使皇后彼此之间不能相互攻击。

        给你一个整数 n ,返回所有不同的 n 皇后问题 的解决方案。

        每一种解法包含一个不同的 n 皇后问题 的棋子放置方案,该方案中 'Q''.' 分别代表了皇后和空位。

         

        示例 1:

        \"\"
        输入:n = 4
        输出:
        [[\".Q..\",\"...Q\",\"Q...\",\"..Q.\"],[\"..Q.\",\"Q...\",\"...Q\",\".Q..\"]]
        解释:
        如上图所示,4 皇后问题存在两个不同的解法。

        示例 2:

        输入:n = 1
        输出:
        [[\"Q\"]]

         

        提示:

          \t
        • 1 <= n <= 9
        • \t
        • 皇后彼此不能相互攻击,也就是说:任何两个皇后都不能处于同一条横行、纵行或斜线上。
        ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nclass Solution\n{\npublic:\n\tvector> solveNQueens(int n)\n\t{\n\t\tvector> res;\n\t\tvector stack(n);\n\t\tvector solution(n, string(n, '.'));\n\t\tdfs(n, 0, stack, solution, res);\n\t\treturn res;\n\t}\nprivate:\n\tvoid dfs(int n, int row, vector &stack, vector &solution, vector> &res)\n\t{\n\t\tif (row == n)\n\t\t{\n\t\t\tres.push_back(solution);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t{\n\t\t\t\tif (row == 0 || !conflict(stack, row, i))\n\t\t\t\t{\n\t\t\t\t\tsolution[row][i] = 'Q';\n\t\t\t\t\tstack[row] = i;\n\t\t\t\t\tdfs(n, row + 1, stack, solution, res);\n\t\t\t\t\tsolution[row][i] = '.';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tbool conflict(vector &stack, int row, int col)\n\t{\n\t\tfor (int i = 0; i < row; i++)\n\t\t{\n\t\t\tif (col == stack[i] || abs(row - i) == abs(col - stack[i]))\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n}", + "language": "cpp" + }, + "node_id": "dailycode-4cfdb4abcc864c1ba3c3b08cc1884f6b", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470831" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/31.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/31.exercises/config.json" new file mode 100644 index 000000000..2fad66bbc --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/31.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-9c4fc46e655e473c8b1fa86ebaa44589", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/31.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/31.exercises/solution.json" new file mode 100644 index 000000000..24eced9c9 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/31.exercises/solution.json" @@ -0,0 +1,92 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "2d7f231378534510913c1295c153334a", + "keywords": "字符串,动态规划", + "title": "扰乱字符串", + "desc": [ + { + "content": "\n
        使用下面描述的算法可以扰乱字符串 s 得到字符串 t :\n
          \n
        1. 如果字符串的长度为 1 ,算法停止
        2. \n
        3. 如果字符串的长度 > 1 ,执行下述步骤:\n
            \n
          • 在一个随机下标处将字符串分割成两个非空的子字符串。即,如果已知字符串 s ,则可以将其分成两个子字符串 xy\n,且满足 s = x + y
          • \n
          • 随机 决定是要「交换两个子字符串」还是要「保持这两个子字符串的顺序不变」。即,在执行这一步骤之后,s 可能是\ns = x + y 或者 s = y + x 。\n
          • \n
          • xy 这两个子字符串上继续从步骤 1 开始递归执行此算法。
          • \n
          \n
        4. \n
        ", + "language": "markdown" + }, + { + "content": "\n

        给你两个 长度相等 的字符串 s1\n和 s2,判断 s2 是否是 s1 的扰乱字符串。如果是,返回\ntrue ;否则,返回 false 。\n

        ", + "language": "markdown" + }, + { + "content": "\n

         

        ", + "language": "markdown" + }, + { + "content": "\n

        示例 1:

        ", + "language": "markdown" + }, + { + "content": "\n
        输入:s1 = \"great\", s2 = \"rgeat\"\n输出:true\n解释:s1 上可能发生的一种情形是:\n\"great\" --> \"gr/eat\" // 在一个随机下标处分割得到两个子字符串\n\"gr/eat\" --> \"gr/eat\" // 随机决定:「保持这两个子字符串的顺序不变」\n\"gr/eat\" --> \"g/r / e/at\" // 在子字符串上递归执行此算法。两个子字符串分别在随机下标处进行一轮分割\n\"g/r / e/at\" --> \"r/g / e/at\" // 随机决定:第一组「交换两个子字符串」,第二组「保持这两个子字符串的顺序不变」\n\"r/g / e/at\" --> \"r/g / e/ a/t\" // 继续递归执行此算法,将 \"at\" 分割得到 \"a/t\"\n\"r/g / e/ a/t\" --> \"r/g / e/ a/t\" // 随机决定:「保持这两个子字符串的顺序不变」\n算法终止,结果字符串和 s2 相同,都是 \"rgeat\"\n这是一种能够扰乱 s1 得到 s2 的情形,可以认为 s2 是 s1 的扰乱字符串,返回 true\n
        ", + "language": "markdown" + }, + { + "content": "\n

        示例 2:

        ", + "language": "markdown" + }, + { + "content": "\n
        输入:s1 = \"abcde\", s2 = \"caebd\"\n输出:false\n
        ", + "language": "markdown" + }, + { + "content": "\n

        示例 3:

        ", + "language": "markdown" + }, + { + "content": "\n
        输入:s1 = \"a\", s2 = \"a\"\n输出:true\n
        ", + "language": "markdown" + }, + { + "content": "\n

         

        ", + "language": "markdown" + }, + { + "content": "\n

        提示:

        ", + "language": "markdown" + }, + { + "content": "\n
          \n
        • s1.length == s2.length
        • \n
        • 1 <= s1.length <= 30
        • \n
        • s1s2 由小写英文字母组成
        • \n
        \n
        ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \n#include \n#include \nstatic bool scramble(char *s1, int low1, int high1, char *s2, int low2, int high2)\n{\n\tif (high1 - low1 != high2 - low2)\n\t{\n\t\treturn false;\n\t}\n\telse if (!memcmp(s1 + low1, s2 + low2, high1 - low1 + 1))\n\t{\n\t\treturn true;\n\t}\n\telse\n\t{\n\t\tint i, c1[128] = {0}, c2[128] = {0};\n\t\tfor (i = low1; i <= high1; i++)\n\t\t{\n\t\t\tc1[s1[i]]++;\n\t\t}\n\t\tfor (i = low2; i <= high2; i++)\n\t\t{\n\t\t\tc2[s2[i]]++;\n\t\t}\n\t\tif (memcmp(c1, c2, 128 * sizeof(int)))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tint len = high1 - low1 + 1;\n\t\t\tfor (i = 1; i < len; i++)\n\t\t\t{\n\t\t\t\tif (scramble(s1, low1, low1 + i - 1, s2, low2, low2 + i - 1) &&\n\t\t\t\t\tscramble(s1, low1 + i, high1, s2, low2 + i, high2))\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif (scramble(s1, low1, low1 + i - 1, s2, high2 - i + 1, high2) &&\n\t\t\t\t\tscramble(s1, low1 + i, high1, s2, low2, high2 - i))\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t}\n}\nstatic bool isScramble(char *s1, char *s2)\n{\n\treturn scramble(s1, 0, strlen(s1) - 1, s2, 0, strlen(s2) - 1);\n}\nint main(int argc, char **argv)\n{\n\tif (argc != 3)\n\t{\n\t\tfprintf(stderr, \"Usage: ./test s1 s2\\n\");\n\t\texit(-1);\n\t}\n\tprintf(\"%s\\n\", isScramble(argv[1], argv[2]) ? \"true\" : \"false\");\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-9c4fc46e655e473c8b1fa86ebaa44589", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470832" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/32.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/32.exercises/config.json" new file mode 100644 index 000000000..0cc3b092e --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/32.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-7568d52f35704930b597b69901e61ae6", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/32.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/32.exercises/solution.json" new file mode 100644 index 000000000..11b0f665d --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/32.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "373908c9308b46a49d7a28894a4d6eac", + "keywords": "递归,链表", + "title": "K 个一组翻转链表", + "desc": [ + { + "content": "\n

        给你一个链表,每 个节点一组进行翻转,请你返回翻转后的链表。

        是一个正整数,它的值小于或等于链表的长度。

        如果节点总数不是 的整数倍,那么请将最后剩余的节点保持原有顺序。

        进阶:

          \t
        • 你可以设计一个只使用常数额外空间的算法来解决此问题吗?
        • \t
        • 你不能只是单纯的改变节点内部的值,而是需要实际进行节点交换。

         

        示例 1:

        \"\"
        输入:head = [1,2,3,4,5], k = 2
        输出:
        [2,1,4,3,5]

        示例 2:

        \"\"
        输入:head = [1,2,3,4,5], k = 3
        输出:
        [3,2,1,4,5]

        示例 3:

        输入:head = [1,2,3,4,5], k = 1
        输出:
        [1,2,3,4,5]

        示例 4:

        输入:head = [1], k = 1
        输出:
        [1]

          提示:

            \t
          • 列表中节点的数量在范围 sz
          • \t
          • 1 <= sz <= 5000
          • \t
          • 0 <= Node.val <= 1000
          • \t
          • 1 <= k <= sz
          ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nstruct ListNode\n{\n\tint val;\n\tListNode *next;\n\tListNode() : val(0), next(nullptr) {}\n\tListNode(int x) : val(x), next(nullptr) {}\n\tListNode(int x, ListNode *next) : val(x), next(next) {}\n};\nclass Solution\n{\npublic:\n\tListNode *reverseGroup(ListNode *head, int k)\n\t{\n\t\tint len = 0;\n\t\tstruct ListNode dummy, *prev = &dummy;\n\t\tdummy.next = head;\n\t\tfor (; head != nullptr; head = head->next)\n\t\t{\n\t\t\tif (++len % k == 0)\n\t\t\t{\n\t\t\t\tstruct ListNode *p = prev->next;\n\t\t\t\twhile (prev->next != head)\n\t\t\t\t{\n\t\t\t\t\tstruct ListNode *q = p->next;\n\t\t\t\t\tp->next = q->next;\n\t\t\t\t\tq->next = prev->next;\n\t\t\t\t\tprev->next = q;\n\t\t\t\t}\n\t\t\t\tprev = p;\n\t\t\t\thead = p;\n\t\t\t}\n\t\t}\n\t\treturn dummy.next;\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-7568d52f35704930b597b69901e61ae6", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600471012" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/33.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/33.exercises/config.json" new file mode 100644 index 000000000..b38d0691d --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/33.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-da88752f950b47bdbbb804a8ce1489c0", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/33.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/33.exercises/solution.json" new file mode 100644 index 000000000..299df1992 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/33.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "c74fceb8a5a54b259fdc21001910f8d8", + "keywords": "字符串", + "title": "有效数字", + "desc": [ + { + "content": "\n

          有效数字(按顺序)可以分成以下几个部分:

            \t
          1. 一个 小数 或者 整数
          2. \t
          3. (可选)一个 'e''E' ,后面跟着一个 整数

          小数(按顺序)可以分成以下几个部分:

            \t
          1. (可选)一个符号字符('+''-'
          2. \t
          3. 下述格式之一:\t
              \t\t
            1. 至少一位数字,后面跟着一个点 '.'
            2. \t\t
            3. 至少一位数字,后面跟着一个点 '.' ,后面再跟着至少一位数字
            4. \t\t
            5. 一个点 '.' ,后面跟着至少一位数字
            6. \t
            \t

          整数(按顺序)可以分成以下几个部分:

            \t
          1. (可选)一个符号字符('+''-'
          2. \t
          3. 至少一位数字

          部分有效数字列举如下:

            \t
          • [\"2\", \"0089\", \"-0.1\", \"+3.14\", \"4.\", \"-.9\", \"2e10\", \"-90E3\", \"3e+7\", \"+6e-1\", \"53.5e93\", \"-123.456e789\"]

          部分无效数字列举如下:

            \t
          • [\"abc\", \"1a\", \"1e\", \"e3\", \"99e2.5\", \"--6\", \"-+3\", \"95a54e53\"]

          给你一个字符串 s ,如果 s 是一个 有效数字 ,请返回 true

           

          示例 1:

          输入:s = \"0\"
          输出:
          true

          示例 2:

          输入:s = \"e\"
          输出:
          false

          示例 3:

          输入:s = \".\"
          输出:
          false

          示例 4:

          输入:s = \".1\"
          输出:
          true

           

          提示:

            \t
          • 1 <= s.length <= 20
          • \t
          • s 仅含英文字母(大写和小写),数字(0-9),加号 '+' ,减号 '-' ,或者点 '.'
          ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \n#include \n#include \nstatic bool isNumber(const char *s)\n{\n\twhile (*s == ' ')\n\t\t++s;\n\tbool if_find_num = false;\n\tif (*s == '-' || *s == '+')\n\t\t++s;\n\twhile (isdigit(*s))\n\t{\n\t\tif_find_num = true;\n\t\t++s;\n\t}\n\tif (*s == '.')\n\t\t++s;\n\twhile (isdigit(*s))\n\t{\n\t\tif_find_num = true;\n\t\t++s;\n\t}\n\tif (if_find_num == true && *s == 'e')\n\t{\n\t\t++s;\n\t\tif (*s == '+' || *s == '-')\n\t\t\t++s;\n\t\tif_find_num = false;\n\t\twhile (isdigit(*s))\n\t\t{\n\t\t\tif_find_num = true;\n\t\t\t++s;\n\t\t}\n\t}\n\twhile (*s == ' ')\n\t\t++s;\n\treturn *s == '\\0' && if_find_num == true;\n}\nint main(int argc, char **argv)\n{\n\tif (argc != 2)\n\t{\n\t\tfprintf(stderr, \"Usage: ./test number\\n\");\n\t\texit(-1);\n\t}\n\tprintf(\"%s\\n\", isNumber(argv[1]) ? \"true\" : \"false\");\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-da88752f950b47bdbbb804a8ce1489c0", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470924" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/34.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/34.exercises/config.json" new file mode 100644 index 000000000..764d1d20a --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/34.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-26802d77cb99478bbd3754edb14e4d05", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/34.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/34.exercises/solution.json" new file mode 100644 index 000000000..7d4c628df --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/34.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "89e891a205a14a10a2ee31a720f6cbbd", + "keywords": "哈希表,字符串,滑动窗口", + "title": "串联所有单词的子串", + "desc": [ + { + "content": "\n

          给定一个字符串 和一些长度相同的单词 words。找出 s\n中恰好可以由 words 中所有单词串联形成的子串的起始位置。

          \n

          注意子串要与 words 中的单词完全匹配,中间不能有其他字符,但不需要考虑 words 中单词串联的顺序。

          \n

           

          \n

          示例 1:

          \n
          输入:  s = "barfoothefoobarman",  words = ["foo","bar"]
          输出:
          [0,9]
          解释:
          从索引 0 和 9 开始的子串分别是 "barfoo" 和 "foobar" 。输出的顺序不重要, [9,0] 也是有效答案。
          \n

          示例 2:

          \n
          输入:  s = "wordgoodgoodgoodbestword",  words = ["word","good","best","word"]
          输出:
          []
          ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nclass Solution\n{\npublic:\n\tvector findSubstring(string s, vector &words)\n\t{\n\t\tvector res;\n\t\tif (s.empty() || words.empty())\n\t\t{\n\t\t\treturn res;\n\t\t}\n\t\tunordered_map ht;\n\t\tfor (const auto &w : words)\n\t\t{\n\t\t\tht[w]++;\n\t\t}\n\t\tint len = words[0].length();\n\t\tfor (int i = 0, j = 0; i < s.length() - words.size() * len + 1; i++)\n\t\t{\n\t\t\tunordered_map counting;\n\t\t\tfor (j = 0; j < words.size(); j++)\n\t\t\t{\n\t\t\t\tstring word = s.substr(i + j * len, len);\n\t\t\t\tif (++counting[word] > ht[word])\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (j == words.size())\n\t\t\t{\n\t\t\t\tres.push_back(i);\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-26802d77cb99478bbd3754edb14e4d05", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470925" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/35.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/35.exercises/config.json" new file mode 100644 index 000000000..5776da2af --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/35.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-a84cd69409ca4eb6b4ce004ce6cb68f4", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/35.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/35.exercises/solution.json" new file mode 100644 index 000000000..168e156bc --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/35.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "787af8f4763b45f7a417b4944bb22aec", + "keywords": "数组,二分查找,分治", + "title": "寻找两个正序数组的中位数", + "desc": [ + { + "content": "\n

          给定两个大小分别为 mn 的正序(从小到大)数组 nums1 和 nums2。请你找出并返回这两个正序数组的 中位数

           

          示例 1:

          输入:nums1 = [1,3], nums2 = [2]
          输出:
          2.00000
          解释:
          合并数组 = [1,2,3] ,中位数 2

          示例 2:

          输入:nums1 = [1,2], nums2 = [3,4]
          输出:
          2.50000
          解释:
          合并数组 = [1,2,3,4] ,中位数 (2 + 3) / 2 = 2.5

          示例 3:

          输入:nums1 = [0,0], nums2 = [0,0]
          输出:
          0.00000

          示例 4:

          输入:nums1 = [], nums2 = [1]
          输出:
          1.00000

          示例 5:

          输入:nums1 = [2], nums2 = []
          输出:
          2.00000

           

          提示:

            \t
          • nums1.length == m
          • \t
          • nums2.length == n
          • \t
          • 0 <= m <= 1000
          • \t
          • 0 <= n <= 1000
          • \t
          • 1 <= m + n <= 2000
          • \t
          • -106 <= nums1[i], nums2[i] <= 106

           

          进阶:你能设计一个时间复杂度为 O(log (m+n)) 的算法解决此问题吗?

          ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "class Solution\n{\npublic:\n\tdouble findMedianSortedArrays(vector &nums1, vector &nums2)\n\t{\n\t\tint nums1Size = nums1.size();\n\t\tint nums2Size = nums2.size();\n\t\tint na = nums1Size + nums2Size;\n\t\tint *ns = (int *)malloc(4 * na);\n\t\tint i = 0, j = 0, d = 0;\n\t\tint m = na / 2 + 1;\n\t\twhile (d < m)\n\t\t{\n\t\t\tint n;\n\t\t\tif (i < nums1Size && j < nums2Size)\n\t\t\t{\n\t\t\t\tn = (nums1[i] < nums2[j]) ? nums1[i++] : nums2[j++];\n\t\t\t}\n\t\t\telse if (i < nums1Size)\n\t\t\t{\n\t\t\t\tn = nums1[i++];\n\t\t\t}\n\t\t\telse if (j < nums2Size)\n\t\t\t{\n\t\t\t\tn = nums2[j++];\n\t\t\t}\n\t\t\tns[d++] = n;\n\t\t}\n\t\tif (na % 2)\n\t\t{\n\t\t\treturn ns[d - 1];\n\t\t}\n\t\treturn (ns[d - 1] + ns[d - 2]) / 2.0;\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-a84cd69409ca4eb6b4ce004ce6cb68f4", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600469814" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/36.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/36.exercises/config.json" new file mode 100644 index 000000000..ed9e9a211 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/36.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-614de2b516c846b88756982c0408dde8", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/36.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/36.exercises/solution.json" new file mode 100644 index 000000000..73a7f6d72 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/36.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "fef93fc39e554ebaa5e936e8fa911855", + "keywords": "哈希表,字符串,滑动窗口", + "title": "最小覆盖子串", + "desc": [ + { + "content": "\n

          给你一个字符串 s 、一个字符串 t 。返回 s 中涵盖 t 所有字符的最小子串。如果 s 中不存在涵盖 t 所有字符的子串,则返回空字符串 \"\"

          注意:如果 s 中存在这样的子串,我们保证它是唯一的答案。

           

          示例 1:

          输入:s = \"ADOBECODEBANC\", t = \"ABC\"
          输出:
          \"BANC\"

          示例 2:

          输入:s = \"a\", t = \"a\"
          输出:
          \"a\"

           

          提示:

            \t
          • 1 <= s.length, t.length <= 105
          • \t
          • st 由英文字母组成

           

          进阶:你能设计一个在 o(n) 时间内解决此问题的算法吗?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nclass Solution\n{\npublic:\n\tstring minWindow(string s, string t)\n\t{\n\t\tvector count(128);\n\t\tfor (char c : t)\n\t\t{\n\t\t\tcount[c]++;\n\t\t}\n\t\tint l = 0, r = 0;\n\t\tint need_to_meet = t.length();\n\t\tint start, min_len = INT_MAX;\n\t\twhile (r < s.length())\n\t\t{\n\t\t\tif (--count[s[r++]] >= 0)\n\t\t\t{\n\t\t\t\tneed_to_meet--;\n\t\t\t}\n\t\t\twhile (need_to_meet == 0)\n\t\t\t{\n\t\t\t\tif (r - l < min_len)\n\t\t\t\t{\n\t\t\t\t\tstart = l;\n\t\t\t\t\tmin_len = r - l;\n\t\t\t\t}\n\t\t\t\tif (++count[s[l++]] > 0)\n\t\t\t\t{\n\t\t\t\t\tneed_to_meet++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn min_len == INT_MAX ? \"\" : s.substr(start, min_len);\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-614de2b516c846b88756982c0408dde8", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600471015" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/37.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/37.exercises/config.json" new file mode 100644 index 000000000..69a5562ea --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/37.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-d1dc9f58aa4b411886252ef1dbc58060", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/37.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/37.exercises/solution.json" new file mode 100644 index 000000000..57a09b6c4 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/37.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "1406e7cd7c1f44d3a9e63e9c3ff1cfe6", + "keywords": "链表,分治,堆(优先队列),归并排序", + "title": "合并K个升序链表", + "desc": [ + { + "content": "\n

          给你一个链表数组,每个链表都已经按升序排列。

          请你将所有链表合并到一个升序链表中,返回合并后的链表。

           

          示例 1:

          输入:lists = [[1,4,5],[1,3,4],[2,6]]
          输出:
          [1,1,2,3,4,4,5,6]
          解释:
          链表数组如下:[ 1->4->5, 1->3->4, 2->6]将它们合并到一个有序链表中得到。1->1->2->3->4->4->5->6

          示例 2:

          输入:lists = []
          输出:
          []

          示例 3:

          输入:lists = [[]]
          输出:
          []

           

          提示:

            \t
          • k == lists.length
          • \t
          • 0 <= k <= 10^4
          • \t
          • 0 <= lists[i].length <= 500
          • \t
          • -10^4 <= lists[i][j] <= 10^4
          • \t
          • lists[i]升序 排列
          • \t
          • lists[i].length 的总和不超过 10^4
          ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nusing namespace std;\nstruct ListNode\n{\n\tint val;\n\tListNode *next;\n\tListNode() : val(0), next(nullptr) {}\n\tListNode(int x) : val(x), next(nullptr) {}\n\tListNode(int x, ListNode *next) : val(x), next(next) {}\n};\nclass Solution\n{\npublic:\n\tListNode *mergeKLists(vector &lists)\n\t{\n\t\tauto cmp = [](struct ListNode *n1, struct ListNode *n2)\n\t\t{\n\t\t\treturn n1->val > n2->val;\n\t\t} priority_queue, decltype(cmp)>\n\t\t\tqueue(cmp);\n\t\tfor (int i = 0; i < lists.size(); i++)\n\t\t{\n\t\t\tif (lists[i] != nullptr)\n\t\t\t{\n\t\t\t\tqueue.push(lists[i]);\n\t\t\t}\n\t\t}\n\t\tstruct ListNode dummy, *p = &dummy;\n\t\t;\n\t\twhile (!queue.empty())\n\t\t{\n\t\t\tListNode *node = queue.top();\n\t\t\tqueue.pop();\n\t\t\tp->next = node;\n\t\t\tp = node;\n\t\t\tif (node->next != nullptr)\n\t\t\t{\n\t\t\t\tqueue.push(node->next);\n\t\t\t}\n\t\t}\n\t\treturn dummy.next;\n\t}\n};", + "language": "cpp" + }, + "node_id": "dailycode-d1dc9f58aa4b411886252ef1dbc58060", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470116" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/38.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/38.exercises/config.json" new file mode 100644 index 000000000..eba9616b0 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/38.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-29a75c30bfa34e84a2c372b6e931a7a5", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/38.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/38.exercises/solution.json" new file mode 100644 index 000000000..0a7083ffb --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/38.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "0a486ed6f8c944cca2eec0db2b2ae39c", + "keywords": "递归,数学", + "title": "排列序列", + "desc": [ + { + "content": "\n

          给出集合 [1,2,3,...,n],其所有元素共有 n! 种排列。

          按大小顺序列出所有排列情况,并一一标记,当 n = 3 时, 所有排列如下:

            \t
          1. \"123\"
          2. \t
          3. \"132\"
          4. \t
          5. \"213\"
          6. \t
          7. \"231\"
          8. \t
          9. \"312\"
          10. \t
          11. \"321\"

          给定 n 和 k,返回第 k 个排列。

           

          示例 1:

          输入:n = 3, k = 3
          输出:
          \"213\"

          示例 2:

          输入:n = 4, k = 9
          输出:
          \"2314\"

          示例 3:

          输入:n = 3, k = 1
          输出:
          \"123\"

           

          提示:

            \t
          • 1 <= n <= 9
          • \t
          • 1 <= k <= n!
          ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \n#include \n#include \nstatic char *getPermutation(int n, int k)\n{\n\tint i;\n\tchar *result = malloc(n + 1);\n\tbool *used = malloc(n * sizeof(bool));\n\tmemset(used, false, n * sizeof(bool));\n\tint total = 1;\n\tfor (i = 1; i <= n; i++)\n\t{\n\t\ttotal *= i;\n\t}\n\tk = k - 1;\n\tfor (i = 0; i < n; i++)\n\t{\n\t\ttotal /= (n - i);\n\t\tint gid = k / total;\n\t\tk %= total;\n\t\tint x = -1;\n\t\tint count = 0;\n\t\twhile (count <= gid)\n\t\t{\n\t\t\tx = (x + 1) % n;\n\t\t\tif (!used[x])\n\t\t\t{\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tused[x] = true;\n\t\tresult[i] = x + 1 + '0';\n\t}\n\tresult[n] = '\\0';\n\treturn result;\n}\nint main(int argc, char **argv)\n{\n\tif (argc != 3)\n\t{\n\t\tfprintf(stderr, \"Usage: ./test n, k\\n\");\n\t\texit(-1);\n\t}\n\tprintf(\"%s\\n\", getPermutation(atoi(argv[1]), atoi(argv[2])));\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-29a75c30bfa34e84a2c372b6e931a7a5", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600471016" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/39.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/39.exercises/config.json" new file mode 100644 index 000000000..c8286383d --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/39.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-eef9a0612cff417fbb8eb4fedfb899db", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/39.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/39.exercises/solution.json" new file mode 100644 index 000000000..c9f3b42f8 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/39.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/begeekmyfriend/leetcode", + "source": "solution.md", + "exercise_id": "d3cb836752484324a830426c0ea6acdc", + "keywords": "贪心,递归,字符串,动态规划", + "title": "通配符匹配", + "desc": [ + { + "content": "\n

          给定一个字符串 (s) 和一个字符模式 (p) ,实现一个支持 '?' 和 '*' 的通配符匹配。

          '?' 可以匹配任何单个字符。'*' 可以匹配任意字符串(包括空字符串)。

          两个字符串完全匹配才算匹配成功。

          说明:

            \t
          • s 可能为空,且只包含从 a-z 的小写字母。
          • \t
          • p 可能为空,且只包含从 a-z 的小写字母,以及字符 ? 和 *

          示例 1:

          输入:s = "aa"p = "a"
          输出:
          false
          解释:
          "a" 无法匹配 "aa" 整个字符串。

          示例 2:

          输入:s = "aa"p = "*"
          输出:
          true
          解释:
           '*' 可以匹配任意字符串。

          示例 3:

          输入:s = "cb"p = "?a"
          输出:
          false
          解释:
           '?' 可以匹配 'c', 但第二个 'a' 无法匹配 'b'。

          示例 4:

          输入:s = "adceb"p = "*a*b"
          输出:
          true
          解释:
           第一个 '*' 可以匹配空字符串, 第二个 '*' 可以匹配字符串 "dce".

          示例 5:

          输入:s = "acdcb"p = "a*c?b"
          输出:
          false
          ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \n#include \n#include \nstatic bool isMatch(char *s, char *p)\n{\n\tchar *last_s = NULL;\n\tchar *last_p = NULL;\n\twhile (*s != '\\0')\n\t{\n\t\tif (*p == '*')\n\t\t{\n\t\t\tif (*++p == '\\0')\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tlast_s = s;\n\t\t\tlast_p = p;\n\t\t}\n\t\telse if (*p == '?' || *s == *p)\n\t\t{\n\t\t\ts++;\n\t\t\tp++;\n\t\t}\n\t\telse if (last_s != NULL)\n\t\t{\n\t\t\tp = last_p;\n\t\t\ts = ++last_s;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}\n\twhile (*p == '*')\n\t{\n\t\tp++;\n\t}\n\treturn *p == '\\0';\n}\nint main(int argc, char **argv)\n{\n\tif (argc != 3)\n\t{\n\t\tfprintf(stderr, \"Usage: ./test string pattern\\n\");\n\t\texit(-1);\n\t}\n\tprintf(\"%s\\n\", isMatch(argv[1], argv[2]) ? \"true\" : \"false\");\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-eef9a0612cff417fbb8eb4fedfb899db", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600471019" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/4.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/4.exercises/config.json" new file mode 100644 index 000000000..d09eb0609 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/4.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-f65da56d7cc24a039bf82c904df55f58", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/4.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/4.exercises/solution.json" new file mode 100644 index 000000000..8c6b3f7d1 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/4.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "f26e29717a5d4a328860fd834a766956", + "keywords": "算法高阶,数论算法,算法问题选编,整数的因子分解", + "title": "计算出现次数最多的整数及其出现次数", + "desc": [ + { + "content": "\n

          【问题描述】\n输入一组无序的整数,编程输出其中出现次数最多的整数及其出现次数。\n【输入形式】\n先从标准输入读入整数的个数(大于等于1,小于等于100),然后在下一行输入这些整数,各整数之间以一个空格分隔。\n【输出形式】\n在标准输出上输出出现次数最多的整数及其出现次数,两者以一个空格分隔;若出现次数最多的整数有多个,则按照整数升序分行输出。\n【样例输入】\n10\n0 -50 0 632 5813 -50 9 -50 0 632\n【样例输出】\n-50 3\n0 3\n【样例说明】\n输入了10个整数,其中出现次数最多的是-50和0,都是出现3次。

          ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nint main()\n{\n\tint a[50],b[50],c[50],n,i,j,t,max;\n\tscanf(\"%d\",&n);\n\tfor(i=0;ia[j+1])\n\t\t {\n\t\t\t t=a[j];\n\t\t\t a[j]=a[j+1];\n\t\t\t a[j+1]=t;\n\t\t }\n\t\t}\n\t\tj=0;\n\t\tt=-1;\n\tfor(i=0;i给你一个字符串 s 和一个字符规律 p,请你来实现一个支持 '.' 和 '*' 的正则表达式匹配。

            \t
          • '.' 匹配任意单个字符
          • \t
          • '*' 匹配零个或多个前面的那一个元素

          所谓匹配,是要涵盖 整个 字符串 s的,而不是部分字符串。

          示例 1:

          输入:s = \"aa\" p = \"a\"
          输出:
          false
          解释:
          \"a\" 无法匹配 \"aa\" 整个字符串。

          示例 2:

          输入:s = \"aa\" p = \"a*\"
          输出:
          true
          解释:
          因为 '*' 代表可以匹配零个或多个前面的那一个元素, 在这里前面的元素就是 'a'。因此,字符串 \"aa\" 可被视为 'a' 重复了一次。

          示例 3:

          输入:s = \"ab\" p = \".*\"
          输出:
          true
          解释:
          \".*\" 表示可匹配零个或多个('*')任意字符('.')。

          示例 4:

          输入:s = \"aab\" p = \"c*a*b\"
          输出:
          true
          解释:
          因为 '*' 表示零个或多个,这里 'c' 为 0 个, 'a' 被重复一次。因此可以匹配字符串 \"aab\"。

          示例 5:

          输入:s = \"mississippi\" p = \"mis*is*p*.\"
          输出:
          false

           

          提示:

            \t
          • 0 <= s.length <= 20
          • \t
          • 0 <= p.length <= 30
          • \t
          • s 可能为空,且只包含从 a-z 的小写字母。
          • \t
          • p 可能为空,且只包含从 a-z 的小写字母,以及字符 . 和 *
          • \t
          • 保证每次出现字符 * 时,前面都匹配到有效的字符
          ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "bool isMatch(char *s, char *p)\n{\n\tif (!p || p[0] == NULL)\n\t\treturn (!s || s[0] == NULL);\n\tbool head_match = (s && s[0] && (s[0] == p[0] || p[0] == '.'));\n\tif (p[1] && p[1] == '*')\n\t{\n\t\treturn (head_match && isMatch(s + 1, p)) || isMatch(s, p + 2);\n\t}\n\telse\n\t{\n\t\treturn head_match && isMatch(s + 1, p + 1);\n\t}\n}", + "language": "cpp" + }, + "node_id": "dailycode-3a1bc738c17a4209a24f20e6284146dd", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470835" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/5.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/5.exercises/config.json" new file mode 100644 index 000000000..4a4c6f5c2 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/5.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-70c36c9a7d99475c87b427df4b2fe285", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/5.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/5.exercises/solution.json" new file mode 100644 index 000000000..8f290ae1f --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/5.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "e7452e4cc4cf410c94611ff2756adcbd", + "keywords": "图算法,算法高阶,图的表示,基本的图算法", + "title": "六角填数", + "desc": [ + { + "content": "\n

          ![图片说明](https://img-ask.csdn.net/upload/202006/14/1592104139_240178.png)\n六角填数\n题目描述\n如下图所示六角形中,有12个点,依次填入1~12的数字,使得每条直线上的数字之和都相同。其中,已经替你填好了点1,2,3的数字,请你计算其他位置所代表的数字是多少?\n输入\n输入仅一行,以空格隔开,分别表示已经填好的点1,2,3的数字。\n输出\n输出仅一行,以空格隔开,分别表示所有位置所代表的数字。\n样例输入:\n1 8 2\n样例输出:\n1 8 2 9 7 11 10 12 3 5 6 4

          ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \n#include \n#include \nusing namespace std;\n#define eps 10e-10\n#define N 15\nint a[N];\nbool vis[N];\nvoid dfs(int x){\n\tif(x == 1 || x == 2 || x == 3){\n\t\tdfs(x+1);\n\t\treturn ;\n\t}\n\tif(x > 12){\n\t\tint t[6];\n\t\tt[0] = a[1] + a[3] + a[6] + a[8];\n\t\tt[1] = a[1] + a[4] + a[7] + a[11];\n\t\tt[2] = a[2] + a[3] + a[4] + a[5];\n\t\tt[3] = a[2] + a[6] + a[9] + a[12];\n\t\tt[4] = a[8] + a[9] + a[10] + a[11];\n\t\tt[5] = a[12] + a[10] + a[7] + a[5];\n\t\tfor(int i = 1; i < 6; ++i){\n\t\t\tif(t[i] != t[i-1])return ;\n\t\t}\n\t\tfor (int i = 1; i <= 12; i++) cout << a[i] << \" \";\n\t\treturn ;\n\t}\n\tfor(int i = 1;i < 13; ++i){\n\t\tif(!vis[i]){\n\t\t\tvis[i] = 1;\n\t\t\ta[x] = i;\n\t\t\tdfs(x+1);\n\t\t\tvis[i] = 0;\n\t\t}\n\t}\n}\nint main(){\n\tmemset(vis,0,sizeof(vis));\n\tcin >> a[1];\n\tvis[a[1]] = 1;\n\tcin >> a[2];\n\tvis[a[2]] = 1;\n\tcin >> a[3];\n\tvis[a[3]] = 1;\n\tdfs(1);\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-70c36c9a7d99475c87b427df4b2fe285", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470159" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/6.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/6.exercises/config.json" new file mode 100644 index 000000000..d6b146803 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/6.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-5796b5e24b034f8485f278d8ea6b2674", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/6.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/6.exercises/solution.json" new file mode 100644 index 000000000..d1fdb6926 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/6.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "7ee5105ff58a4fb5817610530ae63aae", + "keywords": "算法高阶,数论算法,算法问题选编,整数的因子分解", + "title": "阶乘和数", + "desc": [ + { + "content": "\n一个正整数如果等于组成它的各位数字的阶乘之和,该整数称为阶乘和数。\n例如,145=1!+4!+5!,则145是一个三位阶乘和数。\n请输出所有阶乘数(不会超过十万)", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \nint b[10] = {0, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880};\nint main(){\n    int x, sum = 0, a;\n    for(int j = 1; j <= 100000; j++){\n        sum = 0; \n        a = j;\n        while(j != 0){\n            x = j % 10;\n            j /= 10;\n            sum += b[x];\n        }\n        j = a;\n        if(sum == a){\n            printf(\"%d \", j);\n        }\n    }\n    return 0;\n} ", + "language": "cpp" + }, + "node_id": "dailycode-5796b5e24b034f8485f278d8ea6b2674", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600469860" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/7.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/7.exercises/config.json" new file mode 100644 index 000000000..bd37e1dcb --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/7.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-78ef1609cd054f0e8405c97d76ef6dfa", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/7.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/7.exercises/solution.json" new file mode 100644 index 000000000..4b9c8523d --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/7.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "b6dc8c02a03b46daa659052da28f1682", + "keywords": "桶排序,算法初阶,线性时间排序,排序和顺序统计量", + "title": "写一个函数,对任意一维数组进行降序排序", + "desc": [ + { + "content": "\n

          在主函数中随机生成一有n个元素的一维数组(元素的取值范围载10-90之间),调用排序函数对该数组进行排序,并输出排序结果。

          ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \n#include \n#include \n#include \nusing namespace std;\nvoid InsertSort(int a[], int n)\n{\n\tfor (int i = 1; i> num;\n\tcout << \"随机数组:\";\n\tfor (int i = 0; i < num; i++)\n\t{\n\t\tranNum[i] = 10 + (rand() % 80);\n\t\tcout << \" \" << ranNum[i];\n\t}\n\tcout << endl;\n\tInsertSort(ranNum, num);\n\tcout << \"排序后整数序列:\";\n\tfor (int j = num-1; j >= 0; j--) {\n\t\tcout << ranNum[j] << \" \";\n\t}\n\tcout << endl;\n\tsystem(\"pause\");\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-78ef1609cd054f0e8405c97d76ef6dfa", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600469961" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/8.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/8.exercises/config.json" new file mode 100644 index 000000000..5a3dc32ba --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/8.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-7798b34864d141ac9f37b317b0907ceb", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/8.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/8.exercises/solution.json" new file mode 100644 index 000000000..d7bf6fb36 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/8.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "cf33ebb0691d42fc8d960a6b825d8c3e", + "keywords": "算法高阶,字符串匹配,算法问题选编,利用有限自动机进行字符串匹配", + "title": "结合两个字符串", + "desc": [ + { + "content": "\n写一个结合两个字符串的方法,从第一个字符串中取出一个字符,然后从第二个字符串中取出一个字符,以此类推。一旦一个字符串没有字符,它就应该继续使用另一个字符串\n输入:两个字符串,如s1=\"day\"和s2=\"time\"\n输出:一个结果字符串,对于上面的输入情况,它将是“dtaiyme”。", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \nusing namespace std;\nstring StrCon(const string& a, const string& b)\n{\n\tstring c;\n\tint n = a.size(), m = b.size();\n\tif (0 == n)\treturn a;\n\tif (0 == m) return b;\n\tint i, j;\n\tfor (i = 0, j = 0; i < n && j < m; ++i, ++j)\n\t{\n\t\tc += a[i];\n\t\tc += b[i];\n\t}\n\twhile (i < n)\n\t\tc += a[i++];\n\twhile (j < m)\n\t\tc += b[j++];\n\treturn c;\n}\nint main()\n{\n\tstring s = \"day\", t = \"time\";\n\tcout << StrCon(s, t) << endl;\n\tsystem(\"pause\");\n\treturn 0;\n}", + "language": "cpp" + }, + "node_id": "dailycode-7798b34864d141ac9f37b317b0907ceb", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600469844" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/9.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/9.exercises/config.json" new file mode 100644 index 000000000..d41b171b9 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/9.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-3224725bf9304f5ea5f91480fa9bc974", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/9.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/9.exercises/solution.json" new file mode 100644 index 000000000..3286e38cc --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/1.cpp/9.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "84bb7a0f6f7d4e26aaeae6b29ca94483", + "keywords": "算法初阶,基础知识,特征序列,概率分析和随机算法,概率分析和指示器随机变量的进一步使用", + "title": "数组排序", + "desc": [ + { + "content": "\n

          给定n(n是偶数,且n≤100)个正整数,所有正整数均≤10000;从前往后依次遍历这个数组,每两个为一组进行处理,若一组中的任意一个元素能被3或者5整除,则交换这两个元素的位置;否则不动;全部处理完成后,逆序输出整个数组。\n例如给定序列: 99 35 83 38 , 处理完成后得到:38 83 99 35\n给定序列: 6 7 3 4 ,处理完成后得到:3 4 6 7

          ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "cpp" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ], + [ + { + "content": "", + "language": "cpp" + } + ] + ], + "template": { + "content": "#include \n#include \nint main()\n{\n\tint i,j,n,a[10005],t;\n\tscanf(\"%d\",&n);\n\tfor(i=0;i=0;i--){\n\t\tprintf(\"%d \",a[i]);\n\t}\n}", + "language": "cpp" + }, + "node_id": "dailycode-3224725bf9304f5ea5f91480fa9bc974", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470257" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/1.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/1.exercises/config.json" new file mode 100644 index 000000000..765c91035 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/1.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-55c7a4e268dc4124978b79a1c91c02b3", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/1.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/1.exercises/solution.json" new file mode 100644 index 000000000..491f7edb4 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/1.exercises/solution.json" @@ -0,0 +1,52 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "2be5212787ff4bc69fbb24313c39b63f", + "keywords": "数组,回溯,矩阵", + "title": "解数独", + "desc": [ + { + "content": "\n

          编写一个程序,通过填充空格来解决数独问题。

          \n

          数独的解法需 遵循如下规则

          \n
            \n
          1. 数字 1-9 在每一行只能出现一次。
          2. \n
          3. 数字 1-9 在每一列只能出现一次。
          4. \n
          5. 数字 1-9 在每一个以粗实线分隔的 3x3 宫内只能出现一次。(请参考示例图)
          6. \n
          \n

          数独部分空格内已填入了数字,空白格用 '.' 表示。

          \n

           

          \n
          \n
          \n
          \n

          示例:

          \n
          输入:board = \n[[\"5\",\"3\",\".\",\".\",\"7\",\".\",\".\",\".\",\".\"],\n[\"6\",\".\",\".\",\"1\",\"9\",\"5\",\".\",\".\",\".\"],\n[\".\",\"9\",\"8\",\".\",\".\",\".\",\".\",\"6\",\".\"],\n[\"8\",\".\",\".\",\".\",\"6\",\".\",\".\",\".\",\"3\"],\n[\"4\",\".\",\".\",\"8\",\".\",\"3\",\".\",\".\",\"1\"],\n[\"7\",\".\",\".\",\".\",\"2\",\".\",\".\",\".\",\"6\"],\n[\".\",\"6\",\".\",\".\",\".\",\".\",\"2\",\"8\",\".\"],\n[\".\",\".\",\".\",\"4\",\"1\",\"9\",\".\",\".\",\"5\"],\n[\".\",\".\",\".\",\".\",\"8\",\".\",\".\",\"7\",\"9\"]]\n输出:\n[[\"5\",\"3\",\"4\",\"6\",\"7\",\"8\",\"9\",\"1\",\"2\"],\n[\"6\",\"7\",\"2\",\"1\",\"9\",\"5\",\"3\",\"4\",\"8\"],\n[\"1\",\"9\",\"8\",\"3\",\"4\",\"2\",\"5\",\"6\",\"7\"],\n[\"8\",\"5\",\"9\",\"7\",\"6\",\"1\",\"4\",\"2\",\"3\"],\n[\"4\",\"2\",\"6\",\"8\",\"5\",\"3\",\"7\",\"9\",\"1\"],\n[\"7\",\"1\",\"3\",\"9\",\"2\",\"4\",\"8\",\"5\",\"6\"],\n[\"9\",\"6\",\"1\",\"5\",\"3\",\"7\",\"2\",\"8\",\"4\"],\n[\"2\",\"8\",\"7\",\"4\",\"1\",\"9\",\"6\",\"3\",\"5\"],\n[\"3\",\"4\",\"5\",\"2\",\"8\",\"6\",\"1\",\"7\",\"9\"]]\n解释:输入的数独如上图所示,唯一有效的解决方案如下所示:\n

           

          \n
          \n", + "language": "markdown" + }, + { + "content": "\n

           

          \n

          提示:

          \n
            \n
          • board.length == 9
          • \n
          • board[i].length == 9
          • \n
          • board[i][j] 是一位数字或者 '.'
          • \n
          • 题目数据 保证 输入数独仅有一个解
          • \n
          \n
          \n
          \n
          ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\n\tboolean row[][] = new boolean[9][9];\n\tboolean col[][] = new boolean[9][9];\n\n\tboolean cell[][][] = new boolean[3][3][9];\n\n\tpublic void solveSudoku(char[][] board) {\n\n\t\tfor (int i = 0; i < 9; i++) {\n\t\t\tfor (int j = 0; j < 9; j++) {\n\t\t\t\tif (board[i][j] != '.') {\n\n\t\t\t\t\tint t = board[i][j] - '1';\n\n\t\t\t\t\trow[i][t] = col[j][t] = cell[i / 3][j / 3][t] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tdfs(board, 0, 0);\n\t}\n\n\tpublic boolean dfs(char[][] board, int x, int y) {\n\n\t\tif (y == 9) {\n\n\t\t\tx++;\n\t\t\ty = 0;\n\t\t}\n\n\t\tif (x == 9)\n\t\t\treturn true;\n\n\t\tif (board[x][y] != '.')\n\t\t\treturn dfs(board, x, y + 1);\n\n\t\tfor (int num = 0; num < 9; num++) {\n\n\t\t\tif (!row[x][num] && !col[y][num] && !cell[x / 3][y / 3][num]) {\n\n\t\t\t\tboard[x][y] = (char) (num + '1');\n\t\t\t\trow[x][num] = col[y][num] = cell[x / 3][y / 3][num] = true;\n\n\t\t\t\tif (dfs(board, x, y + 1))\n\t\t\t\t\treturn true;\n\n\t\t\t\tboard[x][y] = '.';\n\t\t\t\trow[x][num] = col[y][num] = cell[x / 3][y / 3][num] = false;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n}\n", + "language": "java" + }, + "node_id": "dailycode-55c7a4e268dc4124978b79a1c91c02b3", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470827" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/10.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/10.exercises/config.json" new file mode 100644 index 000000000..60b8b341e --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/10.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-4e7d2bc6a18f42668b4b2868a7730ced", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/10.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/10.exercises/solution.json" new file mode 100644 index 000000000..27803ae18 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/10.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "affe1a23ebf5464aa726c9de063bec2e", + "keywords": "数组,回溯", + "title": "N 皇后", + "desc": [ + { + "content": "\n

          n 皇后问题 研究的是如何将 n 个皇后放置在 n×n 的棋盘上,并且使皇后彼此之间不能相互攻击。

          给你一个整数 n ,返回所有不同的 n 皇后问题 的解决方案。

          每一种解法包含一个不同的 n 皇后问题 的棋子放置方案,该方案中 'Q''.' 分别代表了皇后和空位。

           

          示例 1:

          \"\"
          输入:n = 4
          输出:
          [[\".Q..\",\"...Q\",\"Q...\",\"..Q.\"],[\"..Q.\",\"Q...\",\"...Q\",\".Q..\"]]
          解释:
          如上图所示,4 皇后问题存在两个不同的解法。

          示例 2:

          输入:n = 1
          输出:
          [[\"Q\"]]

           

          提示:

            \t
          • 1 <= n <= 9
          • \t
          • 皇后彼此不能相互攻击,也就是说:任何两个皇后都不能处于同一条横行、纵行或斜线上。
          ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "import java.util.List;\nimport java.util.ArrayList;\npublic class Solution {\n\tpublic List> solveNQueens(int n) {\n\t\tList> res = new ArrayList>();\n\t\tint[] queenList = new int[n];\n\t\tplaceQueen(queenList, 0, n, res);\n\t\treturn res;\n\t}\n\tprivate void placeQueen(int[] queenList, int row, int n, List> res) {\n\t\tif (row == n) {\n\t\t\tArrayList list = new ArrayList();\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tString str = \"\";\n\t\t\t\tfor (int col = 0; col < n; col++) {\n\t\t\t\t\tif (queenList[i] == col) {\n\t\t\t\t\t\tstr += \"Q\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstr += \".\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlist.add(str);\n\t\t\t}\n\t\t\tres.add(list);\n\t\t}\n\t\tfor (int col = 0; col < n; col++) {\n\t\t\tif (isValid(queenList, row, col)) {\n\t\t\t\tqueenList[row] = col;\n\t\t\t\tplaceQueen(queenList, row + 1, n, res);\n\t\t\t}\n\t\t}\n\t}\n\tprivate boolean isValid(int[] queenList, int row, int col) {\n\t\tfor (int i = 0; i < row; i++) {\n\t\t\tint pos = queenList[i];\n\t\t\tif (pos == col) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (pos + row - i == col) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (pos - row + i == col) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-4e7d2bc6a18f42668b4b2868a7730ced", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470831" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/11.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/11.exercises/config.json" new file mode 100644 index 000000000..47b9e4245 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/11.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-bb85e8f3aec14d48b767f728bdf1dc51", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/11.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/11.exercises/solution.json" new file mode 100644 index 000000000..a84dc0136 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/11.exercises/solution.json" @@ -0,0 +1,92 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "bec64ff1155f4207b74a8df2248783b7", + "keywords": "字符串,动态规划", + "title": "扰乱字符串", + "desc": [ + { + "content": "\n
          使用下面描述的算法可以扰乱字符串 s 得到字符串 t :\n
            \n
          1. 如果字符串的长度为 1 ,算法停止
          2. \n
          3. 如果字符串的长度 > 1 ,执行下述步骤:\n
              \n
            • 在一个随机下标处将字符串分割成两个非空的子字符串。即,如果已知字符串 s ,则可以将其分成两个子字符串 xy\n,且满足 s = x + y
            • \n
            • 随机 决定是要「交换两个子字符串」还是要「保持这两个子字符串的顺序不变」。即,在执行这一步骤之后,s 可能是\ns = x + y 或者 s = y + x 。\n
            • \n
            • xy 这两个子字符串上继续从步骤 1 开始递归执行此算法。
            • \n
            \n
          4. \n
          ", + "language": "markdown" + }, + { + "content": "\n

          给你两个 长度相等 的字符串 s1\n和 s2,判断 s2 是否是 s1 的扰乱字符串。如果是,返回\ntrue ;否则,返回 false 。\n

          ", + "language": "markdown" + }, + { + "content": "\n

           

          ", + "language": "markdown" + }, + { + "content": "\n

          示例 1:

          ", + "language": "markdown" + }, + { + "content": "\n
          输入:s1 = \"great\", s2 = \"rgeat\"\n输出:true\n解释:s1 上可能发生的一种情形是:\n\"great\" --> \"gr/eat\" // 在一个随机下标处分割得到两个子字符串\n\"gr/eat\" --> \"gr/eat\" // 随机决定:「保持这两个子字符串的顺序不变」\n\"gr/eat\" --> \"g/r / e/at\" // 在子字符串上递归执行此算法。两个子字符串分别在随机下标处进行一轮分割\n\"g/r / e/at\" --> \"r/g / e/at\" // 随机决定:第一组「交换两个子字符串」,第二组「保持这两个子字符串的顺序不变」\n\"r/g / e/at\" --> \"r/g / e/ a/t\" // 继续递归执行此算法,将 \"at\" 分割得到 \"a/t\"\n\"r/g / e/ a/t\" --> \"r/g / e/ a/t\" // 随机决定:「保持这两个子字符串的顺序不变」\n算法终止,结果字符串和 s2 相同,都是 \"rgeat\"\n这是一种能够扰乱 s1 得到 s2 的情形,可以认为 s2 是 s1 的扰乱字符串,返回 true\n
          ", + "language": "markdown" + }, + { + "content": "\n

          示例 2:

          ", + "language": "markdown" + }, + { + "content": "\n
          输入:s1 = \"abcde\", s2 = \"caebd\"\n输出:false\n
          ", + "language": "markdown" + }, + { + "content": "\n

          示例 3:

          ", + "language": "markdown" + }, + { + "content": "\n
          输入:s1 = \"a\", s2 = \"a\"\n输出:true\n
          ", + "language": "markdown" + }, + { + "content": "\n

           

          ", + "language": "markdown" + }, + { + "content": "\n

          提示:

          ", + "language": "markdown" + }, + { + "content": "\n
            \n
          • s1.length == s2.length
          • \n
          • 1 <= s1.length <= 30
          • \n
          • s1s2 由小写英文字母组成
          • \n
          \n
          ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic boolean isScramble(String s1, String s2) {\n\t\tif (s1.length() == 0 && s2.length() == 0)\n\t\t\treturn true;\n\t\tif (s1.length() != s2.length())\n\t\t\treturn false;\n\t\treturn dfs(s1.toCharArray(), s2.toCharArray(), 0, 0, s1.length());\n\t}\n\tprivate boolean dfs(char[] s1, char[] s2, int start1, int start2, int len) {\n\t\tif (len == 1) {\n\t\t\treturn s1[start1] == s2[start2];\n\t\t}\n\t\tif (!equals(s1, s2, start1, start2, len)) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (int i = 1; i < len; i++) {\n\t\t\tif (dfs(s1, s2, start1, start2, i) && dfs(s1, s2, start1 + i, start2 + i, len - i))\n\t\t\t\treturn true;\n\t\t\tif (dfs(s1, s2, start1, start2 + len - i, i) && dfs(s1, s2, start1 + i, start2, len - i))\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\tpublic boolean equals(char[] s1, char[] s2, int start1, int start2, int len) {\n\t\tint[] charArr = new int[26];\n\t\tfor (int i = 0; i < len; i++) {\n\t\t\tcharArr[s1[start1 + i] - 'a']++;\n\t\t\tcharArr[s2[start2 + i] - 'a']--;\n\t\t}\n\t\tfor (int item : charArr) {\n\t\t\tif (item != 0)\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-bb85e8f3aec14d48b767f728bdf1dc51", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470832" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/12.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/12.exercises/config.json" new file mode 100644 index 000000000..472a4b503 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/12.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-e3a7c5b5f5724a47a7de4643ceb4b4d4", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/12.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/12.exercises/solution.json" new file mode 100644 index 000000000..132b9e8df --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/12.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "68cf7e0dee9e4009a8bcd13e99e501d2", + "keywords": "递归,链表", + "title": "K 个一组翻转链表", + "desc": [ + { + "content": "\n

          给你一个链表,每 个节点一组进行翻转,请你返回翻转后的链表。

          是一个正整数,它的值小于或等于链表的长度。

          如果节点总数不是 的整数倍,那么请将最后剩余的节点保持原有顺序。

          进阶:

            \t
          • 你可以设计一个只使用常数额外空间的算法来解决此问题吗?
          • \t
          • 你不能只是单纯的改变节点内部的值,而是需要实际进行节点交换。

           

          示例 1:

          \"\"
          输入:head = [1,2,3,4,5], k = 2
          输出:
          [2,1,4,3,5]

          示例 2:

          \"\"
          输入:head = [1,2,3,4,5], k = 3
          输出:
          [3,2,1,4,5]

          示例 3:

          输入:head = [1,2,3,4,5], k = 1
          输出:
          [1,2,3,4,5]

          示例 4:

          输入:head = [1], k = 1
          输出:
          [1]

            提示:

              \t
            • 列表中节点的数量在范围 sz
            • \t
            • 1 <= sz <= 5000
            • \t
            • 0 <= Node.val <= 1000
            • \t
            • 1 <= k <= sz
            ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "\npublic class ListNode {\n\tint val;\n\tListNode next;\n\n\tListNode() {\n\t}\n\n\tListNode(int val) {\n\t\tthis.val = val;\n\t}\n\n\tListNode(int val, ListNode next) {\n\t\tthis.val = val;\n\t\tthis.next = next;\n\t}\n}\n\nclass Solution {\n\tpublic ListNode reverseKGroup(ListNode head, int k) {\n\t\tif (head == null) {\n\t\t\treturn null;\n\t\t}\n\t\tListNode a = head, b = head;\n\n\t\tfor (int i = 0; i < k; i++) {\n\t\t\tif (b == null) {\n\t\t\t\treturn a;\n\t\t\t}\n\t\t\tb = b.next;\n\t\t}\n\n\t\tListNode newHead = reverse(a, b);\n\n\t\ta.next = reverseKGroup(b, k);\n\t\treturn newHead;\n\t}\n\n\tpublic ListNode reverse(ListNode a, ListNode b) {\n\t\tListNode pre, cur, nxt;\n\t\tpre = null;\n\t\tcur = a;\n\t\tnxt = a;\n\t\twhile (nxt != b) {\n\t\t\tnxt = cur.next;\n\t\t\tcur.next = pre;\n\t\t\tpre = cur;\n\t\t\tcur = nxt;\n\t\t}\n\t\treturn pre;\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-e3a7c5b5f5724a47a7de4643ceb4b4d4", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600471012" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/13.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/13.exercises/config.json" new file mode 100644 index 000000000..bb65aa377 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/13.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-412b8eb337ab4e35a1dea7bda02d89f9", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/13.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/13.exercises/solution.json" new file mode 100644 index 000000000..6e9aeafc3 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/13.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "b281f22e97cd4c4080c79969146cc820", + "keywords": "字符串", + "title": "有效数字", + "desc": [ + { + "content": "\n

            有效数字(按顺序)可以分成以下几个部分:

              \t
            1. 一个 小数 或者 整数
            2. \t
            3. (可选)一个 'e''E' ,后面跟着一个 整数

            小数(按顺序)可以分成以下几个部分:

              \t
            1. (可选)一个符号字符('+''-'
            2. \t
            3. 下述格式之一:\t
                \t\t
              1. 至少一位数字,后面跟着一个点 '.'
              2. \t\t
              3. 至少一位数字,后面跟着一个点 '.' ,后面再跟着至少一位数字
              4. \t\t
              5. 一个点 '.' ,后面跟着至少一位数字
              6. \t
              \t

            整数(按顺序)可以分成以下几个部分:

              \t
            1. (可选)一个符号字符('+''-'
            2. \t
            3. 至少一位数字

            部分有效数字列举如下:

              \t
            • [\"2\", \"0089\", \"-0.1\", \"+3.14\", \"4.\", \"-.9\", \"2e10\", \"-90E3\", \"3e+7\", \"+6e-1\", \"53.5e93\", \"-123.456e789\"]

            部分无效数字列举如下:

              \t
            • [\"abc\", \"1a\", \"1e\", \"e3\", \"99e2.5\", \"--6\", \"-+3\", \"95a54e53\"]

            给你一个字符串 s ,如果 s 是一个 有效数字 ,请返回 true

             

            示例 1:

            输入:s = \"0\"
            输出:
            true

            示例 2:

            输入:s = \"e\"
            输出:
            false

            示例 3:

            输入:s = \".\"
            输出:
            false

            示例 4:

            输入:s = \".1\"
            输出:
            true

             

            提示:

              \t
            • 1 <= s.length <= 20
            • \t
            • s 仅含英文字母(大写和小写),数字(0-9),加号 '+' ,减号 '-' ,或者点 '.'
            ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tchar[] chars;\n\tboolean point = false;\n\tboolean exponent = false;\n\tpublic boolean isNumber(String s) {\n\t\ts = s.trim();\n\t\tint length = s.length();\n\t\tif (length == 0) {\n\t\t\treturn false;\n\t\t}\n\t\tchars = s.toCharArray();\n\t\tString[] ss = s.split(\"e\");\n\t\tif (ss.length == 0) {\n\t\t\treturn false;\n\t\t}\n\t\tif (ss[0].length() == 0)\n\t\t\treturn false;\n\t\tif (ss[0].length() < length)\n\t\t\texponent = true;\n\t\tif (ss[0].length() == length - 1) {\n\t\t\treturn false;\n\t\t}\n\t\tString[] pre = ss[0].split(\"\\\\.\");\n\t\tif (pre.length == 0) {\n\t\t\treturn false;\n\t\t}\n\t\tif (pre[0].length() < ss[0].length())\n\t\t\tpoint = true;\n\t\tboolean result = pre(0, pre[0].length());\n\t\tresult = result && middle(pre[0].length() + 1, ss[0].length());\n\t\tif (exponent) {\n\t\t\tresult = result && is(ss[0].length() + 1, length);\n\t\t}\n\t\treturn result;\n\t}\n\tpublic boolean pre(int i, int length) {\n\t\tif (i >= length) {\n\t\t\treturn true;\n\t\t}\n\t\tif (chars[i] == '+' || chars[i] == '-') {\n\t\t\ti++;\n\t\t}\n\t\tif (i == length && !point) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (; i < length; i++) {\n\t\t\tif (chars[i] < '0' || chars[i] > '9') {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\tpublic boolean middle(int i, int length) {\n\t\tif (i >= length && point) {\n\t\t\tif (chars[i - 2] >= '0' && chars[i - 2] <= '9') {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\tfor (; i < length; i++) {\n\t\t\tif (chars[i] < '0' || chars[i] > '9') {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\tpublic boolean is(int i, int length) {\n\t\tif (i == 1) {\n\t\t\treturn false;\n\t\t}\n\t\tif (chars[i] == '+' || chars[i] == '-') {\n\t\t\ti++;\n\t\t}\n\t\tif (i == length) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (; i < length; i++) {\n\t\t\tif (chars[i] < '0' || chars[i] > '9') {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-412b8eb337ab4e35a1dea7bda02d89f9", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470924" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/14.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/14.exercises/config.json" new file mode 100644 index 000000000..7a9709294 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/14.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-31ce5d5a421d458cae9da5be0998199a", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/14.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/14.exercises/solution.json" new file mode 100644 index 000000000..c3eac7ecf --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/14.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "12ae9e6d8bf1407e9d69b4486405bc26", + "keywords": "哈希表,字符串,滑动窗口", + "title": "串联所有单词的子串", + "desc": [ + { + "content": "\n

            给定一个字符串 和一些长度相同的单词 words。找出 s\n中恰好可以由 words 中所有单词串联形成的子串的起始位置。

            \n

            注意子串要与 words 中的单词完全匹配,中间不能有其他字符,但不需要考虑 words 中单词串联的顺序。

            \n

             

            \n

            示例 1:

            \n
            输入:  s = "barfoothefoobarman",  words = ["foo","bar"]
            输出:
            [0,9]
            解释:
            从索引 0 和 9 开始的子串分别是 "barfoo" 和 "foobar" 。输出的顺序不重要, [9,0] 也是有效答案。
            \n

            示例 2:

            \n
            输入:  s = "wordgoodgoodgoodbestword",  words = ["word","good","best","word"]
            输出:
            []
            ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic List findSubstring(String s, String[] words) {\n\t\tList res = new ArrayList<>();\n\t\tif (s == null || s.length() == 0 || words == null || words.length == 0)\n\t\t\treturn res;\n\t\tHashMap map = new HashMap<>();\n\t\tint one_word = words[0].length();\n\t\tint word_num = words.length;\n\t\tint all_len = one_word * word_num;\n\t\tfor (String word : words) {\n\t\t\tmap.put(word, map.getOrDefault(word, 0) + 1);\n\t\t}\n\t\tfor (int i = 0; i < one_word; i++) {\n\t\t\tint left = i, right = i, count = 0;\n\t\t\tHashMap tmp_map = new HashMap<>();\n\t\t\twhile (right + one_word <= s.length()) {\n\t\t\t\tString w = s.substring(right, right + one_word);\n\t\t\t\tright += one_word;\n\t\t\t\tif (!map.containsKey(w)) {\n\t\t\t\t\tcount = 0;\n\t\t\t\t\tleft = right;\n\t\t\t\t\ttmp_map.clear();\n\t\t\t\t} else {\n\t\t\t\t\ttmp_map.put(w, tmp_map.getOrDefault(w, 0) + 1);\n\t\t\t\t\tcount++;\n\t\t\t\t\twhile (tmp_map.getOrDefault(w, 0) > map.getOrDefault(w, 0)) {\n\t\t\t\t\t\tString t_w = s.substring(left, left + one_word);\n\t\t\t\t\t\tcount--;\n\t\t\t\t\t\ttmp_map.put(t_w, tmp_map.getOrDefault(t_w, 0) - 1);\n\t\t\t\t\t\tleft += one_word;\n\t\t\t\t\t}\n\t\t\t\t\tif (count == word_num)\n\t\t\t\t\t\tres.add(left);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-31ce5d5a421d458cae9da5be0998199a", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470925" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/15.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/15.exercises/config.json" new file mode 100644 index 000000000..c19f714c0 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/15.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-2e20527b423d41d8881886b6316e28a9", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/15.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/15.exercises/solution.json" new file mode 100644 index 000000000..9b857d9cf --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/15.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "005edbcd51084940833520189e2bc788", + "keywords": "数组,二分查找,分治", + "title": "寻找两个正序数组的中位数", + "desc": [ + { + "content": "\n

            给定两个大小分别为 mn 的正序(从小到大)数组 nums1 和 nums2。请你找出并返回这两个正序数组的 中位数

             

            示例 1:

            输入:nums1 = [1,3], nums2 = [2]
            输出:
            2.00000
            解释:
            合并数组 = [1,2,3] ,中位数 2

            示例 2:

            输入:nums1 = [1,2], nums2 = [3,4]
            输出:
            2.50000
            解释:
            合并数组 = [1,2,3,4] ,中位数 (2 + 3) / 2 = 2.5

            示例 3:

            输入:nums1 = [0,0], nums2 = [0,0]
            输出:
            0.00000

            示例 4:

            输入:nums1 = [], nums2 = [1]
            输出:
            1.00000

            示例 5:

            输入:nums1 = [2], nums2 = []
            输出:
            2.00000

             

            提示:

              \t
            • nums1.length == m
            • \t
            • nums2.length == n
            • \t
            • 0 <= m <= 1000
            • \t
            • 0 <= n <= 1000
            • \t
            • 1 <= m + n <= 2000
            • \t
            • -106 <= nums1[i], nums2[i] <= 106

             

            进阶:你能设计一个时间复杂度为 O(log (m+n)) 的算法解决此问题吗?

            ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic double findMedianSortedArrays(int[] nums1, int[] nums2) {\n\t\tint nums1Size = nums1.length;\n\t\tint nums2Size = nums2.length;\n\t\tint na = nums1Size + nums2Size;\n\t\tint[] ns = new int[4 * na];\n\t\tint i = 0, j = 0, d = 0;\n\t\tint m = na / 2 + 1;\n\t\twhile (d < m) {\n\t\t\tint n = 0;\n\t\t\tif (i < nums1Size && j < nums2Size) {\n\t\t\t\tn = (nums1[i] < nums2[j]) ? nums1[i++] : nums2[j++];\n\t\t\t} else if (i < nums1Size) {\n\t\t\t\tn = nums1[i++];\n\t\t\t} else if (j < nums2Size) {\n\t\t\t\tn = nums2[j++];\n\t\t\t}\n\t\t\tns[d++] = n;\n\t\t}\n\t\tif (na % 2 == 1) {\n\t\t\treturn ns[d - 1];\n\t\t}\n\t\treturn (ns[d - 1] + ns[d - 2]) / 2.0;\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-2e20527b423d41d8881886b6316e28a9", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600469814" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/16.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/16.exercises/config.json" new file mode 100644 index 000000000..10a971b71 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/16.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-d3e358bffc0840129e126f8cfdc2ec90", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/16.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/16.exercises/solution.json" new file mode 100644 index 000000000..632d2cea8 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/16.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "ff72223edb9e4828982d4f446f8a30c6", + "keywords": "哈希表,字符串,滑动窗口", + "title": "最小覆盖子串", + "desc": [ + { + "content": "\n

            给你一个字符串 s 、一个字符串 t 。返回 s 中涵盖 t 所有字符的最小子串。如果 s 中不存在涵盖 t 所有字符的子串,则返回空字符串 \"\"

            注意:如果 s 中存在这样的子串,我们保证它是唯一的答案。

             

            示例 1:

            输入:s = \"ADOBECODEBANC\", t = \"ABC\"
            输出:
            \"BANC\"

            示例 2:

            输入:s = \"a\", t = \"a\"
            输出:
            \"a\"

             

            提示:

              \t
            • 1 <= s.length, t.length <= 105
            • \t
            • st 由英文字母组成

             

            进阶:你能设计一个在 o(n) 时间内解决此问题的算法吗?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "public class Min_Win_Sub {\n\tpublic String minWindow(String s, String t) {\n\t\tint[] ta = new int[128];\n\t\tint[] sa = new int[128];\n\t\tint min = Integer.MAX_VALUE;\n\t\tString minwin = \"\";\n\t\tfor (int i = 0; i < t.length(); i++) {\n\t\t\tta[t.charAt(i)]++;\n\t\t}\n\t\tint count = 0;\n\t\tint end = 0;\n\t\tint start = 0;\n\t\twhile (end < s.length()) {\n\t\t\tif (ta[s.charAt(end)] != 0) {\n\t\t\t\tif (sa[s.charAt(end)] < ta[s.charAt(end)]) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t\tsa[s.charAt(end)]++;\n\t\t\t}\n\t\t\tif (count == t.length()) {\n\t\t\t\twhile (ta[s.charAt(start)] == 0 || sa[s.charAt(start)] > ta[s.charAt(start)]) {\n\t\t\t\t\tif (sa[s.charAt(start)] > ta[s.charAt(start)]) {\n\t\t\t\t\t\tsa[s.charAt(start)]--;\n\t\t\t\t\t}\n\t\t\t\t\tstart++;\n\t\t\t\t}\n\t\t\t\tif (end - start + 1 < min) {\n\t\t\t\t\tminwin = s.substring(start, end + 1);\n\t\t\t\t\tmin = end - start + 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tend++;\n\t\t}\n\t\treturn minwin;\n\t}\n\n}", + "language": "java" + }, + "node_id": "dailycode-d3e358bffc0840129e126f8cfdc2ec90", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600471015" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/17.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/17.exercises/config.json" new file mode 100644 index 000000000..b5919ea87 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/17.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-8e1e5071f1df4857ab3fbc97910498be", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/17.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/17.exercises/solution.json" new file mode 100644 index 000000000..150d32fb1 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/17.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "a193b17ea03a459e9401dd9a2b776f57", + "keywords": "链表,分治,堆(优先队列),归并排序", + "title": "合并K个升序链表", + "desc": [ + { + "content": "\n

            给你一个链表数组,每个链表都已经按升序排列。

            请你将所有链表合并到一个升序链表中,返回合并后的链表。

             

            示例 1:

            输入:lists = [[1,4,5],[1,3,4],[2,6]]
            输出:
            [1,1,2,3,4,4,5,6]
            解释:
            链表数组如下:[ 1->4->5, 1->3->4, 2->6]将它们合并到一个有序链表中得到。1->1->2->3->4->4->5->6

            示例 2:

            输入:lists = []
            输出:
            []

            示例 3:

            输入:lists = [[]]
            输出:
            []

             

            提示:

              \t
            • k == lists.length
            • \t
            • 0 <= k <= 10^4
            • \t
            • 0 <= lists[i].length <= 500
            • \t
            • -10^4 <= lists[i][j] <= 10^4
            • \t
            • lists[i]升序 排列
            • \t
            • lists[i].length 的总和不超过 10^4
            ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "\npublic class ListNode {\n\tint val;\n\tListNode next;\n\n\tListNode() {\n\t}\n\n\tListNode(int val) {\n\t\tthis.val = val;\n\t}\n\n\tListNode(int val, ListNode next) {\n\t\tthis.val = val;\n\t\tthis.next = next;\n\t}\n}\n\nclass Solution {\n\tpublic ListNode mergeKLists(ListNode[] lists) {\n\t\tif (lists.length == 0)\n\t\t\treturn null;\n\n\t\treturn merge(lists, 0, lists.length - 1);\n\t}\n\n\tpublic ListNode merge(ListNode[] lists, int low, int high) {\n\t\tif (high - low == 0)\n\t\t\treturn lists[low];\n\t\telse if (high - low == 1)\n\t\t\treturn mergeTwoLists(lists[low], lists[high]);\n\t\telse {\n\t\t\tint mid = (low + high) / 2;\n\t\t\tListNode tmp1 = merge(lists, low, mid);\n\t\t\tListNode tmp2 = merge(lists, mid + 1, high);\n\t\t\treturn mergeTwoLists(tmp1, tmp2);\n\t\t}\n\t}\n\n\tpublic ListNode mergeTwoLists(ListNode l1, ListNode l2) {\n\t\tListNode head = new ListNode();\n\t\tListNode p = head;\n\t\twhile (l1 != null && l2 != null) {\n\t\t\tif (l1.val > l2.val) {\n\t\t\t\tp.next = l2;\n\t\t\t\tl2 = l2.next;\n\t\t\t\tp = p.next;\n\t\t\t} else {\n\t\t\t\tp.next = l1;\n\t\t\t\tl1 = l1.next;\n\t\t\t\tp = p.next;\n\t\t\t}\n\t\t}\n\t\tif (l1 != null)\n\t\t\tp.next = l1;\n\t\tif (l2 != null)\n\t\t\tp.next = l2;\n\t\treturn head.next;\n\t}\n}\n", + "language": "java" + }, + "node_id": "dailycode-8e1e5071f1df4857ab3fbc97910498be", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470116" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/18.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/18.exercises/config.json" new file mode 100644 index 000000000..5514d9183 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/18.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-cb66e1d1a6c34674889f140de4b21ac1", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/18.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/18.exercises/solution.json" new file mode 100644 index 000000000..802e86fc3 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/18.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "94b082feff6a40fca932cef0969ef627", + "keywords": "递归,数学", + "title": "排列序列", + "desc": [ + { + "content": "\n

            给出集合 [1,2,3,...,n],其所有元素共有 n! 种排列。

            按大小顺序列出所有排列情况,并一一标记,当 n = 3 时, 所有排列如下:

              \t
            1. \"123\"
            2. \t
            3. \"132\"
            4. \t
            5. \"213\"
            6. \t
            7. \"231\"
            8. \t
            9. \"312\"
            10. \t
            11. \"321\"

            给定 n 和 k,返回第 k 个排列。

             

            示例 1:

            输入:n = 3, k = 3
            输出:
            \"213\"

            示例 2:

            输入:n = 4, k = 9
            输出:
            \"2314\"

            示例 3:

            输入:n = 3, k = 1
            输出:
            \"123\"

             

            提示:

              \t
            • 1 <= n <= 9
            • \t
            • 1 <= k <= n!
            ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic String getPermutation(int n, int k) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tList candidates = new ArrayList<>();\n\t\tint[] factorials = new int[n + 1];\n\t\tfactorials[0] = 1;\n\t\tint fact = 1;\n\t\tfor (int i = 1; i <= n; ++i) {\n\t\t\tcandidates.add(i);\n\t\t\tfact *= i;\n\t\t\tfactorials[i] = fact;\n\t\t}\n\t\tk -= 1;\n\t\tfor (int i = n - 1; i >= 0; --i) {\n\t\t\tint index = k / factorials[i];\n\t\t\tsb.append(candidates.remove(index));\n\t\t\tk -= index * factorials[i];\n\t\t}\n\t\treturn sb.toString();\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-cb66e1d1a6c34674889f140de4b21ac1", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600471016" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/19.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/19.exercises/config.json" new file mode 100644 index 000000000..e62b0820b --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/19.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-c3538ac1b9744b19b8a09ca75457aec4", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/19.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/19.exercises/solution.json" new file mode 100644 index 000000000..a65d3529a --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/19.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "327a77e1fdf6497babc53aa8be200423", + "keywords": "贪心,递归,字符串,动态规划", + "title": "通配符匹配", + "desc": [ + { + "content": "\n

            给定一个字符串 (s) 和一个字符模式 (p) ,实现一个支持 '?' 和 '*' 的通配符匹配。

            '?' 可以匹配任何单个字符。'*' 可以匹配任意字符串(包括空字符串)。

            两个字符串完全匹配才算匹配成功。

            说明:

              \t
            • s 可能为空,且只包含从 a-z 的小写字母。
            • \t
            • p 可能为空,且只包含从 a-z 的小写字母,以及字符 ? 和 *

            示例 1:

            输入:s = "aa"p = "a"
            输出:
            false
            解释:
            "a" 无法匹配 "aa" 整个字符串。

            示例 2:

            输入:s = "aa"p = "*"
            输出:
            true
            解释:
             '*' 可以匹配任意字符串。

            示例 3:

            输入:s = "cb"p = "?a"
            输出:
            false
            解释:
             '?' 可以匹配 'c', 但第二个 'a' 无法匹配 'b'。

            示例 4:

            输入:s = "adceb"p = "*a*b"
            输出:
            true
            解释:
             第一个 '*' 可以匹配空字符串, 第二个 '*' 可以匹配字符串 "dce".

            示例 5:

            输入:s = "acdcb"p = "a*c?b"
            输出:
            false
            ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic boolean isMatch(String s, String p) {\n\t\tboolean[][] value = new boolean[p.length() + 1][s.length() + 1];\n\t\tvalue[0][0] = true;\n\t\tfor (int i = 1; i <= s.length(); i++) {\n\t\t\tvalue[0][i] = false;\n\t\t}\n\t\tfor (int i = 1; i <= p.length(); i++) {\n\t\t\tif (p.charAt(i - 1) == '*') {\n\t\t\t\tvalue[i][0] = value[i - 1][0];\n\t\t\t\tfor (int j = 1; j <= s.length(); j++) {\n\t\t\t\t\tvalue[i][j] = (value[i][j - 1] || value[i - 1][j]);\n\t\t\t\t}\n\t\t\t} else if (p.charAt(i - 1) == '?') {\n\t\t\t\tvalue[i][0] = false;\n\t\t\t\tfor (int j = 1; j <= s.length(); j++) {\n\t\t\t\t\tvalue[i][j] = value[i - 1][j - 1];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tvalue[i][0] = false;\n\t\t\t\tfor (int j = 1; j <= s.length(); j++) {\n\t\t\t\t\tvalue[i][j] = s.charAt(j - 1) == p.charAt(i - 1) && value[i - 1][j - 1];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn value[p.length()][s.length()];\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-c3538ac1b9744b19b8a09ca75457aec4", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600471019" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/2.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/2.exercises/config.json" new file mode 100644 index 000000000..968b1b458 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/2.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-f08ed7a411b948daa662d0e8cd0a0948", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/2.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/2.exercises/solution.json" new file mode 100644 index 000000000..54b3f24b5 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/2.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "39ad92901f2543a585b47c5dcf7731c4", + "keywords": "栈,数组,双指针,动态规划,单调栈", + "title": "接雨水", + "desc": [ + { + "content": "\n

            给定 n 个非负整数表示每个宽度为 1 的柱子的高度图,计算按此排列的柱子,下雨之后能接多少雨水。

             

            示例 1:

            输入:height = [0,1,0,2,1,0,1,3,2,1,2,1]
            输出:
            6
            解释:
            上面是由数组 [0,1,0,2,1,0,1,3,2,1,2,1] 表示的高度图,在这种情况下,可以接 6 个单位的雨水(蓝色部分表示雨水)。

            示例 2:

            输入:height = [4,2,0,3,2,5]
            输出:
            9

             

            提示:

              \t
            • n == height.length
            • \t
            • 0 <= n <= 3 * 104
            • \t
            • 0 <= height[i] <= 105
            ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic int trap(int[] height) {\n\t\tif (height == null)\n\t\t\treturn 0;\n\t\tint len = height.length;\n\t\tif (len == 0)\n\t\t\treturn 0;\n\t\tint res = 0;\n\t\tint[] left_max = new int[len];\n\t\tint[] right_max = new int[len];\n\t\tleft_max[0] = height[0];\n\n\t\tfor (int i = 1; i < len; i++) {\n\t\t\tleft_max[i] = Math.max(height[i], left_max[i - 1]);\n\t\t}\n\t\tright_max[len - 1] = height[len - 1];\n\n\t\tfor (int i = len - 2; i >= 0; i--) {\n\t\t\tright_max[i] = Math.max(height[i], right_max[i + 1]);\n\t\t}\n\n\t\tfor (int i = 1; i < len - 1; i++) {\n\t\t\tres += Math.min(left_max[i], right_max[i]) - height[i];\n\t\t}\n\t\treturn res;\n\t}\n}\n", + "language": "java" + }, + "node_id": "dailycode-f08ed7a411b948daa662d0e8cd0a0948", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470120" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/20.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/20.exercises/config.json" new file mode 100644 index 000000000..69fa9b92a --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/20.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-a17a04b98de344dd8c8ee681f8bb05d8", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/20.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/20.exercises/solution.json" new file mode 100644 index 000000000..ab0dee1e1 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/20.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "9ce2cdfa6aa54365ad791feddc781d03", + "keywords": "递归,字符串,动态规划", + "title": "正则表达式匹配", + "desc": [ + { + "content": "\n

            给你一个字符串 s 和一个字符规律 p,请你来实现一个支持 '.' 和 '*' 的正则表达式匹配。

              \t
            • '.' 匹配任意单个字符
            • \t
            • '*' 匹配零个或多个前面的那一个元素

            所谓匹配,是要涵盖 整个 字符串 s的,而不是部分字符串。

            示例 1:

            输入:s = \"aa\" p = \"a\"
            输出:
            false
            解释:
            \"a\" 无法匹配 \"aa\" 整个字符串。

            示例 2:

            输入:s = \"aa\" p = \"a*\"
            输出:
            true
            解释:
            因为 '*' 代表可以匹配零个或多个前面的那一个元素, 在这里前面的元素就是 'a'。因此,字符串 \"aa\" 可被视为 'a' 重复了一次。

            示例 3:

            输入:s = \"ab\" p = \".*\"
            输出:
            true
            解释:
            \".*\" 表示可匹配零个或多个('*')任意字符('.')。

            示例 4:

            输入:s = \"aab\" p = \"c*a*b\"
            输出:
            true
            解释:
            因为 '*' 表示零个或多个,这里 'c' 为 0 个, 'a' 被重复一次。因此可以匹配字符串 \"aab\"。

            示例 5:

            输入:s = \"mississippi\" p = \"mis*is*p*.\"
            输出:
            false

             

            提示:

              \t
            • 0 <= s.length <= 20
            • \t
            • 0 <= p.length <= 30
            • \t
            • s 可能为空,且只包含从 a-z 的小写字母。
            • \t
            • p 可能为空,且只包含从 a-z 的小写字母,以及字符 . 和 *
            • \t
            • 保证每次出现字符 * 时,前面都匹配到有效的字符
            ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic boolean isMatch(String s, String p) {\n\t\tif (p.length() == 0)\n\t\t\treturn s.length() == 0;\n\t\tboolean head_match = s.length() > 0 && (s.charAt(0) == p.charAt(0) || p.charAt(0) == '.');\n\t\tif (p.length() > 1 && p.charAt(1) == '*') {\n\t\t\treturn (head_match && isMatch(s.substring(1), p)) || isMatch(s, p.substring(2));\n\t\t} else {\n\t\t\treturn head_match && isMatch(s.substring(1), p.substring(1));\n\t\t}\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-a17a04b98de344dd8c8ee681f8bb05d8", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470835" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/3.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/3.exercises/config.json" new file mode 100644 index 000000000..30bdc4890 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/3.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-68470d3e20c241688ad0845c6625335a", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/3.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/3.exercises/solution.json" new file mode 100644 index 000000000..8bfac8539 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/3.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "2bdd64d23f78480e80254cf65268034c", + "keywords": "栈,数组,单调栈", + "title": "柱状图中最大的矩形", + "desc": [ + { + "content": "\n

            给定 n 个非负整数,用来表示柱状图中各个柱子的高度。每个柱子彼此相邻,且宽度为 1 。

            求在该柱状图中,能够勾勒出来的矩形的最大面积。

             

            以上是柱状图的示例,其中每个柱子的宽度为 1,给定的高度为 [2,1,5,6,2,3]

             

            图中阴影部分为所能勾勒出的最大矩形面积,其面积为 10 个单位。

             

            示例:

            输入: [2,1,5,6,2,3]
            输出:
            10
            ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic int largestRectangleArea(int[] heights) {\n\t\tint length = heights.length;\n\t\tif (length == 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tint maxSize = 0;\n\t\tfor (int i = 0; i < length; i++) {\n\t\t\tint nowHeight = heights[i];\n\t\t\tint nowWidth = 0;\n\t\t\tfor (int j = i; j < length; j++) {\n\t\t\t\tif (heights[j] < nowHeight) {\n\t\t\t\t\tnowHeight = heights[j];\n\t\t\t\t}\n\t\t\t\tnowWidth++;\n\t\t\t\tif (maxSize < nowHeight * nowWidth) {\n\t\t\t\t\tmaxSize = nowHeight * nowWidth;\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\treturn maxSize;\n\t}\n}\n", + "language": "java" + }, + "node_id": "dailycode-68470d3e20c241688ad0845c6625335a", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600471006" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/4.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/4.exercises/config.json" new file mode 100644 index 000000000..7bd9810d4 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/4.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-b18ab4eee6fa4810bde94c8fdb529674", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/4.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/4.exercises/solution.json" new file mode 100644 index 000000000..2b8bd9053 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/4.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "f7d3db8318c54035bd59132cc7be4c14", + "keywords": "数组,哈希表", + "title": "缺失的第一个正数", + "desc": [ + { + "content": "\n

            给你一个未排序的整数数组 nums ,请你找出其中没有出现的最小的正整数。

             

            进阶:你可以实现时间复杂度为 O(n) 并且只使用常数级别额外空间的解决方案吗?

             

            示例 1:

            输入:nums = [1,2,0]
            输出:
            3

            示例 2:

            输入:nums = [3,4,-1,1]
            输出:
            2

            示例 3:

            输入:nums = [7,8,9,11,12]
            输出:
            1

             

            提示:

              \t
            • 0 <= nums.length <= 300
            • \t
            • -231 <= nums[i] <= 231 - 1
            ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic int firstMissingPositive(int[] nums) {\n\t\tint n = nums.length;\n\t\tint contains = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tif (nums[i] == 1) {\n\t\t\t\tcontains++;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (contains == 0) {\n\t\t\treturn 1;\n\t\t}\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tif ((nums[i] <= 0) || (nums[i] > n)) {\n\t\t\t\tnums[i] = 1;\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint a = Math.abs(nums[i]);\n\t\t\tnums[a - 1] = -Math.abs(nums[a - 1]);\n\t\t}\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tif (nums[i] > 0) {\n\t\t\t\treturn i + 1;\n\t\t\t}\n\t\t}\n\t\treturn n + 1;\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-b18ab4eee6fa4810bde94c8fdb529674", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470223" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/5.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/5.exercises/config.json" new file mode 100644 index 000000000..f6a9458fe --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/5.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-71a1af0422c54a1a9fa6959b4dcb04fc", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/5.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/5.exercises/solution.json" new file mode 100644 index 000000000..2af56943a --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/5.exercises/solution.json" @@ -0,0 +1,80 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "6d30912d9be04c818e000311290651d0", + "keywords": "回溯", + "title": "N皇后 II", + "desc": [ + { + "content": "\n
            \n

            n 皇后问题 研究的是如何将 n 个皇后放置在 n×n 的棋盘上,并且使皇后彼此之间不能相互攻击。

            ", + "language": "markdown" + }, + { + "content": "\n

            给你一个整数 n ,返回 n 皇后问题 不同的解决方案的数量。

            ", + "language": "markdown" + }, + { + "content": "\n

             

            ", + "language": "markdown" + }, + { + "content": "\n
            \n
            \n

            示例 1:

            \n\n
            输入:n = 4\n输出:2\n解释:如上图所示,4 皇后问题存在两个不同的解法。\n
            ", + "language": "markdown" + }, + { + "content": "\n

            示例 2:

            ", + "language": "markdown" + }, + { + "content": "\n
            输入:n = 1\n输出:1\n
            ", + "language": "markdown" + }, + { + "content": "\n

             

            ", + "language": "markdown" + }, + { + "content": "\n

            提示:

            ", + "language": "markdown" + }, + { + "content": "\n
              \n
            • 1 <= n <= 9
            • \n
            • 皇后彼此不能相互攻击,也就是说:任何两个皇后都不能处于同一条横行、纵行或斜线上。
            • \n
            \n
            \n
            \n
            ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tprivate boolean col[];\n\tprivate boolean dia1[];\n\tprivate boolean dia2[];\n\tpublic int totalNQueens(int n) {\n\t\tcol = new boolean[n];\n\t\tdia1 = new boolean[2 * n - 1];\n\t\tdia2 = new boolean[2 * n - 1];\n\t\treturn putQueen(n, 0);\n\t}\n\tprivate int putQueen(int n, int index) {\n\t\tint res = 0;\n\t\tif (index == n) {\n\t\t\treturn 1;\n\t\t}\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tif (!col[i] && !dia1[i - index + n - 1] && !dia2[i + index]) {\n\t\t\t\tcol[i] = true;\n\t\t\t\tdia1[i - index + n - 1] = true;\n\t\t\t\tdia2[i + index] = true;\n\t\t\t\tres += putQueen(n, index + 1);\n\t\t\t\tcol[i] = false;\n\t\t\t\tdia1[i - index + n - 1] = false;\n\t\t\t\tdia2[i + index] = false;\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-71a1af0422c54a1a9fa6959b4dcb04fc", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470922" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/6.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/6.exercises/config.json" new file mode 100644 index 000000000..068841f25 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/6.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-2b10d595b0864b389f2455cd580078d3", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/6.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/6.exercises/solution.json" new file mode 100644 index 000000000..605e377d4 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/6.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "9f009f18fba4442a99412d52adc4e3ec", + "keywords": "栈,数组,动态规划,矩阵,单调栈", + "title": "最大矩形", + "desc": [ + { + "content": "\n

            给定一个仅包含 01 、大小为 rows x cols 的二维二进制矩阵,找出只包含 1 的最大矩形,并返回其面积。

             

            示例 1:

            \"\"
            输入:matrix = [[\"1\",\"0\",\"1\",\"0\",\"0\"],[\"1\",\"0\",\"1\",\"1\",\"1\"],[\"1\",\"1\",\"1\",\"1\",\"1\"],[\"1\",\"0\",\"0\",\"1\",\"0\"]]
            输出:
            6
            解释:
            最大矩形如上图所示。

            示例 2:

            输入:matrix = []
            输出:
            0

            示例 3:

            输入:matrix = [[\"0\"]]
            输出:
            0

            示例 4:

            输入:matrix = [[\"1\"]]
            输出:
            1

            示例 5:

            输入:matrix = [[\"0\",\"0\"]]
            输出:
            0

             

            提示:

              \t
            • rows == matrix.length
            • \t
            • cols == matrix[0].length
            • \t
            • 0 <= row, cols <= 200
            • \t
            • matrix[i][j]'0''1'
            ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic int maximalRectangle(char[][] matrix) {\n\t\tif (matrix == null || matrix.length == 0)\n\t\t\treturn 0;\n\t\tint m = matrix.length;\n\t\tint n = matrix[0].length;\n\t\tint[] left = new int[n];\n\t\tint[] right = new int[n];\n\t\tint[] height = new int[n];\n\t\tArrays.fill(right, n);\n\t\tint cur_left = 0;\n\t\tint cur_right = n;\n\t\tint res = 0;\n\t\tfor (int i = 0; i < m; i++) {\n\t\t\tcur_left = 0;\n\t\t\tcur_right = n;\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\tif (matrix[i][j] == '1')\n\t\t\t\t\theight[j]++;\n\t\t\t\telse\n\t\t\t\t\theight[j] = 0;\n\t\t\t}\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\tif (matrix[i][j] == '1') {\n\t\t\t\t\tleft[j] = Math.max(left[j], cur_left);\n\t\t\t\t} else {\n\t\t\t\t\tleft[j] = 0;\n\t\t\t\t\tcur_left = j + 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (int j = n - 1; j >= 0; j--) {\n\t\t\t\tif (matrix[i][j] == '1') {\n\t\t\t\t\tright[j] = Math.min(right[j], cur_right);\n\t\t\t\t} else {\n\t\t\t\t\tright[j] = n;\n\t\t\t\t\tcur_right = j;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (int j = 0; j < n; j++)\n\t\t\t\tres = Math.max(res, (right[j] - left[j]) * height[j]);\n\t\t}\n\t\treturn res;\n\t}\n}\n", + "language": "java" + }, + "node_id": "dailycode-2b10d595b0864b389f2455cd580078d3", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470828" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/7.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/7.exercises/config.json" new file mode 100644 index 000000000..bb6eb797c --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/7.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-409cdde69271474ba4fa13f4d4e49b85", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/7.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/7.exercises/solution.json" new file mode 100644 index 000000000..5b2c03557 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/7.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "b3e4c3bb1c7c4b92818ab5d666891a74", + "keywords": "字符串,动态规划", + "title": "编辑距离", + "desc": [ + { + "content": "\n

            给你两个单词 word1 和 word2,请你计算出将 word1 转换成 word2 所使用的最少操作数 。

            你可以对一个单词进行如下三种操作:

              \t
            • 插入一个字符
            • \t
            • 删除一个字符
            • \t
            • 替换一个字符

             

            示例 1:

            输入:word1 = \"horse\", word2 = \"ros\"
            输出:
            3
            解释:
            horse -> rorse (将 'h' 替换为 'r')rorse -> rose (删除 'r')rose -> ros (删除 'e')

            示例 2:

            输入:word1 = \"intention\", word2 = \"execution\"
            输出:
            5
            解释:
            intention -> inention (删除 't')inention -> enention (将 'i' 替换为 'e')enention -> exention (将 'n' 替换为 'x')exention -> exection (将 'n' 替换为 'c')exection -> execution (插入 'u')

             

            提示:

              \t
            • 0 <= word1.length, word2.length <= 500
            • \t
            • word1word2 由小写英文字母组成
            ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic int minDistance(String word1, String word2) {\n\t\tint len1 = word1.length();\n\t\tint len2 = word2.length();\n\n\t\tif (len1 * len2 == 0)\n\t\t\treturn len1 + len2;\n\t\tString longerStr = len1 > len2 ? word1 : word2;\n\t\tString shorterStr = len1 > len2 ? word2 : word1;\n\t\tint shorterOne = Math.min(len1, len2);\n\n\t\tint[] dp = new int[shorterOne + 1];\n\n\t\tfor (int i = 0; i < shorterOne + 1; i++) {\n\t\t\tdp[i] = i;\n\t\t}\n\n\t\tfor (int j = 1; j <= longerStr.length(); j++) {\n\n\t\t\tint left = j;\n\n\t\t\tfor (int i = 1; i <= shorterStr.length(); i++) {\n\t\t\t\tint updateDown = dp[i] + 1;\n\t\t\t\tint updateLeft = left + 1;\n\t\t\t\tint updateLeftDown = dp[i - 1];\n\n\t\t\t\tif (longerStr.charAt(j - 1) != shorterStr.charAt(i - 1)) {\n\t\t\t\t\tupdateLeftDown++;\n\t\t\t\t}\n\n\t\t\t\tint min = Math.min(updateLeft, Math.min(updateDown, updateLeftDown));\n\n\t\t\t\tdp[i - 1] = left;\n\n\t\t\t\tif (i == dp.length - 1) {\n\t\t\t\t\tdp[i] = min;\n\t\t\t\t} else {\n\n\t\t\t\t\tleft = min;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn dp[shorterOne];\n\t}\n}\n", + "language": "java" + }, + "node_id": "dailycode-409cdde69271474ba4fa13f4d4e49b85", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600470829" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/8.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/8.exercises/config.json" new file mode 100644 index 000000000..7bafb3a57 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/8.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-c428b0172c424f6da1ad761783cbaf41", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/8.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/8.exercises/solution.json" new file mode 100644 index 000000000..a97488841 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/8.exercises/solution.json" @@ -0,0 +1,92 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "e19e7ed951034cb694e26ae1f81448e1", + "keywords": "字符串,模拟", + "title": "文本左右对齐", + "desc": [ + { + "content": "\n
            \n

            给定一个单词数组和一个长度 maxWidth,重新排版单词,使其成为每行恰好有 maxWidth 个字符,且左右两端对齐的文本。

            ", + "language": "markdown" + }, + { + "content": "\n

            你应该使用“贪心算法”来放置给定的单词;也就是说,尽可能多地往每行中放置单词。必要时可用空格 ' ' 填充,使得每行恰好有 maxWidth 个字符。\n

            ", + "language": "markdown" + }, + { + "content": "\n

            要求尽可能均匀分配单词间的空格数量。如果某一行单词间的空格不能均匀分配,则左侧放置的空格数要多于右侧的空格数。

            ", + "language": "markdown" + }, + { + "content": "\n

            文本的最后一行应为左对齐,且单词之间不插入额外的空格。

            ", + "language": "markdown" + }, + { + "content": "\n

            说明:

            ", + "language": "markdown" + }, + { + "content": "\n
              \n
            • 单词是指由非空格字符组成的字符序列。
            • \n
            • 每个单词的长度大于 0,小于等于 maxWidth
            • \n
            • 输入单词数组 words 至少包含一个单词。
            • \n
            ", + "language": "markdown" + }, + { + "content": "\n

            示例:

            ", + "language": "markdown" + }, + { + "content": "\n
            输入:\nwords = [\"This\", \"is\", \"an\", \"example\", \"of\", \"text\", \"justification.\"]\nmaxWidth = 16\n输出:\n[\n   \"This    is    an\",\n   \"example  of text\",\n   \"justification.  \"\n]\n
            ", + "language": "markdown" + }, + { + "content": "\n

            示例 2:

            ", + "language": "markdown" + }, + { + "content": "\n
            输入:\nwords = [\"What\",\"must\",\"be\",\"acknowledgment\",\"shall\",\"be\"]\nmaxWidth = 16\n输出:\n[\n  \"What   must   be\",\n  \"acknowledgment  \",\n  \"shall be        \"\n]\n解释: 注意最后一行的格式应为 \"shall be    \" 而不是 \"shall     be\"\n因为最后一行应为左对齐,而不是左右两端对齐,第二行同样为左对齐,这是因为这行只包含一个单词。\n
            ", + "language": "markdown" + }, + { + "content": "\n

            示例 3:

            ", + "language": "markdown" + }, + { + "content": "\n
            输入:\nwords = [\"Science\",\"is\",\"what\",\"we\",\"understand\",\"well\",\"enough\",\"to\",\"explain\",\n         \"to\",\"a\",\"computer.\",\"Art\",\"is\",\"everything\",\"else\",\"we\",\"do\"]\nmaxWidth = 20\n输出:\n[\n  \"Science  is  what we\",\n\"understand      well\",\n  \"enough to explain to\",\n  \"a  computer.  Art is\",\n  \"everything  else  we\",\n  \"do                  \"\n]\n
            \n
            ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "class Solution {\n\tpublic List fullJustify(String[] words, int maxWidth) {\n\t\tList ret = new ArrayList<>();\n\t\tint index = 0;\n\t\twhile (index < words.length) {\n\t\t\tint cur = index, len = 0;\n\t\t\twhile (cur < words.length && len + words[cur].length() + cur - index <= maxWidth) {\n\t\t\t\tlen = len + words[cur++].length();\n\t\t\t}\n\t\t\tcur--;\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tif (cur == words.length - 1) {\n\t\t\t\tfor (int i = index; i <= cur; i++) {\n\t\t\t\t\tsb.append(words[i]);\n\t\t\t\t\tif (i < cur) {\n\t\t\t\t\t\tsb.append(' ');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tint base = cur > index ? (maxWidth - len) / (cur - index) : (maxWidth - len);\n\t\t\t\tString baseStr = genSpace(base);\n\t\t\t\tint left = cur > index ? (maxWidth - len) % (cur - index) : 0;\n\t\t\t\tString leftStr = genSpace(base + 1);\n\t\t\t\tfor (int i = index; i <= cur; i++) {\n\t\t\t\t\tsb.append(words[i]);\n\t\t\t\t\tif (i < cur) {\n\t\t\t\t\t\tsb.append(left > 0 ? leftStr : baseStr);\n\t\t\t\t\t\tleft--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (sb.length() < maxWidth) {\n\t\t\t\tsb.append(genSpace(maxWidth - sb.length()));\n\t\t\t}\n\t\t\tret.add(sb.toString());\n\t\t\tindex = cur + 1;\n\t\t}\n\t\treturn ret;\n\t}\n\tprivate String genSpace(int n) {\n\t\tchar[] cs = new char[n];\n\t\tArrays.fill(cs, ' ');\n\t\treturn new String(cs);\n\t}\n}", + "language": "java" + }, + "node_id": "dailycode-c428b0172c424f6da1ad761783cbaf41", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470798" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/9.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/9.exercises/config.json" new file mode 100644 index 000000000..fbb463d62 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/9.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-f0f4aec713b24926bd8c1a5761778352", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/9.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/9.exercises/solution.json" new file mode 100644 index 000000000..a85110862 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/2.java/9.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "71887203923d4261ac0132359d942b06", + "keywords": "栈,字符串,动态规划", + "title": "最长有效括号", + "desc": [ + { + "content": "\n

            给你一个只包含 '(' 和 ')' 的字符串,找出最长有效(格式正确且连续)括号子串的长度。

             

            示例 1:

            输入:s = \"(()\"
            输出:
            2
            解释:
            最长有效括号子串是 \"()\"

            示例 2:

            输入:s = \")()())\"
            输出:
            4
            解释:
            最长有效括号子串是 \"()()\"

            示例 3:

            输入:s = \"\"
            输出:
            0

             

            提示:

              \t
            • 0 <= s.length <= 3 * 104
            • \t
            • s[i]'('')'
            ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "java" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ], + [ + { + "content": "", + "language": "java" + } + ] + ], + "template": { + "content": "import java.util.*;\n\nclass Solution {\n\tpublic int longestValidParentheses(String s) {\n\t\tint left = 0, right = 0, max = 0;\n\t\tfor (int i = 0; i < s.length(); i++) {\n\t\t\tif (s.charAt(i) == '(')\n\t\t\t\tleft++;\n\t\t\telse\n\t\t\t\tright++;\n\t\t\tif (left == right)\n\t\t\t\tmax = Math.max(max, left * 2);\n\t\t\tif (right > left)\n\t\t\t\tleft = right = 0;\n\t\t}\n\t\tleft = 0;\n\t\tright = 0;\n\t\tfor (int i = s.length() - 1; i >= 0; i--) {\n\t\t\tif (s.charAt(i) == '(')\n\t\t\t\tleft++;\n\t\t\telse\n\t\t\t\tright++;\n\t\t\tif (left == right)\n\t\t\t\tmax = Math.max(max, left * 2);\n\t\t\tif (right < left)\n\t\t\t\tleft = right = 0;\n\t\t}\n\t\treturn max;\n\t}\n}\n", + "language": "java" + }, + "node_id": "dailycode-f0f4aec713b24926bd8c1a5761778352", + "license": "csdn.net", + "created_at": 1637894159, + "topic_link": "https://bbs.csdn.net/topics/600471008" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/1.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/1.exercises/config.json" new file mode 100644 index 000000000..97d62173e --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/1.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-140f8cff6c77471a9b56168e6219d7e3", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/1.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/1.exercises/solution.json" new file mode 100644 index 000000000..32bb06e0d --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/1.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "3eb2527a26be4b9e8b24ade9a1e4b9f6", + "keywords": "图算法,算法高阶,图的表示,基本的图算法", + "title": "迷宫问题,需要用递归", + "desc": [ + { + "content": "\n

            问题描述:一只老鼠在一个n×n迷宫的入口处,它想要吃迷宫出口处放着奶酪,问这只老鼠能否吃到奶酪?如果可以吃到,请给出一条从入口到奶酪的路径。\n思考:解决问题之前,我们首先要做的就是仔细研究问题,找出问题的已知条件和要得到的是什么。和解数学问题、物理问题一样要先弄懂问题。那么,老鼠走迷宫问题的已知条件有什么呢?\n数学模型重新定义问题:\n问题:问老鼠能否吃到奶酪就是问能否找到一条从迷宫入口到出口的路径。如果不能找到,那么老鼠就吃不到奶酪;如果能够找到,那么就给出这条路径。\n观察10×10的迷宫。这个迷宫其实是由10×10=100个格子组成的,其中绿色格子代表墙,白色格子代表路,如图(1)所示。“绿色格子代表墙,白色格子代表路”是用语言形式描述的,需要转换成数学的形式。用1和0分别定义绿色格子和白色格子,可以得到如图(2)的迷宫。\n将上面10×10的迷宫定义为如下的二维数组,即\nm[10][10]=[1,1,1,0,1,1,1,1,1,1,\n1,0,0,0,0,0,0,0,1,1,\n1,0,1,1,1,1,1,0,0,1,\n1,0,1,0,0,0,0,1,0,1,\n1,0,1,0,1,1,0,0,0,1,\n1,0,0,1,1,0,1,0,1,1,\n1,1,1,1,0,0,0,0,1,1,\n1,0,0,0,0,1,1,1,0,0,\n1,0,1,1,0,0,0,0,0,1,\n1,1,1,1,1,1,1,1,1,1]\n有了对迷宫的数学定义,就可以很简单的定义迷宫的入口和出口了。迷宫的入口是m[0][3],出口是m[7][9]。老鼠走迷宫问题就是要找一条从入口到出口的路径,如果存在就返回这条路径;如果不存在,就返回不存在这种路径。也就是说,要在二维数组m中找一条从m[0][3]到m[7][9]全部为0的路径。\n请使用递归解决迷宫路径查找问题。\n

            ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "def maze(m, n, route, pos, export):\n\t\"\"\"走迷宫\n\tm\t - 迷宫数组,列表\n\tn\t - 迷宫阶数\n\troute - 可能的路线,列表\n\tpos\t - 当前位置,元组\n\texport - 出口位置,元组\n\t\"\"\"\n\troute.append(pos)\n\tif pos == export:\n\t\tprint(route)\n\tif pos[0] > 0 and m[pos[0]-1][pos[1]] == 0 and (pos[0]-1,pos[1]) not in route:\n\t\tmaze(m, n, route[:], (pos[0]-1,pos[1]), export)\n\tif pos[0] < n-1 and m[pos[0]+1][pos[1]] == 0 and (pos[0]+1,pos[1]) not in route:\n\t\tmaze(m, n, route[:], (pos[0]+1,pos[1]), export)\n\tif pos[1] > 0 and m[pos[0]][pos[1]-1] == 0 and (pos[0],pos[1]-1) not in route:\n\t\tmaze(m, n, route[:], (pos[0],pos[1]-1), export)\n\tif pos[1] < n-1 and m[pos[0]][pos[1]+1] == 0 and (pos[0],pos[1]+1) not in route:\n\t\tmaze(m, n, route[:], (pos[0],pos[1]+1), export)\nm = [\n\t[1,1,1,0,1,1,1,1,1,1], \n\t[1,0,0,0,0,0,0,0,1,1], \n\t[1,0,1,1,1,1,1,0,0,1], \n\t[1,0,1,0,0,0,0,1,0,1], \n\t[1,0,1,0,1,1,0,0,0,1], \n\t[1,0,0,1,1,0,1,0,1,1], \n\t[1,1,1,1,0,0,0,0,1,1], \n\t[1,0,0,0,0,1,1,1,0,0], \n\t[1,0,1,1,0,0,0,0,0,1], \n\t[1,1,1,1,1,1,1,1,1,1] \n]\nmaze(m, len(m), list(), (0,3), (7,9))", + "language": "python" + }, + "node_id": "dailycode-140f8cff6c77471a9b56168e6219d7e3", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470402" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/10.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/10.exercises/config.json" new file mode 100644 index 000000000..a2508cb41 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/10.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-fb770b2715ca4e9ba76c2cd455ef8578", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/10.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/10.exercises/solution.json" new file mode 100644 index 000000000..fc8b319d9 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/10.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "2a073ce974ee4ef78251d2d44a96be6c", + "keywords": "栈,字符串,动态规划", + "title": "最长有效括号", + "desc": [ + { + "content": "\n

            给你一个只包含 '(' 和 ')' 的字符串,找出最长有效(格式正确且连续)括号子串的长度。

             

            示例 1:

            输入:s = \"(()\"
            输出:
            2
            解释:
            最长有效括号子串是 \"()\"

            示例 2:

            输入:s = \")()())\"
            输出:
            4
            解释:
            最长有效括号子串是 \"()()\"

            示例 3:

            输入:s = \"\"
            输出:
            0

             

            提示:

              \t
            • 0 <= s.length <= 3 * 104
            • \t
            • s[i]'('')'
            ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "import pdb\nclass Solution(object):\n\tdef longestValidParentheses(self, s):\n\t\tls = len(s)\n\t\tstack = []\n\t\tdata = [0] * ls\n\t\tfor i in range(ls):\n\t\t\tcurr = s[i]\n\t\t\tif curr == '(':\n\t\t\t\tstack.append(i)\n\t\t\telse:\n\t\t\t\tif len(stack) > 0:\n\t\t\t\t\tdata[i] = 1\n\t\t\t\t\tdata[stack.pop(-1)] = 1\n\t\ttep, res = 0, 0\n\t\tfor t in data:\n\t\t\tif t == 1:\n\t\t\t\ttep += 1\n\t\t\telse:\n\t\t\t\tres = max(tep, res)\n\t\t\t\ttep = 0\n\t\treturn max(tep, res)\nif __name__ == '__main__':\n\ts = Solution()\n\tprint(s.longestValidParentheses(')()())'))", + "language": "python" + }, + "node_id": "dailycode-fb770b2715ca4e9ba76c2cd455ef8578", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600471008" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/11.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/11.exercises/config.json" new file mode 100644 index 000000000..e16b3f09b --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/11.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-e6620e8ed01649a5b82d5c3f59a366b7", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/11.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/11.exercises/solution.json" new file mode 100644 index 000000000..3e316b80b --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/11.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "9827e15bed994daf9516416d5163b404", + "keywords": "数组,回溯", + "title": "N 皇后", + "desc": [ + { + "content": "\n

            n 皇后问题 研究的是如何将 n 个皇后放置在 n×n 的棋盘上,并且使皇后彼此之间不能相互攻击。

            给你一个整数 n ,返回所有不同的 n 皇后问题 的解决方案。

            每一种解法包含一个不同的 n 皇后问题 的棋子放置方案,该方案中 'Q''.' 分别代表了皇后和空位。

             

            示例 1:

            \"\"
            输入:n = 4
            输出:
            [[\".Q..\",\"...Q\",\"Q...\",\"..Q.\"],[\"..Q.\",\"Q...\",\"...Q\",\".Q..\"]]
            解释:
            如上图所示,4 皇后问题存在两个不同的解法。

            示例 2:

            输入:n = 1
            输出:
            [[\"Q\"]]

             

            提示:

              \t
            • 1 <= n <= 9
            • \t
            • 皇后彼此不能相互攻击,也就是说:任何两个皇后都不能处于同一条横行、纵行或斜线上。
            ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution(object):\n\tdef solveNQueens(self, n):\n\t\tif n == 0:\n\t\t\treturn 0\n\t\tres = []\n\t\tboard = [['.'] * n for t in range(n)]\n\t\tself.do_solveNQueens(res, board, n)\n\t\treturn res\n\tdef do_solveNQueens(self, res, board, num):\n\t\tif num == 0:\n\t\t\tres.append([''.join(t) for t in board])\n\t\t\treturn\n\t\tls = len(board)\n\t\tpos = ls - num\n\t\tcheck = [True] * ls\n\t\tfor i in range(pos):\n\t\t\tfor j in range(ls):\n\t\t\t\tif board[i][j] == 'Q':\n\t\t\t\t\tcheck[j] = False\n\t\t\t\t\tstep = pos - i\n\t\t\t\t\tif j + step < ls:\n\t\t\t\t\t\tcheck[j + step] = False\n\t\t\t\t\tif j - step >= 0:\n\t\t\t\t\t\tcheck[j - step] = False\n\t\t\t\t\tbreak\n\t\tfor j in range(ls):\n\t\t\tif check[j]:\n\t\t\t\tboard[pos][j] = 'Q'\n\t\t\t\tself.do_solveNQueens(res, board, num - 1)\n\t\t\t\tboard[pos][j] = '.'\nif __name__ == '__main__':\n\ts = Solution()\n\tprint (s.solveNQueens(4))", + "language": "python" + }, + "node_id": "dailycode-e6620e8ed01649a5b82d5c3f59a366b7", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470831" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/12.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/12.exercises/config.json" new file mode 100644 index 000000000..ba381d4e2 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/12.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-cf56d018344b4d6598b49593f567d8ec", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/12.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/12.exercises/solution.json" new file mode 100644 index 000000000..72caebf04 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/12.exercises/solution.json" @@ -0,0 +1,92 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "e729adf6a18e49d38cff091fec24807b", + "keywords": "字符串,动态规划", + "title": "扰乱字符串", + "desc": [ + { + "content": "\n
            使用下面描述的算法可以扰乱字符串 s 得到字符串 t :\n
              \n
            1. 如果字符串的长度为 1 ,算法停止
            2. \n
            3. 如果字符串的长度 > 1 ,执行下述步骤:\n
                \n
              • 在一个随机下标处将字符串分割成两个非空的子字符串。即,如果已知字符串 s ,则可以将其分成两个子字符串 xy\n,且满足 s = x + y
              • \n
              • 随机 决定是要「交换两个子字符串」还是要「保持这两个子字符串的顺序不变」。即,在执行这一步骤之后,s 可能是\ns = x + y 或者 s = y + x 。\n
              • \n
              • xy 这两个子字符串上继续从步骤 1 开始递归执行此算法。
              • \n
              \n
            4. \n
            ", + "language": "markdown" + }, + { + "content": "\n

            给你两个 长度相等 的字符串 s1\n和 s2,判断 s2 是否是 s1 的扰乱字符串。如果是,返回\ntrue ;否则,返回 false 。\n

            ", + "language": "markdown" + }, + { + "content": "\n

             

            ", + "language": "markdown" + }, + { + "content": "\n

            示例 1:

            ", + "language": "markdown" + }, + { + "content": "\n
            输入:s1 = \"great\", s2 = \"rgeat\"\n输出:true\n解释:s1 上可能发生的一种情形是:\n\"great\" --> \"gr/eat\" // 在一个随机下标处分割得到两个子字符串\n\"gr/eat\" --> \"gr/eat\" // 随机决定:「保持这两个子字符串的顺序不变」\n\"gr/eat\" --> \"g/r / e/at\" // 在子字符串上递归执行此算法。两个子字符串分别在随机下标处进行一轮分割\n\"g/r / e/at\" --> \"r/g / e/at\" // 随机决定:第一组「交换两个子字符串」,第二组「保持这两个子字符串的顺序不变」\n\"r/g / e/at\" --> \"r/g / e/ a/t\" // 继续递归执行此算法,将 \"at\" 分割得到 \"a/t\"\n\"r/g / e/ a/t\" --> \"r/g / e/ a/t\" // 随机决定:「保持这两个子字符串的顺序不变」\n算法终止,结果字符串和 s2 相同,都是 \"rgeat\"\n这是一种能够扰乱 s1 得到 s2 的情形,可以认为 s2 是 s1 的扰乱字符串,返回 true\n
            ", + "language": "markdown" + }, + { + "content": "\n

            示例 2:

            ", + "language": "markdown" + }, + { + "content": "\n
            输入:s1 = \"abcde\", s2 = \"caebd\"\n输出:false\n
            ", + "language": "markdown" + }, + { + "content": "\n

            示例 3:

            ", + "language": "markdown" + }, + { + "content": "\n
            输入:s1 = \"a\", s2 = \"a\"\n输出:true\n
            ", + "language": "markdown" + }, + { + "content": "\n

             

            ", + "language": "markdown" + }, + { + "content": "\n

            提示:

            ", + "language": "markdown" + }, + { + "content": "\n
              \n
            • s1.length == s2.length
            • \n
            • 1 <= s1.length <= 30
            • \n
            • s1s2 由小写英文字母组成
            • \n
            \n
            ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution(object):\n\tdef isScramble(self, s1, s2, memo={}):\n\t\tif len(s1) != len(s2) or sorted(s1) != sorted(s2):\n\t\t\treturn False\n\t\tif len(s1) <= len(s2) <= 1:\n\t\t\treturn s1 == s2\n\t\tif s1 == s2:\n\t\t\treturn True\n\t\tif (s1, s2) in memo:\n\t\t\treturn memo[s1, s2]\n\t\tn = len(s1)\n\t\tfor i in range(1, n):\n\t\t\ta = self.isScramble(s1[:i], s2[:i], memo) and self.isScramble(s1[i:], s2[i:], memo)\n\t\t\tif not a:\n\t\t\t\tb = self.isScramble(s1[:i], s2[-i:], memo) and self.isScramble(s1[i:], s2[:-i], memo)\n\t\t\tif a or b:\n\t\t\t\tmemo[s1, s2] = True\n\t\t\t\treturn True\n\t\tmemo[s1, s2] = False\n\t\treturn False\n# %%\ns = Solution()\nprint(s.isScramble(s1 = \"great\", s2 = \"rgeat\"))", + "language": "python" + }, + "node_id": "dailycode-cf56d018344b4d6598b49593f567d8ec", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470832" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/13.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/13.exercises/config.json" new file mode 100644 index 000000000..35501b70f --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/13.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-6b7661f648ca47c7a6daec82ae8020f1", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/13.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/13.exercises/solution.json" new file mode 100644 index 000000000..36438c88f --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/13.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "9e3e461bc83f4444ab61d8a39acbf7ec", + "keywords": "递归,链表", + "title": "K 个一组翻转链表", + "desc": [ + { + "content": "\n

            给你一个链表,每 个节点一组进行翻转,请你返回翻转后的链表。

            是一个正整数,它的值小于或等于链表的长度。

            如果节点总数不是 的整数倍,那么请将最后剩余的节点保持原有顺序。

            进阶:

              \t
            • 你可以设计一个只使用常数额外空间的算法来解决此问题吗?
            • \t
            • 你不能只是单纯的改变节点内部的值,而是需要实际进行节点交换。

             

            示例 1:

            \"\"
            输入:head = [1,2,3,4,5], k = 2
            输出:
            [2,1,4,3,5]

            示例 2:

            \"\"
            输入:head = [1,2,3,4,5], k = 3
            输出:
            [3,2,1,4,5]

            示例 3:

            输入:head = [1,2,3,4,5], k = 1
            输出:
            [1,2,3,4,5]

            示例 4:

            输入:head = [1], k = 1
            输出:
            [1]

              提示:

                \t
              • 列表中节点的数量在范围 sz
              • \t
              • 1 <= sz <= 5000
              • \t
              • 0 <= Node.val <= 1000
              • \t
              • 1 <= k <= sz
              ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class ListNode(object):\n\tdef __init__(self, x):\n\t\tself.val = x\n\t\tself.next = None\nclass LinkList:\n\tdef __init__(self):\n\t\tself.head=None\n\tdef initList(self, data):\n\t\tself.head = ListNode(data[0])\n\t\tr=self.head\n\t\tp = self.head\n\t\tfor i in data[1:]:\n\t\t\tnode = ListNode(i)\n\t\t\tp.next = node\n\t\t\tp = p.next\n\t\treturn r\n\tdef\tconvert_list(self,head):\n\t\tret = []\n\t\tif head == None:\n\t\t\treturn\n\t\tnode = head\n\t\twhile node != None:\n\t\t\tret.append(node.val)\n\t\t\tnode = node.next\n\t\treturn ret\nclass Solution(object):\n\tdef reverseKGroup(self, head, k):\n\t\tif head is None:\n\t\t\treturn None\n\t\tindex = 0\n\t\tlead, last = 0, 0\n\t\tpos = head\n\t\ttemp = ListNode(-1)\n\t\ttemp.next = head\n\t\thead = temp\n\t\tstart = head\n\t\twhile pos is not None:\n\t\t\tif index % k == k - 1:\n\t\t\t\tlast = pos.next\n\t\t\t\tstart = self.reverseList(start, last)\n\t\t\t\tpos = start\n\t\t\tpos = pos.next\n\t\t\tindex += 1\n\t\treturn head.next\n\tdef reverseList(self, head, end):\n\t\tpos = head.next\n\t\tlast = end\n\t\tnext_start = pos\n\t\twhile pos != end:\n\t\t\thead.next = pos\n\t\t\tlast_pos = pos\n\t\t\tpos = pos.next\n\t\t\tlast_pos.next = last\n\t\t\tlast = last_pos\n\t\treturn next_start\n# %%\nl = LinkList()\nhead = [1,2,3,4, 5]\nl1 = l.initList(head)\ns = Solution()\nprint(l.convert_list(s.reverseKGroup(l1, k = 2)))", + "language": "python" + }, + "node_id": "dailycode-6b7661f648ca47c7a6daec82ae8020f1", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600471012" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/14.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/14.exercises/config.json" new file mode 100644 index 000000000..e5b6aeb5d --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/14.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-577a3d8df74848e391bf6890d6855847", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/14.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/14.exercises/solution.json" new file mode 100644 index 000000000..f8da26b4c --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/14.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "da3abf70d2ff4066a06f956ff6deebf6", + "keywords": "字符串", + "title": "有效数字", + "desc": [ + { + "content": "\n

              有效数字(按顺序)可以分成以下几个部分:

                \t
              1. 一个 小数 或者 整数
              2. \t
              3. (可选)一个 'e''E' ,后面跟着一个 整数

              小数(按顺序)可以分成以下几个部分:

                \t
              1. (可选)一个符号字符('+''-'
              2. \t
              3. 下述格式之一:\t
                  \t\t
                1. 至少一位数字,后面跟着一个点 '.'
                2. \t\t
                3. 至少一位数字,后面跟着一个点 '.' ,后面再跟着至少一位数字
                4. \t\t
                5. 一个点 '.' ,后面跟着至少一位数字
                6. \t
                \t

              整数(按顺序)可以分成以下几个部分:

                \t
              1. (可选)一个符号字符('+''-'
              2. \t
              3. 至少一位数字

              部分有效数字列举如下:

                \t
              • [\"2\", \"0089\", \"-0.1\", \"+3.14\", \"4.\", \"-.9\", \"2e10\", \"-90E3\", \"3e+7\", \"+6e-1\", \"53.5e93\", \"-123.456e789\"]

              部分无效数字列举如下:

                \t
              • [\"abc\", \"1a\", \"1e\", \"e3\", \"99e2.5\", \"--6\", \"-+3\", \"95a54e53\"]

              给你一个字符串 s ,如果 s 是一个 有效数字 ,请返回 true

               

              示例 1:

              输入:s = \"0\"
              输出:
              true

              示例 2:

              输入:s = \"e\"
              输出:
              false

              示例 3:

              输入:s = \".\"
              输出:
              false

              示例 4:

              输入:s = \".1\"
              输出:
              true

               

              提示:

                \t
              • 1 <= s.length <= 20
              • \t
              • s 仅含英文字母(大写和小写),数字(0-9),加号 '+' ,减号 '-' ,或者点 '.'
              ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution(object):\n\tdef isNumber(self, s):\n\t\ts = s.strip()\n\t\tls, pos = len(s), 0\n\t\tif ls == 0:\n\t\t\treturn False\n\t\tif s[pos] == '+' or s[pos] == '-':\n\t\t\tpos += 1\n\t\tisNumeric = False\n\t\twhile pos < ls and s[pos].isdigit():\n\t\t\tpos += 1\n\t\t\tisNumeric = True\n\t\tif pos < ls and s[pos] == '.':\n\t\t\tpos += 1\n\t\t\twhile pos < ls and s[pos].isdigit():\n\t\t\t\tpos += 1\n\t\t\t\tisNumeric = True\n\t\telif pos < ls and s[pos] == 'e' and isNumeric:\n\t\t\tisNumeric = False\n\t\t\tpos += 1\n\t\t\tif pos < ls and (s[pos] == '+' or s[pos] == '-'):\n\t\t\t\tpos += 1\n\t\t\twhile pos < ls and s[pos].isdigit():\n\t\t\t\tpos += 1\n\t\t\t\tisNumeric = True\n\t\tif pos == ls and isNumeric:\n\t\t\treturn True\n\t\treturn False\n# %%\ns = Solution()\nprint(s.isNumber(s = \"0\"))", + "language": "python" + }, + "node_id": "dailycode-577a3d8df74848e391bf6890d6855847", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470924" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/15.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/15.exercises/config.json" new file mode 100644 index 000000000..918377607 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/15.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-892f8f04d7154058aee79eb497f262e5", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/15.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/15.exercises/solution.json" new file mode 100644 index 000000000..15581d581 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/15.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "cb863b701dfd42ad9a13552cdf2bc6cb", + "keywords": "哈希表,字符串,滑动窗口", + "title": "串联所有单词的子串", + "desc": [ + { + "content": "\n

              给定一个字符串 和一些长度相同的单词 words。找出 s\n中恰好可以由 words 中所有单词串联形成的子串的起始位置。

              \n

              注意子串要与 words 中的单词完全匹配,中间不能有其他字符,但不需要考虑 words 中单词串联的顺序。

              \n

               

              \n

              示例 1:

              \n
              输入:  s = "barfoothefoobarman",  words = ["foo","bar"]
              输出:
              [0,9]
              解释:
              从索引 0 和 9 开始的子串分别是 "barfoo" 和 "foobar" 。输出的顺序不重要, [9,0] 也是有效答案。
              \n

              示例 2:

              \n
              输入:  s = "wordgoodgoodgoodbestword",  words = ["word","good","best","word"]
              输出:
              []
              ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution(object):\n\tdef findSubstring(self, s, words):\n\t\t\"\"\"\n\t\t:type s: str\n\t\t:type words: List[str]\n\t\t:rtype: List[int]\n\t\t\"\"\"\n\t\tls = len(s)\n\t\tword_ls = len(words[0])\n\t\ttarget_dict = {}\n\t\tfor word in words:\n\t\t\ttry:\n\t\t\t\ttarget_dict[word] += 1\n\t\t\texcept KeyError:\n\t\t\t\ttarget_dict[word] = 1\n\t\tres = []\n\t\tfor start in range(ls - word_ls * len(words) + 1):\n\t\t\tcurr_dict = target_dict.copy()\n\t\t\tfor pos in range(start, start + word_ls * len(words), word_ls):\n\t\t\t\tcurr = s[pos:pos + word_ls]\n\t\t\t\ttry:\n\t\t\t\t\tcurr_dict[curr] -= 1\n\t\t\t\t\tif curr_dict[curr] < 0:\n\t\t\t\t\t\tbreak\n\t\t\t\texcept KeyError:\n\t\t\t\t\tbreak\n\t\t\telse:\n\t\t\t\tres.append(start)\n\t\treturn res\nif __name__ == '__main__':\n\ts = Solution()\n\tprint(s.findSubstring('wordgoodgoodgoodbestword', [\"word\", \"good\", \"best\", \"good\"]))", + "language": "python" + }, + "node_id": "dailycode-892f8f04d7154058aee79eb497f262e5", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470925" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/16.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/16.exercises/config.json" new file mode 100644 index 000000000..169fb430c --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/16.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-538a403bc6c44b689f7624acc3774c21", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/16.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/16.exercises/solution.json" new file mode 100644 index 000000000..389b3c143 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/16.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "107e3219aa1e472abb9936331a95a7fe", + "keywords": "数组,二分查找,分治", + "title": "寻找两个正序数组的中位数", + "desc": [ + { + "content": "\n

              给定两个大小分别为 mn 的正序(从小到大)数组 nums1 和 nums2。请你找出并返回这两个正序数组的 中位数

               

              示例 1:

              输入:nums1 = [1,3], nums2 = [2]
              输出:
              2.00000
              解释:
              合并数组 = [1,2,3] ,中位数 2

              示例 2:

              输入:nums1 = [1,2], nums2 = [3,4]
              输出:
              2.50000
              解释:
              合并数组 = [1,2,3,4] ,中位数 (2 + 3) / 2 = 2.5

              示例 3:

              输入:nums1 = [0,0], nums2 = [0,0]
              输出:
              0.00000

              示例 4:

              输入:nums1 = [], nums2 = [1]
              输出:
              1.00000

              示例 5:

              输入:nums1 = [2], nums2 = []
              输出:
              2.00000

               

              提示:

                \t
              • nums1.length == m
              • \t
              • nums2.length == n
              • \t
              • 0 <= m <= 1000
              • \t
              • 0 <= n <= 1000
              • \t
              • 1 <= m + n <= 2000
              • \t
              • -106 <= nums1[i], nums2[i] <= 106

               

              进阶:你能设计一个时间复杂度为 O(log (m+n)) 的算法解决此问题吗?

              ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "import math\nfrom typing import List\nclass Solution:\n\tdef findMedianSortedArrays(self, nums1: List[int], nums2: List[int]) -> float:\n\t\tnums1Size = len(nums1)\n\t\tnums2Size = len(nums2)\n\t\tna = nums1Size + nums2Size\n\t\tns = []\n\t\ti = 0\n\t\tj = 0\n\t\tm = int(math.floor(na / 2 + 1))\n\t\twhile len(ns) < m:\n\t\t\tn = None\n\t\t\tif i < nums1Size and j < nums2Size:\n\t\t\t\tif nums1[i] < nums2[j]:\n\t\t\t\t\tn = nums1[i]\n\t\t\t\t\ti += 1\n\t\t\t\telse:\n\t\t\t\t\tn = nums2[j]\n\t\t\t\t\tj += 1\n\t\t\telif i < nums1Size:\n\t\t\t\tn = nums1[i]\n\t\t\t\ti += 1\n\t\t\telif j < nums2Size:\n\t\t\t\tn = nums2[j]\n\t\t\t\tj += 1\n\t\t\tns.append(n)\n\t\td = len(ns)\n\t\tif na % 2 == 1:\n\t\t\treturn ns[d - 1]\n\t\telse:\n\t\t\treturn (ns[d - 1] + ns[d - 2]) / 2.0\n# %%\ns = Solution()\nprint(s.findMedianSortedArrays([1,3], [2]))", + "language": "python" + }, + "node_id": "dailycode-538a403bc6c44b689f7624acc3774c21", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600469814" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/17.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/17.exercises/config.json" new file mode 100644 index 000000000..152484da5 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/17.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-5f24715d54db4e4ba085425cb63c0fa7", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/17.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/17.exercises/solution.json" new file mode 100644 index 000000000..646d0daf9 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/17.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "e271d921050f4418847150f08c8e5e0b", + "keywords": "哈希表,字符串,滑动窗口", + "title": "最小覆盖子串", + "desc": [ + { + "content": "\n

              给你一个字符串 s 、一个字符串 t 。返回 s 中涵盖 t 所有字符的最小子串。如果 s 中不存在涵盖 t 所有字符的子串,则返回空字符串 \"\"

              注意:如果 s 中存在这样的子串,我们保证它是唯一的答案。

               

              示例 1:

              输入:s = \"ADOBECODEBANC\", t = \"ABC\"
              输出:
              \"BANC\"

              示例 2:

              输入:s = \"a\", t = \"a\"
              输出:
              \"a\"

               

              提示:

                \t
              • 1 <= s.length, t.length <= 105
              • \t
              • st 由英文字母组成

               

              进阶:你能设计一个在 o(n) 时间内解决此问题的算法吗?", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution(object):\n\tdef minWindow(self, s, t):\n\t\tls_s, ls_t = len(s), len(t)\n\t\tneed_to_find = [0] * 256\n\t\thas_found = [0] * 256\n\t\tmin_begin, min_end = 0, -1\n\t\tmin_window = 100000000000000\n\t\tfor index in range(ls_t):\n\t\t\tneed_to_find[ord(t[index])] += 1\n\t\tcount, begin = 0, 0\n\t\tfor end in range(ls_s):\n\t\t\tend_index = ord(s[end])\n\t\t\tif need_to_find[end_index] == 0:\n\t\t\t\tcontinue\n\t\t\thas_found[end_index] += 1\n\t\t\tif has_found[end_index] <= need_to_find[end_index]:\n\t\t\t\tcount += 1\n\t\t\tif count == ls_t:\n\t\t\t\tbegin_index = ord(s[begin])\n\t\t\t\twhile need_to_find[begin_index] == 0 or\\\n\t\t\t\t\thas_found[begin_index] > need_to_find[begin_index]:\n\t\t\t\t\tif has_found[begin_index] > need_to_find[begin_index]:\n\t\t\t\t\t\thas_found[begin_index] -= 1\n\t\t\t\t\tbegin += 1\n\t\t\t\t\tbegin_index = ord(s[begin])\n\t\t\t\twindow_ls = end - begin + 1\n\t\t\t\tif window_ls < min_window:\n\t\t\t\t\tmin_begin = begin\n\t\t\t\t\tmin_end = end\n\t\t\t\t\tmin_window = window_ls\n\t\tif count == ls_t:\n\t\t\treturn s[min_begin: min_end + 1]\n\t\telse:\n\t\t\treturn ''\nif __name__ == '__main__':\n\ts = Solution()\n\tprint (s.minWindow('a', 'a'))", + "language": "python" + }, + "node_id": "dailycode-5f24715d54db4e4ba085425cb63c0fa7", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600471015" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/18.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/18.exercises/config.json" new file mode 100644 index 000000000..e38254bb3 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/18.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-43a60df3112046ceabce5a6c72c802af", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/18.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/18.exercises/solution.json" new file mode 100644 index 000000000..f348beb5b --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/18.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "d155a0ab95f9496fa9647cf8ccf6b9a9", + "keywords": "链表,分治,堆(优先队列),归并排序", + "title": "合并K个升序链表", + "desc": [ + { + "content": "\n

              给你一个链表数组,每个链表都已经按升序排列。

              请你将所有链表合并到一个升序链表中,返回合并后的链表。

               

              示例 1:

              输入:lists = [[1,4,5],[1,3,4],[2,6]]
              输出:
              [1,1,2,3,4,4,5,6]
              解释:
              链表数组如下:[ 1->4->5, 1->3->4, 2->6]将它们合并到一个有序链表中得到。1->1->2->3->4->4->5->6

              示例 2:

              输入:lists = []
              输出:
              []

              示例 3:

              输入:lists = [[]]
              输出:
              []

               

              提示:

                \t
              • k == lists.length
              • \t
              • 0 <= k <= 10^4
              • \t
              • 0 <= lists[i].length <= 500
              • \t
              • -10^4 <= lists[i][j] <= 10^4
              • \t
              • lists[i]升序 排列
              • \t
              • lists[i].length 的总和不超过 10^4
              ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "from typing import List\nclass ListNode(object):\n\tdef __init__(self, x):\n\t\tself.val = x\n\t\tself.next = None\nclass LinkList:\n\tdef __init__(self):\n\t\tself.head=None\n\tdef initList(self, data):\n\t\tself.head = ListNode(data[0])\n\t\tr=self.head\n\t\tp = self.head\n\t\tfor i in data[1:]:\n\t\t\tnode = ListNode(i)\n\t\t\tp.next = node\n\t\t\tp = p.next\n\t\treturn r\n\tdef\tconvert_list(self,head):\n\t\tret = []\n\t\tif head == None:\n\t\t\treturn\n\t\tnode = head\n\t\twhile node != None:\n\t\t\tret.append(node.val)\n\t\t\tnode = node.next\n\t\treturn ret\nclass Solution(object):\n\tdef mergeKLists(self, lists):\n\t\tif lists is None:\n\t\t\treturn None\n\t\telif len(lists) == 0:\n\t\t\treturn None\n\t\treturn self.mergeK(lists, 0, len(lists) - 1)\n\tdef mergeK(self, lists, low, high):\n\t\tif low == high:\n\t\t\treturn lists[int(low)]\n\t\telif low + 1 == high:\n\t\t\treturn self.mergeTwolists(lists[int(low)], lists[int(high)])\n\t\tmid = (low + high) / 2\n\t\treturn self.mergeTwolists(self.mergeK(lists, low, mid), self.mergeK(lists, mid + 1, high))\n\tdef mergeTwolists(self, l1, l2):\n\t\tl = LinkList()\n\t\tif type(l1) == list:\t\n\t\t\tl1 = l.initList(l1)\n\t\tif type(l2) == list:\t\n\t\t\tl2 = l.initList(l2)\n\t\tif l1 is None:\n\t\t\treturn l2\n\t\tif l2 is None:\n\t\t\treturn l1\n\t\thead = curr = ListNode(-1)\n\t\twhile l1 is not None and l2 is not None:\n\t\t\tif l1.val <= l2.val:\n\t\t\t\tcurr.next = l1\n\t\t\t\tl1 = l1.next\n\t\t\telse:\n\t\t\t\tcurr.next = l2\n\t\t\t\tl2 = l2.next\n\t\t\tcurr = curr.next\n\t\tif l1 is not None:\n\t\t\tcurr.next = l1\n\t\tif l2 is not None:\n\t\t\tcurr.next = l2\n\t\treturn head.next\n# %%\nl = LinkList()\nlist1 = [[1,4,5],[1,3,4],[2,6]]\ns = Solution()\nprint(l.convert_list(s.mergeKLists(list1)))", + "language": "python" + }, + "node_id": "dailycode-43a60df3112046ceabce5a6c72c802af", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470116" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/19.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/19.exercises/config.json" new file mode 100644 index 000000000..f91ce71a6 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/19.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-c3fbc3654d0649a09f019aa4b33abf91", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/19.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/19.exercises/solution.json" new file mode 100644 index 000000000..a2529c8d3 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/19.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "cd3b923120a146c78e344668ed62a1ae", + "keywords": "递归,数学", + "title": "排列序列", + "desc": [ + { + "content": "\n

              给出集合 [1,2,3,...,n],其所有元素共有 n! 种排列。

              按大小顺序列出所有排列情况,并一一标记,当 n = 3 时, 所有排列如下:

                \t
              1. \"123\"
              2. \t
              3. \"132\"
              4. \t
              5. \"213\"
              6. \t
              7. \"231\"
              8. \t
              9. \"312\"
              10. \t
              11. \"321\"

              给定 n 和 k,返回第 k 个排列。

               

              示例 1:

              输入:n = 3, k = 3
              输出:
              \"213\"

              示例 2:

              输入:n = 4, k = 9
              输出:
              \"2314\"

              示例 3:

              输入:n = 3, k = 1
              输出:
              \"123\"

               

              提示:

                \t
              • 1 <= n <= 9
              • \t
              • 1 <= k <= n!
              ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution(object):\n\tdef getPermutation(self, n, k):\n\t\t\"\"\"\n\t\t:type n: int\n\t\t:type k: int\n\t\t:rtype: str\n\t\t\"\"\"\n\t\timport math\n\t\tres=[\"\"]\n\t\tdef generate(s,k):\n\t\t\tn=len(s)\t\n\t\t\tif n<=2:\n\t\t\t\tif k==2:\n\t\t\t\t\tres[0]+=s[::-1]\n\t\t\t\telse:\n\t\t\t\t\tres[0]+=s\n\t\t\t\treturn\n\t\t\tstep = math.factorial(n-1) \n\t\t\tyu=k%step\n\t\t\tif yu==0:\n\t\t\t\tyu=step\n\t\t\t\tc=k//step-1 \n\t\t\telse:\n\t\t\t\tc=k//step\n\t\t\tres[0]+=s[c]\n\t\t\tgenerate(s[:c]+s[c+1:],yu)\n\t\t\treturn \n\t\ts=\"\"\n\t\tfor i in range(1,n+1):\n\t\t\ts+=str(i) \n\t\tgenerate(s,k)\n\t\treturn res[0]\nif __name__ == '__main__':\n\ts = Solution()\n\tprint (s.getPermutation(3, 2))", + "language": "python" + }, + "node_id": "dailycode-c3fbc3654d0649a09f019aa4b33abf91", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600471016" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/2.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/2.exercises/config.json" new file mode 100644 index 000000000..c32a94160 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/2.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-828f879aa4b94b1d94ca7f29fc5f0840", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/2.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/2.exercises/solution.json" new file mode 100644 index 000000000..c7e7f38a2 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/2.exercises/solution.json" @@ -0,0 +1,52 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "b3aa8cc56abb48eca255bb6a32f1708e", + "keywords": "数组,回溯,矩阵", + "title": "解数独", + "desc": [ + { + "content": "\n

              编写一个程序,通过填充空格来解决数独问题。

              \n

              数独的解法需 遵循如下规则

              \n
                \n
              1. 数字 1-9 在每一行只能出现一次。
              2. \n
              3. 数字 1-9 在每一列只能出现一次。
              4. \n
              5. 数字 1-9 在每一个以粗实线分隔的 3x3 宫内只能出现一次。(请参考示例图)
              6. \n
              \n

              数独部分空格内已填入了数字,空白格用 '.' 表示。

              \n

               

              \n
              \n
              \n
              \n

              示例:

              \n
              输入:board = \n[[\"5\",\"3\",\".\",\".\",\"7\",\".\",\".\",\".\",\".\"],\n[\"6\",\".\",\".\",\"1\",\"9\",\"5\",\".\",\".\",\".\"],\n[\".\",\"9\",\"8\",\".\",\".\",\".\",\".\",\"6\",\".\"],\n[\"8\",\".\",\".\",\".\",\"6\",\".\",\".\",\".\",\"3\"],\n[\"4\",\".\",\".\",\"8\",\".\",\"3\",\".\",\".\",\"1\"],\n[\"7\",\".\",\".\",\".\",\"2\",\".\",\".\",\".\",\"6\"],\n[\".\",\"6\",\".\",\".\",\".\",\".\",\"2\",\"8\",\".\"],\n[\".\",\".\",\".\",\"4\",\"1\",\"9\",\".\",\".\",\"5\"],\n[\".\",\".\",\".\",\".\",\"8\",\".\",\".\",\"7\",\"9\"]]\n输出:\n[[\"5\",\"3\",\"4\",\"6\",\"7\",\"8\",\"9\",\"1\",\"2\"],\n[\"6\",\"7\",\"2\",\"1\",\"9\",\"5\",\"3\",\"4\",\"8\"],\n[\"1\",\"9\",\"8\",\"3\",\"4\",\"2\",\"5\",\"6\",\"7\"],\n[\"8\",\"5\",\"9\",\"7\",\"6\",\"1\",\"4\",\"2\",\"3\"],\n[\"4\",\"2\",\"6\",\"8\",\"5\",\"3\",\"7\",\"9\",\"1\"],\n[\"7\",\"1\",\"3\",\"9\",\"2\",\"4\",\"8\",\"5\",\"6\"],\n[\"9\",\"6\",\"1\",\"5\",\"3\",\"7\",\"2\",\"8\",\"4\"],\n[\"2\",\"8\",\"7\",\"4\",\"1\",\"9\",\"6\",\"3\",\"5\"],\n[\"3\",\"4\",\"5\",\"2\",\"8\",\"6\",\"1\",\"7\",\"9\"]]\n解释:输入的数独如上图所示,唯一有效的解决方案如下所示:\n

               

              \n
              \n", + "language": "markdown" + }, + { + "content": "\n

               

              \n

              提示:

              \n
                \n
              • board.length == 9
              • \n
              • board[i].length == 9
              • \n
              • board[i][j] 是一位数字或者 '.'
              • \n
              • 题目数据 保证 输入数独仅有一个解
              • \n
              \n
              \n
              \n
              ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution(object):\n\tdef solveSudoku(self, board):\n\t\t\tdef isvaild(i,j):\n\t\t\t\tfor m in range(9):\n\t\t\t\t\tif m!=i and board[m][j]==board[i][j]:\n\t\t\t\t\t\treturn False\n\t\t\t\tfor n in range(9):\n\t\t\t\t\tif n!=j and board[i][n]==board[i][j]:\n\t\t\t\t\t\treturn False\n\t\t\t\tfor m in range(i//3*3,i//3*3+3):\n\t\t\t\t\tfor n in range(j//3*3,j//3*3+3):\n\t\t\t\t\t\tif m!=i and n!=j and board[m][n]==board[i][j]:\n\t\t\t\t\t\t\treturn False\n\t\t\t\treturn True\n\t\t\tdef f(a,b,board):\n\t\t\t\tfor i in range(a,9):\n\t\t\t\t\tfor j in range(b,9):\n\t\t\t\t\t\tif board[i][j]=='.':\n\t\t\t\t\t\t\tfor c in '123456789':\n\t\t\t\t\t\t\t\tboard[i][j]=c\n\t\t\t\t\t\t\t\tif isvaild(i,j):\n\t\t\t\t\t\t\t\t\tif f(a,b,board):return True\n\t\t\t\t\t\t\t\t\telse: board[i][j] = '.'\n\t\t\t\t\t\t\t\telse:board[i][j] = '.'\n\t\t\t\t\t\t\treturn False\n\t\t\t\treturn True\n\t\t\tf(0,0,board)\n\t\t\treturn board\n# %%\ns = Solution()\nboard = [[\"5\",\"3\",\".\",\".\",\"7\",\".\",\".\",\".\",\".\"],[\"6\",\".\",\".\",\"1\",\"9\",\"5\",\".\",\".\",\".\"],[\".\",\"9\",\"8\",\".\",\".\",\".\",\".\",\"6\",\".\"],[\"8\",\".\",\".\",\".\",\"6\",\".\",\".\",\".\",\"3\"],[\"4\",\".\",\".\",\"8\",\".\",\"3\",\".\",\".\",\"1\"],[\"7\",\".\",\".\",\".\",\"2\",\".\",\".\",\".\",\"6\"],[\".\",\"6\",\".\",\".\",\".\",\".\",\"2\",\"8\",\".\"],[\".\",\".\",\".\",\"4\",\"1\",\"9\",\".\",\".\",\"5\"],[\".\",\".\",\".\",\".\",\"8\",\".\",\".\",\"7\",\"9\"]]\nprint(s.solveSudoku(board))", + "language": "python" + }, + "node_id": "dailycode-828f879aa4b94b1d94ca7f29fc5f0840", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470827" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/20.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/20.exercises/config.json" new file mode 100644 index 000000000..9825d4e41 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/20.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-8d8d61cba07e4ef6bff998974a1683ea", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/20.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/20.exercises/solution.json" new file mode 100644 index 000000000..b3290550e --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/20.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "8acf01ddd2b046fb8e4d8230e9342d2f", + "keywords": "贪心,递归,字符串,动态规划", + "title": "通配符匹配", + "desc": [ + { + "content": "\n

              给定一个字符串 (s) 和一个字符模式 (p) ,实现一个支持 '?' 和 '*' 的通配符匹配。

              '?' 可以匹配任何单个字符。'*' 可以匹配任意字符串(包括空字符串)。

              两个字符串完全匹配才算匹配成功。

              说明:

                \t
              • s 可能为空,且只包含从 a-z 的小写字母。
              • \t
              • p 可能为空,且只包含从 a-z 的小写字母,以及字符 ? 和 *

              示例 1:

              输入:s = "aa"p = "a"
              输出:
              false
              解释:
              "a" 无法匹配 "aa" 整个字符串。

              示例 2:

              输入:s = "aa"p = "*"
              输出:
              true
              解释:
               '*' 可以匹配任意字符串。

              示例 3:

              输入:s = "cb"p = "?a"
              输出:
              false
              解释:
               '?' 可以匹配 'c', 但第二个 'a' 无法匹配 'b'。

              示例 4:

              输入:s = "adceb"p = "*a*b"
              输出:
              true
              解释:
               第一个 '*' 可以匹配空字符串, 第二个 '*' 可以匹配字符串 "dce".

              示例 5:

              输入:s = "acdcb"p = "a*c?b"
              输出:
              false
              ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution(object):\n\tdef isMatch(self, s, p):\n\t\t\"\"\"\n\t\t:type s: str\n\t\t:type p: str\n\t\t:rtype: bool\n\t\t\"\"\"\n\t\ts_index, p_index = 0, 0\n\t\tstar, s_star = -1, 0\n\t\ts_len, p_len = len(s), len(p)\n\t\twhile s_index < s_len:\n\t\t\tif p_index < p_len and (s[s_index] == p[p_index] or p[p_index] == '?'):\n\t\t\t\ts_index += 1\n\t\t\t\tp_index += 1\n\t\t\telif p_index < p_len and p[p_index] == '*':\n\t\t\t\tstar = p_index\n\t\t\t\ts_star = s_index\n\t\t\t\tp_index += 1\n\t\t\telif star != -1:\n\t\t\t\tp_index = star + 1\n\t\t\t\ts_star += 1\n\t\t\t\ts_index = s_star\n\t\t\telse:\n\t\t\t\treturn False\n\t\twhile p_index < p_len and p[p_index] == '*':\n\t\t\tp_index += 1\n\t\treturn p_index == p_len\nif __name__ == '__main__':\n\ts = Solution()\n\tprint (s.isMatch(s = \"aa\",p = \"a\"))", + "language": "python" + }, + "node_id": "dailycode-8d8d61cba07e4ef6bff998974a1683ea", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600471019" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/21.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/21.exercises/config.json" new file mode 100644 index 000000000..be4b8bc78 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/21.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-30ac3c32bd5643fdb9bce73dc8740969", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/21.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/21.exercises/solution.json" new file mode 100644 index 000000000..fae34a921 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/21.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "csdn.net", + "source": "solution.md", + "exercise_id": "84b4ea3fa69744e19568bd55d2319e14", + "keywords": "递归,字符串,动态规划", + "title": "正则表达式匹配", + "desc": [ + { + "content": "\n

              给你一个字符串 s 和一个字符规律 p,请你来实现一个支持 '.' 和 '*' 的正则表达式匹配。

                \t
              • '.' 匹配任意单个字符
              • \t
              • '*' 匹配零个或多个前面的那一个元素

              所谓匹配,是要涵盖 整个 字符串 s的,而不是部分字符串。

              示例 1:

              输入:s = \"aa\" p = \"a\"
              输出:
              false
              解释:
              \"a\" 无法匹配 \"aa\" 整个字符串。

              示例 2:

              输入:s = \"aa\" p = \"a*\"
              输出:
              true
              解释:
              因为 '*' 代表可以匹配零个或多个前面的那一个元素, 在这里前面的元素就是 'a'。因此,字符串 \"aa\" 可被视为 'a' 重复了一次。

              示例 3:

              输入:s = \"ab\" p = \".*\"
              输出:
              true
              解释:
              \".*\" 表示可匹配零个或多个('*')任意字符('.')。

              示例 4:

              输入:s = \"aab\" p = \"c*a*b\"
              输出:
              true
              解释:
              因为 '*' 表示零个或多个,这里 'c' 为 0 个, 'a' 被重复一次。因此可以匹配字符串 \"aab\"。

              示例 5:

              输入:s = \"mississippi\" p = \"mis*is*p*.\"
              输出:
              false

               

              提示:

                \t
              • 0 <= s.length <= 20
              • \t
              • 0 <= p.length <= 30
              • \t
              • s 可能为空,且只包含从 a-z 的小写字母。
              • \t
              • p 可能为空,且只包含从 a-z 的小写字母,以及字符 . 和 *
              • \t
              • 保证每次出现字符 * 时,前面都匹配到有效的字符
              ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution:\n\tdef isMatch(self, s: str, p: str) -> bool:\n\t\tif len(p) == 0:\n\t\t\treturn len(s) == 0\n\t\thead_match = len(s) > 0 and (s[0] == p[0] or p[0] == '.')\n\t\tif len(p) > 1 and p[1] == '*':\n\t\t\tif head_match and self.isMatch(s[1:], p):\n\t\t\t\treturn True\n\t\t\treturn self.isMatch(s, p[2:])\n\t\telse:\n\t\t\tif not head_match:\n\t\t\t\treturn False\n\t\t\treturn self.isMatch(s[1:], p[1:])\n# %%\ns = Solution()\nprint(s.isMatch(s = \"aa\" , p = \"a\"))", + "language": "python" + }, + "node_id": "dailycode-30ac3c32bd5643fdb9bce73dc8740969", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470835" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/3.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/3.exercises/config.json" new file mode 100644 index 000000000..134f702d5 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/3.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-01b66c5c03b24bc481051d8174578a87", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/3.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/3.exercises/solution.json" new file mode 100644 index 000000000..f7b3da448 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/3.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "cd72e38163074274bda87cdc2c2858ad", + "keywords": "栈,数组,双指针,动态规划,单调栈", + "title": "接雨水", + "desc": [ + { + "content": "\n

              给定 n 个非负整数表示每个宽度为 1 的柱子的高度图,计算按此排列的柱子,下雨之后能接多少雨水。

               

              示例 1:

              输入:height = [0,1,0,2,1,0,1,3,2,1,2,1]
              输出:
              6
              解释:
              上面是由数组 [0,1,0,2,1,0,1,3,2,1,2,1] 表示的高度图,在这种情况下,可以接 6 个单位的雨水(蓝色部分表示雨水)。

              示例 2:

              输入:height = [4,2,0,3,2,5]
              输出:
              9

               

              提示:

                \t
              • n == height.length
              • \t
              • 0 <= n <= 3 * 104
              • \t
              • 0 <= height[i] <= 105
              ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution(object):\n\tdef trap(self, height):\n\t\tls = len(height)\n\t\tif ls == 0:\n\t\t\treturn 0\n\t\tres, left = 0, 0\n\t\twhile left < ls and height[left] == 0:\n\t\t\tleft += 1\n\t\tpos = left + 1\n\t\twhile pos < ls:\n\t\t\tif height[pos] >= height[left]:\n\t\t\t\tres += self.rain_water(height, left, pos)\n\t\t\t\tleft = pos\n\t\t\t\tpos += 1\n\t\t\telif pos == ls - 1:\n\t\t\t\tmax_value, max_index = 0, pos\n\t\t\t\tfor index in range(left + 1, ls):\n\t\t\t\t\tif height[index] > max_value:\n\t\t\t\t\t\tmax_value = height[index]\n\t\t\t\t\t\tmax_index = index\n\t\t\t\tres += self.rain_water(height, left, max_index)\n\t\t\t\tleft = max_index\n\t\t\t\tpos = left + 1\n\t\t\telse:\n\t\t\t\tpos += 1\n\t\treturn res\n\tdef rain_water(self, height, start, end):\n\t\tif end - start <= 1:\n\t\t\treturn 0\n\t\tmin_m = min(height[start], height[end])\n\t\tres = min_m * (end - start - 1)\n\t\tstep = 0\n\t\tfor index in range(start + 1, end):\n\t\t\tif height[index] > 0:\n\t\t\t\tstep += height[index]\n\t\treturn res - step\nif __name__ == '__main__':\n\ts = Solution()\n\tprint (s.trap([2,6,3,8,2,7,2,5,0]))", + "language": "python" + }, + "node_id": "dailycode-01b66c5c03b24bc481051d8174578a87", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470120" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/4.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/4.exercises/config.json" new file mode 100644 index 000000000..b48682385 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/4.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-877406b98b004e5eb7a935d6fb6cb8eb", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/4.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/4.exercises/solution.json" new file mode 100644 index 000000000..db458837a --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/4.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "1c00801cdeae4722b253ff7df4be7df4", + "keywords": "栈,数组,单调栈", + "title": "柱状图中最大的矩形", + "desc": [ + { + "content": "\n

              给定 n 个非负整数,用来表示柱状图中各个柱子的高度。每个柱子彼此相邻,且宽度为 1 。

              求在该柱状图中,能够勾勒出来的矩形的最大面积。

               

              以上是柱状图的示例,其中每个柱子的宽度为 1,给定的高度为 [2,1,5,6,2,3]

               

              图中阴影部分为所能勾勒出的最大矩形面积,其面积为 10 个单位。

               

              示例:

              输入: [2,1,5,6,2,3]
              输出:
              10
              ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution(object):\n\tdef largestRectangleArea(self, heights):\n\t\t\"\"\"\n\t\t:type heights: List[int]\n\t\t:rtype: int\n\t\t\"\"\"\n\t\tlargest_rectangle = 0\n\t\tls = len(heights)\n\t\tstack = [-1]\n\t\ttop, pos = 0, 0\n\t\tfor pos in range(ls):\n\t\t\twhile top > 0 and heights[stack[top]] > heights[pos]:\n\t\t\t\tlargest_rectangle = max(largest_rectangle, heights[stack[top]] * (pos - stack[top - 1] - 1))\n\t\t\t\ttop -= 1\n\t\t\t\tstack.pop()\n\t\t\tstack.append(pos)\n\t\t\ttop += 1\n\t\twhile top > 0:\n\t\t\tlargest_rectangle = max(largest_rectangle, heights[stack[top]] * (ls - stack[top - 1] - 1))\n\t\t\ttop -= 1\n\t\treturn largest_rectangle\nif __name__ == \"__main__\":\n\ts = Solution()\n\tprint (s.largestRectangleArea([2,1,5,6,2,3]))", + "language": "python" + }, + "node_id": "dailycode-877406b98b004e5eb7a935d6fb6cb8eb", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600471006" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/5.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/5.exercises/config.json" new file mode 100644 index 000000000..1892e04d5 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/5.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-90915356290f498093aa1edd5800a16c", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/5.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/5.exercises/solution.json" new file mode 100644 index 000000000..fa0d35b09 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/5.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "1f4232c2b3234db68fb48ba078562f83", + "keywords": "数组,哈希表", + "title": "缺失的第一个正数", + "desc": [ + { + "content": "\n

              给你一个未排序的整数数组 nums ,请你找出其中没有出现的最小的正整数。

               

              进阶:你可以实现时间复杂度为 O(n) 并且只使用常数级别额外空间的解决方案吗?

               

              示例 1:

              输入:nums = [1,2,0]
              输出:
              3

              示例 2:

              输入:nums = [3,4,-1,1]
              输出:
              2

              示例 3:

              输入:nums = [7,8,9,11,12]
              输出:
              1

               

              提示:

                \t
              • 0 <= nums.length <= 300
              • \t
              • -231 <= nums[i] <= 231 - 1
              ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution(object):\n\tdef firstMissingPositive(self, nums):\n\t\tls = len(nums)\n\t\tindex = 0\n\t\twhile index < ls:\n\t\t\tif nums[index] <= 0 or nums[index] > ls or nums[nums[index] - 1] == nums[index]:\n\t\t\t\tindex += 1\n\t\t\telse:\n\t\t\t\tpos = nums[index] - 1\n\t\t\t\tnums[index], nums[pos] = nums[pos], nums[index]\n\t\tres = 0\n\t\twhile res < ls and nums[res] == res + 1:\n\t\t\tres += 1\n\t\treturn res + 1\n# %%\ns = Solution()\nprint(s.firstMissingPositive(nums = [1,2,0]))", + "language": "python" + }, + "node_id": "dailycode-90915356290f498093aa1edd5800a16c", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470223" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/6.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/6.exercises/config.json" new file mode 100644 index 000000000..58fafce28 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/6.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-2d90a7f71a184ca5b832014fbd0e2f9a", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/6.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/6.exercises/solution.json" new file mode 100644 index 000000000..8e2ec0429 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/6.exercises/solution.json" @@ -0,0 +1,80 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "8958654b9aff48ce871454bca4874511", + "keywords": "回溯", + "title": "N皇后 II", + "desc": [ + { + "content": "\n
              \n

              n 皇后问题 研究的是如何将 n 个皇后放置在 n×n 的棋盘上,并且使皇后彼此之间不能相互攻击。

              ", + "language": "markdown" + }, + { + "content": "\n

              给你一个整数 n ,返回 n 皇后问题 不同的解决方案的数量。

              ", + "language": "markdown" + }, + { + "content": "\n

               

              ", + "language": "markdown" + }, + { + "content": "\n
              \n
              \n

              示例 1:

              \n\n
              输入:n = 4\n输出:2\n解释:如上图所示,4 皇后问题存在两个不同的解法。\n
              ", + "language": "markdown" + }, + { + "content": "\n

              示例 2:

              ", + "language": "markdown" + }, + { + "content": "\n
              输入:n = 1\n输出:1\n
              ", + "language": "markdown" + }, + { + "content": "\n

               

              ", + "language": "markdown" + }, + { + "content": "\n

              提示:

              ", + "language": "markdown" + }, + { + "content": "\n
                \n
              • 1 <= n <= 9
              • \n
              • 皇后彼此不能相互攻击,也就是说:任何两个皇后都不能处于同一条横行、纵行或斜线上。
              • \n
              \n
              \n
              \n
              ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution(object):\n\tdef __init__(self):\n\t\tself.count = 0\n\tdef totalNQueens(self, n):\n\t\tself.dfs(0, n, 0, 0, 0)\n\t\treturn self.count\n\tdef dfs(self, row, n, column, diag, antiDiag):\n\t\tif row == n:\n\t\t\tself.count += 1\n\t\t\treturn\n\t\tfor index in range(n):\n\t\t\tisColSafe = (1 << index) & column == 0\n\t\t\tisDigSafe = (1 << (n - 1 + row - index)) & diag == 0\n\t\t\tisAntiDiagSafe = (1 << (row + index)) & antiDiag == 0\n\t\t\tif isAntiDiagSafe and isColSafe and isDigSafe:\n\t\t\t\tself.dfs(row + 1, n, (1 << index) | column,\n\t\t\t\t\t\t (1 << (n - 1 + row - index)) | diag,\n\t\t\t\t\t\t (1 << (row + index)) | antiDiag)\nif __name__ == '__main__':\n\ts = Solution()\n\tprint (s.totalNQueens(4))", + "language": "python" + }, + "node_id": "dailycode-2d90a7f71a184ca5b832014fbd0e2f9a", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470922" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/7.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/7.exercises/config.json" new file mode 100644 index 000000000..01f0f6074 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/7.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-f78142066f114cceaa4d98d295572289", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/7.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/7.exercises/solution.json" new file mode 100644 index 000000000..0944f276d --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/7.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "af8f002cd1d04bdaafd89c7c1f7d1eb4", + "keywords": "栈,数组,动态规划,矩阵,单调栈", + "title": "最大矩形", + "desc": [ + { + "content": "\n

              给定一个仅包含 01 、大小为 rows x cols 的二维二进制矩阵,找出只包含 1 的最大矩形,并返回其面积。

               

              示例 1:

              \"\"
              输入:matrix = [[\"1\",\"0\",\"1\",\"0\",\"0\"],[\"1\",\"0\",\"1\",\"1\",\"1\"],[\"1\",\"1\",\"1\",\"1\",\"1\"],[\"1\",\"0\",\"0\",\"1\",\"0\"]]
              输出:
              6
              解释:
              最大矩形如上图所示。

              示例 2:

              输入:matrix = []
              输出:
              0

              示例 3:

              输入:matrix = [[\"0\"]]
              输出:
              0

              示例 4:

              输入:matrix = [[\"1\"]]
              输出:
              1

              示例 5:

              输入:matrix = [[\"0\",\"0\"]]
              输出:
              0

               

              提示:

                \t
              • rows == matrix.length
              • \t
              • cols == matrix[0].length
              • \t
              • 0 <= row, cols <= 200
              • \t
              • matrix[i][j]'0''1'
              ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution(object):\n\tdef maximalRectangle(self, matrix):\n\t\t\"\"\"\n\t\t:type matrix: List[List[str]]\n\t\t:rtype: int\n\t\t\"\"\"\n\t\tif matrix is None or len(matrix) == 0:\n\t\t\treturn 0\n\t\tls_row, ls_col = len(matrix), len(matrix[0])\n\t\tleft, right, height = [0] * ls_col, [ls_col] * ls_col, [0] * ls_col\n\t\tmaxA = 0\n\t\tfor i in range(ls_row):\n\t\t\tcurr_left, curr_right = 0, ls_col\n\t\t\tfor j in range(ls_col):\n\t\t\t\tif matrix[i][j] == '1':\n\t\t\t\t\theight[j] += 1\n\t\t\t\telse:\n\t\t\t\t\theight[j] = 0\n\t\t\tfor j in range(ls_col):\n\t\t\t\tif matrix[i][j] == '1':\n\t\t\t\t\tleft[j] = max(left[j], curr_left)\n\t\t\t\telse:\n\t\t\t\t\tleft[j], curr_left = 0, j + 1\n\t\t\tfor j in range(ls_col - 1, -1, -1):\n\t\t\t\tif matrix[i][j] == '1':\n\t\t\t\t\tright[j] = min(right[j], curr_right)\n\t\t\t\telse:\n\t\t\t\t\tright[j], curr_right = ls_col, j\n\t\t\tfor j in range(ls_col):\n\t\t\t\tmaxA = max(maxA, (right[j] - left[j]) * height[j])\n\t\treturn maxA\n# %%\ns = Solution()\nmatrix = [[\"1\",\"0\",\"1\",\"0\",\"0\"],[\"1\",\"0\",\"1\",\"1\",\"1\"],[\"1\",\"1\",\"1\",\"1\",\"1\"],[\"1\",\"0\",\"0\",\"1\",\"0\"]]\nprint(s.maximalRectangle(matrix))", + "language": "python" + }, + "node_id": "dailycode-f78142066f114cceaa4d98d295572289", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470828" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/8.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/8.exercises/config.json" new file mode 100644 index 000000000..a111c6bb3 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/8.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-e6c251f64e884847ae8462cb272f80aa", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/8.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/8.exercises/solution.json" new file mode 100644 index 000000000..b4af2e789 --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/8.exercises/solution.json" @@ -0,0 +1,48 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "d97ccce8bb6443f9829ef7949895a1b1", + "keywords": "字符串,动态规划", + "title": "编辑距离", + "desc": [ + { + "content": "\n

              给你两个单词 word1 和 word2,请你计算出将 word1 转换成 word2 所使用的最少操作数 。

              你可以对一个单词进行如下三种操作:

                \t
              • 插入一个字符
              • \t
              • 删除一个字符
              • \t
              • 替换一个字符

               

              示例 1:

              输入:word1 = \"horse\", word2 = \"ros\"
              输出:
              3
              解释:
              horse -> rorse (将 'h' 替换为 'r')rorse -> rose (删除 'r')rose -> ros (删除 'e')

              示例 2:

              输入:word1 = \"intention\", word2 = \"execution\"
              输出:
              5
              解释:
              intention -> inention (删除 't')inention -> enention (将 'i' 替换为 'e')enention -> exention (将 'n' 替换为 'x')exention -> exection (将 'n' 替换为 'c')exection -> execution (插入 'u')

               

              提示:

                \t
              • 0 <= word1.length, word2.length <= 500
              • \t
              • word1word2 由小写英文字母组成
              ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution(object):\n\tdef minDistance(self, word1, word2):\n\t\tls_1, ls_2 = len(word1), len(word2)\n\t\tdp = list(range(ls_1 + 1))\n\t\tfor j in range(1, ls_2 + 1):\n\t\t\tpre = dp[0]\n\t\t\tdp[0] = j\n\t\t\tfor i in range(1, ls_1 + 1):\n\t\t\t\ttemp = dp[i]\n\t\t\t\tif word1[i - 1] == word2[j - 1]:\n\t\t\t\t\tdp[i] = pre\n\t\t\t\telse:\n\t\t\t\t\tdp[i] = min(pre + 1, dp[i] + 1, dp[i - 1] + 1)\n\t\t\t\tpre = temp\n\t\treturn dp[ls_1]\nif __name__ == '__main__':\n\ts = Solution()\n\tprint (s.minDistance(\"horse\",\"ros\"))\t\t\n\tprint (s.minDistance(\"intention\",\"execution\"))\t\t", + "language": "python" + }, + "node_id": "dailycode-e6c251f64e884847ae8462cb272f80aa", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470829" +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/9.exercises/config.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/9.exercises/config.json" new file mode 100644 index 000000000..f2439046e --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/9.exercises/config.json" @@ -0,0 +1,22 @@ +{ + "node_id": "dailycode-14e58eaa246544eb84ce3a248790784d", + "keywords": [], + "children": [], + "export": [ + "solution.json" + ], + "community_info": { + "community_id": 487, + "username": "community_300", + "uriname": "dailycode", + "community_name": "每日一练", + "community_homepage": "https://bbs.csdn.net/forums/dailycode", + "channel_info": [ + { + "channel_id": 1682, + "channel_type": 1, + "channel_name": "跟我练" + } + ] + } +} \ No newline at end of file diff --git "a/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/9.exercises/solution.json" "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/9.exercises/solution.json" new file mode 100644 index 000000000..f2f26cc1a --- /dev/null +++ "b/data_source/dailycode/3.dailycode\351\253\230\351\230\266/3.python/9.exercises/solution.json" @@ -0,0 +1,92 @@ +{ + "type": "code_options", + "author": "https://github.com/qiyuangong/leetcode", + "source": "solution.md", + "exercise_id": "72a7e99c2ec146b29fe662e34da41b4a", + "keywords": "字符串,模拟", + "title": "文本左右对齐", + "desc": [ + { + "content": "\n
              \n

              给定一个单词数组和一个长度 maxWidth,重新排版单词,使其成为每行恰好有 maxWidth 个字符,且左右两端对齐的文本。

              ", + "language": "markdown" + }, + { + "content": "\n

              你应该使用“贪心算法”来放置给定的单词;也就是说,尽可能多地往每行中放置单词。必要时可用空格 ' ' 填充,使得每行恰好有 maxWidth 个字符。\n

              ", + "language": "markdown" + }, + { + "content": "\n

              要求尽可能均匀分配单词间的空格数量。如果某一行单词间的空格不能均匀分配,则左侧放置的空格数要多于右侧的空格数。

              ", + "language": "markdown" + }, + { + "content": "\n

              文本的最后一行应为左对齐,且单词之间不插入额外的空格。

              ", + "language": "markdown" + }, + { + "content": "\n

              说明:

              ", + "language": "markdown" + }, + { + "content": "\n
                \n
              • 单词是指由非空格字符组成的字符序列。
              • \n
              • 每个单词的长度大于 0,小于等于 maxWidth
              • \n
              • 输入单词数组 words 至少包含一个单词。
              • \n
              ", + "language": "markdown" + }, + { + "content": "\n

              示例:

              ", + "language": "markdown" + }, + { + "content": "\n
              输入:\nwords = [\"This\", \"is\", \"an\", \"example\", \"of\", \"text\", \"justification.\"]\nmaxWidth = 16\n输出:\n[\n   \"This    is    an\",\n   \"example  of text\",\n   \"justification.  \"\n]\n
              ", + "language": "markdown" + }, + { + "content": "\n

              示例 2:

              ", + "language": "markdown" + }, + { + "content": "\n
              输入:\nwords = [\"What\",\"must\",\"be\",\"acknowledgment\",\"shall\",\"be\"]\nmaxWidth = 16\n输出:\n[\n  \"What   must   be\",\n  \"acknowledgment  \",\n  \"shall be        \"\n]\n解释: 注意最后一行的格式应为 \"shall be    \" 而不是 \"shall     be\"\n因为最后一行应为左对齐,而不是左右两端对齐,第二行同样为左对齐,这是因为这行只包含一个单词。\n
              ", + "language": "markdown" + }, + { + "content": "\n

              示例 3:

              ", + "language": "markdown" + }, + { + "content": "\n
              输入:\nwords = [\"Science\",\"is\",\"what\",\"we\",\"understand\",\"well\",\"enough\",\"to\",\"explain\",\n         \"to\",\"a\",\"computer.\",\"Art\",\"is\",\"everything\",\"else\",\"we\",\"do\"]\nmaxWidth = 20\n输出:\n[\n  \"Science  is  what we\",\n\"understand      well\",\n  \"enough to explain to\",\n  \"a  computer.  Art is\",\n  \"everything  else  we\",\n  \"do                  \"\n]\n
              \n
              ", + "language": "markdown" + } + ], + "answer": [ + { + "content": "", + "language": "python" + } + ], + "prepared": [ + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ], + [ + { + "content": "", + "language": "python" + } + ] + ], + "template": { + "content": "class Solution(object):\n\tdef fullJustify(self, words, maxWidth):\n\t\t\"\"\"\n\t\t:type words: List[str]\n\t\t:type maxWidth: int\n\t\t:rtype: List[str]\n\t\t\"\"\"\n\t\tres = []\n\t\tres_list = []\n\t\tcurr = []\n\t\tcount, pos = 0, 0\n\t\twhile pos < len(words):\n\t\t\tword = words[pos]\n\t\t\tif len(word) > maxWidth:\n\t\t\t\tpos += 1\n\t\t\tif len(word) + count + len(curr)<= maxWidth:\n\t\t\t\tcount += len(word)\n\t\t\t\tcurr.append(word)\n\t\t\t\tpos += 1\n\t\t\telse:\n\t\t\t\tres_list.append(curr)\n\t\t\t\tcurr = []\n\t\t\t\tcount = 0\n\t\tif len(curr) > 0:\n\t\t\tres_list.append(curr)\n\t\tfor index, curr in enumerate(res_list):\n\t\t\ttext = ''\n\t\t\tremain = sum([len(t) for t in curr])\n\t\t\tif len(curr) == 1:\n\t\t\t\ttext = curr[0] + ' ' * (maxWidth - remain)\n\t\t\telif index == len(res_list) - 1:\n\t\t\t\ttext = ' '.join(curr)\n\t\t\t\ttext += ' ' * (maxWidth - remain - len(curr) + 1)\n\t\t\telse:\n\t\t\t\tstep = (maxWidth - remain) / (len(curr) - 1 )\n\t\t\t\textra = (maxWidth - remain) % (len(curr) - 1 )\n\t\t\t\tfor index in range(len(curr) - 1):\n\t\t\t\t\ttext += curr[index] + ' ' * int(step)\n\t\t\t\t\tif extra > 0:\n\t\t\t\t\t\ttext += ' '\n\t\t\t\t\t\textra -= 1\n\t\t\t\ttext += curr[-1]\n\t\t\tres.append(text)\n\t\treturn res\nif __name__ == '__main__':\n\ts = Solution()\n\tprint (s.fullJustify([\"Don't\",\"go\",\"around\",\"saying\",\"the\",\"world\",\"owes\",\"you\",\"a\",\"living;\",\"the\",\"world\",\"owes\",\"you\",\"nothing;\",\"it\",\"was\",\"here\",\"first.\"],30))", + "language": "python" + }, + "node_id": "dailycode-14e58eaa246544eb84ce3a248790784d", + "license": "csdn.net", + "created_at": 1637894160, + "topic_link": "https://bbs.csdn.net/topics/600470798" +} \ No newline at end of file diff --git a/data_source/dailycode/tree.json b/data_source/dailycode/tree.json new file mode 100644 index 000000000..141befa33 --- /dev/null +++ b/data_source/dailycode/tree.json @@ -0,0 +1,4249 @@ +{ + "dailycode": { + "node_id": "dailycode-f84df733829145df90519ad1795a5ad3", + "keywords": [], + "children": [ + { + "dailycode初阶": { + "node_id": "dailycode-e7e0349d335a4ee081ad979ef3a4f710", + "keywords": [], + "children": [ + { + "cpp": { + "node_id": "dailycode-516b53e0db6f4fcb85d393644eea6fa9", + "keywords": [], + "children": [ + { + "exercises": { + "node_id": "dailycode-e6f4640190ed47628252f04040268ad8", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-b5d53da6929b4a0abe12a37e1d7cc77d", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-f40f4ecc0b244fa186aff0bfb9976b7c", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-8f4a328fa32542cfbab686f197492c17", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-5595559543584bc69a5db8ee9eaa3956", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-d83f9085634b418e80229a2b5a9cb63c", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-aacd972c55d1448d89528565d5f3e971", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-9de7041eccbf40b2bfb816106179b47e", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-0646f44208424631aff031ba6ac25524", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-194ea4a62b2448fdb6199ff24fe4b792", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-93ac67f3484a450782766cb42d60c7d9", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-0591b6205ae742d99237ec57011d3da3", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-f90fe85642964ddf8bafa6d3959bfbe8", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-c3bd1518391f41a28a22b197f780f99c", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-9b2837c3037b460e9a6fef477307ca55", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-6a3894fe143f469f9229536c8807448d", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-cbdb78f75ef94f96bee28a6489a3b835", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-18b330b06c254136bf00850f53290b0b", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-81cb97919cb0454d898a43fe8d41f2db", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-e8317165a816402db457837074d998f8", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-8d63cf73e9b24854a41cdf3f51c89418", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-576049e4d5e9473fb838a71d21ebf8e7", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-f0faa8edc8874ab2a4f4a761afe12be3", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-ed083cfb659044dda203cc8c52aac153", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-8e7e471646514e55a8f6339debaba0c2", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-3e1477a0b53d4f95861e171bb145edfa", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-7361c99af21f41d7afc9ef2a7d0c59e2", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-6d96a821994d46f8a4c62dfe46b82481", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-eaf833a2755343bd8b00dd67e8473e59", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-42e8e695908b45c9ac0372043073d584", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-9054271f126f49929fe1552a8017408a", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-76e2e197fa8044a5939dc87d01245e2d", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-e44f156234144b6fa859e5ed82d6bc4b", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-23f2d2d00dca43bc80d5f4426c190250", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-9662f082ecb24eafbabd9cc73d7a5847", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-41a61041f452440ba9cc47d98c9b5087", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-50a57ff04dbd44e19752bef441bb988b", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-0ebac8b47771430ab733f371d755a8c8", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-0d0995dc614d484ca466036511232672", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-4928f8d1cc754a6e99023dfe6fcc645c", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-58a48a2a35404ef68df4d1d487615e2a", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-6b6cb108231247e8a0d25180f162718b", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-1ef5eb82d2104bb499ae0d7c160eca08", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-c38e888a041e4ee59422318293d9fc97", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-64982f9ba8dd444da2c236c7f074dab0", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-a210905d5f7e4bfe9f46bb1b3400b70f", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-39f31fa6e3b74d95bcfccf7c3f06c192", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-3770668fea9a4a22987320b43d573fd4", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-5b71b02dd5694fccae63bdaaa74c208c", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-00acbdbae41242b1ab11f3f2a18db473", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-7f4ffa5e3eaa4012b0eb71d6930387ba", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-d4b456f961584157aa5e8a1d39710971", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-4eb06a6ddce54064adf5c37ab70cc96e", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-e90b3773494b484a95cc912b8b46f4cc", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-a530e610620e44b4b389ef63e0b238cc", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-f8b6fc2e76794fa78ddc5af2c95f9835", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-2d0e9720703440b89c4c78bc0eac8cb4", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-ae5a4a9413e849e4825de0a930c4649a", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-6aef4822e3c54d95b4bb480d4242e5f1", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-0824e8c594e842248af440381b6aacd2", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-292dcb01772448409f0093e9ac99b7be", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-6ee8ab461708427d9f8200b2ead72d59", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-543bcaa53c544c4fb98725e053e59643", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-686a56ba3191489fa5065485ce174e28", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-121b4679b80f44f89234d09add8823ed", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-a6c021ade4914ddfa95a6c3749b39e97", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-cbca6fcbc4ab4dbabee8b7376d875e60", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-3ca87741ab2a4756b5cfc06351fe7944", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-d8fb51f903054d09b3e3e8c23c3c0036", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-e4b3395dbb454921b2844885d5edee8b", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-776b17acb3624028aa64d4ab4f22589f", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-fc25afd2c08745858aec1f80a7c630d6", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-c2ecfa9c0205486dbee24ece017d6df8", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-a3c6d1ba3eff44589c32c36ce4d9d666", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-b0c64306cabb407cab1133d28d2fa2ec", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-6141961c2aea43338135ba51d2542d23", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-f74d4a8827134b95be99a1cc4e069db0", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-077c4588ce144b738c311ecd56b6c249", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-1f7753ab85df4d1d9a4479becc5c6b4d", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-384fb1db2ac047899eea58d0ca0a468f", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-efad5e20482b4988ba117fa63d173a43", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-23f90fd7082f4f6ab37a2f1df0d084d8", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-cfd7bb9455e644749ffc5204d9012feb", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-93bea2166c9f4473bbebded26b678bb7", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-248bac1e9f8049a797197ed6b8d08f56", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-fc5373cfcfb541a1b12ec0dbe29f74cf", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-9cb6069c227e49d59ff1dc8f968e7444", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-9e2570888c7f4ba7a4514a64f9d837b0", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-f5e6dbdb903048868b02fc2916a4c8b3", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-0a98fea56e2241aebeede7b2f502bca7", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-a56baed6a62a46eebdc8c20b2ca8fa0f", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-ec47904e86d843648adbe57362e3fb25", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-14c9f2ce4a074e43958cde1273f03140", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-673456a32b054f3498baff05d33b8a23", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-c0d349cc79bc43b6b66a4e561c11adb4", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-da77f23647504d0d8105ba49f9e7c3d9", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-5a79db90959f499e9cffd301f9cb1554", + "keywords": [], + "children": [] + } + } + ] + } + }, + { + "java": { + "node_id": "dailycode-aa973b9977cb4929a22ec6c657d84644", + "keywords": [], + "children": [ + { + "exercises": { + "node_id": "dailycode-6800f6713d5a4e85aa6db48e6c5a8d97", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-a56e385c4b5c46aca7f4e809ca7d9c2f", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-3d37655535b94c67973752f1082916b1", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-1ca616758e884630bac67b234def92c8", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-76e2da179b144ee88079177af1baae8c", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-f0884125382f41c592c2346b73f34e30", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-642fd7e4d1d94f50b103667b52e349de", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-a97f6434fd15477d982f9ef33297caff", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-4599bbc177164a5fbac3c9116aee0c05", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-b1d024a612ef4995986230770db68e62", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-bfa08919a0914b6092a54578c976c2db", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-0eb0d6cdc41643e89bb5683c139216bb", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-0cf6927a16a24e268a24657d6960a95a", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-f212de10cac247a4bab00cb73e61b645", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-4373e77e72654321846d4cb7d92b7935", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-91a33b05aa5342848cafc5816a49e0d4", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-a9a7e4b9222e4162853a11cfdf80ee99", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-60a6ce1c2d794a2bbe410465d3a02887", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-1cd0efc5eab8483ca912341f4320382f", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-8c4886e800094c849c6eec647e0c04b7", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-9f809286599941568b67aa96b36c603d", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-f0382b88c43f411fbf4bf8273bec3247", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-996228f46e754a58b78d9567bb808499", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-9c270d6326d3421c974562ddce0e3a56", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-4756dcc742414555aafd768d88b1b5a0", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-d3e5bdffa99e4c26a254dac53bab6424", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-2bd314f30cd143a5acaf9847ce64e8d1", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-199440179d394fafb06dc367103b6359", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-e7a3cf5d0ffe48a6ae751e69c884fe5f", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-d733ec126a274808bc4085078f5f93df", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-2adfe208aeec4d2fa3eb42cb8361e417", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-1aec7acacc4e431e9761929aa7a04af3", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-5fc81f3203724e6bbc28969923a64495", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-b99fbefc0fd34ea9b5a17db12f45f1c5", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-31d9a5c7f596454a800d98f4ffec6e67", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-8fcebe8098d040f7a3dbbb9a40d79501", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-4b8e2ba0678440539ca1fc73c8852103", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-69d51623b58146baa7164733d16a104a", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-f82947171c0b4413b5364fc8d0a9abc2", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-4a30eebe19474c4fb0a387ab45a684de", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-2ab0d6770e5f46889d71ba2f4b2e1fb1", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-df2108c0132f4f87a1db8b491de4dc79", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-3cd29560f5674e679333d243e81115c0", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-cd10c107bc354eef83e1b81a46b78db5", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-77f941ad05c44053af905fd80f942bd5", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-00a267eca7a84efdac846774beeb5766", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-a0ba50f39b734de284a9d868affd00a5", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-d1b9ca19b0a24258833ae33eac8f8ee6", + "keywords": [], + "children": [] + } + } + ] + } + }, + { + "python": { + "node_id": "dailycode-5219545f25234c5cad33fc2f95fd7880", + "keywords": [], + "children": [ + { + "exercises": { + "node_id": "dailycode-2eebebfff6fa4188a9711c043407e25f", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-d23a2d27d45a49b197d1cd6eea72f56a", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-6d903ddd2bbf4473b7d0e9d6c0b0c2c8", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-32ce873ede9141efaa8c63975adf1561", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-94df85e9dbd04a8cb60cec11aa9b170a", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-2e6302bf718d46598da5024957c605a0", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-37725ca16b9f48d7a618ebe5d654955d", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-eb8c1b6d542e4aa6aa9b722336978115", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-0e465e8d70a1454a8aac9dd2da5f9325", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-95f5fc9c54d0497ab2c97dd8c49b8629", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-4e18b0172b18463dadaf46362740d7d0", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-2bef970158ef4ce2bc686d63ee943610", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-d722f2ee79964c4ba0ff10be006ed793", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-5e0a54189fd843a8954fa9ae5aac50a0", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-a9142d5aeaa848daac6817cae5a08bb1", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-b3bc51803cda4223ad95594ff9597d61", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-be86731880ca4fb99657c3f64cd64235", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-a348977e517f4b358abaf20c42988cbf", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-495106c5ee4543a98d00295b797e3982", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-654c59b4c5de4a82af30051c65b06181", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-1dc9532947e14e2aaa9274f1ba3e093e", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-bb13d528854f425581da02db1f7f053b", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-45221df1b0024a78bfef72b49e99492c", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-6a1541c03bbf441a9f896331a5d4cba1", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-5d456f7d55404cf799b24bcc882a1553", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-309fe024bfc848f0b91a68fe6b953057", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-286abc7bb8fd4a43bba78b881258b513", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-9beb2eba588841a6b73e635b2c9fad46", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-899d89e48f1148048fa4618b855c92cc", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-4047f84489c9453eb082e3e15cf6ad39", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-45ad704b5bf2410f91065df96249a035", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-cc53b8c00c3b47e49acec679ed77a9a8", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-cd394beaa1464dbbac796050086c3f6c", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-dd6c58cbe89a48799101af843c45a7c4", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-f46ab61031ab4af6926cc6db067d1b78", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-bb67ad165b7640ba9bc5888f3d4a2647", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-8d314c28e1e44f6e8b8c85d1ddc064fb", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-40b9002d2beb42aeabf9947bc8af5932", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-97cf74ce017444f1aa65cfa6a8ae7451", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-7f49212df36b49e78915b9f27d2c4387", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-5ca24290c093492b987b122e8cb2acd8", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-2c643620e7db4198b4799fb816be0bf9", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-5bdf8ba742d641e29ecca718a5fcaab6", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-d5d81e058c794c00ad9824c7649d4168", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-8c71087921b345cd8aceed9913f3cea3", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-9290d8e155064971b7dac798bc6e3b30", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-87c05af61eca47f899c58a92805fb9db", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-c4157a6e02994060aa622e2fb33eda35", + "keywords": [], + "children": [] + } + } + ] + } + }, + { + "it_knowledge": { + "node_id": "dailycode-3b3dafe8cf4d4c018cf368ec5b10a7d7", + "keywords": [], + "children": [ + { + "exercises": { + "node_id": "dailycode-7d322d7680364e9eb8bd499d459b5830", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-fda12588f1f240ba9e6a0d68a5988930", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-4f67dc4da72a41f6b12c2ea744c12dda", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-d27e122b8e6b406383a640fe29f0d801", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-d532c487ab864bf2b1a89733541daa2a", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-6db64e6fef8c41979a0e555a73904772", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-ae3f4c23378d488fae3eef5e1ea5b9d6", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-c1e34791df744e9aa80e2170f6165279", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-e8bc1d68ff894091b1bcce5f3902fd77", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-d830455981d94370b9c1d8818f9be557", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-5768a004640642f4a6d8ad05da14c6ee", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-6bbef4141e7a49a4bdf572a75f0da5a6", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-a4c3a6f260b243dba3a75bbee1ddd3a0", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-cba3c9a6ed1f460ba5b586eb0a232e62", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-84c9b65036c845e8a77148e5f344a4b7", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-9b16c89cbe7e434aad1c5465eb2b6da9", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-0d3635aab75f48beabfddb5726669e18", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-ebb4b625582b406184b9338718c47c7f", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-c4ea7b5d22024757bccb60adbd5ef2ef", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-2dcd0aea6e1e4402aace9e6aa5302c85", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-eea138527d38484791eb791963f43112", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-3af8b35b6d2d428ea3854f422ee39a39", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-9d9d7fb673444ab080b7202400e04a7b", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-1874bb8928ca44d6a48d32b9bf947f1b", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-2a111fcaba4341f7a65a09a7ede5a48c", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-20e735ce3b6940bbac5869f49fa2ffae", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-82042adf0ebe41d2afb1c38e03eae895", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-ed83b0d2e44b4b3b9792ffdc3edc7c82", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-645f76afea594faf899ac96fed1d29b7", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-f1bc4c2a0701401a867657c88bfd47e9", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-7dbb8f79dec54d63917d654a988af3d6", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-43ec2f7700d443ef860de334584a26e5", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-5ec33b3b364b406e87fcc94a91078a77", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-6f46c79e24064da68c8274135b4e7bb2", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-2662cb46d3c74a52845c31c044f25d64", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-fa9ed9743c364d24864df3456b151572", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-b92c284f681b44608a543e612537b351", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-1f7abd44fd63465f90d5874249906d97", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-1ab4e305968f4caeab0af3453504084f", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-de7ff98a55c4460cada3f34683a4681e", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-7ce70a8d2a144e0d93c8d243a3eba9e1", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-7ec5c3aa458e4858b4b6b40ef7912f62", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-5daa7f0d16044577887902bb1d7fe631", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-2ad04575e5514b26b1fa814eb860c470", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-76f76e1c35fe4e8bb39c9b74184ca7b6", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-8d92677f51f148debc7fab5c5580c0c1", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-bf70aecc1ea446cbb690ee7b999f5464", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-98c411255a4a4cb19daf3b8c4b26f169", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-70f7f6a456bb462dbb55aeecadadf626", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-12a2e7d208a34209ae453b06633584d4", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-3a4af76d4d6348139205ea2b8874fbe6", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-d689d8cd98cf4c6ab0db382d775cf3f8", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-b1f359376f0948de9214b9a9114c983b", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-4e899355f25e44f3bd5411bbafe1db2f", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-162687a20eff465e9380c51be73134aa", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-d4ca484c2c2c4851ae05f24efa69387a", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-3f3d19b3a7dd432780f957e0e72457c1", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-9cba35f3c300452c8ff82045b0fbfe6f", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-7359c47192094def92008a17778d76bf", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-a6e79afb743b483d86f9e071f878b420", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-30cd8f8325714a92982bd2cf0630afc4", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-7881e4a81e864c7bac1abf1e2bdf4da2", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-0624b49dc8e44aadb007ba6d2715c137", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-a6d8223f903a4e40ab87582765198156", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-251b5a16ba714934a8a7fa216307fa6d", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-97b847e683774717bd5cce6bf5c6f009", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-dbfc9553f0754363921f59cf92d01440", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-6e51f330d8694426add5c311f6ceef7b", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-a4e1e718a2454c02acf68d29536aeb0e", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-6f559fe983984cfa972d8898e37d9e65", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-5090ab3ccc5b43cfaec61d71920b575c", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-d4f63b8f23874b9c8f7a5a8cd91dcbe7", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-77a791d530dc402db72d691e6b89d3c3", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-a48d3d86c52344df91d358ecd2f8f63f", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-274f3810ac424f81b3b6db4196775141", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-32c5d067cfda4c76964bd82da5387288", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-89f52ebc8a4b47739d97a12253077695", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-ee85ae278fd44d9da846fbbf5ed4c7a4", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-c0aed0c58957433cb8f1868a22055cfb", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-9a0780174e694f9bbe241fd378e0562e", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-01b9b605fcb04130aef43a9bb66e220d", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-f4e17b152b314f12900cb6e56461075e", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-87e44019fa8e4b3b96f8d574f854c559", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-9b6195cf8bcc4bc68defa82c9d54710c", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-5970022817174efd8c186ac98355e556", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-0aa83a4f75ec442f985f2804991a6f9e", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-697ff18599bb4706827ddd35c5894dfa", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-d8ecab5a68b24f72a87ed9eb9d4c3eb1", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-00dac97bf0af46d4b20e08f62b95a31c", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-29e3d0033a9e467f84bb1a11d9469f4e", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-0e6c90044ce443ae98492ad6dd571771", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-052601f2bab7422b910fb2099fe48ecf", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-be4e2071c24b48578065de9eadb4beea", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-6f2accb7ee4047be818220aa04bffc98", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-546b01ceba0b4ed7b4110b7b54f5dea2", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-aea1e1a0b8194ca3a4e4a6d499734159", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-9d17dc8bf5a948ccab1eb31f11d0c4c5", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-07916c627dea406983fa4f459e35bb3c", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-8235273c8c81448fb35275281f81d775", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-6bfa7f2885694ab09f5b71d25d15bc31", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-70e64d37dbd04624a69892967e525415", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-0a97930729d84311a82d05cfe4c18d5d", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-8afbcaa167c84350ac71132140fde05b", + "keywords": [], + "children": [] + } + } + ] + } + } + ] + } + }, + { + "dailycode中阶": { + "node_id": "dailycode-871ddb4f4fd24afa9e90b909acaa1c20", + "keywords": [], + "children": [ + { + "cpp": { + "node_id": "dailycode-43fd15a13a1f43d08b5d9b72d5a5cedd", + "keywords": [], + "children": [ + { + "exercises": { + "node_id": "dailycode-ac3df0d6b8e540ac9cfdf9c074c33b33", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-04771a9a92f54cb1b4125e4528c6a193", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-e140a9b572594a378231e0b69e615f00", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-fe4cced5cecb47dba951613f6b186850", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-5afc633f3ca1461e858b1cde58b04b68", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-a196808cff7b4cd1b5bfbd1d5020ca31", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-5d88f5aea60b4d6e9dbd83c13e22993f", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-04711f16d9ef4c92a4b8c611f05fa4d4", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-7f4aaca343fc40549296badcaa53bf03", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-5b037f31a3c849158d21cbaed4173fa7", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-ac4ab7abcdeb482bb23684e08a27e9ed", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-df624f99477f4489b3508b5d947545e6", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-a91ab2d4ae12479088f6fe0653c5f877", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-dab42155788f4df992f7bee3d2ceaff3", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-b930e3c023e1440ebb20130a7a2d188b", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-0cef0ea9a9464eb8acb4a439fde7c351", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-707a9a26d46749e9a9e2dde825d0421c", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-f5bede05c3a2454090a4bccc0479462f", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-390b583c367d440f80eaa10524618444", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-2d92b024f38245afa28cec2ec78b78cf", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-d42952ba501a46e5a121004d2f62e724", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-0c1bff5243bc4c4fbb688b0c8e1d1bc0", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-33f647ff549d4301a57cd82b9872bbf8", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-7077b339c1ef498ca92107cbc966a652", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-8159c79d4b6e4544bf44d1f7b9a57ff9", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-d44bd3f0766b4d3b92ff5b5ded112675", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-69ef472d89dd4a86ba769fd50d0ad909", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-022a4daf03b444b1b4fed08a83b469cd", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-22d0c66ac13e492ab38799ba4281480b", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-6a239526fac34bcc9894cfee622ca3a4", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-7529fd6dd7004bc6842a048dbe5f25cc", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-11e24a6aacb34945ba8db8b0a1f76088", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-b1ac676f141f4700bf7a6461416bf409", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-cf3b107ef2f143bf9071cd2d97d83a02", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-86063bc2e4f9408c90a68336b7d0b233", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-38ec094e925c4284a95356064aa65287", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-015937d27ef34a46b5ef9f61bde201e1", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-476afc7e273347f9bd276d7b148cf931", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-1d70b9eb3b884de6b1e5b8b30a25f2b4", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-66904ffb7b03468eaac045c49a84d854", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-9399618c5b70447fa35668bbe36d2da8", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-cb4872e5db3e4e259d3f87e69917426c", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-14099290be73415196ac10c7668e7aaf", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-bc7ff3f59cfd44729a2396f96ae5506c", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-5a4d869e768940439c9c3f0672b4f188", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-106a2c55943a4191b61ee447cf14797b", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-04de312db7184d038e58eb517b6b4977", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-c3c6ea1a42034a1abe5bbb20adff156d", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-ac2a4675e933469195468c03c2062381", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-4b7ce801ab4b4c89baa38f79b25c873b", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-eb10661e86af495b8acef4aac7e1af86", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-2d11d0b5706c470bb25b9eb3ec8ab140", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-5916246072a346c986fd14202099c13e", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-51ab560c60e241f9ba4b1f449db8f4fc", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-a6beddb2efc64ddc8a28e593dfefc807", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-1b393b30506f43f6874f85036d16a3de", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-6c74549bf696457084ef66af3c8ab6e0", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-9480f3a882734848aeea80c4b8e0fa7c", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-73f719eb3c124f11933e47c2cbcf4c7c", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-d1ede2d2c5a54e91a19273b3f31978c5", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-3880837d907340c9a9e96939e9fbae92", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-ba756fd53d6f45139d2d818d4a555fb7", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-09529ae417314d8cb84c07be9aec2849", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-a6c3e70f1c0045c1b2929f56cc5ce02f", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-eef49c9c9f0943f2a27bb9f4dfb22718", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-81f91206205e431f9ce2fa179955ecfa", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-b2dbc54134bf4e8a961f1b155e8c665b", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-58550dadc0174b719c8769c5d87c8814", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-74b60540beef43f7b8e98cf2d1a4580c", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-248163efec6747ce852e85ea2dbe3c15", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-f16026ed484a444fb95e3d6698f5f119", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-841814f7ce5d4aa18c3caecf27c8c494", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-70f141b3ad9d46febf18fbdbaf90c0f4", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-2d3f4293f7a84ff2a372da173fcdd96e", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-042b2c59e8c44737861a74454b50c22a", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-c32c095cff5545278e9e9e51bb3cdbe1", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-d5fa1747371e4789932aeed9ee27bcdb", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-b3f62c12a2624288bb79b4210b44e046", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-afe07aa3dd7c45bc9d6ceb91b6349f93", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-c93700cb5c094f74a66dfef7fa2ab6b3", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-5566db3ee0444562987747d551bcd75f", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-afaa892994bc4a7c920701ff7efc3384", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-93f92073f6254a549ac8e0010c008337", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-c35251e8f87a49a7a4b5e149f073dea8", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-826dfcaf541147bb8be5b8a3103697ad", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-4636efcd81dd4e2a9f8f83ab23b80ffe", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-1964e4bf97984234a14f997bb1352fcb", + "keywords": [], + "children": [] + } + } + ] + } + }, + { + "java": { + "node_id": "dailycode-5aeca2a930d442919a9fb9c5d2362e95", + "keywords": [], + "children": [ + { + "exercises": { + "node_id": "dailycode-e4f08941ea62439cb49087bb21e1fdb1", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-2c34fdc356ec41e1ae1c01be149ec729", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-bc6b2d6511254a5f98339f5f75c558a6", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-5bd0909b7195425cb8eb7497477bdc33", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-adbef0040dc440618bed1f48bef2c16c", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-77a803dcb98440b7a136a24276b6854d", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-9d0fc0cf99704e4684d62717fcf0025e", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-21945d925ace44438887c1e03e5fa8ca", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-cdfa1a7c19ef4e879fcab664e5c47371", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-b97a45db1664450db39afacc504f65c7", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-cba3b9fdcdbc447981e98ac7d67b82c6", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-2b9e60620fe645f883040218b22a8d76", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-150f426952d9492f81925cff61127646", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-e7dd2c02e6b94b02a2cba6cb32b0c0dc", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-a176e82f286443f5a97e226011b84a70", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-c49e020840b741d485bc11bf0855b4e8", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-5d5d68a0fee64164be313bddd528142f", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-2b4e10e9e01a4775a03f2a7bd8cac54c", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-0fc1b6a999914e309d0a0e484e5e0c85", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-b087bfd39b6949ab8e67326033d74792", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-512d40c59a874474a237294910486e0a", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-7fa5cb6f690545fc865aece3cd1a74a9", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-06979d4bde9b4d048a028977d9bee368", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-6defda4fbc254df7a3a4f2f78233091a", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-f7794a1f875c4fbdb5c90aa69bbb1d1c", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-8df6b07a74a3448ab4d1ed17cd59ece4", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-63f1dfb5737e4d0eb3afba4a75fecd8e", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-290dbf6b65274179954a9f182f7a2f98", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-423001ac26c44d20a3572064866b8a29", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-ce734aa4eff1425fab72592000d1eaba", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-f73b6a74269147239eb2e60bb9b1bec0", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-38686faac5e447d8b52391e777bd15b5", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-b797b4502b324dbcb41cc7d3ddb2bdbd", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-4a27c74c6807494493bee7bc2b275d32", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-596c3dac8f6c4d31a61477304a726299", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-50818484f6ab4ab08262ca694785cdbb", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-aa14a10d3dbc4e2a983c7cffd4eca240", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-e782222cd8894664b3febf53492cbc11", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-68a4069880464d59a2b217ebc248c3b7", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-c4d4538cdb4544b1871d8b2c95d3893b", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-7873feae482441e5abe2a0319821f44c", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-e9998c9054be454eb2a0a4f69e129830", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-40c4c366546a44b5930491db827d2c14", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-ccc2cd1afb9b4c05abec6e80d581bfd2", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-47ce044c35bd436a8c83976d0f209db9", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-68cfc35ac6174d01bfb5751c70035252", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-97b59f64908e447ca8f6cc62c7d69b2a", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-0da11b12c20540a69a7df7f71bc052af", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-a4f351932be94d9388ffb510d2ff8dc4", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-620f5bfe852e4cbd9ce5c2eb848eba27", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-7c1a5ad714c441d7a0ccdee3c819e4c6", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-a51891de4bbd4992a1ca2d8d786bbc10", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-c1da5b7b32894b2691bf58b40188b67c", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-6a33231763734cb28a58cca9e68d7ecd", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-d433cef163fe4e2fbdf5bef441506da8", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-7422725251434d6f802d5c3c67d3d8b2", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-6007336fac224f659d45e9b3829c6726", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-bcd5c08f84344295bc2f185d6944f7c2", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-16ecbc0a44ff4036aaf4be01fd07e40f", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-b6ed4d3d6d31409fb7f1fcc072ce4295", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-06dec96ef4e941b5b10c3a4feae74ddb", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-ed11e080bba44d2bb7ec98bbddac3ffc", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-da11ba53a9bb4e6b8880a2cd184933d4", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-56e99b722b5641bc884da20f47a9386f", + "keywords": [], + "children": [] + } + } + ] + } + }, + { + "python": { + "node_id": "dailycode-6adb56f72172439c9d712de16b8d504c", + "keywords": [], + "children": [ + { + "exercises": { + "node_id": "dailycode-c4bd91e863e346e8860401ab6914732e", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-10743c3216c44bb1a4acda922204abf7", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-df5089b6b16346dcb5d24198a0eb1e37", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-e255b434da964a3e8c1104d1242677a5", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-d23d7c0418f84280a2ef890bb4fb1757", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-a7329b367a72496381d22bcbc15b0ab1", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-b1f1ffa8aa944017bc6c7f4d7b9cece2", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-62b760478e454f309a425bf1da91ecd9", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-527f1c40eca54c19be59eb9d93305dc3", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-69fd78974192450ebe5d6fe0bbdbfa67", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-061ac0473af848a6aea1b1d7380686f7", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-ebc866b086ae44a79c65cb99235a170a", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-0da6d95ed1b54b8e83d0193c88e6c237", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-89a4d210cf6b4a96ab49088e293fdd9f", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-74272d3291224f24af9d13e734d733f5", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-1cb29400682c421faa8d5b7cb588faef", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-fe3d45a08a0f47858df48e044d0ae2f9", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-8c22cff947234df7a45ae4e553106499", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-3e9f6ff35d514b77a9785d61386e9093", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-f5007b90ce784459a128ea75d2f74143", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-bdac8c45d3904849856e3a056ee32977", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-7e632cf98b404ccba54e61ca0a59ca24", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-0c3fe32641404f16be867b3a3b4777a8", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-c35f1b8b4df24f2a9203047c0d6474c6", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-d806ed41ab324a0582401a2c7b2a3da7", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-178fdec62bcd41b0ab5d6d59b0ab1b74", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-38889c9cdaae42f4a0f4a8c8a9c710c4", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-3caea3b49b034e598bc0fbc44f533451", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-b502a08a7c5c452b98a10f067e5ac1cb", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-f705496a584747d69e1008f88a6e4bf8", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-8f5f2e3476d345f0995743a1a93b93b5", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-6d9dbe9c0db5433dbf81e522dbfedeb0", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-fdb0c6ff79bb497cbb659d0c0cd3aa0e", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-0a11733c91fa474bb7a32059c929f5f2", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-a80939d1f7bf47458f330cb20db27c6d", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-ab955e0c23904c6d8b3dd32fc4d80da1", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-9f59a4bafe424c768dc1883a7edfb04b", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-950e34d34dc94847975e1ca56e54c574", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-9dc6613c2af04b408404e0c407aaa7c6", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-bc3eb1c20a03474e83551d80ab9725c7", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-5e08f34544f041569745d22d11919871", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-6afc8fbcc3f245aeb6bfea64f87d53ee", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-15dfcfc57f144a59b0745657fd22e7de", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-55947e6bb1d6408ca60413a7d03f7e38", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-c7d55f870c9244b6a627dcdd0e13dc35", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-a76adb81a0c14ce6ae16b18421469984", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-f403ab092a4b4c709a21aaa49c497197", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-026eee6137c34799ac0a1fe8e3cefc1a", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-71504d078d39443c801ae99bf0d81fa1", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-7a8871cf181c497388f30abbc0b603d9", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-054c08399a624f7b823f3b8f5f4e612b", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-27bae4c0ba27468eb2c6e09a7251d16d", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-a8944f7f59b943228d64d83b7428caa0", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-305b624c7612402fa0b7c7c2464694cc", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-27c2c1b4db8748f394d7ec612bf0ac33", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-00212162ec234e81a8f9274d7c9a85d2", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-671c6173f6cf4b489c1cd9bee0cca519", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-237fc188faa44250a488a2ae809d34e8", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-6248a779002b4454b3493e7553b99d49", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-a23959a66506488a952c2aace7627c39", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-3ea29a0e480449b6afcf0106f48e3d83", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-325bf433414c4b698ce5e6ec41e1a44d", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-ce77e5bfde1d4560969cbcbafc93a241", + "keywords": [], + "children": [] + } + } + ] + } + } + ] + } + }, + { + "dailycode高阶": { + "node_id": "dailycode-fb69ab6a31c34ad4b5ba4f2869c27f75", + "keywords": [], + "children": [ + { + "cpp": { + "node_id": "dailycode-0da5ab41a68f4658b9965dc98958684d", + "keywords": [], + "children": [ + { + "exercises": { + "node_id": "dailycode-b6d28853f68d4a5c842f4d1329b51b95", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-11c2226bae91486682a9bd27df4047b5", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-f77c8eab81bd4f33b5a86ef896683c1a", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-f65da56d7cc24a039bf82c904df55f58", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-70c36c9a7d99475c87b427df4b2fe285", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-5796b5e24b034f8485f278d8ea6b2674", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-78ef1609cd054f0e8405c97d76ef6dfa", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-7798b34864d141ac9f37b317b0907ceb", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-3224725bf9304f5ea5f91480fa9bc974", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-4e0793b3767449d58122e2c9a97f0bac", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-43ca27b263d047aebb7b4cb0e86d7f8a", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-ea953e17f9ec4cd7aa1341f7892c60f6", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-c11894f51cc0474ba829f36a11133691", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-8190a9a91ce54eef9e371ce1dcecad04", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-4dd43c582c5f499b9f30071512adce42", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-9a4408230ad9414ca2c6ae393d6dfc0c", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-ef701b1245294488a29c1d7609ccc901", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-c03b1ceef1b24852b191ba1208ae6903", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-931e77e54385459da6bd004f6f13b187", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-12154716a86a4a3996629c7ffe33e922", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-6c1fc61550b048c696cf72b285cbca33", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-379fe0110ce244ed9109860976c01206", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-71a29d2d4ba84ef5862dbcd1547a8d0c", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-ec2dc76044e44a3ca30eabe97355ea63", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-4522f669896d4e32bae4b5a741d160ad", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-569fed9589644294ae5ef549b7babf31", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-9f07bfe91c6f4ca484f92a7a49912a66", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-b7c191c627974320b5a16024eb016358", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-a1becf27311a4e77a4c9cc59c8847eef", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-4cfdb4abcc864c1ba3c3b08cc1884f6b", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-9c4fc46e655e473c8b1fa86ebaa44589", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-7568d52f35704930b597b69901e61ae6", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-da88752f950b47bdbbb804a8ce1489c0", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-26802d77cb99478bbd3754edb14e4d05", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-a84cd69409ca4eb6b4ce004ce6cb68f4", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-614de2b516c846b88756982c0408dde8", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-d1dc9f58aa4b411886252ef1dbc58060", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-29a75c30bfa34e84a2c372b6e931a7a5", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-eef9a0612cff417fbb8eb4fedfb899db", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-3a1bc738c17a4209a24f20e6284146dd", + "keywords": [], + "children": [] + } + } + ] + } + }, + { + "java": { + "node_id": "dailycode-411ef54ce44a48888f8c744d484a6224", + "keywords": [], + "children": [ + { + "exercises": { + "node_id": "dailycode-55c7a4e268dc4124978b79a1c91c02b3", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-f08ed7a411b948daa662d0e8cd0a0948", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-68470d3e20c241688ad0845c6625335a", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-b18ab4eee6fa4810bde94c8fdb529674", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-71a1af0422c54a1a9fa6959b4dcb04fc", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-2b10d595b0864b389f2455cd580078d3", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-409cdde69271474ba4fa13f4d4e49b85", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-c428b0172c424f6da1ad761783cbaf41", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-f0f4aec713b24926bd8c1a5761778352", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-4e7d2bc6a18f42668b4b2868a7730ced", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-bb85e8f3aec14d48b767f728bdf1dc51", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-e3a7c5b5f5724a47a7de4643ceb4b4d4", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-412b8eb337ab4e35a1dea7bda02d89f9", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-31ce5d5a421d458cae9da5be0998199a", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-2e20527b423d41d8881886b6316e28a9", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-d3e358bffc0840129e126f8cfdc2ec90", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-8e1e5071f1df4857ab3fbc97910498be", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-cb66e1d1a6c34674889f140de4b21ac1", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-c3538ac1b9744b19b8a09ca75457aec4", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-a17a04b98de344dd8c8ee681f8bb05d8", + "keywords": [], + "children": [] + } + } + ] + } + }, + { + "python": { + "node_id": "dailycode-5b43853695af449d9d39bcd06550fd7f", + "keywords": [], + "children": [ + { + "exercises": { + "node_id": "dailycode-140f8cff6c77471a9b56168e6219d7e3", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-828f879aa4b94b1d94ca7f29fc5f0840", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-01b66c5c03b24bc481051d8174578a87", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-877406b98b004e5eb7a935d6fb6cb8eb", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-90915356290f498093aa1edd5800a16c", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-2d90a7f71a184ca5b832014fbd0e2f9a", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-f78142066f114cceaa4d98d295572289", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-e6c251f64e884847ae8462cb272f80aa", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-14e58eaa246544eb84ce3a248790784d", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-fb770b2715ca4e9ba76c2cd455ef8578", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-e6620e8ed01649a5b82d5c3f59a366b7", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-cf56d018344b4d6598b49593f567d8ec", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-6b7661f648ca47c7a6daec82ae8020f1", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-577a3d8df74848e391bf6890d6855847", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-892f8f04d7154058aee79eb497f262e5", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-538a403bc6c44b689f7624acc3774c21", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-5f24715d54db4e4ba085425cb63c0fa7", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-43a60df3112046ceabce5a6c72c802af", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-c3fbc3654d0649a09f019aa4b33abf91", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-8d8d61cba07e4ef6bff998974a1683ea", + "keywords": [], + "children": [] + } + }, + { + "exercises": { + "node_id": "dailycode-30ac3c32bd5643fdb9bce73dc8740969", + "keywords": [], + "children": [] + } + } + ] + } + } + ] + } + } + ] + } +} \ No newline at end of file diff --git a/data_backup/it_knowledge/0.md b/data_source/it_knowledge/0.md similarity index 100% rename from data_backup/it_knowledge/0.md rename to data_source/it_knowledge/0.md diff --git a/data_backup/it_knowledge/1.md b/data_source/it_knowledge/1.md similarity index 100% rename from data_backup/it_knowledge/1.md rename to data_source/it_knowledge/1.md diff --git a/data_backup/it_knowledge/10.md b/data_source/it_knowledge/10.md similarity index 100% rename from data_backup/it_knowledge/10.md rename to data_source/it_knowledge/10.md diff --git a/data_backup/it_knowledge/100.md b/data_source/it_knowledge/100.md similarity index 100% rename from data_backup/it_knowledge/100.md rename to data_source/it_knowledge/100.md diff --git a/data_backup/it_knowledge/101.md b/data_source/it_knowledge/101.md similarity index 100% rename from data_backup/it_knowledge/101.md rename to data_source/it_knowledge/101.md diff --git a/data_backup/it_knowledge/102.md b/data_source/it_knowledge/102.md similarity index 100% rename from data_backup/it_knowledge/102.md rename to data_source/it_knowledge/102.md diff --git a/data_backup/it_knowledge/103.md b/data_source/it_knowledge/103.md similarity index 100% rename from data_backup/it_knowledge/103.md rename to data_source/it_knowledge/103.md diff --git a/data_backup/it_knowledge/104.md b/data_source/it_knowledge/104.md similarity index 100% rename from data_backup/it_knowledge/104.md rename to data_source/it_knowledge/104.md diff --git a/data_backup/it_knowledge/105.md b/data_source/it_knowledge/105.md similarity index 100% rename from data_backup/it_knowledge/105.md rename to data_source/it_knowledge/105.md diff --git a/data_backup/it_knowledge/106.md b/data_source/it_knowledge/106.md similarity index 100% rename from data_backup/it_knowledge/106.md rename to data_source/it_knowledge/106.md diff --git a/data_backup/it_knowledge/107.md b/data_source/it_knowledge/107.md similarity index 100% rename from data_backup/it_knowledge/107.md rename to data_source/it_knowledge/107.md diff --git a/data_backup/it_knowledge/108.md b/data_source/it_knowledge/108.md similarity index 100% rename from data_backup/it_knowledge/108.md rename to data_source/it_knowledge/108.md diff --git a/data_backup/it_knowledge/109.md b/data_source/it_knowledge/109.md similarity index 100% rename from data_backup/it_knowledge/109.md rename to data_source/it_knowledge/109.md diff --git a/data_backup/it_knowledge/11.md b/data_source/it_knowledge/11.md similarity index 100% rename from data_backup/it_knowledge/11.md rename to data_source/it_knowledge/11.md diff --git a/data_backup/it_knowledge/110.md b/data_source/it_knowledge/110.md similarity index 100% rename from data_backup/it_knowledge/110.md rename to data_source/it_knowledge/110.md diff --git a/data_backup/it_knowledge/111.md b/data_source/it_knowledge/111.md similarity index 100% rename from data_backup/it_knowledge/111.md rename to data_source/it_knowledge/111.md diff --git a/data_backup/it_knowledge/112.md b/data_source/it_knowledge/112.md similarity index 100% rename from data_backup/it_knowledge/112.md rename to data_source/it_knowledge/112.md diff --git a/data_backup/it_knowledge/12.md b/data_source/it_knowledge/12.md similarity index 100% rename from data_backup/it_knowledge/12.md rename to data_source/it_knowledge/12.md diff --git a/data_backup/it_knowledge/13.md b/data_source/it_knowledge/13.md similarity index 100% rename from data_backup/it_knowledge/13.md rename to data_source/it_knowledge/13.md diff --git a/data_backup/it_knowledge/14.md b/data_source/it_knowledge/14.md similarity index 100% rename from data_backup/it_knowledge/14.md rename to data_source/it_knowledge/14.md diff --git a/data_backup/it_knowledge/15.md b/data_source/it_knowledge/15.md similarity index 100% rename from data_backup/it_knowledge/15.md rename to data_source/it_knowledge/15.md diff --git a/data_backup/it_knowledge/16.md b/data_source/it_knowledge/16.md similarity index 100% rename from data_backup/it_knowledge/16.md rename to data_source/it_knowledge/16.md diff --git a/data_backup/it_knowledge/17.md b/data_source/it_knowledge/17.md similarity index 100% rename from data_backup/it_knowledge/17.md rename to data_source/it_knowledge/17.md diff --git a/data_backup/it_knowledge/18.md b/data_source/it_knowledge/18.md similarity index 100% rename from data_backup/it_knowledge/18.md rename to data_source/it_knowledge/18.md diff --git a/data_backup/it_knowledge/19.md b/data_source/it_knowledge/19.md similarity index 100% rename from data_backup/it_knowledge/19.md rename to data_source/it_knowledge/19.md diff --git a/data_backup/it_knowledge/2.md b/data_source/it_knowledge/2.md similarity index 100% rename from data_backup/it_knowledge/2.md rename to data_source/it_knowledge/2.md diff --git a/data_backup/it_knowledge/20.md b/data_source/it_knowledge/20.md similarity index 100% rename from data_backup/it_knowledge/20.md rename to data_source/it_knowledge/20.md diff --git a/data_backup/it_knowledge/21.md b/data_source/it_knowledge/21.md similarity index 100% rename from data_backup/it_knowledge/21.md rename to data_source/it_knowledge/21.md diff --git a/data_backup/it_knowledge/22.md b/data_source/it_knowledge/22.md similarity index 100% rename from data_backup/it_knowledge/22.md rename to data_source/it_knowledge/22.md diff --git a/data_backup/it_knowledge/23.md b/data_source/it_knowledge/23.md similarity index 100% rename from data_backup/it_knowledge/23.md rename to data_source/it_knowledge/23.md diff --git a/data_backup/it_knowledge/24.md b/data_source/it_knowledge/24.md similarity index 100% rename from data_backup/it_knowledge/24.md rename to data_source/it_knowledge/24.md diff --git a/data_backup/it_knowledge/25.md b/data_source/it_knowledge/25.md similarity index 100% rename from data_backup/it_knowledge/25.md rename to data_source/it_knowledge/25.md diff --git a/data_backup/it_knowledge/26.md b/data_source/it_knowledge/26.md similarity index 100% rename from data_backup/it_knowledge/26.md rename to data_source/it_knowledge/26.md diff --git a/data_backup/it_knowledge/27.md b/data_source/it_knowledge/27.md similarity index 100% rename from data_backup/it_knowledge/27.md rename to data_source/it_knowledge/27.md diff --git a/data_backup/it_knowledge/28.md b/data_source/it_knowledge/28.md similarity index 100% rename from data_backup/it_knowledge/28.md rename to data_source/it_knowledge/28.md diff --git a/data_backup/it_knowledge/29.md b/data_source/it_knowledge/29.md similarity index 100% rename from data_backup/it_knowledge/29.md rename to data_source/it_knowledge/29.md diff --git a/data_backup/it_knowledge/3.md b/data_source/it_knowledge/3.md similarity index 100% rename from data_backup/it_knowledge/3.md rename to data_source/it_knowledge/3.md diff --git a/data_backup/it_knowledge/30.md b/data_source/it_knowledge/30.md similarity index 100% rename from data_backup/it_knowledge/30.md rename to data_source/it_knowledge/30.md diff --git a/data_backup/it_knowledge/31.md b/data_source/it_knowledge/31.md similarity index 100% rename from data_backup/it_knowledge/31.md rename to data_source/it_knowledge/31.md diff --git a/data_backup/it_knowledge/32.md b/data_source/it_knowledge/32.md similarity index 100% rename from data_backup/it_knowledge/32.md rename to data_source/it_knowledge/32.md diff --git a/data_backup/it_knowledge/33.md b/data_source/it_knowledge/33.md similarity index 100% rename from data_backup/it_knowledge/33.md rename to data_source/it_knowledge/33.md diff --git a/data_backup/it_knowledge/34.md b/data_source/it_knowledge/34.md similarity index 100% rename from data_backup/it_knowledge/34.md rename to data_source/it_knowledge/34.md diff --git a/data_backup/it_knowledge/35.md b/data_source/it_knowledge/35.md similarity index 100% rename from data_backup/it_knowledge/35.md rename to data_source/it_knowledge/35.md diff --git a/data_backup/it_knowledge/36.md b/data_source/it_knowledge/36.md similarity index 100% rename from data_backup/it_knowledge/36.md rename to data_source/it_knowledge/36.md diff --git a/data_backup/it_knowledge/37.md b/data_source/it_knowledge/37.md similarity index 100% rename from data_backup/it_knowledge/37.md rename to data_source/it_knowledge/37.md diff --git a/data_backup/it_knowledge/38.md b/data_source/it_knowledge/38.md similarity index 100% rename from data_backup/it_knowledge/38.md rename to data_source/it_knowledge/38.md diff --git a/data_backup/it_knowledge/39.md b/data_source/it_knowledge/39.md similarity index 100% rename from data_backup/it_knowledge/39.md rename to data_source/it_knowledge/39.md diff --git a/data_backup/it_knowledge/4.md b/data_source/it_knowledge/4.md similarity index 100% rename from data_backup/it_knowledge/4.md rename to data_source/it_knowledge/4.md diff --git a/data_backup/it_knowledge/40.md b/data_source/it_knowledge/40.md similarity index 100% rename from data_backup/it_knowledge/40.md rename to data_source/it_knowledge/40.md diff --git a/data_backup/it_knowledge/41.md b/data_source/it_knowledge/41.md similarity index 100% rename from data_backup/it_knowledge/41.md rename to data_source/it_knowledge/41.md diff --git a/data_backup/it_knowledge/42.md b/data_source/it_knowledge/42.md similarity index 100% rename from data_backup/it_knowledge/42.md rename to data_source/it_knowledge/42.md diff --git a/data_backup/it_knowledge/43.md b/data_source/it_knowledge/43.md similarity index 100% rename from data_backup/it_knowledge/43.md rename to data_source/it_knowledge/43.md diff --git a/data_backup/it_knowledge/44.md b/data_source/it_knowledge/44.md similarity index 100% rename from data_backup/it_knowledge/44.md rename to data_source/it_knowledge/44.md diff --git a/data_backup/it_knowledge/45.md b/data_source/it_knowledge/45.md similarity index 100% rename from data_backup/it_knowledge/45.md rename to data_source/it_knowledge/45.md diff --git a/data_backup/it_knowledge/46.md b/data_source/it_knowledge/46.md similarity index 100% rename from data_backup/it_knowledge/46.md rename to data_source/it_knowledge/46.md diff --git a/data_backup/it_knowledge/47.md b/data_source/it_knowledge/47.md similarity index 100% rename from data_backup/it_knowledge/47.md rename to data_source/it_knowledge/47.md diff --git a/data_backup/it_knowledge/48.md b/data_source/it_knowledge/48.md similarity index 100% rename from data_backup/it_knowledge/48.md rename to data_source/it_knowledge/48.md diff --git a/data_backup/it_knowledge/49.md b/data_source/it_knowledge/49.md similarity index 100% rename from data_backup/it_knowledge/49.md rename to data_source/it_knowledge/49.md diff --git a/data_backup/it_knowledge/5.md b/data_source/it_knowledge/5.md similarity index 100% rename from data_backup/it_knowledge/5.md rename to data_source/it_knowledge/5.md diff --git a/data_backup/it_knowledge/50.md b/data_source/it_knowledge/50.md similarity index 100% rename from data_backup/it_knowledge/50.md rename to data_source/it_knowledge/50.md diff --git a/data_backup/it_knowledge/51.md b/data_source/it_knowledge/51.md similarity index 100% rename from data_backup/it_knowledge/51.md rename to data_source/it_knowledge/51.md diff --git a/data_backup/it_knowledge/52.md b/data_source/it_knowledge/52.md similarity index 100% rename from data_backup/it_knowledge/52.md rename to data_source/it_knowledge/52.md diff --git a/data_backup/it_knowledge/53.md b/data_source/it_knowledge/53.md similarity index 100% rename from data_backup/it_knowledge/53.md rename to data_source/it_knowledge/53.md diff --git a/data_backup/it_knowledge/54.md b/data_source/it_knowledge/54.md similarity index 100% rename from data_backup/it_knowledge/54.md rename to data_source/it_knowledge/54.md diff --git a/data_backup/it_knowledge/55.md b/data_source/it_knowledge/55.md similarity index 100% rename from data_backup/it_knowledge/55.md rename to data_source/it_knowledge/55.md diff --git a/data_backup/it_knowledge/56.md b/data_source/it_knowledge/56.md similarity index 100% rename from data_backup/it_knowledge/56.md rename to data_source/it_knowledge/56.md diff --git a/data_backup/it_knowledge/57.md b/data_source/it_knowledge/57.md similarity index 100% rename from data_backup/it_knowledge/57.md rename to data_source/it_knowledge/57.md diff --git a/data_backup/it_knowledge/58.md b/data_source/it_knowledge/58.md similarity index 100% rename from data_backup/it_knowledge/58.md rename to data_source/it_knowledge/58.md diff --git a/data_backup/it_knowledge/59.md b/data_source/it_knowledge/59.md similarity index 100% rename from data_backup/it_knowledge/59.md rename to data_source/it_knowledge/59.md diff --git a/data_backup/it_knowledge/6.md b/data_source/it_knowledge/6.md similarity index 100% rename from data_backup/it_knowledge/6.md rename to data_source/it_knowledge/6.md diff --git a/data_backup/it_knowledge/60.md b/data_source/it_knowledge/60.md similarity index 100% rename from data_backup/it_knowledge/60.md rename to data_source/it_knowledge/60.md diff --git a/data_backup/it_knowledge/61.md b/data_source/it_knowledge/61.md similarity index 100% rename from data_backup/it_knowledge/61.md rename to data_source/it_knowledge/61.md diff --git a/data_backup/it_knowledge/62.md b/data_source/it_knowledge/62.md similarity index 100% rename from data_backup/it_knowledge/62.md rename to data_source/it_knowledge/62.md diff --git a/data_backup/it_knowledge/63.md b/data_source/it_knowledge/63.md similarity index 100% rename from data_backup/it_knowledge/63.md rename to data_source/it_knowledge/63.md diff --git a/data_backup/it_knowledge/64.md b/data_source/it_knowledge/64.md similarity index 100% rename from data_backup/it_knowledge/64.md rename to data_source/it_knowledge/64.md diff --git a/data_backup/it_knowledge/65.md b/data_source/it_knowledge/65.md similarity index 100% rename from data_backup/it_knowledge/65.md rename to data_source/it_knowledge/65.md diff --git a/data_backup/it_knowledge/66.md b/data_source/it_knowledge/66.md similarity index 100% rename from data_backup/it_knowledge/66.md rename to data_source/it_knowledge/66.md diff --git a/data_backup/it_knowledge/67.md b/data_source/it_knowledge/67.md similarity index 100% rename from data_backup/it_knowledge/67.md rename to data_source/it_knowledge/67.md diff --git a/data_backup/it_knowledge/68.md b/data_source/it_knowledge/68.md similarity index 100% rename from data_backup/it_knowledge/68.md rename to data_source/it_knowledge/68.md diff --git a/data_backup/it_knowledge/69.md b/data_source/it_knowledge/69.md similarity index 100% rename from data_backup/it_knowledge/69.md rename to data_source/it_knowledge/69.md diff --git a/data_backup/it_knowledge/7.md b/data_source/it_knowledge/7.md similarity index 100% rename from data_backup/it_knowledge/7.md rename to data_source/it_knowledge/7.md diff --git a/data_backup/it_knowledge/70.md b/data_source/it_knowledge/70.md similarity index 100% rename from data_backup/it_knowledge/70.md rename to data_source/it_knowledge/70.md diff --git a/data_backup/it_knowledge/71.md b/data_source/it_knowledge/71.md similarity index 100% rename from data_backup/it_knowledge/71.md rename to data_source/it_knowledge/71.md diff --git a/data_backup/it_knowledge/72.md b/data_source/it_knowledge/72.md similarity index 100% rename from data_backup/it_knowledge/72.md rename to data_source/it_knowledge/72.md diff --git a/data_backup/it_knowledge/73.md b/data_source/it_knowledge/73.md similarity index 100% rename from data_backup/it_knowledge/73.md rename to data_source/it_knowledge/73.md diff --git a/data_backup/it_knowledge/74.md b/data_source/it_knowledge/74.md similarity index 100% rename from data_backup/it_knowledge/74.md rename to data_source/it_knowledge/74.md diff --git a/data_backup/it_knowledge/75.md b/data_source/it_knowledge/75.md similarity index 100% rename from data_backup/it_knowledge/75.md rename to data_source/it_knowledge/75.md diff --git a/data_backup/it_knowledge/76.md b/data_source/it_knowledge/76.md similarity index 100% rename from data_backup/it_knowledge/76.md rename to data_source/it_knowledge/76.md diff --git a/data_backup/it_knowledge/77.md b/data_source/it_knowledge/77.md similarity index 100% rename from data_backup/it_knowledge/77.md rename to data_source/it_knowledge/77.md diff --git a/data_backup/it_knowledge/78.md b/data_source/it_knowledge/78.md similarity index 100% rename from data_backup/it_knowledge/78.md rename to data_source/it_knowledge/78.md diff --git a/data_backup/it_knowledge/79.md b/data_source/it_knowledge/79.md similarity index 100% rename from data_backup/it_knowledge/79.md rename to data_source/it_knowledge/79.md diff --git a/data_backup/it_knowledge/8.md b/data_source/it_knowledge/8.md similarity index 100% rename from data_backup/it_knowledge/8.md rename to data_source/it_knowledge/8.md diff --git a/data_backup/it_knowledge/80.md b/data_source/it_knowledge/80.md similarity index 100% rename from data_backup/it_knowledge/80.md rename to data_source/it_knowledge/80.md diff --git a/data_backup/it_knowledge/81.md b/data_source/it_knowledge/81.md similarity index 100% rename from data_backup/it_knowledge/81.md rename to data_source/it_knowledge/81.md diff --git a/data_backup/it_knowledge/82.md b/data_source/it_knowledge/82.md similarity index 100% rename from data_backup/it_knowledge/82.md rename to data_source/it_knowledge/82.md diff --git a/data_backup/it_knowledge/83.md b/data_source/it_knowledge/83.md similarity index 100% rename from data_backup/it_knowledge/83.md rename to data_source/it_knowledge/83.md diff --git a/data_backup/it_knowledge/84.md b/data_source/it_knowledge/84.md similarity index 100% rename from data_backup/it_knowledge/84.md rename to data_source/it_knowledge/84.md diff --git a/data_backup/it_knowledge/85.md b/data_source/it_knowledge/85.md similarity index 100% rename from data_backup/it_knowledge/85.md rename to data_source/it_knowledge/85.md diff --git a/data_backup/it_knowledge/86.md b/data_source/it_knowledge/86.md similarity index 100% rename from data_backup/it_knowledge/86.md rename to data_source/it_knowledge/86.md diff --git a/data_backup/it_knowledge/87.md b/data_source/it_knowledge/87.md similarity index 100% rename from data_backup/it_knowledge/87.md rename to data_source/it_knowledge/87.md diff --git a/data_backup/it_knowledge/88.md b/data_source/it_knowledge/88.md similarity index 100% rename from data_backup/it_knowledge/88.md rename to data_source/it_knowledge/88.md diff --git a/data_backup/it_knowledge/89.md b/data_source/it_knowledge/89.md similarity index 100% rename from data_backup/it_knowledge/89.md rename to data_source/it_knowledge/89.md diff --git a/data_backup/it_knowledge/9.md b/data_source/it_knowledge/9.md similarity index 100% rename from data_backup/it_knowledge/9.md rename to data_source/it_knowledge/9.md diff --git a/data_backup/it_knowledge/90.md b/data_source/it_knowledge/90.md similarity index 100% rename from data_backup/it_knowledge/90.md rename to data_source/it_knowledge/90.md diff --git a/data_backup/it_knowledge/91.md b/data_source/it_knowledge/91.md similarity index 100% rename from data_backup/it_knowledge/91.md rename to data_source/it_knowledge/91.md diff --git a/data_backup/it_knowledge/92.md b/data_source/it_knowledge/92.md similarity index 100% rename from data_backup/it_knowledge/92.md rename to data_source/it_knowledge/92.md diff --git a/data_backup/it_knowledge/93.md b/data_source/it_knowledge/93.md similarity index 100% rename from data_backup/it_knowledge/93.md rename to data_source/it_knowledge/93.md diff --git a/data_backup/it_knowledge/94.md b/data_source/it_knowledge/94.md similarity index 100% rename from data_backup/it_knowledge/94.md rename to data_source/it_knowledge/94.md diff --git a/data_backup/it_knowledge/95.md b/data_source/it_knowledge/95.md similarity index 100% rename from data_backup/it_knowledge/95.md rename to data_source/it_knowledge/95.md diff --git a/data_backup/it_knowledge/96.md b/data_source/it_knowledge/96.md similarity index 100% rename from data_backup/it_knowledge/96.md rename to data_source/it_knowledge/96.md diff --git a/data_backup/it_knowledge/97.md b/data_source/it_knowledge/97.md similarity index 100% rename from data_backup/it_knowledge/97.md rename to data_source/it_knowledge/97.md diff --git a/data_backup/it_knowledge/98.md b/data_source/it_knowledge/98.md similarity index 100% rename from data_backup/it_knowledge/98.md rename to data_source/it_knowledge/98.md diff --git a/data_backup/it_knowledge/99.md b/data_source/it_knowledge/99.md similarity index 100% rename from data_backup/it_knowledge/99.md rename to data_source/it_knowledge/99.md diff --git a/data_backup/it_mapping.json b/data_source/it_mapping.json similarity index 100% rename from data_backup/it_mapping.json rename to data_source/it_mapping.json diff --git a/data_backup/java_code_json/0.json b/data_source/java_code_json/0.json similarity index 100% rename from data_backup/java_code_json/0.json rename to data_source/java_code_json/0.json diff --git a/data_backup/java_code_json/1.json b/data_source/java_code_json/1.json similarity index 100% rename from data_backup/java_code_json/1.json rename to data_source/java_code_json/1.json diff --git a/data_backup/java_code_json/10.json b/data_source/java_code_json/10.json similarity index 100% rename from data_backup/java_code_json/10.json rename to data_source/java_code_json/10.json diff --git a/data_backup/java_code_json/11.json b/data_source/java_code_json/11.json similarity index 100% rename from data_backup/java_code_json/11.json rename to data_source/java_code_json/11.json diff --git a/data_backup/java_code_json/12.json b/data_source/java_code_json/12.json similarity index 100% rename from data_backup/java_code_json/12.json rename to data_source/java_code_json/12.json diff --git a/data_backup/java_code_json/13.json b/data_source/java_code_json/13.json similarity index 100% rename from data_backup/java_code_json/13.json rename to data_source/java_code_json/13.json diff --git a/data_backup/java_code_json/14.json b/data_source/java_code_json/14.json similarity index 100% rename from data_backup/java_code_json/14.json rename to data_source/java_code_json/14.json diff --git a/data_backup/java_code_json/15.json b/data_source/java_code_json/15.json similarity index 100% rename from data_backup/java_code_json/15.json rename to data_source/java_code_json/15.json diff --git a/data_backup/java_code_json/16.json b/data_source/java_code_json/16.json similarity index 100% rename from data_backup/java_code_json/16.json rename to data_source/java_code_json/16.json diff --git a/data_backup/java_code_json/17.json b/data_source/java_code_json/17.json similarity index 100% rename from data_backup/java_code_json/17.json rename to data_source/java_code_json/17.json diff --git a/data_backup/java_code_json/18.json b/data_source/java_code_json/18.json similarity index 100% rename from data_backup/java_code_json/18.json rename to data_source/java_code_json/18.json diff --git a/data_backup/java_code_json/19.json b/data_source/java_code_json/19.json similarity index 100% rename from data_backup/java_code_json/19.json rename to data_source/java_code_json/19.json diff --git a/data_backup/java_code_json/2.json b/data_source/java_code_json/2.json similarity index 100% rename from data_backup/java_code_json/2.json rename to data_source/java_code_json/2.json diff --git a/data_backup/java_code_json/20.json b/data_source/java_code_json/20.json similarity index 100% rename from data_backup/java_code_json/20.json rename to data_source/java_code_json/20.json diff --git a/data_backup/java_code_json/21.json b/data_source/java_code_json/21.json similarity index 100% rename from data_backup/java_code_json/21.json rename to data_source/java_code_json/21.json diff --git a/data_backup/java_code_json/22.json b/data_source/java_code_json/22.json similarity index 100% rename from data_backup/java_code_json/22.json rename to data_source/java_code_json/22.json diff --git a/data_backup/java_code_json/23.json b/data_source/java_code_json/23.json similarity index 100% rename from data_backup/java_code_json/23.json rename to data_source/java_code_json/23.json diff --git a/data_backup/java_code_json/24.json b/data_source/java_code_json/24.json similarity index 100% rename from data_backup/java_code_json/24.json rename to data_source/java_code_json/24.json diff --git a/data_backup/java_code_json/25.json b/data_source/java_code_json/25.json similarity index 100% rename from data_backup/java_code_json/25.json rename to data_source/java_code_json/25.json diff --git a/data_backup/java_code_json/26.json b/data_source/java_code_json/26.json similarity index 100% rename from data_backup/java_code_json/26.json rename to data_source/java_code_json/26.json diff --git a/data_backup/java_code_json/27.json b/data_source/java_code_json/27.json similarity index 100% rename from data_backup/java_code_json/27.json rename to data_source/java_code_json/27.json diff --git a/data_backup/java_code_json/28.json b/data_source/java_code_json/28.json similarity index 100% rename from data_backup/java_code_json/28.json rename to data_source/java_code_json/28.json diff --git a/data_backup/java_code_json/29.json b/data_source/java_code_json/29.json similarity index 100% rename from data_backup/java_code_json/29.json rename to data_source/java_code_json/29.json diff --git a/data_backup/java_code_json/3.json b/data_source/java_code_json/3.json similarity index 100% rename from data_backup/java_code_json/3.json rename to data_source/java_code_json/3.json diff --git a/data_backup/java_code_json/30.json b/data_source/java_code_json/30.json similarity index 100% rename from data_backup/java_code_json/30.json rename to data_source/java_code_json/30.json diff --git a/data_backup/java_code_json/31.json b/data_source/java_code_json/31.json similarity index 100% rename from data_backup/java_code_json/31.json rename to data_source/java_code_json/31.json diff --git a/data_backup/java_code_json/32.json b/data_source/java_code_json/32.json similarity index 100% rename from data_backup/java_code_json/32.json rename to data_source/java_code_json/32.json diff --git a/data_backup/java_code_json/33.json b/data_source/java_code_json/33.json similarity index 100% rename from data_backup/java_code_json/33.json rename to data_source/java_code_json/33.json diff --git a/data_backup/java_code_json/34.json b/data_source/java_code_json/34.json similarity index 100% rename from data_backup/java_code_json/34.json rename to data_source/java_code_json/34.json diff --git a/data_backup/java_code_json/35.json b/data_source/java_code_json/35.json similarity index 100% rename from data_backup/java_code_json/35.json rename to data_source/java_code_json/35.json diff --git a/data_backup/java_code_json/36.json b/data_source/java_code_json/36.json similarity index 100% rename from data_backup/java_code_json/36.json rename to data_source/java_code_json/36.json diff --git a/data_backup/java_code_json/37.json b/data_source/java_code_json/37.json similarity index 100% rename from data_backup/java_code_json/37.json rename to data_source/java_code_json/37.json diff --git a/data_backup/java_code_json/38.json b/data_source/java_code_json/38.json similarity index 100% rename from data_backup/java_code_json/38.json rename to data_source/java_code_json/38.json diff --git a/data_backup/java_code_json/39.json b/data_source/java_code_json/39.json similarity index 100% rename from data_backup/java_code_json/39.json rename to data_source/java_code_json/39.json diff --git a/data_backup/java_code_json/4.json b/data_source/java_code_json/4.json similarity index 100% rename from data_backup/java_code_json/4.json rename to data_source/java_code_json/4.json diff --git a/data_backup/java_code_json/40.json b/data_source/java_code_json/40.json similarity index 100% rename from data_backup/java_code_json/40.json rename to data_source/java_code_json/40.json diff --git a/data_backup/java_code_json/41.json b/data_source/java_code_json/41.json similarity index 100% rename from data_backup/java_code_json/41.json rename to data_source/java_code_json/41.json diff --git a/data_backup/java_code_json/42.json b/data_source/java_code_json/42.json similarity index 100% rename from data_backup/java_code_json/42.json rename to data_source/java_code_json/42.json diff --git a/data_backup/java_code_json/43.json b/data_source/java_code_json/43.json similarity index 100% rename from data_backup/java_code_json/43.json rename to data_source/java_code_json/43.json diff --git a/data_backup/java_code_json/44.json b/data_source/java_code_json/44.json similarity index 100% rename from data_backup/java_code_json/44.json rename to data_source/java_code_json/44.json diff --git a/data_backup/java_code_json/45.json b/data_source/java_code_json/45.json similarity index 100% rename from data_backup/java_code_json/45.json rename to data_source/java_code_json/45.json diff --git a/data_backup/java_code_json/46.json b/data_source/java_code_json/46.json similarity index 100% rename from data_backup/java_code_json/46.json rename to data_source/java_code_json/46.json diff --git a/data_backup/java_code_json/47.json b/data_source/java_code_json/47.json similarity index 100% rename from data_backup/java_code_json/47.json rename to data_source/java_code_json/47.json diff --git a/data_backup/java_code_json/48.json b/data_source/java_code_json/48.json similarity index 100% rename from data_backup/java_code_json/48.json rename to data_source/java_code_json/48.json diff --git a/data_backup/java_code_json/49.json b/data_source/java_code_json/49.json similarity index 100% rename from data_backup/java_code_json/49.json rename to data_source/java_code_json/49.json diff --git a/data_backup/java_code_json/5.json b/data_source/java_code_json/5.json similarity index 100% rename from data_backup/java_code_json/5.json rename to data_source/java_code_json/5.json diff --git a/data_backup/java_code_json/50.json b/data_source/java_code_json/50.json similarity index 100% rename from data_backup/java_code_json/50.json rename to data_source/java_code_json/50.json diff --git a/data_backup/java_code_json/6.json b/data_source/java_code_json/6.json similarity index 100% rename from data_backup/java_code_json/6.json rename to data_source/java_code_json/6.json diff --git a/data_backup/java_code_json/7.json b/data_source/java_code_json/7.json similarity index 100% rename from data_backup/java_code_json/7.json rename to data_source/java_code_json/7.json diff --git a/data_backup/java_code_json/8.json b/data_source/java_code_json/8.json similarity index 100% rename from data_backup/java_code_json/8.json rename to data_source/java_code_json/8.json diff --git a/data_backup/java_code_json/9.json b/data_source/java_code_json/9.json similarity index 100% rename from data_backup/java_code_json/9.json rename to data_source/java_code_json/9.json diff --git a/data_backup/leetcode/0.json b/data_source/leetcode/0.json similarity index 100% rename from data_backup/leetcode/0.json rename to data_source/leetcode/0.json diff --git a/data_backup/leetcode/1.json b/data_source/leetcode/1.json similarity index 100% rename from data_backup/leetcode/1.json rename to data_source/leetcode/1.json diff --git a/data_backup/leetcode/10.json b/data_source/leetcode/10.json similarity index 100% rename from data_backup/leetcode/10.json rename to data_source/leetcode/10.json diff --git a/data_backup/leetcode/11.json b/data_source/leetcode/11.json similarity index 100% rename from data_backup/leetcode/11.json rename to data_source/leetcode/11.json diff --git a/data_backup/leetcode/12.json b/data_source/leetcode/12.json similarity index 100% rename from data_backup/leetcode/12.json rename to data_source/leetcode/12.json diff --git a/data_backup/leetcode/13.json b/data_source/leetcode/13.json similarity index 100% rename from data_backup/leetcode/13.json rename to data_source/leetcode/13.json diff --git a/data_backup/leetcode/14.json b/data_source/leetcode/14.json similarity index 100% rename from data_backup/leetcode/14.json rename to data_source/leetcode/14.json diff --git a/data_backup/leetcode/15.json b/data_source/leetcode/15.json similarity index 100% rename from data_backup/leetcode/15.json rename to data_source/leetcode/15.json diff --git a/data_backup/leetcode/16.json b/data_source/leetcode/16.json similarity index 100% rename from data_backup/leetcode/16.json rename to data_source/leetcode/16.json diff --git a/data_backup/leetcode/17.json b/data_source/leetcode/17.json similarity index 100% rename from data_backup/leetcode/17.json rename to data_source/leetcode/17.json diff --git a/data_backup/leetcode/18.json b/data_source/leetcode/18.json similarity index 100% rename from data_backup/leetcode/18.json rename to data_source/leetcode/18.json diff --git a/data_backup/leetcode/19.json b/data_source/leetcode/19.json similarity index 100% rename from data_backup/leetcode/19.json rename to data_source/leetcode/19.json diff --git a/data_backup/leetcode/2.json b/data_source/leetcode/2.json similarity index 100% rename from data_backup/leetcode/2.json rename to data_source/leetcode/2.json diff --git a/data_backup/leetcode/20.json b/data_source/leetcode/20.json similarity index 100% rename from data_backup/leetcode/20.json rename to data_source/leetcode/20.json diff --git a/data_backup/leetcode/21.json b/data_source/leetcode/21.json similarity index 100% rename from data_backup/leetcode/21.json rename to data_source/leetcode/21.json diff --git a/data_backup/leetcode/22.json b/data_source/leetcode/22.json similarity index 100% rename from data_backup/leetcode/22.json rename to data_source/leetcode/22.json diff --git a/data_backup/leetcode/23.json b/data_source/leetcode/23.json similarity index 100% rename from data_backup/leetcode/23.json rename to data_source/leetcode/23.json diff --git a/data_backup/leetcode/24.json b/data_source/leetcode/24.json similarity index 100% rename from data_backup/leetcode/24.json rename to data_source/leetcode/24.json diff --git a/data_backup/leetcode/25.json b/data_source/leetcode/25.json similarity index 100% rename from data_backup/leetcode/25.json rename to data_source/leetcode/25.json diff --git a/data_backup/leetcode/26.json b/data_source/leetcode/26.json similarity index 100% rename from data_backup/leetcode/26.json rename to data_source/leetcode/26.json diff --git a/data_backup/leetcode/27.json b/data_source/leetcode/27.json similarity index 100% rename from data_backup/leetcode/27.json rename to data_source/leetcode/27.json diff --git a/data_backup/leetcode/28.json b/data_source/leetcode/28.json similarity index 100% rename from data_backup/leetcode/28.json rename to data_source/leetcode/28.json diff --git a/data_backup/leetcode/29.json b/data_source/leetcode/29.json similarity index 100% rename from data_backup/leetcode/29.json rename to data_source/leetcode/29.json diff --git a/data_backup/leetcode/3.json b/data_source/leetcode/3.json similarity index 100% rename from data_backup/leetcode/3.json rename to data_source/leetcode/3.json diff --git a/data_backup/leetcode/30.json b/data_source/leetcode/30.json similarity index 100% rename from data_backup/leetcode/30.json rename to data_source/leetcode/30.json diff --git a/data_backup/leetcode/31.json b/data_source/leetcode/31.json similarity index 100% rename from data_backup/leetcode/31.json rename to data_source/leetcode/31.json diff --git a/data_backup/leetcode/32.json b/data_source/leetcode/32.json similarity index 100% rename from data_backup/leetcode/32.json rename to data_source/leetcode/32.json diff --git a/data_backup/leetcode/33.json b/data_source/leetcode/33.json similarity index 100% rename from data_backup/leetcode/33.json rename to data_source/leetcode/33.json diff --git a/data_backup/leetcode/34.json b/data_source/leetcode/34.json similarity index 100% rename from data_backup/leetcode/34.json rename to data_source/leetcode/34.json diff --git a/data_backup/leetcode/35.json b/data_source/leetcode/35.json similarity index 100% rename from data_backup/leetcode/35.json rename to data_source/leetcode/35.json diff --git a/data_backup/leetcode/36.json b/data_source/leetcode/36.json similarity index 100% rename from data_backup/leetcode/36.json rename to data_source/leetcode/36.json diff --git a/data_backup/leetcode/37.json b/data_source/leetcode/37.json similarity index 100% rename from data_backup/leetcode/37.json rename to data_source/leetcode/37.json diff --git a/data_backup/leetcode/38.json b/data_source/leetcode/38.json similarity index 100% rename from data_backup/leetcode/38.json rename to data_source/leetcode/38.json diff --git a/data_backup/leetcode/39.json b/data_source/leetcode/39.json similarity index 100% rename from data_backup/leetcode/39.json rename to data_source/leetcode/39.json diff --git a/data_backup/leetcode/4.json b/data_source/leetcode/4.json similarity index 100% rename from data_backup/leetcode/4.json rename to data_source/leetcode/4.json diff --git a/data_backup/leetcode/40.json b/data_source/leetcode/40.json similarity index 100% rename from data_backup/leetcode/40.json rename to data_source/leetcode/40.json diff --git a/data_backup/leetcode/41.json b/data_source/leetcode/41.json similarity index 100% rename from data_backup/leetcode/41.json rename to data_source/leetcode/41.json diff --git a/data_backup/leetcode/42.json b/data_source/leetcode/42.json similarity index 100% rename from data_backup/leetcode/42.json rename to data_source/leetcode/42.json diff --git a/data_backup/leetcode/43.json b/data_source/leetcode/43.json similarity index 100% rename from data_backup/leetcode/43.json rename to data_source/leetcode/43.json diff --git a/data_backup/leetcode/44.json b/data_source/leetcode/44.json similarity index 100% rename from data_backup/leetcode/44.json rename to data_source/leetcode/44.json diff --git a/data_backup/leetcode/45.json b/data_source/leetcode/45.json similarity index 100% rename from data_backup/leetcode/45.json rename to data_source/leetcode/45.json diff --git a/data_backup/leetcode/46.json b/data_source/leetcode/46.json similarity index 100% rename from data_backup/leetcode/46.json rename to data_source/leetcode/46.json diff --git a/data_backup/leetcode/47.json b/data_source/leetcode/47.json similarity index 100% rename from data_backup/leetcode/47.json rename to data_source/leetcode/47.json diff --git a/data_backup/leetcode/48.json b/data_source/leetcode/48.json similarity index 100% rename from data_backup/leetcode/48.json rename to data_source/leetcode/48.json diff --git a/data_backup/leetcode/49.json b/data_source/leetcode/49.json similarity index 100% rename from data_backup/leetcode/49.json rename to data_source/leetcode/49.json diff --git a/data_backup/leetcode/5.json b/data_source/leetcode/5.json similarity index 100% rename from data_backup/leetcode/5.json rename to data_source/leetcode/5.json diff --git a/data_backup/leetcode/50.json b/data_source/leetcode/50.json similarity index 100% rename from data_backup/leetcode/50.json rename to data_source/leetcode/50.json diff --git a/data_backup/leetcode/51.json b/data_source/leetcode/51.json similarity index 100% rename from data_backup/leetcode/51.json rename to data_source/leetcode/51.json diff --git a/data_backup/leetcode/52.json b/data_source/leetcode/52.json similarity index 100% rename from data_backup/leetcode/52.json rename to data_source/leetcode/52.json diff --git a/data_backup/leetcode/53.json b/data_source/leetcode/53.json similarity index 100% rename from data_backup/leetcode/53.json rename to data_source/leetcode/53.json diff --git a/data_backup/leetcode/54.json b/data_source/leetcode/54.json similarity index 100% rename from data_backup/leetcode/54.json rename to data_source/leetcode/54.json diff --git a/data_backup/leetcode/55.json b/data_source/leetcode/55.json similarity index 100% rename from data_backup/leetcode/55.json rename to data_source/leetcode/55.json diff --git a/data_backup/leetcode/56.json b/data_source/leetcode/56.json similarity index 100% rename from data_backup/leetcode/56.json rename to data_source/leetcode/56.json diff --git a/data_backup/leetcode/57.json b/data_source/leetcode/57.json similarity index 100% rename from data_backup/leetcode/57.json rename to data_source/leetcode/57.json diff --git a/data_backup/leetcode/58.json b/data_source/leetcode/58.json similarity index 100% rename from data_backup/leetcode/58.json rename to data_source/leetcode/58.json diff --git a/data_backup/leetcode/59.json b/data_source/leetcode/59.json similarity index 100% rename from data_backup/leetcode/59.json rename to data_source/leetcode/59.json diff --git a/data_backup/leetcode/6.json b/data_source/leetcode/6.json similarity index 100% rename from data_backup/leetcode/6.json rename to data_source/leetcode/6.json diff --git a/data_backup/leetcode/60.json b/data_source/leetcode/60.json similarity index 100% rename from data_backup/leetcode/60.json rename to data_source/leetcode/60.json diff --git a/data_backup/leetcode/61.json b/data_source/leetcode/61.json similarity index 100% rename from data_backup/leetcode/61.json rename to data_source/leetcode/61.json diff --git a/data_backup/leetcode/62.json b/data_source/leetcode/62.json similarity index 100% rename from data_backup/leetcode/62.json rename to data_source/leetcode/62.json diff --git a/data_backup/leetcode/63.json b/data_source/leetcode/63.json similarity index 100% rename from data_backup/leetcode/63.json rename to data_source/leetcode/63.json diff --git a/data_backup/leetcode/64.json b/data_source/leetcode/64.json similarity index 100% rename from data_backup/leetcode/64.json rename to data_source/leetcode/64.json diff --git a/data_backup/leetcode/65.json b/data_source/leetcode/65.json similarity index 100% rename from data_backup/leetcode/65.json rename to data_source/leetcode/65.json diff --git a/data_backup/leetcode/66.json b/data_source/leetcode/66.json similarity index 100% rename from data_backup/leetcode/66.json rename to data_source/leetcode/66.json diff --git a/data_backup/leetcode/67.json b/data_source/leetcode/67.json similarity index 100% rename from data_backup/leetcode/67.json rename to data_source/leetcode/67.json diff --git a/data_backup/leetcode/68.json b/data_source/leetcode/68.json similarity index 100% rename from data_backup/leetcode/68.json rename to data_source/leetcode/68.json diff --git a/data_backup/leetcode/69.json b/data_source/leetcode/69.json similarity index 100% rename from data_backup/leetcode/69.json rename to data_source/leetcode/69.json diff --git a/data_backup/leetcode/7.json b/data_source/leetcode/7.json similarity index 100% rename from data_backup/leetcode/7.json rename to data_source/leetcode/7.json diff --git a/data_backup/leetcode/70.json b/data_source/leetcode/70.json similarity index 100% rename from data_backup/leetcode/70.json rename to data_source/leetcode/70.json diff --git a/data_backup/leetcode/71.json b/data_source/leetcode/71.json similarity index 100% rename from data_backup/leetcode/71.json rename to data_source/leetcode/71.json diff --git a/data_backup/leetcode/72.json b/data_source/leetcode/72.json similarity index 100% rename from data_backup/leetcode/72.json rename to data_source/leetcode/72.json diff --git a/data_backup/leetcode/73.json b/data_source/leetcode/73.json similarity index 100% rename from data_backup/leetcode/73.json rename to data_source/leetcode/73.json diff --git a/data_backup/leetcode/74.json b/data_source/leetcode/74.json similarity index 100% rename from data_backup/leetcode/74.json rename to data_source/leetcode/74.json diff --git a/data_backup/leetcode/75.json b/data_source/leetcode/75.json similarity index 100% rename from data_backup/leetcode/75.json rename to data_source/leetcode/75.json diff --git a/data_backup/leetcode/76.json b/data_source/leetcode/76.json similarity index 100% rename from data_backup/leetcode/76.json rename to data_source/leetcode/76.json diff --git a/data_backup/leetcode/77.json b/data_source/leetcode/77.json similarity index 100% rename from data_backup/leetcode/77.json rename to data_source/leetcode/77.json diff --git a/data_backup/leetcode/78.json b/data_source/leetcode/78.json similarity index 100% rename from data_backup/leetcode/78.json rename to data_source/leetcode/78.json diff --git a/data_backup/leetcode/79.json b/data_source/leetcode/79.json similarity index 100% rename from data_backup/leetcode/79.json rename to data_source/leetcode/79.json diff --git a/data_backup/leetcode/8.json b/data_source/leetcode/8.json similarity index 100% rename from data_backup/leetcode/8.json rename to data_source/leetcode/8.json diff --git a/data_backup/leetcode/80.json b/data_source/leetcode/80.json similarity index 100% rename from data_backup/leetcode/80.json rename to data_source/leetcode/80.json diff --git a/data_backup/leetcode/81.json b/data_source/leetcode/81.json similarity index 100% rename from data_backup/leetcode/81.json rename to data_source/leetcode/81.json diff --git a/data_backup/leetcode/82.json b/data_source/leetcode/82.json similarity index 100% rename from data_backup/leetcode/82.json rename to data_source/leetcode/82.json diff --git a/data_backup/leetcode/83.json b/data_source/leetcode/83.json similarity index 100% rename from data_backup/leetcode/83.json rename to data_source/leetcode/83.json diff --git a/data_backup/leetcode/84.json b/data_source/leetcode/84.json similarity index 100% rename from data_backup/leetcode/84.json rename to data_source/leetcode/84.json diff --git a/data_backup/leetcode/85.json b/data_source/leetcode/85.json similarity index 100% rename from data_backup/leetcode/85.json rename to data_source/leetcode/85.json diff --git a/data_backup/leetcode/86.json b/data_source/leetcode/86.json similarity index 100% rename from data_backup/leetcode/86.json rename to data_source/leetcode/86.json diff --git a/data_backup/leetcode/87.json b/data_source/leetcode/87.json similarity index 100% rename from data_backup/leetcode/87.json rename to data_source/leetcode/87.json diff --git a/data_backup/leetcode/88.json b/data_source/leetcode/88.json similarity index 100% rename from data_backup/leetcode/88.json rename to data_source/leetcode/88.json diff --git a/data_backup/leetcode/89.json b/data_source/leetcode/89.json similarity index 100% rename from data_backup/leetcode/89.json rename to data_source/leetcode/89.json diff --git a/data_backup/leetcode/9.json b/data_source/leetcode/9.json similarity index 100% rename from data_backup/leetcode/9.json rename to data_source/leetcode/9.json diff --git a/data_backup/leetcode/90.json b/data_source/leetcode/90.json similarity index 100% rename from data_backup/leetcode/90.json rename to data_source/leetcode/90.json diff --git a/data_backup/leetcode/91.json b/data_source/leetcode/91.json similarity index 100% rename from data_backup/leetcode/91.json rename to data_source/leetcode/91.json diff --git a/data_backup/leetcode/92.json b/data_source/leetcode/92.json similarity index 100% rename from data_backup/leetcode/92.json rename to data_source/leetcode/92.json diff --git a/data_backup/leetcode/93.json b/data_source/leetcode/93.json similarity index 100% rename from data_backup/leetcode/93.json rename to data_source/leetcode/93.json diff --git a/data_backup/leetcode/94.json b/data_source/leetcode/94.json similarity index 100% rename from data_backup/leetcode/94.json rename to data_source/leetcode/94.json diff --git a/data_backup/leetcode/95.json b/data_source/leetcode/95.json similarity index 100% rename from data_backup/leetcode/95.json rename to data_source/leetcode/95.json diff --git a/data_backup/leetcode/96.json b/data_source/leetcode/96.json similarity index 100% rename from data_backup/leetcode/96.json rename to data_source/leetcode/96.json diff --git a/data_backup/leetcode/97.json b/data_source/leetcode/97.json similarity index 100% rename from data_backup/leetcode/97.json rename to data_source/leetcode/97.json diff --git a/data_backup/leetcode/98.json b/data_source/leetcode/98.json similarity index 100% rename from data_backup/leetcode/98.json rename to data_source/leetcode/98.json diff --git a/data_backup/leetcode/99.json b/data_source/leetcode/99.json similarity index 100% rename from data_backup/leetcode/99.json rename to data_source/leetcode/99.json diff --git a/data_backup/python_code_json/0.json b/data_source/python_code_json/0.json similarity index 100% rename from data_backup/python_code_json/0.json rename to data_source/python_code_json/0.json diff --git a/data_backup/python_code_json/1.json b/data_source/python_code_json/1.json similarity index 100% rename from data_backup/python_code_json/1.json rename to data_source/python_code_json/1.json diff --git a/data_backup/python_code_json/10.json b/data_source/python_code_json/10.json similarity index 100% rename from data_backup/python_code_json/10.json rename to data_source/python_code_json/10.json diff --git a/data_backup/python_code_json/11.json b/data_source/python_code_json/11.json similarity index 100% rename from data_backup/python_code_json/11.json rename to data_source/python_code_json/11.json diff --git a/data_backup/python_code_json/12.json b/data_source/python_code_json/12.json similarity index 100% rename from data_backup/python_code_json/12.json rename to data_source/python_code_json/12.json diff --git a/data_backup/python_code_json/13.json b/data_source/python_code_json/13.json similarity index 100% rename from data_backup/python_code_json/13.json rename to data_source/python_code_json/13.json diff --git a/data_backup/python_code_json/14.json b/data_source/python_code_json/14.json similarity index 100% rename from data_backup/python_code_json/14.json rename to data_source/python_code_json/14.json diff --git a/data_backup/python_code_json/15.json b/data_source/python_code_json/15.json similarity index 100% rename from data_backup/python_code_json/15.json rename to data_source/python_code_json/15.json diff --git a/data_backup/python_code_json/16.json b/data_source/python_code_json/16.json similarity index 100% rename from data_backup/python_code_json/16.json rename to data_source/python_code_json/16.json diff --git a/data_backup/python_code_json/17.json b/data_source/python_code_json/17.json similarity index 100% rename from data_backup/python_code_json/17.json rename to data_source/python_code_json/17.json diff --git a/data_backup/python_code_json/18.json b/data_source/python_code_json/18.json similarity index 100% rename from data_backup/python_code_json/18.json rename to data_source/python_code_json/18.json diff --git a/data_backup/python_code_json/19.json b/data_source/python_code_json/19.json similarity index 100% rename from data_backup/python_code_json/19.json rename to data_source/python_code_json/19.json diff --git a/data_backup/python_code_json/2.json b/data_source/python_code_json/2.json similarity index 100% rename from data_backup/python_code_json/2.json rename to data_source/python_code_json/2.json diff --git a/data_backup/python_code_json/20.json b/data_source/python_code_json/20.json similarity index 100% rename from data_backup/python_code_json/20.json rename to data_source/python_code_json/20.json diff --git a/data_backup/python_code_json/21.json b/data_source/python_code_json/21.json similarity index 100% rename from data_backup/python_code_json/21.json rename to data_source/python_code_json/21.json diff --git a/data_backup/python_code_json/22.json b/data_source/python_code_json/22.json similarity index 100% rename from data_backup/python_code_json/22.json rename to data_source/python_code_json/22.json diff --git a/data_backup/python_code_json/23.json b/data_source/python_code_json/23.json similarity index 100% rename from data_backup/python_code_json/23.json rename to data_source/python_code_json/23.json diff --git a/data_backup/python_code_json/24.json b/data_source/python_code_json/24.json similarity index 100% rename from data_backup/python_code_json/24.json rename to data_source/python_code_json/24.json diff --git a/data_backup/python_code_json/25.json b/data_source/python_code_json/25.json similarity index 100% rename from data_backup/python_code_json/25.json rename to data_source/python_code_json/25.json diff --git a/data_backup/python_code_json/26.json b/data_source/python_code_json/26.json similarity index 100% rename from data_backup/python_code_json/26.json rename to data_source/python_code_json/26.json diff --git a/data_backup/python_code_json/27.json b/data_source/python_code_json/27.json similarity index 100% rename from data_backup/python_code_json/27.json rename to data_source/python_code_json/27.json diff --git a/data_backup/python_code_json/28.json b/data_source/python_code_json/28.json similarity index 100% rename from data_backup/python_code_json/28.json rename to data_source/python_code_json/28.json diff --git a/data_backup/python_code_json/29.json b/data_source/python_code_json/29.json similarity index 100% rename from data_backup/python_code_json/29.json rename to data_source/python_code_json/29.json diff --git a/data_backup/python_code_json/3.json b/data_source/python_code_json/3.json similarity index 100% rename from data_backup/python_code_json/3.json rename to data_source/python_code_json/3.json diff --git a/data_backup/python_code_json/30.json b/data_source/python_code_json/30.json similarity index 100% rename from data_backup/python_code_json/30.json rename to data_source/python_code_json/30.json diff --git a/data_backup/python_code_json/31.json b/data_source/python_code_json/31.json similarity index 100% rename from data_backup/python_code_json/31.json rename to data_source/python_code_json/31.json diff --git a/data_backup/python_code_json/32.json b/data_source/python_code_json/32.json similarity index 100% rename from data_backup/python_code_json/32.json rename to data_source/python_code_json/32.json diff --git a/data_backup/python_code_json/33.json b/data_source/python_code_json/33.json similarity index 100% rename from data_backup/python_code_json/33.json rename to data_source/python_code_json/33.json diff --git a/data_backup/python_code_json/34.json b/data_source/python_code_json/34.json similarity index 100% rename from data_backup/python_code_json/34.json rename to data_source/python_code_json/34.json diff --git a/data_backup/python_code_json/35.json b/data_source/python_code_json/35.json similarity index 100% rename from data_backup/python_code_json/35.json rename to data_source/python_code_json/35.json diff --git a/data_backup/python_code_json/36.json b/data_source/python_code_json/36.json similarity index 100% rename from data_backup/python_code_json/36.json rename to data_source/python_code_json/36.json diff --git a/data_backup/python_code_json/37.json b/data_source/python_code_json/37.json similarity index 100% rename from data_backup/python_code_json/37.json rename to data_source/python_code_json/37.json diff --git a/data_backup/python_code_json/38.json b/data_source/python_code_json/38.json similarity index 100% rename from data_backup/python_code_json/38.json rename to data_source/python_code_json/38.json diff --git a/data_backup/python_code_json/39.json b/data_source/python_code_json/39.json similarity index 100% rename from data_backup/python_code_json/39.json rename to data_source/python_code_json/39.json diff --git a/data_backup/python_code_json/4.json b/data_source/python_code_json/4.json similarity index 100% rename from data_backup/python_code_json/4.json rename to data_source/python_code_json/4.json diff --git a/data_backup/python_code_json/40.json b/data_source/python_code_json/40.json similarity index 100% rename from data_backup/python_code_json/40.json rename to data_source/python_code_json/40.json diff --git a/data_backup/python_code_json/41.json b/data_source/python_code_json/41.json similarity index 100% rename from data_backup/python_code_json/41.json rename to data_source/python_code_json/41.json diff --git a/data_backup/python_code_json/42.json b/data_source/python_code_json/42.json similarity index 100% rename from data_backup/python_code_json/42.json rename to data_source/python_code_json/42.json diff --git a/data_backup/python_code_json/43.json b/data_source/python_code_json/43.json similarity index 100% rename from data_backup/python_code_json/43.json rename to data_source/python_code_json/43.json diff --git a/data_backup/python_code_json/44.json b/data_source/python_code_json/44.json similarity index 100% rename from data_backup/python_code_json/44.json rename to data_source/python_code_json/44.json diff --git a/data_backup/python_code_json/45.json b/data_source/python_code_json/45.json similarity index 100% rename from data_backup/python_code_json/45.json rename to data_source/python_code_json/45.json diff --git a/data_backup/python_code_json/46.json b/data_source/python_code_json/46.json similarity index 100% rename from data_backup/python_code_json/46.json rename to data_source/python_code_json/46.json diff --git a/data_backup/python_code_json/47.json b/data_source/python_code_json/47.json similarity index 100% rename from data_backup/python_code_json/47.json rename to data_source/python_code_json/47.json diff --git a/data_backup/python_code_json/48.json b/data_source/python_code_json/48.json similarity index 100% rename from data_backup/python_code_json/48.json rename to data_source/python_code_json/48.json diff --git a/data_backup/python_code_json/49.json b/data_source/python_code_json/49.json similarity index 100% rename from data_backup/python_code_json/49.json rename to data_source/python_code_json/49.json diff --git a/data_backup/python_code_json/5.json b/data_source/python_code_json/5.json similarity index 100% rename from data_backup/python_code_json/5.json rename to data_source/python_code_json/5.json diff --git a/data_backup/python_code_json/50.json b/data_source/python_code_json/50.json similarity index 100% rename from data_backup/python_code_json/50.json rename to data_source/python_code_json/50.json diff --git a/data_backup/python_code_json/6.json b/data_source/python_code_json/6.json similarity index 100% rename from data_backup/python_code_json/6.json rename to data_source/python_code_json/6.json diff --git a/data_backup/python_code_json/7.json b/data_source/python_code_json/7.json similarity index 100% rename from data_backup/python_code_json/7.json rename to data_source/python_code_json/7.json diff --git a/data_backup/python_code_json/8.json b/data_source/python_code_json/8.json similarity index 100% rename from data_backup/python_code_json/8.json rename to data_source/python_code_json/8.json diff --git a/data_backup/python_code_json/9.json b/data_source/python_code_json/9.json similarity index 100% rename from data_backup/python_code_json/9.json rename to data_source/python_code_json/9.json -- GitLab