Submit Search
Upload
Baekjoon Online Judge 10986번 풀이
•
0 likes
•
15,791 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
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
charlottematthew16
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
Commit University
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
Florian Wilhelm
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Zilliz
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
Sri Ambati
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
Dubai Multi Commodity Centre
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
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
charlottematthew16
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
Commit University
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
Florian Wilhelm
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Zilliz
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
Sri Ambati
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
Dubai Multi Commodity Centre
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Precisely
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
Dilum Bandara
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
Kalema Edgar
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
hariprasad279825
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
BookNet Canada
How to write a Business Continuity Plan
How to write a Business Continuity Plan
Databarracks
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
2toLead Limited
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
Fwdays
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
Sergiu Bodiu
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
gvaughan
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
Hervé Boutemy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
Fwdays
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
Lars Bell
Recently uploaded
(20)
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
How to write a Business Continuity Plan
How to write a Business Continuity Plan
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
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