Comments (1)
간단한 문제 풀이
a,b: 간단
c: 범위가 작으므로 a, b[c] 를 전부 카운트 해준 후 나중에 둘 다 곱해주면 된다.
d: 조합 (이항계수)로 풀린다. n = a+b 로 두면 nCa 가 전체 가능한 개수가 되고, n-1Ca-1 이 a를 넣은 후 나머지의 개수가 된다.
즉, k 가 n-1Ca-1보다 크면 b 로 시작하고 아니면 a로 시작하도록 재귀로 돌리면 된다.
대회 중에는 j준수의 https://www.geeksforgeeks.org/find-n-th-lexicographically-permutation-string-set-2/ 사용. 좀 더 범용적인데 C++로는 불가 (60! 이 long long 넘어감) 파이썬으로 제출.
결과
약간 올랐다
from atcoder.
Related Issues (20)
- ABC_219_D - Strange Lunchbox
- CADDI_2018_B / CADDI_2018B_D - Harlequin
- ABC_216_E - Amusement Park
- ARC_097_A / ABC_097_C - K-th Substring
- ARC_068_B / ABC_053_D - Card Eater
- ABC_194_D - Journey
- CODEFESTIVAL_2016_QUALA_C - Next Letter
- ABC_140_D - Face Produces Unhappiness
- ABC_226 - AtCoder Beginner Contest 226
- ARC_091_B / ABC_090_D - Remainder Reminder
- ABC_080_C - Shopping Street
- ABC_228 - TOYOTA SYSTEMS Programming Contest 2021(AtCoder Beginner Contest 228)
- ABC_230 - AtCoder Beginner Contest 230
- ABC_230_D - Destroyer Takahashi
- ABC_192_E - Train
- ABC_223_D - Restricted Permutation
- ABC_191_C - Digital Graffiti
- ABC_231 - Panasonic Programming Contest 2021(AtCoder Beginner Contest 231)
- ABC_178_E - Dist Max
- ABC_166_E - This Message Will Self-Destruct in 5s
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from atcoder.