sample_problems 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +13 -0
  3. data/.rspec +3 -0
  4. data/.rubocop.yml +21 -0
  5. data/CODE_OF_CONDUCT.md +84 -0
  6. data/Gemfile +15 -0
  7. data/LICENSE.txt +21 -0
  8. data/README.md +43 -0
  9. data/Rakefile +8 -0
  10. data/bin/console +15 -0
  11. data/bin/setup +8 -0
  12. data/lib/sample_problems/data/042_a.yaml +3 -0
  13. data/lib/sample_problems/data/042_b.yml +3 -0
  14. data/lib/sample_problems/data/042_c.yml +3 -0
  15. data/lib/sample_problems/data/042_d.yml +3 -0
  16. data/lib/sample_problems/data/043_a.yml +3 -0
  17. data/lib/sample_problems/data/043_b.yml +3 -0
  18. data/lib/sample_problems/data/044_a.yml +3 -0
  19. data/lib/sample_problems/data/044_b.yml +3 -0
  20. data/lib/sample_problems/data/045_a.yml +3 -0
  21. data/lib/sample_problems/data/045_b.yml +3 -0
  22. data/lib/sample_problems/data/045_c.yml +3 -0
  23. data/lib/sample_problems/data/045_d.yml +3 -0
  24. data/lib/sample_problems/data/046_a.yml +3 -0
  25. data/lib/sample_problems/data/046_b.yml +3 -0
  26. data/lib/sample_problems/data/047_a.yml +3 -0
  27. data/lib/sample_problems/data/047_b.yml +3 -0
  28. data/lib/sample_problems/data/047_c.yml +3 -0
  29. data/lib/sample_problems/data/047_d.yml +3 -0
  30. data/lib/sample_problems/data/048_a.yml +3 -0
  31. data/lib/sample_problems/data/048_b.yml +3 -0
  32. data/lib/sample_problems/data/048_c.yml +3 -0
  33. data/lib/sample_problems/data/048_d.yml +3 -0
  34. data/lib/sample_problems/data/049_a.yml +3 -0
  35. data/lib/sample_problems/data/049_b.yml +3 -0
  36. data/lib/sample_problems/data/049_c.yml +3 -0
  37. data/lib/sample_problems/data/049_d.yml +3 -0
  38. data/lib/sample_problems/data/050_a.yml +3 -0
  39. data/lib/sample_problems/data/050_b.yml +3 -0
  40. data/lib/sample_problems/data/051_a.yml +3 -0
  41. data/lib/sample_problems/data/051_b.yml +3 -0
  42. data/lib/sample_problems/data/051_c.yml +3 -0
  43. data/lib/sample_problems/data/051_d.yml +3 -0
  44. data/lib/sample_problems/data/052_a.yml +3 -0
  45. data/lib/sample_problems/data/052_b.yml +3 -0
  46. data/lib/sample_problems/data/053_a.yml +3 -0
  47. data/lib/sample_problems/data/053_b.yml +3 -0
  48. data/lib/sample_problems/data/054_a.yml +3 -0
  49. data/lib/sample_problems/data/054_b.yml +3 -0
  50. data/lib/sample_problems/data/054_c.yml +3 -0
  51. data/lib/sample_problems/data/054_d.yml +3 -0
  52. data/lib/sample_problems/data/055_a.yml +3 -0
  53. data/lib/sample_problems/data/055_b.yml +3 -0
  54. data/lib/sample_problems/data/056_a.yml +3 -0
  55. data/lib/sample_problems/data/056_b.yml +3 -0
  56. data/lib/sample_problems/data/056_c.yml +3 -0
  57. data/lib/sample_problems/data/056_d.yml +3 -0
  58. data/lib/sample_problems/data/057_a.yml +3 -0
  59. data/lib/sample_problems/data/057_b.yml +3 -0
  60. data/lib/sample_problems/data/057_c.yml +3 -0
  61. data/lib/sample_problems/data/057_d.yml +3 -0
  62. data/lib/sample_problems/data/058_a.yml +3 -0
  63. data/lib/sample_problems/data/058_b.yml +3 -0
  64. data/lib/sample_problems/data/058_c.yml +3 -0
  65. data/lib/sample_problems/data/058_d.yml +3 -0
  66. data/lib/sample_problems/data/059_a.yml +3 -0
  67. data/lib/sample_problems/data/059_b.yml +3 -0
  68. data/lib/sample_problems/data/059_c.yml +3 -0
  69. data/lib/sample_problems/data/059_d.yml +3 -0
  70. data/lib/sample_problems/data/060_a.yml +3 -0
  71. data/lib/sample_problems/data/060_b.yml +3 -0
  72. data/lib/sample_problems/data/061_a.yml +3 -0
  73. data/lib/sample_problems/data/061_b.yml +3 -0
  74. data/lib/sample_problems/data/061_c.yml +3 -0
  75. data/lib/sample_problems/data/061_d.yml +3 -0
  76. data/lib/sample_problems/data/062_a.yml +3 -0
  77. data/lib/sample_problems/data/062_b.yml +3 -0
  78. data/lib/sample_problems/data/063_a.yml +3 -0
  79. data/lib/sample_problems/data/063_b.yml +3 -0
  80. data/lib/sample_problems/data/063_c.yml +3 -0
  81. data/lib/sample_problems/data/063_d.yml +3 -0
  82. data/lib/sample_problems/data/064_a.yml +3 -0
  83. data/lib/sample_problems/data/064_b.yml +3 -0
  84. data/lib/sample_problems/data/064_c.yml +3 -0
  85. data/lib/sample_problems/data/064_d.yml +3 -0
  86. data/lib/sample_problems/data/065_a.yml +3 -0
  87. data/lib/sample_problems/data/065_b.yml +3 -0
  88. data/lib/sample_problems/data/065_c.yml +3 -0
  89. data/lib/sample_problems/data/065_d.yml +3 -0
  90. data/lib/sample_problems/data/066_a.yml +3 -0
  91. data/lib/sample_problems/data/066_b.yml +3 -0
  92. data/lib/sample_problems/data/066_c.yml +3 -0
  93. data/lib/sample_problems/data/066_d.yml +3 -0
  94. data/lib/sample_problems/data/067_a.yml +3 -0
  95. data/lib/sample_problems/list.rb +32 -0
  96. data/lib/sample_problems/version.rb +5 -0
  97. data/lib/sample_problems.rb +7 -0
  98. data/sample_problems.gemspec +31 -0
  99. metadata +144 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 22be9da45c6ef579b44fe7e99f730178c16cb9b7093e2e02bef6cb3f001c6d5b
