Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- #include <iomanip>
- #include <fstream>
- #include <string>
- using namespace std;
- int main(){
- int n;
- long long A[100][100];
- long long suma=0,kiek=0;
- long long max=-10000000;
- cin>>n;
- for(int i=0;i<n;i++){
- for(int j=0;j<n;j++){
- cin>>A[i][j];
- }
- }
- for(int i=0;i<n;i++){
- for(int j=0;j<i;j++){
- if(A[i][j]>max){
- max=A[i][j];
- kiek++;
- }
- }
- }
- if(kiek!=0)cout<<max;
- else cout<<"NO";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement