摘要: 整数or分数<=>能否被整除 #include<iostream> using namespace std; const int MAX=100000; int a[MAX]; int main() { int n; cin>>n; for(int i=0;i<n;i++) cin>>a[i]; i 阅读全文
posted @ 2020-09-25 20:06 知马力lly 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 注意:scanf比cin快,两层循环变换为一层比设条件break快。 #include<iostream> using namespace std; const int MAX=500000; int ind1[MAX],val1[MAX],ind2[MAX],val2[MAX]; int main 阅读全文
posted @ 2020-09-25 10:28 知马力lly 阅读(15) 评论(0) 推荐(0) 编辑
摘要: 依旧用的结构体。。。ps.好像是可以给一个输入进行一次输出的。 //2020-6-1 线性分类器 //给定一条直线,判断它是否能将训练数据中A,B两类点分开 #include<iostream> using namespace std; struct Point//点 { int x,y;//二维坐 阅读全文
posted @ 2020-09-23 20:02 知马力lly 阅读(32) 评论(0) 推荐(0) 编辑
摘要: //能用中间变量的,不要开数组QAQ 1 #include<iostream> 2 #include<bits/stdc++.h> 3 using namespace std; 4 5 int main() 6 { 7 int n,m; 8 cin>>n>>m; 9 int a; 10 int c; 阅读全文
posted @ 2020-09-06 20:30 知马力lly 阅读(52) 评论(0) 推荐(0) 编辑
摘要: 1 #include<iostream> 2 #include<bits/stdc++.h> 3 using namespace std; 4 5 int main() 6 { 7 int sum; //总报数个数(不计被跳过的数) 8 int result[4]={0}; 9 int n=0; 1 阅读全文
posted @ 2020-09-06 20:17 知马力lly 阅读(105) 评论(0) 推荐(0) 编辑
Document