摘要:
t1切圆 cut #include<cstdio> using namespace std; long long n; int main(){ freopen("cut.in","r",stdin); freopen("cut.out","w",stdout); scanf("%lld",&n); 阅读全文
摘要:
t1扫雷 二维数组,方向数组 #include<cstdio> using namespace std; char c[105][105];int a[105][105],n,m; int dx[]={0,1,1,1,0,-1,-1,-1},dy[]={1,1,0,-1,-1,-1,0,1}; in 阅读全文
摘要:
P5661 公交换乘 关键点在于题中说每次坐车开始时间都不重合,而且45分钟票就过期。所以理论上来讲,盒子里最多也就有45张没过期的票。大量的票都是已经过期了的,没必要从头扫一遍数组,在大量过期的票中浪费宝贵的青春。 #include<cstdio> using namespace std; int 阅读全文
摘要:
P1563 玩具谜题 #include<iostream> #include<cstdio> #include<cstring> using namespace std; struct node{int c;string st;}p[500005]; int n,m,dr,tp,k=1; int m 阅读全文