mirror of
https://github.com/wczffl-503/OI-Codes.git
synced 2025-05-10 16:20:27 +08:00
31 lines
431 B
C++
31 lines
431 B
C++
#include <iostream>
|
|
#include <cstring>
|
|
#include <cstdio>
|
|
#include <iomanip>
|
|
using namespace std;
|
|
int main(){
|
|
int a[100][100],b,c,d=0;
|
|
cin >>b>>c;
|
|
for(int i=0;i<b;i++){
|
|
for(int j=0;j<c;j++){
|
|
cin >>a[i][j];
|
|
}
|
|
}
|
|
for(int i=0;i<b;i++){
|
|
for(int j=b-1;j>=0;j--){
|
|
if(a[i][j]!=0){
|
|
cout <<i+1<<" "<<j+1<<" "<<a[i][j];
|
|
d++;
|
|
cout <<endl;
|
|
}
|
|
}
|
|
if(d==0){
|
|
cout <<"empty"<<endl;
|
|
}
|
|
d=0;
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
|