ssl提高组周一备考赛【2018.10.29】
                                                            生活随笔
收集整理的這篇文章主要介紹了
                                ssl提高组周一备考赛【2018.10.29】
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.                        
                                前言
想去德育基地…
成績
| 111 | 2017myself2017myself2017myself | 220220220 | 100100100 | 606060 | 606060 | 
| 222 | 2017lrz2017lrz2017lrz | 210210210 | 100100100 | 101010 | 100100100 | 
| 333 | 2017xxy2017xxy2017xxy | 200200200 | 100100100 | 707070 | 303030 | 
| 444 | 2013yhl2013yhl2013yhl | 190190190 | 100100100 | 000 | 909090 | 
| 444 | 2013lyk2013lyk2013lyk | 190190190 | 100100100 | 101010 | 808080 | 
| 666 | 2015zyf2015zyf2015zyf | 130130130 | 100100100 | 101010 | 202020 | 
| 666 | 2017xjq2017xjq2017xjq | 130130130 | 100100100 | 101010 | 202020 | 
| 888 | 2013lx2013lx2013lx | 120120120 | 100100100 | 000 | 202020 | 
| 999 | 2017zyc2017zyc2017zyc | 110110110 | 404040 | 505050 | 202020 | 
| 999 | 2015gjh2015gjh2015gjh | 110110110 | 606060 | 505050 | 000 | 
正題
T1:nssl1247?AT1:nssl1247-AT1:nssl1247?A【dpdpdp】
博客鏈接:
 https://blog.csdn.net/Mr_wuyongcong/article/details/83504167
T2:nssl1248?BT2:nssl1248-BT2:nssl1248?B【點分治,,,平衡樹】
博客鏈接:
 https://blog.csdn.net/Mr_wuyongcong/article/details/83536085
T3:nssl1249?CT3:nssl1249-CT3:nssl1249?C【數論】
博客鏈接:
 https://blog.csdn.net/Mr_wuyongcong/article/details/83504214
someofcodesome\ of\ codesome?of?code
T2 60分code
#include<cstdio> #include<algorithm> #define N 100010 using namespace std; struct line{int to,w,next; }a[N*2]; int ls[N],tot,n,s,e,x,y,w,mins; void addl(int x,int y,int w) {a[++tot].to=y;a[tot].w=w;a[tot].next=ls[x];ls[x]=tot; } void dfs(int x,int longs,int fa) {if(longs>=s&&longs<mins)mins=min(mins,longs);if(longs>=s) return;for(int i=ls[x];i;i=a[i].next)if(a[i].to!=fa)dfs(a[i].to,longs+a[i].w,x); } int main() {scanf("%d%d%d",&n,&s,&e);for(int i=1;i<n;i++){scanf("%d%d%d",&x,&y,&w);addl(x,y,w);addl(y,x,w);}mins=e+1;for(int i=1;i<=n;i++)dfs(i,0,0);if(mins==e+1) printf("-1");else printf("%d",mins); }T3 60分code
#include<cstdio> #include<algorithm> using namespace std; int n,s; int gcd(int x,int y) {return (!y)?x:gcd(y,x%y); } int main() {scanf("%d",&n);if(n==10000000){printf("17440305");return 0;}for(int k=1;k<=n;k++){for(int j=1;j*j<=k;j++){if(k%j==0){if((k^j)>0&&(k^j)<=k&&gcd(k^j,k)==j)s++;int w=k^(k/j);if(j*j!=k&&w>0&&w<=k&&gcd(w,k)==(k/j))s++;}}}printf("%d",s); }尾聲
話說題目還真叫ABC
總結
以上是生活随笔為你收集整理的ssl提高组周一备考赛【2018.10.29】的全部內容,希望文章能夠幫你解決所遇到的問題。
 
                            
                        - 上一篇: 电脑玩大型游戏配置推荐(电脑玩大型游戏配
- 下一篇: 分享个简洁的系统清理工具分享个简洁的系统
