21暑假
文章平均质量分 50
a_aron_
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
2021-08-07
给定三个整数 x、y 和 n。 你的任务是找到最大整数 k 使得 kmodx=y(0≤k≤n),其中 mod 是模运算。 #include<bits/stdc++.h> using namespace std; typedef long long ll; const int maxn = 1e5 + 9; int a[maxn]; int main() { ll n,x,y; int t; scanf("%d",&t); while(t--) { ll k; sc原创 2021-08-07 11:16:04 · 189 阅读 · 0 评论 -
J 题 Counting Triangles
传送门 Goodeat finds an undirected complete graph with n vertices. Each edge of the graph is painted black or white. He wants you to help him findthe number of triangles (a, b, c) (a < b < c), such that the edges between (a, b), (b, c), (c, a) have the原创 2021-07-26 09:24:56 · 221 阅读 · 0 评论 -
计算几何学习
一、计算几何基础 1.圆 P1652 给出 n个圆,保证任意两个圆都不相交。 然后给出两个点(x1,y1),(x2,y2),保证均不在某个圆上,要从 (x1,y1) 到 (x2,y2)画条曲线,问这条曲线最少穿过多少次圆的边界? 输入格式 第一行为一个整数 n,表示圆的个数; 第二行是 n 个整数,表示 n个圆的 x 坐标; 第三行是 n 个整数,表示 n个圆的 y 坐标; 第四行是 n 个整数,表示 n 个圆的半径 r; 第五行是四个整数x1,y1,x2,y2; 输出格式 仅一个整数,表示最少要原创 2021-07-22 10:34:14 · 300 阅读 · 0 评论 -
Maximal submatrix
杭电多校 Problem Description Given a matrix of n rows and m columns,find the largest area submatrix which is non decreasing on each column Input The first line contains an integer T(1≤T≤10)representing the number of test cases. For each test case, the first原创 2021-07-20 17:21:52 · 262 阅读 · 0 评论 -
博弈论模板
一、巴士博弈 只有一堆n个物品,两个人轮流从中取物,规定每次最少取一个,最多取m个,最后取光者为胜。 #include <iostream> using namespace std; int main() { int n,m; while(cin>>n>>m) if(n%(m+1)==0) cout<<"后手必胜"<<endl; else cout<<"先手必胜"<<endl;原创 2021-07-17 18:38:56 · 330 阅读 · 0 评论
分享