时间限制: 2 s 空间限制: 8000 KB 题目等级 : 钻石 Diamond
题目描述 Description
在一个n*m的方阵中
寻找somebody的位置
有可能k不存在输出“biantai”
输入描述 Input Description
共n+1行
第一行 n m k
后n行为方阵
输出描述 Output Description
输出k的行和列
样例输入 Sample Input
2 4 9
1 1 4 5
5 9 4 0
样例输出 Sample Output
2 2
数据范围及提示 Data Size & Hint
n<10 m<10
有可能k不存在输出“biantai”
1 #include<cstdio> 2 #include<iostream> 3 #include<cstring> 4 using namespace std; 5 int n,m,k; 6 int a[11][11]; 7 int x; 8 int main() 9 { 10 scanf("%d%d%d",&n,&m,&k); 11 for(int i=1;i<=n;i++) 12 for(int j=1;j<=m;j++) 13 { 14 scanf("%d",&x); 15 if(x==k) 16 { 17 printf("%d %d",i,j); 18 return 0; 19 } 20 } 21 printf("biantai "); 22 return 0; 23 }
思路:我TM就不明白这题咋上钻石等级的