![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
csp
moumoumouwang
这个作者很懒,什么都没留下…
展开
-
csp 俄罗斯方块
/把数组g copy给smemcpy(s,g, sizeof(s));#include <iostream>#include <cstdio>using namespace std;const int maxn = 100010;int a[20][20], b[10][10];void print(){ for(int i = 1; i <= 15; i++) { for(int j = 1; j <= 10; j++) { co原创 2021-04-04 20:32:08 · 90 阅读 · 0 评论 -
游戏
#include <iostream>#include <cstdio>#include <vector>using namespace std;const int maxn = 100010;int visit[1100];int main() { int n, k, num = 0; cin >> n >> k; int ans, cont; while(1) { cont = 0; for(int i = 1原创 2021-03-14 19:21:28 · 98 阅读 · 0 评论 -
公共钥匙盒
为操作建立结构体#include <iostream>#include <cstdio>#include <algorithm>using namespace std;const int maxn = 1010;struct node{ int id, flag, t; bool operator < (const node &k) const { if(t != k.t) return t < k.t; if(flag原创 2021-03-14 18:29:43 · 50 阅读 · 0 评论 -
2020-12-2 期末预测之最佳阈值
#include <iostream>#include <cstdio>#include <algorithm>#include <vector>#include <map>using namespace std;const int maxn = 100010;struct node{ int x, y;}Node[100010];int cont_0[100010], cont_1[100010];struct nnod原创 2021-03-10 15:02:46 · 143 阅读 · 0 评论 -
201912-2 回收站选址
#include <iostream>#include <cstdio>#include <map>using namespace std;const int maxn = 100010;struct node{ int x,y;}Node[3010];map<pair<int,int>, int> m;bool select(int x, int y){ if(m[make_pair(x,y+1)] &&原创 2021-03-08 22:50:04 · 54 阅读 · 0 评论 -
201604-2 俄罗斯方块
枚举 确定新板块的起点位置再根据新板块内的相对位置确定新板块在整个画布中的绝对位置在新画布中记录方块位置被访问的次数 如果是2说明发生了碰撞 输出上一时刻的画布#include <iostream>#include <cstdio>#include <cstring>#include <memory>using namespace std;int a[20][20], a1[20][20];int b[5][5];bool draw.原创 2021-03-07 15:15:53 · 83 阅读 · 0 评论 -
201512-2 消除类游戏
#include <iostream>#include <cstdio>#include <algorithm>using namespace std;int a[31][31], b[31][31];int main(){ int n, m; cin >> n >> m; for(int i = 0; i < n; i++) { for(int j = 0; j < m; j++) { cin &g原创 2021-03-06 18:31:20 · 133 阅读 · 0 评论 -
202006-2 稀疏向量(挖坑)
超时啥也别干,别cin别cout 全给他printf scanf就超简单一道题 怎么也没办法AC 让人火大 写不出来心里就堵得慌没办法写别的 我好无语AC代码#include <bits/stdc++.h>using namespace std;int main(){ int n, a, b; scanf("%d %d %d",&n,&a,&b); vector<pair<int, int>> v1; ..原创 2020-09-25 21:35:50 · 85 阅读 · 0 评论 -
201812-1 小明上学
等红灯不是固定的30 读题啊读题读题读题直接给人家 constr int wait = 30了 我是大傻子hhhhh#include <bits/stdc++.h>using namespace std;int main(){ int r, y, g; cin >> r >> y >> g; int n; cin >> n; int ans = 0; for(int i = 0; i <原创 2020-09-20 20:52:40 · 58 阅读 · 0 评论 -
2020/06-1 线性分类器
注意点:题目中提到方程的三个参数的绝对值<=10^6代入返回结果需要用long long型。如果写成int型,测评结果为0分。一直以为是思路问题 结果是存储类型的地方出现了问题 题目给的条件一定是有用的 算是弥补了一个思维漏洞。输入样例:9 31 1 A1 0 A1 -1 A2 2 B2 3 B0 1 A3 1 B1 3 B2 0 A0 2 -3-3 0 2-3 1 1方法一#include <bits/stdc++.h>using nam...原创 2020-09-19 09:37:12 · 60 阅读 · 0 评论