Submit Search
Upload
Baekjoon Online Judge 10986번 풀이
•
0 likes
•
15,796 views
B
Baekjoon Choi
Follow
https://www.acmicpc.net/problem/10986 "나머지 합" 문제 풀이입니다.
Read less
Read more
Technology
Report
Share
Report
Share
1 of 6
Download now
Download to read offline
Recommended
Baekjoon Online Judge 2873번 풀이
Baekjoon Online Judge 2873번 풀이
Baekjoon Choi
2014 ACM-ICPC Daejeon 인터넷 예선 해설
2014 ACM-ICPC Daejeon 인터넷 예선 해설
Baekjoon Choi
Baekjoon Online Judge 1201번 풀이
Baekjoon Online Judge 1201번 풀이
Baekjoon Choi
Baekjoon Online Judge 1019번 풀이
Baekjoon Online Judge 1019번 풀이
Baekjoon Choi
Baekjoon Online Judge 3015번 풀이
Baekjoon Online Judge 3015번 풀이
Baekjoon Choi
Baekjoon Online Judge 1451번 풀이
Baekjoon Online Judge 1451번 풀이
Baekjoon Choi
Baekjoon Online Judge 1648번 풀이
Baekjoon Online Judge 1648번 풀이
Baekjoon Choi
Do not use the greater than sign in programming
Do not use the greater than sign in programming
Llewellyn Falco
Recommended
Baekjoon Online Judge 2873번 풀이
Baekjoon Online Judge 2873번 풀이
Baekjoon Choi
2014 ACM-ICPC Daejeon 인터넷 예선 해설
2014 ACM-ICPC Daejeon 인터넷 예선 해설
Baekjoon Choi
Baekjoon Online Judge 1201번 풀이
Baekjoon Online Judge 1201번 풀이
Baekjoon Choi
Baekjoon Online Judge 1019번 풀이
Baekjoon Online Judge 1019번 풀이
Baekjoon Choi
Baekjoon Online Judge 3015번 풀이
Baekjoon Online Judge 3015번 풀이
Baekjoon Choi
Baekjoon Online Judge 1451번 풀이
Baekjoon Online Judge 1451번 풀이
Baekjoon Choi
Baekjoon Online Judge 1648번 풀이
Baekjoon Online Judge 1648번 풀이
Baekjoon Choi
Do not use the greater than sign in programming
Do not use the greater than sign in programming
Llewellyn Falco
Attention-Based Adaptive Selection of Operations for Image Restoration in the...
Attention-Based Adaptive Selection of Operations for Image Restoration in the...
MasanoriSuganuma
Prelude to halide_public
Prelude to halide_public
Fixstars Corporation
Python lists
Python lists
Ali CHOUAYA
Al Fazl International 2nd January 2015
Al Fazl International 2nd January 2015
muzaffertahir9
Al Fazl International - 4th March 2016 Weekly UK
Al Fazl International - 4th March 2016 Weekly UK
muzaffertahir9
Review: Cyrus, Samii, Laura Paler, and Sarah Zukerman Daly. 2016. “Retrospect...
Review: Cyrus, Samii, Laura Paler, and Sarah Zukerman Daly. 2016. “Retrospect...
Jaehyun Song
音響信号に対する異常音検知技術と応用
音響信号に対する異常音検知技術と応用
Yuma Koizumi
機械学習と自動微分
機械学習と自動微分
Ichigaku Takigawa
Festival Universitário de Surf 2014
Festival Universitário de Surf 2014
ibrasurf
Festival Universitário de Surf 2014
Festival Universitário de Surf 2014
Mari Peixoto
Delta5 Summary
Delta5 Summary
Frederike_schweers
Nouveaux services, nouveaux workflows et François Abbe Mesclado
Nouveaux services, nouveaux workflows et François Abbe Mesclado
Marc Bourhis
Наибольшая общая мера: 2500 лет
Наибольшая общая мера: 2500 лет
sixtyone
Companies act kenya.pdf
Companies act kenya.pdf
Meshack Mwangi
16º Circuito Paulista Universitário de surf 2014 - 1ª Etapa
16º Circuito Paulista Universitário de surf 2014 - 1ª Etapa
ibrasurf
Location and Language in Social Media (Stanford Mobi Social Invited Talk)
Location and Language in Social Media (Stanford Mobi Social Invited Talk)
Ed Chi
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
Gabriella Davis
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
BookNet Canada
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
BookNet Canada
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
Puma Security, LLC
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
Mark Billinghurst
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
Malak Abu Hammad
More Related Content
Similar to Baekjoon Online Judge 10986번 풀이
Attention-Based Adaptive Selection of Operations for Image Restoration in the...
Attention-Based Adaptive Selection of Operations for Image Restoration in the...
MasanoriSuganuma
Prelude to halide_public
Prelude to halide_public
Fixstars Corporation
Python lists
Python lists
Ali CHOUAYA
Al Fazl International 2nd January 2015
Al Fazl International 2nd January 2015
muzaffertahir9
Al Fazl International - 4th March 2016 Weekly UK
Al Fazl International - 4th March 2016 Weekly UK
muzaffertahir9
Review: Cyrus, Samii, Laura Paler, and Sarah Zukerman Daly. 2016. “Retrospect...
Review: Cyrus, Samii, Laura Paler, and Sarah Zukerman Daly. 2016. “Retrospect...
Jaehyun Song
音響信号に対する異常音検知技術と応用
音響信号に対する異常音検知技術と応用
Yuma Koizumi
機械学習と自動微分
機械学習と自動微分
Ichigaku Takigawa
Festival Universitário de Surf 2014
Festival Universitário de Surf 2014
ibrasurf
Festival Universitário de Surf 2014
Festival Universitário de Surf 2014
Mari Peixoto
Delta5 Summary
Delta5 Summary
Frederike_schweers
Nouveaux services, nouveaux workflows et François Abbe Mesclado
Nouveaux services, nouveaux workflows et François Abbe Mesclado
Marc Bourhis
Наибольшая общая мера: 2500 лет
Наибольшая общая мера: 2500 лет
sixtyone
Companies act kenya.pdf
Companies act kenya.pdf
Meshack Mwangi
16º Circuito Paulista Universitário de surf 2014 - 1ª Etapa
16º Circuito Paulista Universitário de surf 2014 - 1ª Etapa
ibrasurf
Location and Language in Social Media (Stanford Mobi Social Invited Talk)
Location and Language in Social Media (Stanford Mobi Social Invited Talk)
Ed Chi
Similar to Baekjoon Online Judge 10986번 풀이
(16)
Attention-Based Adaptive Selection of Operations for Image Restoration in the...
Attention-Based Adaptive Selection of Operations for Image Restoration in the...
Prelude to halide_public
Prelude to halide_public
Python lists
Python lists
Al Fazl International 2nd January 2015
Al Fazl International 2nd January 2015
Al Fazl International - 4th March 2016 Weekly UK
Al Fazl International - 4th March 2016 Weekly UK
Review: Cyrus, Samii, Laura Paler, and Sarah Zukerman Daly. 2016. “Retrospect...
Review: Cyrus, Samii, Laura Paler, and Sarah Zukerman Daly. 2016. “Retrospect...
音響信号に対する異常音検知技術と応用
音響信号に対する異常音検知技術と応用
機械学習と自動微分
機械学習と自動微分
Festival Universitário de Surf 2014
Festival Universitário de Surf 2014
Festival Universitário de Surf 2014
Festival Universitário de Surf 2014
Delta5 Summary
Delta5 Summary
Nouveaux services, nouveaux workflows et François Abbe Mesclado
Nouveaux services, nouveaux workflows et François Abbe Mesclado
Наибольшая общая мера: 2500 лет
Наибольшая общая мера: 2500 лет
Companies act kenya.pdf
Companies act kenya.pdf
16º Circuito Paulista Universitário de surf 2014 - 1ª Etapa
16º Circuito Paulista Universitário de surf 2014 - 1ª Etapa
Location and Language in Social Media (Stanford Mobi Social Invited Talk)
Location and Language in Social Media (Stanford Mobi Social Invited Talk)
Recently uploaded
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
Gabriella Davis
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
BookNet Canada
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
BookNet Canada
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
Puma Security, LLC
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
Mark Billinghurst
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
Malak Abu Hammad
Slack Application Development 101 Slides
Slack Application Development 101 Slides
praypatel2
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
Ridwan Fadjar
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
Radu Cotescu
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
hans926745
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
Michael W. Hawkins
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
Paola De la Torre
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
Delhi Call girls
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
Delhi Call girls
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
Memoori
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
Allon Mureinik
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Katpro Technologies
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
ThousandEyes
Recently uploaded
(20)
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
Slack Application Development 101 Slides
Slack Application Development 101 Slides
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Baekjoon Online Judge 10986번 풀이
1.
choi@startlink.io
2.
https://www.acmicpc.net/problem/10986 • N
A1, A2, …, AN • M • , Ai + … + Aj M (i, j) • 1 ≤ N ≤ 106 • 2 ≤ M ≤ 103 • 0 ≤ Ai ≤ 109
3.
https://www.acmicpc.net/problem/10986 •
N^2 • O(N^2) = (10^6)^2 = 10^12 • 10^12 ≥ 1 • !
4.
https://www.acmicpc.net/problem/10986 • Si =
A1 + … + Ai • Ai + … + Aj = Sj – Si-‐1 • (Ai + … + Aj) % M = (Sj – Si-‐1) % M • (Ai + … + Aj) % M == 0 • (Sj – Si-‐1) % M == 0 • 0 • Sj % M == Si-‐1 % M
5.
https://www.acmicpc.net/problem/10986 •
• Sj % M == Si-‐1 % M • (i, j) . • cntk Si % M == k i • 0 ≤ k < M k • cntk * (cntk -‐ 1) / 2 .
6.
https://www.acmicpc.net/problem/10986 • https://gist.github.com/Baekjoon/6d45e5ef5d7eed6039b5
Download now