
模拟
木木木木子子子
这个作者很懒,什么都没留下…
展开
-
cf990 B. Micro-World 模拟
第一次wa 是直接模拟,用vector erase换了一个思路 反着来 考虑一个数会不会被另一个数吞并。而不是考虑一个数能够吞并多少个数第二次wa 是visit 用了short 应该用int 的getset 无重复元素,有序的for(auto &t:s) 这个是c++11 并且t 是数值不是指针iterator it 不能=kk.begin()+1#include <iostre...原创 2018-06-10 21:04:42 · 454 阅读 · 0 评论 -
模拟 Minimum Distance in a Star Graph
转自http://www.mamicode.com/info-detail-2019082.html#include<bits/stdc++.h>using namespace std;map<char, int> pos;char st[11], en[11];int n;bool OK(){ for(int i=0; i<n; i++){ ...转载 2018-04-08 21:37:00 · 151 阅读 · 0 评论 -
hdu 2209 翻纸牌游戏 模拟技巧 反转问题
题目http://acm.hdu.edu.cn/showproblem.php?pid=2209转自https://blog.youkuaiyun.com/cillyb/article/details/53002362从左往右翻,如果当前牌左边为1,此时必须翻牌。一直翻到最后一张,最后判断最后一张是否朝上即可判断是否能成功。但是有个问题,第一张牌前面没牌,可翻也可不翻,分类讨论下即可。...转载 2018-04-10 16:43:21 · 236 阅读 · 0 评论 -
poj 3295 Tautology 构造法
1.第二次做了还是没有思路2.我是从字符串的长度考虑,如果长度=1 ,就会怎样 长度=3 就有多少种可能,并且打算用递归的算法,把一个字符串分解成几小部分来解,但是问题来了,我应该怎么分解对于一个字符串,第一个肯定是运算符,但是后面应该怎么拆分,拆分后又怎么能够利用子式。这些都无法解决3. 看别人的解题思路,既然这和运算符有关的,那就考虑栈操作,这不就是我们学栈这个数据结构时的例题吗3.同时我没有...转载 2018-04-17 16:10:42 · 201 阅读 · 0 评论 -
模拟题 找出不能拼凑的最小数
A. An interesting gameZhouzhou and Dazhongfeng are playing an interesting game. They havesome cards with numbers on them, and all the numbers are between zero andnine. They can use these cards to make...原创 2018-05-03 19:34:42 · 197 阅读 · 0 评论 -
hdu 4706 Children's Day 模拟
http://acm.hdu.edu.cn/showproblem.php?pid=47061. 这题可以暴力直接printf2. 把printBlank 独立起来可以使代码简洁#include <iostream>using namespace std;void printBlank(int num){ for(int i=0;i<num;i++) ...原创 2018-05-08 15:44:39 · 222 阅读 · 0 评论