From 37b7e815612dec5655d2ee2363835e2075701ae6 Mon Sep 17 00:00:00 2001 From: omagdy7 Date: Wed, 29 Jun 2022 21:03:53 +0200 Subject: Solved the first 6 problems of codechef Starters --- codechef/ChangeRowAndColumnBoth/main.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 codechef/ChangeRowAndColumnBoth/main.cpp (limited to 'codechef/ChangeRowAndColumnBoth/main.cpp') diff --git a/codechef/ChangeRowAndColumnBoth/main.cpp b/codechef/ChangeRowAndColumnBoth/main.cpp new file mode 100644 index 0000000..6cff4f0 --- /dev/null +++ b/codechef/ChangeRowAndColumnBoth/main.cpp @@ -0,0 +1,19 @@ +#include + +using namespace std; + +int main () { + ios_base::sync_with_stdio(false); + cin.tie(NULL); + int tt; + cin >> tt; + while(tt--){ + int sx, sy, ex, ey; + cin >> sx >> sy >> ex >> ey; + if(sx != ex && sy != ey) { + cout << 1 << endl; + } else { + cout << 2 << endl; + } + } +} -- cgit v1.2.3