Submit Search
Upload
Baekjoon Online Judge 10986번 풀이
•
0 likes
•
15,788 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
Mari Peixoto
Festival Universitário de Surf 2014
Festival Universitário de Surf 2014
ibrasurf
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
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
ThousandEyes
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Nikki Chapple
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
fnnc6jmgwh
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
Mydbops
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
BookNet Canada
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
LoriGlavin3
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
Mari Peixoto
Festival Universitário de Surf 2014
Festival Universitário de Surf 2014
ibrasurf
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
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
ThousandEyes
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Nikki Chapple
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
fnnc6jmgwh
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
Mydbops
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
BookNet Canada
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
LoriGlavin3
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
Bernd Ruecker
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
Pixlogix Infotech
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
Manik S Magar
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
Kari Kakkonen
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
UiPathCommunity
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
marketing932765
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
LoriGlavin3
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Alkin Tezuysal
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
LoriGlavin3
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
Neo4j
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
Pixlogix Infotech
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
Ravi Sanghani
A Framework for Development in the AI Age
A Framework for Development in the AI Age
Cprime
Recently uploaded
(20)
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
A Framework for Development in the AI Age
A Framework for Development in the AI Age
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