摘要:
分析: 关键问题在使用 getchar()回收 '/n',不然的话getline(cin,str)会将'/n'录入 //字符串的输入输出处理 #include<iostream> using namespace std; int main() { // cout<<endl; int n,i=0; 阅读全文
摘要:
分析: 周期问题,小母牛第四年才生小母牛,周期为4,递归超时的话使用备忘录 //奶牛问题 放置时间超限 #include<iostream> #include<cstring> using namespace std; int book[100]; int gcd(int n){ if(book[n 阅读全文
摘要:
//扫雷游戏 #include<iostream> #include<cstring> using namespace std; int i,j; char g[100][100]; int book[100][100]; int gcd(int x,int y){ int num=0; if(g[ 阅读全文
摘要:
网上看到的一个类似代码: #include <cstdio> #include <iostream> #include <queue> using namespace std; const int MAX_N = 100; const int MAX_M = 100; const int INF = 阅读全文