Translate

Views

Friday, July 22, 2022

Solution Kattis - Architecture


Link Problem:  https://open.kattis.com/problems/architecture


Submission 9161708

IDDATEPROBLEMSTATUSCPULANGTEST CASES
916170818:41:44Architecture
Accepted
0.00 sC++
52/52

Files submitted

architecture.cpp

#include<bits/stdc++.h>
using namespace std;
int r, c, x, y, X=0, Y=0;
int main(){
cin >> r >> c;
while(r--){
cin >> x;
X= max(X, x);
}
while(c--){
cin >> y;
Y= max(Y, y);
}
cout<<(X==Y?"possible":"impossible");
}

No comments: