
模拟
李自行h
这个作者很懒,什么都没留下…
展开
-
ZOJ - 3944 People Counting【暴力模拟】
题目 传送门 Sample Input 2 3 3 .O. /| (.) 3 4 OOO( /|\ ())) Sample Output 1 4 题意:给你一个n*m的图,问图中有几个人,图中的某一部分也可以代表一个人 思路:暴力,找到的每一部分都消去和他是同一个人的那部分 AC code #include<iostream> #include<algorithm> #include<cstring> #include<cmath> #inclu原创 2020-10-06 21:29:34 · 131 阅读 · 0 评论 -
ZOJ - 3938 Defuse the Bomb【模拟】
题目 传送门 题意:总共有5步,每步屏幕显示的1,2,3,4都有不同的操作,问:你每次按得位置和按钮上的数字分别为多少. 思路:没什么好办法,一步一步模拟… AC code #include<bits/stdc++.h> using namespace std; int a[7][7],b[5][2]; int main() { ios::sync_with_stdio(0); int t; cin>>t; while(t--) {原创 2020-10-06 21:23:16 · 132 阅读 · 0 评论