The 2018 ACM-ICPC Asia Qingdao Regional Contest
The 2018 ACM-ICPC Asia Qingdao Regional Contest
青岛总体来说只会3题
C
#include<bits/stdc++.h> using namespace std; #define maxn 3000005 char a[maxn],b[maxn]; int c[maxn],ll[maxn],rr[maxn]; int main(){ int t; cin>>t; while(t--){ int n; scanf("%d",&n); scanf("%s",a); scanf("%s",b); ;j<n;j++){ if(a[j]!=b[j]){ c[j]=; }; } ; ; ;j<strlen(a);j++){ //if(fa&&c[j]==1) continue; &&c[j]==){ rr[i-]=j; fa=; }&&c[j]==){ ll[i]=j; i++; fa=; } } ]==) rr[i-]=n-; ){ printf()/); }){ ]-ll[i-]+; )*+1LL*(n-k)*; printf("%lld\n",ans); }){ printf("6\n"); }else{ printf("0\n"); } } ; }
E
#include<bits/stdc++.h> using namespace std; #define maxn 200005 #define LL long long LL a[maxn],b[maxn]; LL n,m; bool fa(LL x){ LL ans=; ;j<n;j++){ ){ b[j]=x/a[j]; }else{ b[j]=x/a[j]+; } } ;j<n;j++){ &&b[j]<) break; ans++; ){ ans+=(b[j]-)*; b[j+]-=b[j]-; } ; } ; } int main(){ int t; cin>>t; while(t--){ scanf("%lld%lld",&n,&m); LL mx=; ;j<n;j++){ scanf("%lld",&a[j]); mx=max(mx,a[j]); } LL l=,r=mx*m; ) cout<<"<<endl; else{ while(l<r){ LL mid=(r+l)/; ; else r=mid; } printf(,l-)); } } ; }
J
#include<bits/stdc++.h> using namespace std; typedef long long LL; ; int Min( int a , int b ){ return a<b?a:b; } int n,m,a[maxn]; int main() { int T; scanf( "%d" , &T ); ; cas<=T ; cas++ ) { ,num = ; scanf ( "%d%d" , &n , &m ); ; i<=n ; i++ ) { int x; scanf( "%d" , &x ); ) cnt++; else a[++num] = x; } if ( m==n ) printf( "Richman\n" ); else if ( m<cnt ) printf( "Impossible\n" ); else { LL ans = ; ; ; i<=num ; i++ ) { if ( i<=m-cnt ) ans += a[i]; else tmp = Min( tmp , a[i] ); } printf( ); } } ; }
M
#include<bits/stdc++.h> using namespace std; #define LL long long ]={,,,,,,,,,}; int main(){ int t; cin>>t; while(t--){ int n,z; scanf("%d%d",&n,&z); //cout<<"2"<<endl; ){ ||n==) break; ) break; ; int k=n; ){ LL ii=k%; i+=fa[ii]; k/=; } n=i; z--; } ){ printf("%d\n",n); }else{ ==){ printf("%d\n",n); }else{ printf("%d\n",fa[n]); } } } }
The 2018 ACM-ICPC Asia Qingdao Regional Contest的更多相关文章
- The 2018 ACM-ICPC Asia Qingdao Regional Contest(部分题解)
摘要: 本文是The 2018 ACM-ICPC Asia Qingdao Regional Contest(青岛现场赛)的部分解题报告,给出了出题率较高的几道题的题解,希望熟悉区域赛的题型,进而对其 ...
- ACM ICPC Central Europe Regional Contest 2013 Jagiellonian University Kraków
ACM ICPC Central Europe Regional Contest 2013 Jagiellonian University Kraków Problem A: Rubik’s Rect ...
- 2019-2020 ICPC, Asia Jakarta Regional Contest (Online Mirror, ICPC Rules, Teams Preferred)
2019-2020 ICPC, Asia Jakarta Regional Contest (Online Mirror, ICPC Rules, Teams Preferred) easy: ACE ...
- The 2018 ACM-ICPC Asia Qingdao Regional Contest, Online J - Press the Button(思维)
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=4056 题意 有一个按钮.一个灯.一个计时器和一个计数器,每按一次按钮,计时 ...
- The 2018 ACM-ICPC Asia Qingdao Regional Contest, Online -C:Halting Problem(模拟)
C Halting Problem In computability theory, the halting problem is the problem of determining, from a ...
- The 2018 ACM-ICPC Asia Qingdao Regional Contest, Online Solution
A Live Love 水. #include<bits/stdc++.h> using namespace std; typedef long long ll; ; const i ...
- 2018-2019, ICPC, Asia Yokohama Regional Contest 2018 K
传送门:https://codeforces.com/gym/102082/attachments 题解: 代码: /** * ┏┓ ┏┓ * ┏┛┗━━━━━━━┛┗━━━┓ * ┃ ┃ * ┃ ━ ...
- ZOJ - 4048 Red Black Tree (LCA+贪心) The 2018 ACM-ICPC Asia Qingdao Regional Contest, Online
题意:一棵树上有m个红色结点,树的边有权值.q次查询,每次给出k个点,每次查询有且只有一次机会将n个点中任意一个点染红,令k个点中距离红色祖先距离最大的那个点的距离最小化.q次查询相互独立. 分析:数 ...
- 2018 ICPC Asia Jakarta Regional Contest
题目传送门 题号 A B C D E F G H I J K L 状态 Ο . . Ο . . Ø Ø Ø Ø . Ο Ο:当场 Ø:已补 . : 待补 A. Edit Distance Thin ...
随机推荐
- Sqlserver tablediff的简单使用
1. 先列举一下自己简单的比较语句 tablediff -sourceserver 10.24.160.73 -sourcedatabase cwbasemi70 -sourceschema lcmi ...
- Oracle列转行函数LISTAGG()
--Oracle列转行函数LISTAGG() with tb_temp as( select 'China' 国家,'Wuhan' 城市 from dual union all select 'Chi ...
- Sublime Text3配置
{ "default_encoding": "UTF-8", "font_size": 16.0, "tab_size" ...
- python之tips(三)--为什么Python有相同的不可变对象id不同?
参考 : https://www.jianshu.com/p/0f6f0db0ce8f
- python爬虫之PyQuery的基本使用
PyQuery库也是一个非常强大又灵活的网页解析库,如果你有前端开发经验的,都应该接触过jQuery,那么PyQuery就是你非常绝佳的选择,PyQuery 是 Python 仿照 jQuery 的严 ...
- python设计模式第二十二天【备忘录模式】
1.应用场景 (1)能保存对象的状态,并能够恢复到之前的状态 2.代码实现 #!/usr/bin/env python #! _*_ coding:UTF-8 _*_ class Originator ...
- PreparedStement 用户登录!
一.准备工作 在qy66数据库下,新建一个denglu表.添加 name password . package cn.zhouzhou; import java.sql.Connection; im ...
- iOS一些高效代码
一. [Bugly startWithAppId:BUGLY_APP_ID #if DEBUG developmentDevice:YES #endif config:config]; 二.
- Vue——轻松实现vue底部点击加载更多
前言 需求总是不断改变的,好吧,今天就把vue如何实现逐步加载更多和分布加载更多说下,默认你知道如何去请求数据的哈 一次请求 页面 使用slice来进行限制展现从0,a的数据 <div v-fo ...
- Power Network POJ - 1459 网络流 DInic 模板
#include<cstring> #include<cstdio> #define FOR(i,f_start,f_end) for(int i=f_startl;i< ...