-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
720ddd8
commit 8f71233
Showing
8 changed files
with
799 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
214 changes: 214 additions & 0 deletions
214
2019/08/14/题解 P5497 【[LnOI2019SP]龟速单项式变换(SMT)】/index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,214 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head><meta name="generator" content="Hexo 3.9.0"> | ||
<meta charset="utf-8"> | ||
|
||
|
||
|
||
<title>题解 P5497 【[LnOI2019SP]龟速单项式变换(SMT)】 | Hexo</title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> | ||
<meta name="description" content="这题不是大水题吗,我随便口胡就做出来了 ——来自周子衡的嘲讽 首先考虑连续一段$[l,r]$的和 设$s[i]$为前$i$个数的和 则有$sum(l,r)=s[r]-s[l-1]$ 若$s[r]\equiv s[l-1] \pmod{m}$,则$sum(l,r)$为$m$的倍数 所以若$n\geq m$,则$s[0],s[1]…s[n]$共$n+1$个数,由容斥原理可知,必有两个数$\pmod{m"> | ||
<meta name="keywords" content="题解,数学"> | ||
<meta property="og:type" content="article"> | ||
<meta property="og:title" content="题解 P5497 【[LnOI2019SP]龟速单项式变换(SMT)】"> | ||
<meta property="og:url" content="http://BilyHurington.github.io/2019/08/14/题解 P5497 【[LnOI2019SP]龟速单项式变换(SMT)】/index.html"> | ||
<meta property="og:site_name" content="Hexo"> | ||
<meta property="og:description" content="这题不是大水题吗,我随便口胡就做出来了 ——来自周子衡的嘲讽 首先考虑连续一段$[l,r]$的和 设$s[i]$为前$i$个数的和 则有$sum(l,r)=s[r]-s[l-1]$ 若$s[r]\equiv s[l-1] \pmod{m}$,则$sum(l,r)$为$m$的倍数 所以若$n\geq m$,则$s[0],s[1]…s[n]$共$n+1$个数,由容斥原理可知,必有两个数$\pmod{m"> | ||
<meta property="og:locale" content="en"> | ||
<meta property="og:updated_time" content="2019-08-14T11:13:31.570Z"> | ||
<meta name="twitter:card" content="summary"> | ||
<meta name="twitter:title" content="题解 P5497 【[LnOI2019SP]龟速单项式变换(SMT)】"> | ||
<meta name="twitter:description" content="这题不是大水题吗,我随便口胡就做出来了 ——来自周子衡的嘲讽 首先考虑连续一段$[l,r]$的和 设$s[i]$为前$i$个数的和 则有$sum(l,r)=s[r]-s[l-1]$ 若$s[r]\equiv s[l-1] \pmod{m}$,则$sum(l,r)$为$m$的倍数 所以若$n\geq m$,则$s[0],s[1]…s[n]$共$n+1$个数,由容斥原理可知,必有两个数$\pmod{m"> | ||
|
||
<link rel="alternate" href="/atom.xml" title="Hexo" type="application/atom+xml"> | ||
|
||
|
||
<link rel="icon" href="/favicon.png"> | ||
|
||
|
||
<link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css"> | ||
|
||
<link rel="stylesheet" href="/css/style.css"> | ||
</head> | ||
</html> | ||
<body> | ||
<div id="container"> | ||
<div id="wrap"> | ||
<header id="header"> | ||
<div id="banner"></div> | ||
<div id="header-outer" class="outer"> | ||
<div id="header-title" class="inner"> | ||
<h1 id="logo-wrap"> | ||
<a href="/" id="logo">Hexo</a> | ||
</h1> | ||
|
||
</div> | ||
<div id="header-inner" class="inner"> | ||
<nav id="main-nav"> | ||
<a id="main-nav-toggle" class="nav-icon"></a> | ||
|
||
<a class="main-nav-link" href="/">Home</a> | ||
|
||
<a class="main-nav-link" href="/archives">Archives</a> | ||
|
||
</nav> | ||
<nav id="sub-nav"> | ||
|
||
<a id="nav-rss-link" class="nav-icon" href="/atom.xml" title="RSS Feed"></a> | ||
|
||
<a id="nav-search-btn" class="nav-icon" title="Search"></a> | ||
</nav> | ||
<div id="search-form-wrap"> | ||
<form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" class="search-form-input" placeholder="Search"><button type="submit" class="search-form-submit"></button><input type="hidden" name="sitesearch" value="http://BilyHurington.github.io"></form> | ||
</div> | ||
</div> | ||
</div> | ||
</header> | ||
<div class="outer"> | ||
<section id="main"><article id="post-题解 P5497 【[LnOI2019SP]龟速单项式变换(SMT)】" class="article article-type-post" itemscope itemprop="blogPost"> | ||
<div class="article-meta"> | ||
<a href="/2019/08/14/题解 P5497 【[LnOI2019SP]龟速单项式变换(SMT)】/" class="article-date"> | ||
<time datetime="2019-08-14T11:10:07.167Z" itemprop="datePublished">2019-08-14</time> | ||
</a> | ||
|
||
</div> | ||
<div class="article-inner"> | ||
|
||
|
||
<header class="article-header"> | ||
|
||
|
||
<h1 class="article-title" itemprop="name"> | ||
题解 P5497 【[LnOI2019SP]龟速单项式变换(SMT)】 | ||
</h1> | ||
|
||
|
||
</header> | ||
|
||
<div class="article-entry" itemprop="articleBody"> | ||
|
||
<p>这题不是大水题吗,我随便口胡就做出来了 ——来自<a href="https://www.luogu.org/space/show?uid=112794" target="_blank" rel="noopener">周子衡</a>的嘲讽</p> | ||
<p>首先考虑连续一段$[l,r]$的和</p> | ||
<p>设$s[i]$为前$i$个数的和</p> | ||
<p>则有$sum(l,r)=s[r]-s[l-1]$</p> | ||
<p>若$s[r]\equiv s[l-1] \pmod{m}$,则$sum(l,r)$为$m$的倍数</p> | ||
<p>所以若$n\geq m$,则$s[0],s[1]…s[n]$共$n+1$个数,<br>由容斥原理可知,必有两个数$\pmod{m}$同余,即这个序列为”司$m$序列”</p> | ||
<p>若$n<m$,则可以令$a[i]=1,i\in [0,n]$,此时$s[0]…s[n]$<br>$\pmod{m}$的余数均不相等,此时序列不为”司$m$序列”</p> | ||
<p>放代码</p> | ||
<figure class="highlight cpp"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">#<span class="meta-keyword">include</span> <span class="meta-string"><cstdio></span></span></span><br><span class="line"><span class="keyword">long</span> <span class="keyword">long</span> x,y;</span><br><span class="line"><span class="function"><span class="keyword">int</span> <span class="title">main</span><span class="params">()</span></span>{</span><br><span class="line"> <span class="built_in">scanf</span>(<span class="string">"%lld%lld"</span>,&x,&y);</span><br><span class="line"> <span class="keyword">if</span>(x>=y) <span class="built_in">printf</span>(<span class="string">"YES"</span>);</span><br><span class="line"> <span class="keyword">else</span> <span class="built_in">printf</span>(<span class="string">"NO"</span>);</span><br><span class="line">}</span><br></pre></td></tr></table></figure> | ||
|
||
</div> | ||
<footer class="article-footer"> | ||
<a data-url="http://BilyHurington.github.io/2019/08/14/题解 P5497 【[LnOI2019SP]龟速单项式变换(SMT)】/" data-id="cjzb5q4cj0001ywv1l7g8tvmf" class="article-share-link">Share</a> | ||
|
||
|
||
<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/数学/">数学</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/题解/">题解</a></li></ul> | ||
|
||
</footer> | ||
</div> | ||
|
||
|
||
<nav id="article-nav"> | ||
|
||
|
||
<a href="/2019/08/14/hello-world/" id="article-nav-older" class="article-nav-link-wrap"> | ||
<strong class="article-nav-caption">Older</strong> | ||
<div class="article-nav-title">Hello World</div> | ||
</a> | ||
|
||
</nav> | ||
|
||
|
||
</article> | ||
|
||
</section> | ||
|
||
<aside id="sidebar"> | ||
|
||
|
||
|
||
|
||
|
||
<div class="widget-wrap"> | ||
<h3 class="widget-title">Tags</h3> | ||
<div class="widget"> | ||
<ul class="tag-list"><li class="tag-list-item"><a class="tag-list-link" href="/tags/数学/">数学</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/题解/">题解</a></li></ul> | ||
</div> | ||
</div> | ||
|
||
|
||
|
||
|
||
<div class="widget-wrap"> | ||
<h3 class="widget-title">Tag Cloud</h3> | ||
<div class="widget tagcloud"> | ||
<a href="/tags/数学/" style="font-size: 10px;">数学</a> <a href="/tags/题解/" style="font-size: 10px;">题解</a> | ||
</div> | ||
</div> | ||
|
||
|
||
|
||
<div class="widget-wrap"> | ||
<h3 class="widget-title">Archives</h3> | ||
<div class="widget"> | ||
<ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/08/">August 2019</a></li></ul> | ||
</div> | ||
</div> | ||
|
||
|
||
|
||
|
||
<div class="widget-wrap"> | ||
<h3 class="widget-title">Recent Posts</h3> | ||
<div class="widget"> | ||
<ul> | ||
|
||
<li> | ||
<a href="/2019/08/14/题解 P5497 【[LnOI2019SP]龟速单项式变换(SMT)】/">题解 P5497 【[LnOI2019SP]龟速单项式变换(SMT)】</a> | ||
</li> | ||
|
||
<li> | ||
<a href="/2019/08/14/hello-world/">Hello World</a> | ||
</li> | ||
|
||
</ul> | ||
</div> | ||
</div> | ||
|
||
|
||
</aside> | ||
|
||
</div> | ||
<footer id="footer"> | ||
|
||
<div class="outer"> | ||
<div id="footer-info" class="inner"> | ||
© 2019 BilyHurington<br> | ||
Powered by <a href="http://hexo.io/" target="_blank">Hexo</a> | ||
</div> | ||
</div> | ||
</footer> | ||
</div> | ||
<nav id="mobile-nav"> | ||
|
||
<a href="/" class="mobile-nav-link">Home</a> | ||
|
||
<a href="/archives" class="mobile-nav-link">Archives</a> | ||
|
||
</nav> | ||
|
||
|
||
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script> | ||
|
||
|
||
<link rel="stylesheet" href="/fancybox/jquery.fancybox.css"> | ||
<script src="/fancybox/jquery.fancybox.pack.js"></script> | ||
|
||
|
||
<script src="/js/script.js"></script> | ||
|
||
|
||
|
||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.