4
+ data.tar.gz: 24c40cc6856189a1ecb02d98b71638775522ef249e07b5d999f006d8edaf36d7
5
+ SHA512:
6
+ metadata.gz: 20b97ce0e94537031dc33a73421087a8728906d388ae20a55f601c0d23430ac0bc6c282f06abcd4def60b84ca93b8d357722289c5ac836f6be1e62da3aff5496
7
+ data.tar.gz: bf18ee246fb8dff62522f7715c27fe9fbabdbdd4665a94e846a42853d5f571b84539544e6309afac17bd06185f31a54483b05f3624f8e6277094f4cea60c31d8
data/.gitignore ADDED
@@ -0,0 +1,13 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+ Gemfile.lock
10
+ vendor
11
+ exe
12
+ # rspec failure tracking
13
+ .rspec_status
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,21 @@
1
+ require:
2
+ - rubocop-rspec
3
+ - rubocop-performance
4
+ - rubocop-rake
5
+
6
+ AllCops:
7
+ RubyInterpreters:
8
+ - ruby
9
+ TargetRubyVersion: 3.0
10
+ NewCops: enable
11
+
12
+ Style/StringLiterals:
13
+ Enabled: true
14
+ EnforcedStyle: double_quotes
15
+
16
+ Style/StringLiteralsInInterpolation:
17
+ Enabled: true
18
+ EnforcedStyle: double_quotes
19
+
20
+ Layout/LineLength:
21
+ Max: 120
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or
22
+ advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others' private information, such as a physical or email
26
+ address, without their explicit permission
27
+ * Other conduct which could reasonably be considered inappropriate in a
28
+ professional setting
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
+
34
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
+
36
+ ## Scope
37
+
38
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
+
40
+ ## Enforcement
41
+
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at w.utsumi2@gmail.com. All complaints will be reviewed and investigated promptly and fairly.
43
+
44
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
+
46
+ ## Enforcement Guidelines
47
+
48
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
+
50
+ ### 1. Correction
51
+
52
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
+
54
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
+
56
+ ### 2. Warning
57
+
58
+ **Community Impact**: A violation through a single incident or series of actions.
59
+
60
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
+
62
+ ### 3. Temporary Ban
63
+
64
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
+
66
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
+
68
+ ### 4. Permanent Ban
69
+
70
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
+
72
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
73
+
74
+ ## Attribution
75
+
76
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
+
79
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
+
81
+ [homepage]: https://www.contributor-covenant.org
82
+
83
+ For answers to common questions about this code of conduct, see the FAQ at
84
+ https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/Gemfile ADDED
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in sample_problems.gemspec
6
+ gemspec
7
+
8
+ gem "rake", "~> 13.0"
9
+
10
+ gem "rspec", "~> 3.0"
11
+
12
+ gem "rubocop", require: false
13
+ gem "rubocop-performance", require: false
14
+ gem "rubocop-rake"
15
+ gem "rubocop-rspec"
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2021 watsumi
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,43 @@
1
+ # SampleProblems
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/sample_problems`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'sample_problems'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle install
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install sample_problems
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/sample_problems. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/sample_problems/blob/master/CODE_OF_CONDUCT.md).
36
+
37
+ ## License
38
+
39
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
40
+
41
+ ## Code of Conduct
42
+
43
+ Everyone interacting in the SampleProblems project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/sample_problems/blob/master/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ task default: :spec
data/bin/console ADDED
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "bundler/setup"
5
+ require "sample_problems"
6
+
7
+ # You can add fixtures and/or initialization code here to make experimenting
8
+ # with your gem easier. You can also use a different console, if you like.
9
+
10
+ # (If you use this, don't forget to add pry to your Gemfile!)
11
+ # require "pry"
12
+ # Pry.start
13
+
14
+ require "irb"
15
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,3 @@
1
+ :id: abc042_a
2
+ :contens_id: abc042
3
+ :title: A - 和風いろはちゃんイージー
@@ -0,0 +1,3 @@
1
+ :id: abc042_b
2
+ :contens_id: abc042
3
+ :title: B - 文字列大好きいろはちゃんイージー
@@ -0,0 +1,3 @@
1
+ :id: arc058_a
2
+ :contens_id: abc042
3
+ :title: C - こだわり者いろはちゃん
@@ -0,0 +1,3 @@
1
+ :id: arc058_b
2
+ :contens_id: abc042
3
+ :title: D - いろはちゃんとマス目
@@ -0,0 +1,3 @@
1
+ :id: abc043_a
2
+ :contens_id: abc043
3
+ :title: A - キャンディーとN人の子供イージー
@@ -0,0 +1,3 @@
1
+ :id: abc043_b
2
+ :contens_id: abc043
3
+ :title: B. バイナリハックイージー / Unhappy Hacking (ABC Edit)
@@ -0,0 +1,3 @@
1
+ :id: abc044_a
2
+ :contens_id: abc044
3
+ :title: A. 高橋君とホテルイージー / Tak and Hotels (ABC Edit)
@@ -0,0 +1,3 @@
1
+ :id: abc044_b
2
+ :contens_id: abc044
3
+ :title: B. 美しい文字列 / Beautiful Strings
@@ -0,0 +1,3 @@
1
+ :id: abc045_a
2
+ :contens_id: abc045
3
+ :title: A. 台形 / Trapezoids
@@ -0,0 +1,3 @@
1
+ :id: abc045_b
2
+ :contens_id: abc045
3
+ :title: B. 3人でカードゲームイージー / Card Game for Three (ABC Edit)
@@ -0,0 +1,3 @@
1
+ :id: arc061_a
2
+ :contens_id: abc045
3
+ :title: C. たくさんの数式 / Many Formulas
@@ -0,0 +1,3 @@
1
+ :id: arc061_b
2
+ :contens_id: abc045
3
+ :title: D. すぬけ君の塗り絵 / Snuke's Coloring
@@ -0,0 +1,3 @@
1
+ :id: abc046_a
2
+ :contens_id: abc046
3
+ :title: A. AtCoDeerくんとペンキ / AtCoDeer and Paint Cans
@@ -0,0 +1,3 @@
1
+ :id: abc047_a
2
+ :contens_id: abc047
3
+ :title: A. キャンディーと2人の子供 / Fighting over Candies
@@ -0,0 +1,3 @@
1
+ :id: abc046_b
2
+ :contens_id: abc046
3
+ :title: B. AtCoDeerくんとボール色塗り / Painting Balls with AtCoDeer
@@ -0,0 +1,3 @@
1
+ :id: abc047_b
2
+ :contens_id: abc047
3
+ :title: B. すぬけ君の塗り絵 2 イージー / Snuke's Coloring 2 (ABC Edit)
@@ -0,0 +1,3 @@
1
+ :id: arc063_a
2
+ :contens_id: abc047
3
+ :title: C. 一次元リバーシ / 1D Reversi
@@ -0,0 +1,3 @@
1
+ :id: arc063_b
2
+ :contens_id: abc047
3
+ :title: D. 高橋君と見えざる手 / An Invisible Hand
@@ -0,0 +1,3 @@
1
+ :id: abc048_a
2
+ :contens_id: abc048
3
+ :title: A. AtCoder *** Contest
@@ -0,0 +1,3 @@
1
+ :id: abc048_b
2
+ :contens_id: abc048
3
+ :title: B. Between a and b ...
@@ -0,0 +1,3 @@
1
+ :id: arc064_a
2
+ :contens_id: abc048
3
+ :title: C. Boxes and Candies
@@ -0,0 +1,3 @@
1
+ :id: arc064_b
2
+ :contens_id: abc048
3
+ :title: D. An Ordinary Game
@@ -0,0 +1,3 @@
1
+ :id: abc049_a
2
+ :contens_id: abc049
3
+ :title: A. 居合を終え、青い絵を覆う / UOIAUAI
@@ -0,0 +1,3 @@
1
+ :id: abc049_b
2
+ :contens_id: abc049
3
+ :title: B. たてなが / Thin
@@ -0,0 +1,3 @@
1
+ :id: arc065_a
2
+ :contens_id: abc049
3
+ :title: C. 白昼夢 / Daydream
@@ -0,0 +1,3 @@
1
+ :id: arc065_b
2
+ :contens_id: abc049
3
+ :title: D. 連結 / Connectivity
@@ -0,0 +1,3 @@
1
+ :id: abc050_a
2
+ :contens_id: abc050
3
+ :title: A. Addition and Subtraction Easy
@@ -0,0 +1,3 @@
1
+ :id: abc050_b
2
+ :contens_id: abc050
3
+ :title: B. Contest with Drinks Easy
@@ -0,0 +1,3 @@
1
+ :id: abc051_a
2
+ :contens_id: abc051
3
+ :title: A. Haiku
@@ -0,0 +1,3 @@
1
+ :id: abc051_b
2
+ :contens_id: abc051
3
+ :title: B. Sum of Three Integers
@@ -0,0 +1,3 @@
1
+ :id: abc051_c
2
+ :contens_id: abc051
3
+ :title: C. Back and Forth
@@ -0,0 +1,3 @@
1
+ :id: abc051_d
2
+ :contens_id: abc051
3
+ :title: D. Candidates of No Shortest Paths
@@ -0,0 +1,3 @@
1
+ :id: abc052_a
2
+ :contens_id: abc052
3
+ :title: A. Two Rectangles
@@ -0,0 +1,3 @@
1
+ :id: abc052_b
2
+ :contens_id: abc052
3
+ :title: B. Increment Decrement
@@ -0,0 +1,3 @@
1
+ :id: abc053_a
2
+ :contens_id: abc053
3
+ :title: A. ABC/ARC
@@ -0,0 +1,3 @@
1
+ :id: abc053_b
2
+ :contens_id: abc053
3
+ :title: B. A to Z String
@@ -0,0 +1,3 @@
1
+ :id: abc054_a
2
+ :contens_id: abc054
3
+ :title: A. One Card Poker
@@ -0,0 +1,3 @@
1
+ :id: abc054_b
2
+ :contens_id: abc054
3
+ :title: B. Template Matching
@@ -0,0 +1,3 @@
1
+ :id: abc054_c
2
+ :contens_id: abc054
3
+ :title: C. One-stroke Path
@@ -0,0 +1,3 @@
1
+ :id: abc054_d
2
+ :contens_id: abc054
3
+ :title: D. Mixing Experiment
@@ -0,0 +1,3 @@
1
+ :id: abc055_a
2
+ :contens_id: abc055
3
+ :title: A. Restaurant
@@ -0,0 +1,3 @@
1
+ :id: abc055_b
2
+ :contens_id: abc055
3
+ :title: B. Training Camp
@@ -0,0 +1,3 @@
1
+ :id: abc056_a
2
+ :contens_id: abc056
3
+ :title: A. HonestOrDishonest
@@ -0,0 +1,3 @@
1
+ :id: abc056_b
2
+ :contens_id: abc056
3
+ :title: B. NarrowRectanglesEasy
@@ -0,0 +1,3 @@
1
+ :id: arc070_a
2
+ :contens_id: abc056
3
+ :title: C. Go Home
@@ -0,0 +1,3 @@
1
+ :id: arc070_b
2
+ :contens_id: abc056
3
+ :title: D. No Need
@@ -0,0 +1,3 @@
1
+ :id: abc057_a
2
+ :contens_id: abc057
3
+ :title: A. Remaining Time
@@ -0,0 +1,3 @@
1
+ :id: abc057_b
2
+ :contens_id: abc057
3
+ :title: B. Checkpoints
@@ -0,0 +1,3 @@
1
+ :id: abc057_c
2
+ :contens_id: abc057
3
+ :title: C. Digits in Multiplication
@@ -0,0 +1,3 @@
1
+ :id: abc057_d
2
+ :contens_id: abc057
3
+ :title: D. Maximum Average Sets
@@ -0,0 +1,3 @@
1
+ :id: abc058_a
2
+ :contens_id: abc058
3
+ :title: A. ι⊥l
@@ -0,0 +1,3 @@
1
+ :id: abc058_b
2
+ :contens_id: abc058
3
+ :title: B. ∵∴∵
@@ -0,0 +1,3 @@
1
+ :id: arc071_a
2
+ :contens_id: abc058
3
+ :title: C. 怪文書 / Dubious Document
@@ -0,0 +1,3 @@
1
+ :id: arc071_b
2
+ :contens_id: abc058
3
+ :title: D. 井井井 / ###
@@ -0,0 +1,3 @@
1
+ :id: abc059_a
2
+ :contens_id: abc059
3
+ :title: A. Three-letter acronym
@@ -0,0 +1,3 @@
1
+ :id: abc059_b
2
+ :contens_id: abc059
3
+ :title: B. Comparison
@@ -0,0 +1,3 @@
1
+ :id: arc072_a
2
+ :contens_id: abc059
3
+ :title: C. Sequence
@@ -0,0 +1,3 @@
1
+ :id: arc072_b
2
+ :contens_id: abc059
3
+ :title: D. Alice&Brown
@@ -0,0 +1,3 @@
1
+ :id: abc060_a
2
+ :contens_id: abc060
3
+ :title: A. Shiritori
@@ -0,0 +1,3 @@
1
+ :id: abc060_b
2
+ :contens_id: abc060
3
+ :title: B. Choose Integers
@@ -0,0 +1,3 @@
1
+ :id: abc061_a
2
+ :contens_id: abc061
3
+ :title: A. Between Two Integers
@@ -0,0 +1,3 @@
1
+ :id: abc061_b
2
+ :contens_id: abc061
3
+ :title: B. Counting Roads
@@ -0,0 +1,3 @@
1
+ :id: abc061_c
2
+ :contens_id: abc061
3
+ :title: C. Big Array
@@ -0,0 +1,3 @@
1
+ :id: abc061_d
2
+ :contens_id: abc061
3
+ :title: D. Score Attack
@@ -0,0 +1,3 @@
1
+ :id: abc062_a
2
+ :contens_id: abc062
3
+ :title: A. Grouping
@@ -0,0 +1,3 @@
1
+ :id: abc062_b
2
+ :contens_id: abc062
3
+ :title: B. Picture Frame
@@ -0,0 +1,3 @@
1
+ :id: abc063_a
2
+ :contens_id: abc063
3
+ :title: A. Restricted
@@ -0,0 +1,3 @@
1
+ :id: abc063_b
2
+ :contens_id: abc063
3
+ :title: B. Varied
@@ -0,0 +1,3 @@
1
+ :id: arc075_a
2
+ :contens_id: abc063
3
+ :title: C. Bugged
@@ -0,0 +1,3 @@
1
+ :id: arc075_b
2
+ :contens_id: abc063
3
+ :title: D. Widespread
@@ -0,0 +1,3 @@
1
+ :id: abc064_a
2
+ :contens_id: abc064
3
+ :title: A. RGB Cards
@@ -0,0 +1,3 @@
1
+ :id: abc064_b
2
+ :contens_id: abc064
3
+ :title: B. Traveling AtCoDeer Problem
@@ -0,0 +1,3 @@
1
+ :id: abc064_c
2
+ :contens_id: abc064
3
+ :title: C. Colorful Leaderboard
@@ -0,0 +1,3 @@
1
+ :id: abc064_d
2
+ :contens_id: abc064
3
+ :title: D. Insertion
@@ -0,0 +1,3 @@
1
+ :id: abc065_a
2
+ :contens_id: abc065
3
+ :title: A. Expired?
@@ -0,0 +1,3 @@
1
+ :id: abc065_b
2
+ :contens_id: abc065
3
+ :title: B. Trained?
@@ -0,0 +1,3 @@
1
+ :id: arc076_a
2
+ :contens_id: abc065
3
+ :title: C. Reconciled?
@@ -0,0 +1,3 @@
1
+ :id: arc076_b
2
+ :contens_id: abc065
3
+ :title: D. Built?
@@ -0,0 +1,3 @@
1
+ :id: abc066_a
2
+ :contens_id: abc066
3
+ :title: A. ringring
@@ -0,0 +1,3 @@
1
+ :id: abc066_b
2
+ :contens_id: abc066
3
+ :title: B. ss
@@ -0,0 +1,3 @@
1
+ :id: arc077_a
2
+ :contens_id: abc066
3
+ :title: C. pushpush
@@ -0,0 +1,3 @@
1
+ :id: arc077_b
2
+ :contens_id: abc066
3
+ :title: D. 11
@@ -0,0 +1,3 @@
1
+ :id: abc067_a
2
+ :contens_id: abc067
3
+ :title: A. Sharing Cookies
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "yaml"
4
+
5
+ module SampleProblems
6
+ class List
7
+ class NoQuestionDataError < StandardError; end
8
+
9
+ class << self
10
+ def all
11
+ @all ||= Dir["#{__dir__}/data/*.yml"].map { |file| YAML.load_file(file) }
12
+ end
13
+
14
+ def select_random
15
+ all.sample
16
+ end
17
+
18
+ def find_by_contens_id(contens_id)
19
+ question = all.select { |q| q[:contens_id].eql?(contens_id) }
20
+ return raise_no_question_data_error!(contens_id) if question.empty?
21
+
22
+ question
23
+ end
24
+
25
+ private
26
+
27
+ def raise_no_question_data_error!(contens_id)
28
+ raise NoQuestionDataError, "Can't find a #{contens_id} in data"
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SampleProblems
4
+ VERSION = "0.1.0"
5
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "sample_problems/list"
4
+ require_relative "sample_problems/version"
5
+
6
+ module SampleProblems
7
+ end
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/sample_problems/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "sample_problems"
7
+ spec.version = SampleProblems::VERSION
8
+ spec.authors = ["watsumi"]
9
+ spec.email = [""]
10
+
11
+ spec.summary = ["sample gem for my product"]
12
+ spec.description = ["sample gem for my product"]
13
+ spec.homepage = "https://github.com/watsumi/sample_problems"
14
+ spec.license = "MIT"
15
+ spec.required_ruby_version = Gem::Requirement.new(">= 3.0")
16
+
17
+ spec.metadata["allowed_push_host"] = "https://rubygems.org/"
18
+
19
+ spec.metadata["homepage_uri"] = spec.homepage
20
+ spec.metadata["source_code_uri"] = "https://github.com/watsumi/sample_problems"
21
+ spec.metadata["changelog_uri"] = "https://github.com/watsumi/sample_problems"
22
+
23
+ # Specify which files should be added to the gem when it is released.
24
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
25
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
26
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
27
+ end
28
+ spec.bindir = "exe"
29
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
30
+ spec.require_paths = ["lib"]
31
+ end
metadata ADDED
@@ -0,0 +1,144 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: sample_problems
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - watsumi
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2021-11-14 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: '["sample gem for my product"]'
14
+ email:
15
+ - ''
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - ".gitignore"
21
+ - ".rspec"
22
+ - ".rubocop.yml"
23
+ - CODE_OF_CONDUCT.md
24
+ - Gemfile
25
+ - LICENSE.txt
26
+ - README.md
27
+ - Rakefile
28
+ - bin/console
29
+ - bin/setup
30
+ - lib/sample_problems.rb
31
+ - lib/sample_problems/data/042_a.yaml
32
+ - lib/sample_problems/data/042_b.yml
33
+ - lib/sample_problems/data/042_c.yml
34
+ - lib/sample_problems/data/042_d.yml
35
+ - lib/sample_problems/data/043_a.yml
36
+ - lib/sample_problems/data/043_b.yml
37
+ - lib/sample_problems/data/044_a.yml
38
+ - lib/sample_problems/data/044_b.yml
39
+ - lib/sample_problems/data/045_a.yml
40
+ - lib/sample_problems/data/045_b.yml
41
+ - lib/sample_problems/data/045_c.yml
42
+ - lib/sample_problems/data/045_d.yml
43
+ - lib/sample_problems/data/046_a.yml
44
+ - lib/sample_problems/data/046_b.yml
45
+ - lib/sample_problems/data/047_a.yml
46
+ - lib/sample_problems/data/047_b.yml
47
+ - lib/sample_problems/data/047_c.yml
48
+ - lib/sample_problems/data/047_d.yml
49
+ - lib/sample_problems/data/048_a.yml
50
+ - lib/sample_problems/data/048_b.yml
51
+ - lib/sample_problems/data/048_c.yml
52
+ - lib/sample_problems/data/048_d.yml
53
+ - lib/sample_problems/data/049_a.yml
54
+ - lib/sample_problems/data/049_b.yml
55
+ - lib/sample_problems/data/049_c.yml
56
+ - lib/sample_problems/data/049_d.yml
57
+ - lib/sample_problems/data/050_a.yml
58
+ - lib/sample_problems/data/050_b.yml
59
+ - lib/sample_problems/data/051_a.yml
60
+ - lib/sample_problems/data/051_b.yml
61
+ - lib/sample_problems/data/051_c.yml
62
+ - lib/sample_problems/data/051_d.yml
63
+ - lib/sample_problems/data/052_a.yml
64
+ - lib/sample_problems/data/052_b.yml
65
+ - lib/sample_problems/data/053_a.yml
66
+ - lib/sample_problems/data/053_b.yml
67
+ - lib/sample_problems/data/054_a.yml
68
+ - lib/sample_problems/data/054_b.yml
69
+ - lib/sample_problems/data/054_c.yml
70
+ - lib/sample_problems/data/054_d.yml
71
+ - lib/sample_problems/data/055_a.yml
72
+ - lib/sample_problems/data/055_b.yml
73
+ - lib/sample_problems/data/056_a.yml
74
+ - lib/sample_problems/data/056_b.yml
75
+ - lib/sample_problems/data/056_c.yml
76
+ - lib/sample_problems/data/056_d.yml
77
+ - lib/sample_problems/data/057_a.yml
78
+ - lib/sample_problems/data/057_b.yml
79
+ - lib/sample_problems/data/057_c.yml
80
+ - lib/sample_problems/data/057_d.yml
81
+ - lib/sample_problems/data/058_a.yml
82
+ - lib/sample_problems/data/058_b.yml
83
+ - lib/sample_problems/data/058_c.yml
84
+ - lib/sample_problems/data/058_d.yml
85
+ - lib/sample_problems/data/059_a.yml
86
+ - lib/sample_problems/data/059_b.yml
87
+ - lib/sample_problems/data/059_c.yml
88
+ - lib/sample_problems/data/059_d.yml
89
+ - lib/sample_problems/data/060_a.yml
90
+ - lib/sample_problems/data/060_b.yml
91
+ - lib/sample_problems/data/061_a.yml
92
+ - lib/sample_problems/data/061_b.yml
93
+ - lib/sample_problems/data/061_c.yml
94
+ - lib/sample_problems/data/061_d.yml
95
+ - lib/sample_problems/data/062_a.yml
96
+ - lib/sample_problems/data/062_b.yml
97
+ - lib/sample_problems/data/063_a.yml
98
+ - lib/sample_problems/data/063_b.yml
99
+ - lib/sample_problems/data/063_c.yml
100
+ - lib/sample_problems/data/063_d.yml
101
+ - lib/sample_problems/data/064_a.yml
102
+ - lib/sample_problems/data/064_b.yml
103
+ - lib/sample_problems/data/064_c.yml
104
+ - lib/sample_problems/data/064_d.yml
105
+ - lib/sample_problems/data/065_a.yml
106
+ - lib/sample_problems/data/065_b.yml
107
+ - lib/sample_problems/data/065_c.yml
108
+ - lib/sample_problems/data/065_d.yml
109
+ - lib/sample_problems/data/066_a.yml
110
+ - lib/sample_problems/data/066_b.yml
111
+ - lib/sample_problems/data/066_c.yml
112
+ - lib/sample_problems/data/066_d.yml
113
+ - lib/sample_problems/data/067_a.yml
114
+ - lib/sample_problems/list.rb
115
+ - lib/sample_problems/version.rb
116
+ - sample_problems.gemspec
117
+ homepage: https://github.com/watsumi/sample_problems
118
+ licenses:
119
+ - MIT
120
+ metadata:
121
+ allowed_push_host: https://rubygems.org/
122
+ homepage_uri: https://github.com/watsumi/sample_problems
123
+ source_code_uri: https://github.com/watsumi/sample_problems
124
+ changelog_uri: https://github.com/watsumi/sample_problems
125
+ post_install_message:
126
+ rdoc_options: []
127
+ require_paths:
128
+ - lib
129
+ required_ruby_version: !ruby/object:Gem::Requirement
130
+ requirements:
131
+ - - ">="
132
+ - !ruby/object:Gem::Version
133
+ version: '3.0'
134
+ required_rubygems_version: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ requirements: []
140
+ rubygems_version: 3.2.3
141
+ signing_key:
142
+ specification_version: 4
143
+ summary: '["sample gem for my product"]'
144
+ test_files: []