摘要:
#include<bits/stdc++.h> using namespace std; int dx[] = {0, 1, -1, 0}; int dy[] = {1, 0, 0, -1}; int a[100][100]; int n, m, ans; void dfs(int x, int y 阅读全文
摘要:
#include<bits/stdc++.h> using namespace std; int main() { int n; int a[100]; while(cin >> n) { double sum = 0; for(int i = 0;i < n;i++) { scanf("%d",& 阅读全文
摘要:
简单模拟 这类题开头都要getchar()吸收回车 不然一开始输入的数字也被getline到s里 最后输出0了 (我也不知道为什么 #include<bits/stdc++.h> using namespace std; int main() { int sum = 0, a = 0,n; stri 阅读全文
摘要:
从左到右有n个木块,编号为0~n-1,要求模拟以下4种操作(下面的a和b都是木块编 号)。move a onto b:把a和b上方的木块全部归位,然后把a摞在b上面。 move a over b:把a上方的木块全部归位,然后把a放在b所在木块堆的顶部。 pile a onto b:把b上方的木块全部 阅读全文
摘要:
题目大意为输入N个数字 然后从中查找M个数字 找出从小到大排序后的数字中目标数字是第几个 #include<bits/stdc++.h> using namespace std; int a[10000000]; int main() { int n,m,c = 0; while((cin >> n 阅读全文
摘要:
#include<bits/stdc++.h> using namespace std; int a[25][25]; int main() { int n; scanf("%d",&n); int x,y,tot = 1; memset(a,0,sizeof(a)); a[x = 0][y = 0 阅读全文